diff --git a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue index 9325a5b41..d2b43c57a 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue @@ -10,8 +10,10 @@ import FetchData from 'src/components/FetchData.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import VnCurrency from 'src/components/common/VnCurrency.vue'; import { toCurrency } from 'src/filters'; +import useNotify from 'src/composables/useNotify.js'; const route = useRoute(); +const { notify } = useNotify(); const { t } = useI18n(); const arrayData = useArrayData(); const invoiceIn = computed(() => arrayData.store.data); @@ -69,6 +71,7 @@ const isNotEuro = (code) => code != 'EUR'; async function insert() { await axios.post('/InvoiceInDueDays/new', { id: +invoiceId }); await invoiceInFormRef.value.reload(); + notify(t('globals.dataSaved'), 'positive'); } const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount, 0); diff --git a/test/cypress/integration/invoiceIn/invoiceInDueDay.spec.js b/test/cypress/integration/invoiceIn/invoiceInDueDay.spec.js index 124b60c34..5a5becd22 100644 --- a/test/cypress/integration/invoiceIn/invoiceInDueDay.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInDueDay.spec.js @@ -22,7 +22,7 @@ describe('InvoiceInDueDay', () => { cy.waitForElement('thead'); cy.get(addBtn).click(); - cy.saveCard(); + cy.get('tbody > :nth-child(1)').should('exist'); cy.get('.q-notification__message').should('have.text', 'Data saved'); }); });