Files
portal-api/resources/views/admin/customer/action/selector.blade.php
T
2025-07-24 16:18:27 +07:00

34 lines
1.3 KiB
PHP

<div class="row form-group">
<div class="col">
<select class="custom-select" name="change-product">
@foreach($allService as $item)
@php
$productName = $item->description ?? 'Product #' . $item->product_id;
@endphp
<option value="{{ $item->product_id.'|'.$item->product_type }}"
data-url="{{ route('customer.product',['userid' => $userid,'product' => $item->product_id,'type' => $item->product_type]) }}"
@selected($product && "$product->id|$type" === "$item->product_id|$item->product_type")>
{{ $productName }}
</option>
@endforeach
</select>
</div>
@if($product)
@switch($type)
@case(3)
<a href="{{ $product->Server ? "https://".$product->Server->name.":8880" : "" }}"
target="_blank"
class="btn bg-gradient-success">Login with Panel</a>
@break
@case(4)
<button
data-toggle="modal"
data-target="#AddonModal"
class="btn btn-trigger__addon bg-gradient-success">Add new addon
</button>
@break
@endswitch
@endif
</div>