Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Mar 6, 2024
2 parents 7769a93 + a85e2f7 commit 0f64d66
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
72 changes: 36 additions & 36 deletions app/Http/Controllers/Assets/BulkAssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,41 +93,6 @@ public function edit(Request $request)

$assets = Asset::with('assignedTo', 'location', 'model')->whereIn('assets.id', $asset_ids);

switch ($sort_override) {
case 'model':
$assets->OrderModels($order);
break;
case 'model_number':
$assets->OrderModelNumber($order);
break;
case 'category':
$assets->OrderCategory($order);
break;
case 'manufacturer':
$assets->OrderManufacturer($order);
break;
case 'company':
$assets->OrderCompany($order);
break;
case 'location':
$assets->OrderLocation($order);
case 'rtd_location':
$assets->OrderRtdLocation($order);
break;
case 'status_label':
$assets->OrderStatus($order);
break;
case 'supplier':
$assets->OrderSupplier($order);
break;
case 'assigned_to':
$assets->OrderAssigned($order);
break;
default:
$assets->orderBy($column_sort, $order);
break;
}

$assets = $assets->get();

$models = $assets->unique('model_id');
Expand Down Expand Up @@ -156,7 +121,7 @@ public function edit(Request $request)
});

return view('hardware/bulk-delete')->with('assets', $assets);

case 'restore':
$this->authorize('update', Asset::class);
$assets = Asset::withTrashed()->find($asset_ids);
Expand All @@ -176,6 +141,41 @@ public function edit(Request $request)
}
}

switch ($sort_override) {
case 'model':
$assets->OrderModels($order);
break;
case 'model_number':
$assets->OrderModelNumber($order);
break;
case 'category':
$assets->OrderCategory($order);
break;
case 'manufacturer':
$assets->OrderManufacturer($order);
break;
case 'company':
$assets->OrderCompany($order);
break;
case 'location':
$assets->OrderLocation($order);
case 'rtd_location':
$assets->OrderRtdLocation($order);
break;
case 'status_label':
$assets->OrderStatus($order);
break;
case 'supplier':
$assets->OrderSupplier($order);
break;
case 'assigned_to':
$assets->OrderAssigned($order);
break;
default:
$assets->orderBy($column_sort, $order);
break;
}

return redirect()->back()->with('error', 'No action selected');
}

Expand Down
2 changes: 1 addition & 1 deletion app/View/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function render(callable $callback = null)
switch ($settings->label2_2d_target) {
case 'ht_tag': $barcode2DTarget = route('ht/assetTag', $asset->asset_tag); break;
case 'hardware_id':
default: $barcode2DTarget = route('hardware.show', $asset->id); break;
default: $barcode2DTarget = route('hardware.show', ['hardware' => $asset->id]); break;
}
$assetData->put('barcode2d', (object)[
'type' => $barcode2DType,
Expand Down

0 comments on commit 0f64d66

Please sign in to comment.