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

Removed Oxygen Details from Update Facility form #7796

Closed

Conversation

609harsh
Copy link
Contributor

Proposed Changes

@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

@609harsh 609harsh requested a review from a team as a code owner May 11, 2024 12:13
Copy link

vercel bot commented May 11, 2024

@609harsh is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

netlify bot commented May 11, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit eb939dc
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/665aeafed3120500084327ea
😎 Deploy Preview https://deploy-preview-7796--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 configuration.

@nihal467
Copy link
Member

@609harsh modify the existing cypress test related to facility creation as it is currently failing

Copy link

👋 Hi, @609harsh,
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.

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label May 15, 2024
@609harsh
Copy link
Contributor Author

Hi @rithviknishad these are the following updates in ui

image
image
image
image

on Update Facility page
image

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label May 20, 2024
@609harsh
Copy link
Contributor Author

@609harsh modify the existing cypress test related to facility creation as it is currently failing

Please review the modified cypress test

@@ -52,7 +52,7 @@ export const FacilityHome = (props: any) => {
const [editCoverImage, setEditCoverImage] = useState(false);
const [imageKey, setImageKey] = useState(Date.now());
const authUser = useAuthUser();

console.log("hell", props);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
console.log("hell", props);

}: any) => {
const [oxygenDetailsModalOpen, setOxygenDetailsModalOpen] = useState(false);

let capacityList: any = null;
Copy link
Member

Choose a reason for hiding this comment

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

any type is not allowed. define proper types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will "let capacityList: ReactElement | null = null" be good? Since it will contain React element(reference line 25 or Line 38)
Moreover this file is almost in similar pattern with and FacilityBedCapacity.tsx. Should there also this variable be modified?

Comment on lines 95 to 97
handleUpdate={() => {
facilityFetch();
}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
handleUpdate={() => {
facilityFetch();
}}
handleUpdate={() => facilityFetch()}

Comment on lines 139 to 142
handleUpdate={() => {
facilityFetch();
return;
}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
handleUpdate={() => {
facilityFetch();
return;
}}
handleUpdate={() => facilityFetch()}

Comment on lines +80 to +94
oxygen_type === 1
? facilityData?.oxygen_capacity
: oxygen_type === 2
? facilityData?.type_b_cylinders
: oxygen_type === 3
? facilityData?.type_c_cylinders
: facilityData?.type_d_cylinders,
expectedBurnRate:
oxygen_type === 1
? facilityData?.expected_oxygen_requirement
: oxygen_type === 2
? facilityData?.expected_type_b_cylinders
: oxygen_type === 3
? facilityData?.expected_type_c_cylinders
: facilityData?.expected_type_d_cylinders,
Copy link
Member

Choose a reason for hiding this comment

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

use a map instead? where keys are the oxygen_type and values are the capacity?

@nihal467
Copy link
Member

@609harsh

image

  • when we open the add oxygen pop-up, the input field are having 0 as by-default value, it should be blank input , similar to the staff and bed capacity pop-up we have

image

  • Already added oxygen type, should be hidden in the dropdown of oxygen type

image

  • when we are editing pop-up of oxygen detail, disable the oxygen type as we wont be changing it, similar to the staff capacity pop-up

image

  • when we click on the save and add more button, it shouldn't close the pop-up similar to the staff capacity pop-up

Note: Always try to check the similar existing behavior functions (staff capacity pop-up or bed capacity pop-up), in the platform and do a basic functionality check to increase the quality of PR

@@ -24,6 +24,10 @@ describe("Facility Manage Functions", () => {
const currentOccupied = "80";
const totalUpdatedCapacity = "120";
const currentUpdatedOccupied = "100";
const totalOxygenCapacity = "100";
Copy link
Member

Choose a reason for hiding this comment

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

delete the existing unused constants or reuse them when you are modifying the existing test

Copy link
Contributor Author

@609harsh 609harsh Jun 1, 2024

Choose a reason for hiding this comment

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

new ones are added for oxygen and earlier ones are for doctor and bed. no constants are unused

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label May 29, 2024
Copy link

👋 Hi, @609harsh,
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.

@609harsh
Copy link
Contributor Author

609harsh commented Jun 1, 2024

hi @nihal467 regarding the last query currently i am sending down props from parent to use oxygen related. In order to prevent popup closing we need a new endpoint to fetch and update information related to oxygen only (similar to what is followed in staff capacity pop-up or bed capacity pop-up).
Please refer to this issue's thread
#7758 (comment)

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Jun 3, 2024
@rithviknishad
Copy link
Member

@609harsh you could simply pass the refetch callback from the useQuery and call that instead to refresh latest information.

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

👋 Hi, @609harsh,
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.

@gigincg
Copy link
Member

gigincg commented Aug 5, 2024

@609harsh Can you update the PR?

@gigincg gigincg self-assigned this Aug 5, 2024
@bodhish
Copy link
Member

bodhish commented Sep 20, 2024

Closing this PR due to lack of recent progress.

@bodhish bodhish closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes required merge conflict pull requests with merge conflict test failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up Facility registration form
5 participants