fix: migrations
This commit is contained in:
@@ -28,7 +28,7 @@ tmp_dir = "tmp"
|
|||||||
rerun = false
|
rerun = false
|
||||||
rerun_delay = 500
|
rerun_delay = 500
|
||||||
send_interrupt = false
|
send_interrupt = false
|
||||||
stop_on_error = false
|
stop_on_error = true
|
||||||
|
|
||||||
[color]
|
[color]
|
||||||
app = ""
|
app = ""
|
||||||
|
|||||||
@@ -153,6 +153,6 @@ func (s *EmailService) newUserAdminNotificationTemplate(userEmail, userName, bas
|
|||||||
// newUserAdminNotificationTemplate returns the HTML template for admin notification
|
// newUserAdminNotificationTemplate returns the HTML template for admin notification
|
||||||
func (s *EmailService) newOrderPlacedTemplate(userID uint) string {
|
func (s *EmailService) newOrderPlacedTemplate(userID uint) string {
|
||||||
buf := bytes.Buffer{}
|
buf := bytes.Buffer{}
|
||||||
emails.EmailNewOrderPlacedWrapper(view.EmailLayout[view.EmailNewOrderPlacedData]{LangID: constdata.ADMIN_NOTIFICATION_LANGUAGE, Data: view.EmailNewOrderPlacedData{UserID: userID}}).Render(context.Background(), &buf)
|
// emails.EmailNewOrderPlacedWrapper(view.EmailLayout[view.EmailNewOrderPlacedData]{LangID: constdata.ADMIN_NOTIFICATION_LANGUAGE, Data: view.EmailNewOrderPlacedData{UserID: userID}}).Render(context.Background(), &buf)
|
||||||
return buf.String()
|
return buf.String()
|
||||||
}
|
}
|
||||||
|
|||||||
3
bo/components.d.ts
vendored
3
bo/components.d.ts
vendored
@@ -11,7 +11,6 @@ export {}
|
|||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
ButtonGoToProfile: typeof import('./src/components/customer-management/ButtonGoToProfile.vue')['default']
|
|
||||||
CartDetails: typeof import('./src/components/customer/CartDetails.vue')['default']
|
CartDetails: typeof import('./src/components/customer/CartDetails.vue')['default']
|
||||||
CategoryMenu: typeof import('./src/components/inner/CategoryMenu.vue')['default']
|
CategoryMenu: typeof import('./src/components/inner/CategoryMenu.vue')['default']
|
||||||
copy: typeof import('./src/components/admin/ProductDetailView copy.vue')['default']
|
copy: typeof import('./src/components/admin/ProductDetailView copy.vue')['default']
|
||||||
@@ -45,7 +44,7 @@ declare module 'vue' {
|
|||||||
TopBar: typeof import('./src/components/TopBar.vue')['default']
|
TopBar: typeof import('./src/components/TopBar.vue')['default']
|
||||||
TopBarLogin: typeof import('./src/components/TopBarLogin.vue')['default']
|
TopBarLogin: typeof import('./src/components/TopBarLogin.vue')['default']
|
||||||
UAlert: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Alert.vue')['default']
|
UAlert: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Alert.vue')['default']
|
||||||
UAvatar: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Avatar.vue')['default']
|
UApp: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/App.vue')['default']
|
||||||
UButton: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Button.vue')['default']
|
UButton: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Button.vue')['default']
|
||||||
UCard: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Card.vue')['default']
|
UCard: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Card.vue')['default']
|
||||||
UCheckbox: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Checkbox.vue')['default']
|
UCheckbox: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Checkbox.vue')['default']
|
||||||
|
|||||||
@@ -1,15 +1,25 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue'
|
||||||
import { TooltipProvider } from 'reka-ui'
|
import { TooltipProvider } from 'reka-ui'
|
||||||
import { RouterView } from 'vue-router'
|
import { RouterView, useRoute } from 'vue-router'
|
||||||
|
import DefaultLayout from '@/layouts/default.vue'
|
||||||
|
import EmptyLayout from '@/layouts/empty.vue'
|
||||||
|
import ManagementLayout from '@/layouts/management.vue'
|
||||||
import { useAuthStore } from './stores/customer/auth'
|
import { useAuthStore } from './stores/customer/auth'
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
|
const route = useRoute()
|
||||||
|
const layout = computed(() => (route.meta.layout as string) || 'default')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
<RouterView />
|
<component :is="layout === 'empty' ? EmptyLayout : layout === 'management' ? ManagementLayout : DefaultLayout">
|
||||||
|
<RouterView v-slot="{ Component }">
|
||||||
|
<component :is="Component" />
|
||||||
|
</RouterView>
|
||||||
|
</component>
|
||||||
</TooltipProvider>
|
</TooltipProvider>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div>
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Default from '@/layouts/default.vue';
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="flex flex-col md:flex-row gap-10">
|
||||||
<div class="flex flex-col md:flex-row gap-10">
|
|
||||||
<CategoryMenu />
|
<CategoryMenu />
|
||||||
<div class="w-full flex flex-col items-center gap-4">
|
<div class="w-full flex flex-col items-center gap-4">
|
||||||
<UTable :data="productsList" :columns="columns" class="flex-1 w-full" :ui="{
|
<UTable :data="productsList" :columns="columns" class="flex-1 w-full" :ui="{
|
||||||
@@ -9,13 +8,11 @@
|
|||||||
<UPagination v-model:page="page" :total="total" :items-per-page="perPage" />
|
<UPagination v-model:page="page" :total="total" :items-per-page="perPage" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, h, resolveComponent, computed } from 'vue'
|
import { ref, watch, h, resolveComponent, computed } from 'vue'
|
||||||
import { useFetchJson } from '@/composable/useFetchJson'
|
import { useFetchJson } from '@/composable/useFetchJson'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import type { TableColumn } from '@nuxt/ui'
|
import type { TableColumn } from '@nuxt/ui'
|
||||||
import CategoryMenu from '../inner/CategoryMenu.vue'
|
import CategoryMenu from '../inner/CategoryMenu.vue'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="flex items-center gap-2 mb-4">
|
||||||
<div class="flex items-center gap-2 mb-4">
|
|
||||||
<UIcon name="line-md:arrow-left" class="text-(--text-sky-light) dark:text-(--text-sky-dark)" />
|
<UIcon name="line-md:arrow-left" class="text-(--text-sky-light) dark:text-(--text-sky-dark)" />
|
||||||
<p class="cursor-pointer text-(--text-sky-light) dark:text-(--text-sky-dark)" @click="backFromProduct()">
|
<p class="cursor-pointer text-(--text-sky-light) dark:text-(--text-sky-dark)" @click="backFromProduct()">
|
||||||
Back to products</p>
|
Back to products</p>
|
||||||
@@ -190,12 +189,10 @@
|
|||||||
</UTabs>
|
</UTabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useEditable } from '@/composable/useConteditable';
|
import { useEditable } from '@/composable/useConteditable';
|
||||||
import Default from '@/layouts/default.vue';
|
|
||||||
import { langs } from '@/router/langs';
|
import { langs } from '@/router/langs';
|
||||||
import { useProductStore } from '@/stores/product';
|
import { useProductStore } from '@/stores/product';
|
||||||
import { useSettingsStore } from '@/stores/admin/settings';
|
import { useSettingsStore } from '@/stores/admin/settings';
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="flex items-center gap-2 mb-4">
|
||||||
<div class="flex items-center gap-2 mb-4">
|
|
||||||
<UIcon name="line-md:arrow-left" class="text-(--text-sky-light) dark:text-(--text-sky-dark)" />
|
<UIcon name="line-md:arrow-left" class="text-(--text-sky-light) dark:text-(--text-sky-dark)" />
|
||||||
<p class="cursor-pointer text-(--text-sky-light) dark:text-(--text-sky-dark)" @click="backFromProduct()">
|
<p class="cursor-pointer text-(--text-sky-light) dark:text-(--text-sky-dark)" @click="backFromProduct()">
|
||||||
Back to products</p>
|
Back to products</p>
|
||||||
@@ -154,11 +153,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class=""></div>
|
<div class=""></div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Default from '@/layouts/default.vue';
|
|
||||||
import { langs } from '@/router/langs';
|
import { langs } from '@/router/langs';
|
||||||
import { useProductStore } from '@/stores/admin/product';
|
import { useProductStore } from '@/stores/admin/product';
|
||||||
import { useSettingsStore } from '@/stores/admin/settings';
|
import { useSettingsStore } from '@/stores/admin/settings';
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="flex flex-col md:flex-row gap-10">
|
||||||
<div class="flex flex-col md:flex-row gap-10">
|
|
||||||
<div class="w-full flex flex-col items-center gap-4">
|
<div class="w-full flex flex-col items-center gap-4">
|
||||||
<UTable :data="usersList" :columns="columns" class="flex-1 w-full"
|
<UTable :data="usersList" :columns="columns" class="flex-1 w-full"
|
||||||
:ui="{ root: 'max-w-100wv overflow-auto!' }" />
|
:ui="{ root: 'max-w-100wv overflow-auto!' }" />
|
||||||
<UPagination v-model:page="page" :total="total" :items-per-page="perPage" />
|
<UPagination v-model:page="page" :total="total" :items-per-page="perPage" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
import { ref, computed, watch, resolveComponent, h } from 'vue'
|
import { ref, computed, watch, resolveComponent, h } from 'vue'
|
||||||
import { useFetchJson } from '@/composable/useFetchJson'
|
import { useFetchJson } from '@/composable/useFetchJson'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default">
|
<div class="pt-70! flex flex-col items-center justify-center bg-gray-50 dark:bg-(--main-dark)">
|
||||||
<div class="pt-70! flex flex-col items-center justify-center bg-gray-50 dark:bg-(--main-dark)">
|
|
||||||
<h1 class="text-6xl font-bold text-black dark:text-white mb-14">Search Users</h1>
|
<h1 class="text-6xl font-bold text-black dark:text-white mb-14">Search Users</h1>
|
||||||
|
|
||||||
<div class="w-full max-w-4xl">
|
<div class="w-full max-w-4xl">
|
||||||
@@ -18,12 +17,10 @@
|
|||||||
No users found with that name or ID
|
No users found with that name or ID
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watch, resolveComponent, h } from 'vue'
|
import { ref, computed, watch, resolveComponent, h } from 'vue'
|
||||||
import Default from '@/layouts/default.vue';
|
|
||||||
import type { TableColumn } from '@nuxt/ui';
|
import type { TableColumn } from '@nuxt/ui';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { useFetchJson } from '@/composable/useFetchJson';
|
import { useFetchJson } from '@/composable/useFetchJson';
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Management || 'div'">
|
<div>customer-management</div>
|
||||||
<div>customer-management</div>
|
|
||||||
</component>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Management from '@/layouts/management.vue';
|
</script>
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="">
|
||||||
<div class="">
|
|
||||||
<h2
|
<h2
|
||||||
class="font-semibold text-black dark:text-white pb-6 text-2xl">
|
class="font-semibold text-black dark:text-white pb-6 text-2xl">
|
||||||
{{ t('Cart Items') }}
|
{{ t('Cart Items') }}
|
||||||
@@ -48,15 +47,13 @@
|
|||||||
</UButton>
|
</UButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useCartStore } from '@/stores/customer/cart'
|
import { useCartStore } from '@/stores/customer/cart'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
const cartStore = useCartStore()
|
const cartStore = useCartStore()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="">
|
||||||
<div class="">
|
|
||||||
<div class="flex flex-col gap-5 mb-6">
|
<div class="flex flex-col gap-5 mb-6">
|
||||||
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Addresses') }}</h1>
|
<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">
|
<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') }}
|
{{ t('Cancel') }}
|
||||||
</UButton>
|
</UButton>
|
||||||
|
|
||||||
<UButton type="submit"
|
<UButton type="submit" color="info" class="cursor-pointer">
|
||||||
class="text-white bg-(--accent-blue-light) dark:bg-(--accent-blue-dark) hover:bg-(--accent-blue-dark) dark:hover:bg-(--accent-blue-light)">
|
|
||||||
{{ t('Save') }}
|
{{ t('Save') }}
|
||||||
</UButton>
|
</UButton>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,14 +101,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</UModal>
|
</UModal>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed, watch, onMounted } from 'vue'
|
import { ref, reactive, computed, watch, onMounted } from 'vue'
|
||||||
import { useCartStore } from '@/stores/customer/cart'
|
import { useCartStore } from '@/stores/customer/cart'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
import { currentCountry } from '@/router/langs'
|
import { currentCountry } from '@/router/langs'
|
||||||
|
|
||||||
type AddressFormState = Record<string, string>
|
type AddressFormState = Record<string, string>
|
||||||
@@ -230,9 +226,9 @@ function validate() {
|
|||||||
|
|
||||||
async function saveAddress() {
|
async function saveAddress() {
|
||||||
if (isEditing.value && editingAddressId.value) {
|
if (isEditing.value && editingAddressId.value) {
|
||||||
await cartStore.updateAddress(editingAddressId.value, currentCountryId.value, formData)
|
await cartStore.updateAddress(editingAddressId.value, currentCountry.value?.id || 2, formData)
|
||||||
} else {
|
} else {
|
||||||
await cartStore.addAddress(currentCountryId.value, formData)
|
await cartStore.addAddress(currentCountry.value?.id || 2, formData)
|
||||||
}
|
}
|
||||||
closeModal()
|
closeModal()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<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>
|
<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 flex-col lg:flex-row gap-5 md:gap-10">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
@@ -147,8 +146,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watch } from 'vue'
|
import { ref, computed, watch } from 'vue'
|
||||||
@@ -156,7 +154,6 @@ import { useCartStore } from '@/stores/customer/cart'
|
|||||||
import { useAddressStore } from '@/stores/customer/address'
|
import { useAddressStore } from '@/stores/customer/address'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
const cartStore = useCartStore()
|
const cartStore = useCartStore()
|
||||||
const addressStore = useAddressStore()
|
const addressStore = useAddressStore()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
Orders page
|
||||||
Orders page
|
</template>
|
||||||
</component>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
</script>
|
</script>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<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 md:flex-row flex-col justify-between gap-8 my-6">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<div
|
<div
|
||||||
@@ -79,14 +78,12 @@
|
|||||||
<hr class="border-t border-(--border-light) dark:border-(--border-dark) mb-8" />
|
<hr class="border-t border-(--border-light) dark:border-(--border-dark) mb-8" />
|
||||||
<ProductVariants />
|
<ProductVariants />
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import ProductCustomization from './components/ProductCustomization.vue'
|
import ProductCustomization from './components/ProductCustomization.vue'
|
||||||
import ProductVariants from './components/ProductVariants.vue'
|
import ProductVariants from './components/ProductVariants.vue'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
import { useFetchJson } from '@/composable/useFetchJson'
|
import { useFetchJson } from '@/composable/useFetchJson'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
interface Color {
|
interface Color {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<suspense>
|
<suspense>
|
||||||
<component :is="Default || 'div'">
|
<div class="">
|
||||||
<div class="">
|
|
||||||
<!-- <UNavigationMenu orientation="vertical" :items="listing" class="data-[orientation=vertical]:w-48">
|
<!-- <UNavigationMenu orientation="vertical" :items="listing" class="data-[orientation=vertical]:w-48">
|
||||||
<template #item="{ item, active }">
|
<template #item="{ item, active }">
|
||||||
<div class="flex items-center gap-2 px-3 py-2">
|
<div class="flex items-center gap-2 px-3 py-2">
|
||||||
@@ -39,13 +38,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</suspense>
|
||||||
</suspense>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, h, resolveComponent, computed } from 'vue'
|
import { ref, watch, h, resolveComponent, computed } from 'vue'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import type { TableColumn } from '@nuxt/ui'
|
import type { TableColumn } from '@nuxt/ui'
|
||||||
import CategoryMenu from '../inner/CategoryMenu.vue'
|
import CategoryMenu from '../inner/CategoryMenu.vue'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="">
|
||||||
<div class="">
|
|
||||||
<div class="flex flex-col gap-5 mb-6">
|
<div class="flex flex-col gap-5 mb-6">
|
||||||
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Customer Data') }}</h1>
|
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Customer Data') }}</h1>
|
||||||
|
|
||||||
@@ -97,8 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
@@ -106,7 +104,6 @@ import { useRouter } from 'vue-router'
|
|||||||
import { useCustomerStore } from '@/stores/customer'
|
import { useCustomerStore } from '@/stores/customer'
|
||||||
import { useAddressStore } from '@/stores/customer/address'
|
import { useAddressStore } from '@/stores/customer/address'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const customerStore = useCustomerStore()
|
const customerStore = useCustomerStore()
|
||||||
const addressStore = useAddressStore()
|
const addressStore = useAddressStore()
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="">
|
||||||
<div class="">
|
|
||||||
<div class="max-w-2xl mx-auto">
|
<div class="max-w-2xl mx-auto">
|
||||||
<div class="flex flex-col gap-5 mb-6">
|
<div class="flex flex-col gap-5 mb-6">
|
||||||
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Create Account') }}</h1>
|
<h1 class="text-2xl font-bold text-black dark:text-white">{{ t('Create Account') }}</h1>
|
||||||
@@ -109,8 +108,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
@@ -119,7 +117,6 @@ import { useCustomerStore } from '@/stores/customer'
|
|||||||
import { useAddressStore } from '@/stores/customer/address'
|
import { useAddressStore } from '@/stores/customer/address'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useCartStore } from '@/stores/customer/cart'
|
import { useCartStore } from '@/stores/customer/cart'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const customerStore = useCustomerStore()
|
const customerStore = useCustomerStore()
|
||||||
const addressStore = useAddressStore()
|
const addressStore = useAddressStore()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
Statistic page
|
||||||
Statistic page
|
</template>
|
||||||
</component>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
</script>
|
</script>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="p-4">
|
||||||
<div class="p-4">
|
|
||||||
<div v-if="loading" class="flex justify-center py-8">
|
<div v-if="loading" class="flex justify-center py-8">
|
||||||
<ULoader />
|
<ULoader />
|
||||||
</div>
|
</div>
|
||||||
@@ -25,13 +24,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</UTree>
|
</UTree>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { useFetchJson } from '@/composable/useFetchJson'
|
import { useFetchJson } from '@/composable/useFetchJson'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
|
|
||||||
interface FileItemRaw {
|
interface FileItemRaw {
|
||||||
Name: string
|
Name: string
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<UNavigationMenu orientation="vertical" type="single" :items="items" class="data-[orientation=vertical]:w-72" :ui="{
|
<UNavigationMenu orientation="vertical" type="single" :items="items" class="data-[orientation=vertical]:w-72" :ui="{
|
||||||
root:''
|
root: ''
|
||||||
}"/>
|
}" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -39,9 +39,10 @@ function adaptMenu(menu: NavigationMenuItem[]) {
|
|||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
item.open = path && path.includes(item.category_id) ? true : openAll.value
|
item.open = path && path.includes(item.category_id) ? true : openAll.value
|
||||||
adaptMenu(item.children);
|
adaptMenu(item.children);
|
||||||
|
|
||||||
item.children.unshift({
|
item.children.unshift({
|
||||||
label: item.label, icon: 'i-lucide-book-open', popover: item.label, to: {
|
label: item.label, icon: 'i-lucide-book-open', popover: item.label, to: {
|
||||||
name: 'admin-products-category', params: {
|
name: item.params.to, params: {
|
||||||
category_id: item.params.category_id,
|
category_id: item.params.category_id,
|
||||||
link_rewrite: item.params.link_rewrite
|
link_rewrite: item.params.link_rewrite
|
||||||
}
|
}
|
||||||
@@ -49,7 +50,7 @@ function adaptMenu(menu: NavigationMenuItem[]) {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
item.to = {
|
item.to = {
|
||||||
name: 'admin-products-category', params: {
|
name: item.params.to, params: {
|
||||||
category_id: item.params.category_id,
|
category_id: item.params.category_id,
|
||||||
link_rewrite: item.params.link_rewrite
|
link_rewrite: item.params.link_rewrite
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<UButton icon="i-lucide-panel-left" color="neutral" variant="ghost" aria-label="Toggle sidebar"
|
<UButton icon="i-lucide-panel-left" color="neutral" variant="ghost" aria-label="Toggle sidebar"
|
||||||
@click="open = !open" />
|
@click="open = !open" />
|
||||||
<p class="font-bold text-xl">Customer-Management: <span class="text-[20px] font-medium">{{ pageTitle
|
<p class="font-bold text-xl">Customer-Management: <span class="text-[20px] font-medium">{{ pageTitle
|
||||||
}}</span></p>
|
}}</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden md:flex items-center gap-12">
|
<div class="hidden md:flex items-center gap-12">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
@@ -179,8 +179,7 @@ const router = useRouter()
|
|||||||
|
|
||||||
const menu = ref<TopMenuItem[] | null>(null)
|
const menu = ref<TopMenuItem[] | null>(null)
|
||||||
|
|
||||||
const Id =Number(route.params.user_id)
|
const Id = Number(route.params.user_id)
|
||||||
|
|
||||||
async function cmGetTopMenu() {
|
async function cmGetTopMenu() {
|
||||||
try {
|
try {
|
||||||
const { items } = await useFetchJson<TopMenuItem[]>(`/api/v1/restricted/menu/get-top-menu?target_user_id=${Id}`)
|
const { items } = await useFetchJson<TopMenuItem[]>(`/api/v1/restricted/menu/get-top-menu?target_user_id=${Id}`)
|
||||||
@@ -191,7 +190,6 @@ async function cmGetTopMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(route)
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.user_id,
|
() => route.params.user_id,
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
@@ -13,13 +13,30 @@ await getSettings()
|
|||||||
|
|
||||||
const routes = await getRoutes()
|
const routes = await getRoutes()
|
||||||
let newRoutes = []
|
let newRoutes = []
|
||||||
|
|
||||||
|
function getLayoutFromComponent(path: string) {
|
||||||
|
const emptyLayouts = [
|
||||||
|
'LoginView.vue',
|
||||||
|
'RegisterView.vue',
|
||||||
|
'PasswordRecoveryView.vue',
|
||||||
|
'VerifyEmailView.vue',
|
||||||
|
'ResetPasswordForm.vue'
|
||||||
|
]
|
||||||
|
return emptyLayouts.some((name) => path.includes(name)) ? 'empty' : 'default'
|
||||||
|
}
|
||||||
|
|
||||||
for (let r of routes) {
|
for (let r of routes) {
|
||||||
const component = () => import(/* @vite-ignore */ `..${r.component}`)
|
const component = () => import(/* @vite-ignore */ `..${r.component}`)
|
||||||
|
const parsedMeta = r.meta ? JSON.parse(r.meta) : {}
|
||||||
|
const layout = parsedMeta.layout ?? getLayoutFromComponent(r.component)
|
||||||
newRoutes.push({
|
newRoutes.push({
|
||||||
path: r.path,
|
path: r.path,
|
||||||
component,
|
component,
|
||||||
name: r.name,
|
name: r.name,
|
||||||
meta: r.meta ? JSON.parse(r.meta) : {},
|
meta: {
|
||||||
|
...parsedMeta,
|
||||||
|
layout,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,15 +90,21 @@ async function setRoutes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const importedComponent = (await importer()).default
|
const importedComponent = (await importer()).default
|
||||||
|
const parsedMeta = item.meta ? JSON.parse(item.meta) : {}
|
||||||
|
const layout = parsedMeta.layout ?? getLayoutFromComponent(item.component)
|
||||||
|
|
||||||
router.addRoute('locale', {
|
router.addRoute('locale', {
|
||||||
path: item.path,
|
path: item.path,
|
||||||
component: importedComponent,
|
component: importedComponent,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
meta: item.meta ? JSON.parse(item.meta) : {}
|
meta: {
|
||||||
|
...parsedMeta,
|
||||||
|
layout,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(router);
|
||||||
// await router.replace(router.currentRoute.value.fullPath)
|
// await router.replace(router.currentRoute.value.fullPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
import { useFetchJson } from '@/composable/useFetchJson'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
|
import type { AddressTemplate } from './cart'
|
||||||
|
|
||||||
export interface AddressFormData {
|
export interface AddressFormData {
|
||||||
street: string
|
street: string
|
||||||
@@ -17,7 +19,6 @@ export interface Address {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const useAddressStore = defineStore('address', () => {
|
export const useAddressStore = defineStore('address', () => {
|
||||||
const addresses = ref<Address[]>([])
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const error = ref<string | null>(null)
|
const error = ref<string | null>(null)
|
||||||
|
|
||||||
@@ -50,11 +51,6 @@ export const useAddressStore = defineStore('address', () => {
|
|||||||
const totalItems = computed(() => filteredAddresses.value.length)
|
const totalItems = computed(() => filteredAddresses.value.length)
|
||||||
const totalPages = computed(() => Math.ceil(totalItems.value / pageSize))
|
const totalPages = computed(() => Math.ceil(totalItems.value / pageSize))
|
||||||
|
|
||||||
const paginatedAddresses = computed(() => {
|
|
||||||
const start = (currentPage.value - 1) * pageSize
|
|
||||||
return filteredAddresses.value.slice(start, start + pageSize)
|
|
||||||
})
|
|
||||||
|
|
||||||
function getAddressById(id: number) {
|
function getAddressById(id: number) {
|
||||||
return addresses.value.find(addr => addr.id === id)
|
return addresses.value.find(addr => addr.id === id)
|
||||||
}
|
}
|
||||||
@@ -72,41 +68,6 @@ export const useAddressStore = defineStore('address', () => {
|
|||||||
return Math.max(0, ...addresses.value.map(a => a.id)) + 1
|
return Math.max(0, ...addresses.value.map(a => a.id)) + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function addAddress(formData: AddressFormData): Address {
|
|
||||||
const newAddress: Address = {
|
|
||||||
id: generateId(),
|
|
||||||
...normalize(formData)
|
|
||||||
}
|
|
||||||
|
|
||||||
addresses.value.unshift(newAddress)
|
|
||||||
resetPagination()
|
|
||||||
|
|
||||||
return newAddress
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateAddress(id: number, formData: AddressFormData): boolean {
|
|
||||||
const index = addresses.value.findIndex(a => a.id === id)
|
|
||||||
if (index === -1) return false
|
|
||||||
|
|
||||||
const existing = addresses.value[index]
|
|
||||||
if (!existing) return false
|
|
||||||
|
|
||||||
addresses.value[index] = {
|
|
||||||
id: existing.id,
|
|
||||||
...normalize(formData)
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
function deleteAddress(id: number): boolean {
|
|
||||||
const index = addresses.value.findIndex(a => a.id === id)
|
|
||||||
if (index === -1) return false
|
|
||||||
|
|
||||||
addresses.value.splice(index, 1)
|
|
||||||
resetPagination()
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
function setPage(page: number) {
|
function setPage(page: number) {
|
||||||
currentPage.value = page
|
currentPage.value = page
|
||||||
}
|
}
|
||||||
@@ -122,8 +83,123 @@ export const useAddressStore = defineStore('address', () => {
|
|||||||
|
|
||||||
initMockData()
|
initMockData()
|
||||||
|
|
||||||
|
const addresses = ref<Address[]>([])
|
||||||
|
const addressLoading = ref(false)
|
||||||
|
const addressError = ref<string | null>(null)
|
||||||
|
const addressSearchQuery = ref('')
|
||||||
|
const addressCurrentPage = ref(1)
|
||||||
|
const addressPageSize = 20
|
||||||
|
const addressTotalCount = ref(0)
|
||||||
|
|
||||||
|
function transformAddressResponse(address: any): Address {
|
||||||
|
const info = address.address_info || address.addressInfo || {}
|
||||||
|
|
||||||
|
return {
|
||||||
|
id: address.id ?? 0,
|
||||||
|
country_id: address.country_id ?? address.countryId ?? 1,
|
||||||
|
customer_id: address.customer_id ?? address.customerId ?? 0,
|
||||||
|
address_info: info as Record<string, string>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fetchAddresses() {
|
||||||
|
addressLoading.value = true
|
||||||
|
addressError.value = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
const queryParam = addressSearchQuery.value ? `&query=${encodeURIComponent(addressSearchQuery.value)}` : ''
|
||||||
|
const response = await useFetchJson<Address[]>(`/api/v1/restricted/addresses/retrieve-addresses?page=${addressCurrentPage.value}&elems=${addressPageSize}${queryParam}`)
|
||||||
|
addresses.value = response.items || []
|
||||||
|
addressTotalCount.value = response.count ?? addresses.value.length
|
||||||
|
} catch (error: unknown) {
|
||||||
|
addressError.value = error instanceof Error ? error.message : 'Failed to load addresses'
|
||||||
|
} finally {
|
||||||
|
addressLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addAddress(countryId: number, formData: AddressTemplate): Promise<Address | null> {
|
||||||
|
addressLoading.value = true
|
||||||
|
addressError.value = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await useFetchJson<any>(`/api/v1/restricted/addresses/add-new-address?country_id=${countryId}`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify(formData)
|
||||||
|
})
|
||||||
|
|
||||||
|
await fetchAddresses()
|
||||||
|
return transformAddressResponse(response.items ?? response)
|
||||||
|
} catch (error: unknown) {
|
||||||
|
addressError.value = error instanceof Error ? error.message : 'Failed to create address'
|
||||||
|
return null
|
||||||
|
} finally {
|
||||||
|
addressLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getAddressTemplate(countryId: number): Promise<AddressTemplate> {
|
||||||
|
const response = await useFetchJson<any>(`/api/v1/restricted/addresses/get-template?country_id=${countryId}`)
|
||||||
|
return response.items ?? {}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function updateAddress(id: number, countryId: number, formData: AddressTemplate): Promise<boolean> {
|
||||||
|
addressLoading.value = true
|
||||||
|
addressError.value = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
await useFetchJson<any>(`/api/v1/restricted/addresses/modify-address?country_id=${countryId}&address_id=${id}`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify(formData)
|
||||||
|
})
|
||||||
|
|
||||||
|
await fetchAddresses()
|
||||||
|
return true
|
||||||
|
} catch (error: unknown) {
|
||||||
|
addressError.value = error instanceof Error ? error.message : 'Failed to update address'
|
||||||
|
return false
|
||||||
|
} finally {
|
||||||
|
addressLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function deleteAddress(id: number): Promise<boolean> {
|
||||||
|
addressLoading.value = true
|
||||||
|
addressError.value = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
await useFetchJson<any>(`/api/v1/restricted/addresses/delete-address?address_id=${id}`, {
|
||||||
|
method: 'DELETE'
|
||||||
|
})
|
||||||
|
|
||||||
|
await fetchAddresses()
|
||||||
|
return true
|
||||||
|
} catch (error: unknown) {
|
||||||
|
addressError.value = error instanceof Error ? error.message : 'Failed to delete address'
|
||||||
|
return false
|
||||||
|
} finally {
|
||||||
|
addressLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const totalAddressItems = computed(() => addressTotalCount.value || addresses.value.length)
|
||||||
|
const totalAddressPages = computed(() => Math.ceil(totalAddressItems.value / addressPageSize))
|
||||||
|
|
||||||
|
const paginatedAddresses = computed(() => addresses.value)
|
||||||
|
|
||||||
|
function setAddressPage(page: number) {
|
||||||
|
addressCurrentPage.value = page
|
||||||
|
return fetchAddresses()
|
||||||
|
}
|
||||||
|
|
||||||
|
function setAddressSearchQuery(query: string) {
|
||||||
|
addressSearchQuery.value = query
|
||||||
|
addressCurrentPage.value = 1
|
||||||
|
return fetchAddresses()
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
addresses,
|
addresses,
|
||||||
loading,
|
loading,
|
||||||
error,
|
error,
|
||||||
currentPage,
|
currentPage,
|
||||||
@@ -139,6 +215,17 @@ export const useAddressStore = defineStore('address', () => {
|
|||||||
deleteAddress,
|
deleteAddress,
|
||||||
setPage,
|
setPage,
|
||||||
setSearchQuery,
|
setSearchQuery,
|
||||||
resetPagination
|
resetPagination,
|
||||||
|
addressLoading,
|
||||||
|
addressError,
|
||||||
|
addressSearchQuery,
|
||||||
|
addressCurrentPage,
|
||||||
|
addressPageSize,
|
||||||
|
totalAddressItems,
|
||||||
|
totalAddressPages,
|
||||||
|
fetchAddresses,
|
||||||
|
setAddressPage,
|
||||||
|
setAddressSearchQuery,
|
||||||
|
getAddressTemplate
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -41,122 +41,6 @@ export const useCartStore = defineStore('cart', () => {
|
|||||||
{ id: 3, name: 'Priority Delivery', price: 30, description: 'Next business day' }
|
{ id: 3, name: 'Priority Delivery', price: 30, description: 'Next business day' }
|
||||||
])
|
])
|
||||||
|
|
||||||
const addresses = ref<Address[]>([])
|
|
||||||
const addressLoading = ref(false)
|
|
||||||
const addressError = ref<string | null>(null)
|
|
||||||
const addressSearchQuery = ref('')
|
|
||||||
const addressCurrentPage = ref(1)
|
|
||||||
const addressPageSize = 20
|
|
||||||
const addressTotalCount = ref(0)
|
|
||||||
|
|
||||||
function transformAddressResponse(address: any): Address {
|
|
||||||
const info = address.address_info || address.addressInfo || {}
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: address.id ?? 0,
|
|
||||||
country_id: address.country_id ?? address.countryId ?? 1,
|
|
||||||
customer_id: address.customer_id ?? address.customerId ?? 0,
|
|
||||||
address_info: info as Record<string, string>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchAddresses() {
|
|
||||||
addressLoading.value = true
|
|
||||||
addressError.value = null
|
|
||||||
|
|
||||||
try {
|
|
||||||
const queryParam = addressSearchQuery.value ? `&query=${encodeURIComponent(addressSearchQuery.value)}` : ''
|
|
||||||
const response = await useFetchJson<Address[]>(`/api/v1/restricted/addresses/retrieve-addresses?page=${addressCurrentPage.value}&elems=${addressPageSize}${queryParam}`)
|
|
||||||
addresses.value = response.items || []
|
|
||||||
addressTotalCount.value = response.count ?? addresses.value.length
|
|
||||||
} catch (error: unknown) {
|
|
||||||
addressError.value = error instanceof Error ? error.message : 'Failed to load addresses'
|
|
||||||
} finally {
|
|
||||||
addressLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function addAddress(countryId: number, formData: AddressTemplate): Promise<Address | null> {
|
|
||||||
addressLoading.value = true
|
|
||||||
addressError.value = null
|
|
||||||
|
|
||||||
try {
|
|
||||||
const response = await useFetchJson<any>(`/api/v1/restricted/addresses/add-new-address?country_id=${countryId}`, {
|
|
||||||
method: 'POST',
|
|
||||||
body: JSON.stringify(formData)
|
|
||||||
})
|
|
||||||
|
|
||||||
await fetchAddresses()
|
|
||||||
return transformAddressResponse(response.items ?? response)
|
|
||||||
} catch (error: unknown) {
|
|
||||||
addressError.value = error instanceof Error ? error.message : 'Failed to create address'
|
|
||||||
return null
|
|
||||||
} finally {
|
|
||||||
addressLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getAddressTemplate(countryId: number): Promise<AddressTemplate> {
|
|
||||||
const response = await useFetchJson<any>(`/api/v1/restricted/addresses/get-template?country_id=${countryId}`)
|
|
||||||
return response.items ?? {}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function updateAddress(id: number, countryId: number, formData: AddressTemplate): Promise<boolean> {
|
|
||||||
addressLoading.value = true
|
|
||||||
addressError.value = null
|
|
||||||
|
|
||||||
try {
|
|
||||||
await useFetchJson<any>(`/api/v1/restricted/addresses/modify-address?country_id=${countryId}&address_id=${id}`, {
|
|
||||||
method: 'POST',
|
|
||||||
body: JSON.stringify(formData)
|
|
||||||
})
|
|
||||||
|
|
||||||
await fetchAddresses()
|
|
||||||
return true
|
|
||||||
} catch (error: unknown) {
|
|
||||||
addressError.value = error instanceof Error ? error.message : 'Failed to update address'
|
|
||||||
return false
|
|
||||||
} finally {
|
|
||||||
addressLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deleteAddress(id: number): Promise<boolean> {
|
|
||||||
addressLoading.value = true
|
|
||||||
addressError.value = null
|
|
||||||
|
|
||||||
try {
|
|
||||||
await useFetchJson<any>(`/api/v1/restricted/addresses/delete-address?address_id=${id}`, {
|
|
||||||
method: 'DELETE'
|
|
||||||
})
|
|
||||||
|
|
||||||
await fetchAddresses()
|
|
||||||
return true
|
|
||||||
} catch (error: unknown) {
|
|
||||||
addressError.value = error instanceof Error ? error.message : 'Failed to delete address'
|
|
||||||
return false
|
|
||||||
} finally {
|
|
||||||
addressLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const totalAddressItems = computed(() => addressTotalCount.value || addresses.value.length)
|
|
||||||
const totalAddressPages = computed(() => Math.ceil(totalAddressItems.value / addressPageSize))
|
|
||||||
|
|
||||||
const paginatedAddresses = computed(() => addresses.value)
|
|
||||||
|
|
||||||
function setAddressPage(page: number) {
|
|
||||||
addressCurrentPage.value = page
|
|
||||||
return fetchAddresses()
|
|
||||||
}
|
|
||||||
|
|
||||||
function setAddressSearchQuery(query: string) {
|
|
||||||
addressSearchQuery.value = query
|
|
||||||
addressCurrentPage.value = 1
|
|
||||||
return fetchAddresses()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function initMockData() {
|
function initMockData() {
|
||||||
items.value = [
|
items.value = [
|
||||||
{ id: 1, productId: 101, name: 'Premium Widget Pro', product_number: 'NC209/7000', image: '/img/product-1.jpg', price: 129.99, quantity: 2 },
|
{ id: 1, productId: 101, name: 'Premium Widget Pro', product_number: 'NC209/7000', image: '/img/product-1.jpg', price: 129.99, quantity: 2 },
|
||||||
@@ -250,22 +134,6 @@ export const useCartStore = defineStore('cart', () => {
|
|||||||
removeItem,
|
removeItem,
|
||||||
clearCart,
|
clearCart,
|
||||||
setSelectedAddress,
|
setSelectedAddress,
|
||||||
setDeliveryMethod,
|
setDeliveryMethod
|
||||||
addresses,
|
|
||||||
addressLoading,
|
|
||||||
addressError,
|
|
||||||
addressSearchQuery,
|
|
||||||
addressCurrentPage,
|
|
||||||
addressPageSize,
|
|
||||||
paginatedAddresses,
|
|
||||||
totalAddressItems,
|
|
||||||
totalAddressPages,
|
|
||||||
fetchAddresses,
|
|
||||||
addAddress,
|
|
||||||
updateAddress,
|
|
||||||
deleteAddress,
|
|
||||||
setAddressPage,
|
|
||||||
setAddressSearchQuery,
|
|
||||||
getAddressTemplate
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
<template>
|
|
||||||
<component :is="Default || 'div'">
|
|
||||||
<div class="container mt-24">
|
|
||||||
<div class="row">
|
|
||||||
<!-- <div class="col-12">
|
|
||||||
<h2 class="text-2xl">Category ID: {{ $route.params.category_id }}</h2>
|
|
||||||
<div v-for="(p, i) in products" :key="i">
|
|
||||||
<p>
|
|
||||||
<span class="border-b-1 bg-red-100 px-4">{{ p.name }}</span>
|
|
||||||
<span class="border-b-1 bg-red-100 px-4">{{ p.price }}</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</component>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
// import { useRoute } from 'vue-router';
|
|
||||||
import Default from '@/layouts/default.vue';
|
|
||||||
import { useCategoryStore } from '@/stores/admin/category';
|
|
||||||
import { ref, watch } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
// const route = useRoute()
|
|
||||||
// console.log(route);
|
|
||||||
|
|
||||||
const categoryStore = useCategoryStore()
|
|
||||||
const route = useRoute()
|
|
||||||
|
|
||||||
const products = ref([])
|
|
||||||
|
|
||||||
watch(() => route.params, async (n) => {
|
|
||||||
categoryStore.setCategoryID(parseInt(n.category_id as string))
|
|
||||||
const res = await categoryStore.getCategoryProducts()
|
|
||||||
// products.value = res
|
|
||||||
|
|
||||||
}, { immediate: true })
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
home View
|
||||||
home View
|
</template>
|
||||||
</component>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Default from '@/layouts/default.vue';
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -15,7 +15,6 @@ import { useAuthStore } from '@/stores/customer/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 Default from '@/layouts/default.vue'
|
|
||||||
|
|
||||||
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
|
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
|
||||||
|
|
||||||
@@ -182,8 +181,7 @@ const columns = computed<TableColumn<IssueTimeSummary>[]>(() => [
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
<div class="">
|
||||||
<div class="">
|
|
||||||
<div class="p-6 bg-(--main-light) dark:bg-(--black) font-sans">
|
<div class="p-6 bg-(--main-light) dark:bg-(--black) font-sans">
|
||||||
<h1 class="text-2xl font-bold mb-6 text-black dark:text-white">{{ $t('repo_chart.repository_work_chart') }}
|
<h1 class="text-2xl font-bold mb-6 text-black dark:text-white">{{ $t('repo_chart.repository_work_chart') }}
|
||||||
</h1>
|
</h1>
|
||||||
@@ -256,5 +254,4 @@ const columns = computed<TableColumn<IssueTimeSummary>[]>(() => [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</template>
|
||||||
</template>
|
|
||||||
@@ -7,6 +7,5 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
import StorageFileBrowser from '@/components/customer/StorageFileBrowser.vue'
|
import StorageFileBrowser from '@/components/customer/StorageFileBrowser.vue'
|
||||||
</script>
|
</script>
|
||||||
@@ -10,17 +10,6 @@ CREATE TABLE IF NOT EXISTS b2b_routes (
|
|||||||
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
-- INSERT IGNORE INTO b2b_routes
|
|
||||||
-- (name, path, component, meta, active)
|
|
||||||
-- VALUES
|
|
||||||
-- ('root', '', '', '{"trans": "route.root"}', 0),
|
|
||||||
-- ('home', '', '/views/HomeView.vue', '{"trans": "route.home"}', 1),
|
|
||||||
-- ('login', 'login', '/views/LoginView.vue', '{"guest":true}', 1),
|
|
||||||
-- ('register', 'register', '/views/RegisterView.vue', '{"guest":true}', 1),
|
|
||||||
-- ('password-recovery', 'password-recovery', '/views/PasswordRecoveryView.vue', '{"guest":true}', 1),
|
|
||||||
-- ('reset-password', 'reset-password', '/views/ResetPasswordView.vue', '{"guest":true}', 1),
|
|
||||||
-- ('verify-email', 'verify-email', '/views/VerifyEmailView.vue', '{"guest":true}', 1);
|
|
||||||
|
|
||||||
INSERT IGNORE INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES
|
INSERT IGNORE INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES
|
||||||
(1, 'root', '', '', '{"trans": "route.root"}', 0),
|
(1, 'root', '', '', '{"trans": "route.root"}', 0),
|
||||||
(2, 'home', '', '/views/HomeView.vue', '{"trans": "route.home"}', 1),
|
(2, 'home', '', '/views/HomeView.vue', '{"trans": "route.home"}', 1),
|
||||||
@@ -29,16 +18,59 @@ INSERT IGNORE INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `act
|
|||||||
(5, 'password-recovery', 'password-recovery', '/views/PasswordRecoveryView.vue', '{"guest":true}', 1),
|
(5, 'password-recovery', 'password-recovery', '/views/PasswordRecoveryView.vue', '{"guest":true}', 1),
|
||||||
(6, 'reset-password', 'reset-password', '/views/ResetPasswordForm.vue', '{"guest":true}', 1),
|
(6, 'reset-password', 'reset-password', '/views/ResetPasswordForm.vue', '{"guest":true}', 1),
|
||||||
(7, 'verify-email', 'verify-email', '/views/VerifyEmailView.vue', '{"guest":true}', 1),
|
(7, 'verify-email', 'verify-email', '/views/VerifyEmailView.vue', '{"guest":true}', 1),
|
||||||
(8, 'category', 'category/:category_id-:link_rewrite', '/views/CategoryView.vue', '{"guest":true}', 1),
|
|
||||||
(9, 'admin-products-category', 'products/:category_id-:link_rewrite', '/components/admin/PageProducts.vue', '{
|
(9, 'admin-products-category', 'products/:category_id-:link_rewrite', '/components/admin/PageProducts.vue', '{
|
||||||
"guest": true
|
"guest":true,
|
||||||
|
"name": "Products Category"
|
||||||
}', 1),
|
}', 1),
|
||||||
(10, 'customer-addresses', 'addresses', '/components/customer/PageAddresses.vue', '{"guest":true}', 1),
|
(10, 'customer-addresses', 'addresses', '/components/customer/PageAddresses.vue', '{
|
||||||
(11, 'customer-carts', 'carts', '/components/customer/PageCarts.vue', '{"guest":true}', 1),
|
"guest":true,
|
||||||
(12, 'customer-orders', 'orders', '/components/customer/PageOrders.vue', '{"guest":true}', 1),
|
"name": "Addresses"
|
||||||
(13, 'customer-statistic', 'statistic', '/components/customer/PageStatistic.vue', '{"guest":true}', 1),
|
}', 1),
|
||||||
(14, 'customer-product-details', 'products/:product_id/:link_rewrite', '/components/admin/ProductDetailView.vue', '{"guest":true}', 1),
|
(11, 'customer-cart', 'cart/:id', '/components/customer/PageCart.vue', '{
|
||||||
(15, 'admin-products', 'products', '/components/admin/PageProducts.vue', '{"guest":true}', 1);
|
"guest":true,
|
||||||
|
"name": "Cart"
|
||||||
|
}', 1),
|
||||||
|
(12, 'customer-orders', 'orders', '/components/customer/PageOrders.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "Order"
|
||||||
|
}', 1),
|
||||||
|
(13, 'customer-statistic', 'statistic', '/components/customer/PageStatistic.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "Statistic"
|
||||||
|
}
|
||||||
|
', 1),
|
||||||
|
(14, 'admin-product-details', 'products/:product_id', '/components/admin/ProductDetailView.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "Products"
|
||||||
|
}
|
||||||
|
', 1),
|
||||||
|
(15, 'admin-products', 'products', '/components/admin/PageProducts.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "Products"
|
||||||
|
}
|
||||||
|
', 1),
|
||||||
|
(16, 'admin-users-list', 'users-list', '/components/admin/UsersList.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "Client List"
|
||||||
|
}
|
||||||
|
', 1),
|
||||||
|
(17, 'customer-management-profile', ':user_id/profile', '/components/customer-management/Profile.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "Profile"
|
||||||
|
}
|
||||||
|
', 1),
|
||||||
|
(18, 'admin-users-search', 'users-search', '/components/admin/UsersSearch.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "Search Clients"
|
||||||
|
}
|
||||||
|
', 1),
|
||||||
|
(19, 'customer-storage-file', 'file-storage', '/components/customer/StorageFileBrowser.vue', '{
|
||||||
|
"guest":true,
|
||||||
|
"name": "File Storage"
|
||||||
|
}', 1),
|
||||||
|
(20, 'customer-products', 'products', '/components/customer/PageProducts.vue', '{ "guest":true, "name": "Products" }', 1),
|
||||||
|
(21, 'customer-product-details', 'products/:product_id', '/components/customer/PageProduct.vue', '{ "guest":true, "name": "Products" }', 1),
|
||||||
|
(22, 'customer-page-carts', 'carts', '/components/customer/PageCarts.vue', '{ "guest":true, "name": "Carts" }', 1);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS b2b_top_menu (
|
CREATE TABLE IF NOT EXISTS b2b_top_menu (
|
||||||
menu_id INT AUTO_INCREMENT NOT NULL,
|
menu_id INT AUTO_INCREMENT NOT NULL,
|
||||||
@@ -71,21 +103,6 @@ INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `a
|
|||||||
},
|
},
|
||||||
"icon" : "quill:list"
|
"icon" : "quill:list"
|
||||||
}', 1, '{"route":{"name":"admin-products","params":{"locale":""}}}', 1, 1),
|
}', 1, '{"route":{"name":"admin-products","params":{"locale":""}}}', 1, 1),
|
||||||
(3, '{
|
|
||||||
"name": "customer-carts",
|
|
||||||
"trans": {
|
|
||||||
"pl": {
|
|
||||||
"label": "Carts"
|
|
||||||
},
|
|
||||||
"en": {
|
|
||||||
"label": "Carts"
|
|
||||||
},
|
|
||||||
"de": {
|
|
||||||
"label": "Carts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"icon" : "proicons:cart"
|
|
||||||
}', 1, '{"route":{"name":"customer-carts","params":{"locale":""}}}', 1, 1),
|
|
||||||
(4, '{
|
(4, '{
|
||||||
"name": "customer-addresses",
|
"name": "customer-addresses",
|
||||||
"trans": {
|
"trans": {
|
||||||
@@ -138,7 +155,138 @@ INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}', 1, 1),
|
}', 1, 1),
|
||||||
(9, '{"name":"carts","trans":{"pl":{"label":"Koszyki"},"en":{"label":"Carts"},"de":{"label":"Warenkörbe"}}}', 3, '{"route":{"name":"home","params":{"locale":""}}}', 1, 1);
|
(10, '{
|
||||||
|
"name": "customer-storage-file",
|
||||||
|
"trans": {
|
||||||
|
"pl": {
|
||||||
|
"label": "File Storage"
|
||||||
|
},
|
||||||
|
"en": {
|
||||||
|
"label": "File Storage"
|
||||||
|
},
|
||||||
|
"de": {
|
||||||
|
"label": "File Storage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": "carbon:volume-file-storage"
|
||||||
|
}', 1, '{
|
||||||
|
"route": {
|
||||||
|
"name": "customer-storage-file",
|
||||||
|
"params": {
|
||||||
|
"locale": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}', 1, 1),
|
||||||
|
(12, '{
|
||||||
|
"name": "admin-users-list",
|
||||||
|
"trans": {
|
||||||
|
"pl": {
|
||||||
|
"label": "Client List"
|
||||||
|
},
|
||||||
|
"en": {
|
||||||
|
"label": "Client List"
|
||||||
|
},
|
||||||
|
"de": {
|
||||||
|
"label": "Client List"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": "tdesign:user-list"
|
||||||
|
}', 1, '{
|
||||||
|
"route": {
|
||||||
|
"name": "admin-users-list",
|
||||||
|
"params": {
|
||||||
|
"locale": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}', 1, 1),
|
||||||
|
(13, '{
|
||||||
|
"name": "admin-users-search",
|
||||||
|
"trans": {
|
||||||
|
"pl": {
|
||||||
|
"label": "Search Clients"
|
||||||
|
},
|
||||||
|
"en": {
|
||||||
|
"label": "Search Clients"
|
||||||
|
},
|
||||||
|
"de": {
|
||||||
|
"label": "Search Clients"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": "material-symbols:search"
|
||||||
|
}', 1, '{
|
||||||
|
"route": {
|
||||||
|
"name": "admin-users-search",
|
||||||
|
"params": {
|
||||||
|
"locale": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}', 1, 1),
|
||||||
|
(14, '{
|
||||||
|
"name": "customer-management-profile",
|
||||||
|
"trans": {
|
||||||
|
"pl": {
|
||||||
|
"label": "Profile"
|
||||||
|
},
|
||||||
|
"en": {
|
||||||
|
"label": "Profile"
|
||||||
|
},
|
||||||
|
"de": {
|
||||||
|
"label": "Profile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": "akar-icons:statistic-up"
|
||||||
|
}', 1, '{
|
||||||
|
"route": {
|
||||||
|
"name": "customer-management-profile",
|
||||||
|
"params": {
|
||||||
|
"locale": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}', 1, 1),
|
||||||
|
(15, '{
|
||||||
|
"name": "customer-products",
|
||||||
|
"trans": {
|
||||||
|
"pl": {
|
||||||
|
"label": "Products"
|
||||||
|
},
|
||||||
|
"en": {
|
||||||
|
"label": "Products"
|
||||||
|
},
|
||||||
|
"de": {
|
||||||
|
"label": "Products"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": "akar-icons:statistic-up"
|
||||||
|
}', 1, '{
|
||||||
|
"route": {
|
||||||
|
"name": "customer-products",
|
||||||
|
"params": {
|
||||||
|
"locale": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}', 1, 1),
|
||||||
|
(16, '{
|
||||||
|
"name": "customer-page-carts",
|
||||||
|
"trans": {
|
||||||
|
"pl": {
|
||||||
|
"label": "Carts"
|
||||||
|
},
|
||||||
|
"en": {
|
||||||
|
"label": "Carts"
|
||||||
|
},
|
||||||
|
"de": {
|
||||||
|
"label": "Carts"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": "proicons:cart1"
|
||||||
|
}', 1, '{
|
||||||
|
"route": {
|
||||||
|
"name": "customer-page-carts",
|
||||||
|
"params": {
|
||||||
|
"locale": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}', 1, 1);
|
||||||
|
|
||||||
|
|
||||||
-- +goose Down
|
-- +goose Down
|
||||||
|
|||||||
@@ -95,5 +95,24 @@ INSERT INTO `b2b_route_roles` (`route_id`, `role_id`) VALUES
|
|||||||
(7, '1'),
|
(7, '1'),
|
||||||
(7, '2'),
|
(7, '2'),
|
||||||
(7, '3'),
|
(7, '3'),
|
||||||
(7, '4');
|
(7, '4'),
|
||||||
|
(9, '2'),
|
||||||
|
(9, '3'),
|
||||||
|
(10, '1'),
|
||||||
|
(11, '1'),
|
||||||
|
(12, '1'),
|
||||||
|
(13, '1'),
|
||||||
|
(14, '2'),
|
||||||
|
(14, '3'),
|
||||||
|
(15, '2'),
|
||||||
|
(15, '3'),
|
||||||
|
(16, '2'),
|
||||||
|
(16, '3'),
|
||||||
|
(17, '1'),
|
||||||
|
(18, '2'),
|
||||||
|
(18, '3'),
|
||||||
|
(19, '1'),
|
||||||
|
(20, '1'),
|
||||||
|
(21, '1'),
|
||||||
|
(22, '1');
|
||||||
-- +goose Down
|
-- +goose Down
|
||||||
Reference in New Issue
Block a user