* Work towards a functional travis. Step 1: Disable broken unit tests.
* Fix functional tests
This updates the login information and model factories to work with
changes to source.
* Importer name/full name fixes.
Fix a bug where "name" was used ambigously and mapping "item name" to
"name" would confuse the importer into thinking it should also be a user
name. Now we default to "full name" for the users name, and "item name"
for the item name. These are still both configurable through the custom
mapping.
Also update sample csvs and remove an outdated sample.
* Max length of supplier notes is 191, not 255, as per default laravel string length. Might make sense to change this to a text field in the future to match other places.
* Use sqlite/different db setup for unit tests.
* Fix assets api test.
* Fix Components API test.
* increase travis memory limit for functional tests.
* Use travis config for api tests as well.
* Fix memory limit file.
* Disable ApiComponentsAssetsCest until it's fixed.
The API UsersController accepts manager_id, but calls the following:
$user->fill($request->all());
This results in manager_id being ignored. I can't see any problem with
allowing a user's manager to be modified using the API, so this change
allows it.
* If a user id is provided in the name column of an import, we should assume that it is a user id and check out to it.
* Fix build of vue files. The location is public/js/build, not public/build
* Ensure a status type is set before allowing submission of an import.
Also expand the status text label to change color based on success/failure.
Fixes#4658
* Use right key to lookup emails when importing users. Fixes 4619.
* Import serial for components, and make unique matches based on the serial as well as the name. Fixes#4569
* Set the location_id when importing an item properly.
This moves as well to using the Asset::checkout() method, which should consolidate the logic into a useful spot.
Fixes#4563 (I think)
* Production assets.
* Case insensitive field map guessing and repopulate when changingin import type.
* The default locale of en does not include dollar sign in default currency. Assume if there is no currency symbol set that the dollar sign is a good thing to look for in parsefloat.
* Fix for 4485. Serial not serial_number
Also fix bug where updating with a csv that does not include custom field columns should not overwrite current values.
* Rename serial_number to serial in default imports to avoid needing to map weirdly.
* Add Test for 4359. Not reproducable at current though
* More helpful text on how the custom validator works
* Clarified language of custom format, fixed regex example
* Fixed regex example in placeholder
* Added comments to custom fields
* Added regex validation string
* Added valid_regex validator in format requirements
* Removed useles comments
* Fixes#4236 - validate the regex custom validation
* Add Authorizable trait and interface to our user model so we have access to User::can/User::cant. We should take a look at where else our user model has diverged from Larvel since it was created...
* Policy cleanup/fixes.
This commit adds policies for the missing backend/"settings" areas. The
permissions were implemented a while back but the policies did not, so
authorizing actions was failing.
In addition, this condenses a lot of code in the policies into base
classes. Most of the files were identical except for table names, so we
move all of the checks into a base class and override the table name in
each policy.
* Use a better name and permission for the check in the default layout.
* Locations API support for image
* Added manufacturers API support for image
* Added manufacturers API support for image
* Added image support for locations add/update
* Added manufacturer image upload support to controller
* General image string
* Added blade support for image uploads/delete image
* Added $request support (from Input::)
* Added image support in API transformers
* Added image to Manufacturers presenter for data table
* Migration to create image fields
* Ignore the contents of the new image directories
* Create new image upload directories
* Created components/consumables uploads directory
* Fixed missing textSearch scope from companies
* Added ignore for companies uploads directory
* Added blade support for image upload
* Fixed path to upload directory on edit
* Added company image upport to transformers, controllers
* Added image support for categories
* Added support for images in Departments
* Added support for image in Consumables
* Added image support for components
* 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
For a while, prior to 987536930, we did not null assigned_type on
checkin. This migration manually nulls all assigned_type fields if
assigned_to is unset. Add a test to AssetTest for this as well...kind
of. We need to extract an Asset::checkin() method for 4.1 that mirrors
Asset::checkOut() to really test this.
This also fixes a separate (but related) issue. The Asset importer did
not set assigned_type when importing and creating users. In this
instance, we assume that if assigned_to is set and assigned_type is not,
then the item was checked out to a user and update the DB accordingly.
Also add a check in ImporterTest for this issue.
* There is no notes field on accessories. Fixes Importer Test.
* Fix notification test. We should see a checkout not allowed exception when trying to check out to a location if the asset requires acceptance.
* Fix Custom field import.
Add a test for custom field import, and fix a few issues related to
importing custom fields. This will restore v3 functionality.
* Add UI support for mapping custom fields.
This still requires the field mappings to be created/assigned in
advance, but will fetch all custom field names and allow them to be
selected when setting up custom field mappings.
This commit also updates laravel-mix to v1.4.3 and other node
dependencies to fix some build issues.
* Fix some requestable asset page/assetloc issues. I'd love to know why laravel expections relationships to be in lower case... but thats a question for another day.
* Fix accidental commit of ImporterTest.
* Move the name() method to the presenter
This fixes some weird collisions between laravels voodoo and our
presenter voodoo that confused php. It's also probably a cleaner place
to put it. Should fix#3927
* Add missing parenthesis
* Add heading to tables on locations/view page.
* Fix some n+1 problems
* Use route in notification dropdown to make sure we link to correct page
* Work on better UI support for checkout to non-user. Fix links on index bootstrap table, work towards eliminating assignedUser
* Remove Asset::assigneduser() relationship. Instead add a checkedOutToUser() method and/or port to using assignedTo()
* Adjust string to fit new reality
* Fix#3780. Move the consumables getDataView method to the ApiController. Not entirely RESTful, but it's a weird method that probably doesn't need its own controller and the functionality would be strange to stack on the userscontroller...
* Fix file uploads to assets and restore the delete route.
* Add asset maintence edit action to index.
* Suppliers asset list should link to the related asset, not to the supplier with same ID.
* Asset models page should use polymorphic formatter on assigned to to better handle assorted item types.
* Comment out more assigneduser fallacy until we figure out the query builder approach to searching for location text.
Working mail from notification. Still requires testing/cleaning
Add tests around checkout notification.
This also removes the ability to check out an asset to a location|asset
that requires acceptance/a Eula. For 4.1 we may think about how to
support such a thing, but at present it seems to make sense to only alow
such assets to be checked out to users, who can be responsible for the
items.