|
|
|
|
@ -319,11 +319,11 @@ class ServiceRequestsProvider extends ChangeNotifier {
|
|
|
|
|
"reason": report.reason?.toMap(),
|
|
|
|
|
"startofWorkTime": report.startDate?.toIso8601String() ?? "",
|
|
|
|
|
"endofWorkTime": report.endDate?.toIso8601String() ?? "",
|
|
|
|
|
"workingHours": report.timer?.durationInSecond,
|
|
|
|
|
"workingHours": ((report?.endDate?.difference(report?.startDate)?.inMinutes ?? 0) / 60),
|
|
|
|
|
"travelingHours": report.travelingHours,
|
|
|
|
|
"travelingExpenses": report.travelingExpense ?? 0,
|
|
|
|
|
"faultDescription": {
|
|
|
|
|
"id": report.faultDescriptionId ?? 0,
|
|
|
|
|
"id": report.faultDescriptionId,
|
|
|
|
|
"defectName": report.type?.name,
|
|
|
|
|
"workPerformed": report.workPreformed,
|
|
|
|
|
"estimatedTime": report.operatingHours,
|
|
|
|
|
@ -331,8 +331,8 @@ class ServiceRequestsProvider extends ChangeNotifier {
|
|
|
|
|
"sparePartsWorkOrders": report.parts
|
|
|
|
|
?.map(
|
|
|
|
|
(p) => {
|
|
|
|
|
"id": p.id,
|
|
|
|
|
"sparePart": {"id": p.reportPartID ?? 0, "partNo": p.code, "partName": p.name},
|
|
|
|
|
"id": p.reportPartID ?? 0,
|
|
|
|
|
"sparePart": {"id": p.id, "partNo": p.code, "partName": p.name},
|
|
|
|
|
"qty": p.quantity
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|