Skip to content

Commit

Permalink
chore: Refactor, add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Oct 28, 2024
1 parent 183a6e9 commit f1c6829
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export class FormFieldConstraintsShortcutsComponent implements OnInit {
})

// if constraint of one type is already present in the record, make the button for that type disabled
this.handleConstraintSectionsToDisplay()
}

handleConstraintSectionsToDisplay() {
this.constraintSectionsToDisplay$ = combineLatest([
this.legalConstraints$,
this.securityConstraints$,
Expand Down Expand Up @@ -153,6 +157,7 @@ export class FormFieldConstraintsShortcutsComponent implements OnInit {
} else {
// if only toggle is turned off, remove the constraint
this.editorFacade.updateRecordField('legalConstraints', []) //remove all legal constraints
// TODO: show the constraint sections that are already present in the record
}
} else if (toggleName === 'toggleKnownConstraint') {
this.toggleKnownConstraint = !this.toggleKnownConstraint
Expand All @@ -167,6 +172,7 @@ export class FormFieldConstraintsShortcutsComponent implements OnInit {
} else {
// if only toggle is turned off, remove the constraint
this.editorFacade.updateRecordField('legalConstraints', []) //remove all legal constraints
// TODO: show the constraint sections that are already present in the record
}
}
}
Expand Down

0 comments on commit f1c6829

Please sign in to comment.