Add send time

This commit is contained in:
Hillel Coren 2021-06-11 08:53:36 +03:00
parent 78adc19c66
commit a6a91b46fb
1 changed files with 12 additions and 3 deletions

View File

@ -283,16 +283,25 @@ class _EmailSettingsState extends State<EmailSettings> {
String timeLabel; String timeLabel;
if (viewModel.state.company.settings.enableMilitaryTime) { if (viewModel.state.company.settings.enableMilitaryTime) {
timeLabel = '$hour:00'; timeLabel = '$hour:00';
} else if (hour > 12) {
timeLabel = '${hour - 12}:00 PM';
} else { } else {
timeLabel = '$hour:00 AM'; if (hour > 12) {
timeLabel = '${hour - 12}:00 ';
} else {
timeLabel = '$hour:00 ';
}
if (hour < 12 || hour == 24) {
timeLabel += 'AM';
} else {
timeLabel += 'PM';
}
} }
return DropdownMenuItem( return DropdownMenuItem(
child: Text(timeLabel), child: Text(timeLabel),
value: hour, value: hour,
); );
}).toList()), }).toList()),
SizedBox(height: 12),
BoolDropdownButton( BoolDropdownButton(
label: localization.attachPdf, label: localization.attachPdf,
value: settings.pdfEmailAttachment, value: settings.pdfEmailAttachment,