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.
prodstable
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

@@ -137,7 +137,9 @@ AppAsset::register($this);
<?php $this->endBody() ?>
<!-- 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 -->
<script>

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

@@ -232,7 +232,7 @@ class User extends ActiveRecord implements IdentityInterface
public function isBoulanger()
{
return $this->id_etablissement ;
return ($this->status == User::STATUS_ADMIN || $this->status == User::STATUS_BOULANGER) && $this->id_etablissement ;
}
public function getNomMagasin()

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

@@ -83,7 +83,9 @@ AppAsset::register($this);
<?php $this->endBody() ?>
<!-- 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 -->
<script>

Loading…
Cancel
Save