Merge branch 'dev' into 8077-sumDefaulterFront
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
b31010aa2b
|
@ -190,17 +190,11 @@ const getExpeditionState = async (expedition) => {
|
||||||
const { data: expeditionStates } = await axios.get(`ExpeditionStates/filter`, {
|
const { data: expeditionStates } = await axios.get(`ExpeditionStates/filter`, {
|
||||||
params: { filter: JSON.stringify(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) => {
|
expeditionsLogsData.value = expeditionStates.map((state) => ({
|
||||||
const scannedState = scannedStates.find((s) => s.id === state.id);
|
...state,
|
||||||
return {
|
isScanned: !!state.isScanned,
|
||||||
...state,
|
}));
|
||||||
isScanned: scannedState ? scannedState.isScanned : false,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
@ -231,16 +225,17 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
:select-props="{
|
:select-props="{
|
||||||
options: expeditionStateTypes,
|
options: expeditionStateTypes,
|
||||||
optionLabel: 'description',
|
optionLabel: 'description',
|
||||||
|
optionValue: 'code',
|
||||||
}"
|
}"
|
||||||
:promise="
|
:promise="
|
||||||
async (stateTypeFk) => {
|
async (stateCode) => {
|
||||||
await vnTableRef.CrudModelRef.saveChanges({
|
await axios.post('ExpeditionStates/addExpeditionState', {
|
||||||
updates: selectedRows.map(({ id }) => ({
|
expeditions: selectedRows.map(({ id }) => {
|
||||||
data: { stateTypeFk },
|
return { expeditionFk: id, stateCode };
|
||||||
where: { id },
|
}),
|
||||||
})),
|
|
||||||
});
|
});
|
||||||
vnTableRef.tableRef.clearSelection();
|
vnTableRef.tableRef.clearSelection();
|
||||||
|
vnTableRef.reload();
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -309,7 +304,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
'row-key': 'id',
|
'row-key': 'id',
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
save-url="Expeditions/crud"
|
|
||||||
auto-load
|
auto-load
|
||||||
:expr-builder="
|
:expr-builder="
|
||||||
(param, value) => {
|
(param, value) => {
|
||||||
|
@ -355,11 +349,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-isScanned="{ row }">
|
<template #body-cell-isScanned="{ row }">
|
||||||
<QTd style="text-align: center">
|
<QTd style="text-align: center">
|
||||||
<QCheckbox disable v-model="row.isScanned">
|
<QCheckbox disable v-model="row.isScanned" />
|
||||||
{{
|
|
||||||
row.isScanned === 1 ? t('expedition.yes') : t('expedition.no')
|
|
||||||
}}
|
|
||||||
</QCheckbox>
|
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
|
Loading…
Reference in New Issue