Disable group by norujukan, if already filte norujukan
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-2 rounded-t-lg"><a href="/akaunhome"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">{{ $title }} </span></div>
|
||||
<form method="get" action="{{ $action }}">
|
||||
<form id="filterOnlineTransactionForm" method="get" action="{{ $action }}">
|
||||
<div class="rounded bg-white shadow p-6 pb-0 pt-4">
|
||||
<div class="pb-6">
|
||||
<label for="username" class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
@@ -64,6 +64,7 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const toggle = document.querySelector('#toggle');
|
||||
const dot = document.querySelector('.dot');
|
||||
const form = document.querySelector('#filterOnlineTransactionForm');
|
||||
|
||||
// get query parameters from the url
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
@@ -86,7 +87,24 @@
|
||||
dot.classList.add('bg-white');
|
||||
}
|
||||
});
|
||||
|
||||
form.addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const norujukanInput = document.querySelector('#norujukan').value.trim();
|
||||
|
||||
if (norujukanInput.length > 0) {
|
||||
toggle.checked = false;
|
||||
dot.classList.remove('transform', 'translate-x-full', 'bg-green-500');
|
||||
dot.classList.add('bg-white');
|
||||
}
|
||||
|
||||
event.target.submit();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user