|
|
@@ -42,94 +42,99 @@ $this->setTitle('Rapports') ; |
|
|
|
$this->addBreadcrumb('Rapports') ; |
|
|
|
|
|
|
|
?> |
|
|
|
<div id="app-report-index"> |
|
|
|
<div id="parameters" class="col-md-6"> |
|
|
|
<div id="nav-sections-report"> |
|
|
|
<a v-for="section in sections" :class="'btn-section btn '+(currentSection == section.id ? 'btn-primary' : 'btn-default')" @click="changeSection(section)"><span :class="'fa '+section.icon"></span> {{ section.name }}<span v-if="currentSection == section.id"> <span class="glyphicon glyphicon-triangle-bottom"></span></span></a> |
|
|
|
</div> |
|
|
|
<div id="section-users" class="panel panel-default section" v-show="currentSection == 'users'"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="wrapper-search-user"> |
|
|
|
<span class="glyphicon glyphicon-search"></span> |
|
|
|
<input type="text" class="form-control" id="input-search-user" placeholder="Rechercher" v-model="termSearchUser" /> |
|
|
|
</div> |
|
|
|
<div class="content-max-height"> |
|
|
|
<ul id="list-users"> |
|
|
|
<li v-for="user in usersArray" v-if="!termSearchUser.length || (termSearchUser.length && (user.lastname.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 || user.name.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 ))"> |
|
|
|
<input type="checkbox" :id="'user_'+user.user_id" v-model="user.checked" /> |
|
|
|
<label :for="'user_'+user.user_id" v-html="user.lastname+' '+user.name"></label> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
<div id="app-report-index" class="app-vuejs"> |
|
|
|
<div id="loading" v-if="showLoading"> |
|
|
|
<img src="<?= Yii::$app->urlManagerBackend->getBaseUrl(); ?>/img/loader.gif" alt="Chargement ..." /> |
|
|
|
</div> |
|
|
|
<div id="wrapper-app-report-index" :class="'wrapper-app-vuejs '+(showLoading ? '' : 'loaded')"> |
|
|
|
<div id="parameters" class="col-md-6"> |
|
|
|
<div id="nav-sections-report"> |
|
|
|
<a v-for="section in sections" :class="'btn-section btn '+(currentSection == section.id ? 'btn-primary' : 'btn-default')" @click="changeSection(section)"><span :class="'fa '+section.icon"></span> {{ section.name }}<span v-if="currentSection == section.id"> <span class="glyphicon glyphicon-triangle-bottom"></span></span></a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="section-points-sale" class="panel panel-default section" v-show="currentSection == 'points-sale'"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div class="content-max-height"> |
|
|
|
<ul class="list" id="list-points-sale"> |
|
|
|
<li v-for="pointSale in pointsSaleArray"> |
|
|
|
<input type="checkbox" :id="'pointsale_'+pointSale.id" v-model="pointSale.checked" /> |
|
|
|
<label :for="'pointsale_'+pointSale.id" v-html="pointSale.name"></label> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
<div id="section-users" class="panel panel-default section" v-show="currentSection == 'users'"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="wrapper-search-user"> |
|
|
|
<span class="glyphicon glyphicon-search"></span> |
|
|
|
<input type="text" class="form-control" id="input-search-user" placeholder="Rechercher" v-model="termSearchUser" /> |
|
|
|
</div> |
|
|
|
<div class="content-max-height"> |
|
|
|
<ul id="list-users"> |
|
|
|
<li v-for="user in usersArray" v-if="!termSearchUser.length || (termSearchUser.length && (user.lastname.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 || user.name.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 ))"> |
|
|
|
<input type="checkbox" :id="'user_'+user.user_id" v-model="user.checked" /> |
|
|
|
<label :for="'user_'+user.user_id" v-html="user.lastname+' '+user.name"></label> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="section-distributions" class="panel panel-default section" v-show="currentSection == 'distributions'"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="wrapper-select-year"> |
|
|
|
<select class="form-control" v-model="distributionYear"> |
|
|
|
<option v-for="year in distributionYearsArray">{{ year }}</option> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div class="content-max-height"> |
|
|
|
<div class="distribution-month" v-for="distributionsMonth in distributionsByMonthArray" v-if="distributionsMonth.year == distributionYear && distributionsMonth.distributions.length > 0"> |
|
|
|
<a class="btn btn-default link-month-distribution" @click="distributionsMonth.display = !distributionsMonth.display">{{ distributionsMonth.month }} <span class="glyphicon glyphicon-menu-down"></span></a> |
|
|
|
<ul v-if="distributionsMonth.display"> |
|
|
|
<li v-for="distribution in distributionsMonth.distributions"> |
|
|
|
<input type="checkbox" :id="'distribution_'+distribution.id" v-model="distribution.checked" /> |
|
|
|
<label :for="'distribution_'+distribution.id">{{ distribution.date }}</label> |
|
|
|
<div id="section-points-sale" class="panel panel-default section" v-show="currentSection == 'points-sale'"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div class="content-max-height"> |
|
|
|
<ul class="list" id="list-points-sale"> |
|
|
|
<li v-for="pointSale in pointsSaleArray"> |
|
|
|
<input type="checkbox" :id="'pointsale_'+pointSale.id" v-model="pointSale.checked" /> |
|
|
|
<label :for="'pointsale_'+pointSale.id" v-html="pointSale.name"></label> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-6"> |
|
|
|
<div id="report" class="panel panel-default"> |
|
|
|
<div class="panel-heading"> |
|
|
|
<h2 class="panel-title">Rapport</h2> |
|
|
|
</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="summary"> |
|
|
|
<div class="alert alert-info" v-if="!countUsers() && !countPointsSale() && !countDistributions()"> |
|
|
|
Veuillez sélectionner un utilisateur et/ou un point de vente et/ou une distribution. |
|
|
|
</div> |
|
|
|
<div class="section" v-if="countUsers() > 0"> |
|
|
|
<h3><span class="fa fa-users"></span> {{ countUsers() }} Utilisateurs</h3> |
|
|
|
<template v-for="user in usersArray" v-if="user.checked"> |
|
|
|
<span v-html="user.name+' '+user.lastname"></span><span class="comma">, </span> |
|
|
|
</template> |
|
|
|
<div id="section-distributions" class="panel panel-default section" v-show="currentSection == 'distributions'"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="wrapper-select-year"> |
|
|
|
<select class="form-control" v-model="distributionYear"> |
|
|
|
<option v-for="year in distributionYearsArray">{{ year }}</option> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div class="section" v-if="countPointsSale() > 0"> |
|
|
|
<h3><span class="fa fa-map-marker"></span> {{ countPointsSale() }} Points de vente</h3> |
|
|
|
<template v-for="pointSale in pointsSaleArray" v-if="pointSale.checked"> |
|
|
|
<span v-html="pointSale.name"></span><span class="comma">, </span> |
|
|
|
</template> |
|
|
|
<div class="content-max-height"> |
|
|
|
<div class="distribution-month" v-for="distributionsMonth in distributionsByMonthArray" v-if="distributionsMonth.year == distributionYear && distributionsMonth.distributions.length > 0"> |
|
|
|
<a class="btn btn-default link-month-distribution" @click="distributionsMonth.display = !distributionsMonth.display">{{ distributionsMonth.month }} <span class="glyphicon glyphicon-menu-down"></span></a> |
|
|
|
<ul v-if="distributionsMonth.display"> |
|
|
|
<li v-for="distribution in distributionsMonth.distributions"> |
|
|
|
<input type="checkbox" :id="'distribution_'+distribution.id" v-model="distribution.checked" /> |
|
|
|
<label :for="'distribution_'+distribution.id">{{ distribution.date }}</label> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="section" v-if="countDistributions() > 0"> |
|
|
|
<h3><span class="fa fa-calendar"></span> {{ countDistributions() }} Distributions</h3> |
|
|
|
<template v-for="distributionsMonth in distributionsByMonthArray"> |
|
|
|
<template v-for="distribution in distributionsMonth.distributions" v-if="distribution.checked"> |
|
|
|
<span v-html="distribution.date"></span><span class="comma">, </span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-6"> |
|
|
|
<div id="report" class="panel panel-default"> |
|
|
|
<div class="panel-heading"> |
|
|
|
<h2 class="panel-title">Rapport</h2> |
|
|
|
</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<div id="summary"> |
|
|
|
<div class="alert alert-info" v-if="!countUsers() && !countPointsSale() && !countDistributions()"> |
|
|
|
Veuillez sélectionner un utilisateur et/ou un point de vente et/ou une distribution. |
|
|
|
</div> |
|
|
|
<div class="section" v-if="countUsers() > 0"> |
|
|
|
<h3><span class="fa fa-users"></span> {{ countUsers() }} Utilisateurs</h3> |
|
|
|
<template v-for="user in usersArray" v-if="user.checked"> |
|
|
|
<span v-html="user.name+' '+user.lastname"></span><span class="comma">, </span> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
<div class="section" v-if="countPointsSale() > 0"> |
|
|
|
<h3><span class="fa fa-map-marker"></span> {{ countPointsSale() }} Points de vente</h3> |
|
|
|
<template v-for="pointSale in pointsSaleArray" v-if="pointSale.checked"> |
|
|
|
<span v-html="pointSale.name"></span><span class="comma">, </span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
<div class="section" v-if="countDistributions() > 0"> |
|
|
|
<h3><span class="fa fa-calendar"></span> {{ countDistributions() }} Distributions</h3> |
|
|
|
<template v-for="distributionsMonth in distributionsByMonthArray"> |
|
|
|
<template v-for="distribution in distributionsMonth.distributions" v-if="distribution.checked"> |
|
|
|
<span v-html="distribution.date"></span><span class="comma">, </span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="report" v-if="countUsers() || countPointsSale() || countDistributions()"> |
|
|
|
<a href="#" class="btn btn-primary">Générer</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="report" v-if="countUsers() || countPointsSale() || countDistributions()"> |
|
|
|
<a href="#" class="btn btn-primary">Générer</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |