OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
39
app/Domain/Tickets/Controllers/ShowAll.php
Normal file
39
app/Domain/Tickets/Controllers/ShowAll.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Tickets\Controllers;
|
||||
|
||||
use Leantime\Core\Controller\Controller;
|
||||
use Leantime\Core\Controller\Frontcontroller;
|
||||
use Leantime\Domain\Tickets\Services\Tickets as TicketService;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class ShowAll extends Controller
|
||||
{
|
||||
private TicketService $ticketService;
|
||||
|
||||
public function init(
|
||||
TicketService $ticketService,
|
||||
): void {
|
||||
|
||||
$this->ticketService = $ticketService;
|
||||
|
||||
session(['lastPage' => CURRENT_URL]);
|
||||
session(['lastTicketView' => 'table']);
|
||||
session(['lastFilterdTicketTableView' => CURRENT_URL]);
|
||||
|
||||
if (! session()->exists('currentProjectName')) {
|
||||
Frontcontroller::redirect(BASE_URL.'/');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function get($params): Response
|
||||
{
|
||||
$template_assignments = $this->ticketService->getTicketTemplateAssignments($params);
|
||||
array_map([$this->tpl, 'assign'], array_keys($template_assignments), array_values($template_assignments));
|
||||
|
||||
return $this->tpl->display('tickets.showAll');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user