attendance_record_result.dart 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import 'package:get/get.dart';
  2. enum AttendanceV2RecordResultEnum {
  3. Normal, // ("Normal", "正常")
  4. Early, //("Early", "早退"),
  5. Late, //("Late", "迟到"),
  6. SeriousLate, //("SeriousLate", "严重迟到"),
  7. Absenteeism, //("Absenteeism", "旷工迟到"),
  8. NotSigned, //("NotSigned", "未打卡"),
  9. PreCheckIn, //("PreCheckIn", ""),
  10. }
  11. extension AttendanceV2RecordResultEnumExtension on AttendanceV2RecordResultEnum {
  12. String get name {
  13. switch(this) {
  14. case AttendanceV2RecordResultEnum.Normal:
  15. return 'attendance_result_Normal'.tr;
  16. case AttendanceV2RecordResultEnum.Early:
  17. return 'attendance_result_Early'.tr;
  18. case AttendanceV2RecordResultEnum.Late:
  19. return 'attendance_result_Late'.tr;
  20. case AttendanceV2RecordResultEnum.SeriousLate:
  21. return 'attendance_result_SeriousLate'.tr;
  22. case AttendanceV2RecordResultEnum.Absenteeism:
  23. return 'attendance_result_Absenteeism'.tr;
  24. case AttendanceV2RecordResultEnum.NotSigned:
  25. return 'attendance_result_NotSigned'.tr;
  26. case AttendanceV2RecordResultEnum.PreCheckIn:
  27. return 'attendance_result_PreCheckIn'.tr;
  28. }
  29. }
  30. String get key {
  31. switch(this) {
  32. case AttendanceV2RecordResultEnum.Normal:
  33. return 'Normal';
  34. case AttendanceV2RecordResultEnum.Early:
  35. return 'Early';
  36. case AttendanceV2RecordResultEnum.Late:
  37. return 'Late';
  38. case AttendanceV2RecordResultEnum.SeriousLate:
  39. return 'SeriousLate';
  40. case AttendanceV2RecordResultEnum.Absenteeism:
  41. return 'Absenteeism';
  42. case AttendanceV2RecordResultEnum.NotSigned:
  43. return 'NotSigned';
  44. case AttendanceV2RecordResultEnum.PreCheckIn:
  45. return 'PreCheckIn';
  46. }
  47. }
  48. }