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

EOC Case where the last selected EOC has been deselected #51

Open
frinzekt opened this issue Jan 23, 2021 · 3 comments
Open

EOC Case where the last selected EOC has been deselected #51

frinzekt opened this issue Jan 23, 2021 · 3 comments
Assignees
Labels
bug Something isn't working client client related issue

Comments

@frinzekt
Copy link
Member

Steps to reproduce:

  1. Create a justification for an EOC (eg. select EOC 1.1)
  2. Press Save
  3. Edit that EOC justification (eg. EOC 1.1)
  4. Uncheck the checkbox for EOC 1.1
  5. Save

What will happen is that in handleSave, matchIndex=-1 (for a reason that I am unsure of). This means that, it is inserting a "new" entry in the database.

Another weird behaviour that I've seen from the Redux log is that EVALUATION_PATCH_PENDING is removing an array element.

I am not exactly sure what the problem is.

tldr; Cannot deselect the last EOC item

@frinzekt frinzekt added bug Something isn't working client client related issue labels Jan 23, 2021
@frinzekt
Copy link
Member Author

frinzekt commented Feb 3, 2021

This is part of refinement, so I will move this in stage 2

@MouseAndKeyboard
Copy link
Collaborator

MouseAndKeyboard commented Feb 3, 2021

It might sound like a cop-out but we could just prevent users from deselecting the checkbox for the eoc their currently viewing.
E.g. If you're editing EOC 1.1 you can't deselect EOC 1.1 from the list.

Checkout branch i51-eoc-deselect-bug where I have implemented this (haven't solved the underlying issue though).

@frinzekt
Copy link
Member Author

frinzekt commented Feb 3, 2021

@MouseAndKeyboard i think thats fine, but have a think about the dynamics. What if I said put the justification in EOC 1.1... then later I have a justification for EOC 1.2 and 1.3... but now... what If later on I decided that my justification on EOC 1.2 and 1.3 should also include 1.1... how would I do that then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client client related issue
Projects
None yet
Development

No branches or pull requests

2 participants