diff --git a/src/components.d.ts b/src/components.d.ts index 94eb764..f0eb139 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -26,13 +26,12 @@ declare module 'vue' { Navbar: typeof import('./components/Navbar.vue')['default'] NBadge: typeof import('naive-ui')['NBadge'] NButton: typeof import('naive-ui')['NButton'] - NCard: typeof import('naive-ui')['NCard'] + NColorPicker: typeof import('naive-ui')['NColorPicker'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NDataTable: typeof import('naive-ui')['NDataTable'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDrawer: typeof import('naive-ui')['NDrawer'] NDrawerContent: typeof import('naive-ui')['NDrawerContent'] - NDynamicTags: typeof import('naive-ui')['NDynamicTags'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NIcon: typeof import('naive-ui')['NIcon'] @@ -42,15 +41,10 @@ declare module 'vue' { NLayoutSider: typeof import('naive-ui')['NLayoutSider'] NMenu: typeof import('naive-ui')['NMenu'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] - NModal: typeof import('naive-ui')['NModal'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] NPageHeader: typeof import('naive-ui')['NPageHeader'] NPopselect: typeof import('naive-ui')['NPopselect'] - NSelect: typeof import('naive-ui')['NSelect'] NSpace: typeof import('naive-ui')['NSpace'] - NSwitch: typeof import('naive-ui')['NSwitch'] - NTreeSelect: typeof import('naive-ui')['NTreeSelect'] - NUpload: typeof import('naive-ui')['NUpload'] OrderManagement: typeof import('./components/Orders/OrderManagement.vue')['default'] ProductsManagement: typeof import('./components/Products/ProductsManagement.vue')['default'] ReviewManagement: typeof import('./components/Review/ReviewManagement.vue')['default'] diff --git a/src/mocks/handlers/color.handler.ts b/src/mocks/handlers/color.handler.ts index 8cc40e6..a8e610d 100644 --- a/src/mocks/handlers/color.handler.ts +++ b/src/mocks/handlers/color.handler.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker' import { CreatePagedResponse } from '../handlers.utility' import type { Color, ColorCreateModel } from '~/models/Color' -const colors = _.times(7, createFakeColor) +const colors = _.times(17, createFakeColor) const handlers = [ http.get('/api/Color', ({ request }) => { const response = CreatePagedResponse(request, colors) diff --git a/src/store/brand.store.ts b/src/store/brand.store.ts index f7f7769..cddb866 100644 --- a/src/store/brand.store.ts +++ b/src/store/brand.store.ts @@ -17,7 +17,7 @@ export const useBrandStore = defineStore('Brand', () => { try { const response = await brandService.getList(options) brands.value = response.items - options.pageSize = Math.trunc(response.totalCount / options.itemsPerPage) + options.pageCount = Math.ceil(response.totalCount / options.itemsPerPage) } finally { isLoading.value = false diff --git a/src/store/category.store.ts b/src/store/category.store.ts index 979e6f4..5a42001 100644 --- a/src/store/category.store.ts +++ b/src/store/category.store.ts @@ -15,7 +15,7 @@ export const useCategoryStore = defineStore('Category', () => { try { const response = await categoryService.getList(options) categories.value = response.items - options.pageSize = Math.trunc(response.totalCount / options.itemsPerPage) + options.pageCount = Math.ceil(response.totalCount / options.itemsPerPage) } finally { isLoading.value = false diff --git a/src/store/color.store.ts b/src/store/color.store.ts index 5e55755..41af284 100644 --- a/src/store/color.store.ts +++ b/src/store/color.store.ts @@ -17,7 +17,7 @@ export const useColorStore = defineStore('Color', () => { try { const response = await colorService.getList(options) colors.value = response.items - options.pageSize = Math.trunc(response.totalCount / options.itemsPerPage) + options.pageCount = Math.ceil(response.totalCount / options.pageSize) } finally { isLoading.value = false diff --git a/src/store/customer.store.ts b/src/store/customer.store.ts index b01c6f7..e3ab5c3 100644 --- a/src/store/customer.store.ts +++ b/src/store/customer.store.ts @@ -18,7 +18,7 @@ export const useCustomerStore = defineStore('Customer', () => { try { const response = await customerService.getList(options) customers.value = response.items - options.pageSize = Math.trunc(response.totalCount / options.itemsPerPage) + options.pageCount = Math.ceil(response.totalCount / options.itemsPerPage) } finally { isLoading.value = false diff --git a/src/store/order.store.ts b/src/store/order.store.ts index 623ce64..86d0abc 100644 --- a/src/store/order.store.ts +++ b/src/store/order.store.ts @@ -14,7 +14,7 @@ export const useOrderStore = defineStore('Order', () => { try { const response = await orderService.getOrderList(options) orders.value = response.items - options.pageSize = Math.trunc(response.totalCount / options.itemsPerPage) + options.pageCount = Math.ceil(response.totalCount / options.itemsPerPage) } finally { isLoading.value = false diff --git a/src/store/product.store.ts b/src/store/product.store.ts index 9cb0164..009d304 100644 --- a/src/store/product.store.ts +++ b/src/store/product.store.ts @@ -15,7 +15,7 @@ export const useProductStore = defineStore('Product', () => { try { const response = await productService.getList(options) products.value = response.items - options.pageSize = Math.trunc(response.totalCount / options.itemsPerPage) + options.pageCount = Math.ceil(response.totalCount / options.itemsPerPage) } finally { isLoading.value = false diff --git a/src/store/review.store.ts b/src/store/review.store.ts index a41ee32..9dffb6f 100644 --- a/src/store/review.store.ts +++ b/src/store/review.store.ts @@ -19,7 +19,7 @@ export const useReviewStore = defineStore('Review', () => { try { const response = await reviewService.getReviewList(options) reviews.value = response.items - options.pageSize = Math.trunc(response.totalCount / options.itemsPerPage) + options.pageCount = Math.ceil(response.totalCount / options.itemsPerPage) } finally { isLoading.value = false