fix routing
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
|||||||
ClipboardListIcon,
|
ClipboardListIcon,
|
||||||
BankIcon,
|
BankIcon,
|
||||||
PackageMoving01Icon,
|
PackageMoving01Icon,
|
||||||
|
Settings01Icon,
|
||||||
} from '@hugeicons/core-free-icons'
|
} from '@hugeicons/core-free-icons'
|
||||||
|
|
||||||
export interface NavItem {
|
export interface NavItem {
|
||||||
@@ -49,6 +50,13 @@ export const DASHBOARD_ITEM: NavItem = {
|
|||||||
icon: DashboardSquare01Icon,
|
icon: DashboardSquare01Icon,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Standalone item rendered at the bottom — links straight to the page, no sub-nav
|
||||||
|
export const CONFIGURATION_ITEM: NavItem = {
|
||||||
|
title: 'Configuration',
|
||||||
|
href: '/configuration',
|
||||||
|
icon: Settings01Icon,
|
||||||
|
}
|
||||||
|
|
||||||
export const NAV_GROUPS: NavGroup[] = [
|
export const NAV_GROUPS: NavGroup[] = [
|
||||||
{
|
{
|
||||||
title: 'Shop POs & Invoices',
|
title: 'Shop POs & Invoices',
|
||||||
@@ -80,7 +88,7 @@ export const NAV_GROUPS: NavGroup[] = [
|
|||||||
title: 'Catalogue',
|
title: 'Catalogue',
|
||||||
icon: CatalogueIcon,
|
icon: CatalogueIcon,
|
||||||
items: [
|
items: [
|
||||||
{ title: 'Items', href: '/catalogue/items', icon: Package01Icon, description: 'Products available for sale and distribution', permission: 'items.view' },
|
{ title: 'Products', href: '/catalogue/items', icon: Package01Icon, description: 'Products available for sale and distribution', permission: 'items.view' },
|
||||||
{ title: 'Categories', href: '/catalogue/categories', icon: CatalogueIcon, description: 'Product groupings and sub-categories', permission: 'categories.view' },
|
{ title: 'Categories', href: '/catalogue/categories', icon: CatalogueIcon, description: 'Product groupings and sub-categories', permission: 'categories.view' },
|
||||||
{ title: 'Brands', href: '/catalogue/brands', icon: BarCode01Icon, description: 'Brands associated with catalogue items', permission: 'categories.view' },
|
{ title: 'Brands', href: '/catalogue/brands', icon: BarCode01Icon, description: 'Brands associated with catalogue items', permission: 'categories.view' },
|
||||||
// { title: 'UOMs', href: '/catalogue/uoms', icon: Layers01Icon, description: 'Units of measure and conversion factors between units', permission: 'categories.view' },
|
// { title: 'UOMs', href: '/catalogue/uoms', icon: Layers01Icon, description: 'Units of measure and conversion factors between units', permission: 'categories.view' },
|
||||||
@@ -162,5 +170,5 @@ export const BOTTOM_NAV_CANDIDATES: NavItem[] = [
|
|||||||
{ title: 'Rides', href: '/operations/rides', icon: TruckIcon, permission: 'rides.view' },
|
{ title: 'Rides', href: '/operations/rides', icon: TruckIcon, permission: 'rides.view' },
|
||||||
{ title: 'Loading', href: '/operations/loading', icon: DeliveryBox01Icon, permission: 'loading.view' },
|
{ title: 'Loading', href: '/operations/loading', icon: DeliveryBox01Icon, permission: 'loading.view' },
|
||||||
{ title: 'Shop POs', href: '/sales', icon: ClipboardListIcon, permission: 'orders.view' },
|
{ title: 'Shop POs', href: '/sales', icon: ClipboardListIcon, permission: 'orders.view' },
|
||||||
{ title: 'Items', href: '/catalogue/items', icon: Package01Icon, permission: 'items.view' },
|
{ title: 'Products', href: '/catalogue/items', icon: Package01Icon, permission: 'items.view' },
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -28,6 +28,13 @@ export interface ItemBody {
|
|||||||
brandId?: string | null
|
brandId?: string | null
|
||||||
baseUomId: string
|
baseUomId: string
|
||||||
salePrice: number
|
salePrice: number
|
||||||
|
reorderLevel?: number | null
|
||||||
|
tracksSerialNumbers?: boolean
|
||||||
|
tracksBatches?: boolean
|
||||||
|
tracksExpiryDate?: boolean
|
||||||
|
hasWarranty?: boolean
|
||||||
|
warrantyPeriodDays?: number | null
|
||||||
|
allowCustomWarrantyPeriod?: boolean
|
||||||
syncSource?: SyncSource
|
syncSource?: SyncSource
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export { rides, loadingSheets, deliveryTasks } from './operations'
|
|||||||
export { stock } from './stock'
|
export { stock } from './stock'
|
||||||
export { shopPos, invoices, payments } from './sales'
|
export { shopPos, invoices, payments } from './sales'
|
||||||
export { saleReturns, claims, supplierClaims } from './returns-claims'
|
export { saleReturns, claims, supplierClaims } from './returns-claims'
|
||||||
|
export { sysConfig, ITEM_TRACKING_KEYS } from './sys-config'
|
||||||
export { getPaginatedItems } from './paginated'
|
export { getPaginatedItems } from './paginated'
|
||||||
|
|
||||||
export type { PageParams } from './master'
|
export type { PageParams } from './master'
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { api } from '@/lib/api'
|
||||||
|
import type { SysConfigResponse } from '@/types/api'
|
||||||
|
|
||||||
|
// ─── Item tracking feature keys (must match Distribution.Features.SysConfig.SysConfigService) ──
|
||||||
|
|
||||||
|
export const ITEM_TRACKING_KEYS = {
|
||||||
|
serialNumberTracking: 'Feature.SerialNumberTracking',
|
||||||
|
batchTracking: 'Feature.BatchTracking',
|
||||||
|
expiryDateTracking: 'Feature.ExpiryDateTracking',
|
||||||
|
warrantyTracking: 'Feature.WarrantyTracking',
|
||||||
|
customWarrantyOverride: 'Feature.CustomWarrantyOverride',
|
||||||
|
defaultWarrantyPeriodDays: 'Feature.DefaultWarrantyPeriodDays',
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export const sysConfig = {
|
||||||
|
getAll: () =>
|
||||||
|
api.get<SysConfigResponse[]>('/sys-config').then(r => r.data),
|
||||||
|
|
||||||
|
get: (key: string) =>
|
||||||
|
api.get<SysConfigResponse>(`/sys-config/${key}`).then(r => r.data),
|
||||||
|
|
||||||
|
set: (key: string, value: string, userId?: string | null) =>
|
||||||
|
api.put<SysConfigResponse>(`/sys-config/${key}`, { value, userId }).then(r => r.data),
|
||||||
|
}
|
||||||
@@ -282,6 +282,13 @@ export interface ItemSummaryResponse {
|
|||||||
baseUomId: string
|
baseUomId: string
|
||||||
baseUomName: string
|
baseUomName: string
|
||||||
salePrice: number
|
salePrice: number
|
||||||
|
reorderLevel: number | null
|
||||||
|
tracksSerialNumbers: boolean
|
||||||
|
tracksBatches: boolean
|
||||||
|
tracksExpiryDate: boolean
|
||||||
|
hasWarranty: boolean
|
||||||
|
warrantyPeriodDays: number | null
|
||||||
|
allowCustomWarrantyPeriod: boolean
|
||||||
syncSource: SyncSource
|
syncSource: SyncSource
|
||||||
isActive: boolean
|
isActive: boolean
|
||||||
createdAt: string
|
createdAt: string
|
||||||
|
|||||||
Reference in New Issue
Block a user