Schedules
This commit is contained in:
parent
6ca9b429fe
commit
b875b4cb16
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -104,11 +104,24 @@ class _ScheduleEditState extends State<ScheduleEdit> {
|
|||
validator: (value) =>
|
||||
value.isEmpty ? localization.pleaseEnterAName : null,
|
||||
),
|
||||
AppDropdownButton<String>(
|
||||
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<String>(
|
||||
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));
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
static final Map<String, Map<String, String>> _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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue