增添優化功能
This commit is contained in:
@@ -25,7 +25,7 @@ class ClockInApiService {
|
||||
return await _apiService.fetchList<ClockInRecord>(
|
||||
tableName: "hrs_ClockInRecord",
|
||||
pk: "ClockInId",
|
||||
queryFilter: "1^100^ClockInDateTime^*^ClockInDateTime >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)^^ClockInUserId^$userId",
|
||||
queryFilter: "1^100^ClockInDateTime^*^ClockInDateTime >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)^hrs_ClockInRecord^ClockInUserId^$userId",
|
||||
fromJson: (json) => ClockInRecord.fromJson(json),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ class _ClockInManagerState extends State<ClockInManager> {
|
||||
return ListTile(
|
||||
leading: Icon(Icons.access_time, color: record.typeColor),
|
||||
title: Text("${record.type} - ${record.formattedDateTime}"),
|
||||
subtitle: Text(record.storeId ?? ""),
|
||||
subtitle: Text(record.StoreName ?? ""),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ class ClockInRecord {
|
||||
final double? longitude;
|
||||
final String? type;
|
||||
final String? storeId;
|
||||
final String? StoreName;
|
||||
|
||||
ClockInRecord({
|
||||
this.clockInId,
|
||||
@@ -18,6 +19,7 @@ class ClockInRecord {
|
||||
this.longitude,
|
||||
this.type,
|
||||
this.storeId,
|
||||
this.StoreName,
|
||||
});
|
||||
|
||||
factory ClockInRecord.fromJson(Map<String, dynamic> json) {
|
||||
@@ -29,6 +31,7 @@ class ClockInRecord {
|
||||
longitude: double.tryParse(json['ClockInLongitude']?.toString() ?? '0'),
|
||||
type: json['ClockInType'] as String?,
|
||||
storeId: json['ClockInStoreId'] as String?,
|
||||
StoreName: json['StoreName'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user