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

Log record many residents frontend #189

Merged

Conversation

carolynzhang18
Copy link
Contributor

@carolynzhang18 carolynzhang18 commented Nov 2, 2023

Notion task link

Log Record Can Have Many Residents

Implementation description

  • Frontend: allow user to multiselect residents when creating and editing logs; display multiple residents in record in log records table

Steps to test

  1. Migrate database: bash ./scripts/flask-db-upgrade.sh
  2. Create log: (a) Try making a log with no residents selected - this should give an error. (b) Select multiple residents from the dropdown, play around with adding and removing residents from the selected list. After submitting the new log, you should see all of the residents you selected in the corresponding record in the log records table.
  3. Edit log: When you edit a log, the previously selected residents should be pre-selected for you. Try removing residents and adding residents to the list. After submitting the edited log, you should see your changes in the corresponding record in the log records table.
  4. Delete log

What should reviewers focus on?

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR
  • If I have made API changes, I have updated the REST API Docs
  • IF I have made changes to the db/models, I have updated the Data Models Page
  • I have documented this PR in the Production Release Page
  • I have updated other Docs as needed

@braydonwang braydonwang changed the base branch from main to log-record-many-residents November 5, 2023 05:26
Copy link

github-actions bot commented Nov 5, 2023

Visit the preview URL for this PR (updated for commit 7432af9):

https://blueprintsupportivehousing--pr189-log-record-many-resi-xw5v4344.web.app

(expires Thu, 30 Nov 2023 00:43:46 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f6bcdba7452bf82a6ec1a299c37d1bdff7870d09

Copy link
Collaborator

@connor-bechthold connor-bechthold left a comment

Choose a reason for hiding this comment

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

everything looks good - one thing I noticed is with the styling of the dropdown modal for the create/edit:
Screenshot 2023-11-11 at 7 52 07 PM
Screenshot 2023-11-11 at 7 52 13 PM

you'll just have to update the design styling for that box (to match what's done for the employee dropdown there) and you should be good to go!

there's a chance we'll have to slightly modify this once the final designs are in but the changes should be super minimal so this really helps!!

Connor Bechthold and others added 3 commits November 12, 2023 01:19
* add invite user script

* update README

* readme formatting

* update readme one last time

* update readme one last time
Copy link
Collaborator

@connor-bechthold connor-bechthold left a comment

Choose a reason for hiding this comment

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

Few things and then you can merge this in (I'm gonna approve it tho)

  • Edit log residents dropdown styling
  • The log records table column name should be changed from Resident to Residents
Screenshot 2023-11-22 at 3 51 10 PM

GREAT WORK WITH THIS!!! The client will love this change 😎

(item) => item.label === logRecord.residentId,
onChange={handleResidentsChange}
defaultValue={residentOptions.filter(
(item) => logRecord.residents.includes(item.label),
)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like the styling on this Edit Resident dropdown (you can see its different on the form), so adding styles={selectStyle} should solve this

@carolynzhang18 carolynzhang18 merged commit 7432af9 into log-record-many-residents Nov 23, 2023
1 check passed
@carolynzhang18 carolynzhang18 deleted the log-record-many-residents-frontend branch November 23, 2023 00:43
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.

4 participants