Add user selection to Shop PO flow

This commit is contained in:
2026-09-23 12:47:53 +05:30
parent 4b95e03e05
commit ee672da9f7
6 changed files with 202 additions and 50 deletions
+5 -4
View File
@@ -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),