@@ -36,6 +36,8 @@ | |||
* termes. | |||
*/ | |||
use common\helpers\GlobalParam; | |||
use common\logic\User\User\Wrapper\UserModule; | |||
use yii\helpers\Html; | |||
use yii\widgets\ActiveForm; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
@@ -43,9 +45,9 @@ use common\logic\Config\TaxRate\Model\TaxRate; | |||
use common\logic\Document\Document\Model\Document; | |||
use yii\helpers\ArrayHelper; | |||
$userModule = $this->getUserModule(); | |||
\backend\assets\VuejsProducerUpdateAsset::register($this); | |||
$userModule = UserModule::getInstance(); | |||
$userCurrent = GlobalParam::getCurrentUser(); | |||
$this->setTitle('Paramètres'); | |||
$this->addBreadcrumb($this->getTitle()); | |||
@@ -53,7 +55,7 @@ $this->addBreadcrumb($this->getTitle()); | |||
<script> | |||
var appInitValues = { | |||
isAdmin: <?= (int) $userModule->isCurrentAdmin() ?> | |||
isAdmin: <?= (int) $userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent) ?> | |||
}; | |||
</script> | |||
@@ -1,5 +1,6 @@ | |||
<?php | |||
use common\helpers\GlobalParam; | |||
use common\logic\Ticket\Ticket\Wrapper\TicketManager; | |||
use common\logic\User\User\Wrapper\UserModule; | |||
use yii\helpers\Html; | |||
@@ -7,6 +8,7 @@ use yii\widgets\ActiveForm; | |||
$ticketManager = TicketManager::getInstance(); | |||
$userModule = UserModule::getInstance(); | |||
$userCurrent = GlobalParam::getCurrentUser(); | |||
$this->setTitle('Voir un ticket'); | |||
$this->addBreadcrumb(['label' => 'Support', 'url' => ['index']]); | |||
$this->addBreadcrumb('Voir un ticket'); | |||
@@ -29,7 +31,7 @@ $this->addBreadcrumb('Voir un ticket'); | |||
<td><strong>Statut</strong></td> | |||
<td><?= $ticketManager->getTicketStatusLabelAsHtml($ticket); ?></td> | |||
</tr> | |||
<?php if($userModule->isCurrentAdmin()): ?> | |||
<?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?> | |||
<tr> | |||
<td><strong>Producteur</strong></td> | |||
<td><?= $ticketManager->isTicketUnread($ticket, $ticket->user) ? |