This commit is contained in:
2026-03-14 23:50:41 -05:00
parent 7b85d14ff6
commit 5f93adab8b
4 changed files with 254 additions and 0 deletions

View File

@@ -464,6 +464,19 @@ export const api = {
token
);
},
async getShipmentPackingSlipPdf(token: string, shipmentId: string) {
const response = await fetch(`/api/v1/documents/shipping/shipments/${shipmentId}/packing-slip.pdf`, {
headers: {
Authorization: `Bearer ${token}`,
},
});
if (!response.ok) {
throw new ApiError("Unable to render packing slip PDF.", "PACKING_SLIP_FAILED");
}
return response.blob();
},
async getCompanyProfilePreviewPdf(token: string) {
const response = await fetch("/api/v1/documents/company-profile-preview.pdf", {
headers: {