stats for festivals

This commit is contained in:
ty kayn 2019-06-12 15:36:14 +02:00
parent be87086536
commit 52f3b775c2
2 changed files with 6 additions and 5 deletions

View File

@ -22,9 +22,9 @@
var dataPointsFestivals = [
{% for pair in statisticsFestivals %}
{
label: "{{ pair.date|date('Y-m-d') }}",
label: "{{ pair.name }} {{ pair.date|date('Y-m-d') }} , {{ pair.chiffreAffaire }}",
y: {{ pair.chiffreAffaire }} ,
countClients : {{ pair.clients_count }}
countClients : "{{ pair.clients_count }} clients"
},
{% endfor %}
];
@ -37,7 +37,7 @@
data: [
{
// Change type to "doughnut", "line", "splineArea", etc.
type: "line",
type: "column",
dataPoints: dataPointsFestivals
}
]

View File

@ -344,7 +344,7 @@ class DefaultController extends Controller
// ['name' => 'bidule', 'count' => 0, 'value' => 0],
];
$statsForFestival = [
$statsForFestivalMock = [
['name' => 'festoche bidule', 'clients_count' => 125, 'chiffreAffaire' => 236, 'date' => new \DateTime()],
];
foreach ($allSellingList as $client) {
@ -373,7 +373,8 @@ class DefaultController extends Controller
return $this->render('logged/history.html.twig',
[
'statisticsFestivals' => $statsForFestival,
// 'statisticsFestivals' => $statsForFestivalMock, // mock of festival stats
'statisticsFestivals' => $statisticsFestivals,
'statisticsSoldProducts' => $statisticsSoldProducts,
'chiffreAffaires' => $chiffreAffaires,
'recentSells' => $mySellings,