Selaa lähdekoodia

[Administration] Utilisateurs : vue récapitulative et nouveau menu de navigation

feature/souke
Guillaume Bourgeois 9 kuukautta sitten
vanhempi
commit
120a30808a
14 muutettua tiedostoa jossa 476 lisäystä ja 140 poistoa
  1. +14
    -3
      backend/controllers/UserController.php
  2. +1
    -1
      backend/views/communicate/email.php
  3. +36
    -84
      backend/views/user/_form.php
  4. +0
    -0
      backend/views/user/_menu_filter.php
  5. +32
    -0
      backend/views/user/_menu_navigation.php
  6. +15
    -7
      backend/views/user/credit.php
  7. +10
    -2
      backend/views/user/index.php
  8. +13
    -5
      backend/views/user/orders.php
  9. +12
    -3
      backend/views/user/update.php
  10. +231
    -0
      backend/views/user/view.php
  11. +64
    -32
      backend/web/css/screen.css
  12. +35
    -3
      backend/web/sass/_adminlte.scss
  13. +7
    -0
      domain/Order/Order/OrderRepository.php
  14. +6
    -0
      domain/User/User/User.php

+ 14
- 3
backend/controllers/UserController.php Näytä tiedosto

@@ -169,6 +169,17 @@ class UserController extends BackendController

}

public function actionView($id)
{
$pointSaleModule = $this->getPointSaleModule();
$model = $this->findModel($id);

return $this->render('view', [
'model' => $model,
'pointSaleBillingArray' => $pointSaleModule->findByBillingUser($model)
]);
}

public function actionUpdate($id)
{
$userModule = $this->getUserModule();
@@ -199,7 +210,7 @@ class UserController extends BackendController
}

$this->setFlash('success', 'Utilisateur <strong>' . Html::encode($userModule->getUsername($model)) . '</strong> modifié.');
return $this->redirect(['index']);
return $this->redirect(['view', 'id' => $model->id]);
}

// Email de bienvenue
@@ -207,7 +218,7 @@ class UserController extends BackendController
if ($mailWelcome) {
$this->getUserModule()->getManager()->welcome($model);
$this->setFlash('success', 'Email de bienvenue envoyé à <strong>' . Html::encode($userModule->getSolver()->getUsername($model)) . '</strong>.');
return $this->redirect(['update', 'id' => $model->id]);
return $this->redirect(['view', 'id' => $model->id]);
}

// Mot de passe oublié
@@ -215,7 +226,7 @@ class UserController extends BackendController
if ($newPassword) {
$this->getUserModule()->getManager()->newPassword($model);
$this->setFlash('success', 'Nouveau mot de passe envoyé à <strong>' . Html::encode($userModule->getSolver()->getUsername($model)) . '</strong>.');
return $this->redirect(['update', 'id' => $model->id]);
return $this->redirect(['view', 'id' => $model->id]);
}
} else {
throw new UserException("Vous ne pouvez pas modifier cet utilisateur.");

+ 1
- 1
backend/views/communicate/email.php Näytä tiedosto

@@ -47,7 +47,7 @@ $this->addBreadcrumb($this->getTitle()) ;

<?=

$this->render('@backend/views/user/_menu.php',[
$this->render('@backend/views/user/_menu_filter.php',[
'section' => 'email',
'idPointSaleActive' => $idPointSaleActive,
'sectionInactiveUsers' => isset($sectionInactiveUsers) ? $sectionInactiveUsers : null,

+ 36
- 84
backend/views/user/_form.php Näytä tiedosto

@@ -55,11 +55,11 @@ $distributionModule = DistributionModule::getInstance();

<div class="user-form" id="app-user-form">

<div class="col-md-8">
<?php $form = ActiveForm::begin([
'enableClientValidation' => false
]); ?>
<?php $form = ActiveForm::begin([
'enableClientValidation' => false
]); ?>

<div class="col-md-8 col-no-padding-left">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
@@ -84,47 +84,6 @@ $distributionModule = DistributionModule::getInstance();
</div>
</div>

<div class="panel panel-default panel-newsletter">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-paper-plane"></i>
Bulletin d'information
</h3>
</div>
<div class="panel-body">
<?= $form->field($model, 'newsletter')->widget(Toggle::class,
[
'options' => [
'data-id' => $model->id,
'data-on' => 'Oui',
'data-off' => 'Non',
],
]
); ?>
</div>
</div>

<?php if (
$distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)
|| $producerModule->getSolver()->getConfig('option_export_evoliz')): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-download"></i>
Exports
</h3>
</div>
<div class="panel-body">
<?php if($distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)): ?>
<?= $form->field($model, 'exclude_export_shopping_cart_labels')->checkbox(); ?>
<?php endif; ?>
<?php if ($producerModule->getSolver()->getConfig('option_export_evoliz')): ?>
<?= $form->field($model, 'evoliz_code')->textInput() ?>
<?php endif; ?>
</div>
</div>
<?php endif; ?>

<?php if($pointsSaleArray && count($pointsSaleArray) > 0): ?>
<div class="panel panel-default panel-point-sales">
<div class="panel-heading">
@@ -178,58 +137,51 @@ $distributionModule = DistributionModule::getInstance();
<?= Html::submitButton($model->isNewRecord ? 'Créer' : 'Modifier', ['class' => 'btn btn-primary']) ?>
</div>

<?php ActiveForm::end(); ?>
</div>

<div class="col-md-4">

<?php if($model->email): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-envelope"></i>
Envoi d'emails
</h3>
</div>
<div class="panel-body">
<?php $form = ActiveForm::begin(); ?>
<div class="form-group">
<?= Html::submitButton(
'<i class="fa fa-home"></i> Envoyer l\'email de bienvenue',
['class' => 'btn btn-default', 'name' => 'submit_mail_welcome', 'value' => 1]
) ?>
</div>
<?php ActiveForm::end(); ?>

<?php $form = ActiveForm::begin(); ?>
<div class="form-group">
<?= Html::submitButton(
'<i class="fa fa-key"></i> Envoyer un nouveau mot de passe',
['class' => 'btn btn-default', 'name' => 'submit_new_password', 'value' => 1]
) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<div class="panel panel-default panel-newsletter">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-paper-plane"></i>
Bulletin d'information
</h3>
</div>
<?php endif; ?>
<div class="panel-body">
<?= $form->field($model, 'newsletter')->widget(Toggle::class,
[
'options' => [
'data-id' => $model->id,
'data-on' => 'Oui',
'data-off' => 'Non',
],
]
); ?>
</div>
</div>

<?php if(isset($pointSaleBillingArray) && $pointSaleBillingArray && count($pointSaleBillingArray) > 0): ?>
<?php if (
$distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)
|| $producerModule->getSolver()->getConfig('option_export_evoliz')): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-sticky-note-o"></i>
Facturation
<i class="fa fa-download"></i>
Exports
</h3>
</div>
<div class="panel-body">
<?php foreach($pointSaleBillingArray as $pointSale): ?>
<a class="btn btn-default btn-sm" href="<?= Yii::$app->urlManager->createUrl(['point-sale/update', 'id' => $pointSale->id]) ?>">
<i class="fa fa-map-marker"></i>
<?= $pointSale->name ?>
</a><br />
<?php endforeach; ?>
<?php if($distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)): ?>
<?= $form->field($model, 'exclude_export_shopping_cart_labels')->checkbox(); ?>
<?php endif; ?>
<?php if ($producerModule->getSolver()->getConfig('option_export_evoliz')): ?>
<?= $form->field($model, 'evoliz_code')->textInput() ?>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>

<?php ActiveForm::end(); ?>
</div>

backend/views/user/_menu.php → backend/views/user/_menu_filter.php Näytä tiedosto


+ 32
- 0
backend/views/user/_menu_navigation.php Näytä tiedosto

@@ -0,0 +1,32 @@
<?php

use domain\Order\Order\OrderModule;
use domain\User\User\User;
use domain\User\User\UserModule;
use common\helpers\Price;

$userModule = UserModule::getInstance();
$orderModule = OrderModule::getInstance();

$credit = $userModule->getRepository()->getCredit($user);
$countOrders = $orderModule->getRepository()->countOrdersByUser($user);

?>

<ul class="nav nav-tabs">
<?= menu_navigation_item('view', 'Récapitulatif', $action, $user) ?>
<?= menu_navigation_item('update', 'Profil', $action, $user) ?>
<?= menu_navigation_item('credit', 'Crédit <span class="label label-default badge">'.Price::format($credit).'</span>', $action, $user) ?>
<?= menu_navigation_item('orders', 'Commandes <span class="label label-default badge">'.$countOrders.'</span>', $action, $user) ?>
</ul>


<?php

function menu_navigation_item(string $action, string $label, string $currentAction, User $user) {
$classActive = ($action == $currentAction) ? ' class="active"' : '';
$url = Yii::$app->urlManager->createUrl(['user/'.$action, 'id' => $user->id]);
return '<li'.$classActive.'><a href="'.$url.'">'.$label.'</a></li>';
}

?>

+ 15
- 7
backend/views/user/credit.php Näytä tiedosto

@@ -39,6 +39,7 @@ termes.
use common\helpers\GlobalParam;
use common\helpers\MeanPayment;
use domain\Payment\Payment;
use domain\User\User\UserModule;
use yii\grid\GridView;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
@@ -47,14 +48,21 @@ $paymentManager = $this->getPaymentModule();
$producerModule = $this->getProducerModule();
$userModule = $this->getUserModule();

$this->setTitle('Créditer <small>'.Html::encode($user->lastname.' '.$user->name).'</small>', 'Créditer '.Html::encode($user->lastname.' '.$user->name)) ;
$userModule = UserModule::getInstance();
$username = Html::encode($userModule->getSolver()->getUsername($user));
$this->setTitle($username.' (#'.$user->id.')') ;
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ;
$this->addBreadcrumb(['label' => Html::encode($user->lastname.' '.$user->name)]) ;
$this->addBreadcrumb('Créditer') ;
$this->addBreadcrumb(['label' => $username]) ;
$this->addBreadcrumb('Crédit') ;

?>

<div class="user-credit">
<?= $this->render('_menu_navigation', [
'action' => 'credit',
'user' => $user
]); ?>

<div class="user-credit tab-content">
<?php
$producer = $producerModule->findOneProducerById(GlobalParam::getCurrentProducerId());
@@ -66,7 +74,7 @@ $this->addBreadcrumb('Créditer') ;
}
?>
<div class="col-md-4">
<div class="col-md-4 col-no-padding-left">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
@@ -115,7 +123,7 @@ $this->addBreadcrumb('Créditer') ;
</div>
</div>
<div class="col-md-8">
<div class="col-md-8 col-no-padding-right">
<h2>Historique <span class="the-credit"><?= number_format($userModule->getCredit($user), 2); ?> €</span></h2>

<?= GridView::widget([
@@ -189,5 +197,5 @@ $this->addBreadcrumb('Créditer') ;
],
]); ?>
</div>
<div class="clr"></div>
</div>

+ 10
- 2
backend/views/user/index.php Näytä tiedosto

@@ -58,7 +58,7 @@ $this->addButton(['label' => 'Nouvel utilisateur <span class="glyphicon glyphico

<?=

$this->render('_menu', [
$this->render('_menu_filter', [
'idPointSaleActive' => $idPointSaleActive,
'idDistributionActive' => 0,
'sectionInactiveUsers' => $sectionInactiveUsers,
@@ -206,10 +206,18 @@ $this->render('_menu', [
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{update} {delete} {switch}',
'template' => '{view} {update} {delete} {switch}',
'headerOptions' => ['class' => 'column-actions'],
'contentOptions' => ['class' => 'column-actions'],
'buttons' => [
'view' => function ($url, $user) {
return Html::a('<span class="glyphicon glyphicon-eye-open"></span>',
Yii::$app->urlManager->createUrl(['user/view', 'id' => $user->id]),
[
'title' => 'Voir',
'class' => 'btn btn-default'
]);
},
'update' => function ($url, $user) {
return Html::a('<span class="glyphicon glyphicon-pencil"></span>',
Yii::$app->urlManager->createUrl(['user/update', 'id' => $user->id]),

+ 13
- 5
backend/views/user/orders.php Näytä tiedosto

@@ -36,20 +36,28 @@
* termes.
*/

use domain\User\User\UserModule;
use yii\grid\GridView;
use yii\helpers\Html;

$userModule = $this->getUserModule();
$orderModule = $this->getOrderModule();

$this->setTitle('Commandes <small>' . Html::encode($userModule->getUsername($user)) . '</small>', 'Commandes de ' . Html::encode($userModule->getUsername($user)));
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]);
$this->addBreadcrumb(['label' => Html::encode($user->lastname . ' ' . $user->name)]);
$this->addBreadcrumb('Commandes');
$userModule = UserModule::getInstance();
$username = Html::encode($userModule->getSolver()->getUsername($user));
$this->setTitle($username.' (#'.$user->id.')') ;
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ;
$this->addBreadcrumb(['label' => $username]) ;
$this->addBreadcrumb('Commandes') ;

?>

<div class="user-orders">
<?= $this->render('_menu_navigation', [
'action' => 'orders',
'user' => $user
]); ?>

<div class="user-orders tab-content">
<?= GridView::widget([
'filterModel' => $searchModel,
'dataProvider' => $dataProvider,

+ 12
- 3
backend/views/user/update.php Näytä tiedosto

@@ -36,20 +36,29 @@ pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

use domain\User\User\UserModule;
use yii\helpers\Html;

$this->setTitle('Modifier un client (#'.$model->id.')') ;
$userModule = UserModule::getInstance();
$username = Html::encode($userModule->getSolver()->getUsername($model));
$this->setTitle($username.' (#'.$model->id.')') ;
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ;
$this->addBreadcrumb(['label' => Html::encode($model->lastname.' '.$model->name)]) ;
$this->addBreadcrumb(['label' => $username]) ;
$this->addBreadcrumb('Modifier') ;

?>

<div class="user-update">
<?= $this->render('_menu_navigation', [
'action' => 'update',
'user' => $model
]); ?>

<div class="user-update tab-content">
<?= $this->render('_form', [
'model' => $model,
'pointsSaleArray' => $pointsSaleArray,
'userGroupsArray' => $userGroupsArray,
'pointSaleBillingArray' => $pointSaleBillingArray
]) ?>
<div class="clr"></div>
</div>

+ 231
- 0
backend/views/user/view.php Näytä tiedosto

@@ -0,0 +1,231 @@
<?php

/**
Copyright distrib (2018)

contact@opendistrib.net

Ce logiciel est un programme informatique servant à aider les producteurs
à distribuer leur production en circuits courts.

Ce logiciel est régi par la licence CeCILL soumise au droit français et
respectant les principes de diffusion des logiciels libres. Vous pouvez
utiliser, modifier et/ou redistribuer ce programme sous les conditions
de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
sur le site "http://www.cecill.info".

En contrepartie de l'accessibilité au code source et des droits de copie,
de modification et de redistribution accordés par cette licence, il n'est
offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
seule une responsabilité restreinte pèse sur l'auteur du programme, le
titulaire des droits patrimoniaux et les concédants successifs.

A cet égard l'attention de l'utilisateur est attirée sur les risques
associés au chargement, à l'utilisation, à la modification et/ou au
développement et à la reproduction du logiciel par l'utilisateur étant
donné sa spécificité de logiciel libre, qui peut le rendre complexe à
manipuler et qui le réserve donc à des développeurs et des professionnels
avertis possédant des connaissances informatiques approfondies. Les
utilisateurs sont donc invités à charger et tester l'adéquation du
logiciel à leurs besoins dans des conditions permettant d'assurer la
sécurité de leurs systèmes et ou de leurs données et, plus généralement,
à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.

Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

use common\helpers\Price;
use domain\User\User\UserModule;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

$userModule = UserModule::getInstance();
$username = Html::encode($userModule->getSolver()->getUsername($model));
$this->setTitle($username.' (#'.$model->id.')') ;
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ;
$this->addBreadcrumb(['label' => $username]) ;
$this->addBreadcrumb('Récapitulatif') ;

?>

<?= $this->render('_menu_navigation', [
'action' => 'view',
'user' => $model
]); ?>

<div class="user-view tab-content">
<div class="col-md-6 col-no-padding-left">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-user"></i>
Profil
<a class="btn btn-default btn-xs" href="<?= Yii::$app->urlManager->createUrl(['user/update','id' => $model->id]) ?>">
<span class="glyphicon glyphicon-pencil"></span>
Modifier
</a>
</h3>
</div>
<div class="panel-body">
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<strong>Type</strong>
<span class="pull-right">
<?= $userModule->getSolver()->getTypeLabel($model->type) ?>
</span>
</li>
<li class="list-group-item">
<strong>Nom</strong>
<span class="pull-right">
<?= $userModule->getSolver()->getUsername($model) ?>
</span>
</li>
<?php if($model->phone): ?>
<li class="list-group-item">
<strong>Téléphone</strong>
<span class="pull-right">
<span class="glyphicon glyphicon-phone"></span>
<?= $model->phone ?>
</span>
</li>
<?php endif; ?>
<?php if($model->email): ?>
<li class="list-group-item">
<strong>Email</strong>
<span class="pull-right">
<span class="glyphicon glyphicon-envelope"></span>
<a href="mailto:<?= $model->email ?>"><?= $model->email ?></a>
</span>
</li>
<?php endif; ?>
<?php if($model->address): ?>
<li class="list-group-item">
<strong>Adresse</strong>
<span class="pull-right">
<?= $model->address ?>
</span>
</li>
<?php endif; ?>
<li class="list-group-item">
<strong>Bulletin d'information</strong>
<span class="pull-right">
<?php $isUserSubscribedNewsletter = $userModule->getNewsletterManager()->isUserSubscribedNewsletter($model); ?>
<span class="label label-<?= $isUserSubscribedNewsletter ? 'success' : 'default' ?>">
<?= $isUserSubscribedNewsletter ? 'Oui' : 'Non' ?>
</span>
</span>
</li>
<?php if($model->userPointSale): ?>
<li class="list-group-item">
<strong>Points de vente</strong>
<span class="pull-right">
<?php foreach($model->userPointSale as $userPointSale): ?>
<span class="label label-default"><?= $userPointSale->pointSale->name; ?></span>
<?php endforeach; ?>
</span>
</li>
<?php endif; ?>
<?php if($model->userUserGroup): ?>
<li class="list-group-item">
<strong>Groupes d'utilisateurs</strong>
<span class="pull-right">
<?php foreach($model->userUserGroup as $userUserGroup): ?>
<span class="label label-default"><?= $userUserGroup->userGroup->name; ?></span>
<?php endforeach; ?>
</span>
</li>
<?php endif; ?>
</ul>
</div>
</div>

<?php if(isset($pointSaleBillingArray) && $pointSaleBillingArray && count($pointSaleBillingArray) > 0): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-sticky-note-o"></i>
Contact facturation
</h3>
</div>
<div class="panel-body">
<?php foreach($pointSaleBillingArray as $pointSale): ?>
<a class="btn btn-default btn-sm" href="<?= Yii::$app->urlManager->createUrl(['point-sale/update', 'id' => $pointSale->id]) ?>">
<i class="fa fa-map-marker"></i>
<?= $pointSale->name ?>
</a><br />
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>

<?php if($model->email): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-envelope"></i>
Emails accès
</h3>
</div>
<div class="panel-body">
<?php $form = ActiveForm::begin(); ?>
<div class="form-group">
<?= Html::submitButton(
'<i class="fa fa-key"></i> Envoyer un nouveau mot de passe',
['class' => 'btn btn-default', 'name' => 'submit_new_password', 'value' => 1]
) ?>
</div>
<?php ActiveForm::end(); ?>

<?php $form = ActiveForm::begin(); ?>
<div class="form-group">
<?= Html::submitButton(
'<i class="fa fa-home"></i> Envoyer l\'email de bienvenue',
['class' => 'btn btn-default', 'name' => 'submit_mail_welcome', 'value' => 1]
) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
<?php endif; ?>

</div>
<div class="col-md-6 col-no-padding-right">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="glyphicon glyphicon-piggy-bank"></i>
Crédit
<a class="btn btn-default btn-xs" href="<?= Yii::$app->urlManager->createUrl(['user/credit','id' => $model->id]) ?>">
<span class="glyphicon glyphicon-euro"></span>
Voir / créditer
</a>
</h3>
</div>
<div class="panel-body">
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<strong>Montant</strong>
<span class="pull-right">
<?php $credit = $userModule->getRepository()->getCredit($model); ?>
<span class="label label-<?= $credit > 0 ? 'success' : 'danger' ?>">
<?= Price::format($credit) ?>
</span>
</span>
</li>
<li class="list-group-item">
<strong>Crédit obligatoire</strong>
<span class="pull-right">
<?php $creditActive = $userModule->getRepository()->getCreditActive($model) ?>
<span class="label label-<?= $creditActive ? 'success' : 'default' ?>">
<?= $creditActive ? 'Oui' : 'Non' ?>
</span>
</span>
</li>
</ul>
</div>
</div>
</div>
<div class="clr"></div>
</div>

+ 64
- 32
backend/web/css/screen.css Näytä tiedosto

@@ -1735,91 +1735,123 @@ body.skin-black .content-wrapper .content-header h1 {
font-size: 20px;
}
/* line 220, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px;
}
/* line 224, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px;
}
/* line 228, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a {
color: #e08e0b;
}
/* line 224, ../sass/_adminlte.scss */
/* line 232, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label {
padding-top: 4px;
padding-bottom: 1px;
}
/* line 237, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn {
color: white;
}
/* line 228, ../sass/_adminlte.scss */
/* line 241, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default {
color: #333;
background-color: white;
}
/* line 233, ../sass/_adminlte.scss */
/* line 246, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12;
color: white;
border-color: #F39C12;
}
/* line 240, ../sass/_adminlte.scss */
/* line 253, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px;
background-color: #e0e0e0;
color: #444;
}
/* line 260, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd;
border-right: solid 1px #ddd;
padding: 30px 15px 15px 15px;
background-color: white;
}
/* line 268, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert {
position: relative;
}
/* line 271, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a {
color: white;
}
/* line 243, ../sass/_adminlte.scss */
/* line 274, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn {
color: #333;
text-decoration: none;
}
/* line 248, ../sass/_adminlte.scss */
/* line 279, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close {
font-size: 30px;
position: relative;
top: -25px;
position: absolute;
top: 10px;
right: 15px;
text-decoration: none;
color: white;
opacity: 0.6;
}
/* line 256, ../sass/_adminlte.scss */
/* line 288, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover {
opacity: 1;
}
/* line 263, ../sass/_adminlte.scss */
/* line 295, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px;
}
/* line 266, ../sass/_adminlte.scss */
/* line 298, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a {
color: white;
}
/* line 269, ../sass/_adminlte.scss */
/* line 301, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn {
color: #333;
text-decoration: none;
}
/* line 276, ../sass/_adminlte.scss */
/* line 308, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th {
font-size: 13px;
}
/* line 279, ../sass/_adminlte.scss */
/* line 311, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 172px;
text-align: right;
}
/* line 283, ../sass/_adminlte.scss */
/* line 315, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px;
}
/* line 288, ../sass/_adminlte.scss */
/* line 320, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus {
background-color: #F39C12;
border: solid 1px #F39C12;
color: white;
}
/* line 294, ../sass/_adminlte.scss */
/* line 326, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12;
}
/* line 296, ../sass/_adminlte.scss */
/* line 328, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a;
}
/* line 301, ../sass/_adminlte.scss */
/* line 333, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu {
margin-bottom: 25px;
}
/* line 305, ../sass/_adminlte.scss */
/* line 337, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions {
position: fixed;
bottom: 0;
@@ -1833,59 +1865,59 @@ body.skin-black .content-wrapper .form-actions {
z-index: 10;
border-top: solid 1px #e0e0e0;
}
/* line 318, ../sass/_adminlte.scss */
/* line 350, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px;
}
/* line 323, ../sass/_adminlte.scss */
/* line 355, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons {
margin-top: 25px;
text-align: right;
}
/* line 330, ../sass/_adminlte.scss */
/* line 362, ../sass/_adminlte.scss */
body.skin-black .main-footer a {
color: #F39C12;
}
/* line 335, ../sass/_adminlte.scss */
/* line 367, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize {
float: right;
margin-bottom: 8px;
}
/* line 340, ../sass/_adminlte.scss */
/* line 372, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar {
bottom: 64px;
}

/* line 345, ../sass/_adminlte.scss */
/* line 377, ../sass/_adminlte.scss */
body.login-page {
background: none;
background-color: white;
}
/* line 349, ../sass/_adminlte.scss */
/* line 381, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo {
text-align: center;
font-family: 'highvoltageregular';
}
/* line 353, ../sass/_adminlte.scss */
/* line 385, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img {
width: 50px;
}
/* line 358, ../sass/_adminlte.scss */
/* line 390, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12;
border-color: #F39C12;
padding: 5px 10px;
}
/* line 363, ../sass/_adminlte.scss */
/* line 395, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a;
border-color: #F39C12;
}
/* line 369, ../sass/_adminlte.scss */
/* line 401, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a {
color: #F39C12;
}
/* line 371, ../sass/_adminlte.scss */
/* line 403, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover {
color: #f4a62a;
}

+ 35
- 3
backend/web/sass/_adminlte.scss Näytä tiedosto

@@ -217,9 +217,22 @@ body.skin-black {
}
}

.col-no-padding-left {
padding-left: 0px;
}

.col-no-padding-right {
padding-right: 0px;
}

a {
color: darken($color1, 5) ;
}

.label {
padding-top: 4px;
padding-bottom: 1px;
}
.btn {
color: white ;
@@ -235,8 +248,26 @@ body.skin-black {
color: white ;
border-color: $color1 ;
}

.nav.nav-tabs {
.badge {
margin-left: 4px;
background-color: #e0e0e0;
color: #444;
}
}

.tab-content {
border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd;
border-right: solid 1px #ddd;
padding: 30px 15px 15px 15px;
background-color: white;
}

.alert {
position: relative;

a {
color: white ;
}
@@ -247,8 +278,9 @@ body.skin-black {

.close {
font-size: 30px;
position: relative;
top: -25px;
position: absolute;
top: 10px;
right: 15px;
text-decoration: none;
color: white;
opacity: 0.6;

+ 7
- 0
domain/Order/Order/OrderRepository.php Näytä tiedosto

@@ -689,4 +689,11 @@ class OrderRepository extends AbstractRepository

return $ordersArray;
}

public function countOrdersByUser(User $user)
{
return Order::searchCount([
'id_user' => $user->id,
], ['conditions' => 'date_delete IS NULL']);
}
}

+ 6
- 0
domain/User/User/User.php Näytä tiedosto

@@ -40,6 +40,7 @@ namespace domain\User\User;

use common\components\ActiveRecordCommon;
use domain\Order\Order\Order;
use domain\PointSale\UserPointSale\UserPointSale;
use domain\Producer\Producer\Producer;
use domain\User\UserProducer\UserProducer;
use domain\User\UserUserGroup\UserUserGroup;
@@ -254,6 +255,11 @@ class User extends ActiveRecordCommon implements IdentityInterface
return $this->hasMany(UserProducer::class, ['id_user' => 'id']);
}

public function getUserPointSale()
{
return $this->hasMany(UserPointSale::class, ['id_user' => 'id']);
}

public function getUserUserGroup()
{
return $this->hasMany(UserUserGroup::class, ['id_user' => 'id']);

Loading…
Peruuta
Tallenna