From 6786ac97e41b36abf19a706b124b3f9dd4cfa09e Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 30 Aug 2023 12:53:18 +0200 Subject: [PATCH] refs #5995 Improved external CMR --- src/i18n/en/index.js | 4 ++- src/i18n/es/index.js | 4 ++- src/pages/Route/Cmr/CmrList.vue | 58 +++++++++++++++++++++++++++------ 3 files changed, 54 insertions(+), 12 deletions(-) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 4cafee136..fc091862e 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -482,7 +482,7 @@ export default { cmr: { list: { total: 'Total records', - cmrFk: 'Cmr id', + cmrFk: 'CMR id', hasCmrDms: `Attached in gestdoc`, true: 'Yes', false: 'No', @@ -490,6 +490,8 @@ export default { country: 'Country', clientFk: 'Client id', shipped: 'Preparation date', + viewCmr: 'View CMR', + downloadCmr: 'Download CMR', }, }, }, diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 13e3fd626..6ed9d1b24 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -482,7 +482,7 @@ export default { cmr: { list: { total: 'Total registros', - cmrFk: 'Id cmr', + cmrFk: 'Id CMR', hasCmrDms: 'Adjuntado en gestdoc', true: 'Sí', false: 'No', @@ -490,6 +490,8 @@ export default { country: 'País', clientFk: 'Id cliente', shipped: 'Fecha preparación', + viewCmr: 'Ver CMR', + downloadCmr: 'Descargar CMR', }, }, }, diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue index 497d20914..fc966bc47 100644 --- a/src/pages/Route/Cmr/CmrList.vue +++ b/src/pages/Route/Cmr/CmrList.vue @@ -6,6 +6,8 @@ import VnPaginate from 'components/ui/VnPaginate.vue'; import { useSession } from 'src/composables/useSession'; import { toDate } from 'filters/index'; import CmrFilter from './CmrFilter.vue'; +import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue'; +import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue'; const stateStore = useStateStore(); const { t } = useI18n(); @@ -54,10 +56,18 @@ const columns = computed(() => [ sortable: true, headerStyle: 'padding-left: 33px', }, + { + name: 'icons', + align: 'center', + field: (row) => row.cmrFk, + }, ]); function getProjectUrl() { return new URL(window.location).origin; } +function getCmrLink(cmrFk) { + return `${getProjectUrl()}/api/Routes/${cmrFk}/cmr?access_token=${token}`; +}