Skip to content

Commit

Permalink
Merge pull request #769 from eieimon/v2-fix-030-Feb-07-add-risk-category
Browse files Browse the repository at this point in the history
Add risk categories in add-new-risk popup
  • Loading branch information
MuhammadKhalilzadeh authored Feb 7, 2025
2 parents 9c6b80c + 8fb0d7f commit 972d1ed
Showing 1 changed file with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,27 @@ const RiskSection: FC<RiskSectionProps> = ({
[]
);

const riskCategorylItems = useMemo(
() => [
{ _id: 1, name: "Strategic risk" },
{ _id: 2, name: "Operational risk" },
{ _id: 3, name: "Compliance risk" },
{ _id: 4, name: "Financial risk" },
{ _id: 5, name: "Cybersecurity risk" },
{ _id: 6, name: "Reputational risk" },
{ _id: 7, name: "Legal risk" },
{ _id: 8, name: "Technological risk" },
{ _id: 9, name: "Third-party/vendor risk" },
{ _id: 10, name: "Environmental risk"},
{ _id: 11, name: "Human resources risk"},
{ _id: 12, name: "Geopolitical risk"},
{ _id: 13, name: "Fraud risk"},
{ _id: 14, name: "Data privacy risk"},
{ _id: 15, name: "Health and safety risk"}
],
[]
);

const handleOnSelectChange = useCallback(
(prop: keyof RiskFormValues) =>
(event: SelectChangeEvent<string | number>) => {
Expand Down Expand Up @@ -207,11 +228,7 @@ const RiskSection: FC<RiskSectionProps> = ({
placeholder="Select category"
value={riskValues.riskCategory}
onChange={handleOnSelectChange("riskCategory")}
items={[
{ _id: 1, name: "Category 1" },
{ _id: 2, name: "Category 2" },
{ _id: 3, name: "Category 3" },
]}
items={riskCategorylItems}
isRequired
error={riskErrors.riskCategory}
sx={{
Expand Down

0 comments on commit 972d1ed

Please sign in to comment.