v5: общая статистика в таблице
This commit is contained in:
parent
cd67394286
commit
7fb4cac2e8
16
index.html
16
index.html
@ -106,6 +106,7 @@ tr:hover{background:#fff}
|
|||||||
<th>История заявок (№ заявки / № канала / Дата)</th>
|
<th>История заявок (№ заявки / № канала / Дата)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<tbody id="summaryRow"></tbody>
|
||||||
<tbody id="tableBody"></tbody>
|
<tbody id="tableBody"></tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -139,6 +140,21 @@ function formatPhone(phone) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderTable(clients) {
|
function renderTable(clients) {
|
||||||
|
// Добавляем строку с общей статистикой
|
||||||
|
const summaryRow = document.getElementById('summaryRow');
|
||||||
|
summaryRow.innerHTML = `
|
||||||
|
<tr style="background:var(--cyan-50);border-bottom:2px solid var(--ink)">
|
||||||
|
<td style="text-align:center;font-weight:700">📊</td>
|
||||||
|
<td colspan="2" style="font-weight:700">ИТОГО ПОВТОРНЫХ ОБРАЩЕНИЙ</td>
|
||||||
|
<td style="text-align:center;font-size:20px;font-weight:800;color:var(--red)">${clients.reduce((sum, c) => sum + c.total_requests, 0)}</td>
|
||||||
|
<td>
|
||||||
|
<div style="font-size:13px">Уникальных заявок: <strong>${data.total_unique_applications}</strong></div>
|
||||||
|
<div style="font-size:13px">Клиентов с повторами: <strong>${clients.length}</strong></div>
|
||||||
|
</td>
|
||||||
|
<td style="font-size:13px;color:var(--gray-500)">Все заявки показаны ниже в таблице</td>
|
||||||
|
</tr>
|
||||||
|
`;
|
||||||
|
|
||||||
const tbody = document.getElementById('tableBody');
|
const tbody = document.getElementById('tableBody');
|
||||||
tbody.innerHTML = '';
|
tbody.innerHTML = '';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user