FPSMS-frontend
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

33 строки
928 B

  1. import { CreateItemInputs } from "@/app/api/settings/item/actions";
  2. import { fetchItem } from "@/app/api/settings/item";
  3. import GeneralLoading from "@/components/General/GeneralLoading";
  4. import RoughScheduleDetailView from "@/components/RoughScheduleDetail/RoughScheudleDetailView";
  5. import React from "react";
  6. import { ScheduleType, fetchRoughProdScheduleDetail } from "@/app/api/scheduling";
  7. interface SubComponents {
  8. Loading: typeof GeneralLoading;
  9. }
  10. type Props = {
  11. id?: number;
  12. type: ScheduleType;
  13. };
  14. const RoughScheduleDetailWrapper: React.FC<Props> & SubComponents = async ({
  15. id,
  16. type,
  17. }) => {
  18. const prodSchedule = id ? await fetchRoughProdScheduleDetail(id) : undefined;
  19. return (
  20. <RoughScheduleDetailView
  21. isEditMode={Boolean(id)}
  22. type={type}
  23. defaultValues={prodSchedule}
  24. />
  25. );
  26. };
  27. RoughScheduleDetailWrapper.Loading = GeneralLoading;
  28. export default RoughScheduleDetailWrapper;