'errorAction' => 'site/error', | 'errorAction' => 'site/error', | ||||
], | ], | ||||
'urlManager' => $common_config_main['components']['urlManagerBackend'], | 'urlManager' => $common_config_main['components']['urlManagerBackend'], | ||||
'assetManager' => [ | |||||
'assetManager' => [ | |||||
'bundles' => [ | 'bundles' => [ | ||||
'dmstr\web\AdminLteAsset' => [ | 'dmstr\web\AdminLteAsset' => [ | ||||
'skin' => 'skin-black', | 'skin' => 'skin-black', | ||||
], | ], | ||||
], | ], | ||||
], | ], | ||||
'view' => [ | |||||
'class' => 'common\components\MyView', | |||||
], | |||||
], | ], | ||||
'params' => $params, | 'params' => $params, | ||||
]; | ]; |
$model->processRestrictedAccess(); | $model->processRestrictedAccess(); | ||||
return $this->redirect(['index']); | return $this->redirect(['index']); | ||||
} else { | } else { | ||||
return $this->render('update', array_merge($this->initForm(), [ | |||||
return $this->render('create', array_merge($this->initForm(), [ | |||||
'model' => $model, | 'model' => $model, | ||||
])); | ])); | ||||
} | } |
{ | { | ||||
$user = User::findOne($id); | $user = User::findOne($id); | ||||
$orders = Order::searchAll([ | |||||
$ordersArray = Order::searchAll([ | |||||
'id_user' => $id | 'id_user' => $id | ||||
], ['orderby' => 'distribution.date DESC']) ; | ], ['orderby' => 'distribution.date DESC']) ; | ||||
return $this->render('commandes', [ | |||||
return $this->render('orders', [ | |||||
'ordersArray' => $ordersArray, | 'ordersArray' => $ordersArray, | ||||
'user' => $user | 'user' => $user | ||||
]); | ]); |
public $id_producer ; | public $id_producer ; | ||||
public $type ; | public $type ; | ||||
public $amount ; | public $amount ; | ||||
public $means_payment ; | |||||
public $mean_payment ; | |||||
public $comment ; | public $comment ; | ||||
public $send_mail ; | public $send_mail ; | ||||
[['id_user', 'id_user_action', 'id_producer'], 'integer'], | [['id_user', 'id_user_action', 'id_producer'], 'integer'], | ||||
[['date','send_mail'], 'safe'], | [['date','send_mail'], 'safe'], | ||||
[['amount'], 'double'], | [['amount'], 'double'], | ||||
[['type', 'means_payment', 'comment'], 'string', 'max' => 255], | |||||
[['type', 'mean_payment', 'comment'], 'string', 'max' => 255], | |||||
]; | ]; | ||||
} | } | ||||
'amount' => 'Montant', | 'amount' => 'Montant', | ||||
'type' => 'Type', | 'type' => 'Type', | ||||
'id_producer' => 'Producteur', | 'id_producer' => 'Producteur', | ||||
'means_payment' => 'Moyen de paiement', | |||||
'mean_payment' => 'Moyen de paiement', | |||||
'comment' => 'Commentaire', | 'comment' => 'Commentaire', | ||||
'send_mail' => 'Prévenir l\'utilisateur', | 'send_mail' => 'Prévenir l\'utilisateur', | ||||
]; | ]; | ||||
$creditHistory->type = $this->type ; | $creditHistory->type = $this->type ; | ||||
$creditHistory->comment = $this->comment ; | $creditHistory->comment = $this->comment ; | ||||
$creditHistory->amount = $this->amount ; | $creditHistory->amount = $this->amount ; | ||||
$creditHistory->means_payment = $this->means_payment ; | |||||
$creditHistory->mean_payment = $this->mean_payment ; | |||||
$creditHistory->save(); | $creditHistory->save(); | ||||
// on prévient l'utilisateur que son compte vient d'être crédité | // on prévient l'utilisateur que son compte vient d'être crédité |
use yii\helpers\Html ; | use yii\helpers\Html ; | ||||
/* | |||||
* To change this license header, choose License Headers in Project Properties. | |||||
* To change this template file, choose Tools | Templates | |||||
* and open the template in the editor. | |||||
*/ | |||||
$this->title = 'Communiquer' ; | |||||
$this->setTitle('Communiquer') ; | |||||
$this->addBreadcrumb('Communiquer') ; | |||||
?> | ?> | ||||
<h1><?= Html::encode($this->title) ; ?></h1> | |||||
<p>Imprimez ce petit encart pour expliquer à vos clients comment passer leurs commandes.</p> | <p>Imprimez ce petit encart pour expliquer à vos clients comment passer leurs commandes.</p> | ||||
<?php echo $this->render('instructions', ['producer' => $producer]) ; ?> | <?php echo $this->render('instructions', ['producer' => $producer]) ; ?> | ||||
<p><?php echo Html::a('<span class="glyphicon glyphicon-download-alt"></span> Télécharger', ['communicate/instructions'], ['class'=>'btn btn-primary']) ?></p> | <p><?php echo Html::a('<span class="glyphicon glyphicon-download-alt"></span> Télécharger', ['communicate/instructions'], ['class'=>'btn btn-primary']) ?></p> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
$this->setTitle('Ajouter un développement') ; | |||||
$this->addBreadcrumb(['label' => 'Développement', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb('Ajouter') ; | |||||
/* @var $this yii\web\View */ | |||||
/* @var $model common\models\Developpement */ | |||||
$this->title = 'Ajouter un développement'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Développement', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
?> | ?> | ||||
<div class="development-create"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="development-create"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
use common\models\User; | use common\models\User; | ||||
use common\helpers\Url; | use common\helpers\Url; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $dataProvider yii\data\ActiveDataProvider */ | |||||
$this->setTitle('Développement') ; | |||||
$this->addButton(['label' => 'Ajouter', 'url' => ['development/create'], 'class' => 'btn btn-primary']) ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
$this->title = 'Développement'; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
?> | ?> | ||||
<div class="development-index"> | |||||
<h1><?= Html::encode($this->title) ?> <?= Html::a('Ajouter', ['create'], ['class' => 'btn btn-success']) ?></h1> | |||||
<div class="development-index"> | |||||
<div class="well"> | <div class="well"> | ||||
Cette page liste les besoins recencés auprès des producteurs utilisant la plateforme. N'hésitez pas à me <a href="<?= Url::frontend('site/contact') ?>">contacter</a> pour la faire évoluer. Les remontées de bugs sont également bienvenues.<br /> | |||||
Cette page liste les besoins recencés auprès des producteurs utilisant la plateforme. N'hésitez pas à me <a href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/contact']) ; ?>">contacter</a> pour la faire évoluer. Les remontées de bugs sont également bienvenues.<br /> | |||||
Afin d'orienter de manière pertinente le développement de la plateforme, je vous invite à définir la priorité des évolutions qui vous intéressent. | Afin d'orienter de manière pertinente le développement de la plateforme, je vous invite à définir la priorité des évolutions qui vous intéressent. | ||||
</div> | </div> | ||||
<?php | |||||
foreach (Yii::$app->session->getAllFlashes() as $key => $message) { | |||||
echo '<div class="alert alert-' . $key . '">' . $message . '</div>'; | |||||
} | |||||
?> | |||||
<ul id="tab-status-developments" class="nav nav-tabs" role="tablist"> | <ul id="tab-status-developments" class="nav nav-tabs" role="tablist"> | ||||
<li role="presentation" class="<?php if($status == Development::STATUS_OPEN): ?>active<?php endif; ?>"><a href="<?= Yii::$app->urlManager->createUrl(['development/index','status' => Development::STATUS_OPEN]); ?>" id="" aria-controls="" role="tab">Ouvert</a></li> | <li role="presentation" class="<?php if($status == Development::STATUS_OPEN): ?>active<?php endif; ?>"><a href="<?= Yii::$app->urlManager->createUrl(['development/index','status' => Development::STATUS_OPEN]); ?>" id="" aria-controls="" role="tab">Ouvert</a></li> | ||||
<li role="presentation" class="<?php if($status == Development::STATUS_CLOSED): ?>active<?php endif; ?>"><a href="<?= Yii::$app->urlManager->createUrl(['development/index','status' => Development::STATUS_CLOSED]); ?>" id="" aria-controls="" role="tab">Fermé</a></li> | <li role="presentation" class="<?php if($status == Development::STATUS_CLOSED): ?>active<?php endif; ?>"><a href="<?= Yii::$app->urlManager->createUrl(['development/index','status' => Development::STATUS_CLOSED]); ?>" id="" aria-controls="" role="tab">Fermé</a></li> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model common\models\Developpement */ | |||||
$this->setTitle('Modifier un développement') ; | |||||
$this->addBreadcrumb(['label' => 'Développement', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb(['label' => '#'.$model->id, 'url' => ['update', 'id' => $model->id]]) ; | |||||
$this->addBreadcrumb('Modifier') ; | |||||
$this->title = 'Modifier un développement'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Développement', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = ['label' => '#'.$model->id, 'url' => ['update', 'id' => $model->id]]; | |||||
$this->params['breadcrumbs'][] = 'Modifier'; | |||||
?> | ?> | ||||
<div class="development-update"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="development-update"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
<h1> | <h1> | ||||
<?php | <?php | ||||
if ($this->title !== null) { | if ($this->title !== null) { | ||||
echo \yii\helpers\Html::encode($this->title); | |||||
echo $this->title; | |||||
} else { | } else { | ||||
echo \yii\helpers\Inflector::camel2words( | echo \yii\helpers\Inflector::camel2words( | ||||
\yii\helpers\Inflector::id2camel($this->context->module->id) | \yii\helpers\Inflector::id2camel($this->context->module->id) | ||||
); | ); | ||||
echo ($this->context->module->id !== \Yii::$app->id) ? '<small>Module</small>' : ''; | echo ($this->context->module->id !== \Yii::$app->id) ? '<small>Module</small>' : ''; | ||||
} ?> | } ?> | ||||
<?php | |||||
if(count($this->buttons)) { | |||||
foreach($this->buttons as $button) { | |||||
echo '<a href="'.Yii::$app->urlManagerBackend->createUrl($button['url']).'" class="'.$button['class'].'">'.$button['label'].'</a>' ; | |||||
} | |||||
} | |||||
?> | |||||
</h1> | </h1> | ||||
<?php } ?> | <?php } ?> | ||||
['label' => 'Abonnements','icon' => 'repeat','url' => ['/subscription/index'], 'visible' => User::isCurrentProducer()], | ['label' => 'Abonnements','icon' => 'repeat','url' => ['/subscription/index'], 'visible' => User::isCurrentProducer()], | ||||
['label' => 'Produits','icon' => 'clone','url' => ['/product/index'], 'visible' => User::isCurrentProducer()], | ['label' => 'Produits','icon' => 'clone','url' => ['/product/index'], 'visible' => User::isCurrentProducer()], | ||||
['label' => 'Points de vente','icon' => 'map-marker','url' => ['/point-sale/index'], 'visible' => User::isCurrentProducer()], | ['label' => 'Points de vente','icon' => 'map-marker','url' => ['/point-sale/index'], 'visible' => User::isCurrentProducer()], | ||||
['label' => 'Clients','icon' => 'users','url' => ['/user/index'], 'visible' => User::isCurrentProducer()], | |||||
['label' => 'Utilisateurs','icon' => 'users','url' => ['/user/index'], 'visible' => User::isCurrentProducer()], | |||||
['label' => 'Paramètres','icon' => 'cog','url' => ['/producer/update'], 'visible' => User::isCurrentProducer()], | ['label' => 'Paramètres','icon' => 'cog','url' => ['/producer/update'], 'visible' => User::isCurrentProducer()], | ||||
['label' => 'Communiquer','icon' => 'bullhorn','url' => ['/communicate/index'], 'visible' => User::isCurrentProducer()], | ['label' => 'Communiquer','icon' => 'bullhorn','url' => ['/communicate/index'], 'visible' => User::isCurrentProducer()], | ||||
[ | [ |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model backend\models\PointVente */ | |||||
$this->setTitle('Ajouter un point de vente') ; | |||||
$this->addBreadcrumb(['label' => 'Points de vente', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb('Ajouter') ; | |||||
$this->title = 'Ajouter un point de vente'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Points de vente', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = 'Ajouter'; | |||||
?> | ?> | ||||
<div class="point-sale-create"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="point-sale-create"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
'users' => $users, | 'users' => $users, | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
use yii\grid\GridView; | use yii\grid\GridView; | ||||
use common\models\PointVenteUser ; | use common\models\PointVenteUser ; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $dataProvider yii\data\ActiveDataProvider */ | |||||
$this->setTitle('Points de vente') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
$this->addButton(['label' => 'Ajouter', 'url' => 'point-sale/create', 'class' => 'btn btn-primary']) ; | |||||
$this->title = 'Points de vente'; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
?> | ?> | ||||
<div class="point-sale-index"> | |||||
<h1><?= Html::encode($this->title) ?> <?= Html::a('Ajouter', ['create'], ['class' => 'btn btn-success']) ?></h1> | |||||
<div class="point-sale-index"> | |||||
<?= GridView::widget([ | <?= GridView::widget([ | ||||
'dataProvider' => $dataProvider, | 'dataProvider' => $dataProvider, | ||||
'columns' => [ | 'columns' => [ | ||||
], | ], | ||||
], | ], | ||||
]); ?> | ]); ?> | ||||
</div> | </div> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model backend\models\PointVente */ | |||||
$this->setTitle('Modifier un point de vente') ; | |||||
$this->addBreadcrumb(['label' => 'Points de vente', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb(['label' => Html::encode($model->name), 'url' => ['update', 'id' => $model->id]]) ; | |||||
$this->addBreadcrumb('Modifier') ; | |||||
$this->title = 'Modifier un point de vente'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Points de vente', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = ['label' => Html::encode($model->name), 'url' => ['update', 'id' => $model->id]]; | |||||
$this->params['breadcrumbs'][] = 'Modifier'; | |||||
?> | ?> | ||||
<div class="point-sale-update"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="point-sale-update"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
'users' => $users | 'users' => $users | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
use common\models\User ; | use common\models\User ; | ||||
use common\models\Producer ; | use common\models\Producer ; | ||||
$this->title = 'Producteurs'; | |||||
$this->params['breadcrumbs'][] = 'Administration' ; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
$this->setTitle('Producteurs') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
?> | ?> | ||||
<h1>Producteurs</h1> | |||||
<?= GridView::widget([ | <?= GridView::widget([ | ||||
'dataProvider' => $dataProviderProducer, | 'dataProvider' => $dataProviderProducer, | ||||
'columns' => [ | 'columns' => [ |
use common\models\Producer ; | use common\models\Producer ; | ||||
use yii\bootstrap\ActiveForm; | use yii\bootstrap\ActiveForm; | ||||
$this->title = 'Mon abonnement'; | |||||
$this->params['breadcrumbs'][] = 'Administration' ; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
$this->setTitle('Mon abonnement') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
?> | ?> | ||||
<h1>Mon abonnement</h1> | |||||
<p class=""> | |||||
<div class="well"> | |||||
Vous seuls savez ce que vous apporte cet outil et dans quelle mesure vous souhaitez le soutenir.<br /> | Vous seuls savez ce que vous apporte cet outil et dans quelle mesure vous souhaitez le soutenir.<br /> | ||||
C'est pourquoi le modèle économique est basé sur un prix libre facturé mensuellement.<br /> | C'est pourquoi le modèle économique est basé sur un prix libre facturé mensuellement.<br /> | ||||
</p> | |||||
</div> | |||||
<div id="free-price" class=""> | <div id="free-price" class=""> | ||||
use yii\widgets\ActiveForm; | use yii\widgets\ActiveForm; | ||||
use common\helpers\Url ; | use common\helpers\Url ; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model common\models\User */ | |||||
$this->setTitle('Paramètres') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
$this->title = 'Paramètres'; | |||||
$this->params['breadcrumbs'][] = 'Paramètres'; | |||||
?> | ?> | ||||
<div class="user-update"> | <div class="user-update"> | ||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="user-form"> | <div class="user-form"> | ||||
<?php $form = ActiveForm::begin(); ?> | <?php $form = ActiveForm::begin(); ?> | ||||
<div class=""> | <div class=""> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
$this->setTitle('Ajouter un produit') ; | |||||
$this->addBreadcrumb(['label' => 'Produits', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb('Ajouter') ; | |||||
/* @var $this yii\web\View */ | |||||
/* @var $model app\models\Produit */ | |||||
$this->title = 'Ajouter un produit'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Produits', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = 'Ajouter'; | |||||
?> | ?> | ||||
<div class="product-create"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="product-create"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
use yii\grid\GridView; | use yii\grid\GridView; | ||||
use common\helpers\Url ; | use common\helpers\Url ; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $dataProvider yii\data\ActiveDataProvider */ | |||||
$this->setTitle('Produits') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
$this->addButton(['label' => 'Ajouter', 'url' => 'product/create', 'class' => 'btn btn-primary']) ; | |||||
$this->title = 'Produits'; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
?> | ?> | ||||
<div class="product-index"> | |||||
<h1><?= Html::encode($this->title) ?> <?= Html::a('Ajouter', ['create'], ['class' => 'btn btn-success']) ?></h1> | |||||
<div class="product-index"> | |||||
<?= GridView::widget([ | <?= GridView::widget([ | ||||
'dataProvider' => $dataProvider, | 'dataProvider' => $dataProvider, | ||||
'columns' => [ | 'columns' => [ | ||||
], | ], | ||||
], | ], | ||||
]); ?> | ]); ?> | ||||
</div> | </div> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model app\models\Produit */ | |||||
$this->title = 'Modifier un produit'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Produits', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['update', 'id' => $model->id]]; | |||||
$this->params['breadcrumbs'][] = 'Modifier'; | |||||
?> | |||||
<div class="product-update"> | |||||
$this->setTitle('Modifier un produit') ; | |||||
$this->addBreadcrumb(['label' => 'Produits', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb(['label' => $model->name, 'url' => ['update', 'id' => $model->id]]) ; | |||||
$this->addBreadcrumb('Modifier') ; | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
?> | |||||
<div class="product-update"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
termes. | termes. | ||||
*/ | */ | ||||
$this->title = 'Statistiques' ; | |||||
use dosamigos\chartjs\ChartJs; | use dosamigos\chartjs\ChartJs; | ||||
$this->params['breadcrumbs'][] = 'Statistiques'; | |||||
$this->setTitle('Statistiques <small>Chiffre d\'affaire</small>') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
?> | ?> | ||||
<h1>Statistiques</h1> | |||||
<?= ChartJs::widget([ | <?= ChartJs::widget([ | ||||
'type' => 'line', | 'type' => 'line', | ||||
'options' => [ | 'options' => [ |
use \backend\controllers\StatsController ; | use \backend\controllers\StatsController ; | ||||
$this->title = 'Statistiques produits' ; | |||||
$this->params['breadcrumbs'][] = 'Statistiques produits'; | |||||
$this->setTitle('Statistiques <small>Produits '.$year.'</small>', 'Statistiques produits '.$year) ; | |||||
$this->addBreadcrumb('Statistiques produits '.$year) ; | |||||
$this->addButton(['label' => '< '.($year - 1), 'url' => ['stats/products','year' => $year - 1], 'class' => 'btn btn-default']) ; | |||||
$this->addButton(['label' => ($year + 1).' >', 'url' => ['stats/products','year' => $year + 1], 'class' => 'btn btn-default']) ; | |||||
?> | ?> | ||||
<div class="stats-products"> | <div class="stats-products"> | ||||
<h1>Statistiques produits <?= $year ?> | |||||
<div id="nav-year"> | |||||
<a class="btn btn-default" href="<?= Yii::$app->urlManager->createUrl(['stats/products','year' => $year - 1]); ?>">< <?= ($year - 1) ?></a> | |||||
<a class="btn btn-default" href="<?= Yii::$app->urlManager->createUrl(['stats/products','year' => $year + 1]); ?>"><?= ($year + 1) ?> ></a> | |||||
</div> | |||||
</h1> | |||||
<?php if($empty): ?> | <?php if($empty): ?> | ||||
<div class="alert alert-warning">Aucune statistique disponible pour cette période</div> | <div class="alert alert-warning">Aucune statistique disponible pour cette période</div> | ||||
<?php else: ?> | <?php else: ?> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model app\models\Produit */ | |||||
$this->setTitle('Ajouter un abonnement') ; | |||||
$this->addBreadcrumb(['label' => 'Abonnements', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb('Ajouter') ; | |||||
$this->title = 'Ajouter un abonnement'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Abonnements', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = 'Ajouter'; | |||||
?> | ?> | ||||
<div class="subscription-create"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="subscription-create"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
'productsArray' => $productsArray | 'productsArray' => $productsArray | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
use yii\grid\GridView; | use yii\grid\GridView; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $dataProvider yii\data\ActiveDataProvider */ | |||||
$this->title = 'Abonnements'; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
$this->setTitle('Abonnements') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
$this->addButton(['label' => 'Ajouter', 'url' => 'subscription/create', 'class' => 'btn btn-success']) ; | |||||
?> | ?> | ||||
<div class="subscription-index"> | <div class="subscription-index"> | ||||
<h1><?= Html::encode($this->title) ?> <?= Html::a('Ajouter', ['create'], ['class' => 'btn btn-success']) ?></h1> | |||||
<?= GridView::widget([ | <?= GridView::widget([ | ||||
'dataProvider' => $dataProvider, | 'dataProvider' => $dataProvider, | ||||
'columns' => [ | 'columns' => [ |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model app\models\Produit */ | |||||
$this->title = 'Modifier un abonnement'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Abonnements', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = 'Modifier'; | |||||
$this->setTitle('Modifier un abonnement') ; | |||||
$this->addBreadcrumb(['label' => 'Abonnements', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb('Modifier') ; | |||||
?> | ?> | ||||
<div class="subscription-update"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="subscription-update"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
'productsArray' => $productsArray | 'productsArray' => $productsArray |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
$this->setTitle('Ajouter un client') ; | |||||
$this->addBreadcrumb(['label' => 'Clients', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb('Ajouter') ; | |||||
/* @var $this yii\web\View */ | |||||
/* @var $model common\models\User */ | |||||
$this->title = 'Ajouter un client'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Clients', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = 'Ajouter' ; | |||||
?> | ?> | ||||
<div class="user-create"> | <div class="user-create"> | ||||
<?php if(YII_ENV == 'demo'): ?> | <?php if(YII_ENV == 'demo'): ?> | ||||
<div class="alert alert-warning">Vous ne pouvez pas ajouter de client dans l'espace Démo.</div> | <div class="alert alert-warning">Vous ne pouvez pas ajouter de client dans l'espace Démo.</div> | ||||
<?php else: ?> | <?php else: ?> | ||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
]) ?> | ]) ?> |
use common\models\CreditHistory; | use common\models\CreditHistory; | ||||
use common\models\Producer; | use common\models\Producer; | ||||
$this->title = 'Créditer <small>'.Html::encode($user->lastname.' '.$user->name).'</small>'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Clients', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = ['label' => Html::encode($user->lastname.' '.$user->name)]; | |||||
$this->params['breadcrumbs'][] = 'Créditer'; | |||||
$this->setTitle('Créditer <small>'.Html::encode($user->lastname.' '.$user->name).'</small>', 'Créditer '.Html::encode($user->lastname.' '.$user->name)) ; | |||||
$this->addBreadcrumb(['label' => 'Clients', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb(['label' => Html::encode($user->lastname.' '.$user->name)]) ; | |||||
$this->addBreadcrumb('Créditer') ; | |||||
?> | ?> | ||||
?> | ?> | ||||
<div class="col-md-12"> | <div class="col-md-12"> | ||||
<h1><?= $this->title ?></h1> | |||||
<?php $form = ActiveForm::begin(); ?> | <?php $form = ActiveForm::begin(); ?> | ||||
<?= $form->field($creditForm, 'type')->dropDownList([ | <?= $form->field($creditForm, 'type')->dropDownList([ | ||||
CreditHistory::TYPE_CREDIT => 'Crédit', | CreditHistory::TYPE_CREDIT => 'Crédit', | ||||
]) ?> | ]) ?> | ||||
<?= $form->field($creditForm, 'amount')->textInput() ?> | <?= $form->field($creditForm, 'amount')->textInput() ?> | ||||
<?= $form->field($creditForm, 'mean_payment')->dropDownList([ | <?= $form->field($creditForm, 'mean_payment')->dropDownList([ | ||||
CreditHistory::MEAN_PAYMENT_MONEYS => CreditHistory::getStrMeanPaymentBy(CreditHistory::MEAN_PAYMENT_MONEYS), | |||||
CreditHistory::MOYEN_CB => CreditHistory::getStrMeanPaymentBy(CreditHistory::MOYEN_CB), | |||||
CreditHistory::MOYEN_CHEQUE => CreditHistory::getStrMeanPaymentBy(CreditHistory::MOYEN_CHEQUE), | |||||
CreditHistory::MOYEN_AUTRE => CreditHistory::getStrMeanPaymentBy(CreditHistory::MOYEN_AUTRE), | |||||
CreditHistory::MEAN_PAYMENT_MONEY => CreditHistory::getStrMeanPaymentBy(CreditHistory::MEAN_PAYMENT_MONEY), | |||||
CreditHistory::MEAN_PAYMENT_CREDIT_CARD => CreditHistory::getStrMeanPaymentBy(CreditHistory::MEAN_PAYMENT_CREDIT_CARD), | |||||
CreditHistory::MEAN_PAYMENT_CHEQUE => CreditHistory::getStrMeanPaymentBy(CreditHistory::MEAN_PAYMENT_CHEQUE), | |||||
CreditHistory::MEAN_PAYMENT_OTHER => CreditHistory::getStrMeanPaymentBy(CreditHistory::MEAN_PAYMENT_OTHER), | |||||
]) ?> | ]) ?> | ||||
<?= $form->field($creditForm, 'comment')->textarea() ?> | <?= $form->field($creditForm, 'comment')->textarea() ?> | ||||
<?= $form->field($creditForm, 'sendMail')->checkbox() ?> | |||||
<?= $form->field($creditForm, 'send_mail')->checkbox() ?> | |||||
<div class="form-group"> | <div class="form-group"> | ||||
<?= Html::submitButton( 'Créditer', ['class' => 'btn btn-primary']) ?> | <?= Html::submitButton( 'Créditer', ['class' => 'btn btn-primary']) ?> |
use yii\helpers\Html ; | use yii\helpers\Html ; | ||||
$this->title = 'Liste des emails'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Utilisateurs', | |||||
'url' => ['user/index']] ; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
$this->setTitle('Liste des emails') ; | |||||
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['user/index']]) ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
?> | ?> | ||||
<h1><?php if(isset($pointSale) && $pointSale): echo Html::encode($pointSale->name).' : '; endif; ?><?= count($usersArray); ?> utilisateurs</h1> | |||||
<h3><?= count($usersArray); ?> utilisateurs</h3> | |||||
<ul id="tabs-points-sale" class="nav nav-tabs" role="tablist"> | <ul id="tabs-points-sale" class="nav nav-tabs" role="tablist"> | ||||
<li class="<?php if(!isset($pointSale)): ?>active<?php endif; ?>"> | <li class="<?php if(!isset($pointSale)): ?>active<?php endif; ?>"> | ||||
<a href="<?= Yii::$app->urlManager->createUrl(['user/mail']); ?>">Tous</a> | <a href="<?= Yii::$app->urlManager->createUrl(['user/mail']); ?>">Tous</a> |
use common\models\User ; | use common\models\User ; | ||||
use common\models\Order ; | use common\models\Order ; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $dataProvider yii\data\ActiveDataProvider */ | |||||
$this->setTitle('Utilisateurs') ; | |||||
$this->addBreadcrumb($this->getTitle()) ; | |||||
$this->addButton(['label' => 'Ajouter', 'url' => 'user/create', 'class' => 'btn btn-primary']) ; | |||||
$this->title = 'Utilisateurs'; | |||||
$this->params['breadcrumbs'][] = $this->title; | |||||
?> | ?> | ||||
<div class="user-index"> | <div class="user-index"> | ||||
<h1> | |||||
<?= Html::encode($this->title) ?> | |||||
<?= Html::a('Ajouter', ['create'], ['class' => 'btn btn-primary']) ?> | |||||
</h1> | |||||
<ul id="tabs-points-vente" class="nav nav-tabs" role="tablist"> | <ul id="tabs-points-vente" class="nav nav-tabs" role="tablist"> | ||||
<li class="<?php if(!$idPointSaleActive && !$sectionInactiveUsers): ?>active<?php endif; ?>"> | <li class="<?php if(!$idPointSaleActive && !$sectionInactiveUsers): ?>active<?php endif; ?>"> | ||||
<a href="<?= Yii::$app->urlManager->createUrl(['user/index']); ?>">Tous</a> | <a href="<?= Yii::$app->urlManager->createUrl(['user/index']); ?>">Tous</a> |
use common\models\Producer; | use common\models\Producer; | ||||
use common\models\Order; | use common\models\Order; | ||||
$this->title = 'Commandes <small>'.Html::encode($user->lastname.' '.$user->name).'</small>'; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Clients', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = ['label' => Html::encode($user->lastname.' '.$user->name)]; | |||||
$this->params['breadcrumbs'][] = 'Créditer'; | |||||
$this->setTitle('Commandes <small>'.Html::encode($user->lastname.' '.$user->name).'</small>', 'Commandes de '.Html::encode($user->lastname.' '.$user->name)) ; | |||||
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb(['label' => Html::encode($user->lastname.' '.$user->name)]) ; | |||||
$this->addBreadcrumb('Commandes') ; | |||||
?> | ?> | ||||
<div class="user-orders"> | <div class="user-orders"> | ||||
<h1><?= $this->title ?> </h1> | |||||
<?php if(count($commandes)): ?> | |||||
<?php if(count($ordersArray)): ?> | |||||
<table id="historique-commandes" class="table table-striped table-bordered"> | <table id="historique-commandes" class="table table-striped table-bordered"> | ||||
<thead> | <thead> | ||||
<tr> | <tr> | ||||
<th>Historique</th> | |||||
<th>Date livraison</th> | <th>Date livraison</th> | ||||
<th>Historique</th> | |||||
<th>Résumé</th> | <th>Résumé</th> | ||||
<th>Point de vente</th> | <th>Point de vente</th> | ||||
<th class="montant">Montant</th> | <th class="montant">Montant</th> | ||||
</tr> | </tr> | ||||
</thead> | </thead> | ||||
<tbody> | <tbody> | ||||
<?php foreach($commandes as $c): ?> | |||||
<tr class="<?= $c->getClassHistorique() ; ?>"> | |||||
<td class="historique"><?= $c->getStrHistorique() ; ?></td> | |||||
<td><?php echo date('d/m/Y',strtotime($c->production->date)); ?></td> | |||||
<td class="resume"><?= $c->getResumePanier() ; ?></td> | |||||
<td><?= $c->getResumePointVente(); ?></td> | |||||
<td class="montant"><?= $c->getResumeMontant(); ?></td> | |||||
<?php foreach($ordersArray as $order): ?> | |||||
<tr class="<?= $order->getClassHistory() ; ?>"> | |||||
<td><?php echo date('d/m/Y',strtotime($order->distribution->date)); ?></td> | |||||
<td class="historique"><?= $order->getStrHistory() ; ?></td> | |||||
<td class="resume"><?= $order->getCartSummary() ; ?></td> | |||||
<td><?= $order->getPointSaleSummary(); ?></td> | |||||
<td class="montant"><?= $order->getAmountSummary(); ?></td> | |||||
</tr> | </tr> | ||||
<?php endforeach; ?> | <?php endforeach; ?> | ||||
</tbody> | </tbody> |
use yii\helpers\Html; | use yii\helpers\Html; | ||||
/* @var $this yii\web\View */ | |||||
/* @var $model common\models\User */ | |||||
$this->setTitle('Modifier un client') ; | |||||
$this->addBreadcrumb(['label' => 'Clients', 'url' => ['index']]) ; | |||||
$this->addBreadcrumb(['label' => Html::encode($model->lastname.' '.$model->name)]) ; | |||||
$this->addBreadcrumb('Modifier') ; | |||||
$this->title = 'Modifier un client' ; | |||||
$this->params['breadcrumbs'][] = ['label' => 'Clients', 'url' => ['index']]; | |||||
$this->params['breadcrumbs'][] = ['label' => Html::encode($model->lastname.' '.$model->name)]; | |||||
$this->params['breadcrumbs'][] = 'Modifier'; | |||||
?> | ?> | ||||
<div class="user-update"> | |||||
<h1><?= Html::encode($this->title) ?></h1> | |||||
<div class="user-update"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
]) ?> | ]) ?> | ||||
</div> | </div> |
background-color: #f5f5f5; | background-color: #f5f5f5; | ||||
} | } | ||||
/* line 62, ../sass/_adminlte.scss */ | /* line 62, ../sass/_adminlte.scss */ | ||||
body.skin-black .content-wrapper .content-header { | |||||
background-color: #eeeeee; | |||||
padding-bottom: 15px; | |||||
border-bottom: solid 1px #e0e0e0; | |||||
} | |||||
/* line 68, ../sass/_adminlte.scss */ | |||||
body.skin-black .content-wrapper .content-header .btn { | |||||
padding: 3px 6px; | |||||
font-size: 13px; | |||||
} | |||||
/* line 74, ../sass/_adminlte.scss */ | |||||
body.skin-black .content-wrapper a { | body.skin-black .content-wrapper a { | ||||
color: #BB8757; | color: #BB8757; | ||||
} | } | ||||
/* line 66, ../sass/_adminlte.scss */ | |||||
/* line 78, ../sass/_adminlte.scss */ | |||||
body.skin-black .content-wrapper .btn { | body.skin-black .content-wrapper .btn { | ||||
color: white; | color: white; | ||||
} | } | ||||
/* line 70, ../sass/_adminlte.scss */ | |||||
/* line 82, ../sass/_adminlte.scss */ | |||||
body.skin-black .content-wrapper .btn-default { | body.skin-black .content-wrapper .btn-default { | ||||
color: #333; | color: #333; | ||||
} | } | ||||
/* line 74, ../sass/_adminlte.scss */ | |||||
body.skin-black .content-wrapper .btn-primary { | |||||
/* line 86, ../sass/_adminlte.scss */ | |||||
body.skin-black .content-wrapper .btn-primary, body.skin-black .content-wrapper .btn-success { | |||||
background-color: #BB8757; | background-color: #BB8757; | ||||
color: white; | color: white; | ||||
border-color: #BB8757; | border-color: #BB8757; | ||||
} | } | ||||
/* line 82, ../sass/_adminlte.scss */ | |||||
/* line 94, ../sass/_adminlte.scss */ | |||||
body.skin-black .main-footer a { | body.skin-black .main-footer a { | ||||
color: #BB8757; | color: #BB8757; | ||||
} | } | ||||
/* line 88, ../sass/_adminlte.scss */ | |||||
/* line 100, ../sass/_adminlte.scss */ | |||||
body.login-page { | body.login-page { | ||||
background: none; | background: none; | ||||
background-color: #F8F1DD; | background-color: #F8F1DD; | ||||
} | } | ||||
/* line 92, ../sass/_adminlte.scss */ | |||||
/* line 104, ../sass/_adminlte.scss */ | |||||
body.login-page .login-box .login-logo { | body.login-page .login-box .login-logo { | ||||
text-align: center; | text-align: center; | ||||
font-family: "comfortaalight"; | font-family: "comfortaalight"; | ||||
} | } | ||||
/* line 95, ../sass/_adminlte.scss */ | |||||
/* line 107, ../sass/_adminlte.scss */ | |||||
body.login-page .login-box .login-logo img { | body.login-page .login-box .login-logo img { | ||||
width: 50px; | width: 50px; | ||||
} | } | ||||
/* line 100, ../sass/_adminlte.scss */ | |||||
/* line 112, ../sass/_adminlte.scss */ | |||||
body.login-page .login-box .login-box-body .btn-primary { | body.login-page .login-box .login-box-body .btn-primary { | ||||
background-color: #BB8757; | background-color: #BB8757; | ||||
border-color: #BB8757; | border-color: #BB8757; | ||||
padding: 5px 10px; | padding: 5px 10px; | ||||
} | } | ||||
/* line 105, ../sass/_adminlte.scss */ | |||||
/* line 117, ../sass/_adminlte.scss */ | |||||
body.login-page .login-box .login-box-body .btn-primary:active { | body.login-page .login-box .login-box-body .btn-primary:active { | ||||
background-color: #c29469; | background-color: #c29469; | ||||
border-color: #BB8757; | border-color: #BB8757; | ||||
} | } | ||||
/* line 111, ../sass/_adminlte.scss */ | |||||
/* line 123, ../sass/_adminlte.scss */ | |||||
body.login-page .login-box .login-box-body a { | body.login-page .login-box .login-box-body a { | ||||
color: #BB8757; | color: #BB8757; | ||||
} | } | ||||
/* line 113, ../sass/_adminlte.scss */ | |||||
/* line 125, ../sass/_adminlte.scss */ | |||||
body.login-page .login-box .login-box-body a:hover { | body.login-page .login-box .login-box-body a:hover { | ||||
color: #c29469; | color: #c29469; | ||||
} | } |
.content-wrapper { | .content-wrapper { | ||||
background-color: #f5f5f5 ; | background-color: #f5f5f5 ; | ||||
.content-header { | |||||
//background-color: $color2 ; | |||||
background-color: #eeeeee ; | |||||
padding-bottom: 15px ; | |||||
border-bottom: solid 1px #e0e0e0 ; | |||||
.btn { | |||||
padding: 3px 6px ; | |||||
font-size: 13px ; | |||||
} | |||||
} | |||||
a { | a { | ||||
color: $color1 ; | color: $color1 ; | ||||
} | } | ||||
color: #333 ; | color: #333 ; | ||||
} | } | ||||
.btn-primary { | |||||
.btn-primary, .btn-success { | |||||
background-color: $color1 ; | background-color: $color1 ; | ||||
color: white ; | color: white ; | ||||
border-color: $color1 ; | border-color: $color1 ; |
class MyView extends \yii\web\View | class MyView extends \yii\web\View | ||||
{ | { | ||||
var $title ; | var $title ; | ||||
var $page_title ; | var $page_title ; | ||||
var $buttons ; | |||||
public function setTitle($title, $page_title = '') | public function setTitle($title, $page_title = '') | ||||
{ | { | ||||
$this->title = $title ; | $this->title = $title ; | ||||
if(strlen($page_title)) | |||||
if(strlen($page_title)) { | |||||
$this->page_title = $page_title ; | $this->page_title = $page_title ; | ||||
else | |||||
} | |||||
else { | |||||
$this->page_title = $title ; | $this->page_title = $title ; | ||||
} | |||||
} | } | ||||
public function getTitle() | public function getTitle() | ||||
return Yii::$app->controller->id.'/'.Yii::$app->controller->action->id ; | return Yii::$app->controller->id.'/'.Yii::$app->controller->action->id ; | ||||
} | } | ||||
public function addBreadcrumb($breadcrumb) | |||||
{ | |||||
$this->params['breadcrumbs'][] = $breadcrumb ; | |||||
} | |||||
public function addButton($button) | |||||
{ | |||||
$this->buttons[] = $button ; | |||||
} | |||||
} | } |
* @property double $amount | * @property double $amount | ||||
* @property string $type | * @property string $type | ||||
* @property integer $id_producer | * @property integer $id_producer | ||||
* @property string $mean_payement | |||||
* @property string $mean_payment | |||||
*/ | */ | ||||
class CreditHistory extends ActiveRecordCommon | class CreditHistory extends ActiveRecordCommon | ||||
{ | { | ||||
*/ | */ | ||||
public function getStrMeanPayment() | public function getStrMeanPayment() | ||||
{ | { | ||||
self::getStrMeanPaymentBy($this->mean_payement) ; | |||||
self::getStrMeanPaymentBy($this->mean_payment) ; | |||||
} | } | ||||
/** | /** |
$html .= '<span class="label label-success">Payée</span>'; | $html .= '<span class="label label-success">Payée</span>'; | ||||
} elseif ($this->getPaymentStatus() == Order::PAYMENT_UNPAID) { | } elseif ($this->getPaymentStatus() == Order::PAYMENT_UNPAID) { | ||||
$html .= '<span class="label label-danger">Non payée</span><br /> | $html .= '<span class="label label-danger">Non payée</span><br /> | ||||
Reste <strong>' . $this->getRemainingAmount(true) . '</strong> à payer'; | |||||
Reste <strong>' . $this->getAmount(Order::AMOUNT_REMAINING, true) . '</strong> à payer'; | |||||
} elseif ($this->getPaymentStatus() == Order::PAYMENT_SURPLUS) { | } elseif ($this->getPaymentStatus() == Order::PAYMENT_SURPLUS) { | ||||
$html .= '<span class="label label-success">Payée</span>'; | $html .= '<span class="label label-success">Payée</span>'; | ||||
} | } |
{ | { | ||||
return [ | return [ | ||||
'id' => 'ID', | 'id' => 'ID', | ||||
'name' => 'Prénom', | |||||
'lastname' => 'Nom', | |||||
'username' => 'Identifiant', | 'username' => 'Identifiant', | ||||
'password' => 'Mot de passe', | 'password' => 'Mot de passe', | ||||
'rememberMe' => 'Se souvenir de moi', | 'rememberMe' => 'Se souvenir de moi', |