Commit graph

360 commits

Author SHA1 Message Date
Spencer Long d6f0b580b6
Merge branch 'develop' into refactor/asset-action 2025-03-04 17:04:04 -06:00
snipe 8c8af3062e
Merge pull request #16354 from snipe/dont_checkin_for_pending_on_asset_update
Allow pending as an asset status type that does not automatically check the asset in
2025-02-26 21:05:11 +00:00
spencerrlongg d6e266cec1 make super safe 2025-02-26 13:11:49 -06:00
snipe 1618c9ae8e Changed confirmation message
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 10:53:41 +00:00
snipe 5344ef4a1a Allow pending as an asset status that does not automatically check the asset in
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 10:46:38 +00:00
spencerrlongg d949a9689f fix all 2025-02-24 22:35:47 -06:00
snipe 2bf4ec0ae8 A few more small tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 14:24:15 +00:00
snipe 19fb45f488 Refactor into method
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:57:18 +00:00
snipe f5eedb8d23 Added RMB and include $item so the asset fields are populated
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:13:12 +00:00
snipe 7db11dc12b
Merge pull request #16277 from Godmartinz/bulk_delete_asset_bug
Fixes deletion of assigned assets through bulk delete
2025-02-22 12:59:37 +00:00
snipe 5b63eb5a15
Merge pull request #16272 from snipe/experiments/breadcrumbs
Some checks failed
Crowdin Action / upload-sources-to-crowdin (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
Experimental WIP - added breadcrumbs, route model binding for resource routes
2025-02-20 19:21:58 +00:00
snipe 3150ad50c9 RMB for audits
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 14:57:07 +00:00
Godfrey M a275391557 adds test for deleting assigned asset 2025-02-19 15:59:57 -08:00
Godfrey M eaacf29d57 fix tests 2025-02-19 15:11:16 -08:00
Marcus Moore 759c8c8f5c
Catch TypeError in addition to Exceptions when rendering barcodes 2025-02-19 12:36:50 -08:00
Godfrey M a534b488b2 prevents deletion of assigned assets in bulk deletion 2025-02-19 10:09:02 -08:00
snipe eb7e24eeb0 Asset checkout with route model binding
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:39:16 +00:00
snipe 560311b883 Added ->with(‘item’) back in
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 03:37:34 +00:00
snipe f7d213052a Route model binding for resource groups
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 02:49:05 +00:00
snipe 972bd1ef83 Tinkering with routes for breadcrumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 00:37:09 +00:00
snipe 7553ec3e27 Fixed equals
Signed-off-by: snipe <snipe@snipe.net>
2025-02-17 10:44:58 +00:00
Godfrey M ddc22b4d6b adds a check to see that qr code type is not none 2025-02-03 10:38:49 -08:00
Spencer Long ba31a33290
Merge branch 'develop' into refactor/asset-action 2025-01-23 12:58:01 -06:00
snipe d5309c7d94 Added fragment to uploads for redirect
Signed-off-by: snipe <snipe@snipe.net>
2025-01-21 18:06:00 +00:00
snipe bbc9ed5778 Fixed audit date default on bulk audit
Some checks are pending
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Waiting to run
Codacy Security Scan / Codacy Security Scan (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Signed-off-by: snipe <snipe@snipe.net>
2025-01-15 22:28:50 +00:00
Godfrey M 833af55806 Merge branch 'develop' into barcode_settings_hide 2024-12-12 12:05:29 -08:00
spencerrlongg 38d8d3076d Refactor asset handling and streamline code
This refactoring introduces helper methods for handling image uploads, custom fields, and checkouts, improving code organization and readability. Unnecessary imports, comments, and unused variables were removed for cleaner code. Error handling was also improved with additional exception reporting in the asset update flow.
2024-12-04 21:43:47 -06:00
spencerrlongg 19771d26fb formatting 2024-12-03 14:46:32 -06:00
spencerrlongg 5e475c3558 Remove unused imports from AssetsController files.
Simplify the code by cleaning up unused import statements in both `AssetsController.php` and `Api/AssetsController.php`. This reduces potential confusion and helps maintain cleaner code for future development and maintenance.
2024-12-03 14:41:30 -06:00
spencerrlongg bdf1033277 Merge remote-tracking branch 'upstream/develop' into refactor/asset-action
# Conflicts:
#	app/Http/Controllers/Api/AssetsController.php
#	app/Http/Controllers/Assets/AssetsController.php
#	app/Http/Controllers/Assets/BulkAssetsController.php
#	resources/lang/en-US/admin/hardware/message.php
2024-12-03 14:31:50 -06:00
spencerrlongg 16740b41e4 Simplify asset handling logic for creation and update
Refactor asset creation and update processes by removing redundant save checks and organizing error handling logic. Enhance success and failure feedback in the asset creation flow to improve clarity and user experience. Add support for detailed multi-success and partial failure messages to alert users of outcomes.
2024-12-03 13:50:30 -06:00
spencerrlongg 0a1aba5406 a little work for conflicts 2024-11-29 14:32:19 -06:00
spencerrlongg 09d4e0cb05 Remove unnecessary parameter and add delete asset tests
Removed the redundant $request parameter from the destroy method in AssetsController. Added feature tests to verify asset deletion functionality with proper permissions and ensure deletion is forbidden without permissions.
2024-11-26 14:37:45 -06:00
spencerrlongg 233656df01 Add tests for storing assets with all fields and multiple entries
Introduced StoreAssetTest to verify the handling of full asset records and multiple asset entries in the database. Updated StoreAssetAction and AssetsController to support next audit date validation and improved error handling.
2024-11-26 14:28:22 -06:00
spencerrlongg 705a852d45 Refactor error handling and remove redundant code
Refactored error handling by replacing `\Exception` with `Exception` for consistency. Removed redundant comments and unused code to improve readability and maintainability of the `StoreAssetAction` class.
2024-11-25 20:09:30 -06:00
spencerrlongg 5aa2f307cd Remove debug dump statements
This commit removes various debug dump statements from BulkAssetsController and UpdateAssetAction. These changes clean up the code and improve readability by eliminating unnecessary debugging output. Maintaining clean code ensures better maintainability and performance.
2024-11-22 20:49:52 -06:00
spencerrlongg a3cdb3b62f Fix error message format in BulkAssetsController
Previously, the error message was set as a string, which led to an inconsistency in how errors were handled. This change updates the error message to be an array, ensuring it aligns with the expected format.
2024-11-21 11:11:11 -06:00
spencerrlongg 10126b8362 Fix error handling in BulkAssetsController
Updated exception handling to capture detailed validation errors in BulkAssetsController. Corrected formatting in notifications view for displaying error messages.
2024-11-20 16:42:56 -06:00
spencerrlongg 617fe85699 Fix typos and use correct array notation in asset updates
Corrected spelling mistakes in test files and updated code to use the correct array notation in request validation for asset updates. This ensures better readability and consistency in the codebase while preventing potential errors related to incorrect data handling.
2024-11-20 13:11:03 -06:00
spencerrlongg 94e7310cd9 Fix bulk asset update error handling and improve access checks
Improved the error handling in the BulkAssetsController by re-enabling custom field permission checks. Updated the UpdateAssetAction to better handle encrypted custom fields and streamlined user roles in the BulkEditAssetsTest.
2024-11-19 19:57:26 -06:00
spencerrlongg 0353c7a03b Fix error handling in BulkAssetsController
Updated error handling to ensure all exceptions are properly stored in the errors array and removed unused custom_field_problem variable. Also, uncommented location assignment code in UpdateAssetAction for clearer logic.
2024-11-19 17:56:56 -06:00
spencerrlongg 3cf583ab03 Add CustomFieldPermissionException handling 2024-11-19 17:45:35 -06:00
spencerrlongg 9f815996c7 tests 'n stuff 2024-11-19 14:45:54 -06:00
spencerrlongg 6c1239eee5 cleaned - more work needs to happen 2024-11-19 10:02:04 -06:00
spencerrlongg dd8fb6ef4a fixed some things, made bulk progress, tests pass 2024-11-19 00:13:28 -06:00
spencerrlongg 7ab0b98ff2 var changes 2024-11-18 12:43:28 -06:00
spencerrlongg c91dfaf9df gui seemingly working, other good progress - api next 2024-11-14 16:54:23 -06:00
spencerrlongg 47d132703e some more good progress on UpdateAssetAction.php 2024-11-12 18:08:29 -06:00
spencerrlongg 916c0c0394 good progress on update action 2024-11-12 14:46:56 -06:00
snipe 47b2cdb846 Allow user to specify null for calculation or explicit on bulk edit
Signed-off-by: snipe <snipe@snipe.net>
2024-11-10 18:04:13 +00:00