|
|
|
|
@ -28,16 +28,16 @@ import 'package:test_sa/new_views/common_widgets/single_item_drop_down_menu.dart
|
|
|
|
|
import 'package:test_sa/providers/loading_list_notifier.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/loaders/lazy_loading.dart';
|
|
|
|
|
|
|
|
|
|
class SiteInformationView extends StatefulWidget {
|
|
|
|
|
class SiteInformationPage extends StatefulWidget {
|
|
|
|
|
SessionModel sessionModel;
|
|
|
|
|
|
|
|
|
|
SiteInformationView({Key? key, required this.sessionModel}) : super(key: key);
|
|
|
|
|
SiteInformationPage({Key? key, required this.sessionModel}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<SiteInformationView> createState() => _SiteInformationViewState();
|
|
|
|
|
State<SiteInformationPage> createState() => _SiteInformationPageState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
class _SiteInformationPageState extends State<SiteInformationPage> {
|
|
|
|
|
AssetInventoryModel assetInventoryModel = AssetInventoryModel();
|
|
|
|
|
bool showMarkAsComplete = false;
|
|
|
|
|
|
|
|
|
|
@ -56,8 +56,7 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
title: 'Inventory Session Request'.addTranslation,
|
|
|
|
|
titleStyle: AppTextStyles.heading3.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
|
|
|
|
|
),
|
|
|
|
|
body: SafeArea(
|
|
|
|
|
child: Column(
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ListView(
|
|
|
|
|
padding: const EdgeInsets.only(left: 16, right: 16, top: 16),
|
|
|
|
|
@ -70,20 +69,26 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
).expanded,
|
|
|
|
|
FooterActionButton.footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
label: 'Add Asset'.addTranslation,
|
|
|
|
|
onPressed: () => _addAsset(),
|
|
|
|
|
// buttonColor: AppColor.primary10,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (showMarkAsComplete)
|
|
|
|
|
if (showMarkAsComplete) ...[
|
|
|
|
|
12.height,
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
label: 'Mark as completed'.addTranslation,
|
|
|
|
|
onPressed: () => _markAsCompleted(),
|
|
|
|
|
// buttonColor: AppColor.primary10,
|
|
|
|
|
).paddingOnly(start: 16, end: 16),
|
|
|
|
|
)
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// FooterActionButton.footerContainer(
|
|
|
|
|
// context: context,
|
|
|
|
|
// child: AppFilledButton(
|
|
|
|
|
@ -94,7 +99,6 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -185,7 +189,6 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
12.height,
|
|
|
|
|
SingleItemDropDownMenu<Site, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: context.translation.site,
|
|
|
|
|
@ -202,7 +205,7 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
12.height,
|
|
|
|
|
SingleItemDropDownMenu<Building, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: context.translation.building,
|
|
|
|
|
@ -219,7 +222,7 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
12.height,
|
|
|
|
|
SingleItemDropDownMenu<Floor, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: context.translation.floor,
|
|
|
|
|
@ -235,7 +238,7 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
12.height,
|
|
|
|
|
SingleItemDropDownMenu<Department, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: context.translation.department,
|
|
|
|
|
@ -253,7 +256,7 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
getAssetFilteredList();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
12.height,
|
|
|
|
|
SingleItemDropDownMenu<Rooms, NullableLoadingProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: context.translation.room,
|
|
|
|
|
@ -271,9 +274,8 @@ class _SiteInformationViewState extends State<SiteInformationView> {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
],
|
|
|
|
|
).toShadowContainer(context);
|
|
|
|
|
).toShadowContainer(context, borderRadius: 20, padding: 12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<bool> validateRequest() async {
|