Преглед изворни кода

[Administration] Distributions > Synchronisation Tiller : activation uniquement le jour des distribution

feature/souke
Guillaume Bourgeois пре 11 месеци
родитељ
комит
64e554e05a
2 измењених фајлова са 12 додато и 0 уклоњено
  1. +5
    -0
      backend/views/distribution/index.php
  2. +7
    -0
      backend/web/js/vuejs/distribution-index.js

+ 5
- 0
backend/views/distribution/index.php Прегледај датотеку

@@ -294,6 +294,11 @@ $this->setPageTitle('Distributions') ;
<button id="btn-add-subscriptions" @click="addSubscriptions" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span> Importer les abonnements</button>
<template v-if="producer && producer.tiller == true">
<button v-if="tillerIsSynchro" id="btn-tiller" class="btn btn-success btn-xs" disabled><span class="glyphicon glyphicon-refresh"></span> Synchronisé avec Tiller</button>
<template v-else-if="!isDistributionToday()">
<span data-toggle="tooltip" data-placement="top" data-original-title="Synchronisation possible uniquement le jour de la distribution">
<button id="btn-tiller" class="btn btn-xs btn-default" disabled><span class="glyphicon glyphicon-refresh"></span> Synchroniser avec Tiller</button>
</span>
</template>
<button v-else id="btn-tiller" class="btn btn-xs btn-default" @click="synchroTiller"><span class="glyphicon glyphicon-refresh"></span> Synchroniser avec Tiller</button>
</template>
<button v-if="producer && producer.credit" id="btn-pay-orders" class="btn btn-default btn-xs" @click="payOrders"><span class="glyphicon glyphicon-euro"></span> Débiter les commandes</button>

+ 7
- 0
backend/web/js/vuejs/distribution-index.js Прегледај датотеку

@@ -150,6 +150,13 @@ var app = new Vue({
}
return false;
},
isDistributionToday: function() {
var today = new Date();
return this.date
&& today.getFullYear() == this.date.getFullYear()
&& today.getMonth() == this.date.getMonth()
&& today.getDay() == this.date.getDay();
},
init: function (idActivePointSale) {
var app = this;
this.showLoading = true;

Loading…
Откажи
Сачувај