diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-19 09:11:04 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-19 09:11:04 -1000 |
| commit | 2215aaa458b318edb16337ab56cf658117023eb4 (patch) | |
| tree | 73dc62cb8ed385e8ab5d255825b03ffb8845b27e /web | |
| parent | 791034f1b588bf679f45a0f89168515fcbde66d5 (diff) | |
Implement Unified Quick Add for Tasks tab (Phase 3 Step 8)
Add Quick Add form to create Todoist tasks or Trello cards directly
from the Tasks tab with optional due date support.
Features:
- HandleUnifiedAdd handler with due date parsing
- HandleGetListsOptions for dynamic Trello list loading
- Quick Add form with source toggle (Todoist/Trello)
- Date picker for due dates
- HX-Trigger refresh after successful creation
- Pass boards to tasks-tab template for board selector
Cleanup:
- Remove resolved issue tracking files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'web')
| -rw-r--r-- | web/templates/partials/tasks-tab.html | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/web/templates/partials/tasks-tab.html b/web/templates/partials/tasks-tab.html index 9379e5c..ba9aa80 100644 --- a/web/templates/partials/tasks-tab.html +++ b/web/templates/partials/tasks-tab.html @@ -1,5 +1,66 @@ {{define "tasks-tab"}} -<div class="space-y-6"> +<div class="space-y-6" + hx-get="/tabs/tasks" + hx-trigger="refresh-tasks from:body" + hx-target="#tab-content" + hx-swap="innerHTML"> + <!-- Quick Add Form --> + <section class="bg-white rounded-lg p-4 shadow-sm"> + <h3 class="text-lg font-semibold text-gray-900 mb-3">Quick Add</h3> + <form hx-post="/unified-add" + hx-swap="none" + hx-on::after-request="if(event.detail.successful) { this.reset(); document.getElementById('trello-fields').style.display = 'none'; }"> + <div class="flex flex-wrap gap-2 items-end"> + <div class="flex-1 min-w-[200px]"> + <input type="text" + name="title" + placeholder="Task name..." + class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary-500 focus:border-primary-500" + required> + </div> + <div> + <input type="date" + name="due_date" + class="border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary-500"> + </div> + <div> + <select name="source" + class="border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary-500" + onchange="document.getElementById('trello-fields').style.display = this.value === 'trello' ? 'flex' : 'none'"> + <option value="todoist">Todoist</option> + <option value="trello">Trello</option> + </select> + </div> + <button type="submit" + class="bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-lg transition-colors font-medium"> + Add + </button> + </div> + + <!-- Trello Fields (Hidden by default) --> + <div id="trello-fields" class="flex flex-wrap gap-2 mt-3" style="display: none;"> + <div> + <select name="board_id" + class="border border-gray-300 rounded-lg px-3 py-2 text-sm" + hx-get="/partials/lists" + hx-target="#list-select" + hx-trigger="change" + hx-swap="innerHTML"> + <option value="">Select Board...</option> + {{range .Boards}} + <option value="{{.ID}}">{{.Name}}</option> + {{end}} + </select> + </div> + <div> + <select id="list-select" name="list_id" class="border border-gray-300 rounded-lg px-3 py-2 text-sm"> + <option value="">Select List...</option> + </select> + </div> + </div> + </form> + </section> + <!-- Unified Tasks Section --> <section> <h2 class="section-header mb-6"> |
