OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace Leantime\Domain\Tickets\Hxcontrollers;
use Leantime\Core\Controller\HtmxController;
use Leantime\Domain\Timesheets\Services\Timesheets;
class TimerButton extends HtmxController
{
protected static string $view = 'tickets::partials.timerButton';
private Timesheets $timesheetService;
/**
* Controller constructor
*/
public function init(Timesheets $timesheetService): void
{
$this->timesheetService = $timesheetService;
}
public function getStatus(): void
{
$params = $this->incomingRequest->query->all();
$onTheClock = session()->exists('userdata') ? $this->timesheetService->isClocked(session('userdata.id')) : false;
$this->tpl->assign('onTheClock', $onTheClock);
$this->tpl->assign('parentTicketId', $params['request_parts'] ?? false);
}
public function getStatusButton(): void
{
$this->getStatus();
$this->tpl->displayPartial('tickets::partials.timerButton');
}
}