remove expected date

main_design2.0
nextwo 2 years ago
parent 29c5f0e5cf
commit f132004c11

@ -112,7 +112,7 @@ class GasRefillProvider extends ChangeNotifier {
"site": hospital?.toMap(),
"building": {"id": building?.id, "name": building?.name, "value": building?.value},
"floor": {"id": floor?.id, "name": floor?.name, "value": floor?.value},
if (expectedDateTime != null) "expectedDate": expectedDateTime?.toIso8601String(),
//if (expectedDateTime != null) "expectedDate": expectedDateTime?.toIso8601String(),
if (expectedDateTime != null) "expectedTime": expectedDateTime?.toIso8601String(),
if (timer?.startAt != null) "startDate": timer.startAt.toIso8601String(),
if (timer?.startAt != null) "startTime": timer.startAt.toIso8601String(),
@ -158,7 +158,7 @@ class GasRefillProvider extends ChangeNotifier {
"id": newModel.id,
"gazRefillNo": newModel.title ?? "",
"status": newModel.status.toMap(),
"expectedDate": newModel.expectedDate?.toIso8601String(),
//"expectedDate": newModel.expectedDate?.toIso8601String(),
"expectedTime": newModel.expectedDate?.toIso8601String(),
if (timer?.startAt != null) "startDate": timer.startAt.toIso8601String(),
if (timer?.startAt != null) "startTime": timer.startAt.toIso8601String(),

@ -298,27 +298,27 @@ class _RequestGasRefillState extends State<RequestGasRefill> {
),
],
),
const SizedBox(height: 8),
if (_userProvider.user?.type == UsersTypes.normal_user || widget.gasRefillModel != null)
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const ASubTitle("Expected Date"),
SizedBox(
height: 8 * AppStyle.getScaleFactor(context),
),
ADateTimePicker(
date: _gasRefillProvider.expectedDateTime,
from: DateTime.now().subtract(const Duration(days: 365)),
to: DateTime.now().add(const Duration(days: 365)),
onDateTimePicker: (date) {
_gasRefillProvider.expectedDateTime = date;
_formModel.expectedDate = _gasRefillProvider.expectedDateTime;
setState(() {});
},
),
],
),
//const SizedBox(height: 8),
// if (_userProvider.user?.type == UsersTypes.normal_user || widget.gasRefillModel != null)
// Column(
// crossAxisAlignment: CrossAxisAlignment.stretch,
// children: [
// const ASubTitle("Expected Date"),
// SizedBox(
// height: 8 * AppStyle.getScaleFactor(context),
// ),
// ADateTimePicker(
// date: _gasRefillProvider.expectedDateTime,
// from: DateTime.now().subtract(const Duration(days: 365)),
// to: DateTime.now().add(const Duration(days: 365)),
// onDateTimePicker: (date) {
// _gasRefillProvider.expectedDateTime = date;
// _formModel.expectedDate = _gasRefillProvider.expectedDateTime;
// setState(() {});
// },
// ),
// ],
// ),
// if (_userProvider.user?.type == UsersTypes.engineer)
// Column(
// children: [

Loading…
Cancel
Save