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

Refactor Asset Model Import Formatting #6388

Merged
merged 3 commits into from
Oct 3, 2023
Merged

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Oct 3, 2023

WHAT

🤖 Generated by Copilot at 12f9c6f

Backend PR: ohcnetwork/care#1654

This pull request enhances the asset import feature by adding more validation, error handling, and feedback to the frontend components and constants. It also fixes a bug in the AssetImportModal component that affected the data format sent to the backend API.

Proposed Changes

This PR refactors the asset import formatting in the frontend, aligning it with changes made to the backend Asset model. It also enhances error handling, providing more detailed error messages to users.

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

HOW

🤖 Generated by Copilot at 12f9c6f

@Ashesh3 Ashesh3 requested a review from a team October 3, 2023 11:21
@Ashesh3 Ashesh3 requested a review from a team as a code owner October 3, 2023 11:21
@Ashesh3 Ashesh3 requested a review from mathew-alex October 3, 2023 11:21
@vercel
Copy link

vercel bot commented Oct 3, 2023

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

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 1:07pm

@netlify
Copy link

netlify bot commented Oct 3, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 6d56466
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/651c11d3ba3194000816d7c1
😎 Deploy Preview https://deploy-preview-6388--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.

@cypress
Copy link

cypress bot commented Oct 3, 2023

Passing run #1346 ↗︎

0 78 0 0 Flakiness 0

Details:

Refactor Asset Model Import Formatting
Project: CARE Commit: 6d56466fed
Status: Passed Duration: 02:49 💡
Started: Oct 3, 2023 1:10 PM Ended: Oct 3, 2023 1:13 PM

Review all test suite changes for PR #6388 ↗︎

@khavinshankar khavinshankar merged commit 8589460 into develop Oct 3, 2023
29 checks passed
@khavinshankar khavinshankar deleted the asset-import-format branch October 3, 2023 14:52
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

@Ashesh3 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

Ashesh3 added a commit that referenced this pull request Oct 4, 2023
* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress
khavinshankar pushed a commit that referenced this pull request Oct 17, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <[email protected]>
Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Aaron Jevil Nazareth <[email protected]>
Co-authored-by: Pranshu Aggarwal <[email protected]>
Co-authored-by: Gampa Sri Harsh <[email protected]>
Co-authored-by: Tasnimul H. Tauhid <[email protected]>
rithviknishad added a commit that referenced this pull request Oct 17, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <[email protected]>
Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Aaron Jevil Nazareth <[email protected]>
Co-authored-by: Pranshu Aggarwal <[email protected]>
Co-authored-by: Gampa Sri Harsh <[email protected]>
Co-authored-by: Tasnimul H. Tauhid <[email protected]>
Ashesh3 added a commit that referenced this pull request Oct 20, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <[email protected]>
Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Aaron Jevil Nazareth <[email protected]>
Co-authored-by: Pranshu Aggarwal <[email protected]>
Co-authored-by: Gampa Sri Harsh <[email protected]>
Co-authored-by: Tasnimul H. Tauhid <[email protected]>
Ashesh3 added a commit that referenced this pull request Oct 23, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <[email protected]>
Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Aaron Jevil Nazareth <[email protected]>
Co-authored-by: Pranshu Aggarwal <[email protected]>
Co-authored-by: Gampa Sri Harsh <[email protected]>
Co-authored-by: Tasnimul H. Tauhid <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants