fix routing
This commit is contained in:
@@ -28,6 +28,13 @@ export interface ItemBody {
|
||||
brandId?: string | null
|
||||
baseUomId: string
|
||||
salePrice: number
|
||||
reorderLevel?: number | null
|
||||
tracksSerialNumbers?: boolean
|
||||
tracksBatches?: boolean
|
||||
tracksExpiryDate?: boolean
|
||||
hasWarranty?: boolean
|
||||
warrantyPeriodDays?: number | null
|
||||
allowCustomWarrantyPeriod?: boolean
|
||||
syncSource?: SyncSource
|
||||
isActive?: boolean
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ export { rides, loadingSheets, deliveryTasks } from './operations'
|
||||
export { stock } from './stock'
|
||||
export { shopPos, invoices, payments } from './sales'
|
||||
export { saleReturns, claims, supplierClaims } from './returns-claims'
|
||||
export { sysConfig, ITEM_TRACKING_KEYS } from './sys-config'
|
||||
export { getPaginatedItems } from './paginated'
|
||||
|
||||
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),
|
||||
}
|
||||
Reference in New Issue
Block a user