Skip to content

Commit

Permalink
misc: add success toast on manual netsuite sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed May 31, 2024
1 parent 1b9dd31 commit ad082d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions ditto/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@
"text_66461b36b4b38c006e8b5068": "To link Lago credit notes with NetSuite, please choose the corresponding credit note item in your NetSuite account.",
"text_6650b36fc702a4014c878996": "Connected to external apps",
"text_6650b36fc702a4014c87899a": "Netsuite invoice url",
"text_6655a88569eed300ee8c4d44": "NetSuite synchronisation successfully triggered.",
"text_6650b36fc702a4014c8788fd": "Sync invoice to NetSuite",
"text_62f50d3cc15266f3bd1d83ce": "Infos copied to clipboard",
"text_62f50d26c989ab0319688498": "Environment information",
Expand Down
8 changes: 8 additions & 0 deletions src/layouts/CustomerInvoiceDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ const CustomerInvoiceDetails = () => {
const [syncIntegrationInvoice, { loading: loadingSyncIntegrationInvoice }] =
useSyncIntegrationInvoiceMutation({
variables: { input: { invoiceId: invoiceId || '' } },
onCompleted({ syncIntegrationInvoice: syncIntegrationInvoiceResult }) {
if (syncIntegrationInvoiceResult?.invoiceId) {
addToast({
severity: 'success',
translateKey: 'text_6655a88569eed300ee8c4d44',
})
}
},
})

const [downloadInvoice, { loading: loadingInvoiceDownload }] = useDownloadInvoiceMutation({
Expand Down

0 comments on commit ad082d8

Please sign in to comment.