diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index eef2e020b..2c1518b73 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -1,6 +1,7 @@ - - - - - {{ t('components.cardDescriptor.mainList') }} - - - + + + + {{ t('components.smartCard.openSummary') }} + + - { {{ entity.worker.user.name }} - + diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index b5c5616f5..fe69e97aa 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -5,12 +5,13 @@ import { useQuasar } from 'quasar'; import { useStateStore } from 'stores/useStateStore'; import { toDate } from 'filters/index'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; -import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue'; -import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import ClaimFilter from './ClaimFilter.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import CardList from 'src/components/ui/CardList.vue'; +import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue'; +import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; +import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue'; const stateStore = useStateStore(); const router = useRouter(); @@ -37,6 +38,15 @@ function viewSummary(id) { }, }); } + +function viewDescriptor(id) { + quasar.dialog({ + component: CustomerDescriptorProxy, + componentProps: { + id, + }, + }); +} @@ -86,14 +96,22 @@ function viewSummary(id) { > - - + + + + {{ row.clientName }} + + + + + + + + {{ row.workerName }} + + + + - - - {{ t('components.smartCard.viewDescription') }} - - - - diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue index de398be74..282a4b958 100644 --- a/src/pages/Customer/Card/CustomerDescriptor.vue +++ b/src/pages/Customer/Card/CustomerDescriptor.vue @@ -14,6 +14,10 @@ const $props = defineProps({ required: false, default: null, }, + summary: { + type: Object, + default: null, + }, }); const route = useRoute(); @@ -34,6 +38,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity :title="data.title" :subtitle="data.subtitle" @on-fetch="setData" + :summary="$props.summary" data-key="customerData" > diff --git a/src/pages/Customer/Card/CustomerDescriptorProxy.vue b/src/pages/Customer/Card/CustomerDescriptorProxy.vue index 84a69c026..0341f66a0 100644 --- a/src/pages/Customer/Card/CustomerDescriptorProxy.vue +++ b/src/pages/Customer/Card/CustomerDescriptorProxy.vue @@ -1,5 +1,6 @@ + - + diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue index 4a1b2a6e8..f089c0022 100644 --- a/src/pages/Worker/Card/WorkerDescriptor.vue +++ b/src/pages/Worker/Card/WorkerDescriptor.vue @@ -14,6 +14,10 @@ const $props = defineProps({ required: false, default: null, }, + summary: { + type: Object, + default: null, + }, }); const route = useRoute(); @@ -53,7 +57,7 @@ const sip = computed(() => worker.value?.sip && worker.value.sip.extension); function getWorkerAvatar() { const token = getToken(); - return `/api/Images/user/160x160/${route.params.id}/download?access_token=${token}`; + return `/api/Images/user/160x160/${entityId.value}/download?access_token=${token}`; } const data = ref(useCardDescription()); const setData = (entity) => { @@ -69,6 +73,7 @@ const setData = (entity) => { :filter="filter" :title="data.title" :subtitle="data.subtitle" + :summary="$props.summary" @on-fetch=" (data) => { worker = data; diff --git a/src/pages/Worker/Card/WorkerDescriptorProxy.vue b/src/pages/Worker/Card/WorkerDescriptorProxy.vue index 8d372b6de..98b06ad6e 100644 --- a/src/pages/Worker/Card/WorkerDescriptorProxy.vue +++ b/src/pages/Worker/Card/WorkerDescriptorProxy.vue @@ -1,5 +1,6 @@