Open geekelo opened 1 month ago
This ActiveAdmin configuration is set up to manage MasterWalletPayoutFeeTransfer
records, which likely represent the fees associated with payout transfers from a master wallet. Here's an overview of the configuration:
actions :all, except: %i[destroy create new]
:
destroy
, create
, and new
. Admins can view, edit, and update existing records but cannot delete or create new records.permit_params :status, :external_status
:
status
and external_status
.includes :user, :payout
:
user
and payout
records to optimize queries, reducing the number of database calls needed when displaying related data.config.sort_order = 'created_at_desc'
:
created_at
field in descending order, showing the most recent records first.menu parent: 'Legacy', label: 'Master Wallet - Payout Fees'
:
index do
:
selectable_column
: Adds checkboxes for batch actions.id_column
: Displays the ID.column :user
: Displays the associated user.column :transfer_type
: Displays the transfer type.column :amount
: Displays the amount.column :currency
: Displays the currency.column :payout
: Displays the associated payout.column :status
: Displays the internal status.column :external_status
: Displays the external status.column :source
: Displays the source ID if available.column :destination
: Displays the destination ID if available.column :created_at
: Displays the creation date.actions
: Adds edit and view actions for each record.form do |f|
:
panel 'Info' do
:
f.input :status
: Provides a field to update the status.f.input :external_status
: Provides a field to update the external status.panel 'Soft Delete' do
:
f.input :discarded_at, as: :date_time_picker, datepicker_options: { min_date: Time.now, max_date: Time.now }
: Provides a field to set a discarded_at
date using a date-time picker. This is used for soft deletion, which allows the transfer to be marked as discarded without being permanently deleted.para 'Add at discarded_at date only if you need to discard this master wallet transfer (e.g. to resolve and allow re-processing when the transfer is stuck in pending or there are errors).'.html_safe
: A note explaining the purpose of the discarded_at
field.f.actions
: Adds the submit and cancel buttons.This configuration provides a controlled interface for managing MasterWalletPayoutFeeTransfer
records within the ActiveAdmin framework. It allows for viewing and editing specific details of each transfer, with the ability to soft delete records when necessary. The interface is optimized for admin use, with clear organization and helpful notes to guide the process of managing payout fees associated with master wallets.
FILE