Many fixes
This commit is contained in:
@@ -5,14 +5,17 @@ namespace App\Modules\Clients\Controllers;
|
||||
use App\Controllers\BaseController;
|
||||
use App\Modules\Clients\Models\ClientModel;
|
||||
use App\Services\AccessService;
|
||||
use App\Services\ModuleSubscriptionService;
|
||||
|
||||
class Clients extends BaseController
|
||||
{
|
||||
protected ClientModel $clientModel;
|
||||
protected ModuleSubscriptionService $subscriptionService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->clientModel = new ClientModel();
|
||||
$this->subscriptionService = service('moduleSubscription');
|
||||
}
|
||||
|
||||
public function index()
|
||||
@@ -98,8 +101,9 @@ class Clients extends BaseController
|
||||
}
|
||||
|
||||
$data = [
|
||||
'title' => 'Добавить клиента',
|
||||
'client' => null,
|
||||
'title' => 'Добавить клиента',
|
||||
'client' => null,
|
||||
'crm_active' => $this->subscriptionService->isModuleActive('crm'),
|
||||
];
|
||||
|
||||
return $this->renderTwig('@Clients/form', $data);
|
||||
@@ -154,8 +158,9 @@ class Clients extends BaseController
|
||||
}
|
||||
|
||||
$data = [
|
||||
'title' => 'Редактировать клиента',
|
||||
'client' => $client,
|
||||
'title' => 'Редактировать клиента',
|
||||
'client' => $client,
|
||||
'crm_active' => $this->subscriptionService->isModuleActive('crm'),
|
||||
];
|
||||
|
||||
return $this->renderTwig('@Clients/form', $data);
|
||||
|
||||
Reference in New Issue
Block a user