feat: Add todaysAssigned field to WorkItem model and implement JSON parsing
This commit is contained in:
parent
957bae526f
commit
544eb4dc79
@ -129,6 +129,7 @@ class WorkItem {
|
|||||||
final WorkCategoryMaster? workCategoryMaster;
|
final WorkCategoryMaster? workCategoryMaster;
|
||||||
final double? plannedWork;
|
final double? plannedWork;
|
||||||
final double? completedWork;
|
final double? completedWork;
|
||||||
|
final double? todaysAssigned;
|
||||||
final DateTime? taskDate;
|
final DateTime? taskDate;
|
||||||
final String? tenantId;
|
final String? tenantId;
|
||||||
final Tenant? tenant;
|
final Tenant? tenant;
|
||||||
@ -143,6 +144,7 @@ class WorkItem {
|
|||||||
this.workCategoryMaster,
|
this.workCategoryMaster,
|
||||||
this.plannedWork,
|
this.plannedWork,
|
||||||
this.completedWork,
|
this.completedWork,
|
||||||
|
this.todaysAssigned,
|
||||||
this.taskDate,
|
this.taskDate,
|
||||||
this.tenantId,
|
this.tenantId,
|
||||||
this.tenant,
|
this.tenant,
|
||||||
@ -171,6 +173,9 @@ class WorkItem {
|
|||||||
completedWork: json['completedWork'] != null
|
completedWork: json['completedWork'] != null
|
||||||
? (json['completedWork'] as num).toDouble()
|
? (json['completedWork'] as num).toDouble()
|
||||||
: null,
|
: null,
|
||||||
|
todaysAssigned: json['todaysAssigned'] != null
|
||||||
|
? (json['todaysAssigned'] as num).toDouble()
|
||||||
|
: null, // ✅ added parsing
|
||||||
taskDate:
|
taskDate:
|
||||||
json['taskDate'] != null ? DateTime.tryParse(json['taskDate']) : null,
|
json['taskDate'] != null ? DateTime.tryParse(json['taskDate']) : null,
|
||||||
tenantId: json['tenantId'] as String?,
|
tenantId: json['tenantId'] as String?,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user