Commit graph

705 commits

Author SHA1 Message Date
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
snipe 30f0f6f527 Export users to CSV
Bypasses the weird limit bug in the javascript
2016-10-25 02:41:34 -07:00
Daniel Meltzer e85241af6a Log checkouts (#2772)
* Ensure the log has a target before trying to fetch the associated company

* Log creation of items, both in importer and manually
2016-10-12 18:45:32 -07:00
snipe 219ef23126 Fixes #2713 - error displayed with license checked out to asset 2016-10-12 14:32:21 -07:00
snipe 31898d0f85 Fixes #2751 - asset tag added to asset maintenance report 2016-10-12 14:18:51 -07:00
snipe 1e82058f4d Fixes #2763 - added missing translations methods for dashboard 2016-10-12 13:01:29 -07:00
snipe b3329135df Merge branch 'develop' of github.com:snipe/snipe-it into develop 2016-10-12 12:50:35 -07:00
snipe 2350c1c15c Fixes #2352 2016-10-12 12:50:30 -07:00
snipe 8f4e016c01 Fixes #2768 and #2753 2016-10-12 12:48:37 -07:00
Daniel Meltzer 2e0a7abbe9 Rework permissions view (#2756)
* Early layout work on a cleaner permissions interface

* Cleanup layout.  Make new permissions view work.  Still needs some css and javascript improvements.  Also need to do the same thing to the group view.

* Improve styling, add javascript to toggle an entire group of permissions if choosing the permission on the header row.  Would be nice to add collapsing of sections in the future.

* Toggle viewing sections.

* Special case places where we only have one item in a group to only display the item once.

* Filter getCreate the same way.
2016-10-12 12:06:28 -07:00
Matthias Frei 4b6ba6cb30 BugFix: Asset name was not included in custom report (#2733)
* BugFix: Asset name was not included in custom report

* BugFix: Custom Asset Report did not escape commas in custom fields. So the csv file is inconsistent, if a custom field containes a comma.  Added an escape function which escapes the commas with a backslash.
A csvreader can be configured to handle the escape character.
2016-10-12 12:05:49 -07:00
snipe fe5e813970 Updated translations 2016-10-04 12:23:02 -07:00
Daniel Meltzer b92d26f3c4 When checking out a consumable, don't say asset (#2718) 2016-09-29 22:20:58 -07:00
Brady Wetherington 7ca7877740 Fix mismerged code. (#2705) 2016-09-28 22:57:19 -07:00
snipe 8cb4954f8a Apply encrypted fields patch from develop 2016-09-28 14:58:01 -07:00
snipe 9091385182 Merge branch 'hotfixes/purchase_cost' into develop
# Conflicts:
#	app/Http/Controllers/ReportsController.php
#	config/version.php
2016-09-27 19:13:21 -07:00
snipe f1c458185d Client-side pagination on asset report for faster loading 2016-09-27 14:56:05 -07:00
snipe fa72e64b98 Add checkout date to asset report 2016-09-27 08:42:48 -07:00
snipe e9f3d622f5 Add company name to custom asset report 2016-09-27 07:19:52 -07:00
snipe 1e3244b2b3 Merge branch 'hotfixes/eol' into develop
# Conflicts:
#	app/Http/Controllers/AssetModelsController.php
2016-09-27 07:04:45 -07:00
snipe a92bfe8ade Default EOL to null, not 0, if no value entered 2016-09-27 06:53:59 -07:00
Andrés Núñez 40f00665b3 Translate emails (#2652)
* commit temporal

* final translation commit -- added email translations

* final translation commit -- removed file for spanish translations

* final translation commit -- removed file for spanish translations

* added missing translations

* method overrided and config files back to default

* config files back to default

* config files back to default
2016-09-26 14:13:07 -07:00
snipe 937192f7ce Ugh… git… why? 2016-09-23 14:13:41 -07:00
snipe 8ba19632cf Removed new badge 2016-09-23 13:13:42 -07:00
snipe 7fdd4fbe98 Updates to the history importer to make it a little less brittle and provide better feedback 2016-09-20 09:22:49 -07:00
snipe 1e4e9dd3d7 Updated language files 2016-09-20 05:08:04 -07:00
snipe 2ab91fed01 Fixes #2607 - non-encrypted now visible to non-admins with asset access 2016-09-20 03:48:38 -07:00
snipe aa92b93bd1 Fixes #2622 - add depreciation to license report 2016-09-20 02:58:08 -07:00
snipe 6dc143d95d Use Ajax activity report for dashboard to prevent data duplication 2016-09-20 00:46:46 -07:00
snipe d8753a7d86 Use Ajax for activity report 2016-09-20 00:46:24 -07:00
snipe 71be73781b Add company name option to reports 2016-09-19 22:27:34 -07:00
tiagom62 8233d520c6 Missing file formats (#2621)
Missing allowed file formats zip and rar.

Added rtf format pending PR 2614.
2016-09-16 16:18:33 -07:00
snipe 04898c49b2 Fixed wrong translation from PR 2016-09-15 20:03:47 -07:00
Karol eeff305b02 Update dashboard.blade.php (#2593) 2016-09-15 19:59:01 -07:00
Daniel Meltzer 2d8269ddcd Checkout Improvements, and initial support for requesting an asset model (#2573)
* Create a new action_log table to replace asset_log.  Use Polymorphism to generalize class and targets.  Port everything I can find to use it.  Add a migration to port the asset_logs table to action_logs.

* Initial work on requestable asset models

* Backend work for polymorphic requests table to store checkout requests.

* Add missing files

* Add a record to the db when requesting items.  Build up a testing route for interfacing with this.

* Users can now toggle requests of items on the request page.  Reformat page to use the same tab layout we use elsewhere

* Polymorphic request function.  Implement requesting of asset models.  Need to port mail/slack to notifications still.

* Implement requesting of asset models.  Build up emails and notifications to support it.  Allow specifying a quantity of model to request.

* Add view to show currently requested assets.  Needs some work and cleanup, but it isn't accessible from anywhere yet.
2016-09-15 19:58:27 -07:00
snipe 391c9a77ef Misc debug template for use with debugging CSV exports, etc 2016-09-12 14:05:31 -07:00
Daniel Meltzer e86adccf19 Actionlog Class: Improvements and polymorphism (#2561)
* Save progress

* Create a new action_log table to replace asset_log.  Use Polymorphism to generalize class and targets.  Port everything I can find to use it.  Add a migration to port the asset_logs table to action_logs.

* Allow accepted_id to be nullable.

* Comment out the thread_id migration, because it b0rks on a new database with the move.  I'm unsure if the thread_id does anything...It doesn't seem to be used

* Clean up all old methods from Actionlog model.  Port everything to use new cleaner interface.

* Port the actionlog factory to fix travis.

* Adjust code to work on php5.  Also fix lurking adminlog call.

* Remove weird code

* Port the pave command.  Also fix dangling adminlog
2016-09-06 19:39:42 -07:00
snipe d4dc1830ec Fixes #2527 - honor the setting for whether Snpie-IT can access the outside world 2016-08-30 12:58:08 -07:00
snipe 04e9ca0942 Fixes #2399 2016-08-30 12:34:23 -07:00
snipe 06021d79c1 Fixed typo 2016-08-30 12:25:46 -07:00
snipe 5090468357 Fixes #2510 and #2488 - CSS class added to images in views 2016-08-30 07:20:07 -07:00
snipe 213cda8cf4 Fixes #2525 2016-08-30 07:03:22 -07:00
snipe 8816c481af Added HTML for generating passwords in asset user creation modal 2016-08-30 06:48:23 -07:00
snipe 3ed0cf2be8 Moved import errors up higher on the screen, fixed some weird formatting bugaboos 2016-08-30 06:48:00 -07:00
snipe 25902db659 Generate password from modal 2016-08-30 06:47:18 -07:00
snipe 35a67ab18a Fixes #2516 - listbox error on new asset 2016-08-29 23:49:23 -07:00
Daniel Meltzer 276e0a7114 Importer: Implement item update and interface improvments (#2507)
* Add support for updating assets to the importer.

If an asset with a matching asset tag is found, and the --update flag is
passed to the importer, we edit the matching asset with any
asset-specific values, and persist to the database.  Any missing/blank
values are skipped.

TODO: Add to web interface, add support in consumables/accessories

* Allow deleting of files on the import page.

* Extend web interface to allow updating of imported items.

This adds a modal dialog to the import process.  Currently the dialog
allows the choice of update vs ignore, and choosing the item type to
import (Accessory, Asset, Consumable).

Also use Helper::ParseFloat() for purchase_cost processing.  It exists,
and fixes issues on my end at least.

* Implement editing of consumables and accessories.

* Rename getProcessImportFile to postProcessImportFile to reflect how it's now used

* Fix copy-pasta error.
2016-08-29 15:49:32 -07:00
snipe 0d088f3031 Fixes #2491 - show asset tag on dashboard 2016-08-25 21:28:46 -07:00
snipe 35439f9976 Additional strings 2016-08-25 21:04:36 -07:00
snipe d473432436 Show encryption in fieldset list 2016-08-25 21:04:25 -07:00
snipe 96eb832fd3 Only decrypt if the user is an admin 2016-08-25 21:03:24 -07:00
snipe f185c2e0de Hide radio and checkboxes for now 2016-08-25 19:48:11 -07:00
snipe 122f0b9cba Custom fields form in asset edit view 2016-08-25 18:35:28 -07:00
snipe c49f10c9bb Removed line break 2016-08-25 18:35:16 -07:00
snipe 308fcf96de Updated language strings 2016-08-25 17:43:07 -07:00
snipe f1fab8b164 Added Indonesian to dropdown locale list 2016-08-25 17:22:08 -07:00
snipe 0e8502a323 Removed newline 2016-08-25 17:12:50 -07:00
snipe 3171d9230b Better language 2016-08-25 17:12:34 -07:00
snipe b76ad5ea88 Reverted name of form field 2016-08-25 17:08:39 -07:00
snipe 61aa9beddb Added new fields to custom fields views 2016-08-25 16:36:00 -07:00
snipe e89fd9b3a2 Additional strings 2016-08-25 16:35:45 -07:00
snipe f38912a5cf Custom fields additions 2016-08-23 18:52:54 -07:00
snipe ad22293f4b Added show in nav for status label views and controller 2016-08-23 18:52:42 -07:00
snipe 90d2d0c7e1 Fixes #2469 - corrected config app.url 2016-08-23 16:04:22 -07:00
snipe 9407b4e28c Removed console warning 2016-08-23 15:53:18 -07:00
snipe ec19924bea Custom field types 2016-08-23 15:52:34 -07:00