FPSMS-frontend
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

24 líneas
643 B

  1. import { serverFetchJson } from "@/app/utils/fetchUtil";
  2. import { BASE_API_URL } from "@/config/api";
  3. import { cache } from "react";
  4. import "server-only";
  5. export interface BomWeightingScoreResult {
  6. id: number;
  7. code: string;
  8. name: string;
  9. range: number;
  10. weighting: number | string | { value?: number; [key: string]: any };
  11. remarks?: string;
  12. }
  13. export const preloadBomWeightingScores = () => {
  14. fetchBomWeightingScores();
  15. };
  16. export const fetchBomWeightingScores = cache(async () => {
  17. return serverFetchJson<BomWeightingScoreResult[]>(`${BASE_API_URL}/bomWeightingScores`, {
  18. next: { tags: ["bomWeightingScores"] },
  19. });
  20. });