lecture-attendance-manager/app/controllers/work_item_controller.rb
Joshua Coles c8b688ce57
All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m43s
Flesh out work items in the UI
2023-10-08 16:06:07 +01:00

16 lines
336 B
Ruby

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