|
|
|
@ -20,6 +20,7 @@ import 'package:test_sa/new_views/app_style/app_color.dart';
|
|
|
|
import 'package:test_sa/new_views/common_widgets/app_lazy_loading.dart';
|
|
|
|
import 'package:test_sa/new_views/common_widgets/app_lazy_loading.dart';
|
|
|
|
import 'package:test_sa/new_views/common_widgets/app_text_form_field.dart';
|
|
|
|
import 'package:test_sa/new_views/common_widgets/app_text_form_field.dart';
|
|
|
|
import 'package:test_sa/views/widgets/date_and_time/date_picker.dart';
|
|
|
|
import 'package:test_sa/views/widgets/date_and_time/date_picker.dart';
|
|
|
|
|
|
|
|
import 'package:test_sa/views/widgets/date_and_time/time_picker.dart';
|
|
|
|
import 'package:test_sa/views/widgets/e_signature/e_signature.dart';
|
|
|
|
import 'package:test_sa/views/widgets/e_signature/e_signature.dart';
|
|
|
|
import '../../../../new_views/common_widgets/app_filled_button.dart';
|
|
|
|
import '../../../../new_views/common_widgets/app_filled_button.dart';
|
|
|
|
import '../../../../new_views/common_widgets/default_app_bar.dart';
|
|
|
|
import '../../../../new_views/common_widgets/default_app_bar.dart';
|
|
|
|
@ -95,49 +96,45 @@ class _UpdateEndUserCostCenterDetailsViewState extends State<UpdateEndUserCostCe
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
key: _scaffoldKey,
|
|
|
|
key: _scaffoldKey,
|
|
|
|
appBar: DefaultAppBar(
|
|
|
|
appBar: DefaultAppBar(title: 'End-User Acceptance'.addTranslation),
|
|
|
|
title: 'End-User Acceptance'.addTranslation,
|
|
|
|
|
|
|
|
titleStyle: AppTextStyles.heading3.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
body: Form(
|
|
|
|
body: Form(
|
|
|
|
key: _formKey,
|
|
|
|
key: _formKey,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
SingleChildScrollView(
|
|
|
|
SingleChildScrollView(
|
|
|
|
padding: const EdgeInsets.all(16),
|
|
|
|
padding: const EdgeInsets.all(16),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
inspectionDetailsForm().toShadowContainer(context, borderRadius: 20, padding: 12),
|
|
|
|
inspectionDetailsForm().toShadowContainer(context, borderRadius: 20, padding: 12),
|
|
|
|
|
|
|
|
|
|
|
|
///Need to implement later as discuss with Ahmed.
|
|
|
|
///Need to implement later as discuss with Ahmed.
|
|
|
|
// Text(
|
|
|
|
// Text(
|
|
|
|
// "Acceptance Form",
|
|
|
|
// "Acceptance Form",
|
|
|
|
// style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
|
|
|
|
// style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 6.height,
|
|
|
|
// 6.height,
|
|
|
|
// Row(
|
|
|
|
// Row(
|
|
|
|
// children: [
|
|
|
|
// children: [
|
|
|
|
// 'warning_icon'.toSvgAsset(height: 16, width: 16),
|
|
|
|
// 'warning_icon'.toSvgAsset(height: 16, width: 16),
|
|
|
|
// 6.width,
|
|
|
|
// 6.width,
|
|
|
|
// Text(
|
|
|
|
// Text(
|
|
|
|
// 'Review the acceptance form'.addTranslation,
|
|
|
|
// 'Review the acceptance form'.addTranslation,
|
|
|
|
// style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
|
|
|
|
// style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 6.width,
|
|
|
|
// 6.width,
|
|
|
|
// 'web_link_icon'.toSvgAsset(height: 20, width: 20),
|
|
|
|
// 'web_link_icon'.toSvgAsset(height: 20, width: 20),
|
|
|
|
// ],
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
20.height,
|
|
|
|
20.height,
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
"Items",
|
|
|
|
"Items",
|
|
|
|
style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
|
|
|
|
style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
16.height,
|
|
|
|
16.height,
|
|
|
|
endUserAssetList(context),
|
|
|
|
endUserAssetList(context),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
))
|
|
|
|
)).expanded,
|
|
|
|
.expanded,
|
|
|
|
|
|
|
|
FooterActionButton.footerContainer(context: context, child: AppFilledButton(buttonColor: AppColor.primary10, label: 'Save'.addTranslation, maxWidth: true, onPressed: _saveTap)),
|
|
|
|
FooterActionButton.footerContainer(context: context, child: AppFilledButton(buttonColor: AppColor.primary10, label: 'Save'.addTranslation, maxWidth: true, onPressed: _saveTap)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -189,27 +186,9 @@ class _UpdateEndUserCostCenterDetailsViewState extends State<UpdateEndUserCostCe
|
|
|
|
from: DateTime(DateTime.now().year, 1, 1),
|
|
|
|
from: DateTime(DateTime.now().year, 1, 1),
|
|
|
|
formatDateWithTime: true,
|
|
|
|
formatDateWithTime: true,
|
|
|
|
onDatePicker: (selectedDate) {
|
|
|
|
onDatePicker: (selectedDate) {
|
|
|
|
showTimePicker(
|
|
|
|
showThemedTimePicker(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
initialTime: TimeOfDay.now(),
|
|
|
|
initialTime: TimeOfDay.now(),
|
|
|
|
builder: (BuildContext context, Widget? child) {
|
|
|
|
|
|
|
|
final ThemeData currentTheme = Theme.of(context);
|
|
|
|
|
|
|
|
return Theme(
|
|
|
|
|
|
|
|
data: currentTheme.copyWith(
|
|
|
|
|
|
|
|
timePickerTheme: TimePickerThemeData(
|
|
|
|
|
|
|
|
dialHandColor: AppColor.primary10,
|
|
|
|
|
|
|
|
dialBackgroundColor: Colors.grey.withOpacity(0.1),
|
|
|
|
|
|
|
|
hourMinuteColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? AppColor.primary10 : Colors.grey.withOpacity(0.1)),
|
|
|
|
|
|
|
|
dayPeriodColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? AppColor.primary10 : Colors.transparent),
|
|
|
|
|
|
|
|
dayPeriodTextColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? Colors.white : AppColor.primary10),
|
|
|
|
|
|
|
|
dayPeriodBorderSide: BorderSide(color: Colors.grey.withOpacity(0.2)),
|
|
|
|
|
|
|
|
entryModeIconColor: AppColor.primary10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(foregroundColor: AppColor.primary10)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: child!,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
).then((selectedTime) {
|
|
|
|
).then((selectedTime) {
|
|
|
|
if (selectedTime != null) {
|
|
|
|
if (selectedTime != null) {
|
|
|
|
model.acceptanceDate = DateTime(selectedDate.year, selectedDate.month, selectedDate.day, selectedTime.hour, selectedTime.minute);
|
|
|
|
model.acceptanceDate = DateTime(selectedDate.year, selectedDate.month, selectedDate.day, selectedTime.hour, selectedTime.minute);
|
|
|
|
|