From 737ab9e99bd4eee4023d73e11e288b87ae096560 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 28 Mar 2024 11:54:47 +0100 Subject: [PATCH] updates --- .../Ticket/Negative/TicketLackDialog.vue | 30 +++++++++++-------- .../Ticket/Negative/TicketLackDialogProxy.vue | 3 -- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/pages/Ticket/Negative/TicketLackDialog.vue b/src/pages/Ticket/Negative/TicketLackDialog.vue index 48c0d52f7..4ba04d136 100644 --- a/src/pages/Ticket/Negative/TicketLackDialog.vue +++ b/src/pages/Ticket/Negative/TicketLackDialog.vue @@ -67,7 +67,8 @@ const saveChange = async (field, { rowIndex, row }) => { // Buscador_Ticket (vNewTicketFk) // Call Form_Requery - await split({ simple: true }); + await split({ simple: true }, [row]); + break; case 'code': // Call ticketChangeState(ticketFk, stateFk) @@ -326,23 +327,26 @@ const emit = defineEmits([...useDialogPluginComponent.emits, 'selection']); function rowsHasSelected({ keys }) { emit('selection', keys); } -const split = async (options) => { +// const confirmationModal = ref(false); +const split = async ({ simple }, data = []) => { openConfirmationModal( t('Confirm splitAll'), t('Are you sure you want to split all tickets?'), null, - () => console.log('') + () => { + const body = simple ? data : selectedRows.value; + axios.post(`Tickets/split`, body); + } ); + // confirmationModal.value = true; - let body = []; + // let body = []; // if (options.simple) { - body = selectedRows.value; + // } // if (options.all) { // body = $props.rows; // } - - await axios.post(`Tickets/split`, body); }; defineExpose({ split }); // const { dialogRef, onDialogHide } = useDialogPluginComponent(); @@ -365,6 +369,12 @@ defineExpose({ split }); @on-fetch="(data) => (editableStates = data)" auto-load /> + @@ -438,11 +447,6 @@ defineExpose({ split }); - diff --git a/src/pages/Ticket/Negative/TicketLackDialogProxy.vue b/src/pages/Ticket/Negative/TicketLackDialogProxy.vue index b9e2c084a..18d3e4464 100644 --- a/src/pages/Ticket/Negative/TicketLackDialogProxy.vue +++ b/src/pages/Ticket/Negative/TicketLackDialogProxy.vue @@ -38,7 +38,6 @@ async function splitAll() {