diff --git a/epictrack-api/src/api/schemas/response/project_response.py b/epictrack-api/src/api/schemas/response/project_response.py index 3c9ee2ad4..947b9539a 100644 --- a/epictrack-api/src/api/schemas/response/project_response.py +++ b/epictrack-api/src/api/schemas/response/project_response.py @@ -19,7 +19,7 @@ class Meta(AutoSchemaBase.Meta): model = Project include_fk = True unknown = EXCLUDE - exclude=("created_by", "updated_at", "updated_by", "is_deleted") + exclude = ("created_by", "updated_at", "updated_by", "is_deleted") sub_type = fields.Nested(SubTypeSchema, dump_only=True, exclude=("type", "type_id")) type = fields.Nested(TypeSchema, dump_only=True) diff --git a/epictrack-api/src/api/schemas/response/work_response.py b/epictrack-api/src/api/schemas/response/work_response.py index ae4e9f3d0..50356fd9c 100644 --- a/epictrack-api/src/api/schemas/response/work_response.py +++ b/epictrack-api/src/api/schemas/response/work_response.py @@ -49,9 +49,10 @@ class Meta(AutoSchemaBase.Meta): model = Work include_fk = True unknown = EXCLUDE - exclude=("created_by", "updated_at", "updated_by", "is_deleted") + exclude = ("created_by", "updated_at", "updated_by", "is_deleted") - project = fields.Nested(ProjectResponseSchema(exclude=("created_by", "updated_at", "updated_by", "is_deleted")), dump_only=True) + project = fields.Nested( + ProjectResponseSchema(exclude=("created_by", "updated_at", "updated_by", "is_deleted")), dump_only=True) ministry = fields.Nested(MinistrySchema, dump_only=True) eao_team = fields.Nested(EAOTeamSchema, dump_only=True) ea_act = fields.Nested(EAActSchema, dump_only=True) diff --git a/epictrack-web/src/components/workPlan/about/aboutDetails/WorkDetails.tsx b/epictrack-web/src/components/workPlan/about/aboutDetails/WorkDetails.tsx index 08c4ecae8..f90714d82 100644 --- a/epictrack-web/src/components/workPlan/about/aboutDetails/WorkDetails.tsx +++ b/epictrack-web/src/components/workPlan/about/aboutDetails/WorkDetails.tsx @@ -10,7 +10,7 @@ const WorkDetails = () => { const [phaseInfo, setPhaseInfo] = useState({}); const { work, workPhases } = useContext(WorkplanContext); - const getCurrentAndNextPhaseInfo = () => { + const getNextPhaseInfo = () => { workPhases.map((phase) => { if (phase?.work_phase?.id === work?.current_work_phase_id) { setPhaseInfo(phase); @@ -19,7 +19,7 @@ const WorkDetails = () => { }; useEffect(() => { - getCurrentAndNextPhaseInfo(); + getNextPhaseInfo(); }, []); return (