Support updating all designs

This commit is contained in:
Hillel Coren 2021-10-05 14:53:08 +03:00
parent eddc2e04ac
commit 7806501d2f
1 changed files with 9 additions and 3 deletions

View File

@ -155,7 +155,9 @@ class _InvoiceDesignState extends State<InvoiceDesign>
(b) => b..defaultInvoiceDesignId = value.id)); (b) => b..defaultInvoiceDesignId = value.id));
}, },
), ),
if (!isFiltered && _wasInvoiceDesignChanged) if (!isFiltered &&
_wasInvoiceDesignChanged &&
state.userCompany.isAdmin)
Padding( Padding(
padding: const EdgeInsets.only(bottom: 8), padding: const EdgeInsets.only(bottom: 8),
child: CheckboxListTile( child: CheckboxListTile(
@ -180,7 +182,9 @@ class _InvoiceDesignState extends State<InvoiceDesign>
(b) => b..defaultQuoteDesignId = value.id)); (b) => b..defaultQuoteDesignId = value.id));
}, },
), ),
if (!isFiltered && _wasQuoteDesignChanged) if (!isFiltered &&
_wasQuoteDesignChanged &&
state.userCompany.isAdmin)
Padding( Padding(
padding: const EdgeInsets.only(bottom: 8), padding: const EdgeInsets.only(bottom: 8),
child: CheckboxListTile( child: CheckboxListTile(
@ -205,7 +209,9 @@ class _InvoiceDesignState extends State<InvoiceDesign>
(b) => b..defaultCreditDesignId = value.id)); (b) => b..defaultCreditDesignId = value.id));
}, },
), ),
if (!isFiltered && _wasCreditDesignChanged) if (!isFiltered &&
_wasCreditDesignChanged &&
state.userCompany.isAdmin)
Padding( Padding(
padding: const EdgeInsets.only(bottom: 8), padding: const EdgeInsets.only(bottom: 8),
child: CheckboxListTile( child: CheckboxListTile(