FPSMS-frontend
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

24 righe
528 B

  1. "server only"
  2. import { BASE_API_URL } from '@/config/api';
  3. import { serverFetchJson } from '@/app/utils/fetchUtil';
  4. import { cache } from "react";
  5. export interface ShopCombo {
  6. id: number;
  7. value: number; // id
  8. label: string;
  9. }
  10. export const fetchSupplierCombo = cache(async() => {
  11. return serverFetchJson<ShopCombo[]>(`${BASE_API_URL}/shop/combo/supplier`, {
  12. method: "GET",
  13. headers: { "Content-Type": "application/json"},
  14. next: {
  15. tags: ["supplierCombo"]
  16. }
  17. })
  18. })