Kaynağa Gözat

fix frontend po details

production
kelvin.yau 1 ay önce
ebeveyn
işleme
0e9b1da7ec
1 değiştirilmiş dosya ile 11 ekleme ve 3 silme
  1. +11
    -3
      src/app/api/po/actions.ts

+ 11
- 3
src/app/api/po/actions.ts Dosyayı Görüntüle

@@ -210,9 +210,17 @@ export interface PurchaseOrderSummary {
escalated: boolean;
}
export const fetchPoSummariesClient = cache(async (ids: number[]) => {
return serverFetchJson<PurchaseOrderSummary[]>(`${BASE_API_URL}/po/summary`, {
next: { tags: ["po"] },
});
if (ids.length === 0) {
return [];
}
const params = new URLSearchParams();
ids.forEach((id) => params.append("ids", String(id)));
return serverFetchJson<PurchaseOrderSummary[]>(
`${BASE_API_URL}/po/summary?${params.toString()}`,
{
next: { tags: ["po"] },
},
);
});

export const fetchPoListClient = cache(


Yükleniyor…
İptal
Kaydet