diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 3595b2f04..a4b53e891 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -288,6 +288,14 @@ export default { responsibility: 'Responsibility', company: 'Company', person: 'Employee/Customer', + notes: 'Notes', + photos: 'Photos', + development: 'Development', + reason: 'Reason', + result: 'Result', + responsible: 'Responsible', + worker: 'Worker', + redelivery: 'Redelivery' }, basicData: { customer: 'Customer', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 063395b18..cd052fe3f 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -287,6 +287,14 @@ export default { responsibility: 'Responsabilidad', company: 'Empresa', person: 'Comercial/Cliente', + notes: 'Observaciones', + photos: 'Fotos', + development: 'Trazabilidad', + reason: 'Motivo', + result: 'Consecuencias', + responsible: 'Responsable', + worker: 'Trabajador', + redelivery: 'DevoluciĆ³n' }, basicData: { customer: 'Cliente', diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue index f3180b13d..ac464d125 100644 --- a/src/pages/Claim/Card/ClaimSummary.vue +++ b/src/pages/Claim/Card/ClaimSummary.vue @@ -5,9 +5,13 @@ import { useI18n } from 'vue-i18n'; import { toDate, toCurrency } from 'src/filters'; import CardSummary from 'components/ui/CardSummary.vue'; import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue'; +import FetchData from 'components/FetchData.vue'; +import { useSession } from 'src/composables/useSession'; const route = useRoute(); const { t } = useI18n(); +const session = useSession(); +const token = session.getToken(); const $props = defineProps({ id: { @@ -76,14 +80,82 @@ function stateColor(code) { if (code === 'managed') return 'orange'; if (code === 'resolved') return 'red'; } + +const developmentColumns = ref([ + { + name: 'claimReason', + label: 'claim.summary.reason', + field: (row) => row.claimReason.description, + sortable: true, + }, + { + name: 'claimResult', + label: 'claim.summary.result', + field: (row) => row.claimResult.description, + sortable: true, + }, + { + name: 'claimResponsible', + label: 'claim.summary.responsible', + field: (row) => row.claimResponsible.description, + sortable: true, + }, + { + name: 'worker', + label: 'claim.summary.worker', + field: (row) => row.worker.user.nickname, + sortable: true, + }, + { + name: 'claimRedelivery', + label: 'claim.summary.redelivery', + field: (row) => row.claimRedelivery.description, + sortable: true, + }, +]); +const claimDms = ref([]); +const multimediaDialog = ref(); +const multimediaSlide = ref(); +const claimDmsFilter = ref({ + include: [ + { + relation: 'dms', + }, + ], + where: { claimFk: entityId.value }, +}); + +function setClaimDms(data) { + if (!data) return; + + data.forEach((media) => { + claimDms.value.push({ + isVideo: media.dms.contentType == 'video/mp4', + url: `/api/Claims/${media.dmsFk}/downloadFile?access_token=${token}`, + dmsFk: media.dmsFk, + }); + }); +} + +function openDialog(dmsId) { + multimediaSlide.value = dmsId; + multimediaDialog.value = true; +}