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

Add self checkout for consumable

Open veenone opened this issue 2 years ago • 0 comments

Description

This PR adds self-checkout functionality to consumable (#10745). the current implementation based on the current develop branch. However fully updated feature will be related to PR #10842 which has checkout notes & multiple number to be checked out

Type of change

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)
  • [x] This change requires a documentation update

How Has This Been Tested?

[x] The self checkout functionalities checked and make sure to have the same behavior as the original checkout with single difference on the removal of admin part. [x] function access based on defined permission of different user has been validated

Test Configuration:

  • PHP version: 7.4.27
  • MySQL version : 10.4.22
  • Webserver version: Apache 2.4.52
  • OS version: Windows 10

Checklist:

  • [x] I have read the Contributing documentation available here: https://snipe-it.readme.io/docs/contributing-overview
  • [x] I have formatted this PR according to the project guidelines: https://snipe-it.readme.io/docs/contributing-overview#pull-request-guidelines
  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] 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

implementation

  • new permission under consumables is added for self checkout image

  • new self checkout button is added in the consumables table and should be enabled if the permission is allowed image

  • new self checkout button is added in consumable view as well (implemented now) image

  • in the consumable history, admin name in self checkout will be marked as selfcheckout instead of admin name image

  • email template also update to reflect the checkout mode image

No blocking points

~~# current blocking~~

~~Currently the permission of self checkout is not properly linked, so in consumable index, the Gate for selfcheckout value is null instead of true / false. is there anybody could point out where this link should be created? 🆘~~ ~~available_actions in consumabletransformer has been added and recognized by gate, but not the value.. it seems I'm a little bit stuck on this topic 😕~~ ~~it would be very appreciated if someone could help me on this 🙇‍♂️~~

veenone avatar Apr 13 '22 16:04 veenone