Commit graph

670 commits

Author SHA1 Message Date
snipe a69090c91c Moved import to top level sidenav 2017-02-03 19:33:40 -08:00
snipe 85d5b75de6 Removed console debugging messages 2017-02-03 03:55:43 -08:00
snipe cddd3cdb81 Added spinner icon to loading message 2017-02-03 03:54:38 -08:00
snipe 729b709de2 Include notes in custom asset report 2017-02-03 02:16:37 -08:00
snipe cdb6349035 Updated JS 2017-02-03 01:45:41 -08:00
snipe 6c1a827ed0 Added warranty info to listing 2017-02-03 01:45:12 -08:00
snipe f9bed9264f Removed oops state if model has no fields 2017-02-02 19:11:10 -08:00
snipe ca490fd129 Updated javascript 2017-02-02 19:00:42 -08:00
snipe 93719b2214 Merge branch 'develop' of github.com:snipe/snipe-it into develop 2017-02-02 18:55:29 -08:00
snipe 498dc9da43 Removed duplicate header 2017-02-02 18:54:31 -08:00
Brady Wetherington 7dbbe862ce Tried to fix build environment/select2 (#3262) 2017-02-02 18:53:50 -08:00
snipe b7d3b65bae Merge branch 'develop' of github.com:snipe/snipe-it into develop 2017-02-02 17:12:55 -08:00
Daniel Meltzer 3c8910eeab Add select2 to node for now. (#3243) 2017-02-02 17:07:26 -08:00
snipe 18e2db24bd Updated groups index route name 2017-02-01 19:13:17 -08:00
snipe f1a83bd007 Fixed bulk delete 2017-02-01 19:07:39 -08:00
snipe 12c5ca67ff Pulled accidental debugging exit 2017-02-01 18:56:47 -08:00
snipe 00f7cc028b Fix dumb icon bug 2017-02-01 18:54:43 -08:00
snipe bf919e133c Center boolean results in the list 2017-02-01 18:53:27 -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 7642d17fb8 Fix category listing 2017-01-26 21:11:27 -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 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 5d3568136e Added some printer-friendly stuff 2017-01-26 06:20:53 -08:00
snipe b4c6d0c897 Added optional help text field to custom fields 2017-01-26 04:52:11 -08:00
snipe 5e9c69711b Set trimonsearch to false to prevent weird trimming on search queries 2017-01-26 04:48:22 -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 de869c7ed0 Switched to labels for clearer UI on fieldsets 2017-01-25 05:14:39 -08:00
snipe ec88d54a5b Prevent demo users from deleting/creating API keys 2017-01-25 05:03:30 -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 7350514a0d Moved custom fields blades to fit the rest of the app convention 2017-01-25 04:31: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 f13719bf32 Updated named route for consumables 2017-01-24 19:24:59 -08:00
snipe 945d910ca2 Added columns to be ignored on export 2017-01-24 19:24:33 -08:00
snipe e8310c8f3c Additional API routes for licenses, manufacturers 2017-01-24 18:58:07 -08:00
snipe b1dcc208e9 Updated vue dist 2017-01-24 17:07:17 -08:00
snipe d0f062458e Additional API transformers, formatters 2017-01-24 17:07:00 -08:00
snipe 6d2a37fa80 Remove google font from maintenance mode template 2017-01-24 17:03:48 -08:00
snipe 9d555f5436 Fixes #3139 and #3230 - use native font stack, removing google fonts
Especially helpful for those running Snipe-IT in a closed environment
2017-01-24 17:02:39 -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 19cb428fb0 Asset and status formatters 2017-01-18 19:46:43 -08:00
snipe bebb653a70 Pull common formatters into partial 2017-01-18 19:28:35 -08:00
snipe 5d14acaac4 Fixed bulk actions using native bootstrap-tables checkall 2017-01-18 07:40:40 -08:00
snipe 47cf734f72 Hide the app div
This will need to be fixed later, but the flash of unstyled content on the non-api pages was making me cray
2017-01-18 05:02:00 -08:00
snipe 297034c037 APIified custom fields reorder 2017-01-18 04:58:56 -08:00
snipe db7b1b586c Fixed custom fields improprly nested form tags 2017-01-18 04:58:31 -08:00
snipe eac025263b Basic hardware bootstrap table formatter 2017-01-18 04:16:25 -08:00
snipe 8a4a4264cd Formatters for bootstyra-tables users listing
We should probably abstract these out, since we use similar or the same fields imn other places
2017-01-18 04:12:13 -08:00
snipe 9bc10edc8d Rervet that for now - still need to only enable dropdown if more than one is selected 2017-01-13 21:05:02 -08:00
snipe e284e9900a Use native boostrap tables check-all 2017-01-13 21:02:55 -08:00
snipe acd8eafc8c VERY basic example of dynamic buttons in table 2017-01-13 20:58:17 -08:00
snipe 89edda2c23 Manufacturers API 2017-01-13 09:37:06 -08:00
snipe 213a234bef Check for valid category types in validation 2017-01-13 09:27:32 -08:00
snipe 14ddcc56a2 Categories API 2017-01-13 09:01:10 -08:00
snipe edca6ad19d Make eol, notes sortable on asset model 2017-01-13 08:41:17 -08:00
snipe ae540af2a9 Additional fields for asset models 2017-01-13 08:39:02 -08:00
snipe c7e1b426e7 Additional API routes and controllers for models, suppliers, users, locations and status labels 2017-01-13 04:50:20 -08:00
snipe bc5fcf8736 Fixed dashboard chart 2017-01-13 03:19:39 -08:00
snipe 58b1ac5f0f Some route/transformer edits 2017-01-13 00:13:57 -08:00
snipe a35323131f Updated documentation link 2017-01-12 23:43:20 -08:00
snipe b7a650e986 Switched ordering of status labels and status label types to more user-friednly config 2017-01-12 06:50:54 -08:00
Richard Hofman c506f30562 Add support for location-specific LDAP OUs. (#3176)
* Add support for location-specific LDAP OUs.

* Shortened variable names as suggested by Codacy review.
2017-01-11 23:37:14 -08:00
snipe 900e6e2419 Starter asset API 2017-01-11 18:14:06 -08:00
snipe ff2c489af4 Fixed javascript conflicts, fixing select2 and icheck 2017-01-11 17:07:27 -08:00
snipe 55d0f8c0df I think this is necessary for the Vue.js version? 2017-01-11 15:21:33 -08:00
snipe 73d45e9a14 Fixed CSRF on create asset ajax 2017-01-11 15:03:04 -08:00
snipe c7167fc73c Only allow users to create a new user via modal if they have users.create permission 2017-01-11 14:54:39 -08:00
snipe 1364494e92 Updated JS 2017-01-11 14:52:32 -08:00
snipe dbf3a074f7 Fix CSRF issue on bootstrap tables 2017-01-11 14:52:05 -08:00
snipe 86926675ce Fixed passport token generation 2017-01-11 08:44:34 -08:00
snipe 41f58efb70 Font-awesome for bower 2017-01-11 06:53:49 -08:00
snipe e2d5401f3a Stop double-loading jquery 2017-01-11 05:51:13 -08:00
snipe 57d0eba58f API blade cleanup 2017-01-11 04:05:32 -08:00
snipe a02f406fa6 Removed personal access token from settings api page 2017-01-11 03:58:09 -08:00
snipe 19fcda5c25 Basic API management
I’m getting a 500 on personal token creation, but there’s nothing in the logs, so I have no idea what’s wrong
2017-01-11 03:55:47 -08:00
snipe b5ddd9ab0a More vue/api work 2017-01-11 03:38:55 -08:00
snipe 33ffc58ffe Fixed vue issue with api 2017-01-11 01:27:02 -08:00
snipe 11d86d83b6 Fixing JS to actually use vue 2017-01-11 01:02:32 -08:00
snipe 34a9564f30 Updated language strings 2017-01-10 17:53:06 -08:00
Daniel Meltzer 44683c784f Importer: Add License Importer and refactor (#3143)
* Major code simplification of the importers.

Move towards using Model::fill and Model::update rather than reinventing
the wheel.  This makes the updating/creating logic a lot clearer, and
allows for the deletion of a lot of code.  Also allows for supporting of
more fields in the future really easily.

* Cleanup constructors and use setters instead.

* Set the LC_MONETARY locale, and use it to strip currency symbols in Helper::parseFloat()

* Move licenseseat creation/deletion logic into an event handler on the model rather than the controller.

* Move the logging of parsed values to array_smart_fetch rather than writing it out everywhere

* Move to storing dates as carbon rather than strings.  Allows for the parsing of more arbitrary strings from the importer

* Add a license importer with support for checking out to users or assets.

* Make a directory for sample/mock import csvs and populate it

* Adjust how we store/retrieve dates to fix some issues the tests found.
2017-01-10 16:19:18 -08:00
Daniel Meltzer 6ce20c32b1 Component Importer and various Importer Fixes (#3132)
* Importer fix: we were trimming the wrong part of the classname when creating a category.  This led to categories not being recognized.

* Add a component importer.  Uses same fields as consumable importer.  Only trick: If an asset_tag is present, we checkout a component to that asset on import

Enable component importer.  Also calculate the importer classname in a cleaner fashion.

* Fix comparisons.  find can return an index of 0, which is falsy.
2017-01-05 15:45:12 -08:00
Daniel Meltzer 816d2fd095 More minor fixes (#3126)
* Update composer phpcs

* Minor Fixes found while working.
ALlow user_id to be nullable in category model validation

Point to the correct route in accessoriespresenter datatable.  Also add name() method

Add a translated category name

Fix typo in translation

* Add a method to the asset presenter to show deployed when asset is deployed.  Fixes #3114
2017-01-03 16:55:43 -08:00
Daniel Meltzer 8a782bf34a Present assetlogs (#3112)
* Set user if asset is checked out to user.  fixes email problems.

* Use sometimes validation to ignore this when no values are present.

* Move Actionlog details to a presenter and port the activity table to use it.  Still need to port other parts of the application, but this consolidates a lot of logic.

* Attempt test fix

* Port users,licenses, and assets view to use the presenter to generate table values.
2016-12-29 22:23:36 -08:00
Daniel Meltzer 4ad9c3623e Show a glyph in the assets datatable. (#3111) 2016-12-29 18:12:27 -08:00
snipe 4c5fce847b Removed user “new” buttons next to non-user options 2016-12-29 17:41:39 -08:00
snipe 16bd78fb3f Removed stray poop 2016-12-29 17:26:21 -08:00
snipe 221cf1f9c8 Merge branch 'checkout-to-things-v1' of https://github.com/dmeltzer/snipe-it into dmeltzer-checkout-to-things-v1
# Conflicts:
#	app/Http/Controllers/AssetsController.php
#	app/Http/Controllers/ReportsController.php
#	app/Http/Controllers/UsersController.php
#	app/Presenters/AssetPresenter.php
2016-12-29 16:20:17 -08:00
snipe 51ceaedfaf Small phpcbf cleanup 2016-12-29 14:02:18 -08:00
Daniel Meltzer aa2d3cf026 The assets method was renamed to assignedAssets in User class. Adjust places to reflect that 2016-12-29 11:45:37 -05:00
Daniel Meltzer 13b51bc934 Allow checkout of item to things on create page. Need to test validation better and maybe extract code to one place for checkout.blade and edit.blade 2016-12-29 11:10:52 -05:00
Daniel Meltzer 7ccd71978c Cleanup checkedout to part of asset view. 2016-12-29 09:56:19 -05:00
Daniel Meltzer 8cc695b65f Port more assignedUser to assignedTo. 2016-12-29 09:31:16 -05:00
snipe fd805bde50 Fixes #1247 - allow SVG logo upload 2016-12-27 17:31:53 -08:00
Daniel Meltzer d262aec4c3 Save Progress. 2016-12-27 19:24:41 -05:00
Daniel Meltzer 13cf11368f Reformat all view files. (#3105)
* Reformat all view files.  Check for matching tags and rearrange to make everything line up.

* Fix regression on asset create where the log was no longer saved.
2016-12-27 12:03:47 -08:00
Daniel Meltzer cafafe851c Notification rework (#3103)
* Move slack integration to laravel5.3 style notifications, part 1.

* Fix consumable tab when active.

* Move the slack notifiable to the settings model.  Move all slack notifications into logCheckout/logCheckin.  Should think about refactoring this as an event at some point still.  Move Asset checkin/checkout to use the general loggable trait rather than it's own solution.

* Fix a logic error where assets with a non deployable status would show checkin instead of no button at all.

* Fix an html formatting error that resulted in us not closing a form.  This would cause the checkin page to try to submit a delete request (related to the modal form) rather than the desired checkin request.  Also fix formatting in this file.
2016-12-26 15:19:04 -08:00
Daniel Meltzer 06af9311fc Move sanitization of input to the model attribute setters. This cleans up a lot of checks in the various controller methods and ensures data will be set in the model accurately regardless of where it's set. Add unit tests for these methods (#3102) 2016-12-26 15:17:46 -08:00
Daniel Meltzer fd450e2773 Two asset maintence related fixes (#3101)
* Fix maintenances create button, and post to the proper route in maintences edit

* Fix consumable tab when active.

* Fix an html formatting error that resulted in us not closing a form.  This would cause the checkin page to try to submit a delete request (related to the modal form) rather than the desired checkin request.  Also fix formatting in this file.

* Use log mail driver for testing, should fix the functional issue.  Disable acceptance tests on travis for now.

* Fix Category edit page.

* EOL Can be null.
2016-12-26 15:17:12 -08:00
Daniel Meltzer 61543f3a04 Add presenters for models. (#3098)
* Add presenters for models.  Move bootstrap table JSON generation to these presenters, which cleans up controllers a lot.  Move view specific modifications from the models to the presenters as well.

* Fix some issues found by travis and codacy

* Fix a few more issues found while testing.

* Attempt another acceptance test fix

* Try something else

* Maybe..
2016-12-23 17:52:00 -08:00
snipe 94a6b555a8 Darker red for warning 2016-12-22 21:21:10 -08:00
snipe fc18aa7f6d Fixes bug #3086 - unabel to create asset from asset model screen 2016-12-22 17:08:42 -08:00
snipe d6b7036518 NOT FINISHED: Added case for component import
This is not finished. The actual component creation isn’t written yet
2016-12-22 16:06:55 -08:00
snipe 2fe984013b Fixes #3092 - user location not being exported correctly 2016-12-22 15:53:34 -08:00
Daniel Meltzer cd8c585377 Discussion: Moving to policies for controller based authorization (#3080)
* Make delete routes work.  We put a little form in the modal that spoofs the delete field.

* Fix route on creating a user.

* Fix redundant id parameter.

* Port acceptance tests to new urls.

* Initial work on migrating to model based policies instead of global gates.  Will allow for much more detailed permissions bits in the future.

* This needs to stay for the dashboard checks.

* Add user states for permissions to build tests.

* Build up unit tests for gates/permissions.  Move accessories/consumables/assets to policies instead of in authserviceprovider

* Migrate various locations to new syntax.  Update test to be more specific

* Fix functional tests.

Add an artisan command for installing a settings setup on travis-ci

* Try a different id... Need to come up with a better way of passing the id for tests that need an existing one.

* Try to fix travis

* Update urls to use routes and not hardcode old paths.  Also fix some migration errors found along the way.:

* Add a environment for travis functional tests.

* Adjust config file to make travis use it.

* Use redirect()->route instead of redirect()-to

* Dump all failures in the output directory if travis fails.

* Cleanups and minor fixes.

* Adjust the supplier modelfactory to comply with new validation restrictions.

* Some test fixes.

* Locales can be longer than 5 characters according to faker... fex gez_ET.  Increase lenght in mysql and add a validation

* Update test database dump to latest migrations.
2016-12-19 11:04:28 -08:00
Daniel Meltzer ae2cb5fe68 Make delete routes work. (#3077)
* Make delete routes work.  We put a little form in the modal that spoofs the delete field.

* Fix route on creating a user.

* Fix redundant id parameter.

* Port acceptance tests to new urls.
2016-12-19 10:42:33 -08:00
snipe 9ea05bacf3 User resource routes 2016-12-15 20:52:39 -08:00
snipe 76344a8c9b Misc view rounte cleanups 2016-12-15 20:09:51 -08:00
snipe f832b15cf3 Components routes 2016-12-15 19:59:42 -08:00
snipe e685e0f019 Cleaned up custom fields controllers, views, names, etc 2016-12-15 19:17:07 -08:00
snipe 040774d646 One more /admin fix 2016-12-15 18:25:39 -08:00
snipe d6b41759f0 Updated manufacturers, suppliers, depreciations for new route resources 2016-12-15 18:18:13 -08:00
snipe 406b828b4e Updated named location routes in hardware 2016-12-15 17:18:22 -08:00
snipe c308fbce0d Updated resources, named routes, tests for Locations 2016-12-15 17:12:22 -08:00
snipe 3e4be6671e Updated categories with resty routes 2016-12-15 16:42:47 -08:00
snipe aab0933856 Use url() helper over URL::to 2016-12-15 16:41:36 -08:00
snipe c6ab34faee Updated Companies for #3059 2016-12-15 15:48:30 -08:00
snipe cf2b57cb15 More for #3057 2016-12-15 15:15:11 -08:00
snipe ad1bf86a08 And still more license route updates 2016-12-15 13:07:34 -08:00
snipe bea1a93e9b More license route updates 2016-12-15 12:48:15 -08:00
snipe 0c5d3d1c74 Updated license routes 2016-12-15 11:57:19 -08:00
snipe 456e4a633e Corrected route for license view 2016-12-15 11:41:08 -08:00
snipe 3106c336bb Temporarily remove Vue extras 2016-12-15 06:11:53 -08:00
snipe a6b975b168 More updates for #3060, #3058 2016-12-15 06:11:03 -08:00
snipe b17e380aae Removed stray echo tag 2016-12-15 04:27:33 -08:00
snipe 9b167d87d2 Updated to use named routes (#3060), some FORM spoofing for PUT (#3061)
(Updating assets isn’t currently working - investigating that)
2016-12-15 04:27:17 -08:00
snipe a8e09728a5 Passport vue edits 2016-12-14 12:10:28 -08:00
snipe 38eb910999 Updated email template with signoff and Site Name 2016-12-14 10:54:22 -08:00
snipe a80ece9b84 New passport views 2016-12-14 10:17:07 -08:00
snipe 25f60264bd Passport scaffolding 2016-12-14 10:06:05 -08:00
snipe 37c847ea08 Clearer/updated/named custom fields routes
This is still broken
2016-12-14 09:56:23 -08:00
snipe 863e200430 Hopefully fixes tons of PEBKAC where users have the wrong app.url 2016-12-14 08:20:05 -08:00
snipe 8e5977ad84 Updated maintenance views 2016-12-14 07:56:01 -08:00
snipe 68ac4abe2c Updated throttling override for 5.3 2016-12-14 06:30:51 -08:00
snipe dd28c5709e Add action=“” to form (possible IE11 fix) 2016-12-12 19:23:41 -08:00
snipe 95f1a98b96 Removed extraneous closing label tags 2016-12-12 19:03:45 -08:00
snipe 84317f7f50 Fixes #2990 - disabled autocomplete on login 2016-12-06 11:50:20 -08:00
snipe f532abebd4 Updated translations 2016-12-03 17:10:05 -08:00
snipe 2ab0594530 Prevent errors if company support conflict prevents viewing the item 2016-12-01 05:54:14 -08:00
snipe 8a81b29901 Fixed missing closing angle bracket 2016-12-01 05:53:20 -08:00
snipe 59617cc7d3 Updated version in settings 2016-12-01 02:57:47 -08:00
snipe 1be22cf051 Improved versioning script 2016-12-01 02:53:41 -08:00
snipe 3f8f6ad981 Fixes #2995 - adds max login attempts/duration as .env option 2016-12-01 02:04:15 -08:00
snipe d03c167d3b Switch string to product key 2016-12-01 00:15:48 -08:00
snipe 2ec7c0bf1d Hide edit actions from asset sidebar if user cannot edit assets 2016-12-01 00:00:48 -08:00
snipe 7513c99dd0 Fixed supplier string in hardware view 2016-11-30 23:19:13 -08:00
snipe b614470b21 Updated serial text to product key 2016-11-29 21:45:49 -08:00
snipe f5e100a6a5 Only allow asset files to be deleted, maintenances to be added if user has assets.edit permission 2016-11-29 13:37:45 -08:00
snipe abcc01f5e0 More language string corrections 2016-11-29 12:48:00 -08:00
snipe 4dbe8fad30 More language string fixes 2016-11-29 08:46:33 -08:00
snipe 7bf1664b8f Allow XML mimetypes 2016-11-29 08:01:08 -08:00
snipe 92ace8582d Fixed notes column header language string 2016-11-29 07:57:02 -08:00
snipe 507040976a Fixed incorrect license field text strings 2016-11-29 07:52:00 -08:00
snipe b0d8711002 Add .lic as possible license file type 2016-11-29 07:22:45 -08:00
snipe eb340b0fa9 Add fieldset to asset model listing 2016-11-29 06:06:52 -08:00
Daniel Meltzer 263f19bdad Fix error in partializing with creating an asset maintenance. (#2987) 2016-11-29 05:02:48 -08:00
snipe c72954b671 Fixes #2959 - fixed error with custom fields not populating correctly 2016-11-29 01:59:18 -08:00
snipe 7393f0bbea Fixes snipeSettings error if the user was created but the settings table isn’t populated yet 2016-11-29 01:20:51 -08:00
snipe 0d6b160b61 Fix mail test script 2016-11-29 01:19:05 -08:00
snipe ba23952852 Add red banner if app is in production mode and debugging is turned on 2016-11-29 00:08:20 -08:00
Daniel Meltzer b8cbf0022e Log fixes (#2972)
* Make sure we set target_type when creating an accept asset log, and add a migration to fix older ones.

* On a declined log, we don't have an assigned user.

 Guard against this conditional (which realistically should never be hit?)
Should fix #2940

* Fix codacy issues with migration.
2016-11-24 12:48:14 -08:00
Daniel Meltzer 7214920563 Update index.blade.php (#2963)
Asset maintences should be searchable.
2016-11-23 06:15:40 -08:00
Daniel Meltzer 8c549c47e4 Update bootstrap-table.blade.php (#2964)
Fix error when search is not passed through.
2016-11-23 05:56:08 -08:00
snipe 45c789021e Add employee number option to custom report 2016-11-23 05:17:54 -08:00
snipe d8eb68af83 Merge branch 'hotfixes/accessory_model_number' into develop
# Conflicts:
#	resources/views/accessories/edit.blade.php
2016-11-17 20:01:01 -08:00
snipe dcc000284f Add accessory model to accessories 2016-11-17 20:00:08 -08:00
snipe d0d9d82579 Add model number to accessories 2016-11-17 19:57:53 -08:00
Daniel Meltzer d722ed3823 Partialize forms (#2884)
* Consolidate edit form elements into reusable partials.

This is a large code change that doesn't do much immediately.  It
refactors all of the various edit.blade.php files to reference
standardized partials, so that they all reference the same base html
layout. This has the side effect of moving everything to the new fancy
"required" indicators, and making things look consistent.

In addition, I've gone ahead and renamed a few database fields.  We had
Assetmodel::modelno and Consumable::model_no, I've renamed both to
model_number.  We had items using ::note and ::notes, I've standardized
on ::notes.  Component used total_qty where consumables and accessories
used qty, so I've moved everything to qty (And fixed a few bugs in the
helper file in the process.

TODO includes looking at how/where to place the modal javascripts to
allow for on the fly creation from all places, rather than just the
asset page.

Rename assetmodel::modelno to model_number for clarity and consistency

Rename consumable::model_no to model_number for clarity and consistency

Rename assetmodel::note to notes for clarity and consistency

Port asset and assetmodel to new partials layout.  Adapt all code to the renamed model_number and notes database changes.  Fix some stying.

* Share a settings variable with all views.

* Allow editing the per_page setting.  We showed the value, but we never showed it on the edit page..

* use snipeSettings in all views instead of the long ugly path.

* War on partials. Centralize all bootstrap table javascript

* Use model_number instead of modelno in importer

* Codacy fix.

* More unification/deduplication.  Create an edit form template layout that we use as the base for all edit forms.  This gives the same interface for editing everything and makes the edit.blade.* files much easier to read.

* Use a ViewComposer instead of sharing the variable directly.  Fixes artisan optimize trying to hit the db--which ruins new installs

* Fix DB seeder.

* Base sql dump and csv's to import data from for tests.

* Start some functional tests for creating items.

* Add functional tests for all create methods.  Still need to do tests for edits, deletes, and lots of other things

* Improvements to functional tests.

Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.

* Some improvements to acceptance tests.

Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.

I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.

* A few things to make acceptance tests work.  Add a name to the companies table, and make the locations table have the correct name

* Use a .env.tests file for testing functional and unit to allow a separate database.

* Add functional tests for compoents, groups, and licenses.

* Now that the config is in the functional.yml, this just confuses things.

* Start some functional tests for creating items.

* Add functional tests for all create methods.  Still need to do tests for edits, deletes, and lots of other things

* Improvements to functional tests.

Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.

* Some improvements to acceptance tests.

Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.

I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.

* update db dump

* Update tests to new reality

* env for the test setup

* only load the database at beginning of tests, not between each Functional test.

* Fix a miss from renaming note to notes.

* Set Termination date when creating an asset.  It was only set on edit.

* Rename serial_number to serial in components for consistency.

* Update validation rules to match limits in database.  Currently we just accepted the values and they were truncated when adding to DB.

* Much more detailed functional testing of creating items.  This checks to make sure all values on form have been successfully persisted to database.
2016-11-16 16:56:57 -08:00
snipe 84e06f4642 Add postal code to locations listing 2016-11-16 08:22:54 -08:00
snipe 37a6599978 Adds expected checkin to custom reports 2016-11-15 01:55:27 -08:00
snipe 49ce630bb8 Make company name sortable 2016-11-11 19:33:13 -08:00
snipe a914dacf8e Adds drawn signature to asset acceptance (#2846)
* Adds digital signature to asset acceptance

This is still a little broken - the history is displaying “Deleted user”, since there is no item type listed. Saving the item_type as App\Models\User tries to update accepted on the users table, which obviously doesn’t exist.

* Use asset facade for folks in subdirs

* Possible fix for weird accepted/declined display

* Display signature in modal popup if sigs are required

* Wrap that display file in auth middleware, just to be sure.

It shoudl fail if you’re not authorized since you’re not logged in, but better safe than sorry

* Fixed header section of layout

* Removed extra drop from migration rollback
2016-10-31 21:00:30 -07:00
snipe 26d14b2338 Let superadmins edit their own groups 2016-10-31 19:18:06 -07:00
snipe 8323ed27c2 Do not makes group editable if the user is not an admin
This fixes a bug where the field was (correctly) disabled if the editing user isn’t a superadmin, but because the field was disabled, it would clear the permission groups.
2016-10-31 18:57:35 -07:00
snipe 25bd1acab5 Fixes permission for non-superadmin assigning user permissions 2016-10-31 18:19:55 -07:00
snipe 7c6bdcb6b2 Fix width of warning message 2016-10-31 18:15:00 -07:00
snipe 13450aa961 Include asset status type in asset detail view 2016-10-31 17:44:39 -07:00
snipe 0595867500 Fixes #2856 - add status to asset detail view
(Not sure how we missed this… oops)
2016-10-31 17:41:15 -07:00
snipe a4ae3b0091 Show whether device is enabled and/or 2FA is active 2016-10-31 17:16:26 -07:00
snipe cbfcf959f9 Allow certain users to override 2FA with permission 2016-10-31 16:52:25 -07:00
snipe 41defb312b Moved CSRF token 2016-10-31 13:25:50 -07:00
snipe fe041b66c6 Adds two-factor to users listing 2016-10-29 07:21:34 -07:00
snipe 32c439d979 Tidy up login form 2016-10-29 06:45:24 -07:00
snipe 2f6fcadd05 Fixes #2838 - removed duplicate requestabe field in asset models 2016-10-29 05:53:50 -07:00
snipe cea255995c Fixes #106 - adds Google Authenticator support (#2842)
* refactor to clean up LDAP login, and make the login method easier to handle.

* Login refactor cleanup

* Google 2FA package

* Adds Google Authenticator two-factor

* Removed unused blade

* Added optin setting in profile

* Removed dumb comments

* Made lock_passwords check more consistent

* Additional two factor strings

* Lock passwords check

* Display feature disabled text if in demo mode

* Two factor admin reset options

* Translation strings
2016-10-29 05:50:55 -07:00
snipe a929b635ff Fixes #2809 - adds serial number to components 2016-10-27 15:33:48 -07:00
snipe 9c3c611b37 Fixes #2825 - columns misaligned when older display_asset_name field set to 1 2016-10-27 15:02:32 -07:00
snipe 3e701c6dd1 Fixes #2814 - adds job title to users listing display 2016-10-27 14:29:07 -07:00
snipe e4140f4c48 Fixes #2817 - adds EOL to custom report 2016-10-27 14:20:55 -07:00
snipe d7222ae1f0 Fix for defaultLoc in asset view 2016-10-26 10:12:16 -07:00
snipe f9a06a183e Updated language strings 2016-10-25 12:30:52 -07:00
snipe 0728a991a8 Merge branch 'hotfixes/datepicker_for_date_custom_field' into develop
# Conflicts:
#	resources/views/models/custom_fields_form.blade.php
2016-10-25 05:18:55 -07:00
snipe 33a0c2087a Use datepicker if custom field format is a date 2016-10-25 05:16:41 -07:00
snipe d24c4b1152 Merge branch 'hotfixes/export_all_users' into develop 2016-10-25 02:42:20 -07:00