fix: migrations
This commit is contained in:
@@ -28,7 +28,7 @@ tmp_dir = "tmp"
|
||||
rerun = false
|
||||
rerun_delay = 500
|
||||
send_interrupt = false
|
||||
stop_on_error = false
|
||||
stop_on_error = true
|
||||
|
||||
[color]
|
||||
app = ""
|
||||
|
||||
@@ -153,6 +153,6 @@ func (s *EmailService) newUserAdminNotificationTemplate(userEmail, userName, bas
|
||||
// newUserAdminNotificationTemplate returns the HTML template for admin notification
|
||||
func (s *EmailService) newOrderPlacedTemplate(userID uint) string {
|
||||
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()
|
||||
}
|
||||
|
||||
2
bo/components.d.ts
vendored
2
bo/components.d.ts
vendored
@@ -11,7 +11,6 @@ export {}
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
ButtonGoToProfile: typeof import('./src/components/customer-management/ButtonGoToProfile.vue')['default']
|
||||
CartDetails: typeof import('./src/components/customer/CartDetails.vue')['default']
|
||||
CategoryMenu: typeof import('./src/components/inner/CategoryMenu.vue')['default']
|
||||
copy: typeof import('./src/components/admin/ProductDetailView copy.vue')['default']
|
||||
@@ -45,7 +44,6 @@ declare module 'vue' {
|
||||
TopBar: typeof import('./src/components/TopBar.vue')['default']
|
||||
TopBarLogin: typeof import('./src/components/TopBarLogin.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']
|
||||
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']
|
||||
UCheckbox: typeof import('./node_modules/@nuxt/ui/dist/runtime/components/Checkbox.vue')['default']
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
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'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const route = useRoute()
|
||||
const layout = computed(() => (route.meta.layout as string) || 'default')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Suspense>
|
||||
<TooltipProvider>
|
||||
<RouterView />
|
||||
<component :is="layout === 'empty' ? EmptyLayout : layout === 'management' ? ManagementLayout : DefaultLayout">
|
||||
<RouterView v-slot="{ Component }">
|
||||
<component :is="Component" />
|
||||
</RouterView>
|
||||
</component>
|
||||
</TooltipProvider>
|
||||
</Suspense>
|
||||
</template>
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Default from '@/layouts/default.vue';
|
||||
|
||||
</script>
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="flex flex-col md:flex-row gap-10">
|
||||
<CategoryMenu />
|
||||
<div class="w-full flex flex-col items-center gap-4">
|
||||
@@ -9,13 +8,11 @@
|
||||
<UPagination v-model:page="page" :total="total" :items-per-page="perPage" />
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, h, resolveComponent, computed } from 'vue'
|
||||
import { useFetchJson } from '@/composable/useFetchJson'
|
||||
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,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<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)" />
|
||||
<p class="cursor-pointer text-(--text-sky-light) dark:text-(--text-sky-dark)" @click="backFromProduct()">
|
||||
@@ -190,12 +189,10 @@
|
||||
</UTabs>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useEditable } from '@/composable/useConteditable';
|
||||
import Default from '@/layouts/default.vue';
|
||||
import { langs } from '@/router/langs';
|
||||
import { useProductStore } from '@/stores/product';
|
||||
import { useSettingsStore } from '@/stores/admin/settings';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<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)" />
|
||||
<p class="cursor-pointer text-(--text-sky-light) dark:text-(--text-sky-dark)" @click="backFromProduct()">
|
||||
@@ -154,11 +153,9 @@
|
||||
</div>
|
||||
<div class=""></div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Default from '@/layouts/default.vue';
|
||||
import { langs } from '@/router/langs';
|
||||
import { useProductStore } from '@/stores/admin/product';
|
||||
import { useSettingsStore } from '@/stores/admin/settings';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="flex flex-col md:flex-row gap-10">
|
||||
<div class="w-full flex flex-col items-center gap-4">
|
||||
<UTable :data="usersList" :columns="columns" class="flex-1 w-full"
|
||||
@@ -7,11 +6,9 @@
|
||||
<UPagination v-model:page="page" :total="total" :items-per-page="perPage" />
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Default from '@/layouts/default.vue'
|
||||
import { ref, computed, watch, resolveComponent, h } from 'vue'
|
||||
import { useFetchJson } from '@/composable/useFetchJson'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default">
|
||||
<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>
|
||||
|
||||
@@ -18,12 +17,10 @@
|
||||
No users found with that name or ID
|
||||
</p>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, resolveComponent, h } from 'vue'
|
||||
import Default from '@/layouts/default.vue';
|
||||
import type { TableColumn } from '@nuxt/ui';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useFetchJson } from '@/composable/useFetchJson';
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<template>
|
||||
<component :is="Management || 'div'">
|
||||
<div>customer-management</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import Management from '@/layouts/management.vue';
|
||||
|
||||
</script>
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<h2
|
||||
class="font-semibold text-black dark:text-white pb-6 text-2xl">
|
||||
@@ -48,7 +47,6 @@
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -56,7 +54,6 @@ 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,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<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>
|
||||
@@ -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>
|
||||
|
||||
<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,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<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">
|
||||
@@ -147,7 +146,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -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>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Default from '@/layouts/default.vue'
|
||||
</script>
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<div class="flex md:flex-row flex-col justify-between gap-8 my-6">
|
||||
<div class="flex-1">
|
||||
@@ -79,14 +78,12 @@
|
||||
<hr class="border-t border-(--border-light) dark:border-(--border-dark) mb-8" />
|
||||
<ProductVariants />
|
||||
</div>
|
||||
</component>
|
||||
</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,6 +1,5 @@
|
||||
<template>
|
||||
<suspense>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<!-- <UNavigationMenu orientation="vertical" :items="listing" class="data-[orientation=vertical]:w-48">
|
||||
<template #item="{ item, active }">
|
||||
@@ -39,13 +38,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</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,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<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,7 +96,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -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,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<div class="max-w-2xl mx-auto">
|
||||
<div class="flex flex-col gap-5 mb-6">
|
||||
@@ -109,7 +108,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -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>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Default from '@/layouts/default.vue'
|
||||
</script>
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="p-4">
|
||||
<div v-if="loading" class="flex justify-center py-8">
|
||||
<ULoader />
|
||||
@@ -25,13 +24,11 @@
|
||||
</template>
|
||||
</UTree>
|
||||
</div>
|
||||
</component>
|
||||
</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
|
||||
|
||||
@@ -180,7 +180,6 @@ const router = useRouter()
|
||||
const menu = ref<TopMenuItem[] | null>(null)
|
||||
|
||||
const Id = Number(route.params.user_id)
|
||||
|
||||
async function cmGetTopMenu() {
|
||||
try {
|
||||
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(
|
||||
() => route.params.user_id,
|
||||
() => {
|
||||
|
||||
@@ -13,13 +13,30 @@ await getSettings()
|
||||
|
||||
const routes = await getRoutes()
|
||||
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) {
|
||||
const component = () => import(/* @vite-ignore */ `..${r.component}`)
|
||||
const parsedMeta = r.meta ? JSON.parse(r.meta) : {}
|
||||
const layout = parsedMeta.layout ?? getLayoutFromComponent(r.component)
|
||||
newRoutes.push({
|
||||
path: r.path,
|
||||
component,
|
||||
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 parsedMeta = item.meta ? JSON.parse(item.meta) : {}
|
||||
const layout = parsedMeta.layout ?? getLayoutFromComponent(item.component)
|
||||
|
||||
router.addRoute('locale', {
|
||||
path: item.path,
|
||||
component: importedComponent,
|
||||
name: item.name,
|
||||
meta: item.meta ? JSON.parse(item.meta) : {}
|
||||
meta: {
|
||||
...parsedMeta,
|
||||
layout,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
console.log(router);
|
||||
// await router.replace(router.currentRoute.value.fullPath)
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
<component :is="Default || 'div'">
|
||||
home View
|
||||
</component>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Default from '@/layouts/default.vue';
|
||||
|
||||
</script>
|
||||
@@ -15,7 +15,6 @@ import { useAuthStore } from '@/stores/customer/auth'
|
||||
import { i18n } from '@/plugins/02_i18n'
|
||||
import type { TableColumn } from '@nuxt/ui'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import Default from '@/layouts/default.vue'
|
||||
|
||||
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
|
||||
|
||||
@@ -182,7 +181,6 @@ const columns = computed<TableColumn<IssueTimeSummary>[]>(() => [
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div class="">
|
||||
<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') }}
|
||||
@@ -256,5 +254,4 @@ const columns = computed<TableColumn<IssueTimeSummary>[]>(() => [
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
@@ -7,6 +7,5 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Default from '@/layouts/default.vue'
|
||||
import StorageFileBrowser from '@/components/customer/StorageFileBrowser.vue'
|
||||
</script>
|
||||
@@ -10,17 +10,6 @@ CREATE TABLE IF NOT EXISTS b2b_routes (
|
||||
|
||||
) 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
|
||||
(1, 'root', '', '', '{"trans": "route.root"}', 0),
|
||||
(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),
|
||||
(6, 'reset-password', 'reset-password', '/views/ResetPasswordForm.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', '{
|
||||
"guest": true
|
||||
"guest":true,
|
||||
"name": "Products Category"
|
||||
}', 1),
|
||||
(10, 'customer-addresses', 'addresses', '/components/customer/PageAddresses.vue', '{"guest":true}', 1),
|
||||
(11, 'customer-carts', 'carts', '/components/customer/PageCarts.vue', '{"guest":true}', 1),
|
||||
(12, 'customer-orders', 'orders', '/components/customer/PageOrders.vue', '{"guest":true}', 1),
|
||||
(13, 'customer-statistic', 'statistic', '/components/customer/PageStatistic.vue', '{"guest":true}', 1),
|
||||
(14, 'customer-product-details', 'products/:product_id/:link_rewrite', '/components/admin/ProductDetailView.vue', '{"guest":true}', 1),
|
||||
(15, 'admin-products', 'products', '/components/admin/PageProducts.vue', '{"guest":true}', 1);
|
||||
(10, 'customer-addresses', 'addresses', '/components/customer/PageAddresses.vue', '{
|
||||
"guest":true,
|
||||
"name": "Addresses"
|
||||
}', 1),
|
||||
(11, 'customer-cart', 'cart/:id', '/components/customer/PageCart.vue', '{
|
||||
"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 (
|
||||
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"
|
||||
}', 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, '{
|
||||
"name": "customer-addresses",
|
||||
"trans": {
|
||||
@@ -138,7 +155,138 @@ INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `a
|
||||
}
|
||||
}
|
||||
}', 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
|
||||
|
||||
@@ -95,5 +95,24 @@ INSERT INTO `b2b_route_roles` (`route_id`, `role_id`) VALUES
|
||||
(7, '1'),
|
||||
(7, '2'),
|
||||
(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
|
||||
Reference in New Issue
Block a user