mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
Merge branch 'develop'
# Conflicts: # config/version.php
This commit is contained in:
commit
b3c386663f
|
@ -104,3 +104,4 @@ FILESYSTEM_DISK=local
|
||||||
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
|
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
|
||||||
ALLOW_IFRAMING=false
|
ALLOW_IFRAMING=false
|
||||||
APP_CIPHER=AES-256-CBC
|
APP_CIPHER=AES-256-CBC
|
||||||
|
GOOGLE_MAPS_API=
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Version extends Command
|
||||||
|
|
||||||
$version = explode('-', $full_hash_version);
|
$version = explode('-', $full_hash_version);
|
||||||
$app_version = $current_app_version = $version[0];
|
$app_version = $current_app_version = $version[0];
|
||||||
$hash_version = $version[2];
|
$hash_version = (array_key_exists('2', $version)) ? $version[2] : '';
|
||||||
$prerelease_version = '';
|
$prerelease_version = '';
|
||||||
|
|
||||||
$this->line('Branch is: '.$use_branch);
|
$this->line('Branch is: '.$use_branch);
|
||||||
|
@ -57,7 +57,6 @@ class Version extends Command
|
||||||
if (count($version)==3) {
|
if (count($version)==3) {
|
||||||
$this->line('This does not look like an alpha/beta release.');
|
$this->line('This does not look like an alpha/beta release.');
|
||||||
} else {
|
} else {
|
||||||
print_r($version);
|
|
||||||
if (array_key_exists('3',$version)) {
|
if (array_key_exists('3',$version)) {
|
||||||
$this->line('The current version looks like a beta release.');
|
$this->line('The current version looks like a beta release.');
|
||||||
$prerelease_version = $version[1];
|
$prerelease_version = $version[1];
|
||||||
|
|
|
@ -98,7 +98,7 @@ class LocationsController extends Controller
|
||||||
$image = $request->file('image');
|
$image = $request->file('image');
|
||||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||||
$path = public_path('uploads/locations/'.$file_name);
|
$path = public_path('uploads/locations/'.$file_name);
|
||||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
Image::make($image->getRealPath())->resize(600, null, function ($constraint) {
|
||||||
$constraint->aspectRatio();
|
$constraint->aspectRatio();
|
||||||
$constraint->upsize();
|
$constraint->upsize();
|
||||||
})->save($path);
|
})->save($path);
|
||||||
|
@ -216,7 +216,7 @@ class LocationsController extends Controller
|
||||||
$file_name = $location->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
$file_name = $location->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||||
|
|
||||||
if ($image->getClientOriginalExtension()!='svg') {
|
if ($image->getClientOriginalExtension()!='svg') {
|
||||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
Image::make($image->getRealPath())->resize(600, null, function ($constraint) {
|
||||||
$constraint->aspectRatio();
|
$constraint->aspectRatio();
|
||||||
$constraint->upsize();
|
$constraint->upsize();
|
||||||
})->save(app('locations_upload_path').$file_name);
|
})->save(app('locations_upload_path').$file_name);
|
||||||
|
|
|
@ -141,39 +141,42 @@ class ReportsController extends Controller
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$headers=[
|
||||||
|
trans('general.company'),
|
||||||
|
trans('admin/hardware/table.asset_tag'),
|
||||||
|
trans('admin/hardware/form.manufacturer'),
|
||||||
|
trans('general.category'),
|
||||||
|
trans('admin/hardware/form.model'),
|
||||||
|
trans('general.model_no'),
|
||||||
|
trans('general.name'),
|
||||||
|
trans('admin/hardware/table.serial'),
|
||||||
|
trans('general.status'),
|
||||||
|
trans('admin/hardware/table.purchase_date'),
|
||||||
|
trans('admin/hardware/table.purchase_cost'),
|
||||||
|
trans('admin/hardware/form.order'),
|
||||||
|
trans('general.supplier'),
|
||||||
|
trans('admin/hardware/table.checkoutto'),
|
||||||
|
trans('general.type'),
|
||||||
|
trans('admin/hardware/table.checkout_date'),
|
||||||
|
trans('admin/hardware/table.location'),
|
||||||
|
trans('general.notes'),
|
||||||
|
];
|
||||||
|
foreach ($customfields as $field) {
|
||||||
|
$headers[]=$field->name;
|
||||||
|
}
|
||||||
|
fputcsv($handle, $headers);
|
||||||
|
|
||||||
$assets->orderBy('created_at', 'DESC')->chunk(500, function($assets) use($handle, $customfields) {
|
$assets->orderBy('created_at', 'DESC')->chunk(500, function($assets) use($handle, $customfields) {
|
||||||
$headers=[
|
|
||||||
trans('general.company'),
|
|
||||||
trans('admin/hardware/table.asset_tag'),
|
|
||||||
trans('admin/hardware/form.manufacturer'),
|
|
||||||
trans('admin/hardware/form.model'),
|
|
||||||
trans('general.model_no'),
|
|
||||||
trans('general.name'),
|
|
||||||
trans('admin/hardware/table.serial'),
|
|
||||||
trans('general.status'),
|
|
||||||
trans('admin/hardware/table.purchase_date'),
|
|
||||||
trans('admin/hardware/table.purchase_cost'),
|
|
||||||
trans('admin/hardware/form.order'),
|
|
||||||
trans('general.supplier'),
|
|
||||||
trans('admin/hardware/table.checkoutto'),
|
|
||||||
trans('general.type'),
|
|
||||||
trans('admin/hardware/table.checkout_date'),
|
|
||||||
trans('admin/hardware/table.location'),
|
|
||||||
trans('general.notes'),
|
|
||||||
];
|
|
||||||
foreach ($customfields as $field) {
|
|
||||||
$headers[]=$field->name;
|
|
||||||
}
|
|
||||||
fputcsv($handle, $headers);
|
|
||||||
|
|
||||||
foreach ($assets as $asset) {
|
foreach ($assets as $asset) {
|
||||||
|
|
||||||
|
|
||||||
// Add a new row with data
|
// Add a new row with data
|
||||||
$values=[
|
$values=[
|
||||||
($asset->company) ? $asset->company->name : '',
|
($asset->company) ? $asset->company->name : '',
|
||||||
$asset->asset_tag,
|
$asset->asset_tag,
|
||||||
($asset->model->manufacturer) ? $asset->model->manufacturer->name : '',
|
($asset->model->manufacturer) ? $asset->model->manufacturer->name : '',
|
||||||
|
($asset->model->category) ? $asset->model->category->name : '',
|
||||||
($asset->model) ? $asset->model->name : '',
|
($asset->model) ? $asset->model->name : '',
|
||||||
($asset->model->model_number) ? $asset->model->model_number : '',
|
($asset->model->model_number) ? $asset->model->model_number : '',
|
||||||
($asset->name) ? $asset->name : '',
|
($asset->name) ? $asset->name : '',
|
||||||
|
@ -421,261 +424,320 @@ class ReportsController extends Controller
|
||||||
* @since [v1.0]
|
* @since [v1.0]
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function postCustom()
|
public function postCustom(Request $request)
|
||||||
{
|
{
|
||||||
$assets = Asset::orderBy('created_at', 'DESC')->with('company', 'assignedTo', 'location', 'defaultLoc', 'model', 'supplier', 'assetstatus', 'model.manufacturer')->get();
|
|
||||||
|
\Debugbar::disable();
|
||||||
$customfields = CustomField::get();
|
$customfields = CustomField::get();
|
||||||
|
$response = new StreamedResponse(function () use ($customfields, $request) {
|
||||||
|
|
||||||
$rows = [ ];
|
// Open output stream
|
||||||
$header = [ ];
|
$handle = fopen('php://output', 'w');
|
||||||
|
|
||||||
if (e(Input::get('company')) == '1') {
|
if ($request->has('use_bom')) {
|
||||||
$header[] = 'Company Name';
|
fprintf($handle, chr(0xEF) . chr(0xBB) . chr(0xBF));
|
||||||
}
|
|
||||||
|
|
||||||
if (e(Input::get('asset_name')) == '1') {
|
|
||||||
$header[] = 'Asset Name';
|
|
||||||
}
|
|
||||||
if (e(Input::get('asset_tag')) == '1') {
|
|
||||||
$header[] = 'Asset Tag';
|
|
||||||
}
|
|
||||||
if (e(Input::get('manufacturer')) == '1') {
|
|
||||||
$header[] = 'Manufacturer';
|
|
||||||
}
|
|
||||||
if (e(Input::get('model')) == '1') {
|
|
||||||
$header[] = 'Model';
|
|
||||||
$header[] = 'Model Number';
|
|
||||||
}
|
|
||||||
if (e(Input::get('category')) == '1') {
|
|
||||||
$header[] = 'Category';
|
|
||||||
}
|
|
||||||
if (e(Input::get('serial')) == '1') {
|
|
||||||
$header[] = 'Serial';
|
|
||||||
}
|
|
||||||
if (e(Input::get('purchase_date')) == '1') {
|
|
||||||
$header[] = 'Purchase Date';
|
|
||||||
}
|
|
||||||
if (( e(Input::get('purchase_cost')) == '1' ) && ( e(Input::get('depreciation')) != '1' )) {
|
|
||||||
$header[] = 'Purchase Cost';
|
|
||||||
}
|
|
||||||
if (e(Input::get('eol')) == '1') {
|
|
||||||
$header[] = 'EOL';
|
|
||||||
}
|
|
||||||
if (e(Input::get('order')) == '1') {
|
|
||||||
$header[] = 'Order Number';
|
|
||||||
}
|
|
||||||
if (e(Input::get('supplier')) == '1') {
|
|
||||||
$header[] = 'Supplier';
|
|
||||||
}
|
|
||||||
if (e(Input::get('location')) == '1') {
|
|
||||||
$header[] = 'Location';
|
|
||||||
}
|
|
||||||
if (e(Input::get('assigned_to')) == '1') {
|
|
||||||
$header[] = 'Assigned To';
|
|
||||||
}
|
|
||||||
if (e(Input::get('username')) == '1') {
|
|
||||||
$header[] = 'Username';
|
|
||||||
}
|
|
||||||
if (e(Input::get('employee_num')) == '1') {
|
|
||||||
$header[] = 'Employee No.';
|
|
||||||
}
|
|
||||||
if (e(Input::get('status')) == '1') {
|
|
||||||
$header[] = 'Status';
|
|
||||||
}
|
|
||||||
if (e(Input::get('warranty')) == '1') {
|
|
||||||
$header[] = 'Warranty';
|
|
||||||
$header[] = 'Warranty Expires';
|
|
||||||
}
|
|
||||||
if (e(Input::get('depreciation')) == '1') {
|
|
||||||
$header[] = 'Purchase Cost';
|
|
||||||
$header[] = 'Value';
|
|
||||||
$header[] = 'Diff';
|
|
||||||
}
|
|
||||||
if (e(Input::get('expected_checkin')) == '1') {
|
|
||||||
$header[] = trans('admin/hardware/form.expected_checkin');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e(Input::get('notes')) == '1') {
|
|
||||||
$header[] = trans('general.notes');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($customfields as $customfield) {
|
|
||||||
if (e(Input::get($customfield->db_column_name())) == '1') {
|
|
||||||
$header[] = $customfield->name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$header = array_map('trim', $header);
|
|
||||||
$rows[] = implode($header, ',');
|
|
||||||
|
|
||||||
foreach ($assets as $asset) {
|
|
||||||
$row = [ ];
|
|
||||||
|
|
||||||
if (e(Input::get('company')) == '1') {
|
|
||||||
$row[] = is_null($asset->company) ? '' : '"'.$asset->company->name.'"';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('asset_name')) == '1') {
|
$header = [];
|
||||||
$row[] = '"' .e($asset->name) . '"';
|
|
||||||
}
|
|
||||||
if (e(Input::get('asset_tag')) == '1') {
|
|
||||||
$row[] = e($asset->asset_tag);
|
|
||||||
}
|
|
||||||
if (e(Input::get('manufacturer')) == '1') {
|
|
||||||
if ($asset->model->manufacturer) {
|
|
||||||
$row[] = '"' .e($asset->model->manufacturer->name) . '"';
|
|
||||||
} else {
|
|
||||||
$row[] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e(Input::get('model')) == '1') {
|
|
||||||
$row[] = '"' . e($asset->model->name) . '"';
|
|
||||||
$row[] = '"' . e($asset->model->model_number) . '"';
|
|
||||||
}
|
|
||||||
if (e(Input::get('category')) == '1') {
|
|
||||||
$row[] = '"' .e($asset->model->category->name) . '"';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e(Input::get('serial')) == '1') {
|
|
||||||
$row[] = e($asset->serial);
|
|
||||||
}
|
|
||||||
if (e(Input::get('purchase_date')) == '1') {
|
|
||||||
$row[] = e($asset->purchase_date);
|
|
||||||
}
|
|
||||||
if (e(Input::get('purchase_cost')) == '1' && ( e(Input::get('depreciation')) != '1' )) {
|
|
||||||
$row[] = '"' . Helper::formatCurrencyOutput($asset->purchase_cost) . '"';
|
|
||||||
}
|
|
||||||
if (e(Input::get('eol')) == '1') {
|
|
||||||
$row[] = '"' .($asset->present()->eol_date()) ? $asset->present()->eol_date() : ''. '"';
|
|
||||||
}
|
|
||||||
if (e(Input::get('order')) == '1') {
|
|
||||||
if ($asset->order_number) {
|
|
||||||
$row[] = e($asset->order_number);
|
|
||||||
} else {
|
|
||||||
$row[] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e(Input::get('supplier')) == '1') {
|
|
||||||
if ($asset->supplier) {
|
|
||||||
$row[] = '"' .e($asset->supplier->name) . '"';
|
|
||||||
} else {
|
|
||||||
$row[] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e(Input::get('location')) == '1') {
|
|
||||||
if($asset->location) {
|
|
||||||
$show_loc = $asset->location->present()->name();
|
|
||||||
} else {
|
|
||||||
$show_loc = 'Default location '.$asset->rtd_location_id.' is invalid';
|
|
||||||
}
|
|
||||||
$row[] = $show_loc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (e(Input::get('assigned_to')) == '1') {
|
if ($request->has('company')) {
|
||||||
if ($asset->assignedto) {
|
$header[] = trans('general.company');
|
||||||
$row[] = '"' .e($asset->assignedto->present()->name()). '"';
|
|
||||||
} else {
|
|
||||||
$row[] = ''; // Empty string if unassigned
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('username')) == '1') {
|
if ($request->has('asset_name')) {
|
||||||
// Only works if we're checked out to a user, not anything else.
|
$header[] = trans('admin/hardware/form.name');
|
||||||
if ($asset->checkedOutToUser()) {
|
|
||||||
if ($asset->assignedto) {
|
|
||||||
$row[] = '"' .e($asset->assignedto->username). '"';
|
|
||||||
} else {
|
|
||||||
$row[] = ''; // Empty string if unassigned
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$row[] = ''; // Empty string if unassigned
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('employee_num')) == '1') {
|
if ($request->has('asset_tag')) {
|
||||||
// Only works if we're checked out to a user, not anything else.
|
$header[] = trans('admin/hardware/table.asset_tag');
|
||||||
if ($asset->checkedOutToUser()) {
|
|
||||||
if ($asset->assignedto) {
|
|
||||||
$row[] = '"' .e($asset->assignedto->employee_num). '"';
|
|
||||||
} else {
|
|
||||||
$row[] = ''; // Empty string if unassigned
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$row[] = ''; // Empty string if unassigned
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('status')) == '1') {
|
if ($request->has('model')) {
|
||||||
if (( $asset->status_id == '0' ) && ( $asset->assigned_to == '0' )) {
|
$header[] = trans('admin/hardware/form.model');
|
||||||
$row[] = trans('general.ready_to_deploy');
|
$header[] = trans('general.model_no');
|
||||||
} elseif (( $asset->status_id == '' ) && ( $asset->assigned_to == '0' )) {
|
|
||||||
$row[] = trans('general.pending');
|
|
||||||
} elseif ($asset->assetstatus) {
|
|
||||||
$row[] = '"' .e($asset->assetstatus->name). '"';
|
|
||||||
} else {
|
|
||||||
$row[] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e(Input::get('warranty')) == '1') {
|
|
||||||
if ($asset->warranty_months) {
|
|
||||||
$row[] = $asset->warranty_months;
|
|
||||||
$row[] = $asset->present()->warrantee_expires();
|
|
||||||
} else {
|
|
||||||
$row[] = '';
|
|
||||||
$row[] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e(Input::get('depreciation')) == '1') {
|
|
||||||
$depreciation = $asset->getDepreciatedValue();
|
|
||||||
$row[] = '"' . Helper::formatCurrencyOutput($asset->purchase_cost) . '"';
|
|
||||||
$row[] = '"' . Helper::formatCurrencyOutput($depreciation) . '"';
|
|
||||||
$row[] = '"' . Helper::formatCurrencyOutput($asset->purchase_cost) . '"';
|
|
||||||
}
|
|
||||||
if (e(Input::get('expected_checkin')) == '1') {
|
|
||||||
if ($asset->expected_checkin) {
|
|
||||||
$row[] = '"' .e($asset->expected_checkin). '"';
|
|
||||||
} else {
|
|
||||||
$row[] = ''; // Empty string if blankd
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('notes')) == '1') {
|
if ($request->has('category')) {
|
||||||
if ($asset->notes) {
|
$header[] = trans('general.category');
|
||||||
$row[] = '"' .$asset->notes . '"';
|
|
||||||
} else {
|
|
||||||
$row[] = '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->has('manufacturer')) {
|
||||||
|
$header[] = trans('admin/hardware/form.manufacturer');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('serial')) {
|
||||||
|
$header[] = trans('admin/hardware/table.serial');
|
||||||
|
}
|
||||||
|
if ($request->has('purchase_date')) {
|
||||||
|
$header[] = trans('admin/hardware/table.purchase_date');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('purchase_cost')) {
|
||||||
|
$header[] = trans('admin/hardware/table.purchase_cost');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('eol')) {
|
||||||
|
$header[] = trans('admin/hardware/table.eol');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('order')) {
|
||||||
|
$header[] = trans('admin/hardware/form.order');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('supplier')) {
|
||||||
|
$header[] = trans('general.supplier');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('location')) {
|
||||||
|
$header[] = trans('admin/hardware/table.location');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('assigned_to')) {
|
||||||
|
$header[] = trans('admin/hardware/table.checkoutto');
|
||||||
|
$header[] = trans('general.type');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('username')) {
|
||||||
|
$header[] = 'Username';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('employee_num')) {
|
||||||
|
$header[] = 'Employee No.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('status')) {
|
||||||
|
$header[] = trans('general.status');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('warranty')) {
|
||||||
|
$header[] = 'Warranty';
|
||||||
|
$header[] = 'Warranty Expires';
|
||||||
|
}
|
||||||
|
if ($request->has('depreciation')) {
|
||||||
|
$header[] = 'Purchase Cost';
|
||||||
|
$header[] = 'Value';
|
||||||
|
$header[] = 'Diff';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('checkout_date')) {
|
||||||
|
$header[] = trans('admin/hardware/table.checkout_date');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('expected_checkin')) {
|
||||||
|
$header[] = trans('admin/hardware/form.expected_checkin');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('created_at')) {
|
||||||
|
$header[] = trans('general.created_at');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('updated_at')) {
|
||||||
|
$header[] = trans('general.updated_at');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('notes')) {
|
||||||
|
$header[] = trans('general.notes');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($customfields as $customfield) {
|
foreach ($customfields as $customfield) {
|
||||||
$column_name = $customfield->db_column_name();
|
|
||||||
if (e(Input::get($customfield->db_column_name())) == '1') {
|
if (e(Input::get($customfield->db_column_name())) == '1') {
|
||||||
$row[] = str_replace(",", "\,", $asset->$column_name);
|
$header[] = $customfield->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$rows[] = implode($row, ',');
|
fputcsv($handle, $header);
|
||||||
}
|
|
||||||
|
$assets = \App\Models\Company::scopeCompanyables(Asset::select('assets.*'))->with(
|
||||||
|
'location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
|
||||||
|
'model.category', 'model.manufacturer','supplier');
|
||||||
|
|
||||||
|
if ($request->has('by_location_id')) {
|
||||||
|
$assets->where('assets.location_id', $request->input('by_location_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('by_supplier_id')) {
|
||||||
|
$assets->where('assets.supplier_id', $request->input('by_supplier_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('by_company_id')) {
|
||||||
|
$assets->where('assets.company_id', $request->input('by_company_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('by_model_id')) {
|
||||||
|
$assets->where('assets.model_id', $request->input('by_model_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('by_category_id')) {
|
||||||
|
$assets->InCategory($request->input('by_category_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('by_manufacturer_id')) {
|
||||||
|
$assets->ByManufacturer($request->input('by_manufacturer_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('by_order_number')) {
|
||||||
|
$assets->where('assets.order_number', $request->input('by_order_number'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('by_status_id')) {
|
||||||
|
$assets->where('assets.status_id', $request->input('by_status_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($request->has('purchase_start')) && ($request->has('purchase_end'))) {
|
||||||
|
$assets->whereBetween('assets.purchase_date', [$request->input('purchase_start'), $request->input('purchase_end')]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($request->has('created_start')) && ($request->has('created_end'))) {
|
||||||
|
$assets->whereBetween('assets.created_at', [$request->input('created_start'), $request->input('created_end')]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$assets->orderBy('assets.created_at', 'ASC')->chunk(500, function($assets) use($handle, $customfields, $request) {
|
||||||
|
|
||||||
|
foreach ($assets as $asset) {
|
||||||
|
$row = [];
|
||||||
|
|
||||||
|
if ($request->has('company')) {
|
||||||
|
$row[] = ($asset->company) ? $asset->company->name : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('asset_name')) {
|
||||||
|
$row[] = ($asset->name) ? $asset->name : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('asset_tag')) {
|
||||||
|
$row[] = ($asset->asset_tag) ? $asset->asset_tag : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('model')) {
|
||||||
|
$row[] = ($asset->model) ? $asset->model->name : '';
|
||||||
|
$row[] = ($asset->model) ? $asset->model->model_number : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('category')) {
|
||||||
|
$row[] = ($asset->model->category) ? $asset->model->category->name : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('manufacturer')) {
|
||||||
|
$row[] = ($asset->model && $asset->model->manufacturer) ? $asset->model->manufacturer->name : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('serial')) {
|
||||||
|
$row[] = ($asset->serial) ? $asset->serial : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('purchase_date')) {
|
||||||
|
$row[] = ($asset->purchase_date) ? $asset->purchase_date : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('purchase_cost')) {
|
||||||
|
$row[] = ($asset->purchase_cost) ? Helper::formatCurrencyOutput($asset->purchase_cost) : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('eol')) {
|
||||||
|
$row[] = ($asset->eol) ? $asset->present()->eol_date() : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('order')) {
|
||||||
|
$row[] = ($asset->order_number) ? $asset->order_number : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('supplier')) {
|
||||||
|
$row[] = ($asset->location) ? $asset->supplier->name : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($request->has('location')) {
|
||||||
|
$row[] = ($asset->location) ? $asset->location->present()->name() : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('assigned_to')) {
|
||||||
|
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? e($asset->assigned->getFullNameAttribute()) : ($asset->assigned ? e($asset->assigned->display_name) : '');
|
||||||
|
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? 'user' : e($asset->assignedType());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('username')) {
|
||||||
|
// Only works if we're checked out to a user, not anything else.
|
||||||
|
if ($asset->checkedOutToUser()) {
|
||||||
|
$row[] = ($asset->assignedto) ? $asset->assignedto->username : '';
|
||||||
|
} else {
|
||||||
|
$row[] = ''; // Empty string if unassigned
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('employee_num')) {
|
||||||
|
// Only works if we're checked out to a user, not anything else.
|
||||||
|
if ($asset->checkedOutToUser()) {
|
||||||
|
$row[] = ($asset->assignedto) ? $asset->assignedto->employee_num : '';
|
||||||
|
} else {
|
||||||
|
$row[] = ''; // Empty string if unassigned
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('status')) {
|
||||||
|
$row[] = ($asset->assetstatus) ? $asset->assetstatus->name.' ('.$asset->present()->statusMeta.')' : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($request->has('warranty')) {
|
||||||
|
$row[] = ($asset->warranty_months) ? $asset->warranty_months : '';
|
||||||
|
$row[] = $asset->present()->warrantee_expires();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('purchase_cost')) {
|
||||||
|
$row[] = ($asset->purchase_cost!='') ? Helper::formatCurrencyOutput($asset->purchase_cost) : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('depreciation')) {
|
||||||
|
$depreciation = $asset->getDepreciatedValue();
|
||||||
|
$diff = ($asset->purchase_cost - $depreciation);
|
||||||
|
$row[] = Helper::formatCurrencyOutput($depreciation);
|
||||||
|
$row[] = Helper::formatCurrencyOutput($diff);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('checkout_date')) {
|
||||||
|
$row[] = ($asset->last_checkout) ? $asset->last_checkout : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('expected_checkin')) {
|
||||||
|
$row[] = ($asset->expected_checkin) ? $asset->expected_checkin : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('created_at')) {
|
||||||
|
$row[] = ($asset->created_at) ? $asset->created_at : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('updated_at')) {
|
||||||
|
$row[] = ($asset->updated_at) ? $asset->updated_at : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('notes')) {
|
||||||
|
$row[] = ($asset->notes) ? $asset->notes : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($customfields as $customfield) {
|
||||||
|
$column_name = $customfield->db_column_name();
|
||||||
|
if ($request->has($customfield->db_column_name())) {
|
||||||
|
$row[] = $asset->$column_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fputcsv($handle, $row);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Close the output stream
|
||||||
|
fclose($handle);
|
||||||
|
}, 200, [
|
||||||
|
'Content-Type' => 'text/csv',
|
||||||
|
'Content-Disposition'
|
||||||
|
=> 'attachment; filename="custom-assets-report-'.date('Y-m-d-his').'.csv"',
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
|
||||||
// spit out a csv
|
|
||||||
if (array_filter($rows)) {
|
|
||||||
$csv = implode($rows, "\n");
|
|
||||||
$response = Response::make($csv, 200);
|
|
||||||
$response->header('Content-Type', 'text/csv');
|
|
||||||
$response->header('Content-disposition', 'attachment;filename='.date('Y-m-d-His').'-custom-asset-report.csv');
|
|
||||||
|
|
||||||
return $response;
|
|
||||||
} else {
|
|
||||||
return redirect()->to("reports/custom")
|
|
||||||
->with('error', trans('admin/reports/message.error'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ class SuppliersController extends Controller
|
||||||
$error = trans('admin/suppliers/message.does_not_exist', compact('id'));
|
$error = trans('admin/suppliers/message.does_not_exist', compact('id'));
|
||||||
|
|
||||||
// Redirect to the user management page
|
// Redirect to the user management page
|
||||||
return redirect()->route('suppliers')->with('error', $error);
|
return redirect()->route('suppliers.index')->with('error', $error);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,5 +46,9 @@ return [
|
||||||
'level' => env('ROLLBAR_LEVEL', 'error'),
|
'level' => env('ROLLBAR_LEVEL', 'error'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'google' => [
|
||||||
|
'maps_api_key' => env('GOOGLE_MAPS_API')
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
return array (
|
return array (
|
||||||
'app_version' => 'v4.1.6',
|
'app_version' => 'v4.1.6',
|
||||||
'full_app_version' => 'v4.1.6 - build 2963-g83c8449',
|
'full_app_version' => 'v4.1.6 - build 2994-g83c8449',
|
||||||
'build_version' => '2963',
|
'build_version' => '2994',
|
||||||
'prerelease_version' => '',
|
'prerelease_version' => '',
|
||||||
'hash_version' => 'g83c8449',
|
'hash_version' => 'g83c8449',
|
||||||
'full_hash' => 'v4.1.5-76-gb934d2e',
|
'full_hash' => 'v4.1.6-2994-g83c8449',
|
||||||
'branch' => 'master',
|
'branch' => 'master'
|
||||||
);
|
|
||||||
|
|
Binary file not shown.
BIN
public/css/dist/all.css
vendored
BIN
public/css/dist/all.css
vendored
Binary file not shown.
Binary file not shown.
|
@ -2,13 +2,13 @@
|
||||||
"/js/build/vue.js": "/js/build/vue.js?id=e6804371942215bd1d7d",
|
"/js/build/vue.js": "/js/build/vue.js?id=e6804371942215bd1d7d",
|
||||||
"/css/AdminLTE.css": "/css/AdminLTE.css?id=b8be19a285eaf44eec37",
|
"/css/AdminLTE.css": "/css/AdminLTE.css?id=b8be19a285eaf44eec37",
|
||||||
"/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405",
|
"/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405",
|
||||||
"/css/overrides.css": "/css/overrides.css?id=9ae1a3c861441320c5a1",
|
"/css/overrides.css": "/css/overrides.css?id=a4994a56ec31f2099730",
|
||||||
"/js/build/vue.js.map": "/js/build/vue.js.map?id=3b3d417664a61dcce3e9",
|
"/js/build/vue.js.map": "/js/build/vue.js.map?id=3b3d417664a61dcce3e9",
|
||||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6",
|
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6",
|
||||||
"/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72",
|
"/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72",
|
||||||
"/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b",
|
"/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b",
|
||||||
"/css/dist/all.css": "/css/dist/all.css?id=7c3842d2639193ac7e88",
|
"/css/dist/all.css": "/css/dist/all.css?id=277aaa6291c83cc8204f",
|
||||||
"/js/dist/all.js": "/js/dist/all.js?id=7b52ead3a55086ea1f8d",
|
"/js/dist/all.js": "/js/dist/all.js?id=7b52ead3a55086ea1f8d",
|
||||||
"/css/build/all.css": "/css/build/all.css?id=7c3842d2639193ac7e88",
|
"/css/build/all.css": "/css/build/all.css?id=277aaa6291c83cc8204f",
|
||||||
"/js/build/all.js": "/js/build/all.js?id=7b52ead3a55086ea1f8d"
|
"/js/build/all.js": "/js/build/all.js?id=7b52ead3a55086ea1f8d"
|
||||||
}
|
}
|
|
@ -315,3 +315,6 @@ img.navbar-brand-img, .navbar-brand>img {
|
||||||
max-height: 50px;
|
max-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-daterange {
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
|
|
||||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
||||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')])
|
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')])
|
||||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id'])
|
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true'])
|
||||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
|
||||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||||
@include ('partials.forms.edit.model_number')
|
@include ('partials.forms.edit.model_number')
|
||||||
@include ('partials.forms.edit.order_number')
|
@include ('partials.forms.edit.order_number')
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
||||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')])
|
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')])
|
||||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id'])
|
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true'])
|
||||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
|
||||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||||
@include ('partials.forms.edit.model_number')
|
@include ('partials.forms.edit.model_number')
|
||||||
@include ('partials.forms.edit.item_number')
|
@include ('partials.forms.edit.item_number')
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
||||||
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd">
|
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-end-date="0d">
|
||||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at') }}">
|
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at') }}">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
||||||
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd">
|
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-start-date="0d">
|
||||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
||||||
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd">
|
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-end-date="0d">
|
||||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at') }}">
|
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at') }}">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
||||||
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd">
|
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-start-date="0d">
|
||||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -144,4 +144,15 @@
|
||||||
|
|
||||||
@section('moar_scripts')
|
@section('moar_scripts')
|
||||||
@include('partials/assets-assigned')
|
@include('partials/assets-assigned')
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// $('#checkout_at').datepicker({
|
||||||
|
// clearBtn: true,
|
||||||
|
// todayHighlight: true,
|
||||||
|
// endDate: '0d',
|
||||||
|
// format: 'yyyy-mm-dd'
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id'])
|
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id', 'required' => 'true'])
|
||||||
|
|
||||||
|
|
||||||
<div id='custom_fields_content'>
|
<div id='custom_fields_content'>
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('header_right')
|
@section('header_right')
|
||||||
<a href="{{ route('reports.export.assets', ['status'=> e(Input::get('status'))]) }}" style="margin-right: 5px;" class="btn btn-default"><i class="fa fa-download icon-white"></i>
|
<a href="{{ route('reports/custom') }}" style="margin-right: 5px;" class="btn btn-default">
|
||||||
{{ trans('admin/hardware/table.dl_csv') }}</a>
|
Custom Export</a>
|
||||||
<a href="{{ route('hardware.create') }}" class="btn btn-primary pull-right"></i> {{ trans('general.create') }}</a>
|
<a href="{{ route('hardware.create') }}" class="btn btn-primary pull-right"></i> {{ trans('general.create') }}</a>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
'company_id'=>e(Input::get('company_id')),
|
'company_id'=>e(Input::get('company_id')),
|
||||||
'status_id'=>e(Input::get('status_id'))))}}"
|
'status_id'=>e(Input::get('status_id'))))}}"
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-cookie-id-table="{{ e(Input::get('status')) }}assetTable-{{ config('version.hash_version') }}">
|
data-cookie-id-table="{{ e(Input::get('status')) }}assetTable-{{ config('version.app_version') }}">
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.col -->
|
</div><!-- /.col -->
|
||||||
</div><!-- /.row -->
|
</div><!-- /.row -->
|
||||||
|
|
|
@ -218,14 +218,6 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endcan
|
@endcan
|
||||||
@can('create', \App\Models\User::class)
|
|
||||||
<li {!! (Request::is('users/create') ? 'class="active"' : '') !!}>
|
|
||||||
<a href="{{ route('users.create') }}">
|
|
||||||
<i class="fa fa-user fa-fw"></i>
|
|
||||||
{{ trans('general.user') }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@endcan
|
|
||||||
@can('create', \App\Models\Component::class)
|
@can('create', \App\Models\Component::class)
|
||||||
<li {!! (Request::is('components/create') ? 'class="active"' : '') !!}>
|
<li {!! (Request::is('components/create') ? 'class="active"' : '') !!}>
|
||||||
<a href="{{ route('components.create') }}">
|
<a href="{{ route('components.create') }}">
|
||||||
|
@ -234,6 +226,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endcan
|
@endcan
|
||||||
|
@can('create', \App\Models\User::class)
|
||||||
|
<li {!! (Request::is('users/create') ? 'class="active"' : '') !!}>
|
||||||
|
<a href="{{ route('users.create') }}">
|
||||||
|
<i class="fa fa-user fa-fw"></i>
|
||||||
|
{{ trans('general.user') }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endcan
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
||||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
|
||||||
|
|
||||||
<!-- Licensed to name -->
|
<!-- Licensed to name -->
|
||||||
<div class="form-group {{ $errors->has('license_name') ? ' has-error' : '' }}">
|
<div class="form-group {{ $errors->has('license_name') ? ' has-error' : '' }}">
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
|
|
||||||
{{ trans('general.location') }}:
|
{{ trans('general.location') }}:
|
||||||
{{ $location->name }}
|
{{ $location->name }}
|
||||||
@if ($location->manager)
|
|
||||||
<div class="h6"> {!! trans('admin/users/table.manager') . ': ' . $location->manager->present()->nameUrl() !!}</div>
|
|
||||||
@endif
|
|
||||||
@parent
|
@parent
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
@ -19,7 +17,7 @@
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-9">
|
||||||
<div class="box box-default">
|
<div class="box box-default">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<div class="box-heading">
|
<div class="box-heading">
|
||||||
|
@ -40,7 +38,19 @@
|
||||||
data-cookie-id-table="location_usersDetailTable">
|
data-cookie-id-table="location_usersDetailTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-searchable="false" data-sortable="false" data-formatter="usersLinkFormatter" data-field="name">{{ trans('general.user') }}</th>
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="id">{{ trans('general.id') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-formatter="imageFormatter" data-field="avatar">Avatar</th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-formatter="usersLinkFormatter" data-field="name">{{ trans('general.user') }}</th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-formatter="usersLinkFormatter" data-field="jobtitle">{{ trans('admin/users/table.title') }}</th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-formatter="emailFormatter" data-field="email">{{ trans('admin/users/table.email') }}</th>
|
||||||
|
<th data-searchable="true" data-visible="false" data-sortable="true" data-field="phone">{{ trans('admin/users/table.phone') }}</th>
|
||||||
|
<th data-searchable="true" data-visible="false" data-sortable="true" data-formatter="usersLinkObjFormatter" data-field="manager">{{ trans('admin/users/table.manager') }}</th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-field="assets_count"><span class="hidden-md hidden-lg">Assets</span><span class="hidden-xs"><i class="fa fa-barcode fa-lg"></i></span></th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-field="licenses_count"><span class="hidden-md hidden-lg">Licenses</span><span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span></th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-field="consumables_count"><span class="hidden-md hidden-lg">Consumables</span><span class="hidden-xs"><i class="fa fa-tint fa-lg"></i></span></th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-field="accessories_count"><span class="hidden-md hidden-lg">Accessories</span><span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span></th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-formatter="departmentsLinkObjFormatter" data-field="department">{{ trans('general.department') }}</th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-formatter="usersActionsFormatter" data-field="actions">{{ trans('table.actions') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
@ -50,10 +60,49 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@if ($location->image!='')
|
||||||
|
<div class="col-md-12 text-center" style="padding-bottom: 20px;">
|
||||||
|
<img src="{{ app('locations_upload_url') }}/{{ $location->image }}" class="img-responsive img-thumbnail" alt="{{ $location->name }}">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div class="col-md-12">
|
||||||
|
<ul class="list-unstyled" style="line-height: 25px; padding-bottom: 20px;">
|
||||||
|
@if ($location->address!='')
|
||||||
|
<li>{{ $location->address }}</li>
|
||||||
|
@endif
|
||||||
|
@if ($location->address2!='')
|
||||||
|
<li>{{ $location->address2 }}</li>
|
||||||
|
@endif
|
||||||
|
@if (($location->city!='') || ($location->state!='') || ($location->zip!=''))
|
||||||
|
<li>{{ $location->city }} {{ $location->state }} {{ $location->zip }}</li>
|
||||||
|
@endif
|
||||||
|
@if (($location->manager))
|
||||||
|
<li>{{ trans('admin/users/table.manager') }}: {!! $location->manager->present()->nameUrl() !!}</li>
|
||||||
|
@endif
|
||||||
|
@if (($location->parent))
|
||||||
|
<li>{{ trans('admin/locations/table.parent') }}: {!! $location->parent->present()->nameUrl() !!}</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
@if (($location->state!='') && ($location->country!='') && (config('services.google.maps_api_key')))
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
|
<img src="https://maps.googleapis.com/maps/api/staticmap?center={{ urlencode($location->city.','.$location->city.' '.$location->state.' '.$location->country.' '.$location->zip) }}&size=500x300&maptype=roadmap&key={{ config('services.google.maps_api_key') }}" class="img-responsive img-thumbnail" alt="Map">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-9">
|
||||||
<div class="box box-default">
|
<div class="box box-default">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<div class="box-heading">
|
<div class="box-heading">
|
||||||
|
@ -74,10 +123,16 @@
|
||||||
data-cookie-id-table="location_assetsDetailTable">
|
data-cookie-id-table="location_assetsDetailTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-searchable="false" data-sortable="false" data-formatter="hardwareLinkFormatter" data-field="name">{{ trans('general.name') }}</th>
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="id">{{ trans('general.id') }}</th>
|
||||||
|
<th data-searchable="false" data-visible="true" data-sortable="true" data-formatter="imageFormatter" data-field="image">{{ trans('admin/hardware/table.image') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="true" data-formatter="hardwareLinkFormatter" data-field="name">{{ trans('general.name') }}</th>
|
||||||
<th data-searchable="false" data-formatter="modelsLinkObjFormatter" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
<th data-searchable="false" data-formatter="modelsLinkObjFormatter" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('admin/hardware/form.tag') }}</th>
|
<th data-searchable="false" data-sortable="false" data-field="asset_tag" data-formatter="hardwareLinkFormatter">{{ trans('admin/hardware/form.tag') }}</th>
|
||||||
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||||
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
||||||
|
<th data-field="purchase_cost" data-footer-formatter="sumFormatter">{{ trans('general.purchase_cost') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="checkincheckout" data-formatter="hardwareInOutFormatter">Checkin/Checkout</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="hardwareActionsFormatter">{{ trans('table.actions') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
@ -87,6 +142,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
@section('inputFields')
|
@section('inputFields')
|
||||||
|
|
||||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name')])
|
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name')])
|
||||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
|
||||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id'])
|
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true'])
|
||||||
@include ('partials.forms.edit.model_number')
|
@include ('partials.forms.edit.model_number')
|
||||||
@include ('partials.forms.edit.depreciation')
|
@include ('partials.forms.edit.depreciation')
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||||
|
|
||||||
<div class="col-md-7 required">
|
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||||
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id">
|
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id">
|
||||||
@if ($category_id = Input::old($fieldname, $item->{$fieldname}))
|
@if ($category_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||||
<option value="{{ $category_id }}" selected="selected">
|
<option value="{{ $category_id }}" selected="selected">
|
||||||
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}
|
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}
|
||||||
</option>
|
</option>
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
|
|
||||||
<div class="col-md-1 col-sm-1 text-left">
|
<div class="col-md-1 col-sm-1 text-left">
|
||||||
@can('create', \App\Models\Location::class)
|
@can('create', \App\Models\Location::class)
|
||||||
|
@if ((!isset($hide_new)) || ($hide_new!='true'))
|
||||||
<a href='{{ route('modal.location') }}' data-toggle="modal" data-target="#createModal" data-dependency="location" data-select='{{ $fieldname }}_location_select' class="btn btn-sm btn-default">New</a>
|
<a href='{{ route('modal.location') }}' data-toggle="modal" data-target="#createModal" data-dependency="location" data-select='{{ $fieldname }}_location_select' class="btn btn-sm btn-default">New</a>
|
||||||
|
@endif
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||||
|
|
||||||
<div class="col-md-7 required">
|
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||||
<select class="js-data-ajax" data-endpoint="manufacturers" name="{{ $fieldname }}" style="width: 100%" id="category_select_id">
|
<select class="js-data-ajax" data-endpoint="manufacturers" name="{{ $fieldname }}" style="width: 100%" id="category_select_id">
|
||||||
@if ($manufacturer_id = Input::old($fieldname, $item->{$fieldname}))
|
@if ($manufacturer_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||||
<option value="{{ $manufacturer_id }}" selected="selected">
|
<option value="{{ $manufacturer_id }}" selected="selected">
|
||||||
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}
|
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}
|
||||||
</option>
|
</option>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||||
|
|
||||||
<div class="col-md-7 required">
|
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||||
<select class="js-data-ajax" data-endpoint="models" name="{{ $fieldname }}" style="width: 100%" id="model_select_id">
|
<select class="js-data-ajax" data-endpoint="models" name="{{ $fieldname }}" style="width: 100%" id="model_select_id">
|
||||||
@if ($model_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
@if ($model_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||||
<option value="{{ $model_id }}" selected="selected">
|
<option value="{{ $model_id }}" selected="selected">
|
||||||
|
@ -17,8 +17,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 col-sm-1 text-left">
|
<div class="col-md-1 col-sm-1 text-left">
|
||||||
@can('create', \App\Models\AssetModel::class)
|
@can('create', \App\Models\AssetModel::class)
|
||||||
<a href='{{ route('modal.model') }}' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select='model_select_id' class="btn btn-sm btn-default">New</a>
|
@if ((!isset($hide_new)) || ($hide_new!='true'))
|
||||||
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
|
<a href='{{ route('modal.model') }}' 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>
|
||||||
|
@endif
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
|
|
||||||
<div class="col-md-1 col-sm-1 text-left">
|
<div class="col-md-1 col-sm-1 text-left">
|
||||||
@can('create', \App\Models\Supplier::class)
|
@can('create', \App\Models\Supplier::class)
|
||||||
<a href='{{ route('modal.supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select' class="btn btn-sm btn-default">New</a>
|
@if ((!isset($hide_new)) || ($hide_new!='true'))
|
||||||
|
<a href='{{ route('modal.supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select' class="btn btn-sm btn-default">New</a>
|
||||||
|
@endif
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
|
|
||||||
<div class="col-md-1 col-sm-1 text-left">
|
<div class="col-md-1 col-sm-1 text-left">
|
||||||
@can('create', \App\Models\User::class)
|
@can('create', \App\Models\User::class)
|
||||||
<a href='{{ route('modal.user') }}' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_user_select' class="btn btn-sm btn-default">New</a>
|
@if ((!isset($hide_new)) || ($hide_new!='true'))
|
||||||
|
<a href='{{ route('modal.user') }}' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_user_select' class="btn btn-sm btn-default">New</a>
|
||||||
|
@endif
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -28,149 +28,239 @@
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="col-md-3">
|
<div class="col-md-4">
|
||||||
|
|
||||||
|
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('company', '1') }}
|
<input type="checkbox" class="all minimal" checked="checked">
|
||||||
|
Select All
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('company', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.company') }}
|
{{ trans('general.company') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('asset_tag', '1') }}
|
{{ Form::checkbox('asset_tag', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.asset_tag') }}
|
{{ trans('general.asset_tag') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('asset_name', '1') }}
|
{{ Form::checkbox('asset_name', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/hardware/form.name') }}
|
{{ trans('admin/hardware/form.name') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('manufacturer', '1') }}
|
{{ Form::checkbox('manufacturer', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.manufacturer') }}
|
{{ trans('general.manufacturer') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('model', '1') }}
|
{{ Form::checkbox('model', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.asset_models') }}
|
{{ trans('general.asset_models') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('category', '1') }}
|
{{ Form::checkbox('category', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.category') }}
|
{{ trans('general.category') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('serial', '1') }}
|
{{ Form::checkbox('serial', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/hardware/table.serial') }}
|
{{ trans('admin/hardware/table.serial') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('purchase_date', '1') }}
|
{{ Form::checkbox('purchase_date', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/licenses/table.purchase_date') }}
|
{{ trans('admin/licenses/table.purchase_date') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('purchase_cost', '1') }}
|
{{ Form::checkbox('purchase_cost', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/hardware/form.cost') }}
|
{{ trans('admin/hardware/form.cost') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('eol', '1') }}
|
{{ Form::checkbox('eol', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/hardware/table.eol') }}
|
{{ trans('admin/hardware/table.eol') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('order', '1') }}
|
{{ Form::checkbox('order', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/hardware/form.order') }}
|
{{ trans('admin/hardware/form.order') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('supplier', '1') }}
|
{{ Form::checkbox('supplier', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.suppliers') }}
|
{{ trans('general.suppliers') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('location', '1') }}
|
{{ Form::checkbox('location', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.location') }}
|
{{ trans('general.location') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('assigned_to', '1') }}
|
{{ Form::checkbox('assigned_to', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/licenses/table.assigned_to') }}
|
{{ trans('admin/licenses/table.assigned_to') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('username', '1') }}
|
{{ Form::checkbox('username', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/users/table.username') }}
|
{{ trans('admin/users/table.username') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('employee_num', '1') }}
|
{{ Form::checkbox('employee_num', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/users/table.employee_num') }}
|
{{ trans('admin/users/table.employee_num') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('status', '1') }}
|
{{ Form::checkbox('status', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.status') }}
|
{{ trans('general.status') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('warranty', '1') }}
|
{{ Form::checkbox('warranty', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/hardware/form.warranty') }}
|
{{ trans('admin/hardware/form.warranty') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('depreciation', '1') }}
|
{{ Form::checkbox('depreciation', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.depreciation') }}
|
{{ trans('general.depreciation') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('expected_checkin', '1') }}
|
{{ Form::checkbox('checkout_date', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
{{ trans('admin/hardware/table.checkout_date') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('expected_checkin', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('admin/hardware/form.expected_checkin') }}
|
{{ trans('admin/hardware/form.expected_checkin') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('notes', '1') }}
|
{{ Form::checkbox('created_at', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
{{ trans('general.created_at') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('updated_at', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
{{ trans('general.updated_at') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('notes', '1', '1', ['class' => 'minimal']) }}
|
||||||
{{ trans('general.notes') }}
|
{{ trans('general.notes') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@foreach ($customfields as $customfield)
|
@if ($customfields->count() > 0)
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<h4>Custom Fields:</h4>
|
||||||
{{ Form::checkbox($customfield->db_column_name(), '1') }}
|
|
||||||
{{ $customfield->name }}
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@foreach ($customfields as $customfield)
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox($customfield->db_column_name(), '1', '1', ['class' => 'minimal']) }}
|
||||||
|
{{ $customfield->name }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
|
||||||
</div> <!-- /.col-md-3-->
|
</div> <!-- /.col-md-3-->
|
||||||
|
|
||||||
<div class="col-md-7">
|
<div class="col-md-8">
|
||||||
<p>Select the fields you'd like to include in your custom report, and click Generate. The file (YYYY-mm-dd-his-custom-asset-report.csv) will download automatically, and you can open it in Excel.</p>
|
|
||||||
|
<p>Select the fields you'd like to include in your custom report, and click Generate. The file (custom-asset-report-YYYY-mm-dd.csv) will download automatically, and you can open it in Excel.</p>
|
||||||
|
<p>If you'd like to export only certain assets, use the options below to fine-tune your results.</p>
|
||||||
|
|
||||||
|
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'by_company_id', 'hide_new' => 'true'])
|
||||||
|
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'by_location_id', 'hide_new' => 'true'])
|
||||||
|
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'by_supplier_id', 'hide_new' => 'true'])
|
||||||
|
@include ('partials.forms.edit.model-select', ['translated_name' => trans('general.asset_model'), 'fieldname' => 'by_model_id', 'hide_new' => 'true'])
|
||||||
|
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'by_manufacturer_id', 'hide_new' => 'true'])
|
||||||
|
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'by_category_id', 'hide_new' => 'true', 'category_type' => 'asset'])
|
||||||
|
|
||||||
|
<!-- Status -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
|
||||||
|
<div class="col-md-7 col-sm-11">
|
||||||
|
{{ Form::select('by_status_id', \App\Helpers\Helper::statusLabelList() , Input::old('by_status_id'), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Order Number -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="order_number" class="col-md-3 control-label">{{ trans('general.order_number') }}</label>
|
||||||
|
<div class="col-md-5 col-sm-8">
|
||||||
|
<input class="form-control" type="text" name="by_order_number" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Purchase Date -->
|
||||||
|
<div class="form-group purchase-range">
|
||||||
|
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }} Range</label>
|
||||||
|
<div class="input-daterange input-group col-md-6" id="datepicker">
|
||||||
|
<input type="text" class="input-sm form-control" name="purchase_start" />
|
||||||
|
<span class="input-group-addon">to</span>
|
||||||
|
<input type="text" class="input-sm form-control" name="purchase_end" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Created Date -->
|
||||||
|
<div class="form-group purchase-range">
|
||||||
|
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.created_at') }} Range</label>
|
||||||
|
<div class="input-daterange input-group col-md-6" id="datepicker">
|
||||||
|
<input type="text" class="input-sm form-control" name="created_start" />
|
||||||
|
<span class="input-group-addon">to</span>
|
||||||
|
<input type="text" class="input-sm form-control" name="created_end" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-9 col-md-offset-3">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('use_bom', '1') }}
|
||||||
|
Add a BOM (byte-order mark) to this CSV
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- /.box-body-->
|
</div> <!-- /.box-body-->
|
||||||
<div class="box-footer text-right">
|
<div class="box-footer text-right">
|
||||||
<button type="submit" class="btn btn-success"><i class="fa fa-download icon-white"></i> {{ trans('general.generate') }}</button>
|
<button type="submit" class="btn btn-success"><i class="fa fa-download icon-white"></i> {{ trans('general.generate') }}</button>
|
||||||
|
@ -181,3 +271,39 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
@section('moar_scripts')
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$('.purchase-range .input-daterange').datepicker({
|
||||||
|
clearBtn: true,
|
||||||
|
todayHighlight: true,
|
||||||
|
endDate: '0d',
|
||||||
|
format: 'yyyy-mm-dd'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Check-all / Uncheck all
|
||||||
|
$(function () {
|
||||||
|
var checkAll = $('input.all');
|
||||||
|
var checkboxes = $('input.minimal');
|
||||||
|
|
||||||
|
|
||||||
|
checkAll.on('ifChecked ifUnchecked', function(event) {
|
||||||
|
if (event.type == 'ifChecked') {
|
||||||
|
checkboxes.iCheck('check');
|
||||||
|
} else {
|
||||||
|
checkboxes.iCheck('uncheck');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
checkboxes.on('ifChanged', function(event){
|
||||||
|
if(checkboxes.filter(':checked').length == checkboxes.length) {
|
||||||
|
checkAll.prop('checked', 'checked');
|
||||||
|
} else {
|
||||||
|
checkAll.removeProp('checked');
|
||||||
|
}
|
||||||
|
checkAll.iCheck('update');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@stop
|
||||||
|
|
|
@ -36,43 +36,29 @@
|
||||||
<!-- checked out suppliers table -->
|
<!-- checked out suppliers table -->
|
||||||
<br>
|
<br>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="display table table-hover">
|
<table
|
||||||
|
name="suppliers_assets"
|
||||||
|
id="table-users"
|
||||||
|
class="table table-striped snipe-table"
|
||||||
|
data-url="{{route('api.assets.index', ['supplier_id' => $supplier->id])}}"
|
||||||
|
data-cookie="true"
|
||||||
|
data-click-to-select="true"
|
||||||
|
data-search="true"
|
||||||
|
data-cookie-id-table="assets_by_supplierTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr role="row">
|
<tr>
|
||||||
<th class="col-md-3">Asset Tag</th>
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="id">{{ trans('general.id') }}</th>
|
||||||
<th class="col-md-3"><span class="line"></span>Name</th>
|
<th data-searchable="false" data-visible="true" data-sortable="true" data-formatter="imageFormatter" data-field="image">{{ trans('admin/hardware/table.image') }}</th>
|
||||||
<th class="col-md-3"><span class="line"></span>User</th>
|
<th data-searchable="false" data-sortable="true" data-formatter="hardwareLinkFormatter" data-field="name">{{ trans('general.name') }}</th>
|
||||||
<th class="col-md-2"><span class="line"></span>Actions</th>
|
<th data-searchable="false" data-formatter="modelsLinkObjFormatter" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||||
</tr>
|
<th data-searchable="false" data-sortable="false" data-field="asset_tag" data-formatter="hardwareLinkFormatter">{{ trans('admin/hardware/form.tag') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||||
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
||||||
|
<th data-field="purchase_cost" data-footer-formatter="sumFormatter">{{ trans('general.purchase_cost') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="checkincheckout" data-formatter="hardwareInOutFormatter">Checkin/Checkout</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="hardwareActionsFormatter">{{ trans('table.actions') }}</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
|
||||||
@foreach ($supplier->assets as $supplierassets)
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<a href="{{ route('hardware.show', $supplierassets->id) }}">
|
|
||||||
{{ $supplierassets->asset_tag }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ route('hardware.show', $supplierassets->id) }}">
|
|
||||||
{{ $supplierassets->name }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@if ($supplierassets->assignedTo)
|
|
||||||
{!! $supplierassets->assignedTo->present()->nameUrl() !!}
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@if ($supplierassets->assigned_to != '')
|
|
||||||
<a href="{{ route('checkin/hardware', $supplierassets->id) }}" class="btn btn-info btn-sm">Checkin</a>
|
|
||||||
@else
|
|
||||||
<a href="{{ route('checkout/hardware', $supplierassets->id) }}" class="btn btn-success btn-sm">Checkout</a>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div> <!--/box-body-->
|
</div> <!--/box-body-->
|
||||||
|
@ -81,16 +67,23 @@
|
||||||
|
|
||||||
<!-- side address column -->
|
<!-- side address column -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<h4>Contact:</h4>
|
|
||||||
<ul class="list-unstyled">
|
@if (($supplier->state!='') && ($supplier->country!='') && (config('services.google.maps_api_key')))
|
||||||
|
<div class="col-md-12 text-center" style="padding-bottom: 20px;">
|
||||||
|
<img src="https://maps.googleapis.com/maps/api/staticmap?center={{ urlencode($supplier->city.','.$supplier->city.' '.$supplier->state.' '.$supplier->country.' '.$supplier->zip) }}&size=500x300&maptype=roadmap&key={{ config('services.google.maps_api_key') }}" class="img-responsive img-thumbnail" alt="Map">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="list-unstyled" style="line-height: 25px; padding-bottom: 20px; padding-top: 20px;">
|
||||||
@if ($supplier->contact)
|
@if ($supplier->contact)
|
||||||
<li><i class="fa fa-user"></i>{{ $supplier->contact }}</li>
|
<li><i class="fa fa-user"></i> {{ $supplier->contact }}</li>
|
||||||
@endif
|
@endif
|
||||||
@if ($supplier->phone)
|
@if ($supplier->phone)
|
||||||
<li><i class="fa fa-phone"></i>{{ $supplier->phone }}</li>
|
<li><i class="fa fa-phone"></i> {{ $supplier->phone }}</li>
|
||||||
@endif
|
@endif
|
||||||
@if ($supplier->fax)
|
@if ($supplier->fax)
|
||||||
<li><i class="fa fa-print"></i>{{ $supplier->fax }}</li>
|
<li><i class="fa fa-print"></i> {{ $supplier->fax }}</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($supplier->email)
|
@if ($supplier->email)
|
||||||
|
@ -125,7 +118,7 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($supplier->notes)
|
@if ($supplier->notes)
|
||||||
<li><i class="fa fa-comment"></i>{{ $supplier->notes }}</li>
|
<li><i class="fa fa-comment"></i> {{ $supplier->notes }}</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($supplier->image)
|
@if ($supplier->image)
|
||||||
|
@ -148,21 +141,24 @@
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|
||||||
<table
|
<table
|
||||||
name="suppliersAccessories"
|
name="suppliers_accessories"
|
||||||
id="table"
|
id="table-users"
|
||||||
class="snipe-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{ route('api.accessories.index', ['supplier_id' => $supplier->id]) }}"
|
data-url="{{route('api.accessories.index', ['supplier_id' => $supplier->id])}}"
|
||||||
|
data-search="true"
|
||||||
data-cookie="true"
|
data-cookie="true"
|
||||||
data-export-options='{"fileName": "testo"}'
|
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-cookie-id-table="suppliersAccessories-{{ config('version.hash_version') }}">
|
data-cookie-id-table="accessories_by_supplierTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-4" data-field="name" data-formatter="accessoriesLinkFormatter">Name</th>
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="id">{{ trans('general.id') }}</th>
|
||||||
<th class="col-md-4" data-field="model_number">Model Number</th>
|
<th data-searchable="false" data-sortable="true" data-formatter="accessoriesLinkFormatter" data-field="name">{{ trans('general.name') }}</th>
|
||||||
<th class="col-md-4" data-field="purchase_cost" data-footer-formatter="sumFormatter">Purchase_cost</th>
|
<th data-searchable="false" data-sortable="false" data-field="model_number">{{ trans('admin/models/table.modelnumber') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('admin/hardware/form.tag') }}</th>
|
||||||
<th class="col-md-4" data-field="actions" data-formatter="accessoriesActionsFormatter">Actions</th>
|
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||||
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
||||||
|
<th data-field="purchase_cost" data-footer-formatter="sumFormatter">{{ trans('general.purchase_cost') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="accessoriesActionsFormatter">{{ trans('table.actions') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
@ -182,21 +178,29 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<table class="table table-hover">
|
<table
|
||||||
|
name="suppliers_licenses"
|
||||||
|
id="table-users"
|
||||||
|
class="table table-striped snipe-table"
|
||||||
|
data-url="{{route('api.licenses.index', ['supplier_id' => $supplier->id])}}"
|
||||||
|
data-cookie="true"
|
||||||
|
data-search="true"
|
||||||
|
data-click-to-select="true"
|
||||||
|
data-cookie-id-table="licenses_by_supplierTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-4">Name</th>
|
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="id">{{ trans('general.id') }}</th>
|
||||||
<th class="col-md-4"><span class="line"></span>Serial</th>
|
<th data-searchable="true" data-sortable="true" data-formatter="licensesLinkFormatter" data-field="name">{{ trans('general.name') }}</th>
|
||||||
</tr>
|
<th data-searchable="true" data-sortable="true" data-formatter="licensesLinkFormatter" data-field="product_key">{{ trans('admin/licenses/form.license_key') }}</th>
|
||||||
|
<th data-searchable="true" data-sortable="true" data-formatter="licensesLinkFormatter" data-field="license_email">{{ trans('admin/licenses/form.to_email') }}</th>
|
||||||
|
<th data-searchable="true" data-sortable="false" data-field="seats">{{ trans('admin/licenses/form.seats') }}</th>
|
||||||
|
<th data-searchable="true" data-sortable="false" data-field="free_seats_count">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||||
|
<th data-field="purchase_cost" data-footer-formatter="sumFormatter">{{ trans('general.purchase_cost') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="licensesActionsFormatter">{{ trans('table.actions') }}</th>
|
||||||
|
<th data-searchable="false" data-sortable="false" data-field="checkincheckout" data-formatter="licensesActionsFormatter">{{ trans('table.actions') }}</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
|
||||||
@foreach ($supplier->licenses as $license)
|
|
||||||
<tr>
|
|
||||||
<td>{!! $license->present()->nameUrl() !!}</td>
|
|
||||||
<td>{!! $license->present()->serialUrl() !!}</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue