Flesh out work items in the UI
Build and Publish Docker Container / build (push) Successful in 5m43s
Build and Publish Docker Container / build (push) Successful in 5m43s
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
module Trackable
|
||||
def total_overall_time
|
||||
tracked_time_entries.sum(&:duration)
|
||||
end
|
||||
end
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user