This commit refactors the import statements in various controllers and jobs to improve code organization and readability. Unused imports were removed, and necessary imports were added to ensure proper functionality.
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Controllers\Bo;
|
|
|
|
use App\Contracts\Executor;
|
|
use App\Cqs\Queries\Dashboard\GetBoDashboardQuery;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Http\Requests\Bo\Dashboard\DashboardRequest;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
class DashboardController extends Controller
|
|
{
|
|
public function __construct(
|
|
private readonly Executor $executor,
|
|
) {
|
|
}
|
|
|
|
/**
|
|
* Dashboard Page
|
|
*/
|
|
public function index(DashboardRequest $request, GetBoDashboardQuery $query): View
|
|
{
|
|
$output = $this->executor->execute(
|
|
$query,
|
|
$request->toGetBoDashboardQueryInput(),
|
|
);
|
|
|
|
return view('bo.dashboard', [
|
|
'prevDates' => $output->prevDates,
|
|
'statsShop' => $output->statsShop,
|
|
'statsCustomer' => $output->statsCustomer,
|
|
'adhesion' => $output->adhesion,
|
|
'employeeCount' => $output->employeeCount,
|
|
'customersLinkedToEmployeeCount' => $output->customersLinkedToEmployeeCount,
|
|
]);
|
|
}
|
|
}
|