Last mile confirmation request , approval, payment Feature

This commit is contained in:
Hagernesh
2026-08-05 19:58:41 +00:00
parent 37d0cc966a
commit 1f4d659ffb
26 changed files with 1334 additions and 8 deletions

View File

@@ -155,6 +155,13 @@ export const QUERY_KEYS = {
byId: (id: string) => ["last-mile", "detail", id] as const,
},
LAST_MILE_REQUESTS: {
ROOT: ["last-mile-requests"] as const,
list: (filter?: Record<string, unknown>) =>
["last-mile-requests", "list", filter ?? {}] as const,
freeTruckCount: ["last-mile-requests", "free-truck-count"] as const,
},
RULE_ENGINE: {
ROOT: ["rule-engine"] as const,
list: (

View File

@@ -707,6 +707,14 @@ export const URL_CONSTANTS = {
PROOF_OF_DELIVERY: (id: string) => `/last-mile/${id}/proof-of-delivery`,
},
LAST_MILE_REQUESTS: {
BASE: "/last-mile-requests",
BY_ID: (id: string) => `/last-mile-requests/${id}`,
FREE_TRUCK_COUNT: "/last-mile-requests/free-truck-count",
APPROVE: (id: string) => `/last-mile-requests/${id}/approve`,
REJECT: (id: string) => `/last-mile-requests/${id}/reject`,
},
DRIVERS: {
BASE: "/drivers",
BY_ID: (id: string) => `/drivers/${id}`,