refs #6321 feat updateQuantity
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-04-03 09:58:04 +02:00
parent 85fa394be0
commit 2951e69a6a
1 changed files with 7 additions and 0 deletions

View File

@ -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);
}