This commit is contained in:
parent
85fa394be0
commit
2951e69a6a
|
@ -11,12 +11,15 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import { toDate, toHour } from 'src/filters';
|
import { toDate, toHour } from 'src/filters';
|
||||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
|
|
||||||
import { useDialogPluginComponent } from 'quasar';
|
import { useDialogPluginComponent } from 'quasar';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const URL_KEY = 'Tickets/ItemLack';
|
const URL_KEY = 'Tickets/ItemLack';
|
||||||
const editableStates = ref([]);
|
const editableStates = ref([]);
|
||||||
|
const { notify } = useNotify();
|
||||||
|
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
const originalRowDataCopy = ref(null);
|
const originalRowDataCopy = ref(null);
|
||||||
|
@ -49,12 +52,16 @@ const saveChange = async (field, { rowIndex, row }) => {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'quantity':
|
case 'quantity':
|
||||||
|
await axios.post(`Sales/${row.saleFk}/updateQuantity`, {
|
||||||
|
quantity: +row.quantity,
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.error(field, { rowIndex, row });
|
console.error(field, { rowIndex, row });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
notify('globals.dataSaved', 'positive');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error saving changes', err);
|
console.error('Error saving changes', err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue