Просмотр исходного кода

[Administration] Commandes admin : page générale des dernières commandes passées sur Souke

feature/rotating_product
Guillaume Bourgeois 5 месяцев назад
Родитель
Сommit
d1c1d88276
21 измененных файлов: 354 добавлений и 174 удалений
  1. +13
    -0
      backend/config/main.php
  2. +2
    -1
      backend/controllers/admin/CommunicateAdminController.php
  3. +2
    -3
      backend/controllers/admin/DashboardAdminController.php
  4. +2
    -1
      backend/controllers/admin/FeatureAdminController.php
  5. +3
    -2
      backend/controllers/admin/OnlineAdminController.php
  6. +79
    -0
      backend/controllers/admin/OrderAdminController.php
  7. +2
    -2
      backend/controllers/admin/ProducerAdminController.php
  8. +2
    -4
      backend/controllers/admin/SettingAdminController.php
  9. +5
    -4
      backend/controllers/admin/StatsAdminController.php
  10. +2
    -1
      backend/controllers/admin/SupportAdminController.php
  11. +2
    -1
      backend/controllers/admin/TaxRateAdminController.php
  12. +2
    -1
      backend/controllers/admin/UserAdminController.php
  13. +1
    -7
      backend/views/dashboard/index.php
  14. +6
    -0
      backend/views/layouts/left.php
  15. +111
    -0
      backend/views/order-admin/index.php
  16. +4
    -11
      backend/views/user/orders.php
  17. +98
    -94
      backend/web/css/screen.css
  18. +5
    -0
      backend/web/sass/_adminlte.scss
  19. +3
    -1
      common/components/ActiveRecordCommon.php
  20. +1
    -0
      domain/Order/Order/OrderSearch.php
  21. +9
    -41
      domain/Order/Order/OrderSolver.php

+ 13
- 0
backend/config/main.php Просмотреть файл

@@ -49,6 +49,19 @@ return [
'basePath' => dirname(__DIR__),
'name' => 'distrib',
'controllerNamespace' => 'backend\controllers',
'controllerMap' => [
'dashboard-admin' => 'backend\controllers\admin\DashboardAdminController',
'communicate-admin' => 'backend\controllers\admin\CommunicatedAdminController',
'feature-admin' => 'backend\controllers\admin\FeatureAdminController',
'online-admin' => 'backend\controllers\admin\OnlineAdminController',
'producer-admin' => 'backend\controllers\admin\ProducerAdminController',
'setting-admin' => 'backend\controllers\admin\SettingAdminController',
'stats-admin' => 'backend\controllers\admin\StatsAdminController',
'support-admin' => 'backend\controllers\admin\SupportAdminController',
'tax-rate-admin' => 'backend\controllers\admin\TaxRateAdminController',
'user-admin' => 'backend\controllers\admin\UserAdminController',
'order-admin' => 'backend\controllers\admin\OrderAdminController',
],
'defaultRoute' => 'dashboard/index',
'bootstrap' => ['log'],
'modules' => [],

backend/controllers/CommunicateAdminController.php → backend/controllers/admin/CommunicateAdminController.php Просмотреть файл

@@ -36,8 +36,9 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use backend\controllers\BackendController;
use backend\models\MailForm;
use domain\User\User\User;
use yii\filters\AccessControl;

backend/controllers/DashboardAdminController.php → backend/controllers/admin/DashboardAdminController.php Просмотреть файл

@@ -36,11 +36,10 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use common\helpers\Price;
use backend\controllers\BackendController;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;

class DashboardAdminController extends BackendController
{

backend/controllers/FeatureAdminController.php → backend/controllers/admin/FeatureAdminController.php Просмотреть файл

@@ -36,8 +36,9 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use backend\controllers\BackendController;
use common\helpers\Ajax;
use yii\filters\AccessControl;
use yii\helpers\Html;

backend/controllers/OnlineAdminController.php → backend/controllers/admin/OnlineAdminController.php Просмотреть файл

@@ -36,10 +36,11 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use yii\filters\VerbFilter;
use backend\controllers\BackendController;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;

class OnlineAdminController extends BackendController
{

+ 79
- 0
backend/controllers/admin/OrderAdminController.php Просмотреть файл

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

/**
* Copyright Souke (2018)
*
* contact@souke.fr
*
* 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.
*/

namespace backend\controllers\admin;

use backend\controllers\BackendController;
use domain\Order\Order\OrderSearch;
use domain\User\User\UserSearch;
use Yii;
use yii\filters\AccessControl;

class OrderAdminController extends BackendController
{
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::class,
'rules' => [
[
'allow' => true,
'roles' => ['@'],
'matchCallback' => function ($rule, $action) {
return $this->getUserModule()
->getAuthorizationChecker()
->isGrantedAsAdministrator($this->getUserCurrent());
}
]
],
],
];
}

public function actionIndex()
{
$searchModel = new OrderSearch();
$dataProvider = $searchModel->search(array_merge(\Yii::$app->request->queryParams));

return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
}

backend/controllers/ProducerAdminController.php → backend/controllers/admin/ProducerAdminController.php Просмотреть файл

@@ -36,13 +36,13 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use backend\controllers\BackendController;
use common\helpers\Ajax;
use common\helpers\Alwaysdata;
use domain\Order\Order\Order;
use domain\Order\Order\OrderRepositoryQuery;
use domain\Order\OrderStatus\OrderStatus;
use domain\Producer\Producer\Producer;
use domain\Product\Product\Product;
use Yii;

backend/controllers/SettingAdminController.php → backend/controllers/admin/SettingAdminController.php Просмотреть файл

@@ -36,13 +36,11 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use backend\controllers\BackendController;
use backend\forms\AdminSettingsForm;
use common\helpers\Ajax;
use yii\filters\AccessControl;
use yii\helpers\Html;
use yii\web\NotFoundHttpException;

/**
* UserController implements the CRUD actions for User model.

backend/controllers/StatsAdminController.php → backend/controllers/admin/StatsAdminController.php Просмотреть файл

@@ -36,13 +36,14 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use yii\filters\AccessControl;
use Yii;
use DateTime;
use backend\controllers\BackendController;
use DateInterval;
use DatePeriod;
use DateTime;
use Yii;
use yii\filters\AccessControl;

class StatsAdminController extends BackendController
{

backend/controllers/SupportAdminController.php → backend/controllers/admin/SupportAdminController.php Просмотреть файл

@@ -36,8 +36,9 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use backend\controllers\SupportController;
use domain\Ticket\Ticket\Ticket;
use domain\Ticket\Ticket\TicketSearch;
use yii\filters\AccessControl;

backend/controllers/TaxRateAdminController.php → backend/controllers/admin/TaxRateAdminController.php Просмотреть файл

@@ -36,8 +36,9 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use backend\controllers\BackendController;
use domain\Config\TaxRate\TaxRate;
use yii\data\ActiveDataProvider;
use yii\filters\AccessControl;

backend/controllers/UserAdminController.php → backend/controllers/admin/UserAdminController.php Просмотреть файл

@@ -36,8 +36,9 @@
* termes.
*/

namespace backend\controllers;
namespace backend\controllers\admin;

use backend\controllers\BackendController;
use domain\User\User\UserSearch;
use Yii;
use yii\filters\AccessControl;

+ 1
- 7
backend/views/dashboard/index.php Просмотреть файл

@@ -253,13 +253,7 @@ $this->setTitle('Tableau de bord');

<tr class="<?= $orderModule->getHistoryClass($order) ; ?>">
<td class="history">
<?= $orderModule->getSolver()->getLabelOrderStatus($order); ?>
<?php
$lastOrderStatusHistory = $orderModule->getSolver()->getLastOrderStatusHistory($order);
if($lastOrderStatusHistory) {
echo '<br /><span class="small gray">'.$lastOrderStatusHistory->getDate()->format('d/m/Y à H:i').'</span>';
}
?>
<?= $orderModule->getSolver()->getLabelOrderStatus($order, true); ?>
</td>
<td class="infos">
<?= $orderModule->getSolver()->getLabelOrigin($order, true); ?>

+ 6
- 0
backend/views/layouts/left.php Просмотреть файл

@@ -151,6 +151,12 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran
'url' => ['/user-admin/email-deliverability'],
'visible' => $isUserCurrentGrantedAsAdministrator
],
[
'label' => 'Commandes',
'icon' => 'calendar',
'url' => ['order-admin/index'],
'visible' => $isUserCurrentGrantedAsAdministrator,
],
[
'label' => 'Statistiques',
'icon' => 'line-chart',

+ 111
- 0
backend/views/order-admin/index.php Просмотреть файл

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

/**
* Copyright Souke (2018)
*
* contact@souke.fr
*
* 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\components\View;
use yii\grid\GridView;
use yii\helpers\Html;

/**
* @var View $this
*/

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

$this->setTitle('Commandes') ;
$this->addBreadcrumb('Commandes') ;

?>

<div class="order-admin-index">
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'label' => 'Statut',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getLabelOrderStatus($order, true);
}
],
[
'label' => 'Producteur',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return Html::encode($order->distribution->producer->name);
}
],
[
'label' => 'Origine',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getLabelOrigin($order, true);;
}
],
[
'attribute' => 'distribution.date',
'label' => 'Distribution',
'value' => function ($order) {
return date('d/m/Y',strtotime($order->distribution->date));
}
],
[
'label' => 'Point de vente',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getPointSaleSummary($order);
}
],
[
'label' => 'Produits',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getRepository()->getCartSummary($order);
}
],
[
'label' => 'Montant',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
$orderModule->initOrder($order);
return $orderModule->getRepository()->getAmountSummary($order);
}
]
],
]); ?>
</div>

+ 4
- 11
backend/views/user/orders.php Просмотреть файл

@@ -73,7 +73,7 @@ $this->addBreadcrumb('Commandes') ;
'label' => 'Origine',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getSolver()->getLabelOrigin($order);;
return $orderModule->getSolver()->getLabelOrigin($order, true);;
}
],
[
@@ -87,21 +87,14 @@ $this->addBreadcrumb('Commandes') ;
'label' => 'Point de vente',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getPointSaleSummary($order);
return $orderModule->getSolver()->getPointSaleSummary($order);
}
],
/*[
'label' => 'Historique',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getHistorySummary($order);
}
],*/
[
'label' => 'Produits',
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
return $orderModule->getCartSummary($order);
return $orderModule->getRepository()->getCartSummary($order);
}
],
[
@@ -109,7 +102,7 @@ $this->addBreadcrumb('Commandes') ;
'format' => 'raw',
'value' => function ($order) use ($orderModule) {
$orderModule->initOrder($order);
return $orderModule->getAmountSummary($order);
return $orderModule->getRepository()->getAmountSummary($order);
}
],
[

+ 98
- 94
backend/web/css/screen.css Просмотреть файл

@@ -1580,45 +1580,49 @@ body.skin-black .user-without-account {
color: gray;
font-style: italic;
}
/* line 50, ../sass/_adminlte.scss */
/* line 49, ../sass/_adminlte.scss */
body.skin-black .locality {
color: gray;
}
/* line 55, ../sass/_adminlte.scss */
body.skin-black .main-header .dropdown-toggle::after {
display: none;
}
/* line 54, ../sass/_adminlte.scss */
/* line 59, ../sass/_adminlte.scss */
body.skin-black .main-header .logo {
background-color: white;
font-family: 'highvoltageregular';
font-size: 23px;
position: relative;
}
/* line 60, ../sass/_adminlte.scss */
/* line 65, ../sass/_adminlte.scss */
body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus {
background-color: white;
text-decoration: none;
}
/* line 65, ../sass/_adminlte.scss */
/* line 70, ../sass/_adminlte.scss */
body.skin-black .main-header .logo img {
position: relative;
max-width: 300px;
max-height: 300px;
height: auto;
}
/* line 73, ../sass/_adminlte.scss */
/* line 78, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-lg img {
width: 90px;
top: -2px;
}
/* line 79, ../sass/_adminlte.scss */
/* line 84, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-mini img {
width: 50px;
}
/* line 84, ../sass/_adminlte.scss */
/* line 89, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar {
display: block;
background-color: white;
padding: 0px;
}
/* line 89, ../sass/_adminlte.scss */
/* line 94, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel {
position: relative;
float: left;
@@ -1626,11 +1630,11 @@ body.skin-black .main-header .navbar .producer-panel {
padding-left: 50px;
margin-left: 7px;
}
/* line 96, ../sass/_adminlte.scss */
/* line 101, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel.without-logo {
padding-left: 10px;
}
/* line 100, ../sass/_adminlte.scss */
/* line 105, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo {
position: absolute;
top: 5px;
@@ -1645,7 +1649,7 @@ body.skin-black .main-header .navbar .producer-panel .logo {
text-align: center;
overflow: hidden;
}
/* line 112, ../sass/_adminlte.scss */
/* line 117, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
position: absolute;
top: 50%;
@@ -1654,131 +1658,131 @@ body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
max-width: 35px;
max-height: 35px;
}
/* line 122, ../sass/_adminlte.scss */
/* line 127, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title {
position: relative;
top: 2px;
text-transform: uppercase;
}
/* line 127, ../sass/_adminlte.scss */
/* line 132, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a {
color: #333;
}
/* line 130, ../sass/_adminlte.scss */
/* line 135, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a:hover {
text-decoration: underline;
}
/* line 135, ../sass/_adminlte.scss */
/* line 140, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title .producer-id {
color: gray;
font-size: 13px;
}
/* line 142, ../sass/_adminlte.scss */
/* line 147, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .sidebar-toggle {
color: #333;
}
/* line 146, ../sass/_adminlte.scss */
/* line 151, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support {
float: left;
padding: 15px 15px;
border-right: solid 1px #e0e0e0;
color: #333;
}
/* line 152, ../sass/_adminlte.scss */
/* line 157, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support:hover {
text-decoration: none;
color: #F39C12;
}
/* line 158, ../sass/_adminlte.scss */
/* line 163, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .nav {
display: block;
}
/* line 162, ../sass/_adminlte.scss */
/* line 167, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a,
body.skin-black .main-header .navbar .navbar-right > li > a {
border-left: solid 1px #e0e0e0;
color: #333;
}
/* line 168, ../sass/_adminlte.scss */
/* line 173, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus,
body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus,
body.skin-black .main-header .navbar .nav > .active > a {
color: #F39C12;
}
/* line 174, ../sass/_adminlte.scss */
/* line 179, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .dropdown-menu {
-moz-box-shadow: 0px 0px 4px gray;
-webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray;
}
/* line 179, ../sass/_adminlte.scss */
/* line 184, ../sass/_adminlte.scss */
body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle {
border-right: solid 1px #e0e0e0;
}
/* line 183, ../sass/_adminlte.scss */
/* line 188, ../sass/_adminlte.scss */
body.skin-black .main-header .link-control-sidebar {
display: none;
}
/* line 188, ../sass/_adminlte.scss */
/* line 193, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu {
max-height: 300px;
}
/* line 191, ../sass/_adminlte.scss */
/* line 196, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a {
padding-top: 4px;
padding-bottom: 4px;
}
/* line 195, ../sass/_adminlte.scss */
/* line 200, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 {
margin-bottom: 2px;
}
/* line 198, ../sass/_adminlte.scss */
/* line 203, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 small {
float: right;
}
/* line 203, ../sass/_adminlte.scss */
/* line 208, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a p {
margin-left: 10px;
}
/* line 214, ../sass/_adminlte.scss */
/* line 219, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu {
width: 400px;
}
/* line 218, ../sass/_adminlte.scss */
/* line 223, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer {
margin: 10px;
width: 94%;
}
/* line 223, ../sass/_adminlte.scss */
/* line 228, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results {
display: none;
}
/* line 226, ../sass/_adminlte.scss */
/* line 231, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert {
margin-bottom: 0px;
margin-left: 10px;
margin-right: 10px;
padding: 15px 15px 10px 15px;
}
/* line 234, ../sass/_adminlte.scss */
/* line 239, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .label {
position: relative;
top: -2px;
left: 0px;
}
/* line 240, ../sass/_adminlte.scss */
/* line 245, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline {
color: #F39C12;
}
/* line 244, ../sass/_adminlte.scss */
/* line 249, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .offline {
display: none;
}
/* line 248, ../sass/_adminlte.scss */
/* line 253, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu a {
color: #333;
}
/* line 252, ../sass/_adminlte.scss */
/* line 257, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .producer-id {
position: relative;
top: 4px;
@@ -1786,100 +1790,100 @@ body.skin-black .main-header .navbar .nav li.producer-menu .producer-id {
font-size: 12px;
float: right;
}
/* line 263, ../sass/_adminlte.scss */
/* line 268, ../sass/_adminlte.scss */
body.skin-black .sidebar .sidebar-menu > li.header {
color: #899397;
}
/* line 267, ../sass/_adminlte.scss */
/* line 272, ../sass/_adminlte.scss */
body.skin-black .sidebar .label {
padding-top: 5px;
position: relative;
top: -3px;
}
/* line 274, ../sass/_adminlte.scss */
/* line 279, ../sass/_adminlte.scss */
body.skin-black .sidebar-menu > li.active > a {
border-color: #F39C12;
}
/* line 279, ../sass/_adminlte.scss */
/* line 284, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel {
text-align: center;
}
/* line 282, ../sass/_adminlte.scss */
/* line 287, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .image {
margin-bottom: 3px;
}
/* line 286, ../sass/_adminlte.scss */
/* line 291, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .title {
font-weight: bold;
color: white;
}
/* line 293, ../sass/_adminlte.scss */
/* line 298, ../sass/_adminlte.scss */
body.skin-black .content-wrapper {
background-color: #f5f5f5;
}
/* line 296, ../sass/_adminlte.scss */
/* line 301, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header {
background-color: #F5F5F5;
padding-bottom: 15px;
border-bottom: solid 1px #e0e0e0;
border-top: solid 1px #e0e0e0;
}
/* line 302, ../sass/_adminlte.scss */
/* line 307, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header .btn {
padding: 3px 6px;
font-size: 10px;
font-family: Arial;
text-transform: uppercase;
}
/* line 309, ../sass/_adminlte.scss */
/* line 314, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header h1 {
font-family: 'myriadpro-light';
font-size: 20px;
}
/* line 315, ../sass/_adminlte.scss */
/* line 320, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px;
}
/* line 319, ../sass/_adminlte.scss */
/* line 324, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px;
}
/* line 323, ../sass/_adminlte.scss */
/* line 328, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a {
color: #e08e0b;
}
/* line 326, ../sass/_adminlte.scss */
/* line 331, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a.disable {
pointer-events: none;
cursor: default;
}
/* line 332, ../sass/_adminlte.scss */
/* line 337, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label {
padding-top: 4px;
padding-bottom: 1px;
}
/* line 337, ../sass/_adminlte.scss */
/* line 342, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn {
color: white;
}
/* line 341, ../sass/_adminlte.scss */
/* line 346, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default {
color: #333;
background-color: white;
}
/* line 346, ../sass/_adminlte.scss */
/* line 351, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12;
color: white;
border-color: #F39C12;
}
/* line 353, ../sass/_adminlte.scss */
/* line 358, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px;
background-color: #e0e0e0;
color: #444;
}
/* line 360, ../sass/_adminlte.scss */
/* line 365, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd;
@@ -1887,20 +1891,20 @@ body.skin-black .content-wrapper .tab-content {
padding: 30px 15px 15px 15px;
background-color: white;
}
/* line 368, ../sass/_adminlte.scss */
/* line 373, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert {
position: relative;
}
/* line 371, ../sass/_adminlte.scss */
/* line 376, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a {
color: white;
}
/* line 374, ../sass/_adminlte.scss */
/* line 379, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn {
color: #333;
text-decoration: none;
}
/* line 379, ../sass/_adminlte.scss */
/* line 384, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close {
font-size: 30px;
position: absolute;
@@ -1910,83 +1914,83 @@ body.skin-black .content-wrapper .alert .close {
color: white;
opacity: 0.6;
}
/* line 388, ../sass/_adminlte.scss */
/* line 393, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover {
opacity: 1;
}
/* line 393, ../sass/_adminlte.scss */
/* line 398, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert.alert-dark {
background-color: #ece4d8;
color: black;
}
/* line 400, ../sass/_adminlte.scss */
/* line 405, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 {
font-size: 28px;
font-family: 'Source Sans Pro',sans-serif;
}
/* line 405, ../sass/_adminlte.scss */
/* line 410, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .icon {
top: -2px;
}
/* line 409, ../sass/_adminlte.scss */
/* line 414, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer {
color: white;
padding-top: 6px;
padding-bottom: 2px;
}
/* line 418, ../sass/_adminlte.scss */
/* line 423, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px;
}
/* line 421, ../sass/_adminlte.scss */
/* line 426, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a {
color: white;
}
/* line 424, ../sass/_adminlte.scss */
/* line 429, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn {
color: #333;
text-decoration: none;
}
/* line 431, ../sass/_adminlte.scss */
/* line 436, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th {
font-size: 13px;
}
/* line 434, ../sass/_adminlte.scss */
/* line 439, ../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 438, ../sass/_adminlte.scss */
/* line 443, ../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 442, ../sass/_adminlte.scss */
/* line 447, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td {
border: 1px solid #ddd;
}
/* line 451, ../sass/_adminlte.scss */
/* line 456, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
/* line 457, ../sass/_adminlte.scss */
/* line 462, ../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 463, ../sass/_adminlte.scss */
/* line 468, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12;
}
/* line 465, ../sass/_adminlte.scss */
/* line 470, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a;
}
/* line 470, ../sass/_adminlte.scss */
/* line 475, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu {
margin-bottom: 25px;
}
/* line 474, ../sass/_adminlte.scss */
/* line 479, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions {
position: fixed;
bottom: 0;
@@ -2000,71 +2004,71 @@ body.skin-black .content-wrapper .form-actions {
z-index: 10;
border-top: solid 1px #e0e0e0;
}
/* line 487, ../sass/_adminlte.scss */
/* line 492, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px;
}
/* line 492, ../sass/_adminlte.scss */
/* line 497, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons {
margin-top: 25px;
text-align: right;
}
/* line 499, ../sass/_adminlte.scss */
/* line 504, ../sass/_adminlte.scss */
body.skin-black .main-footer a {
color: #F39C12;
}
/* line 504, ../sass/_adminlte.scss */
/* line 509, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize {
float: right;
margin-bottom: 8px;
}
/* line 509, ../sass/_adminlte.scss */
/* line 514, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar {
bottom: 64px;
}

/* line 514, ../sass/_adminlte.scss */
/* line 519, ../sass/_adminlte.scss */
body.login-page {
background: none;
background-color: white;
}
/* line 518, ../sass/_adminlte.scss */
/* line 523, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo {
text-align: center;
font-family: 'worksans_bold';
}
/* line 522, ../sass/_adminlte.scss */
/* line 527, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img {
width: 150px;
}
/* line 528, ../sass/_adminlte.scss */
/* line 533, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body,
body.login-page .login-box .login-box-body input#loginform-email,
body.login-page .login-box .login-box-body input#loginform-password,
body.login-page .login-box .login-box-body .btn-primary {
font-size: 14px;
}
/* line 535, ../sass/_adminlte.scss */
/* line 540, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12;
border-color: #F39C12;
padding: 5px 10px;
margin-bottom: 15px;
}
/* line 541, ../sass/_adminlte.scss */
/* line 546, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a;
border-color: #F39C12;
}
/* line 547, ../sass/_adminlte.scss */
/* line 552, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a {
color: #F39C12;
}
/* line 549, ../sass/_adminlte.scss */
/* line 554, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover {
color: #f4a62a;
}
/* line 554, ../sass/_adminlte.scss */
/* line 559, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .checkbox label input {
position: relative;
top: 0px;

+ 5
- 0
backend/web/sass/_adminlte.scss Просмотреть файл

@@ -45,6 +45,11 @@ body.skin-black {
font-style: italic;
}

// Points de vente
.locality {
color: gray;
}

.main-header {

.dropdown-toggle::after {

+ 3
- 1
common/components/ActiveRecordCommon.php Просмотреть файл

@@ -92,7 +92,9 @@ class ActiveRecordCommon extends \yii\db\ActiveRecord
$pk = $class::tableName() . '.' . $pk[0];

if (isset($options['attribute_id_producer']) && strlen($options['attribute_id_producer'])
&& !isset($params[$options['attribute_id_producer']]) && !\Yii::$app->user->isGuest
&& !isset($params[$options['attribute_id_producer']])
&& !\Yii::$app->user->isGuest
&& !isset($options['ignore_id_producer'])
) {
$params[$options['attribute_id_producer']] = GlobalParam::getCurrentProducerId();
}

+ 1
- 0
domain/Order/Order/OrderSearch.php Просмотреть файл

@@ -53,6 +53,7 @@ class OrderSearch extends Order
}

$query = Order::searchQuery($paramsSearch, [
'ignore_id_producer' => true,
'orderby' => 'distribution.date DESC'
]);

+ 9
- 41
domain/Order/Order/OrderSolver.php Просмотреть файл

@@ -264,45 +264,6 @@ class OrderSolver extends AbstractService implements SolverInterface
return 'commande-create';
}

/**
* Retourne l'historique de la commande (ajoutée, modifiée, supprimée) au format HTML.
*/
//getStrHistory
public function getHistorySummary(Order $order): string
{
$arr = [
'class' => 'create',
'glyphicon' => 'plus',
'str' => 'Ajoutée',
'date' => $order->date
];

if (!is_null($order->date_update)) {
$arr = [
'class' => 'update',
'glyphicon' => 'pencil',
'str' => 'Modifiée',
'date' => $order->date_update
];
}
if ($this->isOrderStatusCanceled($order)) {
$arr = [
'class' => 'delete',
'glyphicon' => 'remove',
'str' => 'Annulée',
'date' => $this->getOrderStatusHistoryByOrderStatusAlias($order,OrderStatus::ALIAS_CANCELED)
->getDate()->format('Y-m-d H:i:s')
];
}

$html = '<div class="small"><span class="' . $arr['class'] . '">'
. '<span class="glyphicon glyphicon-' . $arr['glyphicon'] . '"></span> '
. $arr['str'] . '</span> le <strong>'
. date('d/m/Y à G\hi', strtotime($arr['date'])) . '</strong></div>';

return $html;
}

public function getPaymentLabelAmountRemainingSurplus(Order $order): string
{
$amountPaid = $this->getOrderAmountPaid($order);
@@ -327,12 +288,19 @@ class OrderSolver extends AbstractService implements SolverInterface
return '<br><span class="payment-detail-remaining-surplus">'.$text.'</span>';
}

public function getLabelOrderStatus(Order $order): string
public function getLabelOrderStatus(Order $order, bool $withDateLastOrderStatus = false): string
{
$orderStatusCssClass = $this->getOrderStatusCssClass($order);
$orderStatusLabel = $this->getOrderStatusLabel($order);
$orderStatusHistorySummaryTitleTag = $this->getOrderStatusHistorySummaryTitleTag($order);
return '<span class="label label-'.$orderStatusCssClass.'" title="'.$orderStatusHistorySummaryTitleTag.'">'.$orderStatusLabel.'</span>';
$html = '<span class="label label-'.$orderStatusCssClass.'" title="'.$orderStatusHistorySummaryTitleTag.'">'.$orderStatusLabel.'</span>';

$lastOrderStatusHistory = $this->getLastOrderStatusHistory($order);
if($withDateLastOrderStatus && $lastOrderStatusHistory) {
$html .= '<br /><span class="small gray">'.$lastOrderStatusHistory->getDate()->format('d/m/Y à H:i').'</span>';
}

return $html;
}

/**

Загрузка…
Отмена
Сохранить