3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-08-21 12:47:18 +00:00

104 Commits

Author SHA1 Message Date
e746ef1af3 Fixed #18505 - make total and remaining sortable on accessories and components 2026-08-13 12:06:32 +01:00
a2afbfb911 Moved JSON response into trait 2026-08-07 11:58:43 +01:00
e0b45cf434 Recalculating costs 2026-08-05 22:24:36 +01:00
7d6617571d Check for consistent suplier for info panel 2026-08-05 14:33:54 +01:00
29e01933d8 Updated controllers with orderItem logic and hashed redirect 2026-08-05 11:49:18 +01:00
af6f41afec Added order to searchable relations 2026-08-03 15:01:58 +01:00
5e5c7aefb0 Updated models 2026-08-03 14:47:07 +01:00
0f17dfd98e Rename order number field 2026-08-03 14:21:03 +01:00
a53928e1a4 Replenish/remove for consumables, accessories, components 2026-08-03 13:07:59 +01:00
ecdf7e895c Fixed order by % remaing 2026-07-28 16:05:16 +01:00
b8018c5b5e FMCS+Floater: Fixed #19192 - make company required 2026-07-22 11:17:55 +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
d032a51a3d Validate comapny exists 2026-06-03 11:26:23 +01:00
4444a63b92 Added created_at and searchableCounts 2026-03-27 20:39:27 +00:00
4545cf8989 Removed broken(?) use statement 2026-03-27 19:20:11 +00:00
9406b600f9 Formatting 2026-03-25 12:10:07 +00:00
1398b4cbd6 Small cleanup on the views, added comments to detail view blades 2026-03-25 12:09:56 +00:00
f802ea4d38 Fixed tests 2026-03-25 09:20:51 +00:00
b479cdf358 Allow zero or null for accessory qty 2026-03-24 21:40:27 +00:00
0fe753b7da Added % bars to accessories, licenses, etc 2026-03-23 10:41:48 +00:00
53c090fd6c First stab 2026-03-19 17:13:24 +00:00
9623fa4d87 Use pint on models directory 2026-03-13 15:55:28 +00:00
af1c55cd7e Small code re-org for clarity 2026-03-06 21:55:46 +00:00
27ece84d52 Adds withTrashed() to adminuser and updates presenter to show strikethrough 2026-02-23 10:49:44 +00:00
3ebc0532ca Added isDeleteable to Accessories 2026-02-13 18:07:22 +00:00
5e9e0b70db Fixes #18377 - make min value for names consistent 2026-01-05 12:51:49 +00:00
512af90d31 Re-removed non-asset models from kits
These still do not work as expected.
2025-12-08 20:18:39 +00:00
9e68497b63 Moved Traits into directory and modify the users to point to them 2025-10-21 16:45:58 +01:00
b7193a06fd Normalize advanced search 2025-10-08 20:51:35 +01:00
384652b3df add total cost to accessories 2025-09-16 10:10:49 -07:00
74b98083e2 Override the getEula() method at the SnipeModel level 2025-09-15 20:05:35 +01:00
b06c58fe7b Switch to older style rules for consistency
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:06:27 +01:00
f5c8b3eb04 Fixed #17791 - increase size of purchase cost field
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:03:49 +01:00
7b5d90dd81 Moved model traits into proper directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:23:26 +01:00
95f867b267 Code formatting fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 21:48:53 +01:00
cd989768d4 Added HasUploads trait and remove uploads method for models
Signed-off-by: snipe <snipe@snipe.net>
2025-06-27 19:32:22 +01:00
358b70e280 Handle category missing in Accessory 2025-06-10 10:36:59 -07:00
4e0bcac1a1 Furhter validation for scoped locations
There is a new validator introduced that checks on object update (assets, users, etc.) if the company matches the locations company.
In case of the creation of a new location it must be checked that the parent matches the own company.
On updating a location a check for every related object must be made to see if the company matches the location.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
2025-01-24 11:12:11 +01:00
cae8aa7840 Added maxlengths to additional fields
Signed-off-by: snipe <snipe@snipe.net>
2024-10-01 14:02:54 +01:00
c93229179b Added order by created_by to accessories
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 16:45:39 +01:00
1582d81e5b Change user_id to created_by
Signed-off-by: snipe <snipe@snipe.net>
2024-09-17 22:16:41 +01:00
b18baf74d2 added options to checkout accessoires to locations and assets
Added #14979: add checkout functionality to accessoires
2024-07-29 10:54:53 +02:00
19bd99d159 Updated count
Signed-off-by: snipe <snipe@snipe.net>
2024-07-18 17:33:24 +01:00
9858cc5baf Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2024-07-18 04:43:30 +01:00
b5b60f22d5 Removed int
Signed-off-by: snipe <snipe@snipe.net>
2024-07-18 03:48:21 +01:00
f56006fb6b More refactoring
Signed-off-by: snipe <snipe@snipe.net>
2024-07-18 01:46:53 +01:00
79a13e3618 Added numCheckedOut method
Signed-off-by: snipe <snipe@snipe.net>
2024-07-18 00:26:58 +01:00
695428cd44 Guard against unrelated category 2024-03-07 16:59:01 -08:00
2353c8199c Set qty mutators
Signed-off-by: snipe <snipe@snipe.net>
2023-11-22 15:25:22 +00:00
96440834bd Move the declinedCheckout function so it don/'t separate the class properties 2023-08-14 16:16:28 -06:00