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

WIP - Fixes #15185 - adds accessories to locations and asset screens #15235

Closed
wants to merge 28 commits into from

Conversation

snipe
Copy link
Owner

@snipe snipe commented Aug 7, 2024

WIP. The previous PR did not allow admins to see the accessories checked out to locations or assets on the location or asset pages themselves, which would make for a very confusing user experience. Unfortunately, this PR is big since there was a lot still left to do :(

Still working on it, but I don't know if I'll be able to finish it before I leave for vacation.

Since the locations tabs can get very crowded, I'm also experimenting with icons instead of text:

Screenshot 2024-08-07 at 5 17 34 PM

Things remaining

  • clean up the morph relationships - I think we can make these a little cleaner
  • pull out the AccessoryCheckout controller - I don't think we actually need it
  • add the tab for accessories checked out to assets
  • fix the tab for accessories checked out to locations: either pull the "checked out to" (since it's obvious anyway) or figure out why the assignedTo coms up blank on that endpoint
  • account for the new accessories in the print assigned options for locations
  • revert Partial revert for checkout accessories to non user #15241 once this is all working properly

Copy link

what-the-diff bot commented Aug 7, 2024

PR Summary

  • Improvement in Accessories Tracking
    We improved the way we handle data related to accessories. A new method called 'transformCheckedoutAccessory' has been incorporated and its implementation has been updated across various controllers including Accessories, Locations, and Assets Controllers.

  • Assigned Accessories Tracking at Locations
    Locations Controller got an update with a new method 'assignedAccessories'. This will enhance our tracking of the accessories allocated to various locations.

  • New Compact Location Information
    We introduced a new method called 'transformLocationCompact' to LocationsTransformer, allowing efficient representation of location-related data within the LocationsController.

  • Improved User Information Handling
    UsersTransformer saw an update with the introduction of 'transformUserCompact', a method that enables efficient handling of user-specific information within the AccessoriesTransformer.

  • Extended Accessory Details
    The method 'transformCheckedoutAccessory' in AccessoriesTransformer has been revised to include extra fields, giving us better detail about each accessory.

  • Better Filtering in AccessoryCheckout
    The AccessoryCheckout model has been updated to filter by assigned type, enhancing our visibility of which types of accessories are allocated.

  • Enhanced Interface for Accessories
    AccessoryPresenter now includes a new layout for showing assigned accessories, introducing a better user experience.

  • UI Updates for Accessories and Locations
    The user interface for 'accessories' and 'locations' now includes a new tab dedicated to assigned accessories, providing users with a more holistic view of accessory allocation.

  • Enhanced API for Accessories Retrieval
    A new API route has been incorporated to fetch the assigned accessories for a location, allowing for more targeted data retrieval.

snipe added a commit that referenced this pull request Dec 2, 2024
@snipe snipe closed this Dec 2, 2024
uberbrady pushed a commit to uberbrady/snipe-it that referenced this pull request Dec 16, 2024
DarthKillian added a commit to DarthKillian/eti-assets that referenced this pull request Dec 31, 2024
* Versioning stuff is hard - fixed v7.0.14 to v7.1.14

Signed-off-by: snipe <[email protected]>

* Versioning stuff is hard - fixed v7.0.14 to v7.1.14

Signed-off-by: snipe <[email protected]>

* this should work in theory - local is screwy though

* working except for null 🤔

* seems to work just fine now, needs translations

* note and rm dump and comment

* Specify table name in select

Signed-off-by: snipe <[email protected]>

* Add @maciej-poleszczyk as a contributor

* Fixed snipe#15812 - regression in action_type search

Signed-off-by: snipe <[email protected]>

* Removed Twitter links

Signed-off-by: snipe <[email protected]>

* Removed extra sort

Signed-off-by: snipe <[email protected]>

* Fixed anchor links

Signed-off-by: snipe <[email protected]>

* replace the via channel class

* removes tag if qr code is not present

* translations and attribute names

* fixed rest of dymos

* rm unnecessary imports

* Corrected route name for filestable on assets

Signed-off-by: snipe <[email protected]>

* Fixed delete model file route

Signed-off-by: snipe <[email protected]>

* oops, something went wrong translation

* Fixed snipe#15820 - added model number to view-assets

Signed-off-by: snipe <[email protected]>

* Additional fix for snipe#15817

Signed-off-by: snipe <[email protected]>

* Fixed snipe#15825

Signed-off-by: snipe <[email protected]>

* Fixed admin user not showing in download all activity report

Signed-off-by: snipe <[email protected]>

* this should be all it takes to fix this, i think

* replace env with config variable for from address

* Fix rollback for created_by

* Fix rollback for webhook_endpoint by using correct column type

* update default from address to alternate config variable

* Update README.md

typo mosrt to most under Join our Community links

* Feature: Added API endpoint for generating asset labels

* Feature: Added translations for label generation API endpoint

* Feature: Added API route for asset label generation

* Fixed variable name

Signed-off-by: snipe <[email protected]>

* Indicate requiredness on status select on bulk user checkin+delete

Signed-off-by: snipe <[email protected]>

* use existing validation strings

* add testing example var MAIL_FROM_ADDR

* fix mail.from.address variables in config, simplify envelop[ variable

* adding colon to password translation

* Add tests around component check ins via api

* Formatting

* Use === over ==

* Add tests around deleting component via ui

* Improve check for image existence

* Feature: Added category to asset checkout email

* Feature: Added category to asset checkin email

* Feature: Added category to asset acceptance/decline email

* Feature: Added category to asset requested email

* Fix: Removed setting validation as it is not strictly necessary

* no checked out to email doesnt trigger a 500

* Always run validation on checkin

* Use database file for sqlite in GitHub Action for tests

* remove the changes to mail.from.address default

* Add tests for component checkout api endpoint

* [Snyk] Upgrade jquery-ui from 1.14.0 to 1.14.1 snipe#15868

Signed-off-by: snipe <[email protected]>

* fixing colon placements

* Always call resizeCanvas

* WIP: move signature pad creation up and add debugging

* Remove debugging

* commit for testing

* orange bar for requirednessness

* Updated translations

Signed-off-by: snipe <[email protected]>

* Updated version

Signed-off-by: snipe <[email protected]>

* fix user api update from clearing location_id unnecessarily

* fixed mobile view of assets

* fix mobile view for asset and user

* Harden asset checkout validation by requiring ints

* requested changes from pr

* fixing line

* Dev assets

Signed-off-by: snipe <[email protected]>

* Use transformer on API update

Signed-off-by: snipe <[email protected]>

* Fixed order by notes for users

Signed-off-by: snipe <[email protected]>

* Fixed snipe#15901 - re-added required indicator on text and select custom fields

Signed-off-by: snipe <[email protected]>

* Fixed bulk user form in user detail view

Signed-off-by: snipe <[email protected]>

* Revert "Hardened asset checkout validation by requiring integer"

* Some CSS twiddling

Signed-off-by: snipe <[email protected]>

* Fixed funky layout in importer

Signed-off-by: snipe <[email protected]>

* fixes general webhook not firing

* Include MAIL_FROM_ADDR in phpunit configuration

* Fixed sr-only blank text

Signed-off-by: snipe <[email protected]>

* Harden asset checkout validation

* fix unaccepted assets report resend acceptance

* add property check

* adds mail from name to mail envelope

* fix typo

* layout / added category id

* fixed

* add mail class for unaccepted assets reminders

* fixed conditionals

* missed a spot

* fix duplicate emails being sent in unaccepted reminder command

* cleans up the Unaccepted Asset reminder variables

* wrap comment

* adds testing to unaccepted reminder command

* delete notification version of reminder

* Only update asset locations to assets checked out to users.

* Removed issue/PR templates

Signed-off-by: snipe <[email protected]>

* note, will come back to this once question is answered

* Show frontend "required" validation for model and status selects

* Updated supported versions

Signed-off-by: snipe <[email protected]>

* add null safe operator to acceptance reminder

* Fixes snipe#15952 - fixed typo in content-type

Signed-off-by: snipe <[email protected]>

* Add @sgross-emlix as a contributor

* Fixed snipe#15928 - updated method name to setCreatedBy from SetUserId

Signed-off-by: snipe <[email protected]>

* Fix league/commonmark's quadratic complexity bugs may lead to a denial of service

* Use appropriate category for licenses when seeding

* reversed order of the acceptance and note paramter

* fix other mailables

* Revert "Show frontend "required" validation for model and status selects"

This reverts commit 10a7ae8.

* fix other mailables

* Fix validation messages for select2 inputs

* leaving this here for notes etc

* Removed index and destroy settinga API endpoints

Signed-off-by: snipe <[email protected]>

* Fixes to 'clean' mode to better handle character sets and zero-values

* Check for assigned (not assigned_to) before trying to present() the name on bulk delete assets

Signed-off-by: snipe <[email protected]>

* Updated strings

Signed-off-by: snipe <[email protected]>

* Add accessory ui tests

* Add consumable ui tests

* Scaffold and implement some license checkin tests

* Bumped font-awesome to 6.7.0

Signed-off-by: snipe <[email protected]>

* Refactor of snipe#15235 - added accessory checkout to locations, assets

Signed-off-by: snipe <[email protected]>

* Use history icon

Signed-off-by: snipe <[email protected]>

* Added currency and history icons

Signed-off-by: snipe <[email protected]>

* Fixed variable in test

Signed-off-by: snipe <[email protected]>

* Updated user_id to created_by

Signed-off-by: snipe <[email protected]>

* Added new route

Signed-off-by: snipe <[email protected]>

* Updated route

Signed-off-by: snipe <[email protected]>

* Fixed user_id to created_by

Signed-off-by: snipe <[email protected]>

* No need to include assigned_to

Signed-off-by: snipe <[email protected]>

* Updated transformer

Signed-off-by: snipe <[email protected]>

* Removed create() method

Signed-off-by: snipe <[email protected]>

* Specify created_by in the API call as well

Signed-off-by: snipe <[email protected]>

* Added assignedAccessories method

Signed-off-by: snipe <[email protected]>

* Added assets endpoint

Signed-off-by: snipe <[email protected]>

* Added accessory transformer to assets transformer

Signed-off-by: snipe <[email protected]>

* Updated route in view

Signed-off-by: snipe <[email protected]>

* Updated routes with new endpoints

Signed-off-by: snipe <[email protected]>

* Updated comment

Signed-off-by: snipe <[email protected]>

* Added new test

Signed-off-by: snipe <[email protected]>

* Fixed admin -> adminuser property

Signed-off-by: snipe <[email protected]>

* Fixed property

Signed-off-by: snipe <[email protected]>

* Removed inadvertently added files.

* Add tests for license checkin

* Add permissions property to group factory

* Add simple tests to ensure views render

* Use correct id

* Remove leftover testing logic and fix checkout permissions

Removed console logs and temporary testing code from the bootstrap-table view. Updated the transformer to correctly check checkout permissions against the Asset class instead of PredefinedKit.

* rm note

* change barcode column names in seeder

* add note

* oops, rm dump

* Added a few order options on audit report

Signed-off-by: snipe <[email protected]>

* Update settings property keys

* Fix broken merge conflict files part 1

Signed-off-by: Darth Killian <[email protected]>

* More Merge Conflict Bug Fixes

Signed-off-by: Darth Killian <[email protected]>

* More bug fixes and add bulk checkout company & order number support back
in

Signed-off-by: Darth Killian <[email protected]>

* Fix some additional lang stuff and disable user checkout on accessories

Signed-off-by: Darth Killian <[email protected]>

* Fix some more missing language references

Signed-off-by: Darth Killian <[email protected]>

* Fix broken language and testing files

Signed-off-by: Darth Killian <[email protected]>

* Fix tests (again)

Signed-off-by: Darth Killian <[email protected]>

---------

Signed-off-by: snipe <[email protected]>
Signed-off-by: Darth Killian <[email protected]>
Co-authored-by: snipe <[email protected]>
Co-authored-by: spencerrlongg <[email protected]>
Co-authored-by: Godfrey M <[email protected]>
Co-authored-by: Marcus Moore <[email protected]>
Co-authored-by: victoria <[email protected]>
Co-authored-by: NebelKreis <[email protected]>
Co-authored-by: akemidx <[email protected]>
Co-authored-by: Brady Wetherington <[email protected]>
Co-authored-by: Joël Pittet <[email protected]>
@snipe snipe deleted the fixes/adds_accessories_to_locations branch January 17, 2025 15:18
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.

1 participant