* 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
* 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.
* 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.
Some licenses, such as windows licenses, are machine specific. This
commit allows an extra field to be added to the license importer to
allow these licenses to be imported and attached directly to an asset
* Step 1 of refactoring importer to use separate classes.
* Port web importer. Fix an issue with validation where index 0 would be treated as false and cause weird results.
* Farewall, AssetImport. You've served us well.
* 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..
* 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.
* 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.
* Better checking for empty values when updating. There's a lot of conditionals in here that we may want to look at cleaning up over time
* Fix typo. No manfacturers here.
* Fix model update/import. Also hardcode the status id of unset assets to the first existing one instead of an id that may not exist... Still not ideal, but better.
* Let requests to .env through the middleware. We check to see if this is readable during setup as a warning, and as it stands it triggers an infinite loop trying to hit the file.
* 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
* 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
* 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.
* 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.