Add user selection to Shop PO flow
This commit is contained in:
@@ -54,6 +54,7 @@ export const rides = {
|
||||
|
||||
export interface LoadingSheetCreateBody {
|
||||
fK_RideId: string
|
||||
populatedByUserId?: string | null
|
||||
}
|
||||
|
||||
export interface LoadingSheetItemInput {
|
||||
@@ -83,8 +84,8 @@ export const loadingSheets = {
|
||||
updateItems: (id: string, items: LoadingSheetItemInput[]) =>
|
||||
api.put<LoadingSheetResponse>(`/loading-sheets/${id}/items`, { items }).then(r => r.data),
|
||||
|
||||
confirm: (id: string) =>
|
||||
api.post<LoadingSheetResponse>(`/loading-sheets/${id}/confirm`).then(r => r.data),
|
||||
confirm: (id: string, confirmedByUserId?: string | null) =>
|
||||
api.post<LoadingSheetResponse>(`/loading-sheets/${id}/confirm`, { confirmedByUserId }).then(r => r.data),
|
||||
}
|
||||
|
||||
// ─── Delivery Tasks ───────────────────────────────────────────────────────────
|
||||
|
||||
@@ -23,6 +23,7 @@ export interface ShopPOItemBody {
|
||||
export interface CreateShopPOBody {
|
||||
storeId: string
|
||||
items: ShopPOItemBody[]
|
||||
raisedByUserId?: string | null
|
||||
}
|
||||
|
||||
export interface UpdateShopPOItemsBody {
|
||||
@@ -51,11 +52,11 @@ export const shopPos = {
|
||||
updateItems: (id: string, body: UpdateShopPOItemsBody) =>
|
||||
api.put<ShopPOResponse>(`/shop-pos/${id}/items`, body).then(r => r.data),
|
||||
|
||||
confirm: (id: string) =>
|
||||
api.post<ShopPOResponse>(`/shop-pos/${id}/confirm`).then(r => r.data),
|
||||
confirm: (id: string, confirmedByUserId?: string | null) =>
|
||||
api.post<ShopPOResponse>(`/shop-pos/${id}/confirm`, { confirmedByUserId }).then(r => r.data),
|
||||
|
||||
confirmAndCreateInvoice: (id: string) =>
|
||||
api.post<ShopPOResponse>(`/shop-pos/${id}/confirm-and-create-invoice`).then(r => r.data),
|
||||
confirmAndCreateInvoice: (id: string, confirmedByUserId?: string | null) =>
|
||||
api.post<ShopPOResponse>(`/shop-pos/${id}/confirm-and-create-invoice`, { confirmedByUserId }).then(r => r.data),
|
||||
|
||||
cancel: (id: string) =>
|
||||
api.post<ShopPOResponse>(`/shop-pos/${id}/cancel`).then(r => r.data),
|
||||
|
||||
Reference in New Issue
Block a user