From 67c6f84de37f2440d81f148ba57ea01fa1d15d4d Mon Sep 17 00:00:00 2001 From: wbuezas Date: Fri, 2 Aug 2024 21:56:20 -0300 Subject: [PATCH] Several changes --- src/App.vue | 10 +- src/boot/app.js | 16 +- src/components/common/VnInput.vue | 10 +- src/components/ui/CardList.vue | 4 +- src/components/ui/TicketDetails.vue | 154 +++++++++++++++ src/components/ui/VnImg.vue | 16 +- src/filters/index.js | 3 - src/filters/toCurrency.js | 18 -- src/i18n/ca-ES/index.js | 5 +- src/i18n/en-US/index.js | 3 + src/i18n/es-ES/index.js | 3 + src/i18n/fr-FR/index.js | 5 +- src/i18n/pt-PT/index.js | 5 +- src/lib/filters.js | 90 +++++---- src/pages/Ecomerce/BasketView.vue | 1 + src/pages/Ecomerce/Catalog.vue | 7 +- src/pages/Ecomerce/CheckoutView.vue | 1 + src/pages/Ecomerce/Invoices.vue | 183 ------------------ src/pages/Ecomerce/InvoicesView.vue | 170 ++++++++++++++++ .../Ecomerce/{Orders.vue => OrdersView.vue} | 155 +++++++-------- src/pages/Ecomerce/PendingOrders.vue | 56 +++--- src/pages/Ecomerce/Ticket.vue | 145 -------------- src/pages/Ecomerce/TicketView.vue | 74 +++++++ src/router/index.js | 4 +- src/router/routes.js | 16 +- src/stores/app.js | 48 ++++- src/stores/index.js | 10 +- 27 files changed, 671 insertions(+), 541 deletions(-) create mode 100644 src/components/ui/TicketDetails.vue delete mode 100644 src/filters/index.js delete mode 100644 src/filters/toCurrency.js create mode 100644 src/pages/Ecomerce/BasketView.vue create mode 100644 src/pages/Ecomerce/CheckoutView.vue delete mode 100644 src/pages/Ecomerce/Invoices.vue create mode 100644 src/pages/Ecomerce/InvoicesView.vue rename src/pages/Ecomerce/{Orders.vue => OrdersView.vue} (63%) delete mode 100644 src/pages/Ecomerce/Ticket.vue create mode 100644 src/pages/Ecomerce/TicketView.vue diff --git a/src/App.vue b/src/App.vue index 69fb8958..54b715a2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,10 +2,10 @@ - diff --git a/src/boot/app.js b/src/boot/app.js index 824a26a1..0f2f46e0 100644 --- a/src/boot/app.js +++ b/src/boot/app.js @@ -1,10 +1,10 @@ -import { boot } from 'quasar/wrappers' -import { appStore } from 'stores/app' -import { userStore } from 'stores/user' +import { boot } from 'quasar/wrappers'; +import { useAppStore } from 'stores/app'; +import { userStore } from 'stores/user'; export default boot(({ app }) => { - const props = app.config.globalProperties - props.$app = appStore() - props.$user = userStore() - props.$actions = document.createElement('div') -}) + const props = app.config.globalProperties; + props.$app = useAppStore(); + props.$user = userStore(); + props.$actions = document.createElement('div'); +}); diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 62984159..f8af8001 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -9,7 +9,7 @@ const emit = defineEmits([ 'remove' ]); -const $props = defineProps({ +const props = defineProps({ modelValue: { type: [String, Number], default: null @@ -33,7 +33,7 @@ const requiredFieldRule = val => !!val || t('globals.fieldRequired'); const vnInputRef = ref(null); const value = computed({ get() { - return $props.modelValue; + return props.modelValue; }, set(value) { emit('update:modelValue', value); @@ -41,7 +41,7 @@ const value = computed({ }); const hover = ref(false); const styleAttrs = computed(() => { - return $props.isOutlined + return props.isOutlined ? { dense: true, outlined: true, rounded: true } : {}; }); @@ -88,9 +88,7 @@ const inputRules = [