diff --git a/index.html b/index.html
index a50a544..31e0204 100644
--- a/index.html
+++ b/index.html
@@ -202,6 +202,7 @@ function renderAn(){
var all=ev||[],done=all.filter(function(e){return e.s==="done"}),late=all.filter(function(e){return e.s==="late"}),warn=all.filter(function(e){return e.s==="warn"}),wait=all.filter(function(e){return e.s==="wait"});
var dp=all.length?Math.round(done.length/all.length*100):0;
var h="
"+done.length+"
Исполнено ("+dp+"%)
"+warn.length+"
В процессе
"+late.length+"
Просрочено
";
+ h+="";
// Chart
h+="Динамика по кварталам
Q1 фактQ2 прогнозQ3 планQ4 цель
";
// Branch ranking
@@ -220,7 +221,12 @@ function nu(){var all=ev||[],n=[],now=new Date();all.forEach(function(e){if(e.s=
document.getElementById("nc").textContent=n.length;document.getElementById("nc").style.display=n.length?"inline-block":"none";
document.getElementById("nd").innerHTML=n.length?n.map(function(x){return""+x.c+" "+esc(x.m)+"Срок: "+x.t+"
"}).join(""):"Нет уведомлений
"}
-// ===== REPORTS =====
+function dAnCSV(){var all=ev||[],csv="\uFEFF№;Филиал;Мероприятие;Подпункты;Раздел;Статус;Прогресс;Срок;Осталось;Факт;Описание\n";all.forEach(function(e){var rep="";var d=getMD(e.id,-1);for(var k in d)if(d.hasOwnProperty(k)&&d[k]&&d[k].report)rep+=d[k].report.replace(/"/g,'""')+"; ";csv+=e.id+";"+br[e.b]+";\""+e.t.replace(/"/g,'""')+"\";"+(e.sub?e.sub.length:"—")+";"+sec[e.sec]+";"+st[e.s]+";"+e.p+"%;"+e.due+";"+daysLeft(e).replace(/<[^>]*>/g,"")+";"+(e.done||"—")+";\""+rep+"\"\n"});var a=document.createElement("a");a.href=URL.createObjectURL(new Blob([csv]));a.download="analitika.csv";a.click()}
+
+function dAnHTML(){var all=ev||[];var h="Аналитика ПБ📊 Аналитика ПБ — все мероприятия
Сформирован: "+new Date().toLocaleDateString()+"
| № | Мероприятие | Подпункты | Филиал | Раздел | Статус | Срок | Осталось | Факт |
";
+ all.forEach(function(e){var cl=e.s==="done"?"done":e.s==="late"?"late":"";h+="| "+e.id+" | "+esc(e.t)+" | "+(e.sub?e.sub.length:"—")+" | "+esc(br[e.b])+" | "+sec[e.sec]+" | "+st[e.s]+" | "+e.due+" | "+daysLeft(e).replace(/<[^>]*>/g,"")+" | "+(e.done||"—")+" |
"});
+ h+="
";
+ try{var a=document.createElement("a");a.href=URL.createObjectURL(new Blob(["\uFEFF"+h],{type:"text/html"}));a.download="analitika.html";a.click()}catch(e){alert("Слишком большой")}}
function renderRp(){var b=0;for(var i=0;i"+M(i)+"";
h+="—