From 1558b600bebe044c32716cc08c72780a30660b73 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 23 May 2024 09:20:16 +0200 Subject: [PATCH 01/40] refactor: refs #5447 changed warehouse filter --- src/pages/Travel/ExtraCommunityFilter.vue | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue index 7fe628180..6123b0384 100644 --- a/src/pages/Travel/ExtraCommunityFilter.vue +++ b/src/pages/Travel/ExtraCommunityFilter.vue @@ -7,6 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; +import axios from 'axios'; const { t } = useI18n(); const props = defineProps({ @@ -34,6 +35,30 @@ const decrement = (paramsObj, key) => { paramsObj[key]--; }; + +const warehouseAm = ref([]); +const warehouses = async () => { + const warehouses = await axios.get('Warehouses'); + const countries = await axios.get('Countries'); + const continents = await axios.get('Continents'); + + const countryContinent = countries.data.reduce((acc, c) => { + acc[c.id] = c.continentFk; + return acc; + }, {}); + + const continentAMId = continents.data.find((continent) => continent.code === 'AM').id; + + const countriesInAM = Object.keys(countryContinent).filter( + (countryId) => countryContinent[countryId] === continentAMId.toString() + ); + + warehouseAm.value = warehouses.data.filter((w) => + countriesInAM.includes(w.countryFk.toString()) + ); + console.log('warehouseAm: ', warehouseAm.value); +}; +warehouses(); From 151978160b0f1cf2f02d3ca474d051817f0da14d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 25 Jun 2024 23:01:26 +0200 Subject: [PATCH 16/40] fix: ticket order --- src/router/modules/ticket.js | 61 +++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 475552585..2766d034a 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -11,7 +11,7 @@ export default { component: RouterView, redirect: { name: 'TicketMain' }, menus: { - main: ['TicketList', 'TicketAdvance', 'TicketFuture'], + main: ['TicketList', 'TicketAdvance', 'TicketWeekly', 'TicketFuture'], card: [ 'TicketBasicData', 'TicketBoxing', @@ -49,13 +49,13 @@ export default { component: () => import('src/pages/Ticket/TicketCreate.vue'), }, { - name: 'TicketAdvance', - path: 'advance', + name: 'TicketWeekly', + path: 'weekly', meta: { - title: 'ticketAdvance', - icon: 'keyboard_double_arrow_left', + title: 'weeklyTickets', + icon: 'access_time', }, - component: () => import('src/pages/Ticket/TicketAdvance.vue'), + component: () => import('src/pages/Ticket/TicketWeekly.vue'), }, { name: 'TicketFuture', @@ -66,6 +66,15 @@ export default { }, component: () => import('src/pages/Ticket/TicketFuture.vue'), }, + { + name: 'TicketAdvance', + path: 'advance', + meta: { + title: 'ticketAdvance', + icon: 'keyboard_double_arrow_left', + }, + component: () => import('src/pages/Ticket/TicketAdvance.vue'), + }, ], }, { @@ -103,22 +112,14 @@ export default { component: () => import('src/pages/Ticket/Card/TicketSale.vue'), }, { - path: 'boxing', - name: 'TicketBoxing', + path: 'request', + name: 'TicketPurchaseRequest', meta: { - title: 'boxing', - icon: 'vn:package', + title: 'purchaseRequest', + icon: 'vn:buyrequest', }, - component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'), - }, - { - path: 'sms', - name: 'TicketSms', - meta: { - title: 'sms', - icon: 'sms', - }, - component: () => import('src/pages/Ticket/Card/TicketSms.vue'), + component: () => + import('src/pages/Ticket/Card/TicketPurchaseRequest.vue'), }, { path: 'tracking', @@ -139,14 +140,22 @@ export default { component: () => import('src/pages/Ticket/Card/TicketLog.vue'), }, { - path: 'request', - name: 'TicketPurchaseRequest', + path: 'boxing', + name: 'TicketBoxing', meta: { - title: 'purchaseRequest', - icon: 'vn:buyrequest', + title: 'boxing', + icon: 'vn:package', }, - component: () => - import('src/pages/Ticket/Card/TicketPurchaseRequest.vue'), + component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'), + }, + { + path: 'sms', + name: 'TicketSms', + meta: { + title: 'sms', + icon: 'sms', + }, + component: () => import('src/pages/Ticket/Card/TicketSms.vue'), }, ], }, From de2c3cc244f5653bb8b34d61b7dcfebdf98ddb4b Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 26 Jun 2024 08:56:17 +0200 Subject: [PATCH 17/40] fix: refs #6826 fix roleDescriptor --- src/pages/Account/Role/Card/RoleDescriptor.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/Account/Role/Card/RoleDescriptor.vue b/src/pages/Account/Role/Card/RoleDescriptor.vue index 89712b0b9..91d733714 100644 --- a/src/pages/Account/Role/Card/RoleDescriptor.vue +++ b/src/pages/Account/Role/Card/RoleDescriptor.vue @@ -15,6 +15,10 @@ const $props = defineProps({ required: false, default: null, }, + summary: { + type: Object, + default: null, + }, }); const route = useRoute(); @@ -60,14 +64,14 @@ const removeRole = () => { From 6d12c0f00c8347f47e01a5c4db52dbca724c756c Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 2 Jul 2024 15:01:43 +0200 Subject: [PATCH 40/40] feat(VnTable): add selected funcitionality --- src/components/VnTable/VnTable.vue | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 9ddc858fb..56d1cbe8f 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -59,6 +59,10 @@ const $props = defineProps({ type: Boolean, default: false, }, + hasSubtoolbar: { + type: Boolean, + default: true, + }, }); const { t } = useI18n(); const stateStore = useStateStore(); @@ -177,9 +181,12 @@ function columnName(col) { function getColAlign(col) { return 'text-' + (col.align ?? 'left'); } + +const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']); defineExpose({ reload, redirect: redirectFn, + selected, });