📋 Бланк ПАБ
📝 Данные аудита
@@ -134,6 +134,9 @@ function showPanel(n){
}
function doLogout(){sessionStorage.removeItem("pab_user");location.href="index.html"}
+function checkSA(){if(!U||isA()){document.getElementById("sa").style.display="none";return}var q=getUserQuota(U);if(!q.p)return;var p=gp(q.p);var done=getA().filter(function(a){return a.createdBy===U.login&&new Date(a.date)>=p.s}).length;var need=Math.max(0,q.c-done);var sa=document.getElementById("sa"),at=document.getElementById("sat");if(need>0){at.innerHTML="⚠️ Отставание: "+p.l+" — "+done+" из "+q.c+". Осталось: "+need+".";sa.style.display="block";sa.style.background=need>=q.c?"#FFEBED":"#FFF3EF";sa.style.borderColor=need>=q.c?"#E63946":"#E76F51"}else{sa.style.display="none"}}
+function sendScheduleReminder(){if(!U)return;var q=getUserQuota(U);var p=gp(q.p);var done=getA().filter(function(a){return a.createdBy===U.login&&new Date(a.date)>=p.s}).length;var need=Math.max(0,q.c-done);var to=U.email||"";if(!to||to.indexOf("@")<0){alert("Укажите email в профиле");return}location.href="mailto:"+encodeURIComponent(to)+"?subject="+encodeURIComponent("График ПАБ — "+p.l)+"&body="+encodeURIComponent("Уважаемый(ая) "+U.name+"!\n\nГрафик ПАБ: "+q.l+".\nПериод: "+p.l+".\nВыполнено: "+done+" из "+q.c+".\n"+(need>0?"Отставание: "+need+" ПАБ.":"График выполнен!")+"\n\nС уважением, Система ПАБ")}
+
function rMS(){
var c=document.getElementById("msc");if(!c)return;
if(isA()){
@@ -248,7 +251,7 @@ function importData(){
};
input.click();
}
-rHS();sbSync();
+rHS();sbSync();checkSA();