Support adding tasks to quotes

This commit is contained in:
Hillel Coren 2023-09-11 22:00:02 +03:00
parent 8ac4bed3e1
commit 828a1e84c1
1 changed files with 5 additions and 4 deletions

View File

@ -250,7 +250,8 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
.length;
final showTasksTable =
invoice.hasTasks || (company.showTasksTable ?? false);
(invoice.hasTasks || (company.showTasksTable ?? false)) &&
(invoice.isInvoice || invoice.isQuote);
final settings = getClientSettings(state, client);
final terms = entityType == EntityType.quote
@ -601,7 +602,7 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
),
],
),
if (invoice.isInvoice && showTasksTable)
if (showTasksTable)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 18),
child: AppTabBar(
@ -640,7 +641,7 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
if (entityType == EntityType.credit)
CreditEditItemsScreen(
viewModel: widget.entityViewModel,
isTasks: _selectTasksTable && showTasksTable,
isTasks: _selectTasksTable,
)
else if (entityType == EntityType.quote)
QuoteEditItemsScreen(
@ -649,7 +650,7 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
else if (entityType == EntityType.invoice)
InvoiceEditItemsScreen(
viewModel: widget.entityViewModel,
isTasks: _selectTasksTable && showTasksTable,
isTasks: _selectTasksTable,
)
else if (entityType == EntityType.recurringInvoice)
RecurringInvoiceEditItemsScreen(