feat: 增加attendance查询和排序条件

This commit is contained in:
caoqianming 2024-01-31 10:18:24 +08:00
parent d6618ce25d
commit 8b2761b027
1 changed files with 2 additions and 1 deletions

View File

@ -255,7 +255,8 @@ class AttendanceViewSet(CustomModelViewSet):
'user__belong_dept', 'user__post', 'shift', 'team'] 'user__belong_dept', 'user__post', 'shift', 'team']
filterset_fields = ['user', filterset_fields = ['user',
'user__belong_dept', 'user__post', 'state', 'work_date', 'user__name', 'user__phone'] 'user__belong_dept', 'user__post', 'state', 'work_date', 'user__name', 'user__phone']
ordering = ['-create_time'] search_fields = ['user__name', 'user__phone']
ordering = ['-work_date', '-create_time']
class ClockRecordViewSet(BulkCreateModelMixin, ListModelMixin, BulkDestroyModelMixin, CustomGenericViewSet): class ClockRecordViewSet(BulkCreateModelMixin, ListModelMixin, BulkDestroyModelMixin, CustomGenericViewSet):