uawdijnntqw1x1x1
IP : 216.73.216.55
Hostname : srv913213
Kernel : Linux srv913213 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
krbed.in
/
..
/
..
/
www
/
..
/
www
/
html
/
..
/
school_portal_admin
/
49-es2015.f99bb7e58081bf606cab.js
/
/
(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{"2d5E":function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));class c{}},"5sdv":function(e,t,a){"use strict";function c(e=1){return t=>t.controls.map(e=>e.value).reduce((e,t)=>t?e+t:e,0)>=e?null:{required:!0}}a.d(t,"a",(function(){return c})),a.d(t,"c",(function(){return r})),a.d(t,"b",(function(){return i}));const r=e=>e.value.startsWith(" ")?{trimError:{value:"Starting empty whitespace not allowed "}}:e.value.endsWith(" ")?{trimError:{value:"Ending empty whitespace not allowed"}}:null;function i(e=1){return t=>t.controls.map(e=>e.value).reduce((e,t)=>t?e+t:e,0)==e?null:{required:!0}}},DGYh:function(e,t,a){"use strict";var c=a("NbAS"),r=a("fXoL");let i=(()=>{class e{adapt(e){return this.obj=new c.a,this.obj.academicYearId=e.academic_year_id,this.obj.academicYear=e.academic_year,this.obj.fromYear=e.from_year,this.obj.toYear=e.to_year,this.obj.yearName=e.year_name,this.obj.startDate=e.start_date,this.obj.endDate=e.end_date,this.obj.status=e.status,this.obj}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Tb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),n=(()=>{class e{constructor(e){this.adapter=e}adapt(e){let t=[];return e.data.forEach(e=>{t.push(this.adapter.adapt(e))}),{keyword:e.keyword,message:e.message,academicYears:t,pageSize:e.count,page:e.page}}}return e.\u0275fac=function(t){return new(t||e)(r.hc(i))},e.\u0275prov=r.Tb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var o=a("tk/3"),d=a("q3Kh"),s=a("qc5V"),l=a("sYmb");a.d(t,"a",(function(){return m}));let m=(()=>{class e{constructor(e,t,a){this.translate=e,this.adapter=t,this.apiService=a}setLang(){return this.currentLang=localStorage.getItem("langCode"),this.currentLang}create(e){return this.apiService.post("academic/create",e).pipe(Object(d.map)(e=>this.adapter.adapt(e)))}update(e){return this.apiService.post("academic/update",e).pipe(Object(d.map)(e=>this.adapter.adapt(e)))}status(e,t){return this.apiService.post(2!=t?"academic/status":"academic/delete",e)}getOne(e){return this.apiService.get(`academic/${e}`).pipe(Object(d.map)(e=>this.adapter.adapt(e)))}getList(){let e=new o.e;return this.apiService.get("academic",e).pipe(Object(d.map)(e=>this.adapter.adapt(e)))}getListForAcademic(e){let t=new o.e;for(let a in e)t=t.set(a,e[a]);return this.apiService.get("academic",t).pipe(Object(d.map)(e=>this.adapter.adapt(e)))}}return e.\u0275fac=function(t){return new(t||e)(r.hc(l.d),r.hc(n),r.hc(s.a))},e.\u0275prov=r.Tb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},FWf1:function(e,t,a){"use strict";var c=this&&this.__extends||function(){var e=function(t,a){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(t,a)};return function(t,a){function c(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),r=a("pshJ"),i=a("GiSu"),n=a("zB/H"),o=a("p//D"),d=a("n3uD"),s=a("MkmW"),l=function(e){function t(a,c,r){var n=e.call(this)||this;switch(n.syncErrorValue=null,n.syncErrorThrown=!1,n.syncErrorThrowable=!1,n.isStopped=!1,arguments.length){case 0:n.destination=i.empty;break;case 1:if(!a){n.destination=i.empty;break}if("object"==typeof a){a instanceof t?(n.syncErrorThrowable=a.syncErrorThrowable,n.destination=a,a.add(n)):(n.syncErrorThrowable=!0,n.destination=new m(n,a));break}default:n.syncErrorThrowable=!0,n.destination=new m(n,a,c,r)}return n}return c(t,e),t.prototype[o.rxSubscriber]=function(){return this},t.create=function(e,a,c){var r=new t(e,a,c);return r.syncErrorThrowable=!1,r},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(n.Subscription);t.Subscriber=l;var m=function(e){function t(t,a,c,n){var o,d=e.call(this)||this;d._parentSubscriber=t;var s=d;return r.isFunction(a)?o=a:a&&(o=a.next,c=a.error,n=a.complete,a!==i.empty&&(s=Object.create(a),r.isFunction(s.unsubscribe)&&d.add(s.unsubscribe.bind(s)),s.unsubscribe=d.unsubscribe.bind(d))),d._context=s,d._next=o,d._error=c,d._complete=n,d}return c(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;d.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,a=d.config.useDeprecatedSynchronousErrorHandling;if(this._error)a&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)a?(t.syncErrorValue=e,t.syncErrorThrown=!0):s.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),a)throw e;s.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var a=function(){return e._complete.call(e._context)};d.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,a),this.unsubscribe()):(this.__tryOrUnsub(a),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(a){if(this.unsubscribe(),d.config.useDeprecatedSynchronousErrorHandling)throw a;s.hostReportError(a)}},t.prototype.__tryOrSetError=function(e,t,a){if(!d.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,a)}catch(c){return d.config.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=c,e.syncErrorThrown=!0,!0):(s.hostReportError(c),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l);t.SafeSubscriber=m},GMZp:function(e,t,a){"use strict";t.isObject=function(e){return null!==e&&"object"==typeof e}},GiSu:function(e,t,a){"use strict";var c=a("n3uD"),r=a("MkmW");t.empty={closed:!0,next:function(e){},error:function(e){if(c.config.useDeprecatedSynchronousErrorHandling)throw e;r.hostReportError(e)},complete:function(){}}},LBXl:function(e,t,a){"use strict";t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},M34a:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var c=a("/Tr7"),r=a("jIYg");function i(e){Object(r.a)(1,arguments);var t=Object(c.a)(e);return t.setHours(0,0,0,0),t}},MkmW:function(e,t,a){"use strict";t.hostReportError=function(e){setTimeout((function(){throw e}),0)}},NbAS:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));class c{constructor(){this.academicYearId="",this.academicYear="",this.fromYear=0,this.toYear=0,this.yearName="",this.startDate="",this.endDate="",this.status=""}}},TwVa:function(e,t,a){"use strict";a("2d5E"),a("eUP4");var c=a("cmYa");a.d(t,"a",(function(){return c.a}))},cmYa:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));class c{constructor(){this.limit=10,this.offset=0,this.totalSize=0}}},eUP4:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var c=a("M34a");class r{constructor(e){e=e||{},this.start=new Date(e.start)||Object(c.a)(new Date),this.end=e.end?new Date(e.end):null,this._id=e._id||"",this.title=e.title||"",this.color={primary:e.color&&e.color.primary||"#247ba0",secondary:e.color&&e.color.secondary||"#D1E8FF"},this.draggable=e.draggable||!0,this.resizable={beforeStart:e.resizable&&e.resizable.beforeStart||!0,afterEnd:e.resizable&&e.resizable.afterEnd||!0},this.actions=e.actions||[],this.allDay=e.allDay||!1,this.cssClass=e.cssClass||"",this.meta={location:e.meta&&e.meta.location||"",notes:e.meta&&e.meta.notes||""}}}},kjnn:function(e,t,a){"use strict";a.r(t);var c=a("tyNb"),r=a("ofXK"),i=a("3Pt+"),n=a("bTqV"),o=a("Wp6s"),d=a("bSwM"),s=a("FKr1"),l=a("iadO"),m=a("NFeN"),u=a("qFsG"),p=a("MutI"),h=a("bv9b"),g=a("QibW"),b=a("xHqg"),f=a("YUcS"),v=a("STbY"),y=a("CzEO"),x=a("lDzL"),w=a("7pIB"),G=a("M9IT"),T=a("Dh3D"),C=a("+0xr"),_=a("R9Cn"),S=a("0EQZ");class I{constructor(){this.id="",this.academicYearId="",this.academicYearName="",this.academicTypeNname="",this.academicTypeId="",this.batchId="",this.batchName="",this.name="",this.classId="",this.status=""}}class O{constructor(){this.id="",this.grade="",this.point="",this.description="",this.remark="",this.status=""}}var k=a("tk/3"),q=a("2Vo4"),E=a("lJxs"),F=a("xn/x"),M=a("fXoL");let D=(()=>{class e{adapt(e){return this.obj=new O,this.obj.id=e.grade_template_particular_id,this.obj.grade=e.grade,this.obj.minvalue=e.minvalue,this.obj.maxvalue=e.maxvalue,this.obj.point=e.point,this.obj.color=e.color,this.obj.description=e.description,this.obj.remark=e.remark,this.obj}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=M.Tb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),P=(()=>{class e{constructor(e,t){this.adapterClass=e,this.adapterparticular=t}adapt(e){var t,a;let c=[],r=[];return e.class&&(null===(t=e)||void 0===t||t.class.forEach(e=>{c.push(this.adapterClass.adapt(e))})),e.particular&&(null===(a=e)||void 0===a||a.particular.forEach(e=>{r.push(this.adapterparticular.adapt(e))})),this.obj=new I,this.obj.id=e.grade_template_id,this.obj.academicYearId=e.academic_year_id,this.obj.academicYearName=e.academic_year_name,this.obj.academicTypeNname=e.academic_type_name,this.obj.academicTypeId=e.academic_type_id,this.obj.batchId=e.batch_id,this.obj.batchName=e.batch_name,this.obj.name=e.name,this.obj.particular=r,this.obj.class=c,this.obj.status=e.status,this.obj}}return e.\u0275fac=function(t){return new(t||e)(M.hc(F.a),M.hc(D))},e.\u0275prov=M.Tb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),N=(()=>{class e{constructor(e){this.adapter=e}adapt(e){let t=[];return e.data.forEach(e=>{t.push(this.adapter.adapt(e))}),{keyword:e.keyword,message:e.message,gradetemplets:t,pageSize:e.count,page:e.page}}}return e.\u0275fac=function(t){return new(t||e)(M.hc(P))},e.\u0275prov=M.Tb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var j=a("qc5V"),Y=a("VyV+");let B=(()=>{class e{constructor(e,t,a){this.adapter=e,this.classAdapter=t,this.apiService=a,this.recordAddedSubject=new q.a([{}]),this.recordUpdatedSubject=new q.a([{}]),this.particularAddedSubject=new q.a([{}]),this.particularUpdatedSubject=new q.a([{}])}create(e){let t=new FormData;return t.append("academic_year_id",e.academicYearId),t.append("academic_type_id",e.academicTypeId),t.append("name",e.name),t.append("batch_id",e.batchId),t.append("class_id",e.classId),t.append("grade_data",JSON.stringify(e.particular)),this.apiService.post("gradeTemplate/create",t).pipe(Object(E.a)(e=>this.adapter.adapt(e)))}update(e){return this.apiService.post("gradeTemplate/update",e).pipe(Object(E.a)(e=>this.adapter.adapt(e)))}status(e,t){return this.apiService.post(2!=t?"gradeTemplate/status":"gradeTemplate/delete",e)}getList(e){let t=new k.e;for(let a in e)t=t.set(a,e[a]);return this.apiService.get("gradeTemplate",t).pipe(Object(E.a)(e=>this.adapter.adapt(e)))}getClass(e,t,a,c){return this.apiService.get(`gradeTemplate/loadClass/${e}/${t}/${a}/${c}`).pipe(Object(E.a)(e=>this.classAdapter.adapt(e)))}getOne(e){return this.apiService.get(`gradeTemplate/${e}`).pipe(Object(E.a)(e=>this.adapter.adapt(e)))}getRecordAddedSub(){return this.recordAddedSubject.asObservable()}getRecordUpdatedSub(){return this.recordUpdatedSubject.asObservable()}getParticularAddedSub(){return this.particularAddedSubject.asObservable()}getParticularUpdatedSub(){return this.particularUpdatedSubject.asObservable()}}return e.\u0275fac=function(t){return new(t||e)(M.hc(N),M.hc(Y.a),M.hc(j.a))},e.\u0275prov=M.Tb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var A=a("DGYh"),L=a("t/Tn"),V=a("Gg3P"),z=a("Olgc"),R=a("VxG0"),$=a("5sdv"),X=a("f0Cb"),H=a("XiUz"),U=a("kmnG"),J=a("d3UM"),W=a("sYmb");function Q(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.gradename"),""))}function K(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.whitespace")," "))}function Z(e,t){1&e&&(M.dc(0,"mat-error"),M.dc(1,"small",37),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.ed(" ",M.rc(3,1,"gradeTemplate.gradeTemplateErrorMsg.GeneralRequired"),""))}function ee(e,t){if(1&e){const e=M.ec();M.dc(0,"mat-option",38),M.lc("click",(function(a){M.Sc(e);const c=t.$implicit;return M.pc().setAcademic(c.academicYearId)})),M.cd(1),M.cc()}if(2&e){const e=t.$implicit;M.yc("value",e.academicYearId),M.Gb(1),M.ed(" ",e.academicYear," ")}}function te(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.Academic"),""))}function ae(e,t){if(1&e){const e=M.ec();M.dc(0,"mat-option",38),M.lc("click",(function(t){return M.Sc(e),M.pc().getclass()})),M.cd(1),M.cc()}if(2&e){const e=t.$implicit;M.yc("value",e.batchId),M.Gb(1),M.ed(" ",e.batchName," ")}}function ce(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.Batch"),""))}function re(e,t){if(1&e){const e=M.ec();M.dc(0,"span",55),M.lc("click",(function(t){M.Sc(e);const a=M.pc().index;return M.pc().removeGrade(a)})),M.dc(1,"i",56),M.cd(2,"delete"),M.cc(),M.cc()}}function ie(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.gradeRequired")," "))}function ne(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.whitespace")," "))}function oe(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.minvalueRequired"),""))}function de(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.number")," "))}function se(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.maxvalueRequired")," "))}function le(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.number")," "))}function me(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1," Please provide the maxvalue greater than minvalue "),M.cc())}function ue(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.pointRequired")," "))}function pe(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.number")," "))}function he(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.colorRequired")," "))}function ge(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.whitespace")," "))}function be(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.descriptionRequired")," "))}function fe(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.remarkRequired")," "))}function ve(e,t){if(1&e){const e=M.ec();M.dc(0,"tr",39),M.dc(1,"td",40),M.ad(2,re,3,0,"span",41),M.cc(),M.dc(3,"td",42),M.dc(4,"mat-form-field",9),M.Yb(5,"input",43),M.ad(6,ie,3,3,"mat-error",11),M.ad(7,ne,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(8,"td",42),M.dc(9,"mat-form-field",44),M.Yb(10,"input",45),M.ad(11,oe,3,3,"mat-error",11),M.ad(12,de,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(13,"td",42),M.dc(14,"mat-form-field",46),M.dc(15,"input",47),M.lc("keyup",(function(a){M.Sc(e);const c=t.index;return M.pc().keyup(a,c)})),M.cc(),M.ad(16,se,3,3,"mat-error",11),M.ad(17,le,3,3,"mat-error",11),M.ad(18,me,2,0,"mat-error",11),M.cc(),M.cc(),M.dc(19,"td",42),M.dc(20,"mat-form-field",46),M.Yb(21,"input",48),M.ad(22,ue,3,3,"mat-error",11),M.ad(23,pe,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(24,"td",42),M.dc(25,"mat-form-field",49),M.dc(26,"input",50),M.lc("colorPickerChange",(function(t){return M.Sc(e),M.pc().color=t}))("colorPickerChange",(function(a){M.Sc(e);const c=t.$implicit,r=M.pc();return c.controls.color.setValue(r.color)})),M.cc(),M.ad(27,he,3,3,"mat-error",11),M.ad(28,ge,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(29,"td",42),M.dc(30,"mat-form-field",51),M.Yb(31,"input",52),M.ad(32,be,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(33,"td",42),M.dc(34,"mat-form-field",53),M.Yb(35,"textarea",54),M.ad(36,fe,3,3,"mat-error",11),M.cc(),M.cc(),M.cc()}if(2&e){const e=t.$implicit,a=t.index,c=M.pc();M.yc("formGroupName",a),M.Gb(2),M.yc("ngIf",a+1==c.gradeForm.controls.gradetable.controls.length&&c.gradeForm.controls.gradetable.controls.length>1),M.Gb(4),M.yc("ngIf",e.controls.grade.hasError("required")&&e.controls.grade.touched),M.Gb(1),M.yc("ngIf",e.controls.grade.hasError("trimValidator")&&e.controls.grade.touched),M.Gb(3),M.yc("readonly",!0),M.Gb(1),M.yc("ngIf",e.controls.minvalue.hasError("required")&&e.controls.minvalue.touched),M.Gb(1),M.yc("ngIf",e.controls.minvalue.hasError("pattern")&&e.controls.minvalue.touched),M.Gb(4),M.yc("ngIf",e.controls.maxvalue.hasError("required")&&e.controls.maxvalue.touched),M.Gb(1),M.yc("ngIf",e.controls.maxvalue.hasError("pattern")&&e.controls.maxvalue.touched),M.Gb(1),M.yc("ngIf",e.controls.maxvalue.hasError("min")&&e.controls.maxvalue.touched),M.Gb(4),M.yc("ngIf",e.controls.point.hasError("required")&&e.controls.point.touched),M.Gb(1),M.yc("ngIf",e.controls.point.hasError("pattern")&&e.controls.point.touched),M.Gb(3),M.Zc("background",e.controls.color.value,M.Qb),M.yc("colorPicker",c.color),M.Gb(1),M.yc("ngIf",e.controls.color.hasError("required")&&e.controls.color.touched),M.Gb(1),M.yc("ngIf",e.controls.color.hasError("trimValidator")&&e.controls.color.touched),M.Gb(4),M.yc("ngIf",e.controls.description.hasError("required")&&e.controls.description.touched),M.Gb(4),M.yc("ngIf",e.controls.remark.hasError("required")&&e.controls.remark.touched)}}function ye(e,t){1&e&&(M.dc(0,"label",57),M.dc(1,"strong"),M.cd(2),M.qc(3,"translate"),M.dc(4,"span",15),M.cd(5,"*"),M.cc(),M.cc(),M.cc()),2&e&&(M.Gb(2),M.ed("",M.rc(3,1,"gradeTemplate.classes")," "))}function xe(e,t){if(1&e&&(M.dc(0,"mat-checkbox",58),M.cd(1),M.cc()),2&e){const e=t.$implicit,a=t.index;M.yc("value",e.classId)("formControlName",a),M.Gb(1),M.dd(e.className)}}function we(e,t){1&e&&(M.dc(0,"label",59),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.dd(M.rc(2,1,"gradeTemplate.notes")))}function Ge(e,t){1&e&&(M.dc(0,"div"),M.dc(1,"p",60),M.dc(2,"b"),M.cd(3,"No classes Found..."),M.cc(),M.cc(),M.cc())}let Te=(()=>{class e{constructor(e,t,a,c,r,i,n,o,d){this.formBuilder=e,this.modelService=t,this.academicService=a,this.batchService=c,this.router=r,this.loader=i,this.toaster=n,this.perm=o,this.cpService=d,this.displayedColumns=["remove","grade","minvalue","maxvalue","point","color","description","remarks"],this.gradetemplatetable=new C.o,this.selection=new S.c(!0,[]),this.classes=[],this.particular=new O,this.gradetemp=new I,this.color="#2889e9",this.minValue=0}ngOnInit(){this.gradeForm=this.formBuilder.group({gradename:new i.g("",[i.B.required,i.B.pattern(/^[^ ][\w\W ]*[^ ]/)]),selectOne:new i.g("",[i.B.required]),academic:new i.g("",[i.B.required]),batch:new i.g("",[i.B.required]),classesFList:new i.d([],Object($.a)(1)),gradetable:new i.d([this.getParticular()])}),this.getAcademic()}getParticular(){return this.formBuilder.group({grade:new i.g("",[i.B.required,$.c]),minvalue:new i.g(this.minValue,[i.B.required,i.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?")]),maxvalue:new i.g("",[i.B.required,i.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?"),i.B.min(Number(this.minValue)+1)]),point:new i.g("",[i.B.required]),color:new i.g("",[i.B.required,$.c]),description:new i.g("",[i.B.required]),remark:new i.g("",[i.B.required])})}onEventLog(e,t){}keyup(e,t){const a=this.gradeForm.controls.gradetable;if(this.minValue=0==t?0:Number(a.value[t-1].maxvalue),console.log(this.minValue),""!=e.target.value){var c=Number(a.value[t].maxvalue)+1;this.gradeForm.value.gradetable.length!=t+1&&(a.controls[t+1].get("maxvalue").setValidators([i.B.required,i.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?"),i.B.min(Number(c)+1)]),a.controls[t+1].get("minvalue").setValue(c))}else this.gradeForm.value.gradetable.length!=t+1&&a.controls[t+1].get("minvalue").setValue("")}addGrade(){const e=this.gradeForm.controls.gradetable;var t=Number(this.gradeForm.value.gradetable.length)-1,a=Number(this.gradeForm.value.gradetable.length);this.minValue=Number(e.value[t].maxvalue)+1,e.push(this.getParticular()),e.controls[a].get("minvalue").setValue(this.minValue)}removeGrade(e){const t=this.gradeForm.controls.gradetable;t.removeAt(e);var a=Number(this.gradeForm.value.gradetable.length)-1;this.minValue=Number(t.value[a].maxvalue)+1}getAcademic(){this.academicService.getList().subscribe(e=>{this.academics=e.academicYears,this.academics=this.academics.filter(e=>"1"==e.status),"success"==e.keyword||(this.loader.close(),this.toaster.present(e.message,""))})}getBatch(e){this.batchService.getListByAcademic(e).subscribe(e=>{this.batchs=e.batches,"success"==e.keyword||(this.loader.close(),this.toaster.present(e.message,""))})}setAcademic(e){this.getBatch(e),this.getclass()}setType(){this.getclass()}getclass(){""!=this.gradetemp.academicYearId&&""!=this.gradetemp.batchId&&this.gradetemp.academicTypeId&&this.modelService.getClass(this.gradetemp.academicTypeId,this.gradetemp.academicYearId,this.gradetemp.batchId,0).subscribe(e=>{if(this.avilableClass=e.classes,0==this.avilableClass.length)return this.isAvailableClass=0;this.isAvailableClass=1,this.buildClasses(this.avilableClass)})}buildClasses(e){new i.d([],Object($.a)(1));var t=this.gradeForm.get("classesFList");t.clear(),e.forEach(e=>{t.push(new i.g(!1))})}getSelectedClassIds(){var e,t,a=[],c=this.gradeForm.get("classesFList").value;for(let r=0;r<c.length;r++)c[r]&&(null===(e=this.avilableClass[r])||void 0===e?void 0:e.classId)&&a.push(null===(t=this.avilableClass[r])||void 0===t?void 0:t.classId);return a}save(){this.gradetemp.particular=this.gradeForm.value.gradetable,this.gradetemp.classId=JSON.stringify(this.getSelectedClassIds()),this.submitButton.disabled=!0,this.loader.open(),this.modelService.create(this.gradetemp).subscribe(e=>{this.data=e,"success"==this.data.keyword?(this.modelService.recordAddedSubject.next(this.data.gradetemplets),this.loader.close(),this.router.navigate(["/school/grade-template"]),this.toaster.present(this.data.message,"")):(this.loader.close(),this.submitButton.disabled=!1,this.toaster.present(this.data.message,"","top"))})}}return e.\u0275fac=function(t){return new(t||e)(M.Xb(i.f),M.Xb(B),M.Xb(A.a),M.Xb(L.a),M.Xb(c.g),M.Xb(V.a),M.Xb(z.a),M.Xb(R.a),M.Xb(_.c))},e.\u0275cmp=M.Rb({type:e,selectors:[["app-create"]],viewQuery:function(e,t){var a;1&e&&M.md(n.a,!0),2&e&&M.Nc(a=M.mc())&&(t.submitButton=a.first)},decls:120,vars:68,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"disabled","click"],["href","#",1,"pl-8","primary-txt-color",3,"routerLink"],[1,""],[1,"p-0"],[1,"card-title-text"],[3,"formGroup"],["fxLayout","row wrap",1,"row","mt-24"],["fxFlex","100","fxFlex.gt-xs","55",1,""],["appearance","fill",1,"full-width"],["matInput","","name","grade_template_name","formControlName","gradename","value","",1,"batch-name",3,"ngModel","placeholder","ngModelChange"],[4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","50",1,""],["fxLayout","row wrap",1,"row","mt-8"],["fxFlex","100","fxFlex.gt-xs","20",1,""],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","75",1,""],["aria-label","Select an option","name","report","formControlName","selectOne",1,"ml-15",3,"ngModel","ngModelChange"],["value","1",1,"mr-40",3,"click"],["value","2",1,"mr-40",3,"click"],["appearance","fill"],["formControlName","academic",3,"ngModel","ngModelChange"],[3,"value","click",4,"ngFor","ngForOf"],["formControlName","batch",3,"ngModel","ngModelChange"],[1,"table_container","pb-1"],["formArrayName","gradetable",1,"mat-table"],[1,"mat-header-row"],[1,"mat-header-cell"],["class","mat-row",3,"formGroupName",4,"ngFor","ngForOf"],["mat-raised-button","","color","green","type","button",1,"ml-8","icon-white-bg","text-right","mt-12",3,"disabled","click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview"],["fxLayout","row wrap",1,"mt-8","grade-checkbox"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-0"],["class","font14",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","100","formArrayName","classesFList",1,"flex-row","mt-12"],["class","example-margin mr-18",3,"value","formControlName",4,"ngFor","ngForOf"],["class","mt-12",4,"ngIf"],[2,"font-size","70%"],[3,"value","click"],[1,"mat-row",3,"formGroupName"],[1,"mat-cell","pt-0"],["class","icon-red-bg mt-8",3,"click",4,"ngIf"],[1,"mat-cell"],["matInput","","formControlName","grade","value",""],["appearance","fill",1,"full-width",2,"width","110px!important"],["matInput","","name","minvalue","placeholder","","formControlName","minvalue","value","",3,"readonly"],["appearance","fill",1,"full-width",2,"width","130px!important"],["matInput","","name","maxvalue","placeholder","","formControlName","maxvalue","value","",3,"keyup"],["matInput","","name","point","placeholder","","formControlName","point","value",""],["appearance","fill",1,"full-width","gradetemplateColorPicker",2,"width","130px!important"],["matInput","","formControlName","color",3,"colorPicker","colorPickerChange"],["appearance","fill",1,"full-width",2,"width","200px !important"],["matInput","","name","description","placeholder","","formControlName","description","value",""],["appearance","fill",1,"full-width","textarea-width",2,"width","350px!important"],["matInput","","formControlName","remark","placeholder","","value",""],[1,"icon-red-bg","mt-8",3,"click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview",2,"cursor","pointer"],[1,"font14"],[1,"example-margin","mr-18",3,"value","formControlName"],[1,"mt-12"],[1,"text-center"]],template:function(e,t){1&e&&(M.dc(0,"div",0),M.dc(1,"button",1),M.lc("click",(function(e){return t.save()})),M.cd(2),M.qc(3,"translate"),M.cc(),M.dc(4,"a",2),M.cd(5),M.qc(6,"translate"),M.cc(),M.cc(),M.dc(7,"div",3),M.dc(8,"mat-card",4),M.dc(9,"mat-card-title",3),M.dc(10,"div",5),M.cd(11),M.qc(12,"translate"),M.cc(),M.Yb(13,"mat-divider"),M.cc(),M.dc(14,"mat-card-content"),M.dc(15,"form",6),M.dc(16,"div",7),M.dc(17,"div",8),M.dc(18,"mat-form-field",9),M.dc(19,"input",10),M.lc("ngModelChange",(function(e){return t.gradetemp.name=e})),M.qc(20,"translate"),M.cc(),M.ad(21,Q,3,3,"mat-error",11),M.ad(22,K,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(23,"div",12),M.dc(24,"div",13),M.dc(25,"div",14),M.dc(26,"label"),M.dc(27,"strong"),M.cd(28),M.qc(29,"translate"),M.dc(30,"span",15),M.cd(31,"*"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(32,"div",16),M.dc(33,"mat-radio-group",17),M.lc("ngModelChange",(function(e){return t.gradetemp.academicTypeId=e})),M.dc(34,"mat-radio-button",18),M.lc("click",(function(e){return t.setType()})),M.cd(35),M.qc(36,"translate"),M.cc(),M.dc(37,"mat-radio-button",19),M.lc("click",(function(e){return t.setType()})),M.cd(38),M.qc(39,"translate"),M.cc(),M.ad(40,Z,4,3,"mat-error",11),M.cc(),M.cc(),M.cc(),M.dc(41,"div",7),M.dc(42,"div",14),M.dc(43,"label"),M.dc(44,"strong"),M.cd(45),M.qc(46,"translate"),M.dc(47,"span",15),M.cd(48,"*"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(49,"div",16),M.dc(50,"mat-form-field",20),M.Yb(51,"mat-label"),M.dc(52,"mat-select",21),M.lc("ngModelChange",(function(e){return t.gradetemp.academicYearId=e})),M.ad(53,ee,2,2,"mat-option",22),M.cc(),M.ad(54,te,3,3,"mat-error",11),M.cc(),M.cc(),M.cc(),M.dc(55,"div",13),M.dc(56,"div",14),M.dc(57,"label"),M.dc(58,"strong"),M.cd(59),M.qc(60,"translate"),M.dc(61,"span",15),M.cd(62,"*"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(63,"div",16),M.dc(64,"mat-form-field",20),M.Yb(65,"mat-label"),M.dc(66,"mat-select",23),M.lc("ngModelChange",(function(e){return t.gradetemp.batchId=e})),M.ad(67,ae,2,2,"mat-option",22),M.cc(),M.ad(68,ce,3,3,"mat-error",11),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(69,"div",24),M.dc(70,"div",3),M.dc(71,"table",25),M.dc(72,"tr",26),M.Yb(73,"th",27),M.dc(74,"th",27),M.cd(75),M.qc(76,"translate"),M.dc(77,"span",15),M.cd(78,"*"),M.cc(),M.cc(),M.dc(79,"th",27),M.cd(80),M.qc(81,"translate"),M.dc(82,"span",15),M.cd(83,"*"),M.cc(),M.cc(),M.dc(84,"th",27),M.cd(85),M.qc(86,"translate"),M.dc(87,"span",15),M.cd(88,"*"),M.cc(),M.cc(),M.dc(89,"th",27),M.cd(90),M.qc(91,"translate"),M.dc(92,"span",15),M.cd(93,"*"),M.cc(),M.cc(),M.dc(94,"th",27),M.cd(95),M.qc(96,"translate"),M.dc(97,"span",15),M.cd(98,"*"),M.cc(),M.cc(),M.dc(99,"th",27),M.cd(100),M.qc(101,"translate"),M.dc(102,"span",15),M.cd(103,"*"),M.cc(),M.cc(),M.dc(104,"th",27),M.cd(105),M.qc(106,"translate"),M.dc(107,"span",15),M.cd(108,"*"),M.cc(),M.cc(),M.cc(),M.ad(109,ve,37,19,"tr",28),M.cc(),M.dc(110,"button",29),M.lc("click",(function(e){return t.addGrade()})),M.dc(111,"i",30),M.cd(112,"add"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(113,"div",31),M.dc(114,"div",32),M.ad(115,ye,6,3,"label",33),M.cc(),M.dc(116,"div",34),M.ad(117,xe,2,3,"mat-checkbox",35),M.cc(),M.ad(118,we,3,3,"label",36),M.cc(),M.cc(),M.cc(),M.ad(119,Ge,4,0,"div",11),M.cc(),M.cc(),M.cc()),2&e&&(M.Gb(1),M.yc("disabled",t.gradeForm.invalid),M.Gb(1),M.dd(M.rc(3,36,"gradeTemplate.save")),M.Gb(2),M.yc("routerLink","/school/grade-template"),M.Gb(1),M.dd(M.rc(6,38,"gradeTemplate.discard")),M.Gb(6),M.dd(M.rc(12,40,"gradeTemplate.CreateTitle")),M.Gb(4),M.yc("formGroup",t.gradeForm),M.Gb(4),M.zc("placeholder",M.rc(20,42,"gradeTemplate.gradename")),M.yc("ngModel",t.gradetemp.name),M.Gb(2),M.yc("ngIf",t.gradeForm.controls.gradename.hasError("required")&&t.gradeForm.controls.gradename.touched),M.Gb(1),M.yc("ngIf",t.gradeForm.controls.gradename.hasError("pattern")&&t.gradeForm.controls.gradename.touched),M.Gb(6),M.ed("",M.rc(29,44,"gradeTemplate.selectOne")," "),M.Gb(5),M.yc("ngModel",t.gradetemp.academicTypeId),M.Gb(2),M.ed(" ",M.rc(36,46,"gradeTemplate.academic"),""),M.Gb(3),M.ed(" ",M.rc(39,48,"gradeTemplate.scholostic"),""),M.Gb(2),M.yc("ngIf",t.gradeForm.controls.selectOne.hasError("required")&&t.gradeForm.controls.selectOne.touched),M.Gb(5),M.ed("",M.rc(46,50,"gradeTemplate.academicYear")," "),M.Gb(7),M.yc("ngModel",t.gradetemp.academicYearId),M.Gb(1),M.yc("ngForOf",t.academics),M.Gb(1),M.yc("ngIf",t.gradeForm.controls.academic.hasError("required")&&t.gradeForm.controls.academic.touched),M.Gb(5),M.ed("",M.rc(60,52,"gradeTemplate.batch")," "),M.Gb(7),M.yc("ngModel",t.gradetemp.batchId),M.Gb(1),M.yc("ngForOf",t.batchs),M.Gb(1),M.yc("ngIf",t.gradeForm.controls.batch.hasError("required")&&t.gradeForm.controls.batch.touched),M.Gb(7),M.ed("",M.rc(76,54,"gradeTemplate.grade")," "),M.Gb(5),M.ed("",M.rc(81,56,"gradeTemplate.minvalue")," "),M.Gb(5),M.ed("",M.rc(86,58,"gradeTemplate.maxValue")," "),M.Gb(5),M.ed("",M.rc(91,60,"gradeTemplate.point")," "),M.Gb(5),M.ed("",M.rc(96,62,"gradeTemplate.color")," "),M.Gb(5),M.ed("",M.rc(101,64,"gradeTemplate.description")," "),M.Gb(5),M.ed("",M.rc(106,66,"gradeTemplate.remarks")," "),M.Gb(4),M.yc("ngForOf",t.gradeForm.get("gradetable").controls),M.Gb(1),M.yc("disabled",t.gradeForm.get("gradetable").invalid),M.Gb(5),M.yc("ngIf",1==t.isAvailableClass),M.Gb(2),M.yc("ngForOf",t.avilableClass),M.Gb(1),M.yc("ngIf",1==t.isAvailableClass),M.Gb(1),M.yc("ngIf",0==t.isAvailableClass))},directives:[n.a,c.j,o.a,o.f,X.a,o.c,i.D,i.u,i.k,H.c,H.a,U.b,u.b,i.c,i.t,i.i,r.o,g.b,g.a,U.e,J.a,r.n,i.e,U.a,s.p,i.l,_.a,d.a],pipes:[W.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.gradetemplate[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:120px!important}td.mat-cell[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px;padding-right:4px}td.mat-cell[_ngcontent-%COMP%], th.mat-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid hsla(0,0%,50.2%,.25882352941176473);border-collapse:collapse}.batch-name[_ngcontent-%COMP%]{font-size:24px}.grade-checkbox[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-right:30px!important}.preview-btn[_ngcontent-%COMP%]{border:1px solid #01a39d!important;border-radius:0}.icon-white-bg[_ngcontent-%COMP%], .preview-btn[_ngcontent-%COMP%]{color:#01a39d!important;background:#fff!important;line-height:25px!important}.icon-white-bg[_ngcontent-%COMP%]{padding:0 2px!important;min-width:5px!important;margin-left:9px!important;border-radius:0!important;border:1px solid #019fa2!important}.icon-red-bg[_ngcontent-%COMP%], .icon-white-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:21px}.icon-red-bg[_ngcontent-%COMP%]{margin-left:9px;color:red}.icon-red-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:21px}textarea[_ngcontent-%COMP%]{height:18px}.font14[_ngcontent-%COMP%]{font-size:14px}"]}),e})();function Ce(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.gradename")," "))}function _e(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.whitespace")," "))}function Se(e,t){1&e&&(M.dc(0,"mat-error"),M.dc(1,"small",36),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.ed(" ",M.rc(3,1,"gradeTemplate.gradeTemplateErrorMsg.GeneralRequired"),""))}function Ie(e,t){if(1&e){const e=M.ec();M.dc(0,"mat-option",37),M.lc("valueChange",(function(a){return M.Sc(e),t.$implicit.academicYearId=a}))("click",(function(a){M.Sc(e);const c=t.$implicit;return M.pc().setAcademic(c.academicYearId)})),M.cd(1),M.cc()}if(2&e){const e=t.$implicit;M.yc("value",e.academicYearId),M.Gb(1),M.ed(" ",e.academicYear," ")}}function Oe(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.Academic")," "))}function ke(e,t){if(1&e){const e=M.ec();M.dc(0,"mat-option",37),M.lc("valueChange",(function(a){return M.Sc(e),t.$implicit.batchId=a}))("click",(function(a){M.Sc(e);const c=t.$implicit;return M.pc().setbatch(c.batchId)})),M.cd(1),M.cc()}if(2&e){const e=t.$implicit;M.yc("value",e.batchId),M.Gb(1),M.ed(" ",e.batchName," ")}}function qe(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.Batch")," "))}function Ee(e,t){if(1&e){const e=M.ec();M.dc(0,"span",55),M.lc("click",(function(t){M.Sc(e);const a=M.pc().index;return M.pc().removeGrade(a)})),M.dc(1,"i",56),M.cd(2,"delete"),M.cc(),M.cc()}}function Fe(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.gradeRequired")," "))}function Me(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.whitespace")," "))}function De(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.minvalueRequired")," "))}function Pe(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.number")," "))}function Ne(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.maxvalueRequired")," "))}function je(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.number")," "))}function Ye(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1," Please provide the maxvalue greater than minvalue "),M.cc())}function Be(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.pointRequired")," "))}function Ae(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.number")," "))}function Le(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.colorRequired")," "))}function Ve(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.descriptionRequired")," "))}function ze(e,t){1&e&&(M.dc(0,"mat-error"),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.gradeTemplateErrorMsg.remarkRequired")," "))}function Re(e,t){if(1&e){const e=M.ec();M.dc(0,"tr",38),M.dc(1,"td",39),M.ad(2,Ee,3,0,"span",40),M.cc(),M.dc(3,"td",41),M.Yb(4,"input",42),M.dc(5,"mat-form-field",9),M.Yb(6,"input",43),M.ad(7,Fe,3,3,"mat-error",11),M.ad(8,Me,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(9,"td",41),M.dc(10,"mat-form-field",44),M.Yb(11,"input",45),M.ad(12,De,3,3,"mat-error",11),M.ad(13,Pe,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(14,"td",41),M.dc(15,"mat-form-field",46),M.dc(16,"input",47),M.lc("keyup",(function(a){M.Sc(e);const c=t.index;return M.pc().keyup(a,c)})),M.cc(),M.ad(17,Ne,3,3,"mat-error",11),M.ad(18,je,3,3,"mat-error",11),M.ad(19,Ye,2,0,"mat-error",11),M.cc(),M.cc(),M.dc(20,"td",41),M.dc(21,"mat-form-field",46),M.Yb(22,"input",48),M.ad(23,Be,3,3,"mat-error",11),M.ad(24,Ae,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(25,"td",41),M.dc(26,"mat-form-field",49),M.dc(27,"input",50),M.lc("colorPickerChange",(function(t){return M.Sc(e),M.pc().color=t}))("colorPickerChange",(function(a){M.Sc(e);const c=t.$implicit,r=M.pc();return c.controls.color.setValue(r.color)})),M.cc(),M.ad(28,Le,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(29,"td",41),M.dc(30,"mat-form-field",51),M.Yb(31,"input",52),M.ad(32,Ve,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(33,"td",41),M.dc(34,"mat-form-field",53),M.Yb(35,"textarea",54),M.ad(36,ze,3,3,"mat-error",11),M.cc(),M.cc(),M.cc()}if(2&e){const e=t.$implicit,a=t.index,c=M.pc();M.yc("formGroupName",a),M.Gb(2),M.yc("ngIf",a+1==c.gradeForm.controls.gradetable.controls.length&&c.gradeForm.controls.gradetable.controls.length>1),M.Gb(5),M.yc("ngIf",e.controls.grade.hasError("required")&&e.controls.grade.touched),M.Gb(1),M.yc("ngIf",e.controls.grade.hasError("pattern")&&e.controls.grade.touched),M.Gb(3),M.yc("readonly",!0),M.Gb(1),M.yc("ngIf",e.controls.minvalue.hasError("required")&&e.controls.minvalue.touched),M.Gb(1),M.yc("ngIf",e.controls.minvalue.hasError("pattern")&&e.controls.minvalue.touched),M.Gb(4),M.yc("ngIf",e.controls.maxvalue.hasError("required")&&e.controls.maxvalue.touched),M.Gb(1),M.yc("ngIf",e.controls.maxvalue.hasError("pattern")&&e.controls.maxvalue.touched),M.Gb(1),M.yc("ngIf",e.controls.maxvalue.hasError("min")&&e.controls.maxvalue.touched),M.Gb(4),M.yc("ngIf",e.controls.point.hasError("required")&&e.controls.point.touched),M.Gb(1),M.yc("ngIf",e.controls.point.hasError("pattern")&&e.controls.point.touched),M.Gb(3),M.Zc("background",e.controls.color.value,M.Qb),M.yc("colorPicker",c.color),M.Gb(1),M.yc("ngIf",e.controls.color.hasError("required")&&e.controls.color.touched),M.Gb(4),M.yc("ngIf",e.controls.description.hasError("required")&&e.controls.description.touched),M.Gb(4),M.yc("ngIf",e.controls.remark.hasError("required")&&e.controls.remark.touched)}}function $e(e,t){1&e&&(M.dc(0,"label",57),M.dc(1,"strong"),M.cd(2),M.qc(3,"translate"),M.dc(4,"span",15),M.cd(5,"*"),M.cc(),M.cc(),M.cc()),2&e&&(M.Gb(2),M.ed("",M.rc(3,1,"gradeTemplate.classes")," "))}function Xe(e,t){if(1&e&&(M.dc(0,"mat-checkbox",58),M.cd(1),M.cc()),2&e){const e=t.$implicit,a=t.index;M.yc("value",e.classId)("formControlName",a),M.Gb(1),M.dd(e.className)}}function He(e,t){1&e&&(M.dc(0,"label",59),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.dd(M.rc(2,1,"gradeTemplate.notes")))}function Ue(e,t){1&e&&(M.dc(0,"div"),M.dc(1,"p",60),M.dc(2,"b"),M.cd(3,"No classes Found..."),M.cc(),M.cc(),M.cc())}let Je=(()=>{class e{constructor(e,t,a,c,r,i,n,o,d,s){this.formBuilder=e,this.modelService=t,this.academicService=a,this.batchService=c,this.router=r,this.loader=i,this.toaster=n,this.perm=o,this.cpService=d,this.activateRoute=s,this.console=console,this.classes=[],this.particular=new O,this.gradetemp={},this.onLoadSelectedClassIds=[],this.deletedIds=[],this.batchId="",this.academicId="",this.minValue=0,this.gradeId=this.activateRoute.snapshot.params.id}ngOnInit(){this.gradeForm=this.formBuilder.group({gradename:new i.g("",[i.B.required,i.B.pattern(/^[^ ][\w\W ]*[^ ]/)]),selectOne:new i.g("",[i.B.required]),academic:new i.g("",[i.B.required]),batch:new i.g("",[i.B.required]),classesFList:new i.d([],Object($.a)(1)),gradetable:new i.d([this.getParticular([])])}),this.getOne(),this.getAcademic()}getParticular(e){return e.minvalue&&(this.minValue=e.minvalue),this.formBuilder.group({grade:[e.grade,[i.B.required]],minvalue:[e.minvalue,[i.B.required,i.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?")]],maxvalue:[e.maxvalue,[i.B.required,i.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?"),i.B.min(Number(this.minValue)+1)]],point:[e.point,[i.B.required,i.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?")]],color:[e.color,[i.B.required]],description:[e.description,[i.B.required]],remark:[e.remark,[i.B.required]],grade_template_particular_id:[e.id?e.id:0]})}onEventLog(e,t){}getOne(){this.loader.open(),this.modelService.getOne(this.gradeId).subscribe(e=>{"success"==e.keyword?(this.gradetemp=e.gradetemplets[0],this.academicId=this.gradetemp.academicYearId,this.batchId=this.gradetemp.batchId,this.typeId=this.gradetemp.academicTypeId,this.flag=this.gradetemp.academicTypeId,this.gradetemp.class.forEach(e=>{this.onLoadSelectedClassIds.push(e.classId)}),this.getAcademic(),this.getBatch(this.academicId),this.populateParticulars(this.gradetemp.particular),this.getclass(),this.setValues(this.gradetemp),this.loader.close()):(this.loader.close(),this.toaster.present(e.message,""))})}setValues(e){this.gradeForm.patchValue({gradename:e.name,batch:e.batchId,selectOne:e.academicTypeId,academic:e.academicYearId})}keyup(e,t){const a=this.gradeForm.controls.gradetable;if(this.minValue=0==t?0:Number(a.value[t-1].maxvalue),console.log(this.minValue),""!=e.target.value){var c=Number(a.value[t].maxvalue)+1;this.gradeForm.value.gradetable.length!=t+1&&(a.controls[t+1].get("maxvalue").setValidators([i.B.required,i.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?"),i.B.min(Number(c)+1)]),a.controls[t+1].get("minvalue").setValue(c))}else this.gradeForm.value.gradetable.length!=t+1&&a.controls[t+1].get("minvalue").setValue("")}addGrade(){const e=this.gradeForm.controls.gradetable;var t=Number(this.gradeForm.value.gradetable.length)-1,a=Number(this.gradeForm.value.gradetable.length);this.minValue=Number(e.value[t].maxvalue)+1,e.push(this.getParticular([])),e.controls[a].get("minvalue").setValue(this.minValue)}removeGrade(e){const t=this.gradeForm.get("gradetable");this.deletedIds.push(t.value[e].grade_template_particular_id),this.gradetemp.particular.pop(e),t.removeAt(e);var a=Number(this.gradeForm.value.gradetable.length)-1;this.minValue=Number(t.value[a].maxvalue)+1}getAcademic(){this.academicService.getList().subscribe(e=>{"success"==e.keyword?(this.academics=e.academicYears,this.academics=this.academics.filter(e=>"1"==e.status)):(this.loader.close(),this.toaster.present(e.message,""))})}getBatch(e){this.batchService.getListByAcademic(e).subscribe(e=>{"success"==e.keyword?this.batchs=e.batches:(this.loader.close(),this.toaster.present(e.message,""))})}setAcademic(e){this.academicId=e,this.getBatch(e),this.getclass()}setType(e){this.typeId=e,this.getclass()}setbatch(e){this.batchId=e,this.getclass()}getclass(){""!=this.academicId&&""!=this.batchId&&this.typeId&&this.modelService.getClass(this.typeId,this.academicId,this.batchId,this.gradeId).subscribe(e=>{if(this.avilableClass=e.classes,0==this.avilableClass.length)return this.isAvailableClass=0;this.isAvailableClass=1,this.buildClasses(this.avilableClass)})}buildClasses(e){new i.d([],Object($.a)(1));var t=this.gradeForm.get("classesFList");t.clear(),e.forEach(e=>{t.push(new i.g(this.onLoadSelectedClassIds.includes(e.classId)))})}getSelectedClassIds(){var e,t,a=[],c=this.gradeForm.get("classesFList").value;for(let r=0;r<c.length;r++)c[r]&&(null===(e=this.avilableClass[r])||void 0===e?void 0:e.classId)&&a.push(null===(t=this.avilableClass[r])||void 0===t?void 0:t.classId);return a}populateParticulars(e){var t=this.gradeForm.get("gradetable");t.clear(),e.forEach(e=>{t.push(this.getParticular(e))})}update(){this.submitButton.disabled=!0;let e=new FormData;e.append("grade_template_id",this.gradetemp.id),e.append("academic_year_id",this.gradeForm.value.academic),e.append("academic_type_id",this.gradeForm.value.selectOne),e.append("name",this.gradeForm.value.gradename),e.append("batch_id",this.gradeForm.value.batch),e.append("class_id",JSON.stringify(this.getSelectedClassIds())),e.append("delete_data",JSON.stringify(this.deletedIds)),e.append("grade_data",JSON.stringify(this.gradeForm.value.gradetable)),this.loader.open(),this.modelService.update(e).subscribe(e=>{this.data=e,"success"==this.data.keyword?(this.modelService.recordAddedSubject.next(this.data.gradetemplets),this.loader.close(),this.router.navigate(["/school/grade-template"]),this.toaster.present(this.data.message,"")):(this.loader.close(),this.submitButton.disabled=!1,this.toaster.present(this.data.message,"","top"))})}}return e.\u0275fac=function(t){return new(t||e)(M.Xb(i.f),M.Xb(B),M.Xb(A.a),M.Xb(L.a),M.Xb(c.g),M.Xb(V.a),M.Xb(z.a),M.Xb(R.a),M.Xb(_.c),M.Xb(c.a))},e.\u0275cmp=M.Rb({type:e,selectors:[["app-edit"]],viewQuery:function(e,t){var a;1&e&&M.md(n.a,!0),2&e&&M.Nc(a=M.mc())&&(t.submitButton=a.first)},decls:119,vars:63,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"disabled","click"],["href","#",1,"pl-8","primary-txt-color",3,"routerLink"],[1,""],[1,"p-0"],[1,"card-title-text"],[3,"formGroup"],["fxLayout","row wrap",1,"row","mt-24"],["fxFlex","100","fxFlex.gt-xs","55",1,""],["appearance","fill",1,"full-width"],["matInput","","name","grade_template_name","formControlName","gradename","placeholder","Grade Template Name","value","",1,"batch-name"],[4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","50",1,""],["fxLayout","row wrap",1,"row","mt-8"],["fxFlex","100","fxFlex.gt-xs","20",1,""],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","75",1,""],["aria-label","Select an option","name","report","formControlName","selectOne",1,"ml-15"],["value","1",1,"mr-40",3,"checked","click"],["value","2",1,"mr-40",3,"checked","click"],["appearance","fill"],["formControlName","academic"],[3,"value","valueChange","click",4,"ngFor","ngForOf"],["formControlName","batch"],[1,"table_container","pb-1"],["formArrayName","gradetable"],[1,"mat-header-cell"],[3,"formGroupName",4,"ngFor","ngForOf"],["mat-raised-button","","color","green","type","button",1,"ml-8","icon-white-bg","text-right","mt-12",3,"disabled","click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview"],["fxLayout","row wrap",1,"mt-8","grade-checkbox"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-0"],["class","font14",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","100","formArrayName","classesFList",1,"flex-row","mt-12"],["class","example-margin mr-18",3,"value","formControlName",4,"ngFor","ngForOf"],["class","mt-12",4,"ngIf"],[2,"font-size","70%"],[3,"value","valueChange","click"],[3,"formGroupName"],[1,"mat-cell","pt-0"],["class","icon-red-bg mt-8",3,"click",4,"ngIf"],[1,"mat-cell"],["formControlName","grade_template_particular_id","readonly","",2,"display","none"],["matInput","","formControlName","grade","value",""],["appearance","fill",1,"full-width",2,"width","110px!important"],["matInput","","name","minvalue","placeholder","","formControlName","minvalue","value","",3,"readonly"],["appearance","fill",1,"full-width",2,"width","130px!important"],["matInput","","name","maxvalue","placeholder","","formControlName","maxvalue","value","",3,"keyup"],["matInput","","name","point","placeholder","","formControlName","point","value",""],["appearance","fill",1,"full-width","gradetemplateColorPicker",2,"width","130px!important"],["matInput","","formControlName","color",3,"colorPicker","colorPickerChange"],["appearance","fill",1,"full-width",2,"width","200px !important"],["matInput","","name","description","placeholder","","formControlName","description","value",""],["appearance","fill",1,"full-width","textarea-width",2,"width","350px!important"],["matInput","","formControlName","remark","placeholder","","value",""],[1,"icon-red-bg","mt-8",3,"click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview",2,"cursor","pointer"],[1,"font14"],[1,"example-margin","mr-18",3,"value","formControlName"],[1,"mt-12"],[1,"text-center"]],template:function(e,t){1&e&&(M.dc(0,"div",0),M.dc(1,"button",1),M.lc("click",(function(e){return t.update()})),M.cd(2),M.qc(3,"translate"),M.cc(),M.dc(4,"a",2),M.cd(5),M.qc(6,"translate"),M.cc(),M.cc(),M.dc(7,"div",3),M.dc(8,"mat-card",4),M.dc(9,"mat-card-title",3),M.dc(10,"div",5),M.cd(11),M.qc(12,"translate"),M.cc(),M.Yb(13,"mat-divider"),M.cc(),M.dc(14,"mat-card-content"),M.dc(15,"form",6),M.dc(16,"div",7),M.dc(17,"div",8),M.dc(18,"mat-form-field",9),M.Yb(19,"input",10),M.ad(20,Ce,3,3,"mat-error",11),M.ad(21,_e,3,3,"mat-error",11),M.cc(),M.cc(),M.dc(22,"div",12),M.dc(23,"div",13),M.dc(24,"div",14),M.dc(25,"label"),M.dc(26,"strong"),M.cd(27),M.qc(28,"translate"),M.dc(29,"span",15),M.cd(30,"*"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(31,"div",16),M.dc(32,"mat-radio-group",17),M.dc(33,"mat-radio-button",18),M.lc("click",(function(e){return t.setType(1)})),M.cd(34),M.qc(35,"translate"),M.cc(),M.dc(36,"mat-radio-button",19),M.lc("click",(function(e){return t.setType(2)})),M.cd(37),M.qc(38,"translate"),M.cc(),M.ad(39,Se,4,3,"mat-error",11),M.cc(),M.cc(),M.cc(),M.dc(40,"div",7),M.dc(41,"div",14),M.dc(42,"label"),M.dc(43,"strong"),M.cd(44),M.qc(45,"translate"),M.dc(46,"span",15),M.cd(47,"*"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(48,"div",16),M.dc(49,"mat-form-field",20),M.Yb(50,"mat-label"),M.dc(51,"mat-select",21),M.ad(52,Ie,2,2,"mat-option",22),M.cc(),M.ad(53,Oe,3,3,"mat-error",11),M.cc(),M.cc(),M.cc(),M.dc(54,"div",13),M.dc(55,"div",14),M.dc(56,"label"),M.dc(57,"strong"),M.cd(58),M.qc(59,"translate"),M.dc(60,"span",15),M.cd(61,"*"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(62,"div",16),M.dc(63,"mat-form-field",20),M.Yb(64,"mat-label"),M.dc(65,"mat-select",23),M.ad(66,ke,2,2,"mat-option",22),M.cc(),M.ad(67,qe,3,3,"mat-error",11),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(68,"div",24),M.dc(69,"div",3),M.dc(70,"table",25),M.dc(71,"tr"),M.Yb(72,"th",26),M.dc(73,"th",26),M.cd(74),M.qc(75,"translate"),M.dc(76,"span",15),M.cd(77,"*"),M.cc(),M.cc(),M.dc(78,"th",26),M.cd(79),M.qc(80,"translate"),M.dc(81,"span",15),M.cd(82,"*"),M.cc(),M.cc(),M.dc(83,"th",26),M.cd(84),M.qc(85,"translate"),M.dc(86,"span",15),M.cd(87,"*"),M.cc(),M.cc(),M.dc(88,"th",26),M.cd(89),M.qc(90,"translate"),M.dc(91,"span",15),M.cd(92,"*"),M.cc(),M.cc(),M.dc(93,"th",26),M.cd(94),M.qc(95,"translate"),M.dc(96,"span",15),M.cd(97,"*"),M.cc(),M.cc(),M.dc(98,"th",26),M.cd(99),M.qc(100,"translate"),M.dc(101,"span",15),M.cd(102,"*"),M.cc(),M.cc(),M.dc(103,"th",26),M.cd(104),M.qc(105,"translate"),M.dc(106,"span",15),M.cd(107,"*"),M.cc(),M.cc(),M.cc(),M.ad(108,Re,37,18,"tr",27),M.cc(),M.dc(109,"button",28),M.lc("click",(function(e){return t.addGrade()})),M.dc(110,"i",29),M.cd(111,"add"),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(112,"div",30),M.dc(113,"div",31),M.ad(114,$e,6,3,"label",32),M.cc(),M.dc(115,"div",33),M.ad(116,Xe,2,3,"mat-checkbox",34),M.cc(),M.ad(117,He,3,3,"label",35),M.cc(),M.cc(),M.cc(),M.ad(118,Ue,4,0,"div",11),M.cc(),M.cc(),M.cc()),2&e&&(M.Gb(1),M.yc("disabled",t.gradeForm.invalid),M.Gb(1),M.dd(M.rc(3,33,"gradeTemplate.update")),M.Gb(2),M.yc("routerLink","/school/grade-template"),M.Gb(1),M.dd(M.rc(6,35,"gradeTemplate.discard")),M.Gb(6),M.dd(M.rc(12,37,"gradeTemplate.updateTitle")),M.Gb(4),M.yc("formGroup",t.gradeForm),M.Gb(5),M.yc("ngIf",t.gradeForm.controls.gradename.hasError("required")&&t.gradeForm.controls.gradename.touched),M.Gb(1),M.yc("ngIf",t.gradeForm.controls.gradename.hasError("pattern")&&t.gradeForm.controls.gradename.touched),M.Gb(6),M.ed("",M.rc(28,39,"gradeTemplate.selectOne")," "),M.Gb(6),M.zc("checked",1==t.flag),M.Gb(1),M.ed(" ",M.rc(35,41,"gradeTemplate.academic")," "),M.Gb(2),M.zc("checked",2==t.flag),M.Gb(1),M.ed(" ",M.rc(38,43,"gradeTemplate.scholostic"),""),M.Gb(2),M.yc("ngIf",t.gradeForm.controls.selectOne.hasError("required")&&t.gradeForm.controls.selectOne.touched),M.Gb(5),M.ed("",M.rc(45,45,"gradeTemplate.academicYear")," "),M.Gb(8),M.yc("ngForOf",t.academics),M.Gb(1),M.yc("ngIf",t.gradeForm.controls.academic.hasError("required")&&t.gradeForm.controls.academic.touched),M.Gb(5),M.ed("",M.rc(59,47,"gradeTemplate.batch")," "),M.Gb(8),M.yc("ngForOf",t.batchs),M.Gb(1),M.yc("ngIf",t.gradeForm.controls.batch.hasError("required")&&t.gradeForm.controls.batch.touched),M.Gb(7),M.ed("",M.rc(75,49,"gradeTemplate.grade")," "),M.Gb(5),M.ed("",M.rc(80,51,"gradeTemplate.minvalue")," "),M.Gb(5),M.ed("",M.rc(85,53,"gradeTemplate.maxValue")," "),M.Gb(5),M.ed("",M.rc(90,55,"gradeTemplate.point")," "),M.Gb(5),M.ed("",M.rc(95,57,"gradeTemplate.color")," "),M.Gb(5),M.ed("",M.rc(100,59,"gradeTemplate.description")," "),M.Gb(5),M.ed("",M.rc(105,61,"gradeTemplate.remarks")," "),M.Gb(4),M.yc("ngForOf",t.gradeForm.get("gradetable").controls),M.Gb(1),M.yc("disabled",t.gradeForm.get("gradetable").invalid),M.Gb(5),M.yc("ngIf",1==t.isAvailableClass),M.Gb(2),M.yc("ngForOf",t.avilableClass),M.Gb(1),M.yc("ngIf",1==t.isAvailableClass),M.Gb(1),M.yc("ngIf",0==t.isAvailableClass))},directives:[n.a,c.j,o.a,o.f,X.a,o.c,i.D,i.u,i.k,H.c,H.a,U.b,u.b,i.c,i.t,i.i,r.o,g.b,g.a,U.e,J.a,r.n,i.e,U.a,s.p,i.l,_.a,d.a],pipes:[W.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.gradetemplate[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:120px!important}td.mat-cell[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px;padding-right:4px}td.mat-cell[_ngcontent-%COMP%], th.mat-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid hsla(0,0%,50.2%,.25882352941176473);border-collapse:collapse}.batch-name[_ngcontent-%COMP%]{font-size:24px}textarea[_ngcontent-%COMP%]{height:18px}.grade-checkbox[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-right:30px!important}.preview-btn[_ngcontent-%COMP%]{border:1px solid #01a39d!important;border-radius:0}.icon-white-bg[_ngcontent-%COMP%], .preview-btn[_ngcontent-%COMP%]{color:#01a39d!important;background:#fff!important;line-height:25px!important}.icon-white-bg[_ngcontent-%COMP%]{padding:0 2px!important;min-width:5px!important;margin-left:9px!important;border-radius:0!important;border:1px solid #019fa2!important}.icon-red-bg[_ngcontent-%COMP%], .icon-white-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:21px}.icon-red-bg[_ngcontent-%COMP%]{margin-left:9px;color:red}.icon-red-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:21px}.font14[_ngcontent-%COMP%]{font-size:14px}"]}),e})();var We=a("xgIS"),Qe=a("Kj3r"),Ke=a("/uUt"),Ze=a("TwVa"),et=a("xe9D"),tt=a("PSD3"),at=a.n(tt);let ct=(()=>{class e{transform(e){if(!e)return"";const t=[];return e.forEach(e=>{t.push(e.className)}),t.join(",")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=M.Wb({name:"classNameList",type:e,pure:!0}),e})();const rt=["filterInput"];function it(e,t){1&e&&(M.dc(0,"button",32),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.yc("routerLink","/school/grade-template/create"),M.Gb(1),M.dd(M.rc(2,2,"gradeTemplate.list.create")))}function nt(e,t){if(1&e){const e=M.ec();M.dc(0,"button",33),M.lc("click",(function(t){M.Sc(e);const a=M.pc();return a.value="",a.applyFilter("")})),M.dc(1,"mat-icon"),M.cd(2,"close"),M.cc(),M.cc()}}function ot(e,t){if(1&e){const e=M.ec();M.dc(0,"th",34),M.dc(1,"mat-checkbox",35),M.lc("change",(function(t){M.Sc(e);const a=M.pc();return t?a.masterToggle():null})),M.cc(),M.cc()}if(2&e){const e=M.pc();M.Gb(1),M.yc("checked",e.selection.hasValue()&&e.isAllSelected())("indeterminate",e.selection.hasValue()&&!e.isAllSelected())}}function dt(e,t){if(1&e){const e=M.ec();M.dc(0,"td",36),M.dc(1,"mat-checkbox",37),M.lc("click",(function(t){return M.Sc(e),t.stopPropagation()}))("change",(function(a){M.Sc(e);const c=t.$implicit,r=M.pc();return a?r.selection.toggle(c):null})),M.cc(),M.cc()}if(2&e){const e=t.$implicit,a=M.pc();M.Gb(1),M.yc("checked",a.selection.isSelected(e))}}function st(e,t){1&e&&(M.dc(0,"th",38),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.list.gradename")))}function lt(e,t){if(1&e&&(M.dc(0,"td",39),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.name," ")}}function mt(e,t){1&e&&(M.dc(0,"th",40),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.list.selectOne")))}function ut(e,t){if(1&e&&(M.dc(0,"td",39),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.academicTypeNname," ")}}function pt(e,t){1&e&&(M.dc(0,"th",41),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.list.classes")," "))}function ht(e,t){if(1&e&&(M.dc(0,"td",39),M.cd(1),M.qc(2,"classNameList"),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",M.rc(2,1,e.class)," ")}}function gt(e,t){1&e&&(M.dc(0,"th",42),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.list.academicYear")," "))}function bt(e,t){if(1&e&&(M.dc(0,"td",39),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.academicYearName," ")}}function ft(e,t){1&e&&(M.dc(0,"th",43),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.ed(" ",M.rc(2,1,"gradeTemplate.list.batch")," "))}function vt(e,t){if(1&e&&(M.dc(0,"td",39),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.batchName," ")}}function yt(e,t){if(1&e){const e=M.ec();M.dc(0,"button",48),M.lc("click",(function(t){return M.Sc(e),M.pc(2).action("view")})),M.dc(1,"mat-icon",49),M.cd(2,"visibility"),M.cc(),M.dc(3,"span"),M.cd(4),M.qc(5,"translate"),M.cc(),M.cc()}2&e&&(M.Gb(4),M.dd(M.rc(5,1,"gradeTemplate.list.view")))}function xt(e,t){if(1&e){const e=M.ec();M.dc(0,"button",48),M.lc("click",(function(t){return M.Sc(e),M.pc(2).action("update")})),M.dc(1,"mat-icon",50),M.cd(2,"edit"),M.cc(),M.dc(3,"span"),M.cd(4),M.qc(5,"translate"),M.cc(),M.cc()}2&e&&(M.Gb(4),M.dd(M.rc(5,1,"gradeTemplate.list.edit")))}function wt(e,t){if(1&e){const e=M.ec();M.dc(0,"button",48),M.lc("click",(function(t){return M.Sc(e),M.pc(2).setStaus(1)})),M.dc(1,"mat-icon",51),M.cd(2,"check"),M.cc(),M.dc(3,"span"),M.cd(4),M.qc(5,"translate"),M.cc(),M.cc()}2&e&&(M.Gb(4),M.dd(M.rc(5,1,"gradeTemplate.list.active")))}function Gt(e,t){if(1&e){const e=M.ec();M.dc(0,"button",48),M.lc("click",(function(t){return M.Sc(e),M.pc(2).setStaus(0)})),M.dc(1,"mat-icon",52),M.cd(2,"block"),M.cc(),M.dc(3,"span"),M.cd(4),M.qc(5,"translate"),M.cc(),M.cc()}2&e&&(M.Gb(4),M.dd(M.rc(5,1,"gradeTemplate.list.inactive")))}function Tt(e,t){if(1&e){const e=M.ec();M.dc(0,"button",48),M.lc("click",(function(t){return M.Sc(e),M.pc(2).setStaus(2)})),M.dc(1,"mat-icon",53),M.cd(2,"delete"),M.cc(),M.dc(3,"span"),M.cd(4,"Delete"),M.cc(),M.cc()}}const Ct=function(){return["grade_template"]},_t=function(){return["grade_template_view"]},St=function(){return["grade_template_update"]},It=function(){return["grade_template_status"]},Ot=function(){return["grade_template_delete"]};function kt(e,t){if(1&e&&(M.dc(0,"th",44),M.cd(1),M.qc(2,"translate"),M.dc(3,"mat-icon",45),M.cd(4,"more_vert"),M.cc(),M.dc(5,"mat-menu",null,46),M.ad(7,yt,6,3,"button",47),M.ad(8,xt,6,3,"button",47),M.ad(9,wt,6,3,"button",47),M.ad(10,Gt,6,3,"button",47),M.ad(11,Tt,5,0,"button",47),M.cc(),M.cc()),2&e){const e=M.Oc(6),t=M.pc();M.Gb(1),M.ed(" ",M.rc(2,7,"gradeTemplate.list.status")," "),M.Gb(2),M.yc("matMenuTriggerFor",e),M.Gb(4),M.yc("ngIf",t.permission.hasPermission(M.Ec(9,Ct),M.Ec(10,_t))),M.Gb(1),M.yc("ngIf",t.permission.hasPermission(M.Ec(11,Ct),M.Ec(12,St))),M.Gb(1),M.yc("ngIf",t.permission.hasPermission(M.Ec(13,Ct),M.Ec(14,It))),M.Gb(1),M.yc("ngIf",t.permission.hasPermission(M.Ec(15,Ct),M.Ec(16,It))),M.Gb(1),M.yc("ngIf",t.permission.hasPermission(M.Ec(17,Ct),M.Ec(18,Ot)))}}function qt(e,t){1&e&&(M.dc(0,"label",56),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.dd(M.rc(2,1,"gradeTemplate.list.active")))}function Et(e,t){1&e&&(M.dc(0,"label",57),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.Gb(1),M.dd(M.rc(2,1,"gradeTemplate.list.inactive")))}function Ft(e,t){if(1&e&&(M.dc(0,"td",39),M.ad(1,qt,3,3,"label",54),M.ad(2,Et,3,3,"label",55),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.yc("ngIf",1==e.status),M.Gb(1),M.yc("ngIf",0==e.status)}}function Mt(e,t){1&e&&M.Yb(0,"tr",58)}function Dt(e,t){1&e&&M.Yb(0,"tr",59)}function Pt(e,t){1&e&&(M.bc(0),M.dc(1,"p",60),M.dc(2,"b"),M.cd(3,"No Data Found..."),M.cc(),M.cc(),M.ac())}const Nt=function(){return["grade_template_create"]};let jt=(()=>{class e{constructor(e,t,a,c,r){this.router=e,this.modelService=t,this.toaster=a,this.loader=c,this.permission=r,this.displayedColumns=["select","name","defaultfor","classes","academicyear","batch","status"],this.dataSource=new C.o,this.selection=new S.c(!0,[]),this.pageSizeOptions=0,this.currentPageDataSize=0,this.paginationDTO=new Ze.a,this.pageSizeOptions=Object(et.b)().app.table.filtering.pageSizeOptions}ngOnInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}ngAfterViewInit(){this.overAll()}overAll(){Object(We.a)(this.filter.nativeElement,"keyup").pipe(Object(Qe.a)(150),Object(Ke.a)()).subscribe(()=>{if(!this.dataSource)return;let e=this.filter.nativeElement.value;e=e.trim(),e=e.toLowerCase(),this.paginationDTO.searchWith=e,this.getData()}),this.getData()}sortData(e){this.paginationDTO.sortByKey=e.active,this.paginationDTO.sortByType=e.direction.toUpperCase(),this.getData()}getData(){this.modelService.getList(this.paginationDTO).subscribe(e=>{this.paginationDTO.totalSize=e.pageSize,this.currentPageDataSize=e.gradetemplets.length,this.dataSource=new C.o(e.gradetemplets)})}applyFilter(e){e=(e=e.trim()).toLowerCase(),this.paginationDTO.searchWith=e,this.getData()}onPaginateChange(e){this.paginationDTO.offset=e.pageIndex,this.paginationDTO.limit=e.pageSize,this.getData()}action(e){1==this.getCheckedValue().length?at.a.fire({title:"Confirm?",text:"Are you sure? You want to "+e+" !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, "+e+" it!"}).then(t=>{if(t.value){var a=this.getCheckedValue()[0].id;this.router.navigate(["update"==e?`/school/grade-template/edit/${a}`:`/school/grade-template/view/${a}`])}}):at.a.fire({icon:"error",title:"update"==e?"Update Grade Template":"View Grade Template",text:"Please Select One Grade Template!"})}statusAlert(e,t){at.a.fire({title:"Confirm?",text:"Are you sure? You want to "+e+" it !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, "+e+" it!"}).then(e=>{e.value&&this.saveStatus(t)})}setStaus(e){let t="";if(1==e?t="active":0==e?t="Inactive":2==e&&(t="delete"),this.getCheckedValue().length>=1){let a=1==e?0:1;2==e?this.statusAlert(t,e):this.isMultiStatus(String(a))?at.a.fire({icon:"error",title:"Grade Template Status",text:"Please select the "+(1==e?"Inactive":"active")+" status of the Grade Template!"}):this.statusAlert(t,e)}else at.a.fire({icon:"error",title:2==e?"Delete Grade Template":"Change Grade Template Status",text:"Please Select Altleast One Grade Template!"})}saveStatus(e){let t=[];this.getCheckedValue().forEach(e=>{t.push(e.id)});let a=new FormData;a.append("id",JSON.stringify(t)),a.append("status",String(e)),this.loader.open(),this.modelService.status(a,e).subscribe(t=>{let a=t;"success"==a.keyword?(this.refreshTable(2==e?"delete":"other"),this.loader.close(),this.toaster.present(a.message)):(this.loader.close(),this.toaster.present(a.message))})}refreshTable(e){this.filter.nativeElement.value="",this.value="",this.paginationDTO.offset=this.paginator.pageIndex,this.paginationDTO.limit=this.paginator.pageSize,this.paginationDTO.totalSize=this.paginator.length,"add"==e&&(this.paginationDTO.offset=0),"delete"==e&&this.getCheckedValue().length==this.currentPageDataSize&&(this.paginationDTO.offset=this.paginator.pageIndex>0?this.paginator.pageIndex-1:0),this.getData(),this.paginator.pageIndex=this.paginationDTO.offset,this.paginator.pageSize=this.paginationDTO.limit,this.paginator.length=this.paginationDTO.totalSize,this.selection=new S.c(!0,[])}isAllSelected(){return this.selection.selected.length===this.dataSource.data.length}masterToggle(){this.isAllSelected()?this.selection.clear():this.dataSource.data.forEach(e=>this.selection.select(e))}getCheckedValue(){let e=[];return this.dataSource.connect().value.forEach(t=>{this.selection.isSelected(t)&&e.push(t)}),e}isMultiStatus(e){return this.getCheckedValue().filter(t=>{if(t.status!=e)return t}).length>0}}return e.\u0275fac=function(t){return new(t||e)(M.Xb(c.g),M.Xb(B),M.Xb(z.a),M.Xb(V.a),M.Xb(R.a))},e.\u0275cmp=M.Rb({type:e,selectors:[["app-list"]],viewQuery:function(e,t){var a;1&e&&(M.Yc(G.a,!0),M.Yc(T.a,!0),M.md(rt,!0)),2&e&&(M.Nc(a=M.mc())&&(t.paginator=a.first),M.Nc(a=M.mc())&&(t.sort=a.first),M.Nc(a=M.mc())&&(t.filter=a.first))},decls:39,vars:13,consts:[["fxLayout","row wrap",1,"pagewrap"],["fxFlex","100","fxFlex.gt-xs","50",1,"pr-1"],[1,"example-button-row","mt-10"],["mat-flat-button","","class","btn-primary-bg",3,"routerLink",4,"ngIf"],[1,"margin-333",2,"width","100%"],["matInput","","id","filterInput","placeholder","Search","value","",3,"ngModel","ngModelChange"],["filterInput",""],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"material-icons","search-icon"],[1,"table_container","pb-1"],[1,""],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource","matSortChange"],["matColumnDef","select",1,"checkbox-field"],["style","width: 5%; text-align: center;","mat-header-cell","",4,"matHeaderCellDef"],["style","width: 5%; text-align: center;","mat-cell","",4,"matCellDef"],["matColumnDef","name"],["mat-header-cell","","style","width:19%;","mat-sort-header","name",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","defaultfor"],["mat-header-cell","","style","width:20%;","mat-sort-header","academic_type_name",4,"matHeaderCellDef"],["matColumnDef","classes"],["mat-header-cell","","style","width:20%;","mat-sort-header","class",4,"matHeaderCellDef"],["matColumnDef","academicyear"],["mat-header-cell","","style","width:12%;","mat-sort-header","academic_year_name",4,"matHeaderCellDef"],["matColumnDef","batch"],["mat-header-cell","","style","width:12%;","mat-sort-header","batch_name",4,"matHeaderCellDef"],["matColumnDef","status"],["mat-header-cell","","style","width:10%;",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[4,"ngIf"],[3,"length","pageSize","pageIndex","pageSizeOptions","page"],["mat-flat-button","",1,"btn-primary-bg",3,"routerLink"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["mat-header-cell","",2,"width","5%","text-align","center"],[3,"checked","indeterminate","change"],["mat-cell","",2,"width","5%","text-align","center"],[3,"checked","click","change"],["mat-header-cell","","mat-sort-header","name",2,"width","19%"],["mat-cell",""],["mat-header-cell","","mat-sort-header","academic_type_name",2,"width","20%"],["mat-header-cell","","mat-sort-header","class",2,"width","20%"],["mat-header-cell","","mat-sort-header","academic_year_name",2,"width","12%"],["mat-header-cell","","mat-sort-header","batch_name",2,"width","12%"],["mat-header-cell","",2,"width","10%"],[1,"action",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","",3,"click"],[2,"color","#3F51B5"],[2,"color","grey"],[2,"color","green"],[2,"color","#f19421"],[2,"color","red"],["class","mat-chip mat-primary mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip bg-inactive mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],[1,"mat-chip","mat-primary","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","bg-inactive","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],["mat-header-row",""],["mat-row",""],[1,"text-center"]],template:function(e,t){1&e&&(M.dc(0,"div",0),M.dc(1,"div",1),M.dc(2,"div",2),M.ad(3,it,3,4,"button",3),M.cc(),M.cc(),M.dc(4,"div",1),M.dc(5,"mat-form-field",4),M.dc(6,"input",5,6),M.lc("ngModelChange",(function(e){return t.value=e})),M.cc(),M.ad(8,nt,3,0,"button",7),M.cc(),M.dc(9,"i",8),M.cd(10," search "),M.cc(),M.cc(),M.cc(),M.dc(11,"div",9),M.dc(12,"div",10),M.dc(13,"table",11),M.lc("matSortChange",(function(e){return t.sortData(e)})),M.bc(14,12),M.ad(15,ot,2,2,"th",13),M.ad(16,dt,2,1,"td",14),M.ac(),M.bc(17,15),M.ad(18,st,4,3,"th",16),M.ad(19,lt,2,1,"td",17),M.ac(),M.bc(20,18),M.ad(21,mt,4,3,"th",19),M.ad(22,ut,2,1,"td",17),M.ac(),M.bc(23,20),M.ad(24,pt,3,3,"th",21),M.ad(25,ht,3,3,"td",17),M.ac(),M.bc(26,22),M.ad(27,gt,3,3,"th",23),M.ad(28,bt,2,1,"td",17),M.ac(),M.bc(29,24),M.ad(30,ft,3,3,"th",25),M.ad(31,vt,2,1,"td",17),M.ac(),M.bc(32,26),M.ad(33,kt,12,19,"th",27),M.ad(34,Ft,3,2,"td",17),M.ac(),M.ad(35,Mt,1,0,"tr",28),M.ad(36,Dt,1,0,"tr",29),M.cc(),M.ad(37,Pt,4,0,"ng-container",30),M.dc(38,"mat-paginator",31),M.lc("page",(function(e){return t.onPaginateChange(e)})),M.cc(),M.cc(),M.cc()),2&e&&(M.Gb(3),M.yc("ngIf",t.permission.hasPermission(M.Ec(11,Ct),M.Ec(12,Nt))),M.Gb(3),M.yc("ngModel",t.value),M.Gb(2),M.yc("ngIf",t.value),M.Gb(5),M.yc("dataSource",t.dataSource),M.Gb(22),M.yc("matHeaderRowDef",t.displayedColumns),M.Gb(1),M.yc("matRowDefColumns",t.displayedColumns),M.Gb(1),M.yc("ngIf",0===t.dataSource.filteredData.length||0===t.dataSource.data.length),M.Gb(1),M.yc("length",t.paginationDTO.totalSize)("pageSize",t.paginationDTO.limit)("pageIndex",t.paginationDTO.offset)("pageSizeOptions",t.pageSizeOptions))},directives:[H.c,H.a,r.o,U.b,u.b,i.c,i.t,i.w,C.n,T.a,C.c,C.i,C.b,C.k,C.m,G.a,n.a,c.h,U.f,m.a,C.h,d.a,C.a,T.b,v.d,v.e,v.b,C.j,C.l],pipes:[W.c,ct],styles:[""]}),e})();function Yt(e,t){if(1&e){const e=M.ec();M.dc(0,"button",38),M.lc("click",(function(t){return M.Sc(e),M.pc().goto()})),M.cd(1),M.qc(2,"translate"),M.cc()}2&e&&(M.Gb(1),M.dd(M.rc(2,1,"gradeTemplate.list.edit")))}function Bt(e,t){1&e&&(M.dc(0,"button",39),M.cd(1),M.qc(2,"translate"),M.cc()),2&e&&(M.yc("routerLink","/school/grade-template/create"),M.Gb(1),M.dd(M.rc(2,2,"gradeTemplate.list.create")))}function At(e,t){1&e&&(M.dc(0,"th",40),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.grade")))}function Lt(e,t){if(1&e&&(M.dc(0,"td",41),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.grade," ")}}function Vt(e,t){1&e&&(M.dc(0,"th",40),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.minvalue")))}function zt(e,t){if(1&e&&(M.dc(0,"td",41),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.minvalue," ")}}function Rt(e,t){1&e&&(M.dc(0,"th",42),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.maxValue")))}function $t(e,t){if(1&e&&(M.dc(0,"td",43),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.maxvalue," ")}}function Xt(e,t){1&e&&(M.dc(0,"th",42),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.point")))}function Ht(e,t){if(1&e&&(M.dc(0,"td",43),M.cd(1),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.ed(" ",e.point," ")}}function Ut(e,t){1&e&&(M.dc(0,"th",42),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.color")))}function Jt(e,t){if(1&e&&(M.dc(0,"td",43),M.dc(1,"label"),M.cd(2),M.cc(),M.cc()),2&e){const e=t.$implicit;M.Gb(1),M.Zc("background",e.color,M.Qb),M.Gb(1),M.dd(e.color)}}function Wt(e,t){1&e&&(M.dc(0,"th",44),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.description")))}function Qt(e,t){if(1&e&&(M.dc(0,"td",43),M.dc(1,"p",45),M.cd(2),M.cc(),M.cc()),2&e){const e=t.$implicit;M.Gb(2),M.ed(" ",e.description," ")}}function Kt(e,t){1&e&&(M.dc(0,"th",46),M.dc(1,"b"),M.cd(2),M.qc(3,"translate"),M.cc(),M.cc()),2&e&&(M.Gb(2),M.dd(M.rc(3,1,"gradeTemplate.remarks")))}function Zt(e,t){if(1&e&&(M.dc(0,"td",41),M.dc(1,"p",45),M.cd(2),M.cc(),M.cc()),2&e){const e=t.$implicit;M.Gb(2),M.dd(e.remark)}}function ea(e,t){1&e&&M.Yb(0,"tr",47)}function ta(e,t){1&e&&M.Yb(0,"tr",48)}function aa(e,t){if(1&e&&(M.dc(0,"mat-checkbox",49),M.cd(1),M.cc()),2&e){const e=t.$implicit,a=t.index;M.yc("value",e.classId)("formControlName",a),M.Gb(1),M.dd(e.className)}}const ca=function(){return["grade_template"]},ra=function(){return["grade_template_update"]},ia=function(){return["grade_template_create"]},na=[{path:"",children:[{path:"create",component:Te,data:{title:"Create Grade Template",breadcrumb:"New"}},{path:"edit/:id",component:Je,data:{title:"Edit Grade Template",breadcrumb:"Update"}},{path:"view/:id",component:(()=>{class e{constructor(e,t,a,c,r,i,n){this.modelService=e,this.toaster=t,this.loader=a,this.formBuilder=c,this.router=r,this.activateRoute=i,this.permission=n,this.formData={},this.console=console,this.displayedColumns=["grade","minvalue","maxvalue","point","color","description","remarks"],this.gradeTemp=[],this.dataSource=new C.o,this.flag=[],this.onLoadSelectedClassIds=[]}ngOnInit(){this.gradeForm=this.formBuilder.group({classesFList:new i.d([])}),this.getOne()}getOne(){this.loader.open(),this.gradeTempId=this.activateRoute.snapshot.params.id,this.modelService.getOne(this.gradeTempId).subscribe(e=>{"success"==e.keyword?(this.dataSource.data=e.gradetemplets[0].particular,this.gradeTemp=e.gradetemplets[0],this.gradeTemp.class.forEach(e=>{this.onLoadSelectedClassIds.push(e.classId)}),this.getClasses(this.gradeTemp.academicTypeId,this.gradeTemp.academicYearId,this.gradeTemp.batchId),this.loader.close(),this.toaster.present(e.message,"")):(this.loader.close(),this.toaster.present(e.message,""))})}getClasses(e,t,a){this.modelService.getClass(a,e,t,this.gradeTempId).subscribe(e=>{this.avilableClass=e.classes,this.buildClasses(this.avilableClass)})}buildClasses(e){new i.d([]);var t=this.gradeForm.get("classesFList");t.clear(),e.forEach(e=>{t.push(new i.g(this.onLoadSelectedClassIds.includes(e.classId)))})}goto(){this.router.navigate([`/school/grade-template/edit/${this.gradeTempId}`])}}return e.\u0275fac=function(t){return new(t||e)(M.Xb(B),M.Xb(z.a),M.Xb(V.a),M.Xb(i.f),M.Xb(c.g),M.Xb(c.a),M.Xb(R.a))},e.\u0275cmp=M.Rb({type:e,selectors:[["app-create"]],viewQuery:function(e,t){var a;1&e&&M.Yc(G.a,!0),2&e&&M.Nc(a=M.mc())&&(t.paginator=a.first)},decls:81,vars:37,consts:[[1,"create_btn"],["mat-raised-button","","color","primary","class","btn-primary-bg",3,"click",4,"ngIf"],["mat-raised-button","","color","primary","class","btn-primary-bg ",3,"routerLink",4,"ngIf"],["href","#",1,"pl-8","primary-txt-color",3,"routerLink"],[1,"p-16"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","12",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","70",1,"mr-12","mt-12"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-12","mt-12"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","12",1,"mt-8"],[1,"table_container","p-16"],[1,""],["mat-table","",3,"dataSource"],["matColumnDef","grade"],["mat-header-cell","","style","width:10%;",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","minvalue"],["mat-header-cell","","style","width:10%",4,"matHeaderCellDef"],["matColumnDef","maxvalue"],["mat-header-cell","","style","width:8%;","class","",4,"matHeaderCellDef"],["mat-cell","","class","",4,"matCellDef"],["matColumnDef","point"],["matColumnDef","color"],["mat-header-cell","","class","","style","width:8%",4,"matHeaderCellDef"],["matColumnDef","description"],["mat-header-cell","","class","","style","width:24%",4,"matHeaderCellDef"],["matColumnDef","remarks"],["mat-header-cell","","style","width:25%",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[3,"formGroup"],["fxLayout","row wrap",1,"mt-4","grade-checkbox","p-16"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-0"],[1,"font14"],["fxFlex","100","fxFlex.gt-xs","100","formArrayName","classesFList",1,"flex-row","mt-12"],["class","example-margin mr-18","disabled","",3,"value","formControlName",4,"ngFor","ngForOf"],[1,"mt-12"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"routerLink"],["mat-header-cell","",2,"width","10%"],["mat-cell",""],["mat-header-cell","",1,"",2,"width","8%"],["mat-cell","",1,""],["mat-header-cell","",1,"",2,"width","24%"],[1,"mr-16","mb-4","text-justify"],["mat-header-cell","",2,"width","25%"],["mat-header-row",""],["mat-row",""],["disabled","",1,"example-margin","mr-18",3,"value","formControlName"]],template:function(e,t){1&e&&(M.dc(0,"div",0),M.ad(1,Yt,3,3,"button",1),M.ad(2,Bt,3,4,"button",2),M.dc(3,"a",3),M.cd(4),M.qc(5,"translate"),M.cc(),M.cc(),M.dc(6,"div",4),M.dc(7,"div",5),M.dc(8,"div",6),M.dc(9,"label"),M.dc(10,"strong"),M.cd(11),M.qc(12,"translate"),M.cc(),M.cc(),M.cc(),M.dc(13,"div",7),M.dc(14,"label"),M.cd(15),M.cc(),M.cc(),M.cc(),M.dc(16,"div",5),M.dc(17,"div",6),M.dc(18,"label"),M.dc(19,"strong"),M.cd(20),M.qc(21,"translate"),M.cc(),M.cc(),M.cc(),M.dc(22,"div",7),M.dc(23,"label"),M.cd(24),M.cc(),M.cc(),M.cc(),M.dc(25,"div",5),M.dc(26,"div",6),M.dc(27,"label"),M.dc(28,"strong"),M.cd(29),M.qc(30,"translate"),M.cc(),M.cc(),M.cc(),M.dc(31,"div",8),M.dc(32,"label"),M.cd(33),M.cc(),M.cc(),M.cc(),M.dc(34,"div",9),M.dc(35,"div",10),M.dc(36,"label"),M.dc(37,"strong"),M.cd(38),M.qc(39,"translate"),M.cc(),M.cc(),M.cc(),M.dc(40,"div",8),M.dc(41,"label"),M.cd(42),M.cc(),M.cc(),M.cc(),M.cc(),M.dc(43,"div",11),M.dc(44,"div",12),M.dc(45,"table",13),M.bc(46,14),M.ad(47,At,4,3,"th",15),M.ad(48,Lt,2,1,"td",16),M.ac(),M.bc(49,17),M.ad(50,Vt,4,3,"th",18),M.ad(51,zt,2,1,"td",16),M.ac(),M.bc(52,19),M.ad(53,Rt,4,3,"th",20),M.ad(54,$t,2,1,"td",21),M.ac(),M.bc(55,22),M.ad(56,Xt,4,3,"th",20),M.ad(57,Ht,2,1,"td",21),M.ac(),M.bc(58,23),M.ad(59,Ut,4,3,"th",24),M.ad(60,Jt,3,3,"td",21),M.ac(),M.bc(61,25),M.ad(62,Wt,4,3,"th",26),M.ad(63,Qt,3,1,"td",21),M.ac(),M.bc(64,27),M.ad(65,Kt,4,3,"th",28),M.ad(66,Zt,3,1,"td",16),M.ac(),M.ad(67,ea,1,0,"tr",29),M.ad(68,ta,1,0,"tr",30),M.cc(),M.cc(),M.cc(),M.dc(69,"form",31),M.dc(70,"div",32),M.dc(71,"div",33),M.dc(72,"label",34),M.dc(73,"strong"),M.cd(74),M.qc(75,"translate"),M.cc(),M.cc(),M.cc(),M.dc(76,"div",35),M.ad(77,aa,2,3,"mat-checkbox",36),M.cc(),M.dc(78,"label",37),M.cd(79),M.qc(80,"translate"),M.cc(),M.cc(),M.cc()),2&e&&(M.Gb(1),M.yc("ngIf",t.permission.hasPermission(M.Ec(33,ca),M.Ec(34,ra))),M.Gb(1),M.yc("ngIf",t.permission.hasPermission(M.Ec(35,ca),M.Ec(36,ia))),M.Gb(1),M.yc("routerLink","/school/grade-template"),M.Gb(1),M.dd(M.rc(5,19,"gradeTemplate.discard")),M.Gb(7),M.dd(M.rc(12,21,"gradeTemplate.gradename")),M.Gb(4),M.dd(t.gradeTemp.name),M.Gb(5),M.ed(" ",M.rc(21,23,"gradeTemplate.selectOne"),""),M.Gb(4),M.dd(t.gradeTemp.academicTypeNname),M.Gb(5),M.ed(" ",M.rc(30,25,"gradeTemplate.academicYear"),""),M.Gb(4),M.dd(t.gradeTemp.academicYearName),M.Gb(5),M.dd(M.rc(39,27,"gradeTemplate.batch")),M.Gb(4),M.dd(t.gradeTemp.batchName),M.Gb(3),M.yc("dataSource",t.dataSource),M.Gb(22),M.yc("matHeaderRowDef",t.displayedColumns),M.Gb(1),M.yc("matRowDefColumns",t.displayedColumns),M.Gb(1),M.yc("formGroup",t.gradeForm),M.Gb(5),M.dd(M.rc(75,29,"gradeTemplate.classes")),M.Gb(3),M.yc("ngForOf",t.avilableClass),M.Gb(2),M.dd(M.rc(80,31,"gradeTemplate.notes")))},directives:[r.o,c.j,H.c,H.a,C.n,C.c,C.i,C.b,C.k,C.m,i.D,i.u,i.k,i.e,r.n,n.a,c.h,C.h,C.a,C.j,C.l,d.a,i.t,i.i],pipes:[W.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.grade-checkbox[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-right:30px!important}.text-justify[_ngcontent-%COMP%]{text-align:justify}"]}),e})(),data:{title:"View Grade Template",breadcrumb:"View"}},{path:"",component:jt,data:{title:"List of Grade Template",breadcrumb:"List"}}]}];var oa=a("0OQn");a.d(t,"AppGradetemplateModule",(function(){return da}));let da=(()=>{class e{}return e.\u0275mod=M.Vb({type:e}),e.\u0275inj=M.Ub({factory:function(t){return new(t||e)},imports:[[r.c,i.m,i.z,_.b,u.c,p.c,o.e,l.c,s.n,h.b,g.c,d.b,v.c,n.b,m.b,b.a,f.a,y.b,J.b,x.a,G.b,T.c,C.p,w.a,c.k.forChild(na),oa.a]]}),e})()},mbIT:function(e,t,a){"use strict";t.isArray=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}()},n3uD:function(e,t,a){"use strict";var c=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else c&&console.log("RxJS: Back to a better error behavior. Thank you. <3");c=e},get useDeprecatedSynchronousErrorHandling(){return c}}},"p//D":function(e,t,a){"use strict";t.rxSubscriber=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),t.$$rxSubscriber=t.rxSubscriber},pshJ:function(e,t,a){"use strict";t.isFunction=function(e){return"function"==typeof e}},q3Kh:function(e,t,a){"use strict";var c=this&&this.__extends||function(){var e=function(t,a){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(t,a)};return function(t,a){function c(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),r=a("FWf1");t.map=function(e,t){return function(a){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return a.lift(new i(e,t))}};var i=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new n(e,this.project,this.thisArg))},e}();t.MapOperator=i;var n=function(e){function t(t,a,c){var r=e.call(this,t)||this;return r.project=a,r.count=0,r.thisArg=c||r,r}return c(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(a){return void this.destination.error(a)}this.destination.next(t)},t}(r.Subscriber)},"zB/H":function(e,t,a){"use strict";var c=a("mbIT"),r=a("GMZp"),i=a("pshJ"),n=a("LBXl");function o(e){return e.reduce((function(e,t){return e.concat(t instanceof n.UnsubscriptionError?t.errors:t)}),[])}t.Subscription=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var a=this._parentOrParents,d=this._unsubscribe,s=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof e)a.remove(this);else if(null!==a)for(var l=0;l<a.length;++l)a[l].remove(this);if(i.isFunction(d))try{d.call(this)}catch(p){t=p instanceof n.UnsubscriptionError?o(p.errors):[p]}if(c.isArray(s)){l=-1;for(var m=s.length;++l<m;){var u=s[l];if(r.isObject(u))try{u.unsubscribe()}catch(p){t=t||[],p instanceof n.UnsubscriptionError?t=t.concat(o(p.errors)):t.push(p)}}}if(t)throw new n.UnsubscriptionError(t)}},e.prototype.add=function(t){var a=t;if(!t)return e.EMPTY;switch(typeof t){case"function":a=new e(t);case"object":if(a===this||a.closed||"function"!=typeof a.unsubscribe)return a;if(this.closed)return a.unsubscribe(),a;if(!(a instanceof e)){var c=a;(a=new e)._subscriptions=[c]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var r=a._parentOrParents;if(null===r)a._parentOrParents=this;else if(r instanceof e){if(r===this)return a;a._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return a;r.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[a]:i.push(a),a},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var a=t.indexOf(e);-1!==a&&t.splice(a,1)}},e.EMPTY=((t=new e).closed=!0,t),e}()}}]);
/var/www/krbed.in/../../www/../www/html/../school_portal_admin/49-es2015.f99bb7e58081bf606cab.js