snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Adds quantity of accessories and consumables to checkout.

Open Godmartinz opened this issue 11 months ago • 3 comments

Description

This allows for users to checkout multiple Accessories and Consumables of the same type at the same time. image image

Only one email is sent with a quantity listed. image

The action log still logs each accessory or consumable checked out.

image

Checkins for accessories remains singular.

Fixes #7348

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [ ] Test A
  • [ ] Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

  • [ ] I have read the Contributing documentation available here: https://snipe-it.readme.io/docs/contributing-overview
  • [ ] I have formatted this PR according to the project guidelines: https://snipe-it.readme.io/docs/contributing-overview#pull-request-guidelines
  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes

Godmartinz avatar Feb 27 '24 21:02 Godmartinz

PR Summary

  • Enhanced User-Accessory Interaction In AccessoryCheckoutController.php, a new feature was added that allows for multiple accessories to be linked to users based on specified quantities. In addition, an event is now initiated each time an attachment occurs which can be useful for tracking and logs.

  • Enhanced User-Consumable Interaction Similar to the accessories, the ConsumableCheckoutController.php now has a feature for attaching multiple consumables to users depending on the provided quantities. After each attachment, an event is also triggered for easy tracking.

  • User Interface Update for Accessories An update was made to the accessories directory's checkout.blade.php file. This update includes a new input field that enables users to specify the quantity of accessories they want to check out.

  • User Interface Update for Consumables Analogous to the accessories update, the consumables directory's checkout.blade.php file now has a new input field. This enables users to determine the quantity of consumables they intend to check out.

what-the-diff[bot] avatar Feb 27 '24 21:02 what-the-diff[bot]

@snipe all good here?

Godmartinz avatar May 13 '24 17:05 Godmartinz

Hey, this would be really neat, can we expect it to be merged before v7 or only after the big version bump?

Glukose1 avatar Jun 12 '24 09:06 Glukose1

Check. Looks good. All works.

bzeus avatar Jul 18 '24 20:07 bzeus

Check. Looks good. All works.

What's changed?

addex12 avatar Jul 19 '24 06:07 addex12

The Problem her is one thing. When sending an email of assigned consumables and or any, it will list all the items with the same name and category all the way down.

For Example: if there is 200 Pen assigned to one person it is sending 200 pen listed all the way down. Is there any fix for this? Like putting Name of Consumable and Qty only ratherthan repeating the list of same item in email.

Any update on this?

addex12 avatar Jul 19 '24 06:07 addex12

@Godmartinz Sorry I didn't merge this one - I think it can be closed though, since we already added that functionality in other PRs.

snipe avatar Jul 19 '24 16:07 snipe