3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-06 03:05:50 +00:00
Commit Graph

39 Commits

Author SHA1 Message Date
32a2eed5ec Fixed #18075 - make require_serial boolean in API transformer 2025-10-27 13:19:37 +00:00
291be64aa0 Refined remnaining asset count for archived 2025-09-30 11:40:21 +01:00
72be171917 Added archived to model view 2025-09-30 11:20:33 +01:00
43cd0d7eb3 Use min_amt formatter 2025-09-30 10:54:43 +01:00
eeea69d8f2 Make available_assets_count sortable 2025-09-30 10:51:25 +01:00
6e67e3a8a0 Fixed #17932 - incorrect number for remaining assets in asset models 2025-09-29 20:55:06 +01:00
739980aa09 Merge pull request #16947 from Godmartinz/add-require-serial-to-models
Adds require serial as Asset Model option
2025-09-03 14:53:15 +01:00
b6d397bcca Updated ->present()->fullName() to ->display_name
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 14:57:34 +01:00
c22efc2c3d add to present and transformer and api 2025-05-14 12:55:41 -07:00
565b8f5c7f Fixed #16689: re-add note field in API files listing for AssetModel 2025-04-13 00:33:22 +02:00
dfacd876d5 Added remaining/min_amt to transformers
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 20:13:15 +00:00
0d7304eb8b Use transformer for model files
Signed-off-by: snipe <snipe@snipe.net>
2025-01-20 20:20:35 +00:00
d4018a2834 Added created_by to models API
Signed-off-by: snipe <snipe@snipe.net>
2024-11-13 18:22:57 +00:00
6a3ab526de Refactorer API controller restore methods
Signed-off-by: snipe <snipe@snipe.net>
2023-11-22 18:04:24 +00:00
8ebb9afedd adds min_amt to asset model edit, index, and table 2023-08-24 10:30:07 -07:00
016502f637 Added notesFormatter
Signed-off-by: snipe <snipe@snipe.net>
2023-07-13 13:14:10 +01:00
5d1f294f0e Added parseEscapedMarkedownInline to accessories API
Signed-off-by: snipe <snipe@snipe.net>
2023-07-13 12:03:01 +01:00
6d3bf1e5f5 Added additional method for inline
Signed-off-by: snipe <snipe@snipe.net>
2023-07-11 11:41:58 +01:00
8d8adc1639 Use the Helper::parseEscapedMarkedown in notes
Signed-off-by: snipe <snipe@snipe.net>
2023-06-28 15:02:32 +01:00
dd5f256450 We shouldn’t need this because aliases??
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:02:02 -08:00
381f89c5a8 Added format to array
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 13:15:30 -08:00
db43628bdc Added default field info to models API response
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 13:12:54 -08:00
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
f0546bf689 Clean up Transformers and extract an isDeletable() method to models where it makes sense. 2020-05-23 15:24:10 -04:00
3fbfb0c658 Add requestable to asset model api results (#7577)
Nice, thanks!
2019-12-06 10:33:06 -08:00
c635db0a76 Fixed upload parh for asset models 2019-12-04 15:23:49 -08:00
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
79367642b1 [WIP] Added #5957 - Flysystem support (#6262)
* Added AWS url to example env

* Upgrader - added check for new storage path and attempt to move

* Ignore symlink

* Updated paths for models

* Moved copy methods

* Added AWS_URL support

For some reasin, Flysystem was generating the wrong AWS url (with a region included)

* Switch to Flysystem for image uploads

* Nicer display of image preview

* Updated image preview on edit blades to use Flysystem

* Twiddled some more paths

* Working filesystems config

* Updated Asset Models and Departments to use Flysystem

* Janky workaround for differing S3/local urls/paths

* Try to smartly use S3 as public disk if S3 is configured

* Use public disk Storage options for public files

* Additional transformer edits for Flysystem

* Removed debugging

* Added missing use Storage directive

* Updated seeders to use Flysystem

* Default logo

* Set a default width

We can potentially override this in settings later

* Use Flysystem for logo upload

* Update downloadFile to use Flysystem

* Updated AssetFilesController to use Flysystem

* Updated acceptance signatures to use Flysystem

* Updated signature view to use Flysystem

This isn’t working 100% yet

* Use Flysystem facade for displaying asset image

* Set assets path

Should clean all these up when we’re done here

* Added Rackspace support for Flysystem

* Added Flysystem migrator console command

* Added use Storage directive for categories

* Added user avatars to Flysystem

* Added profile avatar to Flysystem

* Added the option to delete local files with the migrator

* Added a check to prevent people from trying to move from local to local

* Fixed the selectlists for Flysystem

* Fixed the getImageUrl method to reflect Flysystem

* Fixed AWS copy process

* Fixed models path

* More selectlist updates for Flysystem

* Updated example .envs with updated env variable names

* *sigh*

* Updated non-asset getImageUrl() methods to use Flysystem

* Removed S3 hardcoding

* Use Flysystem in email headers

* Fixed typo

* Removed camera support from asset file upload

We’ll find a way to add this in later (and add that support to all of the other image uploads as well)

* Fixed path for categories

* WIP - Switched to standard handleImages for asset upload.

This is currently broken as I refact the handleImages method. Because the assets store/create methods use their own Form Request, the handleImages method doesn’t exist in that Form Request so it wil error now.

* Fixed css URL error

* Updated Debugbar to latest version (#6265)

v3.2 adds support for Laravel 5.7

* Fixed: Missing CSS file in basic.blade.php (#6264)

* Fixed missing CSS file in basic.blade.php

* Added

* Changed stylesheet import for authorize.blade.php

* Updated composer lock

* Added AWS_BUCKET_ROOT as env variable

* Use nicer image preview for logo upload

* Removed AssetRequest form request

* Removed asset form request, moved custom field validation into model

* Added additional help text for logo upload

* Increased the size of the image resize - should make this a setting tho

* Few more formatting tweaks to logo section of branding blade preview

* Use Flysystem for asset/license file uploads

* Use Flysystem for removing images from models that have been deleted

* Enable backups to use Flysystem

This only handles part of the problem. This just makes it so we can ship files to S3 if we want, but does not account for how we backup files that are hosted on S3

* Use Flysystem to download license files

* Updated audits to use Flysystem
2018-09-29 21:33:52 -07:00
9ee2c6be57 Api tests2 (#5098)
* Cleanup

* API tests for asset models and related cleanup/improvements

* Api license test.  Tests incomplete because create/update/destroy are not implemented yet in the controller

* API Category tests.

* Manufacturers API Test.

* Implement License Create/Update/Delete Methods for API and enable test.

* Add missing gate for api.  Fixes only superadmins being able to generate Personal Access Toekns
2018-02-25 12:10:02 -08:00
9179b6d9c4 Improved - disallow delete through the GUI if asset model has assets associated
(We prevent this on the backend anyway, but this makes for nicer UI)
2017-12-12 06:49:04 -08:00
b748e7ed5e Fixed transformers to use new singleton upload urls 2017-11-07 11:11:47 -08:00
6dd4282f1f Fixes #4130 - show deleted asset models 2017-10-03 17:53:08 -07:00
03f9d01aab Fixes #3775 - added missing created_at and updated_at fields 2017-07-29 17:01:03 -07:00
847262e989 Fixes #3774 - fixes for inconsistent API responses (‘’ vs null) and adds escaping 2017-07-25 23:40:30 -07:00
c2e8803d1e Addec clone button back to models, assets, licenses, etc 2017-07-07 18:45:49 -07:00
eea90dda78 Added Gate integration into API transformers 2017-02-08 18:24:55 -08:00
99d837fa50 Added API methods and UI to view assets associated with a particular model 2017-01-26 21:02:59 -08:00
75d35273c9 Pull image formatter out of dynamic loop, pass full url to formatter 2017-01-24 22:46:07 -08:00
04bb180a80 More bootstrap tables formatting 2017-01-24 22:25:17 -08:00