From 83fb97ad9b779e34022ffde3fff17e279bf8c260 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 20 Jan 2025 09:51:59 +0100 Subject: [PATCH 1/5] feat: refs #8197 create advancedMenu and add in VnSection --- src/components/NavBar.vue | 1 + src/components/VnTable/VnTable.vue | 6 ++- src/components/common/RightAdvancedMenu.vue | 53 +++++++++++++++++++++ src/components/common/RightMenu.vue | 2 +- src/components/common/VnSection.vue | 13 ++--- src/i18n/locale/en.yml | 3 +- src/i18n/locale/es.yml | 1 + src/stores/useStateStore.js | 7 +++ 8 files changed, 77 insertions(+), 9 deletions(-) create mode 100644 src/components/common/RightAdvancedMenu.vue diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index ef5bdc6ac..040dde628 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -61,6 +61,7 @@ onMounted(() => stateStore.setMounted()); /> +
diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 07992f616..a71498206 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -314,7 +314,11 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) { show-if-above > - + +import { useI18n } from 'vue-i18n'; +import { useStateStore } from 'stores/useStateStore'; +import { useHasContent } from 'src/composables/useHasContent'; +import { watch } from 'vue'; + +const { t } = useI18n(); +const stateStore = useStateStore(); +const hasContent = useHasContent('#advanced-menu'); + +const $props = defineProps({ + isMainSection: { + type: Boolean, + default: false, + }, +}); + +watch( + () => $props.isMainSection, + (val) => { + if (stateStore) stateStore.rightAdvancedDrawer = val; + }, + { immediate: true } +); + + diff --git a/src/components/common/RightMenu.vue b/src/components/common/RightMenu.vue index 9512d32d4..1eded089e 100644 --- a/src/components/common/RightMenu.vue +++ b/src/components/common/RightMenu.vue @@ -17,7 +17,7 @@ onMounted(() => { }); - - - - - - - - - - - - - - - - - - + + - -
- - {{ t('ticketSale.subtotal') }}: - - {{ toCurrency(store.data?.totalWithoutVat) }} - - - {{ t('ticketSale.tax') }}: - {{ - toCurrency(store.data?.totalWithVat - store.data?.totalWithoutVat) - }} - - - {{ t('basicData.total') }}: - {{ toCurrency(store.data?.totalWithVat) }} - -
-
+ + + Date: Mon, 20 Jan 2025 10:42:23 +0100 Subject: [PATCH 3/5] fix: refs #8197 use rightMenu --- src/pages/Claim/Card/ClaimAction.vue | 105 +++++----- src/pages/Claim/ClaimList.vue | 2 +- src/pages/Order/Card/OrderCatalog.vue | 2 +- src/pages/Order/Card/OrderLines.vue | 41 ++-- src/pages/Order/OrderList.vue | 2 +- src/pages/Ticket/Card/TicketBoxing.vue | 134 ++++++------- src/pages/Ticket/Card/TicketComponents.vue | 209 +++++++++++--------- src/pages/Ticket/TicketList.vue | 2 +- src/pages/Worker/Card/WorkerCalendar.vue | 28 +-- src/pages/Worker/Card/WorkerTimeControl.vue | 57 +++--- src/pages/Worker/WorkerList.vue | 2 +- src/router/modules/ticket.js | 2 +- 12 files changed, 310 insertions(+), 276 deletions(-) diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index 2e890dba8..8ac7c224f 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -4,7 +4,6 @@ import { useQuasar } from 'quasar'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import axios from 'axios'; -import { useStateStore } from 'src/stores/useStateStore'; import { toDate, toPercentage, toCurrency } from 'filters/index'; import { tMobile } from 'src/composables/tMobile'; import CrudModel from 'src/components/CrudModel.vue'; @@ -13,11 +12,11 @@ import VnSelect from 'src/components/common/VnSelect.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue'; import { useArrayData } from 'composables/useArrayData'; +import RightMenu from 'src/components/common/RightMenu.vue'; const { t } = useI18n(); const quasar = useQuasar(); const route = useRoute(); -const stateStore = computed(() => useStateStore()); const claim = ref(null); const claimRef = ref(); const claimId = route.params.id; @@ -201,58 +200,62 @@ async function post(query, params) { auto-load @on-fetch="(data) => (destinationTypes = data)" /> - - - {{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }} - - - - -

- {{ t('claim.actions') }} -

- + +
-