feat: update workspace pages and global inbox
This commit is contained in:
@@ -56,6 +56,7 @@ type WorkTask struct {
|
||||
Completed bool `json:"completed"`
|
||||
Owner string `json:"owner"`
|
||||
Due string `json:"due"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
Tag string `json:"tag"`
|
||||
}
|
||||
|
||||
@@ -323,6 +324,7 @@ func (s *Service) workspaceTasks(projectID uint) ([]WorkTask, error) {
|
||||
Completed: task.Status == "done",
|
||||
Owner: owner,
|
||||
Due: displayOptionalTime(task.DueAt),
|
||||
CreatedAt: displayTime(task.CreatedAt),
|
||||
Tag: "",
|
||||
})
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ func TestWorkspaceMatchesFrontendContract(t *testing.T) {
|
||||
require.Len(t, workspace.Tasks, 2)
|
||||
require.False(t, workspace.Tasks[0].Completed)
|
||||
require.Equal(t, "David", workspace.Tasks[0].Owner)
|
||||
require.NotEmpty(t, workspace.Tasks[0].CreatedAt)
|
||||
require.Len(t, workspace.AISessions, 1)
|
||||
require.Len(t, workspace.RecentSessions, 1)
|
||||
require.Len(t, workspace.NotesSources, 2)
|
||||
|
||||
Reference in New Issue
Block a user