|
@@ -1,5 +1,6 @@
|
|
|
import 'package:cs_resources/constants/color_constants.dart';
|
|
|
import 'package:cs_resources/generated/assets.dart';
|
|
|
+import 'package:domain/entity/response/labour_request_edit_index_entity.dart';
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/services.dart';
|
|
@@ -110,9 +111,13 @@ class _LabourRequestAddState extends BaseState<LabourRequestAddPage, LabourReque
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- state.selectedTemplateId == null
|
|
|
+ state.selectedTemplateId == null || state.selectedTemplateId != "0"
|
|
|
? ""
|
|
|
- : state.labReqOption!.templateList.firstWhere((element) => element.value.toString() == state.selectedTemplateId).txt ?? "",
|
|
|
+ : state.labReqOption!.templateList
|
|
|
+ .firstWhere((element) => element.value.toString() == state.selectedTemplateId,
|
|
|
+ orElse: () => LabourRequestEditIndexTemplateList())
|
|
|
+ .txt ??
|
|
|
+ "",
|
|
|
fontSize: 14,
|
|
|
hint: "Choose Job Title".tr,
|
|
|
textHintColor: ColorConstants.textGrayAECAE5,
|
|
@@ -230,9 +235,12 @@ class _LabourRequestAddState extends BaseState<LabourRequestAddPage, LabourReque
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- state.selectedDepartmentId == null
|
|
|
+ state.selectedDepartmentId == null || state.selectedDepartmentId == "0"
|
|
|
? ""
|
|
|
- : state.labReqOption!.departmentList?.firstWhere((element) => element.value.toString() == state.selectedDepartmentId).txt ??
|
|
|
+ : state.labReqOption!.departmentList
|
|
|
+ .firstWhere((element) => element.value.toString() == state.selectedDepartmentId,
|
|
|
+ orElse: () => LabourRequestEditIndexDepartmentList())
|
|
|
+ .txt ??
|
|
|
"",
|
|
|
fontSize: 14,
|
|
|
hint: "Choose Outlet".tr,
|