增添優化功能

This commit is contained in:
2026-03-16 00:38:18 +08:00
parent 38039e8dc0
commit 9068d85c92
12 changed files with 223 additions and 144 deletions
+3 -3
View File
@@ -47,9 +47,9 @@ class Leave {
this.billDate,
required this.personId,
required this.agentId,
this.agentName = '',
required this.agentName,
required this.leaveType,
this.leaveTypeName = '',
required this.leaveTypeName,
this.startTime,
this.endTime,
this.days = 0,
@@ -70,7 +70,7 @@ class Leave {
billDate: json['billdate'] != null ? DateTime.tryParse(json['billdate']) : null,
personId: json['personid'] as String? ?? '',
agentId: json['agentid'] as String? ?? '',
agentName: json['agentname'] ?? '', /// 假設 API 會 Join 姓名
agentName: json['agentName'] ?? '', /// 假設 API 會 Join 姓名
leaveType: json['leavetype'] as String? ?? '',
// leaveTypeName: json['leavetype_name'] ?? json['leavetype'] ?? '',
leaveTypeName: typeName, // 這裡現在保證有值