refactor: Update front-end assets by removing Select2 integration from various forms and adjusting the build configuration.

This commit is contained in:
pbao9
2026-02-28 21:29:13 +07:00
parent 5c97768707
commit 6b18c3ff12
36 changed files with 79 additions and 493 deletions
@@ -22,7 +22,7 @@ if (!$selectedDatacenterId && $model) {
<div class="row form-group align-items-center mb-0">
<label for="datacenter_id" class="col-md-3 text-right">Chọn Datacenter</label>
<div class="col-md-9 p-1 bg-customer">
<select class="form-control select2 single__select datacenter_id" name="module_datacenter_id"
<select class="form-control datacenter_id" name="module_datacenter_id"
data-selected="{{ $selectedDatacenterId }}" data-placeholder="--- Chọn Datacenter ---">
</select>
</div>
@@ -116,6 +116,10 @@ if (!$selectedDatacenterId && $model) {
// Enable host if datacenter is selected
if (datacenterId) {
$host.prop('disabled', false);
// Trigger host load
if ($host.is('select')) {
$host.trigger('change.hostComponent');
}
}
});
@@ -127,6 +131,11 @@ if (!$selectedDatacenterId && $model) {
// If only vcenter is selected, load datacenters without preselection
debounceLoadDatacenters($vcenter.val());
}
// Also trigger host load when datacenter is already selected on page load
if ($datacenter.val()) {
$datacenter.trigger('change.datacenterComponent');
}
});
</script>
@endpush