mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
SP-368-Clarification-on-Default-Value-for-Start-Date-in-Door-Lock-Online-Tile-Limited-Password-repeat-section
This commit is contained in:
@ -68,7 +68,7 @@ class VisitorPasswordBloc
|
|||||||
DateTime? startTime = DateTime.now();
|
DateTime? startTime = DateTime.now();
|
||||||
DateTime? endTime;
|
DateTime? endTime;
|
||||||
|
|
||||||
String startTimeAccess = 'Start Time';
|
String startTimeAccess = DateTime.now().toString().split('.').first;
|
||||||
String endTimeAccess = 'End Time';
|
String endTimeAccess = 'End Time';
|
||||||
PasswordStatus? passwordStatus;
|
PasswordStatus? passwordStatus;
|
||||||
selectAccessType(
|
selectAccessType(
|
||||||
@ -136,6 +136,27 @@ class VisitorPasswordBloc
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(selectedTimestamp < DateTime.now().millisecondsSinceEpoch ~/ 1000) {
|
||||||
|
if(selectedTimestamp < DateTime.now().millisecondsSinceEpoch ~/ 1000) {
|
||||||
|
await showDialog<void>(
|
||||||
|
context: event.context,
|
||||||
|
builder: (context) => AlertDialog(
|
||||||
|
title: const Text('Effective Time cannot be earlier than current time.'),
|
||||||
|
actionsAlignment: MainAxisAlignment.center,
|
||||||
|
content:
|
||||||
|
FilledButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(event.context).pop();
|
||||||
|
add(SelectTimeVisitorPassword(context: event.context, isStart: true, isRepeat: false));
|
||||||
|
},
|
||||||
|
child: const Text('OK'),
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
effectiveTimeTimeStamp = selectedTimestamp;
|
effectiveTimeTimeStamp = selectedTimestamp;
|
||||||
startTimeAccess = selectedDateTime.toString().split('.').first;
|
startTimeAccess = selectedDateTime.toString().split('.').first;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user