diff --git a/components/canvas/Sidebar/NewPQIR.tsx b/components/canvas/Sidebar/NewPQIR.tsx index bee0c49..dafb2cf 100644 --- a/components/canvas/Sidebar/NewPQIR.tsx +++ b/components/canvas/Sidebar/NewPQIR.tsx @@ -1,5 +1,11 @@ import { NodeDataCommon } from "@/types/NodeData"; -import { Button, Checkbox, Icon } from "@equinor/eds-core-react"; +import { + Button, + Checkbox, + Icon, + Tooltip, + Typography, +} from "@equinor/eds-core-react"; import { add } from "@equinor/eds-icons"; import dynamic from "next/dynamic"; import styles from "./PQIRListElement.module.scss"; @@ -34,46 +40,55 @@ export const NewPQIR = ({ selectedNode }: NewPQIRProps) => { selectedType={selectedType} onClick={(type) => setSelectedType(type)} /> - {solved !== null && ( - setSolved(e.target.checked)} - title="Mark as solved" - /> - )} ); const panelSectionBottom = (selectedNodeId: string) => (
- - + + { + onSuccess() { + setIsEditing(false); + }, + } + ) + } + disabled={!description} + > + Create + +
); diff --git a/components/canvas/Sidebar/PQIRListElement.module.scss b/components/canvas/Sidebar/PQIRListElement.module.scss index da957b2..3a5f27b 100644 --- a/components/canvas/Sidebar/PQIRListElement.module.scss +++ b/components/canvas/Sidebar/PQIRListElement.module.scss @@ -44,7 +44,8 @@ .actionButtonsContainer { display: flex; column-gap: 12px; - justify-content: flex-end; + justify-content: space-between; + align-items: center; } .actionButton { @@ -54,3 +55,33 @@ .createPQIRButton { height: 46px !important; } + +.checkBoxStyle { + padding: 0px !important; +} + +.checkBoxStyle > input { + --scale: 1 !important; +} + +.actioncontainer { + display: flex; + flex-direction: column; + align-items: center; + margin-right: 16px; +} + +.actionIcon { + width: auto !important; + height: auto !important; +} + +.actionText { + font-size: 14px !important; + font-weight: 500 !important; + color: #007079 !important; +} + +.actionIconContainer { + display: flex; +} diff --git a/components/canvas/Sidebar/PQIRListElement.tsx b/components/canvas/Sidebar/PQIRListElement.tsx index ee5dcc2..13cfb60 100644 --- a/components/canvas/Sidebar/PQIRListElement.tsx +++ b/components/canvas/Sidebar/PQIRListElement.tsx @@ -6,9 +6,15 @@ import { Button, Checkbox, Icon, + Tooltip, Typography, } from "@equinor/eds-core-react"; -import { add, delete_to_trash, minimize } from "@equinor/eds-icons"; +import { + add, + delete_to_trash, + minimize, + remove_outlined, +} from "@equinor/eds-icons"; import dynamic from "next/dynamic"; import { TextCircle } from "../entities/TextCircle"; import styles from "./PQIRListElement.module.scss"; @@ -110,33 +116,59 @@ export const PQIRListELement = ({ selectedType={selectedType} onClick={(type) => setSelectedType(type)} /> -
- {solved !== null && isSelectedSection && ( - setSolved(e.target.checked)} - title="Mark as solved" - /> - )} - -
); const panelSectionBottom = (
- +
+ {solved !== null && isSelectedSection && ( +
+ + setSolved(e.target.checked)} + className={styles.checkBoxStyle} + /> + + Solved +
+ )} + {isSelectedSection && ( +
+ + + + Remove +
+ )} +
+ + + + Delete +
+
+ + {!(!hasChanges || !description) && ( + + )} {showScrim && createPortal( diff --git a/components/canvas/Sidebar/usePQIRMutations.tsx b/components/canvas/Sidebar/usePQIRMutations.tsx index b2f380a..7e7942e 100644 --- a/components/canvas/Sidebar/usePQIRMutations.tsx +++ b/components/canvas/Sidebar/usePQIRMutations.tsx @@ -89,7 +89,7 @@ export const usePQIRMutations = () => { }, { onSuccess() { - dispatch.setSnackMessage("✅ PQIR unlinked!"); + dispatch.setSnackMessage("⛔️ PQIR removed from card!"); void notifyOthers("Removed PQIR from a card", projectId, account); return queryClient.invalidateQueries(); },