fix routing
This commit is contained in:
@@ -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