diff --git a/quasar.config.js b/quasar.config.js index 6e8a8f21c..e9f7a1929 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -29,7 +29,7 @@ module.exports = configure(function (/* ctx */) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli/boot-files - boot: ['i18n', 'axios'], + boot: ['i18n', 'axios', 'vnDate'], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css css: ['app.scss'], diff --git a/src/App.vue b/src/App.vue index 4f1394559..650a979d8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,16 +1,10 @@ diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index dbc3aa1c1..05c074ee0 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -6,7 +6,7 @@ import { useStateStore } from 'stores/useStateStore'; import { toDate } from 'filters/index'; import Paginate from 'components/PaginateData.vue'; import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue'; -import CustomerDescriptorPopover from 'pages/Customer/Card/CustomerDescriptorPopover.vue'; +import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import ClaimFilter from './ClaimFilter.vue'; @@ -173,9 +173,8 @@ function viewSummary(id) { {{ t('components.smartCard.viewDescription') }} - - - + + diff --git a/src/pages/Claim/ClaimRmaList.vue b/src/pages/Claim/ClaimRmaList.vue index d4ef1fcf0..dcb586e73 100644 --- a/src/pages/Claim/ClaimRmaList.vue +++ b/src/pages/Claim/ClaimRmaList.vue @@ -16,7 +16,7 @@ const input = ref(); const newRma = ref({ code: '', - crated: new Date(), + crated: Date.vnNew(), }); function onInputUpdate(value) { @@ -35,7 +35,7 @@ async function submit() { newRma.value = { code: '', - created: new Date(), + created: Date.vnNew(), }; } @@ -43,23 +43,25 @@ function confirm(id) { quasar .dialog({ component: VnConfirm, + componentProps: { + data: { id }, + promise: remove, + }, }) - .onOk(() => remove(id)); + .onOk(async () => await arrayData.refresh()); } -async function remove(id) { +async function remove({ id }) { await axios.delete(`ClaimRmas/${id}`); - await arrayData.refresh(); quasar.notify({ type: 'positive', message: t('globals.rowRemoved'), - icon: 'check', }); } @@ -149,7 +159,7 @@ async function remove(id) { padding-top: 156px; } -.card { +.card-list, .card { width: 100%; max-width: 60em; } diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue index d3fb133cf..e3c349a4a 100644 --- a/src/pages/Customer/Card/CustomerCard.vue +++ b/src/pages/Customer/Card/CustomerCard.vue @@ -12,6 +12,7 @@ const { t } = useI18n(); diff --git a/src/pages/Customer/Card/CustomerDescriptorPopover.vue b/src/pages/Customer/Card/CustomerDescriptorProxy.vue similarity index 66% rename from src/pages/Customer/Card/CustomerDescriptorPopover.vue rename to src/pages/Customer/Card/CustomerDescriptorProxy.vue index 78d1c5801..6e69ca1a0 100644 --- a/src/pages/Customer/Card/CustomerDescriptorPopover.vue +++ b/src/pages/Customer/Card/CustomerDescriptorProxy.vue @@ -9,7 +9,7 @@ const $props = defineProps({ }); diff --git a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue index de3862835..031e8bbfe 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue @@ -12,6 +12,7 @@ const { t } = useI18n(); diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue index 31252f3e3..2e13b1438 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue @@ -3,8 +3,8 @@ import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { toCurrency, toDate } from 'src/filters'; -import CardDescriptor from 'src/components/ui/CardDescriptor.vue'; -import CustomerDescriptorPopover from 'src/pages/Customer/Card/CustomerDescriptorPopover.vue'; +import CardDescriptor from 'components/ui/CardDescriptor.vue'; +import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue'; const $props = defineProps({ id: { @@ -80,9 +80,7 @@ function ticketFilter(invoice) { {{ entity.client.name }} - - - + diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorPopover.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue similarity index 66% rename from src/pages/InvoiceOut/Card/InvoiceOutDescriptorPopover.vue rename to src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue index 30d27669d..a3389545b 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorPopover.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue @@ -9,7 +9,7 @@ const $props = defineProps({ }); diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue index 11193d31a..0058bf2f3 100644 --- a/src/pages/Login/LoginMain.vue +++ b/src/pages/Login/LoginMain.vue @@ -48,29 +48,25 @@ const password = ref(''); const keepLogin = ref(true); async function onSubmit() { - try { - const { data } = await axios.post('Accounts/login', { - user: username.value, - password: password.value, - }); + const { data } = await axios.post('Accounts/login', { + user: username.value, + password: password.value, + }); - if (!data) return; + if (!data) return; - await session.login(data.token, keepLogin.value); + await session.login(data.token, keepLogin.value); - quasar.notify({ - message: t('login.loginSuccess'), - type: 'positive', - }); + quasar.notify({ + message: t('login.loginSuccess'), + type: 'positive', + }); - const currentRoute = router.currentRoute.value; - if (currentRoute.query && currentRoute.query.redirect) { - router.push(currentRoute.query.redirect); - } else { - router.push({ name: 'Dashboard' }); - } - } catch (error) { - // + const currentRoute = router.currentRoute.value; + if (currentRoute.query && currentRoute.query.redirect) { + router.push(currentRoute.query.redirect); + } else { + router.push({ name: 'Dashboard' }); } } @@ -92,10 +88,20 @@ async function onSubmit() { > - + {{ t('globals.lang.en') }} - + {{ t('globals.lang.es') }} @@ -104,30 +110,48 @@ async function onSubmit() { - {{ t(`globals.darkMode`) }} + {{ + t(`globals.darkMode`) + }} - +