$tiller = new Tiller(); | $tiller = new Tiller(); | ||||
$json['tiller_is_synchro'] = (int)$tiller->isSynchro($date); | $json['tiller_is_synchro'] = (int)$tiller->isSynchro($date); | ||||
} | } | ||||
// abonnements manquants | |||||
$arraySubscriptions = Subscription::searchByDate($date); | |||||
$json['missing_subscriptions'] = [] ; | |||||
foreach ($arraySubscriptions as $subscription) { | |||||
if (!$subscription->hasOrderAlreadyExist($ordersArrayObject)) { | |||||
$json['missing_subscriptions'][] = [ | |||||
'username' => $subscription->getUsername() | |||||
] ; | |||||
} | |||||
} | |||||
} | } | ||||
return $json; | return $json; |
<div class="clr"></div> | <div class="clr"></div> | ||||
</div> | </div> | ||||
<div class="alert alert-danger" v-if="missingSubscriptions.length > 0"> | |||||
{{ missingSubscriptions.length }} abonnement<template v-if="missingSubscriptions.length > 1">s</template> manquant<template v-if="missingSubscriptions.length > 1">s</template> : | |||||
<ul> | |||||
<li v-for="subscription in missingSubscriptions">{{ subscription.username }}</li> | |||||
</ul> | |||||
</div> | |||||
<table class="table table-condensed table-bordered table-hover" v-if="countOrdersByPointSale[idActivePointSale] > 0 || (idActivePointSale == 0 && orders.length > 0)"> | <table class="table table-condensed table-bordered table-hover" v-if="countOrdersByPointSale[idActivePointSale] > 0 || (idActivePointSale == 0 && orders.length > 0)"> | ||||
<thead> | <thead> | ||||
<tr> | <tr> |
tillerIsSynchro: false, | tillerIsSynchro: false, | ||||
checkboxSelectAllOrders: false, | checkboxSelectAllOrders: false, | ||||
messageGenerateDeliveryNoteDisplayed: false, | messageGenerateDeliveryNoteDisplayed: false, | ||||
missingSubscriptions: false, | |||||
calendar: { | calendar: { | ||||
mode: 'single', | mode: 'single', | ||||
attrs: [], | attrs: [], | ||||
app.initCountActiveProducts() ; | app.initCountActiveProducts() ; | ||||
app.meansPayment = response.data.means_payment ; | app.meansPayment = response.data.means_payment ; | ||||
app.oneDistributionWeekActive = response.data.one_distribution_week_active ; | app.oneDistributionWeekActive = response.data.one_distribution_week_active ; | ||||
app.missingSubscriptions = response.data.missing_subscriptions ; | |||||
app.countOrders = 0 ; | app.countOrders = 0 ; | ||||
if(response.data.orders) { | if(response.data.orders) { | ||||
app.orders = JSON.parse(JSON.stringify(response.data.orders)) ; | app.orders = JSON.parse(JSON.stringify(response.data.orders)) ; |
} | } | ||||
} | } | ||||
public function getUsername() | |||||
{ | |||||
if($this->user) { | |||||
return $this->user->getUsername() ; | |||||
} | |||||
return $this->username ; | |||||
} | |||||
} | } |