mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 16:28:12 +00:00
Merge freight/develop
This commit is contained in:
@@ -17,20 +17,9 @@ export const QUERY_KEYS = {
|
||||
LIST: "list",
|
||||
BY_ID: "by-id"
|
||||
},
|
||||
// constants/queryKeys.ts - Add these keys
|
||||
|
||||
rateMatrix: {
|
||||
all: ['rate-matrices'] as const,
|
||||
lists: () => [...QUERY_KEYS.rateMatrix.all, 'list'] as const,
|
||||
list: (filters: Record<string, unknown>) => [...QUERY_KEYS.rateMatrix.lists(), filters] as const,
|
||||
details: () => [...QUERY_KEYS.rateMatrix.all, 'detail'] as const,
|
||||
detail: (id: string) => [...QUERY_KEYS.rateMatrix.details(), id] as const,
|
||||
},
|
||||
referenceData: {
|
||||
all: ['reference-data'] as const,
|
||||
ports: () => [...QUERY_KEYS.referenceData.all, 'ports'] as const,
|
||||
cities: () => [...QUERY_KEYS.referenceData.all, 'cities'] as const,
|
||||
containerTypes: () => [...QUERY_KEYS.referenceData.all, 'container-types'] as const,
|
||||
currencies: () => [...QUERY_KEYS.referenceData.all, 'currencies'] as const,
|
||||
},
|
||||
};
|
||||
RULE_ENGINE: {
|
||||
ROOT: "rule-engine",
|
||||
list: (resource: string) => ["rule-engine", resource, "list"] as const,
|
||||
chain: ["rule-engine", "approval-rules", "chain"] as const,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -86,40 +86,41 @@ export const URL_CONSTANTS = {
|
||||
SEND: "/api/otp/send",
|
||||
VERIFY: "/api/otp/verify",
|
||||
},
|
||||
|
||||
RULE_ENGINE: {
|
||||
// Cargo Types
|
||||
CARGO_TYPES: "/cargo-types",
|
||||
CARGO_TYPE_BY_ID: (id: string | number) => `/cargo-types/${id}`,
|
||||
CARGO_TYPE_BY_ID: (id: string) => `/cargo-types/${id}`,
|
||||
|
||||
// Container Types
|
||||
CONTAINER_TYPES: "/container-types",
|
||||
CONTAINER_TYPE_BY_ID: (id: string | number) =>
|
||||
`/container-types/${id}`,
|
||||
CONTAINER_TYPE_BY_ID: (id: string) => `/container-types/${id}`,
|
||||
|
||||
// Priority Rules
|
||||
PRIORITY_RULES: "/priority-rules",
|
||||
PRIORITY_RULE_BY_ID: (id: string | number) =>
|
||||
`/priority-rules/${id}`,
|
||||
PRIORITY_RULE_BY_ID: (id: string) => `/priority-rules/${id}`,
|
||||
|
||||
// Service Types
|
||||
SERVICE_TYPES: "/service-types",
|
||||
SERVICE_TYPE_BY_ID: (id: string | number) =>
|
||||
`/service-types/${id}`,
|
||||
SERVICE_TYPE_BY_ID: (id: string) => `/service-types/${id}`,
|
||||
|
||||
// Surcharge Types
|
||||
SURCHARGE_TYPES: "/surcharge-types",
|
||||
SURCHARGE_TYPE_BY_ID: (id: string | number) =>
|
||||
`/surcharge-types/${id}`,
|
||||
SURCHARGE_TYPE_BY_ID: (id: string) => `/surcharge-types/${id}`,
|
||||
|
||||
// Surcharges
|
||||
SURCHARGES: "/surcharges",
|
||||
SURCHARGE_BY_ID: (id: string | number) =>
|
||||
`/surcharges/${id}`,
|
||||
|
||||
// Weight Limit Rules
|
||||
WEIGHT_LIMIT_RULES: "/weight-limit-rules",
|
||||
WEIGHT_LIMIT_RULE_BY_ID: (id: string | number) =>
|
||||
`/weight-limit-rules/${id}`,
|
||||
WEIGHT_LIMIT_RULE_BY_ID: (id: string) => `/weight-limit-rules/${id}`,
|
||||
|
||||
YARDS: "/yards",
|
||||
YARD_BY_ID: (id: string) => `/yards/${id}`,
|
||||
|
||||
SHIPPING_LINES: "/shipping-lines",
|
||||
SHIPPING_LINE_BY_ID: (id: string) => `/shipping-lines/${id}`,
|
||||
|
||||
RATES: "/rates",
|
||||
RATES_LIVE: "/rates/live",
|
||||
RATE_BY_ID: (id: string) => `/rates/${id}`,
|
||||
RATE_SUBMIT: (id: string) => `/rates/${id}/submit`,
|
||||
RATE_APPROVE: (id: string) => `/rates/${id}/approve`,
|
||||
|
||||
APPROVAL_RULES: "/approval-rules",
|
||||
APPROVAL_RULE_BY_ID: (id: string) => `/approval-rules/${id}`,
|
||||
APPROVAL_RULES_CHAIN: "/approval-rules/chain",
|
||||
},
|
||||
RATE_MATRIX: {
|
||||
BASE: '/api/rate-matrices',
|
||||
|
||||
Reference in New Issue
Block a user