Change setting order

This commit is contained in:
Hillel Coren 2023-05-04 10:13:23 +03:00
parent 9b909a7142
commit e7562ec21b
1 changed files with 25 additions and 24 deletions

View File

@ -285,30 +285,6 @@ class _GeneratedNumbersState extends State<GeneratedNumbers>
),
],
),
if (company.isModuleEnabled(EntityType.recurringInvoice))
DecoratedFormField(
label: localization.recurringPrefix,
controller: _recurringPrefixController,
keyboardType: TextInputType.text,
),
if (company.isModuleEnabled(EntityType.quote))
BoolDropdownButton(
iconData: Icons.content_copy,
label: localization.sharedInvoiceQuoteCounter,
value: settings.sharedInvoiceQuoteCounter,
onChanged: (value) => viewModel.onSettingsChanged(
settings.rebuild(
(b) => b..sharedInvoiceQuoteCounter = value)),
),
if (company.isModuleEnabled(EntityType.credit))
BoolDropdownButton(
iconData: Icons.content_copy,
label: localization.sharedInvoiceCreditCounter,
value: settings.sharedInvoiceCreditCounter,
onChanged: (value) => viewModel.onSettingsChanged(
settings.rebuild(
(b) => b..sharedInvoiceCreditCounter = value)),
),
AppDropdownButton(
labelText: localization.resetCounter,
value: settings.resetCounterFrequencyId,
@ -341,6 +317,31 @@ class _GeneratedNumbersState extends State<GeneratedNumbers>
onSelected: (value, _) => viewModel.onSettingsChanged(
settings.rebuild((b) => b..resetCounterDate = value)),
),
if (company.isModuleEnabled(EntityType.recurringInvoice))
DecoratedFormField(
label: localization.recurringPrefix,
controller: _recurringPrefixController,
keyboardType: TextInputType.text,
),
SizedBox(height: 20),
if (company.isModuleEnabled(EntityType.quote))
BoolDropdownButton(
iconData: Icons.content_copy,
label: localization.sharedInvoiceQuoteCounter,
value: settings.sharedInvoiceQuoteCounter,
onChanged: (value) => viewModel.onSettingsChanged(
settings.rebuild(
(b) => b..sharedInvoiceQuoteCounter = value)),
),
if (company.isModuleEnabled(EntityType.credit))
BoolDropdownButton(
iconData: Icons.content_copy,
label: localization.sharedInvoiceCreditCounter,
value: settings.sharedInvoiceCreditCounter,
onChanged: (value) => viewModel.onSettingsChanged(
settings.rebuild(
(b) => b..sharedInvoiceCreditCounter = value)),
),
],
),
],