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

PIMS-1518: Add Administrative Area #2298

Merged
merged 9 commits into from
Apr 5, 2024

Conversation

GrahamS-Quartech
Copy link
Contributor

🎯 Summary

PIMS-1518

Pretty simple add form as there's not many fields for this data type. Should return you to the table view on submission.

Note that because the sequence for the administrative_area table's PK is not advanced during seeding, you may get failed POST requests after a couple adds. To fix this, simply advance the sequence manually. You can do this with SELECT setval('administrative_area_id_seq', (SELECT MAX(id) FROM administrative_area));. Another ticket will follow to address this with a migration.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

github-actions bot commented Apr 3, 2024

🚀 Deployment Information

The React APP Image has been built with the tag: 2298. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

codeclimate bot commented Apr 3, 2024

Code Climate has analyzed commit 5287f63 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 90.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 94.6%.

View more on Code Climate.

Copy link

github-actions bot commented Apr 3, 2024

🚀 Deployment Information

The Express API Image has been built with the tag: 2298. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 left a comment

Choose a reason for hiding this comment

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

Looks good, I was able to add a few new admin areas ("1000 Mile house" and "1001 Mile house", the first one was inserted with id =1, so had to use that setval to enable the correct sequencing.

The only thing I noticed, was that the sorting was a bit strange as I was expecting the new ones to show at the top of the list, but I had to manually sort by Name ascending to get it to display.

Perhaps the default sort order isn't by name ascending?

image

Copy link
Collaborator

@dbarkowsky dbarkowsky left a comment

Choose a reason for hiding this comment

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

Seems good. I added some default sorting and pagination.
I wonder if we need users to specify the sort order. It doesn't look like it has ever been used for this table.

@GrahamS-Quartech GrahamS-Quartech merged commit a4cae25 into main Apr 5, 2024
9 checks passed
@GrahamS-Quartech GrahamS-Quartech deleted the PIMS-1518-Add-Administrative-Area branch April 5, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants