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

Refactor ModEditSubmissionForm.vue to use the broken out sections #1036

Open
5 tasks
NabbeunNabi opened this issue Feb 12, 2025 · 0 comments
Open
5 tasks

Refactor ModEditSubmissionForm.vue to use the broken out sections #1036

NabbeunNabi opened this issue Feb 12, 2025 · 0 comments
Assignees
Labels
code quality enhancement New feature or request moderation panel pair programming This is a ticket that is good to pair with someone on

Comments

@NabbeunNabi
Copy link
Contributor

Problem

Our ModEditSubmissionForm.Vue is really long and very hard to read. It also isn't DRY as we are rewriting the same logic and inputs where the data matches the Healthcare Professional Data and the Facility Data. We now have these sections of the form broken out into two sections that can contain logic to conditionally render inputs and do different logic based on the moderationStore.activeScreen. We need to refactor this form to use the existing sections, while preserving the functionality to update the submission. We also will need to refactor tests and possibly test files between moderationDashboard and the moderationEditSubmissionForm

Success

The ModEditSubmissionForm.vue is refactored using the ModEditFacilitySection.vue and the ModEditHealthcareProfessionalSection.vue. It conditionally renders DOM elements based on the active screen as well as conditionally rendering logic for functionality. The sections should maintain their functionality and the Submission Form itself should maintain functionality. Tests are refactored or written where necessary in order to test the conditional rendering of the DOM elements.

Requirements

  • Refactor the ModEditSubmissionForm.vue to use the two sections of ModEditHealthcareProfessionalSection.vue and ModEditFacilitySection.vue
  • Maintain the functionality of the Submission Form while maintaining the functionality for editing a Healthcare Professional and a Facility
  • Use the section fields within the healthcareProfessionalsStore.ts and facilitiesStore.ts and autofill them with the selected submission data from the moderationsSubmissionStore.ts
  • Update the tests in cypress to follow the new structure and existence of DOM elements.
  • Manually test that the data is updating correctly with screenshots as proof in the PR

Implementation notes

This can be broken down into multiple PRs

  1. For the Healthcare professional section
  2. For the facility sections

Relevant files as of now that I can think of are as follows:

  1. Stores
  1. Vue components
  1. Test files
@NabbeunNabi NabbeunNabi added code quality enhancement New feature or request moderation panel pair programming This is a ticket that is good to pair with someone on labels Feb 12, 2025
@NabbeunNabi NabbeunNabi self-assigned this Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality enhancement New feature or request moderation panel pair programming This is a ticket that is good to pair with someone on
Projects
None yet
Development

No branches or pull requests

1 participant