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

Added messaging to category edit page to improve clarity around when users will be emailed #13407

Merged
merged 21 commits into from
Aug 9, 2023

Conversation

marcusmoore
Copy link
Collaborator

@marcusmoore marcusmoore commented Aug 4, 2023

Description

This PR adds messages to the category edit page to provide clarity around when users will receive emails when checking out an item from that category.


Taking this page as an example that exists before this PR:
category edit page with text in the category eula page

Users will still receive an email after check out even though Send email to user on checkin/checkout is unchecked because the category has a EULA set (This category's EULA.). This is also the case if no EULA is set but the Use the primary default EULA instead is checked:

category edit page with use the primary default eula instead checked

This PR adds a message explaining when users will be receiving an email and automatically checks and disables the Send email to user on checkin/checkout input:

category edit page with eula text entered and message displayed category edit page with use global eula checked and message displayed

As you can see the category eula text area is also disabled when the primary eula input is checked.

In gif form:
category edit page


Additional Notes

Previously, the checkin_email property in the database for categories was not always accurate since it was possible that an email would be sent due to the conditions mentioned above. Now, if the checkbox is programmatically selected the value is updated in the database as well.


Type of change

  • New feature (non-breaking change which adds functionality)

@shortcut-integration
Copy link

@what-the-diff
Copy link

what-the-diff bot commented Aug 4, 2023

PR Summary

  • Addition of a New Livewire Component
    A new file app/Http/Livewire/CategoryEditForm.php was added. This enhances our platform's modularity by introducing a new livewire component that handles category editing.

  • Localization of Emails
    Translations for email messages were added in the resources/lang/en/admin/categories/general.php file. This will improve the user experience for non-English speakers by providing communications in their native language.

  • Modification in Category Edit View
    The resources/views/categories/edit.blade.php file was modified to include a Livewire component called category-edit-form. This integration will streamline the category editing process, making it easier for admins to manage categories.

  • Creation of a new View for Category Edit Form
    A new view was created in resources/views/livewire/category-edit-form.blade.php. This will separate the logic of editing categories from the User Interface (UI), making the code easier to maintain and understand.

  • Introduction of new Feature Test
    A new file tests/Feature/Livewire/CategoryEditFormTest.php was introduced. This ensures the new ‘category edit form’ feature works as expected, improving the overall stability and reliability of our application.

@marcusmoore marcusmoore marked this pull request as ready for review August 7, 2023 19:47
@marcusmoore marcusmoore requested a review from snipe as a code owner August 7, 2023 19:47
@marcusmoore
Copy link
Collaborator Author

(The ChipperCI error should be fixed in #13414)

@snipe snipe merged commit a6a742d into snipe:develop Aug 9, 2023
@marcusmoore marcusmoore deleted the feature/sc-23465 branch August 9, 2023 17:32
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.

2 participants