From 790e69f65959cb18e8c2453fdffff54c47bba82b Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 22 May 2024 08:08:43 -0300 Subject: [PATCH] WIP --- src/css/app.scss | 2 +- src/pages/Zone/Card/ZoneCalendarPanel.vue | 149 ------------- src/pages/Zone/Card/ZoneCard.vue | 2 +- .../Card/{ZoneCalendar.vue => ZoneEvents.vue} | 25 ++- src/pages/Zone/Card/ZoneEventsPanel.vue | 197 ++++++++++++++++++ src/pages/Zone/locale/en.yml | 14 ++ src/pages/Zone/locale/es.yml | 14 ++ src/router/modules/zone.js | 6 +- src/stores/useWeekdayStore.js | 17 ++ 9 files changed, 267 insertions(+), 159 deletions(-) delete mode 100644 src/pages/Zone/Card/ZoneCalendarPanel.vue rename src/pages/Zone/Card/{ZoneCalendar.vue => ZoneEvents.vue} (92%) create mode 100644 src/pages/Zone/Card/ZoneEventsPanel.vue diff --git a/src/css/app.scss b/src/css/app.scss index 2e524e693..0b66ee38d 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -76,7 +76,7 @@ select:-webkit-autofill { } .color-vn-label { - color: var(--vn-label); + color: var(--vn-label-color); } .color-vn-text { diff --git a/src/pages/Zone/Card/ZoneCalendarPanel.vue b/src/pages/Zone/Card/ZoneCalendarPanel.vue deleted file mode 100644 index c754d484f..000000000 --- a/src/pages/Zone/Card/ZoneCalendarPanel.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue index 4c0da8d87..fc427c8cd 100644 --- a/src/pages/Zone/Card/ZoneCard.vue +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -18,7 +18,7 @@ const searchBarDataKeys = { ZoneWarehouses: 'ZoneWarehouses', ZoneSummary: 'ZoneSummary', ZoneLocations: 'ZoneLocations', - ZoneCalendar: 'ZoneCalendar', + ZoneEvents: 'ZoneEvents', }; - + diff --git a/src/pages/Zone/Card/ZoneEventsPanel.vue b/src/pages/Zone/Card/ZoneEventsPanel.vue new file mode 100644 index 000000000..88bf6eaa7 --- /dev/null +++ b/src/pages/Zone/Card/ZoneEventsPanel.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml index 363393996..ed07861f8 100644 --- a/src/pages/Zone/locale/en.yml +++ b/src/pages/Zone/locale/en.yml @@ -65,3 +65,17 @@ warehouses: deleteSubtitle: Are you sure you want to continue? warehouse: Warehouse add: Add +eventsPanel: + editMode: Edit mode + include: Include + exclude: Exclude + events: Events + closing: Closing + travelingDays: Traveling days + price: Price + bonus: Bonus + m3Max: Max m³ + everyday: Everyday + delete: Delete + deleteTitle: This item will be deleted + deleteSubtitle: Are you sure you want to continue? diff --git a/src/pages/Zone/locale/es.yml b/src/pages/Zone/locale/es.yml index 4c8eb6116..5c4addaf8 100644 --- a/src/pages/Zone/locale/es.yml +++ b/src/pages/Zone/locale/es.yml @@ -67,3 +67,17 @@ warehouses: deleteSubtitle: ¿Seguro que quieres continuar? warehouse: Almacén add: Añadir +eventsPanel: + editMode: Modo edición + include: Incluir + exclude: Excluir + events: Eventos + closing: Cierre + travelingDays: Días de viaje + price: Precio + bonus: Bonificación + m3Max: Meidida máxima + everyday: Todos los días + delete: Eliminar + deleteTitle: Este elemento será eliminado + deleteSubtitle: ¿Seguro que quieres continuar? diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js index a32ba2c49..5979049a3 100644 --- a/src/router/modules/zone.js +++ b/src/router/modules/zone.js @@ -17,7 +17,7 @@ export default { 'ZoneWarehouses', 'ZoneHistory', 'ZoneLocations', - 'ZoneCalendar', + 'ZoneEvents', ], }, children: [ @@ -117,13 +117,13 @@ export default { component: () => import('src/pages/Zone/Card/ZoneLog.vue'), }, { - name: 'ZoneCalendar', + name: 'ZoneEvents', path: 'events', meta: { title: 'calendar', icon: 'vn:calendar', }, - component: () => import('src/pages/Zone/Card/ZoneCalendar.vue'), + component: () => import('src/pages/Zone/Card/ZoneEvents.vue'), }, ], }, diff --git a/src/stores/useWeekdayStore.js b/src/stores/useWeekdayStore.js index ac17356ae..33acaa09e 100644 --- a/src/stores/useWeekdayStore.js +++ b/src/stores/useWeekdayStore.js @@ -73,6 +73,22 @@ export const useWeekdayStore = defineStore('weekdayStore', () => { return locales; }); + const getLocalesMap = computed(() => { + const locales = {}; + for (let code of localeOrder.es) { + const weekDay = weekdaysMap[code]; + const locale = t(`weekdays.${weekdaysMap[code].code}`); + const obj = { + ...weekDay, + locale, + localeChar: locale.substr(0, 1), + localeAbr: locale.substr(0, 3), + }; + locales[weekDay.code] = obj; + } + return locales; + }); + const getLocaleMonths = computed(() => { const locales = []; for (let code of monthCodes) { @@ -115,5 +131,6 @@ export const useWeekdayStore = defineStore('weekdayStore', () => { monthCodes, getLocaleMonths, fromSet, + getLocalesMap, }; });