v88: separate Open button + replace Branch with Responsible column

This commit is contained in:
Dauren777 2026-06-10 06:05:28 +00:00
parent 71734eddac
commit a951bb74d8

View File

@ -311,9 +311,10 @@ function renderEv(){
var fl=evs;
if(sea){
fl=fl.filter(function(e){
return e.t.toLowerCase().indexOf(sea)!==-1||
e.dname.toLowerCase().indexOf(sea)!==-1||
String(e.id).indexOf(sea)!==-1
return e.t.toLowerCase().indexOf(sea)!==-1||
e.r.toLowerCase().indexOf(sea)!==-1||
e.dname.toLowerCase().indexOf(sea)!==-1||
String(e.id).indexOf(sea)!==-1
})
}
if(fs)fl=fl.filter(function(e){return e.s===fs});
@ -324,8 +325,8 @@ function renderEv(){
for(var i=0;i<fl.length;i++){
var e=fl[i];
if(e.sec!==lastSec){
if(lastSec!==-1)h+="<tr><td colspan='6' style='padding:4px;border:none'></td></tr>";
h+="<tr><td colspan='6' style='padding:0;border:none'><div class='sec-h'>"+esc(secs[e.sec])+"</div></td></tr>";
if(lastSec!==-1)h+="<tr><td colspan='7' style='padding:4px;border:none'></td></tr>";
h+="<tr><td colspan='7' style='padding:0;border:none'><div class='sec-h'>"+esc(secs[e.sec])+"</div></td></tr>";
lastSec=e.sec
}
var dr=daysRem(e.due);
@ -333,14 +334,15 @@ function renderEv(){
var cl=stc[e.s]||"w";
var drText=dr<=0&&e.s!=="done"?"Просрочено на "+Math.abs(dr)+" дн.":e.s==="done"?"Готово":dr===999?"\u2014":dr+" дн.";
h+="<tr class='"+rowCl+"'>";
h+="<td style='font-weight:700;font-size:11px;white-space:nowrap'><span onclick='openEv("+e.id+")' style='color:#00B4D8;cursor:pointer'>"+e.id+"</span></td>";
h+="<td style='font-weight:700;font-size:12px'>"+e.id+"</td>";
h+="<td><div style='font-size:12px;line-height:1.3'>"+esc(e.t)+"</div><div style='font-size:10px;color:#64748B;margin-top:2px'>"+esc(e.dname)+"</div></td>";
h+="<td style='font-size:11px;white-space:nowrap'>"+brs[e.b]+"</td>";
h+="<td style='font-size:11px'>"+esc(nl2c(e.r))+"</td>";
h+="<td style='font-size:12px;white-space:nowrap'>"+e.due+" <span style='font-size:10px;color:#64748B'>("+drText+")</span></td>";
h+="<td><span class='badge "+cl+"'>"+stn[e.s]+"</span></td>";
h+="<td><button class='btn btn-sm' style='padding:4px 12px;font-size:11px' onclick='openEv("+e.id+")'>Открыть</button></td>";
h+="</tr>";
if(e.sub&&e.sub.length>0){
h+="<tr class='"+rowCl+"'><td colspan='6' style='padding:2px 10px 4px;border:none'><div class='sub-row' onclick='togSub("+e.id+")'>";
h+="<tr class='"+rowCl+"'><td colspan='7' style='padding:2px 10px 4px;border:none'><div class='sub-row' onclick='togSub("+e.id+")'>";
var ss=localStorage.getItem("ss_"+e.id);
var sc=0;
if(ss){try{var sp=JSON.parse(ss);for(var si=0;si<sp.length;si++){if(sp[si])sc++}}catch(ex){}}
@ -355,7 +357,7 @@ function renderEv(){
}
}
if(!h)h="<p style='color:#64748B;padding:20px;text-align:center'>Нет мероприятий</p>";
document.getElementById("ev_content").innerHTML="<table><tr><th>N</th><th>Мероприятие</th><th>Филиал</th><th>Срок</th><th>Статус</th></tr>"+h+"</table>"
document.getElementById("ev_content").innerHTML="<table><tr><th>N</th><th>Мероприятие</th><th>Ответственные</th><th>Срок</th><th>Статус</th><th></th></tr>"+h+"</table>"
}
function togSub(id){