diff --git a/src/pages/Ticket/Negative/TicketLackDialog.vue b/src/pages/Ticket/Negative/TicketLackDialog.vue index 99284be02..cb6f7c40e 100644 --- a/src/pages/Ticket/Negative/TicketLackDialog.vue +++ b/src/pages/Ticket/Negative/TicketLackDialog.vue @@ -11,12 +11,15 @@ import VnInput from 'src/components/common/VnInput.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import { toDate, toHour } from 'src/filters'; import { useVnConfirm } from 'composables/useVnConfirm'; +import useNotify from 'src/composables/useNotify.js'; + const { openConfirmationModal } = useVnConfirm(); import { useDialogPluginComponent } from 'quasar'; const { t } = useI18n(); const URL_KEY = 'Tickets/ItemLack'; const editableStates = ref([]); +const { notify } = useNotify(); const selectedRows = ref([]); const originalRowDataCopy = ref(null); @@ -49,12 +52,16 @@ const saveChange = async (field, { rowIndex, row }) => { break; case 'quantity': + await axios.post(`Sales/${row.saleFk}/updateQuantity`, { + quantity: +row.quantity, + }); break; default: console.error(field, { rowIndex, row }); break; } + notify('globals.dataSaved', 'positive'); } catch (err) { console.error('Error saving changes', err); }