From 51f49a2b7d7df80482eb0b93205435c648940569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa?= Date: Thu, 14 Aug 2025 15:26:33 +0200 Subject: [PATCH 01/21] edit password functionality and page --- example copy.env | 8 ++++++++ pages/editar/perfil/contrasena.vue | 27 ++++++++++++++++++++++----- pages/editar/perfil/index.vue | 5 ++--- 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 example copy.env diff --git a/example copy.env b/example copy.env new file mode 100644 index 0000000..3941d42 --- /dev/null +++ b/example copy.env @@ -0,0 +1,8 @@ +API = 'http://0.0.0.0:8000/' +API_V1 = '/api/v1/' +BASE_URL= $API$API_V1 +GOOGLE_CLIENT_ID='1076928279923-s6hdbpcpbeaeqnact5t5kmktrkaipndq.apps.googleusercontent.com' +FACEBOOK_ID='751687992155393' + +GOOGLE_MAPS_API_KEY = 'AIzaSyDX_8JveVk4S5cnDcMHijmOO9HGj5OJHmQ' +GOOGLE_ANALYTICS_ID = 'G-QT1WE1L619' \ No newline at end of file diff --git a/pages/editar/perfil/contrasena.vue b/pages/editar/perfil/contrasena.vue index f8332e2..bc50380 100644 --- a/pages/editar/perfil/contrasena.vue +++ b/pages/editar/perfil/contrasena.vue @@ -9,18 +9,21 @@ type="text" label-text="Contraseña actual" required + @input="form.old_password = $event" /> {{ error }} {{ success }} @@ -28,12 +31,15 @@ + {{ form }} + + diff --git a/components/ProductModal.vue b/components/ProductModal.vue new file mode 100644 index 0000000..04011c2 --- /dev/null +++ b/components/ProductModal.vue @@ -0,0 +1,310 @@ + + + + + diff --git a/components/ProductsRelated.vue b/components/ProductsRelated.vue new file mode 100644 index 0000000..bf4e84c --- /dev/null +++ b/components/ProductsRelated.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/package-lock.json b/package-lock.json index 1914c5e..48d8e98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@nuxt/eslint": "^1.8.0", "@nuxtjs/sitemap": "^7.4.3", "@pinia/nuxt": "^0.11.2", + "dompurify": "^3.2.6", "eslint": "^9.32.0", "nuxt": "^3.17.7", "pinia": "^3.0.3", @@ -4321,6 +4322,13 @@ "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", "license": "MIT" }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", @@ -7027,6 +7035,15 @@ "url": "https://github.com/fb55/domhandler?sponsor=1" } }, + "node_modules/dompurify": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.6.tgz", + "integrity": "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/domutils": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", diff --git a/package.json b/package.json index b0adf2a..a2471ca 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@nuxt/eslint": "^1.8.0", "@nuxtjs/sitemap": "^7.4.3", "@pinia/nuxt": "^0.11.2", + "dompurify": "^3.2.6", "eslint": "^9.32.0", "nuxt": "^3.17.7", "pinia": "^3.0.3", diff --git a/pages/editar/perfil/contrasena.vue b/pages/editar/perfil/contrasena.vue index bc50380..30a5f0e 100644 --- a/pages/editar/perfil/contrasena.vue +++ b/pages/editar/perfil/contrasena.vue @@ -31,7 +31,6 @@ - {{ form }} diff --git a/pages/productos/[id].vue b/pages/productos/[id].vue index 24fee24..29afb45 100644 --- a/pages/productos/[id].vue +++ b/pages/productos/[id].vue @@ -1,15 +1,92 @@ \ No newline at end of file +.title { + margin-bottom: 40px; + font-size: $xl; + color: $color-navy; +} + From 8fedf544704d48c81098daa478c379124d56403d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa?= Date: Mon, 18 Aug 2025 14:45:18 +0200 Subject: [PATCH 03/21] wip coop/[id] page --- components/CoopCard.vue | 237 ++++++++++++++ components/NavMenu copy.vue | 276 ---------------- components/ProductCard.vue | 506 ++++++++++++++++++++++++++++++ components/ProductCardDetails.vue | 32 +- pages/c/[id].vue | 423 ++++++++++++++++++++++++- pages/c/index.vue | 189 ++++++++++- stores/auth.ts | 7 +- 7 files changed, 1374 insertions(+), 296 deletions(-) create mode 100644 components/CoopCard.vue delete mode 100644 components/NavMenu copy.vue create mode 100644 components/ProductCard.vue diff --git a/components/CoopCard.vue b/components/CoopCard.vue new file mode 100644 index 0000000..8f5389c --- /dev/null +++ b/components/CoopCard.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/components/NavMenu copy.vue b/components/NavMenu copy.vue deleted file mode 100644 index fd624a8..0000000 --- a/components/NavMenu copy.vue +++ /dev/null @@ -1,276 +0,0 @@ - - - - - diff --git a/components/ProductCard.vue b/components/ProductCard.vue new file mode 100644 index 0000000..2fc0964 --- /dev/null +++ b/components/ProductCard.vue @@ -0,0 +1,506 @@ + + + + + diff --git a/components/ProductCardDetails.vue b/components/ProductCardDetails.vue index 8956f92..2970577 100644 --- a/components/ProductCardDetails.vue +++ b/components/ProductCardDetails.vue @@ -110,6 +110,7 @@ - \ No newline at end of file + diff --git a/pages/c/index.vue b/pages/c/index.vue index 9ee4414..12caead 100644 --- a/pages/c/index.vue +++ b/pages/c/index.vue @@ -1,15 +1,192 @@ \ No newline at end of file +.title { + margin-top: 60px; + margin-bottom: 40px; + font-size: $xxl; + color: $color-navy; +} + +.form-container { + display: flex; + justify-content: flex-start; +} + +.coopcard-list { + margin-bottom: 40px; +} + +.pagination { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} + +.help { + color: $color-navy; + margin-bottom: 0px; + font-size: $s; +} + +.search-container { + border: none; + border-radius: 5px; + background: $color-light-green; + width: 50%; + height: 32px; + overflow: hidden; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + margin-top: 50px; + margin-bottom: 50px; + + @include mobile { + width: 100%; + } +} + +.search-container img, +input, +select { + padding: 6px 10px; + margin-right: 16px; + background: transparent; + font-size: $xl; + border: none; +} + +.search-icon { + float: right; + height: 90%; +} + +.search-text { + outline: none; + width: 100%; + text-align: center; + color: $color-navy; + font-size: $s; + font-weight: $regular; +} + +::placeholder { + color: $color-navy; + font-size: $s; +} + +select { + --webkit-appearance: auto; +} + diff --git a/stores/auth.ts b/stores/auth.ts index 2d04e03..043935a 100644 --- a/stores/auth.ts +++ b/stores/auth.ts @@ -29,6 +29,7 @@ export const useAuthStore = defineStore('auth', { method: 'POST', body: { email, password } }) + console.log('Login payload:', payload) this.setPayload(payload) }, @@ -41,7 +42,11 @@ export const useAuthStore = defineStore('auth', { Authorization: `Bearer ${this.access}` } }) - this.setUserData(data) + try { + this.setUserData(data) + } catch (error) { + console.error('Error setting user data:', error) + } }, async refresh() { From d609660dde2e2c57594fde5b6317292f7f3ab81b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa?= Date: Wed, 20 Aug 2025 12:37:20 +0200 Subject: [PATCH 04/21] edit cooperative page and functionality --- components/CompanyForm.vue | 441 +++++++++++++++++++++++++++++ components/FormInput.vue | 1 + components/FormInputImage.vue | 110 +++++++ components/NavBarEditar.vue | 8 +- package-lock.json | 37 +++ package.json | 1 + pages/editar/cooperativa/index.vue | 59 ++++ pages/editar/perfil/index.vue | 22 +- pages/index.vue | 3 +- stores/auth.ts | 2 +- 10 files changed, 671 insertions(+), 13 deletions(-) create mode 100644 components/CompanyForm.vue create mode 100644 components/FormInputImage.vue create mode 100644 pages/editar/cooperativa/index.vue diff --git a/components/CompanyForm.vue b/components/CompanyForm.vue new file mode 100644 index 0000000..69b2383 --- /dev/null +++ b/components/CompanyForm.vue @@ -0,0 +1,441 @@ +