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 the logic in the API call to send back partial data when updating a facility in the ModEditFacilitySection.vue #1029

Open
2 tasks
NabbeunNabi opened this issue Feb 11, 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

Currently we send back all the key value pairs when clicking update for a facility within the moderation panel. We would like to use checks to either set the keys to undefined if there are no changes or the value of the change (can be primitive data type or non-primitive) to the appropriate key.

Success

Partial data is being send and is checked manually with what is being sent within the POST request within the network tab. The PR includes screenshots from the firebase emulator database to prove that it is still updating partially or fully and screenshots of the network tab show that partial data is being sent when there are changes to only some keys.

Requirements

  • The logic is refactored to send only partial data for what is change to the backend instead a firehose of the whole object.
  • This has been manually tested and the PR provides screen shots and evidence.

Implementation notes

Run the moderation panel with the documentation and use the comparison for arrays provided in array utils file.

@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 11, 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

2 participants