add sales visits ui
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
RegionHierarchyResponse,
|
||||
RegionDashboardResponse,
|
||||
RouteResponse,
|
||||
RouteVisitResponse,
|
||||
VehicleResponse,
|
||||
WarehouseResponse,
|
||||
VehicleType,
|
||||
@@ -148,6 +149,18 @@ export const routes = {
|
||||
|
||||
remove: (id: string) =>
|
||||
api.delete(`/routes/${id}`),
|
||||
|
||||
assignStores: (id: string, storeIds: string[]) =>
|
||||
api.post<RouteResponse>(`/routes/${id}/stores`, { storeIds }).then(r => r.data),
|
||||
|
||||
assignOwner: (id: string, salesRepId: string) =>
|
||||
api.put<RouteResponse>(`/routes/${id}/owner`, { salesRepId }).then(r => r.data),
|
||||
|
||||
checkIn: (id: string, body: { storeId: string; latitude: number; longitude: number }) =>
|
||||
api.post<RouteVisitResponse>(`/routes/${id}/visits/check-in`, body).then(r => r.data),
|
||||
|
||||
checkOut: (id: string, body: { storeId: string }) =>
|
||||
api.post<RouteVisitResponse>(`/routes/${id}/visits/check-out`, body).then(r => r.data),
|
||||
}
|
||||
|
||||
// ─── Vehicles ─────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user