fix: store customer-product
This commit is contained in:
12
bo/src/components/admin/FavoriteProducts.vue
Normal file
12
bo/src/components/admin/FavoriteProducts.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<component :is="Default || 'div'">
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Default from '@/layouts/default.vue';
|
||||
|
||||
</script>
|
||||
@@ -141,7 +141,7 @@ async function fetchProductList() {
|
||||
if (route.params.category_id)
|
||||
params.append('category_id', String(route.params.category_id))
|
||||
|
||||
const url = `/api/v1/restricted/list/list-products?elems=${perPage.value}&${params.toString()}`
|
||||
const url = `/api/v1/restricted/product/list?elems=${perPage.value}&${params.toString()}`
|
||||
try {
|
||||
const response = await useFetchJson<ApiResponse>(url)
|
||||
productsList.value = response.items || []
|
||||
@@ -161,7 +161,7 @@ function goToProduct(productId: number, linkRewrite: string) {
|
||||
}
|
||||
localStorage.setItem('back_from_product', JSON.stringify(path))
|
||||
router.push({
|
||||
name: 'customer-product-details',
|
||||
name: 'admin-product-details',
|
||||
params: { product_id: productId, link_rewrite: linkRewrite }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<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">
|
||||
<UTable :data="usersList" :columns="columns" class="flex-1 w-full"
|
||||
:ui="{ root: 'max-w-100wv overflow-auto!' }" />
|
||||
@@ -194,7 +193,7 @@ const columns: TableColumn<Customer>[] = [
|
||||
cell: ({ row }) => {
|
||||
const userId = row.original.user_id
|
||||
return h(UButton, {
|
||||
color: 'primary',
|
||||
color: 'info',
|
||||
size: 'sm',
|
||||
variant: 'soft',
|
||||
onClick: () => {
|
||||
|
||||
@@ -222,7 +222,7 @@ const columns: TableColumn<Customer>[] = [
|
||||
cell: ({ row }) => {
|
||||
const userId = row.original.user_id
|
||||
return h(UButton, {
|
||||
color: 'primary',
|
||||
color: 'info',
|
||||
size: 'sm',
|
||||
variant: 'soft',
|
||||
onClick: () => {
|
||||
|
||||
Reference in New Issue
Block a user