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

Resident Status Style #210

Merged
merged 3 commits into from
Dec 3, 2023
Merged

Resident Status Style #210

merged 3 commits into from
Dec 3, 2023

Conversation

owen-sellner
Copy link
Contributor

@owen-sellner owen-sellner commented Nov 29, 2023

Notion task link

N/A

Implementation description

  • Added ResidentStatus enum to ResidentTypes.ts to ensure status string values are consistant
  • Updated resident status function in ResidentDirectoryTable.tsx to include "Future" as a status
  • Added getStatusColor method to ResidentDirectoryTable.tsx to convert the status to color

Steps to test

  1. Create three new residents (use create-residents.sh)
  2. Edit the Start Date and End Date for the residents and verify that the status is correct

What should reviewers focus on?

  • Are the colours for the statuses okay? (They match the employee directory)

Screenshot

image

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

Copy link

github-actions bot commented Nov 29, 2023

Visit the preview URL for this PR (updated for commit 50cfd6b):

https://blueprintsupportivehousing--pr210-owen-resident-status-8ysuqk7k.web.app

(expires Sun, 10 Dec 2023 21:10:28 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.

With these bubbles I think it looks better if it's centered in the column similar to how it's done in the Employee Directory
Screenshot 2023-12-02 at 9 26 22 PM

Also, there's a bug if you set the end date to the same date as the current date - it shows Past instead of Current. I believe this has to do with the fact that the new Date() you're making has hours associated with it; if you set the hours, minutes, and seconds, to 0 it should fix this.

Colours on the status looks great tho, frontend god strikes again 💯

status = ResidentStatus.PAST;
}
}
if (currentDate < startDateObj) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could make this an else if lol

Copy link
Contributor

@phamkelly17 phamkelly17 left a comment

Choose a reason for hiding this comment

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

lgtm alpha

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.

LGTM

@owen-sellner owen-sellner merged commit 14817e5 into main Dec 3, 2023
3 checks passed
@owen-sellner owen-sellner deleted the owen/resident-status branch December 3, 2023 21:39
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.

3 participants