From 812d68e29505499a6d3c7b3e063bf3771c9385da Mon Sep 17 00:00:00 2001 From: jtubau Date: Thu, 6 Feb 2025 12:51:45 +0100 Subject: [PATCH 01/88] refactor: refs #8472 unified styling for the more-create-dialog slot to ensure consistency across all scenarios --- src/components/VnTable/VnTable.vue | 6 +++++- src/pages/Account/AccountList.vue | 2 -- src/pages/InvoiceOut/InvoiceOutList.vue | 3 ++- src/pages/Supplier/SupplierList.vue | 6 ++++-- src/pages/Wagon/WagonList.vue | 4 ---- src/pages/Worker/WorkerList.vue | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 04b7c0a46..3202b18b3 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -721,12 +721,16 @@ es: .grid-create { display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); + grid-template-columns: 1fr 1fr; max-width: 100%; grid-gap: 20px; margin: 0 auto; } +.q-span-2 { + grid-column: span 2; +} + .flex-one { display: flex; flex-flow: row wrap; diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue index ea8daba0d..e1b55f150 100644 --- a/src/pages/Account/AccountList.vue +++ b/src/pages/Account/AccountList.vue @@ -167,14 +167,12 @@ function exprBuilder(param, value) { :right-search="false" > diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 9398ded64..3473574f3 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -232,7 +232,7 @@ watchEffect(selectedRows); diff --git a/src/pages/Wagon/WagonList.vue b/src/pages/Wagon/WagonList.vue index e716686d1..7a84ae6cd 100644 --- a/src/pages/Wagon/WagonList.vue +++ b/src/pages/Wagon/WagonList.vue @@ -111,7 +111,6 @@ async function remove(row) { > diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 75700ef16..363c87cfb 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -223,7 +223,7 @@ async function autofillBic(worker) { :right-search="false" > - - -en: - params: - warehouseFk: Warehouse - description: Description - m3: m³ - scopeDays: Days Onward - vehicleFk: Vehicle - agencyModeFk: Agency - workerFk: Worker - from: From - to: To - Served: Served -es: - params: - warehouseFk: Almacén - description: Descripción - m3: m³ - scopeDays: Días en adelante - vehicleFk: Vehículo - agencyModeFk: Agencia - workerFk: Trabajador - from: Desde - to: Hasta - Warehouse: Almacén - Description: Descripción - Vehicle: Vehículo - Agency: Agencia - Worker: Trabajador - From: Desde - To: Hasta - Served: Servida - Days Onward: Días en adelante - diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue index 46bc1a690..bae8d25c2 100644 --- a/src/pages/Route/RouteExtendedList.vue +++ b/src/pages/Route/RouteExtendedList.vue @@ -38,7 +38,7 @@ const routeFilter = { }; const columns = computed(() => [ { - align: 'center', + align: 'right', name: 'id', label: 'Id', chip: { @@ -46,11 +46,11 @@ const columns = computed(() => [ }, isId: true, columnFilter: false, + width: '25px', }, { - align: 'center', name: 'workerFk', - label: t('route.Worker'), + label: t('globals.worker'), create: true, component: 'select', attrs: { @@ -71,9 +71,8 @@ const columns = computed(() => [ format: (row, dashIfEmpty) => dashIfEmpty(row.workerUserName), }, { - align: 'center', name: 'agencyModeFk', - label: t('route.Agency'), + label: t('globals.agency'), isTitle: true, cardVisible: true, create: true, @@ -90,9 +89,8 @@ const columns = computed(() => [ format: (row, dashIfEmpty) => dashIfEmpty(row.agencyName), }, { - align: 'center', name: 'vehicleFk', - label: t('route.Vehicle'), + label: t('globals.vehicle'), cardVisible: true, create: true, component: 'select', @@ -111,9 +109,8 @@ const columns = computed(() => [ format: (row, dashIfEmpty) => dashIfEmpty(row.vehiclePlateNumber), }, { - align: 'center', name: 'dated', - label: t('route.Date'), + label: t('globals.date'), columnFilter: false, cardVisible: true, create: true, @@ -122,9 +119,8 @@ const columns = computed(() => [ dated === '0000-00-00' ? dashIfEmpty(null) : toDate(dated), }, { - align: 'center', name: 'from', - label: t('route.From'), + label: t('globals.from'), visible: false, cardVisible: true, create: true, @@ -132,9 +128,8 @@ const columns = computed(() => [ format: ({ from }) => toDate(from), }, { - align: 'center', name: 'to', - label: t('route.To'), + label: t('globals.to'), visible: false, cardVisible: true, create: true, @@ -142,30 +137,31 @@ const columns = computed(() => [ format: ({ date }) => toDate(date), }, { - align: 'center', + align: 'right', name: 'm3', label: 'm3', cardVisible: true, columnClass: 'shrink', + width: '50px', }, { - align: 'center', name: 'started', label: t('route.hourStarted'), component: 'time', columnFilter: false, format: ({ started }) => toHour(started), + width: '50px', }, { - align: 'center', name: 'finished', label: t('route.hourFinished'), component: 'time', columnFilter: false, format: ({ finished }) => toHour(finished), + width: '50px', }, { - align: 'center', + align: 'right', name: 'kmStart', label: t('route.KmStart'), columnClass: 'shrink', @@ -173,7 +169,7 @@ const columns = computed(() => [ visible: false, }, { - align: 'center', + align: 'right', name: 'kmEnd', label: t('route.KmEnd'), columnClass: 'shrink', @@ -181,16 +177,15 @@ const columns = computed(() => [ visible: false, }, { - align: 'center', + align: 'left', name: 'description', - label: t('route.Description'), + label: t('globals.description'), isTitle: true, create: true, component: 'input', field: 'description', }, { - align: 'center', name: 'isOk', label: t('route.Served'), component: 'checkbox', @@ -202,7 +197,7 @@ const columns = computed(() => [ name: 'tableActions', actions: [ { - title: t('route.Add tickets'), + title: t('route.addTicket'), icon: 'vn:ticketAdd', action: (row) => openTicketsDialog(row?.id), isPrimary: true, @@ -214,7 +209,7 @@ const columns = computed(() => [ isPrimary: true, }, { - title: t('route.Route summary'), + title: t('route.routeSummary'), icon: 'arrow_forward', action: (row) => navigate(row?.id), isPrimary: true, @@ -276,11 +271,13 @@ const openTicketsDialog = (id) => { -

{{ t('route.Select the starting date') }}

+

+ {{ t('route.extendedList.selectStartingDate') }} +

@@ -288,7 +285,7 @@ const openTicketsDialog = (id) => { @@ -339,7 +336,7 @@ const openTicketsDialog = (id) => { :disable="!selectedRows?.length" @click="confirmationDialog = true" > - {{ t('route.Clone Selected Routes') }} + {{ t('route.extendedList.cloneSelectedRoutes') }} { :disable="!selectedRows?.length" @click="showRouteReport" > - {{ t('route.Download selected routes as PDF') }} + {{ + t('route.extendedList.downloadSelectedRoutes') + }} { :disable="!selectedRows?.length" @click="markAsServed()" > - {{ t('route.Mark as served') }} + {{ t('route.extendedList.markServed') }} diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 9dad8ba22..afad2235c 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -33,11 +33,11 @@ const columns = computed(() => [ condition: () => true, }, columnFilter: false, + width: '25px', }, { - align: 'left', name: 'workerFk', - label: t('route.Worker'), + label: t('gloabls.worker'), component: 'select', attrs: { url: 'Workers/activeWithInheritedRole', @@ -50,15 +50,19 @@ const columns = computed(() => [ }, }, create: true, - cardVisible: true, format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef), columnFilter: false, + width: '100px', }, { - align: 'left', - name: 'agencyName', - label: t('route.Agency'), + name: 'workerFk', + label: t('globals.worker'), + visible: false, cardVisible: true, + }, + { + name: 'agencyName', + label: t('globals.agency'), component: 'select', attrs: { url: 'agencyModes', @@ -71,12 +75,17 @@ const columns = computed(() => [ create: true, columnClass: 'expand', columnFilter: false, + width: '150px', }, { - align: 'left', - name: 'vehiclePlateNumber', - label: t('route.Vehicle'), + name: 'agencyName', + label: t('globals.agency'), + visible: false, cardVisible: true, + }, + { + name: 'vehiclePlateNumber', + label: t('globals.vehicle'), component: 'select', attrs: { url: 'vehicles', @@ -90,27 +99,36 @@ const columns = computed(() => [ }, create: true, columnFilter: false, + width: '75px', }, { - align: 'left', + name: 'vehiclePlateNumber', + label: t('globals.vehicle'), + visible: false, + cardVisible: true, + }, + { + align: 'center', name: 'started', label: t('route.hourStarted'), cardVisible: true, columnFilter: false, format: (row) => toHour(row.started), + width: '50px', }, { - align: 'left', + align: 'center', name: 'finished', label: t('route.hourFinished'), cardVisible: true, columnFilter: false, format: (row) => toHour(row.started), + width: '50px', }, { align: 'left', name: 'description', - label: t('route.Description'), + label: t('globals.description'), cardVisible: true, isTitle: true, create: true, @@ -118,7 +136,6 @@ const columns = computed(() => [ columnFilter: false, }, { - align: 'left', name: 'isOk', label: t('route.Served'), component: 'checkbox', @@ -154,6 +171,7 @@ const columns = computed(() => [