Commit graph

1165 commits

Author SHA1 Message Date
snipe 31516abef9 Fixes #3858 - use transformer for single listing categories 2017-08-22 14:26:08 -07:00
snipe d2535582f3 Fixes #3853 - added notes/zip to suppliers API response 2017-08-22 14:18:21 -07:00
snipe eaaea303f4 Fixes #3860 - return JSON instead of redirect in API delete dept call 2017-08-22 14:15:13 -07:00
snipe 8c5312b931 Fixes #3866 - weird API behavior in status label types 2017-08-22 14:10:54 -07:00
snipe 4ef6e292d1 Fixes #3868 - model_number/notes in models API call 2017-08-22 13:56:51 -07:00
snipe 6310670835 Fixes #3869 - asset maintenances API endpoints 2017-08-22 13:52:06 -07:00
snipe 148d41d8dc Removes erroneous else 2017-08-22 12:22:32 -07:00
snipe 71c1c74164 Fixes #3085 - adds “change password” functionality back to user accounts 2017-08-22 12:09:04 -07:00
snipe 9c02526a37 Make fields nullable in settings 2017-08-22 10:41:59 -07:00
snipe 6a73ec6537 First stab at a recrypter for legacy mcrypt conversion 2017-08-21 22:30:56 -07:00
snipe 4576cb6f56 Merge branch 'develop' of github.com:snipe/snipe-it into develop 2017-08-10 14:38:08 -07:00
snipe 56f88d2c22 Fixes #3836 - Adds supplier to licenses column 2017-08-10 14:38:04 -07:00
gibsonjoshua55 c1d1cb8122 Address #3840 and fixes group transformation in UsersTransformer (#3841)
Removes the incorrect variable access in UsersTransformer of a users's
groups and adds an array of groups' ids and names to the return array.
2017-08-10 13:37:54 -07:00
snipe de18e2a887 Only bcrypt passwords on user save if the password value is passed 2017-08-08 14:41:58 -07:00
snipe 7da4fe4524 Fixes #3825 - allows fillables through location API 2017-08-08 12:36:28 -07:00
snipe 9bfd345774 Use Company transformer with payload 2017-08-03 19:55:08 -07:00
snipe df87c82ddc Fixes #3805 - add/update/delete methods for User API 2017-08-03 19:50:18 -07:00
snipe 3e8b7d9c94 Check for overall asset delete permissions before checking to see if the user can delete that specific asset 2017-08-03 19:49:41 -07:00
Jason Spriggs 7c4ee54f8b Fix #3803 - Return asset object instead of just id (#3811) 2017-08-01 20:01:11 -07:00
snipe 03f9d01aab Fixes #3775 - added missing created_at and updated_at fields 2017-07-29 17:01:03 -07:00
snipe 5b420fb4b9 Fixes #3779 - corrects presenter used for Consumables 2017-07-29 16:44:51 -07:00
snipe a2d63dd3e4 Fixes #3776 - adds Company to Dept UI 2017-07-29 16:42:17 -07:00
snipe 0408509fdc Fixes #3777 - correct response for two_factor_actived for user API 2017-07-29 16:25:42 -07:00
snipe 5e47c18d68 Fixes #3786 - checkin/checkout to components UI 2017-07-29 16:13:17 -07:00
snipe 4e5cf531f7 Fixes #3799 - use transformers on show() method as well 2017-07-29 15:46:10 -07:00
snipe ccb7556281 Fixes javascript error when custom fields exist but do not belong to any fieldsets or models 2017-07-26 17:06:58 -07:00
snipe ee7348d0d5 Better fix for javascript formatter for employee number 2017-07-26 16:47:47 -07:00
snipe 7d6bf4ac24 Fixes stupid javascript for employee_number 2017-07-26 16:26:47 -07:00
snipe cb903ab9fd Fixes manager user->name to username in Users API 2017-07-26 08:51:16 -07:00
snipe 66d8308163 More compact payload for users API on location and manager 2017-07-26 08:47:54 -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 59006964d1 Fixes #3771 - adds username to API response on Asset API 2017-07-25 22:11:50 -07:00
snipe ac29b142dc Adds max thumbnail width to asset listings, settings 2017-07-25 19:36:38 -07:00
snipe 0fbf9236f4 Fixes #3742 - add employee number to asset listing
Also removes asset report, since it’s basically the exact same output as the asset listing
2017-07-25 01:17:23 -07:00
Jan Felix Wiebe 5cc84ca137 Use correct array when deleting users with location (#3769) 2017-07-24 23:15:15 -07:00
snipe 29f1cf2b48 Increase depreciation max 2017-07-19 19:41:21 -07:00
snipe 7510f9f128 Fixes #3753 - use route direction instead of URL 2017-07-17 16:42:39 -07:00
snipe 3eea1a23f8 Slug the filename
So upoloads with weird characters like parens don’t get hoarked when trying to delete
2017-07-14 02:38:13 -07:00
snipe 1fda4593c1 Update @gibsonjoshua55 as a contributor 2017-07-12 20:41:20 -07:00
snipe 6b5a0983ee Added model validation to custom fieldsets 2017-07-12 19:34:45 -07:00
snipe ad12a5ce11 Added store/update methods to custom fields API 2017-07-12 19:34:34 -07:00
snipe 5abe72ce02 Added whether the field is required to the custom fieldsets transformer 2017-07-12 19:23:54 -07:00
snipe 3e3276334b Added escaping to API output 2017-07-12 19:23:15 -07:00
snipe b13e04095e Removed commented code 2017-07-12 19:22:58 -07:00
gibsonjoshua55 3cfcc43efa Adds basic GET api support for CustomFieldsets (#3697)
* Adds basic GET api support for CustomFieldsets

Currently there is not support for getting what fields a given fieldset contains
from the API.  This commit creates a new API Controller for CustomFieldsets as
well as Transformers for CustomFields CustomFieldsets.  Additionally, the api
route has been updated so that a show method can be access from
http://myapp/api/v1/fieldsets/{id}

* CustomFieldsetsTransformer only returns id and name of model

* Added index api method for CustomFieldsets

* Removes copy/paste error in CustomFieldsetController (including search)

* Added id to CustomFieldsetsTransformers

* Adds custom_fieldset_id as a field when storing and updating AssetModels

* Removed uncessesary parameter from CustomFieldsetsController.index

* Cleaned up CustomFieldset API
2017-07-12 17:51:22 -07:00
Daniel Meltzer f432f98e12 Importer tests + Fixes (#3733)
* Fix Bug in User::generateFormattedNameFromFullName

In a name "John Doe", this method would split it into "John" and " Doe",
Leaving a space in the last name when importing to the database.  Strip
this space.

* Cleanup/fix some item mapping.

Also make some changes to the importer schema to allow for unit testing.
Generate a default item mapping, and then merge that with any custom
mappings.

* Beginning work on importer unit tests.

* Strip out testrun branches from importer.  It added a lot of complexity and was not terribly useful with web importer as it stood, might reconsider down the road however.

* Normalize the mapped keys when using custom field mappings.

* Add test for custom asset import mapping.

* Make all unit tests inherit from a new custom base.

This baseclass currently calls Artisan::migrate() and seeds a Settings
instance.  This fixes unit tests after the autoincrement bits.

* Store requestable as a boolean.  Fixes some import oddities

* Work on tests for accessory importer.

* Test for custom mapping of accessory import, also adjust the internal field for purchase date.

* Update default locale fallback for currency detection

* Fix Reassignable in consumable as well.

* More importer tests and fixes.
2017-07-11 20:37:02 -07:00
snipe 9bcfe0748b Make custom fields into their own JSON array 2017-07-08 18:44:28 -07:00
snipe de5e7bd9ba Removed null formatter 2017-07-08 17:04:52 -07:00
snipe 635299cd74 Decrypt encrypted fields 2017-07-08 17:04:40 -07:00
snipe 20376daec4 Fix encryption on first save 2017-07-08 17:04:24 -07:00
snipe 50e1570543 Added additional models for #3702 2017-07-08 14:49:43 -07:00
snipe eb94c4333d Fixes #3702 - Added artisan command to walk through special characters and unescape them in the DB 2017-07-08 14:47:43 -07:00
snipe a49fd16916 Fixed delete file settings route 2017-07-08 13:42:05 -07:00
snipe 932e25ca9b Only add an update log message if the asset isn’t being checked in or out 2017-07-08 03:38:39 -07:00
snipe d2f6c8af11 Require first name field if LDAP is enabled 2017-07-08 01:40:56 -07:00
snipe 33557f3792 Nicer formatting for phpinfo output 2017-07-08 00:22:30 -07:00
snipe c2927c4a2e Added phpinfo page if debugging is enabled 2017-07-08 00:09:39 -07:00
snipe ab2b2f3043 Updated UI for Admin Settings 2017-07-07 23:44:48 -07:00
snipe 9894edb008 Added login note to settings 2017-07-07 19:54:10 -07:00
snipe c2e8803d1e Addec clone button back to models, assets, licenses, etc 2017-07-07 18:45:49 -07:00
snipe 7e1f7297b3 Settings tweaks 2017-07-07 18:06:31 -07:00
snipe 31cabaa4db Fixes #3724 - adds edit/delete button back to companies listing 2017-07-07 17:10:06 -07:00
Daniel Meltzer 61c6160b98 Importer mapping - v1 (#3677)
* 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.
2017-06-21 16:37:37 -07:00
Daniel Meltzer d12159c042 Fix travis with new observer code (#3683)
* 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.
2017-06-20 20:38:13 -07:00
snipe 25e99194ce Fixes #3681 - corrected fieldname for bulk asset delete 2017-06-20 14:41:30 -07:00
snipe 5b9bcd8fa2 Add next auto-increment to settings form 2017-06-20 12:23:16 -07:00
snipe 4bde058192 Save next_auto_tag_base in settings on edit 2017-06-20 12:19:05 -07:00
snipe ffba9789b7 Fixed typo in variable name 2017-06-20 12:13:36 -07:00
snipe 1052be670d Increase size of state field 2017-06-15 21:04:10 -07:00
snipe 770092f23f Added save/update/delete observers
This should make it easier to handle action logging between the GUI and the API
2017-06-15 20:54:14 -07:00
snipe 99f65cbf69 Hopefully fixes #3203 and #3439 2017-06-15 19:42:43 -07:00
Daniel Meltzer 5d4920c741 [WIP] Improvements to unit tests. (#3574)
* 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.
2017-06-12 17:39:03 -07:00
Daniel Meltzer dfea47a272 Fix location view display. Migrate to api controller methods and fix missing bits to make this happen. Show manager on the location view page. 2017-06-12 18:24:20 -05:00
Daniel Meltzer f0d78091d2 Add a manager field to locations.
This is round one of the rethink of checkout-to-everything.  A location
now has a manager field, and the manager (by default) be responsible for
assets checked out to the location.
2017-06-12 18:23:50 -05:00
snipe 966a736602 Patches #3640 to develop 2017-06-12 15:31:11 -07:00
Daniel Nemanic 30a9704625 Update UsersController.php (#3640)
If a user is disabled in your Active Directory, it should be deactivated in the licensing too.

The standard state is now deactivated for synced accounts.
Maybe we can change this throw a Setting for a standard state.

The codes comes from this site:
http://www.netvision.com/ad_useraccountcontrol.php
2017-06-12 15:29:55 -07:00
snipe 14f3868b46 Update all controllers to use laravel 5 return view method 2017-06-09 16:44:03 -07:00
snipe a5cd4a0a22 Use updated view method for laravel 5 2017-06-09 16:31:25 -07:00
snipe ad816264e9 WIP import mapper #3639
@dmeltzer, I’m not sure how much extra work this will be to integrate.
2017-06-09 16:29:42 -07:00
snipe 041b794e1f Fixes #3634 - use new routes for groups 2017-06-08 20:24:26 -07:00
snipe da2d9b2374 Fixes presenter issue on user history 2017-06-08 19:09:42 -07:00
snipe 58b2834c54 Fixed case for userloc 2017-06-08 18:46:07 -07:00
snipe 2aaa635345 Fixes crash on asset detail view 2017-06-08 18:26:55 -07:00
snipe d62896f945 Fixes #3414 - bulk update for asset models 2017-06-08 17:48:48 -07:00
Wyatt 3e67cdc501 Allows a null location value for importing LDAP users (#3598)
* Allows a null location value for importing LDAP users

* Forgot you need to set the variable to null..
2017-06-01 21:20:40 -07:00
snipe 74aaadcdc5 Fixes #3583 - incorrect 404 status code, use curl for checking .env 2017-06-01 20:41:23 -07:00
snipe 25dca80644 Fixes #3602 - actions missing from suppliers in v4 2017-05-31 06:52:37 -07:00
snipe 7b1265cb89 Cache totals for later dashboard use 2017-05-31 02:02:55 -07:00
snipe 71b668e1a3 Removed extra else to make Codacy happy 2017-05-23 15:53:39 -07:00
snipe 8ab29c628f Added icon to presenter 2017-05-23 14:31:44 -07:00
snipe 4ada5eaa94 Added targetType method 2017-05-23 14:31:14 -07:00
snipe 5499735f3a Actionlogs API transformer 2017-05-23 14:31:04 -07:00
snipe 40e11b6661 Removed old getActivityReportDataTable() method, since we’re using the API now 2017-05-23 14:30:55 -07:00
snipe b1fa25b73e Added filter to report by user_id for activity 2017-05-23 14:30:29 -07:00
snipe 452c52a3ab Changed variable name for consistency 2017-05-23 14:30:07 -07:00
snipe 52f24f7587 Reports API controller 2017-05-23 09:24:36 -07:00
snipe f285bd3c29 Added Dept field to users table presenter 2017-05-23 02:49:51 -07:00
snipe aeca549bab Dept search in User query scopes 2017-05-23 02:49:27 -07:00
snipe e0d2cbef20 Allow manager to be null for dept 2017-05-23 02:49:00 -07:00
snipe 96e8109d01 Allow location/company/manager to be null via validation 2017-05-23 02:48:51 -07:00
snipe b223630f72 Added dept to User API transformer 2017-05-23 02:48:03 -07:00
snipe e9c39add4f Added dept helper reference in create/edit/bulk edit users 2017-05-23 02:47:49 -07:00
snipe 7ec1724308 Create, edit and destroy for depts 2017-05-23 02:47:25 -07:00
snipe 811ddd2f67 Include depts in returned list, sort by dept 2017-05-23 02:46:55 -07:00
snipe cefb20d46f Set dept manager ID for dept 2017-05-23 02:46:25 -07:00
snipe bb323db685 Load relationships in query 2017-05-23 02:46:03 -07:00
snipe eb3aa99e4f Added destroy method to dept 2017-05-23 02:45:51 -07:00
snipe a7592de304 Added helper for dept list 2017-05-23 02:37:37 -07:00
snipe 64f17cecbf Updated department transformer 2017-05-23 02:37:30 -07:00
snipe e2f2f9e154 Additional methods for Department web UI 2017-05-23 01:09:13 -07:00
snipe 8caf6623f1 Filter by dept for user display 2017-05-23 01:09:03 -07:00
snipe 6c623866c0 Additional API methods for departments 2017-05-23 01:08:55 -07:00
snipe 659e60fd12 Department controllers and transformer 2017-05-22 21:32:33 -07:00
snipe ae329f4160 Department model 2017-05-22 21:32:22 -07:00
snipe 71fd430f8e Fixes issue with older, deleted asset tags caching QR codes 2017-05-19 02:51:35 -07:00
snipe 0c43e64160 Licenses detail view 2017-05-18 22:10:45 -07:00
snipe 708385e23a Merge branch 'develop' of github.com:snipe/snipe-it into develop 2017-05-16 12:32:05 -07:00
Jason Spriggs 0ab37af7ab Add in location parent and child information into API requests (#3582)
* Add location hierarchy to LocationsTransformer

* Add in parent_id
2017-05-16 12:30:11 -07:00
snipe 891660d4ea Fixes #3580 - reduce minimim username size to 1 2017-05-16 12:26:38 -07:00
snipe 0c8308f5a4 Fixes for ordering on asset listing 2017-05-15 20:55:39 -07:00
snipe fdd88af44a Fixes #3556 2017-05-15 19:14:55 -07:00
snipe c8796cf045 Only prompt for checkin if there is an assigned user 2017-05-10 03:37:30 -07:00
snipe ee2c67a65f Added missing logging back in 2017-05-09 15:30:45 -07:00
snipe 5614578710 Don’t make the item clickable if it’s been deleted 2017-05-09 15:30:19 -07:00
snipe 07882110fa Cleanup dashboard controller
We ajax this data in now
2017-05-09 00:38:45 -07:00
Daniel Meltzer 82dc06ae19 Remove php7 feature (#3548)
...
2017-05-08 18:19:34 -07:00
Daniel Meltzer 38372f2b37 Remove php7 specific feature (#3547)
Not sure how this got in... I don't remember writing it (but I guess I did!)
2017-05-08 18:19:15 -07:00
Daniel Meltzer e9b056f66c Importer fixes v2 (#3524)
* 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
2017-05-03 12:14:35 -07:00
snipe 841e3efe96 Add passport commands to boot() to allow us to call them via PHP 2017-04-27 07:09:46 -07:00
snipe e088eea2f7 Pull out weird query scope that breaks stuff when querying large datasets 2017-04-26 22:40:20 -07:00
snipe 59a4e161ff Fixes checkout buttons on licenses list 2017-04-24 21:37:20 -07:00
snipe 54a2c46101 Fixes #3491 - adds supplier info to assets listing 2017-04-22 19:14:28 -05:00
snipe 120c08b3a3 Merge branch 'develop' of github.com:snipe/snipe-it into develop 2017-04-06 20:08:52 -07:00
snipe e32d2f98b5 Added nameUrl presenters (for now) 2017-04-06 20:08:47 -07:00
snipe aa354e883e Removed erroneous comments 2017-04-06 20:08:38 -07:00
itsupportcmsukorg 89ba221765 fix upload hour so it's 24hr instead of always AM (#3480)
correct an error where logUpload was trying to save 12-hr time to a 24-hr field, e.g. 15:00 (3pm) was becoming 3:00 (3am)
2017-04-06 19:48:15 -07:00
Kasey 5663429280 applying PR #3456 changes to develop branch (#3472)
* 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
2017-03-31 15:43:37 -07:00
Daniel Meltzer 1bb89db451 A few fixes (#3437)
* This method was renamed, so we need to rename the eager load

* Readd tinker to the composer dev packages.

* Update sql dump for functional tests.
2017-03-31 13:48:31 -07:00
Andrea Bergamasco 7ee172888d /api_tests: Completed tests for basic CRUD for Assets and Components (#3426)
* 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
2017-03-31 13:48:11 -07:00
Andrea Bergamasco 99cc8293ef Fixed undefined metod in unit/PermissionTest (#3422)
* 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.
2017-03-14 08:39:03 -07:00
Andrea Bergamasco e03ebc3fd0 AssetTransformer refactoring, restored tests (#3407)
* 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
2017-03-14 08:37:39 -07:00
snipe 6f269e18fe Remove useless validation for custom CSS 2017-03-11 15:34:54 -08:00
snipe c8c5c05351 Added asset checkin/checkout API methods 2017-03-11 14:04:52 -08:00
snipe 8dbd9fb299 Added additional permissions for checkin/checkout buttons 2017-03-11 12:14:10 -08:00
snipe 00aa06882c Fixed incorrect route for components 2017-03-11 12:13:35 -08:00
snipe 742e3d044e API improvements
Components still need some work here
2017-03-11 10:05:50 -08:00
snipe ae6828a0fa Removed dumb code comment 2017-03-11 08:03:30 -08:00
snipe 2a4bf65883 Basic sanity checking on some of the API controllers 2017-03-11 08:03:16 -08:00
snipe 4e81b97145 Toggle visibility of fields in categories presenter 2017-03-11 05:30:14 -08:00
snipe a680541fe8 Fixed target variable 2017-03-11 05:17:02 -08:00
snipe b51b51b949 Removed logging 2017-03-11 04:49:14 -08:00
snipe 5b450c5978 Disambiguated company_id in assets api controller 2017-03-11 04:39:28 -08:00
snipe 875d0dd343 Added advanced search to assets 2017-03-11 04:26:01 -08:00
snipe b16ff263ec Addtional search filters for licenses API 2017-03-11 02:57:19 -08:00
snipe bb2b6cb642 Foxed license name in licenses API 2017-03-11 02:52:50 -08:00
snipe d799ab2a9c Narrowed down the accessories, consumables, etc APIs for manufacturer filtering 2017-03-11 02:49:24 -08:00
snipe 5803af7409 Use date display formatter on licenses 2017-03-10 22:09:35 -08:00
snipe caf2f648b1 Added updated/created to locations API 2017-03-10 22:09:21 -08:00
snipe c132036f5c Fixes #3311 - more fields for manufacturers 2017-03-10 22:08:59 -08:00
snipe 1682867d02 Added employee number back into user listings 2017-03-10 20:58:09 -08:00
snipe da66eecd74 Allow string as employee number 2017-03-10 20:57:57 -08:00
snipe ad510cecd5 Fixes #2422 - Adds bulk edit for select user attributes 2017-03-10 20:07:44 -08:00
snipe 01ae8802c1 Fix user export 2017-03-03 19:54:06 -08:00
snipe 51fccbdda4 Added last login to user menu 2017-03-03 18:28:13 -08:00
snipe 2b4443f810 Fixed user created at in listing 2017-03-03 18:16:23 -08:00
snipe 6a2fd74219 Fixed API gate names in tranformers for new, more granular admin stuff 2017-03-03 17:56:05 -08:00
snipe 097096aa24 More custom date display via API 2017-03-03 17:53:42 -08:00
snipe 4f1669189e Try to make the select all checkbox work for users.
Not sure where/how this broke?
2017-03-03 17:30:37 -08:00
snipe 3c53ff9329 Set protected date formats 2017-03-03 17:30:19 -08:00
snipe dc38e575d9 Allow date/time formatting selection in settings 2017-03-03 17:29:41 -08:00
snipe c6c3ddba3e Remove detail() presenter 2017-02-23 17:01:01 -08:00
snipe ce2babcafb Fixed name display in transformer for asset listing 2017-02-23 17:00:50 -08:00
Andrea Bergamasco c0c02eebd2 REST API - Refactoring of routes file, more tests added (#3345)
* Toggles the disabled state of auto_increment_prefix

To insert a prefix you had to toggle the checkbox, save the settings and reload. With this script it is immediate. Fixes #1390

* Delete asset image: made checkbox more visible

Related to #3153

* Added personal-access-token component

* Created basic API testing configuration

* First version of /components endpoind cest

* On-the-fly bearer token generation

* Completed testing of PATCH and PUT methods

* Added /components/{id}/assets route with tests

* Updated route and dataTable in view

* Completed test assertion

* Added links to assets in ComponentsAssets view

* Linked Company in AssetView page

* Fixed purchase_cost format expectation in ApiComponentsCest

* Refactored api routes file

Sorted all prefixes in alphabetical order, removed duplicate routes. For every prefix I placed first Route::resource and then any additional route in a Route::group. Expanded arrays for readability and consistency. Removed useless calls as create and edit everywhere.

* Refactored and added one more test to ApiComponentsAssetsCest

* Marked one test as incomplete, 404 response should return json

* Fixed value expectation

* Refactored getToken()

* Added API debugging routes

* Added more information to ValidationException reporting

Now the payload contains the validation errors for each invalid
attribute.

* /apitests: refactored expectations in component assertions

* Created ApiAssetsCest

* /apitests: Cleanup in Exceptions/Handler

* Reverted change to use

* Marked two tests as incomplete, looking for solutions
2017-02-23 16:32:35 -08:00
snipe 9ccaad8b9c Added created_at and modified_at to asset listing/api 2017-02-23 16:23:02 -08:00
snipe 9e7f998df5 Add model_number to accessory search 2017-02-22 22:55:20 -08:00
Andrea Bergamasco e7f7d739ed Bugfixes based on functional tests (#3338)
* Toggles the disabled state of auto_increment_prefix

To insert a prefix you had to toggle the checkbox, save the settings and reload. With this script it is immediate. Fixes #1390

* Delete asset image: made checkbox more visible

Related to #3153

* Added personal-access-token component

* Created basic API testing configuration

* First version of /components endpoind cest

* On-the-fly bearer token generation

* Completed testing of PATCH and PUT methods

* Added /components/{id}/assets route with tests

* Updated route and dataTable in view

* Completed test assertion

* Added links to assets in ComponentsAssets view

* Linked Company in AssetView page

* Bugfixes based on functional tests

* Removed unused function

* Marked tests as incomplete

* Added check for  existence in groups/edit.blade.php
2017-02-22 22:49:19 -08:00
Daniel Meltzer ad9470b6f8 Assorted fixed (#3332)
* Better error handling of failed file uploads.  Also improve formatting of modal dialog

* Readd app.js to the js build, fixes collapsing sidebar

* Update JS

* Fix font size.  We need to explicitly set the font size for the table because everywhere else that comes from bootstrap-tables
2017-02-22 22:49:06 -08:00
snipe f7e4fca70d Add model_number to accessory search 2017-02-22 22:34:56 -08:00
snipe 8c20c2bd39 Fixed Illuminate path 2017-02-22 22:20:57 -08:00
snipe 904be03ffd Merge branch 'develop' of github.com:snipe/snipe-it into develop 2017-02-22 22:20:32 -08:00
snipe 53ba2bbb4e Updated method for eager loading assets 2017-02-21 15:39:59 -08:00
snipe 2c6f323820 Increase max EOL 2017-02-21 15:39:46 -08:00
snipe f520eaa6ce Increase max depreciation months 2017-02-21 15:39:39 -08:00
Andrea Bergamasco fde46251de Components Assets view + stubbed API tests (#3325)
* Toggles the disabled state of auto_increment_prefix

To insert a prefix you had to toggle the checkbox, save the settings and reload. With this script it is immediate. Fixes #1390

* Delete asset image: made checkbox more visible

Related to #3153

* Added personal-access-token component

* Created basic API testing configuration

* First version of /components endpoind cest

* On-the-fly bearer token generation

* Completed testing of PATCH and PUT methods

* Added /components/{id}/assets route with tests

* Updated route and dataTable in view

* Completed test assertion

* Added links to assets in ComponentsAssets view

* Linked Company in AssetView page
2017-02-21 14:26:46 -08:00
snipe edf36cd850 Sigh. 2017-02-17 18:30:48 -08:00
snipe a710c98b50 Set string length because laravel is dumb sometimes 2017-02-17 18:26:53 -08:00
snipe 8fe8ff71e8 Category improvements 2017-02-16 00:32:33 -08:00
snipe c67b44b3d5 Moving license index to new API format 2017-02-10 18:43:30 -08:00
snipe 74c5c55838 Removed outdated comment 2017-02-08 18:25:06 -08:00
snipe eea90dda78 Added Gate integration into API transformers 2017-02-08 18:24:55 -08:00
snipe 2892e32095 Set visible to true for checkin/checkout buttons 2017-02-08 18:20:44 -08:00
snipe 8cce1a3882 Fixed users formatter method 2017-02-08 18:20:23 -08:00
snipe 86198badbb Added more company_id filtering, more transformers 2017-02-08 08:48:41 -08:00
snipe 72ec362f72 Search on status label type 2017-02-08 03:37:44 -08:00
snipe 4cf01e4f48 Added ability to search by company_id and location_id 2017-02-08 03:31:42 -08:00
snipe 6d40a98a16 User assets presenter for column headers 2017-02-06 18:49:08 -08:00
snipe 584e2ba618 Added a space 2017-02-06 18:47:54 -08:00
snipe 1751a8c0e0 Switched to presented for ugly BS table column headers 2017-02-03 22:20:11 -08:00
snipe d37b9fe169 Use hardrware listing for status labels detail link 2017-02-03 20:34:09 -08:00
snipe 98e0ecbd88 Added manufacturer sorting on models 2017-02-03 20:20:03 -08:00
snipe 9cae6066a0 Added asset by manufacturer listing 2017-02-03 19:52:00 -08:00
snipe f1c4aed5b5 Removed additional groups API fields 2017-02-03 19:35:22 -08:00
snipe 1e2a23e955 Use main assets API to pull view pages for assets listings 2017-02-03 19:34:24 -08:00
snipe bb4c443cd9 Added notes to custom report 2017-02-03 02:20:56 -08:00
snipe 729b709de2 Include notes in custom asset report 2017-02-03 02:16:37 -08:00
snipe f1592aa63f Tighter asset API responses, sanitization 2017-02-03 02:04:17 -08:00
snipe 6c1a827ed0 Added warranty info to listing 2017-02-03 01:45:12 -08:00
snipe d19cc9d9c1 Added legacy redirector 2017-02-02 18:14:25 -08:00
snipe 12c5ca67ff Pulled accidental debugging exit 2017-02-01 18:56:47 -08:00
snipe 541a5e6776 Groups API starter
Edit/Create still broken for some reason
2017-02-01 18:50:28 -08:00
snipe 464c524375 Depreciations API 2017-02-01 17:59:03 -08:00
snipe 7086ac8a8b Tweaks to status labelas listing display 2017-02-01 17:48:28 -08:00
snipe a80af854ba Switch companyName to company 2017-01-26 21:05:33 -08:00
snipe 99d837fa50 Added API methods and UI to view assets associated with a particular model 2017-01-26 21:02:59 -08:00
snipe 8d50bb19af Switched to route from redirect->to 2017-01-26 20:13:59 -08:00
snipe ec7e89ecb8 Added Helper 2017-01-26 20:08:15 -08:00
snipe 377cb8e5d1 Use Locations transformer for location API 2017-01-26 20:08:06 -08:00
snipe c7003897ae Fixed Locations transformer for assigned assets 2017-01-26 20:07:46 -08:00
snipe 231f4dce07 Basic components API 2017-01-26 19:16:06 -08:00
snipe 5e9e6da577 Basic consumables API 2017-01-26 18:46:18 -08:00
snipe 9ac9c6f1bc Updated convertUnicodeDbSlug to use Patchwork if intl isn’t installed 2017-01-26 04:59:14 -08:00
snipe b4c6d0c897 Added optional help text field to custom fields 2017-01-26 04:52:11 -08:00
snipe cbff2ec57d Removed log comment 2017-01-25 22:29:05 -08:00
Daniel Meltzer 5ba2ec881c Vue importer (#3235)
* Begin work on vueifying the importer

* Beginning work on migrating the importer to use a vue/components for future interactivity

Update JS

More importer work.  Move to a vue based modal, begin handling of processing.  Still need to port error messages.

More importer work.  Move to a vue based modal, begin handling of processing.  Still need to port error messages.

Update importer.  Add error display.  Fix modal, update vue-strap to vue2

More progress.  Add select2 vue bits.

* Move to querying the db to find importer matches.  It scales better on large datasets.

Fix select2 related issues.  We were trying to initialize it twice, which led to the custom data being overwritten.

* Better error handling on uploads and deletion of files.  Restore progressbar on upload.

* Add support for generic exception reporting if app.debug is enabled.

* Handle Http 500 errors better.  Display errors if debug is enabled.  Assorted cleanups.

* Fix codacy issues, remove unused methods.

* Only bind vue to the importer for now.

* Load vue for passport as well.
2017-01-25 21:29:23 -08:00
snipe a9bf34cf61 Minor transformer cleanup 2017-01-25 21:01:00 -08:00
snipe 855d775c41 Fix fieldset blade path 2017-01-25 18:39:45 -08:00
snipe dc47a0fad6 Fixes #2551 - use UTF-8 safe slugging for MySQL columns 2017-01-25 18:38:20 -08:00
snipe 2a7469d898 Fix uniqueness issue on saving edited fields 2017-01-25 04:52:47 -08:00
snipe b1a80f8ed8 Fixes #1684 - Allow editing of custom fields
@uberbrady can finally get out of the sea
2017-01-25 04:34:11 -08:00
snipe af211c1203 Remove unused method 2017-01-25 03:10:44 -08:00
snipe ed7e967f4a Helper cleanup, slug helper 2017-01-25 03:10:35 -08:00
snipe 80da0f801c Fixes #2921 - use toUTF8 instead of fixUTF8 2017-01-25 03:10:18 -08:00
snipe 5f49e7c1a7 Accessories API routes
Still a bit of a WIP
2017-01-25 02:19:26 -08:00
snipe 75d35273c9 Pull image formatter out of dynamic loop, pass full url to formatter 2017-01-24 22:46:07 -08:00
snipe 04bb180a80 More bootstrap tables formatting 2017-01-24 22:25:17 -08:00
snipe 8f12486f6c More generic javascript formatters, updated api routes 2017-01-24 21:04:38 -08:00
snipe c907414e71 Added escaping 2017-01-24 19:24:47 -08:00
snipe e4e4e6ae47 Licenses transformer for API 2017-01-24 18:57:33 -08:00
snipe afacee90ae Fixed variable for transformer 2017-01-24 18:57:21 -08:00
snipe ebe3f58805 Added missing manufacturer data on save 2017-01-24 18:57:03 -08:00
snipe 88faefe1ed Licenses listing index API 2017-01-24 18:56:27 -08:00
snipe 8f0ab1e719 Fixed weird status code error on ajax 2017-01-24 18:56:15 -08:00
snipe b019e6e950 Removed closures from routes files so that we can allow people to cache routes for performance optimization 2017-01-24 17:37:07 -08:00
snipe d0f062458e Additional API transformers, formatters 2017-01-24 17:07:00 -08:00
snipe ad4bf83aaa Add ability to view assets by status label
This should be refactored. Lots of copypaste from the assets views here
2017-01-18 20:41:40 -08:00
snipe ea3d45882d Fix bulk actions with new bootstrap tables checkboxes 2017-01-18 19:38:42 -08:00
snipe 297034c037 APIified custom fields reorder 2017-01-18 04:58:56 -08:00
snipe 7b1d2ee050 Fixed typo 2017-01-17 11:57:24 -08:00
snipe b3f70a046f Don’t require superadmin for checkin and delete user 2017-01-17 09:19:14 -08:00
snipe 39b4725114 Load assigneruser relationship 2017-01-13 22:17:20 -08:00