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

Unnecessary API Calls in Assets Update Page #9189

Open
nithish1018 opened this issue Nov 22, 2024 · 11 comments · May be fixed by #9192
Open

Unnecessary API Calls in Assets Update Page #9189

nithish1018 opened this issue Nov 22, 2024 · 11 comments · May be fixed by #9192
Assignees

Comments

@nithish1018
Copy link
Contributor

Describe the bug
In Assets update page, the form is allowing users to raise a PUT API call even when there's no change in the data, the same thing is present in in Service History update too

To Reproduce
Steps to reproduce the behavior:

  1. Go to '/Assets'
  2. Click on any asset
  3. Select Update
  4. Scroll Down and choose update without making any change
  5. See Error

Expected behavior

Update Button should be deactived when there's no change in the data

Screenshots

20241122-1349-40.8986411.mp4

Desktop

  • OS: Windows
  • Browser Chrome
  • Version Latest
@nithish1018
Copy link
Contributor Author

@Jacobjeevan I'd like to work on this issue

@Jacobjeevan
Copy link
Contributor

Jacobjeevan commented Nov 22, 2024

Go ahead and see if you can convert the form in AssetCreate to use Form component (like in CreatePrescriptionForm.tsx) @nithish1018

@Jacobjeevan Jacobjeevan added this to Care Nov 22, 2024
@github-project-automation github-project-automation bot moved this to Triage in Care Nov 22, 2024
@Jacobjeevan Jacobjeevan moved this from Triage to Wishlist in Care Nov 22, 2024
@Jacobjeevan Jacobjeevan moved this from Wishlist to Up Next in Care Nov 22, 2024
@rajku-dev
Copy link

Hi @Jacobjeevan , I would like to work on this issue.

@Jacobjeevan
Copy link
Contributor

Hi @Jacobjeevan , I would like to work on this issue.

I see you have opened a PR, but please do not work on issues that have already been assigned to someone else.

Moreover, your PR doesn't make use of the Form component as mentioned above.

@nithish1018 how far along are you on this issue?

@nithish1018
Copy link
Contributor Author

Hi @Jacobjeevan , I would like to work on this issue.

I see you have opened a PR, but please do not work on issues that have already been assigned to someone else.

Moreover, your PR doesn't make use of the Form component as mentioned above.

@nithish1018 how far along are you on this issue?

I haven't started working on that issue, it's ok if someone wants to take it up

@github-actions github-actions bot added needs-triage question Further information is requested labels Nov 24, 2024
@Jacobjeevan
Copy link
Contributor

Ok, reassigning to @rajku-dev since there's a PR open (but please don't do this again, thanks).

@Jacobjeevan Jacobjeevan assigned rajku-dev and unassigned nithish1018 Nov 24, 2024
@Jacobjeevan Jacobjeevan removed question Further information is requested needs-triage labels Nov 24, 2024
@Jacobjeevan
Copy link
Contributor

Jacobjeevan commented Nov 24, 2024

There's a PR open (#8956) that modified Form component to have a dirty state, so that would take care of the original issue, once we switch this page to use form component.

@rajku-dev
Copy link

rajku-dev commented Nov 24, 2024

There's a PR open (#8956) that modified Form component to have a dirty state, so that would take care of the original issue, once we switch this page to use form component.

I'm sorry, didn't knew about that since i am new to open source.
talking about issue, i have solved the problem but by not using Form component, but for a future safe code, I would implement wrapping the assetCreate form with Form Component.

@rajku-dev
Copy link

Hi @Jacobjeevan , I have completed wrapping the form inside AssetCreate Page with Form component, making customary changes in validators, submit handlers etc.. to fit for Form component, the UI is also working fine
Can I make a pull request now for review?

@github-actions github-actions bot added needs-triage question Further information is requested labels Nov 25, 2024
@Jacobjeevan
Copy link
Contributor

Hi @Jacobjeevan , I have completed wrapping the form inside AssetCreate Page with Form component, making customary changes in validators, submit handlers etc.. to fit for Form component, the UI is also working fine Can I make a pull request now for review?

Yea, but make sure you are changing the existing PR request rather than opening a new one.

@Jacobjeevan Jacobjeevan removed question Further information is requested needs-triage labels Nov 25, 2024
@rajku-dev
Copy link

rajku-dev commented Nov 25, 2024

@Jacobjeevan I have updated #9192 with new commits.
Please review and let me know if further work has to be done.

form_comp.mp4

@Jacobjeevan Jacobjeevan moved this from Up Next to Review required in Care Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review required
Development

Successfully merging a pull request may close this issue.

3 participants