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

Feature/76 edit view #103

Merged
merged 11 commits into from Apr 25, 2022
Merged

Feature/76 edit view #103

merged 11 commits into from Apr 25, 2022

Conversation

nbarlowATI
Copy link
Member

  • Some changes (e.g. frontend Dockerfile) merged in from main.
  • Add new lock_uuid charfield to AssuranceCase model (replacing boolean field editable).
  • In CaseContainer.js generate a new uuid and store it in both the state and the browser's sessionData (so it is maintained with "refresh").
  • Add some logic in CaseContainer to allow user to:
    • enable edit mode if the case's lock_uuid is currently null,
    • disable edit mode if the case's lock_uuid is currently this user's session_id
    • override another user's edit mode if the case's lock_uuid is a non-null value that is not the current session_id
  • Add an event listener so lock_uuid will be reset to null if the browser tab is closed.

@nbarlowATI nbarlowATI requested a review from mhauru April 22, 2022 10:47
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2207266877

  • 0 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 88.377%

Totals Coverage Status
Change from base Build 2202258230: 0.2%
Covered Lines: 920
Relevant Lines: 1041

💛 - Coveralls

@coveralls
Copy link

coveralls commented Apr 22, 2022

Pull Request Test Coverage Report for Build 2219301662

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 88.207%

Totals Coverage Status
Change from base Build 2202258230: 0.05%
Covered Lines: 905
Relevant Lines: 1026

💛 - Coveralls

Copy link
Collaborator

@mhauru mhauru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Nice and elegant and robust seeming. I had one question about possible race conditions, can be merged as-is though.

frontend/src/components/CaseContainer.js Outdated Show resolved Hide resolved
@nbarlowATI nbarlowATI merged commit 9718c65 into dev Apr 25, 2022
@AoifeHughes AoifeHughes deleted the feature/76-edit-view branch November 6, 2023 13:27
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.

None yet

3 participants