Skip to content

Commit

Permalink
Merge pull request #177 from dinesh-aot/COMP-289
Browse files Browse the repository at this point in the history
Case File number navigation in Inspection/Complaint profile
  • Loading branch information
nitheesh-aot authored Dec 20, 2024
2 parents 9e7838e + de79c14 commit 14904f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from "react";
import { EditRounded } from "@mui/icons-material";
import { Box, Button, Typography } from "@mui/material";
import FileProfileProperty from "@/components/App/FileProfileProperty";
import dateUtils from "@/utils/dateUtils";
import { Complaint } from "@/models/Complaint";
import { useMenuStore } from "@/store/menuStore";
import {
ComplaintSourceEnum,
RequirementSourceEnum,
} from "@/components/App/Complaints/ComplaintFormUtils";
import FileProfileProperty from "@/components/App/FileProfileProperty";
import { Complaint } from "@/models/Complaint";
import { useMenuStore } from "@/store/menuStore";
import dateUtils from "@/utils/dateUtils";
import { EditRounded } from "@mui/icons-material";
import { Box, Button, Typography } from "@mui/material";
import React from "react";

interface ComplaintGeneralInformationProps {
complaintData: Complaint;
Expand All @@ -22,6 +22,7 @@ const ComplaintGeneralInformation: React.FC<
const { appHeaderHeight } = useMenuStore();

const generalProperties = [
{ name: "Case File", value: complaintData.case_file.case_file_number, link: true},
{ name: "Project Name", value: complaintData.case_file?.project?.name },
{
name: "Concern Description",
Expand Down Expand Up @@ -157,6 +158,8 @@ const ComplaintGeneralInformation: React.FC<
key={property.name}
propertyName={property.name}
propertyValue={property.value}
linksList={property.link ? [property.value] : null}
linkRoute={property.link ? "/ce-database/case-files" : null}
/>
))}
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useMemo } from "react";
import { EditRounded } from "@mui/icons-material";
import { Box, Button, Typography } from "@mui/material";
import FileProfileProperty from "@/components/App/FileProfileProperty";
import { Inspection } from "@/models/Inspection";
import dateUtils from "@/utils/dateUtils";
import { useMenuStore } from "@/store/menuStore";
import dateUtils from "@/utils/dateUtils";
import { EditRounded } from "@mui/icons-material";
import { Box, Button, Typography } from "@mui/material";
import React, { useMemo } from "react";

interface InspectionGeneralInformationProps {
inspectionData: Inspection;
Expand Down Expand Up @@ -34,6 +34,7 @@ const InspectionGeneralInformation: React.FC<
}, [inspectionData.inspectionAttendances]);

const properties = [
{ name: "Case File", value: inspectionData.case_file.case_file_number, link: true},
{ name: "Project", value: inspectionData.case_file?.project?.name },
{ name: "Project Description", value: inspectionData.project_description },
{
Expand Down Expand Up @@ -85,6 +86,8 @@ const InspectionGeneralInformation: React.FC<
key={property.name}
propertyName={property.name}
propertyValue={property.value}
linksList={property.link ? [property.value] : null}
linkRoute={property.link ? "/ce-database/case-files" : null}
/>
))}
</Box>
Expand Down

0 comments on commit 14904f0

Please sign in to comment.