diff --git a/src/components/JoinMarkupsModal/index.js b/src/components/JoinMarkupsModal/index.js index 350546be..7eb76d32 100644 --- a/src/components/JoinMarkupsModal/index.js +++ b/src/components/JoinMarkupsModal/index.js @@ -14,6 +14,7 @@ const JoinMarkupsModal = ({ perspectiveId, mode, relations, onClose }) => { const [typeRelation, setTypeRelation] = useState(null); const joinActive = firstTextRelation && secondTextRelation && typeRelation; + const [deleteActive, setDeleteActive] = useState(false); const onAddRelation = useCallback( /*newMetadata*/ () => { @@ -30,6 +31,29 @@ const JoinMarkupsModal = ({ perspectiveId, mode, relations, onClose }) => { ] ); + const onDeleteRelation = useCallback( + () => { + console.log("onDeleteRelation!!!!!!!"); + }, + [ + /*language, updateLanguageMetadata*/ + ] + ); + + const onRelationSelect = useCallback( + (relation_id, checked) => { + console.log("onRelationSelect!!!!!!!"); + console.log("relation_id===="); + console.log(relation_id); + console.log("checked===="); + console.log(checked); + setDeleteActive(true); + }, + [ + /*language, updateLanguageMetadata*/ + ] + ); + console.log("perspectiveId===="); console.log(perspectiveId); @@ -50,8 +74,8 @@ const JoinMarkupsModal = ({ perspectiveId, mode, relations, onClose }) => { {getTranslation("Join markups")}
-
- {/* Table 1 */} +
+ {/* Table Markups */}
@@ -118,10 +142,6 @@ const JoinMarkupsModal = ({ perspectiveId, mode, relations, onClose }) => { ))} */} - {/*
- Selected value: {typeRelation} -
*/} - {
@@ -183,7 +201,7 @@ const JoinMarkupsModal = ({ perspectiveId, mode, relations, onClose }) => { isEqual(e, entry.id))} - //onChange={(e, { checked }) => onEntrySelect(entry.id, checked)} + onChange={(e, { checked }) => onRelationSelect(relation.id, checked)} /> Left text @@ -195,7 +213,7 @@ const JoinMarkupsModal = ({ perspectiveId, mode, relations, onClose }) => { })}
- {/* /Table 2 */} + {/* /Table Relations */}
diff --git a/src/components/JoinMarkupsModal/styles.scss b/src/components/JoinMarkupsModal/styles.scss index 242a3c3e..9c1b7270 100644 --- a/src/components/JoinMarkupsModal/styles.scss +++ b/src/components/JoinMarkupsModal/styles.scss @@ -4,12 +4,12 @@ height: 65vh; min-height: 450px; - &__table1 { + &__markups { height: 50%; padding-bottom: 20px; } - &__table2 { + &__relations { height: 50%; overflow-y: auto;