Browse Source

Affichage du chat seulement aux boulangers

Ce service leur est dédié pour leur offrir un soutien pendant la mise en place du système de réservation.
Les clients peuvent passer par le formulaire de contact en cas de question/remarque/problème.
master
keun 8 years ago
parent
commit
acd92aaa62
3 changed files with 7 additions and 3 deletions
  1. +3
    -1
      backend/views/layouts/main.php
  2. +1
    -1
      common/models/User.php
  3. +3
    -1
      frontend/views/layouts/main.php

+ 3
- 1
backend/views/layouts/main.php View File

<?php $this->endBody() ?> <?php $this->endBody() ?>
<!-- chat --> <!-- chat -->
<script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
<?php if(!Yii::$app->user->isGuest && Yii::$app->user->identity->isBoulanger()): ?>
<script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
<?php endif; ?>
<!-- analytics --> <!-- analytics -->
<script> <script>

+ 1
- 1
common/models/User.php View File

public function isBoulanger() public function isBoulanger()
{ {
return $this->id_etablissement ;
return ($this->status == User::STATUS_ADMIN || $this->status == User::STATUS_BOULANGER) && $this->id_etablissement ;
} }
public function getNomMagasin() public function getNomMagasin()

+ 3
- 1
frontend/views/layouts/main.php View File

<?php $this->endBody() ?> <?php $this->endBody() ?>
<!-- chat --> <!-- chat -->
<script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
<?php if(!Yii::$app->user->isGuest && Yii::$app->user->identity->isBoulanger()): ?>
<script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
<?php endif; ?>
<!-- analytics --> <!-- analytics -->
<script> <script>

Loading…
Cancel
Save