Skip to content

A free open source IT asset/license management system

Partialize forms (#2884)

Daniel Meltzerd722ed38234d
diff --git a/.env.tests b/.env.tests
new file mode 100644
index 0000000000..6349562fbf
--- /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 63f9aeb77d..c777a35809 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 1c2e4269cd..430727b8fa 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 33d49d35be..ee11627e9c 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 31411f2a4b..f45fd1c163 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!='') ? '<img src="'.config('app.url').'/uploads/models/'.$model->image.'" height=50 width=50>' : '',
- '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 f3cc630f99..8ad41b9ccb 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' => '<a title="'.e($asset->asset_tag).'" href="hardware/'.$asset->id.'/view">'.e($asset->asset_tag).'</a>',
'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 600336e805..f08cd3b2a0 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 9d05c39fef..093ba8415c 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 998558d4c5..1bba51ca67 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' =>'<div class="text-center"><input type="checkbox" name="component['.$component->id.']" class="one_required"></div>',
'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 e053107461..92673ac45c 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 59dc78d08d..f3fba5495e 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 9c04518e7f..fdc7a22df2 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 e8589b62c4..cee02f7a8a 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 640ae891dc..eba506f52a 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 b0927c1c55..faad723fe0 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 f680ec5696..08a3df65fe 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 23ecc16f9e..d6114c2b05 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 e6ac13a833..43d0fddafe 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 2e7e43b0d6..42addbf9e5 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 2c2594807b..7462b18455 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 9354833f7e..52ffe2a273 100755
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -1,10 +1,11 @@
<?php
namespace App\Models;
+use App\Http\Traits\UniqueUndeletedTrait;
+use App\Models\SnipeModel;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Watson\Validating\ValidatingTrait;
-use App\Http\Traits\UniqueUndeletedTrait;
/**
* Model for Categories. Categories are a higher-level group
@@ -14,7 +15,7 @@ use App\Http\Traits\UniqueUndeletedTrait;
*
* @version v1.0
*/
-class Category extends Model
+class Category extends SnipeModel
{
use SoftDeletes;
diff --git a/app/Models/Company.php b/app/Models/Company.php
index f86a9a5320..a2609de6c6 100644
--- a/app/Models/Company.php
+++ b/app/Models/Company.php
@@ -1,17 +1,18 @@
<?php
namespace App\Models;
-use Illuminate\Database\Eloquent\Model;
-use Watson\Validating\ValidatingTrait;
+use App\Models\SnipeModel;
use Auth;
use DB;
+use Illuminate\Database\Eloquent\Model;
+use Watson\Validating\ValidatingTrait;
/**
* Model for Companies.
*
* @version v1.8
*/
-final class Company extends Model
+final class Company extends SnipeModel
{
protected $table = 'companies';
diff --git a/app/Models/Component.php b/app/Models/Component.php
index c73c9d53e1..e278f43002 100644
--- a/app/Models/Component.php
+++ b/app/Models/Component.php
@@ -7,6 +7,7 @@ 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;
@@ -17,7 +18,7 @@ use Watson\Validating\ValidatingTrait;
*
* @version v1.0
*/
-class Component extends Model
+class Component extends SnipeModel
{
use CompanyableTrait;
use Loggable;
@@ -32,7 +33,7 @@ class Component extends Model
*/
public $rules = array(
'name' => '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 a94f8f4162..e65e89cb96 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 d5e3670471..ee12a6506a 100644
--- a/app/Models/Depreciable.php
+++ b/app/Models/Depreciable.php
@@ -1,10 +1,11 @@
<?php
namespace App\Models;
-use Illuminate\Database\Eloquent\Model;
use App\Models\Depreciation;
+use App\Models\SnipeModel;
+use Illuminate\Database\Eloquent\Model;
-class Depreciable extends Model
+class Depreciable extends SnipeModel
{
/**
* Depreciation Relation, and associated helper methods
diff --git a/app/Models/Depreciation.php b/app/Models/Depreciation.php
index 48e8e7d8b5..79716225a7 100755
--- a/app/Models/Depreciation.php
+++ b/app/Models/Depreciation.php
@@ -1,10 +1,11 @@
<?php
namespace App\Models;
+use App\Models\SnipeModel;
use Illuminate\Database\Eloquent\Model;
use Watson\Validating\ValidatingTrait;
-class Depreciation extends Model
+class Depreciation extends SnipeModel
{
// Declare the rules for the form validation
protected $rules = array(
diff --git a/app/Models/Group.php b/app/Models/Group.php
index d5c6ea1b07..1446d327e8 100755
--- a/app/Models/Group.php
+++ b/app/Models/Group.php
@@ -1,11 +1,10 @@
<?php
namespace App\Models;
+use App\Models\SnipeModel;
use Watson\Validating\ValidatingTrait;
-use Illuminate\Database\Eloquent\Model;
-
-class Group extends Model
+class Group extends SnipeModel
{
protected $table = 'groups';
diff --git a/app/Models/Location.php b/app/Models/Location.php
index 2f7dc9d1e6..0cdbba018f 100755
--- a/app/Models/Location.php
+++ b/app/Models/Location.php
@@ -1,14 +1,15 @@
<?php
namespace App\Models;
+use App\Http\Traits\UniqueUndeletedTrait;
+use App\Models\Asset;
+use App\Models\SnipeModel;
+use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
-use App\Models\User;
-use App\Models\Asset;
use Watson\Validating\ValidatingTrait;
-use App\Http\Traits\UniqueUndeletedTrait;
-class Location extends Model
+class Location extends SnipeModel
{
use SoftDeletes;
protected $dates = ['deleted_at'];
@@ -16,8 +17,8 @@ class Location extends Model
protected $rules = array(
'name' => '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 c5d5b8e049..27919726a3 100755
--- a/app/Models/Manufacturer.php
+++ b/app/Models/Manufacturer.php
@@ -1,11 +1,12 @@
<?php
namespace App\Models;
+use App\Models\SnipeModel;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Watson\Validating\ValidatingTrait;
-class Manufacturer extends Model
+class Manufacturer extends SnipeModel
{
use SoftDeletes;
protected $dates = ['deleted_at'];
diff --git a/app/Models/SnipeModel.php b/app/Models/SnipeModel.php
new file mode 100644
index 0000000000..4b049804c7
--- /dev/null
+++ b/app/Models/SnipeModel.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class SnipeModel extends Model
+{
+ //
+ public function getDisplayNameAttribute()
+ {
+ return $this->name;
+ }
+}
diff --git a/app/Models/Statuslabel.php b/app/Models/Statuslabel.php
index e710608ee1..20c67558d0 100755
--- a/app/Models/Statuslabel.php
+++ b/app/Models/Statuslabel.php
@@ -1,12 +1,13 @@
<?php
namespace App\Models;
+use App\Http\Traits\UniqueUndeletedTrait;
+use App\Models\SnipeModel;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Watson\Validating\ValidatingTrait;
-use App\Http\Traits\UniqueUndeletedTrait;
-class Statuslabel extends Model
+class Statuslabel extends SnipeModel
{
use SoftDeletes;
use ValidatingTrait;
diff --git a/app/Models/Supplier.php b/app/Models/Supplier.php
index 36cbdab6b6..72717f7546 100755
--- a/app/Models/Supplier.php
+++ b/app/Models/Supplier.php
@@ -1,12 +1,13 @@
<?php
namespace App\Models;
+use App\Http\Traits\UniqueUndeletedTrait;
+use App\Models\SnipeModel;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Watson\Validating\ValidatingTrait;
-use App\Http\Traits\UniqueUndeletedTrait;
-class Supplier extends Model
+class Supplier extends SnipeModel
{
use SoftDeletes;
protected $dates = ['deleted_at'];
@@ -14,14 +15,14 @@ class Supplier extends Model
protected $rules = array(
'name' => '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 d9bca25292..3715449bec 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 216cf7bcb3..43d70c38f4 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 b8acc76e8a..53eaef823a 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 0000000000..28a0c3dce2
--- /dev/null
+++ b/database/migrations/2016_10_16_015024_rename_modelno_to_model_number.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class RenameModelnoToModelNumber extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('models', function (Blueprint $table) {
+ //
+ $table->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 0000000000..daf93c3ac5
--- /dev/null
+++ b/database/migrations/2016_10_16_015211_rename_consumable_modelno_to_model_number.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class RenameConsumableModelnoToModelNumber extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('consumables', function (Blueprint $table) {
+ //
+ $table->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 0000000000..7a7668b14f
--- /dev/null
+++ b/database/migrations/2016_10_16_143235_rename_model_note_to_notes.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class RenameModelNoteToNotes extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('models', function (Blueprint $table) {
+ //
+ $table->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 0000000000..1aba51ce99
--- /dev/null
+++ b/database/migrations/2016_10_16_165052_rename_component_total_qty_to_qty.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class RenameComponentTotalQtyToQty extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('components', function (Blueprint $table) {
+ //
+ $table->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 0000000000..b1cde650e9
--- /dev/null
+++ b/database/migrations/2016_11_13_020954_rename_component_serial_number_to_serial.php
@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class RenameComponentSerialNumberToSerial extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('components', function ($table) {
+ $table->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 f6ed2fe3a5..22771aff0c 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 49d5efa0fe..f3a6be60f9 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 58967eda60..2a00f82a67 100644
--- a/resources/lang/en/admin/categories/general.php
+++ b/resources/lang/en/admin/categories/general.php
@@ -1,8 +1,8 @@
<?php
return array(
- 'about_asset_categories' => 'About Asset Categories',
- 'about_categories' => 'Asset categories help you organize your assets. Some example categories might be &quot;Desktops&quot;, &quot;Laptops&quot;, &quot;Mobile Phones&quot;, &quot;Tablets&quot;, 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 &quot;Desktops&quot;, &quot;Laptops&quot;, &quot;Mobile Phones&quot;, &quot;Tablets&quot;, 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 9d58ccb58e..9a47968977 100644
--- a/resources/lang/en/admin/companies/general.php
+++ b/resources/lang/en/admin/companies/general.php
@@ -1,4 +1,6 @@
<?php
return [
+ 'about_companies_title' => '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 89656e4dfb..53a69f8c03 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 d5796ff9f6..1fca0e2cb7 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 12c333a66f..99e8cc1f6f 100644
--- a/resources/lang/en/admin/groups/titles.php
+++ b/resources/lang/en/admin/groups/titles.php
@@ -1,10 +1,11 @@
<?php
return array(
-
+ 'about_groups_title' => '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 4428e8f223..abded281fa 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 6674ea0c9d..f7644eb730 100644
--- a/resources/lang/en/admin/hardware/general.php
+++ b/resources/lang/en/admin/hardware/general.php
@@ -1,6 +1,8 @@
<?php
return array(
+ 'about_assets_title' => '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 2e97ae2adf..ce29167874 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 808d75a34a..25a536ec56 100644
--- a/resources/lang/en/admin/licenses/general.php
+++ b/resources/lang/en/admin/licenses/general.php
@@ -1,7 +1,8 @@
<?php
return array(
-
+ 'about_licenses_title' => '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 8360ef19bc..e171d4dd4e 100644
--- a/resources/lang/en/admin/locations/table.php
+++ b/resources/lang/en/admin/locations/table.php
@@ -1,18 +1,20 @@
<?php
return array(
- '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',
-);
+ '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 1861ee7c56..f66320fe8d 100644
--- a/resources/lang/en/admin/manufacturers/table.php
+++ b/resources/lang/en/admin/manufacturers/table.php
@@ -1,7 +1,8 @@
<?php
return array(
-
+ 'about_manufacturers_title' => '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 08677c5532..e0da09f780 100644
--- a/resources/lang/en/admin/models/general.php
+++ b/resources/lang/en/admin/models/general.php
@@ -1,7 +1,8 @@
<?php
return array(
-
+ 'about_models_title' => '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. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
'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 88adfc692b..2a7b07ca93 100644
--- a/resources/lang/en/admin/suppliers/table.php
+++ b/resources/lang/en/admin/suppliers/table.php
@@ -1,6 +1,8 @@
<?php
return array(
+ 'about_suppliers_title' => '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 5aaa8359e4..170f6fa46c 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 38a3824444..55ee7c013a 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary">
- {{ trans('general.back') }}</a>
-
-
-
-@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')
-
-
-<div class="row">
- <div class="col-md-8 col-md-offset-2">
-
- <div class="box box-default">
-
- <div class="box-header with-border">
-
- <h3 class="box-title">
- @if ($accessory->id)
- {{ $accessory->name }}
- @endif
- </h3>
- <div class="box-tools pull-right">
- <button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
- </div>
- </div><!-- /.box-header -->
-
-
-
-
- <!-- form start -->
- <form class="form-horizontal" method="post" action="" autocomplete="off">
-
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box-body">
- <div class="col-md-0 col-md-offset-1">
- @if (\App\Models\Company::isCurrentUserAuthorized())
- <!-- Company -->
- <div class="form-group{{ $errors->has('company_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('company_id', trans('general.company')) }}
- </div>
- <div class="col-md-8">
- {{ Form::select('company_id', $company_list , Input::old('company_id', $accessory->company_id), array('class'=>'select2', 'style'=>'width:100%')) }}
- {!! $errors->first('company_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- @endif
-
- <!-- Name -->
- <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('name', trans('admin/accessories/general.accessory_name')) }}
- </div>
- <div class="col-md-8">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $accessory->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Category -->
- <div class="form-group{{ $errors->has('category_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('category_id', trans('admin/accessories/general.accessory_category')) }}
- </div>
- <div class="col-md-7">
- {{ Form::select('category_id', $category_list , Input::old('category_id', $accessory->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
- {!! $errors->first('category_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Manufacturer -->
- <div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('manufacturer_id', trans('general.manufacturer')) }}
- </div>
- </label>
- <div class="col-md-7">
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $accessory->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('manufacturer_id', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Location -->
- <div class="form-group{{ $errors->has('location_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('location_id', trans('general.location')) }}
- </div>
- <div class="col-md-7 col-sm-12">
- {{ Form::select('location_id', $location_list , Input::old('location_id', $accessory->location_id), array('class'=>'select2', 'style'=>'width:100%')) }}
-
- {!! $errors->first('location_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Order Number -->
- <div class="form-group{{ $errors->has('order_number') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('order_number', trans('admin/accessories/general.order')) }}
- </div>
- <div class="col-md-3">
- <input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $accessory->order_number) }}" />
- {!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Purchase Date -->
- <div class="form-group{{ $errors->has('purchase_date') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('purchase_date', trans('admin/accessories/general.date')) }}
- </div>
- <div class="input-group col-md-3">
- <input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $accessory->purchase_date) }}">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- {!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Cost -->
- <div class="form-group{{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('purchase_cost', trans('admin/accessories/general.cost')) }}
- </div>
- <div class="col-md-3">
- <div class="input-group">
- <span class="input-group-addon">
- {{ \App\Models\Setting::first()->default_currency }}
- </span>
- <input class="col-md-3 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($accessory->purchase_cost)) }}" />
- {!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
- <!-- QTY -->
- <div class="form-group{{ $errors->has('qty') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('qty', trans('admin/accessories/general.qty')) }}
- </div>
- <div class="col-md-9" style="margin-left: -15px">
- <div class="col-md-3">
- <input class="form-control col-md-2" type="text" name="qty" id="qty" value="{{ Input::old('qty', $accessory->qty) }}" />
- </div>
- <div class="col-md-12">
- {!! $errors->first('qty', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
-
- <!-- Min QTY -->
- <div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('min_amt', trans('general.min_amt')) }}
- </div>
- <div class="col-md-9" style="margin-left: -15px">
- <div class="col-md-2">
- <input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $accessory->min_amt) }}" />
- </div>
- <div class="col-md-7" style="margin-left: -15px;">
- <a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
- </div>
- <div class="col-md-12">
- {!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
-
- </div>
-
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
- </div>
-
-
-</form>
-
-</div>
-</div>
-
-
-<div class="slideout-menu">
- <a href="#" class="slideout-menu-toggle pull-right">×</a>
- <h3>
- {{ trans('admin/accessories/general.about_accessories_title') }}
- </h3>
- <p>{{ trans('admin/accessories/general.about_accessories_text') }} </p>
-</div>
+@section('inputFields')
+
+@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 1ad97dfdd4..1786f6a6f1 100755
--- a/resources/views/accessories/index.blade.php
+++ b/resources/views/accessories/index.blade.php
@@ -24,7 +24,7 @@
<div class="table-responsive">
<table
name="accessories"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{route('api.accessories.list') }}"
data-cookie="true"
@@ -38,9 +38,9 @@
<th data-field="manufacturer" data-searchable="true" data-sortable="true">{{ trans('general.manufacturer') }}</th>
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
<th data-searchable="false" data-sortable="false" data-field="qty">{{ trans('admin/accessories/general.total') }}</th>
- <th data-searchable="true" data-sortable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/accessories/general.date') }}</th>
- <th data-searchable="true" data-sortable="true" data-field="purchase_cost">{{ trans('admin/accessories/general.cost') }}</th>
- <th data-searchable="true" data-sortable="true" data-field="order_number" data-visible="false">{{ trans('admin/accessories/general.order') }}</th>
+ <th data-searchable="true" data-sortable="true" data-field="purchase_date" data-visible="false">{{ trans('general.purchase_date') }}</th>
+ <th data-searchable="true" data-sortable="true" data-field="purchase_cost">{{ trans('general.purchase_cost') }}</th>
+ <th data-searchable="true" data-sortable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
<th data-searchable="false" data-sortable="true" data-field="min_amt">{{ trans('general.min_amt') }}</th>
<th data-searchable="false" data-sortable="false" data-field="numRemaining">{{ trans('admin/accessories/general.remaining') }}</th>
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
@@ -54,48 +54,7 @@
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'accessories-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
+@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 1f742d2958..82f87b6b6f 100644
--- a/resources/views/accessories/view.blade.php
+++ b/resources/views/accessories/view.blade.php
@@ -46,7 +46,7 @@
<div class="table table-responsive">
<table
name="accessory_users"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{ route('api.accessories.view', $accessory->id) }}"
data-cookie="true"
@@ -81,43 +81,7 @@
</div>
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js?v=1') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- columnsHidden: ['name'],
- showExport: true,
- exportLabel: 'Export',
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
+@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 7875445464..6b9559ad53 100644
--- a/resources/views/account/accept-asset.blade.php
+++ b/resources/views/account/accept-asset.blade.php
@@ -64,7 +64,7 @@
</div>
@endif
- @if (\App\Models\Setting::getSettings()->require_accept_signature=='1')
+ @if ($snipeSettings->require_accept_signature=='1')
<div class="col-md-12 col-sm-12 text-center" style="padding-top: 20px">
<h3>Sign below to indicate that you agree to the terms of service:</h3>
diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php
index 06e66b3d3b..29e139bb12 100755
--- a/resources/views/account/profile.blade.php
+++ b/resources/views/account/profile.blade.php
@@ -103,7 +103,7 @@
<!-- Two factor opt in -->
- @if (\App\Models\Setting::getSettings()->two_factor_enabled=='1')
+ @if ($snipeSettings->two_factor_enabled=='1')
<div class="form-group {{ $errors->has('avatar') ? 'has-error' : '' }}">
diff --git a/resources/views/account/requestable-assets.blade.php b/resources/views/account/requestable-assets.blade.php
index 483cadb1cd..6236b21c32 100644
--- a/resources/views/account/requestable-assets.blade.php
+++ b/resources/views/account/requestable-assets.blade.php
@@ -35,8 +35,8 @@
<thead>
<tr role="row">
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
- @if (\App\Models\Setting::getSettings()->display_asset_name)
- <th class="col-md-3" bSortable="true">{{ trans('admin/hardware/form.name') }}</th>
+ @if ($snipeSettings->display_asset_name)
+ <th class="col-md-3" bSortable="true">{{ trans('admin/hardware/form.name') }}</th>
@endif
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.serial') }}</th>
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.location') }}</th>
@@ -53,20 +53,18 @@
{{ csrf_field() }}
<td>{{ $asset->model->name }}</td>
- @if (\App\Models\Setting::getSettings()->display_asset_name)
- <td>{{ $asset->name }}</td>
+ @if ($snipeSettings->display_asset_name)
+ <td>{{ $asset->name }}</td>
@endif
<td>{{ $asset->serial }}</td>
<td>
@if ($asset->assigneduser && $asset->assetloc)
- {{ $asset->assetloc->name }}
+ {{ $asset->assetloc->name }}
@elseif ($asset->defaultLoc)
- {{ $asset->defaultLoc->name }}
-
+ {{ $asset->defaultLoc->name }}
@endif
-
</td>
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
<td>Checked out</td>
diff --git a/resources/views/asset_maintenances/edit.blade.php b/resources/views/asset_maintenances/edit.blade.php
index ea7b5a1ac7..4272f21a00 100644
--- a/resources/views/asset_maintenances/edit.blade.php
+++ b/resources/views/asset_maintenances/edit.blade.php
@@ -53,25 +53,10 @@
</div>
</div>
- <!-- Supplier -->
- <div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
- <label for="supplier_id" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/table.supplier_name') }}
- </label>
- <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($assetMaintenance, 'supplier_id')) ? ' required' : '' }}">
- {{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $assetMaintenance->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px']) }}
- {!! $errors->first('supplier_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
+ @include ('partials.forms.edit.supplier')
+ @include ('partials.forms.edit.maintenance_type')
+
- <!-- Improvement Type -->
- <div class="form-group {{ $errors->has('asset_maintenance_type') ? ' has-error' : '' }}">
- <label for="asset_maintenance_type" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}
- </label>
- <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($assetMaintenance, 'asset_maintenance_type')) ? ' required' : '' }}">
- {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
<!-- Title -->
<div class="form-group {{ $errors->has('title') ? ' has-error' : '' }}">
@@ -121,7 +106,7 @@
<label for="cost" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.cost') }}</label>
<div class="col-md-2">
<div class="input-group">
- <span class="input-group-addon">{{ \App\Models\Setting::first()->default_currency }}</span>
+ <span class="input-group-addon">{{ $snipeSettings->default_currency }}</span>
<input class="col-md-2 form-control" type="text" name="cost" id="cost" value="{{ Input::old('cost', \App\Helpers\Helper::formatCurrencyOutput($assetMaintenance->cost)) }}" />
{!! $errors->first('cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
diff --git a/resources/views/asset_maintenances/index.blade.php b/resources/views/asset_maintenances/index.blade.php
index 5eaf456080..b0052c62d5 100644
--- a/resources/views/asset_maintenances/index.blade.php
+++ b/resources/views/asset_maintenances/index.blade.php
@@ -26,7 +26,7 @@
<table
name="maintenances"
id="table"
- class="table table-striped"
+ class="table table-striped snipe-table"
data-url="{{route('api.asset_maintenances.list') }}"
data-cookie="true"
data-click-to-select="true"
@@ -56,46 +56,5 @@
@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'maintenances-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
+@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 3866c617f3..a4187de7a3 100755
--- a/resources/views/categories/edit.blade.php
+++ b/resources/views/categories/edit.blade.php
@@ -1,148 +1,86 @@
-@extends('layouts/default')
-
-{{-- Page title --}}
-@section('title')
- @if ($category->id)
- {{ trans('admin/categories/general.update') }}
- @else
- {{ trans('admin/categories/general.create') }}
- @endif
-@parent
-@stop
-
-
-@section('header_right')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@stop
-
-{{-- Page content --}}
-@section('content')
-
-<div class="row">
- <div class="col-md-9">
-
- <div class="box box-default">
- <div class="box-header with-border">
- @if ($category->id)
- <div class="panel-heading">
- <h3 class="box-title"> {{ $category->name }}</h3>
- </div>
- @endif
-
- </div><!-- /.box-header -->
- <div class="box-body">
- <form class="form-horizontal" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <!-- Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('name', trans('admin/categories/general.category_name')) }}
-
- </div>
- <div class="col-md-8 required">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $category->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Type -->
- <div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('category_type', trans('general.type')) }}
- </div>
- <div class="col-md-7 required">
- {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
+@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')
+])
+
+@section('inputFields')
+
+@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.category_name')])
+
+<!-- Type -->
+<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
+ <label for="category_type" class="col-md-3 control-label">{{ trans('general.type') }}</label>
+ <div class="col-md-7 required">
+ {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
- <!-- EULA text -->
- <div class="form-group {{ $errors->has('eula_text') ? 'error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('eula_text', trans('admin/categories/general.eula_text')) }}
- </div>
- <div class="col-md-8">
- {{ Form::textarea('eula_text', Input::old('eula_text', $category->eula_text), array('class' => 'form-control')) }}
+<!-- EULA text -->
+<div class="form-group {{ $errors->has('eula_text') ? 'error' : '' }}">
+ <label for="eula_text" class="col-md-3 control-label">{{ trans('admin/categories/general.eula_text') }}</label>
+ <div class="col-md-7">
+ {{ Form::textarea('eula_text', Input::old('eula_text', $item->eula_text), array('class' => 'form-control')) }}
<p class="help-block">{!! trans('admin/categories/general.eula_text_help') !!} </p>
<p class="help-block">{!! trans('admin/settings/general.eula_markdown') !!} </p>
{!! $errors->first('eula_text', '<span class="alert-msg">:message</span>') !!}
- </div>
- </div>
+ </div>
+</div>
- <!-- Use default checkbox -->
- <div class="checkbox col-md-offset-3">
- <label>
+<!-- Use default checkbox -->
+<div class="checkbox col-md-offset-3">
+ <label>
- @if (\App\Models\Setting::getSettings()->default_eula_text!='')
- {{ Form::checkbox('use_default_eula', '1', Input::old('use_default_eula', $category->use_default_eula)) }}
+ @if ($snipeSettings->default_eula_text!='')
+ {{ Form::checkbox('use_default_eula', '1', Input::old('use_default_eula', $item->use_default_eula)) }}
{!! trans('admin/categories/general.use_default_eula') !!}
- @else
- {{ Form::checkbox('use_default_eula', '0', Input::old('use_default_eula'), array('disabled' => 'disabled')) }}
- {!! trans('admin/categories/general.use_default_eula_disabled') !!}
- @endif
-
- </label>
- </div>
-
- <!-- Require Acceptance -->
- <div class="checkbox col-md-offset-3">
- <label>
- {{ Form::checkbox('require_acceptance', '1', Input::old('require_acceptance', $category->require_acceptance)) }}
- {{ trans('admin/categories/general.require_acceptance') }}
- </label>
- </div>
-
- <!-- Email on Checkin -->
- <div class="checkbox col-md-offset-3">
- <label>
- {{ Form::checkbox('checkin_email', '1', Input::old('checkin_email', $category->checkin_email)) }}
- {{ trans('admin/categories/general.checkin_email') }}
- </label>
- </div>
-
-
- </div><!-- /.box-body -->
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
-
- </div><!-- /.box -->
-
- </div>
-
+ @else
+ {{ Form::checkbox('use_default_eula', '0', Input::old('use_default_eula'), array('disabled' => 'disabled')) }}
+ {!! trans('admin/categories/general.use_default_eula_disabled') !!}
+ @endif
+ </label>
+</div>
- <!-- side address column -->
- <div class="col-md-3">
- <h4>{{ trans('admin/categories/general.about_asset_categories') }}</h4>
- <p>{{ trans('admin/categories/general.about_categories') }} </p>
+<!-- Require Acceptance -->
+<div class="checkbox col-md-offset-3">
+ <label>
+ {{ Form::checkbox('require_acceptance', '1', Input::old('require_acceptance', $item->require_acceptance)) }}
+ {{ trans('admin/categories/general.require_acceptance') }}
+ </label>
+</div>
- </div>
- </div>
+<!-- Email on Checkin -->
+<div class="checkbox col-md-offset-3">
+ <label>
+ {{ Form::checkbox('checkin_email', '1', Input::old('checkin_email', $item->checkin_email)) }}
+ {{ trans('admin/categories/general.checkin_email') }}
+ </label>
</div>
+@stop
-@if (\App\Models\Setting::getSettings()->default_eula_text!='')
+@section('content')
+@parent
+@if ($snipeSettings->default_eula_text!='')
<!-- Modal -->
<div class="modal fade" id="eulaModal" tabindex="-1" role="dialog" aria-labelledby="eulaModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="eulaModalLabel">{{ trans('admin/settings/general.default_eula_text') }}</h4>
- </div>
- <div class="modal-body">
- {{ \App\Models\Setting::getDefaultEula() }}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
- </div>
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="eulaModalLabel">{{ trans('admin/settings/general.default_eula_text') }}</h4>
+ </div>
+ <div class="modal-body">
+ {{ \App\Models\Setting::getDefaultEula() }}
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
+ </div>
+ </div>
</div>
- </div>
</div>
@endif
-
-@stop
+@stop
\ No newline at end of file
diff --git a/resources/views/categories/index.blade.php b/resources/views/categories/index.blade.php
index 7566aaf0fc..51372248c5 100755
--- a/resources/views/categories/index.blade.php
+++ b/resources/views/categories/index.blade.php
@@ -23,7 +23,7 @@
<div class="table-responsive">
<table
- class="table table-striped"
+ class="table table-striped snipe-table"
name="categories"
id="table"
data-url="{{route('api.categories.list') }}"
@@ -51,49 +51,9 @@
</div>
</div>
+@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'categories-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-@stop
+@include ('partials.bootstrap-table', ['exportFile' => 'categories-export', 'search' => true])
@stop
+
diff --git a/resources/views/categories/view.blade.php b/resources/views/categories/view.blade.php
index 07e895d55c..a0011dae16 100644
--- a/resources/views/categories/view.blade.php
+++ b/resources/views/categories/view.blade.php
@@ -32,6 +32,7 @@
<table
name="category_assets"
+ class="snipe-table"
id="table"
data-url="{{ route('api.categories.'.$category->category_type.'.view', [$category->id, $category->category_type]) }}"
data-cookie="true"
@@ -59,46 +60,8 @@
</div>
</div>
-
-@section('moar_scripts')
- <script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
- <script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- //search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
- </script>
-@stop
+@stop
+@section('moar_scripts')
+@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 dbc8cae552..32dd7eea21 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
-
-<div class="row">
- <div class="col-md-9">
-
-
-
- <form class="form-horizontal" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box box-default">
- @if ($company->id)
- <div class="box-header with-border">
- <h3 class="box-title">{{ $company->name }}</h3>
- </div><!-- /.box-header -->
- @endif
-
- <div class="box-body">
-
- <!-- Company Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('admin/companies/table.name') }}
- <i class='fa fa-asterisk'></i></label>
- </label>
- <div class="col-md-9">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $company->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- <!-- /Company Name -->
-
- </div>
- <!-- /Panel body -->
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- <!-- /Panel footer -->
- </div>
- <!-- /Panel -->
-</form>
-</div>
- <!-- side address column -->
- <div class="col-md-3">
-
- <h4>About Companies</h4>
- <p>
- 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.
- </p>
- </div>
- </div>
-</div>
-
+@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 f440c9c5e4..76529b6303 100644
--- a/resources/views/companies/index.blade.php
+++ b/resources/views/companies/index.blade.php
@@ -20,7 +20,7 @@
<div class="box box-default">
<div class="box-body">
<div class="table-responsive">
- <table class="table table-striped">
+ <table class="table table-striped" name="companies">
<thead>
<tr>
<th class="col-md-1">{{ trans('general.id') }}</th>
diff --git a/resources/views/components/edit.blade.php b/resources/views/components/edit.blade.php
index 93db1ee199..b2720d13c5 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
-
-<div class="row">
- <div class="col-md-8 col-md-offset-2">
-
-
-
- <form class="form-horizontal" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box box-default">
- <div class="box-header with-border">
- <h3 class="box-title">
- @if ($component->id)
- {{ $component->name }}
- @endif
- </h3>
- <div class="box-tools pull-right">
- <button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
- </div>
- </div><!-- /.box-header -->
-
- <div class="box-body">
-
-
- <!-- Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
-
- {{ Form::label('name', trans('admin/components/table.title'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-8 required">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $component->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Category -->
- <div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
-
- {{ Form::label('category_id', trans('general.category'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-8 required">
- {{ Form::select('category_id', $category_list , Input::old('category_id', $component->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
- {!! $errors->first('category_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- QTY -->
- <div class="form-group {{ $errors->has('total_qty') ? ' has-error' : '' }}">
-
- {{ Form::label('total_qty', trans('general.quantity'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-2 required">
- <input class="form-control" type="text" name="total_qty" id="total_qty" value="{{ Input::old('qty', $component->total_qty) }}" />
-
- </div>
- {!! $errors->first('total_qty', ' <div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fa fa-times"></i> :message</span></div>') !!}
- </div>
-
- <!-- Min QTY -->
- <div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
-
- {{ Form::label('min_amt', trans('general.min_amt'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-2">
- <input class="form-control" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $component->min_amt) }}" />
- </div>
- <div class="col-md-1 text-left">
- <a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
- </div>
- <div class="col-md-12">
- {!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
-
-
- </div>
-
- <!-- Serial -->
- <div class="form-group {{ $errors->has('serial_number') ? ' has-error' : '' }}">
-
- {{ Form::label('name', trans('admin/hardware/form.serial'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-8">
- <input class="form-control" type="text" name="serial_number" id="serial_number" value="{{ Input::old('serial_number', $component->serial_number) }}" />
- {!! $errors->first('serial_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Company -->
- @if (\App\Models\Company::isCurrentUserAuthorized())
- <div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
-
- {{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-8">
- {{ Form::select('company_id', $company_list , Input::old('company_id', $component->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- @endif
-
- <!-- Location -->
- <div class="form-group {{ $errors->has('location_id') ? ' has-error' : '' }}">
-
- {{ Form::label('location_id', trans('general.location'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-7 col-sm-12">
- {{ Form::select('location_id', $location_list , Input::old('location_id', $component->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
-
- {!! $errors->first('location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Order Number -->
- <div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
-
- {{ Form::label('order_number', trans('admin/components/general.order'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-3">
- <input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $component->order_number) }}" />
- {!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Date -->
- <div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
-
- {{ Form::label('purchase_date', trans('admin/components/general.date'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="input-group col-md-3">
- <input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $component->purchase_date) }}">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- {!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Cost -->
- <div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
-
- {{ Form::label('purchase_cost', trans('admin/components/general.cost'), array('class' => 'col-md-3 control-label')) }}
-
- <div class="col-md-2">
- <div class="input-group">
- <span class="input-group-addon">
- {{ \App\Models\Setting::first()->default_currency }}
- </span>
- <input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($component->purchase_cost)) }}" />
- {!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
-
-
- </div>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
-
- </div>
-</div>
-
-
-<div class="slideout-menu">
- <a href="#" class="slideout-menu-toggle pull-right">×</a>
- <h3>
- {{ trans('admin/components/general.about_components_title') }}
- </h3>
- <p>{{ trans('admin/components/general.about_components_text') }}</p>
-</div>
-
-
+@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 aa1e161a4f..71b031dd55 100644
--- a/resources/views/components/index.blade.php
+++ b/resources/views/components/index.blade.php
@@ -40,7 +40,7 @@
<table
data-toolbar="#toolbar"
name="components"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{route('api.components.list') }}"
data-cookie="true"
@@ -73,50 +73,10 @@
</div>
</div>
+@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'components-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
+@include ('partials.bootstrap-table', ['exportFile' => 'components-export', 'search' => true])
<script>
$(function() {
@@ -138,5 +98,3 @@
</script>
@stop
-
-@stop
diff --git a/resources/views/components/view.blade.php b/resources/views/components/view.blade.php
index 2b432eeca9..7463d407b5 100644
--- a/resources/views/components/view.blade.php
+++ b/resources/views/components/view.blade.php
@@ -49,7 +49,7 @@
<table
name="component_users"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{route('api.components.view', $component->id)}}"
data-cookie="true"
@@ -75,9 +75,9 @@
<!-- side address column -->
<div class="col-md-3">
- @if ($component->serial_number!='')
+ @if ($component->serial!='')
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.serial') }}: </strong>
- {{ $component->serial_number }} </div>
+ {{ $component->serial }} </div>
@endif
@if ($component->purchase_date)
@@ -87,7 +87,7 @@
@if ($component->purchase_cost)
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.cost') }}:</strong>
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
{{ \App\Helpers\Helper::formatCurrencyOutput($component->purchase_cost) }} </div>
@endif
@@ -100,45 +100,8 @@
</div>
</div>
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: false,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-
@stop
+@section('moar_scripts')
+@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 2cf1ec654a..e9670ec95d 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
-
-<div class="row">
- <div class="col-md-8 col-md-offset-2">
-
-
-
- <form class="form-horizontal" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box box-default">
- <div class="box-header with-border">
- <h3 class="box-title">
- @if ($consumable->id)
- {{ $consumable->name }}
- @endif
- </h3>
- <div class="box-tools pull-right">
- <button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
- </div>
- </div><!-- /.box-header -->
-
- <div class="box-body">
- <!-- Company -->
- @if (\App\Models\Company::isCurrentUserAuthorized())
- <div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('company_id', trans('general.company')) }}
- </div>
- <div class="col-md-7">
- {{ Form::select('company_id', $company_list , Input::old('company_id', $consumable->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- @endif
-
- <!-- Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('name', trans('admin/consumables/table.title')) }}
-
- </div>
- <div class="col-md-9">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $consumable->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Category -->
- <div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('category_id', trans('general.category')) }}
-
- </div>
- <div class="col-md-7">
- {{ Form::select('category_id', $category_list , Input::old('category_id', $consumable->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
- {!! $errors->first('category_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Manufacturer -->
- <div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('manufacturer_id', trans('general.manufacturer')) }}
-
- </div>
- <div class="col-md-7">
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $consumable->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%')) }}
- {!! $errors->first('manufacturer_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Location -->
- <div class="form-group {{ $errors->has('location_id') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('location_id', trans('general.location')) }}
- </div>
- <div class="col-md-7 col-sm-12">
- {{ Form::select('location_id', $location_list , Input::old('location_id', $consumable->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
-
- {!! $errors->first('location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Model Number -->
- <div class="form-group {{ $errors->has('model_no') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('model_no', trans('general.model_no')) }}
- </div>
- <div class="col-md-3">
- <input class="form-control" type="text" name="model_no" id="model_no" value="{{ Input::old('model_no', $consumable->model_no) }}" />
- {!! $errors->first('model_no', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Item Number -->
- <div class="form-group {{ $errors->has('item_no') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('item_no', trans('admin/consumables/general.item_no')) }}
- </div>
- <div class="col-md-3">
- <input class="form-control" type="text" name="item_no" id="item_no" value="{{ Input::old('item_no', $consumable->item_no) }}" />
- {!! $errors->first('item_no', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Order Number -->
- <div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('order_number', trans('admin/consumables/general.order')) }}
- </div>
- <div class="col-md-3">
- <input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $consumable->order_number) }}" />
- {!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Date -->
- <div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('purchase_date', trans('admin/consumables/general.date')) }}
- </div>
- <div class="input-group col-md-3">
- <input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $consumable->purchase_date) }}">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- {!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Cost -->
- <div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('purchase_cost', trans('admin/consumables/general.cost')) }}
- </div>
- <div class="col-md-2">
- <div class="input-group">
- <span class="input-group-addon">
- {{ \App\Models\Setting::first()->default_currency }}
- </span>
- <input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($consumable->purchase_cost)) }}" />
- {!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
- <!-- QTY -->
- <div class="form-group {{ $errors->has('qty') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('qty', trans('general.quantity')) }}
- </div>
- <div class="col-md-9" style="margin-left: -15px">
- <div class="col-md-2">
- <input class="form-control" type="text" name="qty" id="qty" value="{{ Input::old('qty', $consumable->qty) }}" />
- </div>
- {!! $errors->first('qty', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Min QTY -->
- <div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
- <div class="col-md-3">
- {{ Form::label('min_amt', trans('general.min_amt')) }}
- </div>
- <div class="col-md-9" style="margin-left: -15px">
- <div class="col-md-2">
- <input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $consumable->min_amt) }}" />
- </div>
- <div class="col-md-7" style="margin-left: -15px;">
- <a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
- </div>
- <div class="col-md-12">
- {!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
-
-
- </div>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
-
- </div>
-
-
-
-<div class="slideout-menu">
- <a href="#" class="slideout-menu-toggle pull-right">×</a>
- <h3>
- {{ trans('admin/consumables/general.about_consumables_title') }}
- </h3>
- <p>{{ trans('admin/consumables/general.about_consumables_text') }}</p>
-</div>
-
+@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 6d083acd9f..0a164ca1da 100644
--- a/resources/views/consumables/index.blade.php
+++ b/resources/views/consumables/index.blade.php
@@ -23,7 +23,7 @@
<div class="box-body">
<table
name="consumables"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{route('api.consumables.list') }}"
data-cookie="true"
@@ -40,11 +40,11 @@
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/consumables/general.remaining') }}</th>
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
<th data-sortable="true" data-field="manufacturer" data-visible="false">{{ trans('general.manufacturer') }}</th>
- <th data-sortable="true" data-field="model_no" data-visible="false">{{ trans('general.model_no') }}</th>
+ <th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
- <th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('admin/consumables/general.order') }}</th>
- <th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/consumables/general.date') }}</th>
- <th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('admin/consumables/general.cost') }}</th>
+ <th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
+ <th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('general.purchase_date') }}</th>
+ <th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('general.purchase_cost') }}</th>
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
</tr>
@@ -58,48 +58,8 @@
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'consumables-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
+@include ('partials.bootstrap-table', ['exportFile' => 'consumables-export', 'search' => true])
- });
-</script>
@stop
diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php
index afc2a3feaf..6eca524cc2 100644
--- a/resources/views/consumables/view.blade.php
+++ b/resources/views/consumables/view.blade.php
@@ -36,7 +36,7 @@
<table
name="consumable_users"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{route('api.consumables.view', $consumable->id)}}"
data-cookie="true"
@@ -64,13 +64,13 @@
@if ($consumable->purchase_date)
- <div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/consumables/general.date') }}: </strong>
+ <div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.purchase_date') }}: </strong>
{{ $consumable->purchase_date }} </div>
@endif
@if ($consumable->purchase_cost)
- <div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/consumables/general.cost') }}:</strong>
- {{ \App\Models\Setting::first()->default_currency }}
+ <div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.purchase_cost') }}:</strong>
+ {{ $snipeSettings->default_currency }}
{{ \App\Helpers\Helper::formatCurrencyOutput($consumable->purchase_cost) }} </div>
@endif
@@ -80,9 +80,9 @@
{{ $consumable->item_no }} </div>
@endif
- @if ($consumable->model_no)
+ @if ($consumable->model_number)
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.model_no') }}:</strong>
- {{ $consumable->model_no }} </div>
+ {{ $consumable->model_number }} </div>
@endif
@if ($consumable->manufacturer)
@@ -91,53 +91,14 @@
@endif
@if ($consumable->order_number)
- <div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/consumables/general.order') }}:</strong>
+ <div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.order_number') }}:</strong>
{{ $consumable->order_number }} </div>
@endif
</div>
</div>
-
-
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: false,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-
@stop
+@section('moar_scripts')
+@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 e198bcf785..70037f5121 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
-<div class="row">
- <div class="col-md-9">
-
- <form class="form-horizontal" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box box-default">
-
-
-
- <div class="box-body">
- <!-- Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-4 control-label">{{ trans('admin/depreciations/general.depreciation_name') }}
- <i class='fa fa-asterisk'></i></label>
- </label>
- <div class="col-md-6">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $depreciation->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Name -->
- <div class="form-group {{ $errors->has('months') ? ' has-error' : '' }}">
- <label for="months" class="col-md-4 control-label">{{ trans('admin/depreciations/general.number_of_months') }}
- <i class='fa fa-asterisk'></i></label>
- </label>
- <div class="col-md-6">
- <input class="form-control" type="text" name="months" id="months" value="{{ Input::old('months', $depreciation->months) }}" style="width: 80px;" />
- {!! $errors->first('months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
+@section('inputFields')
+
+@include ('partials.forms.edit.name', ['translated_name' => trans('admin/depreciations/general.depreciation_name')])
+<!-- Months -->
+<div class="form-group {{ $errors->has('months') ? ' has-error' : '' }}">
+ <label for="months" class="col-md-3 control-label">{{ trans('admin/depreciations/general.number_of_months') }}
+ </label>
+ <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'months')) ? ' required' : '' }}">
+ <div class="col-md-2" style="padding-left:0px">
+ <input class="form-control" type="text" name="months" id="months" value="{{ Input::old('months', $item->months) }}" style="width: 80px;" />
</div>
-
- </div>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
- </form>
-
-</div>
-<!-- side address column -->
-<div class="col-md-3">
- <h4>{{ trans('admin/depreciations/general.about_asset_depreciations') }}</h4>
- <p>{{ trans('admin/depreciations/general.about_depreciations') }} </p>
-</div>
+ </div>
+ {!! $errors->first('months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
@stop
diff --git a/resources/views/depreciations/index.blade.php b/resources/views/depreciations/index.blade.php
index d29a7323f3..bfad07a5f4 100755
--- a/resources/views/depreciations/index.blade.php
+++ b/resources/views/depreciations/index.blade.php
@@ -22,7 +22,7 @@ Asset Depreciations
<div class="table-responsive">
<table
name="depreciations"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{ route('api.depreciations.list') }}"
data-cookie="true"
@@ -50,49 +50,8 @@ Asset Depreciations
</div>
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
-$('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'depreciations-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
-});
-</script>
@stop
+@section('moar_scripts')
+@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 371909a5ee..afd3c22872 100644
--- a/resources/views/emails/accept-accessory.blade.php
+++ b/resources/views/emails/accept-accessory.blade.php
@@ -57,5 +57,5 @@
<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
@endif
-<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
+<p>{{ $snipeSettings->site_name }}</p>
@stop
diff --git a/resources/views/emails/accept-asset.blade.php b/resources/views/emails/accept-asset.blade.php
index a6b78b4da7..8b8b5eba83 100755
--- a/resources/views/emails/accept-asset.blade.php
+++ b/resources/views/emails/accept-asset.blade.php
@@ -87,5 +87,5 @@
<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
@endif
- <p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
+ <p>{{ $snipeSettings->site_name }}</p>
@stop
diff --git a/resources/views/emails/asset-canceled.blade.php b/resources/views/emails/asset-canceled.blade.php
index 3cba49dd6e..beb6a7f585 100644
--- a/resources/views/emails/asset-canceled.blade.php
+++ b/resources/views/emails/asset-canceled.blade.php
@@ -2,7 +2,7 @@
@section('content')
-<p>{{ trans('mail.a_user_canceled') }} <a href="{{ config('app.url') }}"> {{ \App\Models\Setting::getSettings()->site_name }}</a>. </p>
+<p>{{ trans('mail.a_user_canceled') }} <a href="{{ config('app.url') }}"> {{ $snipeSettings->site_name }}</a>. </p>
<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
{{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>
diff --git a/resources/views/emails/asset-requested.blade.php b/resources/views/emails/asset-requested.blade.php
index 5fd51b5ed6..c5999a19e6 100644
--- a/resources/views/emails/asset-requested.blade.php
+++ b/resources/views/emails/asset-requested.blade.php
@@ -2,7 +2,7 @@
@section('content')
-<p>{{ trans('mail.a_user_requested') }} <a href="{{ config('app.url') }}"> {{ \App\Models\Setting::getSettings()->site_name }}</a>. </p>
+<p>{{ trans('mail.a_user_requested') }} <a href="{{ config('app.url') }}"> {{ $snipeSettings->site_name }}</a>. </p>
<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
{{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>
diff --git a/resources/views/emails/auth/reminder.blade.php b/resources/views/emails/auth/reminder.blade.php
index 4af4e44b5b..d7ba2a808e 100755
--- a/resources/views/emails/auth/reminder.blade.php
+++ b/resources/views/emails/auth/reminder.blade.php
@@ -7,7 +7,7 @@
<h2>{{ trans('mail.password_reset') }}</h2>
<div>
- {{ 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)) }}.
</div>
</body>
</html>
diff --git a/resources/views/emails/checkin-asset.blade.php b/resources/views/emails/checkin-asset.blade.php
index c3b943daf2..bf759e2bd7 100644
--- a/resources/views/emails/checkin-asset.blade.php
+++ b/resources/views/emails/checkin-asset.blade.php
@@ -45,5 +45,5 @@
@endif
</table>
-<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
+<p>{{ $snipeSettings->site_name }}</p>
@stop
diff --git a/resources/views/emails/forgot-password.blade.php b/resources/views/emails/forgot-password.blade.php
index d399424108..633d26df79 100755
--- a/resources/views/emails/forgot-password.blade.php
+++ b/resources/views/emails/forgot-password.blade.php
@@ -3,11 +3,11 @@
@section('content')
<p>{{ trans('mail.hello') }} {{ $user->first_name }},</p>
-<p>{{ trans('mail.link_to_update_password', ['web' => \App\Models\Setting::getSettings()->site_name]) }} </p>
+<p>{{ trans('mail.link_to_update_password', ['web' => $snipeSettings->site_name]) }} </p>
<p><a href="{{ $forgotPasswordUrl }}">{{ $forgotPasswordUrl }}</a></p>
<p>{{ trans('mail.best_regards') }}</p>
-<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
+<p>{{ $snipeSettings->site_name }}</p>
@stop
diff --git a/resources/views/emails/register-activate.blade.php b/resources/views/emails/register-activate.blade.php
index dab10f6d1a..92091902ba 100755
--- a/resources/views/emails/register-activate.blade.php
+++ b/resources/views/emails/register-activate.blade.php
@@ -3,11 +3,11 @@
@section('content')
<p>{{ trans('mail.hello') }} {{ $user->first_name }},</p>
-<p>{{ trans('mail.welcome_to', ['web' => \App\Models\Setting::getSettings()->site_name]) }} {{ trans('mail.click_to_confirm', ['web' => \App\Models\Setting::getSettings()->site_name]) }}</p>
+<p>{{ trans('mail.welcome_to', ['web' => $snipeSettings->site_name]) }} {{ trans('mail.click_to_confirm', ['web' => $snipeSettings->site_name]) }}</p>
<p><a href="{{ $activationUrl }}">{{ $activationUrl }}</a></p>
<p>{{ trans('mail.best_regards') }}</p>
-<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
+<p>{{ $snipeSettings->site_name }}</p>
@stop
diff --git a/resources/views/emails/send-login.blade.php b/resources/views/emails/send-login.blade.php
index c4b925054a..b34bef7695 100644
--- a/resources/views/emails/send-login.blade.php
+++ b/resources/views/emails/send-login.blade.php
@@ -3,7 +3,7 @@
@section('content')
<p>{{ trans('mail.hello') }} {{ $first_name }},</p>
-<p>{{ trans('mail.admin_has_created', ['web' => \App\Models\Setting::getSettings()->site_name]) }} </p>
+<p>{{ trans('mail.admin_has_created', ['web' => $snipeSettings->site_name]) }} </p>
<p>URL: <a href="{{ config('app.url') }}">{{ config('app.url') }}</a><br>
{{ trans('mail.login') }} {{ $username }} <br>
@@ -12,5 +12,5 @@
<p>{{ trans('mail.best_regards') }}</p>
-<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
+<p>{{ $snipeSettings->site_name }}</p>
@stop
diff --git a/resources/views/groups/edit.blade.php b/resources/views/groups/edit.blade.php
index d3713d174f..f9840fd3b4 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')
+<style>
+ label.radio-padding {
+ margin-right: 25px;
+ }
+</style>
@parent
@stop
-@section('header_right')
-<a href="{{ route('groups') }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@stop
-
-{{-- Content --}}
-@section('content')
-
- <style>
- label.radio-padding {
- margin-right: 25px;
- }
- </style>
-
-
- <div class="row">
- <div class="col-md-8 col-md-offset-2">
- <div class="box box-default">
-
- @if ($group->id)
- <div class="box-header with-border">
- <div class="box-heading">
- <h3 class="box-title"> {{ $group->name }}</h3>
- </div>
- </div><!-- /.box-header -->
- @endif
-
- <div class="box-body">
-
- <form class="form-horizontal" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <!-- Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}
- <i class='fa fa-asterisk'></i></label>
- </label>
- <div class="col-md-6 required">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="col-md-8 col-md-offset-3">
+@section('inputFields')
+<!-- Name -->
+<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
+ <label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}
+ <i class='fa fa-asterisk'></i></label>
+ <div class="col-md-6 required">
+ <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
+ {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ </div>
- @foreach ($permissions as $area => $permission)
+ <div class="col-md-8 col-md-offset-3">
+ @foreach ($permissions as $area => $permission)
@for ($i = 0; $i < count($permission); $i++)
- <?php
- $permission_name = $permission[$i]['permission'];
- ?>
-
+ <?php
+ $permission_name = $permission[$i]['permission'];
+ ?>
@if ($permission[$i]['display'])
- <h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
- <p>{{ $permission[$i]['note'] }}</p>
+ <h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
+ <p>{{ $permission[$i]['note'] }}</p>
- <!-- radio -->
- <div class="form-group" style="padding-left: 15px;">
+ <!-- radio -->
+ <div class="form-group" style="padding-left: 15px;">
- <label class="radio-padding">
+ <label class="radio-padding">
{{ Form::radio('permission['.$permission_name.']', 1,
(array_key_exists($permission_name, $groupPermissions) && $groupPermissions[$permission_name]), ['class' => 'minimal']) }}
- Grant</label>
-
- <label class="radio-padding">
- {{ Form::radio('permission['.$permission_name.']', 0, (!array_key_exists($permission_name, $groupPermissions) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
- Deny</label>
- </div>
- <hr>
- @endif
+ Grant
+ </label>
+
+ <label class="radio-padding">
+ {{ Form::radio('permission['.$permission_name.']', 0, (!array_key_exists($permission_name, $groupPermissions) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
+ Deny
+ </label>
+ </div>
+ <hr>
+ @endif
@endfor
@endforeach
-
- </div>
-
- <hr>
-
- </div>
-
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
- </div>
-
-
-
-</form>
-
-</div>
-</div>
@stop
diff --git a/resources/views/groups/index.blade.php b/resources/views/groups/index.blade.php
index 66bbd03db9..3c1b3dfc82 100755
--- a/resources/views/groups/index.blade.php
+++ b/resources/views/groups/index.blade.php
@@ -23,7 +23,7 @@
<table
name="groups"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-toggle="table"
data-url="{{ route('api.groups.list') }}"
@@ -45,48 +45,7 @@
</div>
</div>
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'groups-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
@stop
+@section('moar_scripts')
+@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 ed55212e6e..d57a564692 100755
--- a/resources/views/hardware/bulk.blade.php
+++ b/resources/views/hardware/bulk.blade.php
@@ -86,7 +86,7 @@
{{ trans('admin/hardware/form.cost') }}
</label>
<div class="input-group col-md-3">
- <span class="input-group-addon">{{ \App\Models\Setting::first()->default_currency }}</span>
+ <span class="input-group-addon">{{ $snipeSettings->default_currency }}</span>
<input type="text" class="form-control" placeholder="{{ trans('admin/hardware/form.cost') }}" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost') }}">
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php
index 55b8778c71..e057edf466 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') }}
+@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('inputFields')
+
+@include ('partials.forms.edit.company')
+<!-- Asset Tag -->
+<div class="form-group {{ $errors->has('asset_tag') ? ' has-error' : '' }}">
+ <label for="asset_tag" class="col-md-3 control-label">{{ trans('admin/hardware/form.tag') }}</label>
+</label>
+<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_tag')) ? ' required' : '' }}">
+ @if ($item->id)
+ <input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $item->asset_tag) }}" />
@else
- {{ trans('admin/hardware/form.create') }}
+ <input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
@endif
-@parent
-@stop
-@section('header_right')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@stop
+ {!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+</div>
+</div>
+<!-- Model -->
+<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
+ <label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.model') }}</label>
+</label>
+<div class="col-md-7 col-sm-10{{ (\App\Helpers\Helper::checkIfRequired($item, 'model_id')) ? ' required' : '' }}">
+ @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
-{{-- Page content --}}
+ <!-- onclick="return dependency('model')" -->
+ {!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
-@section('content')
-
-
-
-<div class="row">
- <div class="col-md-8 col-md-offset-2">
- @if ($asset->id)
- <form id="create-form" class="form-horizontal" method="post" action="{{ route('update/hardware',$asset->id) }}" autocomplete="off" role="form" enctype="multipart/form-data">
- @else
- <form id="create-form" class="form-horizontal" method="post" action="{{ route('savenew/hardware') }}" autocomplete="off" role="form" enctype="multipart/form-data">
- @endif
-
-
-
- <div class="box box-default">
- @if ($asset->id)
- <div class="box-header with-border">
- <h3 class="box-title">{{ $asset->showAssetName() }}</h3>
- </div><!-- /.box-header -->
- @endif
-
- <div class="box-body">
-
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <!-- Asset Tag -->
- <div class="form-group {{ $errors->has('asset_tag') ? ' has-error' : '' }}">
- <label for="asset_tag" class="col-md-3 control-label">{{ trans('admin/hardware/form.tag') }}</label>
- </label>
- <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'asset_tag')) ? ' required' : '' }}">
- @if ($asset->id)
- <input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $asset->asset_tag) }}" />
- @else
- <input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
- @endif
-
- {!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Model -->
- <div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
- <label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.model') }}</label>
- </label>
- <div class="col-md-7 col-sm-10{{ (\App\Helpers\Helper::checkIfRequired($asset, 'model_id')) ? ' required' : '' }}">
- @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
-
- <!-- onclick="return dependency('model')" -->
- {!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
-
- </div>
- <div class="col-md-1 col-sm-1 text-left">
- <a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id" class="btn btn-sm btn-default">New</a>
- <span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
- </div>
- </div>
-
-
- <div id='custom_fields_content'>
- <!-- Custom Fields -->
- @if ($asset->model && $asset->model->fieldset)
- <?php $model=$asset->model; ?>
- @endif
- @if (Input::old('model_id'))
- <?php $model=\App\Models\AssetModel::find(Input::old('model_id')); ?>
- @elseif (isset($selected_model))
- <?php $model=$selected_model; ?>
- @endif
- @if (isset($model) && $model)
- @include("models/custom_fields_form",["model" => $model])
- @endif
- </div>
-
- <!-- Status -->
- <div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
- <label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
- <div class="col-md-7 col-sm-11{{ (\App\Helpers\Helper::checkIfRequired($asset, 'status_id')) ? ' required' : '' }}">
- {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- <div class="col-md-1 col-sm-1 text-left">
- <a href='#' data-toggle="modal" data-target="#createModal" data-dependency='statuslabel' data-select='status_select_id' class="btn btn-sm btn-default">New</a>
- <span class="status_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
- </div>
- <div class="col-md-7 col-sm-11 col-md-offset-3">
- <p class="help-block">{{ trans('admin/hardware/form.help_checkout') }}</p>
- </div>
- </div>
-
- @if (!$asset->id)
- <!-- Assigned To -->
- <div id="assigned_user" style="display: none;" class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
- <label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
- </label>
- <div class="col-md-7 col-sm-12">
- {{ Form::select('assigned_to', $assigned_to , Input::old('assigned_to', $asset->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
-
- {!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- <div class="col-md-1 col-sm-1 text-left" style="margin-left: -20px; padding-top: 3px">
- <a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
- </div>
- </div>
- @endif
-
-
- <!-- Serial -->
- <div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
- <label for="serial" class="col-md-3 control-label">{{ trans('admin/hardware/form.serial') }} </label>
- <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'serial')) ? ' required' : '' }}">
- <input class="form-control" type="text" name="serial" id="serial" value="{{ Input::old('serial', $asset->serial) }}" />
- {!! $errors->first('serial', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Asset Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('admin/hardware/form.name') }}</label>
- <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'name')) ? ' required' : '' }}">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Company -->
- @if (\App\Models\Company::isCurrentUserAuthorized())
- <div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
- <div class="col-md-3 control-label">{{ Form::label('company_id', trans('general.company')) }}</div>
- <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'company_id')) ? ' required' : '' }}">
- {{ Form::select('company_id', $company_list , Input::old('company_id', $asset->company_id),
- ['class'=>'select2', 'style'=>'width:100%']) }}
- {!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- @endif
-
- <!-- Purchase Date -->
- <div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
- <label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.date') }}</label>
- <div class="input-group col-md-3">
- <div class="input-group">
-
- <input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $asset->purchase_date) }}">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- </div><!-- /.input group -->
-
-
- {!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- <!-- Supplier -->
- <div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
- <label for="supplier_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.supplier') }}</label>
- <div class="col-md-7 col-sm-11">
- {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- <div class="col-md-1 col-sm-1 text-left">
- <a href='#' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-default">New</a>
- </div>
- </div>
-
- <!-- Order Number -->
- <div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
- <label for="order_number" class="col-md-3 control-label">{{ trans('admin/hardware/form.order') }}</label>
- <div class="col-md-7 col-sm-12">
- <input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $asset->order_number) }}" />
- {!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Cost -->
- <div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
- <label for="purchase_cost" class="col-md-3 control-label">{{ trans('admin/hardware/form.cost') }} </label>
- <div class="col-md-2">
- <div class="input-group">
- <span class="input-group-addon">
- @if (($asset->id) && ($asset->assetloc))
- {{ $asset->assetloc->currency }}
- @else
- {{ \App\Models\Setting::first()->default_currency }}
- @endif
-
-
- </span>
- <input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)) }}" />
- {!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
- <!-- Warranty -->
- <div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
- <label for="warranty_months" class="col-md-3 control-label">{{ trans('admin/hardware/form.warranty') }}</label>
- <div class="col-md-9">
-
- <div class="input-group col-md-3" style="padding-left: 0px;">
- <input class="form-control" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months', $asset->warranty_months) }}" />
- <span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
- </div>
- <div class="col-md-9" style="padding-left: 0px;">
- {!! $errors->first('warranty_months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
-
-
- </div>
- </div>
-
-
-
- <!-- Notes -->
- <div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
- <label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
- <div class="col-md-7 col-sm-12">
- <textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $asset->notes) }}</textarea>
- {!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Default Location -->
- <div class="form-group {{ $errors->has('rtd_location_id') ? ' has-error' : '' }}">
- <label for="rtd_location_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.default_location') }}</label>
- <div class="col-md-7 col-sm-11">
- {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- <div class="col-md-1 col-sm-1 text-left">
- <a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select' class="btn btn-sm btn-default">New</a>
- </div>
- </div>
-
- <!-- Requestable -->
- <div class="form-group">
- <div class="col-sm-offset-3 col-sm-10">
- <label>
- <input type="checkbox" value="1" name="requestable" id="requestable" class="minimal" {{ Input::old('requestable', $asset->requestable) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.requestable') }}
- </label>
-
- </div>
- </div>
-
-
-
- <!-- Image -->
- @if ($asset->image)
- <div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
- <label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
- <div class="col-md-5">
- {{ Form::checkbox('image_delete'),array('class' => 'minimal') }}
- <img src="{{ config('app.url') }}/uploads/assets/{{ $asset->image }}" />
- {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
- </div>
- </div>
- @endif
-
- <div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
- <label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
- <div class="col-md-5">
- <!-- {{ Form::file('image') }} -->
- <input type="file" id="file-upload" accept="image/*" name="image">
- {!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
- </div>
- </div>
-
-
-
- </div><!-- /.box-body -->
- <div class="box-footer text-right">
- <a class="btn btn-link" href="{{ URL::previous() }}" method="post" enctype="multipart/form-data">{{ trans('button.cancel') }}</a>
- <button type="submit" class="btn btn-success" id="submit-button"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div><!-- /.box-footer -->
- </div><!-- /.box -->
-
-
- </form>
+</div>
+<div class="col-md-1 col-sm-1 text-left">
+ <a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id" class="btn btn-sm btn-default">New</a>
+ <span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
+</div>
+</div>
+
+
+<div id='custom_fields_content'>
+ <!-- Custom Fields -->
+ @if ($item->model && $item->model->fieldset)
+ <?php $model=$item->model; ?>
+ @endif
+ @if (Input::old('model_id'))
+ <?php $model=\App\Models\AssetModel::find(Input::old('model_id')); ?>
+ @elseif (isset($selected_model))
+ <?php $model=$selected_model; ?>
+ @endif
+ @if (isset($model) && $model)
+ @include("models/custom_fields_form",["model" => $model])
+ @endif
+</div>
+
+@include ('partials.forms.edit.status')
+
+@if (!$item->id)
+<!-- Assigned To -->
+<div id="assigned_user" style="display: none;" class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
+ <label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
+ </label>
+ <div class="col-md-7 col-sm-12">
+ {{ Form::select('assigned_to', $assigned_to , Input::old('assigned_to', $item->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
+
+ {!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ <div class="col-md-1 col-sm-1 text-left" style="margin-left: -20px; padding-top: 3px">
+ <a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
+ </div>
+</div>
+@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')
+<?php
+$currency_type=null;
+if ($item->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')
+
+<!-- Default Location -->
+<div class="form-group {{ $errors->has('rtd_location_id') ? ' has-error' : '' }}">
+ <label for="rtd_location_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.default_location') }}</label>
+ <div class="col-md-7 col-sm-11">
+ {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ <div class="col-md-1 col-sm-1 text-left">
+ <a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select' class="btn btn-sm btn-default">New</a>
</div>
</div>
+@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')])
+
+<!-- Image -->
+@if ($item->image)
+<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
+ <label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
+ <div class="col-md-5">
+ {{ Form::checkbox('image_delete'),array('class' => 'minimal') }}
+ <img src="{{ config('app.url') }}/uploads/assets/{{ $item->image }}" />
+ {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
+ </div>
+</div>
+@endif
+
+<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
+ <label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
+ <div class="col-md-5">
+ <!-- {{ Form::file('image') }} -->
+ <input type="file" id="file-upload" accept="image/*" name="image">
+ {!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
+ </div>
+</div>
+
+@stop
@section('moar_scripts')
- @include('partials/modals')
+@include('partials/modals')
<script>
function fetchCustomFields() {
@@ -592,5 +418,4 @@ $(function () {
});
});
</script>
-@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 a5408b2ff4..04b52f5aaa 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')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/multiple-sort/bootstrap-table-multiple-sort.js') }}"></script>
-<script type="text/javascript">
-
-
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: 100,
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- showMultiSort: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'excel', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200','500','1000'],
- exportOptions: {
- fileName: 'assets-export-' + (new Date()).toISOString().slice(0,10),
- },
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- sort: 'fa fa-sort-amount-desc',
- plus: 'fa fa-plus',
- minus: 'fa fa-minus',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-
-
- // $('#toolbar').find('select').change(function () {
- // $table.bootstrapTable('refreshOptions', {
- // exportDataType: $(this).val()
- // });
- // });
-
-
-</script>
+@include ('partials.bootstrap-table', [
+ 'exportFile' => 'assets-export',
+ 'search' => true,
+ 'multiSort' => true
+])
<script>
$(function() {
diff --git a/resources/views/hardware/labels.blade.php b/resources/views/hardware/labels.blade.php
index 8d8a653d7a..77ad1f4331 100644
--- a/resources/views/hardware/labels.blade.php
+++ b/resources/views/hardware/labels.blade.php
@@ -93,8 +93,8 @@
}
}
- @if (\App\Models\Setting::getSettings()->custom_css)
- {{ \App\Models\Setting::getSettings()->show_custom_css() }}
+ @if ($snipeSettings->custom_css)
+ {{ $snipeSettings->show_custom_css() }}
@endif
</style>
diff --git a/resources/views/hardware/qr-view.blade.php b/resources/views/hardware/qr-view.blade.php
index b234e7a1cb..5407529653 100644
--- a/resources/views/hardware/qr-view.blade.php
+++ b/resources/views/hardware/qr-view.blade.php
@@ -80,7 +80,7 @@
<a href="{{ route('view/model', $asset->model->id) }}">
{{ $asset->model->name }}
</a>
- / {{ $asset->model->modelno }}</div>
+ / {{ $asset->model->model_number }}</div>
@endif
@if ($asset->purchase_date)
@@ -90,7 +90,7 @@
@if ($asset->purchase_cost)
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.cost') }}:</strong>
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
{{ number_format($asset->purchase_cost,2) }} </div>
@endif
diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php
index 71eb92705e..2519168f21 100755
--- a/resources/views/hardware/view.blade.php
+++ b/resources/views/hardware/view.blade.php
@@ -140,7 +140,7 @@
<tr>
<td>{{ trans('admin/models/table.modelnumber') }}</td>
<td>
- {{ $asset->model->modelno }}
+ {{ $asset->model->model_number }}
</td>
</tr>
@@ -201,7 +201,7 @@
@elseif (($asset->id) && ($asset->assetloc))
{{ $asset->assetloc->currency }}
@else
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
@endif
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)}}
@@ -360,7 +360,7 @@
<img src="{{ config('app.url') }}/uploads/models/{{{ $asset->model->image }}}" class="assetimg img-responsive">
@endif
- @if (App\Models\Setting::getSettings()->qr_code=='1')
+ @if ($snipeSettings->qr_code=='1')
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
@endif
@@ -572,7 +572,7 @@
<th class="col-md-2"><span class="line"></span>{{ trans('table.actions') }}</th>
<th class="col-md-2"><span class="line"></span>{{ trans('general.user') }}</th>
<th class="col-md-3"><span class="line"></span>{{ trans('general.notes') }}</th>
- @if (App\Models\Setting::getSettings()->require_accept_signature=='1')
+ @if ($snipeSettings->require_accept_signature=='1')
<th class="col-md-3"><span class="line"></span>{{ trans('general.signature') }}</th>
@endif
</tr>
@@ -626,7 +626,7 @@
@if ($log->note) {{ $log->note }}
@endif
</td>
- @if (App\Models\Setting::getSettings()->require_accept_signature=='1')
+ @if ($snipeSettings->require_accept_signature=='1')
<td>
@if (($log->accept_signature!='') && (($log->action_type=='accepted') || ($log->action_type=='declined')))
<a href="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" data-toggle="lightbox" data-type="image"><img src="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" class="img-responsive"></a>
diff --git a/resources/views/layouts/basic.blade.php b/resources/views/layouts/basic.blade.php
index e6b7202ebb..31a42920bc 100644
--- a/resources/views/layouts/basic.blade.php
+++ b/resources/views/layouts/basic.blade.php
@@ -34,21 +34,21 @@
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
- @if (\App\Models\Setting::getSettings()->header_color)
+ @if ($snipeSettings->header_color)
<style>
.main-header .navbar, .main-header .logo {
- background-color: {{ \App\Models\Setting::getSettings()->header_color }};
- background: -webkit-linear-gradient(top, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
- background: linear-gradient(to bottom, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
- border-color: {{ \App\Models\Setting::getSettings()->header_color }};
+ background-color: {{ $snipeSettings->header_color }};
+ background: -webkit-linear-gradient(top, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
+ background: linear-gradient(to bottom, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
+ border-color: {{ $snipeSettings->header_color }};
}
.skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a {
- border-left-color: {{ \App\Models\Setting::getSettings()->header_color }};
+ border-left-color: {{ $snipeSettings->header_color }};
}
.btn-primary {
- background-color: {{ \App\Models\Setting::getSettings()->header_color }};
- border-color: {{ \App\Models\Setting::getSettings()->header_color }};
+ background-color: {{ $snipeSettings->header_color }};
+ border-color: {{ $snipeSettings->header_color }};
}
</style>
@@ -58,8 +58,8 @@
<body class="hold-transition login-page">
- @if (\App\Models\Setting::getSettings()->logo!='')
- <center><img class="logo" style="padding-top: 20px; padding-bottom: 10px;" src="{{ config('app.url') }}/uploads/{{ \App\Models\Setting::getSettings()->logo }}"></center>
+ @if ($snipeSettings->logo!='')
+ <center><img class="logo" style="padding-top: 20px; padding-bottom: 10px;" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}"></center>
@endif
<!-- Content -->
@yield('content')
diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php
index 4efcce6c3a..fa6df04f36 100644
--- a/resources/views/layouts/default.blade.php
+++ b/resources/views/layouts/default.blade.php
@@ -7,7 +7,7 @@
@section('title')
@show
- :: {{ \App\Models\Setting::getSettings()->site_name }}
+ :: {{ $snipeSettings->site_name }}
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@@ -35,26 +35,26 @@
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
<style>
- @if (\App\Models\Setting::getSettings()->header_color)
+ @if ($snipeSettings->header_color)
.main-header .navbar, .main-header .logo {
- background-color: {{ \App\Models\Setting::getSettings()->header_color }};
- background: -webkit-linear-gradient(top, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
- background: linear-gradient(to bottom, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
- border-color: {{ \App\Models\Setting::getSettings()->header_color }};
+ background-color: {{ $snipeSettings->header_color }};
+ background: -webkit-linear-gradient(top, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
+ background: linear-gradient(to bottom, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
+ border-color: {{ $snipeSettings->header_color }};
}
.skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a {
- border-left-color: {{ \App\Models\Setting::getSettings()->header_color }};
+ border-left-color: {{ $snipeSettings->header_color }};
}
.btn-primary {
- background-color: {{ \App\Models\Setting::getSettings()->header_color }};
- border-color: {{ \App\Models\Setting::getSettings()->header_color }};
+ background-color: {{ $snipeSettings->header_color }};
+ border-color: {{ $snipeSettings->header_color }};
}
@endif
- @if (\App\Models\Setting::getSettings()->custom_css)
- {{ \App\Models\Setting::getSettings()->show_custom_css() }}
+ @if ($snipeSettings->custom_css)
+ {{ $snipeSettings->show_custom_css() }}
@endif
@media (max-width: 400px) {
.navbar-left {
@@ -70,7 +70,7 @@
<script>
window.snipeit = {
settings: {
- "per_page": {{ \App\Models\Setting::getSettings()->per_page }}
+ "per_page": {{ $snipeSettings->per_page }}
}
};
</script>
@@ -79,7 +79,7 @@
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
- @if (\App\Models\Setting::getSettings()->load_remote=='1')
+ @if ($snipeSettings->load_remote=='1')
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
@@ -106,18 +106,18 @@
</a>
<ul class="nav navbar-nav navbar-left">
<li class="left-navblock">
- @if (\App\Models\Setting::getSettings()->brand == '3')
+ @if ($snipeSettings->brand == '3')
<a class="logo navbar-brand no-hover" href="{{ config('app.url') }}">
- <img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ \App\Models\Setting::getSettings()->logo }}">
- {{ \App\Models\Setting::getSettings()->site_name }}
+ <img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
+ {{ $snipeSettings->site_name }}
</a>
- @elseif (\App\Models\Setting::getSettings()->brand == '2')
+ @elseif ($snipeSettings->brand == '2')
<a class="logo navbar-brand no-hover" href="{{ config('app.url') }}">
- <img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ \App\Models\Setting::getSettings()->logo }}">
+ <img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
</a>
@else
<a class="logo no-hover" href="{{ config('app.url') }}">
- {{ \App\Models\Setting::getSettings()->site_name }}
+ {{ $snipeSettings->site_name }}
</a>
@endif
</li>
diff --git a/resources/views/layouts/edit-form.blade.php b/resources/views/layouts/edit-form.blade.php
new file mode 100644
index 0000000000..597a22f188
--- /dev/null
+++ b/resources/views/layouts/edit-form.blade.php
@@ -0,0 +1,57 @@
+@extends('layouts.default')
+
+{{-- Page title --}}
+@section('title')
+ @if ($item->id)
+ {{ $updateText }}
+ @else
+ {{ $createText }}
+ @endif
+@parent
+@stop
+
+@section('header_right')
+<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
+ {{ trans('general.back') }}</a>
+@stop
+
+
+
+{{-- Page content --}}
+
+@section('content')
+
+<div class="row">
+ <div class="col-md-8 col-md-offset-2">
+ <div class="box box-default">
+ <div class="box-header with-border">
+ <h3 class="box-title">
+ @if ($item->id)
+ {{ $item->display_name }}
+ @endif
+ </h3>
+ <div class="box-tools pull-right">
+ <button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
+ </div>
+ </div><!-- /.box-header -->
+
+ <div class="box-body">
+ <form id="create-form" class="form-horizontal" method="post" action="" autocomplete="off" role="form" enctype="multipart/form-data">
+ <!-- CSRF Token -->
+ {{ csrf_field() }}
+ @yield('inputFields')
+ @include('partials.forms.edit.submit')
+ </form>
+ </div>
+ </div>
+ </div>
+ <div class="slideout-menu">
+ <a href="#" class="slideout-menu-toggle pull-right">×</a>
+ <h3>
+ {{ $helpTitle}}
+ </h3>
+ <p>{{ $helpText }} </p>
+ </div>
+</div>
+
+@stop
\ No newline at end of file
diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php
index 998f88ede1..428c142349 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
-
-<div class="row">
-<div class="col-md-8 col-md-offset-2">
- <!-- Horizontal Form -->
- <div class="box box-default">
- @if ($license->id)
- <div class="box-header with-border">
- <h3 class="box-title">{{ $license->name }}</h3>
- </div><!-- /.box-header -->
- @endif
- <!-- form start -->
- <form class="form-horizontal" method="post" action="" autocomplete="off">
-
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box-body">
-
-
-
- <!-- License -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('admin/licenses/form.name') }}</label>
- </label>
- <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($license, 'name')) ? ' required' : '' }}">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $license->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Serial -->
- <div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
- <label for="serial" class="col-md-3 control-label">{{ trans('admin/licenses/form.license_key') }}</label>
- </label>
- <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($license, 'serial')) ? ' required' : '' }}">
- <textarea class="form-control" type="text" name="serial" id="serial">{{ Input::old('serial', $license->serial) }}</textarea>
- {!! $errors->first('serial', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Seats -->
- <div class="form-group {{ $errors->has('seats') ? ' has-error' : '' }}">
- <label for="seats" class="col-md-3 control-label">{{ trans('admin/licenses/form.seats') }}
- <i class='fa fa-asterisk'></i></label>
- </label>
- <div class="col-md-2 required">
- <input class="form-control" type="text" name="seats" id="seats" value="{{ Input::old('seats', $license->seats) }}" />
- </div>
- {!! $errors->first('seats', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fa fa-times"></i> :message</span></div>') !!}
- </div>
-
- @if (\App\Models\Company::isCurrentUserAuthorized())
- <!-- Company -->
- <div class="form-group{{ $errors->has('company_id') ? ' has-error' : '' }}">
- <div class="col-md-3 control-label">
- {{ Form::label('company_id', trans('general.company')) }}
- </div>
- <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($license, 'company_id')) ? ' required' : '' }}">
- {{ Form::select('company_id', $company_list , Input::old('company_id', $license->company_id), array('class'=>'select2', 'style'=>'min-width:350px')) }}
- {!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- @endif
+@section('inputFields')
+@include ('partials.forms.edit.name', ['translated_name' => trans('admin/licenses/form.name')])
+
+<!-- Serial-->
+<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
+ <label for="serial" class="col-md-3 control-label">{{ trans('admin/licenses/form.license_key') }}</label>
+ <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'serial')) ? ' required' : '' }}">
+ <textarea class="form-control" type="text" name="serial" id="serial">{{ Input::old('serial', $item->serial) }}</textarea>
+ {!! $errors->first('serial', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
- <!-- Manufacturer -->
- <div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
- <label for="manufacturer_id" class="col-md-3 control-label">{{ trans('general.manufacturer') }}
- </label>
- <div class="col-md-7 required">
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $license->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('manufacturer_id', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
+<!-- Seats -->
+<div class="form-group {{ $errors->has('seats') ? ' has-error' : '' }}">
+ <label for="seats" class="col-md-3 control-label">{{ trans('admin/licenses/form.seats') }}</label>
+ <div class="col-md-7 col-sm-12 required">
+ <div class="col-md-2" style="padding-left:0px">
+ <input class="form-control" type="text" name="seats" id="seats" value="{{ Input::old('seats', $item->seats) }}" />
</div>
+ </div>
+ {!! $errors->first('seats', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fa fa-times"></i> :message</span></div>') !!}
+</div>
- <!-- Licensed to name -->
- <div class="form-group {{ $errors->has('license_name') ? ' has-error' : '' }}">
- <label for="license_name" class="col-md-3 control-label">{{ trans('admin/licenses/form.to_name') }}</label>
- <div class="col-md-7">
- <input class="form-control" type="text" name="license_name" id="license_name" value="{{ Input::old('license_name', $license->license_name) }}" />
- {!! $errors->first('license_name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Licensed to email -->
- <div class="form-group {{ $errors->has('license_email') ? ' has-error' : '' }}">
- <label for="license_email" class="col-md-3 control-label">{{ trans('admin/licenses/form.to_email') }}</label>
- <div class="col-md-7">
- <input class="form-control" type="text" name="license_email" id="license_email" value="{{ Input::old('license_email', $license->license_email) }}" />
- {!! $errors->first('license_email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Reassignable -->
- <div class="form-group {{ $errors->has('reassignable') ? ' has-error' : '' }}">
- <label for="reassignable" class="col-md-3 control-label">{{ trans('admin/licenses/form.reassignable') }}</label>
- <div class="col-md-7 input-group">
- {{ Form::Checkbox('reassignable', '1', Input::old('reassignable', $license->id ? $license->reassignable : '1'),array('class' => 'minimal')) }}
- {{ trans('general.yes') }}
- </div>
- </div>
-
-
-
-
- <!-- Supplier -->
- <div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
- <label for="supplier_id" class="col-md-3 control-label">{{ trans('admin/licenses/form.supplier') }}</label>
- <div class="col-md-7">
- {{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $license->supplier_id), array('class'=>'select2', 'style'=>'min-width:350px')) }}
- {!! $errors->first('supplier_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Order Number -->
- <div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
- <label for="order_number" class="col-md-3 control-label">{{ trans('admin/licenses/form.order') }}</label>
- <div class="col-md-3">
- <input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $license->order_number) }}" />
- {!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Cost -->
- <div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
- <label for="purchase_cost" class="col-md-3 control-label">{{ trans('admin/licenses/form.cost') }}</label>
- <div class="col-md-3">
- <div class="input-group">
- <span class="input-group-addon">{{ \App\Models\Setting::first()->default_currency }}</span>
- <input class="col-md-3 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost)) }}" />
- {!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
- </div>
-
-
-
-
- <!-- Purchase Date -->
- <div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
- <label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.date') }}</label>
- <div class="input-group col-md-3">
- <div class="input-group">
-
- <input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $license->purchase_date) }}">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- </div><!-- /.input group -->
-
-
- {!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Expiration Date -->
- <div class="form-group {{ $errors->has('expiration_date') ? ' has-error' : '' }}">
- <label for="expiration_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.expiration') }}</label>
- <div class="input-group col-md-3">
- <div class="input-group">
-
- <input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="expiration_date" id="expiration_date" value="{{ Input::old('expiration_date', $license->expiration_date) }}">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- </div><!-- /.input group -->
-
-
- {!! $errors->first('expiration_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Purchase Date -->
- <div class="form-group {{ $errors->has('termination_date') ? ' has-error' : '' }}">
- <label for="termination_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.termination_date') }}</label>
- <div class="input-group col-md-3">
- <div class="input-group">
-
- <input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="termination_date" id="expiration_date" value="{{ Input::old('termination_date', $license->termination_date) }}">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- </div><!-- /.input group -->
-
-
- {!! $errors->first('termination_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Purchase Order -->
- <div class="form-group {{ $errors->has('purchase_order') ? ' has-error' : '' }}">
- <label for="purchase_order" class="col-md-3 control-label">{{ trans('admin/licenses/form.purchase_order') }}</label>
- <div class="col-md-3">
- <input class="form-control" type="text" name="purchase_order" id="purchase_order" value="{{ Input::old('purchase_order', $license->purchase_order) }}" />
- {!! $errors->first('purchase_order', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Depreciation -->
- <div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
- <label for="parent" class="col-md-3 control-label">{{ trans('admin/licenses/form.depreciation') }}</label>
- <div class="col-md-7">
- {{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $license->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('depreciation_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Maintained -->
- <div class="form-group {{ $errors->has('maintained') ? ' has-error' : '' }}">
- <label for="maintained" class="col-md-3 control-label">{{ trans('admin/licenses/form.maintained') }}</label>
+@include ('partials.forms.edit.company')
+@include ('partials.forms.edit.manufacturer')
+<!-- Licensed to name -->
+<div class="form-group {{ $errors->has('license_name') ? ' has-error' : '' }}">
+ <label for="license_name" class="col-md-3 control-label">{{ trans('admin/licenses/form.to_name') }}</label>
+ <div class="col-md-7">
+ <input class="form-control" type="text" name="license_name" id="license_name" value="{{ Input::old('license_name', $item->license_name) }}" />
+ {!! $errors->first('license_name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
- <div class="checkbox col-md-7">
- {{ Form::Checkbox('maintained', '1', Input::old('maintained', $license->maintained),array('class' => 'minimal')) }}
- {{ trans('general.yes') }}
+<!-- Licensed to email -->
+<div class="form-group {{ $errors->has('license_email') ? ' has-error' : '' }}">
+ <label for="license_email" class="col-md-3 control-label">{{ trans('admin/licenses/form.to_email') }}</label>
+ <div class="col-md-7">
+ <input class="form-control" type="text" name="license_email" id="license_email" value="{{ Input::old('license_email', $item->license_email) }}" />
+ {!! $errors->first('license_email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+<!-- Reassignable -->
+<div class="form-group {{ $errors->has('reassignable') ? ' has-error' : '' }}">
+ <label for="reassignable" class="col-md-3 control-label">{{ trans('admin/licenses/form.reassignable') }}</label>
+ <div class="col-md-7 input-group">
+ {{ Form::Checkbox('reassignable', '1', Input::old('reassignable', $item->id ? $item->reassignable : '1'),array('class' => 'minimal')) }}
+ {{ trans('general.yes') }}
+ </div>
+</div>
+@include ('partials.forms.edit.supplier')
+@include ('partials.forms.edit.order_number')
+@include ('partials.forms.edit.purchase_cost')
+@include ('partials.forms.edit.purchase_date')
- </div>
- </div>
+<!-- Expiration Date -->
+<div class="form-group {{ $errors->has('expiration_date') ? ' has-error' : '' }}">
+ <label for="expiration_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.expiration') }}</label>
+ <div class="input-group col-md-3">
+ <div class="input-group">
+ <input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="expiration_date" id="expiration_date" value="{{ Input::old('expiration_date', $item->expiration_date) }}">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ </div><!-- /.input group -->
+ {!! $errors->first('expiration_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+<!-- Termination Date -->
+<div class="form-group {{ $errors->has('termination_date') ? ' has-error' : '' }}">
+ <label for="termination_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.termination_date') }}</label>
+ <div class="input-group col-md-3">
+ <div class="input-group">
- <!-- Notes -->
- <div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
- <label for="notes" class="col-md-3 control-label">{{ trans('admin/licenses/form.notes') }}</label>
- <div class="col-md-7">
- <textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $license->notes) }}</textarea>
- {!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
+ <input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="termination_date" id="termination_date" value="{{ Input::old('termination_date', $item->termination_date) }}">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ </div><!-- /.input group -->
- </div><!-- /.box-body -->
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div><!-- /.box-footer -->
- </form>
- </div><!-- /.box -->
+ {!! $errors->first('termination_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
</div>
+
+{{-- @TODO How does this differ from Order #? --}}
+<!-- Purchase Order -->
+<div class="form-group {{ $errors->has('purchase_order') ? ' has-error' : '' }}">
+ <label for="purchase_order" class="col-md-3 control-label">{{ trans('admin/licenses/form.purchase_order') }}</label>
+ <div class="col-md-3">
+ <input class="form-control" type="text" name="purchase_order" id="purchase_order" value="{{ Input::old('purchase_order', $item->purchase_order) }}" />
+ {!! $errors->first('purchase_order', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
</div>
+@include ('partials.forms.edit.depreciation')
+<!-- Maintained -->
+<div class="form-group {{ $errors->has('maintained') ? ' has-error' : '' }}">
+ <label for="maintained" class="col-md-3 control-label">{{ trans('admin/licenses/form.maintained') }}</label>
+ <div class="checkbox col-md-7">
+ {{ Form::Checkbox('maintained', '1', Input::old('maintained', $item->maintained),array('class' => 'minimal')) }}
+ {{ trans('general.yes') }}
+ </div>
+</div>
+@include ('partials.forms.edit.notes')
@stop
diff --git a/resources/views/licenses/index.blade.php b/resources/views/licenses/index.blade.php
index ddca190002..d2c86f5b69 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 @@
<th data-field="license_email" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_email') }}</th>
<th data-field="totalSeats" data-sortable="false">{{ trans('admin/licenses/form.seats') }}</th>
<th data-field="remaining" data-sortable="false">{{ trans('admin/licenses/form.remaining_seats') }}</th>
- <th data-field="purchase_date" data-sortable="true">{{ trans('admin/licenses/table.purchase_date') }}</th>
- <th data-field="purchase_cost" data-sortable="true">{{ trans('admin/licenses/form.cost') }}</th>
+ <th data-field="purchase_date" data-sortable="true">{{ trans('general.purchase_date') }}</th>
+ <th data-field="purchase_cost" data-sortable="true">{{ trans('general.purchase_cost') }}</th>
<th data-field="purchase_order" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.purchase_order') }}</th>
<th data-field="expiration_date" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.expiration') }}</th>
<th data-field="notes" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.notes') }}</th>
@@ -63,50 +63,8 @@
</div>
</div>
-
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'licenses-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-
@stop
+@section('moar_scripts')
+@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 fc5bd02423..a3c44c287b 100755
--- a/resources/views/licenses/view.blade.php
+++ b/resources/views/licenses/view.blade.php
@@ -240,7 +240,7 @@
@if ($license->purchase_date > 0)
<tr>
<td>
- {{ trans('admin/licenses/form.date') }}:
+ {{ trans('general.purchase_date') }}:
</td>
<td>
{{ $license->purchase_date }}
@@ -250,10 +250,10 @@
@if ($license->purchase_cost > 0)
<tr>
- <td>{{ trans('admin/licenses/form.cost') }}:
+ <td>{{ trans('general.purchase_cost') }}:
</td>
<td>
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }}
</td>
</tr>
@@ -289,7 +289,7 @@
@if ($license->notes)
<tr><td>
- {{ trans('admin/licenses/form.notes') }}:
+ {{ trans('general.notes') }}:
</td><td>
{!! nl2br(e($license->notes)) !!}</td></tr>
@endif
@@ -309,7 +309,7 @@
<table class="table table-striped">
<thead>
<tr>
- <th class="col-md-5">{{ trans('admin/licenses/form.notes') }}</th>
+ <th class="col-md-5">{{ trans('general.notes') }}</th>
<th class="col-md-5"><span class="line"></span>{{ trans('general.file_name') }}</th>
<th class="col-md-2"></th>
<th class="col-md-2"></th>
@@ -361,7 +361,7 @@
<th class="col-md-2"><span class="line"></span>{{ trans('general.admin') }}</th>
<th class="col-md-2"><span class="line"></span>{{ trans('button.actions') }}</th>
<th class="col-md-2"><span class="line"></span>{{ trans('admin/licenses/general.user') }}</th>
- <th class="col-md-4"><span class="line"></span>{{ trans('admin/licenses/form.notes') }}</th>
+ <th class="col-md-4"><span class="line"></span>{{ trans('general.notes') }}</th>
</tr>
</thead>
<tbody>
diff --git a/resources/views/locations/edit.blade.php b/resources/views/locations/edit.blade.php
index a6bd48a1f1..cfd80ca869 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
-
-
-<div class="row">
- <div class="col-md-8 col-md-offset-2">
-
- <div class="box box-default">
- @if ($location->id)
- <div class="box-header with-border">
- <h3 class="box-title">{{ $location->name }}</h3>
- </div><!-- /.box-header -->
- @endif
-
-
- <div class="box-body">
- <form class="form-horizontal" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <!-- Location Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('admin/locations/table.name') }}
- </label>
- <div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($location, 'name')) ? ' required' : '' }}">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $location->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
-
- </div>
-
- <!-- Parent-->
- <div class="form-group {{ $errors->has('parent_id') ? ' has-error' : '' }}">
- <label for="parent_id" class="col-md-3 control-label">
- {{ trans('admin/locations/table.parent') }}
- </label>
- <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($location, 'parent_id')) ? ' required' : '' }}">
- {!! Form::select('parent_id', $location_options , Input::old('parent_id', $location->parent_id), array('class'=>'select2 parent', 'style'=>'width:350px')) !!}
- {!! $errors->first('parent_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Currency -->
- <div class="form-group {{ $errors->has('currency') ? ' has-error' : '' }}">
- <label for="currency" class="col-md-3 control-label">
- {{ trans('admin/locations/table.currency') }}
- </label>
- <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($location, 'currency')) ? ' required' : '' }}">
- {{ Form::text('currency', Input::old('currency', $location->currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
- {!! $errors->first('currency', '<span class="alert-msg">:message</span>') !!}
- </div>
- </div>
-
- <!-- Address -->
- <div class="form-group {{ $errors->has('address') ? ' has-error' : '' }}">
- <label for="address" class="col-md-3 control-label">
- {{ trans('admin/locations/table.address') }}
- </label>
- <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($location, 'address')) ? ' required' : '' }}">
- <input class="form-control" type="text" name="address" id="address" value="{{ Input::old('address', $location->address) }}" />
- {!! $errors->first('address', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Address -->
- <div class="form-group {{ $errors->has('address2') ? ' has-error' : '' }}">
- <label for="address2" class="col-md-3 control-label"></label>
- <div class="col-md-9">
- <input class="form-control" type="text" name="address2" id="address2" value="{{ Input::old('address2', $location->address2) }}" />
- {!! $errors->first('address2', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- City -->
- <div class="form-group {{ $errors->has('city') ? ' has-error' : '' }}">
- <label for="city" class="col-md-3 control-label">{{ trans('admin/locations/table.city') }}</label>
- </label>
- <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($location, 'city')) ? ' required' : '' }}">
- <input class="form-control" type="text" name="city" id="city" value="{{ Input::old('city', $location->city) }}" />
- {!! $errors->first('city', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- City -->
- <div class="form-group {{ $errors->has('state') ? ' has-error' : '' }}">
- <label for="state" class="col-md-3 control-label">{{ trans('admin/locations/table.state') }}</label>
- <div class="col-md-9">
- <input class="form-control" type="text" name="state" id="state" value="{{ Input::old('state', $location->state) }}" />
- {!! $errors->first('state', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Zip -->
- <div class="form-group {{ $errors->has('zip') ? ' has-error' : '' }}">
- <label for="zip" class="col-md-3 control-label">{{ trans('admin/locations/table.zip') }}</label>
- <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($location, 'zip')) ? ' required' : '' }}">
- <input class="form-control" type="text" name="zip" id="zip" value="{{ Input::old('zip', $location->zip) }}" />
- {!! $errors->first('zip', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Country -->
- <div class="form-group {{ $errors->has('country') ? ' has-error' : '' }}">
- <label for="country" class="col-md-3 control-label">{{ trans('admin/locations/table.country') }}</label>
- </label>
- <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($location, 'country')) ? ' required' : '' }}">
- {!! Form::countries('country', Input::old('country', $location->country), 'select2 country') !!}
- {!! $errors->first('country', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- </div>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
+@section('inputFields')
+@include ('partials.forms.edit.name', ['translated_name' => trans('admin/locations/table.name')])
+
+<!-- Parent-->
+<div class="form-group {{ $errors->has('parent_id') ? ' has-error' : '' }}">
+ <label for="parent_id" class="col-md-3 control-label">
+ {{ trans('admin/locations/table.parent') }}
+ </label>
+ <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($item, 'parent_id')) ? ' required' : '' }}">
+ {!! Form::select('parent_id', $location_options , Input::old('parent_id', $item->parent_id), array('class'=>'select2 parent', 'style'=>'width:350px')) !!}
+ {!! $errors->first('parent_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
- </div>
- </div>
- </form>
+</div>
+<!-- Currency -->
+<div class="form-group {{ $errors->has('currency') ? ' has-error' : '' }}">
+ <label for="currency" class="col-md-3 control-label">
+ {{ trans('admin/locations/table.currency') }}
+ </label>
+ <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($item, 'currency')) ? ' required' : '' }}">
+ {{ Form::text('currency', Input::old('currency', $item->currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
+ {!! $errors->first('currency', '<span class="alert-msg">:message</span>') !!}
+ </div>
+</div>
+@include ('partials.forms.edit.address')
+@stop
-</div>
-</div>
-@if (!$location->id)
+@if (!$item->id)
@section('moar_scripts')
<script>
- var $eventSelect = $(".parent");
- $eventSelect.on("change", function () { parent_details($eventSelect.val()); });
- $(function() {
+ var $eventSelect = $(".parent");
+ $eventSelect.on("change", function () { parent_details($eventSelect.val()); });
+ $(function() {
var parent_loc = $(".parent option:selected").val();
if(parent_loc!=''){
parent_details(parent_loc);
}
- });
-
- function parent_details(id) {
-
- if (id) {
- //start ajax request
- $.ajax({
- type: 'GET',
- url: "{{config('app.url') }}/api/locations/"+id+"/check",
- //force to handle it as text
- dataType: "text",
- success: function(data) {
- var json = $.parseJSON(data);
- $("#city").val(json.city);
- $("#address").val(json.address);
- $("#address2").val(json.address2);
- $("#state").val(json.state);
- $("#zip").val(json.zip);
- $(".country").select2("val",json.country);
- }
- });
- } else {
- $("#city").val('');
- $("#address").val('');
- $("#address2").val('');
- $("#state").val('');
- $("#zip").val('');
- $(".country").select2("val",'');
- }
-
-
-
- };
+ });
+
+ function parent_details(id) {
+
+ if (id) {
+//start ajax request
+$.ajax({
+ type: 'GET',
+ url: "{{config('app.url') }}/api/locations/"+id+"/check",
+//force to handle it as text
+dataType: "text",
+success: function(data) {
+ var json = $.parseJSON(data);
+ $("#city").val(json.city);
+ $("#address").val(json.address);
+ $("#address2").val(json.address2);
+ $("#state").val(json.state);
+ $("#zip").val(json.zip);
+ $(".country").select2("val",json.country);
+}
+});
+} else {
+ $("#city").val('');
+ $("#address").val('');
+ $("#address2").val('');
+ $("#state").val('');
+ $("#zip").val('');
+ $(".country").select2("val",'');
+}
+
+
+
+};
</script>
@stop
@endif
-
-@stop
diff --git a/resources/views/locations/index.blade.php b/resources/views/locations/index.blade.php
index 87df061d9d..d97400c5cc 100755
--- a/resources/views/locations/index.blade.php
+++ b/resources/views/locations/index.blade.php
@@ -21,7 +21,7 @@
<table
name="locations"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{ route('api.locations.list') }}"
data-cookie="true"
@@ -54,50 +54,10 @@
</div>
</div>
</div>
+@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'locations-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
+@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true])
- });
-</script>
-@stop
@stop
diff --git a/resources/views/locations/view.blade.php b/resources/views/locations/view.blade.php
index bc489bf39f..9a11b11ad3 100644
--- a/resources/views/locations/view.blade.php
+++ b/resources/views/locations/view.blade.php
@@ -26,7 +26,7 @@
<table
name="location_users"
id="table-users"
- class="table table-striped"
+ class="table table-striped snipe-table"
data-url="{{route('api.locations.viewusers', $location->id)}}"
data-cookie="true"
data-click-to-select="true"
@@ -57,7 +57,7 @@
name="location_assets"
id="table-assets"
data-url="{{route('api.locations.viewassets', $location->id)}}"
- class="table table-striped"
+ class="table table-striped snipe-table"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="location_assetsDetailTable">
@@ -80,81 +80,10 @@
>
-
+@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table-users').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-
-<script type="text/javascript">
- $('#table-assets').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-
-
-@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 22379f5fcf..23eada86ea 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
-<div class="row">
-<div class="col-md-9">
-
- <form class="form" method="post" action="" autocomplete="off">
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}">
-
-
- <!-- Horizontal Form -->
- <div class="box box-default">
- @if ($manufacturer->id)
- <div class="box-header with-border">
- <h3 class="box-title">{{ $manufacturer->name }}</h3>
- </div><!-- /.box-header -->
- @endif
-
- <div class="box-body">
-
-
- <!-- Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.name') }}
- </label>
- <div class="col-md-9 required">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $manufacturer->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- </div>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
- </form>
-</div>
-
- <!-- side address column -->
- <div class="col-md-3">
- <h4>Have Some Haiku</h4>
- <p>Serious error.<br>
- All shortcuts have disappeared.<br>
- Screen. Mind. Both are blank.</p>
-
-
- </div>
-
-</div>
-
+@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 9c2ecbfd24..cee0ca0fb9 100755
--- a/resources/views/manufacturers/index.blade.php
+++ b/resources/views/manufacturers/index.blade.php
@@ -23,7 +23,7 @@
<table
name="manufacturers"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{route('api.manufacturers.list') }}"
data-cookie="true"
@@ -47,52 +47,8 @@
</div>
</div>
-
-
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'manufacturers-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-
@stop
+@section('moar_scripts')
+@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 267038ebb8..74097c9121 100644
--- a/resources/views/manufacturers/view.blade.php
+++ b/resources/views/manufacturers/view.blade.php
@@ -45,7 +45,7 @@
<div class="tab-pane fade in active" id="assets">
<table
name="manufacturer_assets"
- class="table table-striped bootstrap-table"
+ class="table table-striped bootstrap-table snipe-table"
id="assets-table"
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'assets']) }}"
data-cookie="true"
@@ -73,7 +73,7 @@
<div class="tab-pane fade" id="licenses">
<table
name="manufacturer_licenses"
- class="table table-striped bootstrap-table"
+ class="table table-striped bootstrap-table snipe-table"
id="licenses-table"
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'licenses']) }}"
data-cookie="true"
@@ -105,7 +105,7 @@
<div class="tab-pane fade" id="accessories">
<table
name="manufacturer_licenses"
- class="table table-striped bootstrap-table"
+ class="table table-striped bootstrap-table snipe-table"
id="licenses-table"
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'accessories']) }}"
data-cookie="true"
@@ -133,7 +133,7 @@
<div class="tab-pane fade" id="consumables">
<table
name="manufacturer_licenses"
- class="table table-striped bootstrap-table"
+ class="table table-striped bootstrap-table snipe-table"
id="licenses-table"
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'consumables']) }}"
data-cookie="true"
@@ -151,7 +151,7 @@
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/consumables/general.remaining') }}</th>
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
<th data-sortable="true" data-field="manufacturer" data-visible="false">{{ trans('general.manufacturer') }}</th>
- <th data-sortable="true" data-field="model_no" data-visible="false">{{ trans('general.model_no') }}</th>
+ <th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('admin/consumables/general.order') }}</th>
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/consumables/general.date') }}</th>
@@ -165,48 +165,9 @@
</div> <!-- /.nav-tabs-custom -->
</div><!-- /. col-md-12 -->
</div> <!-- /.row -->
+@stop
-
- @section('moar_scripts')
- <script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
- <script type="text/javascript">
- $('.bootstrap-table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- //search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
- </script>
- @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 5c21242d50..f55071615e 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
- <div class="row">
- <div class="col-md-8 col-md-offset-2">
-
- {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal' ]) }}
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box box-default">
-
- @if ($model->id)
- <div class="box-header with-border">
- <div class="box-heading">
- <h3 class="box-title"> {{ $model->name }}</h3>
- </div>
- </div><!-- /.box-header -->
- @endif
-
-
- <div class="box-body">
- <!-- Model name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('admin/models/table.name') }}</label>
- <div class="col-md-7 required">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $model->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
- <label for="manufacturer_id" class="col-md-3 control-label">{{ trans('general.manufacturer') }}</label>
- <div class="col-md-7 required">
- {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $model->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('manufacturer_id', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Category -->
- <div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
- <label for="category_id" class="col-md-3 control-label">{{ trans('general.category') }}</label>
- <div class="col-md-7 required">
- {{ Form::select('category_id', $category_list , Input::old('category_id', $model->category_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('category_id', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Model No. -->
- <div class="form-group {{ $errors->has('modelno') ? ' has-error' : '' }}">
- <label for="modelno" class="col-md-3 control-label">{{ trans('general.model_no') }}</label>
- <div class="col-md-7">
- <input class="form-control" type="text" name="modelno" id="modelno" value="{{ Input::old('modelno', $model->modelno) }}" />
- {!! $errors->first('modelno', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Depreciation -->
- <div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
- <label for="depreciation_id" class="col-md-3 control-label">{{ trans('general.depreciation') }}</label>
- <div class="col-md-7">
- {{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $model->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
- {!! $errors->first('depreciation_id', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- EOL -->
-
- <div class="form-group {{ $errors->has('eol') ? ' has-error' : '' }}">
- <label for="eol" class="col-md-3 control-label">{{ trans('general.eol') }}</label>
- <div class="col-md-2">
- <div class="input-group">
- <input class="col-md-1 form-control" type="text" name="eol" id="eol" value="{{ Input::old('eol', isset($model->eol)) ? $model->eol : '' }}" />
- <span class="input-group-addon">
- {{ trans('general.months') }}
- </span>
- </div>
- </div>
- <div class="col-md-9 col-md-offset-3">
- {!! $errors->first('eol', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Custom Fieldset -->
- <div class="form-group {{ $errors->has('custom_fieldset') ? ' has-error' : '' }}">
- <label for="custom_fieldset" class="col-md-3 control-label">{{ trans('admin/models/general.fieldset') }}</label>
- <div class="col-md-7">
- {{ 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', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Notes -->
- <div class="form-group {{ $errors->has('note') ? ' has-error' : '' }}">
- <label for="note" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
- <div class="col-md-7 col-sm-12">
- <textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $model->note) }}</textarea>
- <p class="help-block">{!! trans('general.markdown') !!} </p>
-
- {!! $errors->first('note', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <!-- Requestable -->
- <div class="form-group">
- <div class="col-sm-offset-3 col-sm-10">
- <label>
- <input type="checkbox" value="1" name="requestable" id="requestable" class="minimal" {{ Input::old('requestable', $model->requestable) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/models/general.requestable') }}
- </label>
- </div>
- </div>
-
- <!-- Image -->
- @if ($model->image)
- <div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
- <label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
- <div class="col-md-5">
- {{ Form::checkbox('image_delete') }}
- <img src="{{ config('app.url') }}/uploads/models/{{ $model->image }}" />
- {!! $errors->first('image_delete', '<span class="alert-msg"><br>:message</span>') !!}
- </div>
- </div>
- @endif
-
- <div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
- <label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
- <div class="col-md-5">
- {{ Form::file('image') }}
- {!! $errors->first('image', '<span class="alert-msg"><br>:message</span>') !!}
- </div>
- </div>
-
-
+@section('inputFields')
+
+@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')
+
+<!-- EOL -->
+
+<div class="form-group {{ $errors->has('eol') ? ' has-error' : '' }}">
+ <label for="eol" class="col-md-3 control-label">{{ trans('general.eol') }}</label>
+ <div class="col-md-2">
+ <div class="input-group">
+ <input class="col-md-1 form-control" type="text" name="eol" id="eol" value="{{ Input::old('eol', isset($item->eol)) ? $item->eol : '' }}" />
+ <span class="input-group-addon">
+ {{ trans('general.months') }}
+ </span>
</div>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
</div>
+ <div class="col-md-9 col-md-offset-3">
+ {!! $errors->first('eol', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+
+<!-- Custom Fieldset -->
+<div class="form-group {{ $errors->has('custom_fieldset') ? ' has-error' : '' }}">
+ <label for="custom_fieldset" class="col-md-3 control-label">{{ trans('admin/models/general.fieldset') }}</label>
+ <div class="col-md-7">
+ {{ 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', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+
+@include ('partials.forms.edit.notes')
+@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/models/general.requestable')])
+
+<!-- Image -->
+@if ($item->image)
+<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
+ <label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
+ <div class="col-md-5">
+ {{ Form::checkbox('image_delete') }}
+ <img src="{{ config('app.url') }}/uploads/models/{{ $item->image }}" />
+ {!! $errors->first('image_delete', '<span class="alert-msg"><br>:message</span>') !!}
+ </div>
+</div>
+@endif
+
+<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
+ <label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
+ <div class="col-md-5">
+ {{ Form::file('image') }}
+ {!! $errors->first('image', '<span class="alert-msg"><br>:message</span>') !!}
+ </div>
+</div>
@stop
diff --git a/resources/views/models/index.blade.php b/resources/views/models/index.blade.php
index 2afeb12643..5196d7c279 100755
--- a/resources/views/models/index.blade.php
+++ b/resources/views/models/index.blade.php
@@ -28,7 +28,7 @@
<div class="box-body">
<table
name="models"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{ route('api.models.list',array('status'=>e(Input::get('status')))) }}"
data-cookie="true"
@@ -57,48 +57,8 @@
</div>
</div>
-
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js?v=1') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-hover table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'models-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
- });
-</script>
@stop
+@section('moar_scripts')
+@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 21b4717e17..0eb97022b6 100755
--- a/resources/views/models/view.blade.php
+++ b/resources/views/models/view.blade.php
@@ -46,6 +46,7 @@
<table
name="modelassets"
id="table"
+ class="snipe-table"
data-url="{{route('api.models.view', $model->id)}}"
data-cookie="true"
data-click-to-select="true"
@@ -77,9 +78,9 @@
{{ $model->manufacturer->name }}</li>
@endif
- @if ($model->modelno)
+ @if ($model->model_number)
<li>{{ trans('general.model_no') }}:
- {{ $model->modelno }}</li>
+ {{ $model->model_number }}</li>
@endif
@if ($model->depreciation)
@@ -114,45 +115,8 @@
</div>
</div>
- @section('moar_scripts')
- <script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
- <script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
- <script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
- </script>
- @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 0000000000..1accb9af8d
--- /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 --}}
+<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
+<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
+<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
+<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js?v=1') }}"></script>
+<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
+<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
+<script src="{{ asset('assets/js/extensions/multiple-sort/bootstrap-table-multiple-sort.js') }}"></script>
+<script>
+$('.snipe-table').bootstrapTable({
+ classes: 'table table-responsive table-no-bordered',
+ undefinedText: '',
+ iconsPrefix: 'fa',
+ showRefresh: true,
+ @if ($search)
+ search: true,
+ @endif
+ pageSize: {{ $snipeSettings->per_page }},
+ pagination: true,
+ sidePagination: 'server',
+ sortable: true,
+ cookie: true,
+ cookieExpire: '2y',
+ mobileResponsive: true,
+ @if (isset($multiSort))
+ showMultiSort: true,
+ @endif
+ showExport: true,
+ showColumns: true,
+ exportDataType: 'all',
+ exportTypes: ['csv', 'excel', 'txt','json', 'xml'],
+ exportOptions: {
+ fileName: '{{ $exportFile . "-" }}' + (new Date()).toISOString().slice(0,10),
+ },
+ maintainSelected: true,
+ paginationFirstText: "{{ trans('general.first') }}",
+ paginationLastText: "{{ trans('general.last') }}",
+ paginationPreText: "{{ trans('general.previous') }}",
+ paginationNextText: "{{ trans('general.next') }}",
+ pageList: ['10','25','50','100','150','200'],
+ icons: {
+ paginationSwitchDown: 'fa-caret-square-o-down',
+ paginationSwitchUp: 'fa-caret-square-o-up',
+ columns: 'fa-columns',
+ @if( isset($multiSort))
+ sort: 'fa fa-sort-amount-desc',
+ plus: 'fa fa-plus',
+ minus: 'fa fa-minus',
+ @endif
+ refresh: 'fa-refresh'
+ },
+
+ });
+</script>
\ 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 0000000000..b4e1a59b22
--- /dev/null
+++ b/resources/views/partials/forms/edit/address.blade.php
@@ -0,0 +1,47 @@
+<div class="form-group {{ $errors->has('address') ? ' has-error' : '' }}">
+ {{ Form::label('address', trans('general.address'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('address', Input::old('address', $item->address), array('class' => 'form-control')) }}
+ {!! $errors->first('address', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+
+<div class="form-group {{ $errors->has('address2') ? ' has-error' : '' }}">
+ {{ Form::label('address2', ' ', array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('address2', Input::old('address2', $item->address2), array('class' => 'form-control')) }}
+ {!! $errors->first('address2', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+
+<div class="form-group {{ $errors->has('city') ? ' has-error' : '' }}">
+ {{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('city', Input::old('city', $item->city), array('class' => 'form-control')) }}
+ {!! $errors->first('city', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+
+<div class="form-group {{ $errors->has('state') ? ' has-error' : '' }}">
+ {{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('state', Input::old('state', $item->state), array('class' => 'form-control')) }}
+ {!! $errors->first('state', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+
+<div class="form-group {{ $errors->has('country') ? ' has-error' : '' }}">
+ {{ Form::label('country', trans('general.country'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-5">
+ {!! Form::countries('country', Input::old('country', $item->country), 'select2') !!}
+ {!! $errors->first('country', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+
+<div class="form-group {{ $errors->has('zip') ? ' has-error' : '' }}">
+ {{ Form::label('zip', trans('general.zip'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('zip', Input::old('zip', $item->zip), array('class' => 'form-control')) }}
+ {!! $errors->first('zip', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..03c2cc7b0d
--- /dev/null
+++ b/resources/views/partials/forms/edit/category.blade.php
@@ -0,0 +1,8 @@
+<!-- Category -->
+<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
+ <label for="category_id" class="col-md-3 control-label">{{ trans('general.category') }}</label>
+ <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'category_id')) ? ' required' : '' }}">
+ {{ Form::select('category_id', $category_list , Input::old('category_id', $item->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
+ {!! $errors->first('category_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..af15622caa
--- /dev/null
+++ b/resources/views/partials/forms/edit/company.blade.php
@@ -0,0 +1,9 @@
+@if (\App\Models\Company::isCurrentUserAuthorized())
+<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
+ <div class="col-md-3 control-label">{{ Form::label('company_id', trans('general.company')) }}</div>
+ <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'company_id')) ? ' required' : '' }}">
+ {{ Form::select('company_id', $company_list , Input::old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%')) }}
+ {!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+@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 0000000000..ac86dd21f9
--- /dev/null
+++ b/resources/views/partials/forms/edit/depreciation.blade.php
@@ -0,0 +1,8 @@
+<!-- Depreciation -->
+<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
+ <label for="depreciation_id" class="col-md-3 control-label">{{ trans('general.depreciation') }}</label>
+ <div class="col-md-7">
+ {{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
+ {!! $errors->first('depreciation_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..bfa7c2d633
--- /dev/null
+++ b/resources/views/partials/forms/edit/email.blade.php
@@ -0,0 +1,7 @@
+<div class="form-group {{ $errors->has('email') ? ' has-error' : '' }}">
+ {{ Form::label('email', trans('admin/suppliers/table.email'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('email', Input::old('email', $item->email), array('class' => 'form-control')) }}
+ {!! $errors->first('email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..61d6f7b20b
--- /dev/null
+++ b/resources/views/partials/forms/edit/item_number.blade.php
@@ -0,0 +1,8 @@
+<!-- Item Number -->
+<div class="form-group {{ $errors->has('item_no') ? ' has-error' : '' }}">
+ <label for="item_no" class="col-md-3 control-label">{{ trans('admin/consumables/general.item_no') }}</label>
+ <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'item_no')) ? ' required' : '' }}">
+ <input class="form-control" type="text" name="item_no" id="item_no" value="{{ Input::old('item_no', $item->item_no) }}" />
+ {!! $errors->first('item_no', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..f03d23b313
--- /dev/null
+++ b/resources/views/partials/forms/edit/location.blade.php
@@ -0,0 +1,8 @@
+<!-- Location -->
+<div class="form-group {{ $errors->has('location_id') ? ' has-error' : '' }}">
+ <label for="location_id" class="col-md-3 control-label">{{ trans('general.location') }}</label>
+ <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'location_id')) ? ' required' : '' }}">
+ {{ Form::select('location_id', $location_list , Input::old('location_id', $item->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
+ {!! $errors->first('location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..3ec81b390c
--- /dev/null
+++ b/resources/views/partials/forms/edit/maintenance_type.blade.php
@@ -0,0 +1,9 @@
+ <!-- Improvement Type -->
+ <div class="form-group {{ $errors->has('asset_maintenance_type') ? ' has-error' : '' }}">
+ <label for="asset_maintenance_type" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}
+ </label>
+ <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($assetMaintenance, 'asset_maintenance_type')) ? ' required' : '' }}">
+ {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ </div>
\ 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 0000000000..1bbe48a01c
--- /dev/null
+++ b/resources/views/partials/forms/edit/manufacturer.blade.php
@@ -0,0 +1,8 @@
+<!-- Manufacturer -->
+<div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
+ <label for="manufacturer_id" class="col-md-3 control-label">{{ trans('general.manufacturer') }}</label>
+ <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'manufacturer_id')) ? ' required' : '' }}">
+ {{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $item->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%')) }}
+ {!! $errors->first('manufacturer_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..0febd84a08
--- /dev/null
+++ b/resources/views/partials/forms/edit/minimum_quantity.blade.php
@@ -0,0 +1,15 @@
+<!-- Min QTY -->
+<div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
+ <label for="min_amt" class="col-md-3 control-label">{{ trans('general.min_amt') }}</label>
+ <div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($item, 'min_amt')) ? ' required' : '' }}">
+ <div class="col-md-2" style="padding-left:0px">
+ <input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" value="{{ Input::old('min_amt', $item->min_amt) }}" />
+ </div>
+ <div class="col-md-7" style="margin-left: -15px;">
+ <a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
+ </div>
+ <div class="col-md-12">
+ {!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ </div>
+</div>
\ 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 0000000000..f948763162
--- /dev/null
+++ b/resources/views/partials/forms/edit/model_number.blade.php
@@ -0,0 +1,8 @@
+<!-- Model Number -->
+<div class="form-group {{ $errors->has('model_number') ? ' has-error' : '' }}">
+ <label for="model_number" class="col-md-3 control-label">{{ trans('general.model_no') }}</label>
+ <div class="col-md-7">
+ <input class="form-control" type="text" name="model_number" id="model_number" value="{{ Input::old('model_number', $item->model_number) }}" />
+ {!! $errors->first('model_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..b0b77b2155
--- /dev/null
+++ b/resources/views/partials/forms/edit/name.blade.php
@@ -0,0 +1,8 @@
+<!-- Name -->
+<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
+ <label for="name" class="col-md-3 control-label">{{ $translated_name }}</label>
+ <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
+ <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $item->name) }}" />
+ {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..67e037d303
--- /dev/null
+++ b/resources/views/partials/forms/edit/notes.blade.php
@@ -0,0 +1,8 @@
+<!-- Notes -->
+<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
+ <label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
+ <div class="col-md-7 col-sm-12">
+ <textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $item->notes) }}</textarea>
+ {!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
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 0000000000..1c9277bc14
--- /dev/null
+++ b/resources/views/partials/forms/edit/order_number.blade.php
@@ -0,0 +1,8 @@
+<!-- Order Number -->
+<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
+ <label for="order_number" class="col-md-3 control-label">{{ trans('general.order_number') }}</label>
+ <div class="col-md-7 col-sm-12">
+ <input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $item->order_number) }}" />
+ {!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..6445330327
--- /dev/null
+++ b/resources/views/partials/forms/edit/phone.blade.php
@@ -0,0 +1,7 @@
+<div class="form-group {{ $errors->has('phone') ? ' has-error' : '' }}">
+ {{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('phone', Input::old('phone', $item->phone), array('class' => 'form-control')) }}
+ {!! $errors->first('phone', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..c1fdca4e2a
--- /dev/null
+++ b/resources/views/partials/forms/edit/purchase_cost.blade.php
@@ -0,0 +1,17 @@
+<!-- Purchase Cost -->
+<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
+ <label for="purchase_cost" class="col-md-3 control-label">{{ trans('general.purchase_cost') }} </label>
+ <div class="col-md-2">
+ <div class="input-group">
+ <span class="input-group-addon">
+ @if (isset($currency_type))
+ {{ $currency_type }}
+ @else
+ {{ $snipeSettings->default_currency }}
+ @endif
+ </span>
+ <input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($item->purchase_cost)) }}" />
+ {!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ </div>
+</div>
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 0000000000..188eb11498
--- /dev/null
+++ b/resources/views/partials/forms/edit/purchase_date.blade.php
@@ -0,0 +1,11 @@
+<!-- Purchase Date -->
+<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
+ <label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
+ <div class="input-group col-md-3">
+ <div class="input-group">
+ <input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $item->purchase_date) }}">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ </div>
+ {!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..d4a84abfa1
--- /dev/null
+++ b/resources/views/partials/forms/edit/quantity.blade.php
@@ -0,0 +1,11 @@
+
+<!-- QTY -->
+<div class="form-group {{ $errors->has('qty') ? ' has-error' : '' }}">
+ <label for="qty" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
+ <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'qty')) ? ' required' : '' }}">
+ <div class="col-md-2" style="padding-left:0px">
+ <input class="form-control" type="text" name="qty" id="qty" value="{{ Input::old('qty', $item->qty) }}" />
+ </div>
+ {!! $errors->first('qty', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..7cc55f485b
--- /dev/null
+++ b/resources/views/partials/forms/edit/requestable.blade.php
@@ -0,0 +1,9 @@
+<!-- Requestable -->
+<div class="form-group">
+ <div class="col-sm-offset-3 col-sm-10">
+ <label>
+ <input type="checkbox" value="1" name="requestable" id="requestable" class="minimal" {{ Input::old('requestable', $item->requestable) == '1' ? ' checked="checked"' : '' }}> {{ $requestable_text }}
+ </label>
+
+ </div>
+</div>
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 0000000000..008dd95976
--- /dev/null
+++ b/resources/views/partials/forms/edit/serial.blade.php
@@ -0,0 +1,8 @@
+<!-- Serial -->
+<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
+ <label for="serial" class="col-md-3 control-label">{{ trans('admin/hardware/form.serial') }} </label>
+ <div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'serial')) ? ' required' : '' }}">
+ <input class="form-control" type="text" name="serial" id="serial" value="{{ Input::old('serial', $item->serial) }}" />
+ {!! $errors->first('serial', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
\ 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 0000000000..a00d7c1e60
--- /dev/null
+++ b/resources/views/partials/forms/edit/status.blade.php
@@ -0,0 +1,15 @@
+<!-- Status -->
+<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
+ <label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
+ <div class="col-md-7 col-sm-11{{ (\App\Helpers\Helper::checkIfRequired($item, 'status_id')) ? ' required' : '' }}">
+ {{ 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', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ <div class="col-md-1 col-sm-1 text-left">
+ <a href='#' data-toggle="modal" data-target="#createModal" data-dependency='statuslabel' data-select='status_select_id' class="btn btn-sm btn-default">New</a>
+ <span class="status_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
+ </div>
+ <div class="col-md-7 col-sm-11 col-md-offset-3">
+ <p class="help-block">{{ trans('admin/hardware/form.help_checkout') }}</p>
+ </div>
+</div>
\ 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 0000000000..0d9b9fd974
--- /dev/null
+++ b/resources/views/partials/forms/edit/submit.blade.php
@@ -0,0 +1,4 @@
+<div class="box-footer text-right">
+ <a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
+ <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
+</div>
\ 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 0000000000..3b82bbcb13
--- /dev/null
+++ b/resources/views/partials/forms/edit/supplier.blade.php
@@ -0,0 +1,11 @@
+<!-- Supplier -->
+<div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
+ <label for="supplier_id" class="col-md-3 control-label">{{ trans('general.supplier') }}</label>
+ <div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'supplier_id')) ? ' required' : '' }}">
+ {{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $item->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px']) }}
+ {!! $errors->first('supplier_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ <div class="col-md-1 col-sm-1 text-left">
+ <a href='#' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-default">New</a>
+ </div>
+</div>
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 0000000000..2a9be8a043
--- /dev/null
+++ b/resources/views/partials/forms/edit/warranty.blade.php
@@ -0,0 +1,13 @@
+<!-- Warranty -->
+<div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
+ <label for="warranty_months" class="col-md-3 control-label">{{ trans('admin/hardware/form.warranty') }}</label>
+ <div class="col-md-9">
+ <div class="input-group col-md-3" style="padding-left: 0px;">
+ <input class="form-control" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months', $item->warranty_months) }}" />
+ <span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
+ </div>
+ <div class="col-md-9" style="padding-left: 0px;">
+ {!! $errors->first('warranty_months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git a/resources/views/reports/accessories.blade.php b/resources/views/reports/accessories.blade.php
index 7d3e593109..7cfa2df2ab 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 6b17df0619..be7fed15e1 100644
--- a/resources/views/reports/activity.blade.php
+++ b/resources/views/reports/activity.blade.php
@@ -20,7 +20,7 @@
<table
name="activityReport"
data-toolbar="#toolbar"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-url="{{ route('api.activity.list') }}"
data-cookie="true"
@@ -43,57 +43,9 @@
</div>
</div>
</div>
-
+@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: 100,
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- showMultiSort: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'excel', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200','500','1000'],
- exportOptions: {
- fileName: 'assets-export-' + (new Date()).toISOString().slice(0,10),
- },
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- sort: 'fa fa-sort-amount-desc',
- plus: 'fa fa-plus',
- minus: 'fa fa-minus',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-
-</script>
-@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 2d8a984f05..f144ec7c65 100644
--- a/resources/views/reports/asset.blade.php
+++ b/resources/views/reports/asset.blade.php
@@ -15,119 +15,72 @@
@section('content')
<div class="row">
- <div class="col-md-12">
-
- <div class="box box-default">
- <div class="box-body">
-
- <div class="table-responsive">
-
- <table
- name="assetsReport"
- {{-- data-row-style="rowStyle" --}}
- data-toolbar="#toolbar"
- class="table table-striped"
- 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')), 'report'=>'true'))}}"
- data-cookie="true"
- data-click-to-select="true"
- data-cookie-id-table="{{ e(Input::get('status')) }}assetTable-{{ config('version.hash_version') }}">
- <thead>
- <tr>
- @if (Input::get('status')!='Deleted')
- <th data-class="hidden-xs" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox"><div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div></th>
- @endif
- <th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
- <th data-field="companyName" data-searchable="true" data-sortable="true" data-switchable="true" data-visible="false">{{ trans('general.company') }}</th>
- <th data-sortable="true" data-field="name" data-visible="false">{{ trans('admin/hardware/form.name') }}</th>
- <th data-sortable="true" data-field="asset_tag">{{ trans('admin/hardware/table.asset_tag') }}</th>
- <th data-sortable="true" data-field="serial">{{ trans('admin/hardware/table.serial') }}</th>
- <th data-sortable="true" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
- <th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('admin/models/table.modelnumber') }}</th>
- <th data-sortable="true" data-field="status_label">{{ trans('admin/hardware/table.status') }}</th>
- <th data-sortable="true" data-field="assigned_to">{{ trans('admin/hardware/form.checkedout_to') }}</th>
- <th data-sortable="true" data-field="location" data-searchable="true">{{ trans('admin/hardware/table.location') }}</th>
- <th data-sortable="true" data-field="category" data-searchable="true">{{ trans('general.category') }}</th>
- <th data-sortable="true" data-field="manufacturer" data-searchable="true" data-visible="false">{{ trans('general.manufacturer') }}</th>
- <th data-sortable="true" data-field="purchase_cost" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.cost') }}</th>
- <th data-sortable="true" data-field="purchase_date" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.date') }}</th>
- <th data-sortable="false" data-field="eol" data-searchable="true">{{ trans('general.eol') }}</th>
- <th data-sortable="true" data-searchable="true" data-field="notes">{{ trans('general.notes') }}</th>
- <th data-sortable="true" data-searchable="true" data-field="order_number">{{ trans('admin/hardware/form.order') }}</th>
- <th data-sortable="true" data-searchable="true" data-field="last_checkout">{{ trans('admin/hardware/table.checkout_date') }}</th>
- <th data-sortable="true" data-field="expected_checkin" data-searchable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
- @foreach(\App\Models\CustomField::all() AS $field)
-
-
- <th data-sortable="{{ ($field->field_encrypted=='1' ? 'false' : 'true') }}" data-visible="false" data-field="{{$field->db_column_name()}}">
- @if ($field->field_encrypted=='1')
- <i class="fa fa-lock"></i>
- @endif
-
- {{$field->name}}
- </th>
-
- @endforeach
- <th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
-
- </tr>
- </thead>
-</table>
-</div>
-</div>
-</div>
-</div>
+ <div class="col-md-12">
+
+ <div class="box box-default">
+ <div class="box-body">
+
+ <div class="table-responsive">
+
+ <table
+ name="assetsReport"
+ data-toolbar="#toolbar"
+ 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')), 'report'=>'true'))}}"
+ data-cookie="true"
+ data-click-to-select="true"
+ data-cookie-id-table="{{ e(Input::get('status')) }}assetTable-{{ config('version.hash_version') }}">
+ <thead>
+ <tr>
+ @if (Input::get('status')!='Deleted')
+ <th data-class="hidden-xs" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox"><div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div></th>
+ @endif
+ <th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
+ <th data-field="companyName" data-searchable="true" data-sortable="true" data-switchable="true" data-visible="false">{{ trans('general.company') }}</th>
+ <th data-sortable="true" data-field="name" data-visible="false">{{ trans('admin/hardware/form.name') }}</th>
+ <th data-sortable="true" data-field="asset_tag">{{ trans('admin/hardware/table.asset_tag') }}</th>
+ <th data-sortable="true" data-field="serial">{{ trans('admin/hardware/table.serial') }}</th>
+ <th data-sortable="true" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
+ <th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('admin/models/table.modelnumber') }}</th>
+ <th data-sortable="true" data-field="status_label">{{ trans('admin/hardware/table.status') }}</th>
+ <th data-sortable="true" data-field="assigned_to">{{ trans('admin/hardware/form.checkedout_to') }}</th>
+ <th data-sortable="true" data-field="location" data-searchable="true">{{ trans('admin/hardware/table.location') }}</th>
+ <th data-sortable="true" data-field="category" data-searchable="true">{{ trans('general.category') }}</th>
+ <th data-sortable="true" data-field="manufacturer" data-searchable="true" data-visible="false">{{ trans('general.manufacturer') }}</th>
+ <th data-sortable="true" data-field="purchase_cost" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.cost') }}</th>
+ <th data-sortable="true" data-field="purchase_date" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.date') }}</th>
+ <th data-sortable="false" data-field="eol" data-searchable="true">{{ trans('general.eol') }}</th>
+ <th data-sortable="true" data-searchable="true" data-field="notes">{{ trans('general.notes') }}</th>
+ <th data-sortable="true" data-searchable="true" data-field="order_number">{{ trans('admin/hardware/form.order') }}</th>
+ <th data-sortable="true" data-searchable="true" data-field="last_checkout">{{ trans('admin/hardware/table.checkout_date') }}</th>
+ <th data-sortable="true" data-field="expected_checkin" data-searchable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
+ @foreach(\App\Models\CustomField::all() AS $field)
+
+
+ <th data-sortable="{{ ($field->field_encrypted=='1' ? 'false' : 'true') }}" data-visible="false" data-field="{{$field->db_column_name()}}">
+ @if ($field->field_encrypted=='1')
+ <i class="fa fa-lock"></i>
+ @endif
+
+ {{$field->name}}
+ </th>
+
+ @endforeach
+ <th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
+
+ </tr>
+ </thead>
+ </table>
+ </div> <!-- .table-responsive -->
+ </div>
+ </div>
+ </div>
</div>
+@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: 100,
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- showMultiSort: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'excel', 'txt','json', 'xml'],
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200','500','1000'],
- exportOptions: {
- fileName: 'assets-export-' + (new Date()).toISOString().slice(0,10),
- },
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- sort: 'fa fa-sort-amount-desc',
- plus: 'fa fa-plus',
- minus: 'fa fa-minus',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
+@include ('partials.bootstrap-table', ['exportFile' => 'assets-export', 'search' => true, 'multiSort' => true])
- });
-
-</script>
-@stop
@stop
diff --git a/resources/views/reports/asset_maintenances.blade.php b/resources/views/reports/asset_maintenances.blade.php
index 2dd4573c49..2d91772aab 100644
--- a/resources/views/reports/asset_maintenances.blade.php
+++ b/resources/views/reports/asset_maintenances.blade.php
@@ -62,7 +62,7 @@
@endif
<td>{{ $assetMaintenanceTime }}</td>
<td>
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
{{ number_format($assetMaintenance->cost,2) }}
</td>
</tr>
@@ -77,7 +77,7 @@
<td colspan="6" align="right"><strong>Totals:</strong></td>
<td>{{number_format($totalDays)}}</td>
<td>
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
{{ number_format($totalCost,2) }}
</td>
</tr>
@@ -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 36cf1fd6f3..8d1f4a8777 100644
--- a/resources/views/reports/depreciation.blade.php
+++ b/resources/views/reports/depreciation.blade.php
@@ -29,7 +29,7 @@
<th class="col-sm-1" data-visible="false">{{ trans('admin/categories/general.category_name') }}</th>
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
<th class="col-sm-1">{{ trans('admin/hardware/table.title') }}</th>
- @if (\App\Models\Setting::getSettings()->display_asset_name)
+ @if ($snipeSettings->display_asset_name)
<th class="col-sm-1">{{ trans('general.name') }}</th>
@endif
<th class="col-sm-1">{{ trans('admin/hardware/table.serial') }}</th>
@@ -64,7 +64,7 @@
</td>
<td>{{ $asset->model->name }}</td>
- @if (\App\Models\Setting::getSettings()->display_asset_name)
+ @if ($snipeSettings->display_asset_name)
<td>{{ $asset->name }}</td>
@endif
<td>{{ $asset->serial }}</td>
@@ -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) }}</td>
<td class="align-right">
@if ($asset->assetloc )
{{ $asset->assetloc->currency }}
@else
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
@endif
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->getDepreciatedValue()) }}</td>
@@ -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())) }}</td>
@@ -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 c84da3e1c0..ae4a87aa7f 100755
--- a/resources/views/reports/index.blade.php
+++ b/resources/views/reports/index.blade.php
@@ -28,7 +28,7 @@
<tr role="row">
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
<th class="col-sm-1">{{ trans('admin/hardware/table.title') }}</th>
- @if (\App\Models\Setting::getSettings()->display_asset_name)
+ @if ($snipeSettings->display_asset_name)
<th class="col-sm-1">{{ trans('general.name') }}</th>
@endif
<th class="col-sm-1">{{ trans('admin/hardware/table.serial') }}</th>
@@ -47,7 +47,7 @@
<tr>
<td>{{ $asset->asset_tag }}</td>
<td>{{ $asset->model->name }}</td>
- @if (\App\Models\Setting::getSettings()->display_asset_name)
+ @if ($snipeSettings->display_asset_name)
<td>{{ $asset->name }}</td>
@endif
<td>{{ $asset->serial }}</td>
@@ -73,15 +73,15 @@
@if ($asset->purchase_cost > 0)
<td class="align-right">
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }}
</td>
<td class="align-right">
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
{{ number_format($asset->depreciate()) }}
</td>
<td class="align-right">
- {{ \App\Models\Setting::first()->default_currency }}
+ {{ $snipeSettings->default_currency }}
-{{ number_format(($asset->purchase_cost - $asset->depreciate())) }}</td>
@else
<td></td>
diff --git a/resources/views/reports/licenses.blade.php b/resources/views/reports/licenses.blade.php
index 3271dd9c94..deb0549221 100644
--- a/resources/views/reports/licenses.blade.php
+++ b/resources/views/reports/licenses.blade.php
@@ -51,10 +51,10 @@
<td>{{ $license->expiration_date }}</td>
<td>{{ $license->purchase_date }}</td>
<td class="text-right">
- {{ \App\Models\Setting::getSettings()->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }}</td>
+ {{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }}</td>
<td>{{ ($license->depreciation) ? e($license->depreciation->name).' ('.$license->depreciation->months.' '.trans('general.months').')' : '' }}</td>
- <td class="text-right">{{ \App\Models\Setting::getSettings()->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->getDepreciatedValue()) }}</td>
- <td class="text-right">-{{ \App\Models\Setting::getSettings()->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput(($license->purchase_cost - $license->getDepreciatedValue())) }}</td>
+ <td class="text-right">{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->getDepreciatedValue()) }}</td>
+ <td class="text-right">-{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput(($license->purchase_cost - $license->getDepreciatedValue())) }}</td>
</tr>
@endforeach
</tbody>
@@ -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 3f098e7fc6..6da5ea7240 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 ab91784b86..56865e7a3e 100755
--- a/resources/views/settings/edit.blade.php
+++ b/resources/views/settings/edit.blade.php
@@ -298,6 +298,17 @@
</div>
</div>
+ <!-- Per Page -->
+ <div class="form-group {{ $errors->has('per_page') ? 'error' : '' }}">
+ <div class="col-md-3">
+ {{ Form::label('per_page', trans('admin/settings/general.per_page')) }}
+ </div>
+ <div class="col-md-9">
+ {{ 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', '<span class="alert-msg">:message</span>') !!}
+ </div>
+ </div>
+
</div>
</div>
diff --git a/resources/views/statuslabels/edit.blade.php b/resources/views/statuslabels/edit.blade.php
index efb9e5dfb8..06e1132059 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
- <style>
- .input-group-addon {
- width: 30px;
- }
- </style>
+<style>
+ .input-group-addon {
+ width: 30px;
+ }
+</style>
<!-- Bootstrap Color Picker -->
<link rel="stylesheet" href="{{ asset('assets/js/plugins/colorpicker/bootstrap-colorpicker.min.css') }}">
+@parent
+@stop
+@section('inputFields')
-<div class="row">
- <div class="col-md-9">
- <form class="form-horizontal" method="post" action="" autocomplete="off">
-
- <!-- CSRF Token -->
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
-
- <div class="box box-default">
- <div class="box-body">
- <!-- Asset Title -->
- <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
- <label for="name" class="col-md-3 control-label">{{ trans('general.name') }}</label>
- <div class="col-md-7 required">
- <input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $statuslabel->name) }}" />
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Label type -->
- <div class="form-group{{ $errors->has('statuslabel_types') ? ' has-error' : '' }}">
- <label for="statuslabel_types" class="col-md-3 control-label">{{ trans('admin/statuslabels/table.status_type') }} </label>
- <div class="col-md-7 required">
- {{ Form::select('statuslabel_types', $statuslabel_types, $statuslabel->getStatuslabelType(), array('class'=>'select2', 'style'=>'min-width:400px')) }}
- {!! $errors->first('statuslabel_types', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Chart color -->
- <div class="form-group{{ $errors->has('color') ? ' has-error' : '' }}">
- {{ Form::label('color', trans('admin/statuslabels/table.color'), ['class' => 'col-md-3 control-label']) }}
- <div class="col-md-2">
- <div class="input-group color">
- {{ Form::text('color', Input::old('color', $statuslabel->color), array('class' => 'form-control', 'style' => 'width: 100px;', 'maxlength'=>'10')) }}
- <div class="input-group-addon"><i></i></div>
- </div><!-- /.input group -->
- {!! $errors->first('header_color', '<span class="alert-msg">:message</span>') !!}
- </div>
- </div>
-
- <!-- Note -->
- <div class="form-group{{ $errors->has('notes') ? ' has-error' : '' }}">
- <label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
- <div class="col-md-7">
- <textarea class="col-md-12 form-control" id="notes" name="notes">{{ Input::old('notes', $statuslabel->notes) }}</textarea>
- {!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <!-- Show in Nav -->
- <div class="form-group{{ $errors->has('notes') ? ' has-error' : '' }}">
-
- <label class="col-md-offset-3" style="padding-left: 15px;">
- <input type="checkbox" value="1" name="show_in_nav" id="show_in_nav" class="minimal" {{ Input::old('show_in_nav', $statuslabel->show_in_nav) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/statuslabels/table.show_in_nav') }}
- </label>
- </div>
+@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')])
+<!-- Label type -->
+<div class="form-group{{ $errors->has('statuslabel_types') ? ' has-error' : '' }}">
+ <label for="statuslabel_types" class="col-md-3 control-label">{{ trans('admin/statuslabels/table.status_type') }} </label>
+ <div class="col-md-7 required">
+ {{ Form::select('statuslabel_types', $statuslabel_types, $item->getStatuslabelType(), array('class'=>'select2', 'style'=>'min-width:400px')) }}
+ {!! $errors->first('statuslabel_types', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+<!-- Chart color -->
+<div class="form-group{{ $errors->has('color') ? ' has-error' : '' }}">
+ {{ Form::label('color', trans('admin/statuslabels/table.color'), ['class' => 'col-md-3 control-label']) }}
+ <div class="col-md-2">
+ <div class="input-group color">
+ {{ Form::text('color', Input::old('color', $item->color), array('class' => 'form-control', 'style' => 'width: 100px;', 'maxlength'=>'10')) }}
+ <div class="input-group-addon"><i></i></div>
+ </div><!-- /.input group -->
+ {!! $errors->first('header_color', '<span class="alert-msg">:message</span>') !!}
+ </div>
+</div>
+@include ('partials.forms.edit.notes')
+<!-- Show in Nav -->
+<div class="form-group{{ $errors->has('notes') ? ' has-error' : '' }}">
- </div>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
- </div>
+ <label class="col-md-offset-3" style="padding-left: 15px;">
+ <input type="checkbox" value="1" name="show_in_nav" id="show_in_nav" class="minimal" {{ Input::old('show_in_nav', $item->show_in_nav) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/statuslabels/table.show_in_nav') }}
+ </label>
</div>
-<!-- side address column -->
-<div class="col-md-3">
- <h4>{{ trans('admin/statuslabels/table.about') }}</h4>
- <p>{{ trans('admin/statuslabels/table.info') }}</p>
-
-</div>
-</div>
+@stop
@section('moar_scripts')
<!-- bootstrap color picker -->
@@ -109,5 +60,5 @@
//color picker with addon
$(".color").colorpicker();
</script>
-@stop
+
@stop
diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.php
index d040596b48..d3dafc1856 100755
--- a/resources/views/statuslabels/index.blade.php
+++ b/resources/views/statuslabels/index.blade.php
@@ -22,6 +22,7 @@
<table
name="statuslabels"
id="table"
+ class="snipe-table"
data-url="{{ route('api.statuslabels.list') }}"
data-cookie="true"
data-click-to-select="true"
@@ -48,50 +49,8 @@
</div>
</div>
-
-
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'statuslabels-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
@stop
+@section('moar_scripts')
+@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 0f1e5e53a1..d9215b87dc 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')
-<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
- {{ trans('general.back') }}</a>
-@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')
-
- <div class="row">
- <div class="col-md-9 col-md-offset-2">
-
- {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'autocomplete' => 'off' ]) }}
- <!-- CSRF Token -->
- {{ Form::token() }}
-
- <div class="box box-default">
-
- @if ($supplier->id)
- <div class="box-header with-border">
- <div class="box-heading">
- <h3 class="box-title"> {{ $supplier->name }}</h3>
- </div>
- </div><!-- /.box-header -->
- @endif
-
-
- <div class="box-body">
- <!-- Name -->
- <div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
- {{ Form::label('name', trans('admin/suppliers/table.name'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6 required">
- {{ Form::text('name', Input::old('name', $supplier->name), array('class' => 'form-control')) }}
- {!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('address') ? ' has-error' : '' }}">
- {{ Form::label('address', trans('admin/suppliers/table.address'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('address', Input::old('address', $supplier->address), array('class' => 'form-control')) }}
- {!! $errors->first('address', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('address2') ? ' has-error' : '' }}">
- {{ Form::label('address2', ' ', array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('address2', Input::old('address2', $supplier->address2), array('class' => 'form-control')) }}
- {!! $errors->first('address2', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('city') ? ' has-error' : '' }}">
- {{ Form::label('city', trans('admin/suppliers/table.city'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('city', Input::old('city', $supplier->city), array('class' => 'form-control')) }}
- {!! $errors->first('city', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('state') ? ' has-error' : '' }}">
- {{ Form::label('state', trans('admin/suppliers/table.state'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('state', Input::old('state', $supplier->state), array('class' => 'form-control')) }}
- {!! $errors->first('state', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('country') ? ' has-error' : '' }}">
- {{ Form::label('country', trans('admin/suppliers/table.country'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-5">
- {!! Form::countries('country', Input::old('country', $supplier->country), 'select2') !!}
- {!! $errors->first('country', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
+@section('inputFields')
- <div class="form-group {{ $errors->has('zip') ? ' has-error' : '' }}">
- {{ Form::label('zip', trans('admin/suppliers/table.zip'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('zip', Input::old('zip', $supplier->zip), array('class' => 'form-control')) }}
- {!! $errors->first('zip', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <div class="form-group {{ $errors->has('contact') ? ' has-error' : '' }}">
- {{ Form::label('contact', trans('admin/suppliers/table.contact'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('contact', Input::old('contact', $supplier->contact), array('class' => 'form-control')) }}
- {!! $errors->first('contact', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
-
- <div class="form-group {{ $errors->has('phone') ? ' has-error' : '' }}">
- {{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('phone', Input::old('phone', $supplier->phone), array('class' => 'form-control')) }}
- {!! $errors->first('phone', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('fax') ? ' has-error' : '' }}">
- {{ Form::label('fax', trans('admin/suppliers/table.fax'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('fax', Input::old('fax', $supplier->fax), array('class' => 'form-control')) }}
- {!! $errors->first('fax', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('email') ? ' has-error' : '' }}">
- {{ Form::label('email', trans('admin/suppliers/table.email'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('email', Input::old('email', $supplier->email), array('class' => 'form-control')) }}
- {!! $errors->first('email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
-
- <div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
- {{ Form::label('url', trans('admin/suppliers/table.url'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('url', Input::old('url', $supplier->url), array('class' => 'form-control')) }}
- {!! $errors->first('url', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
+@include ('partials.forms.edit.name', ['translated_name' => trans('admin/suppliers/table.name')])
+@include ('partials.forms.edit.address')
+<div class="form-group {{ $errors->has('contact') ? ' has-error' : '' }}">
+ {{ Form::label('contact', trans('admin/suppliers/table.contact'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('contact', Input::old('contact', $item->contact), array('class' => 'form-control')) }}
+ {!! $errors->first('contact', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
- <div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
- {{ Form::label('notes', trans('admin/suppliers/table.notes'), array('class' => 'col-md-3 control-label')) }}
- <div class="col-md-6">
- {{Form::text('notes', Input::old('notes', $supplier->notes), array('class' => 'form-control')) }}
- {!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
- </div>
- </div>
+@include ('partials.forms.edit.phone')
- <!-- Image -->
- @if ($supplier->image)
- <div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
- <label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
- <div class="col-md-5">
- {{ Form::checkbox('image_delete') }}
- <img src="{{ config('app.url') }}/uploads/suppliers/{{ $supplier->image }}" />
- {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
- </div>
- </div>
- @endif
+<div class="form-group {{ $errors->has('fax') ? ' has-error' : '' }}">
+ {{ Form::label('fax', trans('admin/suppliers/table.fax'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('fax', Input::old('fax', $item->fax), array('class' => 'form-control')) }}
+ {!! $errors->first('fax', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
- <div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
- <label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
- <div class="col-md-5">
- {{ Form::file('image') }}
- {!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
- </div>
- </div>
+@include ('partials.forms.edit.email')
- </div>
+<div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
+ {{ Form::label('url', trans('admin/suppliers/table.url'), array('class' => 'col-md-3 control-label')) }}
+ <div class="col-md-7">
+ {{Form::text('url', Input::old('url', $item->url), array('class' => 'form-control')) }}
+ {!! $errors->first('url', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
+ </div>
+</div>
+@include ('partials.forms.edit.notes')
- </form>
- <div class="box-footer text-right">
- <button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
- </div>
+<!-- Image -->
+@if ($item->image)
+<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
+ <label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
+ <div class="col-md-5">
+ {{ Form::checkbox('image_delete') }}
+ <img src="{{ config('app.url') }}/uploads/suppliers/{{ $item->image }}" />
+ {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
+ </div>
+</div>
+@endif
- </div>
+<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
+ <label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
+ <div class="col-md-5">
+ {{ Form::file('image') }}
+ {!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
diff --git a/resources/views/suppliers/index.blade.php b/resources/views/suppliers/index.blade.php
index 8cd77fe36e..b7e1542fcb 100755
--- a/resources/views/suppliers/index.blade.php
+++ b/resources/views/suppliers/index.blade.php
@@ -24,7 +24,7 @@
<table
name="suppliers"
id="table"
- class="table table-striped"
+ class="table table-striped snipe-table"
data-url="{{ route('api.suppliers.list') }}"
data-cookie="true"
data-click-to-select="true"
@@ -49,50 +49,8 @@
</div>
</div>
</div>
-
-@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'suppliers-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
@stop
+@section('moar_scripts')
+@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 b64937094c..7d49c734a9 100755
--- a/resources/views/users/edit.blade.php
+++ b/resources/views/users/edit.blade.php
@@ -318,9 +318,9 @@
</div>
</div>
- @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')
<div class="form-group">
<div class="col-md-3 control-label">
{{ 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 6ddec064b5..cfbb6ef55a 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)
<a href="{{ route('ldap/user') }}" class="btn btn-default pull-right"><span class="fa fa-upload"></span> LDAP</a>
@endif
<a href="{{ route('import/user') }}" class="btn btn-default pull-right" style="margin-right: 5px;"><span class="fa fa-upload"></span> {{ trans('general.import') }}</a>
@@ -64,7 +64,7 @@
<table
name="users"
data-toolbar="#toolbar"
- class="table table-striped"
+ class="table table-striped snipe-table"
id="table"
data-toggle="table"
data-url="{{ route('api.users.list', array(''=>e(Input::get('status')))) }}"
@@ -134,53 +134,11 @@
</div>
</div>
-
+@stop
@section('moar_scripts')
-<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
-<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
-<script type="text/javascript">
- $('#table').bootstrapTable({
- classes: 'table table-responsive table-no-bordered',
- undefinedText: '',
- iconsPrefix: 'fa',
- showRefresh: true,
- search: true,
- pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
- pagination: true,
- sidePagination: 'server',
- sortable: true,
- cookie: true,
- cookieExpire: '2y',
- mobileResponsive: true,
- showExport: true,
- showColumns: true,
- exportDataType: 'all',
- exportTypes: ['csv', 'txt','json', 'xml'],
- exportOptions: {
- fileName: 'users-export-' + (new Date()).toISOString().slice(0,10),
- },
- maintainSelected: true,
- paginationFirstText: "{{ trans('general.first') }}",
- paginationLastText: "{{ trans('general.last') }}",
- paginationPreText: "{{ trans('general.previous') }}",
- paginationNextText: "{{ trans('general.next') }}",
- pageList: ['10','25','50','100','150','200'],
- icons: {
- paginationSwitchDown: 'fa-caret-square-o-down',
- paginationSwitchUp: 'fa-caret-square-o-up',
- columns: 'fa-columns',
- refresh: 'fa-refresh'
- },
-
- });
-</script>
-
+@include ('partials.bootstrap-table', ['exportFile' => 'users-export', 'search' => true])
<script>
@@ -210,5 +168,3 @@
</script>
@stop
-
-@stop
diff --git a/resources/views/users/ldap.blade.php b/resources/views/users/ldap.blade.php
index f62e0427fe..b34a465b49 100644
--- a/resources/views/users/ldap.blade.php
+++ b/resources/views/users/ldap.blade.php
@@ -20,7 +20,7 @@ LDAP User Sync
<div class="col-md-9">
-@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 0000000000..f4645af9df
--- /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 0000000000..510de4eea3
--- /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 0000000000..95bfcff364
--- /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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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,[email protected],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 0000000000..cec61b8589
--- /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 4bc742ce67..05daf7cdbf 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,'[email protected]',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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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,'[email protected]','$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 08f7e2ea0b..ea23efd943 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 be5ff149d3..a4b4c81efb 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 3fd7ad9a03..74db4f6134 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('&lt;span class=&quot;');
-
-$I->fillField('name', \App\Helpers\Helper::generateRandomString(15));
-$I->selectOption('form select[name=category_type]', 'Asset');
-$I->click('Save');
-$I->dontSee('&lt;span class=&quot;');
-$I->dontSeeElement('.alert-danger');
diff --git a/tests/acceptance/CompaniesCept.php b/tests/acceptance/CompaniesCept.php
index ff07d3c510..f68a312688 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 5a7f367985..4c6ef64e17 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 8bd8688a8a..ca0266f99c 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 a36d5573a3..aa34a684cf 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 8b83430a5c..ad7beadeb8 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 cf65d30113..92bdf9c582 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 5c5ae71ecc..06c2e78e90 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 <a href="/logout">Logout</a>
/* Create form */
diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml
index 44ce31e538..36b59dd11a 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 0000000000..125e76e0d8
--- /dev/null
+++ b/tests/functional/AccessoriesCest.php
@@ -0,0 +1,78 @@
+<?php
+
+
+class AccessoriesCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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('&lt;span class=&quot;');
+ $I->seeElement('.alert-success');
+ }
+}
diff --git a/tests/functional/AssetModelsCest.php b/tests/functional/AssetModelsCest.php
new file mode 100644
index 0000000000..32c1b6ef0d
--- /dev/null
+++ b/tests/functional/AssetModelsCest.php
@@ -0,0 +1,60 @@
+<?php
+
+
+class AssetModelsCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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('&lt;span class=&quot;');
+ $I->seeElement('.alert-success');
+ }
+
+}
diff --git a/tests/functional/AssetsCest.php b/tests/functional/AssetsCest.php
new file mode 100644
index 0000000000..52171f507b
--- /dev/null
+++ b/tests/functional/AssetsCest.php
@@ -0,0 +1,65 @@
+<?php
+
+
+class AssetsCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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 0000000000..5420db7eab
--- /dev/null
+++ b/tests/functional/CategoriesCest.php
@@ -0,0 +1,54 @@
+<?php
+
+
+class CategoryCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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('&lt;span class=&quot;');
+ $I->seeElement('.alert-success');
+ }
+}
diff --git a/tests/functional/CompaniesCest.php b/tests/functional/CompaniesCest.php
new file mode 100644
index 0000000000..b16a1ee4ea
--- /dev/null
+++ b/tests/functional/CompaniesCest.php
@@ -0,0 +1,50 @@
+<?php
+
+
+class CompaniesCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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('&lt;span class=&quot;');
+ $I->seeElement('.alert-success');
+ }
+}
diff --git a/tests/functional/ComponentsCest.php b/tests/functional/ComponentsCest.php
new file mode 100644
index 0000000000..cb48f0892e
--- /dev/null
+++ b/tests/functional/ComponentsCest.php
@@ -0,0 +1,74 @@
+<?php
+
+
+class ComponentsCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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('&lt;span class=&quot;');
+ $I->seeElement('.alert-success');
+ }
+
+}
diff --git a/tests/functional/ConsumablesCest.php b/tests/functional/ConsumablesCest.php
new file mode 100644
index 0000000000..d3490df9c9
--- /dev/null
+++ b/tests/functional/ConsumablesCest.php
@@ -0,0 +1,73 @@
+<?php
+
+
+class ConsumablesCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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 0000000000..2a9e5e1574
--- /dev/null
+++ b/tests/functional/DepreciationsCest.php
@@ -0,0 +1,61 @@
+<?php
+
+
+class DepreciationCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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 0000000000..57d2e42db2
--- /dev/null
+++ b/tests/functional/GroupsCest.php
@@ -0,0 +1,57 @@
+<?php
+
+
+class GroupsCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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('&lt;span class=&quot;');
+ $I->seeElement('.alert-success');
+ }
+
+}
diff --git a/tests/functional/LicensesCest.php b/tests/functional/LicensesCest.php
new file mode 100644
index 0000000000..b706a5ebaa
--- /dev/null
+++ b/tests/functional/LicensesCest.php
@@ -0,0 +1,83 @@
+<?php
+
+
+class licensesCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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' => '[email protected]',
+ '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('&lt;span class=&quot;');
+ $I->seeElement('.alert-success');
+ }
+
+}
diff --git a/tests/functional/LocationsCest.php b/tests/functional/LocationsCest.php
new file mode 100644
index 0000000000..d8babf1e54
--- /dev/null
+++ b/tests/functional/LocationsCest.php
@@ -0,0 +1,74 @@
+<?php
+
+
+class LocationsCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ // logging in
+ $I->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 0000000000..4b7e54d5d6
--- /dev/null
+++ b/tests/functional/ManufacturersCest.php
@@ -0,0 +1,57 @@
+<?php
+
+
+class ManufacturersCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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 0000000000..0cce0f6d0f
--- /dev/null
+++ b/tests/functional/StatusLabelsCest.php
@@ -0,0 +1,62 @@
+<?php
+
+
+class StatusLabelsCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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 0000000000..4e1ad04326
--- /dev/null
+++ b/tests/functional/SuppliersCest.php
@@ -0,0 +1,69 @@
+<?php
+
+
+class SuppliersCest
+{
+ public function _before(FunctionalTester $I)
+ {
+ $I->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' => '[email protected]',
+ '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 0000000000..90de61ee38
--- /dev/null
+++ b/tests/functional/UsersCest.php
@@ -0,0 +1,93 @@
+<?php
+
+class UsersCest
+{
+ public function _before(\FunctionalTester $I)
+ {
+ $I->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' => '[email protected]',
+ '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' => '[email protected]',
+ '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 8a88555806..f7cbed7bb2 100644
--- a/tests/functional/_bootstrap.php
+++ b/tests/functional/_bootstrap.php
@@ -1,2 +1,6 @@
<?php
// Here you can initialize variables that will be available to your tests
+function _beforeSuite(FunctionalTester $I)
+{
+ echo "Hello";
+}
\ No newline at end of file
diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml
index a9b2b91e3f..1f8cb0a998 100644
--- a/tests/unit.suite.yml
+++ b/tests/unit.suite.yml
@@ -6,4 +6,4 @@ modules:
enabled:
- \Helper\Unit
- Laravel5:
- environment_file: .env
+ environment_file: .env.tests