* Adds the ability to search by dates
Adding extra „where“-conditions to the „TextSearch“ queries, allowing the users to search by dates
* Adds missing dates to $dates in models
* Removes duplicated „where“ conditions
* Adds the Searchable trait to models, defining the searchable attributes and relations
* Removes the old text search methods
* Adds back additional conditions to the search
These conditions could not be modeled in the „attributes“ or „relations“, so we include them here
* Removes unnecessary check for the deleted_at attribute
* Fixes typo in comments
* suppresses errors from Codacy
We can safely ignore the error codacy is throwing here, since this method is a standin/noop for models who need to implement more advanced searches
* Added “show fields in email” to custom fields
* Added “show images in email” to settings
* Added nicer HTML emails
* Break notifications out into their own, instead of trying to mash them all together
* Remove old notification for accessory checkout
* Janky fix for #5076 - “The asset you have attempted to accept was not checked out to you”
* Add method for image url for accessories
* Added accessory checkout email blade
* Make accessory email notification on checkout screen consistent with assets
* Added native consumables notifications
* Fixes for asset notification
* Updated notification blades with correct-er fields
* Updated notifications
* License checkin notification - does not work yet
Need to figure out whether the license seat is assigned to a person or an asset before we can pass the target
* Added alternate “cc” email for admins
* Only try to trigger notifications if the target is a user
* Fix tests
* Fixed consumable URL
* Removed unused notification
* Pass target type in params
* Show slack status
* Pass additional parameters
There is a logic bug in this :( Will send to slack twice, since the admin CC and the user are both using the same notification. Fuckity fuck fuck fuck.
* Pass a variable to the notification to supress the duplicate slack message
* Slack is broken :( Trying to fix
Will try a git bisect
* Put preview back into checkout
* Pulled old archaic mail
* Removed debugging
* Fixed wrong email title
* Fixed slack endpoint not firing
* Poobot, we hardly knew ye.
* Removed old, manual mail from API
* Typo :-/
* Code cleanup
* Use defined formatted date in JSON
* Use static properties for checkin/checkout notifiers for cleaner code
* Removed debugging
* Use date formatter
* Fixed target_type
* Fixed language in consumable email
* Ignore accesories uploads
* API: Allow searching accessories by supplier id
* Adds suppliers and image upload to accessories
* Allow sorting by counts for suppliers
* Validate supplier image uploads
* Remove purchase_date from protected accessory array, it was converting it to datetime in datepicker
* There is no notes field on accessories. Fixes Importer Test.
* Fix notification test. We should see a checkout not allowed exception when trying to check out to a location if the asset requires acceptance.
* Fix Custom field import.
Add a test for custom field import, and fix a few issues related to
importing custom fields. This will restore v3 functionality.
* Add UI support for mapping custom fields.
This still requires the field mappings to be created/assigned in
advance, but will fetch all custom field names and allow them to be
selected when setting up custom field mappings.
This commit also updates laravel-mix to v1.4.3 and other node
dependencies to fix some build issues.
* Fix some requestable asset page/assetloc issues. I'd love to know why laravel expections relationships to be in lower case... but thats a question for another day.
* Fix Bug in User::generateFormattedNameFromFullName
In a name "John Doe", this method would split it into "John" and " Doe",
Leaving a space in the last name when importing to the database. Strip
this space.
* Cleanup/fix some item mapping.
Also make some changes to the importer schema to allow for unit testing.
Generate a default item mapping, and then merge that with any custom
mappings.
* Beginning work on importer unit tests.
* Strip out testrun branches from importer. It added a lot of complexity and was not terribly useful with web importer as it stood, might reconsider down the road however.
* Normalize the mapped keys when using custom field mappings.
* Add test for custom asset import mapping.
* Make all unit tests inherit from a new custom base.
This baseclass currently calls Artisan::migrate() and seeds a Settings
instance. This fixes unit tests after the autoincrement bits.
* Store requestable as a boolean. Fixes some import oddities
* Work on tests for accessory importer.
* Test for custom mapping of accessory import, also adjust the internal field for purchase date.
* Update default locale fallback for currency detection
* Fix Reassignable in consumable as well.
* More importer tests and fixes.
* 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.
* 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..
* 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.
* 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 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.