From dd0917a57daa6404570965dfb61ae3b06dd57cbd Mon Sep 17 00:00:00 2001 From: provira Date: Fri, 3 Jan 2025 07:37:47 +0100 Subject: [PATCH 001/282] refactor: refs #8322 changed Wagon component to use VnSection/VnCardBeta --- src/pages/Wagon/Card/WagonCard.vue | 4 +- src/pages/Wagon/WagonList.vue | 161 ++++++++++++++++------------- src/router/modules/wagon.js | 47 ++++++--- 3 files changed, 123 insertions(+), 89 deletions(-) diff --git a/src/pages/Wagon/Card/WagonCard.vue b/src/pages/Wagon/Card/WagonCard.vue index ed6c83778..8dadca85c 100644 --- a/src/pages/Wagon/Card/WagonCard.vue +++ b/src/pages/Wagon/Card/WagonCard.vue @@ -1,6 +1,6 @@ diff --git a/src/pages/Wagon/WagonList.vue b/src/pages/Wagon/WagonList.vue index f306c4c8d..9ee68bcf0 100644 --- a/src/pages/Wagon/WagonList.vue +++ b/src/pages/Wagon/WagonList.vue @@ -8,6 +8,7 @@ import VnTable from 'src/components/VnTable/VnTable.vue'; import { computed, ref } from 'vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import VnInput from 'src/components/common/VnInput.vue'; +import VnSection from 'src/components/common/VnSection.vue'; const quasar = useQuasar(); const arrayData = useArrayData('WagonList'); @@ -15,6 +16,7 @@ const store = arrayData.store; const router = useRouter(); const { t } = useI18n(); const tableRef = ref(); +const dataKey = 'WagonList'; const filter = { include: { relation: 'type', @@ -92,79 +94,90 @@ async function remove(row) { diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js index 4a322d305..d0f4b2281 100644 --- a/src/router/modules/wagon.js +++ b/src/router/modules/wagon.js @@ -1,34 +1,55 @@ import { RouterView } from 'vue-router'; +const wagonCard = { + + name: 'WagonCard', + path: ':id', + component: () => import('src/pages/Ticket/Card/WagonCard.vue'), + redirect: { name: 'WagonSummary' }, + meta: { + //main: ['WagonList', 'WagonTypeList', 'WagonCounter', 'WagonTray'], + menu: [], + }, + children: [ + {}, + ], +}; + export default { - path: '/wagon', name: 'Wagon', + path: '/wagon', meta: { title: 'wagons', icon: 'vn:trolley', moduleName: 'Wagon', + keyBinding: 'w', + menu: ['WagonList', 'WagonTypeList', 'WagonCounter', 'WagonTray'], }, component: RouterView, redirect: { name: 'WagonMain' }, - menus: { - main: ['WagonList', 'WagonTypeList', 'WagonCounter', 'WagonTray'], - card: [], - }, children: [ { - path: '/wagon', + path: '', name: 'WagonMain', component: () => import('src/components/common/VnModule.vue'), - redirect: { name: 'WagonList' }, + redirect: { name: 'WagonIndexMain' }, children: [ { - path: 'list', - name: 'WagonList', - meta: { - title: 'list', - icon: 'vn:trolley', - }, + path: '', + name: 'WagonIndexMain', + redirect: { name: 'WagonList' }, component: () => import('src/pages/Wagon/WagonList.vue'), + children: [ + { + name: 'WagonList', + path: 'list', + meta: { + title: 'list', + icon: 'view_list', + }, + }, + + ] }, { path: 'create', From ac8e9cbfd25e2391627943e0ab50990438886b87 Mon Sep 17 00:00:00 2001 From: jtubau Date: Wed, 29 Jan 2025 12:43:02 +0100 Subject: [PATCH 002/282] refactor: refs #7414 update VnLog component to change display order value changes on update action --- src/components/common/VnLog.vue | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index fdf2e52ee..d1d8d8360 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -641,16 +641,7 @@ watch( > {{ prop.nameI18n }}: - - - #{{ prop.val.id }} - - - ← - #{{ prop.old.id }} + + → + + + #{{ prop.val.id }} + From ce5c21f4fa893e834f08a20b481a81fa7bb8fa3d Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 3 Feb 2025 16:20:16 +0100 Subject: [PATCH 003/282] fix: refs #8370 change param rely on month --- src/pages/Worker/Card/WorkerTimeControl.vue | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index c580e5202..d181c70af 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -345,17 +345,35 @@ const getMailStates = async (date) => { const url = `WorkerTimeControls/${route.params.id}/getMailStates`; const month = date.getMonth() + 1; const prevMonth = month == 1 ? 12 : month - 1; + const postMonth = month == 12 ? 1 : month + 1; const params = { month, year: date.getFullYear(), }; const curMonthStates = (await axios.get(url, { params })).data; + + if (prevMonth == 12) { + params.year = params.year - 1; + } const prevMonthStates = ( await axios.get(url, { params: { ...params, month: prevMonth } }) ).data; - workerTimeControlMails.value = curMonthStates.concat(prevMonthStates); + if (postMonth == 1) { + params.year = date.getFullYear() + 1; + } + + const postMonthStates = ( + await axios.get(url, { + params: { ...params, month: postMonth }, + }) + ).data; + + workerTimeControlMails.value = curMonthStates.concat( + prevMonthStates, + postMonthStates + ); }; const showWorkerTimeForm = (propValue, formType) => { From 812d68e29505499a6d3c7b3e063bf3771c9385da Mon Sep 17 00:00:00 2001 From: jtubau Date: Thu, 6 Feb 2025 12:51:45 +0100 Subject: [PATCH 004/282] 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" >