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

Pet attachments: if no file is provided I should be notified when I click attach #1221

Open
kasugaijin opened this issue Dec 8, 2024 · 0 comments
Labels
Ready Make a comment to get assigned.

Comments

@kasugaijin
Copy link
Collaborator

Log in as staff and go to a pet photos and files tabs. Click attach and you will see a flash that the upload was successful, even if no attachments were provided. Change this to render an alert saying 'Please select a file to attach'.

Please add the logic to this concern module AttachmentManageable and call in the appropriate action, ideally in a before_action filter. This logic to check there is a file should work as follows when the user clicks the attach button:

  • if no attachments provided an, shows the above alert
  • if one attachment provided, continues with happy path
  • if two attachments provided, continues with happy path

It would be good to add some controller tests for this behaviour.

@kasugaijin kasugaijin added the Ready Make a comment to get assigned. label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready Make a comment to get assigned.
Projects
None yet
Development

No branches or pull requests

1 participant