1import{a as nt}from"./chunk-WBWHWO2S.js";import{a as it}from"./chunk-B7CQWDQS.js";import{a as $}from"./chunk-NWF6CSQL.js";import{c as et}from"./chunk-EHRUXARM.js";import{a as tt}from"./chunk-55K77WD6.js";import"./chunk-C342R6R4.js";import{a as K}from"./chunk-EEGLZW5Y.js";import{f as Ke,g as Ze}from"./chunk-O6QGVCU4.js";import{a as Xe}from"./chunk-JAVXKLPM.js";import"./chunk-A7DVSW7U.js";import{a as J}from"./chunk-3KJJR4PR.js";import"./chunk-ABAWT23C.js";import"./chunk-MZBVUXPZ.js";import"./chunk-IWOLENFE.js";import"./chunk-UWQZ6LHD.js";import{a as ce}from"./chunk-7FBSWJHX.js";import{b as H}from"./chunk-4DJXF7UW.js";import{a as ze}from"./chunk-NDDBMTF2.js";import"./chunk-PP6OKG4J.js";import{b as U}from"./chunk-3AGUOP7M.js";import{a as Ye,f as Je,g as X,l as Ue,m as He}from"./chunk-RAZ6272N.js";import{c as Ne}from"./chunk-LBLKBDMD.js";import{a as se}from"./chunk-YLPDWZZX.js";import"./chunk-Y7PLHQ6M.js";import{a as B,e as Ge}from"./chunk-QNJ3LBLE.js";import"./chunk-3R646RNR.js";import{d as F,e as N}from"./chunk-PLPK6HII.js";import{E as Qe,G as Ve,H as qe,b as Be,c as $e,g as D,l as L,o as We}from"./chunk-UFCZWRLF.js";import{a as de}from"./chunk-7Q5L7ALI.js";import"./chunk-CARY4E7O.js";import{a as Fe}from"./chunk-2PT6A6VZ.js";import{$ as ae,Bc as A,Cc as P,D as Oe,Ha as Te,Ib as l,Ja as o,Jb as u,Ka as f,Kb as g,Lb as k,Mb as Me,Nc as we,Rc as ke,Sb as E,Tb as O,Ub as I,V as Ie,Va as c,Xb as Y,Xc as Re,Za as G,_ as ne,_a as d,ab as je,ba as oe,c as ye,dd as Ae,ec as v,fa as R,ga as re,gc as S,gd as z,hd as Pe,id as le,jd as De,kb as a,kd as Le,lb as i,mb as _,md as ie,na as T,nb as x,oa as j,ob as y,p as Ee,qb as w,ub as b,wb as m}from"./chunk-32W73H3G.js";import{a as V,h as q}from"./chunk-WWX6BADO.js";var ht=()=>({exact:!0}),pe=()=>({paths:"subset",queryParams:"ignored"});function ut(t,s){t&1&&(a(0,"header",18)(1,"div",19)(2,"span",20),_(3,"i",21),i(),a(4,"div")(5,"h1",22),l(6,"OBE Report"),i(),a(7,"p",23),l(8,"Co-Po, mark, and direct attainment reports."),i()()()())}var me=(()=>{class t{userService;router;route;modalService;loadingService;title="coPoReport";currentUser;embeddedInReports=!1;destroy$=new ye;constructor(e,r,n,p,h){this.userService=e,this.router=r,this.route=n,this.modalService=p,this.loadingService=h}ngOnInit(){this.syncEmbeddedMode(this.router.url),this.router.events.pipe(Oe(e=>e instanceof Ae),Ie(this.destroy$)).subscribe(e=>{this.syncEmbeddedMode(e.urlAfterRedirects)}),this.getCurrentUser()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}syncEmbeddedMode(e){this.embeddedInReports=e.includes("/reports/home/obe-reports")}getCurrentUser(){this.userService.getCurrentUser().then(e=>{this.currentUser=e})}static \u0275fac=function(r){return new(r||t)(f(Ne),f(le),f(z),f(X),f(K))};static \u0275cmp=R({type:t,selectors:[["app-root"]],decls:31,vars:13,consts:[[1,"jp-module-page-shell","jp-admin-dashboard-shell"],["class","jp-admin-header mb-2",4,"ngIf"],[1,"jp-admin-tab-toolbar","mb-2"],["role","tablist","aria-label","OBE report types",1,"jp-ims-admin-tabs","nav","nav-tabs","border-0"],["routerLink","home","routerLinkActive","active","role","tab",1,"nav-link","jp-admin-tab",3,"routerLinkActiveOptions"],["aria-hidden","true",1,"jp-admin-tab-icon","jp-admin-tab-icon--student"],[1,"fa","fa-users"],["routerLink","coPoSubReport","routerLinkActive","active","role","tab",1,"nav-link","jp-admin-tab",3,"routerLinkActiveOptions"],["aria-hidden","true",1,"jp-admin-tab-icon","jp-admin-tab-icon--obe"],[1,"fa","fa-book"],["routerLink","markReport","routerLinkActive","active","role","tab",1,"nav-link","jp-admin-tab","jp-admin-tab--attendance",3,"routerLinkActiveOptions"],["aria-hidden","true",1,"jp-admin-tab-icon","jp-admin-tab-icon--attendance"],[1,"fa","fa-bar-chart"],["routerLink","direct","routerLinkActive","active","role","tab",1,"nav-link","jp-admin-tab",3,"routerLinkActiveOptions"],[1,"fa","fa-bullseye"],["routerLink","directSubjectAttainment","routerLinkActive","active","role","tab",1,"nav-link","jp-admin-tab",3,"routerLinkActiveOptions"],[1,"fa","fa-crosshairs"],[1,"jp-module-page","jp-admin-content"],[1,"jp-admin-header","mb-2"],[1,"jp-admin-title-row"],["aria-hidden","true",1,"jp-admin-page-icon","jp-admin-page-icon--obe"],[1,"fa","fa-file-text"],[1,"jp-ims-page-heading","mb-0"],[1,"text-muted","small","mb-0","mt-1"]],template:function(r,n){r&1&&(a(0,"div",0),c(1,ut,9,0,"header",1),a(2,"div",2)(3,"nav",3)(4,"a",4)(5,"span",5),_(6,"i",6),i(),a(7,"span"),l(8,"Student CoPo"),i()(),a(9,"a",7)(10,"span",8),_(11,"i",9),i(),a(12,"span"),l(13,"Subject CoPo"),i()(),a(14,"a",10)(15,"span",11),_(16,"i",12),i(),a(17,"span"),l(18,"Exam Mark Report"),i()(),a(19,"a",13)(20,"span",8),_(21,"i",14),i(),a(22,"span"),l(23,"Direct Attainment"),i()(),a(24,"a",15)(25,"span",8),_(26,"i",16),i(),a(27,"span"),l(28,"Direct Subject Attainment"),i()()()(),a(29,"main",17),_(30,"router-outlet"),i()()),r&2&&(je("jp-obe-reports-embedded",n.embeddedInReports),o(),d("ngIf",!n.embeddedInReports),o(3),d("routerLinkActiveOptions",Y(8,ht)),o(5),d("routerLinkActiveOptions",Y(9,pe)),o(5),d("routerLinkActiveOptions",Y(10,pe)),o(5),d("routerLinkActiveOptions",Y(11,pe)),o(5),d("routerLinkActiveOptions",Y(12,pe)))},dependencies:[Pe,De,Le,P],styles:[".jp-obe-reports-embedded.jp-module-page-shell[_ngcontent-%COMP%]{padding:0}"]})}return t})();function _t(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),u(e.coMaxLevel)}}function ft(t,s){if(t&1&&(a(0,"tr")(1,"td"),l(2),i(),c(3,_t,2,1,"td",9),v(4,"orderBy"),i()),t&2){let e=s.$implicit;o(2),u(e.subjectName),o(),d("ngForOf",S(4,2,e.coWiseLevel,"coCode"))}}var ue=(()=>{class t{activeModal;value;constructor(e){this.activeModal=e}ngOnInit(){}close(){this.activeModal.close()}static \u0275fac=function(r){return new(r||t)(f(Je))};static \u0275cmp=R({type:t,selectors:[["app-co-po-sub-list"]],inputs:{value:"value"},decls:25,vars:1,consts:[[1,"container"],[1,"modal-header","custom-card-header","d-flex","align-items-center"],["aria-hidden","true",1,"fa","fa-bar-chart","me-2"],[1,"mb-0"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close","ms-auto",3,"click"],[1,"modal-body","custom-card-body",2,"max-height","600px","overflow-y","auto"],[1,"row","mt-2"],[1,"table","table-striped","table_size"],["scope","col"],[4,"ngFor","ngForOf"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"div",1),_(2,"i",2),a(3,"h5",3),l(4,"CoPo Report"),i(),a(5,"button",4),b("click",function(){return n.close()}),i()(),a(6,"div",5)(7,"div",6)(8,"table",7)(9,"thead")(10,"tr")(11,"th",8),l(12," Subject Name"),i(),a(13,"th",8),l(14,"CO1"),i(),a(15,"th",8),l(16,"CO2"),i(),a(17,"th",8),l(18,"CO3"),i(),a(19,"th",8),l(20,"CO4"),i(),a(21,"th",8),l(22,"CO5"),i()()(),a(23,"tbody"),c(24,ft,5,5,"tr",9),i()()()()()),r&2&&(o(24),d("ngForOf",n.value.subjectList))},dependencies:[A,B],styles:[".custom-card-header[_ngcontent-%COMP%]{background:#f7fafd;border-bottom:none;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:.5rem 1rem 0;box-shadow:0 2px 8px #0000000a}.custom-card-body[_ngcontent-%COMP%]{padding:2rem 1.5rem 1.5rem;background:#f8f9fa;border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.table.table_size[_ngcontent-%COMP%]{background:#fff;border-radius:.5rem;overflow:hidden;box-shadow:0 1px 4px #1976d20a}.table.table_size[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#e3f2fd;color:#1976d2;font-weight:600;border:none}.table.table_size[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background:#fff;color:#333;border:none}@media (max-width: 600px){.custom-card-body[_ngcontent-%COMP%]{padding:1rem .5rem}.custom-card-header[_ngcontent-%COMP%]{padding:.5rem .5rem 0}.table.table_size[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table.table_size[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.95rem;padding:.5rem}}"]})}return t})();var ot=(()=>{class t{http;constructor(e){this.http=e}getGroupRoster(e){return this.http.get(`${Fe.URI}/api/examination/roster/${e}`)}static \u0275fac=function(r){return new(r||t)(oe(Re))};static \u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var rt=(()=>{class t{rosterApi;constructor(e){this.rosterApi=e}loadGroupStudents(e){return Ee(this.rosterApi.getGroupRoster(e))}static \u0275fac=function(r){return new(r||t)(oe(ot))};static \u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function St(t,s){if(t&1&&(a(0,"ng-option",15),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),k(" ",e.degreeName," - ",e.departmentName," ")}}function Ct(t,s){if(t&1&&(a(0,"ng-option",15),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),k(" ",e.startYear,"-",e.endYear," ")}}function xt(t,s){if(t&1&&(a(0,"ng-option",15),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),u(e.groupName)}}function yt(t,s){t&1&&(a(0,"div",16),_(1,"i",17),a(2,"div",18)(3,"p",19),l(4,"Loading students\u2026"),i()()())}function Et(t,s){t&1&&(a(0,"div",20),_(1,"i",21),a(2,"div",18)(3,"p",19),l(4,"No report found for the selected group."),i()()())}function Ot(t,s){if(t&1){let e=w();a(0,"tr")(1,"td"),l(2),i(),a(3,"td"),l(4),i(),a(5,"td"),l(6),i(),a(7,"td",32)(8,"button",33),b("click",function(){let n=T(e).$implicit,p=m(2);return j(p.getReport(n.id))}),_(9,"i",34),l(10,"View "),i()()()}if(t&2){let e=s.$implicit,r=s.index;o(2),u(r+1),o(2),u(e.registerNo),o(2),u(e.name)}
1}function It(t,s){if(t&1&&(a(0,"div",22)(1,"div",23)(2,"h2",24),l(3,"Students"),i()(),a(4,"div",25)(5,"div",26)(6,"table",27)(7,"thead",28)(8,"tr")(9,"th",29),l(10,"#"),i(),a(11,"th",29),l(12,"Register No."),i(),a(13,"th",29),l(14,"Name"),i(),a(15,"th",30),l(16,"Report"),i()()(),a(17,"tbody"),c(18,Ot,11,3,"tr",31),v(19,"orderBy"),i()()()()()),t&2){let e=m();o(18),d("ngForOf",S(19,1,e.studentList,"registerNo"))}}var lt=(()=>{class t{accYearService;loading;examSerive;Modalservice;activatedRoute;facDeptService;departmentService;groupService;coPoRosterService;departments;groups;accyears;grpId;acc;dept;yearOfBatch;selectedSem;semType;studentList;reports;showTable;loadEffect=!1;warning=!1;constructor(e,r,n,p,h,C,M,Q,ee){this.accYearService=e,this.loading=r,this.examSerive=n,this.Modalservice=p,this.activatedRoute=h,this.facDeptService=C,this.departmentService=M,this.groupService=Q,this.coPoRosterService=ee}ngOnInit(){this.onload()}onload(){this.loading.showLoading(),this.departmentService.getDepartment().then(e=>{this.departments=e,this.loading.hideLoading()})}onChange(e){this.showTable=!1,this.warning=!1,this.acc="",this.grpId="",this.groups=[],this.studentList=[],this.accYearService.getAcademicyear(e.id).then(r=>{this.accyears=r})}getGroup(e){this.showTable=!1,this.warning=!1,this.grpId="",this.studentList=[],this.groupService.getGroupByAccId(e.id).then(r=>{this.groups=r})}getStudents(e){this.showTable=!1,this.loadEffect=!0,this.warning=!1;for(var r=0;r<e.accYearDoc.years.length;r++)e.sem==e.accYearDoc.years[r].sem&&(this.yearOfBatch=e.accYearDoc.years[r].year,this.semType=e.accYearDoc.years[r].semType,this.selectedSem=e.accYearDoc.years[r].sem);this.coPoRosterService.loadGroupStudents(e.id).then(n=>{this.studentList=n,this.studentList?.length==0&&(this.loadEffect=!1,this.warning=!0),this.loadEffect=!1,this.studentList?.length>0&&(this.showTable=!0)})}getReport(e){this.examSerive.getCoPoReport(e,this.yearOfBatch,this.selectedSem,this.semType).then(r=>{this.reports=r,this.popupReport(this.reports)})}popupReport(e){let r=this.Modalservice.open(ue,{size:"lg",backdrop:"static"});r.componentInstance.value=e}static \u0275fac=function(r){return new(r||t)(f(J),f(K),f($),f(X),f(z),f(se),f(U),f(ze),f(rt))};static \u0275cmp=R({type:t,selectors:[["app-co-po-report-home"]],decls:23,vars:14,consts:[[1,"jp-ims-obe-reports-student-copo-tab"],[1,"text-muted","small","mb-3"],[1,"jp-dashboard-filter-bar"],[1,"jp-filter-row"],[1,"jp-filter-item"],["for","scopo-dept",1,"jp-filter-label"],["id","scopo-dept","placeholder","Select degree & department",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable"],[3,"value",4,"ngFor","ngForOf"],["for","scopo-acc",1,"jp-filter-label"],["id","scopo-acc","placeholder","Select academic year",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["for","scopo-group",1,"jp-filter-label"],["id","scopo-group","groupBy","
1sem","placeholder","Select group",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["class","jp-alert jp-alert-info mb-3",4,"ngIf"],["class","jp-alert jp-alert-warning mb-3",4,"ngIf"],["class","card shadow-sm border-0",4,"ngIf"],[3,"value"],[1,"jp-alert","jp-alert-info","mb-3"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","jp-alert-icon"],[1,"jp-alert-content"],[1,"jp-alert-message","mb-0"],[1,"jp-alert","jp-alert-warning","mb-3"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","jp-alert-icon"],[1,"card","shadow-sm","border-0"],[1,"card-header","bg-white","border-bottom"],[1,"h6","mb-0","fw-semibold"],[1,"card-body","p-0"],[1,"table-responsive","jp-list-table-wrap"],["aria-label","Student CoPo report list",1,"table","table-striped","align-middle","mb-0","jp-list-table"],[1,"table-light"],["scope","col"],["scope","col",1,"text-end"],[4,"ngFor","ngForOf"],[1,"text-end"],["type","button",1,"btn","btn-outline-primary","btn-sm","jp-btn-view",3,"click"],["aria-hidden","true",1,"fa","fa-eye","me-1"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"p",1),l(2," Select degree, department, academic year, and group to list students and open individual CoPo reports. "),i(),a(3,"div",2)(4,"div",3)(5,"div",4)(6,"label",5),l(7,"Degree & Department"),i(),a(8,"ng-select",6),I("ngModelChange",function(h){return O(n.dept,h)||(n.dept=h),h}),b("change",function(){return n.onChange(n.dept)}),c(9,St,2,3,"ng-option",7),i()(),a(10,"div",4)(11,"label",8),l(12,"Academic Year"),i(),a(13,"ng-select",9),I("ngModelChange",function(h){return O(n.acc,h)||(n.acc=h),h}),b("change",function(){return n.getGroup(n.acc)}),c(14,Ct,2,3,"ng-option",7),i()(),a(15,"div",4)(16,"label",10),l(17,"Group"),i(),a(18,"ng-select",11),I("ngModelChange",function(h){return O(n.grpId,h)||(n.grpId=h),h}),b("change",function(){return n.getStudents(n.grpId)}),c(19,xt,2,2,"ng-option",7),i()()()(),c(20,yt,5,0,"div",12)(21,Et,5,0,"div",13)(22,It,20,4,"div",14),i()),r&2&&(o(8),E("ngModel",n.dept),d("clearable",!1),o(),d("ngForOf",n.departments),o(4),E("ngModel",n.acc),d("clearable",!1)("disabled",!n.dept),o(),d("ngForOf",n.accyears),o(4),E("ngModel",n.grpId),d("clearable",!1)("disabled",!n.acc),o(),d("ngForOf",n.groups),o(),d("ngIf",n.loadEffect),o(),d("ngIf",n.warning),o(),d("ngIf",n.showTable))},dependencies:[D,L,A,P,N,F,B]})}return t})();function Tt(t,s){if(t&1&&(a(0,"ng-option",18),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),k(" ",e.degreeName," - ",e.departmentName," ")}}function jt(t,s){if(t&1&&(a(0,"ng-option",18),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),k(" ",e.startYear,"-",e.endYear," ")}}function Mt(t,s){if(t&1&&(a(0,"ng-option",18),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),u(e)}}function wt(t,s){if(t&1&&(a(0,"ng-option",18),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),u(e.subjectName)}}function kt(t,s){t&1&&(a(0,"div",19),_(1,"i",20),a(2,"div",21)(3,"p",22),l(4,"Loading report\u2026"),i()()())}function Rt(t,s){t&1&&(a(0,"div",23),_(1,"i",24),a(2,"div",21)(3,"p",22),l(4,"No report found for the selected subject."),i()()())}function At(t,s){if(t&1&&(a(0,"td",35),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.coMaxLevel," ")}}function Pt(t,s){if(t&1&&(a(0,"div",25)(1,"div",26)(2,"h2",27),l(3),i()(),a(4,"div",28)(5,"div",29)(6,"table",30)(7,"thead",31)(8,"tr")(9,"th",32),l(10,"Subject Name"),i(),a(11,"th",33),l(12,"CO1"),i(),a(13,"th",33),l(14,"CO2"),i(),a(15,"th",33),l(16,"CO3"),i(),a(17,"th",33),l(18,"CO4"),i(),a(19,"th",33),l(20,"CO5"),i()()(),a(21,"tbody")(22,"tr")(23,"td"),l(24),i(),c(25,At,2,1,"td",34),v(26,"orderBy"),i()()()()()()),t&2){let e=m();o(3),g("CO attainment \u2014 ",e.coPoSubReport==null?null:e.coPoSubReport.regSubName,""),o(21),u(e.coPoSubReport.regSubName),o(),d("ngForOf",S(26,3,e.coPoSubReport.coWiseLevel,"coCode"))}}function Dt(t,s){if(t&1&&(a(0,"tr")(1,"td"),l(2),i(),a(3,"td"),l(4),i()()),t&2){let e=s.$implicit;o(2),u(e.testCode),o(2),u(e.testName)}}function Lt(t,s){if(t&1&&(a(0,"div",36)(1,"div",26)(2,"h2",27),l(3,"Linked assessments"),i()(),a(4,"div",28)(5,"div",29)(6,"table",37)(7,"thead",31)(8,"tr")(9,"th",32),l(10,"Test Co
1de"),i(),a(11,"th",32),l(12,"Test Name"),i()()(),a(13,"tbody"),c(14,Dt,5,2,"tr",38),i()()()()()),t&2){let e=m();o(14),d("ngForOf",e.coPoSubReport.testList)}}var st=(()=>{class t{accYearService;loading;examSerive;Modalservice;activatedRoute;facDeptService;departmentService;regService;departments;accyears;acc;sub;dept;regSubjects;semesters;sem;deptId;yearOfBatch;semType;coPoSubReport;showTable;loadEffect=!1;warning=!1;constructor(e,r,n,p,h,C,M,Q){this.accYearService=e,this.loading=r,this.examSerive=n,this.Modalservice=p,this.activatedRoute=h,this.facDeptService=C,this.departmentService=M,this.regService=Q}ngOnInit(){this.onload(),this.semesters=["1","2","3","4","5","6","7","8"]}onload(){this.loading.showLoading(),this.departmentService.getDepartment().then(e=>{this.departments=e,this.loading.hideLoading(),this.applyQueryDrill()})}applyQueryDrill(){return q(this,null,function*(){let e=this.activatedRoute.snapshot.queryParams,r=e.deptId,n=e.accYearId,p=e.sem,h=e.regSubId;if(!r||!n||!p||!h)return;let M=this.normalizeDepartmentList(this.departments).find(te=>String(te.id)===String(r));if(!M)return;this.dept=M,this.deptId=M.id,this.accyears=yield this.accYearService.getAcademicyear(M.id);let Q=(this.accyears||[]).find(te=>String(te.id)===String(n));if(!Q)return;
1this.acc=Q,this.sem=String(p),yield this.loadSubjectsForSem(Q,this.sem);let ee=(this.regSubjects||[]).find(te=>String(te.id)===String(h));ee&&(this.sub=ee,this.getSemAndYear(ee))})}normalizeDepartmentList(e){return Array.isArray(e)?e:e&&typeof e=="object"&&Array.isArray(e.datas)?e.datas:[]}onChange(e){this.showTable=!1,this.warning=!1,this.acc="",this.sem="",this.sub="",this.deptId=e.id,this.coPoSubReport=[],this.regSubjects=[],this.accYearService.getAcademicyear(e.id).then(r=>{this.accyears=r})}accReset(){this.showTable=!1,this.warning=!1,this.sem="",this.sub="",this.coPoSubReport=[],this.regSubjects=[]}getSubjects(e,r){this.showTable=!1,this.warning=!1,this.sub="",this.coPoSubReport=[],this.loadSubjectsForSem(e,r)}loadSubjectsForSem(e,r){for(let n=0;n<e.years.length;n++)r==e.years[n].sem&&(this.yearOfBatch=e.years[n].year,this.semType=e.years[n].semType);return this.regService.getRegSub(this.deptId,e.regulationId,r).then(n=>{this.regSubjects=n.datas})}getSemAndYear(e){this.loadEffect=!0,this.showTable=!1,this.warning=!1,this.examSerive.getCoPoSubjectReport(this.deptId,e.id,this.semType,this.yearOfBatch).then(r=>{this.coPoSubReport=r,this.coPoSubReport?.length>0?(this.loadEffect=!1,this.showTable=!0):(this.loadEffect=!1,this.warning=!0)})}static \u0275fac=function(r){return new(r||t)(f(J),f(K),f($),f(X),f(z),f(se),f(U),f(H))};static \u0275cmp=R({type:t,selectors:[["app-co-po-sub-report"]],decls:29,vars:19,consts:[[1,"jp-ims-obe-reports-subject-copo-tab"],[1,"text-muted","small","mb-3"],[1,"jp-dashboard-filter-bar"],[1,"jp-filter-row"],[1,"jp-filter-item"],["for","subcopo-dept",1,"jp-filter-label"],["id","subcopo-dept","placeholder","Select degree & department",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable"],[3,"value",4,"ngFor","ngForOf"],["for","subcopo-acc",1,"jp-filter-label"],["id","subcopo-acc","placeholder","Select academic year",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["for","subcopo-sem",1,"jp-filter-label"],["id","subcopo-sem","placeholder","Select semester",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["for","subcopo-subject",1,"jp-filter-label"],["id","subcopo-subject","placeholder","Select subject",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["class","jp-alert jp-alert-info mb-3",4,"ngIf"],["class","jp-alert jp-alert-warning mb-3",4,"ngIf"],["class","card shadow-sm border-0",4,"ngIf"],["class","card shadow-sm border-0 mt-3",4,"ngIf"],[3,"value"],[1,"jp-alert","jp-alert-info","mb-3"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","jp-alert-icon"],[1,"jp-alert-content"],[1,"jp-alert-message","mb-0"],[1,"jp-alert","jp-alert-warning","mb-3"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","jp-alert-icon"],[1,"card","shadow-sm","border-0"],[1,"card-header","bg-white","border-bottom"],[1,"h6","mb-0","fw-semibold"],[1,"card-body","p-0"],[1,"table-responsive","jp-list-table-wrap"],["aria-label","Subject CO levels",1,"table","table-striped","align-middle","mb-0","jp-list-table"],[1,"table-light"],["scope","col"],["scope","col",1,"text-center"],["class","text-center",4,"ngFor","ngForOf"],[1,"text-center"],[1,"card","shadow-sm","border-0","mt-3"],["aria-label","Subject assessments",1,"table","table-striped","align-middle","mb-0","jp-list-table"],[4,"ngFor","ngForOf"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"p",1),l(2," Select degree, department, academic year, semester, and subject to view subject-wise CoPo attainment. "),i(),a(3,"div",2)(4,"div",3)(5,"div",4)(6,"label",5),l(7,"Degree & Department"),i(),a(8,"ng-select",6),I("ngModelChange",function(h){return O(n.dept,h)||(n.dept=h),h}),b("change",function(){return n.onChange(n.dept)}),c(9,Tt,2,3,"ng-option",7),i()(),a(10,"div",4)(11,"label",8),l(12,"Academic Year"),i(),a(13,"ng-select",9),I("ngModelChange",function(h){return O(n.acc,h)||(n.acc=h),h}),b("change",function(){return n.accReset()}),c(14,jt,2,3,"ng-option",7),i()(),a(15,"div",4)(16,"label",10),l(17,"Semester"),i(),a(18,"ng-select",11),I("ngModelChange",function(h){return O(n.sem,h)||(n.sem=h),h}),b("change",function(){return n.getSubjects(n.acc,n.sem)}),c(19,Mt,2,2,"ng-option",7),i()(),a(20,"div",4)(21,"label",12),l(22,"Subject"),i(),a(23,"
1ng-select",13),I("ngModelChange",function(h){return O(n.sub,h)||(n.sub=h),h}),b("change",function(){return n.getSemAndYear(n.sub)}),c(24,wt,2,2,"ng-option",7),i()()()(),c(25,kt,5,0,"div",14)(26,Rt,5,0,"div",15)(27,Pt,27,6,"div",16)(28,Lt,15,1,"div",17),i()),r&2&&(o(8),E("ngModel",n.dept),d("clearable",!1),o(),d("ngForOf",n.departments),o(4),E("ngModel",n.acc),d("clearable",!1)("disabled",!n.dept),o(),d("ngForOf",n.accyears),o(4),E("ngModel",n.sem),d("clearable",!1)("disabled",!n.acc),o(),d("ngForOf",n.semesters),o(4),E("ngModel",n.sub),d("clearable",!1)("disabled",!n.sem),o(),d("ngForOf",n.regSubjects),o(),d("ngIf",n.loadEffect),o(),d("ngIf",n.warning),o(),d("ngIf",n.showTable),o(),d("ngIf",n.showTable&&(n.coPoSubReport==null||n.coPoSubReport.testList==null?null:n.coPoSubReport.testList.length)))},dependencies:[D,L,A,P,N,F,B]})}return t})();function Nt(t,s){if(t&1&&(a(0,"ng-option",26),l(1),i()),t&2){let e=s.$implicit;d("value",e.id),o(),k(" ",e.degreeName," - ",e.departmentName," ")}}function Bt(t,s){if(t&1&&(a(0,"ng-option",26),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),k(" ",e.startYear,"-",e.endYear," ")}}function $t(t,s){if(t&1&&(a(0,"ng-option",26),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),u(e)}}function Wt(t,s){if(t&1&&(a(0,"ng-option",26),l(1),i()),t&2){let e=s.$implicit;d("value",e.id),o(),u(e.subjectName)}}function Qt(t,s){if(t&1&&(a(0,"ng-option",26),l(1),i()),t&2){let e=s.$implicit;d("value",e.id),o(),u(e.batchName)}}function Vt(t,s){t&1&&_(0,"i",27)}function qt(t,s){t&1&&(a(0,"span"),l(1,"View"),i())}function Yt(t,s){t&1&&(a(0,"span",28),_(1,"span",29),l(2," Loading\u2026 "),i())}function Jt(t,s){if(t&1){let e=w();a(0,"div",30),_(1,"div",31)(2,"div",31),a(3,"div",32)(4,"button",33),b("click",function(){T(e);let n=m();return j(n.DownloadOverallExamsMarkReportExcel(n.batchId))}),_(5,"i",34),l(6,"Export All Exam Report"),i()()()}}function Ut(t,s){if(t&1){let e=w();a(0,"div",36)(1,"label",37)(2,"input",38),b("click",function(){let n=T(e).$implicit,p=m(2);return j(p.source(n))}),i(),l(3),i(),l(4,"\xA0\xA0 "),i()}if(t&2){let e=s.$implicit,r=m(2);o(2),d("name",r.testName)("checked",r.testName===e.id),o(),g(" ",e.testName," ")}}function Ht(t,s){if(t&1&&(a(0,"div",30),c(1,Ut,5,3,"div",35),i()),t&2){let e=m();o(),d("ngForOf",e.testList)}}function Gt(t,s){t&1&&(a(0,"div")(1,"div",39)(2,"span",40),l(3,"Sorry !"),i(),l(4," No Details found. "),i()())}function zt(t,s){if(t&1){let e=w();a(0,"div")(1,"div",23)(2,"div",41)(3,"div")(4,"a",42),b("click",function(){T(e);let n=m();return j(n.obeMarkExport(n.batchId))}),_(5,"i",34),l(6,"Export QuestionWise Mark"),i()()()(),a(7,"div",43)(8,"div",44)(9,"h4")(10,"b")(11,"i")(12,"u"),l(13,"Mark View"),i()()()()()(),_(14,"br"),i()}}function Xt(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.questionNo)}}function Kt(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit,r=m(2).index;o(),k(" ",e.questionNo,".",r+1," ")}}function Zt(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,Kt,2,2,"td",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function ei(t,s){if(t&1&&(a(0,"th"),c(1,Xt,2,1,"span",20)(2,Zt,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function ti(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.coCode)}}function ii(t,s){if(t&1&&(a(0,"th"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.coCode," ")}}function ni(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,ii,2,1,"th",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function ai(t,s){if(t&1&&(a(0,"th"),c(1,ti,2,1,"span",20)(2,ni,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function oi(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.maxMark)}}function ri(t,s){if(t&1&&(a(0,"th"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.maxMark," ")}}function li(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,ri,2,1,"th",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function si(t,s){if(t&1&&(a(0,"th"),c(1,oi,2,1,"span",20)(2,li,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function di(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),g(" ",e.mark," ")}}function ci(t,s){if(t&1&&(a(0,"span"),c(1,di,2,1,"span",20),i()),t&2){let e=m(2).$implicit;o(),d("ngIf",e.mark.length==1)}}function pi(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.mark," ")}}function mi(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,pi,2,1,"td",49),i()()()),t&2){let e=m(2).$implicit;o(3),d("ngForOf",e.mark)}}function hi(t,s){if(t&1&&(a(0,"span"),c(1,ci,2,1,"span",49)(2,mi,4,1,"span",20),i()),t&2){let e=m().$implicit;o(),d("ngForOf",e.mark),o(),d("ngIf",(e==null?null:e.mark.length)>1)}}function ui(t,s){if(t&1&&(a(0,"span"),c(1,hi,3,2,"span",20),i()),t&2){let e=s.$implicit,r=m().$implicit;o(),d("ngIf",r.id==e.questionId)}}function _i(t,s){if(t&1&&(a(0,"td"),c(1,ui,2,1,"span",49),i()),t&2){let e=m().$implicit;o(),d("ngForOf",e.marks)}}function fi(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),g(" ",e.mark," ")}}function gi(t,s){if(t&1&&(a(0,"span"),c(1,fi,2,1,"span",20),i()),t&2){let e=s.$implicit,r=m(5);o(),d("ngIf",e.subjectid==r.batchId)}}function bi(t,s){if(t&1&&(a(0,"span"),c(1,gi,2,1,"span",49),i()),t&2){let e=m().$implicit;o(),d("ngForOf",e.marks)}}function vi(t,s){if(t&1&&(a(0,"span"),c(1,bi,2,1,"span",20),i()),t&2){let e=s.$implicit,r=m().$implicit;o(),d("ngIf",e.userId==r.userId)}}function Si(t,s){if(t&1&&(a(0,"tr"),x(1),a(2,"td"),l(3),i(),c(4,_i,2,1,"td",49),v(5,"orderBy"),a(6,"td"),c(7,vi,2,1,"span",49),i(),y(),i()),t&2){let e=s.$implicit,r=m(2);o(3),u(e.regNo),o(),d("ngForOf",S(5,3,r.questionPaperDetails.questions,"quesNumber")),o(3),d("ngForOf",r.markData)}}function Ci(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.avgMarks)}}function xi(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.avgMarks," ")}}function yi(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,xi,2,1,"td",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function Ei(t,s){if(t&1&&(a(0,"th"),c(1,Ci,2,1,"span",20)(2,yi,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function Oi(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.percentage)}}function Ii(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.percentage," ")}}function Ti(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,Ii,2,1,"td",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function ji(t,s){if(t&1&&(a(0,"th"),c(1,Oi,2,1,"span",20)(2,Ti,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function Mi(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.attStudents)}}function wi(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.attStudents," ")}}function ki(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,wi,2,1,"td",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function Ri(t,s){if(t&1&&(a(0,"th"),c(1,Mi,2,1,"span",20)(2,ki,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function Ai(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.maxMarkCanScore)}}function Pi(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;
1o(),g(" ",e.maxMarkCanScore," ")}}function Di(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,Pi,2,1,"td",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function Li(t,s){if(t&1&&(a(0,"th"),c(1,Ai,2,1,"span",20)(2,Di,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function Fi(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.markObtained)}}function Ni(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.markObtained," ")}}function Bi(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,Ni,2,1,"td",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function $i(t,s){if(t&1&&(a(0,"th"),c(1,Fi,2,1,"span",20)(2,Bi,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function Wi(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.attainment)}}function Qi(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.attainment," ")}}function Vi(t,s){if(t&1&&(a(0,"span")(1,"table",52)(2,"tr"),c(3,Qi,2,1,"td",49),i()()()),t&2){let e=m().$implicit;o(3),d("ngForOf",e.subQuestion)}}function qi(t,s){if(t&1&&(a(0,"th"),c(1,Wi,2,1,"span",20)(2,Vi,4,1,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function Yi(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),k("",e.questionNo,"-",e.question,"")}}function Ji(t,s){if(t&1&&(a(0,"span"),l(1),_(2,"br"),i()),t&2){let e=s.$implicit,r=s.index;o(),k(" ",r+1,"-",e.question," ")}}function Ui(t,s){if(t&1&&(a(0,"span"),l(1),_(2,"br"),c(3,Ji,3,2,"span",49),i()),t&2){let e=m().$implicit;o(),k(" ",e.questionNo,"-",e.question," "),o(2),d("ngForOf",e.subQuestion)}}function Hi(t,s){if(t&1&&(a(0,"div"),c(1,Yi,2,2,"span",20)(2,Ui,4,3,"span",20),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.subQuestion==null),o(),d("ngIf",e.subQuestion!=null)}}function Gi(t,s){if(t&1&&(a(0,"th",48),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.coCode,"")}}function zi(t,s){if(t&1&&(a(0,"td"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.obtainedmark,"")}}function Xi(t,s){if(t&1&&(a(0,"tr"),x(1),a(2,"td"),l(3),i(),c(4,zi,2,1,"td",49),v(5,"orderBy"),a(6,"td",53),l(7),i(),y(),i()),t&2){let e=s.$implicit;o(3),u(e.regno),o(),d("ngForOf",S(5,3,e.listOfCoObtainedPerStudent,"coCode")),o(3),g(" ",e.totalMarkObtained,"")}}function Ki(t,s){if(t&1&&(a(0,"th"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.coMaxMark,"")}}function Zi(t,s){if(t&1&&(a(0,"th"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.threshhold,"")}}function en(t,s){if(t&1&&(a(0,"th"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.noOfStudentsAboveThreshHold,"")}}function tn(t,s){if(t&1&&(a(0,"th"),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.level,"")}}function nn(t,s){if(t&1&&(a(0,"td")(1,"b"),l(2),i()()),t&2){let e=s.$implicit;o(2),u(e.coCode)}}function an(t,s){if(t&1&&(a(0,"td",48),l(1),i()),t&2){let e=s.$implicit;o(),g("",e.percentage,"% ")}}function on(t,s){if(t&1&&(a(0,"div")(1,"div",45)(2,"div",23)(3,"div",24)(4,"div",46)(5,"table",47)(6,"thead")(7,"tr")(8,"th",48),l(9,"Q.No"),i(),c(10,ei,3,2,"th",49),v(11,"orderBy"),a(12,"th"),l(13,"Total"),i()(),a(14,"tr")(15,"th",48),l(16,"CO"),i(),c(17,ai,3,2,"th",49),v(18,"orderBy"),a(19,"td"),l(20,"-"),i()(),a(21,"tr")(22,"th",48),l(23,"Max Marks"),i(),c(24,si,3,2,"th",49),v(25,"orderBy"),a(26,"td"),l(27,"-"),i()()(),a(28,"tbody"),c(29,Si,8,6,"tr",49),v(30,"orderBy"),a(31,"tr"),x(32),a(33,"th"),l(34,"Average Marks"),i(),c(35,Ei,3,2,"th",49),v(36,"orderBy"),a(37,"td"),l(38," - "),i(),y(),i(),a(39,"tr")(40,"th"),l(41,"Percentage"),i(),c(42,ji,3,2,"th",49),v(43,"orderBy"),a(44,"td"),l(45," - "),i()(),a(46,"tr")(47,"th"),l(48,"Students attempted"),i(),c(49,Ri,3,2,"th",49),v(50,"orderBy"),a(51,"td"),l(52," - "),i()(),a(53,"tr")(54,"th"),l(55,"Max mark can score"),i(),c(56,Li,3,2,"th",49),v(57,"orderBy"),a(58,"td"),l(59," - "),i()(),a(60,"tr")(61,"th"),l(62,"Marks obtained"),i(),c(63,$i,3,2,"th",49),v(64,"orderBy"),a(65,"td"),l(66," - "),i()(),a(67,"tr")(68,"th"),l(69,"Attainment percentage"),i(),c(70,qi,3,2,"th",49),v(71,"orderBy"),a(72,"td"),l(73," - "),i()()()()()()(),a(74,"div",23)(75,"div",24)(76,"b"),l(77,"Average Marks"),i(),l(78," - Total score/Number of students attempted this question"),_(79,"br"),a(80,"b"),l(81,"Percentage"),i(),l(82," - Percentage of students attempted this question"),_(83,"br"),a(84,"b"),l(85,"Attainment Percentage"),i(),l(86," - Percentage of average marks and max marks"),_(87,"br")(88,"br"),a(89,"label")(90,"strong"),l(91,"Questions"),i()(),c(92,Hi,3,2,"div",49),v(93,"orderBy"),_(94,"br")(95,"br"),i()(),a(96,"div",23)(97,"div",24)(98,"div",46)(99,"table",47)(100,"thead"),_(101,"tr"),a(102,"tr")(103,"th",48),l(104,"REG NO"),i(),c(105,Gi,2,1,"th",50),v(106,"orderBy"),a(107,"th",48),l(108,"TOTAL"),i()()(),a(109,"tbody"),c(110,Xi,8,6,"tr",49),v(111,"orderBy"),a(112,"tr"),x(113),a(114,"th"),l(115,"Max Mar
1k CoWise"),i(),c(116,Ki,2,1,"th",49),v(117,"orderBy"),y(),i(),a(118,"tr"),x(119),a(120,"th"),l(121,"Threshold"),i(),c(122,Zi,2,1,"th",49),v(123,"orderBy"),y(),i(),a(124,"tr"),x(125),a(126,"th"),l(127,"No of students above threshold"),i(),c(128,en,2,1,"th",49),v(129,"orderBy"),y(),i(),a(130,"tr"),x(131),a(132,"th"),l(133,"Level"),i(),c(134,tn,2,1,"th",49),v(135,"orderBy"),y(),i()()()()()(),a(136,"div",23)(137,"div",24)(138,"label")(139,"strong"),l(140,"RUBRICS"),i()(),_(141,"br"),l(142," 50% of Student Above 50% -Level 1(LOW)"),_(143,"br"),l(144," 60% of Student Above 50% -Level 2(MEDIUM)"),_(145,"br"),l(146," 70% of Student Above 50% -Level 3(HIGH)"),_(147,"br")(148,"br"),i()(),a(149,"div",23)(150,"div",24)(151,"div",46)(152,"table",51)(153,"thead")(154,"tr")(155,"th"),l(156,"Attainments for CO's"),i()()(),a(157,"tbody")(158,"tr"),x(159),a(160,"td")(161,"b"),l(162,"Course OutCome"),i()(),c(163,nn,3,1,"td",49),y(),i(),a(164,"tr"),x(165),a(166,"td",48),l(167,"Percentage"),i(),c(168,an,2,1,"td",50),y(),i()()()()()()()()),t&2){let e=m();o(10),d("ngForOf",S(11,19,e.questionPaperDetails.questions,"quesNumber")),o(7),d("ngForOf",S(18,22,e.questionPaperDetails.questions,"quesNumber")),o(7),d("ngForOf",S(25,25,e.questionPaperDetails.questions,"quesNumber")),o(5),d("ngForOf",S(30,28,e.questionWiseMarkList,"regNo")),o(6),d("ngForOf",S(36,31,e.questionPaperDetails.questions,"quesNumber")),o(7),d("ngForOf",S(43,34,e.questionPaperDetails.questions,"quesNumber")),o(7),d("ngForOf",S(50,37,e.questionPaperDetails.questions,"quesNumber")),o(7),d("ngForOf",S(57,40,e.questionPaperDetails.questions,"quesNumber")),o(7),d("ngForOf",S(64,43,e.questionPaperDetails.questions,"quesNumber")),o(7),d("ngForOf",S(71,46,e.questionPaperDetails.questions,"quesNumber")),o(22),d("ngForOf",S(93,49,e.questionPaperDetails.questions,"quesNumber")),o(13),d("ngForOf",S(106,52,e.coDetails.coObtainedThreshhold,"coCode")),o(5),d("ngForOf",S(111,55,e.coDetails.coObtainedPerStudent,"regno")),o(6),d("ngForOf",S(117,58,e.coDetails.coObtainedThreshhold,"coCode")),o(6),d("ngForOf",S(123,61,e.coDetails.coObtainedThreshhold,"coCode")),o(6),d("ngForOf",S(129,64,e.coDetails.coObtainedThreshhold,"coCode")),o(6),d("ngForOf",S(135,67,e.coDetails.coObtainedThreshhold,"coCode")),o(29),d("ngForOf",e.coReport),o(5),d("ngForOf",e.coReport)}}function rn(t,s){t&1&&(a(0,"div",54),_(1,"i",55),a(2,"div",56)(3,"p",57),l(4,"No examination found for the selected batch."),i()()())}var dt=(()=>{class t{departmentService;accYearService;subjectService;testService;regulationService;examinationService;marksService;departments;accyears;dept;accyearId;regulationId;subId;testName;semesters;sem;batchId;accYear;regSubjects;batches;allExamMarkDetails;testList;globalBean;markData;questionPapers;questionPaperId;questionPaperDetails;coDetails;coReport;questionWiseMarkList;resultDiv;subjectWiseDiv;showSubjectMark;questionWiseObeMarkList;overAllMarkReport;show;loadEffect=!1;warning=!1;constructor(e,r,n,p,h,C,M){this.departmentService=e,this.accYearService=r,this.subjectService=n,this.testService=p,this.regulationService=h,this.examinationService=C,this.marksService=M}ngOnInit(){this.getDepartments(),this.semesters=["1","2","3","4","5","6","7","8"]}getDepartments(){this.departmentService.getDepartment().then(e=>{this.departments=e})}getAccyears(e){this.warning=!1,this.show=!1,this.accyearId="",this.sem="",this.subId="",this.batchId="",this.accYear=[],this.regSubjects=[],this.batches=[],this.accYearService.getAcademicByDep(e).then(r=>{this.accyears=r})}getRegulation(e){this.warning=!1,this.show=!1,this.sem="",this.subId="",this.batchId="",this.regSubjects=[],this.batches=[],this.accYearService.getById(e.id).then(r=>{this.accYear=r,this.regulationId=this.accYear.regulationId})}getRegSubjects(e){this.warning=!1,this.show=!1,this.subId="",this.batchId="",this.regulationService.getRegSub(this.dept,this.regulationId,e).then(r=>{this.regSubjects=r.datas})}getBatches(e){this.warning=!1,this.show=!1,this.batchId="",this.subjectService.getActiveBatch(e).then(r=>{this.batches=r,this.batches.sort((n,p)=>n.batchName.localeCompare(p.batchName))})}getTests(e){this.loadEffect=!0,this.warning=!1,this.show=!1,this.testService.getTestsBySubject(e).then(r=>q(this,null,function*(){this.testList=r,this.loadEffect=!1,this.testName=this.testList[0].id,this.source(this.testList[0])}))}source(e){this.testName=e.id,this.questionPapers=e.questionPapers,this.globalBean={};var r=new Array;r.push(this.batchId),this.globalBean.listOfString=r,this.marksService.createMarksList(e.id,"Original",this.globalBean).then(p=>{this.markData=p});for(var n=0;n<this.questionPapers.length;n++)this.questionPapers[n].subjectId==this.batchId&&(this.questionPaperId=this.questionPapers[n].questionPaperId);this.getAllExamMarkReport(this.batchId,this.questionPaperId,e.id)}getAllExamMarkReport(e,r,n){return q(this,null,function*(){yield this.examinationService.getMarkReportQuesionPaperWise(e,r,n).then(p=>{this.questionWiseMarkList=p}),yield this.examinationService.getObeMark(r,e,n).then(p=>{this.questionPaperDetails=p}),yield this.examinationService.getObeQuestiontemp(r,e,n).then(p=>{this.coDetails=p}),yield this.examinationService.obecoWiseReport(r,n,e).then(p=>{this.coReport=p}),this.show=!0})}obeMarkExport(e){this.examinationService.getObeMarkReportQuesionPaperWiseExport(this.questionPaperId,this.testName,e).then(r=>{this.questionWiseObeMarkList=r})}showTotalMark(){this.resultDiv=!1,this.subjectWiseDiv=!0,this.showSubjectMark=!0}calculateTotal(e){for(var r=0,n=0;n<e.length;n++)e[n].mark!="---"&&e[n].mark!="N/A"&&e[n].mark!=""&&e[n].mark.toUpperCase()!="AB"&&(r=r+parseInt(e[n].mark));return r}DownloadOverallExamsMarkReportExcel(e){this.examinationService.getOverallExamMarkReportExcel(e).then(r=>{this.overAllMarkReport=r})}static \u0275fac=function(r){return new(r||t)(f(U),f(J),f(ce),f(Xe),f(H),f($),f(it))};static \u0275cmp=R({type:t,selectors:[["app-obe-and-other-mark-report"]],decls:45,vars:30,consts:[[1,"jp-ims-obe-reports-mark-tab"],[1,"text-muted","small","mb-3"],[1,"jp-dashboard-filter-bar"],[1,"jp-filter-row"],[1,"jp-filter-item"],["for","mark-dept",1,"jp-filter-label"],["id","mark-dept","placeholder","Select degree & department",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable"],[3,"value",4,"ngFor","ngForOf"],["for","mark-acc",1,"jp-filter-label"],["id","mark-acc","placeholder","Select academic year",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","searchable","clearable","ngModel","disabled"],["for","mark-sem",1,"jp-filter-label"],["id","mark-sem","placeholder","Select semester",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["for","mark-subject",1,"jp-filter-label"],["id","mark-subject","placeholder","Select subject",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["for","mark-batch",1,"jp-filter-label"],["id","mark-batch","placeholder","Select batch",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","ngModel","clearable","disabled"],[1,"jp-filter-actions"],[1,"jp-filter-label","d-none","d-md-block"],["type","button",1,"jp-btn","jp-btn-primary","jp-btn-view",3,"click","disabled"],["class","fa fa-eye me-1","aria-hidden","true",4,"ngIf"],[4,"ngIf"],["class","d-inline-flex align-items-center gap-2",4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-3"],[1,"col-12"],["class","jp-alert jp-alert-warning mb-3",4,"ngIf"],[3,"value"],["aria-hidden","true",1,"fa","fa-eye","me-1"],[1,"d-inline-flex","align-items-center","gap-2"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],[1,"row","mt-4"],[1,"col-4"],[1,"col-4","text-end"],[1,"btn","btn-primary",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["class","col-3",4,"ngFor","ngForOf"],[1,"col-3"],[1,"form-check-label"],["type","radio",1,"radio-dimension",3,"click","name","checked"],[1,"alert","alert-warning"],[1,"badge","badge-warning"],[1,"col-12","text-end"],[1,"btn","btn-secondary",3,"click"],[1,"row"],[1,"col-12","text-center"],["id","questionWiseDivId"],[1,"table-responsive"],[1,"table","table-striped","table-hover"],["scope","col"],[4,"ngFor","ngForOf"],["scope","col",4,"ngFor","ngForOf"],[1,"table","table-striped"],["width","100"],[2,"text-align","center"],[1,"jp-alert","jp-alert-warning","mb-3"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","jp-alert-icon"],[1,"jp-alert-content"],[1,"jp-alert-message","mb-0"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"p",1),l(2," Select context and batch, then view or export OBE and other examination mark reports. "),i(),a(3,"div",2)(4,"div",3)(5,"div",4)(6,"label",5),l(7,"Degree & Department"),i(),a(8,"ng-select",6),I("ngModelChange",function(h){return O(n.dept,h)||(n.dept=h),h}),b("change",function(){return n.getAccyears(n.dept)}),c(9,Nt,2,3,"ng-option",7),i()(),a(10,"div",4)(11,"label",8),l(12,"Academic Year"),i(),a(13,"ng-select",9),I("ngModelChange",function(h){return O(n.accyearId,h)||(n.accyearId=h),h}),b("change",function(){return n.getRegulation(n.accyearId)}),c(14,Bt,2,3,"ng-option",7),i()(),a(15,"div",4)(16,"label",10),l(17,"Semester"),i(),a(18,"ng-select",11),I("ngModelChange",function(h){return O(n.sem,h)||(n.sem=h),h}),b("change",function(){return n.getRegSubjects(n.sem)}),c(19,$t,2,2,"ng-option",7),i()(),a(20,"div",4)(21,"label",12),l(22,"Subject"),i(),a(23,"
1ng-select",13),I("ngModelChange",function(h){return O(n.subId,h)||(n.subId=h),h}),b("change",function(){return n.getBatches(n.subId)}),c(24,Wt,2,2,"ng-option",7),i()(),a(25,"div",4)(26,"label",14),l(27,"Batch"),i(),a(28,"ng-select",15),I("ngModelChange",function(h){return O(n.batchId,h)||(n.batchId=h),h}),c(29,Qt,2,2,"ng-option",7),i()(),a(30,"div",16)(31,"label",17),l(32,"\xA0"),i(),a(33,"button",18),b("click",function(){return n.getTests(n.batchId)}),c(34,Vt,1,0,"i",19)(35,qt,2,0,"span",20)(36,Yt,3,0,"span",21),i()()()(),c(37,Jt,7,0,"div",22)(38,Ht,2,1,"div",22),a(39,"div",23)(40,"div",24),c(41,Gt,5,0,"div",20),i()(),c(42,zt,15,0,"div",20)(43,on,169,70,"div",20)(44,rn,5,0,"div",25),i()),r&2&&(o(8),E("ngModel",n.dept),d("clearable",!1),o(),d("ngForOf",n.departments),o(4),d("searchable",!0)("clearable",!1),E("ngModel",n.accyearId),d("disabled",!n.dept),o(),d("ngForOf",n.accyears),o(4),E("ngModel",n.sem),d("clearable",!1)("disabled",!n.accyearId),o(),d("ngForOf",n.semesters),o(4),E("ngModel",n.subId),d("clearable",!1)("disabled",!n.sem),o(),d("ngForOf",n.regSubjects),o(4),E("ngModel",n.batchId),d("clearable",!1)("disabled",!n.subId),o(),d("ngForOf",n.batches),o(4),d("disabled",!n.dept||!n.accyearId||!n.sem||!n.subId||!n.batchId||n.loadEffect),o(),d("ngIf",!n.loadEffect),o(),d("ngIf",!n.loadEffect),o(),d("ngIf",n.loadEffect),o(),d("ngIf",n.show),o(),d("ngIf",n.show),o(3),d("ngIf",(n.questionWiseMarkList==null?null:n.questionWiseMarkList.length)==0&&n.subjectWiseDiv),o(),d("ngIf",n.show),o(),d("ngIf",n.show),o(),d("ngIf",(n.testList==null?null:n.testList.length)==0))},dependencies:[D,L,A,P,N,F,B]})}return t})();var sn=()=>["CO1","CO2","CO3","CO4","CO5"];function dn(t,s){if(t&1&&(a(0,"ng-option",18),l(1),i()),t&2){let e=s.$implicit;d("value",e.id),o(),u(e.subjectName)}}function cn(t,s){if(t&1){let e=w();a(0,"div",24)(1,"input",25),I("ngModelChange",function(n){T(e);let p=m(2);return O(p.selectedBatch,n)||(p.selectedBatch=n),j(n)}),b("ngModelChange",function(n){T(e);let p=m(2);return j(p.fetchTestResults(n))}),i(),a(2,"label",26),l(3),i()()}if(t&2){let e=s.$implicit,r=m(2);o(),d("value",e.id),E("ngModel",r.selectedBatch),o(2),u(e.batchName)}}function pn(t,s){if(t&1&&(a(0,"div",19)(1,"div")(2,"span",20),l(3,"Batches:"),i()(),a(4,"div",21)(5,"div",22),c(6,cn,4,3,"div",23),i()()()),t&2){let e=m();o(6),d("ngForOf",e.batches)}}function mn(t,s){t&1&&_(0,"div",27)}function hn(t,s){t&1&&(a(0,"span",45),_(1,"i",46),l(2," You have unsaved changes "),i())}function un(t,s){if(t&1){let e=w();a(0,"button",52),b("click",function(){T(e);let n=m(3);return j(n.discardChanges())}),l(1," Discard Changes "),i()}}function _n(t,s){t&1&&_(0,"span",53)}function fn(t,s){if(t&1){let e=w();a(0,"div",47)(1,"div",48),c(2,un,2,0,"button",49),a(3,"button",50),b("click",function(){T(e);let n=m(2);return j(n.saveThresholds())}),c(4,_n,1,0,"span",51),l(5," Apply Changes "),i()()()}if(t&2){let e=m(2);o(2),d("ngIf",e.hasUnsavedChanges),o(),d("disabled",e.isLoading||!e.hasUnsavedChanges),o(),d("ngIf",e.isLoading)}}function gn(t,s){if(t&1){let e=w();a(0,"div",28)(1,"div",29)(2,"div",30)(3,"div",31)(4,"span",20),l(5,"Threshold Configuration"),i(),c(6,hn,3,0,"span",32),i(),a(7,"button",33),b("click",function(){T(e);let n=m();return j(n.resetThresholds())}),l(8," Reset "),i()(),a(9,"div",34)(10,"div",35)(11,"input",36),I("ngModelChange",function(n){T(e);let p=m();return O(p.isThresholdEditable,n)||(p.isThresholdEditable=n),j(n)}),i(),a(12,"label",37),l(13," Enable editing "),i()(),a(14,"div",38)(15,"div",39)(16,"input",40),I("ngModelChange",function(n){T(e);let p=m();return O(p.editValues.level1,n)||(p.editValues.level1=n),j(n)}),b("ngModelChange",function(){T(e);let n=m();return j(n.onThresholdChange())}),i()(),a(17,"div",41),l(18," Level 1 (low) "),i()(),a(19,"div",38)(20,"div",39)(21,"input",40),I("ngModelChange",function(n){T(e);let p=m();return O(p.editValues.level2,n)||(p.editValues.level2=n),j(n)}),b("ngModelChange",function(){T(e);let n=m();return j(n.onThresholdChange())}),i()(),a(22,"div",42),l(23," Level 2 (medium) "),i()(),a(24,"div",43)(25,"div",39)(26,"input",40),I("ngModelChange",function(n){T(e);let p=m();return O(p.editValues.level3,n)||(p.editValues.level3=n),j(n)}),b("ngModelChange",function(){T(e);let n=m();return j(n.onThresholdChange())}),i()(),a(27,"div",42),l(28," Level 3 (High) "),i()(),c(29,fn,6,3,"div",44),i()()()}if(t&2){let e=m();o(6),d("ngIf",e.hasUnsavedChanges),o(5),E("ngModel",e.isThresholdEditable),o(5),d("disabled",!e.isThresholdEditable),E("ngModel",e.editV
1alues.level1),o(5),d("disabled",!e.isThresholdEditable),E("ngModel",e.editValues.level2),o(5),d("disabled",!e.isThresholdEditable),E("ngModel",e.editValues.level3),o(3),d("ngIf",e.isThresholdEditable)}}function bn(t,s){t&1&&(a(0,"div",9)(1,"div",54)(2,"label",55)(3,"span",20),l(4,"Batches:"),i()()(),a(5,"div",56)(6,"span",57),l(7,"Warning"),i(),l(8," \xA0Sorry!, No data found. "),i()())}function vn(t,s){t&1&&_(0,"span",75)}function Sn(t,s){t&1&&_(0,"i",76)}function Cn(t,s){if(t&1&&(x(0),a(1,"th",77),l(2),i(),y()),t&2){let e=s.$implicit;o(),G("colspan",((e.coObtainedThreshhold==null?null:e.coObtainedThreshhold.length)||0)+1),o(),g(" ",e.test.testName," ")}}function xn(t,s){if(t&1&&(a(0,"th",77),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.coCode," ")}}function yn(t,s){if(t&1&&(x(0),c(1,xn,2,1,"th",78),v(2,"orderBy"),y()),t&2){let e=m().$implicit;o(),d("ngForOf",S(2,1,e.coObtainedPerStudent[0]==null?null:e.coObtainedPerStudent[0].listOfCoObtainedPerStudent,"coCode"))}}function En(t,s){if(t&1&&(a(0,"th",77),l(1),i()),t&2){let e=s.$implicit;o(),g(" ",e.coCode," ")}}function On(t,s){if(t&1&&(x(0),c(1,En,2,1,"th",78),v(2,"orderBy"),y()),t&2){let e=m().$implicit;o(),d("ngForOf",S(2,1,e.coObtainedThreshhold,"coCode"))}}function In(t,s){if(t&1&&(x(0),c(1,yn,3,4,"ng-container",15)(2,On,3,4,"ng-container",15),a(3,"th",77),l(4," Total "),i(),y()),t&2){let e=s.$implicit;o(),d("ngIf",e.coObtainedPerStudent&&(e.coObtainedPerStudent[0]==null||e.coObtainedPerStudent[0].listOfCoObtainedPerStudent==null?null:e.coObtainedPerStudent[0].listOfCoObtainedPerStudent.length)>0),o(),d("ngIf",!e.coObtainedPerStudent||e.coObtainedPerStudent.length===0)}}function Tn(t,s){if(t&1&&(a(0,"td",77),l(1),i()),t&2){let e=s.$implicit,r=m(2).$implicit,n=m().$implicit,p=m(2);o(),g(" ",p.getMarksForCO(n.regno,e.coCode,r)," ")}}function jn(t,s){if(t&1&&(x(0),c(1,Tn,2,1,"td",78),v(2,"orderBy"),y()),t&2){let e=m().$implicit;o(),d("ngForOf",S(2,1,e.coObtainedPerStudent[0]==null?null:e.coObtainedPerStudent[0].listOfCoObtainedPerStudent,"coCode"))}}function Mn(t,s){t&1&&(a(0,"td",77),l(1," - "),i())}function wn(t,s){if(t&1&&(x(0),c(1,Mn,2,0,"td",78),v(2,"orderBy"),y()),t&2){let e=m().$implicit;o(),d("ngForOf",S(2,1,e.coObtainedThreshhold,"coCode"))}}function kn(t,s){if(t&1&&(x(0),c(1,jn,3,4,"ng-container",15)(2,wn,3,4,"ng-container",15),a(3,"td",77),l(4),i(),y()),t&2){let e=s.$implicit,r=m().$implicit,n=m(2);o(),d("ngIf",e.coObtainedPerStudent&&(e.coObtainedPerStudent[0]==null||e.coObtainedPerStudent[0].listOfCoObtainedPerStudent==null?null:e.coObtainedPerStudent[0].listOfCoObtainedPerStudent.length)>0),o(),d("ngIf",!e.coObtainedPerStudent||e.coObtainedPerStudent.length===0),o(2),g(" ",n.getTotalMarksForTest(r.regno,e)," ")}}function Rn(t,s){if(t&1&&(a(0,"tr")(1,"td",71),l(2),i(),a(3,"td",71),l(4),i(),c(5,kn,5,3,"ng-container",66),i()),t&2){let e=s.$implicit,r=s.index,n=m(2);o(2),u(r+1),o(2),u(e.regno),o(),d("ngForOf",n.testResults)}}function An(t,s){if(t&1&&(x(0),a(1,"th",77),l(2),i(),y()),t&2){let e=s.$implicit;o(),G("colspan",e.coObtainedThreshhold==null?null:e.coObtainedThreshhold.length),o(),g(" ",e.test.testName," ")}}function Pn(t,s){if(t&1&&(x(0),a(1,"th",77),l(2),i(),y()),t&2){let e=s.$implicit;o(2),u(e.coCode)}}function Dn(t,s){if(t&1&&(x(0),c(1,Pn,3,1,"ng-container",66),v(2,"orderBy"),y()),t&2){let e=s.$implicit;o(),d("ngForOf",S(2,1,e.coObtainedThreshhold,"coCode"))}}function Ln(t,s){if(t&1&&(x(0),a(1,"td",77),l(2),i(),y()),t&2){let e=s.$implicit,r=m().$implicit,n=m(2);o(2),u(n.getMaxMarkForCO(r,e.coCode))}}function Fn(t,s){if(t&1&&(x(0),c(1,Ln,3,1,"ng-container",66),v(2,"orderBy"),y()),t&2){let e=s.$implicit;o(),d("ngForOf",S(2,1,e.coObtainedThreshhold,"coCode"))}}function Nn(t,s){if(t&1&&(x(0),a(1,"td",77),l(2),i(),y()),t&2){let e=s.$implicit,r=m().$implicit,n=m(2);o(2),u(n.getThresholdForCO(r,e.coCode))}}function Bn(t,s){if(t&1&&(x(0),c(1,Nn,3,1,"ng-container",66),v(2,"orderBy"),y()),t&2){let e=s.$implicit;o(),d("ngForOf",S(2,1,e.coObtainedThreshhold,"coCode"))}}function $n(t,s){if(t&1&&(x(0),a(1,"td",77),l(2),i(),y()),t&2){let e=s.$implicit,r=m().$implicit,n=m(2);o(2),u(n.getStudentsAboveThresholdForCO(r,e.coCode))}}function Wn(t,s){if(t&1&&(x(0),c(1,$n,3,1,"ng-container",66),v(2,"orderBy"),y()),t&2){let e=s.$implicit;o(),d("ngForOf",S(2,1,e.coObtainedThreshhold,"coCode"))}}function Qn(t,s){if(t&1&&(x(0),a(1,"td",77),l(2),i(),y()),t&2){let e=s.$implicit,r=m().$implicit,n=m(2);o(2),u(n.getLevelForCO(r,e.coCode))}}function Vn(t,s){if(t&1&&(x(0),c(1,Qn,3,1,"ng-container",66),v(2,"orderBy"),y()),t&2){let e=s.$implicit;o(),d("ngForOf",S(2,1,e.coObtainedThreshhold,"coCode"))}}function qn(t,s){if(t&1){let e=w();a(0,"div")(1,"div",58)(2,"div",59)(3,"button",60),b("click",function(){T(e);let n=m();return j(n.exportDirectAttainmentData())}),c(4,vn,1,0,"span",61)(5,Sn,1,0,"i",62),l(6," Export to Excel "),i()(),a(7,"div",63)(8,"table",64)(9,"thead")(10,"tr")(11,"th",65),l(12,"#"),i(),a(13,"th",65),l(14,"REG NO"),i(),c(15,Cn,3,2,"ng-container",66),i(),a(16,"tr"),c(17,In,5,2,"ng-container",66),i()(),a(18,"tbody"),c(19,Rn,
16,3,"tr",66),i()()(),a(20,"div",67)(21,"div",68)(22,"table",69)(23,"thead")(24,"tr"),_(25,"th",65),c(26,An,3,2,"ng-container",66),i(),a(27,"tr"),c(28,Dn,3,4,"ng-container",66),i()(),a(29,"tbody")(30,"tr",70)(31,"th",71),l(32,"Max Mark CoWise"),i(),c(33,Fn,3,4,"ng-container",66),i(),a(34,"tr",70)(35,"th",71),l(36,"Threshold"),i(),c(37,Bn,3,4,"ng-container",66),i(),a(38,"tr")(39,"th",71),l(40,"No of students above threshold"),i(),c(41,Wn,3,4,"ng-container",66),i(),a(42,"tr")(43,"th",71),l(44,"Level"),i(),c(45,Vn,3,4,"ng-container",66),i()()()(),a(46,"div",72)(47,"h6",73),l(48,"RUBRICS"),i(),a(49,"p",74),l(50),i(),a(51,"p",74),l(52),i(),a(53,"p",74),l(54),i()()()()()}if(t&2){let e=m();o(3),d("disabled",e.isExporting),o(),d("ngIf",e.isExporting),o(),d("ngIf",!e.isExporting),o(10),d("ngForOf",e.testResults),o(2),d("ngForOf",e.testResults),o(2),d("ngForOf",e.allStudents),o(7),d("ngForOf",e.testResults),o(2),d("ngForOf",e.testResults),o(5),d("ngForOf",e.testResults),o(4),d("ngForOf",e.testResults),o(4),d("ngForOf",e.testResults),o(4),d("ngForOf",e.testResults),o(5),g("",e.thresholdLevels.level1,"% of Student Above 50% -Level 1(LOW)"),o(2),g("",e.thresholdLevels.level2,"% of Student Above 50% -Level 2(MEDIUM)"),o(2),g("",e.thresholdLevels.level3,"% of Student Above 50% -Level 3(HIGH)")}}function Yn(t,s){t&1&&(a(0,"div",79)(1,"span",57),l(2,"Warning"),i(),l(3," \xA0No test results available for the selected batch. "),i())}function Jn(t,s){if(t&1&&(x(0),a(1,"th",77),l(2),i(),y()),t&2){let e=s.$implicit;o(2),u(e.test.testName)}}function Un(t,s){if(t&1&&(a(0,"td",77),l(1),i()),t&2){let e=s.$implicit,r=m().$implicit,n=m(2);o(),g(" ",n.getCoLevelForDisplay(e,r)," ")}}function Hn(t,s){if(t&1&&(a(0,"tr")(1,"th"),l(2),i(),c(3,Un,2,1,"td",78),a(4,"td",81),l(5),i()()),t&2){let e=s.$implicit,r=m(2);o(2),u(e),o(),d("ngForOf",r.testResults),o(2),g(" ",r.calculateAverageLevelForCO(e)," ")}}function Gn(t,s){if(t&1&&(a(0,"div",67)(1,"h6",73),l(2,"CO Attainment Level"),i(),a(3,"div",68)(4,"table",69)(5,"thead")(6,"tr")(7,"th",77),l(8,"COs"),i(),c(9,Jn,3,1,"ng-container",66),a(10,"th",80),l(11,"Average"),i()()(),a(12,"tbody"),c(13,Hn,6,3,"tr",66),i()()()()),t&2){let e=m();o(9),d("ngForOf",e.testResults),o(4),d("ngForOf",Y(2,sn))}}var ct=(()=>{class t{regulationService;subjectService;examService;toastr;currentSelection={deptId:"",accYearId:"",subData:{deptId:"",regulationId:"",sem:""}};subId="";regSubjects=[];batches=[];testResults=[];selectedBatch=null;allStudents=[];isLoading=!1;isExporting=!1;selectedTab=0;isThresholdEditable=!1;editValues={level1:50,level2:60,level3:70};thresholdLevels={level1:50,level2:60,level3:70};initialThresholdLevels={level1:50,level2:60,level3:70};hasUnsavedChanges=!1;constructor(e,r,n,p){this.regulationService=e,this.subjectService=r,this.examService=n,this.toastr=p}ngOnInit(){}unloadNotification(e){this.hasUnsavedChanges&&(e.returnValue=!0)}exportDirectAttainmentData(){if(!this.selectedBatch||this.testResults.length===0){this.toastr.warning("No data available to export","Export Failed");return}this.isExporting=!0,this.examService.exportDirectAttainmentData(this.selectedBatch,this.thresholdLevels).then(()=>{this.isExporting=!1,this.toastr.success("Export completed successfully","Success")}).catch(e=>{console.error("Error exporting data:",e),this.isExporting=!1,this.toastr.error("Failed to export data","Export Error")})}onThresholdChange(){if(this.isThresholdEditable){let e=this.editValues.level1!==this.thresholdLevels.level1,r=this.editValues.level2!==this.thresholdLevels.level2,n=this.editValues.level3!==this.thresholdLevels.level3;this.hasUnsavedChanges=e||r||n}}discardChanges(){this.editValues=V({},this.thresholdLevels),this.hasUnsavedChanges=!1,this.toastr.info("Changes discarded","Information")}resetThresholds(){confirm("Are you sure you want to reset threshold values to the original defaults?")&&(this.editValues=V({},this.initialThresholdLevels),this.thresholdLevels=V({},this.initialThresholdLevels),this.selectedBatch&&(this.isLoading=!0,this.fetchTestResultsWithThresholds(this.selectedBatch,this.thresholdLevels)),this.hasUnsavedChanges=!1,this.toastr.success("Threshold values have been reset to defaults","Reset Successful"))}saveThresholds(){if(!this.editValues.level1&&this.editValues.level1!==0||!this.editValues.level2&&this.editValues.level2!==0||!this.editValues.level3&&this.editValues.level3!==0){this.toastr.error("Threshold values cannot be empty","Invalid Values");return}let e=Number(this.editValues.level1),r=Number(this.editValues.level2),n=Number(this.editValues.level3);if(isNaN(e)||isNaN(r)||isNaN(n)){this.toastr.error("Threshold values must be valid numbers","Invalid Values");return}if(e>=r||r>=n||e<0||n>100){this.toastr.error("Level 1 must be less than Level 2, which must be less than Level 3. Values must be between 0 and 100.","Invalid Values");return}if(!this.subId||!this.selectedBatch){this.toastr.warning("Please select a subject and batch before saving thresholds","Selection Required");return}this.editValues={level1:e,level2:r,level3:n},this.thresholdLevels=V({},this.editValues),this.isLoading=!0,this.fetchTestResultsWithThresholds(this.selectedBatch,this.thresholdLevels),this.hasUnsavedChanges=!1,this.toastr.success("Threshold values have been applied","Success")}handleSelectionChange(e){this.currentSelection=e,this.getRegSubjects(this.currentSelection.subData.deptId,this.currentSelection.subData.regulationId,this.currentSelection.subData.sem)}getRegSubjects(e,r,n){this.regulationService.getRegSub(e,r,n).then(p=>{this.regSubjects=p.datas||[]}).catch(p=>{console.error("Error fetching regulation subjects:",p),this.toastr.error("Failed to load subjects","Error")})}getBatches(e){this.testResults=[],this.allStudents=[],this.selectedBatch=null,this.isThresholdEditable=!1,this.hasUnsavedChanges=!1,this.thresholdLevels={level1:50,level2:60,level3:70},this.editValues=V({},this.thresholdLevels),this.initialThresholdLevels=V({},this.thresholdLevels),this.subjectService.getSubjectsByRegSubId(this.currentSelection.accYearId,e,this.currentSelection.subData.sem).then(r=>{this.batches=r||[],this.batches.sort((n,p)=>n.batchName.localeCompare(p.batchName))}).catch(r=>{console.error("Error fetching batches:",r),this.batches=[],this.toastr.error("Failed to load batches","Error")})}fetchTestResults(e){this.fetchTestResultsWithThresholds(e,null)}fetchTestResultsWithThresholds(e,r){this.selectedBatch=e,this.isLoading=!0,this.examService.getObeAllMark(e,r).then(n=>
1{n&&n.testWiseResults&&n.testWiseResults.length>0?(this.testResults=n.testWiseResults,this.extractAllStudents(),n.thresholdLevels&&(this.thresholdLevels={level1:n.thresholdLevels.level1||50,level2:n.thresholdLevels.level2||60,level3:n.thresholdLevels.level3||70},r||(this.initialThresholdLevels=V({},this.thresholdLevels)),this.isThresholdEditable||(this.editValues=V({},this.thresholdLevels)))):(this.testResults=[],this.allStudents=[],this.selectedBatch&&this.toastr.info("No test results available for the selected batch","Information")),this.isLoading=!1,this.hasUnsavedChanges=!1}).catch(n=>{console.error("Error fetching test results:",n),this.testResults=[],this.allStudents=[],this.isLoading=!1,this.toastr.error("Failed to update threshold levels","Error")})}extractAllStudents(){let e=new Map;this.testResults.forEach(r=>{r.coObtainedPerStudent&&r.coObtainedPerStudent.length>0&&r.coObtainedPerStudent.forEach(n=>{e.has(n.regno)||e.set(n.regno,n)})}),this.allStudents=Array.from(e.values()).sort((r,n)=>r.regno.localeCompare(n.regno))}getMarksForCO(e,r,n){if(!n.coObtainedPerStudent||n.coObtainedPerStudent.length===0)return"-";let p=n.coObtainedPerStudent?.find(C=>C.regno===e);return p?p?.listOfCoObtainedPerStudent?.find(C=>C.coCode===r)?.obtainedmark||0:"-"}getTotalMarksForTest(e,r){if(!r.coObtainedPerStudent||r.coObtainedPerStudent.length===0)return"-";let n=r.coObtainedPerStudent.find(p=>p.regno===e);return n?n.totalMarkObtained||0:"-"}getMaxMarkForCO(e,r){return e.coObtainedThreshhold?.find(p=>p.coCode===r)?.coMaxMark||0}getThresholdForCO(e,r){return e.coObtainedThreshhold?.find(p=>p.coCode===r)?.threshhold||0}getStudentsAboveThresholdForCO(e,r){return e.coObtainedThreshhold?.find(p=>p.coCode===r)?.noOfStudentsAboveThreshHold||0}getLevelForCO(e,r){return e.coObtainedThreshhold?.find(p=>p.coCode===r)?.level||0}getAllUniqueCOs(){return["CO1","CO2","CO3","CO4","CO5"]}getCoLevelForDisplay(e,r){if(!e||!e.coObtainedThreshhold)return"-";let n=e.coObtainedThreshhold.find(p=>p.coCode===r);return n&&n.level?.toString()||"-"}calculateAverageLevelForCO(e){if(!this.testResults||this.testResults.length===0)return"-";let r=0,n=0;return this.testResults.forEach(p=>{if(p.coObtainedThreshhold){let h=p.coObtainedThreshhold.find(C=>C.coCode===e);h&&h.level&&(r+=h.level,n++)}}),n>0?(r/n).toFixed(1):"-"}static \u0275fac=function(r){return new(r||t)(f(H),f(ce),f($),f(de))};static \u0275cmp=R({type:t,selectors:[["app-direct-co-po"]],hostBindings:function(r,n){r&1&&b("beforeunload",function(h){return n.unloadNotification(h)},!1,Te)},decls:20,vars:10,consts:[[1,"jp-ims-obe-reports-direct-tab"],[1,"text-muted","small","mb-3"],[1,"jp-dashboard-filter-bar"],[3,"selectionChange"],[1,"jp-filter-row","mt-3"],[1,"jp-filter-item"],["for","direct-sub
1ject",1,"jp-filter-label"],["id","direct-subject","placeholder","Select subject",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-4"],["class","col-md-5",4,"ngIf"],["class","col-md-3",4,"ngIf"],["class","col-md-4",4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-3"],[4,"ngIf"],["class","alert alert-warning mt-3",4,"ngIf"],["class","mt-4",4,"ngIf"],[3,"value"],[1,"col-md-5"],[1,"fs-6","fw-semibold"],[1,"mt-2"],[1,"d-flex","flex-wrap"],["class","form-check col-12 my-2",4,"ngFor","ngForOf"],[1,"form-check","col-12","my-2"],["type","radio",1,"form-check-input",3,"ngModelChange","value","ngModel"],[1,"form-check-label"],[1,"col-md-3"],[1,"col-md-4"],[1,"threshold-config-container","border"],[1,"border-bottom","p-2","bg-light","d-flex","justify-content-between","align-items-center"],[1,"d-flex","align-items-center"],["class","unsaved-changes-indicator ms-2",4,"ngIf"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"card-body"],[1,"form-check","mb-3","d-flex","align-items-center"],["type","checkbox","id","enableThresholdEdit",1,"form-check-input",3,"ngModelChange","ngModel"],["for","enableThresholdEdit",1,"form-check-label","ms-2"],[1,"row","mb-2"],[1,"col-2"],["type","text","pattern","[0-9]*",1,"form-control","threshold-input",3,"ngModelChange","disabled","ngModel"],[1,"col-4"],[1,"col-6"],[1,"row","mb-3"],["class","text-end",4,"ngIf"],[1,"unsaved-changes-indicator","ms-2"],[1,"bi","bi-exclamation-triangle-fill","text-warning"],[1,"text-end"],[1,"btn-group"],["class","btn btn-secondary btn-sm me-2",3,"click",4,"ngIf"],[1,"btn","btn-success","btn-sm",3,"click","disabled"],["class","spinner-border spinner-border-sm","role","status","aria-hidden","true",4,"ngIf"],[1,"btn","btn-secondary","btn-sm","me-2",3,"click"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],[1,"col-12","text-start"],[1,"form-label"],[1,"alert","alert-warning"],[1,"badge","bg-warning","text-dark"],[1,"col-12"],[1,"text-end","mb-3"],[1,"btn","btn-success",3,"click","disabled"],["class","spinner-border spinner-border-sm me-1","role","status","aria-hidden","true",4,"ngIf"],["class","fa fa-file-excel me-1",4,"ngIf"],[1,"table-container",2,"overflow-x","auto","max-width","100%"],[1,"table","table-striped","table-hover"],["rowspan","2",1,"align-middle","sticky-col"],[4,"ngFor","ngForOf"],[1,"mt-4"],[1,"table-responsive"],[1,"table","table-bordered"],[1,"bg-light"],[1,"sticky-col"],[1,"mt-3"],[1,"fw-bold"],[1,"mb-1"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm","me-1"],[1,"fa","fa-file-excel","me-1"],[1,"text-center"],["class","text-center",4,"ngFor","ngForOf"],[1,"alert","alert-warning","mt-3"],[1,"text-center","bg-light"],[1,"text-center","bg-light","fw-bold"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"p",1),l(2," Configure thresholds and view direct CO attainment by batch and assessment. "),i(),a(3,"div",2)(4,"app-sem-dropdown",3),b("selectionChange",function(h){return n.handleSelectionChange(h)}),i(),a(5,"div",4)(6,"div",5)(7,"label",6),l(8,"Subject"),i(),a(9,"ng-select",7),I("ngModelChange",function(h){return O(n.subId,h)||(n.subId=h),h}),b("change",function(){return n.getBatches(n.subId)}),c(10,dn,2,2,"ng-option",8),i()()()(),a(11,"div",9),c(12,pn,7,1,"div",10)(13,mn,1,0,"div",11)(14,gn,30,9,"div",12),i(),c(15,bn,9,0,"div",13),a(16,"div",14),c(17,qn,55,15,"div",15)(18,Yn,4,0,"div",16)(19,Gn,14,3,"div",17),i()()),r&2&&(o(9),E("ngModel",n.subId),d("clearable",!1),o(),d("ngForOf",n.regSubjects),o(2),d("ngIf",n.batches&&n.batches.length>0),o(),d("ngIf",n.batches&&n.batches.length>0),o(),d("ngIf",n.testResults.length>0),o(),d("ngIf",n.subId&&n.batches&&n.batches.length===0),o(2),d("ngIf",n.testResults.length>0),o(),d("ngIf",n.selectedBatch&&n.testResults.length===0),o(),d("ngIf",n.testResults.length>0))},dependencies:[$e,Be,We,D,Qe,L,A,P,N,F,Ke,B],styles:[".threshold-config-container[_ngcontent-%COMP%]{border-radius:.5rem;overflow:hidden}.threshold-input[_ngcontent-%COMP%]{max-width:4rem}.sticky-col[_ngcontent-%COMP%]{position:sticky;left:0;background:#fff;z-index:1}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}"]})}return t})();function zn(t,s){if(t&1&&(a(0,"ng-option",20),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),k(" ",e.degreeName," - ",e.departmentName," ")}}function Xn(t,s){if(t&1&&(a(0,"ng-option",20),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),k(" ",e.startYear,"-",e.endYear," ")}}function Kn(t,s){if(t&1&&(a(0,"ng-option",20),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),u(e.label)}}function Zn(t,s){if(t&1&&(a(0,"ng-option",20),l(1),i()),t&2){let e=s.$implicit;d("value",e),o(),u(e.subjectName)}}function ea(t,s){if(t&1&&(a(0,"span",25),l(1),i()),t&2){let e=s.$implicit;o(),u(e.batchName)}}function ta(t,s){if(t&1&&(a(0,"div",21)(1,"span",22),l(2,"Batches"),i(),c(3,ea,2,1,"span",23),a(4,"span",24),l(5),i()()),t&2){let e=m();o(3),d("ngForOf",e.batches),o(2),Me("",e.batches.length," batch(es) \xB7 ",e.yearOfBatch," ",e.semType,"")}}function ia(t,s){if(t&1&&(a(0,"span",32),l(1," Status: "),a(2,"strong"),l(3),i()()),t&2){let e=m(2);o(3),u(e.activeJobStatus)}}
1function na(t,s){if(t&1&&(a(0,"div",26),_(1,"i",27),a(2,"div",28)(3,"p",29),l(4),i(),a(5,"p",30),l(6," Your report is being prepared in the background. Feel free to browse elsewhere \u2014 we will refresh automatically when it is ready. "),i(),a(7,"p",31)(8,"span",32),_(9,"i",33),l(10),i(),c(11,ia,4,1,"span",34),a(12,"span"),_(13,"i",35),l(14," Next check in "),a(15,"strong"),l(16),i()()()()()),t&2){let e=m();o(4),u(e.waitMessage),o(6),g(" Waiting ",e.formatElapsed(e.jobElapsedSec)," "),o(),d("ngIf",e.activeJobStatus),o(5),g("",e.nextPollInSec,"s")}}function aa(t,s){if(t&1&&(a(0,"div",36),_(1,"i",37),a(2,"div",28)(3,"p",38),l(4),i()()()),t&2){let e=m();o(4),u(e.jobPollError)}}function oa(t,s){t&1&&(a(0,"div",26),_(1,"i",27),a(2,"div",28)(3,"p",38),l(4,"Loading report snapshot\u2026"),i()()())}function ra(t,s){if(t&1&&(a(0,"div",36),_(1,"i",37),a(2,"div",28)(3,"p",38),l(4),i()()()),t&2){let e=m();o(4),u(e.loadError)}}function la(t,s){t&1&&(a(0,"div",39),_(1,"i",40),a(2,"div",28)(3,"p",38),l(4," No report snapshot exists for this selection yet. Click "),a(5,"strong"),l(6,"Recompute"),i(),l(7," to prepare one, then use "),a(8,"strong"),l(9,"Refresh"),i(),l(10," after a few minutes to load it here. "),i()()())}function sa(t,s){if(t&1&&(a(0,"small",56),l(1),a(2,"span",57),l(3,"Average across batches"),i()()),t&2){let e=m(2);o(),g(" ",(e.finalDirectCo==null?null:e.finalDirectCo.regSubName)||(e.sub==null?null:e.sub.subjectName)," ")}}function da(t,s){if(t&1&&(a(0,"div",58)(1,"span",24),_(2,"i",59),l(3," Report generated on "),a(4,"strong"),l(5),v(6,"date"),i(),l(7," at "),a(8,"strong"),l(9),v(10,"date"),i(),l(11,". "),i()()),t&2){let e=m(2);o(5),u(S(6,2,e.snapshotComputedAt,"dd/MM/yyyy")),o(4),u(S(10,5,e.snapshotComputedAt,"HH:mm"))}}function ca(t,s){t&1&&(a(0,"div",60),l(1," No snapshot saved yet. Click "),a(2,"strong"),l(3,"Recompute"),i(),l(4," to generate one. "),i())}function pa(t,s){t&1&&(a(0,"span"),_(1,"i",61),l(2,"Recompute "),i())}function ma(t,s){t&1&&(a(0,"span",62),_(1,"span",63),l(2," Queuing\u2026 "),i())}function ha(t,s){t&1&&(a(0,"span"),_(1,"i",64),l(2,"Export Excel "),i())}function ua(t,s){t&1&&(a(0,"span",62),_(1,"span",63),l(2," Queuing\u2026 "),i())}function _a(t,s){if(t&1&&(a(0,"th",72),l(1),i()),t&2){let e=s.$implicit;o(),u(e)}}function fa(t,s){if(t&1&&(a(0,"td",73),l(1),i()),t&2){let e=s.$implicit,r=m(3);o(),u(r.getFinalCoLevel(e))}}function ga(t,s){if(t&1&&(a(0,"td",73),l(1),i()),t&2){let e=s.$implicit,r=m(3);o(),u(r.getFinalCoAttainmentPct(e))}}function ba(t,s){if(t&1&&(a(0,"div",65)(1,"table",66)(2,"thead",67)(3,"tr")(4,"th",68),l(5,"CO"),i(),c(6,_a,2,1,"th",69),i()(),a(7,"tbody")(8,"tr")(9,"th",70),l(10,"Level (0\u20133)"),i(),c(11,fa,2,1,"td",71),i(),a(12,"tr")(13,"th",70),l(14,"Attainment %"),i(),c(15,ga,2,1,"td",71),i()()()()),t&2){let e=m(2);o(6),d("ngForOf",e.coCodes),o(5),d("ngForOf",e.coCodes),o(4),d("ngForOf",e.coCodes)}}function va(t,s){if(t&1&&(a(0,"span",87),l(1),i()),t&2){let e=m().$implicit;o(),u(e.testCode)}}function Sa(t,s){t&1&&(a(0,"span",88),l(1,"OBE marks"),i())}function Ca(t,s){if(t&1&&(a(0,"li",84),c(1,va,2,1,"span",85),l(2),c(3,Sa,2,0,"span",86),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.testCode),o(),g(" ",e.testName," "),o(),d("ngIf",e.hasCoMarks)}}function xa(t,s){if(t&1&&(a(0,"ul",82),c(1,Ca,4,3,"li",83),i()),t&2){let e=m().$implicit;o(),d("ngForOf",e.tests)}}function ya(t,s){t&1&&(a(0,"p",89),l(1," No examinations linked for this batch. "),i())}function Ea(t,s){if(t&1&&(a(0,"div",77)(1,"h4",78),_(2,"i",79),l(3),i(),c(4,xa,2,1,"ul",80)(5,ya,2,0,"p",81),i()),t&2){let e=s.$implicit;o(3),g(" ",e.batchName," "),o(),d("ngIf",e.tests.length),o(),d("ngIf",!e.tests.length)}}function Oa(t,s){if(t&1&&(a(0,"div",74)(1,"h3",75),l(2,"Assessments in subject rollup (by batch)"),i(),c(3,Ea,6,3,"div",76),i()),t&2){let e=m(2);o(3),d("ngForOf",e.batchLayers)}}function Ia(t,s){if(t&1){let e=w();a(0,"div",41)(1,"div",42)(2,"div")(3,"h2",43),l(4,"Final Direct CO"),i(),c(5,sa,4,1,"small",44)(6,da,12,8,"div",45)(7,ca,5,0,"div",46),i(),a(8,"div",47)(9,"button",48),b("click",function(){T(e);let n=m();return j(n.refreshFromSnapshot())}),_(10,"i",35),l(11,"Refresh "),i(),a(12,"button",49),b("click",function(){T(e);let n=m();return j(n.queueReportRecompute())}),c(13,pa,3,0,"span",50)(14,ma,3,0,"span",51),i(),a(15,"button",52),b("click",function(){T(e);let n=m();return j(n.queueExcelExport())}),c(16,ha,3,0,"span",50)(17,ua,3,0,"span",51),i()()(),a(18,"div",53),c(19,ba,16,3,"div",54)(20,Oa,4,1,"div",55),i()()}if(t&2){let e=m();o(5),d("ngIf",e.finalDirectCo||(e.sub==null?null:e.sub.subjectName)),o(),d("ngIf",e.snapshotComputedAt&&e.snapshotStatus==="PUBLISHED"),o(),d("ngIf",e.snapshotStatus==="NO_DATA"),o(2),d("disabled",!e.canRefreshSnapshot),o(3),d("disabled",!e.canQueueRecompute),o(),d("ngIf",!e.isRecomputeQueuing),o(),d("ngIf",e.isRecomputeQueuing),o(),d("disabled",!e.canExportExcel),o(),d("ngIf",!e.isExportQueuing),o(),d("ngIf",e.isExportQueuing),o(2),d("ngIf",e.finalDirectCo==null||e.finalDirectCo.coWiseLevel==null?null:e.finalDirectCo.coWiseLevel.length),o(),d("ngIf",e.batchLayers.length)}}function Ta(t,s){if(t&1&&(a(0,"div",99)(1,"div",28)(2,"p",38),l(3),i()()()),t&2){let e=m().$implicit;o(3),u(e.loadError)}}
1function ja(t,s){t&1&&(a(0,"div",100)(1,"div",28)(2,"p",38),l(3,"No examinations linked to this batch for the selected year and semester."),i()()())}function Ma(t,s){if(t&1&&(a(0,"span",108),l(1),i()),t&2){let e=m().$implicit;o(),u(e.testCode)}}function wa(t,s){if(t&1){let e=w();a(0,"button",109),b("click",function(n){T(e);let p=m().$implicit,h=m().$implicit,C=m(2);return j(C.openFullMarkDetails(h,p,n))}),_(1,"i",110),l(2,"Detailed mark report "),i()}}function ka(t,s){if(t&1&&(a(0,"div",111),l(1),i()),t&2){let e=m().$implicit;o(),g(" ",e.statusMessage," ")}}function Ra(t,s){if(t&1&&(a(0,"th",72),l(1),i()),t&2){let e=s.$implicit;o(),u(e.coCode)}}function Aa(t,s){if(t&1&&(a(0,"td",73),l(1),i()),t&2){let e,r=s.$implicit;o(),u((e=r.coMaxMark)!==null&&e!==void 0?e:"-")}}function Pa(t,s){if(t&1&&(a(0,"td",73),l(1),i()),t&2){let e,r=s.$implicit;o(),u((e=r.threshhold)!==null&&e!==void 0?e:"-")}}function Da(t,s){if(t&1&&(a(0,"td",73),l(1),i()),t&2){let e,r=s.$implicit;o(),u((e=r.noOfStudentsAboveThreshHold)!==null&&e!==void 0?e:"-")}}function La(t,s){if(t&1&&(a(0,"td",115),l(1),i()),t&2){let e,r=s.$implicit;o(),u((e=r.level)!==null&&e!==void 0?e:"-")}}function Fa(t,s){if(t&1&&(a(0,"div",65)(1,"table",112)(2,"thead",67)(3,"tr"),_(4,"th",68),c(5,Ra,2,1,"th",69),i()(),a(6,"tbody")(7,"tr")(8,"th",70),l(9,"Max mark"),i(),c(10,Aa,2,1,"td",71),i(),a(11,"tr")(12,"th",70),l(13,"Threshold"),i(),c(14,Pa,2,1,"td",71),i(),a(15,"tr")(16,"th",70),l(17,"Students above threshold"),i(),c(18,Da,2,1,"td",71),i(),a(19,"tr",113)(20,"th",70),l(21,"Level"),i(),c(22,La,2,1,"td",114),i()()()()),t&2){let e=m().$implicit,r=m(3);o(),G("aria-label","CO thresholds for "+e.testName),o(4),d("ngForOf",r.sortedThresholds(e.coThresholds)),o(5),d("ngForOf",r.sortedThresholds(e.coThresholds)),o(4),d("ngForOf",r.sortedThresholds(e.coThresholds)),o(4),d("ngForOf",r.sortedThresholds(e.coThresholds)),o(4),d("ngForOf",r.sortedThresholds(e.coThresholds))}}function Na(t,s){if(t&1&&(a(0,"div",101)(1,"div",102)(2,"div",103),c(3,Ma,2,1,"span",104),a(4,"span",105),l(5),i()(),c(6,wa,3,0,"button",106),i(),c(7,ka,2,1,"div",107)(8,Fa,23,6,"div",54),i()),t&2){let e=s.$implicit;o(3),d("ngIf",e.testCode),o(2),u(e.testName),o(),d("ngIf",e.testId),o(),d("ngIf",!e.hasCoMarks&&e.statusMessage),o(),d("ngIf",e.hasCoMarks&&e.coThresholds.length)}}function Ba(t,s){if(t&1){let e=w();a(0,"button",120),b("click",function(n){T(e);let p=m().$implicit,h=m(2).$implicit,C=m(2);return j(C.openFullMarkDetails(h,p,n))}),l(1),_(2,"i",121),i()}if(t&2){let e=m().$implicit;o(),g(" ",e.testName," ")}}function $a(t,s){if(t&1&&(a(0,"span"),l(1),i()),t&2){let e=m().$implicit;o(),u(e.testName)}}function Wa(t,s){if(t&1&&(a(0,"th",72),c(1,Ba,3,1,"button",119)(2,$a,2,1,"span",50),i()),t&2){let e=s.$implicit;o(),d("ngIf",e.testId),o(),d("ngIf",!e.testId)}}function Qa(t,s){if(t&1&&(a(0,"td",73),l(1),i()),t&2){let e=s.$implicit;o(),u(e.level)}}function Va(t,s){if(t&1&&(a(0,"tr")(1,"th",70),l(2),i(),c(3,Qa,2,1,"td",71),a(4,"td",122),l(5),i()()),t&2){let e=s.$implicit;o(2),u(e.coCode),o(),d("ngForOf",e.levels),o(2),u(e.average)}}function qa(t,s){if(t&1&&(a(0,"div",90)(1,"h4",116),l(2),i(),a(3,"div",65)(4,"table",112)(5,"thead",67)(6,"tr")(7,"th",68),l(8,"CO"),i(),c(9,Wa,3,2,"th",69),a(10,"th",117),l(11,"Average"),i()()(),a(12,"tbody"),c(13,Va,6,3,"tr",118),i()()()()),t&2){let e=m().$implicit;o(2),g("CO attainment level \u2014 ",e.batchName,""),o(2),G("aria-label","CO attainment matrix for "+e.batchName),o(5),d("ngForOf",e.tests),o(4),d("ngForOf",e.coAttainmentLevels)}}function Ya(t,s){if(t&1&&(a(0,"div",93)(1,"div",94)(2,"h3",43),_(3,"i",95),l(4),i()(),a(5,"div",53),c(6,Ta,4,1,"div",96)(7,ja,4,0,"div",97)(8,Na,9,5,"div",98)(9,qa,14,4,"div",19),i()()),t&2){let e=s.$implicit;o(4),g(" ",e.batchName," "),o(2),d("ngIf",e.loadError),o(),d("ngIf",!e.loadError&&!e.tests.length),o(),d("ngForOf",e.tests),o(),d("ngIf",e.tests.length)}}function Ja(t,s){if(t&1&&(a(0,"div",90)(1,"h2",91),l(2," Batch-wise direct CO attainment "),i(),c(3,Ya,10,5,"div",92),i()),t&2){let e=m();o(3),d("ngForOf",e.batchLayers)}}var pt=(()=>{class t{departmentService;accYearService;regulationService;examService;router;asyncUserDownloadProvider;toastr;static JOB_POLL_MS=5e3;waitMessages=["Crunching CO levels across every batch\u2026","Good reports take a moment \u2014 grab chai and check back soon!","Rolling up assessments into your snapshot\u2026","Teaching the numbers to line up
1nicely\u2026","Almost there \u2014 your attainment snapshot is on the way."];pollTimerId=null;uiTimerId=null;waitMessageRotateId=null;departments=[];accyears=[];regSubjects=[];semesterOptions=[];dept=null;acc=null;semOption=null;sub=null;deptId="";yearOfBatch=0;semType="";batches=[];finalDirectCo=null;batchLayers=[];snapshotComputedAt=null;snapshotStatus=null;recomputeInProgress=!1;isRecomputeQueuing=!1;isJobPolling=!1;activeJobId=null;activeJobStatus=null;jobQueuedAt=null;jobElapsedSec=0;nextPollInSec=t.JOB_POLL_MS/1e3;waitMessage=this.waitMessages[0];jobPollError=null;isDepartmentsLoading=!1;isReportLoading=!1;isExportQueuing=!1;loadError=null;noReportData=!1;coCodes=["CO1","CO2","CO3","CO4","CO5"];constructor(e,r,n,p,h,C,M){this.departmentService=e,this.accYearService=r,this.regulationService=n,this.examService=p,this.router=h,this.asyncUserDownloadProvider=C,this.toastr=M}ngOnInit(){this.loadDepartments()}ngOnDestroy(){this.stopJobPolling()}loadDepartments(){this.isDepartmentsLoading=!0,this.departmentService.getDepartment().then(e=>{this.departments=this.normalizeList(e),this.isDepartmentsLoading=!1}).catch(()=>{this.isDepartmentsLoading=!1,this.loadError="Failed to load departments."})}onDeptChange(e){this.resetBelowDept(),e?.id&&(this.deptId=e.id,this.accYearService.getAcademicyear(e.id).then(r=>{this.accyears=r||[]}))}onAccChange(e){this.resetBelowAcc(),e&&(this.acc=e,this.semesterOptions=this.buildSemesterOptions(e))}onSemChange(e){this.resetBelowSem(),!(!e||!this.acc)&&(this.semOption=e,this.yearOfBatch=Math.trunc(Number(e.year)),this.semType=e.semType,this.regulationService.getRegSub(this.deptId,this.acc.regulationId,e.sem).then(r=>{this.regSubjects=r?.datas||[]}).catch(()=>{this.loadError="Failed to load regulation subjects."}))}onSubjectChange(e){this.stopJobPolling(),this.finalDirectCo=null,this.batchLayers=[],this.batches=[],this.noReportData=!1,this.loadError=null,this.snapshotComputedAt=null,this.snapshotStatus=null,this.recomputeInProgress=!1,this.jobPollError=null,!(!e?.id&&!e?._id||!this.semOption)&&(this.sub=e,this.loadSnapshot())}refreshFromSnapshot(){this.canRefreshSnapshot&&this.loadSnapshot()}regSubId(){return this.sub?.id||this.sub?._id||""}loadSnapshot(){return q(this,null,function*(){let e=this.regSubId();if(!(!e||!this.deptId||!this.semOption)){this.isReportLoading=!0,this.loadError=null,this.noReportData=!1,this.finalDirectCo=null,this.batchLayers=[],this.batches=[],this.snapshotComputedAt=null,this.snapshotStatus=null;try{let r=yield this.examService.getDirectSubjectAttainmentSnapshot(this.deptId,e,Math.trunc(Number(this.yearOfBatch)),this.semType);if(r?.status==="NO_DATA"||!r?.payload){this.snapshotStatus="NO_DATA",this.noReportData=!0,this.handleActiveJobFromSnapshot(r?.activeJob);return}this.applySnapshotPayload(r),this.handleActiveJobFromSnapshot(r?.activeJob)}catch{this.loadError="Failed to load report snapshot."}finally{this.isReportLoading=!1}}})}
1applySnapshotPayload(e){let r=e.payload||e;this.snapshotStatus="PUBLISHED",this.snapshotComputedAt=e.computedAt??null,this.batches=(r.batches||[]).map(n=>({id:n.batchId,batchName:n.batchName||"Batch"})),this.batchLayers=(r.batches||[]).map(n=>this.mapBatchLayerFromSnapshot(n)),this.finalDirectCo=this.mapFinalDirectCoFromSnapshot(r),this.noReportData=this.batchLayers.length===0&&(this.finalDirectCo?.coWiseLevel?.length??0)===0}mapBatchLayerFromSnapshot(e){let r=(e.exams||[]).map(n=>this.mapExamLayer(n));return{batchId:e.batchId,batchName:e.batchName||"Batch",tests:r,coAttainmentLevels:this.mapCoAttainmentMatrix(e.coAttainmentMatrix,r)}}mapFinalDirectCoFromSnapshot(e){let r=e.finalDirectCo;if(!r?.length)return this.deriveFinalDirectCoFromBatchLayers();let n=r.map(p=>({coCode:p.coCode,coMaxLevel:p.level,level:p.level}));return{regSubName:e.regSubName||this.sub?.subjectName,coWiseLevel:n}}queueReportRecompute(){!this.canQueueRecompute||!this.semOption||(this.isRecomputeQueuing=!0,this.jobPollError=null,this.examService.queueDirectSubjectAttainmentRecompute(this.deptId,this.regSubId(),Math.trunc(Number(this.yearOfBatch)),this.semType,this.semOption.sem).then(e=>{this.isRecomputeQueuing=!1;let r=e?.message||"Report is being prepared. Please check back in a few minutes.";e?.jobId&&this.startJobPolling(e.jobId,e.queuedAt||Date.now()),e?.accepted===!1?this.toastr.info(r,"Direct Subject Attainment"):this.toastr.success(r,"Direct Subject Attainment")}).catch(e=>{this.isRecomputeQueuing=!1,this.toastr.error(this.extractQueueError(e),"Could not queue report")}))}handleActiveJobFromSnapshot(e){if(!e?.jobId){this.isJobPolling||(this.recomputeInProgress=!1);return}let r=String(e.status||"").toUpperCase();if(r==="QUEUED"||r==="RUNNING"){this.startJobPolling(e.jobId,e.queuedAt||Date.now()),this.activeJobStatus=r;return}this.stopJobPolling()}startJobPolling(e,r){this.stopJobPolling(),this.activeJobId=e,this.jobQueuedAt=r,this.activeJobStatus="QUEUED",this.isJobPolling=!0,this.recomputeInProgress=!0,this.jobPollError=null,this.jobElapsedSec=Math.max(0,Math.floor((Date.now()-r)/1e3)),this.nextPollInSec=t.JOB_POLL_MS/1e3,this.waitMessage=this.waitMessages[0],this.uiTimerId=setInterval(()=>{this.jobQueuedAt!=null&&(this.jobElapsedSec=Math.max(0,Math.floor((Date.now()-this.jobQueuedAt)/1e3))),this.nextPollInSec>0&&(this.nextPollInSec-=1)},1e3),this.waitMessageRotateId=setInterval(()=>{let n=this.waitMessages.indexOf(this.waitMessage);this.waitMessage=this.waitMessages[(n+1)%this.waitMessages.length]},8e3),this.pollTimerId=setInterval(()=>{this.nextPollInSec=t.JOB_POLL_MS/1e3,this.pollJobOnce()},t.JOB_POLL_MS),this.pollJobOnce()}stopJobPolling(){this.pollTimerId!=null&&(clearInterval(this.pollTimerId),this.pollTimerId=null),this.uiTimerId!=null&&(clearInterval(this.uiTimerId),this.uiTimerId=null),this.waitMessageRotateId!=null&&(clearInterval(this.waitMessageRotateId),this.waitMessageRotateId=null),this.isJobPolling=!1,this.activeJobId=null,this.activeJobStatus=null,this.jobQueuedAt=null,this.jobElapsedSec=0,this.nextPollInSec=t.JOB_POLL_MS/1e3}pollJobOnce(){return q(this,null,function*(){if(this.activeJobId)try{let e=yield this.examService.getDirectSubjectAttainmentJobStatus(this.activeJobId),r=String(e?.status||"").toUpperCase();if(this.activeJobStatus=r,r==="COMPLETED"){this.stopJobPolling(),this.recomputeInProgress=!1,this.toastr.success("Snapshot ready \u2014 loading the latest report.","Direct Subject Attainment"),yield this.loadSnapshot();return}r==="FAILED"&&(this.stopJobPolling(),this.recomputeInProgress=!1,this.jobPollError=e?.message||"Snapshot job failed. Try Recompute again.",this.toastr.error(this.jobPollError,"Direct Subject Attainment"))}catch{}})}formatElapsed(e){let r=Math.floor(e/60),n=e%60;return`${r}:${n.toString().padStart(2,"0")}`}mapExamLayer(e){let r=(e?.coThresholds||[]).map(n=>({coCode:n.coCode,coMaxMark:n.coMaxMark,threshhold:n.threshhold,noOfStudentsAboveThreshHold:n.noOfStudentsAboveThreshHold,level:n.level}));return{testId:e.testId,testName:e.testName||"Examination",testCode:e.testCode,testType:e.testType,obeQuestionPaperLinked:e.obeQuestionPaperLinked,questionPaperId:e.questionPaperId,hasCoMarks:e.hasCoMarks,statusMessage:e.statusMessage,coThresholds:r}}get canRefreshSnapshot(){return!!this.regSubId()&&!!this.deptId&&!!this.semOption&&!this.isReportLoading}get canQueueRecompute(){return!!this.regSubId()&&!!this.deptId&&!!this.semOption&&!this.isReportLoading&&!this.isRecomputeQueuing&&!this.isJobPolling}get canExportExcel(){return!!this.regSubId()&&!!this.deptId&&!!this.acc?.id&&!!this.semOption&&!this.isReportLoading&&!this.isExportQueuing}queueExcelExport(){if(!this.canExportExcel||!this.semOption)return;let e=this.dept?.departmentName?`${this.dept.degreeName||""} - ${this.dept.departmentName}`.trim():"";this.isExportQueuing=!0,this.asyncUserDownloadProvider.createJob({jobType:"OBE_REPORT_EXPORT",payload:{exportKind:"DIRECT_SUBJECT_ATTAINMENT",format:"XLS",deptId:this.deptId,accYearId:this.acc.id,regSubId:this.regSubId(),yearOfBatch:Math.trunc(Number(this.yearOfBatch)),semesterType:this.semType,sem:this.semOption.sem,subjectName:this.sub.subjectName||"",deptName:e}}).subscribe({next:()=>{this.isExportQueuing=!1,this.toastr.success("Export queued \u2014 open My Downloads in the header. When complete, click Refresh to load the updated snapshot.","Direct Subject Attainment")},error:r=>{this.isExportQueuing=!1,this.toastr.error(this.extractQueueError(r),"Could not queue export")}})}extractQueueError(e){let r=e?.error;if(typeof r=="string"&&r.trim()){if(r.trim().startsWith("{"))try{let n=JSON.parse(r);return n?.error||n?.message||"Could not queue export."}catch{return r}return r}if(r&&typeof r=="object"){let n=r.error||r.message;if(n)return n}return"Could not queue export."}openFullMarkDetails(e,r,n){n?.preventDefault(),n?.stopPropagation(),!(!r.testId||!e.batchId||!this.sub?.id||!this.acc?.id||!this.semOption)&&nt(this.router,["/dashboard-form/markReportHome/obeMarkReport"],{deptId:this.deptId,accYearId:this.acc.id,year:this.semOption.year,semType:this.semOption.semType,sem:this.semOption.sem,regSubId:this.sub.id,batchId:e.batchId,testId:r.testId})}mapCoAttainmentMatrix(e,r){return e?.length?e.map(n=>({coCode:n.coCode,levels:(n.levels||[]).map(p=>({testName:p.testName,level:p.level??"-"})),average:n.average??"-"})):this.buildCoAttainmentLevels(r)}deriveFinalDirectCoFromBatchLayers(){let e=new Map;for(let n of this.batchLayers)for(let p of n.tests)if(p.hasCoMarks)for(let h of p.coThresholds){if(h.level==null)continue;let C=e.get(h.coCode)||{total:0,count:0};C.total+=h.level,C.count+=1,e.set(h.coCode,C)}if(!e.size)return null;let r=[...e.entries()].map(([n,p])=>({coCode:n,coMaxLevel:Math.round(p.total/p.count)}
1));return{regSubName:this.sub?.subjectName,coWiseLevel:r}}buildCoAttainmentLevels(e){return this.coCodes.map(r=>{let n=e.map(C=>{let M=C.coThresholds.find(Q=>Q.coCode===r);return{testName:C.testName,level:M?.level!=null?String(M.level):"-"}}),p=n.map(C=>Number(C.level)).filter(C=>!Number.isNaN(C)),h=p.length?(p.reduce((C,M)=>C+M,0)/p.length).toFixed(1):"-";return{coCode:r,levels:n,average:h}})}getFinalCoLevel(e){let r=this.findCoRow(this.finalDirectCo?.coWiseLevel,e);if(!r)return"-";let n=r.coMaxLevel??r.level;return n!=null?String(n):"-"}getFinalCoAttainmentPct(e){let r=this.findCoRow(this.finalDirectCo?.coWiseLevel,e);if(!r)return"-";let n=Number(r.coMaxLevel??r.level);return Number.isNaN(n)?"-":`${Math.round(n/3*100)}%`}sortedCoRows(e){return e?.length?[...e].sort((r,n)=>r.coCode.localeCompare(n.coCode)):[]}sortedThresholds(e){return[...e].sort((r,n)=>r.coCode.localeCompare(n.coCode))}findCoRow(e,r){return e?.find(n=>n.coCode===r)}buildSemesterOptions(e){return(e?.years||[]).filter(n=>n?.sem!=null).map(n=>({sem:String(n.sem),year:String(n.year),semType:String(n.semType||""),label:`${n.sem} (${n.year} ${n.semType})`})).sort((n,p)=>Number(n.sem)-Number(p.sem))}normalizeList(e){return Array.isArray(e)?e:e&&typeof e=="object"&&Array.isArray(e.datas)?e.datas:[]}resetBelowDept(){this.acc=null,this.accyears=[],this.resetBelowAcc()}resetBelowAcc(){this.semOption=null,this.semesterOptions=[],this.resetBelowSem()}resetBelowSem(){this.sub=null,this.regSubjects=[],this.batches=[],this.finalDirectCo=null,this.batchLayers=[],this.noReportData=!1,this.loadError=null,this.snapshotComputedAt=null,this.snapshotStatus=null,this.recomputeInProgress=!1,this.stopJobPolling(),this.jobPollError=null}static \u0275fac=function(r){return new(r||t)(f(U),f(J),f(H),f($),f(le),f(tt),f(de))};static \u0275cmp=R({type:t,selectors:[["app-direct-subject-attainment"]],decls:45,vars:24,consts:[[1,"jp-ims-obe-reports-dsa-tab"],[1,"text-muted","small","mb-3"],[1,"jp-dashboard-filter-bar"],[1,"jp-filter-row"],[1,"jp-filter-item"],["for","dsa-dept",1,"jp-filter-label"],["id","dsa-dept","placeholder","Select degree & department",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","loading"],[3,"value",4,"ngFor","ngForOf"],["for","dsa-acc",1,"jp-filter-label"],["id","dsa-acc","placeholder","Select academic year",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["for","dsa-sem",1,"jp-filter-label"],["id","dsa-sem","placeholder","Select semester",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["for","dsa-subject",1,"jp-filter-label"],["id","dsa-subject","placeholder","Select subject",1,"jp-filter-ng-select","jp-ex-select",3,"ngModelChange","change","ngModel","clearable","disabled"],["class","d-flex flex-wrap align-items-center gap-2 mt-2 pt-2 border-top small",4,"ngIf"],["class","jp-alert jp-alert-info mb-3",4,"ngIf"],["class","jp-alert jp-alert-danger mb-3",4,"ngIf"],["class","jp-alert jp-alert-warning mb-3",4,"ngIf"],["class","card shadow-sm border-0",4,"ngIf"],["class","mt-4",4,"ngIf"],[3,"value"],[1,"d-flex","flex-wrap","align-items-center","gap-2","mt-2","pt-2","border-top","small"],[1,"text-muted","text-uppercase","fw-semibold","me-1"],["class","badge bg-secondary",4,"ngFor","ngForOf"],[1,"text-muted"],[1,"badge","bg-secondary"],[1,"jp-alert","jp-alert-info","mb-3"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","jp-alert-icon"],[1,"jp-alert-content"],[1,"jp-alert-message","mb-1","fw-semibold"],[1,"jp-alert-message","mb-1","small"],[1,"jp-alert-message","mb-0","small","text-muted"],[1,"me-3"],["aria-hidden","true",1,"fa","fa-hourglass-half","me-1"],["class","me-3",4,"ngIf"],["aria-hidden","true",1,"fa","fa-refresh","me-1"],[1,"jp-alert","jp-alert-danger","mb-3"],["aria-hidden","true",1,"fa","fa-exclamation-circle","jp-alert-icon"],[1,"jp-alert-message","mb-0"],[1,"jp-alert","jp-alert-warning","mb-3"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","jp-alert-icon"],[1,"card","shadow-sm","border-0"],[1,"card-header","bg-white","border-bottom","d-flex","flex-wrap","align-items-start","justify-content-between","gap-2"],[1,"h6","mb-0","fw-semibold"],["class","text-muted d-block mt-1",4,"ngIf"],["class","mt-1 small",4,"ngIf"],["class","mt-1 small text-muted",4,"ngIf"],[1,"d-flex","flex-wrap","align-items-center","justify-content-end","gap-2","ms-md-auto"],["type","button",1,"jp-btn","jp-btn-secondary","btn-sm",3,"click","disabled"],["type","button",1,"jp-btn","jp-btn-primary","btn-sm",3,"click","disabled"],[4,"ngIf"],["class","d-inline-flex align-items-center gap-1",4,"ngIf"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"click","disabled"],[1,"card-body"],["class","table-responsive jp-list-table-wrap",4,"ngIf"],["class","mt-3",4,"ngIf"],[1,"text-muted","d-block","mt-1"],[1,"badge","text-bg-info","ms-1"],[1,"mt-1","small"],["aria-hidden","true",1,"fa","fa-clock-o","me-1"],[1,"mt-1","small","text-muted"],["aria-hidden","true",1,"fa","fa-cogs","me-1"],[1,"d-inline-flex","align-items-center","gap-1"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],["aria-hidden","true",1,"fa","fa-file-excel-o","me-1"],[1,"table-responsive","jp-list-table-wrap"],["aria-label","Final direct
1CO attainment",1,"table","table-bordered","table-striped","align-middle","mb-0","jp-list-table"],[1,"table-light"],["scope","col"],["scope","col","class","text-center",4,"ngFor","ngForOf"],["scope","row"],["class","text-center",4,"ngFor","ngForOf"],["scope","col",1,"text-center"],[1,"text-center"],[1,"mt-3"],[1,"h6","text-muted","mb-2"],["class","border-start border-2 border-secondary ps-3 mb-3",4,"ngFor","ngForOf"],[1,"border-start","border-2","border-secondary","ps-3","mb-3"],[1,"h6","fw-semibold","mb-1"],["aria-hidden","true",1,"fa","fa-users","me-1","text-primary"],["class","list-unstyled small mb-0 ps-2",4,"ngIf"],["class","small text-muted mb-0 ps-2",4,"ngIf"],[1,"list-unstyled","small","mb-0","ps-2"],["class","mb-1",4,"ngFor","ngForOf"],[1,"mb-1"],["class","badge text-bg-secondary me-1",4,"ngIf"],["class","badge text-bg-light border ms-1",4,"ngIf"],[1,"badge","text-bg-secondary","me-1"],[1,"badge","text-bg-light","border","ms-1"],[1,"small","text-muted","mb-0","ps-2"],[1,"mt-4"],[1,"h6","fw-semibold","text-muted","text-uppercase","mb-3"],["class","card shadow-sm border-0 mb-3",4,"ngFor","ngForOf"],[1,"card","shadow-sm","border-0","mb-3"],[1,"card-header","bg-white","border-bottom"],["aria-hidden","true",1,"fa","fa-users","me-2","text-primary"],["class","jp-alert jp-alert-warning mb-0",4,"ngIf"],["class","jp-alert jp-alert-info mb-0",4,"ngIf"],["class","border-start border-primary border-3 ps-3 mt-3",4,"ngFor","ngForOf"],[1,"jp-alert","jp-alert-warning","mb-0"],[1,"jp-alert","jp-alert-info","mb-0"],[1,"border-start","border-primary","border-3","ps-3","mt-3"],[1,"d-flex","flex-wrap","align-items-center","justify-content-between","gap-2","mb-2"],[1,"d-flex","flex-wrap","align-items-center","gap-2","min-w-0"],["class","badge text-bg-secondary",4,"ngIf"],[1,"fw-semibold"],["type","button","class","btn btn-outline-primary btn-sm jp-btn-view flex-shrink-0",3,"click",4,"ngIf"],["class","alert alert-secondary py-2 small mb-2",4,"ngIf"],[1,"badge","text-bg-secondary"],["type","button",1,"btn","btn-outline-primary","btn-sm","jp-btn-view","flex-shrink-0",3,"click"],["aria-hidden","true",1,"fa","fa-external-link","me-1"],[1,"alert","alert-secondary","py-2","small","mb-2"],[1,"table","table-bordered","align-middle","mb-0","jp-list-table"],[1,"table-secondary"],["class","text-center fw-semibold",4,"ngFor","ngForOf"],[1,"text-center","fw-semibold"],[1,"h6","fw-semibold","mb-2"],["scope","col",1,"text-center","table-light"],[4,"ngFor","ngForOf"],["type","button","class","btn btn-link btn-sm p-0 text-decoration-none",3,"click",4,"ngIf"],["type","button",1,"btn","btn-link","btn-sm","p-0","text-decoration-none",3,"click"],["aria-hidden","true",1,"fa","fa-external-link","ms-1","small"],[1,"text-center","table-light","fw-semibold"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"p",1),l(2," Direct CO attainment across all cohort batches for the selected acc year and semester. Use "),a(3,"strong"),l(4,"Recompute"),i(),l(5," to queue a fresh calculation, then "),a(6,"strong"),l(7,"Refresh"),i(),l(8," to load the saved snapshot. "),a(9,"strong"),l(10,"Export Excel"),i(),l(11," uses "),a(12,"strong"),l(13,"My Downloads"),i(),l(14," and updates the snapshot. "),i(),a(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",5),l(19,"Degree & Department"),i(),a(20,"ng-select",6),I("ngModelChange",function(h){return O(n.dept,h)||(n.dept=h),h}),b("change",function(h){return n.onDeptChange(h)}),c(21,zn,2,3,"ng-option",7),i()(),a(22,"div",4)(23,"label",8),l(24,"Academic Year"),i(),a(25,"ng-select",9),I("ngModelChange",function(h){return O(n.acc,h)||(n.acc=h),h}),b("change",function(h){return n.onAccChange(h)}),c(26,Xn,2,3,"ng-option",7),i()(),a(27,"div",4)(28,"label",10),l(29,"Semester"),i(),a(30,"ng-select",11),I("ngModelChange",function(h){return O(n.semOption,h)||(n.semOption=h),h}),b("change",function(h){return n.onSemChange(h)}),c(31,Kn,2,2,"ng-option",7),i()(),a(32,"div",4)(33,"label",12),l(34,"Regulation Subject"),i(),a(35,"ng-select",13),I("ngModelChange",function(h){return O(n.sub,h)||(n.sub=h),h}),b("change",function(h){return n.onSubjectChange(h)}),c(36,Zn,2,2,"ng-option",7),i()()(),c(37,ta,6,4,"div",14),i(),c(38,na,17,4,"div",15)(39,aa,5,1,"div",16)(40,oa,5,0,"div",15)(41,ra,5,1,"div",16)(42,la,11,0,"div",17)(43,Ia,21,12,"div",18)(44,Ja,4,1,"div",19),i()),r&2&&(o(20),E("ngModel",n.dept),d("clearable",!1)("loading",n.isDepartmentsLoading),o(),d("ngForOf",n.departments),o(4),E("ngModel",n.acc),d("clearable",!1)("disabled",!n.dept),o(),d("ngForOf",n.accyears),o(4),E("ngModel",n.semOption),d("clearable",!1)("disabled",!n.acc),o(),d("ngForOf",n.semesterOptions),o(4),E("ngModel",n.sub),d("clearable",!1)("disabled",!n.semOption),o(),d("ngForOf",n.regSubjects),o(),d("ngIf",n.batches.length),o(),d("ngIf",n.isJobPolling),o(),d("ngIf",n.jobPollError),o(),d("ngIf",n.isReportLoading),o(),d("ngIf",n.loadError),o(),d("ngIf",n.noReportData&&!n.isReportLoading&&n.snapshotStatus==="NO_DATA"),o(),d("ngIf",((n.sub==null?null:n.sub.id)||(n.sub==null?null:n.sub._id
1))&&!n.isReportLoading),o(),d("ngIf",n.batchLayers.length&&!n.isReportLoading))},dependencies:[D,L,A,P,N,F,we]})}return t})();var Ua=[{path:"",redirectTo:"home",pathMatch:"full"},{path:"",component:me,children:[{path:"home",component:lt},{path:"coPoSubList",component:ue},{path:"coPoSubReport",component:st},{path:"markReport",component:dt},{path:"direct",component:ct},{path:"directSubjectAttainment",component:pt}]}],mt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=re({type:t});static \u0275inj=ae({imports:[ie.forChild(Ua),ie]})}return t})();var zo=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=re({type:t,bootstrap:[me]});static \u0275inj=ae({imports:[mt,He,Ve,ie,et,qe,Ye,Ue,ke,Ze,Ge]})}return t})();export{zo as CoPoReportModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.