Repository navigation
Expand file tree
/
Copy pathupdate_index.patch
More file actions
57 lines (56 loc) · 2.86 KB
/
Copy pathupdate_index.patch
File metadata and controls
57 lines (56 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- Task.Api/Pages/Index.cshtml
+++ Task.Api/Pages/Index.cshtml
@@ -19,9 +19,45 @@
</div>
</section>
+<!-- Filter Section -->
+<section class="filter-section">
+ <div class="filter-container">
+ <form id="filter-form" hx-get="/Index?handler=Refresh" hx-target="#board" hx-trigger="input delay:300ms, change" hx-indicator=".filter-loading">
+ <div class="filter-bar">
+ <div class="search-group">
+ <span class="search-icon emoji">🔍</span>
+ <input type="text" id="SearchQuery" name="SearchQuery" placeholder="Search tasks..." value="@Model.SearchQuery" class="form-control search-input" autocomplete="off" />
+ </div>
+
+ <div class="filter-group">
+ <select name="FilterStatus" id="FilterStatus" class="form-select">
+ <option value="">All Statuses</option>
+ <option value="todo" selected="@(Model.FilterStatus == "todo")">Todo</option>
+ <option value="in_progress" selected="@(Model.FilterStatus == "in_progress")">In Progress</option>
+ <option value="done" selected="@(Model.FilterStatus == "done")">Done</option>
+ </select>
+
+ <select name="FilterAssignee" id="FilterAssignee" class="form-select">
+ <option value="">All Assignees</option>
+ @foreach (var assignee in Model.AllAssignees)
+ {
+ <option value="@assignee" selected="@(Model.FilterAssignee == assignee)">@assignee</option>
+ }
+ </select>
+
+ <select name="FilterLabel" id="FilterLabel" class="form-select">
+ <option value="">All Labels</option>
+ @foreach (var label in Model.AllLabels)
+ {
+ <option value="@label" selected="@(Model.FilterLabel == label)">@label</option>
+ }
+ </select>
+
+ <!-- Loading indicator for HTMX requests -->
+ <div class="htmx-indicator filter-loading">
+ <div class="spinner"></div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+</section>
+
<!-- Main board container with HTMX polling -->
<section class="board-section">
- <div id="board" class="board-surface" hx-get="/Index?handler=Refresh" hx-trigger="every 1s" hx-target="#board" hx-swap="innerHTML">
+ <div id="board" class="board-surface" hx-get="/Index?handler=Refresh" hx-trigger="every 1s" hx-include="#filter-form" hx-target="#board" hx-swap="innerHTML">
@await Html.PartialAsync("_KanbanBoard", Model.TaskItems)
</div>
</section>