From 7ebb2950d0edca57c14d78564536f06a0177c6f8 Mon Sep 17 00:00:00 2001 From: Dauren777 Date: Fri, 5 Jun 2026 09:38:00 +0000 Subject: [PATCH] =?UTF-8?q?v41:=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BA=D0=B0=D0=B7=D0=B0=D1=82=D0=B5=D0=BB=D0=B8=20=E2=80=94=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D0=B5=20=C2=AB=D0=9A=D0=BE=D0=BB=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B2=D0=BE=C2=BB=20=D0=B2=20=D0=BE=D1=82?= =?UTF-8?q?=D1=87=D1=91=D1=82=D0=B0=D1=85=20=D0=B8=20=D0=B0=D0=BD=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D1=82=D0=B8=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 4ddb230..642b927 100644 --- a/index.html +++ b/index.html @@ -252,7 +252,15 @@ function renderMyEvents(){invalidateCache(); function toggleSub(eid,si,chk){var sc=getSC(eid);if(chk&&sc.indexOf(si)<0)sc.push(si);else if(!chk)sc=sc.filter(function(x){return x!==si});setSC(eid,sc);var e=null;for(var i=0;i
Всего
'+all.length+'
Исполнено
'+all.filter(function(e){return e.s==="done"}).length+'
На контроле
'+all.filter(function(e){return e.s==="warn"}).length+'
Просрочено
'+all.filter(function(e){return e.s==="late"}).length+'
';h+='

Дивизионы

';branches.forEach(function(b,i){var it=all.filter(function(e){return e.b===i}),d=it.filter(function(e){return e.s==="done"}).length,p=it.length?Math.round(d/it.length*100):0;h+='
'+b+'
=25?"var(--amber)":"var(--red)")+'">
'+p+'% ('+d+'/'+it.length+')
'});h+='
';h+='

Просрочено

';all.filter(function(e){return e.s==="late"}).forEach(function(e){h+=''});h+='
МероприятиеФилиалСрок
'+e.id+''+esc(e.t.slice(0,80))+'...'+branches[e.b]+''+e.due+'
';document.getElementById("tab-analytics").innerHTML=h;cache.analytics=true} +function renderAnalytics(){var all=events||[],h='
Всего
'+all.length+'
Исполнено
'+all.filter(function(e){return e.s==="done"}).length+'
На контроле
'+all.filter(function(e){return e.s==="warn"}).length+'
Просрочено
'+all.filter(function(e){return e.s==="late"}).length+'
'; + // Aggregate quantities + var totalQty=0,regQty={};regions.forEach(function(r,ri){regQty[ri]=0}); + all.forEach(function(e){regions.forEach(function(ri){var d=getMD(e.id,ri,-1);for(var k in d){if(d.hasOwnProperty(k)&&d[k])totalQty+=d[k].qty||0;regQty[ri]+=d[k].qty||0}if(e.sub)e.sub.forEach(function(s,si){var sd=getMD(e.id,ri,si);for(var sk in sd){if(sd.hasOwnProperty(sk)&&sd[sk]){totalQty+=sd[sk].qty||0;regQty[ri]+=sd[sk].qty||0}}})})}); + h+='

📊 Количественные показатели

Всего единиц
'+totalQty+'
'; + regions.forEach(function(r,ri){if(regQty[ri])h+='
'+r+'
'+regQty[ri]+'
'}); + h+='
'; + // Branch ranking + h+='

Дивизионы

';branches.forEach(function(b,i){var it=all.filter(function(e){return e.b===i}),d=it.filter(function(e){return e.s==="done"}).length,p=it.length?Math.round(d/it.length*100):0;h+='
'+b+'
=25?"var(--amber)":"var(--red)")+'">
'+p+'% ('+d+'/'+it.length+')
'});h+='
';h+='

Просрочено

';all.filter(function(e){return e.s==="late"}).forEach(function(e){h+=''});h+='
МероприятиеФилиалСрок
'+e.id+''+esc(e.t.slice(0,80))+'...'+branches[e.b]+''+e.due+'
';document.getElementById("tab-analytics").innerHTML=h;cache.analytics=true} // ===== JOURNAL ===== function renderJournal(){var log=JSON.parse(localStorage.getItem("samruk_log")||"[]").reverse(),h='

Журнал действий

';if(!log.length)h+='

Записей пока нет

';else{h+='';log.forEach(function(l){h+=''});h+='
ВремяПользовательДействие
'+new Date(l.ts).toLocaleString()+''+esc(l.user)+''+esc(l.action)+(l.detail?' — '+esc(l.detail):'')+'
'}h+='
';document.getElementById("tab-journal").innerHTML=h;cache.journal=true} @@ -280,11 +288,12 @@ function openEdit(id,mi,ri,si){ h+='
📎 '+regions[curRegion]+''+mh+rh; h+='
'; + h+='
'; cfs.forEach(function(f,i){h+='
📄 '+esc(f.name)+''+(f.desc?''+esc(f.desc)+'':'')+''+(f.size/1024).toFixed(0)+' КБ
'}); h+='
'; h+='

Формы: '+esc(e.dname)+'

'; - if(e.sub&&e.sub.length){h+='
📋 Подпункты

Нажмите 📎 для управления файлами

';e.sub.forEach(function(s,i){var ch=sc.indexOf(i)>=0,sd=getMD(e.id,curRegion,i),scd=sd[cm]||{report:"",files:[]},scfs=scd.files||[],isA=editSubIdx===i;h+='
'+s.l+')'+esc(s.t)+'Файлов: '+scfs.length+'
';if(isA){h+='
'+s.l+') '+esc(s.t)+'

'+regions[curRegion]+' · '+M(curMonth)+'

';h+='
';scfs.forEach(function(f,fi){h+='
📄 '+esc(f.name)+''+(f.size/1024).toFixed(0)+' КБ
'});h+='
'}});h+='
'} + if(e.sub&&e.sub.length){h+='
📋 Подпункты

Нажмите 📎 для управления файлами

';e.sub.forEach(function(s,i){var ch=sc.indexOf(i)>=0,sd=getMD(e.id,curRegion,i),scd=sd[cm]||{report:"",files:[]},scfs=scd.files||[],isA=editSubIdx===i;h+='
'+s.l+')'+esc(s.t)+'Файлов: '+scfs.length+'
'; if(isA){h+='
'+s.l+') '+esc(s.t)+'

'+regions[curRegion]+' · '+M(curMonth)+'

';h+='
';h+='
';scfs.forEach(function(f,fi){h+='
📄 '+esc(f.name)+''+(f.size/1024).toFixed(0)+' КБ
'});h+='
'}});h+='
'} h+='

🤖 ИИ

'+esc(e.ai)+'
'; h+='
История:
';e.h.forEach(function(x){h+='
'+esc(x)+'
'});h+='
'; @@ -293,7 +302,7 @@ function openEdit(id,mi,ri,si){ document.getElementById("editModalOverlay").classList.add("open"); } -function saveEdit(id,mk){mk=months[mk];var e=null;for(var i=0;i