Commit graph

96 commits

Author SHA1 Message Date
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
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
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 5090468357 Fixes #2510 and #2488 - CSS class added to images in views 2016-08-30 07:20:07 -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
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 96eb832fd3 Only decrypt if the user is an admin 2016-08-25 21:03:24 -07:00
snipe 90d2d0c7e1 Fixes #2469 - corrected config app.url 2016-08-23 16:04:22 -07:00
snipe 7b8403cdb9 Pass status ID to ajax 2016-08-23 15:52:10 -07:00
snipe d9f2e7bf58 If custom field is type URL, display it as a link 2016-08-18 12:44:55 -07:00
snipe 923352537c Moved column for in/out 2016-08-18 07:06:55 -07:00
snipe 4419dc7434 Merge branch 'fix-double-format' of https://github.com/dmeltzer/snipe-it into dmeltzer-fix-double-format
# Conflicts:
#	app/Http/Controllers/ConsumablesController.php
#	app/Http/Controllers/LicensesController.php
#	resources/views/hardware/view.blade.php
2016-08-16 18:53:45 -07:00
Daniel Meltzer ac63642224 Add manufacturer to licenses (#2436)
* Add manufacturer to licenses.  Shows in table and edit.  Need to improve manufacturer view to show lists beyond assets still.

* Remove extra closing tags, formatting

* Work on making the manufacturer view show more options. Need to figure out how to change the table dynamically.

* Cleanup formatting and fix a few weirdities in hardware/view.blade.php

* Standardize on two-space tabs in this file, as it seems the most
* common.

* Fix a few places where we call number_format without guaranteeing the
* item is a number and not a string.

* Show a "No Results" message on components page if there are no
* components.

* Show table of licenses on manufacturer view page.

This reworks the ManufacturersController::getDataView method to delegate
the view to a sub method (currently assets or licenses, but plan to
extend to consumables/accessories/components as well).  We then put tabs
at the top of the view to show multiple tables.  This just duplicates
the table layout from licenses/index.blade, but I wonder if theres a way
to centralize that code, maybe through partials, over time..

The only known missing part of manufacturers for licenses would be adding it
to the importer, but the license importer should probably migrate to
object importer before doing too much more...

* Add manufacturer to accessory.

* Add consumables to the manufacturer view page.
2016-08-16 18:49:54 -07:00
Daniel Meltzer 5959f83de3 Rename parseCurrencyString to formatCurrencyOutput to clarify what it does better. 2016-08-16 20:47:53 -05:00
Daniel Meltzer 0c912bcf49 Fix more number_format madness.
This does two main things:
1) The importer now imports as numbers, not parsed strings.  This allows
is to format values on output instead of input, which is what was
happening in most places.

2) Add a Helper::parseCurrencyString method and port everything to use
this.  This checks to see if the value is numeric or empty, and returns
the appropriate value in all cases.  Should fix all known occurances of
number_format expections.
2016-08-16 20:41:28 -05:00
snipe 7edf1db101 Small tweaks to history 2016-08-12 19:03:32 -07:00
snipe 41a20d8f66 Tidied up some debugging code, better explanation 2016-08-12 17:10:03 -07:00
snipe 06fcf3e07d Import history blade 2016-08-12 16:01:34 -07:00
snipe 869da1da78 Add maintenance notes to maintenances tab in hardware view 2016-08-11 15:40:41 -07:00
snipe 29eadb10ae Fixes #2387 2016-08-02 17:03:15 -07:00
snipe 098e7e4feb Hide email address if there is no value 2016-08-02 15:03:45 -07:00
snipe 17d5e40e02 Fixes #2383 2016-08-02 09:54:31 -07:00
snipe ef6fb69cee Fix translation 2016-08-02 04:26:07 -07:00
snipe 39929c7d89 Better handling for deleted users 2016-08-02 04:23:13 -07:00
snipe 8246a319a2 Fixes #2363 and #1097 2016-08-02 00:54:38 -07:00
snipe 1f30bdee99 Fixes #2361 2016-07-30 17:27:08 -07:00
zjean fcb1d6ac15 Fixed feedback on #2349 (#2359) 2016-07-29 13:59:50 -07:00
snipe fd94c76874 Fixes asset created_at 2016-07-29 12:15:09 -07:00
snipe 3e5d2b5385 Ability to remove field from fieldset 2016-07-28 08:10:15 -07:00
snipe 3fd5fb836f Restore linebreaks in notes 2016-07-27 20:24:09 -07:00
Daniel Meltzer b4e54225a2 Fix exports (#2338)
* Update tableexport.js to the new version.

* Give the export file in each table a useful name.

The name takes the form of tabletype-export-YYYY-MM-DD.extension.
2016-07-27 19:45:45 -07:00
snipe 128290bd82 Cleanup checkin blade 2016-07-22 02:34:25 -07:00
snipe 114540d836 Cleanup checkout form 2016-07-22 02:20:05 -07:00
snipe 0b57f74e36 Check for model name (this should never be blank, but…) 2016-07-22 02:14:12 -07:00
snipe 03d7d01e12 Fixes #2300 2016-07-22 02:12:04 -07:00
snipe 78fda31379 Helper method to introspect into the model level validation to see if the field is required
(This does not yet handle form request validation)
2016-07-22 00:29:23 -07:00
snipe b0dc5b4183 Fixes #2290 2016-07-21 21:28:17 -07:00
Daniel Meltzer 68d8e6a3a9 Importer again (#2260)
* Quote item names when displaying in error table.

* Remove the danger class as well as the warning class when uploading a file.  Fixes a display error if a file is successful after a file fails upload.
2016-07-18 15:46:03 -07:00
Daniel Meltzer f683c78a69 Fix adding an image to an asset when public/uploads/assets does not exist (#2240)
* Fix adding an image to an asset when public/uploads/assets does not exist.

 First check to see if we can create directory and do so.  If any errors occur, display the error string as an error on the page.

* Add the public/uploads/assets directory to new installs.

* Add some comments explaining this code so I remember what it does next time.
2016-07-10 18:43:00 -07:00
snipe 6bdc88cfea Removed extra space 2016-07-09 18:20:14 -07:00
snipe f2ddc7b0ae Added purchase cost and purchase date to listing 2016-07-07 02:07:21 -07:00
snipe a7a748385f Longer cookie 2016-07-01 01:05:22 -07:00
snipe 0c65b6cad1 Nicer bulk delete layout 2016-06-29 04:30:21 -07:00
snipe 0c98390eef Hide bulk actions, checkbox and checkout/in if deleted 2016-06-29 04:19:37 -07:00
Daniel Meltzer d484636bba Add model number column to the hardware list. (#2204)
* Add model number column to the hardware list and allow searching based on model number.   Column is hidden by default.

* Fix sorting.  Add scope to order by model number.
2016-06-27 22:32:40 -07:00
snipe 0cf563ae5b Show admin in maintenances 2016-06-22 17:04:47 -07:00
Daniel Meltzer 43e64a5f8c Store a list of errors associated with each field instead of overwriting the error if multiple occur. Also Adjust the importer to extract the asset tag earlier in the process so all asset related errors are associated with the asset tag rather than some being tied to the name. 2016-06-22 15:13:01 -04:00
snipe dd1241f964 Fix in case crated_at is blank 2016-06-21 17:19:46 -07:00
snipe e9227f77b6 Fixes #2163 - put model image in view if no asset image 2016-06-21 12:20:22 -07:00