Browse Source

Correction bug date de dernière connexion

prodstable
keun 7 years ago
parent
commit
a801f9f06e
20 changed files with 293 additions and 181 deletions
  1. +2
    -13
      backend/controllers/BackendController.php
  2. +1
    -1
      backend/controllers/PaiementController.php
  3. +4
    -1
      backend/controllers/SiteController.php
  4. +12
    -3
      backend/views/site/index.php
  5. BIN
      backend/web/.sass-cache/c8fef7d48da4dc7f024edc2b0fada9d8d6de5dac/screen.scssc
  6. +175
    -146
      backend/web/css/screen.css
  7. +32
    -1
      backend/web/sass/screen.scss
  8. +22
    -0
      common/controllers/CommonController.php
  9. +6
    -13
      common/models/Commande.php
  10. +5
    -0
      common/models/User.php
  11. +3
    -0
      environments/demo/backend/web/index.php
  12. +3
    -0
      environments/demo/frontend/web/index.php
  13. +1
    -0
      environments/dev/backend/web/index.php
  14. +1
    -0
      environments/dev/frontend/web/index.php
  15. +3
    -0
      environments/prod/backend/web/index.php
  16. +3
    -0
      environments/prod/frontend/web/index.php
  17. +2
    -1
      frontend/controllers/CommandeController.php
  18. +14
    -0
      frontend/controllers/FrontendController.php
  19. +2
    -1
      frontend/controllers/SiteController.php
  20. +2
    -1
      frontend/controllers/UserController.php

+ 2
- 13
backend/controllers/BackendController.php View File

@@ -3,22 +3,11 @@
namespace backend\controllers;

use yii ;
use common\models\Etablissement ;
use common\controllers\CommonController ;

class BackendController extends \yii\web\Controller
class BackendController extends CommonController
{
public function beforeAction($event)
{
if(!Yii::$app->user->isGuest &&
(Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_ESSAI_TERMINE ||
Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_RETARD))
{
$this->redirect(['paiement/index']) ;
}
return parent::beforeAction($event);
}
}


+ 1
- 1
backend/controllers/PaiementController.php View File

@@ -15,7 +15,7 @@ use c006\paypal_ipn\PayPal_Ipn;
/**
* ProduitController implements the CRUD actions for Produit model.
*/
class PaiementController extends Controller
class PaiementController extends BackendController
{
var $enableCsrfValidation = false ;

+ 4
- 1
backend/controllers/SiteController.php View File

@@ -88,9 +88,12 @@ class SiteController extends BackendController
// dernières commandes
$commandes = Commande::findBy([
'type' => Commande::TYPE_USER,
'orderby' => 'date DESC',
'limit' => 15
'limit' => 15,
'condition' => 'commande.date > \''.date('Y-m-d 00:00:00').'\''
]) ;
foreach($commandes as $c)
$c->init() ;

+ 12
- 3
backend/views/site/index.php View File

@@ -197,7 +197,7 @@ $this->title = 'Tableau de bord';
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Dernières commandes
Dernières commandes clients
</h3>
</div>
<div class="panel-body">
@@ -215,8 +215,17 @@ $this->title = 'Tableau de bord';
<tbody>
<?php foreach($commandes as $c): ?>
<tr>
<td><?= date('d/m/Y', strtotime($c->production->date)) ?></td>
<td><?= $c->getStrUser(); ?></td>
<td class="date">
<div class="bloc-date">
<div class="jour"><?= strftime('%A', strtotime($c->production->date)) ?></div>
<div class="num"><?= date('d', strtotime($c->production->date)) ?></div>
<div class="mois"><?= strftime('%B', strtotime($c->production->date)) ?></div>
</div>
</td>
<td>
<?= $c->getStrUser(); ?><br />
<span class="small">Le <?= date('d/m/Y à G\hi', strtotime($c->date)) ?></span>
</td>
<td><?= $c->getResumePanier() ; ?></td>
<td><?= $c->getResumePointVente() ; ?></td>
<td><?= $c->getStrMontant() ; ?></td>

BIN
backend/web/.sass-cache/c8fef7d48da4dc7f024edc2b0fada9d8d6de5dac/screen.scssc View File


+ 175
- 146
backend/web/css/screen.css View File

@@ -326,7 +326,7 @@ a:hover, a:focus, a:active {
margin-left: 5px;
}
/* line 287, ../sass/screen.scss */
.site-index #dernieres-commandes .localite {
.site-index #dernieres-commandes .small, .site-index #dernieres-commandes .localite {
font-size: 12px;
color: gray;
}
@@ -334,23 +334,52 @@ a:hover, a:focus, a:active {
.site-index #dernieres-commandes .commentaire {
font-size: 12px;
}
/* line 297, ../sass/screen.scss */
/* line 295, ../sass/screen.scss */
.site-index #dernieres-commandes .date {
text-align: center;
}
/* line 298, ../sass/screen.scss */
.site-index #dernieres-commandes .date .bloc-date {
width: 50%;
margin: 0px auto;
padding-top: 0px;
}
/* line 306, ../sass/screen.scss */
.site-index #dernieres-commandes .date .jour {
text-transform: capitalize;
line-height: 13px;
font-size: 10px;
text-transform: uppercase;
}
/* line 313, ../sass/screen.scss */
.site-index #dernieres-commandes .date .num {
font-size: 23px;
line-height: 28px;
font-weight: bold;
}
/* line 319, ../sass/screen.scss */
.site-index #dernieres-commandes .date .mois {
text-transform: uppercase;
line-height: 13px;
font-size: 15px;
}
/* line 328, ../sass/screen.scss */
.site-index #facturation h2 {
font-size: 25px;
text-align: center;
}
/* line 303, ../sass/screen.scss */
/* line 334, ../sass/screen.scss */
.site-index #facturation .mois-en-cours .montant span {
background-color: white;
color: #333;
border: solid 1px gray;
}
/* line 310, ../sass/screen.scss */
/* line 341, ../sass/screen.scss */
.site-index #facturation .montant {
margin-top: 35px;
text-align: center;
}
/* line 313, ../sass/screen.scss */
/* line 344, ../sass/screen.scss */
.site-index #facturation .montant span {
font-size: 22px;
color: white;
@@ -362,84 +391,84 @@ a:hover, a:focus, a:active {
border-radius: 5px;
}

/* line 333, ../sass/screen.scss */
/* line 364, ../sass/screen.scss */
#page-commande h1 .btn-group {
float: right;
}
/* line 338, ../sass/screen.scss */
/* line 369, ../sass/screen.scss */
#page-commande #col-left, #page-commande #col-right {
padding-left: 0px;
padding-right: 0px;
}
/* line 342, ../sass/screen.scss */
/* line 373, ../sass/screen.scss */
#page-commande #col-right {
padding-left: 20px;
}
/* line 346, ../sass/screen.scss */
/* line 377, ../sass/screen.scss */
#page-commande #jours-production {
display: none;
}
/* line 352, ../sass/screen.scss */
/* line 383, ../sass/screen.scss */
#page-commande #calendar h2 {
font-size: 20px;
position: relative;
top: 3px;
}
/* line 358, ../sass/screen.scss */
/* line 389, ../sass/screen.scss */
#page-commande #calendar .fc-header-title {
margin-left: 10px;
}
/* line 364, ../sass/screen.scss */
/* line 395, ../sass/screen.scss */
#page-commande #calendar .dayWithEvent {
background-color: #fee48d;
cursor: pointer;
}
/* line 368, ../sass/screen.scss */
/* line 399, ../sass/screen.scss */
#page-commande #calendar .fc-event-container {
display: none;
}
/* line 369, ../sass/screen.scss */
/* line 400, ../sass/screen.scss */
#page-commande #calendar .fc-today {
border-bottom: solid 1px #C9302C;
background-color: white;
}
/* line 373, ../sass/screen.scss */
/* line 404, ../sass/screen.scss */
#page-commande #calendar .fc-today.dayWithEvent {
background-color: #fee48d;
}
/* line 378, ../sass/screen.scss */
/* line 409, ../sass/screen.scss */
#page-commande #calendar .fc-day {
cursor: pointer;
text-align: center;
}
/* line 381, ../sass/screen.scss */
/* line 412, ../sass/screen.scss */
#page-commande #calendar .fc-day:hover {
-moz-box-shadow: 0px 0px 2px black inset;
-webkit-box-shadow: 0px 0px 2px black inset;
box-shadow: 0px 0px 2px black inset;
}
/* line 386, ../sass/screen.scss */
/* line 417, ../sass/screen.scss */
#page-commande #calendar .current-date {
-moz-box-shadow: 0px 0px 2px black inset;
-webkit-box-shadow: 0px 0px 2px black inset;
box-shadow: 0px 0px 2px black inset;
}
/* line 390, ../sass/screen.scss */
/* line 421, ../sass/screen.scss */
#page-commande #calendar .fc-day-number {
float: none;
padding-top: 2px;
}
/* line 398, ../sass/screen.scss */
/* line 429, ../sass/screen.scss */
#page-commande #bloc-production .label {
float: right;
font-size: 13px;
}
/* line 403, ../sass/screen.scss */
/* line 434, ../sass/screen.scss */
#page-commande #bloc-production .btn-success {
background-color: #5cb85c;
border-color: #4cae4c;
}
/* line 408, ../sass/screen.scss */
/* line 439, ../sass/screen.scss */
#page-commande #bloc-production #productions-point-vente {
margin-top: 15px;
padding: 10px;
@@ -449,76 +478,76 @@ a:hover, a:focus, a:active {
-webkit-border-radius: 5px;
border-radius: 5px;
}
/* line 414, ../sass/screen.scss */
/* line 445, ../sass/screen.scss */
#page-commande #bloc-production #productions-point-vente label {
display: block;
font-weight: normal;
}
/* line 419, ../sass/screen.scss */
/* line 450, ../sass/screen.scss */
#page-commande #bloc-production #productions-point-vente .checkbox-list {
margin-left: 10px;
margin-top: 10px;
}
/* line 432, ../sass/screen.scss */
/* line 463, ../sass/screen.scss */
#page-commande #produits-production .overflow table {
width: 100%;
}
/* line 436, ../sass/screen.scss */
/* line 467, ../sass/screen.scss */
#page-commande #produits-production .overflow thead, #page-commande #produits-production .overflow tbody, #page-commande #produits-production .overflow tr, #page-commande #produits-production .overflow td, #page-commande #produits-production .overflow th {
display: block;
}
/* line 438, ../sass/screen.scss */
/* line 469, ../sass/screen.scss */
#page-commande #produits-production .overflow tr:after {
content: ' ';
display: block;
visibility: hidden;
clear: both;
}
/* line 445, ../sass/screen.scss */
/* line 476, ../sass/screen.scss */
#page-commande #produits-production .overflow thead th {
height: 30px;
/*text-align: left;*/
}
/* line 451, ../sass/screen.scss */
/* line 482, ../sass/screen.scss */
#page-commande #produits-production .overflow tbody {
height: 500px;
overflow-y: auto;
}
/* line 459, ../sass/screen.scss */
/* line 490, ../sass/screen.scss */
#page-commande #produits-production .overflow thead th {
width: 32%;
float: left;
}
/* line 464, ../sass/screen.scss */
/* line 495, ../sass/screen.scss */
#page-commande #produits-production .overflow tbody td {
width: 33%;
float: left;
}
/* line 469, ../sass/screen.scss */
/* line 500, ../sass/screen.scss */
#page-commande #produits-production .overflow .td-produit {
width: 60%;
}
/* line 472, ../sass/screen.scss */
/* line 503, ../sass/screen.scss */
#page-commande #produits-production .overflow .td-actif, #page-commande #produits-production .overflow .td-max {
width: 20%;
text-align: center;
}
/* line 478, ../sass/screen.scss */
/* line 509, ../sass/screen.scss */
#page-commande #produits-production .overflow thead .td-produit {
width: 57%;
}
/* line 484, ../sass/screen.scss */
/* line 515, ../sass/screen.scss */
#page-commande #produits-production input.quantite-max {
background-color: white;
border: 1px solid #e0e0e0;
text-align: center;
width: 50px;
}
/* line 492, ../sass/screen.scss */
/* line 523, ../sass/screen.scss */
#page-commande #produits-production td label {
font-weight: normal;
}
/* line 498, ../sass/screen.scss */
/* line 529, ../sass/screen.scss */
#page-commande #btn-export-commandes,
#page-commande #btn-commande-auto {
float: right;
@@ -527,30 +556,30 @@ a:hover, a:focus, a:active {
right: -7px;
padding: 2px 5px;
}
/* line 507, ../sass/screen.scss */
/* line 538, ../sass/screen.scss */
#page-commande #btn-export-commandes {
color: white;
margin-left: 10px;
padding: 1px 5px;
}
/* line 515, ../sass/screen.scss */
/* line 546, ../sass/screen.scss */
#page-commande #bloc-totaux .table-produits .depasse {
color: #b32815;
}
/* line 519, ../sass/screen.scss */
/* line 550, ../sass/screen.scss */
#page-commande #bloc-totaux .table-produits .total strong span {
font-weight: normal;
font-size: 13px;
}
/* line 528, ../sass/screen.scss */
/* line 559, ../sass/screen.scss */
#page-commande #commandes-points-vente .tab-pane {
padding-top: 20px;
}
/* line 535, ../sass/screen.scss */
/* line 566, ../sass/screen.scss */
#page-commande #commandes-points-vente .recap-pv.no-commande .recettes {
display: none;
}
/* line 539, ../sass/screen.scss */
/* line 570, ../sass/screen.scss */
#page-commande #commandes-points-vente .recap-pv .recettes {
float: right;
color: #BB8757;
@@ -563,11 +592,11 @@ a:hover, a:focus, a:active {
position: relative;
top: -3px;
}
/* line 553, ../sass/screen.scss */
/* line 584, ../sass/screen.scss */
#page-commande #commandes-points-vente .alert.commentaire {
display: none;
}
/* line 557, ../sass/screen.scss */
/* line 588, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes {
margin-top: 10px;
list-style-type: none;
@@ -579,16 +608,16 @@ a:hover, a:focus, a:active {
width: 100%;
overflow-y: scroll;
}
/* line 569, ../sass/screen.scss */
/* line 600, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes.no-commande {
display: none;
}
/* line 573, ../sass/screen.scss */
/* line 604, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li {
padding: 0;
margin: 0;
}
/* line 576, ../sass/screen.scss */
/* line 607, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a {
text-align: left;
-moz-border-radius: 0px;
@@ -598,22 +627,22 @@ a:hover, a:focus, a:active {
padding: 7px;
color: #333;
}
/* line 584, ../sass/screen.scss */
/* line 615, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a .montant {
float: right;
color: #BB8757;
font-weight: bold;
}
/* line 589, ../sass/screen.scss */
/* line 620, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a .montant.paye {
color: #5cb85c;
color: #519951;
}
/* line 595, ../sass/screen.scss */
/* line 626, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a .glyphicon-comment {
color: #BB8757;
}
/* line 599, ../sass/screen.scss */
/* line 630, ../sass/screen.scss */
#page-commande #commandes-points-vente ul.liste-commandes li a:hover, #page-commande #commandes-points-vente ul.liste-commandes li a:active, #page-commande #commandes-points-vente ul.liste-commandes li a.active {
text-decoration: none;
background-color: #FCF8E3;
@@ -624,82 +653,82 @@ a:hover, a:focus, a:active {
-webkit-transition: all 0.1s;
transition: all 0.1s;
}
/* line 613, ../sass/screen.scss */
/* line 644, ../sass/screen.scss */
#page-commande #commandes-points-vente .creer-commande,
#page-commande #commandes-points-vente .commandes-auto {
width: 100%;
margin-bottom: 10px;
}
/* line 619, ../sass/screen.scss */
/* line 650, ../sass/screen.scss */
#page-commande #commandes-points-vente .bloc-commande {
padding-top: 20px;
margin-top: 20px;
display: none;
}
/* line 625, ../sass/screen.scss */
/* line 656, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user {
display: none;
font-size: 19px;
margin-top: 0px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/* line 631, ../sass/screen.scss */
/* line 662, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-remove,
#page-commande #commandes-points-vente .title-user .btn-cancel, #page-commande #commandes-points-vente .title-user .btn-save {
float: right;
position: relative;
top: -6px;
}
/* line 638, ../sass/screen.scss */
/* line 669, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-cancel {
margin-right: 10px;
}
/* line 642, ../sass/screen.scss */
/* line 673, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .buttons-save-cancel {
display: none;
}
/* line 646, ../sass/screen.scss */
/* line 677, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .choix-user {
display: none;
}
/* line 649, ../sass/screen.scss */
/* line 680, ../sass/screen.scss */
#page-commande #commandes-points-vente .title-user .choix-user .form-control {
width: 200px;
display: inline;
}
/* line 657, ../sass/screen.scss */
/* line 688, ../sass/screen.scss */
#page-commande #commandes-points-vente table.table-produits .td-commande {
text-align: center;
}
/* line 660, ../sass/screen.scss */
/* line 691, ../sass/screen.scss */
#page-commande #commandes-points-vente table.table-produits input.form-control {
text-align: center;
}
/* line 666, ../sass/screen.scss */
/* line 697, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-produit,
#page-commande #commandes-points-vente .th-produit {
width: 70%;
}
/* line 671, ../sass/screen.scss */
/* line 702, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-commande,
#page-commande #commandes-points-vente .th-commande {
width: 30%;
text-align: center;
}
/* line 677, ../sass/screen.scss */
/* line 708, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-produit {
text-transform: uppercase;
}
/* line 681, ../sass/screen.scss */
/* line 712, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-commande {
font-weight: bold;
}
/* line 685, ../sass/screen.scss */
/* line 716, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-total {
font-size: 18px;
text-align: center;
}
/* line 689, ../sass/screen.scss */
/* line 720, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-total span {
padding: 2px 10px;
background-color: #BB8757;
@@ -709,33 +738,33 @@ a:hover, a:focus, a:active {
-webkit-border-radius: 8px;
border-radius: 8px;
}
/* line 699, ../sass/screen.scss */
/* line 730, ../sass/screen.scss */
#page-commande #commandes-points-vente .td-paiement .buttons-credit {
float: right;
}
/* line 705, ../sass/screen.scss */
/* line 736, ../sass/screen.scss */
#page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_user,
#page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_etablissement {
display: none;
}
/* line 712, ../sass/screen.scss */
/* line 743, ../sass/screen.scss */
#page-commande #commandes-points-vente .panel-commande-automatique .jours .form-group {
float: left;
margin-right: 10px;
}
/* line 721, ../sass/screen.scss */
/* line 752, ../sass/screen.scss */
#page-commande #old-commandes {
display: none;
}
/* line 725, ../sass/screen.scss */
/* line 756, ../sass/screen.scss */
#page-commande .form-commandes-point-vente {
margin-top: 20px;
}
/* line 729, ../sass/screen.scss */
/* line 760, ../sass/screen.scss */
#page-commande .form-commandes-point-vente table {
border-bottom: solid 1px #e0e0e0;
}
/* line 733, ../sass/screen.scss */
/* line 764, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .title-point-vente {
background-color: #fff8e2;
border-left: solid 3px #BB8757;
@@ -743,76 +772,76 @@ a:hover, a:focus, a:active {
text-align: left;
padding: 10px;
}
/* line 741, ../sass/screen.scss */
/* line 772, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .title-totaux {
text-align: center;
}
/* line 745, ../sass/screen.scss */
/* line 776, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .border-left {
border-left: solid 1px #e0e0e0;
}
/* line 749, ../sass/screen.scss */
/* line 780, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .border-right {
border-right: solid 1px #e0e0e0;
}
/* line 753, ../sass/screen.scss */
/* line 784, ../sass/screen.scss */
#page-commande .form-commandes-point-vente input.quantite {
width: 30px;
background-color: white;
border: solid 1px #e0e0e0;
text-align: center;
}
/* line 761, ../sass/screen.scss */
/* line 792, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .td-produit {
text-align: center;
}
/* line 765, ../sass/screen.scss */
/* line 796, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .submit-pv {
float: right;
}
/* line 769, ../sass/screen.scss */
/* line 800, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .select-user {
background-color: #F9F9F9;
border: solid 1px #e0e0e0;
}
/* line 774, ../sass/screen.scss */
/* line 805, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .date-commande {
font-size: 12px;
}
/* line 778, ../sass/screen.scss */
/* line 809, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .datepicker, #page-commande .form-commandes-point-vente .text {
background-color: white;
border: solid 1px #e0e0e0;
margin-top: 3px;
width: 100px;
}
/* line 786, ../sass/screen.scss */
/* line 817, ../sass/screen.scss */
#page-commande .form-commandes-point-vente td.center {
text-align: center;
}
/* line 792, ../sass/screen.scss */
/* line 823, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .depasse {
color: #b32815;
}
/* line 796, ../sass/screen.scss */
/* line 827, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .total strong span {
font-weight: normal;
font-size: 13px;
}
/* line 801, ../sass/screen.scss */
/* line 832, ../sass/screen.scss */
#page-commande .form-commandes-point-vente .vrac {
display: none;
}
/* line 805, ../sass/screen.scss */
/* line 836, ../sass/screen.scss */
#page-commande .form-commandes-point-vente td.client {
text-align: left;
padding: 3px;
}
/* line 808, ../sass/screen.scss */
/* line 839, ../sass/screen.scss */
#page-commande .form-commandes-point-vente td.client .date-commande {
color: gray;
}
/* line 815, ../sass/screen.scss */
/* line 846, ../sass/screen.scss */
#page-commande .table-header-rotated {
border-top: 0px;
border-left: 0px;
@@ -820,15 +849,15 @@ a:hover, a:focus, a:active {
width: 100%;
width: auto;
}
/* line 822, ../sass/screen.scss */
/* line 853, ../sass/screen.scss */
#page-commande .table-header-rotated .total strong {
border-bottom: solid 1px gray;
}
/* line 827, ../sass/screen.scss */
/* line 858, ../sass/screen.scss */
#page-commande .table-header-rotated th.row-header {
width: auto;
}
/* line 831, ../sass/screen.scss */
/* line 862, ../sass/screen.scss */
#page-commande .table-header-rotated td {
width: 40px;
border-top: 1px solid #dddddd;
@@ -837,7 +866,7 @@ a:hover, a:focus, a:active {
vertical-align: middle;
text-align: center;
}
/* line 840, ../sass/screen.scss */
/* line 871, ../sass/screen.scss */
#page-commande .table-header-rotated th.rotate-45 {
font-weight: normal;
height: 80px;
@@ -851,7 +880,7 @@ a:hover, a:focus, a:active {
line-height: 1;
border: 0px none;
}
/* line 854, ../sass/screen.scss */
/* line 885, ../sass/screen.scss */
#page-commande .table-header-rotated th.rotate-45 > div {
background-color: #F5F5F5;
position: relative;
@@ -869,7 +898,7 @@ a:hover, a:focus, a:active {
border-right: 1px solid #dddddd;
border-top: 1px solid #dddddd;
}
/* line 871, ../sass/screen.scss */
/* line 902, ../sass/screen.scss */
#page-commande .table-header-rotated th.rotate-45 span {
-ms-transform: skew(45deg, 0deg) rotate(315deg);
-moz-transform: skew(45deg, 0deg) rotate(315deg);
@@ -887,51 +916,51 @@ a:hover, a:focus, a:active {
text-align: left;
}

/* line 892, ../sass/screen.scss */
/* line 923, ../sass/screen.scss */
#email-masse-form #ids-users {
line-height: 30px;
}
/* line 894, ../sass/screen.scss */
/* line 925, ../sass/screen.scss */
#email-masse-form #ids-users .label {
text-transform: capitalize;
}

/* line 902, ../sass/screen.scss */
/* line 933, ../sass/screen.scss */
.produit-create #jours-production .form-group, .produit-update #jours-production .form-group {
float: left;
margin-right: 15px;
}
/* line 906, ../sass/screen.scss */
/* line 937, ../sass/screen.scss */
.produit-create #jours-production .form-group label, .produit-update #jours-production .form-group label {
font-weight: normal;
}
/* line 911, ../sass/screen.scss */
/* line 942, ../sass/screen.scss */
.produit-create .field-produit-id_etablissement, .produit-update .field-produit-id_etablissement {
display: none;
}

/* line 916, ../sass/screen.scss */
/* line 947, ../sass/screen.scss */
.table-striped > tbody > tr:nth-of-type(2n) {
background-color: white;
}

/* line 921, ../sass/screen.scss */
/* line 952, ../sass/screen.scss */
.wrap .produit-index .td-photo {
max-width: 100px;
width: 100px;
}
/* line 925, ../sass/screen.scss */
/* line 956, ../sass/screen.scss */
.wrap .produit-index .photo-produit {
max-width: 100px;
}
/* line 929, ../sass/screen.scss */
/* line 960, ../sass/screen.scss */
.wrap .produit-index .ui-state-highlight {
height: 75px;
background-color: #F8F1DD;
}

/* communiquer */
/* line 937, ../sass/screen.scss */
/* line 968, ../sass/screen.scss */
.communiquer-mode-emploi {
border: solid 1px #e0e0e0;
padding: 10px;
@@ -941,18 +970,18 @@ a:hover, a:focus, a:active {
margin-bottom: 30px;
font-family: "myriadpro-regular";
}
/* line 945, ../sass/screen.scss */
/* line 976, ../sass/screen.scss */
.communiquer-mode-emploi .header .logo {
float: left;
width: 75px;
padding-right: 20px;
padding-top: 10px;
}
/* line 951, ../sass/screen.scss */
/* line 982, ../sass/screen.scss */
.communiquer-mode-emploi .header .logo img {
width: 75px;
}
/* line 957, ../sass/screen.scss */
/* line 988, ../sass/screen.scss */
.communiquer-mode-emploi .header h1 {
font-family: "comfortaaregular";
font-size: 40px;
@@ -960,7 +989,7 @@ a:hover, a:focus, a:active {
margin-bottom: 0px;
font-weight: normal;
}
/* line 965, ../sass/screen.scss */
/* line 996, ../sass/screen.scss */
.communiquer-mode-emploi .header h2 {
margin-top: 0px;
font-family: "myriadpro-regular";
@@ -970,7 +999,7 @@ a:hover, a:focus, a:active {
left: 2px;
font-weight: normal;
}
/* line 976, ../sass/screen.scss */
/* line 1007, ../sass/screen.scss */
.communiquer-mode-emploi h3 {
font-family: "comfortaalight";
font-family: "myriadpro-regular";
@@ -980,45 +1009,45 @@ a:hover, a:focus, a:active {
margin-bottom: 0px;
}

/* line 986, ../sass/screen.scss */
/* line 1017, ../sass/screen.scss */
.communiquer-mode-emploi-encart {
width: 420px;
margin-top: 20px;
}
/* line 990, ../sass/screen.scss */
/* line 1021, ../sass/screen.scss */
.communiquer-mode-emploi-encart .header .logo {
width: 60px;
margin-right: 20px;
padding-top: 5px;
}
/* line 995, ../sass/screen.scss */
/* line 1026, ../sass/screen.scss */
.communiquer-mode-emploi-encart .header .logo img {
width: 60px;
}
/* line 1001, ../sass/screen.scss */
/* line 1032, ../sass/screen.scss */
.communiquer-mode-emploi-encart .header h1 {
margin-bottom: 3px;
}
/* line 1010, ../sass/screen.scss */
/* line 1041, ../sass/screen.scss */
.communiquer-mode-emploi-encart h3 {
margin-top: 15px;
margin-bottom: 15px;
}

/* line 1016, ../sass/screen.scss */
/* line 1047, ../sass/screen.scss */
.bloc-mode-emploi-pdf {
width: 49.9%;
float: left;
border-bottom: dotted 1px gray;
}

/* line 1022, ../sass/screen.scss */
/* line 1053, ../sass/screen.scss */
.bloc-mode-emploi-border {
border-right: dotted 1px gray;
border-bottom: dotted 1px gray;
}

/* line 1027, ../sass/screen.scss */
/* line 1058, ../sass/screen.scss */
.communiquer-mode-emploi-pdf {
border: 0px none;
-moz-border-radius: 0px;
@@ -1027,118 +1056,118 @@ a:hover, a:focus, a:active {
margin-bottom: 0px;
padding: 20px 0px 20px 30px;
}
/* line 1035, ../sass/screen.scss */
/* line 1066, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header .logo {
float: left;
width: 55px;
padding-right: 15px;
padding-top: 10px;
}
/* line 1041, ../sass/screen.scss */
/* line 1072, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header .logo img {
width: 55px;
}
/* line 1045, ../sass/screen.scss */
/* line 1076, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header h1 {
font-size: 32px;
}
/* line 1048, ../sass/screen.scss */
/* line 1079, ../sass/screen.scss */
.communiquer-mode-emploi-pdf .header h2 {
font-size: 16px;
}
/* line 1053, ../sass/screen.scss */
/* line 1084, ../sass/screen.scss */
.communiquer-mode-emploi-pdf h3 {
font-weight: normal;
}

/* line 1058, ../sass/screen.scss */
/* line 1089, ../sass/screen.scss */
.bloc-mode-emploi-bottom {
border-bottom: 0px none;
border-bottom: solid 1px white;
}

/* commandes auto */
/* line 1068, ../sass/screen.scss */
/* line 1099, ../sass/screen.scss */
.commandeauto-form #bloc-select-user {
padding-left: 0px;
}
/* line 1072, ../sass/screen.scss */
/* line 1103, ../sass/screen.scss */
.commandeauto-form #or-user {
font-size: 20px;
text-align: center;
}
/* line 1075, ../sass/screen.scss */
/* line 1106, ../sass/screen.scss */
.commandeauto-form #or-user span {
position: relative;
top: 24px;
}
/* line 1081, ../sass/screen.scss */
/* line 1112, ../sass/screen.scss */
.commandeauto-form .field-commandeautoform-id_etablissement {
display: none;
}
/* line 1085, ../sass/screen.scss */
/* line 1116, ../sass/screen.scss */
.commandeauto-form .jours .form-group {
float: left;
margin-right: 20px;
}
/* line 1092, ../sass/screen.scss */
/* line 1123, ../sass/screen.scss */
.commandeauto-form .produits .table {
width: 500px;
}
/* line 1095, ../sass/screen.scss */
/* line 1126, ../sass/screen.scss */
.commandeauto-form .produits .quantite {
text-align: center;
}

/* points de vente */
/* line 1104, ../sass/screen.scss */
/* line 1135, ../sass/screen.scss */
.point-vente-form #pointvente-users {
display: none;
height: 500px;
overflow-y: scroll;
}
/* line 1108, ../sass/screen.scss */
/* line 1139, ../sass/screen.scss */
.point-vente-form #pointvente-users label {
font-weight: normal;
display: block;
}
/* line 1112, ../sass/screen.scss */
/* line 1143, ../sass/screen.scss */
.point-vente-form #pointvente-users .commentaire {
display: none;
margin-left: 17px;
width: 200px;
}
/* line 1120, ../sass/screen.scss */
/* line 1151, ../sass/screen.scss */
.point-vente-form #jours-livraison .form-group {
float: left;
margin-right: 15px;
}
/* line 1124, ../sass/screen.scss */
/* line 1155, ../sass/screen.scss */
.point-vente-form #jours-livraison .form-group label {
font-weight: normal;
}

/* utilisateurs */
/* line 1134, ../sass/screen.scss */
/* line 1165, ../sass/screen.scss */
.user-index .input-group {
width: 180px;
}
/* line 1137, ../sass/screen.scss */
/* line 1168, ../sass/screen.scss */
.user-index .input-group .input-credit {
text-align: center;
}

/* facturation */
/* line 1145, ../sass/screen.scss */
/* line 1176, ../sass/screen.scss */
#estimation-facture {
padding: 20px;
background-color: #F9F9F9;
}
/* line 1149, ../sass/screen.scss */
/* line 1180, ../sass/screen.scss */
#estimation-facture h2 {
font-family: "myriadpro-it";
}
/* line 1153, ../sass/screen.scss */
/* line 1184, ../sass/screen.scss */
#estimation-facture .montant span {
font-size: 25px;
color: white;
@@ -1150,17 +1179,17 @@ a:hover, a:focus, a:active {
padding-top: 7px;
font-family: "myriadpro-regular";
}
/* line 1164, ../sass/screen.scss */
/* line 1195, ../sass/screen.scss */
#estimation-facture label {
text-transform: uppercase;
font-family: "myriadpro-light";
font-size: 20px;
}
/* line 1169, ../sass/screen.scss */
/* line 1200, ../sass/screen.scss */
#estimation-facture label span {
font-size: 16px;
}
/* line 1174, ../sass/screen.scss */
/* line 1205, ../sass/screen.scss */
#estimation-facture #etablissement-prix_libre {
width: 100px;
height: 60px;

+ 32
- 1
backend/web/sass/screen.scss View File

@@ -284,13 +284,44 @@ a {
}
#dernieres-commandes {
.localite {
.small, .localite {
font-size: 12px ;
color: gray ;
}
.commentaire {
font-size: 12px ;
}
.date {
text-align: center ;
.bloc-date {
width: 50% ;
margin: 0px auto ;
padding-top: 0px ;
}
.jour {
text-transform: capitalize ;
line-height: 13px ;
font-size: 10px ;
text-transform: uppercase ;
}
.num {
font-size: 23px ;
line-height: 28px ;
font-weight: bold ;
}
.mois {
text-transform: uppercase ;
line-height: 13px ;
font-size: 15px ;
}
}
}
#facturation {

+ 22
- 0
common/controllers/CommonController.php View File

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

namespace common\controllers;

use yii ;

class CommonController extends \yii\web\Controller
{
public function beforeAction($event)
{
if(!Yii::$app->user->isGuest)
{
Yii::$app->user->identity->updateDerniereConnexion() ;
}
return parent::beforeAction($event);
}
}

?>

+ 6
- 13
common/models/Commande.php View File

@@ -355,7 +355,6 @@ class Commande extends \yii\db\ActiveRecord
public static function findBy($params = [])
{
if(!isset($params['id_etablissement']))
$params['id_etablissement'] = Yii::$app->user->identity->id_etablissement ;
@@ -364,25 +363,19 @@ class Commande extends \yii\db\ActiveRecord
->joinWith(['production','user'])
->where(['production.id_etablissement' => $params['id_etablissement']]) ;
if(isset($params['condition']))
$commandes = $commandes->andWhere($params['condition']);
if(isset($params['date']))
$commandes = $commandes->andWhere(['production.date' => $params['date']]);
/*$orderby = 'date' ;
if(isset($params['orderby']))
$orderby = $params['orderby'] ;
if(isset($params['order']))
$commandes = $commandes->orderBy($orderby.' '.$params['order']);
else
$commandes = $commandes->orderBy($orderby.' ASC');*/
if(isset($params['type']))
$commandes = $commandes->andWhere(['commande.type' => $params['type']]);
if(isset($params['orderby']))
{
$commandes = $commandes->orderBy($params['orderby']);
}
else {
else
$commandes = $commandes->orderBy('date ASC');
}
if(isset($params['limit']))
$commandes = $commandes->limit($params['limit']) ;

+ 5
- 0
common/models/User.php View File

@@ -380,4 +380,9 @@ class User extends ActiveRecord implements IdentityInterface
return 0 ;
}
public function updateDerniereConnexion() {
$this->date_derniere_connexion = date('Y-m-d H:i:s') ;
$this->save() ;
}
}

+ 3
- 0
environments/demo/backend/web/index.php View File

@@ -17,5 +17,8 @@ $config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main-local.php')
);

date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config);
$application->run();

+ 3
- 0
environments/demo/frontend/web/index.php View File

@@ -17,5 +17,8 @@ $config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main-local.php')
);

date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config);
$application->run();

+ 1
- 0
environments/dev/backend/web/index.php View File

@@ -20,5 +20,6 @@ $config = yii\helpers\ArrayHelper::merge(
$application = new yii\web\Application($config);

date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application->run();

+ 1
- 0
environments/dev/frontend/web/index.php View File

@@ -20,5 +20,6 @@ $config = yii\helpers\ArrayHelper::merge(
$application = new yii\web\Application($config);

date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application->run();

+ 3
- 0
environments/prod/backend/web/index.php View File

@@ -17,5 +17,8 @@ $config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main-local.php')
);

date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config);
$application->run();

+ 3
- 0
environments/prod/frontend/web/index.php View File

@@ -17,5 +17,8 @@ $config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../config/main-local.php')
);

date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, 'fr_FR.utf8','fra');

$application = new yii\web\Application($config);
$application->run();

+ 2
- 1
frontend/controllers/CommandeController.php View File

@@ -19,8 +19,9 @@ use common\models\CreditHistorique ;
use yii\web\NotFoundHttpException ;
use common\models\ProductionPointVente ;
use yii\base\UserException ;
use frontend\controllers\FrontendController;

class CommandeController extends \yii\web\Controller {
class CommandeController extends FrontendController {

public function behaviors() {
return [

+ 14
- 0
frontend/controllers/FrontendController.php View File

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

namespace frontend\controllers;

use yii ;
use common\controllers\CommonController ;

class FrontendController extends CommonController
{
}

?>

+ 2
- 1
frontend/controllers/SiteController.php View File

@@ -15,6 +15,7 @@ use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use yii\helpers\Html;
use frontend\controllers\FrontendController;

use dosamigos\leaflet\types\LatLng;
use dosamigos\leaflet\layers\Marker;
@@ -26,7 +27,7 @@ use dosamigos\leaflet\widgets\Map;
/**
* Site controller
*/
class SiteController extends Controller
class SiteController extends FrontendController
{
/**
* @inheritdoc

+ 2
- 1
frontend/controllers/UserController.php View File

@@ -9,11 +9,12 @@ use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use frontend\controllers\FrontendController;

/**
* UserController implements the CRUD actions for User model.
*/
class UserController extends Controller
class UserController extends FrontendController
{
public function behaviors()
{

Loading…
Cancel
Save