feat: Enhance Select2 functionality with clearable options and custom placeholders, and apply new card styling to the order add page.

This commit is contained in:
pbao9
2026-02-14 22:10:30 +07:00
parent 5252f9142c
commit 691c7e3765
2 changed files with 35 additions and 33 deletions
@@ -78,17 +78,19 @@
window.initSelect2 = function() {
$(".select2").each(function () {
if (!$(this).hasClass('select2-hidden-accessible')) {
var placeholder = $(this).data('placeholder') || 'Select an option';
$(this).select2({
allowClear: false,
allowClear: true,
width: "100%",
placeholder: placeholder,
});
}
});
};
$(document).ready(function () {
window.initSelect2();
});
$(document).ready(function () {
window.initSelect2();
});
// Global ModalManager initialization
document.addEventListener('DOMContentLoaded', function() {
@@ -107,8 +109,8 @@
@stack('custom-scripts')
<script type="text/javascript">
var apiMedia = '{{ route('api.GetAllImage') }}';
var apiUpload = '{{ route('media.upload') }}';
var apiMedia = "{{ route('api.GetAllImage') }}";
var apiUpload = "{{ route('media.upload') }}";
</script>
</body>