Skip to content

Commit

Permalink
[New #283] Changed way to create event in new Fault Tree Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed May 19, 2024
1 parent 8fef67e commit 40b1133
Show file tree
Hide file tree
Showing 8 changed files with 284 additions and 152 deletions.
68 changes: 64 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@hookform/resolvers": "^3.1.1",
"@mui/icons-material": "^5.14.3",
"@mui/icons-material": "^5.15.17",
"@mui/lab": "^5.0.0-alpha.138",
"@mui/material": "^5.14.3",
"@mui/x-data-grid": "^6.10.2",
Expand All @@ -22,6 +22,7 @@
"history": "5.3.0",
"i18next": "^23.9.0",
"i18next-http-backend": "^2.4.3",
"intelligent-tree-select": "^0.11.5",
"jointjs": "^3.7.5",
"jquery": "^3.7.0",
"jsonld": "8.3.2",
Expand Down Expand Up @@ -66,12 +67,12 @@
"dotenv-webpack": "^8.0.1",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"jsdom": "^24.0.0",
"lint-staged": "^15.2.2",
"prettier": "3.2.5",
"ts-loader": "^9.4.4",
"vite-tsconfig-paths": "^4.3.1",
"vitest": "^1.4.0",
"jsdom": "^24.0.0"
"vitest": "^1.4.0"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
Expand Down
4 changes: 3 additions & 1 deletion public/locales/cs/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"title": "Vytvořit strom poruch",
"namePlaceholder": "Název stromu poruch",
"eventPlaceholder": "Událost",
"create": "Vytvořit novou událost",
"create": "Vytvořit strom poruch",
"noEvents": "No events found",
"createEvent": "Create New Event",
"type": "Typ FTA události",
"name": "Název události",
"description": "Popis",
Expand Down
4 changes: 3 additions & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"title": "Create Fault Tree",
"namePlaceholder": "Fault Tree name",
"eventPlaceholder": "Event",
"create": "Create new Event",
"create": "Create Fault Tree",
"createEvent": "Create New Event",
"noEvents": "No events found",
"type": "FTA event type",
"name": "Event name",
"description": "Description",
Expand Down
8 changes: 7 additions & 1 deletion src/components/dashboard/content/list/FaultTreeOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import FaultTreeDialog from "@components/dialog/faultTree/FaultTreeDialog";
import { Box, Button } from "@mui/material";
import { useTranslation } from "react-i18next";
import { SELECTED_SYSTEM, SELECTED_VIEW } from "@utils/constants";
import { FaultEventsReuseProvider } from "@hooks/useReusableFaultEvents";

const FaultTreeOverview = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -105,7 +106,12 @@ const FaultTreeOverview = () => {
handleCloseDialog={() => setEditDialogOpen(false)}
faultTree={contextMenuSelectedTree}
/>
<FaultTreeDialog open={createFaultTreeDialogOpen} handleCloseDialog={() => setCreateFaultTreeDialogOpen(false)} />
<FaultEventsReuseProvider>
<FaultTreeDialog
open={createFaultTreeDialogOpen}
handleCloseDialog={() => setCreateFaultTreeDialogOpen(false)}
/>
</FaultEventsReuseProvider>
</Box>
);
};
Expand Down
Loading

0 comments on commit 40b1133

Please sign in to comment.