Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intervention validations #5159

Merged
merged 23 commits into from
Oct 17, 2024
Merged

Conversation

Tom-Szendrey
Copy link
Contributor

@Tom-Szendrey Tom-Szendrey commented Oct 16, 2024

Purpose:

  • Prevent users from creating invalid intervention policies and provide simple toast to them for their understanding what is disallowed
  • An invalid intervention policy is one that has a static intervention with a negative timestamp, or any duplicate appliedTo + time pairs in static interventions

Description

  • add a validation check for interventions. This will throw an error when:
    • There is a negative timestamp found in a static intervention.
    • There are two static interventions that are duplicated within a single intervention
    • There are two static interventions that are duplicated within different interventions within a single policy
  • added some simple test cases for the validations
  • Allow for user to delete interventions via the sidebar
  • Add the confirm back into app.vue so we can utilize primevue's useConfirm -> Yohann can clean this later

Follow up:

(I want to reduce how big the PR is for readability)
Will remove the menu in the side panel and add a trash symbol.
When user clicks on a card it will select it
When user clicks on the trash it will delete

Pictures:

image

image

image

image

@Tom-Szendrey Tom-Szendrey linked an issue Oct 16, 2024 that may be closed by this pull request
update key to include atTheTime:
@Tom-Szendrey Tom-Szendrey dismissed dvince2’s stale review October 17, 2024 13:32

Requested changes that have been made and github doesnt realize?

@Tom-Szendrey Tom-Szendrey merged commit 08310bf into main Oct 17, 2024
8 checks passed
@Tom-Szendrey Tom-Szendrey deleted the TS/3488-task-intervention-validations branch October 17, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK]: Intervention validations
6 participants