This commit is contained in:
pbao9
2026-02-03 11:07:47 +07:00
parent 0f9b6ffef2
commit 6178a76eee
18 changed files with 347 additions and 420 deletions
@@ -1,22 +1,25 @@
@extends('administrator.layout.master')
@push('plugin-styles')
<link href="{{ asset('build/plugins/select2/select2.min.css') }}" rel="stylesheet" />
@foreach (config('assets.datatable.css') as $datatable)
<link href="{{ asset($datatable) }}" rel="stylesheet" />
@endforeach
@endpush
@php
use App\Enums\Status;
@endphp
@section('breadcrumb')
@php
$breadcrumbItems = [
['label' => 'Modules'],
['label' => 'Package vCenter'],
['label' => 'Os Version', 'active' => true],
['label' => 'Version', 'url' => route('package.version.index')],
['label' => 'Add Version', 'active' => true],
];
@endphp
<x-admin-breadcrumb :items="$breadcrumbItems" />
@endsection
@php
use App\Enums\Status;
@endphp
@section('content')
@if (auth()->guard('admins')->user()->can('add package module'))
<div class="card card-outline card-primary">
@@ -49,7 +52,7 @@
<div class="row form-group align-items-center mb-0">
<label for="status" class="col-md-3 text-right">Status</label>
<div class="col-md-9 p-1 bg-customer">
<select class="custom-select select2" id="status" name="status">
<select class="custom-select select2 single__select" id="status" name="status">
@foreach(Status::getOptions() as $value => $label)
<option value="{{ $value }}" @selected(old('status') == $value)>
{{ $label }}
@@ -76,25 +79,10 @@
@endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function() {
// Initialize Select2 using global function
if (typeof window.initSelect2 === 'function') {
window.initSelect2();
}
// Initialize other Select2 elements
$('.select2').select2({
theme: 'bootstrap4',
width: '100%'
});
});
</script>
@endpush
@push('plugin-scripts')
<script src="{{ asset('build/plugins/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('build/plugins/select2/select2.min.js') }}"></script>
<script src="{{ asset('build/plugins/datatables.net/dataTables.min.js') }}"></script>
<script src="{{ asset('build/plugins/datatables.net-bs5/dataTables.bootstrap5.min.js') }}"></script>
@foreach (config('assets.datatable.js') as $datatable)
<script src="{{ asset($datatable) }}"></script>
@endforeach
@endpush