3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-08-22 05:08:05 +00:00

9 Commits

Author SHA1 Message Date
882d0331db Fixed FD-56773 - tigtened asset model request gate 2026-07-30 14:42:45 +01:00
d24b715716 Merge pull request #19169 from olivierlambert/feature/requestable-accessories
Make accessories requestable
2026-07-17 18:36:23 +01:00
115d1a4f5e Rename company_id on users table 2026-07-10 14:41:47 +01:00
fbf441f2a2 Item Requests: Fixed FD-56095 - apply FMCS to requestable items listing 2026-06-22 17:52:18 +01:00
409e11dca4 Make accessories requestable
Accessories can now be flagged as requestable and requested by users from
the requestable items page, the same way assets and asset models already
can. No migration is needed since the accessories table already carries a
requestable column.

I kept the semantics deliberately simple: a request just records intent
(and the requested quantity) and notifies the admins. It does not touch or
reserve stock. The admin still performs the normal checkout, which is what
actually decrements quantity. That way requests behave the same for unique
assets and for quantity-based accessories, instead of inventing a separate
"reserved" state.

The admin "Requested" queue already lists every checkout request
polymorphically (it showed asset models too), so accessory requests appear
there as well; I extended that view to render the accessory name, image and
a checkout action so an admin can actually see and fulfil the request.

While wiring this up I also fixed a pre-existing bug in the request flow:
the Requestable trait saved a 'qty' key, but the column is 'quantity' and
wasn't fillable, so requested quantities were being silently dropped (this
affected asset models too). Quantity is now persisted and read back
correctly.

Components and licenses can follow the same pattern; they each just need a
small migration to add the requestable column.
2026-06-10 19:57:53 +02:00
edcb429366 Fixed test 2026-05-30 10:18:46 +01:00
3c1b18919a Graceful redirect if the user is not allowed 2026-05-21 21:12:35 +01:00
978c8f81a5 Added test 2026-05-21 20:15:50 +01:00
2afcc1e384 Add basic tests around asset request index 2025-07-16 12:25:37 -07:00