feat: refs #6919 sync worker
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-11-19 11:07:14 +01:00
parent efcf3be585
commit fc247ae413
2 changed files with 7 additions and 9 deletions

View File

@ -18,10 +18,11 @@ const maritalStatus = [
{ code: 'S', name: t('Single') },
];
const advancedSummary = ref({});
const route = useRoute();
onBeforeMount(async () => {
advancedSummary.value =
(await useAdvancedSummary('Workers', +useRoute().params.id)) ?? {};
console.log('route.params.id', route.params.id);
advancedSummary.value = (await useAdvancedSummary('Workers', route.params.id)) ?? {};
console.log('advancedSummary.value: ', advancedSummary.value);
});
</script>
<template>
@ -38,8 +39,6 @@ onBeforeMount(async () => {
auto-load
/>
<FormModel
:filter="{ where: { id: +$route.params.id } }"
url="Workers/summary"
:url-update="`Workers/${$route.params.id}`"
auto-load
model="Worker"

View File

@ -20,7 +20,7 @@ const $props = defineProps({
dataKey: {
type: String,
required: false,
default: 'workerData',
default: 'Worker',
},
});
const image = ref(null);
@ -71,8 +71,7 @@ const handlePhotoUpdated = (evt = false) => {
ref="cardDescriptorRef"
module="Worker"
:data-key="dataKey"
url="Workers/descriptor"
:filter="{ where: { id: entityId } }"
url="Workers/summary"
title="user.nickname"
@on-fetch="getIsExcluded"
>
@ -182,7 +181,7 @@ const handlePhotoUpdated = (evt = false) => {
<QBtn
:to="{
name: 'AccountCard',
params: { id: entity.user.id },
params: { id: entity.user?.id },
}"
size="md"
icon="face"