forked from TFMM/silent-auction
fix: sort bidders and enable tom-select for bidder dropdown
This commit is contained in:
@@ -81,7 +81,7 @@ class PagesController extends Controller
|
||||
public function checkout(Request $checkout_req)
|
||||
{
|
||||
if (!$checkout_req->checkoutbiddernum) {
|
||||
$bidders = \App\Models\Bidders::all();
|
||||
$bidders = \App\Models\Bidders::orderBy('bidder_assigned_number')->get();
|
||||
return view('checkout_select_form', ['bidders' => $bidders]);
|
||||
} elseif (!$checkout_req->checkout_payment_method) {
|
||||
$checkout_bidder = $checkout_req->checkoutbiddernum;
|
||||
|
||||
@@ -36,4 +36,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@section('js')
|
||||
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/js/tom-select.complete.min.js"></script>
|
||||
<script>
|
||||
new TomSelect("#bidder_num",{
|
||||
create: false,
|
||||
sortField: {
|
||||
field: "text",
|
||||
direction: "asc"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user