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

Fixed #13317 Accessories declined by user remain assigned #13453

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

inietov
Copy link
Collaborator

@inietov inietov commented Aug 14, 2023

Description

When an accessory is checked out and acceptance is required, if the user rejects the asset it remains assigned to them. This is contrary to the behavior on assets which are unassigned if declined, so I added the declinedCheckout method to the Accessory model.

Then, as the linked issue remarks, the signature when the asset is rejected is not showed in history. I also add this to the declined item functionality. Maybe is a little out of scope, but I think it's a small change and can be made here.

Fixes #13317

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • PHP version: 8.1
  • MySQL version: 8.0.31
  • Webserver version: PHP dev server
  • OS version: Debian 11

Checklist:

@what-the-diff
Copy link

what-the-diff bot commented Aug 14, 2023

PR Summary

  • Enhancements to 'AcceptanceController.php'

    • The script now ensures the directories eula-pdfs and signatures exist before they are needed. This resolves any potential issues due to their absence.
    • This update also introduces the ability to save a signature as an image file during item acceptance, providing a stronger authentication measure.
    • Moreover, if no signature image data is given during item acceptance, the user will now be redirected back with an error message, enhancing the system's validation process.
    • The declined notification has been improved to include a signature field, providing more detailed information when an item is not accepted.
    • Our system can now generate and save a PDF if the pdf_view_route is specified, adding to its existing functionality.
    • A change has been made to the execution of the $acceptance->decline() method whereby the $sig_filename parameter is included. This provides a more detailed log in declined transactions.
  • Addition to 'Accessory.php' file

    • A new method, declinedCheckout(), has been introduced to handle declined checkouts for accessories. This creates a more streamlined process for managing the denial of checkout requests for different accessory items.

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

I tested this locally and it works 👍🏾

One minor request but overall good stuff 😄

app/Models/Accessory.php Outdated Show resolved Hide resolved
@inietov
Copy link
Collaborator Author

inietov commented Aug 15, 2023

Kindly pinging @snipe, this looks ok to you? or need some more work?

@snipe snipe merged commit aafb766 into snipe:develop Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants