6475-descriptor_preview #109
|
@ -7,6 +7,7 @@ import { useState } from 'src/composables/useState';
|
||||||
|
|
||||||
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
@ -113,7 +114,7 @@ const setData = (entity) => {
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ entity.worker.user.name }}
|
{{ entity.worker.user.name }}
|
||||||
<WorkerDescriptorProxy :id="entity.worker.userFk" />
|
<WorkerDescriptorProxy :id="entity.worker.user.id" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
@ -121,7 +122,7 @@ const setData = (entity) => {
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ entity.client.salesPersonUser.name }}
|
{{ entity.client.salesPersonUser.name }}
|
||||||
<WorkerDescriptorProxy :id="entity.client.salesPersonFk" />
|
<CustomerDescriptorProxy :id="entity.client.salesPersonFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
|
|
@ -10,8 +10,8 @@ import ClaimFilter from './ClaimFilter.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import CardList from 'src/components/ui/CardList.vue';
|
import CardList from 'src/components/ui/CardList.vue';
|
||||||
import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue';
|
import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue';
|
||||||
import WorkerSummaryDialog from 'src/pages/Worker/Card/WorkerSummaryDialog.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import CustomerSummaryDialog from 'src/pages/Customer/Card/CustomerSummaryDialog.vue';
|
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -28,25 +28,18 @@ function navigate(id) {
|
||||||
router.push({ path: `/claim/${id}` });
|
router.push({ path: `/claim/${id}` });
|
||||||
}
|
}
|
||||||
|
|
||||||
function viewSummary(id, summaryDialog) {
|
function viewSummary(id) {
|
||||||
let dialogComponent;
|
quasar.dialog({
|
||||||
|
component: ClaimSummaryDialog,
|
||||||
switch (summaryDialog) {
|
componentProps: {
|
||||||
case 'worker':
|
id,
|
||||||
dialogComponent = WorkerSummaryDialog;
|
},
|
||||||
break;
|
});
|
||||||
case 'customer':
|
|
||||||
dialogComponent = CustomerSummaryDialog;
|
|
||||||
break;
|
|
||||||
case 'claim':
|
|
||||||
dialogComponent = ClaimSummaryDialog;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function viewDescriptor(id) {
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: dialogComponent,
|
component: CustomerDescriptorProxy,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
|
@ -101,23 +94,19 @@ function viewSummary(id, summaryDialog) {
|
||||||
>
|
>
|
||||||
<template #list-items>
|
<template #list-items>
|
||||||
<VnLv label="ID" :value="row.id" />
|
<VnLv label="ID" :value="row.id" />
|
||||||
<VnLv
|
<VnLv :label="t('claim.list.customer')" @click.stop>
|
||||||
:label="t('claim.list.customer')"
|
|
||||||
@click.stop="viewSummary(row.clientFk, 'customer')"
|
|
||||||
>
|
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ row.clientName }}
|
{{ row.clientName }}
|
||||||
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv :label="t('claim.list.assignedTo')" @click.stop>
|
||||||
:label="t('claim.list.assignedTo')"
|
|
||||||
@click.stop="viewSummary(row.workerFk, 'worker')"
|
|
||||||
>
|
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ row.workerName }}
|
{{ row.workerName }}
|
||||||
|
<WorkerDescriptorProxy :id="row.workerFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
@ -147,11 +136,7 @@ function viewSummary(id, summaryDialog) {
|
||||||
{{ t('components.smartCard.openCard') }}
|
{{ t('components.smartCard.openCard') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn flat icon="preview" @click.stop="viewSummary(row.id)">
|
||||||
flat
|
|
||||||
icon="preview"
|
|
||||||
@click.stop="viewSummary(row.id, 'claim')"
|
|
||||||
>
|
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('components.smartCard.openSummary') }}
|
{{ t('components.smartCard.openSummary') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -9,6 +9,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPopupProxy>
|
<QPopupProxy>
|
||||||
<CustomerDescriptor
|
<CustomerDescriptor
|
||||||
|
|
|
@ -12,6 +12,10 @@ const $props = defineProps({
|
||||||
required: false,
|
required: false,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
summary: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -51,7 +55,7 @@ const sip = computed(() => worker.value.sip && worker.value.sip.extension);
|
||||||
|
|
||||||
function getWorkerAvatar() {
|
function getWorkerAvatar() {
|
||||||
const token = getToken();
|
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 data = ref(useCardDescription());
|
||||||
const setData = (entity) =>
|
const setData = (entity) =>
|
||||||
|
@ -64,6 +68,7 @@ const setData = (entity) =>
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:title="data.title"
|
:title="data.title"
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
|
:summary="$props.summary"
|
||||||
@on-fetch="
|
@on-fetch="
|
||||||
(data) => {
|
(data) => {
|
||||||
worker = data;
|
worker = data;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import WorkerDescriptor from './WorkerDescriptor.vue';
|
import WorkerDescriptor from './WorkerDescriptor.vue';
|
||||||
|
import WorkerSummaryDialog from './WorkerSummaryDialog.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -11,6 +12,10 @@ const $props = defineProps({
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPopupProxy>
|
<QPopupProxy>
|
||||||
<WorkerDescriptor v-if="$props.id" :id="$props.id" />
|
<WorkerDescriptor
|
||||||
|
v-if="$props.id"
|
||||||
|
:id="$props.id"
|
||||||
|
:summary="WorkerSummaryDialog"
|
||||||
|
/>
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -17,18 +17,4 @@ describe('TicketBoxing', () => {
|
||||||
cy.get('div[class="q-item__label text-h6"]').eq(0).click();
|
cy.get('div[class="q-item__label text-h6"]').eq(0).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'No videos available');
|
cy.get('.q-notification__message').should('have.text', 'No videos available');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show select time and video if have video list', () => {
|
|
||||||
cy.intercept(
|
|
||||||
{
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/Boxings/*',
|
|
||||||
},
|
|
||||||
['2022-01-01T01-01-00.mp4', '2022-02-02T02-02-00.mp4', '2022-03-03T03-03-00.mp4']
|
|
||||||
).as('getVideoList');
|
|
||||||
cy.get('.q-list').eq(3).find('.q-item').eq(2).click();
|
|
||||||
|
|
||||||
cy.get('.q-list').eq(3).find('.q-item').eq(0).find('.q-range');
|
|
||||||
cy.get('.q-list').eq(3).find('.q-item').eq(1).find('.q-select');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue