forked from verdnatura/salix-front
feat: refs #8083 insert
This commit is contained in:
parent
9673f7be1e
commit
126bb3f039
|
@ -26,6 +26,7 @@ const { openConfirmationModal } = useVnConfirm();
|
|||
const newTicketDialogRef = ref(null);
|
||||
const logsTableDialogRef = ref(null);
|
||||
const vnTableRef = ref();
|
||||
const btnSelectRef = ref();
|
||||
const expeditionsLogsData = ref([]);
|
||||
const selectedExpeditions = ref([]);
|
||||
const allColumnNames = ref([]);
|
||||
|
@ -190,17 +191,11 @@ const getExpeditionState = async (expedition) => {
|
|||
const { data: expeditionStates } = await axios.get(`ExpeditionStates/filter`, {
|
||||
params: { filter: JSON.stringify(filter) },
|
||||
});
|
||||
const { data: scannedStates } = await axios.get(`ExpeditionStates`, {
|
||||
params: { filter: JSON.stringify(filter), fields: ['id', 'isScanned'] },
|
||||
});
|
||||
|
||||
expeditionsLogsData.value = expeditionStates.map((state) => {
|
||||
const scannedState = scannedStates.find((s) => s.id === state.id);
|
||||
return {
|
||||
...state,
|
||||
isScanned: scannedState ? scannedState.isScanned : false,
|
||||
};
|
||||
});
|
||||
expeditionsLogsData.value = expeditionStates.map((state) => ({
|
||||
...state,
|
||||
isScanned: !!state.isScanned,
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
@ -225,6 +220,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
<template #st-actions>
|
||||
<QBtnGroup push class="q-gutter-x-sm" flat>
|
||||
<VnBtnSelect
|
||||
ref="btnSelectRef"
|
||||
:disable="!hasSelectedRows"
|
||||
color="primary"
|
||||
:label="t('globals.changeState')"
|
||||
|
@ -241,6 +237,8 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
}),
|
||||
});
|
||||
vnTableRef.tableRef.clearSelection();
|
||||
vnTableRef.reload();
|
||||
btnSelectRef.hidePopup();
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
@ -355,11 +353,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
</template>
|
||||
<template #body-cell-isScanned="{ row }">
|
||||
<QTd style="text-align: center">
|
||||
<QCheckbox disable v-model="row.isScanned">
|
||||
{{
|
||||
row.isScanned === 1 ? t('expedition.yes') : t('expedition.no')
|
||||
}}
|
||||
</QCheckbox>
|
||||
<QCheckbox disable v-model="row.isScanned" />
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
|
|
|
@ -118,6 +118,7 @@ expedition:
|
|||
removeExpeditionSubtitle: Are you sure you want to delete this expedition?
|
||||
worker: Worker
|
||||
move: Move
|
||||
isScanned: Scanned
|
||||
basicData:
|
||||
next: Next
|
||||
back: Back
|
||||
|
|
|
@ -207,6 +207,7 @@ expedition:
|
|||
removeExpeditionSubtitle: ¿Está seguro de eliminar esta expedición?
|
||||
worker: Trabajador
|
||||
move: Mover
|
||||
isScanned: Escaneado
|
||||
package:
|
||||
package: Embalaje
|
||||
quantity: Cantidad
|
||||
|
|
Loading…
Reference in New Issue