ui bug fixers

This commit is contained in:
2026-10-07 10:28:29 +05:30
committed by ImanThiyanga
parent 0d3f2fba14
commit 3abcfa6e6f
37 changed files with 1852 additions and 542 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
// One typed client method per vendor (supplier) endpoint (docs/11-BACKEND-PHASE1.md
// §2.4, FR-MD-06). ETag/If-Match on update, PATCH status for deactivate (masters are
// deactivated, not hard-deleted, FR-MD-08).
// §2.4, FR-MD-06). ETag/If-Match on update, PATCH status for deactivate, DELETE for a
// hard delete (409 MASTER_IN_USE while any purchase document or item references it).
import { apiRequest, apiRequestWithETag, buildQuery } from "@/lib/api-client"
import { ApiResult, EntityStatus, PagedResponse } from "@/types/common"
import { CreateVendorRequest, UpdateVendorRequest, Vendor } from "@/types/master-data"
@@ -33,4 +33,8 @@ export const vendorsApi = {
updateStatus(vendorId: number, status: EntityStatus): Promise<void> {
return apiRequest<void>(`/vendors/${vendorId}/status`, { method: "PATCH", body: { status } })
},
delete(vendorId: number): Promise<void> {
return apiRequest<void>(`/vendors/${vendorId}`, { method: "DELETE" })
},
}