Manage EOL date by checkbox of eol_explicit
Description
[ It's re-created PR #13846 as I made adaption code to new version 6.3.0 , sorry for confusion ] This improvement allow setup EOL date manually by user on damand by set eol_explicit checkbox.
BEFORE:
AFTER:
If checkbox is not checked then EOL date is hiden and calculation of date is on the base Model EOL rate
If checkbox is checked then EOL date is showed and user can input EOL Date manually.
Status of checkbox is saved as eol_explicit value
In this way is much easier to manage EOL date and explicit marker status instead of build complex rules :)
Type of change
- [x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Test Configuration:
- PHP version: 8.1
- MySQL version 10.6.5-MariaDB
- Webserver version IIS
- Web browser: MS Edge, Chrome
Checklist:
- [x] I have read the Contributing documentation available here: https://snipe-it.readme.io/docs/contributing-overview
- [x] I have formatted this PR according to the project guidelines: https://snipe-it.readme.io/docs/contributing-overview#pull-request-guidelines
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
PR Summary
-
Introduction of 'eol_explicit' parameter in Asset Management The parameter 'eol_explicit' has been added into the 'AssetsController.php' file. This will allow for better tracking of the status of assets.
-
Implementation of 'eol_explicit' and 'asset_eol_date' during asset addition and modification A new feature has been implemented where both 'eol_explicit' and 'asset_eol_date' fields can be set when we are creating or updating an asset in the 'AssetsController.php' file.
-
Bulk asset update feature enhancement The feature in 'BulkAssetsController.php' file where assets can be updated in bulk, has been updated to include updating of 'eol_explicit' and 'asset_eol_date' fields. This drastically improves time efficiency when dealing with large asset databases.
-
Changes made to the 'AssetObserver' file Improvements have been made to the 'saving' method on 'AssetObserver.php' file thereby making it more robust.
-
Addition of language support for newly added parameters In 'general.php' file, the translations for 'eol' (End of Life) and 'eol_date_help' have been added. It ensures our app maintains its multi-language support, and remains user-friendly.
-
Enhancements in Asset Edit View Updates to 'edit.blade.php' file enable displaying of the 'eol_explicit' checkbox and the 'eol_date' picker. This adds convenience during asset editing.
-
Updates to the 'eol_date' view The 'eol_date.blade.php' file has been updated to incorporate the 'eol_explicit' checkbox and 'eol_date' picker, which provides enriched information about an asset's lifecycle.
I'll work on getting this reviewed this week. Thanks @Robert-Azelis!
no feedback so far, @snipe can I ask for review?