Вынес в конфиг основнцю категорию отчетов

parent 17c75ec6
...@@ -31,6 +31,10 @@ return [ ...@@ -31,6 +31,10 @@ return [
'title' => 'Сводный отчет', 'title' => 'Сводный отчет',
'type' => 'feed_stat', 'type' => 'feed_stat',
'fields' => ['Views','Clicks','Orders','OrderSum'], 'fields' => ['Views','Clicks','Orders','OrderSum'],
'main_cat' => [
['name' => 'date', 'title' => 'Дата', 'isSorted' => true],
//['name' => 'campaign','title' => 'Кампания','isSorted' => true]
],
'cats' => [ 'cats' => [
'Views' => 'Показы', 'Views' => 'Показы',
'Clicks' => 'Клики', 'Clicks' => 'Клики',
...@@ -43,6 +47,9 @@ return [ ...@@ -43,6 +47,9 @@ return [
'title' => 'Транзакции', 'title' => 'Транзакции',
'type' => 'feed_transactions', 'type' => 'feed_transactions',
'fields' => ['Views','Clicks','Orders','OrderSum'], 'fields' => ['Views','Clicks','Orders','OrderSum'],
'main_cat' => [
['name' => 'order', 'title' => '#OrderID', 'isSorted' => false]
],
'cats' => [ 'cats' => [
'Timestamp' => 'Время<br />Дата', 'Timestamp' => 'Время<br />Дата',
'Basket' => 'Состав корзины', 'Basket' => 'Состав корзины',
......
...@@ -281,6 +281,14 @@ input[type="checkbox"] ...@@ -281,6 +281,14 @@ input[type="checkbox"]
font-weight: bold; font-weight: bold;
} }
.table.table-striped thead tr th.period b:after
{
content: " / ";
}
.table.table-striped thead tr th.period b:last-child:after
{
content: "";
}
.b-basket-content .b-basket-content
......
...@@ -215,8 +215,8 @@ $(document).ready(function(){ ...@@ -215,8 +215,8 @@ $(document).ready(function(){
//campaignStatsData = res.campaign; //campaignStatsData = res.campaign;
periodStatsData = res; periodStatsData = res;
dataLineChartStat = periodStatsData; dataLineChartStat = periodStatsData;
$('.main-cat').removeClass('selected');
$('.main-cat.date').addClass('selected'); //$('.main-cat').addClass('selected');
renderLineChart(); renderLineChart();
renderHourTable(); renderHourTable();
} }
......
...@@ -65,6 +65,7 @@ if (!$error) { ...@@ -65,6 +65,7 @@ if (!$error) {
$current_report = $this->current_report; $current_report = $this->current_report;
$report_conf = $this->report_conf; $report_conf = $this->report_conf;
$report_title = $report_conf['title']; $report_title = $report_conf['title'];
$report_main_cat = $report_conf['main_cat'];
$report_cats = $report_conf['cats']; $report_cats = $report_conf['cats'];
$reports_list = $this->reports_list; $reports_list = $this->reports_list;
$periods_list = $this->periods_list; $periods_list = $this->periods_list;
...@@ -176,13 +177,9 @@ if (!$error) { ...@@ -176,13 +177,9 @@ if (!$error) {
<thead class="metric sortable"> <thead class="metric sortable">
<tr> <tr>
<th class="period" data-id="period"> <th class="period" data-id="period">
<?php if($current_report == 'common'): ?> <?php foreach($report_main_cat as $main_cat): ?>
<b class="main-cat date selected"><?= _t('Дата')?></b> <b class="main-cat selected <?php if(!$main_cat['isSorted']): ?>not-sorted<?php endif; ?>" data-cat="<?= $main_cat['name'] ?>"><?= _t($main_cat['title'])?></b>
<?php /* ?>/ <b class="main-cat campaign"><?= _t('Кампания')?></b><?php */ ?> <?php endforeach; ?>
<?php endif; ?>
<?php if($current_report == 'transaction'): ?>
<b class="main-cat date selected not-sorted"><?= _t('#OrderID')?></b>
<?php endif; ?>
</th> </th>
<?php foreach($report_cats as $name => $title): ?> <?php foreach($report_cats as $name => $title): ?>
<th class="<?= $name ?>" data-id="<?= $name ?>"> <th class="<?= $name ?>" data-id="<?= $name ?>">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment