From 0475083a2b5b415f07234723b4f0698d11d3c6b4 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 2 Sep 2024 14:57:01 +0200 Subject: [PATCH 1/8] refs #7407 Medical Section --- src/i18n/locale/en.yml | 11 +++ src/i18n/locale/es.yml | 12 ++++ src/pages/Worker/Card/WorkerMedical.vue | 92 +++++++++++++++++++++++++ src/router/modules/worker.js | 10 +++ 4 files changed, 125 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerMedical.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 4abaeeb5b..272b7911b 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -259,6 +259,7 @@ globals: ticketsMonitor: Tickets monitor clientsActionsMonitor: Clients and actions serial: Serial + medical: Mutual created: Created worker: Worker now: Now @@ -877,6 +878,7 @@ worker: timeControl: Time control locker: Locker balance: Balance + medical: Medical list: name: Name email: Email @@ -956,6 +958,15 @@ worker: amount: Importe remark: Bonficado hasDiploma: Diploma + medical: + tableVisibleColumns: + date: Date + time: Hour + center: Formation Center + invoice: Invoice + amount: Amount + isFit: Fit + remark: Observations imageNotFound: Image not found balance: tableVisibleColumns: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 335c2d651..0e1c52cc4 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -261,6 +261,7 @@ globals: ticketsMonitor: Monitor de tickets clientsActionsMonitor: Clientes y acciones serial: Facturas por serie + medical: Mutua created: Fecha creación worker: Trabajador now: Ahora @@ -878,6 +879,8 @@ worker: timeControl: Control de horario locker: Taquilla balance: Balance + formation: Formación + medical: Mutua list: name: Nombre email: Email @@ -948,6 +951,15 @@ worker: amount: Importe remark: Bonficado hasDiploma: Diploma + medical: + tableVisibleColumns: + date: Fecha + time: Hora + center: Centro de Formación + invoice: Factura + amount: Importe + isFit: Apto + remark: Observaciones imageNotFound: No se ha encontrado la imagen balance: tableVisibleColumns: diff --git a/src/pages/Worker/Card/WorkerMedical.vue b/src/pages/Worker/Card/WorkerMedical.vue new file mode 100644 index 000000000..b6d1ad248 --- /dev/null +++ b/src/pages/Worker/Card/WorkerMedical.vue @@ -0,0 +1,92 @@ + + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index f80df5e06..2a523e7fe 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -25,6 +25,7 @@ export default { 'WorkerLocker', 'WorkerBalance', 'WorkerFormation', + 'WorkerMedical', ], }, children: [ @@ -196,6 +197,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerFormation.vue'), }, + { + name: 'WorkerMedical', + path: 'medical', + meta: { + title: 'medical', + icon: 'medical_information', + }, + component: () => import('src/pages/Worker/Card/WorkerMedical.vue'), + }, ], }, ], From e73930a4ebc08b55cbc471cb689b4e553091e4e6 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 2 Sep 2024 15:11:04 +0200 Subject: [PATCH 2/8] refs #7407 Medical Section remove table --- src/pages/Worker/Card/WorkerMedical.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Worker/Card/WorkerMedical.vue b/src/pages/Worker/Card/WorkerMedical.vue index b6d1ad248..6bca4ae85 100644 --- a/src/pages/Worker/Card/WorkerMedical.vue +++ b/src/pages/Worker/Card/WorkerMedical.vue @@ -83,7 +83,6 @@ const columns = [ }" order="date DESC" :columns="columns" - default-mode="table" auto-load :right-search="false" :is-editable="true" From 75e18a1e2f62d84e4050ce46c9373dfcec26eb9e Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 3 Sep 2024 09:55:58 +0200 Subject: [PATCH 3/8] fix: added missing descriptors and small details --- src/pages/Order/Card/OrderCatalogFilter.vue | 15 -------- .../Order/Card/OrderCatalogItemDialog.vue | 4 --- src/pages/Order/Card/OrderLines.vue | 8 ++++- src/pages/Order/Card/OrderVolume.vue | 20 +++++++++-- src/pages/Order/OrderList.vue | 36 ++++++++++++++++++- 5 files changed, 60 insertions(+), 23 deletions(-) diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index 850abb755..938cc4fe2 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -380,21 +380,6 @@ function addOrder(value, field, params) { @click="tagValues.push({})" /> - diff --git a/src/pages/Order/Card/OrderCatalogItemDialog.vue b/src/pages/Order/Card/OrderCatalogItemDialog.vue index 3f97443ca..46a50c021 100644 --- a/src/pages/Order/Card/OrderCatalogItemDialog.vue +++ b/src/pages/Order/Card/OrderCatalogItemDialog.vue @@ -77,10 +77,6 @@ const addToOrder = async () => { en: diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue index 9870be9b3..d96a33ef5 100644 --- a/src/pages/Order/OrderList.vue +++ b/src/pages/Order/OrderList.vue @@ -11,6 +11,9 @@ import VnSelect from 'src/components/common/VnSelect.vue'; import OrderSearchbar from './Card/OrderSearchbar.vue'; import RightMenu from 'src/components/common/RightMenu.vue'; import OrderFilter from './Card/OrderFilter.vue'; +import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue'; +import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue'; +import { toDateTimeFormat } from 'src/filters/date'; const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); @@ -75,7 +78,7 @@ const columns = computed(() => [ label: t('module.created'), component: 'date', cardVisible: true, - format: (row) => toDate(row?.landed), + format: (row) => toDateTimeFormat(row?.landed), columnField: { component: null, }, @@ -115,6 +118,7 @@ const columns = computed(() => [ }, }, cardVisible: true, + columnClass: 'expand', }, { align: 'left', @@ -132,6 +136,7 @@ const columns = computed(() => [ title: t('InvoiceOutSummary'), icon: 'preview', action: (row) => viewSummary(row.id, OrderSummary), + isPrimary: true, }, ], }, @@ -154,6 +159,16 @@ async function fetchAgencies({ landed, addressId }) { }); agencyList.value = data; } + +const getDateColor = (date) => { + const today = Date.vnNew(); + today.setHours(0, 0, 0, 0); + const timeTicket = new Date(date); + timeTicket.setHours(0, 0, 0, 0); + const comparation = today - timeTicket; + if (comparation == 0) return 'bg-warning'; + if (comparation < 0) return 'bg-success'; +};