diff --git a/src/pages/Ticket/Negative/ChangeQuantityDialog.vue b/src/pages/Ticket/Negative/ChangeQuantityDialog.vue
index 1b8c71ed6a..07be42245d 100644
--- a/src/pages/Ticket/Negative/ChangeQuantityDialog.vue
+++ b/src/pages/Ticket/Negative/ChangeQuantityDialog.vue
@@ -15,11 +15,11 @@ const $props = defineProps({
default: () => [],
},
});
-const updateQuantity = async () => {
+const updateQuantity = async (evt, rows) => {
showChangeQuantityDialog.value = true;
- const rowsToUpdate = $props.selectedRows.map(({ ticketFk }) =>
- axios.post(`Tickets/state`, {
- ticketFk,
+ const rowsToUpdate = $props.selectedRows.map((row) =>
+ axios.post(`Sales//updateQuantity`, {
+ row,
quantity: newQuantity.value,
})
);
@@ -65,7 +65,7 @@ const updateQuantity = async () => {
:label="t('globals.confirm')"
color="primary"
:disable="!newQuantity || newQuantity < 0"
- @click="updateQuantity()"
+ @click="updateQuantity"
unelevated
autofocus
/> {
- showChangeStateDialog.value = true;
- const rowsToUpdate = $props.selectedRows.map(({ ticketFk }) =>
- axios.post(`Tickets/state`, {
- ticketFk,
- code: newState.value,
- })
- );
-
try {
- await Promise.all(rowsToUpdate);
- dialogRef.value.hide();
+ // showChangeStateDialog.value = true;
+ // const rowsToUpdate = $props.selectedRows.map((ticketFk) =>
+ // axios.post(`Tickets/state`, {
+ // ticketFk,
+ // code: newState.value,
+ // })
+ // );
+ // await Promise.all(rowsToUpdate);
+ dialogRef.value.hide({ refresh: true });
} catch (err) {
return err;
}
@@ -64,7 +63,7 @@ const updateState = async () => {
v-model="newState"
:options="editableStates"
option-label="name"
- option-value="id"
+ option-value="code"
/>
@@ -73,7 +72,7 @@ const updateState = async () => {
:label="t('globals.confirm')"
color="primary"
:disable="!newState"
- @click="updateState()"
+ @click="updateState"
unelevated
autofocus
/> {
vnPaginateRef.fetch()"
v-model="showChangeStateDialog"
- :selected-rows="selectedRowsDetail"
+ :selected-rows="{ selectedRowsDetail }"
>