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

Odi/new main dashboard search #233

Merged
merged 8 commits into from
Dec 14, 2023
Merged

Odi/new main dashboard search #233

merged 8 commits into from
Dec 14, 2023

Conversation

odis43
Copy link
Contributor

@odis43 odis43 commented Dec 5, 2023

Notion ticket link

Ticket Name

Implementation description

  • Implemented the main dashboard search feature (searching for family name)

Steps to test

  1. if cards are rendered properly
  2. if invalid searches are handled correctly

What should reviewers focus on?

  • As above

Checklist

  • [x ] My PR name is descriptive and in imperative tense
  • [ x] 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
  • [x ] I have run the appropriate linter(s)
  • [ x] 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

@odis43 odis43 requested a review from Ezzhingy December 5, 2023 05:01
Copy link

github-actions bot commented Dec 5, 2023

Visit the preview URL for this PR (updated for commit 306344e):

https://childrens-aid-society--pr233-odi-new-main-dashboa-6levieg7.web.app

(expires Wed, 20 Dec 2023 18:27:20 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 93f6cb7bff946a1edd29d684408e6d31442cf0b1

intake_list.append(intake_new)

return jsonify(intake_list), 200
except Exception as error:

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
Copy link
Collaborator

@Ezzhingy Ezzhingy left a comment

Choose a reason for hiding this comment

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

nice work!! searching by family name works nicely 😁
one thing—clicking on view all doesn't work
instead, could we simply remove the view all button, and show all searches with a given family name?

args = request.args
try:
family_name = args.get("family_name")
print(f"Received request for family_name: {family_name}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

lint

if not isinstance(family_name, str):
raise Exception("Family name passed is not of str type")
intakes = Intake.query.filter_by(family_name=family_name).all()
print(intakes)
Copy link
Collaborator

Choose a reason for hiding this comment

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

lint

/>
) : (
<h3 style={{ marginTop: "20px" }}>
Sorry, we couldn`t find that for you.
Copy link
Collaborator

Choose a reason for hiding this comment

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

small nit: wrong apostrophe (` vs ')

@@ -454,3 +454,45 @@

except Exception as error:
return jsonify(str(error)), 400

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
Copy link
Collaborator

@Ezzhingy Ezzhingy left a comment

Choose a reason for hiding this comment

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

small changes—rn subsections are displaying all their cases, rather than the first 4

Comment on lines -57 to -68
{cases.slice(0, 4).map((caseData: CaseCardProps) => {
return (
<CaseCard
key={caseData.caseId}
caseId={caseData.caseId}
referringWorker={caseData.referringWorker}
date={caseData.date}
familyName={caseData.familyName}
caseTag={caseData.caseTag}
/>
);
})}
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think keeping this logic is ok, but maybe u could wrap it with your new showViewAll bool
if showViewAll is true, use the slicing logic
else, display all

@Ezzhingy Ezzhingy self-requested a review December 13, 2023 20:40
Copy link
Collaborator

@Ezzhingy Ezzhingy left a comment

Choose a reason for hiding this comment

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

lgtmm lez goo

@odis43 odis43 merged commit 530472c into main Dec 14, 2023
7 checks passed
@odis43 odis43 deleted the odi/new-main-dashboard-search branch December 14, 2023 00:55
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.

2 participants