Add download to invoice edit actions
This commit is contained in:
parent
193d637ef1
commit
30e666009c
|
|
@ -549,6 +549,9 @@ Future handleCreditAction(
|
|||
filterEntity: state.clientState.map[credit.clientId],
|
||||
);
|
||||
break;
|
||||
case EntityAction.download:
|
||||
launch(credit.invitationDownloadLink);
|
||||
break;
|
||||
case EntityAction.bulkDownload:
|
||||
store.dispatch(DownloadCreditsRequest(
|
||||
snackBarCompleter<Null>(context, localization.exportedData),
|
||||
|
|
|
|||
|
|
@ -559,6 +559,9 @@ Future handleQuoteAction(
|
|||
..entityType = EntityType.recurringInvoice
|
||||
..designId = designId));
|
||||
break;
|
||||
case EntityAction.download:
|
||||
launch(quote.invitationDownloadLink);
|
||||
break;
|
||||
case EntityAction.bulkDownload:
|
||||
store.dispatch(DownloadQuotesRequest(
|
||||
snackBarCompleter<Null>(context, localization.exportedData),
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ class _CreditEditState extends State<CreditEdit>
|
|||
onSavePressed: (context) => _onSavePressed(context),
|
||||
actions: [
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
EntityAction.emailCredit,
|
||||
if (!invoice.isSent) EntityAction.markSent,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ class CreditEditVM extends AbstractInvoiceEditVM {
|
|||
[
|
||||
EntityAction.emailCredit,
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
].contains(action)) {
|
||||
handleEntityAction(credit, action);
|
||||
} else {
|
||||
|
|
@ -132,6 +133,7 @@ class CreditEditVM extends AbstractInvoiceEditVM {
|
|||
if ([
|
||||
EntityAction.emailCredit,
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
].contains(action)) {
|
||||
handleEntityAction(savedCredit, action);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
|||
onSavePressed: (context) => _onSavePressed(context),
|
||||
actions: [
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
EntityAction.emailInvoice,
|
||||
if (!invoice.isPaid) EntityAction.newPayment,
|
||||
if (!invoice.isSent) EntityAction.markSent,
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ class InvoiceEditVM extends AbstractInvoiceEditVM {
|
|||
EntityAction.newPayment,
|
||||
EntityAction.emailInvoice,
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
].contains(action)) {
|
||||
handleEntityAction(invoice, action);
|
||||
} else {
|
||||
|
|
@ -183,6 +184,7 @@ class InvoiceEditVM extends AbstractInvoiceEditVM {
|
|||
EntityAction.newPayment,
|
||||
EntityAction.emailInvoice,
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
].contains(action)) {
|
||||
handleEntityAction(savedInvoice, action);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ class QuoteEditVM extends AbstractInvoiceEditVM {
|
|||
[
|
||||
EntityAction.emailQuote,
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
].contains(action)) {
|
||||
handleEntityAction(quote, action);
|
||||
} else {
|
||||
|
|
@ -130,6 +131,7 @@ class QuoteEditVM extends AbstractInvoiceEditVM {
|
|||
if ([
|
||||
EntityAction.emailQuote,
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
].contains(action)) {
|
||||
handleEntityAction(savedQuote, action);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ class _QuoteEditState extends State<QuoteEdit>
|
|||
onSavePressed: (context) => _onSavePressed(context),
|
||||
actions: [
|
||||
EntityAction.viewPdf,
|
||||
EntityAction.download,
|
||||
EntityAction.emailQuote,
|
||||
if (!invoice.isSent) EntityAction.markSent,
|
||||
if (!invoice.isApproved) EntityAction.convertToInvoice,
|
||||
|
|
|
|||
Loading…
Reference in New Issue