diff --git a/lib/constants.dart b/lib/constants.dart index e05be5015..fcda5eeee 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -796,6 +796,12 @@ const kMonthsOfTheYear = { const kFrequencyMonthly = '5'; +const kScheduleTemplates = { + kSchduleEmailStatement: 'email_statement', +}; + +const kSchduleEmailStatement = 'client_statement'; + const kFrequencies = { '1': 'freq_daily', '2': 'freq_weekly', diff --git a/lib/ui/schedule/edit/schedule_edit.dart b/lib/ui/schedule/edit/schedule_edit.dart index 2cdf084a7..59bc16ac5 100644 --- a/lib/ui/schedule/edit/schedule_edit.dart +++ b/lib/ui/schedule/edit/schedule_edit.dart @@ -104,11 +104,24 @@ class _ScheduleEditState extends State { validator: (value) => value.isEmpty ? localization.pleaseEnterAName : null, ), + AppDropdownButton( + labelText: localization.template, + value: schedule.template, + onChanged: (dynamic value) { + viewModel.onChanged( + schedule.rebuild((b) => b..template = value)); + }, + items: kScheduleTemplates.entries + .map((entry) => DropdownMenuItem( + value: entry.key, + child: Text(localization.lookup(entry.value)), + )) + .toList()), AppDropdownButton( labelText: localization.frequency, + value: schedule.template, showBlank: true, blankLabel: localization.once, - value: schedule.frequencyId, onChanged: (dynamic value) { viewModel.onChanged( schedule.rebuild((b) => b..frequencyId = value)); diff --git a/lib/utils/i18n.dart b/lib/utils/i18n.dart index 2bf2c9966..077314a4b 100644 --- a/lib/utils/i18n.dart +++ b/lib/utils/i18n.dart @@ -16,6 +16,7 @@ mixin LocalizationsProvider on LocaleCodeAware { static final Map> _localizedValues = { 'en': { // STARTER: lang key - do not remove comment + 'email_statement': 'Email Statement', 'once': 'Once', 'schedule': 'Schedule', 'schedules': 'Schedules', @@ -94509,6 +94510,11 @@ mixin LocalizationsProvider on LocaleCodeAware { _localizedValues[localeCode]['once'] ?? _localizedValues['en']['once']; + String get emailStatement => + _localizedValues[localeCode]['email_statement'] ?? + _localizedValues['en']['email_statement']; + + // STARTER: lang field - do not remove comment String lookup(String key) {