0
0
Fork 0

Merge branch 'dev' of https: refs #8039//gitea.verdnatura.es/verdnatura/salix-front into 8039-canceledError_not_notify

This commit is contained in:
Alex Moreno 2024-10-24 07:56:00 +02:00
commit de7f55c589
2 changed files with 16 additions and 22 deletions

View File

@ -417,6 +417,7 @@ function handleScroll() {
ref="tableRef"
v-bind="table"
class="vnTable"
:class="{ 'last-row-sticky': $props.footer }"
:columns="splittedColumns.columns"
:rows="rows"
v-model:selected="selected"
@ -855,6 +856,9 @@ es:
table tbody th {
position: relative;
}
}
.last-row-sticky {
tbody:nth-last-child(1) {
@extend .bg-header;
position: sticky;

View File

@ -185,17 +185,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,
}));
};
onMounted(async () => {
@ -223,16 +217,17 @@ onUnmounted(() => (stateStore.rightDrawer = false));
:select-props="{
options: expeditionStateTypes,
optionLabel: 'description',
optionValue: 'code',
}"
:promise="
async (stateTypeFk) => {
await vnTableRef.CrudModelRef.saveChanges({
updates: selectedRows.map(({ id }) => ({
data: { stateTypeFk },
where: { id },
})),
async (stateCode) => {
await axios.post('ExpeditionStates/addExpeditionState', {
expeditions: selectedRows.map(({ id }) => {
return { expeditionFk: id, stateCode };
}),
});
vnTableRef.tableRef.clearSelection();
vnTableRef.reload();
}
"
/>
@ -301,7 +296,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
'row-key': 'id',
selection: 'multiple',
}"
save-url="Expeditions/crud"
auto-load
:expr-builder="
(param, value) => {
@ -347,11 +341,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>