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

[GWELLS-2198] FEATURE** CRUD Functionality for Persons Notes #2210

Merged
merged 9 commits into from
Apr 4, 2024

Conversation

LocalNewsTV
Copy link
Contributor

Pull Request Standards

  • The title of the PR is accurate
  • The title includes the type of change [HOTFIX, FEATURE, etc]
  • The PR title includes the ticket number in format of [GWELLS-###]
  • Documentation is updated to reflect change [README, functions, team documents]

Description

This PR includes the following proposed change(s):

This PR is an expansion on the work done on [GWELLS-2197] but targetting the Persons section of the application

  • Added Get/Patch/Delete functionality to the GWELLS drillers/{id}/notes/{note_id} endpoint
  • Updated frontend to make use of new crud functionality
  • Added Modals for editing and deleting notes
  • Add a Edit flag to the note body to highlight if a user has updated a note at any time

Auth considerations:

  • Only user who submits note can edit a note
  • Creation User and Administrators can delete notes

How to access:

  1. Log into Gwells
  2. Select 'Registry Search' from nav bar
  3. Search for driller
  4. Select a driller from results

image

@LocalNewsTV LocalNewsTV requested a review from a team April 4, 2024 14:42
@LocalNewsTV
Copy link
Contributor Author

LocalNewsTV commented Apr 4, 2024

Sonarcloud flags this as 10.2% duplicate code, which is accurate. The Notes.vue (last ticket) and PersonNotes.vue components are near identical. It would be a good move to refactor the Notes.vue component to handle both paths, and then delete PersonNotes.vue at a later time

Worth noting that just adding the necessary keycloak values to the spec.ts files bumped the duplication from 8% -> 10.2%.
That's just 3 lines of code and 100% necessary to make the tests run 🙃

Copy link

sonarqubecloud bot commented Apr 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
9.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@LocalNewsTV LocalNewsTV marked this pull request as ready for review April 4, 2024 15:48
@LocalNewsTV LocalNewsTV linked an issue Apr 4, 2024 that may be closed by this pull request
2 tasks
@LocalNewsTV LocalNewsTV merged commit a1dcb17 into release Apr 4, 2024
8 of 9 checks passed
@LocalNewsTV LocalNewsTV deleted the 2198-drillers-crud branch April 4, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drillers Notes CRUD Functionality
3 participants