fix: errors
This commit is contained in:
2
bo/components.d.ts
vendored
2
bo/components.d.ts
vendored
@@ -21,12 +21,10 @@ declare module 'vue' {
|
|||||||
PageProductCardFull: typeof import('./src/components/customer/PageProductCardFull.vue')['default']
|
PageProductCardFull: typeof import('./src/components/customer/PageProductCardFull.vue')['default']
|
||||||
Pl_PrivacyPolicyView: typeof import('./src/components/terms/pl_PrivacyPolicyView.vue')['default']
|
Pl_PrivacyPolicyView: typeof import('./src/components/terms/pl_PrivacyPolicyView.vue')['default']
|
||||||
Pl_TermsAndConditionsView: typeof import('./src/components/terms/pl_TermsAndConditionsView.vue')['default']
|
Pl_TermsAndConditionsView: typeof import('./src/components/terms/pl_TermsAndConditionsView.vue')['default']
|
||||||
ProductCardFull: typeof import('./src/components/customer/ProductCardFull.vue')['default']
|
|
||||||
ProductCustomization: typeof import('./src/components/customer/components/ProductCustomization.vue')['default']
|
ProductCustomization: typeof import('./src/components/customer/components/ProductCustomization.vue')['default']
|
||||||
ProductDetailView: typeof import('./src/components/admin/ProductDetailView.vue')['default']
|
ProductDetailView: typeof import('./src/components/admin/ProductDetailView.vue')['default']
|
||||||
ProductsView: typeof import('./src/components/admin/ProductsView.vue')['default']
|
ProductsView: typeof import('./src/components/admin/ProductsView.vue')['default']
|
||||||
ProductVariants: typeof import('./src/components/customer/components/ProductVariants.vue')['default']
|
ProductVariants: typeof import('./src/components/customer/components/ProductVariants.vue')['default']
|
||||||
'ProductСustomization': typeof import('./src/components/customer/components/ProductСustomization.vue')['default']
|
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
ThemeSwitch: typeof import('./src/components/inner/themeSwitch.vue')['default']
|
ThemeSwitch: typeof import('./src/components/inner/themeSwitch.vue')['default']
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ProductsView from '@/views/customer/ProductsView.vue';
|
|
||||||
import LangSwitch from './inner/langSwitch.vue'
|
import LangSwitch from './inner/langSwitch.vue'
|
||||||
import ThemeSwitch from './inner/themeSwitch.vue'
|
import ThemeSwitch from './inner/themeSwitch.vue'
|
||||||
import { useAuthStore } from '@/stores/auth'
|
import { useAuthStore } from '@/stores/auth'
|
||||||
|
|||||||
@@ -134,7 +134,12 @@ function openCreateModal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openEditModal(address: any) {
|
function openEditModal(address: any) {
|
||||||
formData.value = { ...address }
|
formData.value = {
|
||||||
|
street: address.street,
|
||||||
|
zipCode: address.zipCode,
|
||||||
|
city: address.city,
|
||||||
|
country: address.country
|
||||||
|
}
|
||||||
isEditing.value = true
|
isEditing.value = true
|
||||||
editingAddressId.value = address.id
|
editingAddressId.value = address.id
|
||||||
showModal.value = true
|
showModal.value = true
|
||||||
|
|||||||
@@ -88,14 +88,16 @@ export const useAddressStore = defineStore('address', () => {
|
|||||||
const index = addresses.value.findIndex(a => a.id === id)
|
const index = addresses.value.findIndex(a => a.id === id)
|
||||||
if (index === -1) return false
|
if (index === -1) return false
|
||||||
|
|
||||||
|
const existing = addresses.value[index]
|
||||||
|
if (!existing) return false
|
||||||
|
|
||||||
addresses.value[index] = {
|
addresses.value[index] = {
|
||||||
...addresses.value[index],
|
id: existing.id,
|
||||||
...normalize(formData)
|
...normalize(formData)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteAddress(id: number): boolean {
|
function deleteAddress(id: number): boolean {
|
||||||
const index = addresses.value.findIndex(a => a.id === id)
|
const index = addresses.value.findIndex(a => a.id === id)
|
||||||
if (index === -1) return false
|
if (index === -1) return false
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import { useAuthStore } from '@/stores/auth'
|
|||||||
import { i18n } from '@/plugins/02_i18n'
|
import { i18n } from '@/plugins/02_i18n'
|
||||||
import type { TableColumn } from '@nuxt/ui'
|
import type { TableColumn } from '@nuxt/ui'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import ProductDetailView from './customer/ProductDetailView.vue'
|
|
||||||
import ProductsView from './customer/ProductsView.vue'
|
|
||||||
|
|
||||||
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
|
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user