Commit graph

371 commits

Author SHA1 Message Date
spencerrlongg
bfd827e529 added more eager loading 2025-03-31 12:28:03 -05:00
spencerrlongg
e273c7cbc5 Refactor asset retrieval to support pagination.
Introduced offset and limit handling for API asset queries to enable proper pagination. Adjusted the total count logic to maintain consistency in responses and ensure accurate transformation of assets.
2025-03-25 15:21:18 -05:00
snipe
0cd0abe8bb Fixed #16282 - adds accessories tab to assets
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 14:20:21 +00:00
snipe
d3210c6d40 Return flat JSON instead of transformed data
Signed-off-by: snipe <snipe@snipe.net>
2025-02-13 14:16:32 +00:00
snipe
ac96b8d4ae Added assignedAccessories method
Signed-off-by: snipe <snipe@snipe.net>
2024-12-16 16:35:34 +00:00
snipe
183a4d49d8 Refactor of #15235 - added accessory checkout to locations, assets
Signed-off-by: snipe <snipe@snipe.net>
2024-12-16 16:34:49 +00:00
snipe
2cb1b6d462 Use transformer on API update
Signed-off-by: snipe <snipe@snipe.net>
2024-11-27 13:51:53 +00:00
NebelKreis
d5c141dc59 Fix: Removed setting validation as it is not strictly necessary 2024-11-20 11:55:48 +01:00
NebelKreis
66d6b01307 Feature: Added translations for label generation API endpoint 2024-11-19 14:16:06 +01:00
NebelKreis
889aff43c2 Feature: Added API endpoint for generating asset labels 2024-11-19 14:13:05 +01:00
Tobias Regnery
f3c4e55667 Refactor asset creation with API
Commit fb4fe3004 restored the previous behaviour to check the company_id in case of FullMultipleCompanySupport.
But after rereading the code and the laravel documentation, the check is already there where it belongs in AssetStoreRequest::prepareForValidation()
The bug is the is_int-check of the request input in prepareForValidation(). Is is of type string even if it is a numeric value, so the call to getIdForCurrentUser() never happend.
Fix this by removing the check and the now redundant call to getIdForCurrentUser().
Wrong values will get caught by the model-level validation rules.
2024-10-14 15:14:41 +02:00
Tobias Regnery
fb4fe30049 Fix asset creation with API and FullMultipleCompanySupport
It is currently possible to create an asset with arbitrary company without being superuser and FullMultipleCompanySupport enabled.
This bug goes back to 75ac7f80b9 which is part of version 6.3.0.
Fix this by restoring the previous behaviour to check the company_id with getIdForCurrentUser().
2024-10-11 12:19:20 +02:00
Brady Wetherington
350b627ce1 Fix numeric sort 'ambiguous order clause' error 2024-10-03 14:23:40 +01:00
snipe
27ba641aa5 Added checkin on delete to API
Signed-off-by: snipe <snipe@snipe.net>
2024-10-01 14:30:34 +01:00
snipe
0ce5832b6c Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 17:29:40 +01:00
snipe
5fb43dd159 Handle audit *and* audits for urls
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 16:55:56 +01:00
snipe
de57d71bf1 Fixed #15548 - unify audit due/overdue APIs
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 16:30:24 +01:00
snipe
b21c303e56 Merge remote-tracking branch 'origin/develop' into features/add_created_at_created_by 2024-09-20 13:43:50 +01:00
snipe
a77a7065d7 Added order by admin to assets
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 16:34:10 +01:00
snipe
1582d81e5b Change user_id to created_by
Signed-off-by: snipe <snipe@snipe.net>
2024-09-17 22:16:41 +01:00
snipe
7c85ad54eb Sort by numeric columns for numeric custom fields
Signed-off-by: snipe <snipe@snipe.net>
2024-09-17 19:44:03 +01:00
snipe
56e31d2303 Fixed #15366 - use permission for encrypted custom fields
Signed-off-by: snipe <snipe@snipe.net>
2024-08-22 14:58:09 +01:00
snipe
01c69c8f8f Allow optional status label on quickscan checkin
Signed-off-by: snipe <snipe@snipe.net>
2024-08-15 10:08:48 +01:00
spencerrlongg
1139ed676a $id to $asset->id (thanks tests) 2024-07-23 13:03:25 -05:00
Spencer Long
64be353156
Merge branch 'develop' into bug/sc-24884 2024-07-23 12:55:19 -05:00
snipe
1d65781d8d More type-hinting
Signed-off-by: snipe <snipe@snipe.net>
2024-07-05 07:07:20 +01:00
snipe
e98284fff5 Modernized helpers and use statements
Signed-off-by: snipe <snipe@snipe.net>
2024-07-04 20:48:35 +01:00
spencerrlongg
6f29c0a7cf Merge branch 'refs/heads/develop' into bug/sc-24884
# Conflicts:
#	routes/api.php
2024-07-02 15:48:39 -05:00
snipe
92ba889cae Updated/removed facades
Signed-off-by: snipe <snipe@snipe.net>
2024-05-29 12:53:51 +01:00
snipe
fb233c0aa4 Cleaned up facade names and references
Signed-off-by: snipe <snipe@snipe.net>
2024-05-29 12:38:15 +01:00
Spencer Long
cdb1140f10
Merge branch 'develop' into bug/sc-24884 2024-05-23 13:53:00 -05:00
Marcus Moore
8d74a976a1
Merge branch 'develop' into chore/sc-25103/add-tests-around-asset-checkout 2024-05-22 16:09:27 -07:00
Marcus Moore
6d104251b3
Remove todo 2024-05-22 15:40:54 -07:00
Marcus Moore
f16c79bb9a
Improve event assertions 2024-05-22 15:38:23 -07:00
Marcus Moore
c7fa2c04ad
Add scenario 2024-05-22 13:33:12 -07:00
Marcus Moore
8ca882d1c8
Complete a scenario 2024-05-22 13:23:49 -07:00
snipe
c137fafa97 Updated language
Signed-off-by: snipe <snipe@snipe.net>
2024-05-15 18:10:43 +01:00
snipe
cb22a3d556 Updated comments again :-/
Signed-off-by: snipe <snipe@snipe.net>
2024-05-15 17:52:50 +01:00
snipe
c7accb4599 Added comments
Signed-off-by: snipe <snipe@snipe.net>
2024-05-15 17:38:42 +01:00
snipe
3c4098038d Fail early if no tag
Signed-off-by: snipe <snipe@snipe.net>
2024-05-15 16:33:47 +01:00
snipe
4224bc0c43 Removed extra settings param
Signed-off-by: snipe <snipe@snipe.net>
2024-05-02 12:36:57 +01:00
snipe
103809b65f Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2024-04-26 21:01:43 +01:00
snipe
6dc9ccffcd Refactor api for handling audit/expected checkins
Signed-off-by: snipe <snipe@snipe.net>
2024-04-26 18:56:57 +01:00
snipe
bf058bd5c6 Use updated scopes
Signed-off-by: snipe <snipe@snipe.net>
2024-04-26 14:02:56 +01:00
spencerrlongg
b11c900a4c fix bracket, + overwrite required rulesets 2024-04-23 16:29:07 -05:00
Spencer Long
53ccd196d7
Merge branch 'develop' into bug/sc-24884 2024-04-23 13:57:59 -05:00
Brady Wetherington
67a8e0b5c6 This re-enables the ability to update encrypted custom fields via the API 2024-04-15 18:46:11 +01:00
Marcus Moore
5567a1e9ac
Formatting 2024-04-10 17:37:11 -07:00
Marcus Moore
f28a82de71
Implement some tests, scaffold others 2024-04-10 17:27:07 -07:00
Marcus Moore
7c2fae7b9d
Scaffold api test cases 2024-04-10 17:08:45 -07:00