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

Disable save and delete buttons in QCBX overlay in app resources #4891

Merged
merged 9 commits into from
May 21, 2024

Conversation

CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented May 6, 2024

Fixes #4886

Checklist

  • Self-review the PR after opening it to make sure the changes look good
    and self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Go to app resources -> form definition
  • Click on any table with a query combo box in the form (e.g. collection object with the accession qcbx)
  • In visual editor click the add button for the query combo box
  • Fill out some information in the form
  • verify save button is disabled
  • verify there is no delete button

@CarolineDenis CarolineDenis added this to the 7.9.6 milestone May 6, 2024
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

take a look at how FormMeta displays different dialog based on whether it's in the form editor or not, and do something similar here, rather than URL parsing

@CarolineDenis
Copy link
Contributor Author

@maxpatiiuk ,
Not sure what you mean, it is just not returned from useResourceView().
How would this apply to the subforms in app resources?

@maxpatiiuk
Copy link
Member

Not sure what you mean, it is just not returned from useResourceView().
How would this apply to the subforms in app resources?

I should clarified that I meant look at how that place detects if it's in the form meta and do something similar to detect if you are in the form editor in here rather than URL parsing

see #4891 (comment)

@CarolineDenis CarolineDenis requested review from maxpatiiuk and a team May 8, 2024 10:27
@CarolineDenis CarolineDenis marked this pull request as ready for review May 8, 2024 10:27
Copy link
Contributor

@melton-jason melton-jason left a comment

Choose a reason for hiding this comment

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

Very clean!

Currently, you can also delete resources through the form editor.
Is this also something we want to disable?

@CarolineDenis
Copy link
Contributor Author

Very clean!

Currently, you can also delete resources through the form editor. Is this also something we want to disable?

@grantfitzsimmons ?

@grantfitzsimmons
Copy link
Member

Currently, you can also delete resources through the form editor. Is this also something we want to disable?

@CarolineDenis I think so!

@melton-jason melton-jason changed the title Disable save button in QCBX overlay in app resources Disable save and delete buttons in QCBX overlay in app resources May 9, 2024
@lexiclevenger
Copy link
Collaborator

Previewing record formatters using existing records also allows the user to edit and save those records, as well as create and delete records using the query combo boxes. Is that also something that should be addressed in this PR?

@CarolineDenis
Copy link
Contributor Author

@lexiclevenger,
We can create a new Issue for that

Copy link
Collaborator

@combs-a combs-a left a comment

Choose a reason for hiding this comment

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

  • verify save button is disabled
  • verify there is no delete button

image

image

This looks good, no delete button and save is disabled even when you go through multiple records it seems. Good work!

@combs-a combs-a requested a review from a team May 13, 2024 16:21
Copy link

@alesan99 alesan99 left a comment

Choose a reason for hiding this comment

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

  • Go to app resources -> form definition
  • Click on any table with a query combo box in the form (e.g. collection object with the accession qcbx)
  • In visual editor click the add button for the query combo box
  • Fill out some information in the form
  • verify save button is disabled
  • verify there is no delete button

Can't save or delete, as expected!

@CarolineDenis CarolineDenis merged commit 87e7371 into production May 21, 2024
9 checks passed
@CarolineDenis CarolineDenis deleted the issue-4886 branch May 21, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Can create new records using a query combo box in the visual editor for form definitions
7 participants