Merge branch 'test' into Warmfix-NegativeBasesUseNewVnTable
gitea/salix-front/pipeline/pr-test This commit looks good
Details
gitea/salix-front/pipeline/pr-test This commit looks good
Details
This commit is contained in:
commit
d96ac25ee2
|
@ -76,6 +76,15 @@ onBeforeMount(async () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const routeName = computed(() => {
|
||||||
|
const DESCRIPTOR_PROXY = 'DescriptorProxy';
|
||||||
|
|
||||||
|
let name = $props.dataKey;
|
||||||
|
if ($props.dataKey.includes(DESCRIPTOR_PROXY)) {
|
||||||
|
name = name.split(DESCRIPTOR_PROXY)[0];
|
||||||
|
}
|
||||||
|
return `${name}Summary`;
|
||||||
|
});
|
||||||
async function getData() {
|
async function getData() {
|
||||||
store.url = $props.url;
|
store.url = $props.url;
|
||||||
store.filter = $props.filter ?? {};
|
store.filter = $props.filter ?? {};
|
||||||
|
@ -154,9 +163,7 @@ const toModule = computed(() =>
|
||||||
{{ t('components.smartCard.openSummary') }}
|
{{ t('components.smartCard.openSummary') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<RouterLink
|
<RouterLink :to="{ name: routeName, params: { id: entity.id } }">
|
||||||
:to="{ name: `${dataKey}Summary`, params: { id: entity.id } }"
|
|
||||||
>
|
|
||||||
<QBtn
|
<QBtn
|
||||||
class="link"
|
class="link"
|
||||||
color="white"
|
color="white"
|
||||||
|
|
|
@ -17,6 +17,12 @@ const maritalStatus = [
|
||||||
{ code: 'M', name: t('Married') },
|
{ code: 'M', name: t('Married') },
|
||||||
{ code: 'S', name: t('Single') },
|
{ code: 'S', name: t('Single') },
|
||||||
];
|
];
|
||||||
|
async function setAdvancedSummary(data) {
|
||||||
|
const advanced = (await useAdvancedSummary('Workers', data.id)) ?? {};
|
||||||
|
Object.assign(form.value.formData, advanced);
|
||||||
|
await nextTick();
|
||||||
|
if (form.value) form.value.hasChanges = false;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -36,13 +42,7 @@ const maritalStatus = [
|
||||||
:url-update="`Workers/${$route.params.id}`"
|
:url-update="`Workers/${$route.params.id}`"
|
||||||
auto-load
|
auto-load
|
||||||
model="Worker"
|
model="Worker"
|
||||||
@on-fetch="
|
@on-fetch="setAdvancedSummary"
|
||||||
async (data) => {
|
|
||||||
Object.assign(data, (await useAdvancedSummary('Workers', data.id)) ?? {});
|
|
||||||
await $nextTick();
|
|
||||||
if (form) form.hasChanges = false;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
|
@ -12,6 +12,11 @@ const $props = defineProps({
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPopupProxy>
|
<QPopupProxy>
|
||||||
<WorkerDescriptor v-if="$props.id" :id="$props.id" :summary="WorkerSummary" />
|
<WorkerDescriptor
|
||||||
|
v-if="$props.id"
|
||||||
|
:id="$props.id"
|
||||||
|
:summary="WorkerSummary"
|
||||||
|
data-key="WorkerDescriptorProxy"
|
||||||
|
/>
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue