diff --git a/twenty-backend/lib/twenty-backend.rb b/twenty-backend/lib/twenty-backend.rb index ce13dff..e4e3fb2 100644 --- a/twenty-backend/lib/twenty-backend.rb +++ b/twenty-backend/lib/twenty-backend.rb @@ -34,7 +34,7 @@ module Twenty ActiveRecord::Base.establish_connection( adapter: "sqlite3", database: path, - pool: 3 + pool: 16 ) end diff --git a/twenty-backend/lib/twenty-backend/graphql/type/task.rb b/twenty-backend/lib/twenty-backend/graphql/type/task.rb index 033ee4b..6fe9b3c 100644 --- a/twenty-backend/lib/twenty-backend/graphql/type/task.rb +++ b/twenty-backend/lib/twenty-backend/graphql/type/task.rb @@ -8,5 +8,8 @@ module Twenty::GraphQL::Type field :project, Project, null: false field :updated_at, GraphQL::Types::ISO8601DateTime, null: false field :is_ready, Boolean, null: false, method: :ready? + field :is_backlogged, Boolean, null: false, method: :backlog? + field :is_complete, Boolean, null: false, method: :complete? + field :in_progress, Boolean, null: false, method: :in_progress? end end diff --git a/twenty-backend/lib/twenty-backend/graphql/type/task_status.rb b/twenty-backend/lib/twenty-backend/graphql/type/task_status.rb index 7dc76cc..cbf5e59 100644 --- a/twenty-backend/lib/twenty-backend/graphql/type/task_status.rb +++ b/twenty-backend/lib/twenty-backend/graphql/type/task_status.rb @@ -1,5 +1,6 @@ module Twenty::GraphQL::Type class TaskStatus < GraphQL::Schema::Enum + value :backlog value :ready value :in_progress value :complete diff --git a/twenty-backend/lib/twenty-backend/model/task.rb b/twenty-backend/lib/twenty-backend/model/task.rb index c825f17..01d1212 100644 --- a/twenty-backend/lib/twenty-backend/model/task.rb +++ b/twenty-backend/lib/twenty-backend/model/task.rb @@ -3,8 +3,8 @@ class Twenty::Task < Twenty::Model self.table_name = "tasks" - STATUS = {ready: 0, in_progress: 1, complete: 2} - enum :status, STATUS, default: :ready + STATUS = {backlog: 0, ready: 1, in_progress: 2, complete: 3} + enum :status, STATUS, default: :backlog ## # Validations diff --git a/twenty-backend/share/twenty-backend/schema.graphql b/twenty-backend/share/twenty-backend/schema.graphql index 47b7d4a..309ddce 100644 --- a/twenty-backend/share/twenty-backend/schema.graphql +++ b/twenty-backend/share/twenty-backend/schema.graphql @@ -50,6 +50,9 @@ type Query { type Task { content: String! id: Int! + inProgress: Boolean! + isBacklogged: Boolean! + isComplete: Boolean! isReady: Boolean! project: Project! status: TaskStatus! @@ -65,6 +68,7 @@ input TaskInput { } enum TaskStatus { + backlog complete in_progress ready diff --git a/twenty-frontend/src/css/_groups.scss b/twenty-frontend/src/css/_groups.scss index 78b834d..6758ab7 100644 --- a/twenty-frontend/src/css/_groups.scss +++ b/twenty-frontend/src/css/_groups.scss @@ -2,6 +2,7 @@ body .wrapper .group { @import "colors"; width: 100%; margin-bottom: 10px; + .group-name { margin: 10px 0 10px 0; padding: 10px; @@ -9,6 +10,30 @@ body .wrapper .group { color: $primary-color; font-size: small; border-radius: 5px; + + ul.tabs { + list-style-type: none; + display: flex; + grid-gap: 15px; + + li.tab { + a { + display: block; + background: $primary-color; + color: $accent-color; + padding: 5px; + border-radius: 5px; + &:focus { + text-decoration: none; + } + } + } + li.tab.active { + a { + text-decoration: underline; + } + } + } } .group-items { @@ -40,8 +65,10 @@ body .wrapper .group { a { color: $primary-color; + text-decoration: none; .subtitle { color: $primary-color; + text-decoration: none; } } } diff --git a/twenty-frontend/src/css/main.scss b/twenty-frontend/src/css/main.scss index b674617..d207522 100644 --- a/twenty-frontend/src/css/main.scss +++ b/twenty-frontend/src/css/main.scss @@ -33,15 +33,4 @@ body { .react-mount { padding-top: 25px; } - - .destroy-task.icon, .complete-task.icon, .start-task.icon { - height: 20px; - width: 20px; - cursor: pointer; - } - .destroy-task.icon { - g { - fill: #d9534f; - } - } } diff --git a/twenty-frontend/src/js/components/Group.tsx b/twenty-frontend/src/js/components/Group.tsx index a11cc2b..151c20f 100644 --- a/twenty-frontend/src/js/components/Group.tsx +++ b/twenty-frontend/src/js/components/Group.tsx @@ -22,7 +22,7 @@ export function Group({ groupName, getItems }: Props) {

{groupName}

- {items.length ? ( + {items?.length ? (
+

{task ? "Edit task" : "New task"}

-
-

{task ? "Edit task" : "New task"}

+
+
@@ -95,7 +107,6 @@ export function Task({ taskId }: { taskId?: number }) { })}
-
- + + ); diff --git a/twenty-frontend/src/js/components/Tasks.tsx b/twenty-frontend/src/js/components/Tasks.tsx index 34e0049..0cb249b 100644 --- a/twenty-frontend/src/js/components/Tasks.tsx +++ b/twenty-frontend/src/js/components/Tasks.tsx @@ -21,8 +21,12 @@ export function Tasks() {

Tasks

- + +
); diff --git a/twenty-frontend/src/js/types/schema.ts b/twenty-frontend/src/js/types/schema.ts index 11ef0c3..60245f0 100644 --- a/twenty-frontend/src/js/types/schema.ts +++ b/twenty-frontend/src/js/types/schema.ts @@ -102,6 +102,9 @@ export type Task = { __typename?: "Task"; content: Scalars["String"]["output"]; id: Scalars["Int"]["output"]; + inProgress: Scalars["Boolean"]["output"]; + isBacklogged: Scalars["Boolean"]["output"]; + isComplete: Scalars["Boolean"]["output"]; isReady: Scalars["Boolean"]["output"]; project: Project; status: TaskStatus; @@ -117,6 +120,7 @@ export type TaskInput = { }; export enum TaskStatus { + Backlog = "backlog", Complete = "complete", InProgress = "in_progress", Ready = "ready",