refactor: workerDescriptor use CardDescriptor
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
97f82ffa3a
commit
ba2ab0f300
|
@ -4,9 +4,11 @@ import VnCard from 'src/components/common/VnCard.vue';
|
|||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Worker"
|
||||
:data-key="$attrs['data-key'] ?? 'Worker'"
|
||||
url="Workers/summary"
|
||||
:id-in-where="true"
|
||||
:descriptor="WorkerDescriptor"
|
||||
v-bind="$attrs"
|
||||
v-on="$attrs"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import { computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import EntityDescriptor from 'src/components/ui/EntityDescriptor.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
|
||||
|
@ -11,6 +10,8 @@ import VnImg from 'src/components/ui/VnImg.vue';
|
|||
import EditPictureForm from 'components/EditPictureForm.vue';
|
||||
import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue';
|
||||
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
||||
import WorkerCard from './WorkerCard.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -52,14 +53,17 @@ const handlePhotoUpdated = (evt = false) => {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<EntityDescriptor
|
||||
<CardDescriptor
|
||||
v-bind="$attrs"
|
||||
ref="cardDescriptorRef"
|
||||
:data-key="dataKey"
|
||||
:summary="$props.summary"
|
||||
url="Workers/summary"
|
||||
:card="WorkerCard"
|
||||
:id="entityId"
|
||||
:filter="{ where: { id: entityId } }"
|
||||
title="user.nickname"
|
||||
@on-fetch="getIsExcluded"
|
||||
module="Worker"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<WorkerDescriptorMenu
|
||||
|
@ -165,7 +169,7 @@ const handlePhotoUpdated = (evt = false) => {
|
|||
</QBtn>
|
||||
</QCardActions>
|
||||
</template>
|
||||
</EntityDescriptor>
|
||||
</CardDescriptor>
|
||||
<VnChangePassword
|
||||
ref="changePassRef"
|
||||
:submit-fn="
|
||||
|
|
Loading…
Reference in New Issue