Skip to content

Commit

Permalink
add unread tasks field into tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
malekvictor committed Nov 20, 2020
1 parent b5d35ff commit a3fddd8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions task_tabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ type TaskFilter struct {
Title string `json:"title"`
}

// Tasks counters
type TaskCounters struct {
// task jid
Jid JID `json:"jid"`

// unread counter
NumUnread uint `json:"num_unread"`

//unread notice counter
NumUnreadNotice uint `json:"num_unread_notice"`
}

type TaskTab struct {
Key TaskTabKey `json:"key"`
Title string `json:"title"`
Expand All @@ -28,4 +40,7 @@ type TaskTab struct {
Pagination bool `json:"pagination"`
Filters []TaskFilter `json:"filters"`
Sort []TaskSort `json:"sort"`

// unread tasks with jid and counters
UnreadTasks []TaskCounters `json:"unread_tasks"`
}

0 comments on commit a3fddd8

Please sign in to comment.