Flesh out work items in the UI
Build and Publish Docker Container / build (push) Successful in 5m43s

This commit is contained in:
2023-10-08 16:06:07 +01:00
parent f9f4762450
commit c8b688ce57
14 changed files with 123 additions and 36 deletions
-5
View File
@@ -1,5 +0,0 @@
module Trackable
def total_overall_time
tracked_time_entries.sum(&:duration)
end
end
+15
View File
@@ -0,0 +1,15 @@
class WorkItemController < ApplicationController
def start_time_entry
work_item = WorkItem.find(params[:id])
Toggl::start_time_entry(
description: work_item.title,
project_id: work_item.course.toggl_project,
)
end
def complete
work_item = WorkItem.find(params[:id])
work_item.complete!
end
end