|
|
|
|
@ -126,7 +126,8 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
initialValue: "",
|
|
|
|
|
labelText: context.translation.technicalComment,
|
|
|
|
|
textInputType: TextInputType.multiline,
|
|
|
|
|
backgroundColor: AppColor.neutral90,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
labelStyle: TextStyle(color: AppColor.textColor(context)),
|
|
|
|
|
showShadow: false,
|
|
|
|
|
alignLabelWithHint: true,
|
|
|
|
|
onChange: (value) {
|
|
|
|
|
@ -151,6 +152,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
),
|
|
|
|
|
).paddingOnly(bottom: 85),
|
|
|
|
|
FooterActionButton.footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
|
children: [
|
|
|
|
|
@ -265,7 +267,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
ADatePicker(
|
|
|
|
|
label: context.translation.installationDate,
|
|
|
|
|
hideShadow: true,
|
|
|
|
|
backgroundColor: AppColor.neutral90,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
date: DateTime.tryParse(taskModel.installationDate ?? ""),
|
|
|
|
|
formatDateWithTime: false,
|
|
|
|
|
onDatePicker: (selectedDate) {
|
|
|
|
|
@ -291,7 +293,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
8.height,
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
labelText: context.translation.serialNo,
|
|
|
|
|
backgroundColor: AppColor.neutral90,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
showShadow: false,
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle,
|
|
|
|
|
initialValue: taskModel.serialNo ?? '',
|
|
|
|
|
@ -307,7 +309,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
initialValue: taskModel.site,
|
|
|
|
|
loading: _taskProvider?.isSiteLoading,
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
showShadow: false,
|
|
|
|
|
enabled: false,
|
|
|
|
|
onSelect: (value) {
|
|
|
|
|
@ -325,7 +327,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
SingleItemDropDownMenu<Building, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: 'Installation Building',
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
loading: _taskProvider?.isSiteLoading,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
@ -346,7 +348,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
SingleItemDropDownMenu<Floor, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
loading: _taskProvider?.isSiteLoading,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
title: 'Installation Floor',
|
|
|
|
|
@ -366,7 +368,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
SingleItemDropDownMenu<Department, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: 'Installation Department',
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
loading: _taskProvider?.isSiteLoading,
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
@ -426,7 +428,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
height: 56.toScreenHeight,
|
|
|
|
|
title: context.translation.completedActions,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
backgroundColor: AppColor.neutral90,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
enabled: false,
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
initialValue: taskModel.actionNeeded,
|
|
|
|
|
@ -441,7 +443,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
height: 56.toScreenHeight,
|
|
|
|
|
title: context.translation.impactStatus,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
backgroundColor: AppColor.neutral90,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
initialValue: taskModel.impactStatus,
|
|
|
|
|
onSelect: (status) {
|
|
|
|
|
@ -465,7 +467,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
height: 56.toScreenHeight,
|
|
|
|
|
title: context.translation.completedActions,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
backgroundColor: AppColor.neutral90,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
enabled: false,
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
initialValue: taskModel.actionNeeded,
|
|
|
|
|
@ -480,7 +482,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
height: 56.toScreenHeight,
|
|
|
|
|
title: context.translation.impactStatus,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
backgroundColor: AppColor.neutral90,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
initialValue: taskModel.impactStatus,
|
|
|
|
|
onSelect: (status) {
|
|
|
|
|
@ -512,7 +514,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
enabled: isTimerEnable,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: AppColor.neutral90,
|
|
|
|
|
color: AppColor.fieldBgColor(context),
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
pickerTimer: taskProvider.taskRequestModel?.taskTimePicker,
|
|
|
|
|
@ -531,11 +533,11 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
'Total Working Time:'.bodyText2(context).custom(color: AppColor.neutral50),
|
|
|
|
|
'Total Working Time:'.bodyText2(context).custom(color: AppColor.textColor(context)),
|
|
|
|
|
8.width,
|
|
|
|
|
Text(
|
|
|
|
|
ServiceRequestUtils.formatTimerDuration(totalWorkingHours.round()),
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600),
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: AppColor.textColor(context), fontWeight: FontWeight.w600),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -632,7 +634,7 @@ class _AssistantEmployeeCardState extends State<AssistantEmployeeCard> {
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
context.translation.assistantEmployee.heading6(context).custom(color: AppColor.black10),
|
|
|
|
|
context.translation.assistantEmployee.heading6(context).custom(color: AppColor.textColor(context)),
|
|
|
|
|
Icon(isExpanded ? Icons.keyboard_arrow_up_rounded : Icons.keyboard_arrow_down_rounded),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -647,7 +649,7 @@ class _AssistantEmployeeCardState extends State<AssistantEmployeeCard> {
|
|
|
|
|
children: [
|
|
|
|
|
ServiceReportAssistantEmployeeMenu(
|
|
|
|
|
title: context.translation.select,
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
initialValue: (taskModel?.assistantEmployees?.isNotEmpty ?? false) ? taskModel?.assistantEmployees?.first : null,
|
|
|
|
|
onSelect: (employee) {
|
|
|
|
|
if (employee == null) {
|
|
|
|
|
@ -665,7 +667,7 @@ class _AssistantEmployeeCardState extends State<AssistantEmployeeCard> {
|
|
|
|
|
ADatePicker(
|
|
|
|
|
label: context.translation.startTime,
|
|
|
|
|
hideShadow: true,
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
date: taskModel?.modelAssistantEmployees?.startDate,
|
|
|
|
|
// from: taskModel?.d,
|
|
|
|
|
formatDateWithTime: true,
|
|
|
|
|
@ -705,7 +707,7 @@ class _AssistantEmployeeCardState extends State<AssistantEmployeeCard> {
|
|
|
|
|
ADatePicker(
|
|
|
|
|
label: context.translation.endTime,
|
|
|
|
|
hideShadow: true,
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
date: taskModel?.modelAssistantEmployees?.endDate,
|
|
|
|
|
enable: taskModel?.modelAssistantEmployees?.startDate != null,
|
|
|
|
|
formatDateWithTime: true,
|
|
|
|
|
@ -759,12 +761,12 @@ class _AssistantEmployeeCardState extends State<AssistantEmployeeCard> {
|
|
|
|
|
8.height,
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
labelText: context.translation.workingHours,
|
|
|
|
|
backgroundColor: AppColor.neutral80,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
controller: _workingHoursController,
|
|
|
|
|
suffixIcon: "clock".toSvgAsset(width: 20, color: context.isDark ? AppColor.neutral10 : null).paddingOnly(end: 16),
|
|
|
|
|
initialValue: taskModel?.modelAssistantEmployees?.workingHours != null ? taskModel!.modelAssistantEmployees!.workingHours?.toStringAsFixed(2) : '',
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle,
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
|
|
|
|
|
enable: false,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
|
|
|
@ -773,9 +775,9 @@ class _AssistantEmployeeCardState extends State<AssistantEmployeeCard> {
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
initialValue: taskModel?.modelAssistantEmployees?.comment,
|
|
|
|
|
labelText: context.translation.comment,
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
showShadow: false,
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle,
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
|
|
|
|
|
alignLabelWithHint: true,
|
|
|
|
|
textInputType: TextInputType.multiline,
|
|
|
|
|
onChange: (value) {
|
|
|
|
|
|