From 519bd4f5eb966e8bc9d3ff2d2ab335bfb4403009 Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Mon, 12 May 2025 15:02:18 +0800 Subject: [PATCH] [rough scheduling] update search and detail page --- src/app/api/settings/item/index.ts | 1 + .../RoughScheudleDetailView.tsx | 9 +- .../RoughScheduleDetail/ViewByBomDetails.tsx | 150 ++++++++++++++++++ .../RoughScheduleDetail/ViewByFGDetails.tsx | 150 ++++++++++++++++++ .../RoughScheduleSetting.tsx | 4 +- .../SearchResults/EditableSearchResults.tsx | 82 ++++++---- 6 files changed, 361 insertions(+), 35 deletions(-) create mode 100644 src/components/RoughScheduleDetail/ViewByBomDetails.tsx create mode 100644 src/components/RoughScheduleDetail/ViewByFGDetails.tsx diff --git a/src/app/api/settings/item/index.ts b/src/app/api/settings/item/index.ts index a51bc92..57caa39 100644 --- a/src/app/api/settings/item/index.ts +++ b/src/app/api/settings/item/index.ts @@ -28,6 +28,7 @@ export type ItemsResult = { qcChecks: ItemQc[] action?: any } + export type Result = { item: ItemsResult qcChecks: ItemQc[] diff --git a/src/components/RoughScheduleDetail/RoughScheudleDetailView.tsx b/src/components/RoughScheduleDetail/RoughScheudleDetailView.tsx index 960b5c1..4150515 100644 --- a/src/components/RoughScheduleDetail/RoughScheudleDetailView.tsx +++ b/src/components/RoughScheduleDetail/RoughScheudleDetailView.tsx @@ -19,8 +19,9 @@ import {Add, Check, Close, EditNote} from "@mui/icons-material"; import {ItemQc, ItemsResult} from "@/app/api/settings/item"; import { useGridApiRef } from "@mui/x-data-grid"; import ProductDetails from "@/components/CreateItem/ProductDetails"; -import QcDetails from "@/components/CreateItem/QcDetails"; import DetailInfoCard from "@/components/RoughScheduleDetail/DetailInfoCard"; +import ViewByFGDetails from "@/components/RoughScheduleDetail/ViewByFGDetails"; +import ViewByBomDetails from "@/components/RoughScheduleDetail/ViewByBomDetails"; type Props = { isEditMode: boolean; @@ -169,10 +170,8 @@ const RoughScheduleDetailView: React.FC = ({ {serverError} )} - {tabIndex === 0 && } - {tabIndex === 1 && } - {/* {type === TypeEnum.MATERIAL && } */} - {/* {type === TypeEnum.BYPRODUCT && } */} + {tabIndex === 0 && } + {tabIndex === 1 && }