1"use strict";(self.webpackChunkvex=self.webpackChunkvex||[]).push([[4281,6300,3919],{84706:($,x,a)=>{a.d(x,{T:()=>S});var F=a(82087),c=a(54438);const l=["*"];let j=(()=>{class p{static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275cmp=c.VBU({type:p,selectors:[["vex-breadcrumb"]],hostAttrs:[1,"vex-breadcrumb","body-2","text-hint","leading-none","hover:text-primary-600","no-underline","transition","duration-400","ease-out-swift"],standalone:!0,features:[c.aNF],ngContentSelectors:l,decls:1,vars:0,template:function(f,v){1&f&&(c.NAR(),c.SdG(0))},encapsulation:2})}}return p})();var d=a(51188),u=a(60177),k=a(99213);const H=()=>[];function C(p,b){if(1&p&&(c.qex(0),c.nrm(1,"div",4),c.j41(2,"vex-breadcrumb")(3,"a",1),c.EFF(4),c.k0s()(),c.bVm()),2&p){const g=b.$implicit;c.R7$(3),c.Y8G("routerLink",c.lJ4(2,H)),c.R7$(),c.JRh(g)}}const h=()=>["/"];let S=(()=>{class p{constructor(){this.crumbs=[],this.trackByValue=F.U_}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275cmp=c.VBU({type:p,selectors:[["vex-breadcrumbs"]],inputs:{crumbs:"crumbs"},standalone:!0,features:[c.aNF],decls:5,vars:4,consts:[[1,"flex","items-center","gap-2"],[3,"routerLink"],["svgIcon","mat:home",1,"icon-sm"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"w-1","h-1","bg-gray-600","rounded-full"]],template:function(f,v){1&f&&(c.j41(0,"div",0)(1,"vex-breadcrumb")(2,"a",1),c.nrm(3,"mat-icon",2),c.k0s()(),c.DNE(4,C,5,3,"ng-container",3),c.k0s()),2&f&&(c.R7$(2),c.Y8G("routerLink",c.lJ4(3,h)),c.R7$(2),c.Y8G("ngForOf",v.crumbs)("ngForTrackBy",v.trackByValue))},dependencies:[j,d.Wk,u.pM,k.m_,k.An],encapsulation:2})}}return p})()},58713:($,x,a)=>{a.d(x,{h:()=>c});var F=a(54438);let c=(()=>{class l{constructor(){}static{this.\u0275fac=function(u){return new(u||l)}}static{this.\u0275dir=F.FsC({type:l,selectors:[["","vexPageLayoutContent",""],["vex-page-layout-content"]],hostAttrs:[1,"vex-page-layout-content"],standalone:!0})}}return l})()},52209:($,x,a)=>{a.d(x,{T:()=>u});var F=a(60177),c=a(88834),l=a(34006),j=a(99213),d=a(54438);let u=(()=>{class k{constructor(C,h){this.data=C,this.dialogRef=h}ngOnInit(){}onClick(){this.dialogRef.close(!0)}static{this.\u0275fac=function(h){return new(h||k)(d.rXU(l.Vh),d.rXU(l.CP))}}static{this.\u0275cmp=d.VBU({type:k,selectors:[["vex-confirm-dialog-box"]],standalone:!0,features:[d.aNF],decls:7,vars:1,consts:[["align","end"],["color","warn","mat-button","","mat-dialog-close","","type","button"],["mat-flat-button","","color","primary","type","button","cdkFocusInitial","",3,"click"]],template:function(h,S){1&h&&(d.j41(0,"mat-dialog-content"),d.EFF(1),d.k0s(),d.j41(2,"mat-dialog-actions",0)(3,"button",1),d.EFF(4,"Cancel"),d.k0s(),d.j41(5,"button",2),d.bIt("click",function(){return S.onClick()}),d.EFF(6,"Yes"),d.k0s()()),2&h&&(d.R7$(),d.SpI(" ",S.data.message,"\n"))},dependencies:[F.MD,l.hM,l.tx,l.E7,l.Yi,c.Hl,c.$z,j.m_]})}}return k})()},84281:($,x,a)=>{a.r(x),a.d(x,{HomeWorkComponent:()=>U});var F=a(31635),c=a(45024),l=a(89417),j=a(96695),d=a(2042),u=a(26450),k=a(49894),H=a(92771),C=a(5964),h=a(86648),S=a(10444),p=a(42465),b=a(60177),g=a(88834),f=a(82765),v=a(86600),w=a(25084),y=a(34006),N=a(71997),R=a(32102),E=a(99213),D=a(99631),G=a(59115),T=a(5951),I=a(82798),V=a(30450),W=a(14823),z=a(84706),J=a(58713),K=a(69719),Q=a(99955),Z=a(52209),q=a(18359),tt=a(57786),et=a(7673),B=a(33726),ot=a(96354),t=a(54438),X=a(95416),nt=a(345),it=a(98518),O=a(47038),st=a(48054),M=a(3871);const at=["divisionSelect"];function rt(o,n){if(1&o){const e=t.RV6();t.j41(0,"mat-radio-button",34),t.bIt("change",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.changeRadioStatus(s))}),t.nrm(1,"mat-icon",35),t.k0s()}2&o&&t.Y8G("value",1)}function lt(o,n){if(1&o){const e=t.RV6();t.j41(0,"mat-radio-button",34),t.bIt("change",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.changeRadioStatus(s))}),t.nrm(1,"mat-icon",36),t.k0s()}2&o&&t.Y8G("value",2)}function ct(o,n){if(1&o&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&o){const e=t.XpG(3);t.HbH(e.isstatus?"text-green-500":"text-red-500"),t.R7$(),t.JRh(e.isstatus?"Connected":"Disconnected")}}function mt(o,n){if(1&o){const e=t.RV6();t.j41(0,"mat-radio-button",37),t.bIt("change",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.changeRadioStatus(s))}),t.j41(1,"div",38)(2,"span"),t.nrm(3,"mat-icon",39),t.k0s(),t.DNE(4,ct,2,3,"span",40),t.k0s()()}if(2&o){const e=t.XpG(2);t.Y8G("value",3),t.R7$(2),t.HbH(e.isstatus?"text-green-500":"text-red-500"),t.R7$(2),t.vxM(4,e.isselected?4:-1)}}function dt(o,n){if(1&o&&(t.j41(0,"mat-radio-group",31),t.DNE(1,rt,2,1,"mat-radio-button",32)(2,lt,2,1,"mat-radio-button",32)(3,mt,5,4,"mat-radio-button",33),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.Y8G("ngIf",e.notification_type.includes("0")),t.R7$(),t.Y8G("ngIf",e.notification_type.includes("1")),t.R7$(),t.Y8G("ngIf",e.notification_type.includes("2"))}}function ut(o,n){if(1&o&&(t.j41(0,"mat-option",41),t.EFF(1),t.k0s()),2&o){const e=n.$implicit;t.Y8G("value",e.class_id),t.R7$(),t.JRh(e.class_name)}}function pt(o,n){1&o&&(t.j41(0,"mat-error"),t.EFF(1,"Please Select Class !"),t.k0s())}function ft(o,n){if(1&o&&(t.j41(0,"mat-option",41),t.EFF(1),t.k0s()),2&o){const e=n.$implicit;t.Y8G("value",e.division_id),t.R7$(),t.JRh(e.division_name)}}function _t(o,n){1&o&&(t.j41(0,"mat-error"),t.EFF(1,"Please Select Division !"),t.k0s())}function ht(o,n){if(1&o){const e=t.RV6();t.j41(0,"mat-form-field")(1,"mat-label"),t.EFF(2,"Section"),t.k0s(),t.j41(3,"mat-select",42),t.bIt("selectionChange",function(s){t.eBV(e);const r=t.XpG();return t.Njj(r.getSubject(s.value))}),t.DNE(4,ft,2,2,"mat-option",13),t.k0s(),t.DNE(5,_t,2,0,"mat-error",14),t.k0s()}if(2&o){const e=t.XpG();t.R7$(4),t.Y8G("ngForOf",e.divisions),t.R7$(),t.Y8G("ngIf",e.form.get("division_id").hasError("required"))}}function gt(o,n){if(1&o){const e=t.RV6();t.j41(0,"mat-option",48),t.bIt("click",function(){t.eBV(e),t.XpG();const s=t.sdS(4),r=t.sdS(6),m=t.XpG();return t.Njj(m.changeSelection(s,r))}),t.EFF(1),t.k0s()}if(2&o){const e=n.$implicit;t.Y8G("value",e.division_id),t.R7$(),t.JRh(e.division_name)}}function bt(o,n){1&o&&(t.j41(0,"mat-error"),t.EFF(1,"Please Select Division !"),t.k0s())}const kt=o=>({"text-accent":o});function Ct(o,n){if(1&o){const e=t.RV6();t.j41(0,"mat-form-field")(1,"mat-label"),t.EFF(2,"Section"),t.k0s(),t.j41(3,"mat-select",43,44),t.bIt("selectionChange",function(s){t.eBV(e);const r=t.XpG();return t.Njj(r.getSubject(s.value))}),t.j41(5,"mat-checkbox",45,46),t.bIt("change",function(s){t.eBV(e);const r=t.sdS(4),m=t.XpG();return t.Njj(m.toggleSelect(s.checked,r))}),t.EFF(7,"All"),t.k0s(),t.DNE(8,gt,2,2,"mat-option",47),t.k0s(),t.DNE(9,bt,2,0,"mat-error",14),t.k0s()}if(2&o){const e=t.sdS(6),i=t.XpG();t.R7$(5),t.Y8G("ngClass",t.eq3(3,kt,e.checked)),t.R7$(3),t.Y8G("ngForOf",i.divisions),t.R7$(),t.Y8G("ngIf",i.form.get("division_id").hasError("required"))}}function vt(o,n){if(1&o&&(t.j41(0,"mat-option",49),t.EFF(1),t.k0s()),2&o){const e=n.$implicit;t.Y8G("value",e.subject_id),t.R7$(),t.JRh(e.subject_name)}}function yt(o,n){1&o&&(t.j41(0,"mat-error"),t.EFF(1,"Please Select Subject !"),t.k0s())}function xt(o,n){1&o&&(t.j41(0,"mat-error"),t.EFF(1,"Please Enter Title !"),t.k0s())}function jt(o,n){1&o&&(t.j41(0,"mat-error"),t.EFF(1,"Please Enter Description !"),t.k0s())}function Ft(o,n){if(1&o){const e=t.RV6();t.qex(0),t.j41(1,"button",50),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.openViewLink())}),t.nrm(2,"mat-icon",51),t.k0s(),t.j41(3,"button",50),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.removeViewLink())}),t.nrm(4,"mat-icon",3),t.k0s(),t.bVm()}}const P=o=>({disabled:o});function St(o,n){if(1&o&&(t.j41(0,"button",52),t.EFF(1," Add "),t.k0s()),2&o){const e=t.XpG();t.Y8G("disabled",!e.is_add)("ngClass",t.eq3(2,P,!e.is_add))}}function Rt(o,n){if(1&o&&(t.j41(0,"button",52),t.EFF(1," Modify "),t.k0s()),2&o){const e=t.XpG();t.Y8G("disabled",!e.is_modify)("ngClass",t.eq3(2,P,!e.is_modify))}}let L=(()=>{class o{constructor(e,i,s,r,m,_,zt,Jt,Kt,Qt){this.defaults=e,this.dialogRef=i,this.fb=s,this.snackbar=r,this.dateAdapter=m,this.sanitizer=_,this.settingService=zt,this.loader=Jt,this._schoolService=Kt,this.commonService=Qt,this.networkStatus=!1,this.networkStatus$=q.yU.EMPTY,this.isstatus=!1,this.isselected=!1,this.is_add=!1,this.is_modify=!1,this.permissions=this.commonService.getDecodedToken(),this.mode="create",this.classes=JSON.parse(localStorage.getItem("classes")),this.divisions=[],this.subjects=[],this.viewLink="",this.notification_type=[1],this.default_selected_notification=0,this.selectAllDivisions=!1,this.showNotificationType=!1,this.dateAdapter.setLocale("en-in"),"1"==this.permissions.is_add&&(this.is_add=!0),"1"==this.permissions.is_modify&&(this.is_modify=!0)}ngOnInit(){this._schoolService.getWhatsappAccountStatus().subscribe(e=>{"connected"===e.status&&(this.isstatus=!0)}),this.loader.show(),this.defaults?(this.mode="update",this.selectedDate=new Date(this.defaults.homework_date),this.getDivisions(this.defaults.class_id),this.get
1Subject(this.defaults.division_id),this.viewLink=this.defaults.homework_file_url):(this.defaults={},this.selectedDate=new Date),this.form=this.fb.group({update_id:[this.defaults.homework_id],sms_sent_status:[this.defaults.sms_sent_status],homework_date:[this.selectedDate],class_id:[this.defaults.class_id,l.k0.required],division_id:[this.defaults.division_id,l.k0.required],subject_id:[this.defaults.subject_id,l.k0.required],homework_title:[this.defaults.homework_title,l.k0.required],homework_description:[this.defaults.homework_description,l.k0.required],homework_file:[""],current_homework_file:[this.defaults.homework_file]}),this.settingService.getSetting().subscribe(e=>{"0"==e.send_sms_homework_on_off?(this.showNotificationType=!1,this.form.get("sms_sent_status").setValue(0)):(this.showNotificationType=!0,e.notification_type&&(this.notification_type=JSON.parse(e.notification_type)),null!=e.default_selected_notification&&(this.default_selected_notification=Number(e.default_selected_notification)+1,this.form.get("sms_sent_status")?.setValue(this.default_selected_notification),this.isselected=3==this.default_selected_notification))}),this.loader.hide(),this.checkNetworkStatus()}getDivisions(e){this.divisions=[],this.subjects=[],e&&(0,h.H)(this.classes).pipe((0,C.p)(i=>i.class_id==e)).subscribe(i=>{this.divisions=i.divisions})}getSubject(e){this.subjects=[],e.length>0&&this.classes.forEach(i=>{(0,h.H)(i.divisions).pipe((0,C.p)(s=>e.includes(s.division_id))).subscribe(s=>{s.subjects.forEach(r=>{this.subjects.some(_=>_.subject_id===r.subject_id)||this.subjects.push(r)})})})}previewImage(e,i){if(e.target.files&&e.target.files[0]){const s=e.target.files[0],r=new FileReader;"homework_file"==i&&(r.onload=m=>{this.viewLink=m.target.result,this.form.controls.homework_file.setValue(s)}),r.readAsDataURL(s)}}sanitize(e){return this.sanitizer.bypassSecurityTrustUrl(e)}checkNetworkStatus(){this.networkStatus=navigator.onLine,this.networkStatus$=(0,tt.h)((0,et.of)(null),(0,B.R)(window,"online"),(0,B.R)(window,"offline")).pipe((0,ot.T)(()=>navigator.onLine)).subscribe(e=>{this.networkStatus=e})}ngOnDestroy(){this.networkStatus$.unsubscribe()}openViewLink(){var e=window.open();
1e.document.write('<html><head><style>*{margin:0;padding:0}iframe{width:100%;height:100%;border:none;}</style></head><body><iframe src="'+this.viewLink+'"></iframe></body></html>'),e.document.close()}removeViewLink(){this.viewLink="",this.form.controls.homework_file.setValue([])}changeRadioStatus(e){this.isselected=3==e.value}save(){this.networkStatus?this.form.invalid||(console.log(this.form.errors),"create"===this.mode?this.createHomeWork():"update"===this.mode&&this.updateHomeWork()):this.snackbar.open("You're Offline !",null,{duration:3e3,panelClass:["bg-red-500"]})}createHomeWork(){this.dialogRef.close(this.form.value)}updateHomeWork(){const e=this.form.value;e.update_id=this.defaults.homework_id,this.dialogRef.close(e)}isCreateMode(){return"create"===this.mode}isUpdateMode(){return"update"===this.mode}toggleSelect(e,i){i.options.forEach(e?s=>s.select():s=>s.deselect())}changeSelection(e,i){const s=e.options.length;let r=0;e.options.forEach(m=>{m.selected&&r++}),i.checked=s==r}static{this.\u0275fac=function(i){return new(i||o)(t.rXU(y.Vh),t.rXU(y.CP),t.rXU(l.ze),t.rXU(X.UG),t.rXU(v.MJ),t.rXU(nt.up),t.rXU(it.q),t.rXU(O.U),t.rXU(st.g),t.rXU(M.h))}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["vex-create-update-home-work"]],viewQuery:function(i,s){if(1&i&&t.GBs(at,5),2&i){let r;t.mGM(r=t.lsd())&&(s.divisionSelect=r.first)}},standalone:!0,features:[t.aNF],decls:65,vars:15,consts:[["mat-dialog-title","",1,"flex","items-center","border-b"],[1,"m-0","flex-auto","uppercase"],["mat-dialog-close","","mat-icon-button","","type","button",1,"text-secondary"],["svgIcon","mat:close"],[3,"formGroup","ngSubmit"],[1,"px-4","pt-4"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-x-4"],["aria-label","Select an option","formControlName","sms_sent_status",4,"ngIf"],["matInput","","formControlName","homework_date",3,"matDatepicker"],["matSuffix","",3,"for"],["datePicker",""],["formControlName","class_id",3,"selectionChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["formControlName","subject_id"],["color","warn",3,"value",4,"ngFor","ngForOf"],["type","text","matInput","","formControlName","homework_title"],[1,"flex","flex-col","sm:flex-row"],[1,"flex-auto"],["matInput","","formControlName","homework_description"],[1,"flex","flex-col","sm:flex-row","sm:items-center","sm:justify-between","gap-2"],[1,"flex","items-center","gap-2"],["type","file","accept",".jpg,.png,.pdf",1,"hidden",3,"change"],["file",""],["type","button","mat-flat-button","","color","warn",1,"rounded","w-32",3,"click"],[1,"text-xs","text-center","sm:text-right"],[1,"text-red-500"],["align","end"],["mat-button","","mat-dialog-close","","type","button"],["color","primary","mat-flat-button","","type","submit",3,"disabled","ngClass",4,"ngIf"],["aria-label","Select an option","formControlName","sms_sent_status"],["color","warn","class","mat-radio-with-icon pr-2",3,"value","change",4,"ngIf"],["color","warn","class","mat-radio-with-icon",3,"value","change",4,"ngIf"],["color","warn",1,"mat-radio-with-icon","pr-2",3,"value","change"],["svgIcon","mat:textsms",1,"mt-[2.5px]"],["svgIcon","mat:notifications_active",1,"mt-[2.5px]"],["color","warn",1,"mat-radio-with-icon",3,"value","change"],[1,"flex","flex-row","justify-center","items-center"],["svgIcon","mat:perm_phone_msg",1,"mt-[2.5px]"],[3,"class"],[3,"value"],["formControlName","division_id",3,"selectionChange"],["formControlName","division_id","multiple","",3,"selectionChange"],["divisionSelection",""],["disableRipple","","matRipple","",1,"select-all-checkbox",3,"ngClass","change"],["selectAllDivision",""],[3,"value","click",4,"ngFor","ngForOf"],[3,"value","click"],["color","warn",3,"value"],["type","button","mat-icon-button","","color","primary",3,"click"],["svgIcon","mat:visibility"],["color","primary","mat-flat-button","","type","submit",3,"disabled","ngClass"]],template:function(i,s){if(1&i){const r=t.RV6();t.j41(0,"div",0)(1,"h2",1),t.EFF(2,"Home Work"),t.k0s(),t.j41(3,"button",2),t.nrm(4,"mat-icon",3),t.k0s()(),t.j41(5,"form",4),t.bIt("ngSubmit",function(){return s.save()}),t.j41(6,"mat-dialog-content",5)(7,"div",6),t.DNE(8,dt,4,3,"mat-radio-group",7),t.j41(9,"mat-form-field")(10,"mat-label"),t.EFF(11,"Date"),t.k0s(),t.nrm(12,"input",8)(13,"mat-datepicker-toggle",9)(14,"mat-datepicker",null,10),t.k0s()(),t.j41(16,"div",6)(17,"mat-form-field")(18,"mat-label"),t.EFF(19,"Class"),t.k0s(),t.j41(20,"mat-select",11),t.bIt("selectionChange",function(_){return s.getDivisions(_.value)}),t.j41(21,"mat-option",12),t.EFF(22,"Select"),t.k0s(),t.DNE(23,ut,2,2,"mat-option",13),t.k0s(),t.DNE(24,pt,2,0,"mat-error",14),t.k0s(),t.DNE(25,ht,6,2,"mat-form-field",14)(26,Ct,10,5,"mat-form-field",14),t.k0s(),t.j41(27,"div",6)(28,"mat-form-field")(29,"mat-label"),t.EFF(30,"Subject"),t.k0s(),t.j41(31,"mat-select",15)(32,"mat-option",12),t.EFF(33,"Select"),t.k0s(),t.DNE(34,vt,2,2,"mat-option",16),t.k0s(),t.DNE(35,yt,2,0,"mat-error",14),t.k0s(),t.j41(36,"mat-form-field")(37,"mat-label"),t.EFF(38,"Title"),t.k0s(),t.nrm(39,"input",17),t.DNE(40,xt,2,0,"mat-error",14),t.k0s()(),t.j41(41,"div",18)(42,"mat-form-field",19)(43,"mat-label"),t.EFF(44,"Description"),t.k0s(),t.nrm(45,"textarea",20),t.DNE(46,jt,2,0,"mat-error",14),t.k0s()(),t.j41(47,"div",21)(48,"div",22)(49,"input",23,24),t.bIt("change",function(_){return s.previewImage(_,"homework_file")}),t.k0s(),t.j41(51,"button",25),t.bIt("click",function(){t.eBV(r);const _=t.sdS(50);return t.Njj(_.click())}),t.EFF(52," Browse "),t.k0s(),t.DNE(53,Ft,5,0,"ng-container",14),t.k0s(),t.j41(54,"div",26)(55,"strong"),t.EFF(56,"Note: "),t.k0s(),t.EFF(57,"Image & PDF Files Only "),t.j41(58,"span",27),t.EFF(59,"(Max 5MB)"),t.k0s()()()(),t.j41(60,"mat-dialog-actions",28)(61,"button",29),t.EFF(62,"Cancel"),t.k0s(),t.DNE(63,St,2,4,"button",30)(64,Rt,2,4,"button",30),t.k0s()()}if(2&i){const r=t.sdS(15);t.R7$(5),t.Y8G("formGroup",s.form),t.R7$(3),t.Y8G("ngIf",s.showNotificationType),t.R7$(4),t.Y8G("matDatepicker",r),t.R7$(),t.Y8G("for",r),t.R7$(10),t.Y8G("ngForOf",s.classes),t.R7$(),t.Y8G("ngIf",s.form.get("class_id").hasError("required")),t.R7$(),t.Y8G("ngIf","update"==s.mode),t.R7$(),t.Y8G("ngIf","create"==s.mode),t.R7$(8),t.Y8G("ngForOf",s.subjects),t.R7$(),t.Y8G("ngIf",s.form.get("subject_id").hasError("required")),t.R7$(5),t.Y8G("ngIf",s.form.get("homework_title").hasError("required")),t.R7$(6),t.Y8G("ngIf",s.form.get("homework_description").hasError("required")),t.R7$(7),t.Y8G("ngIf",""!=s.viewLink),t.R7$(10),t.Y8G("ngIf",s.isCreateMode()),t.R7$(),t.Y8G("ngIf",s.isUpdateMode())}},dependencies:[b.MD,b.YU,b.Sq,b.bT,l.YN,l.qT,l.me,l.BC,l.cb,R.RG,R.rl,R.nJ,R.TL,R.yw,l.X1,l.j4,l.JD,E.m_,E.An,g.Hl,g.$z,g.iY,D.fS,D.fg,j.Ou,u.tP,G.Cn,y.hM,y.tx,y.BI,y.E7,y.Yi,w.X6,w.Vh,w.bZ,w.bU,v.w0,T.Wk,T.VT,T._g,N.w,V.mV,f.g7,f.So,v.Sy,v.wT,I.Ve,I.VO,W.uc],data:{animation:[S.b,p.ac]}})}}return o}
1)();class A{constructor(n){this.homework_id=n.homework_id,this.homework_date=n.homework_date,this.sms_sent_status=n.sms_sent_status,this.class_id=n.class_id,this.division_id=n.division_id,this.subject_id=n.subject_id,this.subject_name=n.subject_name,this.homework_title=n.homework_title,this.homework_description=n.homework_description,this.homework_file=n.homework_file,this.homework_file_url=n.homework_file_url,this.class=n.class,this.created_by=n.created_by,this.updated_by=n.updated_by}}var wt=a(89169);function Et(o,n){if(1&o&&(t.j41(0,"th",29),t.EFF(1),t.k0s()),2&o){const e=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",e.label,"")}}function Gt(o,n){if(1&o&&(t.j41(0,"td",30),t.EFF(1),t.k0s()),2&o){const e=n.index,i=t.XpG(2).$implicit;t.Y8G("ngClass",i.cssClasses),t.R7$(),t.JRh(e+1)}}function Tt(o,n){if(1&o&&(t.qex(0,26),t.DNE(1,Et,2,1,"th",27)(2,Gt,2,2,"td",28),t.bVm()),2&o){const e=t.XpG().$implicit;t.Y8G("matColumnDef",e.property)}}function $t(o,n){if(1&o&&(t.qex(0),t.DNE(1,Tt,3,1,"ng-container",25),t.bVm()),2&o){const e=n.$implicit;t.R7$(),t.Y8G("ngIf","index"===e.type)}}function Ht(o,n){if(1&o&&(t.j41(0,"th",29),t.EFF(1),t.k0s()),2&o){const e=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",e.label,"")}}function Dt(o,n){if(1&o&&(t.j41(0,"td",30),t.EFF(1),t.k0s()),2&o){const e=n.$implicit,i=t.XpG(2).$implicit;t.Y8G("ngClass",i.cssClasses),t.R7$(),t.JRh(e[i.property])}}function It(o,n){if(1&o&&(t.qex(0,26),t.DNE(1,Ht,2,1,"th",27)(2,Dt,2,2,"td",28),t.bVm()),2&o){const e=t.XpG().$implicit;t.Y8G("matColumnDef",e.property)}}function Wt(o,n){if(1&o&&(t.qex(0),t.DNE(1,It,3,1,"ng-container",25),t.bVm()),2&o){const e=n.$implicit;t.R7$(),t.Y8G("ngIf","text"===e.type)}}function Ut(o,n){if(1&o&&(t.j41(0,"th",29),t.EFF(1),t.k0s()),2&o){const e=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",e.label,"")}}function Yt(o,n){if(1&o&&(t.j41(0,"td",30),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&o){const e=n.$implicit,i=t.XpG(2).$implicit;t.Y8G("ngClass",i.cssClasses),t.R7$(),t.JRh(t.i5U(2,2,e[i.property],"dd-MM-yyyy"))}}function Nt(o,n){if(1&o&&(t.qex(0,26),t.DNE(1,Ut,2,1,"th",27)(2,Yt,3,5,"td",28),t.bVm()),2&o){const e=t.XpG().$implicit;t.Y8G("matColumnDef",e.property)}}function Vt(o,n){if(1&o&&(t.qex(0),t.DNE(1,Nt,3,1,"ng-container",25),t.bVm()),2&o){const e=n.$implicit;t.R7$(),t.Y8G("ngIf","date"===e.type)}}function Bt(o,n){1&o&&t.nrm(0,"th",31)}const Xt=o=>({"text-gray-400":o});function Ot(o,n){if(1&o){const e=t.RV6();t.j41(0,"td",32)(1,"button",33),t.bIt("click",function(s){const m=t.eBV(e).$implicit,_=t.XpG();return s.stopPropagation(),t.Njj(_.deleteHomeWork(m))}),t.nrm(2,"mat-icon",34),t.k0s()()}if(2&o){const e=t.XpG();t.R7$(),t.Y8G("disabled",!e.is_delete),t.R7$(),t.Y8G("ngClass",t.eq3(2,Xt,!e.is_delete))}}function Mt(o,n){1&o&&t.nrm(0,"tr",35)}function Pt(o,n){if(1&o){const e=t.RV6();t.j41(0,"tr",36),t.bIt("click",function(){const r=t.eBV(e).$implicit,m=t.XpG();return t.Njj(m.updateHomeWork(r))}),t.k0s()}2&o&&t.Y8G("@fadeInUp",void 0)}function Lt(o,n){if(1&o){const e=t.RV6();t.j41(0,"button",37),t.bIt("click",function(s){const m=t.eBV(e).$implicit,_=t.XpG();return t.Njj(_.toggleColumnVisibility(m,s))}),t.j41(1,"mat-checkbox",38),t.bIt("click",function(s){return s.stopPropagation()})("ngModelChange",function(s){const m=t.eBV(e).$implicit;return t.Njj(m.visible=s)}),t.EFF(2),t.k0s()()}if(2&o){const e=n.$implicit;t.R7$(),t.Y8G("ngModel",e.visible),t.R7$(),t.SpI(" ",e.label," ")}}const At=()=>["Students","Home Work"];let U=class Y{get visibleColumns(){return this.columns.filter(n=>n.visible).map(n=>n.property)}constructor(n,e,i,s,r){this.dialog=n,this.studentService=e,this.snackbar=i,this.commonService=s,this.loader=r,this.subject$=new H.m(1),this.data$=this.subject$.asObservable(),this.columns=[{label:"S.No.",property:"homework_id",type:"index",visible:!0,cssClasses:["font-medium"]},{label:"Date",property:"homework_date",type:"text",visible:!0,cssClasses:["font-medium"]},{label:"Class",property:"class",type:"text",visible:!0,cssClasses:["font-medium"]},{label:"Subject",property:"subject_name",type:"text",visible:!0,cssClasses:["font-medium"]},{label:"Title",property:"homework_title",type:"text",visible:!0,cssClasse
1s:["font-medium"]},{label:"Created By",property:"created_by",type:"text",visible:!0,cssClasses:["font-medium"]},{label:"Updated By",property:"updated_by",type:"text",visible:!1,cssClasses:["font-medium"]},{label:"Action",property:"actions",type:"button",visible:!0}],this.pageSize=50,this.pageSizeOptions=[5,10,20,50,100],this.selection=new c.CB(!0,[]),this.searchCtrl=new l.hs,this.is_delete=!1,this.permissions=this.commonService.getDecodedToken(),this.getClasses=JSON.parse(sessionStorage.getItem("classes")),this.divisionsList=[],"1"==this.permissions.is_delete&&(this.is_delete=!0)}ngOnInit(){const n=this.commonService.detectPlatform();this.platformClass="android"===n||"ios"===n?"mobile-platform":"",this.loader.show(),this.studentService.getHomeWork().subscribe(e=>{this.subject$.next(e)}),this.dataSource=new u.I6,this.data$.pipe((0,C.p)(Boolean)).subscribe(e=>{this.homeWorks=e,this.dataSource.data=e,this.loader.hide()}),this.searchCtrl.valueChanges.pipe((0,k.s)(this)).subscribe(e=>this.onFilterChange(e))}onFilterChange(n){this.dataSource&&(n=(n=n.trim()).toLowerCase(),this.dataSource.filter=n)}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}addHomeWork(){this.dialog.open(L,{panelClass:["w-full","md:w-1/2"]}).afterClosed().subscribe(n=>{n&&(this.loader.show(),n&&this.studentService.addUpdateHomework(n).subscribe(e=>{"success"==e.type&&(e.data.homeworks.forEach(i=>{this.homeWorks.unshift(new A(i)),this.subject$.next(this.homeWorks)}),this.snackbar.open(e.msg,null,{duration:3e3,panelClass:["bg-green-500"]})),this.loader.hide()},e=>{this.snackbar.open(e.error.messages.error,null,{duration:3e3,panelClass:["bg-red-500"]})}))})}updateHomeWork(n){this.dialog.open(L,{data:n,panelClass:["w-full","md:w-1/2"]}).afterClosed().subscribe(e=>{e&&(this.loader.show(),this.studentService.addUpdateHomework(e).subscribe({next:i=>{if("success"===i.type){const s=this.homeWorks.findIndex(r=>r.homework_id==i.data.homework_id);this.homeWorks[s]=new A(i.data),this.subject$.next(this.homeWorks)}},error:i=>{this.snackbar.open(i.error.messages.error,null,{duration:3e3,panelClass:["bg-red-500"]})},complete:()=>{this.loader.hide()}}))})}deleteHomeWork(n){this.dialog.open(Z.T,{data:{message:"Are you sure, you want to delete !"}}).afterClosed().subscribe(e=>{e&&this.studentService.deleteHomeWork(n.homework_id).subscribe(i=>{this.homeWorks.splice(this.homeWorks.findIndex(s=>s.homework_id===n.homework_id),1),this.selection.deselect(n),this.subject$.next(this.homeWorks)})})}toggleColumnVisibility(n,e){e.stopPropagation(),e.stopImmediatePropagation(),n.visible=!n.visible}trackByProperty(n,e){return e.property}onChangeClass(n){(0,h.H)(this.getClasses).pipe((0,C.p)(s=>s.class_id==n)).subscribe(s=>{this.divisionsList=s.divisions})}static{this.\u0275fac=function(e){return new(e||Y)(t.rXU(y.bZ),t.rXU(wt.b),t.rXU(X.UG),t.rXU(M.h),t.rXU(O.U))}}static{this.\u0275cmp=t.VBU({type:Y,selectors:[["vex-home-work"]],viewQuery:function(e,i){if(1&e&&(t.GBs(j.iy,7),t.GBs(d.B4,7)),2&e){let s;t.mGM(s=t.lsd())&&(i.paginator=s.first),t.mGM(s=t.lsd())&&(i.sort=s.first)}},inputs:{columns:"columns"},standalone:!0,features:[t.aNF],decls:28,vars:18,consts:[["current","Home Work",1,"justify-between"],[1,"flex-auto",3,"crumbs"],["vexContainer",""],[1,"card","overflow-auto"],[1,"bg-app-bar","px-6","h-14","border-b","sticky","left-0","flex","items-center"],[1,"bg-foreground","rounded-full","border","px-3","max-w-[400px]","flex-auto","flex","items-center"],["svgIcon","mat:search"],["placeholder","Search...","type","search",1,"px-3","py-2","border-0","outline-none","w-full","bg-transparent",3,"formControl"],[1,"flex-1"],["mat-icon-button","","matTooltip","Filter Columns","type","button",1,"ml-4","flex-none",3,"matMenuTriggerFor"],["svgIcon","mat:checklist"],["color","primary","mat-mini-fab","","matTooltip","Add Homework","type","button",1,"ml-4","flex-none",3,"click"],["svgIcon","mat:add"],[1,"overflow-auto","md:h-[60vh]","h-[48vh]","custom-table-height",3,"ngClass"],["mat-table","","matSort","",1,"w-full",3,"dataSource"],[4,"ngFor","ngForOf","ngForTrackBy"],["matColumnDef","actions"],["class","uppercase font-semibold sticky top-0 z-10 bg-stone-100","mat-header-cell","",4,"matHeaderCellDef"],["class","w-10 text-secondary","mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["class","hover:bg-hover trans-ease-out","mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],[1,"sticky","left-0","mb-1",3,"pageSizeOptions","pageSize"],["xPosition","before","yPosition","below"],["columnFilterMenu","matMenu"],["class","checkbox-item mat-menu-item",3,"click",4,"ngFor","ngForOf"],[3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["class","uppercase font-semibold sticky top-0 z-10 bg-stone-100","mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngClass",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"uppercase","font-semibold","sticky","top-0","z-10","bg-stone-100"],["mat-cell","",3,"ngClass"],["mat-header-cell","",1,"uppercase","font-semibold","sticky","top-0","z-10","bg-stone-100"],["mat-cell","",1,"w-10","text-secondary"],["type","button",3,"disabled","click"],["svgIcon","mat:delete",3,"ngClass"],["mat-header-row",""],["mat-row","",1,"hover:bg-hover","trans-ease-out",3,"click"],[1,"checkbox-item","mat-menu-item",3,"click"],["color","primary",3,"ngModel","click","ngModelChange"]],template:function(e,i){if(1&e&&(t.j41(0,"vex-page-layout")(1,"vex-secondary-toolbar",0),t.nrm(2,"vex-breadcrumbs",1),t.k0s(),t.j41(3,"vex-page-layout-content",2)(4,"div",3)(5,"div",4)(6,"div",5),t.nrm(7,"mat-icon",6)(8,"input",7),t.k0s(),t.nrm(9,"span",8),t.j41(10,"button",9),t.nrm(11,"mat-icon",10),t.k0s(),t.j41(12,"button",11),t.bIt("click",function(){return i.addHomeWork()}),t.nrm(13,"mat-icon",12),t.k0s()(),t.j41(14,"div",13)(15,"table",14),t.DNE(16,$t,2,1,"ng-container",15)(17,Wt,2,1,"ng-container",15)(18,Vt,2,1,"ng-container",15),t.qex(19,16),t.DNE(20,Bt,1,0,"th",17)(21,Ot,3,4,"td",18),t.bVm(),t.DNE(22,Mt,1,0,"tr",19)(23,Pt,1,1,"tr",20),t.k0s()(),t.nrm(24,"mat-paginator",21),t.k0s()()(),t.j41(25,"mat-menu",22,23),t.DNE(27,Lt,3,2,"button",24),t.k0s()),2&e){const s=t.sdS(26);t.R7$(2),t.Y8G("crumbs",t.lJ4(17,At)),t.R7$(6),t.Y8G("formControl",i.searchCtrl),t.R7$(2),t.Y8G("matMenuTriggerFor",s),t.R7$(4),t.Y8G("ngClass",i.platformClass),t.R7$(),t.Y8G("@stagger",void 0)("dataSource",i.dataSource),t.R7$(),t.Y8G("ngForOf",i.columns)("ngForTrackBy",i.trackByProperty),t.R7$(),t.Y8G("ngForOf",i.columns)("ngForTrackBy",i.trackByProperty),t.R7$(),t.Y8G("ngForOf",i.columns)("ngForTrackBy",i.trackByProperty),t.R7$(4),t.Y8G("matHeaderRowDef",i.visibleColumns),t.R7$(),t.Y8G("matRowDefColumns",i.visibleColumns),t.R7$(),t.Y8G("pageSizeOptions",i.pageSizeOptions)("pageSize",i.pageSize),t.R7$(3),t.Y8G("ngForOf",i.columns)}},dependencies:[b.MD,b.YU,b.Sq,b.bT,b.vh,K.s,J.h,z.T,Q.K,l.YN,l.me,l.BC,l.vS,R.RG,l.X1,l.l_,E.m_,E.An,g.Hl,g.iY,g.$0,D.fS,j.Ou,j.iy,u.tP,u.Zl,u.tL,u.ji,u.cC,u.YV,u.iL,u.KS,u.$R,u.YZ,u.NB,G.Cn,G.kk,G.Cp,y.hM,w.X6,v.w0,T.Wk,N.w,V.mV,f.g7,f.So,v.Sy,I.Ve,W.uc,W.oV],data:{animation:[S.b,p.ac]}})}};U=(0,F.Cg)([(0,k.d)()],U)}}]);
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.