Skip to content

Commit f489351

Browse files
fix: Update filter group and overlay components for daily tests
- Changed the filter count display from 2 to 1 in the filter group. - Updated the filter overlay to replace checkboxes with a dropdown for batch selection, improving usability. - Adjusted the header to reflect the selected batch in the schedule description.
1 parent d33b2a1 commit f489351

3 files changed

Lines changed: 28 additions & 63 deletions

File tree

src/simba/mentor/daily_tests/detail/includes/filter_group.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
Filter
5555
<span
5656
class="font-medium text-[10px] py-0.5 px-[5px] bg-stone-800 text-white leading-3 rounded-full dark:bg-neutral-500">
57-
2
57+
1
5858
</span>
5959
</button>
6060
<!-- End Filter Button -->

src/simba/mentor/daily_tests/detail/includes/filter_overlay.html

Lines changed: 24 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -23,77 +23,41 @@ <h3 id="hs-pro-epfo-label" class="font-semibold text-stone-800 dark:text-neutral
2323
<!-- Content -->
2424
<div class="h-[calc(100%-58px)] flex flex-col">
2525
<!-- Body -->
26-
<div
26+
<div id="hs-filter-body"
2727
class="h-full p-5 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500">
2828
<!-- List Item -->
2929
<div class="pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-stone-200 dark:border-neutral-700">
3030
<label class="font-semibold text-xs uppercase text-stone-800 dark:text-neutral-200">
3131
Batches
3232
</label>
3333

34-
<!-- Grid -->
35-
<div class="mt-3 grid grid-cols-2">
36-
<div class="space-y-2">
37-
<!-- Checkbox -->
38-
<div class="flex items-center">
39-
<input type="checkbox"
40-
class="shrink-0 border-stone-300 rounded-sm text-green-600 focus:ring-green-600 checked:border-green-600 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-green-500 dark:checked:border-green-500 dark:focus:ring-offset-neutral-800"
41-
id="hs-pro-epfopvch1" checked>
42-
<label for="hs-pro-epfopvch1" class="text-sm text-stone-800 ms-3 dark:text-neutral-400">
43-
Morning Batch A
44-
</label>
45-
</div>
46-
<!-- End Checkbox -->
34+
<div class="relative mt-3">
35+
<select data-hs-select='{
36+
"placeholder": "Select a batch...",
37+
"toggleTag": "<button type=\"button\" aria-expanded=\"false\"></button>",
38+
"toggleClasses": "hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative py-1.5 sm:py-2 px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-stone-200 rounded-lg text-start sm:text-sm text-stone-800 focus:outline-hidden focus:ring-2 focus:ring-green-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:focus:outline-hidden dark:focus:ring-1 dark:focus:ring-neutral-600",
39+
"dropdownClasses": "mt-2 z-50 w-full min-w-36 max-h-72 z-50 p-1 space-y-0.5 bg-white rounded-xl shadow-xl dark:bg-neutral-900",
40+
"optionClasses": "hs-selected:bg-stone-100 dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-stone-800 cursor-pointer hover:bg-stone-100 rounded-lg focus:outline-hidden focus:bg-stone-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800",
41+
"optionTemplate": "<div class=\"flex justify-between items-center w-full\"><span data-title></span><span class=\"hidden hs-selected:block\"><svg class=\"shrink-0 size-3.5 text-stone-800 dark:text-neutral-200\" xmlns=\"http:.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"/></svg></span></div>",
42+
"viewport": "#hs-filter-body"
43+
}' class="hidden">
4744

48-
<!-- Checkbox -->
49-
<div class="flex items-center">
50-
<input type="checkbox"
51-
class="shrink-0 border-stone-300 rounded-sm text-green-600 focus:ring-green-600 checked:border-green-600 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-green-500 dark:checked:border-green-500 dark:focus:ring-offset-neutral-800"
52-
id="hs-pro-epfopvch2">
53-
<label for="hs-pro-epfopvch2" class="text-sm text-stone-800 ms-3 dark:text-neutral-400">
54-
Morning Batch B
55-
</label>
56-
</div>
57-
<!-- End Checkbox -->
45+
<option value="">--------</option>
46+
<option value="1" selected>Morning Batch B</option>
47+
<option value="2">Morning Batch A</option>
48+
<option value="3">Afternoon Batch B</option>
49+
<option value="4">Afternoon Batch A</option>
50+
</select>
5851

59-
<!-- Checkbox -->
60-
<div class="flex items-center">
61-
<input type="checkbox"
62-
class="shrink-0 border-stone-300 rounded-sm text-green-600 focus:ring-green-600 checked:border-green-600 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-green-500 dark:checked:border-green-500 dark:focus:ring-offset-neutral-800"
63-
id="hs-pro-epfopvch3">
64-
<label for="hs-pro-epfopvch3" class="text-sm text-stone-800 ms-3 dark:text-neutral-400">
65-
Morning Batch C
66-
</label>
67-
</div>
68-
<!-- End Checkbox -->
69-
</div>
70-
<!-- End Col -->
71-
72-
<div class="space-y-2">
73-
<!-- Checkbox -->
74-
<div class="flex items-center">
75-
<input type="checkbox"
76-
class="shrink-0 border-stone-300 rounded-sm text-green-600 focus:ring-green-600 checked:border-green-600 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-green-500 dark:checked:border-green-500 dark:focus:ring-offset-neutral-800"
77-
id="hs-pro-epfopvch4">
78-
<label for="hs-pro-epfopvch4" class="text-sm text-stone-800 ms-3 dark:text-neutral-400">
79-
Morning Batch D
80-
</label>
81-
</div>
82-
<!-- End Checkbox -->
83-
84-
<!-- Checkbox -->
85-
<div class="flex items-center">
86-
<input type="checkbox"
87-
class="shrink-0 border-stone-300 rounded-sm text-green-600 focus:ring-green-600 checked:border-green-600 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-green-500 dark:checked:border-green-500 dark:focus:ring-offset-neutral-800"
88-
id="hs-pro-epfopvch5">
89-
<label for="hs-pro-epfopvch5" class="text-sm text-stone-800 ms-3 dark:text-neutral-400">
90-
Morning Batch E
91-
</label>
92-
</div>
52+
<div class="absolute top-1/2 end-2.5 -translate-y-1/2">
53+
<svg class="shrink-0 size-3.5 text-stone-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
54+
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
55+
stroke-linejoin="round">
56+
<path d="m7 15 5 5 5-5" />
57+
<path d="m7 9 5-5 5 5" />
58+
</svg>
9359
</div>
94-
<!-- End Col -->
9560
</div>
96-
<!-- End Grid -->
9761

9862
<!-- Add Phone -->
9963
<p class="mt-3">

src/simba/mentor/daily_tests/detail/includes/header.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h1 class="text-lg md:text-xl font-semibold text-stone-800 dark:text-neutral-200
1111
SSC CGL Tier II – Full Test 3
1212
</h1>
1313
<p class="text-[13px] text-stone-500 dark:text-neutral-500">
14-
Scheduled at Jan 02, 2026 · 04:00 PM
14+
Morning Batch B · Scheduled at Jan 02, 2026 · 04:00 PM
1515
</p>
1616
</div>
1717

@@ -29,7 +29,8 @@ <h1 class="text-lg md:text-xl font-semibold text-stone-800 dark:text-neutral-200
2929
</button>
3030
<button type="button"
3131
class="py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-stone-200 bg-white text-stone-800 shadow-2xs hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-stone-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700">
32-
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
32+
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
33+
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3334
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
3435
<polyline points="7 10 12 15 17 10"></polyline>
3536
<line x1="12" x2="12" y1="15" y2="3"></line>

0 commit comments

Comments
 (0)