Bug 904 fixes and add validation for assist employee start and end date in maintenance request

design_3.0_task_module_new
WaseemAbbasi22 4 months ago
parent 754ec458a4
commit 621ca230f5

@ -542,7 +542,7 @@ class TaskJobAssistantEmployees {
data['id'] = id ?? 0;
data['startDate'] = startDate?.toIso8601String();
data['endDate'] = endDate?.toIso8601String();
data['workingHours'] = workingHours;
data['totalWorkingHour'] = workingHours;
data['comment'] = comment;
data['assistantEnginerId'] = user?.userId;
return data;

@ -223,6 +223,16 @@ class _MaintenanceRequestFormState extends State<MaintenanceRequestForm> with Si
Fluttertoast.showToast(msg: "${context.translation.youHaveToSelect} ${context.translation.repairLocation}");
return false;
}
if (model.assistantEmployees != null && model.assistantEmployees!.isNotEmpty) {
if (model.modelAssistantEmployees?.startDate == null) {
Fluttertoast.showToast(msg: "Please Select Assistant Employee Start Time");
return false;
}
if (model.modelAssistantEmployees?.endDate == null) {
Fluttertoast.showToast(msg: "Please Select Assistant Employee End Time");
return false;
}
}
// else if (model.assignedEmployeeId == null) {
// Fluttertoast.showToast(msg: "${context.translation.youHaveToSelect} ${context.translation.assignedEmployee}");
// return false;

@ -121,7 +121,7 @@ class _TaskRequestDetailsViewState extends State<TaskRequestDetailsView> {
],
),
],
if (taskProvider.taskRequestModel!.taskJobContactPersons!.isNotEmpty) contactInfoCard(context, taskProvider.taskRequestModel),
// if (taskProvider.taskRequestModel!.taskJobContactPersons!.isNotEmpty) contactInfoCard(context, taskProvider.taskRequestModel),
if (taskProvider.taskRequestModel?.callComment != null) ...[
const Divider().defaultStyle(context),
Text(

Loading…
Cancel
Save