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

Redesigned Facility Home Page #3819

Merged
merged 27 commits into from
Nov 17, 2022

Conversation

GokulramGHV
Copy link
Member

@GokulramGHV GokulramGHV commented Oct 24, 2022

fixes #3757
fixes #3804
fixes #4007
fixes #3713

Proposed Changes

  • Redesigned Facility Home Page

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

@netlify
Copy link

netlify bot commented Oct 24, 2022

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 51ac8b9
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/637629b6723509000965a5aa
😎 Deploy Preview https://deploy-preview-3819--care-egov-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Oct 26, 2022
@github-actions
Copy link

👋 Hi, @GokulramGHV,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@vercel
Copy link

vercel bot commented Oct 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
care-storybook ✅ Ready (Inspect) Visit Preview Nov 17, 2022 at 0:33AM (UTC)

@GokulramGHV GokulramGHV removed the merge conflict pull requests with merge conflict label Oct 27, 2022
@nihal467
Copy link
Member

nihal467 commented Nov 2, 2022

@GokulramGHV
image

  • triage is not responsive in mobile view

image

  • in the oxygen table is not responsive

Comment on lines 199 to 202
.btn-secondary {
@apply px-4 py-3 border bg-white border-primary-500 rounded font-medium text-sm text-primary-500 flex justify-center items-center gap-2 hover:bg-primary-500 hover:text-white transition duration-300 ease-in-out
}

Copy link
Member

@rithviknishad rithviknishad Nov 3, 2022

Choose a reason for hiding this comment

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

@GokulramGHV revert this, and use the new ButtonV2 with type/style="secondary" instead of adjusting classes.

Comment on lines 20 to 28
<Transition
as={Fragment}
enter="transition ease-out duration-100"
enterFrom="transform opacity-0 scale-95"
enterTo="transform opacity-100 scale-100"
leave="transition ease-in duration-75"
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
Copy link
Member

@rithviknishad rithviknishad Nov 3, 2022

Choose a reason for hiding this comment

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

Replace this with already implemented DropdownTransition since we need consistent dropdown animation for all types of dropdowns, which is already a wrapper around headlessui's transition.

Comment on lines 72 to 82
<svg
className="w-5 h-5"
viewBox="0 0 14 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M7 8C9.20938 8 11 6.20937 11 4C11 1.79063 9.20938 0 7 0C4.79063 0 3 1.79063 3 4C3 6.20937 4.79063 8 7 8ZM4 9.725C1.6875 10.4031 0 12.5406 0 15.0719C0 15.5844 0.415625 16 0.928125 16H13.0719C13.5844 16 14 15.5844 14 15.0719C14 12.5406 12.3125 10.4031 10 9.725V11.3125C10.8625 11.5344 11.5 12.3188 11.5 13.25V14.5C11.5 14.775 11.275 15 11 15H10.5C10.225 15 10 14.775 10 14.5C10 14.225 10.225 14 10.5 14V13.25C10.5 12.6969 10.0531 12.25 9.5 12.25C8.94687 12.25 8.5 12.6969 8.5 13.25V14C8.775 14 9 14.225 9 14.5C9 14.775 8.775 15 8.5 15H8C7.725 15 7.5 14.775 7.5 14.5V13.25C7.5 12.3188 8.1375 11.5344 9 11.3125V9.52812C8.8125 9.50937 8.62188 9.5 8.42813 9.5H5.57188C5.37813 9.5 5.1875 9.50937 5 9.52812V11.5719C5.72188 11.7875 6.25 12.4563 6.25 13.25C6.25 14.2156 5.46562 15 4.5 15C3.53437 15 2.75 14.2156 2.75 13.25C2.75 12.4563 3.27813 11.7875 4 11.5719V9.725ZM4.5 14C4.91563 14 5.25 13.6656 5.25 13.25C5.25 12.8344 4.91563 12.5 4.5 12.5C4.08437 12.5 3.75 12.8344 3.75 13.25C3.75 13.6656 4.08437 14 4.5 14Z"
fill="white"
/>
</svg>
Copy link
Member

Choose a reason for hiding this comment

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

use unicons or move svg's to constants and make it tailwind compatible instead of hardcoding the colors.

@rithviknishad rithviknishad added the Major Code Change This Tag represent PR, which will be causing major Code change in the platform label Nov 14, 2022
@nihal467
Copy link
Member

@GokulramGHV PR looks good to me. Marking it as "Team discussion required" for final approval

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Nov 16, 2022
@github-actions
Copy link

👋 Hi, @GokulramGHV,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@rithviknishad rithviknishad removed the merge conflict pull requests with merge conflict label Nov 16, 2022
@nihal467
Copy link
Member

PR final design approved, @khavinshankar it is good to merge

Copy link
Member

@khavinshankar khavinshankar left a comment

Choose a reason for hiding this comment

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

@GokulramGHV some minor changes

Comment on lines 53 to 59
useEffect(() => {
setTimeout(() => {
if (props.current_capacity && props.total_capacity)
setPercentage((props.current_capacity * 100) / props.total_capacity);
}, 1000);
}, [isVisible, percentage, props.current_capacity, props.total_capacity]);

Copy link
Member

Choose a reason for hiding this comment

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

can't we calculate the percentage directly without the useEffect, and why timeout?

src/Components/Facility/FacilityHome.tsx Outdated Show resolved Hide resolved
src/Components/Facility/HospitalList.tsx Outdated Show resolved Hide resolved
@khavinshankar khavinshankar added question Further information is requested changes required labels Nov 17, 2022
@sonarcloud
Copy link

sonarcloud bot commented Nov 17, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@khavinshankar khavinshankar merged commit 4f8c363 into ohcnetwork:develop Nov 17, 2022
aeswibon pushed a commit to aeswibon/care_fe that referenced this pull request Dec 8, 2022
* added table and dropdown menu

* added doctorCountCard and Triage Table

* changed few icons

* changed facility feature type icons

* used ButtonV2 for add patient button

* fixed table component and refactored code

* made the menu button customizable

* Revert "made the menu button customizable"

This reverts commit 402cffe.

* ButtonV2: border for ghost variants

* authorized for ButtonV2 access control

* deprecate `RoleButton`

* fix contextual colors

* improve tailwind component: DropDownItem

* improve how component authorization is defined

* remove console.log

* hide dropdown item if not authorized

* added ContactLink component

* Update src/Components/Common/components/ContactLink.tsx

Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>

* Fixed bedTypeCard animation & refactored some code

Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done Major Code Change This Tag represent PR, which will be causing major Code change in the platform redesign tested
Projects
None yet
4 participants