From d722ed38234d84b98259e18f9f7c20885c38afe8 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Wed, 16 Nov 2016 18:56:57 -0600 Subject: [PATCH] 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. --- .env.tests | 9 + app/Console/Commands/ObjectImportCommand.php | 6 +- app/Helpers/Helper.php | 12 +- .../Controllers/AccessoriesController.php | 14 +- .../Controllers/AssetModelsController.php | 22 +- app/Http/Controllers/AssetsController.php | 12 +- app/Http/Controllers/CategoriesController.php | 6 +- app/Http/Controllers/CompaniesController.php | 6 +- app/Http/Controllers/ComponentsController.php | 24 +- .../Controllers/ConsumablesController.php | 16 +- .../Controllers/DepreciationsController.php | 6 +- app/Http/Controllers/LicensesController.php | 19 +- app/Http/Controllers/LocationsController.php | 6 +- .../Controllers/ManufacturersController.php | 8 +- app/Http/Controllers/ReportsController.php | 4 +- .../Controllers/StatuslabelsController.php | 12 +- app/Http/Controllers/SuppliersController.php | 6 +- app/Models/Accessory.php | 3 +- app/Models/Asset.php | 9 +- app/Models/AssetModel.php | 11 +- app/Models/Category.php | 5 +- app/Models/Company.php | 7 +- app/Models/Component.php | 9 +- app/Models/Consumable.php | 3 +- app/Models/Depreciable.php | 5 +- app/Models/Depreciation.php | 3 +- app/Models/Group.php | 5 +- app/Models/Location.php | 13 +- app/Models/Manufacturer.php | 3 +- app/Models/SnipeModel.php | 14 + app/Models/Statuslabel.php | 5 +- app/Models/Supplier.php | 13 +- app/Providers/AppServiceProvider.php | 5 + codeception.yml | 7 - database/factories/ModelFactory.php | 6 +- ..._015024_rename_modelno_to_model_number.php | 34 + ...ame_consumable_modelno_to_model_number.php | 33 + ...0_16_143235_rename_model_note_to_notes.php | 33 + ...5052_rename_component_total_qty_to_qty.php | 33 + ...name_component_serial_number_to_serial.php | 31 + public/uploads/.gitkeep | 0 public/uploads/assets/.gitkeep | 0 public/uploads/barcodes/.gitkeep | 0 .../lang/en/admin/accessories/general.php | 4 - .../en/admin/asset_maintenances/table.php | 1 - .../lang/en/admin/categories/general.php | 4 +- resources/lang/en/admin/companies/general.php | 2 + .../lang/en/admin/consumables/general.php | 3 - .../lang/en/admin/depreciations/general.php | 4 +- resources/lang/en/admin/groups/titles.php | 7 +- resources/lang/en/admin/hardware/form.php | 2 - resources/lang/en/admin/hardware/general.php | 2 + resources/lang/en/admin/licenses/form.php | 7 - resources/lang/en/admin/licenses/general.php | 3 +- resources/lang/en/admin/locations/table.php | 32 +- .../lang/en/admin/manufacturers/table.php | 3 +- resources/lang/en/admin/models/general.php | 3 +- resources/lang/en/admin/suppliers/table.php | 2 + resources/lang/en/general.php | 4 + resources/views/accessories/edit.blade.php | 222 +-- resources/views/accessories/index.blade.php | 51 +- resources/views/accessories/view.blade.php | 40 +- .../views/account/accept-asset.blade.php | 2 +- resources/views/account/profile.blade.php | 2 +- .../account/requestable-assets.blade.php | 14 +- .../views/asset_maintenances/edit.blade.php | 23 +- .../views/asset_maintenances/index.blade.php | 45 +- resources/views/categories/edit.blade.php | 202 +-- resources/views/categories/index.blade.php | 48 +- resources/views/categories/view.blade.php | 45 +- resources/views/companies/edit.blade.php | 79 +- resources/views/companies/index.blade.php | 2 +- resources/views/components/edit.blade.php | 210 +-- resources/views/components/index.blade.php | 48 +- resources/views/components/view.blade.php | 51 +- resources/views/consumables/edit.blade.php | 236 +--- resources/views/consumables/index.blade.php | 52 +- resources/views/consumables/view.blade.php | 57 +- resources/views/depreciations/edit.blade.php | 83 +- resources/views/depreciations/index.blade.php | 49 +- .../views/emails/accept-accessory.blade.php | 2 +- resources/views/emails/accept-asset.blade.php | 2 +- .../views/emails/asset-canceled.blade.php | 2 +- .../views/emails/asset-requested.blade.php | 2 +- .../views/emails/auth/reminder.blade.php | 2 +- .../views/emails/checkin-asset.blade.php | 2 +- .../views/emails/forgot-password.blade.php | 4 +- .../views/emails/register-activate.blade.php | 4 +- resources/views/emails/send-login.blade.php | 4 +- resources/views/groups/edit.blade.php | 138 +- resources/views/groups/index.blade.php | 47 +- resources/views/hardware/bulk.blade.php | 2 +- resources/views/hardware/edit.blade.php | 427 ++---- resources/views/hardware/index.blade.php | 65 +- resources/views/hardware/labels.blade.php | 4 +- resources/views/hardware/qr-view.blade.php | 4 +- resources/views/hardware/view.blade.php | 10 +- resources/views/layouts/basic.blade.php | 20 +- resources/views/layouts/default.blade.php | 38 +- resources/views/layouts/edit-form.blade.php | 57 + resources/views/licenses/edit.blade.php | 359 ++--- resources/views/licenses/index.blade.php | 52 +- resources/views/licenses/view.blade.php | 12 +- resources/views/locations/edit.blade.php | 235 +--- resources/views/locations/index.blade.php | 46 +- resources/views/locations/view.blade.php | 79 +- resources/views/manufacturers/edit.blade.php | 75 +- resources/views/manufacturers/index.blade.php | 50 +- resources/views/manufacturers/view.blade.php | 55 +- resources/views/models/edit.blade.php | 209 +-- resources/views/models/index.blade.php | 48 +- resources/views/models/view.blade.php | 50 +- .../views/partials/bootstrap-table.blade.php | 54 + .../partials/forms/edit/address.blade.php | 47 + .../partials/forms/edit/category.blade.php | 8 + .../partials/forms/edit/company.blade.php | 9 + .../forms/edit/depreciation.blade.php | 8 + .../views/partials/forms/edit/email.blade.php | 7 + .../partials/forms/edit/item_number.blade.php | 8 + .../partials/forms/edit/location.blade.php | 8 + .../forms/edit/maintenance_type.blade.php | 9 + .../forms/edit/manufacturer.blade.php | 8 + .../forms/edit/minimum_quantity.blade.php | 15 + .../forms/edit/model_number.blade.php | 8 + .../views/partials/forms/edit/name.blade.php | 8 + .../views/partials/forms/edit/notes.blade.php | 8 + .../forms/edit/order_number.blade.php | 8 + .../views/partials/forms/edit/phone.blade.php | 7 + .../forms/edit/purchase_cost.blade.php | 17 + .../forms/edit/purchase_date.blade.php | 11 + .../partials/forms/edit/quantity.blade.php | 11 + .../partials/forms/edit/requestable.blade.php | 9 + .../partials/forms/edit/serial.blade.php | 8 + .../partials/forms/edit/status.blade.php | 15 + .../partials/forms/edit/submit.blade.php | 4 + .../partials/forms/edit/supplier.blade.php | 11 + .../partials/forms/edit/warranty.blade.php | 13 + resources/views/reports/accessories.blade.php | 2 +- resources/views/reports/activity.blade.php | 54 +- resources/views/reports/asset.blade.php | 157 +-- .../reports/asset_maintenances.blade.php | 6 +- .../views/reports/depreciation.blade.php | 12 +- resources/views/reports/index.blade.php | 10 +- resources/views/reports/licenses.blade.php | 8 +- .../views/reports/unaccepted_assets.blade.php | 2 +- resources/views/settings/edit.blade.php | 11 + resources/views/statuslabels/edit.blade.php | 137 +- resources/views/statuslabels/index.blade.php | 47 +- resources/views/suppliers/edit.blade.php | 215 +-- resources/views/suppliers/index.blade.php | 48 +- resources/views/users/edit.blade.php | 4 +- resources/views/users/index.blade.php | 52 +- resources/views/users/ldap.blade.php | 2 +- tests/TODO.testing | 3 + tests/_data/IMPORT_ACCESSORIES.csv | 26 + tests/_data/IMPORT_ASSETS.csv | 25 + tests/_data/IMPORT_CONSUMABLES.csv | 25 + tests/_data/dump.sql | 1209 ++++++++++++++++- tests/acceptance/AccessoriesCept.php | 2 +- tests/acceptance/AssetsCept.php | 3 +- tests/acceptance/CategoriesCept.php | 10 +- tests/acceptance/CompaniesCept.php | 2 +- tests/acceptance/ConsumablesCept.php | 2 +- tests/acceptance/DepreciationsCept.php | 4 +- tests/acceptance/LocationsCept.php | 2 +- tests/acceptance/ManufacturersCept.php | 2 +- tests/acceptance/SuppliersCept.php | 2 +- tests/acceptance/UsersCept.php | 1 + tests/functional.suite.yml | 13 +- tests/functional/AccessoriesCest.php | 78 ++ tests/functional/AssetModelsCest.php | 60 + tests/functional/AssetsCest.php | 65 + tests/functional/CategoriesCest.php | 54 + tests/functional/CompaniesCest.php | 50 + tests/functional/ComponentsCest.php | 74 + tests/functional/ConsumablesCest.php | 73 + tests/functional/DepreciationsCest.php | 61 + tests/functional/GroupsCest.php | 57 + tests/functional/LicensesCest.php | 83 ++ tests/functional/LocationsCest.php | 74 + tests/functional/ManufacturersCest.php | 57 + tests/functional/StatusLabelsCest.php | 62 + tests/functional/SuppliersCest.php | 69 + tests/functional/UsersCest.php | 93 ++ tests/functional/_bootstrap.php | 4 + tests/unit.suite.yml | 2 +- 186 files changed, 3991 insertions(+), 3670 deletions(-) create mode 100644 .env.tests create mode 100644 app/Models/SnipeModel.php create mode 100644 database/migrations/2016_10_16_015024_rename_modelno_to_model_number.php create mode 100644 database/migrations/2016_10_16_015211_rename_consumable_modelno_to_model_number.php create mode 100644 database/migrations/2016_10_16_143235_rename_model_note_to_notes.php create mode 100644 database/migrations/2016_10_16_165052_rename_component_total_qty_to_qty.php create mode 100644 database/migrations/2016_11_13_020954_rename_component_serial_number_to_serial.php mode change 100644 => 100755 public/uploads/.gitkeep mode change 100644 => 100755 public/uploads/assets/.gitkeep mode change 100644 => 100755 public/uploads/barcodes/.gitkeep create mode 100644 resources/views/layouts/edit-form.blade.php create mode 100644 resources/views/partials/bootstrap-table.blade.php create mode 100644 resources/views/partials/forms/edit/address.blade.php create mode 100644 resources/views/partials/forms/edit/category.blade.php create mode 100644 resources/views/partials/forms/edit/company.blade.php create mode 100644 resources/views/partials/forms/edit/depreciation.blade.php create mode 100644 resources/views/partials/forms/edit/email.blade.php create mode 100644 resources/views/partials/forms/edit/item_number.blade.php create mode 100644 resources/views/partials/forms/edit/location.blade.php create mode 100644 resources/views/partials/forms/edit/maintenance_type.blade.php create mode 100644 resources/views/partials/forms/edit/manufacturer.blade.php create mode 100644 resources/views/partials/forms/edit/minimum_quantity.blade.php create mode 100644 resources/views/partials/forms/edit/model_number.blade.php create mode 100644 resources/views/partials/forms/edit/name.blade.php create mode 100644 resources/views/partials/forms/edit/notes.blade.php create mode 100644 resources/views/partials/forms/edit/order_number.blade.php create mode 100644 resources/views/partials/forms/edit/phone.blade.php create mode 100644 resources/views/partials/forms/edit/purchase_cost.blade.php create mode 100644 resources/views/partials/forms/edit/purchase_date.blade.php create mode 100644 resources/views/partials/forms/edit/quantity.blade.php create mode 100644 resources/views/partials/forms/edit/requestable.blade.php create mode 100644 resources/views/partials/forms/edit/serial.blade.php create mode 100644 resources/views/partials/forms/edit/status.blade.php create mode 100644 resources/views/partials/forms/edit/submit.blade.php create mode 100644 resources/views/partials/forms/edit/supplier.blade.php create mode 100644 resources/views/partials/forms/edit/warranty.blade.php create mode 100644 tests/TODO.testing create mode 100644 tests/_data/IMPORT_ACCESSORIES.csv create mode 100644 tests/_data/IMPORT_ASSETS.csv create mode 100644 tests/_data/IMPORT_CONSUMABLES.csv create mode 100644 tests/functional/AccessoriesCest.php create mode 100644 tests/functional/AssetModelsCest.php create mode 100644 tests/functional/AssetsCest.php create mode 100644 tests/functional/CategoriesCest.php create mode 100644 tests/functional/CompaniesCest.php create mode 100644 tests/functional/ComponentsCest.php create mode 100644 tests/functional/ConsumablesCest.php create mode 100644 tests/functional/DepreciationsCest.php create mode 100644 tests/functional/GroupsCest.php create mode 100644 tests/functional/LicensesCest.php create mode 100644 tests/functional/LocationsCest.php create mode 100644 tests/functional/ManufacturersCest.php create mode 100644 tests/functional/StatusLabelsCest.php create mode 100644 tests/functional/SuppliersCest.php create mode 100644 tests/functional/UsersCest.php diff --git a/.env.tests b/.env.tests new file mode 100644 index 000000000..6349562fb --- /dev/null +++ b/.env.tests @@ -0,0 +1,9 @@ +APP_ENV=local +APP_DEBUG=true +APP_URL=http://snipe-it.localapp +DB_CONNECTION=mysql +DB_HOST=localhost +DB_DATABASE=snipeittests +DB_USERNAME=snipeit +DB_PASSWORD=snipe +APP_KEY=base64:tu9NRh/a6+dCXBDGvg0Gv/0TcABnFsbT4AKxrr8mwQo= diff --git a/app/Console/Commands/ObjectImportCommand.php b/app/Console/Commands/ObjectImportCommand.php index 63f9aeb77..c777a3580 100644 --- a/app/Console/Commands/ObjectImportCommand.php +++ b/app/Console/Commands/ObjectImportCommand.php @@ -100,7 +100,7 @@ class ObjectImportCommand extends Command $this->locations = Location::All(['name', 'id']); $this->categories = Category::All(['name', 'category_type', 'id']); $this->manufacturers = Manufacturer::All(['name', 'id']); - $this->asset_models = AssetModel::All(['name','modelno','category_id','manufacturer_id', 'id']); + $this->asset_models = AssetModel::All(['name','model_number','category_id','manufacturer_id', 'id']); $this->companies = Company::All(['name', 'id']); $this->status_labels = Statuslabel::All(['name', 'id']); $this->suppliers = Supplier::All(['name', 'id']); @@ -348,7 +348,7 @@ class ObjectImportCommand extends Command $editingModel = false; foreach ($this->asset_models as $tempmodel) { if (strcasecmp($tempmodel->name, $asset_model_name) == 0 - && $tempmodel->modelno == $asset_modelno) { + && $tempmodel->model_number == $asset_modelno) { $this->log('A matching model ' . $asset_model_name . ' already exists'); if (!$this->option('update')) { return $tempmodel; @@ -366,7 +366,7 @@ class ObjectImportCommand extends Command $asset_model->name = $asset_model_name; } isset($manufacturer) && $manufacturer->exists && $asset_model->manufacturer_id = $manufacturer->id; - isset($asset_modelno) && $asset_model->modelno = $asset_modelno; + isset($asset_modelno) && $asset_model->model_number = $asset_modelno; if (isset($category) && $category->exists) { $asset_model->category_id = $category->id; } diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 1c2e4269c..430727b8f 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -434,8 +434,8 @@ class Helper foreach ($consumables as $consumable) { $avail = $consumable->numRemaining(); if ($avail < ($consumable->min_amt) + \App\Models\Setting::getSettings()->alert_threshold) { - if ($consumable->total_qty > 0) { - $percent = number_format((($consumable->numRemaining() / $consumable->total_qty) * 100), 0); + if ($consumable->qty > 0) { + $percent = number_format((($consumable->numRemaining() / $consumable->qty) * 100), 0); } else { $percent = 100; } @@ -456,8 +456,8 @@ class Helper $avail = $accessory->numRemaining(); if ($avail < ($accessory->min_amt) + \App\Models\Setting::getSettings()->alert_threshold) { - if ($accessory->total_qty > 0) { - $percent = number_format((($accessory->numRemaining() / $accessory->total_qty) * 100), 0); + if ($accessory->qty > 0) { + $percent = number_format((($accessory->numRemaining() / $accessory->qty) * 100), 0); } else { $percent = 100; } @@ -476,8 +476,8 @@ class Helper foreach ($components as $component) { $avail = $component->numRemaining(); if ($avail < ($component->min_amt) + \App\Models\Setting::getSettings()->alert_threshold) { - if ($component->total_qty > 0) { - $percent = number_format((($component->numRemaining() / $component->total_qty) * 100), 0); + if ($component->qty > 0) { + $percent = number_format((($component->numRemaining() / $component->qty) * 100), 0); } else { $percent = 100; } diff --git a/app/Http/Controllers/AccessoriesController.php b/app/Http/Controllers/AccessoriesController.php index 33d49d35b..ee11627e9 100755 --- a/app/Http/Controllers/AccessoriesController.php +++ b/app/Http/Controllers/AccessoriesController.php @@ -7,19 +7,19 @@ use App\Models\Actionlog; use App\Models\Company; use App\Models\Setting; use App\Models\User; +use Auth; use Carbon\Carbon; use Config; use DB; +use Gate; use Input; use Lang; use Mail; use Redirect; +use Request; use Slack; use Str; use View; -use Auth; -use Request; -use Gate; /** This controller handles all actions related to Accessories for * the Snipe-IT Asset Management application. @@ -54,7 +54,7 @@ class AccessoriesController extends Controller { // Show the page return View::make('accessories/edit') - ->with('accessory', new Accessory) + ->with('item', new Accessory) ->with('category_list', Helper::categoryList('accessory')) ->with('company_list', Helper::companyList()) ->with('location_list', Helper::locationsList()) @@ -119,14 +119,14 @@ class AccessoriesController extends Controller public function getEdit(Request $request, $accessoryId = null) { // Check if the accessory exists - if (is_null($accessory = Accessory::find($accessoryId))) { + if (is_null($item = Accessory::find($accessoryId))) { // Redirect to the blogs management page return redirect()->to('admin/accessories')->with('error', trans('admin/accessories/message.does_not_exist')); - } elseif (!Company::isCurrentUserHasAccess($accessory)) { + } elseif (!Company::isCurrentUserHasAccess($item)) { return redirect()->to('admin/accessories')->with('error', trans('general.insufficient_permissions')); } - return View::make('accessories/edit', compact('accessory')) + return View::make('accessories/edit', compact('item')) ->with('category_list', Helper::categoryList('accessory')) ->with('company_list', Helper::companyList()) ->with('location_list', Helper::locationsList()) diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index 31411f2a4..f45fd1c16 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -62,7 +62,7 @@ class AssetModelsController extends Controller ->with('category_list', $category_list) ->with('depreciation_list', $depreciation_list) ->with('manufacturer_list', $manufacturer_list) - ->with('model', new AssetModel); + ->with('item', new AssetModel); } @@ -94,10 +94,10 @@ class AssetModelsController extends Controller // Save the model data $model->name = e(Input::get('name')); - $model->modelno = e(Input::get('modelno')); + $model->model_number = e(Input::get('model_number')); $model->manufacturer_id = e(Input::get('manufacturer_id')); $model->category_id = e(Input::get('category_id')); - $model->note = e(Input::get('note')); + $model->notes = e(Input::get('notes')); $model->user_id = Auth::user()->id; $model->requestable = Input::has('requestable'); @@ -146,7 +146,7 @@ class AssetModelsController extends Controller $model->name=e(Input::get('name')); $model->manufacturer_id = e(Input::get('manufacturer_id')); $model->category_id = e(Input::get('category_id')); - $model->modelno = e(Input::get('modelno')); + $model->model_number = e(Input::get('model_number')); $model->user_id = Auth::user()->id; $model->note = e(Input::get('note')); $model->eol= null; @@ -176,7 +176,7 @@ class AssetModelsController extends Controller public function getEdit($modelId = null) { // Check if the model exists - if (is_null($model = AssetModel::find($modelId))) { + if (is_null($item = AssetModel::find($modelId))) { // Redirect to the model management page return redirect()->to('assets/models')->with('error', trans('admin/models/message.does_not_exist')); } @@ -184,7 +184,8 @@ class AssetModelsController extends Controller $depreciation_list = Helper::depreciationList(); $manufacturer_list = Helper::manufacturerList(); $category_list = Helper::categoryList('asset'); - $view = View::make('models/edit', compact('model')); + + $view = View::make('models/edit', compact('item')); $view->with('category_list', $category_list); $view->with('depreciation_list', $depreciation_list); $view->with('manufacturer_list', $manufacturer_list); @@ -221,13 +222,12 @@ class AssetModelsController extends Controller } else { $model->eol = e(Input::get('eol')); } - // Update the model data $model->name = e(Input::get('name')); - $model->modelno = e(Input::get('modelno')); + $model->model_number = e(Input::get('model_number')); $model->manufacturer_id = e(Input::get('manufacturer_id')); $model->category_id = e(Input::get('category_id')); - $model->note = e(Input::get('note')); + $model->notes = e(Input::get('notes')); $model->requestable = Input::has('requestable'); @@ -442,7 +442,7 @@ class AssetModelsController extends Controller } - $allowed_columns = ['id','name','modelno']; + $allowed_columns = ['id','name','model_number']; $order = Input::get('order') === 'asc' ? 'asc' : 'desc'; $sort = in_array(Input::get('sort'), $allowed_columns) ? e(Input::get('sort')) : 'created_at'; @@ -465,7 +465,7 @@ class AssetModelsController extends Controller 'manufacturer' => (string)link_to('/admin/settings/manufacturers/'.$model->manufacturer->id.'/view', $model->manufacturer->name), 'name' => (string)link_to('/hardware/models/'.$model->id.'/view', $model->name), 'image' => ($model->image!='') ? '' : '', - 'modelnumber' => $model->modelno, + 'modelnumber' => $model->model_number, 'numassets' => $model->assets->count(), 'depreciation' => (($model->depreciation)&&($model->depreciation->id > 0)) ? $model->depreciation->name.' ('.$model->depreciation->months.')' : trans('general.no_depreciation'), 'category' => ($model->category) ? $model->category->name : '', diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index f3cc630f9..8ad41b9cc 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -124,7 +124,7 @@ class AssetsController extends Controller $view->with('statuslabel_list', $statuslabel_list); $view->with('assigned_to', $assigned_to); $view->with('location_list', $location_list); - $view->with('asset', new Asset); + $view->with('item', new Asset); $view->with('manufacturer', $manufacturer_list); $view->with('category', $category_list); $view->with('statuslabel_types', $statuslabel_types); @@ -290,10 +290,10 @@ class AssetsController extends Controller { // Check if the asset exists - if (!$asset = Asset::find($assetId)) { + if (!$item = Asset::find($assetId)) { // Redirect to the asset management page return redirect()->to('hardware')->with('error', trans('admin/hardware/message.does_not_exist')); - } elseif (!Company::isCurrentUserHasAccess($asset)) { + } elseif (!Company::isCurrentUserHasAccess($item)) { return redirect()->to('hardware')->with('error', trans('general.insufficient_permissions')); } @@ -308,7 +308,7 @@ class AssetsController extends Controller $assigned_to = Helper::usersList(); $statuslabel_types =Helper::statusTypeList(); - return View::make('hardware/edit', compact('asset')) + return View::make('hardware/edit', compact('item')) ->with('model_list', $model_list) ->with('supplier_list', $supplier_list) ->with('company_list', $company_list) @@ -1038,7 +1038,7 @@ class AssetsController extends Controller ->with('statuslabel_list', $statuslabel_list) ->with('statuslabel_types', $statuslabel_types) ->with('assigned_to', $assigned_to) - ->with('asset', $asset) + ->with('item', $asset) ->with('location_list', $location_list) ->with('manufacturer', $manufacturer_list) ->with('category', $category_list) @@ -1798,7 +1798,7 @@ class AssetsController extends Controller 'asset_tag' => ''.e($asset->asset_tag).'', 'serial' => e($asset->serial), 'model' => ($asset->model) ? (string)link_to('/hardware/models/'.$asset->model->id.'/view', e($asset->model->name)) : 'No model', - 'model_number' => ($asset->model && $asset->model->modelno) ? (string)$asset->model->modelno : '', + 'model_number' => ($asset->model && $asset->model->model_number) ? (string)$asset->model->model_number : '', 'status_label' => ($asset->assigneduser) ? 'Deployed' : ((e($asset->assetstatus)) ? e($asset->assetstatus->name) : ''), 'assigned_to' => ($asset->assigneduser) ? (string)link_to(config('app.url').'/admin/users/'.$asset->assigned_to.'/view', e($asset->assigneduser->fullName())) : '', 'location' => (($asset->assigneduser) && ($asset->assigneduser->userloc!='')) ? (string)link_to('admin/settings/locations/'.$asset->assigneduser->userloc->id.'/view', e($asset->assigneduser->userloc->name)) : (($asset->defaultLoc!='') ? (string)link_to('admin/settings/locations/'.$asset->defaultLoc->id.'/view', e($asset->defaultLoc->name)) : ''), diff --git a/app/Http/Controllers/CategoriesController.php b/app/Http/Controllers/CategoriesController.php index 600336e80..f08cd3b2a 100755 --- a/app/Http/Controllers/CategoriesController.php +++ b/app/Http/Controllers/CategoriesController.php @@ -53,7 +53,7 @@ class CategoriesController extends Controller { // Show the page $category_types= Helper::categoryTypeList(); - return View::make('categories/edit')->with('category', new Category) + return View::make('categories/edit')->with('item', new Category) ->with('category_types', $category_types); } @@ -109,7 +109,7 @@ class CategoriesController extends Controller public function getEdit($categoryId = null) { // Check if the category exists - if (is_null($category = Category::find($categoryId))) { + if (is_null($item = Category::find($categoryId))) { // Redirect to the blogs management page return redirect()->to('admin/settings/categories')->with('error', trans('admin/categories/message.does_not_exist')); } @@ -120,7 +120,7 @@ class CategoriesController extends Controller $category_options = array('' => 'Top Level') + DB::table('categories')->where('id', '!=', $categoryId)->lists('name', 'id'); $category_types= Helper::categoryTypeList(); - return View::make('categories/edit', compact('category')) + return View::make('categories/edit', compact('item')) ->with('category_options', $category_options) ->with('category_types', $category_types); } diff --git a/app/Http/Controllers/CompaniesController.php b/app/Http/Controllers/CompaniesController.php index 9d05c39fe..093ba8415 100644 --- a/app/Http/Controllers/CompaniesController.php +++ b/app/Http/Controllers/CompaniesController.php @@ -38,7 +38,7 @@ final class CompaniesController extends Controller */ public function getCreate() { - return View::make('companies/edit')->with('company', new Company); + return View::make('companies/edit')->with('item', new Company); } /** @@ -74,11 +74,11 @@ final class CompaniesController extends Controller */ public function getEdit($companyId) { - if (is_null($company = Company::find($companyId))) { + if (is_null($item = Company::find($companyId))) { return redirect()->to('admin/settings/companies') ->with('error', trans('admin/companies/message.does_not_exist')); } else { - return View::make('companies/edit')->with('company', $company); + return View::make('companies/edit')->with('item', $item); } } diff --git a/app/Http/Controllers/ComponentsController.php b/app/Http/Controllers/ComponentsController.php index 998558d4c..1bba51ca6 100644 --- a/app/Http/Controllers/ComponentsController.php +++ b/app/Http/Controllers/ComponentsController.php @@ -61,7 +61,7 @@ class ComponentsController extends Controller $location_list = Helper::locationsList(); return View::make('components/edit') - ->with('component', new Component) + ->with('item', new Component) ->with('category_list', $category_list) ->with('company_list', $company_list) ->with('location_list', $location_list); @@ -89,7 +89,7 @@ class ComponentsController extends Controller $component->company_id = Company::getIdForCurrentUser(Input::get('company_id')); $component->order_number = e(Input::get('order_number')); $component->min_amt = e(Input::get('min_amt')); - $component->serial_number = e(Input::get('serial_number')); + $component->serial = e(Input::get('serial')); if (e(Input::get('purchase_date')) == '') { $component->purchase_date = null; @@ -103,7 +103,7 @@ class ComponentsController extends Controller $component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost'))); } - $component->total_qty = e(Input::get('total_qty')); + $component->qty = e(Input::get('qty')); $component->user_id = Auth::user()->id; // Was the component created? @@ -130,10 +130,10 @@ class ComponentsController extends Controller public function getEdit($componentId = null) { // Check if the component exists - if (is_null($component = Component::find($componentId))) { + if (is_null($item = Component::find($componentId))) { // Redirect to the blogs management page return redirect()->to('admin/components')->with('error', trans('admin/components/message.does_not_exist')); - } elseif (!Company::isCurrentUserHasAccess($component)) { + } elseif (!Company::isCurrentUserHasAccess($item)) { return redirect()->to('admin/components')->with('error', trans('general.insufficient_permissions')); } @@ -141,7 +141,7 @@ class ComponentsController extends Controller $company_list = Helper::companyList(); $location_list = Helper::locationsList(); - return View::make('components/edit', compact('component')) + return View::make('components/edit', compact('item')) ->with('category_list', $category_list) ->with('company_list', $company_list) ->with('location_list', $location_list); @@ -174,8 +174,8 @@ class ComponentsController extends Controller $component->location_id = e(Input::get('location_id')); $component->company_id = Company::getIdForCurrentUser(Input::get('company_id')); $component->order_number = e(Input::get('order_number')); - $component->min_amt = e(Input::get('min_amt')); - $component->serial_number = e(Input::get('serial_number')); + $component->min_amt = e(Input::get('min_amt')); + $component->serial = e(Input::get('serial')); if (e(Input::get('purchase_date')) == '') { $component->purchase_date = null; @@ -189,7 +189,7 @@ class ComponentsController extends Controller $component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost'))); } - $component->total_qty = e(Input::get('total_qty')); + $component->qty = e(Input::get('qty')); // Was the component created? if ($component->save()) { @@ -424,7 +424,7 @@ class ComponentsController extends Controller $limit = 50; } - $allowed_columns = ['id','name','min_amt','order_number','serial_number','purchase_date','purchase_cost','companyName','category','total_qty']; + $allowed_columns = ['id','name','min_amt','order_number','serial','purchase_date','purchase_cost','companyName','category','total_qty']; $order = Input::get('order') === 'asc' ? 'asc' : 'desc'; $sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at'; @@ -472,9 +472,9 @@ class ComponentsController extends Controller 'checkbox' =>'
', 'id' => $component->id, 'name' => (string)link_to('admin/components/'.$component->id.'/view', e($component->name)), - 'serial_number' => $component->serial_number, + 'serial_number' => $component->serial, 'location' => ($component->location) ? e($component->location->name) : '', - 'total_qty' => e($component->total_qty), + 'qty' => e($component->qty), 'min_amt' => e($component->min_amt), 'category' => ($component->category) ? e($component->category->name) : 'Missing category', 'order_number' => e($component->order_number), diff --git a/app/Http/Controllers/ConsumablesController.php b/app/Http/Controllers/ConsumablesController.php index e05310746..92673ac45 100644 --- a/app/Http/Controllers/ConsumablesController.php +++ b/app/Http/Controllers/ConsumablesController.php @@ -59,7 +59,7 @@ class ConsumablesController extends Controller $manufacturer_list = Helper::manufacturerList(); return View::make('consumables/edit') - ->with('consumable', new Consumable) + ->with('item', new Consumable) ->with('category_list', $category_list) ->with('company_list', $company_list) ->with('location_list', $location_list) @@ -85,7 +85,7 @@ class ConsumablesController extends Controller $consumable->order_number = e(Input::get('order_number')); $consumable->min_amt = e(Input::get('min_amt')); $consumable->manufacturer_id = e(Input::get('manufacturer_id')); - $consumable->model_no = e(Input::get('model_no')); + $consumable->model_number = e(Input::get('model_number')); $consumable->item_no = e(Input::get('item_no')); if (e(Input::get('purchase_date')) == '') { @@ -127,10 +127,10 @@ class ConsumablesController extends Controller public function getEdit($consumableId = null) { // Check if the consumable exists - if (is_null($consumable = Consumable::find($consumableId))) { + if (is_null($item = Consumable::find($consumableId))) { // Redirect to the blogs management page return redirect()->to('admin/consumables')->with('error', trans('admin/consumables/message.does_not_exist')); - } elseif (!Company::isCurrentUserHasAccess($consumable)) { + } elseif (!Company::isCurrentUserHasAccess($item)) { return redirect()->to('admin/consumables')->with('error', trans('general.insufficient_permissions')); } @@ -139,7 +139,7 @@ class ConsumablesController extends Controller $location_list = Helper::locationsList(); $manufacturer_list = Helper::manufacturerList(); - return View::make('consumables/edit', compact('consumable')) + return View::make('consumables/edit', compact('item')) ->with('category_list', $category_list) ->with('company_list', $company_list) ->with('location_list', $location_list) @@ -171,7 +171,7 @@ class ConsumablesController extends Controller $consumable->order_number = e(Input::get('order_number')); $consumable->min_amt = e(Input::get('min_amt')); $consumable->manufacturer_id = e(Input::get('manufacturer_id')); - $consumable->model_no = e(Input::get('model_no')); + $consumable->model_number = e(Input::get('model_number')); $consumable->item_no = e(Input::get('item_no')); if (e(Input::get('purchase_date')) == '') { @@ -412,7 +412,7 @@ class ConsumablesController extends Controller $limit = 50; } - $allowed_columns = ['id','name','order_number','min_amt','purchase_date','purchase_cost','companyName','category','model_no', 'item_no', 'manufacturer']; + $allowed_columns = ['id','name','order_number','min_amt','purchase_date','purchase_cost','companyName','category','model_number', 'item_no', 'manufacturer']; $order = Input::get('order') === 'asc' ? 'asc' : 'desc'; $sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at'; @@ -466,7 +466,7 @@ class ConsumablesController extends Controller 'min_amt' => e($consumable->min_amt), 'qty' => e($consumable->qty), 'manufacturer' => ($consumable->manufacturer) ? (string) link_to('/admin/settings/manufacturers/'.$consumable->manufacturer_id.'/view', $consumable->manufacturer->name): '', - 'model_no' => e($consumable->model_no), + 'model_number' => e($consumable->model_number), 'item_no' => e($consumable->item_no), 'category' => ($consumable->category) ? (string) link_to('/admin/settings/categories/'.$consumable->category_id.'/view', $consumable->category->name) : 'Missing category', 'order_number' => e($consumable->order_number), diff --git a/app/Http/Controllers/DepreciationsController.php b/app/Http/Controllers/DepreciationsController.php index 59dc78d08..f3fba5495 100755 --- a/app/Http/Controllers/DepreciationsController.php +++ b/app/Http/Controllers/DepreciationsController.php @@ -46,7 +46,7 @@ class DepreciationsController extends Controller public function getCreate() { // Show the page - return View::make('depreciations/edit')->with('depreciation', new Depreciation); + return View::make('depreciations/edit')->with('item', new Depreciation); } @@ -94,12 +94,12 @@ class DepreciationsController extends Controller public function getEdit($depreciationId = null) { // Check if the depreciation exists - if (is_null($depreciation = Depreciation::find($depreciationId))) { + if (is_null($item = Depreciation::find($depreciationId))) { // Redirect to the blogs management page return redirect()->to('admin/settings/depreciations')->with('error', trans('admin/depreciations/message.does_not_exist')); } - return View::make('depreciations/edit', compact('depreciation')); + return View::make('depreciations/edit', compact('item')); } diff --git a/app/Http/Controllers/LicensesController.php b/app/Http/Controllers/LicensesController.php index 9c04518e7..fdc7a22df 100755 --- a/app/Http/Controllers/LicensesController.php +++ b/app/Http/Controllers/LicensesController.php @@ -70,7 +70,7 @@ class LicensesController extends Controller ->with('maintained_list', $maintained_list) ->with('company_list', Helper::companyList()) ->with('manufacturer_list', Helper::manufacturerList()) - ->with('license', new License); + ->with('item', new License); } @@ -139,6 +139,7 @@ class LicensesController extends Controller $license->depreciation_id = e(Input::get('depreciation_id')); $license->company_id = Company::getIdForCurrentUser(Input::get('company_id')); $license->expiration_date = e(Input::get('expiration_date')); + $license->termination_date = e(Input::get('termination_date')); $license->user_id = Auth::user()->id; if (($license->purchase_date == "") || ($license->purchase_date == "0000-00-00")) { @@ -190,26 +191,26 @@ class LicensesController extends Controller public function getEdit($licenseId = null) { // Check if the license exists - if (is_null($license = License::find($licenseId))) { + if (is_null($item = License::find($licenseId))) { // Redirect to the blogs management page return redirect()->to('admin/licenses')->with('error', trans('admin/licenses/message.does_not_exist')); - } elseif (!Company::isCurrentUserHasAccess($license)) { + } elseif (!Company::isCurrentUserHasAccess($item)) { return redirect()->to('admin/licenses')->with('error', trans('general.insufficient_permissions')); } - if ($license->purchase_date == "0000-00-00") { - $license->purchase_date = null; + if ($item->purchase_date == "0000-00-00") { + $item->purchase_date = null; } - if ($license->purchase_cost == "0.00") { - $license->purchase_cost = null; + if ($item->purchase_cost == "0.00") { + $item->purchase_cost = null; } // Show the page $license_options = array('' => 'Top Level') + DB::table('assets')->where('id', '!=', $licenseId)->pluck('name', 'id'); $maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No'); - return View::make('licenses/edit', compact('license')) + return View::make('licenses/edit', compact('item')) ->with('license_options', $license_options) ->with('depreciation_list', Helper::depreciationList()) ->with('supplier_list', Helper::suppliersList()) @@ -786,7 +787,7 @@ class LicensesController extends Controller ->with('license_options', $license_options) ->with('depreciation_list', $depreciation_list) ->with('supplier_list', $supplier_list) - ->with('license', $license) + ->with('item', $license) ->with('maintained_list', $maintained_list) ->with('company_list', $company_list) ->with('manufacturer_list', Helper::manufacturerList()); diff --git a/app/Http/Controllers/LocationsController.php b/app/Http/Controllers/LocationsController.php index e8589b62c..cee02f7a8 100755 --- a/app/Http/Controllers/LocationsController.php +++ b/app/Http/Controllers/LocationsController.php @@ -61,7 +61,7 @@ class LocationsController extends Controller return View::make('locations/edit') ->with('location_options', $location_options) - ->with('location', new Location); + ->with('item', new Location); } @@ -159,7 +159,7 @@ class LocationsController extends Controller public function getEdit($locationId = null) { // Check if the location exists - if (is_null($location = Location::find($locationId))) { + if (is_null($item = Location::find($locationId))) { return redirect()->to('admin/settings/locations')->with('error', trans('admin/locations/message.does_not_exist')); } @@ -169,7 +169,7 @@ class LocationsController extends Controller $location_options = Location::flattenLocationsArray($location_options_array); $location_options = array('' => 'Top Level') + $location_options; - return View::make('locations/edit', compact('location'))->with('location_options', $location_options); + return View::make('locations/edit', compact('item'))->with('location_options', $location_options); } diff --git a/app/Http/Controllers/ManufacturersController.php b/app/Http/Controllers/ManufacturersController.php index 640ae891d..eba506f52 100755 --- a/app/Http/Controllers/ManufacturersController.php +++ b/app/Http/Controllers/ManufacturersController.php @@ -46,7 +46,7 @@ class ManufacturersController extends Controller */ public function getCreate() { - return View::make('manufacturers/edit')->with('manufacturer', new Manufacturer); + return View::make('manufacturers/edit')->with('item', new Manufacturer); } @@ -84,13 +84,13 @@ class ManufacturersController extends Controller public function getEdit($manufacturerId = null) { // Check if the manufacturer exists - if (is_null($manufacturer = Manufacturer::find($manufacturerId))) { + if (is_null($item = Manufacturer::find($manufacturerId))) { // Redirect to the manufacturer page return redirect()->to('admin/settings/manufacturers')->with('error', trans('admin/manufacturers/message.does_not_exist')); } // Show the page - return View::make('manufacturers/edit', compact('manufacturer')); + return View::make('manufacturers/edit', compact('item')); } @@ -521,7 +521,7 @@ class ManufacturersController extends Controller 'min_amt' => e($consumable->min_amt), 'qty' => e($consumable->qty), 'manufacturer' => ($consumable->manufacturer) ? (string) link_to('/admin/settings/manufacturers/'.$consumable->manufacturer_id.'/view', $consumable->manufacturer->name): '', - 'model_no' => e($consumable->model_no), + 'model_number' => e($consumable->model_number), 'item_no' => e($consumable->item_no), 'category' => ($consumable->category) ? (string) link_to('/admin/settings/categories/'.$consumable->category_id.'/view', $consumable->category->name) : 'Missing category', 'order_number' => e($consumable->order_number), diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index b0927c1c5..faad723fe 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -152,7 +152,7 @@ class ReportsController extends Controller $asset->asset_tag, ($asset->model->manufacturer) ? $asset->model->manufacturer->name : '', ($asset->model) ? $asset->model->name : '', - ($asset->model->modelno) ? $asset->model->modelno : '', + ($asset->model->model_number) ? $asset->model->model_number : '', ($asset->name) ? $asset->name : '', ($asset->serial) ? $asset->serial : '', ($asset->assetstatus) ? e($asset->assetstatus->name) : '', @@ -610,7 +610,7 @@ class ReportsController extends Controller } if (e(Input::get('model')) == '1') { $row[] = '"' . e($asset->model->name) . '"'; - $row[] = '"' . e($asset->model->modelno) . '"'; + $row[] = '"' . e($asset->model->model_number) . '"'; } if (e(Input::get('category')) == '1') { $row[] = '"' .e($asset->model->category->name) . '"'; diff --git a/app/Http/Controllers/StatuslabelsController.php b/app/Http/Controllers/StatuslabelsController.php index f680ec569..08a3df65f 100755 --- a/app/Http/Controllers/StatuslabelsController.php +++ b/app/Http/Controllers/StatuslabelsController.php @@ -87,11 +87,11 @@ class StatuslabelsController extends Controller public function getCreate() { // Show the page - $statuslabel = new Statuslabel; - $use_statuslabel_type = $statuslabel->getStatuslabelType(); + $item = new Statuslabel; + $use_statuslabel_type = $item->getStatuslabelType(); $statuslabel_types = Helper::statusTypeList(); - return View::make('statuslabels/edit', compact('statuslabel_types', 'statuslabel'))->with('use_statuslabel_type', $use_statuslabel_type); + return View::make('statuslabels/edit', compact('statuslabel_types', 'item'))->with('use_statuslabel_type', $use_statuslabel_type); } @@ -169,16 +169,16 @@ class StatuslabelsController extends Controller public function getEdit($statuslabelId = null) { // Check if the Statuslabel exists - if (is_null($statuslabel = Statuslabel::find($statuslabelId))) { + if (is_null($item = Statuslabel::find($statuslabelId))) { // Redirect to the blogs management page return redirect()->to('admin/settings/statuslabels')->with('error', trans('admin/statuslabels/message.does_not_exist')); } - $use_statuslabel_type = $statuslabel->getStatuslabelType(); + $use_statuslabel_type = $item->getStatuslabelType(); $statuslabel_types = array('' => trans('admin/hardware/form.select_statustype')) + array('undeployable' => trans('admin/hardware/general.undeployable')) + array('pending' => trans('admin/hardware/general.pending')) + array('archived' => trans('admin/hardware/general.archived')) + array('deployable' => trans('admin/hardware/general.deployable')); - return View::make('statuslabels/edit', compact('statuslabel', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type); + return View::make('statuslabels/edit', compact('item', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type); } diff --git a/app/Http/Controllers/SuppliersController.php b/app/Http/Controllers/SuppliersController.php index 23ecc16f9..d6114c2b0 100755 --- a/app/Http/Controllers/SuppliersController.php +++ b/app/Http/Controllers/SuppliersController.php @@ -45,7 +45,7 @@ class SuppliersController extends Controller */ public function getCreate() { - return View::make('suppliers/edit')->with('supplier', new Supplier); + return View::make('suppliers/edit')->with('item', new Supplier); } @@ -125,13 +125,13 @@ class SuppliersController extends Controller public function getEdit($supplierId = null) { // Check if the supplier exists - if (is_null($supplier = Supplier::find($supplierId))) { + if (is_null($item = Supplier::find($supplierId))) { // Redirect to the supplier page return redirect()->to('admin/settings/suppliers')->with('error', trans('admin/suppliers/message.does_not_exist')); } // Show the page - return View::make('suppliers/edit', compact('supplier')); + return View::make('suppliers/edit', compact('item')); } diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php index e6ac13a83..43d0fddaf 100755 --- a/app/Models/Accessory.php +++ b/app/Models/Accessory.php @@ -2,6 +2,7 @@ namespace App\Models; use App\Models\Loggable; +use App\Models\SnipeModel; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Watson\Validating\ValidatingTrait; @@ -11,7 +12,7 @@ use Watson\Validating\ValidatingTrait; * * @version v1.0 */ -class Accessory extends Model +class Accessory extends SnipeModel { use CompanyableTrait; use Loggable; diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 2e7e43b0d..42addbf9e 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -400,6 +400,11 @@ class Asset extends Depreciable } } + public function getDisplayNameAttribute() + { + return $this->showAssetName(); + } + public function warrantee_expires() { $date = date_create($this->purchase_date); @@ -788,7 +793,7 @@ public function checkin_email() $query->where(function ($query) use ($search) { $query->where('categories.name', 'LIKE', '%'.$search.'%') ->orWhere('models.name', 'LIKE', '%'.$search.'%') - ->orWhere('models.modelno', 'LIKE', '%'.$search.'%'); + ->orWhere('models.model_number', 'LIKE', '%'.$search.'%'); }); }); })->orWhereHas('model', function ($query) use ($search) { @@ -856,7 +861,7 @@ public function checkin_email() */ public function scopeOrderModelNumber($query, $order) { - return $query->join('models', 'assets.model_id', '=', 'models.id')->orderBy('models.modelno', $order); + return $query->join('models', 'assets.model_id', '=', 'models.id')->orderBy('models.model_number', $order); } diff --git a/app/Models/AssetModel.php b/app/Models/AssetModel.php index 2c2594807..7462b1845 100755 --- a/app/Models/AssetModel.php +++ b/app/Models/AssetModel.php @@ -2,6 +2,7 @@ namespace App\Models; use App\Models\Requestable; +use App\Models\SnipeModel; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Watson\Validating\ValidatingTrait; @@ -12,7 +13,7 @@ use Watson\Validating\ValidatingTrait; * * @version v1.0 */ -class AssetModel extends Model +class AssetModel extends SnipeModel { use SoftDeletes; use Requestable; @@ -22,7 +23,7 @@ class AssetModel extends Model // Declare the rules for the model validation protected $rules = array( 'name' => 'required|min:1|max:255', - 'modelno' => 'min:1|max:255', + 'model_number' => 'min:1|max:255', 'category_id' => 'required|integer', 'manufacturer_id' => 'required|integer', 'eol' => 'integer:min:0|max:240', @@ -92,8 +93,8 @@ class AssetModel extends Model public function displayModelName() { $name = $this->manufacturer->name.' '.$this->name; - if ($this->modelno) { - $name .=" / ".$this->modelno; + if ($this->model_number) { + $name .=" / ".$this->model_number; } return $name; } @@ -161,7 +162,7 @@ class AssetModel extends Model { return $query->where('name', 'LIKE', "%$search%") - ->orWhere('modelno', 'LIKE', "%$search%") + ->orWhere('model_number', 'LIKE', "%$search%") ->orWhere(function ($query) use ($search) { $query->whereHas('depreciation', function ($query) use ($search) { $query->where('name', 'LIKE', '%'.$search.'%'); diff --git a/app/Models/Category.php b/app/Models/Category.php index 9354833f7..52ffe2a27 100755 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -1,10 +1,11 @@ 'required|min:3|max:255', - 'total_qty' => 'required|integer|min:1', + 'qty' => 'required|integer|min:1', 'category_id' => 'required|integer', 'company_id' => 'integer', 'purchase_date' => 'date', @@ -100,7 +101,7 @@ class Component extends Model } - $total = $this->total_qty; + $total = $this->qty; $remaining = $total - $checkedout; return $remaining; } @@ -141,7 +142,7 @@ class Component extends Model }); })->orWhere('components.name', 'LIKE', '%'.$search.'%') ->orWhere('components.order_number', 'LIKE', '%'.$search.'%') - ->orWhere('components.serial_number', 'LIKE', '%'.$search.'%') + ->orWhere('components.serial', 'LIKE', '%'.$search.'%') ->orWhere('components.purchase_cost', 'LIKE', '%'.$search.'%') ->orWhere('components.purchase_date', 'LIKE', '%'.$search.'%'); } diff --git a/app/Models/Consumable.php b/app/Models/Consumable.php index a94f8f416..e65e89cb9 100644 --- a/app/Models/Consumable.php +++ b/app/Models/Consumable.php @@ -7,12 +7,13 @@ use App\Models\Company; use App\Models\ConsumableAssignment; use App\Models\Location; use App\Models\Loggable; +use App\Models\SnipeModel; use App\Models\User; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Watson\Validating\ValidatingTrait; -class Consumable extends Model +class Consumable extends SnipeModel { use CompanyableTrait; use Loggable; diff --git a/app/Models/Depreciable.php b/app/Models/Depreciable.php index d5e367047..ee12a6506 100644 --- a/app/Models/Depreciable.php +++ b/app/Models/Depreciable.php @@ -1,10 +1,11 @@ 'required|min:3|max:255|unique_undeleted', 'city' => 'min:3|max:255', - 'state' => 'min:2|max:32', - 'country' => 'min:2|max:2|max:2', + 'state' => 'min:0|max:2', + 'country' => 'min:2|max:2', 'address' => 'min:5|max:80', 'address2' => 'min:2|max:80', 'zip' => 'min:3|max:10', diff --git a/app/Models/Manufacturer.php b/app/Models/Manufacturer.php index c5d5b8e04..27919726a 100755 --- a/app/Models/Manufacturer.php +++ b/app/Models/Manufacturer.php @@ -1,11 +1,12 @@ name; + } +} diff --git a/app/Models/Statuslabel.php b/app/Models/Statuslabel.php index e710608ee..20c67558d 100755 --- a/app/Models/Statuslabel.php +++ b/app/Models/Statuslabel.php @@ -1,12 +1,13 @@ 'required|min:3|max:255|unique_undeleted', - 'address' => 'min:3|max:255', - 'address2' => 'min:2|max:255', + 'address' => 'min:3|max:50', + 'address2' => 'min:2|max:50', 'city' => 'min:3|max:255', - 'state' => 'min:0|max:32', + 'state' => 'min:0|max:2', 'country' => 'min:0|max:2', 'fax' => 'min:7|max:20', 'phone' => 'min:7|max:20', - 'contact' => 'min:0|max:255', + 'contact' => 'min:0|max:100', 'notes' => 'min:0|max:255', 'email' => 'email|min:5|max:150', 'zip' => 'min:0|max:10', diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index d9bca2529..3715449be 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -64,6 +64,11 @@ class AppServiceProvider extends ServiceProvider } }); + + // Share common variables with all views. + view()->composer('*', function ($view) { + $view->with('snipeSettings', \App\Models\Setting::getSettings()); + }); } /** diff --git a/codeception.yml b/codeception.yml index 216cf7bcb..43d70c38f 100644 --- a/codeception.yml +++ b/codeception.yml @@ -12,13 +12,6 @@ settings: extensions: enabled: - Codeception\Extension\RunFailed -modules: - config: - Db: - dsn: '' - user: '' - password: '' - dump: tests/_data/dump.sql coverage: enabled: true include: diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index b8acc76e8..53eaef823 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -35,7 +35,7 @@ $factory->defineAs(App\Models\AssetModel::class, 'assetmodel', function (Faker\G 'name' => $faker->catchPhrase, 'manufacturer_id' => $faker->numberBetween(1,10), 'category_id' => $faker->numberBetween(1,9), - 'modelno' => $faker->numberBetween(1000000,50000000), + 'model_number' => $faker->numberBetween(1000000,50000000), 'eol' => 1, ]; }); @@ -95,7 +95,7 @@ $factory->defineAs(App\Models\Component::class, 'component', function (Faker\Gen return [ 'name' => $faker->text(20), 'category_id' => $faker->numberBetween(21,25), - 'total_qty' => $faker->numberBetween(3, 10), + 'qty' => $faker->numberBetween(3, 10), 'min_amt' => $faker->numberBetween($min = 1, $max = 2), 'company_id' => \App\Models\Company::inRandomOrder()->first()->id ]; @@ -332,7 +332,7 @@ $factory->defineAs(App\Models\Actionlog::class, 'consumable-checkout', function }); $factory->defineAs(App\Models\Actionlog::class, 'component-checkout', function (Faker\Generator $faker) { - $company = \App\Models\Company::has('users')->has('components')->inRandomOrder()->first(); + $company = \App\Models\Company::has('users')->has('components')->inRandomOrder()->first(); return [ 'user_id' => $company->users()->inRandomOrder()->first()->id, diff --git a/database/migrations/2016_10_16_015024_rename_modelno_to_model_number.php b/database/migrations/2016_10_16_015024_rename_modelno_to_model_number.php new file mode 100644 index 000000000..28a0c3dce --- /dev/null +++ b/database/migrations/2016_10_16_015024_rename_modelno_to_model_number.php @@ -0,0 +1,34 @@ +renameColumn('modelno', 'model_number'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('models', function (Blueprint $table) { + // + $table->renameColumn('model_number', 'modelno'); + + }); + } +} diff --git a/database/migrations/2016_10_16_015211_rename_consumable_modelno_to_model_number.php b/database/migrations/2016_10_16_015211_rename_consumable_modelno_to_model_number.php new file mode 100644 index 000000000..daf93c3ac --- /dev/null +++ b/database/migrations/2016_10_16_015211_rename_consumable_modelno_to_model_number.php @@ -0,0 +1,33 @@ +renameColumn('model_no', 'model_number'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('consumables', function (Blueprint $table) { + // + $table->renameColumn('model_number', 'model_no'); + }); + } +} diff --git a/database/migrations/2016_10_16_143235_rename_model_note_to_notes.php b/database/migrations/2016_10_16_143235_rename_model_note_to_notes.php new file mode 100644 index 000000000..7a7668b14 --- /dev/null +++ b/database/migrations/2016_10_16_143235_rename_model_note_to_notes.php @@ -0,0 +1,33 @@ +renameColumn('note', 'notes'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('models', function (Blueprint $table) { + // + $table->renameColumn('notes', 'note'); + }); + } +} diff --git a/database/migrations/2016_10_16_165052_rename_component_total_qty_to_qty.php b/database/migrations/2016_10_16_165052_rename_component_total_qty_to_qty.php new file mode 100644 index 000000000..1aba51ce9 --- /dev/null +++ b/database/migrations/2016_10_16_165052_rename_component_total_qty_to_qty.php @@ -0,0 +1,33 @@ +renameColumn('total_qty', 'qty'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('components', function (Blueprint $table) { + // + $table->renameColumn('qty', 'total_qty'); + }); + } +} diff --git a/database/migrations/2016_11_13_020954_rename_component_serial_number_to_serial.php b/database/migrations/2016_11_13_020954_rename_component_serial_number_to_serial.php new file mode 100644 index 000000000..b1cde650e --- /dev/null +++ b/database/migrations/2016_11_13_020954_rename_component_serial_number_to_serial.php @@ -0,0 +1,31 @@ +renameColumn('serial_number', 'serial'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('components', function ($table) { + $table->renameColumn('serial', 'serial_number'); + }); + } +} diff --git a/public/uploads/.gitkeep b/public/uploads/.gitkeep old mode 100644 new mode 100755 diff --git a/public/uploads/assets/.gitkeep b/public/uploads/assets/.gitkeep old mode 100644 new mode 100755 diff --git a/public/uploads/barcodes/.gitkeep b/public/uploads/barcodes/.gitkeep old mode 100644 new mode 100755 diff --git a/resources/lang/en/admin/accessories/general.php b/resources/lang/en/admin/accessories/general.php index f6ed2fe3a..22771aff0 100644 --- a/resources/lang/en/admin/accessories/general.php +++ b/resources/lang/en/admin/accessories/general.php @@ -5,18 +5,14 @@ return array( 'about_accessories_text' => 'Accessories are anything you issue to users but that do not have a serial number (or you do not care about tracking them uniquely). For example, computer mice or keyboards.', 'accessory_category' => 'Accessory Category', 'accessory_name' => 'Accessory Name', - 'cost' => 'Purchase Cost', 'checkout' => 'Checkout Accessory', 'checkin' => 'Checkin Accessory', 'create' => 'Create Accessory', - 'date' => 'Purchase Date', 'edit' => 'Edit Accessory', 'eula_text' => 'Category EULA', 'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.', 'require_acceptance' => 'Require users to confirm acceptance of assets in this category.', 'no_default_eula' => 'No primary default EULA found. Add one in Settings.', - 'order' => 'Order Number', - 'qty' => 'QTY', 'total' => 'Total', 'remaining' => 'Avail', 'update' => 'Update Accessory', diff --git a/resources/lang/en/admin/asset_maintenances/table.php b/resources/lang/en/admin/asset_maintenances/table.php index 49d5efa0f..f3a6be60f 100644 --- a/resources/lang/en/admin/asset_maintenances/table.php +++ b/resources/lang/en/admin/asset_maintenances/table.php @@ -3,7 +3,6 @@ return [ 'title' => 'Asset Maintenance', 'asset_name' => 'Asset Name', - 'supplier_name' => 'Supplier Name', 'is_warranty' => 'Warranty', 'dl_csv' => 'Download CSV' ]; diff --git a/resources/lang/en/admin/categories/general.php b/resources/lang/en/admin/categories/general.php index 58967eda6..2a00f82a6 100644 --- a/resources/lang/en/admin/categories/general.php +++ b/resources/lang/en/admin/categories/general.php @@ -1,8 +1,8 @@ 'About Asset Categories', - 'about_categories' => 'Asset categories help you organize your assets. Some example categories might be "Desktops", "Laptops", "Mobile Phones", "Tablets", and so on, but you can use asset categories any way that makes sense for you.', + 'about_categories_title' => 'About Categories', + 'about_categories' => 'Categories help you organize your items. Some example categories might be "Desktops", "Laptops", "Mobile Phones", "Tablets", and so on, but you can use categories any way that makes sense for you.', 'asset_categories' => 'Asset Categories', 'category_name' => 'Category Name', 'checkin_email' => 'Send email to user on checkin.', diff --git a/resources/lang/en/admin/companies/general.php b/resources/lang/en/admin/companies/general.php index 9d58ccb58..9a4796897 100644 --- a/resources/lang/en/admin/companies/general.php +++ b/resources/lang/en/admin/companies/general.php @@ -1,4 +1,6 @@ 'About Companies', + 'about_companies_text' => 'Companies can be used as a simple identifier field, or can be used to limit visibility of assets, users, etc if full company support is enabled in your Admin settings.', 'select_company' => 'Select Company', ]; diff --git a/resources/lang/en/admin/consumables/general.php b/resources/lang/en/admin/consumables/general.php index 89656e4df..53a69f8c0 100644 --- a/resources/lang/en/admin/consumables/general.php +++ b/resources/lang/en/admin/consumables/general.php @@ -5,11 +5,8 @@ return array( 'about_consumables_text' => 'Consumables are anything purchased that will be used up over time. For example, printer ink or copier paper.', 'checkout' => 'Checkout Consumable to User', 'consumable_name' => 'Consumable Name', - 'cost' => 'Purchase Cost', 'create' => 'Create Consumable', - 'date' => 'Purchase Date', 'item_no' => 'Item No.', - 'order' => 'Order Number', 'remaining' => 'Remaining', 'total' => 'Total', 'update' => 'Update Consumable', diff --git a/resources/lang/en/admin/depreciations/general.php b/resources/lang/en/admin/depreciations/general.php index d5796ff9f..1fca0e2cb 100644 --- a/resources/lang/en/admin/depreciations/general.php +++ b/resources/lang/en/admin/depreciations/general.php @@ -4,9 +4,9 @@ return array( 'about_asset_depreciations' => 'About Asset Depreciations', 'about_depreciations' => 'You can set up asset depreciations to depreciate assets based on straight-line depreciation.', 'asset_depreciations' => 'Asset Depreciations', - 'create_depreciation' => 'Create Depreciation', + 'create' => 'Create Depreciation', 'depreciation_name' => 'Depreciation Name', 'number_of_months' => 'Number of Months', - 'update_depreciation' => 'Update Depreciation', + 'update' => 'Update Depreciation', ); diff --git a/resources/lang/en/admin/groups/titles.php b/resources/lang/en/admin/groups/titles.php index 12c333a66..99e8cc1f6 100644 --- a/resources/lang/en/admin/groups/titles.php +++ b/resources/lang/en/admin/groups/titles.php @@ -1,10 +1,11 @@ 'About Groups', + 'about_groups' => 'Groups are used to generalize user permissions.', 'group_management' => 'Group Management', - 'create_group' => 'Create New Group', - 'edit_group' => 'Edit Group', + 'create' => 'Create New Group', + 'update' => 'Edit Group', 'group_name' => 'Group Name', 'group_admin' => 'Group Admin', 'allow' => 'Allow', diff --git a/resources/lang/en/admin/hardware/form.php b/resources/lang/en/admin/hardware/form.php index 4428e8f22..abded281f 100644 --- a/resources/lang/en/admin/hardware/form.php +++ b/resources/lang/en/admin/hardware/form.php @@ -15,7 +15,6 @@ return array( 'create' => 'Create Asset', 'date' => 'Purchase Date', 'depreciates_on' => 'Depreciates On', - 'depreciation' => 'Depreciation', 'default_location' => 'Default Location', 'eol_date' => 'EOL Date', 'eol_rate' => 'EOL Rate', @@ -35,7 +34,6 @@ return array( 'select_statustype' => 'Select Status Type', 'serial' => 'Serial', 'status' => 'Status', - 'supplier' => 'Supplier', 'tag' => 'Asset Tag', 'update' => 'Asset Update', 'warranty' => 'Warranty', diff --git a/resources/lang/en/admin/hardware/general.php b/resources/lang/en/admin/hardware/general.php index 6674ea0c9..f7644eb73 100644 --- a/resources/lang/en/admin/hardware/general.php +++ b/resources/lang/en/admin/hardware/general.php @@ -1,6 +1,8 @@ 'About Assets', + 'about_assets_text' => 'Assets are items tracked by serial number or asset tag. They tend to be higher value items where identifying a specific item matters.', 'archived' => 'Archived', 'asset' => 'Asset', 'bulk_checkout' => 'Checkout Assets to User', diff --git a/resources/lang/en/admin/licenses/form.php b/resources/lang/en/admin/licenses/form.php index 2e97ae2ad..ce2916787 100644 --- a/resources/lang/en/admin/licenses/form.php +++ b/resources/lang/en/admin/licenses/form.php @@ -4,23 +4,16 @@ return array( 'asset' => 'Asset', 'checkin' => 'Checkin', - 'cost' => 'Purchase Cost', 'create' => 'Create License', - 'date' => 'Purchase Date', - 'depreciation' => 'Depreciation', 'expiration' => 'Expiration Date', 'license_key' => 'Product Key', 'maintained' => 'Maintained', 'name' => 'Software Name', 'no_depreciation' => 'Do Not Depreciate', - 'notes' => 'Notes', - 'order' => 'Order No.', 'purchase_order' => 'Purchase Order Number', 'reassignable' => 'Reassignable', 'remaining_seats' => 'Remaining Seats', 'seats' => 'Seats', - 'serial' => 'Serial', - 'supplier' => 'Supplier', 'termination_date' => 'Termination Date', 'to_email' => 'Licensed to Email', 'to_name' => 'Licensed to Name', diff --git a/resources/lang/en/admin/licenses/general.php b/resources/lang/en/admin/licenses/general.php index 808d75a34..25a536ec5 100644 --- a/resources/lang/en/admin/licenses/general.php +++ b/resources/lang/en/admin/licenses/general.php @@ -1,7 +1,8 @@ 'About Licenses', + 'about_licenses' => 'Licenses are used to track software. They have a specified number of seats that can be checked out to individuals', 'checkin' => 'Checkin License Seat', 'checkout_history' => 'Checkout History', 'checkout' => 'Checkout License Seat', diff --git a/resources/lang/en/admin/locations/table.php b/resources/lang/en/admin/locations/table.php index 8360ef19b..e171d4dd4 100644 --- a/resources/lang/en/admin/locations/table.php +++ b/resources/lang/en/admin/locations/table.php @@ -1,18 +1,20 @@ 'Assets', // This has NEVER meant Assets Retired. I don't know how it keeps getting reverted. - 'assets_checkedout' => 'Assets Assigned', - 'id' => 'ID', - 'city' => 'City', - 'state' => 'State', - 'country' => 'Country', - 'create' => 'Create Location', - 'update' => 'Update Location', - 'name' => 'Location Name', - 'address' => 'Address', - 'zip' => 'Postal Code', - 'locations' => 'Locations', - 'parent' => 'Parent', - 'currency' => 'Location Currency', -); + 'about_locations_title' => 'About Locations', + 'about_locations' => 'Locations are used to track location information for users, assets, and other items', + 'assets_rtd' => 'Assets', // This has NEVER meant Assets Retired. I don't know how it keeps getting reverted. + 'assets_checkedout' => 'Assets Assigned', + 'id' => 'ID', + 'city' => 'City', + 'state' => 'State', + 'country' => 'Country', + 'create' => 'Create Location', + 'update' => 'Update Location', + 'name' => 'Location Name', + 'address' => 'Address', + 'zip' => 'Postal Code', + 'locations' => 'Locations', + 'parent' => 'Parent', + 'currency' => 'Location Currency', + ); diff --git a/resources/lang/en/admin/manufacturers/table.php b/resources/lang/en/admin/manufacturers/table.php index 1861ee7c5..f66320fe8 100644 --- a/resources/lang/en/admin/manufacturers/table.php +++ b/resources/lang/en/admin/manufacturers/table.php @@ -1,7 +1,8 @@ 'About manufacturers', + 'about_manufacturers_text' => 'Manufacturers make all the magic items we consume.', 'asset_manufacturers' => 'Asset Manufacturers', 'create' => 'Create Manufacturer', 'id' => 'ID', diff --git a/resources/lang/en/admin/models/general.php b/resources/lang/en/admin/models/general.php index 08677c553..e0da09f78 100644 --- a/resources/lang/en/admin/models/general.php +++ b/resources/lang/en/admin/models/general.php @@ -1,7 +1,8 @@ 'About Asset Models', + 'about_models_text' => 'Asset Models are a way to group identical assets. "MBP 2013", "IPhone 6s", etc.', 'deleted' => 'This model has been deleted. Click here to restore it.', 'restore' => 'Restore Model', 'requestable' => 'Users may request this model', diff --git a/resources/lang/en/admin/suppliers/table.php b/resources/lang/en/admin/suppliers/table.php index 88adfc692..2a7b07ca9 100644 --- a/resources/lang/en/admin/suppliers/table.php +++ b/resources/lang/en/admin/suppliers/table.php @@ -1,6 +1,8 @@ 'About Suppliers', + 'about_suppliers_text' => 'Suppliers are used to track the source of items', 'address' => 'Supplier Address', 'assets' => 'Assets', 'city' => 'City', diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 5aaa8359e..170f6fa46 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -113,6 +113,7 @@ 'no_results' => 'No Results.', 'no' => 'No', 'notes' => 'Notes', + 'order_number' => 'Order Number', 'page_menu' => 'Showing _MENU_ items', 'pagination_info' => 'Showing _START_ to _END_ of _TOTAL_ items', 'pending' => 'Pending', @@ -121,6 +122,8 @@ 'previous' => 'Previous', 'processing' => 'Processing', 'profile' => 'Your profile', + 'purchase_cost' => 'Purchase Cost', + 'purchase_date' => 'Purchase Date', 'qty' => 'QTY', 'quantity' => 'Quantity', 'ready_to_deploy' => 'Ready to Deploy', @@ -151,6 +154,7 @@ 'state' => 'State', 'status_labels' => 'Status Labels', 'status' => 'Status', + 'supplier' => 'Supplier', 'suppliers' => 'Suppliers', 'submit' => 'Submit', 'total_assets' => 'total assets', diff --git a/resources/views/accessories/edit.blade.php b/resources/views/accessories/edit.blade.php index 38a382444..55ee7c013 100755 --- a/resources/views/accessories/edit.blade.php +++ b/resources/views/accessories/edit.blade.php @@ -1,211 +1,23 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($accessory->id) - {{ trans('admin/accessories/general.update') }} - @else - {{ trans('admin/accessories/general.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} - - - -@stop +@extends('layouts/edit-form', [ + 'createText' => trans('admin/accessories/general.create') , + 'updateText' => trans('admin/accessories/general.update'), + 'helpTitle' => trans('admin/accessories/general.about_accessories_title'), + 'helpText' => trans('admin/accessories/general.about_accessories_text') +]) {{-- Page content --}} -@section('content') +@section('inputFields') - -
-
- -
- -
- -

- @if ($accessory->id) - {{ $accessory->name }} - @endif -

-
- -
-
- - - - - -
- - - - -
-
- @if (\App\Models\Company::isCurrentUserAuthorized()) - -
-
- {{ Form::label('company_id', trans('general.company')) }} -
-
- {{ Form::select('company_id', $company_list , Input::old('company_id', $accessory->company_id), array('class'=>'select2', 'style'=>'width:100%')) }} - {!! $errors->first('company_id', '
:message') !!} -
-
- @endif - - -
-
- {{ Form::label('name', trans('admin/accessories/general.accessory_name')) }} -
-
- - {!! $errors->first('name', ' :message') !!} -
-
- - -
-
- {{ Form::label('category_id', trans('admin/accessories/general.accessory_category')) }} -
-
- {{ Form::select('category_id', $category_list , Input::old('category_id', $accessory->category_id), array('class'=>'select2', 'style'=>'width:100%')) }} - {!! $errors->first('category_id', '
:message') !!} -
-
- - -
-
- {{ Form::label('manufacturer_id', trans('general.manufacturer')) }} -
- -
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $accessory->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('manufacturer_id', '
:message
') !!} -
-
- - -
-
- {{ Form::label('location_id', trans('general.location')) }} -
-
- {{ Form::select('location_id', $location_list , Input::old('location_id', $accessory->location_id), array('class'=>'select2', 'style'=>'width:100%')) }} - - {!! $errors->first('location_id', '
:message') !!} -
-
- - -
-
- {{ Form::label('order_number', trans('admin/accessories/general.order')) }} -
-
- - {!! $errors->first('order_number', ' :message') !!} -
-
- - - -
-
- {{ Form::label('purchase_date', trans('admin/accessories/general.date')) }} -
-
- - - {!! $errors->first('purchase_date', ' :message') !!} -
-
- - -
-
- {{ Form::label('purchase_cost', trans('admin/accessories/general.cost')) }} -
-
-
- - {{ \App\Models\Setting::first()->default_currency }} - - - {!! $errors->first('purchase_cost', ' :message') !!} -
-
-
- - -
-
- {{ Form::label('qty', trans('admin/accessories/general.qty')) }} -
-
-
- -
-
- {!! $errors->first('qty', ' :message') !!} -
-
-
- - - -
-
- {{ Form::label('min_amt', trans('general.min_amt')) }} -
-
-
- -
-
- -
-
- {!! $errors->first('min_amt', ' :message') !!} -
-
-
- - -
- - -
-
- - - - -
-
- - -
- × -

- {{ trans('admin/accessories/general.about_accessories_title') }} -

-

{{ trans('admin/accessories/general.about_accessories_text') }}

-
+@include ('partials.forms.edit.company') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')]) +@include ('partials.forms.edit.category') +@include ('partials.forms.edit.manufacturer') +@include ('partials.forms.edit.location') +@include ('partials.forms.edit.order_number') +@include ('partials.forms.edit.purchase_date') +@include ('partials.forms.edit.purchase_cost') +@include ('partials.forms.edit.quantity') +@include ('partials.forms.edit.minimum_quantity') @stop diff --git a/resources/views/accessories/index.blade.php b/resources/views/accessories/index.blade.php index 1ad97dfdd..1786f6a6f 100755 --- a/resources/views/accessories/index.blade.php +++ b/resources/views/accessories/index.blade.php @@ -24,7 +24,7 @@
{{ trans('general.manufacturer') }} - - - + + + @@ -54,48 +54,7 @@ @section('moar_scripts') - - - - - - - +@include ('partials.bootstrap-table', ['exportFile' => 'accessories-export', 'search' => true]) @stop diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 1f742d295..82f87b6b6 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -46,7 +46,7 @@
{{ trans('general.location') }} {{ trans('admin/accessories/general.total') }}{{ trans('admin/accessories/general.date') }}{{ trans('admin/accessories/general.cost') }}{{ trans('admin/accessories/general.order') }}{{ trans('general.purchase_date') }}{{ trans('general.purchase_cost') }}{{ trans('general.order_number') }} {{ trans('general.min_amt') }} {{ trans('admin/accessories/general.remaining') }} {{ trans('table.actions') }}
@section('moar_scripts') - - - - - - - +@include ('partials.bootstrap-table', ['exportFile' => 'accessory' . $accessory->name . '-export', 'search' => false]) @stop @stop diff --git a/resources/views/account/accept-asset.blade.php b/resources/views/account/accept-asset.blade.php index 787544546..6b9559ad5 100644 --- a/resources/views/account/accept-asset.blade.php +++ b/resources/views/account/accept-asset.blade.php @@ -64,7 +64,7 @@ @endif - @if (\App\Models\Setting::getSettings()->require_accept_signature=='1') + @if ($snipeSettings->require_accept_signature=='1')

Sign below to indicate that you agree to the terms of service:

diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index 06e66b3d3..29e139bb1 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -103,7 +103,7 @@ - @if (\App\Models\Setting::getSettings()->two_factor_enabled=='1') + @if ($snipeSettings->two_factor_enabled=='1')
diff --git a/resources/views/account/requestable-assets.blade.php b/resources/views/account/requestable-assets.blade.php index 483cadb1c..6236b21c3 100644 --- a/resources/views/account/requestable-assets.blade.php +++ b/resources/views/account/requestable-assets.blade.php @@ -35,8 +35,8 @@
- @if (\App\Models\Setting::getSettings()->display_asset_name) - + @if ($snipeSettings->display_asset_name) + @endif @@ -53,20 +53,18 @@ {{ csrf_field() }} - @if (\App\Models\Setting::getSettings()->display_asset_name) - + @if ($snipeSettings->display_asset_name) + @endif @if ($asset->assigned_to != '' && $asset->assigned_to > 0) diff --git a/resources/views/asset_maintenances/edit.blade.php b/resources/views/asset_maintenances/edit.blade.php index ea7b5a1ac..4272f21a0 100644 --- a/resources/views/asset_maintenances/edit.blade.php +++ b/resources/views/asset_maintenances/edit.blade.php @@ -53,25 +53,10 @@ - -
- -
- {{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $assetMaintenance->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px']) }} - {!! $errors->first('supplier_id', ' :message') !!} -
-
+ @include ('partials.forms.edit.supplier') + @include ('partials.forms.edit.maintenance_type') + - -
- -
- {{ Form::select('asset_maintenance_type', $assetMaintenanceType , Input::old('asset_maintenance_type', $assetMaintenance->asset_maintenance_type), ['class'=>'select2', 'style'=>'min-width:350px']) }} - {!! $errors->first('asset_maintenance_type', ' :message') !!} -
-
@@ -121,7 +106,7 @@
- {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {!! $errors->first('cost', ' :message') !!}
diff --git a/resources/views/asset_maintenances/index.blade.php b/resources/views/asset_maintenances/index.blade.php index 5eaf45608..b0052c62d 100644 --- a/resources/views/asset_maintenances/index.blade.php +++ b/resources/views/asset_maintenances/index.blade.php @@ -26,7 +26,7 @@
{{ trans('admin/hardware/table.asset_model') }}{{ trans('admin/hardware/form.name') }}{{ trans('admin/hardware/form.name') }}{{ trans('admin/hardware/table.serial') }} {{ trans('admin/hardware/table.location') }}{{ $asset->model->name }}{{ $asset->name }}{{ $asset->name }}{{ $asset->serial }} @if ($asset->assigneduser && $asset->assetloc) - {{ $asset->assetloc->name }} + {{ $asset->assetloc->name }} @elseif ($asset->defaultLoc) - {{ $asset->defaultLoc->name }} - + {{ $asset->defaultLoc->name }} @endif - Checked out
- - - - - - +@include ('partials.bootstrap-table', ['exportFile' => 'maintenances-export']) @stop diff --git a/resources/views/categories/edit.blade.php b/resources/views/categories/edit.blade.php index 3866c617f..a4187de7a 100755 --- a/resources/views/categories/edit.blade.php +++ b/resources/views/categories/edit.blade.php @@ -1,148 +1,86 @@ -@extends('layouts/default') +@extends('layouts/edit-form', [ + 'createText' => trans('admin/categories/general.create') , + 'updateText' => trans('admin/categories/general.update'), + 'helpTitle' => trans('admin/categories/general.about_categories_title'), + 'helpText' => trans('admin/categories/general.about_categories') +]) -{{-- Page title --}} -@section('title') - @if ($category->id) - {{ trans('admin/categories/general.update') }} - @else - {{ trans('admin/categories/general.create') }} - @endif -@parent -@stop +@section('inputFields') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.category_name')]) -@section('header_right') - - {{ trans('general.back') }} -@stop + +
+ +
+ {{ Form::select('category_type', $category_types , Input::old('category_type', $item->category_type), array('class'=>'select2', 'style'=>'min-width:350px', $item->itemCount() > 0 ? 'disabled' : '')) }} + {!! $errors->first('category_type', ' :message') !!} +
+
-{{-- Page content --}} -@section('content') - -
-
- -
-
- @if ($category->id) -
-

{{ $category->name }}

-
- @endif - -
-
-
- - - - -
-
- {{ Form::label('name', trans('admin/categories/general.category_name')) }} - -
-
- - {!! $errors->first('name', ' :message') !!} -
-
- - -
-
- {{ Form::label('category_type', trans('general.type')) }} -
-
- {{ Form::select('category_type', $category_types , Input::old('category_type', $category->category_type), array('class'=>'select2', 'style'=>'min-width:350px', $category->itemCount() > 0 ? 'disabled' : '')) }} - {!! $errors->first('category_type', ' :message') !!} -
-
- - -
-
- {{ Form::label('eula_text', trans('admin/categories/general.eula_text')) }} -
-
- {{ Form::textarea('eula_text', Input::old('eula_text', $category->eula_text), array('class' => 'form-control')) }} + +
+ +
+ {{ Form::textarea('eula_text', Input::old('eula_text', $item->eula_text), array('class' => 'form-control')) }}

{!! trans('admin/categories/general.eula_text_help') !!}

{!! trans('admin/settings/general.eula_markdown') !!}

{!! $errors->first('eula_text', ':message') !!} -
-
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
- -
- - - - -
-

{{ trans('admin/categories/general.about_asset_categories') }}

-

{{ trans('admin/categories/general.about_categories') }}

-
-
-@if (\App\Models\Setting::getSettings()->default_eula_text!='') + +
+ +
+ + +
+ +
+ + +
+ +
+@stop + +@section('content') +@parent +@if ($snipeSettings->default_eula_text!='')
+@stop @section('moar_scripts') - - - - - - - -@stop -@stop diff --git a/resources/views/categories/view.blade.php b/resources/views/categories/view.blade.php index 07e895d55..a0011dae1 100644 --- a/resources/views/categories/view.blade.php +++ b/resources/views/categories/view.blade.php @@ -32,6 +32,7 @@
- +@stop + @section('moar_scripts') - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'category-' . $category->name . '-export', 'search' => false]) @stop diff --git a/resources/views/companies/edit.blade.php b/resources/views/companies/edit.blade.php index dbc8cae55..32dd7eea2 100644 --- a/resources/views/companies/edit.blade.php +++ b/resources/views/companies/edit.blade.php @@ -1,74 +1,11 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($company->id) - {{ trans('admin/companies/table.update') }} - @else - {{ trans('admin/companies/table.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/companies/table.create') , + 'updateText' => trans('admin/companies/table.update'), + 'helpTitle' => trans('admin/companies/general.about_companies_title'), + 'helpText' => trans('admin/companies/general.about_companies_text') +]) {{-- Page content --}} -@section('content') - - -
-
- - - - - - - -
- @if ($company->id) -
-

{{ $company->name }}

-
- @endif - -
- - -
- - -
- - {!! $errors->first('name', ' :message') !!} -
-
- - -
- - - -
- - -
- -
- -

About Companies

-

- Companies can be used as a simple identifier field, or can be used to limit visibility of assets, users, etc if full company support is enabled in your Admin settings. -

-
-
- - +@section('inputFields') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/companies/table.name')]) @stop diff --git a/resources/views/companies/index.blade.php b/resources/views/companies/index.blade.php index f440c9c5e..76529b630 100644 --- a/resources/views/companies/index.blade.php +++ b/resources/views/companies/index.blade.php @@ -20,7 +20,7 @@
-
+
diff --git a/resources/views/components/edit.blade.php b/resources/views/components/edit.blade.php index 93db1ee19..b2720d13c 100644 --- a/resources/views/components/edit.blade.php +++ b/resources/views/components/edit.blade.php @@ -1,198 +1,22 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($component->id) - {{ trans('admin/components/general.update') }} - @else - {{ trans('admin/components/general.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/components/general.create') , + 'updateText' => trans('admin/components/general.update'), + 'helpTitle' => trans('admin/components/general.about_components_title'), + 'helpText' => trans('admin/components/general.about_components_text') +]) {{-- Page content --}} -@section('content') - - -
-
- - - -
- - - -
-
-

- @if ($component->id) - {{ $component->name }} - @endif -

-
- -
-
- -
- - - -
- - {{ Form::label('name', trans('admin/components/table.title'), array('class' => 'col-md-3 control-label')) }} - -
- - {!! $errors->first('name', ' :message') !!} -
-
- - -
- - {{ Form::label('category_id', trans('general.category'), array('class' => 'col-md-3 control-label')) }} - -
- {{ Form::select('category_id', $category_list , Input::old('category_id', $component->category_id), array('class'=>'select2', 'style'=>'width:100%')) }} - {!! $errors->first('category_id', ' :message') !!} -
-
- - -
- - {{ Form::label('total_qty', trans('general.quantity'), array('class' => 'col-md-3 control-label')) }} - -
- - -
- {!! $errors->first('total_qty', '
:message
') !!} -
- - -
- - {{ Form::label('min_amt', trans('general.min_amt'), array('class' => 'col-md-3 control-label')) }} - -
- -
-
- -
-
- {!! $errors->first('min_amt', ' :message') !!} -
- - -
- - -
- - {{ Form::label('name', trans('admin/hardware/form.serial'), array('class' => 'col-md-3 control-label')) }} - -
- - {!! $errors->first('serial_number', ' :message') !!} -
-
- - - - @if (\App\Models\Company::isCurrentUserAuthorized()) -
- - {{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label')) }} - -
- {{ Form::select('company_id', $company_list , Input::old('company_id', $component->company_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('company_id', ' :message') !!} -
-
- @endif - - -
- - {{ Form::label('location_id', trans('general.location'), array('class' => 'col-md-3 control-label')) }} - -
- {{ Form::select('location_id', $location_list , Input::old('location_id', $component->location_id), array('class'=>'select2', 'style'=>'width:350px')) }} - - {!! $errors->first('location_id', ' :message') !!} -
-
- - - -
- - {{ Form::label('order_number', trans('admin/components/general.order'), array('class' => 'col-md-3 control-label')) }} - -
- - {!! $errors->first('order_number', ' :message') !!} -
-
- - -
- - {{ Form::label('purchase_date', trans('admin/components/general.date'), array('class' => 'col-md-3 control-label')) }} - -
- - - {!! $errors->first('purchase_date', ' :message') !!} -
-
- - -
- - {{ Form::label('purchase_cost', trans('admin/components/general.cost'), array('class' => 'col-md-3 control-label')) }} - -
-
- - {{ \App\Models\Setting::first()->default_currency }} - - - {!! $errors->first('purchase_cost', ' :message') !!} -
-
-
- - - -
- -
- -
-
- - -
- × -

- {{ trans('admin/components/general.about_components_title') }} -

-

{{ trans('admin/components/general.about_components_text') }}

-
- +@section('inputFields') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/components/table.title')]) +@include ('partials.forms.edit.category') +@include ('partials.forms.edit.quantity') +@include ('partials.forms.edit.minimum_quantity') +@include ('partials.forms.edit.serial') +@include ('partials.forms.edit.company') +@include ('partials.forms.edit.location') +@include ('partials.forms.edit.order_number') +@include ('partials.forms.edit.purchase_date') +@include ('partials.forms.edit.purchase_cost') @stop diff --git a/resources/views/components/index.blade.php b/resources/views/components/index.blade.php index aa1e161a4..71b031dd5 100644 --- a/resources/views/components/index.blade.php +++ b/resources/views/components/index.blade.php @@ -40,7 +40,7 @@
{{ trans('general.id') }}
+@stop @section('moar_scripts') - - - - - - - +@include ('partials.bootstrap-table', ['exportFile' => 'components-export', 'search' => true]) @stop - -@stop diff --git a/resources/views/components/view.blade.php b/resources/views/components/view.blade.php index 2b432eeca..7463d407b 100644 --- a/resources/views/components/view.blade.php +++ b/resources/views/components/view.blade.php @@ -49,7 +49,7 @@
- @if ($component->serial_number!='') + @if ($component->serial!='')
{{ trans('admin/hardware/form.serial') }}: - {{ $component->serial_number }}
+ {{ $component->serial }}
@endif @if ($component->purchase_date) @@ -87,7 +87,7 @@ @if ($component->purchase_cost)
{{ trans('admin/components/general.cost') }}: - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {{ \App\Helpers\Helper::formatCurrencyOutput($component->purchase_cost) }}
@endif @@ -100,45 +100,8 @@ +@stop + @section('moar_scripts') - - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'component' . $component->name . '-export', 'search' => false]) @stop diff --git a/resources/views/consumables/edit.blade.php b/resources/views/consumables/edit.blade.php index 2cf1ec654..e9670ec95 100644 --- a/resources/views/consumables/edit.blade.php +++ b/resources/views/consumables/edit.blade.php @@ -1,221 +1,23 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($consumable->id) - {{ trans('admin/consumables/general.update') }} - @else - {{ trans('admin/consumables/general.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/consumables/general.create') , + 'updateText' => trans('admin/consumables/general.update'), + 'helpTitle' => trans('admin/consumables/general.about_consumables_title'), + 'helpText' => trans('admin/consumables/general.about_consumables_text') +]) {{-- Page content --}} -@section('content') - - -
-
- - - - - - - -
-
-

- @if ($consumable->id) - {{ $consumable->name }} - @endif -

-
- -
-
- -
- - @if (\App\Models\Company::isCurrentUserAuthorized()) -
-
- {{ Form::label('company_id', trans('general.company')) }} -
-
- {{ Form::select('company_id', $company_list , Input::old('company_id', $consumable->company_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('company_id', ' :message') !!} -
-
- @endif - - -
-
- {{ Form::label('name', trans('admin/consumables/table.title')) }} - -
-
- - {!! $errors->first('name', ' :message') !!} -
-
- - -
-
- {{ Form::label('category_id', trans('general.category')) }} - -
-
- {{ Form::select('category_id', $category_list , Input::old('category_id', $consumable->category_id), array('class'=>'select2', 'style'=>'width:100%')) }} - {!! $errors->first('category_id', ' :message') !!} -
-
- - -
-
- {{ Form::label('manufacturer_id', trans('general.manufacturer')) }} - -
-
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $consumable->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%')) }} - {!! $errors->first('manufacturer_id', ' :message') !!} -
-
- - -
-
- {{ Form::label('location_id', trans('general.location')) }} -
-
- {{ Form::select('location_id', $location_list , Input::old('location_id', $consumable->location_id), array('class'=>'select2', 'style'=>'width:350px')) }} - - {!! $errors->first('location_id', ' :message') !!} -
-
- - -
-
- {{ Form::label('model_no', trans('general.model_no')) }} -
-
- - {!! $errors->first('model_no', ' :message') !!} -
-
- - -
-
- {{ Form::label('item_no', trans('admin/consumables/general.item_no')) }} -
-
- - {!! $errors->first('item_no', ' :message') !!} -
-
- - - -
-
- {{ Form::label('order_number', trans('admin/consumables/general.order')) }} -
-
- - {!! $errors->first('order_number', ' :message') !!} -
-
- - -
-
- {{ Form::label('purchase_date', trans('admin/consumables/general.date')) }} -
-
- - - {!! $errors->first('purchase_date', ' :message') !!} -
-
- - -
-
- {{ Form::label('purchase_cost', trans('admin/consumables/general.cost')) }} -
-
-
- - {{ \App\Models\Setting::first()->default_currency }} - - - {!! $errors->first('purchase_cost', ' :message') !!} -
-
-
- - -
-
- {{ Form::label('qty', trans('general.quantity')) }} -
-
-
- -
- {!! $errors->first('qty', ' :message') !!} -
-
- - - -
-
- {{ Form::label('min_amt', trans('general.min_amt')) }} -
-
-
- -
-
- -
-
- {!! $errors->first('min_amt', ' :message') !!} -
-
-
- - - -
- -
- -
- - - -
- × -

- {{ trans('admin/consumables/general.about_consumables_title') }} -

-

{{ trans('admin/consumables/general.about_consumables_text') }}

-
+@section('inputFields') +@include ('partials.forms.edit.company') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')]) +@include ('partials.forms.edit.category') +@include ('partials.forms.edit.manufacturer') +@include ('partials.forms.edit.location') +@include ('partials.forms.edit.model_number') +@include ('partials.forms.edit.item_number') +@include ('partials.forms.edit.order_number') +@include ('partials.forms.edit.purchase_date') +@include ('partials.forms.edit.purchase_cost') +@include ('partials.forms.edit.quantity') +@include ('partials.forms.edit.minimum_quantity') @stop diff --git a/resources/views/consumables/index.blade.php b/resources/views/consumables/index.blade.php index 6d083acd9..0a164ca1d 100644 --- a/resources/views/consumables/index.blade.php +++ b/resources/views/consumables/index.blade.php @@ -23,7 +23,7 @@
{{ trans('admin/consumables/general.remaining') }} - + - - - + + + @@ -58,48 +58,8 @@ @section('moar_scripts') - - - - - - - @stop diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index afc2a3fea..6eca524cc 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -36,7 +36,7 @@
{{ trans('general.min_amt') }} {{ trans('general.manufacturer') }}{{ trans('general.model_no') }}{{ trans('general.model_no') }} {{ trans('admin/consumables/general.item_no') }}{{ trans('admin/consumables/general.order') }}{{ trans('admin/consumables/general.date') }}{{ trans('admin/consumables/general.cost') }}{{ trans('general.order_number') }}{{ trans('general.purchase_date') }}{{ trans('general.purchase_cost') }} {{ trans('table.actions') }}
purchase_date) -
{{ trans('admin/consumables/general.date') }}: +
{{ trans('general.purchase_date') }}: {{ $consumable->purchase_date }}
@endif @if ($consumable->purchase_cost) -
{{ trans('admin/consumables/general.cost') }}: - {{ \App\Models\Setting::first()->default_currency }} +
{{ trans('general.purchase_cost') }}: + {{ $snipeSettings->default_currency }} {{ \App\Helpers\Helper::formatCurrencyOutput($consumable->purchase_cost) }}
@endif @@ -80,9 +80,9 @@ {{ $consumable->item_no }}
@endif - @if ($consumable->model_no) + @if ($consumable->model_number)
{{ trans('general.model_no') }}: - {{ $consumable->model_no }}
+ {{ $consumable->model_number }}
@endif @if ($consumable->manufacturer) @@ -91,53 +91,14 @@ @endif @if ($consumable->order_number) -
{{ trans('admin/consumables/general.order') }}: +
{{ trans('general.order_number') }}: {{ $consumable->order_number }}
@endif
- +@stop @section('moar_scripts') - - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'consumable' . $consumable->name . '-export', 'search' => false]) @stop diff --git a/resources/views/depreciations/edit.blade.php b/resources/views/depreciations/edit.blade.php index e198bcf78..70037f512 100755 --- a/resources/views/depreciations/edit.blade.php +++ b/resources/views/depreciations/edit.blade.php @@ -1,73 +1,24 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - - @if ($depreciation->id) - {{ trans('admin/depreciations/general.update_depreciation') }} - @else - {{ trans('admin/depreciations/general.create_depreciation') }} - @endif - -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/depreciations/general.create') , + 'updateText' => trans('admin/depreciations/general.update'), + 'helpTitle' => trans('admin/depreciations/general.about_asset_depreciations'), + 'helpText' => trans('admin/depreciations/general.about_depreciations') +]) {{-- Page content --}} -@section('content') +@section('inputFields') -
-
- - - - - -
- - - -
- -
- - -
- - {!! $errors->first('name', ' :message') !!} -
+@include ('partials.forms.edit.name', ['translated_name' => trans('admin/depreciations/general.depreciation_name')]) + +
+ +
+
+
- - -
- - -
- - {!! $errors->first('months', ' :message') !!} -
-
- -
- -
- - -
- -
-

{{ trans('admin/depreciations/general.about_asset_depreciations') }}

-

{{ trans('admin/depreciations/general.about_depreciations') }}

-
+
+ {!! $errors->first('months', ' :message') !!}
@stop diff --git a/resources/views/depreciations/index.blade.php b/resources/views/depreciations/index.blade.php index d29a7323f..bfad07a5f 100755 --- a/resources/views/depreciations/index.blade.php +++ b/resources/views/depreciations/index.blade.php @@ -22,7 +22,7 @@ Asset Depreciations
+@stop + @section('moar_scripts') - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'depreciations-export', 'search' => true]) @stop diff --git a/resources/views/emails/accept-accessory.blade.php b/resources/views/emails/accept-accessory.blade.php index 371909a5e..afd3c2287 100644 --- a/resources/views/emails/accept-accessory.blade.php +++ b/resources/views/emails/accept-accessory.blade.php @@ -57,5 +57,5 @@

{{ trans('mail.i_have_read') }}

@endif -

{{ \App\Models\Setting::getSettings()->site_name }}

+

{{ $snipeSettings->site_name }}

@stop diff --git a/resources/views/emails/accept-asset.blade.php b/resources/views/emails/accept-asset.blade.php index a6b78b4da..8b8b5eba8 100755 --- a/resources/views/emails/accept-asset.blade.php +++ b/resources/views/emails/accept-asset.blade.php @@ -87,5 +87,5 @@

{{ trans('mail.i_have_read') }}

@endif -

{{ \App\Models\Setting::getSettings()->site_name }}

+

{{ $snipeSettings->site_name }}

@stop diff --git a/resources/views/emails/asset-canceled.blade.php b/resources/views/emails/asset-canceled.blade.php index 3cba49dd6..beb6a7f58 100644 --- a/resources/views/emails/asset-canceled.blade.php +++ b/resources/views/emails/asset-canceled.blade.php @@ -2,7 +2,7 @@ @section('content') -

{{ trans('mail.a_user_canceled') }} {{ \App\Models\Setting::getSettings()->site_name }}.

+

{{ trans('mail.a_user_canceled') }} {{ $snipeSettings->site_name }}.

{{ trans('mail.user') }} {{ $requested_by }}
{{ trans('mail.item') }} {{ $item_name }} ({{ $item_type }})
diff --git a/resources/views/emails/asset-requested.blade.php b/resources/views/emails/asset-requested.blade.php index 5fd51b5ed..c5999a19e 100644 --- a/resources/views/emails/asset-requested.blade.php +++ b/resources/views/emails/asset-requested.blade.php @@ -2,7 +2,7 @@ @section('content') -

{{ trans('mail.a_user_requested') }} {{ \App\Models\Setting::getSettings()->site_name }}.

+

{{ trans('mail.a_user_requested') }} {{ $snipeSettings->site_name }}.

{{ trans('mail.user') }} {{ $requested_by }}
{{ trans('mail.item') }} {{ $item_name }} ({{ $item_type }})
diff --git a/resources/views/emails/auth/reminder.blade.php b/resources/views/emails/auth/reminder.blade.php index 4af4e44b5..d7ba2a808 100755 --- a/resources/views/emails/auth/reminder.blade.php +++ b/resources/views/emails/auth/reminder.blade.php @@ -7,7 +7,7 @@

{{ trans('mail.password_reset') }}

- {{ trans('mail.to_reset', ['web' => \App\Models\Setting::getSettings()->site_name]) }} {{ URL::to('password/reset', array($token)) }}. + {{ trans('mail.to_reset', ['web' => $snipeSettings->site_name]) }} {{ URL::to('password/reset', array($token)) }}.
diff --git a/resources/views/emails/checkin-asset.blade.php b/resources/views/emails/checkin-asset.blade.php index c3b943daf..bf759e2bd 100644 --- a/resources/views/emails/checkin-asset.blade.php +++ b/resources/views/emails/checkin-asset.blade.php @@ -45,5 +45,5 @@ @endif
-

{{ \App\Models\Setting::getSettings()->site_name }}

+

{{ $snipeSettings->site_name }}

@stop diff --git a/resources/views/emails/forgot-password.blade.php b/resources/views/emails/forgot-password.blade.php index d39942410..633d26df7 100755 --- a/resources/views/emails/forgot-password.blade.php +++ b/resources/views/emails/forgot-password.blade.php @@ -3,11 +3,11 @@ @section('content')

{{ trans('mail.hello') }} {{ $user->first_name }},

-

{{ trans('mail.link_to_update_password', ['web' => \App\Models\Setting::getSettings()->site_name]) }}

+

{{ trans('mail.link_to_update_password', ['web' => $snipeSettings->site_name]) }}

{{ $forgotPasswordUrl }}

{{ trans('mail.best_regards') }}

-

{{ \App\Models\Setting::getSettings()->site_name }}

+

{{ $snipeSettings->site_name }}

@stop diff --git a/resources/views/emails/register-activate.blade.php b/resources/views/emails/register-activate.blade.php index dab10f6d1..92091902b 100755 --- a/resources/views/emails/register-activate.blade.php +++ b/resources/views/emails/register-activate.blade.php @@ -3,11 +3,11 @@ @section('content')

{{ trans('mail.hello') }} {{ $user->first_name }},

-

{{ trans('mail.welcome_to', ['web' => \App\Models\Setting::getSettings()->site_name]) }} {{ trans('mail.click_to_confirm', ['web' => \App\Models\Setting::getSettings()->site_name]) }}

+

{{ trans('mail.welcome_to', ['web' => $snipeSettings->site_name]) }} {{ trans('mail.click_to_confirm', ['web' => $snipeSettings->site_name]) }}

{{ $activationUrl }}

{{ trans('mail.best_regards') }}

-

{{ \App\Models\Setting::getSettings()->site_name }}

+

{{ $snipeSettings->site_name }}

@stop diff --git a/resources/views/emails/send-login.blade.php b/resources/views/emails/send-login.blade.php index c4b925054..b34bef769 100644 --- a/resources/views/emails/send-login.blade.php +++ b/resources/views/emails/send-login.blade.php @@ -3,7 +3,7 @@ @section('content')

{{ trans('mail.hello') }} {{ $first_name }},

-

{{ trans('mail.admin_has_created', ['web' => \App\Models\Setting::getSettings()->site_name]) }}

+

{{ trans('mail.admin_has_created', ['web' => $snipeSettings->site_name]) }}

URL: {{ config('app.url') }}
{{ trans('mail.login') }} {{ $username }}
@@ -12,5 +12,5 @@

{{ trans('mail.best_regards') }}

-

{{ \App\Models\Setting::getSettings()->site_name }}

+

{{ $snipeSettings->site_name }}

@stop diff --git a/resources/views/groups/edit.blade.php b/resources/views/groups/edit.blade.php index d3713d174..f9840fd3b 100755 --- a/resources/views/groups/edit.blade.php +++ b/resources/views/groups/edit.blade.php @@ -1,101 +1,57 @@ -@extends('layouts/default') - -{{-- Web site Title --}} -@section('title') -{{ trans('admin/groups/titles.edit_group') }} +@extends('layouts/edit-form', [ + 'createText' => trans('admin/groups/titles.create') , + 'updateText' => trans('admin/groups/titles.update'), + 'helpTitle' => trans('admin/groups/general.about_groups_title'), + 'helpText' => trans('admin/groups/general.about_groups_text'), + 'item' => $group +]) +@section('content') + @parent @stop -@section('header_right') - - {{ trans('general.back') }} -@stop - -{{-- Content --}} -@section('content') - - - - -
-
-
- - @if ($group->id) -
-
-

{{ $group->name }}

-
-
- @endif - -
- -
- - - - -
- - -
- - {!! $errors->first('name', ' :message') !!} -
-
- -
- - @foreach ($permissions as $area => $permission) - - @for ($i = 0; $i < count($permission); $i++) - - - @if ($permission[$i]['display']) -

{{ $area }}: {{ $permission[$i]['label'] }}

-

{{ $permission[$i]['note'] }}

- - -
- - - - -
-
- @endif - @endfor - @endforeach - -
- -
- -
- - +
+ @foreach ($permissions as $area => $permission) + @for ($i = 0; $i < count($permission); $i++) + + @if ($permission[$i]['display']) +

{{ $area }}: {{ $permission[$i]['label'] }}

+

{{ $permission[$i]['note'] }}

- + +
-
-
+ + + +
+
+ @endif + @endfor + @endforeach @stop diff --git a/resources/views/groups/index.blade.php b/resources/views/groups/index.blade.php index 66bbd03db..3c1b3dfc8 100755 --- a/resources/views/groups/index.blade.php +++ b/resources/views/groups/index.blade.php @@ -23,7 +23,7 @@ +@stop @section('moar_scripts') - - - - - - - -@stop +@include ('partials.bootstrap-table', ['exportFile' => 'groups-export', 'search' => true]) @stop diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index ed55212e6..d57a56469 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -86,7 +86,7 @@ {{ trans('admin/hardware/form.cost') }}
- {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {!! $errors->first('purchase_cost', ' :message') !!} diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 55b8778c7..e057edf46 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -1,317 +1,143 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($asset->id) - {{ trans('admin/hardware/form.update') }} - @else - {{ trans('admin/hardware/form.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop +@extends('layouts/edit-form', [ + 'createText' => trans('admin/hardware/form.create'), + 'updateText' => trans('admin/hardware/form.update'), + 'helpTitle' => trans('admin/hardware/general.about_assets_title'), + 'helpText' => trans('admin/hardware/general.about_assets_text') +]) {{-- Page content --}} -@section('content') +@section('inputFields') +@include ('partials.forms.edit.company') + +
+ + +
+ @if ($item->id) + + @else + + @endif + {!! $errors->first('asset_tag', ' :message') !!} +
+
-
-
- @if ($asset->id) -
- @else - - @endif + +
+ + +
+ @if (isset($selected_model)) + {{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }} + @else + {{ Form::select('model_id', $model_list , Input::old('model_id', $item->model_id), array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }} + @endif + + {!! $errors->first('model_id', ' :message') !!} -
- @if ($asset->id) -
-

{{ $asset->showAssetName() }}

-
- @endif - -
- - - - - -
- - -
- @if ($asset->id) - - @else - - @endif - - {!! $errors->first('asset_tag', ' :message') !!} -
-
- - -
- - -
- @if (isset($selected_model)) - {{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }} - - @else - {{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }} - @endif - - - {!! $errors->first('model_id', ' :message') !!} - -
-
- New - -
-
- - -
- - @if ($asset->model && $asset->model->fieldset) - model; ?> - @endif - @if (Input::old('model_id')) - - @elseif (isset($selected_model)) - - @endif - @if (isset($model) && $model) - @include("models/custom_fields_form",["model" => $model]) - @endif -
- - -
- -
- {{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id')) }} - - - - {!! $errors->first('status_id', ' :message') !!} -
-
- New - -
-
-

{{ trans('admin/hardware/form.help_checkout') }}

-
-
- - @if (!$asset->id) - - - @endif - - - -
- -
- - {!! $errors->first('serial', ' :message') !!} -
-
- - -
- -
- - {!! $errors->first('name', ' :message') !!} -
-
- - - - @if (\App\Models\Company::isCurrentUserAuthorized()) -
-
{{ Form::label('company_id', trans('general.company')) }}
-
- {{ Form::select('company_id', $company_list , Input::old('company_id', $asset->company_id), - ['class'=>'select2', 'style'=>'width:100%']) }} - {!! $errors->first('company_id', ' :message') !!} -
-
- @endif - - -
- -
-
- - - -
- - - {!! $errors->first('purchase_date', ' :message') !!} -
-
- -
- -
- {{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $asset->supplier_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'supplier_select_id')) }} - - {!! $errors->first('supplier_id', ' :message') !!} -
-
- New -
-
- - -
- -
- - {!! $errors->first('order_number', ' :message') !!} -
-
- - -
- -
-
- - @if (($asset->id) && ($asset->assetloc)) - {{ $asset->assetloc->currency }} - @else - {{ \App\Models\Setting::first()->default_currency }} - @endif - - - - - {!! $errors->first('purchase_cost', ' :message') !!} -
-
-
- - -
- -
- -
- - {{ trans('admin/hardware/form.months') }} -
-
- {!! $errors->first('warranty_months', ' :message') !!} -
- - -
-
- - - - -
- -
- - {!! $errors->first('notes', ' :message') !!} -
-
- - -
- -
- {{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $asset->rtd_location_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'rtd_location_select')) }} - - {!! $errors->first('rtd_location_id', ' :message') !!} -
-
- New -
-
- - -
-
- - -
-
- - - - - @if ($asset->image) -
- -
- {{ Form::checkbox('image_delete'),array('class' => 'minimal') }} - - {!! $errors->first('image_delete', ':message') !!} -
-
- @endif - -
- -
- - - {!! $errors->first('image', ':message') !!} -
-
- - - -
- -
- - - -
+
+
+ New + +
+
+ + @if ($item->model && $item->model->fieldset) + model; ?> + @endif + @if (Input::old('model_id')) + + @elseif (isset($selected_model)) + + @endif + @if (isset($model) && $model) + @include("models/custom_fields_form",["model" => $model]) + @endif +
+ +@include ('partials.forms.edit.status') + +@if (!$item->id) + + +@endif + +@include ('partials.forms.edit.serial', ['translated_serial' => trans('admin/hardware/form.serial')]) +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')]) +@include ('partials.forms.edit.purchase_date') +@include ('partials.forms.edit.supplier') +@include ('partials.forms.edit.order_number') +id && $item->assetloc) { + $currency_type = $item->assetloc->currency; +} +?> +@include ('partials.forms.edit.purchase_cost', ['currency_type' => $currency_type]) +@include ('partials.forms.edit.warranty') +@include ('partials.forms.edit.notes') + + +
+ +
+ {{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $item->rtd_location_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'rtd_location_select')) }} + + {!! $errors->first('rtd_location_id', ' :message') !!} +
+
+ New +
+
+ +@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')]) + + +@if ($item->image) +
+ +
+ {{ Form::checkbox('image_delete'),array('class' => 'minimal') }} + + {!! $errors->first('image_delete', ':message') !!} +
+
+@endif + +
+ +
+ + + {!! $errors->first('image', ':message') !!} +
+
+ +@stop + @section('moar_scripts') - @include('partials/modals') +@include('partials/modals') -@stop -@stop +@stop \ No newline at end of file diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.php index a5408b2ff..04b52f5aa 100755 --- a/resources/views/hardware/index.blade.php +++ b/resources/views/hardware/index.blade.php @@ -63,7 +63,7 @@ name="assets" {{-- data-row-style="rowStyle" --}} data-toolbar="#toolbar" - class="table table-striped" + class="table table-striped snipe-table" id="table" data-url="{{route('api.hardware.list', array(''=>e(Input::get('status')),'order_number'=>e(Input::get('order_number')), 'status_id'=>e(Input::get('status_id'))))}}" data-cookie="true" @@ -137,64 +137,11 @@ @section('moar_scripts') - - - - - - - - +@include ('partials.bootstrap-table', [ + 'exportFile' => 'assets-export', + 'search' => true, + 'multiSort' => true +]) @@ -79,7 +79,7 @@ + +
+
+ + {{ csrf_field() }} + @yield('inputFields') + @include('partials.forms.edit.submit') + +
+
+
+
+ × +

+ {{ $helpTitle}} +

+

{{ $helpText }}

+
+ + +@stop \ No newline at end of file diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php index 998f88ede..428c14234 100755 --- a/resources/views/licenses/edit.blade.php +++ b/resources/views/licenses/edit.blade.php @@ -1,264 +1,119 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($license->id) - {{ trans('admin/licenses/form.update') }} - @else - {{ trans('admin/licenses/form.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/licenses/form.create') , + 'updateText' => trans('admin/licenses/form.update'), + 'helpTitle' => trans('admin/licenses/general.about_licenses_title'), + 'helpText' => trans('admin/licenses/general.about_licenses_text') +]) {{-- Page content --}} -@section('content') +@section('inputFields') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/licenses/form.name')]) + +
+ +
+ + {!! $errors->first('serial', ' :message') !!} +
+
-
-
- -
- @if ($license->id) -
-

{{ $license->name }}

-
- @endif - -
- - - - -
- - - - -
- - -
- - {!! $errors->first('name', ' :message') !!} -
-
- - -
- - -
- - {!! $errors->first('serial', ' :message') !!} -
-
- - -
- - -
- -
- {!! $errors->first('seats', '
:message
') !!} -
- - @if (\App\Models\Company::isCurrentUserAuthorized()) - -
-
- {{ Form::label('company_id', trans('general.company')) }} -
-
- {{ Form::select('company_id', $company_list , Input::old('company_id', $license->company_id), array('class'=>'select2', 'style'=>'min-width:350px')) }} - {!! $errors->first('company_id', ' :message') !!} -
-
- @endif - - -
- -
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $license->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('manufacturer_id', '
:message
') !!} -
+ +
+ +
+
+
- - -
- -
- - {!! $errors->first('license_name', ' :message') !!} -
-
- - -
- -
- - {!! $errors->first('license_email', ' :message') !!} -
-
- - - -
- -
- {{ Form::Checkbox('reassignable', '1', Input::old('reassignable', $license->id ? $license->reassignable : '1'),array('class' => 'minimal')) }} - {{ trans('general.yes') }} -
-
- - - - - -
- -
- {{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $license->supplier_id), array('class'=>'select2', 'style'=>'min-width:350px')) }} - {!! $errors->first('supplier_id', ' :message') !!} -
-
- - -
- -
- - {!! $errors->first('order_number', ' :message') !!} -
-
- - -
- -
-
- {{ \App\Models\Setting::first()->default_currency }} - - {!! $errors->first('purchase_cost', ' :message') !!} -
-
-
- - - - - -
- -
-
- - - -
- - - {!! $errors->first('purchase_date', ' :message') !!} -
-
- - -
- -
-
- - - -
- - - {!! $errors->first('expiration_date', ' :message') !!} -
-
- - -
- -
-
- - - -
- - - {!! $errors->first('termination_date', ' :message') !!} -
-
- - - -
- -
- - {!! $errors->first('purchase_order', ' :message') !!} -
-
- - - -
- -
- {{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $license->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('depreciation_id', ' :message') !!} -
-
- - -
- - - -
- {{ Form::Checkbox('maintained', '1', Input::old('maintained', $license->maintained),array('class' => 'minimal')) }} - {{ trans('general.yes') }} - - - - -
-
- - - - -
- -
- - {!! $errors->first('notes', ' :message') !!} -
-
- - -
- - -
+
+ {!! $errors->first('seats', '
:message
') !!}
+ +@include ('partials.forms.edit.company') +@include ('partials.forms.edit.manufacturer') + + +
+ +
+ + {!! $errors->first('license_name', ' :message') !!} +
+
+ + +
+ +
+ + {!! $errors->first('license_email', ' :message') !!} +
+
+ + +
+ +
+ {{ Form::Checkbox('reassignable', '1', Input::old('reassignable', $item->id ? $item->reassignable : '1'),array('class' => 'minimal')) }} + {{ trans('general.yes') }} +
+@include ('partials.forms.edit.supplier') +@include ('partials.forms.edit.order_number') +@include ('partials.forms.edit.purchase_cost') +@include ('partials.forms.edit.purchase_date') + +
+ +
+
+ + +
+ + {!! $errors->first('expiration_date', ' :message') !!} +
+
+ + +
+ +
+
+ + + +
+ + + {!! $errors->first('termination_date', ' :message') !!} +
+
+ +{{-- @TODO How does this differ from Order #? --}} + +
+ +
+ + {!! $errors->first('purchase_order', ' :message') !!} +
+
+ +@include ('partials.forms.edit.depreciation') + + +
+ +
+ {{ Form::Checkbox('maintained', '1', Input::old('maintained', $item->maintained),array('class' => 'minimal')) }} + {{ trans('general.yes') }} +
+
+ +@include ('partials.forms.edit.notes') @stop diff --git a/resources/views/licenses/index.blade.php b/resources/views/licenses/index.blade.php index ddca19000..d2c86f5b6 100755 --- a/resources/views/licenses/index.blade.php +++ b/resources/views/licenses/index.blade.php @@ -28,7 +28,7 @@ name="licenses" id="table" data-url="{{route('api.licenses.list') }}" - class="table table-striped" + class="table table-striped snipe-table" data-cookie="true" data-click-to-select="true" data-cookie-id-table="licenseTable"> @@ -43,8 +43,8 @@
- - + + @@ -63,50 +63,8 @@ +@stop @section('moar_scripts') - - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'licenses-export', 'search' => true]) @stop diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index fc5bd0242..a3c44c287 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -240,7 +240,7 @@ @if ($license->purchase_date > 0) - @@ -289,7 +289,7 @@ @if ($license->notes) @endif @@ -309,7 +309,7 @@
{{ trans('admin/licenses/form.to_email') }} {{ trans('admin/licenses/form.seats') }} {{ trans('admin/licenses/form.remaining_seats') }}{{ trans('admin/licenses/table.purchase_date') }}{{ trans('admin/licenses/form.cost') }}{{ trans('general.purchase_date') }}{{ trans('general.purchase_cost') }} {{ trans('admin/licenses/form.purchase_order') }} {{ trans('admin/licenses/form.expiration') }} {{ trans('admin/licenses/form.notes') }}
- {{ trans('admin/licenses/form.date') }}: + {{ trans('general.purchase_date') }}: {{ $license->purchase_date }} @@ -250,10 +250,10 @@ @if ($license->purchase_cost > 0)
{{ trans('admin/licenses/form.cost') }}: + {{ trans('general.purchase_cost') }}: - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }}
- {{ trans('admin/licenses/form.notes') }}: + {{ trans('general.notes') }}: {!! nl2br(e($license->notes)) !!}
- + @@ -361,7 +361,7 @@ - + diff --git a/resources/views/locations/edit.blade.php b/resources/views/locations/edit.blade.php index a6bd48a1f..cfd80ca86 100755 --- a/resources/views/locations/edit.blade.php +++ b/resources/views/locations/edit.blade.php @@ -1,194 +1,83 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - - @if ($location->id) - {{ trans('admin/locations/table.update') }} - @else - {{ trans('admin/locations/table.create') }} - @endif - -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/locations/table.create') , + 'updateText' => trans('admin/locations/table.update'), + 'helpTitle' => trans('admin/locations/table.about_locations_title'), + 'helpText' => trans('admin/locations/table.about_locations') +]) {{-- Page content --}} -@section('content') +@section('inputFields') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/locations/table.name')]) - - -
-
- -
- @if ($location->id) -
-

{{ $location->name }}

-
- @endif - - -
-
- - - - -
- -
- - {!! $errors->first('name', ' :message') !!} -
- -
- - -
- -
- {!! Form::select('parent_id', $location_options , Input::old('parent_id', $location->parent_id), array('class'=>'select2 parent', 'style'=>'width:350px')) !!} - {!! $errors->first('parent_id', ' :message') !!} -
-
- - -
- -
- {{ Form::text('currency', Input::old('currency', $location->currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} - {!! $errors->first('currency', ':message') !!} -
-
- - -
- -
- - {!! $errors->first('address', ' :message') !!} -
-
- - -
- -
- - {!! $errors->first('address2', ' :message') !!} -
-
- - -
- - -
- - {!! $errors->first('city', ' :message') !!} -
-
- - -
- -
- - {!! $errors->first('state', ' :message') !!} -
-
- - -
- -
- - {!! $errors->first('zip', ' :message') !!} -
-
- - -
- - -
- {!! Form::countries('country', Input::old('country', $location->country), 'select2 country') !!} - {!! $errors->first('country', ' :message') !!} -
-
- - -
- + + +
+ +
+ {{ Form::text('currency', Input::old('currency', $item->currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} + {!! $errors->first('currency', ':message') !!}
- - - -
-
-@if (!$location->id) + +@include ('partials.forms.edit.address') +@stop + +@if (!$item->id) @section('moar_scripts') @stop @endif - -@stop diff --git a/resources/views/locations/index.blade.php b/resources/views/locations/index.blade.php index 87df061d9..d97400c5c 100755 --- a/resources/views/locations/index.blade.php +++ b/resources/views/locations/index.blade.php @@ -21,7 +21,7 @@
{{ trans('admin/licenses/form.notes') }}{{ trans('general.notes') }} {{ trans('general.file_name') }} {{ trans('general.admin') }} {{ trans('button.actions') }} {{ trans('admin/licenses/general.user') }}{{ trans('admin/licenses/form.notes') }}{{ trans('general.notes') }}
+@stop @section('moar_scripts') - - - - - - - -@stop @stop diff --git a/resources/views/locations/view.blade.php b/resources/views/locations/view.blade.php index bc489bf39..9a11b11ad 100644 --- a/resources/views/locations/view.blade.php +++ b/resources/views/locations/view.blade.php @@ -26,7 +26,7 @@
@@ -80,81 +80,10 @@ > - +@stop @section('moar_scripts') - - - - - - - - - - - -@stop +@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true]) @stop diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index 22379f5fc..23eada86e 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -1,71 +1,12 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($manufacturer->id) - {{ trans('admin/manufacturers/table.update') }} - @else - {{ trans('admin/manufacturers/table.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop +@extends('layouts/edit-form', [ + 'createText' => trans('admin/manufacturers/table.create') , + 'updateText' => trans('admin/manufacturers/table.update'), + 'helpTitle' => trans('admin/manufacturers/table.about_manufacturers_title'), + 'helpText' => trans('admin/manufacturers/table.about_manufacturers_text') +]) {{-- Page content --}} -@section('content') - -
-
- -
- - - - - -
- @if ($manufacturer->id) -
-

{{ $manufacturer->name }}

-
- @endif - -
- - - -
- -
- - {!! $errors->first('name', ' :message') !!} -
-
- -
- -
- -
- - -
-

Have Some Haiku

-

Serious error.
- All shortcuts have disappeared.
- Screen. Mind. Both are blank.

- - -
- -
- +@section('inputFields') +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/manufacturers/table.name')]) @stop diff --git a/resources/views/manufacturers/index.blade.php b/resources/views/manufacturers/index.blade.php index 9c2ecbfd2..cee0ca0fb 100755 --- a/resources/views/manufacturers/index.blade.php +++ b/resources/views/manufacturers/index.blade.php @@ -23,7 +23,7 @@
- +@stop @section('moar_scripts') - - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'manufacturers-export', 'search' => true]) @stop diff --git a/resources/views/manufacturers/view.blade.php b/resources/views/manufacturers/view.blade.php index 267038ebb..74097c912 100644 --- a/resources/views/manufacturers/view.blade.php +++ b/resources/views/manufacturers/view.blade.php @@ -45,7 +45,7 @@
{{ trans('admin/consumables/general.remaining') }} - + @@ -165,48 +165,9 @@ +@stop - - @section('moar_scripts') - - - - - - - - @stop - +@section('moar_scripts') +@include ('partials.bootstrap-table', ['exportFile' => 'manufacturer' . $manufacturer->name . '-export', 'search' => false]) @stop diff --git a/resources/views/models/edit.blade.php b/resources/views/models/edit.blade.php index 5c21242d5..f55071615 100755 --- a/resources/views/models/edit.blade.php +++ b/resources/views/models/edit.blade.php @@ -1,161 +1,66 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($model->id) - {{ trans('admin/models/table.update') }} - @else - {{ trans('admin/models/table.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/models/table.create') , + 'updateText' => trans('admin/models/table.update'), + 'helpTitle' => trans('admin/models/general.about_models_title'), + 'helpText' => trans('admin/models/general.about_models_text') +]) {{-- Page content --}} -@section('content') +@section('inputFields') -
-
- - {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal' ]) }} - - - -
- - @if ($model->id) -
-
-

{{ $model->name }}

-
-
- @endif - - -
- -
- -
- - {!! $errors->first('name', ' :message') !!} -
-
- -
- -
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $model->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('manufacturer_id', '
:message
') !!} -
-
- - -
- -
- {{ Form::select('category_id', $category_list , Input::old('category_id', $model->category_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('category_id', '
:message
') !!} -
-
- - - -
- -
- - {!! $errors->first('modelno', '
:message
') !!} -
-
- - -
- -
- {{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $model->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('depreciation_id', '
:message
') !!} -
-
- - - -
- -
-
- - - {{ trans('general.months') }} - -
-
-
- {!! $errors->first('eol', '
:message
') !!} -
-
- - -
- -
- {{ Form::select('custom_fieldset', \App\Helpers\Helper::customFieldsetList(),Input::old('custom_fieldset', $model->fieldset_id), array('class'=>'select2', 'style'=>'width:350px')) }} - {!! $errors->first('custom_fieldset', '
:message
') !!} -
-
- - -
- -
- -

{!! trans('general.markdown') !!}

- - {!! $errors->first('note', '
:message
') !!} -
-
- - - -
-
- -
-
- - - @if ($model->image) -
- -
- {{ Form::checkbox('image_delete') }} - - {!! $errors->first('image_delete', '
:message
') !!} -
-
- @endif - -
- -
- {{ Form::file('image') }} - {!! $errors->first('image', '
:message
') !!} -
-
+@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name')]) +@include ('partials.forms.edit.manufacturer') +@include ('partials.forms.edit.category') +@include ('partials.forms.edit.model_number') +@include ('partials.forms.edit.depreciation') + +
+ +
+
+ + + {{ trans('general.months') }} +
- -
+
+ {!! $errors->first('eol', '
:message
') !!} +
+
+ + +
+ +
+ {{ Form::select('custom_fieldset', \App\Helpers\Helper::customFieldsetList(),Input::old('custom_fieldset', $item->fieldset_id), array('class'=>'select2', 'style'=>'width:350px')) }} + {!! $errors->first('custom_fieldset', '
:message
') !!} +
+
+ +@include ('partials.forms.edit.notes') +@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/models/general.requestable')]) + + +@if ($item->image) +
+ +
+ {{ Form::checkbox('image_delete') }} + + {!! $errors->first('image_delete', '
:message
') !!} +
+
+@endif + +
+ +
+ {{ Form::file('image') }} + {!! $errors->first('image', '
:message
') !!} +
+
@stop diff --git a/resources/views/models/index.blade.php b/resources/views/models/index.blade.php index 2afeb1264..5196d7c27 100755 --- a/resources/views/models/index.blade.php +++ b/resources/views/models/index.blade.php @@ -28,7 +28,7 @@
{{ trans('general.min_amt') }} {{ trans('general.manufacturer') }}{{ trans('general.model_no') }}{{ trans('general.model_no') }} {{ trans('admin/consumables/general.item_no') }} {{ trans('admin/consumables/general.order') }} {{ trans('admin/consumables/general.date') }}
- +@stop @section('moar_scripts') - - - - - - - -@stop +@include ('partials.bootstrap-table', ['exportFile' => 'models-export', 'search' => true]) + @stop diff --git a/resources/views/models/view.blade.php b/resources/views/models/view.blade.php index 21b4717e1..0eb97022b 100755 --- a/resources/views/models/view.blade.php +++ b/resources/views/models/view.blade.php @@ -46,6 +46,7 @@
manufacturer->name }} @endif - @if ($model->modelno) + @if ($model->model_number)
  • {{ trans('general.model_no') }}: - {{ $model->modelno }}
  • + {{ $model->model_number }} @endif @if ($model->depreciation) @@ -114,45 +115,8 @@ - @section('moar_scripts') - - - - - - - - @stop - +@stop + +@section('moar_scripts') +@include ('partials.bootstrap-table', ['exportFile' => 'model' . $model->name . '-export', 'search' => true]) @stop diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php new file mode 100644 index 000000000..1accb9af8 --- /dev/null +++ b/resources/views/partials/bootstrap-table.blade.php @@ -0,0 +1,54 @@ +{{-- This Will load our default bootstrap-table settings on any table with a class of "snipe-table" and export it to the passed 'exportFile' name --}} + + + + + + + + \ No newline at end of file diff --git a/resources/views/partials/forms/edit/address.blade.php b/resources/views/partials/forms/edit/address.blade.php new file mode 100644 index 000000000..b4e1a59b2 --- /dev/null +++ b/resources/views/partials/forms/edit/address.blade.php @@ -0,0 +1,47 @@ +
    + {{ Form::label('address', trans('general.address'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('address', Input::old('address', $item->address), array('class' => 'form-control')) }} + {!! $errors->first('address', ' :message') !!} +
    +
    + +
    + {{ Form::label('address2', ' ', array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('address2', Input::old('address2', $item->address2), array('class' => 'form-control')) }} + {!! $errors->first('address2', ' :message') !!} +
    +
    + +
    + {{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('city', Input::old('city', $item->city), array('class' => 'form-control')) }} + {!! $errors->first('city', ' :message') !!} +
    +
    + +
    + {{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('state', Input::old('state', $item->state), array('class' => 'form-control')) }} + {!! $errors->first('state', ' :message') !!} +
    +
    + +
    + {{ Form::label('country', trans('general.country'), array('class' => 'col-md-3 control-label')) }} +
    + {!! Form::countries('country', Input::old('country', $item->country), 'select2') !!} + {!! $errors->first('country', ' :message') !!} +
    +
    + +
    + {{ Form::label('zip', trans('general.zip'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('zip', Input::old('zip', $item->zip), array('class' => 'form-control')) }} + {!! $errors->first('zip', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/category.blade.php b/resources/views/partials/forms/edit/category.blade.php new file mode 100644 index 000000000..03c2cc7b0 --- /dev/null +++ b/resources/views/partials/forms/edit/category.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + {{ Form::select('category_id', $category_list , Input::old('category_id', $item->category_id), array('class'=>'select2', 'style'=>'width:100%')) }} + {!! $errors->first('category_id', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/company.blade.php b/resources/views/partials/forms/edit/company.blade.php new file mode 100644 index 000000000..af15622ca --- /dev/null +++ b/resources/views/partials/forms/edit/company.blade.php @@ -0,0 +1,9 @@ +@if (\App\Models\Company::isCurrentUserAuthorized()) +
    +
    {{ Form::label('company_id', trans('general.company')) }}
    +
    + {{ Form::select('company_id', $company_list , Input::old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%')) }} + {!! $errors->first('company_id', ' :message') !!} +
    +
    +@endif \ No newline at end of file diff --git a/resources/views/partials/forms/edit/depreciation.blade.php b/resources/views/partials/forms/edit/depreciation.blade.php new file mode 100644 index 000000000..ac86dd21f --- /dev/null +++ b/resources/views/partials/forms/edit/depreciation.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + {{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }} + {!! $errors->first('depreciation_id', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/email.blade.php b/resources/views/partials/forms/edit/email.blade.php new file mode 100644 index 000000000..bfa7c2d63 --- /dev/null +++ b/resources/views/partials/forms/edit/email.blade.php @@ -0,0 +1,7 @@ +
    + {{ Form::label('email', trans('admin/suppliers/table.email'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('email', Input::old('email', $item->email), array('class' => 'form-control')) }} + {!! $errors->first('email', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/item_number.blade.php b/resources/views/partials/forms/edit/item_number.blade.php new file mode 100644 index 000000000..61d6f7b20 --- /dev/null +++ b/resources/views/partials/forms/edit/item_number.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + + {!! $errors->first('item_no', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/location.blade.php b/resources/views/partials/forms/edit/location.blade.php new file mode 100644 index 000000000..f03d23b31 --- /dev/null +++ b/resources/views/partials/forms/edit/location.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + {{ Form::select('location_id', $location_list , Input::old('location_id', $item->location_id), array('class'=>'select2', 'style'=>'width:350px')) }} + {!! $errors->first('location_id', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/maintenance_type.blade.php b/resources/views/partials/forms/edit/maintenance_type.blade.php new file mode 100644 index 000000000..3ec81b390 --- /dev/null +++ b/resources/views/partials/forms/edit/maintenance_type.blade.php @@ -0,0 +1,9 @@ + +
    + +
    + {{ Form::select('asset_maintenance_type', $assetMaintenanceType , Input::old('asset_maintenance_type', $assetMaintenance->asset_maintenance_type), ['class'=>'select2', 'style'=>'min-width:350px']) }} + {!! $errors->first('asset_maintenance_type', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/manufacturer.blade.php b/resources/views/partials/forms/edit/manufacturer.blade.php new file mode 100644 index 000000000..1bbe48a01 --- /dev/null +++ b/resources/views/partials/forms/edit/manufacturer.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $item->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%')) }} + {!! $errors->first('manufacturer_id', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/minimum_quantity.blade.php b/resources/views/partials/forms/edit/minimum_quantity.blade.php new file mode 100644 index 000000000..0febd84a0 --- /dev/null +++ b/resources/views/partials/forms/edit/minimum_quantity.blade.php @@ -0,0 +1,15 @@ + +
    + +
    +
    + +
    +
    + +
    +
    + {!! $errors->first('min_amt', ' :message') !!} +
    +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/model_number.blade.php b/resources/views/partials/forms/edit/model_number.blade.php new file mode 100644 index 000000000..f94876316 --- /dev/null +++ b/resources/views/partials/forms/edit/model_number.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + + {!! $errors->first('model_number', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/name.blade.php b/resources/views/partials/forms/edit/name.blade.php new file mode 100644 index 000000000..b0b77b215 --- /dev/null +++ b/resources/views/partials/forms/edit/name.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + + {!! $errors->first('name', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/notes.blade.php b/resources/views/partials/forms/edit/notes.blade.php new file mode 100644 index 000000000..67e037d30 --- /dev/null +++ b/resources/views/partials/forms/edit/notes.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + + {!! $errors->first('notes', ' :message') !!} +
    +
    diff --git a/resources/views/partials/forms/edit/order_number.blade.php b/resources/views/partials/forms/edit/order_number.blade.php new file mode 100644 index 000000000..1c9277bc1 --- /dev/null +++ b/resources/views/partials/forms/edit/order_number.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + + {!! $errors->first('order_number', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/phone.blade.php b/resources/views/partials/forms/edit/phone.blade.php new file mode 100644 index 000000000..644533032 --- /dev/null +++ b/resources/views/partials/forms/edit/phone.blade.php @@ -0,0 +1,7 @@ +
    + {{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('phone', Input::old('phone', $item->phone), array('class' => 'form-control')) }} + {!! $errors->first('phone', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/purchase_cost.blade.php b/resources/views/partials/forms/edit/purchase_cost.blade.php new file mode 100644 index 000000000..c1fdca4e2 --- /dev/null +++ b/resources/views/partials/forms/edit/purchase_cost.blade.php @@ -0,0 +1,17 @@ + +
    + +
    +
    + + @if (isset($currency_type)) + {{ $currency_type }} + @else + {{ $snipeSettings->default_currency }} + @endif + + + {!! $errors->first('purchase_cost', ' :message') !!} +
    +
    +
    diff --git a/resources/views/partials/forms/edit/purchase_date.blade.php b/resources/views/partials/forms/edit/purchase_date.blade.php new file mode 100644 index 000000000..188eb1149 --- /dev/null +++ b/resources/views/partials/forms/edit/purchase_date.blade.php @@ -0,0 +1,11 @@ + +
    + +
    +
    + + +
    + {!! $errors->first('purchase_date', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/quantity.blade.php b/resources/views/partials/forms/edit/quantity.blade.php new file mode 100644 index 000000000..d4a84abfa --- /dev/null +++ b/resources/views/partials/forms/edit/quantity.blade.php @@ -0,0 +1,11 @@ + + +
    + +
    +
    + +
    + {!! $errors->first('qty', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/requestable.blade.php b/resources/views/partials/forms/edit/requestable.blade.php new file mode 100644 index 000000000..7cc55f485 --- /dev/null +++ b/resources/views/partials/forms/edit/requestable.blade.php @@ -0,0 +1,9 @@ + +
    +
    + + +
    +
    diff --git a/resources/views/partials/forms/edit/serial.blade.php b/resources/views/partials/forms/edit/serial.blade.php new file mode 100644 index 000000000..008dd9597 --- /dev/null +++ b/resources/views/partials/forms/edit/serial.blade.php @@ -0,0 +1,8 @@ + +
    + +
    + + {!! $errors->first('serial', ' :message') !!} +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/status.blade.php b/resources/views/partials/forms/edit/status.blade.php new file mode 100644 index 000000000..a00d7c1e6 --- /dev/null +++ b/resources/views/partials/forms/edit/status.blade.php @@ -0,0 +1,15 @@ + +
    + +
    + {{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id')) }} + {!! $errors->first('status_id', ' :message') !!} +
    +
    + New + +
    +
    +

    {{ trans('admin/hardware/form.help_checkout') }}

    +
    +
    \ No newline at end of file diff --git a/resources/views/partials/forms/edit/submit.blade.php b/resources/views/partials/forms/edit/submit.blade.php new file mode 100644 index 000000000..0d9b9fd97 --- /dev/null +++ b/resources/views/partials/forms/edit/submit.blade.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/resources/views/partials/forms/edit/supplier.blade.php b/resources/views/partials/forms/edit/supplier.blade.php new file mode 100644 index 000000000..3b82bbcb1 --- /dev/null +++ b/resources/views/partials/forms/edit/supplier.blade.php @@ -0,0 +1,11 @@ + +
    + +
    + {{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $item->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px']) }} + {!! $errors->first('supplier_id', ' :message') !!} +
    +
    + New +
    +
    diff --git a/resources/views/partials/forms/edit/warranty.blade.php b/resources/views/partials/forms/edit/warranty.blade.php new file mode 100644 index 000000000..2a9be8a04 --- /dev/null +++ b/resources/views/partials/forms/edit/warranty.blade.php @@ -0,0 +1,13 @@ + +
    + +
    +
    + + {{ trans('admin/hardware/form.months') }} +
    +
    + {!! $errors->first('warranty_months', ' :message') !!} +
    +
    +
    \ No newline at end of file diff --git a/resources/views/reports/accessories.blade.php b/resources/views/reports/accessories.blade.php index 7d3e59310..7cfa2df2a 100644 --- a/resources/views/reports/accessories.blade.php +++ b/resources/views/reports/accessories.blade.php @@ -66,7 +66,7 @@ iconsPrefix: 'fa', showRefresh: true, search: true, - pageSize: {{ \App\Models\Setting::getSettings()->per_page }}, + pageSize: {{ $snipeSettings->per_page }}, pagination: true, sidePagination: 'client', sortable: true, diff --git a/resources/views/reports/activity.blade.php b/resources/views/reports/activity.blade.php index 6b17df061..be7fed15e 100644 --- a/resources/views/reports/activity.blade.php +++ b/resources/views/reports/activity.blade.php @@ -20,7 +20,7 @@
    - +@stop @section('moar_scripts') - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'activity-export', 'search' => true]) @stop diff --git a/resources/views/reports/asset.blade.php b/resources/views/reports/asset.blade.php index 2d8a984f0..f144ec7c6 100644 --- a/resources/views/reports/asset.blade.php +++ b/resources/views/reports/asset.blade.php @@ -15,119 +15,72 @@ @section('content')
    -
    +
    -
    -
    +
    +
    -
    +
    -
    - - - @if (Input::get('status')!='Deleted') - - @endif - - - - - - - - - - - - - - - - - - - - @foreach(\App\Models\CustomField::all() AS $field) +
    {{ trans('general.id') }}{{ trans('general.company') }}{{ trans('admin/hardware/form.name') }}{{ trans('admin/hardware/table.asset_tag') }}{{ trans('admin/hardware/table.serial') }}{{ trans('admin/hardware/form.model') }}{{ trans('admin/models/table.modelnumber') }}{{ trans('admin/hardware/table.status') }}{{ trans('admin/hardware/form.checkedout_to') }}{{ trans('admin/hardware/table.location') }}{{ trans('general.category') }}{{ trans('general.manufacturer') }}{{ trans('admin/hardware/form.cost') }}{{ trans('admin/hardware/form.date') }}{{ trans('general.eol') }}{{ trans('general.notes') }}{{ trans('admin/hardware/form.order') }}{{ trans('admin/hardware/table.checkout_date') }}{{ trans('admin/hardware/form.expected_checkin') }}
    + + + @if (Input::get('status')!='Deleted') + + @endif + + + + + + + + + + + + + + + + + + + + @foreach(\App\Models\CustomField::all() AS $field) - + {{$field->name}} + - @endforeach - + @endforeach + - - -
    {{ trans('general.id') }}{{ trans('general.company') }}{{ trans('admin/hardware/form.name') }}{{ trans('admin/hardware/table.asset_tag') }}{{ trans('admin/hardware/table.serial') }}{{ trans('admin/hardware/form.model') }}{{ trans('admin/models/table.modelnumber') }}{{ trans('admin/hardware/table.status') }}{{ trans('admin/hardware/form.checkedout_to') }}{{ trans('admin/hardware/table.location') }}{{ trans('general.category') }}{{ trans('general.manufacturer') }}{{ trans('admin/hardware/form.cost') }}{{ trans('admin/hardware/form.date') }}{{ trans('general.eol') }}{{ trans('general.notes') }}{{ trans('admin/hardware/form.order') }}{{ trans('admin/hardware/table.checkout_date') }}{{ trans('admin/hardware/form.expected_checkin') }} - @if ($field->field_encrypted=='1') - - @endif + + @if ($field->field_encrypted=='1') + + @endif - {{$field->name}} - {{ trans('general.created_at') }}{{ trans('general.created_at') }}
    -
    -
    -
    - + + + + + + + +@stop @section('moar_scripts') - - - - - - +@include ('partials.bootstrap-table', ['exportFile' => 'assets-export', 'search' => true, 'multiSort' => true]) - -@stop @stop diff --git a/resources/views/reports/asset_maintenances.blade.php b/resources/views/reports/asset_maintenances.blade.php index 2dd4573c4..2d91772aa 100644 --- a/resources/views/reports/asset_maintenances.blade.php +++ b/resources/views/reports/asset_maintenances.blade.php @@ -62,7 +62,7 @@ @endif {{ $assetMaintenanceTime }} - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {{ number_format($assetMaintenance->cost,2) }} @@ -77,7 +77,7 @@ Totals: {{number_format($totalDays)}} - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {{ number_format($totalCost,2) }} @@ -104,7 +104,7 @@ iconsPrefix: 'fa', showRefresh: true, search: true, - pageSize: {{ \App\Models\Setting::getSettings()->per_page }}, + pageSize: {{ $snipeSettings->per_page }}, pagination: true, sidePagination: 'client', sortable: true, diff --git a/resources/views/reports/depreciation.blade.php b/resources/views/reports/depreciation.blade.php index 36cf1fd6f..8d1f4a877 100644 --- a/resources/views/reports/depreciation.blade.php +++ b/resources/views/reports/depreciation.blade.php @@ -29,7 +29,7 @@ {{ trans('admin/categories/general.category_name') }} {{ trans('admin/hardware/table.asset_tag') }} {{ trans('admin/hardware/table.title') }} - @if (\App\Models\Setting::getSettings()->display_asset_name) + @if ($snipeSettings->display_asset_name) {{ trans('general.name') }} @endif {{ trans('admin/hardware/table.serial') }} @@ -64,7 +64,7 @@ {{ $asset->model->name }} - @if (\App\Models\Setting::getSettings()->display_asset_name) + @if ($snipeSettings->display_asset_name) {{ $asset->name }} @endif {{ $asset->serial }} @@ -109,14 +109,14 @@ @if ($asset->assetloc ) {{ $asset->assetloc->currency }} @else - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} @endif {{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }} @if ($asset->assetloc ) {{ $asset->assetloc->currency }} @else - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} @endif {{ \App\Helpers\Helper::formatCurrencyOutput($asset->getDepreciatedValue()) }} @@ -124,7 +124,7 @@ @if ($asset->assetloc) {{ $asset->assetloc->currency }} @else - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} @endif -{{ \App\Helpers\Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue())) }} @@ -158,7 +158,7 @@ iconsPrefix: 'fa', showRefresh: true, search: true, - pageSize: {{ \App\Models\Setting::getSettings()->per_page }}, + pageSize: {{ $snipeSettings->per_page }}, pagination: true, sidePagination: 'client', sortable: true, diff --git a/resources/views/reports/index.blade.php b/resources/views/reports/index.blade.php index c84da3e1c..ae4a87aa7 100755 --- a/resources/views/reports/index.blade.php +++ b/resources/views/reports/index.blade.php @@ -28,7 +28,7 @@ {{ trans('admin/hardware/table.asset_tag') }} {{ trans('admin/hardware/table.title') }} - @if (\App\Models\Setting::getSettings()->display_asset_name) + @if ($snipeSettings->display_asset_name) {{ trans('general.name') }} @endif {{ trans('admin/hardware/table.serial') }} @@ -47,7 +47,7 @@ {{ $asset->asset_tag }} {{ $asset->model->name }} - @if (\App\Models\Setting::getSettings()->display_asset_name) + @if ($snipeSettings->display_asset_name) {{ $asset->name }} @endif {{ $asset->serial }} @@ -73,15 +73,15 @@ @if ($asset->purchase_cost > 0) - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }} - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} {{ number_format($asset->depreciate()) }} - {{ \App\Models\Setting::first()->default_currency }} + {{ $snipeSettings->default_currency }} -{{ number_format(($asset->purchase_cost - $asset->depreciate())) }} @else diff --git a/resources/views/reports/licenses.blade.php b/resources/views/reports/licenses.blade.php index 3271dd9c9..deb054922 100644 --- a/resources/views/reports/licenses.blade.php +++ b/resources/views/reports/licenses.blade.php @@ -51,10 +51,10 @@ {{ $license->expiration_date }} {{ $license->purchase_date }} - {{ \App\Models\Setting::getSettings()->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }} + {{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }} {{ ($license->depreciation) ? e($license->depreciation->name).' ('.$license->depreciation->months.' '.trans('general.months').')' : '' }} - {{ \App\Models\Setting::getSettings()->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->getDepreciatedValue()) }} - -{{ \App\Models\Setting::getSettings()->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput(($license->purchase_cost - $license->getDepreciatedValue())) }} + {{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->getDepreciatedValue()) }} + -{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput(($license->purchase_cost - $license->getDepreciatedValue())) }} @endforeach @@ -79,7 +79,7 @@ iconsPrefix: 'fa', showRefresh: true, search: true, - pageSize: {{ \App\Models\Setting::getSettings()->per_page }}, + pageSize: {{ $snipeSettings->per_page }}, pagination: true, sidePagination: 'client', sortable: true, diff --git a/resources/views/reports/unaccepted_assets.blade.php b/resources/views/reports/unaccepted_assets.blade.php index 3f098e7fc..6da5ea724 100644 --- a/resources/views/reports/unaccepted_assets.blade.php +++ b/resources/views/reports/unaccepted_assets.blade.php @@ -73,7 +73,7 @@ iconsPrefix: 'fa', showRefresh: true, search: true, - pageSize: {{ \App\Models\Setting::getSettings()->per_page }}, + pageSize: {{ $snipeSettings->per_page }}, pagination: true, sidePagination: 'client', sortable: true, diff --git a/resources/views/settings/edit.blade.php b/resources/views/settings/edit.blade.php index ab91784b8..56865e7a3 100755 --- a/resources/views/settings/edit.blade.php +++ b/resources/views/settings/edit.blade.php @@ -298,6 +298,17 @@ + +
    +
    + {{ Form::label('per_page', trans('admin/settings/general.per_page')) }} +
    +
    + {{ Form::text('per_page', Input::old('per_page', $setting->per_page), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} + {!! $errors->first('per_page', ':message') !!} +
    +
    + diff --git a/resources/views/statuslabels/edit.blade.php b/resources/views/statuslabels/edit.blade.php index efb9e5dfb..06e113205 100755 --- a/resources/views/statuslabels/edit.blade.php +++ b/resources/views/statuslabels/edit.blade.php @@ -1,107 +1,58 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($statuslabel->id) - {{ trans('admin/statuslabels/table.update') }} - @else - {{ trans('admin/statuslabels/table.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/statuslabels/table.create') , + 'updateText' => trans('admin/statuslabels/table.update'), + 'helpTitle' => trans('admin/statuslabels/table.about'), + 'helpText' => trans('admin/statuslabels/table.info') +]) {{-- Page content --}} @section('content') - - + +@parent +@stop +@section('inputFields') -
    -
    -
    +@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')]) - - - -
    -
    - -
    - -
    - - {!! $errors->first('name', ' :message') !!} -
    -
    - - -
    - -
    - {{ Form::select('statuslabel_types', $statuslabel_types, $statuslabel->getStatuslabelType(), array('class'=>'select2', 'style'=>'min-width:400px')) }} - {!! $errors->first('statuslabel_types', ' :message') !!} -
    -
    - - -
    - {{ Form::label('color', trans('admin/statuslabels/table.color'), ['class' => 'col-md-3 control-label']) }} -
    -
    - {{ Form::text('color', Input::old('color', $statuslabel->color), array('class' => 'form-control', 'style' => 'width: 100px;', 'maxlength'=>'10')) }} -
    -
    - {!! $errors->first('header_color', ':message') !!} -
    -
    - - -
    - -
    - - {!! $errors->first('notes', ' :message') !!} -
    -
    - - -
    - - -
    - - - - - -
    - -
    + +
    + +
    + {{ Form::select('statuslabel_types', $statuslabel_types, $item->getStatuslabelType(), array('class'=>'select2', 'style'=>'min-width:400px')) }} + {!! $errors->first('statuslabel_types', ' :message') !!} +
    - -
    -

    {{ trans('admin/statuslabels/table.about') }}

    -

    {{ trans('admin/statuslabels/table.info') }}

    + +
    + {{ Form::label('color', trans('admin/statuslabels/table.color'), ['class' => 'col-md-3 control-label']) }} +
    +
    + {{ Form::text('color', Input::old('color', $item->color), array('class' => 'form-control', 'style' => 'width: 100px;', 'maxlength'=>'10')) }} +
    +
    + {!! $errors->first('header_color', ':message') !!} +
    +
    +@include ('partials.forms.edit.notes') + + +
    + +
    -
    + +@stop @section('moar_scripts') @@ -109,5 +60,5 @@ //color picker with addon $(".color").colorpicker(); -@stop + @stop diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.php index d040596b4..d3dafc185 100755 --- a/resources/views/statuslabels/index.blade.php +++ b/resources/views/statuslabels/index.blade.php @@ -22,6 +22,7 @@ - +@stop @section('moar_scripts') - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'statuslabels-export', 'search' => true]) @stop diff --git a/resources/views/suppliers/edit.blade.php b/resources/views/suppliers/edit.blade.php index 0f1e5e53a..d9215b87d 100755 --- a/resources/views/suppliers/edit.blade.php +++ b/resources/views/suppliers/edit.blade.php @@ -1,180 +1,63 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - @if ($supplier->id) - {{ trans('admin/suppliers/table.update') }} - @else - {{ trans('admin/suppliers/table.create') }} - @endif -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - +@extends('layouts/edit-form', [ + 'createText' => trans('admin/suppliers/table.create') , + 'updateText' => trans('admin/suppliers/table.update'), + 'helpTitle' => trans('admin/suppliers/table.about_suppliers_title'), + 'helpText' => trans('admin/suppliers/table.about_suppliers_text') +]) {{-- Page content --}} -@section('content') +@section('inputFields') -
    -
    +@include ('partials.forms.edit.name', ['translated_name' => trans('admin/suppliers/table.name')]) +@include ('partials.forms.edit.address') - {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'autocomplete' => 'off' ]) }} - - {{ Form::token() }} +
    + {{ Form::label('contact', trans('admin/suppliers/table.contact'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('contact', Input::old('contact', $item->contact), array('class' => 'form-control')) }} + {!! $errors->first('contact', ' :message') !!} +
    +
    -
    +@include ('partials.forms.edit.phone') - @if ($supplier->id) -
    -
    -

    {{ $supplier->name }}

    -
    -
    - @endif +
    + {{ Form::label('fax', trans('admin/suppliers/table.fax'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('fax', Input::old('fax', $item->fax), array('class' => 'form-control')) }} + {!! $errors->first('fax', ' :message') !!} +
    +
    +@include ('partials.forms.edit.email') -
    - -
    - {{ Form::label('name', trans('admin/suppliers/table.name'), array('class' => 'col-md-3 control-label')) }} -
    - {{ Form::text('name', Input::old('name', $supplier->name), array('class' => 'form-control')) }} - {!! $errors->first('name', ' :message') !!} -
    -
    +
    + {{ Form::label('url', trans('admin/suppliers/table.url'), array('class' => 'col-md-3 control-label')) }} +
    + {{Form::text('url', Input::old('url', $item->url), array('class' => 'form-control')) }} + {!! $errors->first('url', ' :message') !!} +
    +
    -
    - {{ Form::label('address', trans('admin/suppliers/table.address'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('address', Input::old('address', $supplier->address), array('class' => 'form-control')) }} - {!! $errors->first('address', ' :message') !!} -
    -
    +@include ('partials.forms.edit.notes') -
    - {{ Form::label('address2', ' ', array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('address2', Input::old('address2', $supplier->address2), array('class' => 'form-control')) }} - {!! $errors->first('address2', ' :message') !!} -
    -
    + +@if ($item->image) +
    + +
    + {{ Form::checkbox('image_delete') }} + + {!! $errors->first('image_delete', ':message') !!} +
    +
    +@endif -
    - {{ Form::label('city', trans('admin/suppliers/table.city'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('city', Input::old('city', $supplier->city), array('class' => 'form-control')) }} - {!! $errors->first('city', ' :message') !!} -
    -
    - -
    - {{ Form::label('state', trans('admin/suppliers/table.state'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('state', Input::old('state', $supplier->state), array('class' => 'form-control')) }} - {!! $errors->first('state', ' :message') !!} -
    -
    - -
    - {{ Form::label('country', trans('admin/suppliers/table.country'), array('class' => 'col-md-3 control-label')) }} -
    - {!! Form::countries('country', Input::old('country', $supplier->country), 'select2') !!} - {!! $errors->first('country', ' :message') !!} -
    -
    - -
    - {{ Form::label('zip', trans('admin/suppliers/table.zip'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('zip', Input::old('zip', $supplier->zip), array('class' => 'form-control')) }} - {!! $errors->first('zip', ' :message') !!} -
    -
    - - -
    - {{ Form::label('contact', trans('admin/suppliers/table.contact'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('contact', Input::old('contact', $supplier->contact), array('class' => 'form-control')) }} - {!! $errors->first('contact', ' :message') !!} -
    -
    - - -
    - {{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('phone', Input::old('phone', $supplier->phone), array('class' => 'form-control')) }} - {!! $errors->first('phone', ' :message') !!} -
    -
    - -
    - {{ Form::label('fax', trans('admin/suppliers/table.fax'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('fax', Input::old('fax', $supplier->fax), array('class' => 'form-control')) }} - {!! $errors->first('fax', ' :message') !!} -
    -
    - -
    - {{ Form::label('email', trans('admin/suppliers/table.email'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('email', Input::old('email', $supplier->email), array('class' => 'form-control')) }} - {!! $errors->first('email', ' :message') !!} -
    -
    - -
    - {{ Form::label('url', trans('admin/suppliers/table.url'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('url', Input::old('url', $supplier->url), array('class' => 'form-control')) }} - {!! $errors->first('url', ' :message') !!} -
    -
    - - -
    - {{ Form::label('notes', trans('admin/suppliers/table.notes'), array('class' => 'col-md-3 control-label')) }} -
    - {{Form::text('notes', Input::old('notes', $supplier->notes), array('class' => 'form-control')) }} - {!! $errors->first('notes', ' :message') !!} -
    -
    - - - @if ($supplier->image) -
    - -
    - {{ Form::checkbox('image_delete') }} - - {!! $errors->first('image_delete', ':message') !!} -
    -
    - @endif - -
    - -
    - {{ Form::file('image') }} - {!! $errors->first('image', ':message') !!} -
    -
    - -
    - - - - - -
    +
    + +
    + {{ Form::file('image') }} + {!! $errors->first('image', ':message') !!}
    diff --git a/resources/views/suppliers/index.blade.php b/resources/views/suppliers/index.blade.php index 8cd77fe36..b7e1542fc 100755 --- a/resources/views/suppliers/index.blade.php +++ b/resources/views/suppliers/index.blade.php @@ -24,7 +24,7 @@
    +@stop @section('moar_scripts') - - - - - - - -@stop - +@include ('partials.bootstrap-table', ['exportFile' => 'suppliers-export', 'search' => true]) @stop diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index b64937094..7d49c734a 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -318,9 +318,9 @@ - @if (\App\Models\Setting::getSettings()->two_factor_enabled!='') + @if ($snipeSettings->two_factor_enabled!='') - @if (\App\Models\Setting::getSettings()->two_factor_enabled=='1') + @if ($snipeSettings->two_factor_enabled=='1')
    {{ Form::label('two_factor_optin', trans('admin/settings/general.two_factor')) }} diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php index 6ddec064b..cfbb6ef55 100755 --- a/resources/views/users/index.blade.php +++ b/resources/views/users/index.blade.php @@ -16,7 +16,7 @@ @section('header_right') @can('users.create') - @if (\App\Models\Setting::getSettings()->ldap_enabled == 1) + @if ($snipeSettings->ldap_enabled == 1) LDAP @endif {{ trans('general.import') }} @@ -64,7 +64,7 @@
    - +@stop @section('moar_scripts') - - - - - - - - +@include ('partials.bootstrap-table', ['exportFile' => 'users-export', 'search' => true]) @stop - -@stop diff --git a/resources/views/users/ldap.blade.php b/resources/views/users/ldap.blade.php index f62e0427f..b34a465b4 100644 --- a/resources/views/users/ldap.blade.php +++ b/resources/views/users/ldap.blade.php @@ -20,7 +20,7 @@ LDAP User Sync
    -@if (\App\Models\Setting::getSettings()->ldap_enabled == 0) +@if ($snipeSettings->ldap_enabled == 0) {{ trans('admin/users/message.ldap_not_configured') }} @else diff --git a/tests/TODO.testing b/tests/TODO.testing new file mode 100644 index 000000000..f4645af9d --- /dev/null +++ b/tests/TODO.testing @@ -0,0 +1,3 @@ +* Dump should contain at least one category of each type for functional testing. +* acceptance: replace some amonpage with checking url after clicking create +* acceptance: asset model test \ No newline at end of file diff --git a/tests/_data/IMPORT_ACCESSORIES.csv b/tests/_data/IMPORT_ACCESSORIES.csv new file mode 100644 index 000000000..510de4eea --- /dev/null +++ b/tests/_data/IMPORT_ACCESSORIES.csv @@ -0,0 +1,26 @@ +Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity +Walter Carter,09/01/2006,20.89,metus. Vivamus,Macromedia,J935H60W,Customer Relations,False,278 +Hayes Delgado,06/15/2011,82.33,conubia,Macromedia,R444V77O,Advertising,No,374 +Cairo Franks,02/17/2004,91.82,Suspendisse eleifend.,Sibelius,B562M80I,Accounting,True,86 +Kasimir Best,04/26/2009,63.50,ipsum cursus vestibulum.,Adobe,T496S42R,Payroll,False,374 +Rajah Garcia,07/23/2014,41.44,Nunc laoreet lectus,Sibelius,H299H99S,Customer Relations,No,514 +Damon Pearson,08/22/2010,11.16,luctus,Microsoft,K403K24X,Finances,False,596 +Jin Buckley,10/07/2005,15.36,euismod,Borland,U911L77O,Sales and Marketing,False,462 +Barrett Simon,04/06/2013,54.85,ipsum nunc,Sibelius,R642D18D,Tech Support,Yes,297 +Reece Hayden,05/12/2017,43.76,et nunc. Quisque,Lavasoft,R389I62U,Finances,1,500 +Honorato Greene,07/04/2007,67.66,interdum. Curabitur,Google,P231H53Z,Accounting,1,38 +Kennan Levine,12/09/2007,47.84,sociis,Lavasoft,K271S85U,Legal Department,1,268 +Chadwick Ryan,03/23/2011,49.92,fermentum,Finale,S458L71D,Quality Assurance,Yes,579 +Abraham Wynn,11/17/2009,32.19,Vestibulum,Lavasoft,Q317N85T,Quality Assurance,Yes,84 +Tyrone Vazquez,05/02/2014,93.61,"feugiat nec, diam.",Apple Systems,X530P10G,Public Relations,No,6 +Lester Holmes,11/20/2016,8.18,non magna.,Cakewalk,M377B05F,Research and Development,True,538 +Ryder Stafford,08/06/2014,65.77,consectetuer rhoncus. Nullam,Lavasoft,R754A44P,Finances,False,428 +Dylan Guy,09/26/2012,45.14,"a,",Chami,G531X03G,Tech Support,1,502 +Igor Salinas,10/14/2009,90.90,viverra. Donec,Borland,V076X60Y,Asset Management,False,532 +Xavier Mason,12/11/2004,89.76,mus. Proin,Sibelius,V002M54F,Tech Support,False,306 +Kane Mcintyre,05/22/2011,7.79,"erat,",Cakewalk,B393H89J,Quality Assurance,1,256 +Wade Silva,10/10/2010,78.71,Sed et libero.,Lavasoft,D573N25A,Customer Service,1,87 +Brock Lowery,11/01/2012,22.07,"dolor,",Macromedia,H112I50Y,Human Resources,1,587 +Gil Bright,07/30/2009,70.11,"id,",Sibelius,J429A36Y,Sales and Marketing,1,212 +Raja Brewer,02/03/2015,42.75,"id,",Apple Systems,R567P48B,Asset Management,1,338 +Malachi Conner,11/14/2008,71.79,Mauris,Yahoo,D522O37S,Tech Support,Yes,447 diff --git a/tests/_data/IMPORT_ASSETS.csv b/tests/_data/IMPORT_ASSETS.csv new file mode 100644 index 000000000..95bfcff36 --- /dev/null +++ b/tests/_data/IMPORT_ASSETS.csv @@ -0,0 +1,25 @@ +Name,Email,Username,item Name,item Category,Model name,Manufacturer,Model Number,Serial number,Asset Tag,Location,Notes,Purchase Date,Purchase Cost,Company,Status,Warranty,Supplier +Bonnie Nelson,bnelson0@cdbaby.com,bnelson0,eget nunc donec quis,quam,massa id,Linkbridge,6377018600094472,27aa8378-b0f4-4289-84a4-405da95c6147,970882174-8,Daping,"Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.",2016-04-05,289.59,Alpha,Undeployable,14,Blogspan +Judith Ferguson,jferguson1@state.tx.us,jferguson1,mi in porttitor,justo,congue diam id,Flipstorm,5.02043359569189E+018,4bc7fc90-5a97-412f-8eed-77ecacc643fc,544574073-0,Cirangga Kidul,,2016-03-08,763.46,,Undeployable,12,Oyope +Mildred Gibson,mgibson2@wiley.com,mgibson2,morbi quis tortor id,nunc nisl duis,convallis tortor risus,Lajo,374622546776765,2837ab20-8f0d-4935-8a52-226392f2b1b0,710141467-2,Shekou,In congue. Etiam justo. Etiam pretium iaculis justo.,2015-08-09,233.57,Konklab,Lost,, +Brandon Lee,blee3@quantcast.com,blee3,amet cursus id turpis,sed,in faucibus orci,Zoomlounge,3549618015236095,18d6e6a4-d362-4de9-beb4-7f62fb93de6f,103538064-1,Leksand,Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.,2015-10-11,,,Pending Diagnostics,, +Betty Powell,bpowell4@tuttocitta.it,bpowell4,ipsum praesent,condimentum curabitur,et ultrices,Kazu,3567082842822626,f9b473c6-c810-42f2-8335-27ce468889a8,118753405-6,Dresi Wetan,,2015-06-16,324.8,,Ready to Deploy,, +Anthony Wheeler,awheeler5@cocolog-nifty.com,awheeler5,dictumst maecenas ut,sem praesent,accumsan felis,Layo,30052522651756,4751495c-cee0-4961-b788-94a545b5643e,998233705-X,Dante Delgado,,2016-04-16,261.79,,Archived,15,Ntag +Dennis Reynolds,dreynolds6@ustream.tv,dreynolds6,libero nam,risus,interdum mauris,Twiyo,3585438057660291,17b3cf8d-fead-46f5-a8b0-49906bb90a00,177687256-8,Pingle,"Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.",2015-05-24,,,Pending Diagnostics,, +Andrea Arnold,aarnold7@cbc.ca,aarnold7,mauris morbi non,ante vel,sapien dignissim,Cogibox,3548511052883500,7a6a2fdb-160c-4d91-8e05-a0337a90d9db,129556040-2,Zhuli,Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit.,2015-09-15,434.86,,Archived,14,Kwilith +Anna Butler,abutler8@wikia.com,abutler8,eleifend pede libero,sapien a libero,et ultrices posuere cubilia,Flipbug,6.75911579996746E+017,c1a57909-3b2e-47fe-ab2f-843401b2a7de,117517007-0,Niopanda,"Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.",2016-04-13,89.53,,Archived,15,Linkbridge +Mark Bennett,mbennett9@diigo.com,mbennett9,convallis nulla neque,eu sapien,duis mattis egestas metus aenean,Centimia,378342677410961,07540238-fb3c-4c8a-8e11-d43883ee4268,007968217-0,Zoumaling,,2015-07-04,,,Lost,, +Emily Wheeler,ewheelera@google.de,ewheelera,in felis,leo odio,quam sapien varius,Roombo,201954480670574,527b2445-2c67-4f76-912f-6ec42400a584,441402118-9,Luts’k,Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst.,2016-05-18,,Bitwolf,Lost,36,Wikizz +Wanda Fox,wfoxb@virginia.edu,wfoxb,vel ipsum praesent,potenti nullam porttitor,augue vestibulum rutrum rutrum neque,Yakijo,3567636803247485,,863829558-8,Pravdinsk,"Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh.",2015-11-10,,,Lost,14,Linkbridge +,,,odio elementum,posuere cubilia curae,ante vel ipsum praesent blandit,Oyope,3529462300753736,9a863968-180e-451d-a723-dc85e2d5d8ff,742114860-4,Panay,Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.,2016-03-20,881.4,,,30,Tagcat +Janet Grant,jgrantd@cpanel.net,jgrantd,viverra diam vitae,semper sapien,dapibus dolor vel,Flashset,3559785746335392,e287bb64-ff4f-434c-88ab-210ad433c77b,927820758-6,Achiaman,,2016-03-05,675.3,,Archived,22,Meevee +Antonio Larson,alarsone@tripod.com,alarsone,felis sed interdum venenatis,id lobortis,dui proin,Chatterbridge,4070995882635,90bcab28-ffd4-48c9-ba5d-c2eeb1400698,789757925-5,Oemanu,Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum.,2015-07-25,,,Ready to Deploy,30,Shuffledrive +Lois Powell,lpowellf@com.com,lpowellf,id consequat,justo nec,odio porttitor id consequat in,Skipstorm,36309149183447,08e440f7-bd0b-47a7-a577-4a3ce3c7dfe7,202652281-2,Qiaolin,"Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.",2015-08-13,446.22,,Lost,, +Mildred Allen,malleng@com.com,malleng,porta volutpat quam pede,in hac habitasse,donec vitae nisi nam,Devpulse,3543783295297294,5f900903-0ffe-4405-b5ad-aa4aa59d911c,210119288-8,Accha,"Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.",2015-12-24,923.9,,Lost,20,Quamba +Clarence Austin,caustinh@bigcartel.com,caustinh,libero nam dui proin,aliquet at feugiat,eget tincidunt eget tempus,Photobug,201967051902986,bde85740-f103-4b49-a691-a60c7f6859a8,022102715-7,Kerkrade,In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus.,2016-03-29,,,Undeployable,22,Browsedrive +Walter Chavez,wchavezi@blogs.com,wchavezi,sociis natoque penatibus,vel est,at diam nam,Photofeed,3533016005480310,bf4a2a92-6f29-4d24-be90-8126d4dcbd64,610672722-8,Villa Regina,,2016-05-13,442.51,,Archived,28,Tekfly +Marie Elliott,melliottj@constantcontact.com,melliottj,sed tristique in,rutrum,luctus et ultrices,Riffpath,4547299861035,9a02817e-de79-4850-a212-84c9ae3dd1a2,898880851-7,Tibro,Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.,2015-09-10,906.39,,Undeployable,, +,,,dui luctus rutrum,sapien ut nunc,dictumst morbi vestibulum,Aivee,4405382067928809,514aca2a-9080-4c49-8695-7ba4c78edc65,466008300-4,Menglie,Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.,2015-12-21,151.27,,,, +,,,ut massa volutpat,sed,quis odio consequat varius integer,Abatz,3537252931689981,b99208e2-b8d8-4f7a-8a06-366a27733b97,313295582-5,Solidaridad,"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.",2016-02-15,211.07,,,, +Benjamin Ford,bfordm@woothemes.com,bfordm,habitasse platea dictumst,primis in faucibus,quam a odio in,Blogtag,5018304036665243,c8680b36-a13c-427f-a6a1-1b9b351eb129,552327520-4,Sorinomo,In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.,2015-11-25,112.11,,Ready to Deploy,18,Quatz +Timothy Warren,twarrenn@printfriendly.com,twarrenn,leo pellentesque ultrices,vestibulum,in sapien iaculis congue vivamus,Brightdog,30355105682126,6c1e7556-063f-4c71-87ce-e46b06e8c238,446504693-6,Tamel,"Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.",2015-08-19,221.03,,Undeployable,26,Mydeo diff --git a/tests/_data/IMPORT_CONSUMABLES.csv b/tests/_data/IMPORT_CONSUMABLES.csv new file mode 100644 index 000000000..cec61b858 --- /dev/null +++ b/tests/_data/IMPORT_CONSUMABLES.csv @@ -0,0 +1,25 @@ +Item Name,Purchase Date,Purchase Cost,Location,Company,Order Number,Category,Requestable,Quantity +eget,01/03/2011,85.91,mauris blandit mattis.,Lycos,T295T06V,Triamterene/Hydrochlorothiazide,No,322 +Morbi,10/24/2016,87.42,iaculis,Lavasoft,W787T62Q,Ranitidine HCl,1,374 +arcu.,09/22/2007,48.34,ornare,Google,N961E50A,Amoxicillin,False,252 +nec,08/16/2009,8.71,lectus,Apple Systems,X624N14C,Lantus Solostar,1,30 +Nam,03/30/2017,24.07,"a,",Macromedia,N618A20S,Hydrocodone/APAP,True,551 +Nullam,12/16/2003,73.23,"Donec est mauris,",Yahoo,B386I67L,Fluticasone Propionate,No,395 +erat,08/03/2010,17.49,Proin,Borland,G606H92I,Amlodipine Besylate,1,297 +purus,10/12/2004,63.52,tellus justo sit,Chami,R660Z45O,Omeprazole (Rx),Yes,557 +dignissim,11/10/2010,77.94,nibh vulputate mauris,Lavasoft,G230Z67X,Risperidone,1,47 +Nam,01/25/2015,64.33,taciti sociosqu ad,Microsoft,B613L84C,Suboxone,No,310 +Nunc,04/13/2017,81.02,nec orci.,Borland,O367N55N,Fluoxetine HCl,No,404 +Phasellus,12/23/2005,70.67,"quis, tristique ac,",Borland,K941C02T,Alendronate Sodium,0,590 +Nulla,07/21/2017,99.04,augue malesuada malesuada.,Lycos,D663L90H,Allopurinol,No,48 +at,10/31/2007,58.42,"dolor sit amet,",Lavasoft,Y229E62I,Simvastatin,No,181 +Sed,04/14/2011,48.86,"lectus convallis est,",Cakewalk,T666E70K,Fluconazole,True,169 +quis,01/08/2014,55.64,"varius orci,",Lycos,T767G07U,Advair Diskus,False,264 +viverra.,01/07/2013,93.48,"cursus et, magna.",Sibelius,T276L44H,Loestrin 24 Fe,No,293 +Sed,03/20/2008,64.75,arcu. Sed,Cakewalk,A933E55V,Pantoprazole Sodium,No,407 +iaculis,07/17/2015,56.74,nec,Borland,N568F73C,Venlafaxine HCl ER,No,115 +leo.,12/09/2012,96.88,Aenean,Altavista,H283Z42U,Cephalexin,True,208 +leo.,04/24/2007,40.87,tincidunt adipiscing. Mauris,Lycos,T054Q83U,Lyrica,0,486 +pede.,09/29/2010,19.64,nec enim. Nunc,Chami,L842O70A,Simvastatin,Yes,214 +massa,05/18/2015,18.43,nisi magna sed,Adobe,V029Q52K,Meloxicam,0,131 +urna,10/22/2014,7.41,ac,Sibelius,Z708U15X,Flovent HFA,Yes,15 diff --git a/tests/_data/dump.sql b/tests/_data/dump.sql index 4bc742ce6..05daf7cdb 100644 --- a/tests/_data/dump.sql +++ b/tests/_data/dump.sql @@ -1 +1,1208 @@ -/* Replace this file with actual dump of your database */ \ No newline at end of file +-- MySQL dump 10.13 Distrib 5.7.15, for Linux (x86_64) +-- +-- Host: localhost Database: snipeittests +-- ------------------------------------------------------ +-- Server version 5.7.15-0ubuntu0.16.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accessories` +-- + +DROP TABLE IF EXISTS `accessories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `accessories` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `qty` int(11) NOT NULL DEFAULT '0', + `requestable` tinyint(1) NOT NULL DEFAULT '0', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `purchase_date` date DEFAULT NULL, + `purchase_cost` decimal(13,4) DEFAULT NULL, + `order_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `company_id` int(10) unsigned DEFAULT NULL, + `min_amt` int(11) DEFAULT NULL, + `manufacturer_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accessories` +-- + +LOCK TABLES `accessories` WRITE; +/*!40000 ALTER TABLE `accessories` DISABLE KEYS */; +INSERT INTO `accessories` VALUES (1,'Walter Carter',1,1,278,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,1,'2006-09-01',20.8900,'J935H60W',1,NULL,NULL),(2,'Hayes Delgado',2,1,374,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,2,'2011-06-15',82.3300,'R444V77O',1,NULL,NULL),(3,'Cairo Franks',3,1,86,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,3,'2004-02-17',91.8200,'B562M80I',2,NULL,NULL),(4,'Kasimir Best',4,1,374,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,4,'2009-04-26',63.5000,'T496S42R',3,NULL,NULL),(5,'Rajah Garcia',1,1,514,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,5,'2014-07-23',41.4400,'H299H99S',2,NULL,NULL),(6,'Damon Pearson',5,1,596,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,6,'2010-08-22',11.1600,'K403K24X',4,NULL,NULL),(7,'Jin Buckley',6,1,462,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,7,'2005-10-07',15.3600,'U911L77O',5,NULL,NULL),(8,'Barrett Simon',7,1,297,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,8,'2013-04-06',54.8500,'R642D18D',2,NULL,NULL),(9,'Reece Hayden',5,1,500,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,9,'2017-05-12',43.7600,'R389I62U',6,NULL,NULL),(10,'Honorato Greene',3,1,38,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,10,'2007-07-04',67.6600,'P231H53Z',7,NULL,NULL),(11,'Kennan Levine',8,1,268,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,11,'2007-12-09',47.8400,'K271S85U',6,NULL,NULL),(12,'Chadwick Ryan',9,1,579,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,12,'2011-03-23',49.9200,'S458L71D',8,NULL,NULL),(13,'Abraham Wynn',9,1,84,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,13,'2009-11-17',32.1900,'Q317N85T',6,NULL,NULL),(14,'Tyrone Vazquez',10,1,6,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,14,'2014-05-02',93.6100,'X530P10G',9,NULL,NULL),(15,'Lester Holmes',11,1,538,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,15,'2016-11-20',8.1800,'M377B05F',10,NULL,NULL),(16,'Ryder Stafford',5,1,428,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,16,'2014-08-06',65.7700,'R754A44P',6,NULL,NULL),(17,'Dylan Guy',7,1,502,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,'2012-09-26',45.1400,'G531X03G',11,NULL,NULL),(18,'Igor Salinas',12,1,532,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,17,'2009-10-14',90.9000,'V076X60Y',5,NULL,NULL),(19,'Xavier Mason',7,1,306,0,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,18,'2004-12-11',89.7600,'V002M54F',2,NULL,NULL),(20,'Kane Mcintyre',9,1,256,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,19,'2011-05-22',7.7900,'B393H89J',10,NULL,NULL),(21,'Wade Silva',13,1,87,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,20,'2010-10-10',78.7100,'D573N25A',6,NULL,NULL),(22,'Brock Lowery',14,1,587,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,21,'2012-11-01',22.0700,'H112I50Y',1,NULL,NULL),(23,'Gil Bright',6,1,212,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,22,'2009-07-30',70.1100,'J429A36Y',2,NULL,NULL),(24,'Raja Brewer',12,1,338,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,22,'2015-02-03',42.7500,'R567P48B',9,NULL,NULL),(25,'Malachi Conner',7,1,447,1,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,23,'2008-11-14',71.7900,'D522O37S',12,NULL,NULL); +/*!40000 ALTER TABLE `accessories` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `accessories_users` +-- + +DROP TABLE IF EXISTS `accessories_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `accessories_users` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `accessory_id` int(11) DEFAULT NULL, + `assigned_to` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accessories_users` +-- + +LOCK TABLES `accessories_users` WRITE; +/*!40000 ALTER TABLE `accessories_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `accessories_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `action_logs` +-- + +DROP TABLE IF EXISTS `action_logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `action_logs` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `action_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `target_id` int(11) DEFAULT NULL, + `target_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, + `filename` text COLLATE utf8_unicode_ci, + `item_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `item_id` int(11) NOT NULL, + `expected_checkin` date DEFAULT NULL, + `accepted_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `thread_id` int(11) DEFAULT NULL, + `company_id` int(11) DEFAULT NULL, + `accept_signature` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `action_logs_thread_id_index` (`thread_id`) +) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `action_logs` +-- + +LOCK TABLES `action_logs` WRITE; +/*!40000 ALTER TABLE `action_logs` DISABLE KEYS */; +INSERT INTO `action_logs` VALUES (1,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',1,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,1,NULL),(2,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',2,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,1,NULL),(3,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',3,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,2,NULL),(4,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',4,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,3,NULL),(5,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',5,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,2,NULL),(6,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',6,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,4,NULL),(7,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',7,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,5,NULL),(8,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',8,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,2,NULL),(9,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',9,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,6,NULL),(10,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',10,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,7,NULL),(11,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',11,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,6,NULL),(12,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',12,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,8,NULL),(13,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',13,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,6,NULL),(14,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',14,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,9,NULL),(15,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',15,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,10,NULL),(16,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',16,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,6,NULL),(17,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',17,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,11,NULL),(18,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',18,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,5,NULL),(19,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',19,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,2,NULL),(20,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',20,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,10,NULL),(21,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',21,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,6,NULL),(22,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',22,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,1,NULL),(23,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',23,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,2,NULL),(24,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',24,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,9,NULL),(25,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Accessory',25,NULL,NULL,'2016-11-06 22:01:57','2016-11-06 22:01:57',NULL,NULL,12,NULL),(26,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',1,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,14,NULL),(27,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',2,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL),(28,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',3,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,15,NULL),(29,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',4,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL),(30,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',5,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL),(31,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',6,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL),(32,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',7,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL),(33,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',8,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(34,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',9,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(35,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',10,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(36,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',11,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,16,NULL),(37,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',12,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(38,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',13,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(39,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',14,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(40,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',15,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(41,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',16,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(42,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',17,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(43,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',18,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(44,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',19,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(45,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',20,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(46,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',21,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(47,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',22,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(48,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',23,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(49,1,'created',NULL,NULL,NULL,'Imported using csv importer',NULL,'App\\Models\\Asset',24,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL),(50,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',1,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,17,NULL),(51,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',2,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,6,NULL),(52,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',3,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,7,NULL),(53,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',4,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,9,NULL),(54,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',5,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,1,NULL),(55,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',6,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,12,NULL),(56,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',7,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,5,NULL),(57,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',8,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,11,NULL),(58,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',9,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,6,NULL),(59,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',10,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,4,NULL),(60,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',11,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,5,NULL),(61,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',12,NULL,NULL,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,NULL,5,NULL),(62,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',13,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,17,NULL),(63,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',14,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,10,NULL),(64,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',15,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,17,NULL),(65,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',16,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,2,NULL),(66,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',17,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,10,NULL),(67,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',18,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,5,NULL),(68,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',19,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,18,NULL),(69,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',20,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,17,NULL),(70,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',21,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,11,NULL),(71,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',22,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,3,NULL),(72,1,'created',NULL,NULL,NULL,'Imported using CSV Importer',NULL,'App\\Models\\Consumable',23,NULL,NULL,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,NULL,2,NULL); +/*!40000 ALTER TABLE `action_logs` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `asset_logs` +-- + +DROP TABLE IF EXISTS `asset_logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `asset_logs` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `action_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `asset_id` int(11) NOT NULL, + `checkedout_to` int(11) DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `asset_type` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci, + `filename` text COLLATE utf8_unicode_ci, + `requested_at` datetime DEFAULT NULL, + `accepted_at` datetime DEFAULT NULL, + `accessory_id` int(11) DEFAULT NULL, + `accepted_id` int(11) DEFAULT NULL, + `consumable_id` int(11) DEFAULT NULL, + `expected_checkin` date DEFAULT NULL, + `component_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `asset_logs` +-- + +LOCK TABLES `asset_logs` WRITE; +/*!40000 ALTER TABLE `asset_logs` DISABLE KEYS */; +/*!40000 ALTER TABLE `asset_logs` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `asset_maintenances` +-- + +DROP TABLE IF EXISTS `asset_maintenances`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `asset_maintenances` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `asset_id` int(10) unsigned NOT NULL, + `supplier_id` int(10) unsigned NOT NULL, + `asset_maintenance_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `is_warranty` tinyint(1) NOT NULL, + `start_date` date NOT NULL, + `completion_date` date DEFAULT NULL, + `asset_maintenance_time` int(11) DEFAULT NULL, + `notes` longtext COLLATE utf8_unicode_ci, + `cost` decimal(10,2) DEFAULT NULL, + `deleted_at` datetime DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `asset_maintenances` +-- + +LOCK TABLES `asset_maintenances` WRITE; +/*!40000 ALTER TABLE `asset_maintenances` DISABLE KEYS */; +/*!40000 ALTER TABLE `asset_maintenances` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `asset_uploads` +-- + +DROP TABLE IF EXISTS `asset_uploads`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `asset_uploads` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `filename` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `asset_id` int(11) NOT NULL, + `filenotes` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `asset_uploads` +-- + +LOCK TABLES `asset_uploads` WRITE; +/*!40000 ALTER TABLE `asset_uploads` DISABLE KEYS */; +/*!40000 ALTER TABLE `asset_uploads` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `assets` +-- + +DROP TABLE IF EXISTS `assets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assets` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `asset_tag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `model_id` int(11) DEFAULT NULL, + `serial` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `purchase_date` date DEFAULT NULL, + `purchase_cost` decimal(8,2) DEFAULT NULL, + `order_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `assigned_to` int(11) DEFAULT NULL, + `notes` text COLLATE utf8_unicode_ci, + `image` text COLLATE utf8_unicode_ci, + `user_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `physical` tinyint(1) NOT NULL DEFAULT '1', + `deleted_at` timestamp NULL DEFAULT NULL, + `status_id` int(11) DEFAULT NULL, + `archived` tinyint(1) DEFAULT NULL, + `warranty_months` int(11) DEFAULT NULL, + `depreciate` tinyint(1) DEFAULT NULL, + `supplier_id` int(11) DEFAULT NULL, + `requestable` tinyint(4) NOT NULL DEFAULT '0', + `rtd_location_id` int(11) DEFAULT NULL, + `_snipeit_mac_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `accepted` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `last_checkout` datetime DEFAULT NULL, + `expected_checkin` date DEFAULT NULL, + `company_id` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `assets` +-- + +LOCK TABLES `assets` WRITE; +/*!40000 ALTER TABLE `assets` DISABLE KEYS */; +INSERT INTO `assets` VALUES (1,'eget nunc donec quis','970882174-8',1,'27aa8378-b0f4-4289-84a4-405da95c6147','2016-04-05',289.59,NULL,3,'Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.',NULL,1,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,5,NULL,NULL,NULL,1,0,25,'',NULL,NULL,NULL,14),(2,'mi in porttitor','544574073-0',2,'4bc7fc90-5a97-412f-8eed-77ecacc643fc','2016-03-08',763.46,NULL,4,NULL,NULL,1,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,5,NULL,NULL,NULL,2,0,26,'',NULL,NULL,NULL,NULL),(3,'morbi quis tortor id','710141467-2',3,'2837ab20-8f0d-4935-8a52-226392f2b1b0','2015-08-09',233.57,NULL,5,'In congue. Etiam justo. Etiam pretium iaculis justo.',NULL,1,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,6,NULL,NULL,NULL,3,0,27,'',NULL,NULL,NULL,15),(4,'amet cursus id turpis','103538064-1',4,'18d6e6a4-d362-4de9-beb4-7f62fb93de6f','2015-10-11',0.00,NULL,6,'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.',NULL,1,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,7,NULL,NULL,NULL,3,0,28,'',NULL,NULL,NULL,NULL),(5,'ipsum praesent','118753405-6',5,'f9b473c6-c810-42f2-8335-27ce468889a8','2015-06-16',324.80,NULL,7,NULL,NULL,1,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,2,NULL,NULL,NULL,3,0,29,'',NULL,NULL,NULL,NULL),(6,'dictumst maecenas ut','998233705-X',6,'4751495c-cee0-4961-b788-94a545b5643e','2016-04-16',261.79,NULL,8,NULL,NULL,1,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,3,NULL,NULL,NULL,4,0,30,'',NULL,NULL,NULL,NULL),(7,'libero nam','177687256-8',7,'17b3cf8d-fead-46f5-a8b0-49906bb90a00','2015-05-24',0.00,NULL,9,'Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.',NULL,1,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,7,NULL,NULL,NULL,3,0,31,'',NULL,NULL,NULL,NULL),(8,'mauris morbi non','129556040-2',8,'7a6a2fdb-160c-4d91-8e05-a0337a90d9db','2015-09-15',434.86,NULL,10,'Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,3,NULL,NULL,NULL,5,0,32,'',NULL,NULL,NULL,NULL),(9,'eleifend pede libero','117517007-0',9,'c1a57909-3b2e-47fe-ab2f-843401b2a7de','2016-04-13',89.53,NULL,11,'Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,3,NULL,NULL,NULL,6,0,33,'',NULL,NULL,NULL,NULL),(10,'convallis nulla neque','007968217-0',10,'07540238-fb3c-4c8a-8e11-d43883ee4268','2015-07-04',0.00,NULL,12,NULL,NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,6,NULL,NULL,NULL,3,0,34,'',NULL,NULL,NULL,NULL),(11,'in felis','441402118-9',11,'527b2445-2c67-4f76-912f-6ec42400a584','2016-05-18',0.00,NULL,13,'Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,6,NULL,NULL,NULL,7,0,35,'',NULL,NULL,NULL,16),(12,'vel ipsum praesent','863829558-8',12,NULL,'2015-11-10',0.00,NULL,14,'Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,6,NULL,NULL,NULL,6,0,36,'',NULL,NULL,NULL,NULL),(13,'odio elementum','742114860-4',13,'9a863968-180e-451d-a723-dc85e2d5d8ff','2016-03-20',881.40,NULL,NULL,'Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,1,NULL,NULL,NULL,8,0,37,'',NULL,NULL,NULL,NULL),(14,'viverra diam vitae','927820758-6',14,'e287bb64-ff4f-434c-88ab-210ad433c77b','2016-03-05',675.30,NULL,15,NULL,NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,3,NULL,NULL,NULL,9,0,38,'',NULL,NULL,NULL,NULL),(15,'felis sed interdum venenatis','789757925-5',15,'90bcab28-ffd4-48c9-ba5d-c2eeb1400698','2015-07-25',0.00,NULL,16,'Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,2,NULL,NULL,NULL,10,0,39,'',NULL,NULL,NULL,NULL),(16,'id consequat','202652281-2',16,'08e440f7-bd0b-47a7-a577-4a3ce3c7dfe7','2015-08-13',446.22,NULL,17,'Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,6,NULL,NULL,NULL,3,0,40,'',NULL,NULL,NULL,NULL),(17,'porta volutpat quam pede','210119288-8',17,'5f900903-0ffe-4405-b5ad-aa4aa59d911c','2015-12-24',923.90,NULL,18,'Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,6,NULL,NULL,NULL,11,0,41,'',NULL,NULL,NULL,NULL),(18,'libero nam dui proin','022102715-7',18,'bde85740-f103-4b49-a691-a60c7f6859a8','2016-03-29',0.00,NULL,19,'In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,5,NULL,NULL,NULL,12,0,42,'',NULL,NULL,NULL,NULL),(19,'sociis natoque penatibus','610672722-8',19,'bf4a2a92-6f29-4d24-be90-8126d4dcbd64','2016-05-13',442.51,NULL,20,NULL,NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,3,NULL,NULL,NULL,13,0,43,'',NULL,NULL,NULL,NULL),(20,'sed tristique in','898880851-7',20,'9a02817e-de79-4850-a212-84c9ae3dd1a2','2015-09-10',906.39,NULL,21,'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,5,NULL,NULL,NULL,3,0,44,'',NULL,NULL,NULL,NULL),(21,'dui luctus rutrum','466008300-4',21,'514aca2a-9080-4c49-8695-7ba4c78edc65','2015-12-21',151.27,NULL,NULL,'Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,1,NULL,NULL,NULL,3,0,45,'',NULL,NULL,NULL,NULL),(22,'ut massa volutpat','313295582-5',22,'b99208e2-b8d8-4f7a-8a06-366a27733b97','2016-02-15',211.07,NULL,NULL,'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,1,NULL,NULL,NULL,3,0,46,'',NULL,NULL,NULL,NULL),(23,'habitasse platea dictumst','552327520-4',23,'c8680b36-a13c-427f-a6a1-1b9b351eb129','2015-11-25',112.11,NULL,22,'In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,2,NULL,NULL,NULL,14,0,47,'',NULL,NULL,NULL,NULL),(24,'leo pellentesque ultrices','446504693-6',24,'6c1e7556-063f-4c71-87ce-e46b06e8c238','2015-08-19',221.03,NULL,23,'Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.',NULL,1,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,5,NULL,NULL,NULL,15,0,48,'',NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `assets` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `categories` +-- + +DROP TABLE IF EXISTS `categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `categories` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `eula_text` longtext COLLATE utf8_unicode_ci, + `use_default_eula` tinyint(1) NOT NULL DEFAULT '0', + `require_acceptance` tinyint(1) NOT NULL DEFAULT '0', + `category_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'asset', + `checkin_email` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `categories` +-- + +LOCK TABLES `categories` WRITE; +/*!40000 ALTER TABLE `categories` DISABLE KEYS */; +INSERT INTO `categories` VALUES (1,'Customer Relations','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(2,'Advertising','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(3,'Accounting','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(4,'Payroll','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(5,'Finances','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(6,'Sales and Marketing','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(7,'Tech Support','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(8,'Legal Department','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(9,'Quality Assurance','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(10,'Public Relations','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(11,'Research and Development','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(12,'Asset Management','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(13,'Customer Service','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(14,'Human Resources','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL,NULL,0,0,'accessory',0),(16,'Unnamed Category','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,NULL,0,0,'asset',0),(17,'Triamterene/Hydrochlorothiazide','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(18,'Ranitidine HCl','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(19,'Amoxicillin','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(20,'Lantus Solostar','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(21,'Hydrocodone/APAP','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(22,'Fluticasone Propionate','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(23,'Amlodipine Besylate','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(24,'Omeprazole (Rx)','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(25,'Risperidone','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(26,'Suboxone','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(27,'Fluoxetine HCl','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(28,'Alendronate Sodium','2016-11-06 22:03:36','2016-11-06 22:03:36',1,NULL,NULL,0,0,'consumable',0),(29,'Allopurinol','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(30,'Simvastatin','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(31,'Fluconazole','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(32,'Advair Diskus','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(33,'Loestrin 24 Fe','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(34,'Pantoprazole Sodium','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(35,'Venlafaxine HCl ER','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(36,'Cephalexin','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(37,'Lyrica','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(38,'Meloxicam','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(39,'Flovent HFA','2016-11-06 22:03:37','2016-11-06 22:03:37',1,NULL,NULL,0,0,'consumable',0),(40,'Test Accessory','2016-11-06 22:35:22','2016-11-06 22:35:22',1,NULL,'',0,0,'accessory',0),(41,'Test Component','2016-11-06 22:43:03','2016-11-06 22:43:03',1,NULL,'',0,0,'component',0),(42,'Test Asset','2016-11-06 22:44:24','2016-11-06 22:44:24',1,NULL,'',0,0,'asset',0),(43,'Test Consumable','2016-11-06 22:44:37','2016-11-06 22:44:37',1,NULL,'',0,0,'consumable',0); +/*!40000 ALTER TABLE `categories` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `checkout_requests` +-- + +DROP TABLE IF EXISTS `checkout_requests`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checkout_requests` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `requestable_id` int(11) NOT NULL, + `requestable_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `quantity` int(11) NOT NULL DEFAULT '1', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `checkout_requests_user_id_requestable_id_requestable_type_unique` (`user_id`,`requestable_id`,`requestable_type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `checkout_requests` +-- + +LOCK TABLES `checkout_requests` WRITE; +/*!40000 ALTER TABLE `checkout_requests` DISABLE KEYS */; +/*!40000 ALTER TABLE `checkout_requests` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `companies` +-- + +DROP TABLE IF EXISTS `companies`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `companies` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `companies_name_unique` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `companies` +-- + +LOCK TABLES `companies` WRITE; +/*!40000 ALTER TABLE `companies` DISABLE KEYS */; +INSERT INTO `companies` VALUES (1,'Macromedia','2016-11-06 22:01:57','2016-11-06 22:01:57'),(2,'Sibelius','2016-11-06 22:01:57','2016-11-06 22:01:57'),(3,'Adobe','2016-11-06 22:01:57','2016-11-06 22:01:57'),(4,'Microsoft','2016-11-06 22:01:57','2016-11-06 22:01:57'),(5,'Borland','2016-11-06 22:01:57','2016-11-06 22:01:57'),(6,'Lavasoft','2016-11-06 22:01:57','2016-11-06 22:01:57'),(7,'Google','2016-11-06 22:01:57','2016-11-06 22:01:57'),(8,'Finale','2016-11-06 22:01:57','2016-11-06 22:01:57'),(9,'Apple Systems','2016-11-06 22:01:57','2016-11-06 22:01:57'),(10,'Cakewalk','2016-11-06 22:01:57','2016-11-06 22:01:57'),(11,'Chami','2016-11-06 22:01:57','2016-11-06 22:01:57'),(12,'Yahoo','2016-11-06 22:01:57','2016-11-06 22:01:57'),(14,'Alpha','2016-11-06 22:03:21','2016-11-06 22:03:21'),(15,'Konklab','2016-11-06 22:03:21','2016-11-06 22:03:21'),(16,'Bitwolf','2016-11-06 22:03:22','2016-11-06 22:03:22'),(17,'Lycos','2016-11-06 22:03:36','2016-11-06 22:03:36'),(18,'Altavista','2016-11-06 22:03:37','2016-11-06 22:03:37'); +/*!40000 ALTER TABLE `companies` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `components` +-- + +DROP TABLE IF EXISTS `components`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `components` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `company_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `qty` int(11) NOT NULL DEFAULT '1', + `order_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `purchase_date` date DEFAULT NULL, + `purchase_cost` decimal(13,4) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `min_amt` int(11) DEFAULT NULL, + `serial` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `components` +-- + +LOCK TABLES `components` WRITE; +/*!40000 ALTER TABLE `components` DISABLE KEYS */; +/*!40000 ALTER TABLE `components` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `components_assets` +-- + +DROP TABLE IF EXISTS `components_assets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `components_assets` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `assigned_qty` int(11) DEFAULT '1', + `component_id` int(11) DEFAULT NULL, + `asset_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `components_assets` +-- + +LOCK TABLES `components_assets` WRITE; +/*!40000 ALTER TABLE `components_assets` DISABLE KEYS */; +/*!40000 ALTER TABLE `components_assets` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `consumables` +-- + +DROP TABLE IF EXISTS `consumables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `consumables` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `qty` int(11) NOT NULL DEFAULT '0', + `requestable` tinyint(1) NOT NULL DEFAULT '0', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `purchase_date` date DEFAULT NULL, + `purchase_cost` decimal(13,4) DEFAULT NULL, + `order_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `company_id` int(10) unsigned DEFAULT NULL, + `min_amt` int(11) DEFAULT NULL, + `model_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `manufacturer_id` int(11) DEFAULT NULL, + `item_no` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `consumables` +-- + +LOCK TABLES `consumables` WRITE; +/*!40000 ALTER TABLE `consumables` DISABLE KEYS */; +INSERT INTO `consumables` VALUES (1,'eget',17,49,1,322,0,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2011-01-03',85.9100,'T295T06V',17,NULL,NULL,NULL,NULL),(2,'Morbi',18,50,1,374,1,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2016-10-24',87.4200,'W787T62Q',6,NULL,NULL,NULL,NULL),(3,'arcu.',19,51,1,252,0,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2007-09-22',48.3400,'N961E50A',7,NULL,NULL,NULL,NULL),(4,'nec',20,52,1,30,1,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2009-08-16',8.7100,'X624N14C',9,NULL,NULL,NULL,NULL),(5,'Nam',21,NULL,1,551,1,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2017-03-30',24.0700,'N618A20S',1,NULL,NULL,NULL,NULL),(6,'Nullam',22,53,1,395,0,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2003-12-16',73.2300,'B386I67L',12,NULL,NULL,NULL,NULL),(7,'erat',23,54,1,297,1,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2010-08-03',17.4900,'G606H92I',5,NULL,NULL,NULL,NULL),(8,'purus',24,55,1,557,1,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2004-10-12',63.5200,'R660Z45O',11,NULL,NULL,NULL,NULL),(9,'dignissim',25,56,1,47,1,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2010-11-10',77.9400,'G230Z67X',6,NULL,NULL,NULL,NULL),(10,'Nam',26,57,1,310,0,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2015-01-25',64.3300,'B613L84C',4,NULL,NULL,NULL,NULL),(11,'Nunc',27,58,1,404,0,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2017-04-13',81.0200,'O367N55N',5,NULL,NULL,NULL,NULL),(12,'Phasellus',28,59,1,590,0,'2016-11-06 22:03:36','2016-11-06 22:03:36',NULL,'2005-12-23',70.6700,'K941C02T',5,NULL,NULL,NULL,NULL),(13,'Nulla',29,60,1,48,0,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2017-07-21',99.0400,'D663L90H',17,NULL,NULL,NULL,NULL),(14,'Sed',31,62,1,169,1,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2011-04-14',48.8600,'T666E70K',10,NULL,NULL,NULL,NULL),(15,'quis',32,63,1,264,0,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2014-01-08',55.6400,'T767G07U',17,NULL,NULL,NULL,NULL),(16,'viverra.',33,64,1,293,0,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2013-01-07',93.4800,'T276L44H',2,NULL,NULL,NULL,NULL),(17,'Sed',34,65,1,407,0,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2008-03-20',64.7500,'A933E55V',10,NULL,NULL,NULL,NULL),(18,'iaculis',35,66,1,115,0,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2015-07-17',56.7400,'N568F73C',5,NULL,NULL,NULL,NULL),(19,'leo.',36,67,1,208,1,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2012-12-09',96.8800,'H283Z42U',18,NULL,NULL,NULL,NULL),(20,'leo.',37,68,1,486,0,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2007-04-24',40.8700,'T054Q83U',17,NULL,NULL,NULL,NULL),(21,'pede.',30,69,1,214,1,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2010-09-29',19.6400,'L842O70A',11,NULL,NULL,NULL,NULL),(22,'massa',38,70,1,131,0,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2015-05-18',18.4300,'V029Q52K',3,NULL,NULL,NULL,NULL),(23,'urna',39,NULL,1,15,1,'2016-11-06 22:03:37','2016-11-06 22:03:37',NULL,'2014-10-22',7.4100,'Z708U15X',2,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `consumables` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `consumables_users` +-- + +DROP TABLE IF EXISTS `consumables_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `consumables_users` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `consumable_id` int(11) DEFAULT NULL, + `assigned_to` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `consumables_users` +-- + +LOCK TABLES `consumables_users` WRITE; +/*!40000 ALTER TABLE `consumables_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `consumables_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `custom_field_custom_fieldset` +-- + +DROP TABLE IF EXISTS `custom_field_custom_fieldset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custom_field_custom_fieldset` ( + `custom_field_id` int(11) NOT NULL, + `custom_fieldset_id` int(11) NOT NULL, + `order` int(11) NOT NULL, + `required` tinyint(1) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `custom_field_custom_fieldset` +-- + +LOCK TABLES `custom_field_custom_fieldset` WRITE; +/*!40000 ALTER TABLE `custom_field_custom_fieldset` DISABLE KEYS */; +INSERT INTO `custom_field_custom_fieldset` VALUES (1,1,1,0); +/*!40000 ALTER TABLE `custom_field_custom_fieldset` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `custom_fields` +-- + +DROP TABLE IF EXISTS `custom_fields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custom_fields` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `element` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `field_values` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `field_encrypted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `custom_fields` +-- + +LOCK TABLES `custom_fields` WRITE; +/*!40000 ALTER TABLE `custom_fields` DISABLE KEYS */; +INSERT INTO `custom_fields` VALUES (1,'MAC Address','regex:/^[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}$/','text',NULL,'2016-11-06 21:59:38',NULL,NULL,0); +/*!40000 ALTER TABLE `custom_fields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `custom_fieldsets` +-- + +DROP TABLE IF EXISTS `custom_fieldsets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custom_fieldsets` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `custom_fieldsets` +-- + +LOCK TABLES `custom_fieldsets` WRITE; +/*!40000 ALTER TABLE `custom_fieldsets` DISABLE KEYS */; +INSERT INTO `custom_fieldsets` VALUES (1,'Asset with MAC Address',NULL,NULL,NULL); +/*!40000 ALTER TABLE `custom_fieldsets` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `depreciations` +-- + +DROP TABLE IF EXISTS `depreciations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `depreciations` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `months` int(11) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `depreciations` +-- + +LOCK TABLES `depreciations` WRITE; +/*!40000 ALTER TABLE `depreciations` DISABLE KEYS */; +/*!40000 ALTER TABLE `depreciations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `groups` +-- + +DROP TABLE IF EXISTS `groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `groups` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `permissions` text COLLATE utf8_unicode_ci, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `groups` +-- + +LOCK TABLES `groups` WRITE; +/*!40000 ALTER TABLE `groups` DISABLE KEYS */; +/*!40000 ALTER TABLE `groups` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `license_seats` +-- + +DROP TABLE IF EXISTS `license_seats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `license_seats` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `license_id` int(11) DEFAULT NULL, + `assigned_to` int(11) DEFAULT NULL, + `notes` text COLLATE utf8_unicode_ci, + `user_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `asset_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `license_seats` +-- + +LOCK TABLES `license_seats` WRITE; +/*!40000 ALTER TABLE `license_seats` DISABLE KEYS */; +/*!40000 ALTER TABLE `license_seats` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `licenses` +-- + +DROP TABLE IF EXISTS `licenses`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `licenses` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `serial` varchar(2048) COLLATE utf8_unicode_ci DEFAULT NULL, + `purchase_date` date DEFAULT NULL, + `purchase_cost` decimal(8,2) DEFAULT NULL, + `order_number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `seats` int(11) NOT NULL DEFAULT '1', + `notes` text COLLATE utf8_unicode_ci, + `user_id` int(11) DEFAULT NULL, + `depreciation_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `license_name` varchar(120) COLLATE utf8_unicode_ci DEFAULT NULL, + `license_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `depreciate` tinyint(1) DEFAULT NULL, + `supplier_id` int(11) DEFAULT NULL, + `expiration_date` date DEFAULT NULL, + `purchase_order` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `termination_date` date DEFAULT NULL, + `maintained` tinyint(1) DEFAULT NULL, + `reassignable` tinyint(1) NOT NULL DEFAULT '1', + `company_id` int(10) unsigned DEFAULT NULL, + `manufacturer_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `licenses` +-- + +LOCK TABLES `licenses` WRITE; +/*!40000 ALTER TABLE `licenses` DISABLE KEYS */; +/*!40000 ALTER TABLE `licenses` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `locations` +-- + +DROP TABLE IF EXISTS `locations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `locations` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `state` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL, + `country` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `address` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, + `address2` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, + `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `parent_id` int(11) DEFAULT NULL, + `currency` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `locations` +-- + +LOCK TABLES `locations` WRITE; +/*!40000 ALTER TABLE `locations` DISABLE KEYS */; +INSERT INTO `locations` VALUES (1,'metus. Vivamus','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(2,'conubia','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(3,'Suspendisse eleifend.','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(4,'ipsum cursus vestibulum.','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(5,'Nunc laoreet lectus','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(6,'luctus','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(7,'euismod','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(8,'ipsum nunc','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(9,'et nunc. Quisque','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(10,'interdum. Curabitur','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(11,'sociis','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(12,'fermentum','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(13,'Vestibulum','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(14,'feugiat nec, diam.','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(15,'non magna.','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(16,'consectetuer rhoncus. Nullam','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(17,'viverra. Donec','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(18,'mus. Proin','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(19,'erat,','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(20,'Sed et libero.','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(21,'dolor,','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(22,'id,','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(23,'Mauris','','','','2016-11-06 22:01:57','2016-11-06 22:01:57',1,'',NULL,NULL,NULL,NULL,NULL),(25,'Daping','','','','2016-11-06 22:03:21','2016-11-06 22:03:21',1,'',NULL,NULL,NULL,NULL,NULL),(26,'Cirangga Kidul','','','','2016-11-06 22:03:21','2016-11-06 22:03:21',1,'',NULL,NULL,NULL,NULL,NULL),(27,'Shekou','','','','2016-11-06 22:03:21','2016-11-06 22:03:21',1,'',NULL,NULL,NULL,NULL,NULL),(28,'Leksand','','','','2016-11-06 22:03:21','2016-11-06 22:03:21',1,'',NULL,NULL,NULL,NULL,NULL),(29,'Dresi Wetan','','','','2016-11-06 22:03:21','2016-11-06 22:03:21',1,'',NULL,NULL,NULL,NULL,NULL),(30,'Dante Delgado','','','','2016-11-06 22:03:21','2016-11-06 22:03:21',1,'',NULL,NULL,NULL,NULL,NULL),(31,'Pingle','','','','2016-11-06 22:03:21','2016-11-06 22:03:21',1,'',NULL,NULL,NULL,NULL,NULL),(32,'Zhuli','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(33,'Niopanda','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(34,'Zoumaling','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(35,'Luts?k','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(36,'Pravdinsk','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(37,'Panay','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(38,'Achiaman','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(39,'Oemanu','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(40,'Qiaolin','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(41,'Accha','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(42,'Kerkrade','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(43,'Villa Regina','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(44,'Tibro','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(45,'Menglie','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(46,'Solidaridad','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(47,'Sorinomo','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(48,'Tamel','','','','2016-11-06 22:03:22','2016-11-06 22:03:22',1,'',NULL,NULL,NULL,NULL,NULL),(49,'mauris blandit mattis.','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(50,'iaculis','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(51,'ornare','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(52,'lectus','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(53,'Donec est mauris,','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(54,'Proin','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(55,'tellus justo sit','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(56,'nibh vulputate mauris','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(57,'taciti sociosqu ad','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(58,'nec orci.','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(59,'quis, tristique ac,','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(60,'augue malesuada malesuada.','','','','2016-11-06 22:03:36','2016-11-06 22:03:36',1,'',NULL,NULL,NULL,NULL,NULL),(61,'dolor sit amet,','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(62,'lectus convallis est,','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(63,'varius orci,','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(64,'cursus et, magna.','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(65,'arcu. Sed','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(66,'nec','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(67,'Aenean','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(68,'tincidunt adipiscing. Mauris','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(69,'nec enim. Nunc','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL),(70,'nisi magna sed','','','','2016-11-06 22:03:37','2016-11-06 22:03:37',1,'',NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `locations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `manufacturers` +-- + +DROP TABLE IF EXISTS `manufacturers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `manufacturers` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `manufacturers` +-- + +LOCK TABLES `manufacturers` WRITE; +/*!40000 ALTER TABLE `manufacturers` DISABLE KEYS */; +INSERT INTO `manufacturers` VALUES (1,'Unknown','2016-11-06 22:01:57','2016-11-06 22:01:57',1,NULL),(3,'Linkbridge','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL),(4,'Flipstorm','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL),(5,'Lajo','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL),(6,'Zoomlounge','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL),(7,'Kazu','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL),(8,'Layo','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL),(9,'Twiyo','2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL),(10,'Cogibox','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(11,'Flipbug','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(12,'Centimia','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(13,'Roombo','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(14,'Yakijo','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(15,'Oyope','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(16,'Flashset','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(17,'Chatterbridge','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(18,'Skipstorm','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(19,'Devpulse','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(20,'Photobug','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(21,'Photofeed','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(22,'Riffpath','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(23,'Aivee','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(24,'Abatz','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(25,'Blogtag','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(26,'Brightdog','2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL),(27,'Test Manufacturer','2016-11-06 22:35:47','2016-11-06 22:35:47',1,NULL); +/*!40000 ALTER TABLE `manufacturers` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `migrations` +-- + +DROP TABLE IF EXISTS `migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `migrations` ( + `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `batch` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `migrations` +-- + +LOCK TABLES `migrations` WRITE; +/*!40000 ALTER TABLE `migrations` DISABLE KEYS */; +INSERT INTO `migrations` VALUES ('2012_12_06_225921_migration_cartalyst_sentry_install_users',1),('2012_12_06_225929_migration_cartalyst_sentry_install_groups',1),('2012_12_06_225945_migration_cartalyst_sentry_install_users_groups_pivot',1),('2012_12_06_225988_migration_cartalyst_sentry_install_throttle',1),('2013_03_23_193214_update_users_table',1),('2013_11_13_075318_create_models_table',1),('2013_11_13_075335_create_categories_table',1),('2013_11_13_075347_create_manufacturers_table',1),('2013_11_15_015858_add_user_id_to_categories',1),('2013_11_15_112701_add_user_id_to_manufacturers',1),('2013_11_15_190327_create_assets_table',1),('2013_11_15_190357_create_licenses_table',1),('2013_11_15_201848_add_license_name_to_licenses',1),('2013_11_16_040323_create_depreciations_table',1),('2013_11_16_042851_add_depreciation_id_to_models',1),('2013_11_16_084923_add_user_id_to_models',1),('2013_11_16_103258_create_locations_table',1),('2013_11_16_103336_add_location_id_to_assets',1),('2013_11_16_103407_add_checkedout_to_to_assets',1),('2013_11_16_103425_create_history_table',1),('2013_11_17_054359_drop_licenses_table',1),('2013_11_17_054526_add_physical_to_assets',1),('2013_11_17_055126_create_settings_table',1),('2013_11_17_062634_add_license_to_assets',1),('2013_11_18_134332_add_contacts_to_users',1),('2013_11_18_142847_add_info_to_locations',1),('2013_11_18_152942_remove_location_id_from_asset',1),('2013_11_18_164423_set_nullvalues_for_user',1),('2013_11_19_013337_create_asset_logs_table',1),('2013_11_19_061409_edit_added_on_asset_logs_table',1),('2013_11_19_062250_edit_location_id_asset_logs_table',1),('2013_11_20_055822_add_soft_delete_on_assets',1),('2013_11_20_121404_add_soft_delete_on_locations',1),('2013_11_20_123137_add_soft_delete_on_manufacturers',1),('2013_11_20_123725_add_soft_delete_on_categories',1),('2013_11_20_130248_create_status_labels',1),('2013_11_20_130830_add_status_id_on_assets_table',1),('2013_11_20_131544_add_status_type_on_status_labels',1),('2013_11_20_134103_add_archived_to_assets',1),('2013_11_21_002321_add_uploads_table',1),('2013_11_21_024531_remove_deployable_boolean_from_status_labels',1),('2013_11_22_075308_add_option_label_to_settings_table',1),('2013_11_22_213400_edits_to_settings_table',1),('2013_11_25_013244_create_licenses_table',1),('2013_11_25_031458_create_license_seats_table',1),('2013_11_25_032022_add_type_to_actionlog_table',1),('2013_11_25_033008_delete_bad_licenses_table',1),('2013_11_25_033131_create_new_licenses_table',1),('2013_11_25_033534_add_licensed_to_licenses_table',1),('2013_11_25_101308_add_warrantee_to_assets_table',1),('2013_11_25_104343_alter_warranty_column_on_assets',1),('2013_11_25_150450_drop_parent_from_categories',1),('2013_11_25_151920_add_depreciate_to_assets',1),('2013_11_25_152903_add_depreciate_to_licenses_table',1),('2013_11_26_211820_drop_license_from_assets_table',1),('2013_11_27_062510_add_note_to_asset_logs_table',1),('2013_12_01_113426_add_filename_to_asset_log',1),('2013_12_06_094618_add_nullable_to_licenses_table',1),('2013_12_10_084038_add_eol_on_models_table',1),('2013_12_12_055218_add_manager_to_users_table',1),('2014_01_28_031200_add_qr_code_to_settings_table',1),('2014_02_13_183016_add_qr_text_to_settings_table',1),('2014_05_24_093839_alter_default_license_depreciation_id',1),('2014_05_27_231658_alter_default_values_licenses',1),('2014_06_19_191508_add_asset_name_to_settings',1),('2014_06_20_004847_make_asset_log_checkedout_to_nullable',1),('2014_06_20_005050_make_asset_log_purchasedate_to_nullable',1),('2014_06_24_003011_add_suppliers',1),('2014_06_24_010742_add_supplier_id_to_asset',1),('2014_06_24_012839_add_zip_to_supplier',1),('2014_06_24_033908_add_url_to_supplier',1),('2014_07_08_054116_add_employee_id_to_users',1),('2014_07_09_134316_add_requestable_to_assets',1),('2014_07_17_085822_add_asset_to_software',1),('2014_07_17_161625_make_asset_id_in_logs_nullable',1),('2014_08_12_053504_alpha_0_4_2_release',1),('2014_08_17_083523_make_location_id_nullable',1),('2014_10_16_200626_add_rtd_location_to_assets',1),('2014_10_24_000417_alter_supplier_state_to_32',1),('2014_10_24_015641_add_display_checkout_date',1),('2014_10_28_222654_add_avatar_field_to_users_table',1),('2014_10_29_045924_add_image_field_to_models_table',1),('2014_11_01_214955_add_eol_display_to_settings',1),('2014_11_04_231416_update_group_field_for_reporting',1),('2014_11_05_212408_add_fields_to_licenses',1),('2014_11_07_021042_add_image_to_supplier',1),('2014_11_20_203007_add_username_to_user',1),('2014_11_20_223947_add_auto_to_settings',1),('2014_11_20_224421_add_prefix_to_settings',1),('2014_11_21_104401_change_licence_type',1),('2014_12_09_082500_add_fields_maintained_term_to_licenses',1),('2015_02_04_155757_increase_user_field_lengths',1),('2015_02_07_013537_add_soft_deleted_to_log',1),('2015_02_10_040958_fix_bad_assigned_to_ids',1),('2015_02_10_053310_migrate_data_to_new_statuses',1),('2015_02_11_044104_migrate_make_license_assigned_null',1),('2015_02_11_104406_migrate_create_requests_table',1),('2015_02_12_001312_add_mac_address_to_asset',1),('2015_02_12_024100_change_license_notes_type',1),('2015_02_17_231020_add_localonly_to_settings',1),('2015_02_19_222322_add_logo_and_colors_to_settings',1),('2015_02_24_072043_add_alerts_to_settings',1),('2015_02_25_022931_add_eula_fields',1),('2015_02_25_204513_add_accessories_table',1),('2015_02_26_091228_add_accessories_user_table',1),('2015_02_26_115128_add_deleted_at_models',1),('2015_02_26_233005_add_category_type',1),('2015_03_01_231912_update_accepted_at_to_acceptance_id',1),('2015_03_05_011929_add_qr_type_to_settings',1),('2015_03_18_055327_add_note_to_user',1),('2015_04_29_234704_add_slack_to_settings',1),('2015_05_04_085151_add_parent_id_to_locations_table',1),('2015_05_22_124421_add_reassignable_to_licenses',1),('2015_06_10_003314_fix_default_for_user_notes',1),('2015_06_10_003554_create_consumables',1),('2015_06_15_183253_move_email_to_username',1),('2015_06_23_070346_make_email_nullable',1),('2015_06_26_213716_create_asset_maintenances_table',1),('2015_07_04_212443_create_custom_fields_table',1),('2015_07_09_014359_add_currency_to_settings_and_locations',1),('2015_07_21_122022_add_expected_checkin_date_to_asset_logs',1),('2015_07_24_093845_add_checkin_email_to_category_table',1),('2015_07_25_055415_remove_email_unique_constraint',1),('2015_07_29_230054_add_thread_id_to_asset_logs_table',1),('2015_07_31_015430_add_accepted_to_assets',1),('2015_09_09_195301_add_custom_css_to_settings',1),('2015_09_21_235926_create_custom_field_custom_fieldset',1),('2015_09_22_000104_create_custom_fieldsets',1),('2015_09_22_003321_add_fieldset_id_to_assets',1),('2015_09_22_003413_migrate_mac_address',1),('2015_09_28_003314_fix_default_purchase_order',1),('2015_10_01_024551_add_accessory_consumable_price_info',1),('2015_10_12_192706_add_brand_to_settings',1),('2015_10_22_003314_fix_defaults_accessories',1),('2015_10_23_182625_add_checkout_time_and_expected_checkout_date_to_assets',1),('2015_11_05_061015_create_companies_table',1),('2015_11_05_061115_add_company_id_to_consumables_table',1),('2015_11_05_183749_image',1),('2015_11_06_092038_add_company_id_to_accessories_table',1),('2015_11_06_100045_add_company_id_to_users_table',1),('2015_11_06_134742_add_company_id_to_licenses_table',1),('2015_11_08_035832_add_company_id_to_assets_table',1),('2015_11_08_222305_add_ldap_fields_to_settings',1),('2015_11_15_151803_add_full_multiple_companies_support_to_settings_table',1),('2015_11_26_195528_import_ldap_settings',1),('2015_11_30_191504_remove_fk_company_id',1),('2015_12_21_193006_add_ldap_server_cert_ignore_to_settings_table',1),('2015_12_30_233509_add_timestamp_and_userId_to_custom_fields',1),('2015_12_30_233658_add_timestamp_and_userId_to_custom_fieldsets',1),('2016_01_28_041048_add_notes_to_models',1),('2016_02_19_070119_add_remember_token_to_users_table',1),('2016_02_19_073625_create_password_resets_table',1),('2016_03_02_193043_add_ldap_flag_to_users',1),('2016_03_02_220517_update_ldap_filter_to_longer_field',1),('2016_03_08_225351_create_components_table',1),('2016_03_09_024038_add_min_stock_to_tables',1),('2016_03_10_133849_add_locale_to_users',1),('2016_03_10_135519_add_locale_to_settings',1),('2016_03_11_185621_add_label_settings_to_settings',1),('2016_03_22_125911_fix_custom_fields_regexes',1),('2016_04_28_141554_add_show_to_users',1),('2016_05_16_164733_add_model_mfg_to_consumable',1),('2016_05_19_180351_add_alt_barcode_settings',1),('2016_05_19_191146_add_alter_interval',1),('2016_05_19_192226_add_inventory_threshold',1),('2016_05_20_024859_remove_option_keys_from_settings_table',1),('2016_05_20_143758_remove_option_value_from_settings_table',1),('2016_06_01_140218_add_email_domain_and_format_to_settings',1),('2016_06_22_160725_add_user_id_to_maintenances',1),('2016_07_13_150015_add_is_ad_to_settings',1),('2016_07_14_153609_add_ad_domain_to_settings',1),('2016_07_22_003348_fix_custom_fields_regex_stuff',1),('2016_07_22_054850_one_more_mac_addr_fix',1),('2016_07_22_143045_add_port_to_ldap_settings',1),('2016_07_22_153432_add_tls_to_ldap_settings',1),('2016_07_27_211034_add_zerofill_to_settings',1),('2016_08_02_124944_add_color_to_statuslabel',1),('2016_08_04_134500_add_disallow_ldap_pw_sync_to_settings',1),('2016_08_09_002225_add_manufacturer_to_licenses',1),('2016_08_12_121613_add_manufacturer_to_accessories_table',1),('2016_08_23_143353_add_new_fields_to_custom_fields',1),('2016_08_23_145619_add_show_in_nav_to_status_labels',1),('2016_08_30_084634_make_purchase_cost_nullable',1),('2016_09_01_141051_add_requestable_to_asset_model',1),('2016_09_02_001448_create_checkout_requests_table',1),('2016_09_04_180400_create_actionlog_table',1),('2016_09_04_182149_migrate_asset_log_to_action_log',1),('2016_09_19_235935_fix_fieldtype_for_target_type',1),('2016_09_23_140722_fix_modelno_in_consumables_to_string',1),('2016_09_28_231359_add_company_to_logs',1),('2016_10_14_130709_fix_order_number_to_varchar',1),('2016_10_19_145520_fix_order_number_in_components_to_string',1),('2016_10_27_151715_add_serial_to_components',1),('2016_10_27_213251_increase_serial_field_capacity',1),('2016_10_29_002724_enable_2fa_fields',1),('2016_10_29_082408_add_signature_to_acceptance',1),('2016_11_01_030818_fix_forgotten_filename_in_action_logs',1),('2016_10_16_015024_rename_modelno_to_model_number',2),('2016_10_16_015211_rename_consumable_modelno_to_model_number',2),('2016_10_16_143235_rename_model_note_to_notes',2),('2016_10_16_165052_rename_component_total_qty_to_qty',2); +/*!40000 ALTER TABLE `migrations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `models` +-- + +DROP TABLE IF EXISTS `models`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `models` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `model_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `manufacturer_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `depreciation_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `eol` int(11) DEFAULT NULL, + `image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `deprecated_mac_address` tinyint(1) NOT NULL DEFAULT '0', + `deleted_at` timestamp NULL DEFAULT NULL, + `fieldset_id` int(11) DEFAULT NULL, + `notes` longtext COLLATE utf8_unicode_ci, + `requestable` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `models` +-- + +LOCK TABLES `models` WRITE; +/*!40000 ALTER TABLE `models` DISABLE KEYS */; +INSERT INTO `models` VALUES (1,'massa id','6377018600094472',3,16,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(2,'congue diam id','5.02043359569189E+018',4,16,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(3,'convallis tortor risus','374622546776765',5,16,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(4,'in faucibus orci','3549618015236095',6,16,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(5,'et ultrices','3567082842822626',7,16,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(6,'accumsan felis','30052522651756',8,16,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(7,'interdum mauris','3585438057660291',9,16,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(8,'sapien dignissim','3548511052883500',10,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(9,'et ultrices posuere cubilia','6.75911579996746E+017',11,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(10,'duis mattis egestas metus aenean','378342677410961',12,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(11,'quam sapien varius','201954480670574',13,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(12,'augue vestibulum rutrum rutrum neque','3567636803247485',14,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(13,'ante vel ipsum praesent blandit','3529462300753736',15,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(14,'dapibus dolor vel','3559785746335392',16,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(15,'dui proin','4070995882635',17,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(16,'odio porttitor id consequat in','36309149183447',18,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(17,'donec vitae nisi nam','3543783295297294',19,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(18,'eget tincidunt eget tempus','201967051902986',20,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(19,'at diam nam','3533016005480310',21,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(20,'luctus et ultrices','4547299861035',22,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(21,'dictumst morbi vestibulum','4405382067928809',23,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(22,'quis odio consequat varius integer','3537252931689981',24,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(23,'quam a odio in','5018304036665243',25,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(24,'in sapien iaculis congue vivamus','30355105682126',26,16,'2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,1,NULL,NULL,0,NULL,NULL,NULL,0),(25,'Test Asset Model','',27,16,'2016-11-06 22:37:35','2016-11-06 22:37:35',0,1,0,NULL,0,NULL,NULL,'',0); +/*!40000 ALTER TABLE `models` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `password_resets` +-- + +DROP TABLE IF EXISTS `password_resets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `password_resets` ( + `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + KEY `password_resets_email_index` (`email`), + KEY `password_resets_token_index` (`token`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `password_resets` +-- + +LOCK TABLES `password_resets` WRITE; +/*!40000 ALTER TABLE `password_resets` DISABLE KEYS */; +/*!40000 ALTER TABLE `password_resets` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `requested_assets` +-- + +DROP TABLE IF EXISTS `requested_assets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `requested_assets` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `asset_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `accepted_at` datetime DEFAULT NULL, + `denied_at` datetime DEFAULT NULL, + `notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `requested_assets` +-- + +LOCK TABLES `requested_assets` WRITE; +/*!40000 ALTER TABLE `requested_assets` DISABLE KEYS */; +/*!40000 ALTER TABLE `requested_assets` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `requests` +-- + +DROP TABLE IF EXISTS `requests`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `requests` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `asset_id` int(11) NOT NULL, + `user_id` int(11) DEFAULT NULL, + `request_code` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `requests` +-- + +LOCK TABLES `requests` WRITE; +/*!40000 ALTER TABLE `requests` DISABLE KEYS */; +/*!40000 ALTER TABLE `requests` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `settings` +-- + +DROP TABLE IF EXISTS `settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `settings` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `per_page` int(11) NOT NULL DEFAULT '20', + `site_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Snipe IT Asset Management', + `qr_code` int(11) DEFAULT NULL, + `qr_text` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `display_asset_name` int(11) DEFAULT NULL, + `display_checkout_date` int(11) DEFAULT NULL, + `display_eol` int(11) DEFAULT NULL, + `auto_increment_assets` int(11) NOT NULL DEFAULT '0', + `auto_increment_prefix` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `load_remote` tinyint(1) NOT NULL DEFAULT '1', + `logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `header_color` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `alert_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `alerts_enabled` tinyint(1) NOT NULL DEFAULT '1', + `default_eula_text` longtext COLLATE utf8_unicode_ci, + `barcode_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'QRCODE', + `slack_endpoint` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `slack_channel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `slack_botname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `default_currency` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `custom_css` text COLLATE utf8_unicode_ci, + `brand` tinyint(4) NOT NULL DEFAULT '1', + `ldap_enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ldap_server` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ldap_uname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ldap_pword` longtext COLLATE utf8_unicode_ci, + `ldap_basedn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ldap_filter` text COLLATE utf8_unicode_ci, + `ldap_username_field` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'samaccountname', + `ldap_lname_field` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'sn', + `ldap_fname_field` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'givenname', + `ldap_auth_filter_query` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'uid=samaccountname', + `ldap_version` int(11) DEFAULT '3', + `ldap_active_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ldap_emp_num` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ldap_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `full_multiple_companies_support` tinyint(1) NOT NULL DEFAULT '0', + `ldap_server_cert_ignore` tinyint(1) NOT NULL DEFAULT '0', + `locale` varchar(5) COLLATE utf8_unicode_ci DEFAULT 'en', + `labels_per_page` tinyint(4) NOT NULL DEFAULT '30', + `labels_width` decimal(6,5) NOT NULL DEFAULT '2.62500', + `labels_height` decimal(6,5) NOT NULL DEFAULT '1.00000', + `labels_pmargin_left` decimal(6,5) NOT NULL DEFAULT '0.21975', + `labels_pmargin_right` decimal(6,5) NOT NULL DEFAULT '0.21975', + `labels_pmargin_top` decimal(6,5) NOT NULL DEFAULT '0.50000', + `labels_pmargin_bottom` decimal(6,5) NOT NULL DEFAULT '0.50000', + `labels_display_bgutter` decimal(6,5) NOT NULL DEFAULT '0.07000', + `labels_display_sgutter` decimal(6,5) NOT NULL DEFAULT '0.05000', + `labels_fontsize` tinyint(4) NOT NULL DEFAULT '9', + `labels_pagewidth` decimal(7,5) NOT NULL DEFAULT '8.50000', + `labels_pageheight` decimal(7,5) NOT NULL DEFAULT '11.00000', + `labels_display_name` tinyint(4) NOT NULL DEFAULT '0', + `labels_display_serial` tinyint(4) NOT NULL DEFAULT '1', + `labels_display_tag` tinyint(4) NOT NULL DEFAULT '1', + `alt_barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'C128', + `alt_barcode_enabled` tinyint(1) DEFAULT '1', + `alert_interval` int(11) DEFAULT '30', + `alert_threshold` int(11) DEFAULT '5', + `email_domain` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_format` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'filastname', + `username_format` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'filastname', + `is_ad` tinyint(1) NOT NULL DEFAULT '0', + `ad_domain` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `ldap_port` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '389', + `ldap_tls` tinyint(1) NOT NULL DEFAULT '0', + `zerofill_count` int(11) NOT NULL DEFAULT '5', + `ldap_pw_sync` tinyint(1) NOT NULL DEFAULT '1', + `two_factor_enabled` tinyint(4) DEFAULT NULL, + `require_accept_signature` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `settings` +-- + +LOCK TABLES `settings` WRITE; +/*!40000 ALTER TABLE `settings` DISABLE KEYS */; +INSERT INTO `settings` VALUES (1,'2016-11-06 22:01:02','2016-11-06 22:01:02',1,20,'Test',NULL,NULL,NULL,NULL,NULL,0,'0',1,NULL,NULL,'snipe@google.com',1,NULL,'QRCODE',NULL,NULL,NULL,'USD',NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,'samaccountname','sn','givenname','uid=samaccountname',3,NULL,NULL,NULL,0,0,'en',30,2.62500,1.00000,0.21975,0.21975,0.50000,0.50000,0.07000,0.05000,9,8.50000,11.00000,0,1,1,'C128',1,30,5,'tews.com','filastname','filastname',0,NULL,'389',0,5,1,NULL,0); +/*!40000 ALTER TABLE `settings` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `status_labels` +-- + +DROP TABLE IF EXISTS `status_labels`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `status_labels` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `deployable` tinyint(1) NOT NULL DEFAULT '0', + `pending` tinyint(1) NOT NULL DEFAULT '0', + `archived` tinyint(1) NOT NULL DEFAULT '0', + `notes` text COLLATE utf8_unicode_ci, + `color` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `show_in_nav` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `status_labels` +-- + +LOCK TABLES `status_labels` WRITE; +/*!40000 ALTER TABLE `status_labels` DISABLE KEYS */; +INSERT INTO `status_labels` VALUES (1,'Pending',1,NULL,NULL,NULL,0,1,0,'These assets are not yet ready to be deployed, usually because of configuration or waiting on parts.',NULL,0),(2,'Ready to Deploy',1,NULL,NULL,NULL,1,0,0,'These assets are ready to deploy.',NULL,0),(3,'Archived',1,NULL,NULL,NULL,0,0,1,'These assets are no longer in circulation or viable.',NULL,0),(5,'Undeployable',NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,0,0,NULL,NULL,0),(6,'Lost',NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,0,0,NULL,NULL,0),(7,'Pending Diagnostics',NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,1,0,0,NULL,NULL,0); +/*!40000 ALTER TABLE `status_labels` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `suppliers` +-- + +DROP TABLE IF EXISTS `suppliers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `suppliers` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `address` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `address2` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `state` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL, + `country` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `email` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL, + `contact` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `notes` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `url` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, + `image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `suppliers` +-- + +LOCK TABLES `suppliers` WRITE; +/*!40000 ALTER TABLE `suppliers` DISABLE KEYS */; +INSERT INTO `suppliers` VALUES (1,'Blogspan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,NULL,NULL,NULL),(2,'Oyope',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,NULL,NULL,NULL),(3,'Unknown',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,NULL,NULL,NULL),(4,'Ntag',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:21','2016-11-06 22:03:21',1,NULL,NULL,NULL,NULL),(5,'Kwilith',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(6,'Linkbridge',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(7,'Wikizz',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(8,'Tagcat',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(9,'Meevee',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(10,'Shuffledrive',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(11,'Quamba',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(12,'Browsedrive',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(13,'Tekfly',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(14,'Quatz',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL),(15,'Mydeo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2016-11-06 22:03:22','2016-11-06 22:03:22',1,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `suppliers` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `throttle` +-- + +DROP TABLE IF EXISTS `throttle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `throttle` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned DEFAULT NULL, + `ip_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `attempts` int(11) NOT NULL DEFAULT '0', + `suspended` tinyint(1) NOT NULL DEFAULT '0', + `banned` tinyint(1) NOT NULL DEFAULT '0', + `last_attempt_at` timestamp NULL DEFAULT NULL, + `suspended_at` timestamp NULL DEFAULT NULL, + `banned_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `throttle_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `throttle` +-- + +LOCK TABLES `throttle` WRITE; +/*!40000 ALTER TABLE `throttle` DISABLE KEYS */; +/*!40000 ALTER TABLE `throttle` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `users` +-- + +DROP TABLE IF EXISTS `users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `users` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `permissions` text COLLATE utf8_unicode_ci, + `activated` tinyint(1) NOT NULL DEFAULT '0', + `activation_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `activated_at` timestamp NULL DEFAULT NULL, + `last_login` timestamp NULL DEFAULT NULL, + `persist_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `reset_password_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `first_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `last_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `website` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `country` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `gravatar` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `location_id` int(11) DEFAULT NULL, + `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `jobtitle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `manager_id` int(11) DEFAULT NULL, + `employee_num` text COLLATE utf8_unicode_ci, + `avatar` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `notes` text COLLATE utf8_unicode_ci, + `company_id` int(10) unsigned DEFAULT NULL, + `remember_token` text COLLATE utf8_unicode_ci, + `ldap_import` tinyint(1) NOT NULL DEFAULT '0', + `locale` varchar(5) COLLATE utf8_unicode_ci DEFAULT 'en', + `show_in_list` tinyint(1) NOT NULL DEFAULT '1', + `two_factor_secret` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `two_factor_enrolled` tinyint(1) NOT NULL DEFAULT '0', + `two_factor_optin` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `users_activation_code_index` (`activation_code`), + KEY `users_reset_password_code_index` (`reset_password_code`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `users` +-- + +LOCK TABLES `users` WRITE; +/*!40000 ALTER TABLE `users` DISABLE KEYS */; +INSERT INTO `users` VALUES (1,'snipe@google.com','$2y$10$oSjP81uCdXW.nAHBIPteA..DsLPhJBiwD1tfny4hY0Ndicv1B5Nk6','{\"superuser\":\"1\",\"admin\":\"0\",\"reports.view\":\"0\",\"assets.view\":\"0\",\"assets.create\":\"0\",\"assets.edit\":\"0\",\"assets.delete\":\"0\",\"assets.checkin\":\"0\",\"assets.checkout\":\"0\",\"assets.view.requestable\":\"0\",\"accessories.view\":\"0\",\"accessories.create\":\"0\",\"accessories.edit\":\"0\",\"accessories.delete\":\"0\",\"accessories.checkout\":\"0\",\"accessories.checkin\":\"0\",\"consumables.view\":\"0\",\"consumables.create\":\"0\",\"consumables.edit\":\"0\",\"consumables.delete\":\"0\",\"consumables.checkout\":\"0\",\"licenses.view\":\"0\",\"licenses.create\":\"0\",\"licenses.edit\":\"0\",\"licenses.delete\":\"0\",\"licenses.checkout\":\"0\",\"licenses.keys\":\"0\",\"components.view\":\"0\",\"components.create\":\"0\",\"components.edit\":\"0\",\"components.delete\":\"0\",\"components.checkout\":\"0\",\"components.checkin\":\"0\",\"users.view\":\"0\",\"users.create\":\"0\",\"users.edit\":\"0\",\"users.delete\":\"0\",\"self.two_factor\":\"0\"}',1,NULL,NULL,NULL,NULL,NULL,'snipe','Snipe','2016-11-06 22:01:02','2016-11-06 22:43:51',NULL,NULL,NULL,NULL,NULL,'','',NULL,'',NULL,'snipeit','',NULL,'kI2xkXMnCbh5YXRD9nBWqwauSIgANXp9DRzwbeapxFqtWs1qKxDFEOOaCqfE',0,'en',1,NULL,0,0),(3,'bnelson0@cdbaby.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Bonnie',' Nelson','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bnelson0',NULL,NULL,NULL,0,'en',1,NULL,0,0),(4,'jferguson1@state.tx.us','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Judith',' Ferguson','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'jferguson1',NULL,NULL,NULL,0,'en',1,NULL,0,0),(5,'mgibson2@wiley.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Mildred',' Gibson','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'mgibson2',NULL,NULL,NULL,0,'en',1,NULL,0,0),(6,'blee3@quantcast.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Brandon',' Lee','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'blee3',NULL,NULL,NULL,0,'en',1,NULL,0,0),(7,'bpowell4@tuttocitta.it','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Betty',' Powell','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bpowell4',NULL,NULL,NULL,0,'en',1,NULL,0,0),(8,'awheeler5@cocolog-nifty.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Anthony',' Wheeler','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'awheeler5',NULL,NULL,NULL,0,'en',1,NULL,0,0),(9,'dreynolds6@ustream.tv','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Dennis',' Reynolds','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'dreynolds6',NULL,NULL,NULL,0,'en',1,NULL,0,0),(10,'aarnold7@cbc.ca','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Andrea',' Arnold','2016-11-06 22:03:21','2016-11-06 22:03:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'aarnold7',NULL,NULL,NULL,0,'en',1,NULL,0,0),(11,'abutler8@wikia.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Anna',' Butler','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'abutler8',NULL,NULL,NULL,0,'en',1,NULL,0,0),(12,'mbennett9@diigo.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Mark',' Bennett','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'mbennett9',NULL,NULL,NULL,0,'en',1,NULL,0,0),(13,'ewheelera@google.de','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Emily',' Wheeler','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ewheelera',NULL,NULL,NULL,0,'en',1,NULL,0,0),(14,'wfoxb@virginia.edu','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Wanda',' Fox','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'wfoxb',NULL,NULL,NULL,0,'en',1,NULL,0,0),(15,'jgrantd@cpanel.net','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Janet',' Grant','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'jgrantd',NULL,NULL,NULL,0,'en',1,NULL,0,0),(16,'alarsone@tripod.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Antonio',' Larson','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'alarsone',NULL,NULL,NULL,0,'en',1,NULL,0,0),(17,'lpowellf@com.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Lois',' Powell','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'lpowellf',NULL,NULL,NULL,0,'en',1,NULL,0,0),(18,'malleng@com.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Mildred',' Allen','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'malleng',NULL,NULL,NULL,0,'en',1,NULL,0,0),(19,'caustinh@bigcartel.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Clarence',' Austin','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'caustinh',NULL,NULL,NULL,0,'en',1,NULL,0,0),(20,'wchavezi@blogs.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Walter',' Chavez','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'wchavezi',NULL,NULL,NULL,0,'en',1,NULL,0,0),(21,'melliottj@constantcontact.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Marie',' Elliott','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'melliottj',NULL,NULL,NULL,0,'en',1,NULL,0,0),(22,'bfordm@woothemes.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Benjamin',' Ford','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bfordm',NULL,NULL,NULL,0,'en',1,NULL,0,0),(23,'twarrenn@printfriendly.com','$2y$10$XXJbpVOtPb81jg0hRF9wRO9d62/qquyn5Pi7WLj/HHnxhEk4ThiZO',NULL,1,NULL,NULL,NULL,NULL,NULL,'Timothy',' Warren','2016-11-06 22:03:22','2016-11-06 22:03:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'twarrenn',NULL,NULL,NULL,0,'en',1,NULL,0,0); +/*!40000 ALTER TABLE `users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `users_groups` +-- + +DROP TABLE IF EXISTS `users_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `users_groups` ( + `user_id` int(10) unsigned NOT NULL, + `group_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`user_id`,`group_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `users_groups` +-- + +LOCK TABLES `users_groups` WRITE; +/*!40000 ALTER TABLE `users_groups` DISABLE KEYS */; +/*!40000 ALTER TABLE `users_groups` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2016-11-06 10:44:44 diff --git a/tests/acceptance/AccessoriesCept.php b/tests/acceptance/AccessoriesCept.php index 08f7e2ea0..ea23efd94 100644 --- a/tests/acceptance/AccessoriesCept.php +++ b/tests/acceptance/AccessoriesCept.php @@ -7,7 +7,7 @@ $I->wantTo('ensure that the accessories listing page loads without errors'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/accessories'); $I->waitForElement('.table', 5); // secs -$I->seeNumberOfElements('tr', [1,30]); +$I->seeNumberOfElements('table[name="accessories"] tr', [5,30]); $I->seeInTitle('Accessories'); $I->see('Accessories'); $I->seeInPageSource('admin/accessories/create'); diff --git a/tests/acceptance/AssetsCept.php b/tests/acceptance/AssetsCept.php index be5ff149d..a4b4c81ef 100644 --- a/tests/acceptance/AssetsCept.php +++ b/tests/acceptance/AssetsCept.php @@ -7,7 +7,7 @@ $I->amGoingTo('go to the assets listing page'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/hardware'); $I->waitForElement('.table', 5); // secs -$I->seeNumberOfElements('tr', [1,50]); +$I->seeNumberOfElements('table[name="assets"] tr', [5,50]); $I->seeInTitle('Assets'); $I->see('Assets'); $I->seeInPageSource('hardware/create'); @@ -18,7 +18,6 @@ $I->see('Assets', 'h1.pull-left'); /* Create Form */ $I->wantTo('ensure that the create assets form loads without errors'); $I->lookForwardTo('seeing it load without errors'); -$I->click(['link' => 'Create New']); $I->amOnPage('/hardware/create'); $I->dontSee('Create Asset', '.page-header'); $I->see('Create Asset', 'h1.pull-left'); diff --git a/tests/acceptance/CategoriesCept.php b/tests/acceptance/CategoriesCept.php index 3fd7ad9a0..74db4f613 100644 --- a/tests/acceptance/CategoriesCept.php +++ b/tests/acceptance/CategoriesCept.php @@ -5,8 +5,8 @@ $I->am('logged in user'); $I->wantTo('ensure that the categories listing page loads without errors'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/settings/categories'); -$I->waitForElement('.table', 10); // secs -$I->seeNumberOfElements('tr', [1,100]); +$I->waitForElement('.table', 5); // secs +$I->seeNumberOfElements('table[name="categories"] tr', [5,30]); $I->seeInTitle('Categories'); $I->see('Categories'); $I->seeInPageSource('admin/settings/categories/create'); @@ -21,9 +21,3 @@ $I->amOnPage('/admin/settings/categories/create'); $I->dontSee('Create Category', '.page-header'); $I->see('Create Category', 'h1.pull-left'); $I->dontSee('<span class="'); - -$I->fillField('name', \App\Helpers\Helper::generateRandomString(15)); -$I->selectOption('form select[name=category_type]', 'Asset'); -$I->click('Save'); -$I->dontSee('<span class="'); -$I->dontSeeElement('.alert-danger'); diff --git a/tests/acceptance/CompaniesCept.php b/tests/acceptance/CompaniesCept.php index ff07d3c51..f68a31268 100644 --- a/tests/acceptance/CompaniesCept.php +++ b/tests/acceptance/CompaniesCept.php @@ -7,7 +7,7 @@ $I->wantTo('ensure that the company listing page loads without errors'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/settings/companies'); $I->waitForElement('.table', 5); // secs -$I->seeNumberOfElements('tr', [0,30]); +$I->seeNumberOfElements('table[name="companies"] tr', [5,30]); $I->seeInTitle('Companies'); $I->see('Companies'); $I->seeInPageSource('admin/settings/companies/create'); diff --git a/tests/acceptance/ConsumablesCept.php b/tests/acceptance/ConsumablesCept.php index 5a7f36798..4c6ef64e1 100644 --- a/tests/acceptance/ConsumablesCept.php +++ b/tests/acceptance/ConsumablesCept.php @@ -6,7 +6,7 @@ $I->wantTo('ensure that the consumables listing page loads without errors'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/consumables'); $I->waitForElement('.table', 5); // secs -$I->seeNumberOfElements('tr', [1,30]); +$I->seeNumberOfElements('table[name="consumables"] tr', [5,30]); $I->seeInTitle('Consumables'); $I->see('Consumables'); $I->seeInPageSource('admin/consumables/create'); diff --git a/tests/acceptance/DepreciationsCept.php b/tests/acceptance/DepreciationsCept.php index 8bd8688a8..ca0266f99 100644 --- a/tests/acceptance/DepreciationsCept.php +++ b/tests/acceptance/DepreciationsCept.php @@ -3,12 +3,12 @@ $I = new AcceptanceTester($scenario); AcceptanceTester::test_login($I); $I->am('logged in user'); $I->wantTo('ensure that depreciations page loads without errors'); -$I->amGoingTo('go to the assets listing page'); +$I->amGoingTo('go to the depreciations listing page'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/settings/depreciations'); $I->seeInTitle('Depreciations'); $I->waitForElement('.table', 5); // secs -$I->seeNumberOfElements('tr', [0,10]); +$I->seeNumberOfElements('table[name="depreciations"] tbody tr', 1); $I->seeInPageSource('/admin/settings/depreciations/create'); $I->dontSee('Depreciations', '.page-header'); $I->see('Depreciations', 'h1.pull-left'); diff --git a/tests/acceptance/LocationsCept.php b/tests/acceptance/LocationsCept.php index a36d5573a..aa34a684c 100644 --- a/tests/acceptance/LocationsCept.php +++ b/tests/acceptance/LocationsCept.php @@ -6,7 +6,7 @@ $I->wantTo('ensure that the locations listing page loads without errors'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/settings/locations'); $I->waitForElement('.table', 5); // secs -$I->seeNumberOfElements('tr', [1,10]); +$I->seeNumberOfElements('tr', [5,30]); $I->seeInTitle('Locations'); $I->see('Locations'); $I->seeInPageSource('admin/settings/locations/create'); diff --git a/tests/acceptance/ManufacturersCept.php b/tests/acceptance/ManufacturersCept.php index 8b83430a5..ad7beadeb 100644 --- a/tests/acceptance/ManufacturersCept.php +++ b/tests/acceptance/ManufacturersCept.php @@ -5,7 +5,7 @@ $I->am('logged in user'); $I->wantTo('ensure that the manufacturers listing page loads without errors'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/settings/manufacturers'); -$I->seeNumberOfElements('tr', [1,10]); +$I->seeNumberOfElements('table[name="manufacturers"] tr', [5,30]); $I->see('Manufacturers'); $I->seeInTitle('Manufacturers'); $I->seeInPageSource('admin/settings/manufacturers/create'); diff --git a/tests/acceptance/SuppliersCept.php b/tests/acceptance/SuppliersCept.php index cf65d3011..92bdf9c58 100644 --- a/tests/acceptance/SuppliersCept.php +++ b/tests/acceptance/SuppliersCept.php @@ -6,7 +6,7 @@ $I->wantTo('ensure that the suppliers listing page loads without errors'); $I->lookForwardTo('seeing it load without errors'); $I->amOnPage('/admin/settings/suppliers'); $I->waitForElement('.table', 5); // secs -$I->seeNumberOfElements('tr', [1,10]); +$I->seeNumberOfElements('table[name="suppliers"] tr', [5,25]); $I->seeInTitle('Suppliers'); $I->see('Suppliers'); $I->seeInPageSource('admin/settings/suppliers/create'); diff --git a/tests/acceptance/UsersCept.php b/tests/acceptance/UsersCept.php index 5c5ae71ec..06c2e78e9 100644 --- a/tests/acceptance/UsersCept.php +++ b/tests/acceptance/UsersCept.php @@ -13,6 +13,7 @@ $I->see('Users'); $I->seeInPageSource('admin/users/create'); $I->dontSee('Users', '.page-header'); $I->see('Users', 'h1.pull-left'); +$I->seeLink('Create New'); // matches Logout /* Create form */ diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml index 44ce31e53..36b59dd11 100644 --- a/tests/functional.suite.yml +++ b/tests/functional.suite.yml @@ -6,6 +6,15 @@ class_name: FunctionalTester modules: - enabled: - - Laravel5 + enabled: + # add framework module here - \Helper\Functional + - Laravel5: + environment_file: .env.tests + - Db: + dsn: 'mysql:host=localhost;dbname=snipeittests' + user: 'snipeit' + password: 'snipe' + dump: tests/_data/dump.sql + populate: true + cleanup: false diff --git a/tests/functional/AccessoriesCest.php b/tests/functional/AccessoriesCest.php new file mode 100644 index 000000000..125e76e0d --- /dev/null +++ b/tests/functional/AccessoriesCest.php @@ -0,0 +1,78 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create accessories form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/accessories/create'); + $I->dontSee('Create Accessory', '.page-header'); + $I->see('Create Accessory', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/accessories/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + $I->see('The category id field is required.', '.alert-msg'); + $I->see('The qty field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/accessories/create'); + $I->fillField('name', 't2'); + $I->fillField('qty', '-15'); + $I->fillField('min_amt', '-15'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + $I->see('The category id field is required', '.alert-msg'); + $I->see('The qty must be at least 1', '.alert-msg'); + $I->see('The min amt must be at least 0', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'company_id' => 3, + 'name' => 'TestAccessory', + 'category_id' => 40, + 'manufacturer_id' => 24, + 'location_id' => 38, + 'order_number' => '12345', + 'purchase_date' => '2016-01-01', + 'purchase_cost' => '25.00', + 'qty' => '12', + 'min_amt' => '6' + ]; + + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/accessories/create'); + + $I->submitForm('form#create-form', $values); + $I->seeRecord('accessories', $values); + + $I->dontSee('<span class="'); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/AssetModelsCest.php b/tests/functional/AssetModelsCest.php new file mode 100644 index 000000000..32c1b6ef0 --- /dev/null +++ b/tests/functional/AssetModelsCest.php @@ -0,0 +1,60 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('Test Asset Model Creation'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/hardware/models/create'); + $I->seeInTitle('Create Asset Model'); + $I->see('Create Asset Model', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/hardware/models/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + $I->see('The manufacturer id field is required.', '.alert-msg'); + $I->see('The category id field is required.', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'TestModel', + 'manufacturer_id' => '24', + 'category_id' => '40', + 'model_number' => '350335', + 'eol' => '12', + 'notes' => 'lorem ipsum blah blah', + 'requestable' => true, + ]; + + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/hardware/models/create'); + + $I->submitForm('form#create-form', $values); + $I->seeRecord('models', $values); + $I->dontSee('<span class="'); + $I->seeElement('.alert-success'); + } + +} diff --git a/tests/functional/AssetsCest.php b/tests/functional/AssetsCest.php new file mode 100644 index 000000000..52171f507 --- /dev/null +++ b/tests/functional/AssetsCest.php @@ -0,0 +1,65 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create assets form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/hardware/create'); + $I->dontSee('Create Asset', '.page-header'); + $I->see('Create Asset', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/hardware/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The asset tag field is required.', '.alert-msg'); + $I->see('The model id field is required.', '.alert-msg'); + $I->see('The status id field is required.', '.alert-msg'); + } + + public function passesCreateAndCheckout(FunctionalTester $I) + { + $values = [ + 'company_id' => 3, + 'asset_tag' => '230-name-21 2', + 'model_id' => 10, + 'status_id' => 2, + 'assigned_to' => 10, + 'serial' => '350335', + 'name' => 'TestModel', + 'purchase_date' => '2016-01-01', + 'supplier_id' => 12, + 'order_number' => '12345', + 'purchase_cost' => '25.00', + 'warranty_months' => '15', + 'notes' => 'lorem ipsum blah blah', + 'rtd_location_id' => 38, + 'requestable' => true, + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/hardware/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('assets', $values); + $I->dontSeeElement('.alert-danger'); // We should check for success, but we can't because of the stupid ajaxy way I did things. FIXME when the asset form is rewritten. + } +} + \ No newline at end of file diff --git a/tests/functional/CategoriesCest.php b/tests/functional/CategoriesCest.php new file mode 100644 index 000000000..5420db7ea --- /dev/null +++ b/tests/functional/CategoriesCest.php @@ -0,0 +1,54 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('Test Category Creation'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/settings/categories/create'); + $I->seeInTitle('Create Category'); + $I->see('Create Category', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/settings/categories/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + $I->see('The category type field is required.', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'TestModel', + 'category_type' => 'accessory', + 'eula_text' => 'lorem ipsum blah blah', + 'require_acceptance' => true, + 'checkin_email' => true, + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/settings/categories/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('categories', $values); + $I->dontSee('<span class="'); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/CompaniesCest.php b/tests/functional/CompaniesCest.php new file mode 100644 index 000000000..b16a1ee4e --- /dev/null +++ b/tests/functional/CompaniesCest.php @@ -0,0 +1,50 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('Test Company Creation'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/settings/companies/create'); + $I->seeInTitle('Create Company'); + $I->see('Create Company', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/settings/companies/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'TestCompany' + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/settings/companies/create'); + $I->fillField('name', 'TestCompany'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('companies', $values); + $I->dontSee('<span class="'); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/ComponentsCest.php b/tests/functional/ComponentsCest.php new file mode 100644 index 000000000..cb48f0892 --- /dev/null +++ b/tests/functional/ComponentsCest.php @@ -0,0 +1,74 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create components form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/components/create'); + $I->dontSee('Create Component', '.page-header'); + $I->see('Create Component', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/components/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + $I->see('The category id field is required.', '.alert-msg'); + $I->see('The qty field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/components/create'); + $I->fillField('name', 't2'); + $I->fillField('qty', '-15'); + $I->fillField('min_amt', '-15'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + $I->see('The qty must be at least 1', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'TestComponent', + 'category_id' => 41, + 'location_id' => '38', + 'qty' => '12', + 'min_amt' => '6', + 'serial' => '3062436032621632326-325632523', + 'company_id' => 3, + 'order_number' => '12345', + 'purchase_date' => '2016-01-01', + 'purchase_cost' => '25.00', + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/components/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('components', $values); + $I->dontSee('<span class="'); + $I->seeElement('.alert-success'); + } + +} diff --git a/tests/functional/ConsumablesCest.php b/tests/functional/ConsumablesCest.php new file mode 100644 index 000000000..d3490df9c --- /dev/null +++ b/tests/functional/ConsumablesCest.php @@ -0,0 +1,73 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create consumables form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/consumables/create'); + $I->dontSee('Create Consumable', '.page-header'); + $I->see('Create Consumable', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/consumables/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + $I->see('The category id field is required.', '.alert-msg'); + $I->see('The qty field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/consumables/create'); + $I->fillField('name', 't2'); + $I->fillField('qty', '-15'); + $I->fillField('min_amt', '-15'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + $I->see('The qty must be at least 0', '.alert-msg'); + $I->see('The min amt must be at least 1', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'company_id' => 3, + 'name' => 'TestConsumable', + 'category_id' => 43, + 'model_number' => '032-356', + 'item_no' => '32503', + 'order_number' => '12345', + 'purchase_date' => '2016-01-01', + 'purchase_cost' => '25.00', + 'qty' => '12', + 'min_amt' => '6', + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/consumables/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('consumables', $values); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/DepreciationsCest.php b/tests/functional/DepreciationsCest.php new file mode 100644 index 000000000..2a9e5e157 --- /dev/null +++ b/tests/functional/DepreciationsCest.php @@ -0,0 +1,61 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('Test Depreciation Creation'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/settings/depreciations/create'); + $I->seeInTitle('Create Depreciation'); + $I->dontSee('Create Depreciation', '.page-header'); + $I->see('Create Depreciation', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/settings/depreciations/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + $I->see('The months field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/settings/depreciations/create'); + $I->fillField('name', 't2'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'TestDepreciation', + 'months' => '15' + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/settings/depreciations/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('depreciations', $values); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/GroupsCest.php b/tests/functional/GroupsCest.php new file mode 100644 index 000000000..57d2e42db --- /dev/null +++ b/tests/functional/GroupsCest.php @@ -0,0 +1,57 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create groups form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/groups/create'); + $I->dontSee('Create New Group', '.page-header'); + $I->see('Create New Group', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/groups/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/groups/create'); + $I->fillField('name', 't2'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/groups/create'); + $I->fillField('name', 'TestGroup'); + $I->click('Save'); + $I->dontSee('<span class="'); + $I->seeElement('.alert-success'); + } + +} diff --git a/tests/functional/LicensesCest.php b/tests/functional/LicensesCest.php new file mode 100644 index 000000000..b706a5eba --- /dev/null +++ b/tests/functional/LicensesCest.php @@ -0,0 +1,83 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create licenses form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/licenses/create'); + $I->dontSee('Create License', '.page-header'); + $I->see('Create License', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/licenses/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + $I->see('The serial field is required.', '.alert-msg'); + $I->see('The seats field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/licenses/create'); + $I->fillField('name', 't2'); + $I->fillField('serial', '13a-'); + $I->fillField('seats', '-15'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + $I->see('The serial must be at least 5 characters', '.alert-msg'); + $I->see('The seats must be at least 1', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'Test Software', + 'serial' => '946346-436346-346436', + 'seats' => '12', + 'company_id' => 3, + 'manufacturer_id' => 24, + 'license_name' => 'Marco Polo', + 'license_email' => 'g@m.com', + 'reassignable' => true, + 'supplier_id' => 11, + 'order_number' => '12345', + 'purchase_cost' => '25.00', + 'purchase_date' => '2016-01-01', + 'expiration_date' => '2018-01-01', + 'termination_date' => '2020-01-01', + 'purchase_order' => '234562', + 'maintained' => true, + 'notes' => 'lorem ipsum omicron delta phi' + ]; + + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/licenses/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('licenses', $values); + $I->dontSee('<span class="'); + $I->seeElement('.alert-success'); + } + +} diff --git a/tests/functional/LocationsCest.php b/tests/functional/LocationsCest.php new file mode 100644 index 000000000..d8babf1e5 --- /dev/null +++ b/tests/functional/LocationsCest.php @@ -0,0 +1,74 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + /* Create Form */ + $I->wantTo('Test Location Creation'); + $I->lookForwardTo('Finding no Failures'); + $I->amOnPage('/admin/settings/locations/create'); + $I->dontSee('Create Location', '.page-header'); + $I->see('Create Location', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/settings/locations/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short values"); + $I->amOnPage('/admin/settings/locations/create'); + $I->fillField('name', 't2'); + $I->fillField('address', 't2da'); + $I->fillField('city', 't2'); + $I->fillField('state', 't'); + $I->fillField('zip', 't2'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + $I->see('The address must be at least 5 characters', '.alert-msg'); + $I->see('The city must be at least 3 characters', '.alert-msg'); + $I->see('The zip must be at least 3 characters', '.alert-msg'); + } + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'Test Location', + 'parent_id' => 26, + 'currency' => 'YEN', + 'address' => '046t46 South Street', + 'address2' => 'Apt 356', + 'city' => 'Sutherland', + 'state' => 'BV', + 'country' => 'AF', + 'zip' => '30266', + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/settings/locations/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('locations', $values); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/ManufacturersCest.php b/tests/functional/ManufacturersCest.php new file mode 100644 index 000000000..4b7e54d5d --- /dev/null +++ b/tests/functional/ManufacturersCest.php @@ -0,0 +1,57 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('Test Manufacturer Creation'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/settings/manufacturers/create'); + $I->seeInTitle('Create Manufacturer'); + $I->see('Create Manufacturer', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/settings/manufacturers/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/settings/manufacturers/create'); + $I->fillField('name', 't'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 2 characters', '.alert-msg'); + } + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'Testufacturer' + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/settings/manufacturers/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('manufacturers', $values); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/StatusLabelsCest.php b/tests/functional/StatusLabelsCest.php new file mode 100644 index 000000000..0cce0f6d0 --- /dev/null +++ b/tests/functional/StatusLabelsCest.php @@ -0,0 +1,62 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create statuslabels form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/settings/statuslabels/create'); + $I->dontSee('Create Status Label', '.page-header'); + $I->see('Create Status Label', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/settings/statuslabels/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + } + + public function passesCorrectValidation(FunctionalTester $I) + { + $submitValues = [ + 'name' => 'Test Status', + 'statuslabel_types' => 'pending', + 'color' => '#b46262', + 'notes' => 'lorem ipsum something else', + 'show_in_nav' => true, + ]; + + $recordValues = [ + 'name' => 'Test Status', + 'pending' => 1, + 'deployable' => 0, + 'archived' => 0, + 'color' => '#b46262', + 'notes' => 'lorem ipsum something else', + 'show_in_nav' => true, + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/settings/statuslabels/create'); + $I->submitForm('form#create-form', $submitValues); + $I->seeRecord('status_labels', $recordValues); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/SuppliersCest.php b/tests/functional/SuppliersCest.php new file mode 100644 index 000000000..4e1ad0432 --- /dev/null +++ b/tests/functional/SuppliersCest.php @@ -0,0 +1,69 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(FunctionalTester $I) + { + } + + // tests + public function tryToTest(FunctionalTester $I) + { + $I->wantTo('ensure that the create settings/suppliers form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/settings/suppliers/create'); + $I->dontSee('Create Supplier', '.page-header'); + $I->see('Create Supplier', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/settings/suppliers/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/settings/suppliers/create'); + $I->fillField('name', 't2'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The name must be at least 3 characters', '.alert-msg'); + } + public function passesCorrectValidation(FunctionalTester $I) + { + $values = [ + 'name' => 'Test Supplier', + 'address' => '046t46 South Street', + 'address2' => 'Apt 356', + 'city' => 'Sutherland', + 'state' => 'BV', + 'country' => 'AF', + 'zip' => '30266', + 'contact' => 'Mr. Smith', + 'phone' => '032626236 x35', + 'fax' => '342 33 6647 3555', + 'email' => 'p@roar.com', + 'url' => 'http://snipeitapp.com', + 'notes' => 'lorem ipsum indigo something' + ]; + $I->wantTo("Test Validation Succeeds"); + $I->amOnPage('/admin/settings/suppliers/create'); + $I->submitForm('form#create-form', $values); + $I->seeRecord('suppliers', $values); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/UsersCest.php b/tests/functional/UsersCest.php new file mode 100644 index 000000000..90de61ee3 --- /dev/null +++ b/tests/functional/UsersCest.php @@ -0,0 +1,93 @@ +amOnPage('/login'); + $I->fillField('username', 'snipeit'); + $I->fillField('password', 'snipeit'); + $I->click('Login'); + } + + public function _after(\FunctionalTester $I) + { + } + + // tests + public function tryToTest(\FunctionalTester $I) + { + $I->wantTo('ensure that the create users form loads without errors'); + $I->lookForwardTo('seeing it load without errors'); + $I->amOnPage('/admin/users/create'); + $I->dontSee('Create User', '.page-header'); + $I->see('Create User', 'h1.pull-left'); + } + + public function failsEmptyValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with blank elements"); + $I->amOnPage('/admin/users/create'); + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The first name field is required.', '.alert-msg'); + $I->see('The username field is required.', '.alert-msg'); + $I->see('The password field is required.', '.alert-msg'); + } + + public function failsShortValidation(FunctionalTester $I) + { + $I->wantTo("Test Validation Fails with short name"); + $I->amOnPage('/admin/users/create'); + $I->fillField('first_name', 't2'); + $I->fillField('last_name', 't2'); + $I->fillField('username', 'a'); // Must be 2 chars + $I->fillField('password', '12345'); // Must be 6 chars + $I->click('Save'); + $I->seeElement('.alert-danger'); + $I->see('The username must be at least 2 characters', '.alert-msg'); + $I->see('The password must be at least 6 characters', '.alert-msg'); + $I->see('The password confirm field is required when password is present', '.alert-msg'); + + } + public function passesCorrectValidation(FunctionalTester $I) + { + $submitValues = [ + 'first_name' => 'John', + 'last_name' => 'Smdt', + 'username' => 'jsmdt', + 'password' => 'Sutherland', + 'password_confirm' => 'Sutherland', + 'email' => 'g@roar.com', + 'company_id' => 3, + 'locale' => 'en-GB', + 'employee_num' => '1636 636', + 'jobtitle' => 'Robot', + 'manager_id' => 19, + 'location_id' => 67, + 'phone' => '35235 33535 x5', + 'activated' => true, + 'notes' => 'lorem ipsum indigo something' + ]; + $storedValues = [ + 'first_name' => 'John', + 'last_name' => 'Smdt', + 'username' => 'jsmdt', + 'email' => 'g@roar.com', + 'company_id' => 3, + 'locale' => 'en-GB', + 'employee_num' => '1636 636', + 'jobtitle' => 'Robot', + 'manager_id' => 19, + 'location_id' => 67, + 'phone' => '35235 33535 x5', + 'activated' => true, + 'notes' => 'lorem ipsum indigo something' + ]; + $I->amOnPage('/admin/users/create'); + $I->wantTo("Test Validation Succeeds"); + $I->submitForm('form#userForm', $submitValues); + $I->seeRecord('users', $storedValues); + $I->seeElement('.alert-success'); + } +} diff --git a/tests/functional/_bootstrap.php b/tests/functional/_bootstrap.php index 8a8855580..f7cbed7bb 100644 --- a/tests/functional/_bootstrap.php +++ b/tests/functional/_bootstrap.php @@ -1,2 +1,6 @@