Преглед на файлове

Page Abonnements

- cacher l'app pendant le chargement
- style points de vente / produits
- index : ordre des colonnes dans la table
dev
Guillaume Bourgeois преди 5 години
родител
ревизия
78905cd034
променени са 6 файла, в които са добавени 79 реда и са изтрити 48 реда
  1. +3
    -2
      common/models/SubscriptionSearch.php
  2. +5
    -1
      producer/views/layouts/main.php
  3. +1
    -1
      producer/views/subscription/_form.php
  4. +18
    -18
      producer/views/subscription/index.php
  5. +37
    -21
      producer/web/css/screen.css
  6. +15
    -5
      producer/web/sass/subscription/_form.scss

+ 3
- 2
common/models/SubscriptionSearch.php Целия файл

@@ -61,8 +61,9 @@ class SubscriptionSearch extends Subscription
$query = Subscription::find()
->with($optionsSearch['with'])
->innerJoinWith($optionsSearch['join_with'], true)
->where(['subscription.id_producer' => Producer::getId()])
->joinWith($optionsSearch['join_with'], true)
->where(['subscription.id_producer' => Producer::getId()])
->groupBy('subscription.id')
;
$dataProvider = new \yii\data\ActiveDataProvider([

+ 5
- 1
producer/views/layouts/main.php Целия файл

@@ -151,7 +151,11 @@ if(!Yii::$app->user->isGuest) {
$credit = ' <span class="label label-'.$labelType.'">'.number_format($userProducer->credit, 2).' €</span>' ;
}
$countSubcriptions = Subscription::searchCount(['subscription.id_user' => User::getCurrentId()]) ;
$countSubcriptions = Subscription::find()
->where([
'subscription.id_user' => User::getCurrentId(),
'subscription.id_producer' => Producer::getId(),
])->count() ;
$labelSubscription = $countSubcriptions > 0 ? 'success' : 'default' ;
$countOrders = Order::find()

+ 1
- 1
producer/views/subscription/_form.php Целия файл

@@ -46,7 +46,7 @@ use common\models\PointSale ;

?>

<div class="subscription-form" id="app-subscription-form">
<div class="subscription-form" id="app-subscription-form" :class="{'loaded': !loading}">
<form @submit.prevent="formSubmit()" v-show="loading == false">

+ 18
- 18
producer/views/subscription/index.php Целия файл

@@ -77,12 +77,20 @@ $columns = [
}
],
[
'attribute' => 'date_begin',
'label' => 'Date de début',
'format' => 'raw',
'attribute' => 'week_frequency',
'filter' => [
1 => 'Toutes les semaines',
2 => 'Toutes les 2 semaines',
3 => 'Toutes les 3 semaines',
4 => 'Tous les mois'],
'value' => function($model) {
$html = date('d/m/Y',strtotime($model->date_begin)) ;
return $html ;
if($model->week_frequency == 1) {
return 'Toutes les semaines' ;
}
else {
return 'Toutes les '.$model->week_frequency.' semaines' ;
}

}
],
[
@@ -132,20 +140,12 @@ $columns = [
}
],
[
'attribute' => 'week_frequency',
'filter' => [
1 => 'Toutes les semaines',
2 => 'Toutes les 2 semaines',
3 => 'Toutes les 3 semaines',
4 => 'Tous les mois'],
'attribute' => 'date_begin',
'label' => 'Date de début',
'format' => 'raw',
'value' => function($model) {
if($model->week_frequency == 1) {
return 'Toutes les semaines' ;
}
else {
return 'Toutes les '.$model->week_frequency.' semaines' ;
}

$html = date('d/m/Y',strtotime($model->date_begin)) ;
return $html ;
}
],
] ;

+ 37
- 21
producer/web/css/screen.css Целия файл

@@ -1487,44 +1487,61 @@ termes.
color: gray;
}

/* line 7, ../sass/subscription/_form.scss */
/* line 4, ../sass/subscription/_form.scss */
.subscription-create .subscription-form,
.subscription-update .subscription-form {
display: none;
}
/* line 8, ../sass/subscription/_form.scss */
.subscription-create .subscription-form.loaded,
.subscription-update .subscription-form.loaded {
display: block;
}
/* line 13, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .points-sale .locality,
.subscription-update .subscription-form .points-sale .locality {
color: gray;
}
/* line 10, ../sass/subscription/_form.scss */
/* line 16, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .points-sale label,
.subscription-update .subscription-form .points-sale label {
cursor: pointer;
}
/* line 16, ../sass/subscription/_form.scss */
/* line 22, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .days .form-group,
.subscription-update .subscription-form .days .form-group {
float: left;
margin-right: 15px;
}
/* line 26, ../sass/subscription/_form.scss */
/* line 31, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .points-sale table tr.selected td,
.subscription-update .subscription-form .points-sale table tr.selected td {
background-color: white;
}
/* line 31, ../sass/subscription/_form.scss */
/* line 36, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .points-sale table .the-name,
.subscription-update .subscription-form .points-sale table .the-name {
font-family: "capsuularegular";
font-size: 20px;
color: black;
}
/* line 42, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .points-sale table .block-code,
.subscription-update .subscription-form .points-sale table .block-code {
width: 150px;
}
/* line 35, ../sass/subscription/_form.scss */
/* line 46, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .points-sale table .actions,
.subscription-update .subscription-form .points-sale table .actions {
width: 150px;
}
/* line 38, ../sass/subscription/_form.scss */
/* line 49, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .points-sale table .actions button,
.subscription-update .subscription-form .points-sale table .actions button {
width: 100%;
display: block;
}
/* line 47, ../sass/subscription/_form.scss */
/* line 58, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products .monday, .subscription-create .subscription-form .products .tuesday, .subscription-create .subscription-form .products .wednesday, .subscription-create .subscription-form .products .thursday,
.subscription-create .subscription-form .products .friday, .subscription-create .subscription-form .products .saturday, .subscription-create .subscription-form .products .sunday, .subscription-create .subscription-form .products .no-day,
.subscription-update .subscription-form .products .monday,
@@ -1537,7 +1554,7 @@ termes.
.subscription-update .subscription-form .products .no-day {
display: none;
}
/* line 52, ../sass/subscription/_form.scss */
/* line 63, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products .monday-active .monday,
.subscription-create .subscription-form .products .tuesday-active .tuesday,
.subscription-create .subscription-form .products .wednesday-active .wednesday,
@@ -1554,47 +1571,46 @@ termes.
.subscription-update .subscription-form .products .sunday-active .sunday {
display: block;
}
/* line 62, ../sass/subscription/_form.scss */
/* line 73, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products td.quantity,
.subscription-update .subscription-form .products td.quantity {
width: 150px;
}
/* line 65, ../sass/subscription/_form.scss */
/* line 76, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products td.quantity input,
.subscription-update .subscription-form .products td.quantity input {
text-align: center;
}
/* line 68, ../sass/subscription/_form.scss */
/* line 79, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products td.quantity input.has-quantity,
.subscription-update .subscription-form .products td.quantity input.has-quantity {
font-weight: bold;
}
/* line 74, ../sass/subscription/_form.scss */
/* line 85, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products .name,
.subscription-update .subscription-form .products .name {
font-family: "comfortaalight";
font-weight: bold;
text-transform: uppercase;
font-size: 18px;
font-family: "capsuularegular";
font-size: 20px;
color: black;
}
/* line 81, ../sass/subscription/_form.scss */
/* line 91, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products .description,
.subscription-update .subscription-form .products .description {
font-style: italic;
}
/* line 85, ../sass/subscription/_form.scss */
/* line 95, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products .recipe,
.subscription-update .subscription-form .products .recipe {
font-size: 12px;
}
/* line 89, ../sass/subscription/_form.scss */
/* line 99, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products .price-unit, .subscription-create .subscription-form .products .price-total,
.subscription-update .subscription-form .products .price-unit,
.subscription-update .subscription-form .products .price-total {
text-align: center;
width: 150px;
}
/* line 94, ../sass/subscription/_form.scss */
/* line 104, ../sass/subscription/_form.scss */
.subscription-create .subscription-form .products tr.total .price-total,
.subscription-update .subscription-form .products tr.total .price-total {
text-align: center;

+ 15
- 5
producer/web/sass/subscription/_form.scss Целия файл

@@ -3,6 +3,12 @@
.subscription-update {
.subscription-form {
display: none ;
&.loaded {
display: block ;
}
.points-sale {
.locality {
color: gray ;
@@ -21,13 +27,18 @@
.points-sale {
table {
tr.selected {
td {
background-color: $color2 ;
}
}
.the-name {
font-family: 'capsuularegular' ;
font-size: 20px ;
color: black ;
}
.block-code {
width: 150px ;
}
@@ -72,10 +83,9 @@
}
.name {
font-family: "comfortaalight" ;
font-weight: bold ;
text-transform: uppercase ;
font-size: 18px ;
font-family: "capsuularegular" ;
font-size: 20px ;
color: black ;
}

.description {

Loading…
Отказ
Запис