snipe
5f9af7d509
Updated API response
...
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:56:28 -08:00
snipe
f626413502
Added byod to API transformer
...
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:04:02 -08:00
snipe
c432fb9d70
Merge pull request #12181 from Godmartinz/gh12163_asset_age
...
Adds asset age to asset index and asset view pages
2022-12-13 10:28:17 -08:00
Godfrey M
fa872b09a9
fixes a typo, the world is great again
2022-12-12 10:38:31 -08:00
snipe
4ac09ff4e4
Add email in assigned_to on asset transformer
...
Signed-off-by: snipe <snipe@snipe.net>
2022-12-09 16:07:17 -08:00
Godfrey M
3206929ee4
adds AgeFormatter, not working yet
2022-11-29 09:51:42 -08:00
Godfrey M
8d861cfd82
adds age to the asset table
2022-11-28 10:59:18 -08:00
snipe
50431c046f
Fixed missing slash in stdClass
...
Signed-off-by: snipe <snipe@snipe.net>
2022-11-15 17:04:06 +00:00
Fernando Almeida
47ee2a8153
Fix HTTP AssetTransformer to generate an empty object for missing custom_fields instead of an empty array.
2022-11-14 16:31:08 +00:00
snipe
baad3b9d58
Only care about the converted name when updating the custom field itself
...
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 14:17:07 -07:00
Ivan Nieto Vivanco
3a5c09c424
Used the getFormattedDateObject() function with the expected parameters
2022-06-20 19:58:51 -05:00
snipe
af66f83a3d
Check for blank (not null) values i asset transformer date
...
Signed-off-by: snipe <snipe@snipe.net>
2022-06-15 13:42:30 -07:00
Ivan Nieto Vivanco
50c008ead5
Adds check in condition that format custom dates
2022-06-14 01:37:15 -05:00
snipe
20a0c4e3b5
Merge pull request #11272 from inietov/fixes/date_localization_in_customfields
...
Fixes #8143 Date localization not working on custom fields
2022-06-13 19:47:20 -07:00
Ivan Nieto Vivanco
0c3972d7b7
Add spaces to the code for consistency
2022-06-09 13:02:31 -05:00
Ivan Nieto Vivanco
4a0eb2b3f1
Add element type of customfield to API response
2022-06-09 12:57:20 -05:00
Ivan Nieto Vivanco
740f27198f
Evaluate if a custom field is a Date to present it with the correct format
2022-06-07 18:00:46 -05:00
snipe
9db8bd782d
Merging master down into develop
...
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 18:02:07 +00:00
snipe
c3d55ee27e
Merge master down into develop
...
Signed-off-by: snipe <snipe@snipe.net>
# Conflicts:
# .all-contributorsrc
# README.md
# app/Exceptions/Handler.php
# app/Http/Controllers/Api/AssetsController.php
# app/Http/Controllers/Api/SettingsController.php
# app/Http/Controllers/CustomFieldsController.php
# app/Http/Controllers/SettingsController.php
# app/Http/Transformers/AssetsTransformer.php
# app/Models/Setting.php
# config/version.php
# resources/lang/af/button.php
# resources/lang/ar/button.php
# resources/lang/bg/button.php
# resources/lang/cs/button.php
# resources/lang/cy/button.php
# resources/lang/da/button.php
# resources/lang/de/button.php
# resources/lang/el/button.php
# resources/lang/en-GB/button.php
# resources/lang/en-ID/button.php
# resources/lang/es-CO/admin/groups/message.php
# resources/lang/es-MX/button.php
# resources/lang/et/admin/custom_fields/general.php
# resources/lang/et/admin/hardware/table.php
# resources/lang/et/admin/kits/general.php
# resources/lang/et/admin/manufacturers/message.php
# resources/lang/et/admin/models/general.php
# resources/lang/et/admin/settings/general.php
# resources/lang/et/button.php
# resources/lang/et/mail.php
# resources/lang/fa/button.php
# resources/lang/fa/help.php
# resources/lang/fi/button.php
# resources/lang/fil/button.php
# resources/lang/fr/button.php
# resources/lang/ga-IE/button.php
# resources/lang/he/button.php
# resources/lang/hr/button.php
# resources/lang/hu/admin/settings/general.php
# resources/lang/hu/auth/message.php
# resources/lang/hu/button.php
# resources/lang/hu/mail.php
# resources/lang/id/admin/hardware/table.php
# resources/lang/id/button.php
# resources/lang/it/button.php
# resources/lang/iu/button.php
# resources/lang/ja/button.php
# resources/lang/ko/button.php
# resources/lang/lt/button.php
# resources/lang/lv/button.php
# resources/lang/mi/button.php
# resources/lang/mk/button.php
# resources/lang/ml-IN/button.php
# resources/lang/mn/button.php
# resources/lang/ms/admin/hardware/table.php
# resources/lang/ms/admin/kits/general.php
# resources/lang/ms/admin/models/general.php
# resources/lang/ms/admin/models/message.php
# resources/lang/ms/admin/settings/general.php
# resources/lang/ms/button.php
# resources/lang/nl/button.php
# resources/lang/no/admin/hardware/table.php
# resources/lang/no/admin/kits/general.php
# resources/lang/no/admin/settings/general.php
# resources/lang/no/auth/message.php
# resources/lang/no/button.php
# resources/lang/no/help.php
# resources/lang/no/mail.php
# resources/lang/pl/button.php
# resources/lang/pt-BR/button.php
# resources/lang/pt-PT/auth/message.php
# resources/lang/pt-PT/button.php
# resources/lang/pt-PT/mail.php
# resources/lang/ro/button.php
# resources/lang/ru/admin/settings/general.php
# resources/lang/ru/button.php
# resources/lang/ru/help.php
# resources/lang/sl/admin/custom_fields/general.php
# resources/lang/sl/admin/hardware/table.php
# resources/lang/sl/admin/kits/general.php
# resources/lang/sl/admin/manufacturers/message.php
# resources/lang/sl/admin/models/general.php
# resources/lang/sl/admin/settings/general.php
# resources/lang/sl/admin/users/general.php
# resources/lang/sl/auth/message.php
# resources/lang/sl/button.php
# resources/lang/sl/help.php
# resources/lang/sr-CS/button.php
# resources/lang/ta/button.php
# resources/lang/th/button.php
# resources/lang/th/mail.php
# resources/lang/tl/button.php
# resources/lang/tr/admin/settings/general.php
# resources/lang/tr/auth/message.php
# resources/lang/tr/button.php
# resources/lang/uk/button.php
# resources/lang/ur-PK/button.php
# resources/lang/vi/button.php
# resources/lang/zh-CN/button.php
# resources/lang/zh-HK/button.php
# resources/lang/zh-TW/admin/hardware/table.php
# resources/lang/zh-TW/button.php
# resources/lang/zu/button.php
# resources/views/models/custom_fields_form.blade.php
# resources/views/reports/custom.blade.php
# resources/views/settings/slack.blade.php
2021-12-16 14:26:24 -08:00
snipe
9d5d1a9f9a
Added escape to assigned_to API response
...
Signed-off-by: snipe <snipe@snipe.net>
2021-12-13 12:03:03 -08:00
snipe
f7b483358f
Escape custom field values in API response
...
Signed-off-by: snipe <snipe@snipe.net>
2021-11-15 20:32:59 -08:00
snipe
476e17055b
Escape custom fields in API response
...
Signed-off-by: snipe <snipe@snipe.net>
2021-11-15 20:31:01 -08:00
snipe
f2f8f96991
Merge remote-tracking branch 'origin/master' into develop
...
Signed-off-by: snipe <snipe@snipe.net>
# Conflicts:
# app/Http/Controllers/Api/AssetsController.php
# app/Http/Transformers/AssetsTransformer.php
# app/Importer/ConsumableImporter.php
# app/Models/Consumable.php
# config/version.php
# package-lock.json
# package.json
# public/css/dist/all.css
# public/css/dist/bootstrap-table.css
# public/js/build/app.js
# public/js/dist/all.js
# public/js/dist/bootstrap-table.js
# public/mix-manifest.json
# resources/views/custom_fields/fieldsets/view.blade.php
# resources/views/layouts/default.blade.php
# routes/web.php
# routes/web/fields.php
2021-11-15 19:24:38 -08:00
snipe
798f6d65de
Merge pull request #9847 from inietov/bug/ch15357/requested_assets_allow_to_cancel_if_checkedout_to_self
...
Adds a check to know if the asset is checked out to the logged in user to allow check the state in the view
2021-10-28 17:53:24 -07:00
snipe
8b1c60a17a
Make gates a little more consistent
...
Signed-off-by: snipe <snipe@snipe.net>
2021-10-25 15:34:22 -07:00
snipe
033c3253bb
Fixed permissions array to handle missing clone button
...
Signed-off-by: snipe <snipe@snipe.net>
2021-10-25 14:10:17 -07:00
snipe
aa8f1378c9
Merge remote-tracking branch 'origin/master' into develop
...
Signed-off-by: snipe <snipe@snipe.net>
# Conflicts:
# README.md
# app/Http/Controllers/Accessories/AccessoriesController.php
# app/Http/Controllers/Api/AssetMaintenancesController.php
# app/Http/Controllers/Api/AssetModelsController.php
# app/Http/Controllers/Api/AssetsController.php
# app/Http/Controllers/Api/UsersController.php
# app/Http/Controllers/AssetMaintenancesController.php
# app/Http/Controllers/Assets/AssetFilesController.php
# app/Http/Controllers/Assets/AssetsController.php
# app/Http/Controllers/Assets/BulkAssetsController.php
# app/Http/Controllers/Components/ComponentsController.php
# app/Http/Controllers/Consumables/ConsumablesController.php
# app/Http/Controllers/Licenses/LicenseFilesController.php
# app/Http/Controllers/Licenses/LicensesController.php
# app/Http/Controllers/Users/UserFilesController.php
# app/Http/Transformers/AssetsTransformer.php
# app/Http/Transformers/LicensesTransformer.php
# app/Importer/UserImporter.php
# app/Models/Asset.php
# config/app.php
# config/version.php
# package-lock.json
# public/js/build/app.js
# public/js/dist/all.js
# public/js/dist/bootstrap-table.js
# public/mix-manifest.json
# resources/lang/en/admin/users/message.php
# resources/lang/is/button.php
# resources/lang/ja/admin/kits/general.php
# resources/lang/ro/admin/users/general.php
# resources/lang/zh-HK/admin/depreciations/general.php
# resources/lang/zh-HK/admin/models/general.php
# resources/views/hardware/qr-view.blade.php
# resources/views/hardware/view.blade.php
# resources/views/partials/bootstrap-table.blade.php
# resources/views/users/view.blade.php
# routes/web.php
# routes/web/hardware.php
# routes/web/models.php
# routes/web/users.php
2021-10-20 17:26:41 -07:00
snipe
c06a93ef13
Removed extra brace in assets for components
...
Signed-off-by: snipe <snipe@snipe.net>
2021-10-06 10:38:13 -07:00
snipe
52caee2a9f
Handle checking and unchecking for bulk actions
...
Signed-off-by: snipe <snipe@snipe.net>
2021-10-04 17:18:26 -07:00
snipe
daa88f06f7
Added pivot to components JSON
...
Signed-off-by: snipe <snipe@snipe.net>
2021-09-30 15:51:08 -07:00
snipe
61f16f47a2
Use Helper alias
...
Signed-off-by: snipe <snipe@snipe.net>
2021-09-28 19:44:55 -07:00
snipe
3b7ce0091c
Load components in the assets API if components=true in API request
...
Signed-off-by: snipe <snipe@snipe.net>
2021-09-23 17:23:53 -07:00
Ivan Nieto Vivanco
35ffe8b902
Adds a check to know if the asset is checked out to the logged in user to allow check the state int the view
2021-07-20 18:56:22 -05:00
Laravel Shift
934afa036f
Adopt Laravel coding style
...
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions.
You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started.
[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
2021-06-10 20:15:52 +00:00
Daniel Meltzer
f0546bf689
Clean up Transformers and extract an isDeletable() method to models where it makes sense.
2020-05-23 15:24:10 -04:00
Martin Meredith
e3e0d57f56
Minor code cleanup bits and bobs ( #6805 )
...
* Add IDE Helper files
* Cleanup imports
- Alphabetises imports
- Removes unused imports
* Add Platform requirements
* Move filling asset into block where asset exists
* Remove duplicate array keys
2019-03-13 20:12:03 -07:00
snipe
07eead2dbf
Fixed bug where assets could be deleted without being checked back in [ch38]
2019-01-22 14:13:30 -08:00
snipe
4c656c0321
De-normalize new counters from 4.3.0 ( #5547 )
...
* Added de-norm counter migration for assets
* Renaming counter columns, since Eloquent has a magical *_count helper
* Added artisan command to sync counters (one-off)
* Update API to use de-normed fields
* Increment counters for checkin;/checkout
* Derp.
* Added request increment/decrementer
* Move increment for checkout to the Asset::checkout method
* Added “could take a while” message
2018-05-16 19:20:43 -07:00
snipe
71708e349c
PHP7.2 count fixes ( #5427 )
...
* PHP 7.2 count() fixes
* Re-enable php travis 7.2
2018-04-29 06:10:49 -07:00
snipe
bbc0695a8f
Added count of checkins, checkouts, requests ( #5314 )
...
* Added count of checkins, checkouts, requests
* Removed old commented items
* Use actionlog instead of redefining the relationship
2018-04-06 16:23:39 -07:00
snipe
8a6713d5c0
WIP - Improved requested assets ( #5289 )
...
* WIP - beginning of improved requested assets
- Use Ajax tables for faster loading
- Use new notifications for requesting an asset
TODO:
- Use ajax tables for requestable asset models
- Use new notifications for canceling an asset request
- Expire requests once the asset has been checked out to the requesting user
* Only show asset name in email if it has one
* Refactor requested method to only include non-canceled requests
* Refactored requestable assets to log request and cancelation
* Added softdeletes on checkout requests
* Differentiate between canceling and deleting requests
* Added asset request cancelation notification
* Added timestamps and corrected unique key on requests table
* Improved requests view
* Re-use blade for cancel/request email
* Refactored BS table formatter for requested assets
* Location name min reduced to 2
* Added PAT test as maintenance option
This needs to be refactored into database-driven options with a UI
* Better slack message
* Added getImageUrl method for assets
* Include qty in request notifications
TODO:
- Try to pull requested info from original request for cancelation, otherwise it will default to 1
* Removed old asset request/cancel emails
* Added user profile asset request routes
* Added profile controller requested assets method
* Added blade link to requested assets for profile view
* Sort user history desc
* Added requested assets blade
* Added canceled at to checkoutRequest method
* Include qty in request
* Fixed comment, removed allowed_columns
* Removed Queable methods, since we don’t use a queue
* Fixed return type in method doc
* Fixed version number
* Changed id to user_id for clarity
2018-04-04 17:33:02 -07:00
snipe
cf8feb37e1
Fixed crash if no model associated
...
This should never be triggered. Bad data is getting in somehow.
2018-01-25 03:00:54 -08:00
snipe
2c2910d1dd
Handle shitty edge cases where an asset has no model without crashing
2018-01-24 08:16:05 -08:00
vcordes79
f4e9d245d0
Status labels ( #4895 )
...
* fix statuslabels
* fix statuslabels
2018-01-23 18:08:54 -08:00
snipe
6bfd428c2e
Use real status label names, even if deployed
2018-01-15 21:03:26 -08:00
snipe
c816870083
De-norm last audit date so we can display it in the asset listing
2017-12-12 03:03:43 -08:00
snipe
76fe2af0af
Fixed #4444 - Added EOL back into asset lsiting and custom report
2017-12-05 13:03:11 -08:00
snipe
2278d5bfd8
Fixed restore permission to assets API disable delete/checkin/checkout on deleted assets
2017-11-22 10:35:24 -08:00
snipe
d98d06377e
Fixed #4098 - autolink URL and email addresses in listing
2017-11-21 22:34:53 -08:00
snipe
37868cd70e
Added warranty and expiration to list view
2017-10-31 07:05:15 -07:00