* Move importer to an inline-template, allows for translations and easier passing of data from laravel to vue.
* Pull the modal out into a dedicated partial, move importer to views/importer.
* Add document of CSV->importer mappings. Reorganize some code.
Progress.
* Add header_row and first_row to imports table, and process upon uploading a file
* Use an expandable table row instead of a modal for import processing. This should allow for field mapping interaction easier.
* Fix import processing after moving method.
* Frontend importer mapping improvements.
Invert display so we show found columns and allow users to select an
importer field to map to. Also implement sample data based on first row
of csv.
* Update select2. Maintain selected items properly.
* Backend support for importing. Only works on the web importer currently. Definitely needs testing and polish.
* We no longer use vue-modal plugin.
* Add a column to track field mappings to the imports table.
* Cleanup/rename methods+refactor
* Save field mappings and import type when attempting an import, and repopulate these values when returning to the page.
* Update debugbar to fix a bug in the debugbar code.
* Fix asset tag detection.
Also rename findMatch to be a bit clearer as to what it does.
Remove logging to file of imports for http imports because
it eats an incredible amouint of memory.
This commit also moves imports out of the hardware namespace and into
their own webcontroller and route prefix, remove dead code from
AssetController as a result.
* Dynamically limit options for select2 based on import type selected, and group them by item type.
* Add user importer.
Still need to implement emailing of passwords to new users, and probably
test a bit more.
This also bumps the memory limit for web imports up as well, I need to
profile memory usage here before too long.
* Query the db to find user matches rather than search the array. Performance is much much better.
* Speed/memory improvements in importers.
Move to querying the db rather than maintaining an array for all
importers. Also only store the id of items when we import, rather than
the full model. It saves a decent amount of memory.
* Remove grouping of items in select2
With the values being set dynamically, the grouping is redundant. It
also caused a regression with automatically guessing/matching field
names. This is starting to get close.
* Remove debug line on every create.
* Switch migration to be text field instead of json field for compatibility with older mysql/mariadb
* Fix asset import regression matching email address.
* Rearrange travis order in attempt to fix null settings.
* Use auth::id instead of fetching it off the user. Fixes a null object reference during seeding.
* Rearrange travis order in attempt to fix null settings.
* Use auth::id instead of fetching it off the user. Fixes a null object reference during seeding.
* Improvemenets to unit tests.
* Break up modelfactory into multiple files, populate many states.
* Begin testing validation at the unit test level, test relationships.
* Add tests for Asset::availableForCheckout.
* Model factories now generate all needed relationships on demand,
which allows us to unit test with a empty database.
* To faciliate the empty database, we move to using sqlite in memory as
the unit testing database.
* Fix bug with logs of checkouts to non users.
* Fix location finding for assets. Also Fix location show page to show users associated with location. Still need some work to show assets.
* More test and generator improvements
* More unit test fixes. PermissionsTest is borked still.
* More Updates
* Rewrite permissionstest. Check that we have access on the model level rather than via web requests. Also test delete permissions.
* Fix seeders.
* Make the default asset model factory generate assets that are rtd for testing.
* Save progress.
* Rebase tests, fix department unit test, update database for functional tests.
* Update functional and api tests to use new modelfactory signatures.
* Pave the imports table
* Format error response if file is the wrong type.
* If a custom field doesn't exist, don't insert a blank string into the custom fields table
* CustomField::db_column_name can return the stored name in the db. It's slugified when that value is set initially. This fixes a weird issue where _1 was replaced with _xx
* updating with changes made to master
apply PR # 3456 to develop as well
* updating develop with changes made to master
apply PR # 3456 to develop as well
* updating paveit with passport-created oauth tables
* Refactored AssetsTransformer
Casted all ids to int, escaped all text values,
* Added warranty_expires attribute to Asset model
$asset->warranty_expires contains a Carbon object with the warranty
expiration date. Returns null when either purchase_date or
warranty_months are not set.
* Ignoring php-cs cache files
* Restored asset tests expectations
Work in progress - tests still fail
* API controller refactoring, fixed HTTP status codes in responses
* Restored $request->get - debugging
* Added further checks in ApiAssetsCest::updateAssetWithPatch
* /api_tests: Fixed bugs in update() method + code formatting
* /api_tests: Minor code formatting
* /api_tests: Mirrored test code for PATCH and PUT methods
* Removed repeated code
* Test cleanup
* Fixed issues with update() through PATCH and PUT methods
* Added API test suite to .travis.yml
* Refactored AssetsTransformer
Casted all ids to int, escaped all text values,
* Added warranty_expires attribute to Asset model
$asset->warranty_expires contains a Carbon object with the warranty
expiration date. Returns null when either purchase_date or
warranty_months are not set.
* Ignoring php-cs cache files
* Restored asset tests expectations
Work in progress - tests still fail
* API controller refactoring, fixed HTTP status codes in responses
* Restored $request->get - debugging
* Added further checks in ApiAssetsCest::updateAssetWithPatch
* Fixed undefined method
* Fixed initial underscore trimmed by str_slug
* CustomFieldTest now works where intl PHP extension is not installed
If a server doesn't have the intl php extension installed, the custom fields tests failed. Now the tests perform the same check done in the CustomField class.
* Refactored AssetsTransformer
Casted all ids to int, escaped all text values,
* Added warranty_expires attribute to Asset model
$asset->warranty_expires contains a Carbon object with the warranty
expiration date. Returns null when either purchase_date or
warranty_months are not set.
* Ignoring php-cs cache files
* Restored asset tests expectations
Work in progress - tests still fail
* API controller refactoring, fixed HTTP status codes in responses
* Restored $request->get - debugging
* Added further checks in ApiAssetsCest::updateAssetWithPatch