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,39 @@
<?php
declare(strict_types=1);
namespace Leantime\Domain\Reports\Hxcontrollers;
use Leantime\Core\Controller\HtmxController;
use Leantime\Domain\Reports\Models\ReportPeriod;
use Leantime\Domain\Reports\Services\ReportEngine;
/**
* Re-renders the project report body when the period filter changes (the page shell with
* header and period picker stays in place).
*/
class ProjectReport extends HtmxController
{
protected static string $view = 'reports::partials.projectReportBody';
private ReportEngine $reportEngine;
public function init(ReportEngine $reportEngine): void
{
$this->reportEngine = $reportEngine;
}
/**
* Builds the report body for the requested period. Authorization happens in the engine
* (reports.view per project) — an unauthorized project yields an empty report.
*/
public function get(): void
{
$projectId = (int) session('currentProject');
$period = ReportPeriod::fromRequest($this->incomingRequest->query->all());
$this->tpl->assign('projectId', $projectId);
$this->tpl->assign('period', $period);
$this->tpl->assign('report', $this->reportEngine->buildReport([$projectId], $period));
}
}