Refine arrival filters and demo date behavior
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
</section>
|
||||
|
||||
<section class="card p-4">
|
||||
<form method="get" action="{{b "/progress"}}" class="grid gap-3 md:grid-cols-3">
|
||||
<form id="progress-filter-form" method="get" action="{{b "/progress"}}" class="grid gap-3 md:grid-cols-3">
|
||||
<div class="md:col-span-2">
|
||||
<label for="search" class="mb-2 block text-sm font-medium text-slate-600">Search Patient</label>
|
||||
<input id="search" name="search" value="{{.Search}}" type="text" placeholder="Nama atau Employee ID"
|
||||
@@ -96,7 +96,7 @@
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="card overflow-hidden">
|
||||
<section id="progress-list" class="card overflow-hidden">
|
||||
<div class="flex items-center justify-between border-b border-slate-100 px-5 py-3">
|
||||
<div>
|
||||
<h2 class="text-base font-semibold text-slate-700">Patient Resume List</h2>
|
||||
@@ -193,4 +193,25 @@
|
||||
</div>
|
||||
{{end}}
|
||||
</section>
|
||||
<script>
|
||||
(function() {
|
||||
const progressFilterForm = document.getElementById('progress-filter-form');
|
||||
if (progressFilterForm) {
|
||||
progressFilterForm.addEventListener('submit', function () {
|
||||
sessionStorage.setItem('progress-scroll-to-list', '1');
|
||||
});
|
||||
}
|
||||
|
||||
const shouldScrollToList = sessionStorage.getItem('progress-scroll-to-list') === '1';
|
||||
if (shouldScrollToList) {
|
||||
sessionStorage.removeItem('progress-scroll-to-list');
|
||||
const listSection = document.getElementById('progress-list');
|
||||
if (listSection) {
|
||||
requestAnimationFrame(function () {
|
||||
listSection.scrollIntoView({ behavior: 'auto', block: 'start' });
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user