fix: migrations

This commit is contained in:
2026-04-15 12:47:10 +02:00
parent 5ebf21c559
commit f7ad3cc387
30 changed files with 292 additions and 196 deletions

View File

@@ -1,6 +1,5 @@
<template>
<component :is="Default || 'div'">
<div class="">
<div class="">
<div class="flex flex-col gap-5 mb-6">
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Addresses') }}</h1>
<div class="flex md:flex-row flex-col justify-between items-start md:items-center gap-5 md:gap-0">
@@ -72,8 +71,7 @@
{{ t('Cancel') }}
</UButton>
<UButton type="submit"
class="text-white bg-(--accent-blue-light) dark:bg-(--accent-blue-dark) hover:bg-(--accent-blue-dark) dark:hover:bg-(--accent-blue-light)">
<UButton type="submit" color="info" class="cursor-pointer">
{{ t('Save') }}
</UButton>
</div>
@@ -103,14 +101,12 @@
</template>
</UModal>
</div>
</component>
</template>
</template>
<script setup lang="ts">
import { ref, reactive, computed, watch, onMounted } from 'vue'
import { useCartStore } from '@/stores/customer/cart'
import { useI18n } from 'vue-i18n'
import Default from '@/layouts/default.vue'
import { currentCountry } from '@/router/langs'
type AddressFormState = Record<string, string>
@@ -230,9 +226,9 @@ function validate() {
async function saveAddress() {
if (isEditing.value && editingAddressId.value) {
await cartStore.updateAddress(editingAddressId.value, currentCountryId.value, formData)
await cartStore.updateAddress(editingAddressId.value, currentCountry.value?.id || 2, formData)
} else {
await cartStore.addAddress(currentCountryId.value, formData)
await cartStore.addAddress(currentCountry.value?.id || 2, formData)
}
closeModal()
}