Browse Source

[Boutique] Commander : calendrier affiché même si aucune distribution à venir

feature/rotating_product
Guillaume Bourgeois 7 months ago
parent
commit
da3351352f
2 changed files with 7 additions and 13 deletions
  1. +6
    -12
      producer/views/order/order.php
  2. +1
    -1
      producer/web/js/vuejs/order-order.js

+ 6
- 12
producer/views/order/order.php View File

@@ -79,7 +79,7 @@ $this->setTitle('Commander');
</div>
</div>
<div class="wrapper">
<div v-if="!loadingInit && distributions.length == 0" class="alert alert-warning">
<div v-if="!loadingInit && !pointSaleActive && distributions.length == 0" class="alert alert-warning">
Aucune distribution à venir chez ce producteur.
</div>
<div v-else>
@@ -128,14 +128,6 @@ $this->setTitle('Commander');
{{ countProductOrdered() }} produit{{ (countProductOrdered() > 1) ? 's' : '' }}
</div>
</li>
<!--<li id="step-payment" :class="'col-md-3 '+((step == 'payment') ? 'active' : '')">
<button @click="changeStep('payment')"
:class="'btn '+ (step == 'payment' ? 'btn-primary' : 'btn-secondary')"
:disabled="step == 'date' || step == 'point-sale' || step == 'products'">
<span class="button-content"><span
class="glyphicon glyphicon-ok"></span> Confirmation</span>
</button>
</li>-->
</ul>
<div class="clr"></div>
</div>
@@ -160,13 +152,15 @@ $this->setTitle('Commander');
</div>
<transition name="slide">
<div id="content-step-date" v-if="step == 'date'">
<div v-if="!loading">
<div v-if="!loading && pointSaleActive && distributions.length == 0" class="alert alert-warning">
Aucune distribution à venir sur ce point de vente.
</div>
<div v-else-if="!loading">
<?php if ($producer->behavior_order_select_distribution == Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST): ?>
<div style="display:none ;">
<?php endif; ?>
<div id="legend">
<div><span id="distribution-date-color"></span> Prochains jours de distribution
</div>
<div><span id="distribution-date-color"></span> Prochains jours de distribution</div>
<div><span id="order-date-color"></span> Vos commandes déjà enregistrées</div>
</div>
<div id="calendar">

+ 1
- 1
producer/web/js/vuejs/order-order.js View File

@@ -145,8 +145,8 @@ var app = new Vue({
app.calendar.availableDates = [];

var distributions = response.data.distributions;
app.distributions = distributions;
if (distributions.length) {
app.distributions = distributions;
var arrayDate;
var highlightStyle = {
style: {

Loading…
Cancel
Save