Merge pull request 'fix(pg): fix payment request admin list display' (#3) from FEATURE/adding_is_registered_to_payment_request2 into master
Reviewed-on: addwin/pg#3
This commit is contained in:
commit
a54a10cd0e
1 changed files with 2 additions and 13 deletions
|
|
@ -54,16 +54,6 @@ def export_exel(modeladmin, request, queryset):
|
|||
# return the response
|
||||
return response
|
||||
|
||||
@admin.action(description="change to success")
|
||||
def change_to_success(model_admin, request, queryset):
|
||||
for obj in queryset:
|
||||
obj.change_state(StateChoices.WALLET_SUBMIT_SUCCESS, StateChoices.SUCCESS, 'change to success by admin')
|
||||
|
||||
@admin.action(description="change to failed")
|
||||
def change_to_failed(model_admin, request, queryset):
|
||||
for obj in queryset:
|
||||
obj.change_state(StateChoices.WALLET_SUBMIT_SUCCESS, StateChoices.FAILED, 'change to failed by admin')
|
||||
|
||||
@admin.action(description="mark as registered")
|
||||
def mark_as_registered(model_admin, request, queryset):
|
||||
for obj in queryset:
|
||||
|
|
@ -72,11 +62,10 @@ def mark_as_registered(model_admin, request, queryset):
|
|||
|
||||
|
||||
class PaymentRequestAdmin(admin.ModelAdmin):
|
||||
list_display = ['state', 'uuid', 'splited_amount', 'user_id', 'jajali_datetime', 'is_registered', 'created_at', 'application', 'gateway']
|
||||
list_display = ['state', 'check_success_again', 'uuid', 'splited_amount', 'user_id', 'jajali_datetime', 'created_at', 'application', 'gateway']
|
||||
list_display = ['state', 'check_success_again', 'uuid', 'splited_amount', 'user_id', 'jajali_datetime', 'is_registered', 'created_at', 'application', 'gateway']
|
||||
search_fields = ['application__uuid','application__client_id', 'amount', 'user__uuid']
|
||||
list_filter = ['application', 'state', 'gateway']
|
||||
actions = [export_exel, change_to_success, change_to_failed, mark_as_registered]
|
||||
actions = [export_exel, mark_as_registered]
|
||||
|
||||
|
||||
def changelist_view(self, request, extra_context=None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue