From 28b2dd386fdb6caaa89d74b4df630c70718589e3 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Fri, 19 Jul 2024 09:19:26 -0300 Subject: [PATCH] Address List view --- package-lock.json | 368 ++++++++++++++------------- package.json | 4 +- quasar.config.js | 58 ++--- src/boot/axios.js | 35 +-- src/boot/i18n.js | 30 ++- src/components/ui/VnConfirm.vue | 127 +++++++++ src/composables/useNotify.js | 22 ++ src/composables/useVnConfirm.js | 23 ++ src/i18n/en-US/index.js | 5 +- src/i18n/es-ES/index.js | 5 +- src/pages/Account/AccountConf.vue | 9 + src/pages/Account/AddressDetails.vue | 33 +++ src/pages/Account/AddressList.vue | 185 ++++++++++++++ src/router/routes.js | 19 +- 14 files changed, 669 insertions(+), 254 deletions(-) create mode 100644 src/components/ui/VnConfirm.vue create mode 100644 src/composables/useNotify.js create mode 100644 src/composables/useVnConfirm.js create mode 100644 src/pages/Account/AccountConf.vue create mode 100644 src/pages/Account/AddressDetails.vue create mode 100644 src/pages/Account/AddressList.vue diff --git a/package-lock.json b/package-lock.json index 7b48acc5..4e867e0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,8 @@ "quasar": "^2.6.0", "require-yaml": "0.0.1", "tinymce": "^6.3.0", - "vue": "^3.0.0", - "vue-i18n": "^9.0.0", + "vue": "^3.3.4", + "vue-i18n": "^9.2.2", "vue-router": "^4.0.0" }, "devDependencies": { @@ -654,9 +654,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", - "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", + "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", "bin": { "parser": "bin/babel-parser.js" }, @@ -2227,9 +2227,9 @@ } }, "node_modules/@intlify/vue-i18n-loader/node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -3474,49 +3474,60 @@ "dev": true }, "node_modules/@vue/compiler-core": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.45.tgz", - "integrity": "sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.32.tgz", + "integrity": "sha512-8tCVWkkLe/QCWIsrIvExUGnhYCAOroUs5dzhSoKL5w4MJS8uIYiou+pOPSVIOALOQ80B0jBs+Ri+kd5+MBnCDw==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.45", + "@babel/parser": "^7.24.7", + "@vue/shared": "3.4.32", + "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-core/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.45.tgz", - "integrity": "sha512-tyYeUEuKqqZO137WrZkpwfPCdiiIeXYCcJ8L4gWz9vqaxzIQRccTSwSWZ/Axx5YR2z+LvpUbmPNXxuBU45lyRw==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.32.tgz", + "integrity": "sha512-PbSgt9KuYo4fyb90dynuPc0XFTfFPs3sCTbPLOLlo+PrUESW1gn/NjSsUvhR+mI2AmmEzexwYMxbHDldxSOr2A==", "dependencies": { - "@vue/compiler-core": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-core": "3.4.32", + "@vue/shared": "3.4.32" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.45.tgz", - "integrity": "sha512-1jXDuWah1ggsnSAOGsec8cFjT/K6TMZ0sPL3o3d84Ft2AYZi2jWJgRMjw4iaK0rBfA89L5gw427H4n1RZQBu6Q==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.32.tgz", + "integrity": "sha512-STy9im/WHfaguJnfKjjVpMHukxHUrOKjm2vVCxiojQJyo3Sb6Os8SMXBr/MI+ekpstEGkDONfqAQoSbZhspLYw==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.45", - "@vue/compiler-dom": "3.2.45", - "@vue/compiler-ssr": "3.2.45", - "@vue/reactivity-transform": "3.2.45", - "@vue/shared": "3.2.45", + "@babel/parser": "^7.24.7", + "@vue/compiler-core": "3.4.32", + "@vue/compiler-dom": "3.4.32", + "@vue/compiler-ssr": "3.4.32", + "@vue/shared": "3.4.32", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" + "magic-string": "^0.30.10", + "postcss": "^8.4.39", + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.45.tgz", - "integrity": "sha512-6BRaggEGqhWht3lt24CrIbQSRD5O07MTmd+LjAn5fJj568+R9eUD2F7wMQJjX859seSlrYog7sUtrZSd7feqrQ==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.32.tgz", + "integrity": "sha512-nyu/txTecF6DrxLrpLcI34xutrvZPtHPBj9yRoPxstIquxeeyywXpYZrQMsIeDfBhlw1abJb9CbbyZvDw2kjdg==", "dependencies": { - "@vue/compiler-dom": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-dom": "3.4.32", + "@vue/shared": "3.4.32" } }, "node_modules/@vue/devtools-api": { @@ -3525,60 +3536,49 @@ "integrity": "sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==" }, "node_modules/@vue/reactivity": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.45.tgz", - "integrity": "sha512-PRvhCcQcyEVohW0P8iQ7HDcIOXRjZfAsOds3N99X/Dzewy8TVhTCT4uXpAHfoKjVTJRA0O0K+6QNkDIZAxNi3A==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.32.tgz", + "integrity": "sha512-1P7QvghAzhSIWmiNmh4MNkLVjr2QTNDcFv2sKmytEWhR6t7BZzNicgm5ENER4uU++wbWxgRh/pSEYgdI3MDcvg==", "dependencies": { - "@vue/shared": "3.2.45" - } - }, - "node_modules/@vue/reactivity-transform": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.45.tgz", - "integrity": "sha512-BHVmzYAvM7vcU5WmuYqXpwaBHjsS8T63jlKGWVtHxAHIoMIlmaMyurUSEs1Zcg46M4AYT5MtB1U274/2aNzjJQ==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.45", - "@vue/shared": "3.2.45", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" + "@vue/shared": "3.4.32" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.45.tgz", - "integrity": "sha512-gzJiTA3f74cgARptqzYswmoQx0fIA+gGYBfokYVhF8YSXjWTUA2SngRzZRku2HbGbjzB6LBYSbKGIaK8IW+s0A==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.32.tgz", + "integrity": "sha512-FxT2dTHUs1Hki8Ui/B1Hu339mx4H5kRJooqrNM32tGUHBPStJxwMzLIRbeGO/B1NMplU4Pg9fwOqrJtrOzkdfA==", "dependencies": { - "@vue/reactivity": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/reactivity": "3.4.32", + "@vue/shared": "3.4.32" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.45.tgz", - "integrity": "sha512-cy88YpfP5Ue2bDBbj75Cb4bIEZUMM/mAkDMfqDTpUYVgTf/kuQ2VQ8LebuZ8k6EudgH8pYhsGWHlY0lcxlvTwA==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.32.tgz", + "integrity": "sha512-Xz9G+ZViRyPFQtRBCPFkhMzKn454ihCPMKUiacNaUhuTIXvyfkAq8l89IZ/kegFVyw/7KkJGRGqYdEZrf27Xsg==", "dependencies": { - "@vue/runtime-core": "3.2.45", - "@vue/shared": "3.2.45", - "csstype": "^2.6.8" + "@vue/reactivity": "3.4.32", + "@vue/runtime-core": "3.4.32", + "@vue/shared": "3.4.32", + "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.45.tgz", - "integrity": "sha512-ebiMq7q24WBU1D6uhPK//2OTR1iRIyxjF5iVq/1a5I1SDMDyDu4Ts6fJaMnjrvD3MqnaiFkKQj+LKAgz5WIK3g==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.32.tgz", + "integrity": "sha512-3c4rd0522Ao8hKjzgmUAbcjv2mBnvnw0Ld2f8HOMCuWJZjYie/p8cpIoYJbeP0VV2JYmrJJMwGQDO5RH4iQ30A==", "dependencies": { - "@vue/compiler-ssr": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-ssr": "3.4.32", + "@vue/shared": "3.4.32" }, "peerDependencies": { - "vue": "3.2.45" + "vue": "3.4.32" } }, "node_modules/@vue/shared": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.45.tgz", - "integrity": "sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg==" + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.32.tgz", + "integrity": "sha512-ep4mF1IVnX/pYaNwxwOpJHyBtOMKWoKZMbnUyd+z0udqIxLUh7YCCd/JfDna8aUrmnG9SFORyIq2HzEATRrQsg==" }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", @@ -5878,9 +5878,9 @@ } }, "node_modules/csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cuint": { "version": "0.2.2", @@ -9606,13 +9606,18 @@ } }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.15" } }, + "node_modules/magic-string/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -13204,11 +13209,6 @@ "source-map": "^0.6.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" - }, "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -14202,15 +14202,23 @@ } }, "node_modules/vue": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.45.tgz", - "integrity": "sha512-9Nx/Mg2b2xWlXykmCwiTUCWHbWIj53bnkizBxKai1g61f2Xit700A1ljowpTIM11e3uipOeiPcSqnmBg6gyiaA==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.32.tgz", + "integrity": "sha512-9mCGIAi/CAq7GtaLLLp2J92pEic+HArstG+pq6F+H7+/jB9a0Z7576n4Bh4k79/50L1cKMIhZC3MC0iGpl+1IA==", "dependencies": { - "@vue/compiler-dom": "3.2.45", - "@vue/compiler-sfc": "3.2.45", - "@vue/runtime-dom": "3.2.45", - "@vue/server-renderer": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-dom": "3.4.32", + "@vue/compiler-sfc": "3.4.32", + "@vue/runtime-dom": "3.4.32", + "@vue/server-renderer": "3.4.32", + "@vue/shared": "3.4.32" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/vue-eslint-parser": { @@ -15480,9 +15488,9 @@ } }, "@babel/parser": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", - "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==" + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", + "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -16547,9 +16555,9 @@ } }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "loader-utils": { @@ -17501,49 +17509,56 @@ "dev": true }, "@vue/compiler-core": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.45.tgz", - "integrity": "sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.32.tgz", + "integrity": "sha512-8tCVWkkLe/QCWIsrIvExUGnhYCAOroUs5dzhSoKL5w4MJS8uIYiou+pOPSVIOALOQ80B0jBs+Ri+kd5+MBnCDw==", "requires": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.45", + "@babel/parser": "^7.24.7", + "@vue/shared": "3.4.32", + "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" + "source-map-js": "^1.2.0" + }, + "dependencies": { + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" + } } }, "@vue/compiler-dom": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.45.tgz", - "integrity": "sha512-tyYeUEuKqqZO137WrZkpwfPCdiiIeXYCcJ8L4gWz9vqaxzIQRccTSwSWZ/Axx5YR2z+LvpUbmPNXxuBU45lyRw==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.32.tgz", + "integrity": "sha512-PbSgt9KuYo4fyb90dynuPc0XFTfFPs3sCTbPLOLlo+PrUESW1gn/NjSsUvhR+mI2AmmEzexwYMxbHDldxSOr2A==", "requires": { - "@vue/compiler-core": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-core": "3.4.32", + "@vue/shared": "3.4.32" } }, "@vue/compiler-sfc": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.45.tgz", - "integrity": "sha512-1jXDuWah1ggsnSAOGsec8cFjT/K6TMZ0sPL3o3d84Ft2AYZi2jWJgRMjw4iaK0rBfA89L5gw427H4n1RZQBu6Q==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.32.tgz", + "integrity": "sha512-STy9im/WHfaguJnfKjjVpMHukxHUrOKjm2vVCxiojQJyo3Sb6Os8SMXBr/MI+ekpstEGkDONfqAQoSbZhspLYw==", "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.45", - "@vue/compiler-dom": "3.2.45", - "@vue/compiler-ssr": "3.2.45", - "@vue/reactivity-transform": "3.2.45", - "@vue/shared": "3.2.45", + "@babel/parser": "^7.24.7", + "@vue/compiler-core": "3.4.32", + "@vue/compiler-dom": "3.4.32", + "@vue/compiler-ssr": "3.4.32", + "@vue/shared": "3.4.32", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" + "magic-string": "^0.30.10", + "postcss": "^8.4.39", + "source-map-js": "^1.2.0" } }, "@vue/compiler-ssr": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.45.tgz", - "integrity": "sha512-6BRaggEGqhWht3lt24CrIbQSRD5O07MTmd+LjAn5fJj568+R9eUD2F7wMQJjX859seSlrYog7sUtrZSd7feqrQ==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.32.tgz", + "integrity": "sha512-nyu/txTecF6DrxLrpLcI34xutrvZPtHPBj9yRoPxstIquxeeyywXpYZrQMsIeDfBhlw1abJb9CbbyZvDw2kjdg==", "requires": { - "@vue/compiler-dom": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-dom": "3.4.32", + "@vue/shared": "3.4.32" } }, "@vue/devtools-api": { @@ -17552,57 +17567,46 @@ "integrity": "sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==" }, "@vue/reactivity": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.45.tgz", - "integrity": "sha512-PRvhCcQcyEVohW0P8iQ7HDcIOXRjZfAsOds3N99X/Dzewy8TVhTCT4uXpAHfoKjVTJRA0O0K+6QNkDIZAxNi3A==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.32.tgz", + "integrity": "sha512-1P7QvghAzhSIWmiNmh4MNkLVjr2QTNDcFv2sKmytEWhR6t7BZzNicgm5ENER4uU++wbWxgRh/pSEYgdI3MDcvg==", "requires": { - "@vue/shared": "3.2.45" - } - }, - "@vue/reactivity-transform": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.45.tgz", - "integrity": "sha512-BHVmzYAvM7vcU5WmuYqXpwaBHjsS8T63jlKGWVtHxAHIoMIlmaMyurUSEs1Zcg46M4AYT5MtB1U274/2aNzjJQ==", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.45", - "@vue/shared": "3.2.45", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" + "@vue/shared": "3.4.32" } }, "@vue/runtime-core": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.45.tgz", - "integrity": "sha512-gzJiTA3f74cgARptqzYswmoQx0fIA+gGYBfokYVhF8YSXjWTUA2SngRzZRku2HbGbjzB6LBYSbKGIaK8IW+s0A==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.32.tgz", + "integrity": "sha512-FxT2dTHUs1Hki8Ui/B1Hu339mx4H5kRJooqrNM32tGUHBPStJxwMzLIRbeGO/B1NMplU4Pg9fwOqrJtrOzkdfA==", "requires": { - "@vue/reactivity": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/reactivity": "3.4.32", + "@vue/shared": "3.4.32" } }, "@vue/runtime-dom": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.45.tgz", - "integrity": "sha512-cy88YpfP5Ue2bDBbj75Cb4bIEZUMM/mAkDMfqDTpUYVgTf/kuQ2VQ8LebuZ8k6EudgH8pYhsGWHlY0lcxlvTwA==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.32.tgz", + "integrity": "sha512-Xz9G+ZViRyPFQtRBCPFkhMzKn454ihCPMKUiacNaUhuTIXvyfkAq8l89IZ/kegFVyw/7KkJGRGqYdEZrf27Xsg==", "requires": { - "@vue/runtime-core": "3.2.45", - "@vue/shared": "3.2.45", - "csstype": "^2.6.8" + "@vue/reactivity": "3.4.32", + "@vue/runtime-core": "3.4.32", + "@vue/shared": "3.4.32", + "csstype": "^3.1.3" } }, "@vue/server-renderer": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.45.tgz", - "integrity": "sha512-ebiMq7q24WBU1D6uhPK//2OTR1iRIyxjF5iVq/1a5I1SDMDyDu4Ts6fJaMnjrvD3MqnaiFkKQj+LKAgz5WIK3g==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.32.tgz", + "integrity": "sha512-3c4rd0522Ao8hKjzgmUAbcjv2mBnvnw0Ld2f8HOMCuWJZjYie/p8cpIoYJbeP0VV2JYmrJJMwGQDO5RH4iQ30A==", "requires": { - "@vue/compiler-ssr": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-ssr": "3.4.32", + "@vue/shared": "3.4.32" } }, "@vue/shared": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.45.tgz", - "integrity": "sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg==" + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.32.tgz", + "integrity": "sha512-ep4mF1IVnX/pYaNwxwOpJHyBtOMKWoKZMbnUyd+z0udqIxLUh7YCCd/JfDna8aUrmnG9SFORyIq2HzEATRrQsg==" }, "@webassemblyjs/ast": { "version": "1.11.1", @@ -19333,9 +19337,9 @@ } }, "csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "cuint": { "version": "0.2.2", @@ -22100,11 +22104,18 @@ } }, "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "requires": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + } } }, "make-dir": { @@ -24688,11 +24699,6 @@ "source-map": "^0.6.0" } }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -25431,15 +25437,15 @@ } }, "vue": { - "version": "3.2.45", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.45.tgz", - "integrity": "sha512-9Nx/Mg2b2xWlXykmCwiTUCWHbWIj53bnkizBxKai1g61f2Xit700A1ljowpTIM11e3uipOeiPcSqnmBg6gyiaA==", + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.32.tgz", + "integrity": "sha512-9mCGIAi/CAq7GtaLLLp2J92pEic+HArstG+pq6F+H7+/jB9a0Z7576n4Bh4k79/50L1cKMIhZC3MC0iGpl+1IA==", "requires": { - "@vue/compiler-dom": "3.2.45", - "@vue/compiler-sfc": "3.2.45", - "@vue/runtime-dom": "3.2.45", - "@vue/server-renderer": "3.2.45", - "@vue/shared": "3.2.45" + "@vue/compiler-dom": "3.4.32", + "@vue/compiler-sfc": "3.4.32", + "@vue/runtime-dom": "3.4.32", + "@vue/server-renderer": "3.4.32", + "@vue/shared": "3.4.32" } }, "vue-eslint-parser": { diff --git a/package.json b/package.json index 66d12b44..c84d82d6 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,8 @@ "quasar": "^2.6.0", "require-yaml": "0.0.1", "tinymce": "^6.3.0", - "vue": "^3.0.0", - "vue-i18n": "^9.0.0", + "vue": "^3.3.4", + "vue-i18n": "^9.2.2", "vue-router": "^4.0.0" }, "scripts": { diff --git a/quasar.config.js b/quasar.config.js index 1fb70d5e..b5b6d16b 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -24,19 +24,10 @@ module.exports = configure(function (ctx) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli-webpack/boot-files - boot: [ - 'i18n', - 'axios', - 'error-handler', - 'app' - ], + boot: ['i18n', 'axios', 'error-handler', 'app'], // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-css - css: [ - 'app.scss', - 'width.scss', - 'responsive.scss' - ], + css: ['app.scss', 'width.scss', 'responsive.scss'], // https://github.com/quasarframework/quasar/tree/dev/extras extras: [ @@ -77,8 +68,9 @@ module.exports = configure(function (ctx) { // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain chainWebpack (chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: ['js', 'vue'] }]) + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{ extensions: ['js', 'vue'] }]); chain.module .rule('i18n-resource') @@ -87,15 +79,14 @@ module.exports = configure(function (ctx) { .end() .type('javascript/auto') .use('i18n-resource') - .loader('@intlify/vue-i18n-loader') + .loader('@intlify/vue-i18n-loader'); chain.module .rule('i18n') .resourceQuery(/blockType=i18n/) .type('javascript/auto') .use('i18n') - .loader('@intlify/vue-i18n-loader') + .loader('@intlify/vue-i18n-loader'); } - }, // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-devServer @@ -111,8 +102,8 @@ module.exports = configure(function (ctx) { proxy: { '/api': 'http://localhost:3000', '/': { - target: 'http://localhost:3001', - bypass: (req) => req.path !== '/' ? req.path : null + target: 'http://localhost:3002', + bypass: req => (req.path !== '/' ? req.path : null) } } }, @@ -132,9 +123,7 @@ module.exports = configure(function (ctx) { // directives: [], // Quasar plugins - plugins: [ - 'Notify' - ] + plugins: ['Notify', 'Dialog'] }, // animations: 'all', // --- includes all animations @@ -155,8 +144,9 @@ module.exports = configure(function (ctx) { // Tell browser when a file from the server should expire from cache (in ms) chainWebpackWebserver (chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: ['js'] }]) + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{ extensions: ['js'] }]); }, middlewares: [ @@ -174,14 +164,15 @@ module.exports = configure(function (ctx) { // if using workbox in InjectManifest mode chainWebpackCustomSW (chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: ['js'] }]) + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{ extensions: ['js'] }]); }, manifest: { name: 'Hedera', short_name: 'Hedera', - description: 'Verdnatura\'s webshop', + description: "Verdnatura's webshop", display: 'standalone', orientation: 'portrait', background_color: '#ffffff', @@ -232,13 +223,11 @@ module.exports = configure(function (ctx) { packager: { // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options - // OS X / Mac App Store // appBundleId: '', // appCategoryType: '', // osxSign: '', // protocol: 'myapp://path', - // Windows only // win32metadata: { ... } }, @@ -252,15 +241,16 @@ module.exports = configure(function (ctx) { // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain chainWebpackMain (chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: ['js'] }]) + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{ extensions: ['js'] }]); }, chainWebpackPreload (chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: ['js'] }]) + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{ extensions: ['js'] }]); } - } - } + }; }) diff --git a/src/boot/axios.js b/src/boot/axios.js index b09fccc0..b5758897 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -1,7 +1,7 @@ -import { boot } from 'quasar/wrappers' -import { Connection } from '../js/db/connection' -import { userStore } from 'stores/user' -import axios from 'axios' +import { boot } from 'quasar/wrappers'; +import { Connection } from '../js/db/connection'; +import { userStore } from 'stores/user'; +import axios from 'axios'; // Be careful when using SSR for cross-request state pollution // due to creating a Singleton instance here; @@ -11,32 +11,33 @@ import axios from 'axios' // for each client) const api = axios.create({ baseURL: `//${location.hostname}:${location.port}/api/` -}) +}); -const jApi = new Connection() +const jApi = new Connection(); export default boot(({ app }) => { - const user = userStore() - function addToken (config) { + const user = userStore(); + function addToken(config) { if (user.token) { - config.headers.Authorization = user.token + config.headers.Authorization = user.token; } - return config + return config; } - api.interceptors.request.use(addToken) - jApi.use(addToken) + api.interceptors.request.use(addToken); + jApi.use(addToken); // for use inside Vue files (Options API) through this.$axios and this.$api - app.config.globalProperties.$axios = axios + app.config.globalProperties.$axios = axios; // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form) // so you won't necessarily have to import axios in each vue file - app.config.globalProperties.$api = api + app.config.globalProperties.$api = api; // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form) // so you can easily perform requests against your app's API - app.config.globalProperties.$jApi = jApi -}) + app.config.globalProperties.$jApi = jApi; + app.provide('jApi', jApi); +}); -export { api, jApi } +export { api, jApi }; diff --git a/src/boot/i18n.js b/src/boot/i18n.js index 85d0f9df..f6e0703f 100644 --- a/src/boot/i18n.js +++ b/src/boot/i18n.js @@ -1,18 +1,20 @@ -import { boot } from 'quasar/wrappers' -import { createI18n } from 'vue-i18n' -import messages from 'src/i18n' +import { boot } from 'quasar/wrappers'; +import { createI18n } from 'vue-i18n'; +import messages from 'src/i18n'; + +const i18n = createI18n({ + locale: 'es-ES', + globalInjection: true, + silentTranslationWarn: true, + silentFallbackWarn: true, + messages, + legacy: false +}); export default boot(({ app }) => { - const i18n = createI18n({ - locale: 'es-ES', - globalInjection: true, - silentTranslationWarn: true, - silentFallbackWarn: true, - messages - }) - // Set i18n instance on app - app.use(i18n) + app.use(i18n); + window.i18n = i18n.global; +}); - window.i18n = i18n.global -}) +export { i18n }; diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue new file mode 100644 index 00000000..469c17d7 --- /dev/null +++ b/src/components/ui/VnConfirm.vue @@ -0,0 +1,127 @@ + + + + + + +en-US: + confirm: Confirm + wantToContinue: Are you sure you want to continue? + cancel: Cancel +es-ES: + confirm: Confirmar + wantToContinue: ¿Seguro que quieres continuar? + cancel: Cancelar +ca-ES: + confirm: Confirmar + wantToContinue: Segur que vols continuar? + cancel: Cancel·lar +fr-FR: + confirm: Confirmer + wantToContinue: Êtes-vous sûr de vouloir continuer? + cancel: Annuler +pt-PT: + confirm: Confirme + wantToContinue: Tem a certeza de que deseja continuar? + cancel: Cancelar + diff --git a/src/composables/useNotify.js b/src/composables/useNotify.js new file mode 100644 index 00000000..aa8d68f3 --- /dev/null +++ b/src/composables/useNotify.js @@ -0,0 +1,22 @@ +import { Notify } from 'quasar'; +import { i18n } from 'src/boot/i18n'; + +export default function useNotify() { + const notify = (message, type, icon) => { + const defaultIcons = { + warning: 'warning', + negative: 'error', + positive: 'check' + }; + + Notify.create({ + message: i18n.global.t(message), + type, + icon: icon || defaultIcons[type] + }); + }; + + return { + notify + }; +} diff --git a/src/composables/useVnConfirm.js b/src/composables/useVnConfirm.js new file mode 100644 index 00000000..e66ae229 --- /dev/null +++ b/src/composables/useVnConfirm.js @@ -0,0 +1,23 @@ +import VnConfirm from 'src/components/ui/VnConfirm.vue'; +import { useQuasar } from 'quasar'; + +export function useVnConfirm() { + const quasar = useQuasar(); + + const openConfirmationModal = (title, message, promise, successFn) => { + quasar + .dialog({ + component: VnConfirm, + componentProps: { + title, + message, + promise + } + }) + .onOk(async () => { + if (successFn) successFn(); + }); + }; + + return { openConfirmationModal }; +} diff --git a/src/i18n/en-US/index.js b/src/i18n/en-US/index.js index 8a0a9207..723cfc3b 100644 --- a/src/i18n/en-US/index.js +++ b/src/i18n/en-US/index.js @@ -73,5 +73,6 @@ export default { config: 'Configuration', user: 'User', addresses: 'Addresses', - addressEdit: 'Edit address' -} + addressEdit: 'Edit address', + dataSaved: 'Data saved' +}; diff --git a/src/i18n/es-ES/index.js b/src/i18n/es-ES/index.js index 23f60e10..0ecd8706 100644 --- a/src/i18n/es-ES/index.js +++ b/src/i18n/es-ES/index.js @@ -73,5 +73,6 @@ export default { config: 'Configuración', user: 'Usuario', addresses: 'Direcciones', - addressEdit: 'Editar dirección' -} + addressEdit: 'Editar dirección', + dataSaved: 'Datos guardados' +}; diff --git a/src/pages/Account/AccountConf.vue b/src/pages/Account/AccountConf.vue new file mode 100644 index 00000000..87184d4d --- /dev/null +++ b/src/pages/Account/AccountConf.vue @@ -0,0 +1,9 @@ + + + + + + + diff --git a/src/pages/Account/AddressDetails.vue b/src/pages/Account/AddressDetails.vue new file mode 100644 index 00000000..6a68eb78 --- /dev/null +++ b/src/pages/Account/AddressDetails.vue @@ -0,0 +1,33 @@ + + + + + + + +en-US: + back: Back + accept: Accept +es-ES: + back: Volver + accept: Aceptar +ca-ES: + back: Tornar + accept: Acceptar +fr-FR: + back: Retour + accept: Accepter +pt-PT: + back: Voltar + accept: Aceitar + diff --git a/src/pages/Account/AddressList.vue b/src/pages/Account/AddressList.vue new file mode 100644 index 00000000..46c47aba --- /dev/null +++ b/src/pages/Account/AddressList.vue @@ -0,0 +1,185 @@ + + + + + + + +en-US: + addAddress: Add address + defaultAddressModified: Default address modified + confirmDeleteAddress: Are you sure you want to delete the address? +es-ES: + addAddress: Añadir dirección + defaultAddressModified: Dirección por defecto modificada + confirmDeleteAddress: ¿Estás seguro de que quieres borrar la dirección? +ca-ES: + addAddress: Afegir adreça + defaultAddressModified: Adreça per defecte modificada + confirmDeleteAddress: Estàs segur que vols esborrar l'adreça? +fr-FR: + addAddress: Ajouter une adresse + defaultAddressModified: Adresse par défaut modifiée + confirmDeleteAddress: Êtes-vous sûr de vouloir supprimer l'adresse? +pt-PT: + addAddress: Adicionar Morada + defaultAddressModified: Endereço padrão modificado + confirmDeleteAddress: Tem a certeza de que deseja excluir o endereço? + diff --git a/src/router/routes.js b/src/router/routes.js index 0a8dd7fd..b8d46e0f 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -53,6 +53,21 @@ const routes = [ name: 'catalog', path: '/ecomerce/catalog/:category?/:type?', component: () => import('pages/Ecomerce/Catalog.vue') + }, + { + name: 'Account', + path: '/account/conf', + component: () => import('pages/Account/AccountConf.vue') + }, + { + name: 'Addresses', + path: '/account/address-list', + component: () => import('pages/Account/AddressList.vue') + }, + { + name: 'AddressDetails', + path: '/account/address/:id?', + component: () => import('pages/Account/AddressDetails.vue') } ] }, @@ -63,6 +78,6 @@ const routes = [ path: '/:catchAll(.*)*', component: () => import('pages/ErrorNotFound.vue') } -] +]; -export default routes +export default routes;