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

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

Loading…
Cancel
Save