ADDED: new add notes feature for orders backend and frontend
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Address, AuditEvent, OrderDetail, OrderSummary } from "@orderops/shared";
|
||||
import type { Address, AuditEvent, Note, OrderDetail, OrderSummary } from "@orderops/shared";
|
||||
import { apiRequest } from "../lib/api-client";
|
||||
|
||||
export function listOrders(query: string) {
|
||||
@@ -14,6 +14,13 @@ export function listAuditEvents(orderId: string) {
|
||||
return apiRequest<AuditEvent[]>(`/api/orders/${orderId}/audit-events`);
|
||||
}
|
||||
|
||||
export function addOrderNote(orderId: string, body: string) {
|
||||
return apiRequest<Note>(`/api/orders/${orderId}/notes`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ body })
|
||||
});
|
||||
}
|
||||
|
||||
export function updateOrderItemQuantity(orderId: string, itemId: string, quantity: number) {
|
||||
return apiRequest<OrderDetail>(`/api/orders/${orderId}/items/${itemId}/quantity`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user