Commit graph

21 commits

Author SHA1 Message Date
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 00fad35c2a Escape notes in transformCheckedOutAccessory
Signed-off-by: snipe <snipe@snipe.net>
2021-11-24 19:54:45 -08: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
snipe 88f03e6b55 Added last_checkout and notes from pivot for accessories 2020-10-23 00:44:26 -07:00
snipe 6a089f86f8
Fixed pathing for accessories 2020-08-03 11:17:56 -07:00
snipe a7eb89f6b6
Misc fixes for flysystem paths 2020-06-16 16:06:25 -07: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 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
snipe b1b5eeecba Fixed #6013 - add accessory checkout notes to detail page 2018-07-31 16:00:38 -07:00
Daniel Meltzer 7de8f71f58 Api tests (#5096)
* Use the formated date helper to clean up verifications.

* Add Checkin/Checkout api tests.

* Accessories api test

* Add Companies API Test.

* Return ModelNotFound as a 404.

* Cleanups/simplficiations/updates.

* Locations api test.

* currency and image should be fillable on location.

* Update components api test.

* Use findOrFail so we return a 404 instead of a 200.  Matches other item types.

* order_number should be fillable in component.

* Add updated_at and permissions to information returned from api for a user.

* Add users test and flesh out factory and fillable fields.

* Add test for assets method

* API status label test.

* Disable php7.2 for now on travis until the count(null) issues are remedied

* Add serial to update.

* API model not found should return a 200
2018-02-24 19:01:34 -08:00
snipe 4215a3257b Fixes #1044 - adds suppliers and image to accessories (#4266)
* Ignore accesories uploads

* API: Allow searching accessories by supplier id

* Adds suppliers and image upload to accessories

* Allow sorting by counts for suppliers

* Validate supplier image uploads

* Remove purchase_date from protected accessory array, it was converting it to datetime in datepicker
2017-10-19 16:25:24 -07:00
snipe 834c6ad8f9 Removed extra space 2017-10-07 06:56:47 -07:00
snipe f66e222f3d Fixes #4132 - associated accessory users 2017-10-03 21:03:00 -07:00
snipe 4d32f2b337 Fixes #4059 - accessories view 2017-09-28 21:18:00 -07:00
snipe 847262e989 Fixes #3774 - fixes for inconsistent API responses (‘’ vs null) and adds escaping 2017-07-25 23:40:30 -07:00
snipe 8dbd9fb299 Added additional permissions for checkin/checkout buttons 2017-03-11 12:14:10 -08:00
snipe d799ab2a9c Narrowed down the accessories, consumables, etc APIs for manufacturer filtering 2017-03-11 02:49:24 -08:00
snipe 097096aa24 More custom date display via API 2017-03-03 17:53:42 -08:00
snipe eea90dda78 Added Gate integration into API transformers 2017-02-08 18:24:55 -08:00
snipe 5f49e7c1a7 Accessories API routes
Still a bit of a WIP
2017-01-25 02:19:26 -08:00