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

parent 17c75ec6
......@@ -31,6 +31,10 @@ return [
'title' => 'Сводный отчет',
'type' => 'feed_stat',
'fields' => ['Views','Clicks','Orders','OrderSum'],
'main_cat' => [
['name' => 'date', 'title' => 'Дата', 'isSorted' => true],
//['name' => 'campaign','title' => 'Кампания','isSorted' => true]
],
'cats' => [
'Views' => 'Показы',
'Clicks' => 'Клики',
......@@ -43,6 +47,9 @@ return [
'title' => 'Транзакции',
'type' => 'feed_transactions',
'fields' => ['Views','Clicks','Orders','OrderSum'],
'main_cat' => [
['name' => 'order', 'title' => '#OrderID', 'isSorted' => false]
],
'cats' => [
'Timestamp' => 'Время<br />Дата',
'Basket' => 'Состав корзины',
......
......@@ -281,6 +281,14 @@ input[type="checkbox"]
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
......
......@@ -215,8 +215,8 @@ $(document).ready(function(){
//campaignStatsData = res.campaign;
periodStatsData = res;
dataLineChartStat = periodStatsData;
$('.main-cat').removeClass('selected');
$('.main-cat.date').addClass('selected');
//$('.main-cat').addClass('selected');
renderLineChart();
renderHourTable();
}
......
......@@ -65,6 +65,7 @@ if (!$error) {
$current_report = $this->current_report;
$report_conf = $this->report_conf;
$report_title = $report_conf['title'];
$report_main_cat = $report_conf['main_cat'];
$report_cats = $report_conf['cats'];
$reports_list = $this->reports_list;
$periods_list = $this->periods_list;
......@@ -176,13 +177,9 @@ if (!$error) {
<thead class="metric sortable">
<tr>
<th class="period" data-id="period">
<?php if($current_report == 'common'): ?>
<b class="main-cat date selected"><?= _t('Дата')?></b>
<?php /* ?>/ <b class="main-cat campaign"><?= _t('Кампания')?></b><?php */ ?>
<?php endif; ?>
<?php if($current_report == 'transaction'): ?>
<b class="main-cat date selected not-sorted"><?= _t('#OrderID')?></b>
<?php endif; ?>
<?php foreach($report_main_cat as $main_cat): ?>
<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 endforeach; ?>
</th>
<?php foreach($report_cats as $name => $title): ?>
<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