fix: migrations
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<div class="">
|
||||
<h2
|
||||
class="font-semibold text-black dark:text-white pb-6 text-2xl">
|
||||
{{ t('Cart Items') }}
|
||||
@@ -48,15 +47,13 @@
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useCartStore } from '@/stores/customer/cart'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Default from '@/layouts/default.vue'
|
||||
const cartStore = useCartStore()
|
||||
const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="flex flex-col gap-5 md:gap-10">
|
||||
<div class="flex flex-col gap-5 md:gap-10">
|
||||
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Shopping Cart') }}</h1>
|
||||
<div class="flex flex-col lg:flex-row gap-5 md:gap-10">
|
||||
<div class="flex-1">
|
||||
@@ -147,8 +146,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch } from 'vue'
|
||||
@@ -156,7 +154,6 @@ import { useCartStore } from '@/stores/customer/cart'
|
||||
import { useAddressStore } from '@/stores/customer/address'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Default from '@/layouts/default.vue'
|
||||
const cartStore = useCartStore()
|
||||
const addressStore = useAddressStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
Orders page
|
||||
</component>
|
||||
</template>
|
||||
Orders page
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Default from '@/layouts/default.vue'
|
||||
</script>
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<div class="">
|
||||
<div class="flex md:flex-row flex-col justify-between gap-8 my-6">
|
||||
<div class="flex-1">
|
||||
<div
|
||||
@@ -79,14 +78,12 @@
|
||||
<hr class="border-t border-(--border-light) dark:border-(--border-dark) mb-8" />
|
||||
<ProductVariants />
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import ProductCustomization from './components/ProductCustomization.vue'
|
||||
import ProductVariants from './components/ProductVariants.vue'
|
||||
import Default from '@/layouts/default.vue'
|
||||
import { useFetchJson } from '@/composable/useFetchJson'
|
||||
import { useRoute } from 'vue-router'
|
||||
interface Color {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<suspense>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<div class="">
|
||||
<!-- <UNavigationMenu orientation="vertical" :items="listing" class="data-[orientation=vertical]:w-48">
|
||||
<template #item="{ item, active }">
|
||||
<div class="flex items-center gap-2 px-3 py-2">
|
||||
@@ -39,13 +38,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</suspense>
|
||||
</suspense>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, h, resolveComponent, computed } from 'vue'
|
||||
import Default from '@/layouts/default.vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import type { TableColumn } from '@nuxt/ui'
|
||||
import CategoryMenu from '../inner/CategoryMenu.vue'
|
||||
|
||||
@@ -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('Customer Data') }}</h1>
|
||||
|
||||
@@ -97,8 +96,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
@@ -106,7 +104,6 @@ import { useRouter } from 'vue-router'
|
||||
import { useCustomerStore } from '@/stores/customer'
|
||||
import { useAddressStore } from '@/stores/customer/address'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import Default from '@/layouts/default.vue'
|
||||
const router = useRouter()
|
||||
const customerStore = useCustomerStore()
|
||||
const addressStore = useAddressStore()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<div class="">
|
||||
<div class="max-w-2xl mx-auto">
|
||||
<div class="flex flex-col gap-5 mb-6">
|
||||
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Create Account') }}</h1>
|
||||
@@ -109,8 +108,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
@@ -119,7 +117,6 @@ import { useCustomerStore } from '@/stores/customer'
|
||||
import { useAddressStore } from '@/stores/customer/address'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useCartStore } from '@/stores/customer/cart'
|
||||
import Default from '@/layouts/default.vue'
|
||||
const router = useRouter()
|
||||
const customerStore = useCustomerStore()
|
||||
const addressStore = useAddressStore()
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
Statistic page
|
||||
</component>
|
||||
</template>
|
||||
Statistic page
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Default from '@/layouts/default.vue'
|
||||
</script>
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="p-4">
|
||||
<div class="p-4">
|
||||
<div v-if="loading" class="flex justify-center py-8">
|
||||
<ULoader />
|
||||
</div>
|
||||
@@ -25,13 +24,11 @@
|
||||
</template>
|
||||
</UTree>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { useFetchJson } from '@/composable/useFetchJson'
|
||||
import Default from '@/layouts/default.vue'
|
||||
|
||||
interface FileItemRaw {
|
||||
Name: string
|
||||
|
||||
Reference in New Issue
Block a user