* Fix some n+1 problems
* Use route in notification dropdown to make sure we link to correct page
* Work on better UI support for checkout to non-user. Fix links on index bootstrap table, work towards eliminating assignedUser
* Remove Asset::assigneduser() relationship. Instead add a checkedOutToUser() method and/or port to using assignedTo()
* Adjust string to fit new reality
* Fix#3780. Move the consumables getDataView method to the ApiController. Not entirely RESTful, but it's a weird method that probably doesn't need its own controller and the functionality would be strange to stack on the userscontroller...
* Fix file uploads to assets and restore the delete route.
* Add asset maintence edit action to index.
* Suppliers asset list should link to the related asset, not to the supplier with same ID.
* Asset models page should use polymorphic formatter on assigned to to better handle assorted item types.
* Comment out more assigneduser fallacy until we figure out the query builder approach to searching for location text.
* Adds basic GET api support for CustomFieldsets
Currently there is not support for getting what fields a given fieldset contains
from the API. This commit creates a new API Controller for CustomFieldsets as
well as Transformers for CustomFields CustomFieldsets. Additionally, the api
route has been updated so that a show method can be access from
http://myapp/api/v1/fieldsets/{id}
* CustomFieldsetsTransformer only returns id and name of model
* Added index api method for CustomFieldsets
* Removes copy/paste error in CustomFieldsetController (including search)
* Added id to CustomFieldsetsTransformers
* Adds custom_fieldset_id as a field when storing and updating AssetModels
* Removed uncessesary parameter from CustomFieldsetsController.index
* Cleaned up CustomFieldset API
This is round one of the rethink of checkout-to-everything. A location
now has a manager field, and the manager (by default) be responsible for
assets checked out to the location.
* Toggles the disabled state of auto_increment_prefix
To insert a prefix you had to toggle the checkbox, save the settings and reload. With this script it is immediate. Fixes#1390
* Delete asset image: made checkbox more visible
Related to #3153
* Added missing translation to bootstrap table partial
The "Are you sure to delete" confirmation was hardcoded. Added translation row to all locales and other small corrections to it/general lang file.
* 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
* 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.
* 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.
* 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
* 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
* 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
* 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.
* 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.
* Prevent multiple checkouts of the same asset.
This adds a new method to the Asset model, availableForCheckout.
Port getDataTable to use availableForCheckout instead of doing the
check manually.
Fixes Issue #2347
* Use availableForCheckout in categories controller. Also gate the checkin/checkout actions here.
* Use gate and availableForCheckout in manufactuers as well.
This is a little janky, as it breaks up the errors into multiple screens if you don't have a status label type AND don't have a name. This is because the model-level validation won't work since we transmogrify that dropdown list of status label types into boolean values for the DB. Should eventually find a less clunky way to handle this, but needed to get a fix in now.
This allows for centralizing the category fetching code more and fixes
an error in asset model viewing (#2118). Also add a few translated
strings and standardize on a base of 'Select a *' for the default value
in our lists.