Skip to content

Consumables Overhaul V2#18589

Open
WatchDoges101 wants to merge 96 commits intogrokability:developfrom
WatchDoges101:replenish
Open

Consumables Overhaul V2#18589
WatchDoges101 wants to merge 96 commits intogrokability:developfrom
WatchDoges101:replenish

Conversation

@WatchDoges101
Copy link
Copy Markdown

Back with some improvements and quality updates to my idea. Let me know what you think ❤️

This pull request introduces several improvements and new features related to consumables management, along with some UI and maintenance updates. The most significant changes are the addition of a "reset/replenish" feature for consumables, enhancements to how consumable cost is calculated and displayed, and improvements to the consumable assignment history and permissions. There are also updates to accessory views and some minor code and config cleanups.

Consumables Management Enhancements

  • Added a reset/replenish feature for consumables, including a reset form and logic to remove checked-out assignments, log the action, and update the remaining quantity. The action is logged with a new "replenish" action type and a custom icon in the action log presenter. (app/Http/Controllers/Consumables/ConsumablesController.php, app/Presenters/ActionlogPresenter.php, app/Models/Consumable.php) [1] [2] [3] [4] [5]
  • Added assignment (checkout) history API endpoint for consumables, with support for searching, sorting, and pagination. (app/Http/Controllers/Api/ConsumablesController.php, app/Models/Actionlog.php, app/Http/Transformers/ActionlogsTransformer.php) [1] [2]

Cost Calculation and Display

  • Changed consumable total cost calculation to use only the cost of items actually used (checked out), rather than the total quantity, and updated info panels and transformers to use the new calculation. (app/Models/Consumable.php, app/Http/Transformers/ConsumablesTransformer.php, resources/views/blade/box/info-panel.blade.php) [1] [2] [3]

Permissions and UI Improvements

  • Added permissions for the new replenish/reset actions to the consumable transformer output, so the frontend can show/hide related buttons. (app/Http/Transformers/ConsumablesTransformer.php)
  • Improved accessory view tabs and buttons: fixed tab names, adjusted button display based on permissions and availability, and improved the delete/clone button logic. (resources/views/accessories/view.blade.php) [1] [2] [3]

Other Changes

  • Updated version and build info to reflect a release from master instead of develop. (config/version.php)
  • Minor code and dependency cleanups, including removing an unused field in the custom fields transformer and updating the mix-manifest for asset cache busting. (app/Http/Transformers/CustomFieldsTransformer.php, public/mix-manifest.json) [1] [2]

These changes collectively improve the accuracy, traceability, and usability of consumable management in the application.

image image image image

snipe and others added 30 commits February 18, 2026 16:32
# Conflicts:
#	resources/views/maintenances/view.blade.php
@snipe
Copy link
Copy Markdown
Member

snipe commented Feb 25, 2026

I feel like this is getting way out of control. Why are you adding timezones to this PR? That should - at the very least - be a completely different PR as it’s not related to consumables.

The way to increase the odds of a PR being merged is by keeping them small and tight, avoiding feature sprawl whenever possible.

@WatchDoges101
Copy link
Copy Markdown
Author

I feel like this is getting way out of control. Why are you adding timezones to this PR? That should - at the very least - be a completely different PR as it’s not related to consumables.

The way to increase the odds of a PR being merged is by keeping them small and tight, avoiding feature sprawl whenever possible.

Ooops! I will revert those commits and create a new branch

@WatchDoges101
Copy link
Copy Markdown
Author

Extremely sorry about that! Completely lost the plot on that one! I am now done touching this PR, I will even create a new one if you would like.

Sorting for total cost was not working correctly.

I am happy with how it is now on the consumables release.

@afranchi74
Copy link
Copy Markdown

@WatchDoges101 it will be very usefull for me, @snipe please continue to work on it. Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants