member_activity_contribute_welfare_unlocking_list filter is_handled

FFIB 2 anni fa
parent
commit
080e53cc3c
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      api/admin_views.py

+ 4 - 0
api/admin_views.py

@@ -1220,6 +1220,7 @@ def member_activity_contribute_welfare_unlocking_list(request, administrator):
1220 1220
     contribution_id = request.POST.get('contribution_id', '')
1221 1221
     welfare_id = request.POST.get('welfare_id', '')
1222 1222
     query = request.POST.get('query', '')
1223
+    is_handled = request.POST.get('is_handled', '')
1223 1224
     page = request.POST.get('page', 1)
1224 1225
     num = request.POST.get('num', 20)
1225 1226
 
@@ -1234,6 +1235,9 @@ def member_activity_contribute_welfare_unlocking_list(request, administrator):
1234 1235
         unlockings = unlockings.filter(welfare_id=welfare_id)
1235 1236
     if query:
1236 1237
         unlockings = unlockings.filter(Q(name__icontains=query) | Q(phone__icontains=query))
1238
+    if is_handled != '':
1239
+        unlockings = unlockings.filter(is_handled=is_handled)
1240
+
1237 1241
 
1238 1242
     unlockings = unlockings.order_by('-pk')
1239 1243
     count = unlockings.count()