mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-07-07 12:16:30 +00:00
feat(billing): Add is_expired field to TopupAdmin and TopupSerializer for better topup management ✨
This commit is contained in:
@ -26,8 +26,11 @@ class TopupAdmin(admin.ModelAdmin):
|
||||
"paid",
|
||||
"paid_at",
|
||||
"created_at",
|
||||
"is_expired",
|
||||
"expires_at",
|
||||
"updated_at",
|
||||
)
|
||||
|
||||
search_fields = (
|
||||
"user__first_name",
|
||||
"user__last_name",
|
||||
@ -35,6 +38,10 @@ class TopupAdmin(admin.ModelAdmin):
|
||||
"user__mobile",
|
||||
)
|
||||
|
||||
@admin.display(boolean=True, description="Expired")
|
||||
def is_expired(self, obj):
|
||||
return obj.is_expired
|
||||
|
||||
|
||||
admin.site.register(Payment, PaymentAdmin)
|
||||
admin.site.register(BillFormula)
|
||||
|
Reference in New Issue
Block a user