PageSourceSearch

https://ims.drmgrdu.ac.in/client/chunk-KCIO5EDB.js

js drmgrdu.ac.in collected 2026-10-02 04:41:36 UTC 88,779 bytes, 2 lines download raw bytes

1import{a as ut,b as ht,c as gt}from"./chunk-2SOBBDLR.js";import{a as ft}from"./chunk-WXQS62KK.js";import{a as St}from"./chunk-4C5IT6Y4.js";import{a as O}from"./chunk-6PZ3QZLD.js";import"./chunk-L4KS4O4D.js";import"./chunk-OBL3UMJK.js";import{a as ze}from"./chunk-DETKSHOS.js";import{d as nt,e as it,h as ot}from"./chunk-V5KJRP2K.js";import"./chunk-57S6Q36M.js";import"./chunk-QEGAIP75.js";import{a as pt}from"./chunk-3RDKMDGK.js";import"./chunk-3CO4C5KT.js";import{a as A}from"./chunk-EEGLZW5Y.js";import{b as lt,c as ct,d as dt,g as mt}from"./chunk-O6QGVCU4.js";import"./chunk-JAVXKLPM.js";import"./chunk-A7DVSW7U.js";import"./chunk-3KJJR4PR.js";import"./chunk-ABAWT23C.js";import"./chunk-MZBVUXPZ.js";import"./chunk-IWOLENFE.js";import"./chunk-UWQZ6LHD.js";import"./chunk-7FBSWJHX.js";import"./chunk-4DJXF7UW.js";import{a as st}from"./chunk-NDDBMTF2.js";import"./chunk-PP6OKG4J.js";import{b as at}from"./chunk-3AGUOP7M.js";import{a as Je,f as W,g as G,h as le,l as Ze,m as $e}from"./chunk-RAZ6272N.js";import{c as ee}from"./chunk-LBLKBDMD.js";import{a as je}from"./chunk-YLPDWZZX.js";import"./chunk-Y7PLHQ6M.js";import{c as xe,e as rt}from"./chunk-QNJ3LBLE.js";import{b as ve}from"./chunk-3R646RNR.js";import{d as et,e as tt}from"./chunk-PLPK6HII.js";import{G as Xe,H as Qe,b as se,c as B,g as Y,h as He,j as Be,l as q,m as Ye,o as qe,z as Ke}from"./chunk-UFCZWRLF.js";import{a as _e}from"./chunk-7Q5L7ALI.js";import"./chunk-CARY4E7O.js";import{a as D}from"./chunk-2PT6A6VZ.js";import{$ as ue,Ac as Re,Bc as L,Cc as P,Ea as Pe,Eb as Le,Fa as ce,Fb as Ve,Gb as Oe,Hb as X,Ib as s,Ja as l,Jb as y,Ka as f,Kb as x,Lb as he,Lc as Ge,Mb as Fe,Nc as H,Qc as oe,Rc as Ue,Sb as w,Tb as I,Ub as M,Uc as re,Va as S,Xb as Z,Xc as ae,_ as U,_a as d,ba as N,bd as Ne,ec as F,fa as E,fc as Ie,ga as fe,gc as $,hc as ie,hd as ge,id as Se,jd as R,kb as a,kd as We,lb as o,mb as _,md as me,na as h,oa as g,p as Te,qb as b,ub as v,va as J,wb as p,zb as de}from"./chunk-32W73H3G.js";import{a as ke,b as De,h as Ae}from"./chunk-WWX6BADO.js";var vt=(()=>{class i{activeModal;announcementService;modalService;loadingService;value;constructor(e,n,t,r){this.activeModal=e,this.announcementService=n,this.modalService=t,this.loadingService=r}ngOnInit(){}static \u0275fac=function(n){return new(n||i)(f(W),f(O),f(G),f(A))};static \u0275cmp=E({type:i,selectors:[["app-view-home-message"]],inputs:{value:"value"},decls:9,vars:2,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"align-right"],[1,"col-12"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"h4",1),s(2),o(),a(3,"button",2),v("click",function(){return t.activeModal.dismiss("Cross click")}),a(4,"span",3),s(5,"\xD7"),o()()(),a(6,"div",4)(7,"label",5),s(8),o()()),n&2&&(l(2),y(t.value.title),l(6),x("Message : ",t.value.message,""))}})}return i})();function Nt(i,u){if(i&1&&(a(0,"span")(1,"a",16),s(2),o()()),i&2){let e=p().$implicit;l(),de("href",e.file.url,ce),l(),y(e.file.fileKey)}}function Wt(i,u){i&1&&(a(0,"span"),s(1,"---------"),o())}function jt(i,u){if(i&1){let e=b();a(0,"tr")(1,"th",7),s(2),o(),a(3,"td",7)(4,"a",15),v("click",function(){let t=h(e).$implicit,r=p(2);return g(r.viewMessage(t))}),s(5),o()(),a(6,"td",7),s(7),F(8,"date"),o(),a(9,"td",7),s(10),o(),a(11,"td",7),S(12,Nt,3,2,"span",4)(13,Wt,2,0,"span",4),o()()}if(i&2){let e=u.$implicit,n=u.index,t=p(2);l(2),y(t.page*t.pageSize-t.pageSize+(n+1)*1),l(3),x(" ",e.title," "),l(2),y($(8,6,e.createdOn,"medium")),l(3),y(e.createdByName),l(2),d("ngIf",e.file!=null),l(),d("ngIf",e.file==null)}}function zt(i,u){if(i&1&&(a(0,"div")(1,"h3",7),s(2,"Received"),o(),a(3,"div",8)(4,"table",9)(5,"thead")(6,"tr")(7,"th",10),s(8,"#"),o(),a(9,"th",11),s(10,"Title"),o(),a(11,"th",12),s(12,"Date"),o(),a(13,"th",12),s(14,"Sent by"),o(),a(15,"th",13),s(16,"Attachment"),o()()(),a(17,"tbody"),S(18,jt,14,9,"tr",14),F(19,"slice"),o()()()()),i&2){let e=p();l(18),d("ngForOf",ie(19,1,e.announcements,(e.page-1)*e.pageSize,(e.page-1)*e.pageSize+e.pageSize))}}function Ht(i,u){if(i&1){let e=b();a(0,"div",2)(1,"div",17)(2,"ngb-pagination",18,0),M("pageChange",function(t){h(e);let r=p();return I(r.page,t)||(r.page=t),g(t)}),o()()()}if(i&2){let e=p();
1l(2),d("collectionSize",e.announcements.length),w("page",e.page),d("pageSize",e.pageSize)("rotate",!0)("ellipses",!1)("boundaryLinks",!0)}}function Bt(i,u){i&1&&(a(0,"div",19)(1,"div",20)(2,"span",21),s(3," Sorry !"),o(),s(4," No Announcement Recieved. "),o()())}var _t=(()=>{class i{modalService;announcementService;loadingService;announcements;loading;page=1;pageSize=50;constructor(e,n,t){this.modalService=e,this.announcementService=n,this.loadingService=t}ngOnInit(){this.getAnnouncement(),this.announcements=[]}getAnnouncement(){this.loadingService.showLoading(),this.announcementService.getCurrentUserAnnouncement().then(e=>{this.announcements=e,this.announcements=this.announcements.sort((n,t)=>{let r=new Date(n.createdOn).getTime();return new Date(t.createdOn).getTime()-r}),this.loadingService.hideLoading()})}viewMessage(e){let n=this.modalService.open(vt,{size:"lg"});n.componentInstance.value=e}static \u0275fac=function(n){return new(n||i)(f(G),f(O),f(A))};static \u0275cmp=E({type:i,selectors:[["app-announcement"]],decls:8,vars:3,consts:[["myPaginator",""],[1,"container-fluid","flex-grow"],[1,"row"],[1,"col-md-12"],[4,"ngIf"],["class","row",4,"ngIf"],["class","col-sm-6 offset-sm-3",4,"ngIf"],[2,"text-align","center"],[1,"card-body"],[1,"table","table-striped"],[1,"col-1","text-center"],[1,"col-3","text-center"],[1,"col-2","text-center"],[1,"col-4","text-center"],[4,"ngFor","ngForOf"],[3,"click","routerLink"],[3,"href"],[1,"col"],[1,"d-flex","justify-content-center",3,"pageChange","collectionSize","page","pageSize","rotate","ellipses","boundaryLinks"],[1,"col-sm-6","offset-sm-3"],[1,"alert","alert-warning"],[1,"badge","badge-warning"]],template:function(n,t){n&1&&(a(0,"div",1)(1,"div",2)(2,"div",3),_(3,"br"),S(4,zt,20,5,"div",4)(5,Ht,4,6,"div",5),a(6,"div",2),S(7,Bt,5,0,"div",6),o()()()()),n&2&&(l(4),d("ngIf",t.announcements.length>0),l(),d("ngIf",t.announcements.length>0),l(2),d("ngIf",t.announcements.length==0))},dependencies:[R,le,L,P,oe,H]})}return i})();var qt=()=>({"min-height":"350px",width:"100%","border-radius":"8px"});function Kt(i,u){i&1&&(a(0,"span",44),_(1,"i",45),s(2," Title is required"),o())}function Xt(i,u){i&1&&(a(0,"span",46),_(1,"i",45),s(2," Message is required"),o())}function Qt(i,u){if(i&1){let e=b();a(0,"div",56)(1,"div",57)(2,"span",58),s(3),o(),a(4,"button",59),v("click",function(){let t=h(e).$implicit,r=p(2);return g(r.applyRefinedText(t))}),s(5,"APPLY"),o()(),_(6,"div",60),o()}if(i&2){let e=u.$implicit,n=u.index,t=p(2);l(3),x("Option ",n+1,""),l(3),d("innerHTML",t.getSanitizedHtml(e),Pe)}}function Jt(i,u){if(i&1){let e=b();a(0,"div",47)(1,"div",48)(2,"div",49)(3,"span",50),_(4,"i",51),s(5," Suggestions"),o(),a(6,"button",52),v("click",function(){h(e);let t=p();return g(t.closeAiSidebar())}),_(7,"i",53),o()(),a(8,"div",54),S(9,Qt,7,2,"div",55),o()()()}if(i&2){let e=p();l(9),d("ngForOf",e.aiRefinedOptions)}}function Zt(i,u){if(i&1){let e=b();a(0,"div",61),_(1,"i",62),a(2,"span",63),s(3,"Click to select or drag and drop a file"),o(),a(4,"input",64,3),v("change",function(){h(e);let t=X(5),r=p();return g(r.change(t.files))}),o(),a(6,"button",65),v("click",function(){h(e);let t=X(5);return g(t.click())}
1),s(7," Choose File "),o()()}}function $t(i,u){if(i&1){let e=b();a(0,"div",66)(1,"div",67),_(2,"i",68),a(3,"div")(4,"span",69),s(5),o(),a(6,"small",70),_(7,"i",71),s(8," Ready to upload"),o()()(),a(9,"button",72),v("click",function(){h(e);let t=p();return g(t.removeFile())}),_(10,"i",73),o()()}if(i&2){let e=p();l(5),y(e.announcementForm.file.fileKey)}}function en(i,u){i&1&&(a(0,"div",74),_(1,"i",75),s(2," File format or name not valid. Please check and try again. "),o())}function tn(i,u){if(i&1){let e=b();a(0,"button",76),v("click",function(){h(e);let t=p();return g(t.uploadFiles())}),_(1,"i",77),s(2," CONFIRM UPLOAD "),o()}}var xt=(()=>{class i{router;fileUploadService;loadingService;SelectMembersService;validator;toastr;sanitizer;showLabel;constructor(e,n,t,r,c,m,C){this.router=e,this.fileUploadService=n,this.loadingService=t,this.SelectMembersService=r,this.validator=c,this.toastr=m,this.sanitizer=C,this.quillModules={toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{align:[]}],[{size:["small",!1,"large","huge"]}],[{font:[]}],[{color:[]},{background:[]}],["link","formula","image"],["clean"]],clipboard:{matchVisual:!1}},window.katex||(window.katex=ut)}announcementForm;showUploadButton=!1;fileToUpload;quillModules;quillFormats=["header","font","size","bold","italic","underline","strike","blockquote","code-block","list","script","indent","align","direction","color","background","link","formula","image","clean"];aiRefinedOptions=[];showAiSidebar=!1;ngOnInit(){this.announcementForm={},this.announcementForm.file={}}previewAnnoucement(e){e&&(this.setAnnouncementData(De(ke({},this.announcementForm),{message:this.SelectMembersService.toPlainText(this.announcementForm.message)})),this.router.navigate(["/announcement/preview"]))}setAnnouncementData(e){this.SelectMembersService.announcementData=e}change(e){this.fileToUpload=e.item(0),this.validator.validateAnnouncementFile(this.fileToUpload)?this.fileToUpload!=null&&(this.showUploadButton=!0,this.showLabel=!1):(this.showLabel=!0,this.fileToUpload==null,this.announcementForm.file==null,this.toastr.error("File name not valid"))}uploadFiles(){this.fileToUpload!=null&&(this.loadingService.showLoading(),this.fileUploadService.uploadAttachment(this.fileToUpload).then(e=>{var n={};e!=null&&(n.versionId=e.versionId,n.fileKey=e.fileKey,this.announcementForm.file=n),this.loadingService.hideLoading()}))}removeFile(){this.announcementForm.file={}}isImproving=!1;autoImprove(){if(!this.announcementForm.message){this.toastr.warning("Please enter some text to improve.");return}this.isImproving=!0,this.loadingService.showLoading(),this.SelectMembersService.refineText({text:this.getPlainText(this.announcementForm.message),type:"ANNOUNCEMENT"}).then(e=>{e&&e.refined&&(this.aiRefinedOptions=this.parseAiOptions(e.refined),this.showAiSidebar=!0,this.toastr.success("AI suggested improvements!")),this.isImproving=!1,this.loadingService.hideLoading()}).catch(e=>{this.isImproving=!1,this.loadingService.hideLoading(),this.toastr.error("Failed to improve text.")})}getPlainText(e){let n=document.createElement("div");return n.innerHTML=e,n.textContent||n.innerText||""}parseAiOptions(e){return e.includes("### Option")?e.split(/### Option \d+:/).filter(n=>n.trim().length>0).map(n=>n.trim()):[e.trim()]}applyRefinedText(e){this.announcementForm.message=e}closeAiSidebar(){this.showAiSidebar=!1,this.aiRefinedOptions=[]}getSanitizedHtml(e){return this.sanitizer.bypassSecurityTrustHtml(e.replace(/\n/g,"<br>"))}static \u0275fac=function(n){return new(n||i)(f(Se),f(ft),f(A),f(O),f(pt),f(_e),f(Ne))};static \u0275cmp=E({type:i,selectors:[["app-composeannouncement"]],decls:65,vars:18,consts:[["createForm","ngForm"],["titleCtrl","ngModel"],["messageCtrl","ngModel"],["fileInput",""],[1,"container-fluid","flex-grow"],[1,"row"],[1,"col-md-10","order-md-1","pt-3"],[2,"text-align","center","margin-top","15px"],[1,"card-body","px-0"],[1,"container-fluid"],["role","alert",1,"alert","alert-info","shadow-sm","py-2","px-3","mb-4",2,"border-left","5px solid #06b6d4","background","#f0f9ff","color","#0c4a6e"],[1,"d-flex","align-items-center","mb-1"],[1,"fa","fa-info-circle","mr-2",2,"font-size","1.2rem","color","#06b6d4"],[1,"mb-0","small","pl-4"],[1,"card-body","p-0"],[1,"w-100"],[1,"form"],[1,"form-group","row","mb-4","align-items-center"],[1,"col-md-2","font-weight-bold","text-md-right","mb-0"],[1,"text-danger"],[3,"ngClass"],["type","text","name","title","placeholder","Enter Title","required","",1,"form-control","shadow-sm","border-light",2,"height","45px","border-radius","8px",3,"ngModelChange","ngModel"],["style","color: #ef4444; font-size: 0.85rem; display: block; margin-top: 5px;",4,"ngIf"],[1,"form-group","row","mb-4"],[1,"col-md-2","font-weight-bold","text-md-right","mt-2"],["name","message","placeholder","Enter Message","required","",3,"ngModelChange","modules","formats","ngModel","styles"],[1,"d-flex","justify-content-between","align-items-center","mt-3"],["type","button",1,"btn","btn-info","shadow-sm","px-4","py-2",3,"click","disabled"],[1,"fa",3,"ngClass"],[1,"ml-2","font-weight-bold"],["style","color: #ef4444; font-size: 0.85rem;",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"form-group","row","mb-5"],[1,"col-md-2","font-weight-bold","text-md-right","mt-1"],[1,"col-md-10"],[1,"custom-file-upload","p-4","border","rounded",2,"border-style","dashed !important","background","#fafafa","border-width","2px !important"],["class","text-center py-2",4,"ngIf"],["class","d-flex align-items-center justify-content-between bg-white p-2 rounded shadow-xs border",4,"ngIf"],["class","alert alert-danger mt-3 mb-0 py-2 shadow-xs",4,"ngIf"],["class","btn btn-success mt-3 w-100 shadow-sm font-weight-bold py-2",3,"click",4,"ngIf"],[1,"my-4"],[1,"d-flex","justify-content-end"],["type","submit",1,"btn","btn-primary","px-5","py-2","font-weight-bold","shadow",3,"click"],[1,"fa","fa-arrow-right","ml-2"],[2,"color","#ef4444","font-size","0.85rem","display","block","margin-top","5px"],[1,"fa","fa-exclamation-circle"],[2,"color","#ef4444","font-size","0.85rem"],[1,"col-md-3"],[1,"card","ai-sidebar","sticky-top",2,"top","20px"],[1,"card-header","d-flex","justify-content-between","align-items-center","py-2","px-3"],[1,"font-weight-bold"],[1,"fa","fa-sparkles","mr-1"],["type","button","aria-label","Close",1,"btn-close","btn-close-white","btn-sm",2,"font-size","0.7rem","color","white","border","none","background","transparent",3,"click"],[1,"fa","fa-times"],[1,"card-body","p-3",2,"max-height","600px","overflow-y","auto"],["class","ai-option mb-4 p-3 border rounded shadow-xs",4,"ngFor","ngForOf"],[1,"ai-option","mb-4","p-3","border","rounded","shadow-xs"],[1,"d-flex","justify-content-between","align-items-center","mb-2"],[1,"badge","badge-primary","px-2",2,"background","#e0f2fe","color","#0369a1"],[1,"btn","btn-xs","btn-success","font-weight-bold",3,"click"],[1,"small","text-muted",3,"innerHTML"],[1,"text-center","py-2"],[1,"fa","fa-cloud-upload","d-block","text-muted","mb-2",2,"font-size","2rem"],[1,"d-block","mb-3","text-muted"],["type","file","id","file",1,"form-control-file","d-none",3,"change"],["type","button",1,"btn","btn-outline-primary","px-4",3,"click"],[1,"d-flex","align-items-center","justify-content-between","bg-white","p-2","rounded","shadow-xs","border"],[1,"d-flex","align-items-center"],[1,"fa","fa-file-text-o","mr-3","text-info",2,"font-size","1.5rem"],[1,"d-block","font-weight-bold","text-truncate",2,"max-width","400px"],[1,"text-success"],[1,"fa","fa-check-circle"],["title","Remove file",1,"btn","btn-link","text-danger","p-0",3,"click"],[1,"fa","fa-tras
1h-o",2,"font-size","1.2rem"],[1,"alert","alert-danger","mt-3","mb-0","py-2","shadow-xs"],[1,"fa","fa-warning","mr-1"],[1,"btn","btn-success","mt-3","w-100","shadow-sm","font-weight-bold","py-2",3,"click"],[1,"fa","fa-upload","mr-1"]],template:function(n,t){if(n&1){let r=b();a(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),s(4,"Compose Announcement"),o(),a(5,"div",8)(6,"div",9)(7,"div",10)(8,"div",11),_(9,"i",12),a(10,"strong"),s(11,"Announcement Guidelines:"),o()(),a(12,"ul",13)(13,"li"),s(14,"Supported image format: *.jpg, *.jpeg, *.png (Max 1MB)"),o(),a(15,"li"),s(16,"Supported documents: *.pdf, *.doc, *.docx, *.xls, *.xlsx, *.ppt, *.pptx, *.odt, *.ods (Max 10MB)"),o(),a(17,"li"),s(18,"Supported compressed format: *.zip, *.rar, *.7z (Max 10MB)"),o()()(),a(19,"div",14)(20,"div",15)(21,"form",16,0)(23,"div",17)(24,"label",18),s(25,"Title"),a(26,"span",19),s(27,"*"),o(),s(28,":"),o(),a(29,"div",20)(30,"input",21,1),M("ngModelChange",function(m){return h(r),I(t.announcementForm.title,m)||(t.announcementForm.title=m),g(m)}),o(),S(32,Kt,3,0,"span",22),o()(),a(33,"div",23)(34,"label",24),s(35,"Message"),a(36,"span",19),s(37,"*"),o(),s(38,":"),o(),a(39,"div",20)(40,"quill-editor",25,2),M("ngModelChange",function(m){return h(r),I(t.announcementForm.message,m)||(t.announcementForm.message=m),g(m)}),o(),a(42,"div",26)(43,"button",27),v("click",function(){return h(r),g(t.autoImprove())}),_(44,"i",28),a(45,"span",29),s(46),o()(),S(47,Xt,3,0,"span",30),o()(),S(48,Jt,10,1,"div",31),o(),a(49,"div",32)(50,"label",33),s(51,"Attachment :"),o(),a(52,"div",34)(53,"div",35),S(54,Zt,8,0,"div",36)(55,$t,11,1,"div",37)(56,en,3,0,"div",38)(57,tn,3,0,"button",39),o()()(),_(58,"hr",40),a(59,"div",41)(60,"button",42),v("click",function(){h(r);let m=X(22);return g(t.previewAnnoucement(m.form.valid))}),s(61," CONTINUE "),_(62,"i",43),o()(),_(63,"br")(64,"br"),o()()()()()()()()}if(n&2){let r=X(22),c=X(31),m=X(41);l(29),d("ngClass",t.showAiSidebar?"col-md-7":"col-md-10"),l(),w("ngModel",t.announcementForm.title),l(2),d("ngIf",r.submitted&&c.invalid||c.invalid&&c.touched),l(7),d("ngClass",t.showAiSidebar?"col-md-7":"col-md-10"),l(),d("modules",t.quillModules)("formats",t.quillFormats),w("ngModel",t.announcementForm.message),d("styles",Z(17,qt)),l(3),d("disabled",t.isImproving),l(),d("ngClass",t.isImproving?"fa-spinner fa-spin":"fa-magic"),l(2),y(t.isImproving?"Refining...":"Auto-Improve with AI"),l(),d("ngIf",r.submitted&&(m==null?null:m.invalid)||(m==null?null:m.invalid)&&(m==null?null:m.touched)),l(),d("ngIf",t.showAiSidebar),l(6),d("ngIf",t.announcementForm.file.fileKey==null),l(),d("ngIf",t.announcementForm.file.fileKey!=null&&t.showUploadButton&&!t.showLabel),l(),d("ngIf",t.announcementForm.file.fileKey==null&&t.showLabel),l(),d("ngIf",t.showUploadButton&&t.announcementForm.file.fileKey==null&&!t.showLabel)}},dependencies:[Ye,B,Y,He,Ke,q,Be,Re,L,P,ht],styles:["body[_ngcontent-%COMP%]{background-color:#f8fafc}.form-group.row[_ngcontent-%COMP%]{margin-bottom:2rem}.font-weight-bold[_ngcontent-%COMP%]{color:#1e293b;font-size:.95rem}.text-md-right[_ngcontent-%COMP%]{text-align:right!important}  .ql-toolbar.ql-snow{border:1px solid #cbd5e1!important;border-top-left-radius:10px!important;border-top-right-radius:10px!important;background-color:#fff;padding:10px!important;border-bottom:none!important}  .ql-container.ql-snow{border:1px solid #cbd5e1!important;border-bottom-left-radius:10px!important;border-bottom-right-radius:10px!important;font-family:Inter,system-ui,-apple-system,sans-serif!important;font-size:16px!important;background:#fff;transition:box-shadow .2s ease}  .ql-container.ql-snow:focus-within{box-shadow:0 0 0 3px #3b82f61a;border-color:#3b82f6!important}.ai-sidebar[_ngcontent-%COMP%]{border:none!important;border-radius:16px!important;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a!important;overflow:hidden;background:#fff;border:1px solid #f1f5f9!important}@keyframes _ngcontent-%COMP%_slideInRight{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.ai-sidebar[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]{background:#0ea5e9;color:#fff;padding:12px 16px;border:none;font-weight:600;font-size:.95rem}.ai-sidebar[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{background:#fdfdfd}.ai-option[_ngcontent-%COMP%]{background:#fff;border:1px solid #f1f5f9!important;border-radius:12px!important;padding:16px!important;margin-bottom:16px;transition:all .3s cubic-bezier(.4,0,.2,1);position:relative}.ai-option[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 10px 15px -3px #0000001a;border-color:#0ea5e9!important;background:#fff}.ai-option[_ngcontent-%COMP%]   .small[_ngcontent-%COMP%]{color:#4a5568;line-height:1.6;font-size:.9rem}.badge[_ngcontent-%COMP%]{padding:5px 10px;font-weight:500;border-radius:6px}.shadow-xs[_ngcontent-%COMP%]{box-shadow:0 1px 2px #0000000d}
1.btn-primary[_ngcontent-%COMP%]{background-color:#2563eb;border:none;border-radius:8px}.btn-info[_ngcontent-%COMP%]{background-color:#0ea5e9;border:none;padding:8px 16px;font-weight:500;border-radius:8px;transition:all .2s ease}.btn-info[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#0891b2;transform:translateY(-1px);box-shadow:0 4px 6px -1px #0000001a}.btn-success[_ngcontent-%COMP%]{background-color:#059669;border:none;border-radius:8px}.btn-xs[_ngcontent-%COMP%]{padding:4px 12px;font-size:.75rem;font-weight:600;border-radius:6px;text-transform:uppercase;letter-spacing:.5px}@media (max-width: 768px){.text-right[_ngcontent-%COMP%]{text-align:left!important;margin-bottom:.5rem}.ai-sidebar[_ngcontent-%COMP%]{margin-top:2rem;animation:_ngcontent-%COMP%_slideInUp .4s ease}}@keyframes _ngcontent-%COMP%_slideInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.card-body[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}.card-body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f5f9}.card-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.card-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#94a3b8}.custom-file-upload[_ngcontent-%COMP%]{background-color:#fff;border:2px dashed #cbd5e1!important;transition:all .2s ease;border-radius:12px!important;cursor:pointer}.custom-file-upload[_ngcontent-%COMP%]:hover{background-color:#f0f9ff;border-color:#0ea5e9!important}.mr-3[_ngcontent-%COMP%]{margin-right:1rem!important}.mr-2[_ngcontent-%COMP%]{margin-right:.5rem!important}.mr-1[_ngcontent-%COMP%]{margin-right:.25rem!important}.ml-4[_ngcontent-%COMP%]{margin-left:1.5rem!important}@media (max-width: 991px){.ai-sidebar[_ngcontent-%COMP%]{margin-top:1.5rem}}@media (max-width: 767px){.text-md-right[_ngcontent-%COMP%]{text-align:left!important;margin-bottom:8px}}"]})}return i})();var yt=(()=>{class i{http;announcement;constructor(e){this.http=e}getCurrentUserAnnouncement(){return this.http.get(D.URI+"/boot/announcement/userview")}create(e){return this.http.post(D.URI+"/boot/announcement",e)}getAnnouncementById(e){return this.http.get(D.URI+"/boot/announcement/view-sms?id="+e)}getSentAnnouncements(e){return this.http.get(D.URI+"/boot/announcement?query=filter:createdBy eq "+e)}getReceivers(e){return this.http.get(D.URI+"/boot/announcement/getReceivers/"+e)}getRandomKey(e){return this.http.get(D.URI+"/boot/announcementUrl/getAnnouncement?randomKey="+e)}refineText(e){return this.http.post(D.URI+"/api/ai/refine",e)}sendAnnouncementAsSms(e){return this.http.post(D.URI+"/api/communication/sendSms",e)}getSentSms(e){return this.http.get(D.URI+"/api/sms/sentSms"+e)}getDayCount(e){return this.http.get(D.URI+"/api/sms/daySmsCount/"+e)}getMonthly(){return this.http.get(D.URI+"/api/sms/report/monthly")}exportAsXLSX(e){let n=D.URI+"/api/sms/excelReport/monthly/"+e;ve(n,"template")}filterSms(e,n){return this.http.get(D.URI+"/api/sms/sentSms?filter=sDate eq "+e+",status eq "+n+"&start=0&count=25&order=des&sort=_id")}ShowAll(e){return this.http.get(D.URI+"/api/sms/sentSms?filter=sDate eq "+e+"&start=0&count=25&order=des&sort=_id")}getSmsCount(){return this.http.get(D.URI+"/api/sms/smsCount")}static \u0275fac=function(n){return new(n||i)(N(ae))};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var wi={headers:new re({"Content-Type":"application/json"})},bt=(()=>{class i{announcementProvider;announcement;constructor(e){this.announcementProvider=e}getCurrentUserAnnouncement(){return new Promise((e,n)=>{this.announcementProvider.getCurrentUserAnnouncement().subscribe(t=>{e(t)},t=>console.log("Error :: "+t))})}getAnnouncementById(e){return new Promise((n,t)=>{this.announcementProvider.getAnnouncementById(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getRandomKey(e){return new Promise((n,t)=>{this.announcementProvider.getRandomKey(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}create(e){return new Promise((n,t)=>{this.announcementProvider.create(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getSentAnnouncements(e){return new Promise((n,t)=>{this.announcementProvider.getSentAnnouncements(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getReceivers(e){return new Promise((n,t)=>{this.announcementProvider.getReceivers(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}sendAnnouncementAsSms(e){return new Promise((n,t)=>{this.announcementProvider.sendAnnouncementAsSms(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}
1getSmsCount(){return new Promise((e,n)=>{this.announcementProvider.getSmsCount().subscribe(t=>{e(t)},t=>console.log("Error :: "+t))})}getSentSms(e){return new Promise((n,t)=>{this.announcementProvider.getSentSms(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getDayCount(e){return new Promise((n,t)=>{this.announcementProvider.getDayCount(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getMonthlySms(){return new Promise((e,n)=>{this.announcementProvider.getMonthly().subscribe(t=>{e(t)},t=>console.log("Error :: "+t))})}exportAsXLSX(e){this.announcementProvider.exportAsXLSX(e)}filterSms(e,n){return new Promise((t,r)=>{this.announcementProvider.filterSms(n,e).subscribe(c=>{t(c)},c=>console.log("Error :: "+c))})}showAll(e){return new Promise((n,t)=>{this.announcementProvider.ShowAll(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}static \u0275fac=function(n){return new(n||i)(N(yt))};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function rn(i,u){if(i&1&&(a(0,"tr")(1,"td",6),s(2),o(),a(3,"td"),s(4),o(),a(5,"td"),s(6),o()()),i&2){let e=u.$implicit,n=u.index;l(2),y(n+1),l(2),x(" \xA0 ",e.name," "),l(2),x(" \xA0 ",e.email," ")}}var ye=(()=>{class i{announcementService;modalService;activeModal;userData;constructor(e,n,t){this.announcementService=e,this.modalService=n,this.activeModal=t}ngOnInit(){}static \u0275fac=function(n){return new(n||i)(f(bt),f(G),f(W))};static \u0275cmp=E({type:i,selectors:[["app-view-receivers-popup"]],inputs:{userData:"userData"},decls:15,vars:1,consts:[[1,"modal-header"],["type","button","aria-label","Close",1,"btn","btn-info",3,"click"],[1,"modal-body"],[1,"table","table-striped"],[2,"color","teal"],[4,"ngFor","ngForOf"],[2,"width","10%"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"button",1),v("click",function(){return t.activeModal.dismiss("Cross click")}),s(2," Back "),o()(),a(3,"div",2)(4,"table",3)(5,"thead")(6,"tr")(7,"th",4),s(8,"#"),o(),a(9,"th",4),s(10,"Name"),o(),a(11,"th",4),s(12,"Email"),o()()(),a(13,"tbody"),S(14,rn,7,3,"tr",5),o()()()),n&2&&(l(14),d("ngForOf",t.userData))},dependencies:[L]})}return i})();function an(i,u){i&1&&(a(0,"span"),s(1,"---"),o())}function sn(i,u){if(i&1&&(a(0,"span")(1,"a",9),s(2),o()()),i&2){let e=p();l(),de("href",e.value.file.url,ce),l(),y(e.value.file.fileKey)}}function ln(i,u){if(i&1){let e=b();a(0,"div",7)(1,"a",11),v("click",function(){h(e);let t=p();return g(t.viewReceivers("HOD"))}),s(2),o()()}if(i&2){let e=p();l(2),x("\xA0",e.hodCount.length,"")}}function cn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p(2);l(),x(" \xA0",e.hodCount.length,"")}}function dn(i,u){if(i&1&&(a(0,"div",7),S(1,cn,2,1,"span",8),o()),i&2){let e=p();l(),d("ngIf",e.hodCount.length==0)}}function mn(i,u){if(i&1){let e=b();a(0,"div",7)(1,"a",11),v("click",function(){h(e);let t=p();return g(t.viewReceivers("FACULTY"))}),s(2),o()()}if(i&2){let e=p();l(2),x("\xA0",e.facultyCount.length,"")}}function pn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p(2);l(),x(" \xA0",e.facultyCount.length,"")}}function un(i,u){if(i&1&&(a(0,"div",7),S(1,pn,2,1,"span",8),o()),i&2){let e=p();l(),d("ngIf",e.hodCount.length==0)}}function fn(i,u){if(i&1){let e=b();a(0,"div",7)(1,"a",11),v("click",function(){h(e);let t=p();return g(t.viewReceivers("STUDENT"))}),s(2),o()()}if(i&2){let e=p();l(2),x("\xA0",e.studentCount.length,"")}}function hn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p(2);l(),x(" \xA0",e.studentCount.length,"")}}function gn(i,u){if(i&1&&(a(0,"div",7),S(1,hn,2,1,"span",8),o()),i&2){let e=p();l(),d("ngIf",e.hodCount.length==0)}}var wt=(()=>{class i{activeModal;announcementService;modalService;loadingService;value;hodCount=[];facultyCount=[];studentCount=[];showLoading=!1;announcementUrl;url;constructor(e,n,t,r){this.activeModal=e,this.announcementService=n,this.modalService=t,this.loadingService=r}ngOnInit(){console.log(this.value),this.getReceivers(),this.getAnnouncementUrlByAnnouncementId(this.value.id)}getReceivers(){this.loadingService.showLoading(),this.showLoading=!0,this.announcementService.getReceivers(this.value.id).then(e=>{e.forEach(n=>
1{n.usertype=="STUDENT"?this.studentCount.push(n):n.usertype=="HOD"?this.hodCount.push(n):n.usertype=="FACULTY"&&this.facultyCount.push(n)}),this.loadingService.hideLoading(),this.showLoading=!1})}viewReceivers(e){let n=this.modalService.open(ye,{size:"lg"});e=="HOD"?n.componentInstance.userData=this.hodCount:e=="FACULTY"?n.componentInstance.userData=this.facultyCount:e=="STUDENT"&&(n.componentInstance.userData=this.studentCount)}getAnnouncementUrlByAnnouncementId(e){this.announcementService.getAnnouncementUrlByAnnouncementId(e).then(n=>{this.announcementUrl=n,this.url=D.URI+"/m/"+this.announcementUrl[0].randomKey})}getPlainMessage(){return this.announcementService.toPlainText(this.value?.message)}static \u0275fac=function(n){return new(n||i)(f(W),f(O),f(G),f(A))};static \u0275cmp=E({type:i,selectors:[["app-popmodel"]],inputs:{value:"value"},decls:49,vars:12,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"align-center"],[1,"row"],[1,"col-md-5","col-form-label","text-end"],[1,"col-md-6","mt-2"],[4,"ngIf"],[3,"href"],["class","col-md-6 mt-2",4,"ngIf"],[3,"click","routerLink"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"h4",1),s(2),o(),a(3,"button",2),v("click",function(){return t.activeModal.dismiss("Cross click")}),a(4,"span",3),s(5,"\xD7"),o()()(),a(6,"div",4)(7,"div",5)(8,"label",6),s(9,"Message :"),o(),a(10,"div",7),s(11),o()(),a(12,"div",5)(13,"label",6),s(14,"Attachment :"),o(),a(15,"div",7)(16,"label"),S(17,an,2,0,"span",8)(18,sn,3,2,"span",8),o()()(),a(19,"div",5)(20,"label",6),s(21,"Sent Content :"),o(),a(22,"div",7)(23,"label"),s(24," Dear All, you received a new announcement "),a(25,"a",9),s(26),o(),s(27," in MGRIMS portal. "),o()()(),a(28,"div",5)(29,"label",6)(30,"Strong"),s(31,"Hod"),o(),s(32,":"),o(),S(33,ln,3,1,"div",10)(34,dn,2,1,"div",10),o(),a(35,"div",5)(36,"label",6)(37,"Strong"),s(38,"Faculty"),o(),s(39,":"),o(),S(40,mn,3,1,"div",10)(41,un,2,1,"div",10),o(),a(42,"div",5)(43,"label",6)(44,"Strong"),s(45,"Student"),o(),s(46,":"),o(),S(47,fn,3,1,"div",10)(48,gn,2,1,"div",10),o()()),n&2&&(l(2),x(" ",t.value.title,""),l(9),x(" ",t.getPlainMessage(),`
2`),l(6),d("ngIf",(t.value.file==null?null:t.value.file.fileKey)==null||(t.value.file==null?null:t.value.file.url)==null),l(),d("ngIf",(t.value.file==null?null:t.value.file.fileKey)!=null&&(t.value.file==null?null:t.value.file.url)!=null),l(7),de("href",t.url,ce),l(),y(t.url),l(7),d("ngIf",t.hodCount.length>0),l(),d("ngIf",t.hodCount.length==0),l(6),d("ngIf",t.facultyCount.length>0),l(),d("ngIf",t.facultyCount.length==0),l(6),d("ngIf",t.studentCount.length>0),l(),d("ngIf",t.studentCount.length==0))},dependencies:[R,P]})}return i})();function Sn(i,u){i&1&&(a(0,"span",10)(1,"h3"),s(2," Loading..."),o()())}function vn(i,u){if(i&1){let e=b();a(0,"span")(1,"a",11),v("click",function(){h(e);let t=p();return g(t.viewReceivers("HOD"))}),s(2),o()()}if(i&2){let e=p();l(2),x("\xA0",e.hodCount.length,"")}}function _n(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p();l(),x(" \xA0",e.hodCount.length,"")}}function xn(i,u){if(i&1){let e=b();a(0,"span")(1,"a",11),v("click",function(){h(e);let t=p();return g(t.viewReceivers("FACULTY"))}),s(2),o()()}if(i&2){let e=p();l(2),x("\xA0",e.facultyCount.length,"")}}function Cn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p();l(),x(" \xA0",e.facultyCount.length,"")}}function yn(i,u){if(i&1){let e=b();a(0,"span")(1,"a",11),v("click",function(){h(e);let t=p();return g(t.viewReceivers("STUDENT"))}),s(2),o()()}if(i&2){let e=p();l(2),x("\xA0",e.studentCount.length,"")}}function bn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p();l(),x(" \xA0",e.studentCount.length,"")}}var It=(()=>{class i{announcementService;modalService;activeModal;loadingService;value;hodCount=[];facultyCount=[];studentCount=[];showLoading=!1;constructor(e,n,t,r){this.announcementService=e,this.modalService=n,this.activeModal=t,this.loadingService=r}ngOnInit(){this.getReceivers()}getReceivers(){this.loadingService.showLoading(),this.showLoading=!0,this.announcementService.getReceivers(this.value.id).then(e=>{e.forEach(n=>
2{n.usertype=="STUDENT"?this.studentCount.push(n):n.usertype=="HOD"?this.hodCount.push(n):n.usertype=="FACULTY"&&this.facultyCount.push(n)}),this.loadingService.hideLoading(),this.showLoading=!1})}viewReceivers(e){let n=this.modalService.open(ye,{size:"lg"});e=="HOD"?n.componentInstance.userData=this.hodCount:e=="FACULTY"?n.componentInstance.userData=this.facultyCount:e=="STUDENT"&&(n.componentInstance.userData=this.studentCount)}static \u0275fac=function(n){return new(n||i)(f(O),f(G),f(W),f(A))};static \u0275cmp=E({type:i,selectors:[["app-view-receivers-count-popup"]],inputs:{value:"value"},decls:25,vars:7,consts:[[1,"modal-header"],[1,"modal-title"],["style","color: brown;padding-left: 30%;",4,"ngIf"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"row"],[1,"col-md-2"],[1,"col-md-8"],[1,"col-12"],[4,"ngIf"],[2,"color","brown","padding-left","30%"],[3,"click","routerLink"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"h4",1),s(2,"Receivers"),o(),S(3,Sn,3,0,"span",2),a(4,"button",3),v("click",function(){return t.activeModal.dismiss("Cross click")}),a(5,"span",4),s(6,"\xD7"),o()()(),a(7,"div",5),_(8,"div",6),a(9,"div",7)(10,"label",8)(11,"Strong"),s(12,"Hod \xA0\xA0\xA0\xA0\xA0\xA0:"),o(),S(13,vn,3,1,"span",9)(14,_n,2,1,"span",9),o(),a(15,"label",8)(16,"Strong"),s(17,"Faculty \xA0:"),o(),S(18,xn,3,1,"span",9)(19,Cn,2,1,"span",9),o(),a(20,"label",8)(21,"Strong"),s(22,"Student :"),o(),S(23,yn,3,1,"span",9)(24,bn,2,1,"span",9),o()()()),n&2&&(l(3),d("ngIf",t.showLoading),l(10),d("ngIf",t.hodCount.length>0),l(),d("ngIf",t.hodCount.length==0),l(4),d("ngIf",t.facultyCount.length>0),l(),d("ngIf",t.facultyCount.length==0),l(4),d("ngIf",t.studentCount.length>0),l(),d("ngIf",t.studentCount.length==0))},dependencies:[R,P]})}return i})();function wn(i,u){if(i&1){let e=b();a(0,"tr")(1,"th",12),s(2),o(),a(3,"td",4)(4,"a",13),v("click",function(){let t=h(e).$implicit,r=p();return g(r.viewMessage(t))}),s(5),o()(),a(6,"td",4),s(7),F(8,"date"),o()()}if(i&2){let e=u.$implicit,n=u.index,t=p();l(2),y(t.page*t.pageSize-t.pageSize+(n+1)*1),l(3),y(e.title),l(2),y($(8,3,e.createdOn,"medium"))}}function In(i,u){if(i&1){let e=b();a(0,"div",2)(1,"div",14)(2,"ngb-pagination",15,0),M("pageChange",function(t){h(e);let r=p();return I(r.page,t)||(r.page=t),g(t)}),o()()()}if(i&2){let e=p();l(2),d("collectionSize",e.sentAnnouncements.length),w("page",e.page),d("pageSize",e.pageSize)("rotate",!0)("ellipses",!1)("boundaryLinks",!0)}}var Mt=(()=>{class i{modalService;announcementService;userService;loadingservice;sentAnnouncements;currentUser;page=1;pageSize=50;constructor(e,n,t,r){this.modalService=e,this.announcementService=n,this.userService=t,this.loadingservice=r}ngOnInit(){this.currentUser={},this.getCurrentUser()}viewMessage(e){let n=this.modalService.open(wt,{size:"lg"});n.componentInstance.value=e}getCurrentUser(){this.loadingservice.showLoading(),this.userService.getCurrentUser().then(e=>{this.currentUser=e,this.getSentAnnouncements()})}getSentAnnouncements(){this.announcementService.getSentAnnouncements(this.currentUser.userId).then(e=>{this.sentAnnouncements=e,this.sentAnnouncements=this.sentAnnouncements.sort((n,t)=>{let r=new Date(n.createdOn).getTime();return new Date(t.createdOn).getTime()-r}),this.loadingservice.hideLoading()})}getReceivers(e){let n=this.modalService.open(It,{size:"lg"});n.componentInstance.value=e}static \u0275fac=function(n){return new(n||i)(f(G),f(O),f(ee),f(A))};static \u0275cmp=E({type:i,selectors:[["app-sendannouncement"]],decls:20,vars:6,consts:[["myPaginator",""],[1,"container-fluid","flex-grow"],[1,"row"],[1,"col-md-12"],[2,"text-align","center"],[1,"card-body"],[1,"table","table-striped"],[1,"col-1","text-center"],[1,"col-8","text-center"],[1,"col-3","text-center"],[4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["scope","row",2,"text-align","center"],[3,"click","routerLink"],[1,"col"],[1,"d-flex","justify-content-center",3,"pageChange","collectionSize","page","pageSize","rotate","ellipses","boundaryLinks"]],template:function(n,t){n&1&&(a(0,"div",1)(1,"div",2)(2,"div",3),_(3,"br"),a(4,"h3",4),s(5,"Sent Announcement"),o(),a(6,"div",5)(7,"table",6)(8,"thead")(9,"tr")(10,"th",7),s(11,"#"),o(),a(12,"th",8),s(13,"Announcement"),o(),a(14,"th",9),s(15,"Date"),o()()(),a(16,"tbody"),S(17,wn,9,6,"tr",10),F(18,"slice"),o()()()(),S(19,In,4,6,"div",11),o()()),n&2&&(l(17),d("ngForOf",ie(18,2,t.sentAnnouncements,(t.page-1)*t.pageSize,(t.page-1)*t.pageSize+t.pageSize)),l(2),d("ngIf",t.sentAnnouncements!=null))},dependencies:[R,le,L,P,oe,H]})}return i})();function En(i,u){if(i&1){let e=b();a(0,"tr")(1,"td",13)(2,"input",14),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e).$implicit,r=p();return g(r.selectUnselect(t))}),o()(),a(3,"td"),s(4),o(),a(5,"td",13),s(6),o(),a(7,"td",13),s(8),o()()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(2),x("",e.name," "),l(2),y(e.email),l(2),y(e.ph
2one)}}var Et=(()=>{class i{userService;activeModal;loadingService;staffType;facultyDeptStaff;facultyDept;selectedStaffs;allSelected=new J;staffCount=new J;selectedMembers;staffList;finalArray;count=0;searchText;allStaffSelected;facultyDeptId;facultyDeptName;staffs;value;constructor(e,n,t){this.userService=e,this.activeModal=n,this.loadingService=t}ngOnInit(){this.staffList=[],this.finalArray=[],this.value={},this.allStaffSelected={},this.getStaff(this.facultyDept,this.staffType)}alreadySelectedStaff(e,n){this.selectedStaffs.length!=0&&(this.facultyDeptName=n.name,this.selectedStaffs.forEach(t=>{e.forEach(r=>{t==r.id&&(r.checked=!0,this.staffList.push(t))}),this.staffList.indexOf(t)==-1&&this.finalArray.push(t),this.staffList.length==e.length&&(this.allStaffSelected.checked=!0)}))}getStaff(e,n){this.userService.getFilteredStaff(e,n).then(t=>{this.staffs=t,this.alreadySelectedStaff(t,e)})}selectUnselectAllStaff(e){this.staffList=[],this.staffs.forEach(n=>{e.checked==!0?(n.checked=!0,this.staffList.push(n.id)):n.checked=!1})}selectUnselect(e){if(e.checked==!0)this.staffList.push(e.id);else{let n=this.staffList.indexOf(e.id);n>-1&&this.staffList.splice(n,1)}this.staffList.length==this.staffs.length?this.allStaffSelected.checked=!0:this.allStaffSelected.checked=!1}addStaff(){this.count=this.staffList.length,this.staffList.forEach(n=>{this.finalArray.push(n)});let e={selectedStaffs:this.finalArray,selectAll:this.allStaffSelected,selectedCount:this.staffList.length};this.staffCount.emit(this.count),this.allSelected.emit(this.allStaffSelected.checked),this.activeModal.close(this.finalArray)}static \u0275fac=function(n){return new(n||i)(f(ee),f(W),f(A))};static \u0275cmp=E({type:i,selectors:[["app-select-each-members-popup"]],inputs:{staffType:"staffType",facultyDeptStaff:"facultyDeptStaff",facultyDept:"facultyDept",selectedStaffs:"selectedStaffs"},outputs:{allSelected:"allSelected",staffCount:"staffCount"},decls:26,vars:6,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[2,"padding-left","25%"],["type","text","name","search","autocomplete","off","placeholder","Search here",1,"form-control",3,"ngModelChange","ngModel"],[1,"overflow-auto"],[1,"table","table-striped"],[2,"color","teal"],[4,"ngFor","ngForOf"],[1,"modal-footer",2,"position","sticky","bottom","0"],["type","button","ngbAutofocus","",1,"btn","btn-success",3,"click"],[2,"width","10%"],["type","checkbox",3,"ngModelChange","change","ngModel"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"h4",1),s(2),o(),a(3,"button",2),v("click",function(){return t.activeModal.dismiss("Cross click")}),a(4,"span",3),s(5,"\xD7"),o()()(),a(6,"div",4)(7,"div",5)(8,"input",6),M("ngModelChange",function(c){return I(t.searchText,c)||(t.searchText=c),c}),o()(),a(9,"div",7)(10,"table",8)(11,"thead")(12,"tr"),_(13,"th"),a(14,"th",9),s(15,"Name"),o(),a(16,"th",9),s(17,"Email"),o(),a(18,"th",9),s(19,"Phone"),o()()(),a(20,"tbody"),S(21,En,9,4,"tr",10),F(22,"filter"),o()()()(),a(23,"div",11)(24,"button",12),v("click",function(){return t.addStaff()}),s(25,"Add"),o()()),n&2&&(l(2),y(t.facultyDept.name),l(6),w("ngModel",t.searchText),l(13),d("ngForOf",$(22,3,t.staffs,t.searchText)))},dependencies:[B,se,Y,q,L,xe]})}return i})();var kt=(()=>{class i{http;constructor(e){this.http=e}getGroupRoster(e){return this.http.get(`${D.URI}/api/announcement/roster/${e}`)}static \u0275fac=function(n){return new(n||i)(N(ae))};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var be=(()=>{class i{rosterApi;constructor(e){this.rosterApi=e}loadGroupStudents(e){return Te(this.rosterApi.getGroupRoster(e))}static \u0275fac=function(n){return new(n||i)(N(kt))};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Dn(i,u){if(i&1){let e=b();a(0,"tr")(1,"td",13)(2,"input",8),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e).$implicit,r=p();return g(r.selectUnselect(t))}),o()(),a(3,"td"),s(4),o(),a(5,"td"),s(6),o(),a(7,"td"),s(8),o()()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(2),x("",e.name," "),l(2),y(e.registerNo),l(2),y(e.email)}}var Ee=(()=>{class i{userService;activeModal;announcementRosterService;groupId;alreadySelectedGroupIds;alreadySelectedStudentIds;allSelected=new J;studentCount=new J;finalSelectedStu=new J;groupStudents=new J;selectedMembers;studentSelectedList;finalArray;count=0;searchText;allStudentSelected;facultyDeptId;facultyDeptName;students;value;constructor(e,n,t){this.userService=e,this.activeModal=n,this.announcementRosterService=t}ngOnInit(){this.studentSelectedList=[],this.finalArray=[],this.value={},this.allStudentSelected={}
2,this.getStudents(this.groupId)}alreadySelectedStudent(e){e.forEach(n=>{this.alreadySelectedGroupIds.indexOf(this.groupId)!=-1?(this.allStudentSelected.checked=!0,n.checked=!0,this.studentSelectedList.push(n.id)):this.alreadySelectedStudentIds.indexOf(n.id)!=-1&&(n.checked=!0,this.studentSelectedList=this.alreadySelectedStudentIds)})}getStudents(e){this.announcementRosterService.loadGroupStudents(e).then(n=>{this.students=n,this.alreadySelectedStudent(n)})}selectUnselectAllStudents(e){this.count=0,this.studentSelectedList=[],this.students.forEach(n=>{e.checked==!0?(n.checked=!0,this.count=this.count+1,this.studentSelectedList.push(n.id)):n.checked=!1})}selectUnselect(e){if(this.count=0,this.students.forEach(n=>{n.checked&&(this.count=this.count+1)}),e.checked==!0)this.studentSelectedList.push(e.id);else{let n=this.studentSelectedList.indexOf(e.id);n>-1&&this.studentSelectedList.splice(n,1)}this.studentSelectedList.length==this.students.length?this.allStudentSelected.checked=!0:this.allStudentSelected.checked=!1}addStudent(){this.studentSelectedList.forEach(e=>{this.finalArray.push(e)}),this.groupStudents.emit(this.students),this.finalSelectedStu.emit(this.finalArray),this.studentCount.emit(this.studentSelectedList.length),this.allSelected.emit(this.allStudentSelected.checked),this.activeModal.close()}static \u0275fac=function(n){return new(n||i)(f(ze),f(W),f(be))};static \u0275cmp=E({type:i,selectors:[["app-student-select-members-popup"]],inputs:{groupId:"groupId",alreadySelectedGroupIds:"alreadySelectedGroupIds",alreadySelectedStudentIds:"alreadySelectedStudentIds"},outputs:{allSelected:"allSelected",studentCount:"studentCount",finalSelectedStu:"finalSelectedStu",groupStudents:"groupStudents"},decls:28,vars:8,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[2,"padding-left","25%"],["type","text","name","search","autocomplete","off","placeholder","Search here",1,"form-control",3,"ngModelChange","ngModel"],[1,"table","table-striped"],["type","checkbox",3,"ngModelChange","change","ngModel"],[2,"color","teal"],[4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button","ngbAutofocus","",1,"btn","btn-outline-dark",3,"click"],[2,"width","10%"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"h4",1),s(2),o(),a(3,"button",2),v("click",function(){return t.activeModal.dismiss("Cross click")}),a(4,"span",3),s(5,"\xD7"),o()()(),a(6,"div",4)(7,"div",5)(8,"label"),s(9),o(),a(10,"input",6),M("ngModelChange",function(c){return I(t.searchText,c)||(t.searchText=c),c}),o()(),a(11,"table",7)(12,"thead")(13,"tr")(14,"th")(15,"input",8),M("ngModelChange",function(c){return I(t.allStudentSelected.checked,c)||(t.allStudentSelected.checked=c),c}),v("change",function(){return t.selectUnselectAllStudents(t.allStudentSelected)}),o()(),a(16,"th",9),s(17,"Name"),o(),a(18,"th",9),s(19,"Register No"),o(),a(20,"th",9),s(21,"Email"),o()()(),a(22,"tbody"),S(23,Dn,9,4,"tr",10),F(24,"filter"),o()()(),a(25,"div",11)(26,"button",12),v("click",function(){return t.addStudent()}),s(27,"Add"),o()()),n&2&&(l(2),y(t.students[0].degreeName),l(7),x("SelectedCount:",t.count,""),l(),w("ngModel",t.searchText),l(5),w("ngModel",t.allStudentSelected.checked),l(8),d("ngForOf",$(24,5,t.students,t.searchText)))},dependencies:[B,se,Y,q,L,xe]})}return i})();var An=["staffCount"];function Tn(i,u){if(i&1){let e=b();a(0,"div",5)(1,"input",25),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e).$implicit,r=p();return g(r.onChange(t))}),o(),a(2,"label",26),s(3),F(4,"uppercase"),F(5,"uppercase"),o()()}if(i&2){let e=u.$implicit;l(),w("ngModel",e.checked),l(2),he(" \xA0 ",Ie(4,3,e.name),"(",Ie(5,5,e.dept),") ")}}function Pn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p().$implicit;l(),x("(",e.count,")")}}function Ln(i,u){i&1&&(a(0,"span"),s(1,"All"),o())}function Vn(i,u){if(i&1){let e=b();a(0,"div",null,0)(2,"div",30)(3,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p().index,C=p(2);return g(C.selectThisTypeStaff(m,c,r.checked))}),o(),a(4,"a",31),v("click",function(){let t=h(e),r=t.$implicit,c=t.index,m=p(),C=m.$implicit,k=m.index,V=p(2);return g(V.showStaffs(k,c,C,r))}),s(5),o(),S(6,Pn,2,1,"span",22)(7,Ln,2,0,"span",22),a(8,"span",null,0),s(10),o()()()}if(i&2){let e=u.$implicit,n=u.index,t=X(1),r=p().index;l(3),w("ngModel",e.checked),l(2),x(" \xA0",e.name," "),l(),d("ngIf",e.count!=null&&e.count!=0),l(),d("ngIf",r=="1"&&n=="2"),l(3),y(t.value)}}function On(i,u){if(i&1){let e=b();a(0,"div")(1,"div",18)(2,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p(2);return g(m.selectThisFacultyDeptStaff(c,r.checked))}),o(),a(3,"label",28),s(4),o()(),a(5,"div",12),_(6,"div",29),S(7,Vn,11,5,"div",19),o()()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(2),x(" \xA0",e.name," "),l(3),d("ngForOf",e.staffType)}}function Fn(i,u){if(i&1){let e=b();a(0,"div",17)(1,"div",18)(2,"input",6),M("ngModelChange",function(t){h(e);let r=p();return I(r.allFacultyDeptSelected.checked,t)||(r.allFacultyDeptSelected.checked=t),g(t)}),v("change",function(){h(e);let t=p();return g(t.selectUnselectAllFacultyDepts(t.allFacultyDeptSelected.checked))}),o(),a(3,"label",7),s(4," \xA0Select All "),o()(),S(5,On,8,3,"div",19),o()}if(i&2){let e=p();l(2),w("ngModel",e.allFacultyDeptSelected.checked),l(3),d("ngForOf",e.facultyDepartments)}}function Rn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p().$implicit;l(),x("(",e.count,")")}}function Gn(i,u){if(i&1){let e=b();a(0,"span"),s(1," \xA0\xA0\xA0\xA0 \xA0\xA0 "),a(2,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p().index,C=p().index,k=p();return g(k.selectThisGroupStu(C,m,c,r.checked))}),o(),a(3,"span")(4,"a",31),v("click",function(){let t=h(e),r=t.$implicit,c=t.index,m=p().index,C=p().index,k=p();return g(k.showStudents(C,m,c,r.id))}),s(5),o()(),S(6,Rn,2,1,"span",22),o()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(3),x(" \xA0Group ",e.groupName," "),l(),d("ngIf",e.count!=null&&e.count!=0)}}function Un(i,u){if(i&1){let e=b();a(0,"span")(1,"div",30)(2,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p().index,C=p();return g(C.selectThisAccYearStu(m,c,r.checked))}),o(),s(3),a(4,"span"),_(5,"br"),o()(),S(6,Gn,7,3,"span",19),o()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(),he(" \xA0",e.startYear,"-",e.endYear," "),l(3),d("ngForOf",e.groups)}}function Nn(i,u){if(i&1){let e=b();a(0,"div")(1,"div",18)(2,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p();return g(m.selectThisDeptstu(c,r.checked))}),o(),a(3,"label",28),s(4),o()(),S(5,Un,7,4,"span",19),o()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(2),x(" \xA0",e.degdep," "),l(),d("ngForOf",e.accyearList)}}function Wn(i,u){i&1&&(a(0,"div",32)(1,"span",33),s(2," Alert !"),o(),s(3," Please select Send as SMS to select parents. "),o())}function jn(i,u){if(i&1&&(a(0,"span"),s(1),o()),i&2){let e=p().$implicit;l(),x("(",e.count,")")}}function zn(i,u){if(i&1){let e=b();a(0,"span"),s(1," \xA0\xA0\xA0\xA0 \xA0\xA0 "),a(2,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p().index,C=p().index,k=p(2);return g(k.selectThisGroupParents(C,m,c,r.checked))}),o(),a(3,"span")(4,"a",31),v("click",function(){let t=h(e),r=t.$implicit,c=t.index,m=p().index,C=p().index,k=p(2);return g(k.showParentStu(C,m,c,r.id))}),s(5),o()(),S(6,jn,2,1,"span",22),o()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(3),x(" \xA0Group ",e.groupName," "),l(),d("ngIf",e.count!=null&&e.count!=0)}}function Hn(i,u){if(i&1){let e=b();a(0,"span")(1,"div",30)(2,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p().index,C=p(2);return g(C.selectThisAccYearParents(m,c,r.checked))}),o(),s(3),a(4,"span"),_(5,"br"),o()(),S(6,zn,7,3,"span",19),o()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(),he(" \xA0",e.startYear,"-",e.endYear," "),l(3),d("ngForOf",e.groups)}}function Bn(i,u){if(i&1){let e=b();a(0,"div")(1,"div",18)(2,"input",27),M("ngModelChange",function(t){let r=h(e).$implicit;return I(r.checked,t)||(r.checked=t),g(t)}),v("change",function(){let t=h(e),r=t.$implicit,c=t.index,m=p(2);return g(m.selectThisDeptParents(c,r.checked))}),o(),a(3,"label",28),s(4),o()(),S(5,Hn,7,4,"span",19),o()}if(i&2){let e=u.$implicit;l(2),w("ngModel",e.checked),l(2),x(" \xA0",e.degdep," "),l(),d("ngForOf",e.accyearList)}}function Yn(i,u){if(i&1){let e=b();a(0,"div")(1,"div",4)(2,"h5"),s(3,"Parents"),o()(),a(4,"div",12),_(5,"div",13),a(6,"div",14)(7,"span")(8,"input",34),M("ngModelChange",function(t){h(e);let r=p();return I(r.parentsRadio,t)||(r.parentsRadio=t),g(t)}),v("change",function(){h(e);let t=p();return g(t.getParentsAccYears(t.parentsRadio))}),o(),s(9,"\xA0Current Students"),o()(),a(10,"div",14)(11,"span")(12,"input",35),M("ngModelChange",function(t){h(e);let r=p();return I(r.parentsRadio,t)||(r.parentsRadio=t),g(t)}),v("change",function(){h(e);let t=p();return g(t.getParentsAccYears(t.parentsRadio))}),o(),s(13,"\xA0Previous Students"),o()()(),a(14,"span"),_(15,"br"),o(),a(16,"div",17)(17,"div",18)(18,"input",6),M("ngModelChange",function(t){h(e);let r=p();return I(r.allDeptParentsSelected.checked,t)||(r.allDeptParentsSelected.checked=t),g(t)}),v("change",function(){h(e);let t=p();return g(t.selectUnselectAllDeptParents(t.allDeptParentsSelected.checked))}),o(),a(19,"label",7),s(20," \xA0Select All "),o()(),S(21,Bn,6,3,"div",19),o()()}if(i&2){let e=p();l(8),w("ngModel",e.parentsRadio),l(4),w("ngModel",e.parentsRadio),l(6),w("ngModel",e.allDeptParentsSelected.checked),l(3),d("ngForOf",e.parentsDegreeDeptGroup)}}var At=(()=>{class i{facultyDeptService;modalService;staffTypeService;userService;loadingService;groupService;announcementRosterService;announcementService;departmentService;toastr;router;staffCount;currentOrientation="horizontal";allHodsId;getDepartment;hodDeptName;hodId;staffLoaded;announcementData;constructor(e,n,t,r,c,m,C,k,V,z,Ut){this.facultyDeptService=e,this.modalService=n,this.staffTypeService=t,this.userService=r,this.loadingService=c,this.groupService=m,this.announcementRosterService=C,this.announcementService=k,this.departmentService=V,this.toastr=z,this.router=Ut}facultyDepartments;staffType;degreeDeptGroup;suser;allHods;allHodSelected;allFacultyDeptSelected;filteredStaff;filteredHods;filteredGroupIds;filteredStudentIds;staffChild;val;allFacDptStaffSelected;staffCounts=0;allStatus;backgroundColor="#9e9e9e";color="white";allGroups;sms;allDeptStudentsSelected;eachDeptStuSelected;eachAccYearStuSelected;eachGroupStuSelected;thisGroupStudents;studentCounts;selectedStudents;studentRadio="CURRENT";filteredParentsGroupIds;filteredParentsIds;parentsDegreeDeptGroup;allDeptParentsSelected;parentsRadio="current";allHodId;ngOnInit(){this.getDepartment={},this.allHods=[],this.facultyDepartments=[],this.facultyDepartments.staffType=[],this.facultyDepartments.staffType.count="",this.allHodSelected={},this.allFacultyDeptSelected={},this.allDeptStudentsSelected={},this.eachAccYearStuSelected={},this.eachGroupStuSelected={},this.eachDeptStuSelected={},this.filteredHods=[],this.sms={},this.filteredStaff=[],this.filteredGroupIds=[],this.filteredStudentIds=[],this.selectedStudents=[],this.filteredParentsGroupIds=[],this.filteredParentsIds=[],this.staffChild={},this.staffType={},this.thisGroupStudents={},this.val={},this.allDeptParentsSelected={},this.parentsDegreeDeptGroup=[],this.sms.checked=!0,this.getAllStaffType(),this.getAllFacultyDepartments(),this.get
2SingleUser(),this.getDegDeptWithGroup("CURRENT","NO"),this.getParentsDegDeptWithGroup("CURRENT","NO")}getSingleUser(){this.loadingService.showLoading(),this.userService.getSingleUser().then(e=>{this.suser=e,this.getAllHod(this.suser.usertype,this.suser.collegeID)})}getAllHod(e,n){this.allHodId={},this.loadingService.showLoading(),this.userService.getAllHod(e,n).then(t=>Ae(this,null,function*(){this.allHods=t;for(var r=0;r<this.allHods.length;r++)yield this.gettingDepartmentName(this.allHods[r],r);this.loadingService.hideLoading()}))}gettingDepartmentName(e,n){this.userService.getUserById(e.id).then(t=>{this.getDepartment=t,this.getDepartment.departments[0]!=null&&(this.hodDeptName=this.getDepartment.departments[0].departmentName,this.allHods[n].dept=this.hodDeptName)})}selectUnselectAllHod(e){this.loadingService.showLoading(),this.filteredHods=[],this.allHods.forEach(n=>{e.checked==!1?n.checked=!1:(n.checked=!0,this.filteredHods.push(n.id))}),this.loadingService.hideLoading()}onChange(e){if(this.loadingService.showLoading(),e.checked==!0)this.filteredHods.push(e.id);else{let n=this.filteredHods.indexOf(e.id);n>-1&&this.filteredHods.splice(n,1)}this.filteredHods.length==this.allHods.length?this.allHodSelected.checked=!0:this.allHodSelected.checked=!1,this.loadingService.hideLoading()}getAllFacultyDepartments(){this.loadingService.showLoading(),this.facultyDeptService.getAllFacultyDepartments().then(e=>{this.facultyDepartments=e;for(var n=0;n<this.facultyDepartments.length;n++){this.facultyDepartments[n].staffType=[];for(var t=0;t<this.staffType.length;t++)this.val={},this.val.name=this.staffType[t].name,this.val.id=this.staffType[t].id,this.facultyDepartments[n].staffType.push(this.val)}this.staffLoaded=!0,this.loadingService.hideLoading()})}staffSelection(e,n,t){this.loadingService.showLoading(),this.userService.getFilteredStaff(this.facultyDepartments[e],this.facultyDepartments[e].staffType[n]).then(r=>{r.forEach(c=>{if(t)this.filteredStaff.indexOf(c.id)==-1&&this.filteredStaff.push(c.id);else{let m=this.filteredStaff.indexOf(c.id);m>-1&&this.filteredStaff.splice(m,1)}}),this.loadingService.hideLoading()})}selectUnselectAllFacultyDepts(e){this.loadingService.showLoading();for(var n=0;n<this.facultyDepartments.length;n++){this.facultyDepartments[n].checked=e;for(var t=0;t<this.facultyDepartments[n].staffType.length;t++)this.facultyDepartments[n].staffType[t].checked=e,e?this.facultyDepartments[n].staffType[t].count="All":this.facultyDepartments[n].staffType[t].count=0}this.filteredStaff=[],e&&(this.loadingService.showLoading(),this.userService.getAllStaff().then(r=>{r.forEach(c=>{this.filteredStaff.indexOf(c.id)==-1&&this.filteredStaff.push(c.id)}),this.loadingService.hideLoading()})),this.loadingService.hideLoading()}selectThisFacultyDeptStaff(e,n){this.loadingService.showLoading();for(var t=0;t<this.facultyDepartments[e].staffType.length;t++)this.facultyDepartments[e].staffType[t].checked=n,this.setStaffcount(e,t,this.staffCount,n),this.staffSelection(e,t,n)}setFacultyDeptValue(e){this.loadingService.showLoading();for(var n=0,t=0;t<this.facultyDepartments[e].staffType.length;t++)this.facultyDepartments[e].staffType[t].checked&&n++,n==0?this.facultyDepartments[e].checked=!1:this.facultyDepartments[e].checked=!0}setStaffcount(e,n,t,r){if(this.loadingService.showLoading(),r)this.facultyDepartments[e].staffType[n].count="All",this.facultyDepartments[e].staffType[n].checked=!0;else if(t>0)this.facultyDepartments[e].staffType[n].count=t,this.facultyDepartments[e].staffType[n].checked=!0;else{this.facultyDepartments[e].staffType[n].count=0,this.facultyDepartments[e].staffType[n].checked=!1;for(var c=0,m=0;m<this.facultyDepartments[e].staffType.length;m++)this.facultyDepartments[e].staffType.checked&&c++,this.facultyDepartments[e].checked=!1,c>0&&(this.facultyDepartments[e].checked=!0)}this.loadingService.hideLoading()}selectThisTypeStaff(e,n,t){this.loadingService.showLoading(),this.facultyDepartments[e].staffType[n].checked=t,this.setStaffcount(e,n,this.staffCount,t),this.setFacultyDeptValue(e),this.staffSelection(e,n,t)}showStaffs(e,n,t,r){let c=this.modalService.open(Et);c.componentInstance.facultyDepartments=this.facultyDepartments,c.componentInstance.facultyDept=t,c.componentInstance.staffType=r,c.componentInstance.selectedStaffs=this.filteredStaff,c.result.then(m=>{this.filteredStaff=m}),c.componentInstance.staffCount.subscribe(m=>{this.staffCounts=m}),c.componentInstance.allSelected.subscribe(m=>{this.allFacDptStaffSelected=m,this.setStaffcount(e,n,this.staffCounts,this.allFacDptStaffSelected)})}getAllStaffType(){this.loadingService.showLoading(),this.staffTypeService.getAllStaffType().then(e=>{this.staffType=e,this.loadingService.hideLoading()})}checkAllStaffTypes(e,n){this.loadingService.showLoading(),this.userService.getFilteredStaff(e,n).then(t=>{t.forEach(r=>
2{if(n.checked==!0)this.filteredStaff.push(r.id);else{let c=this.filteredStaff.indexOf(r.id);c>-1&&this.filteredStaff.splice(c,1)}}),this.loadingService.hideLoading()})}checkedFacultyDept(e){this.loadingService.showLoading(),this.staffType.array.forEach(n=>{this.select(e,n)})}checkAllStaffType(e,n,t,r){this.loadingService.showLoading();for(var c=0;c<this.facultyDepartments.length;c++)for(var m=0;m<this.staffType.length;m++)e==c&&n==m&&(this.staffType[n].isChecked=!0,this.userService.getFilteredStaff(this.facultyDepartments[e],this.staffType[n]).then(C=>{C.forEach(k=>{if(t)this.facultyDepartments[e].checked=!0,this.filteredStaff.push(k.id);else{this.facultyDepartments[e].checked=!1;let V=this.filteredStaff.indexOf(k.id);V>-1&&this.filteredStaff.splice(V,1)}}),this.loadingService.hideLoading()}))}select(e,n){this.loadingService.showLoading(),e.checked==!0&&this.userService.getFilteredStaff(e,n).then(t=>{t.forEach(r=>{if(e.checked==!0)this.filteredStaff.push(r.id);else{let c=this.filteredStaff.indexOf(r.id);c>-1&&this.filteredStaff.splice(c,1)}}),this.loadingService.hideLoading()})}getAccYears(e){this.loadingService.showLoading(),e=="CURRENT"?this.getDegDeptWithGroup("CURRENT","NO"):e=="OLD"&&this.getDegDeptWithGroup("OLD","YES")}getDegDeptWithGroup(e,n){this.loadingService.showLoading(),this.allDeptStudentsSelected.checked=!1,this.filteredGroupIds=[],this.filteredStudentIds=[],this.departmentService.getDegreeDepartmentWithGroup(e,n).then(t=>{this.degreeDeptGroup=t,this.loadingService.hideLoading()})}selectUnselectAllDeptStudents(e){this.loadingService.showLoading(),this.filteredGroupIds=[],this.filteredStudentIds=[];for(var n=0;n<this.degreeDeptGroup.length;n++){this.degreeDeptGroup[n].checked=e;for(var t=0;t<this.degreeDeptGroup[n].accyearList.length;t++){this.degreeDeptGroup[n].accyearList[t].checked=e;for(var r=0;r<this.degreeDeptGroup[n].accyearList[t].groups.length;r++)this.degreeDeptGroup[n].accyearList[t].groups[r].checked=e,e?(this.filteredGroupIds.push(this.degreeDeptGroup[n].accyearList[t].groups[r].id),this.degreeDeptGroup[n].accyearList[t].groups[r].count="All"):this.degreeDeptGroup[n].accyearList[t].groups[r].count=0}}this.loadingService.hideLoading()}selectThisDeptstu(e,n){this.loadingService.showLoading(),this.degreeDeptGroup[e].checked=n;for(var t=this.degreeDeptGroup[e].accyearList,r=0;r<t.length;r++)this.selectThisAccYearStu(e,r,n);this.loadingService.hideLoading()}selectThisAccYearStu(e,n,t){this.loadingService.showLoading(),this.degreeDeptGroup[e].accyearList[n].checked=t;for(var r=this.degreeDeptGroup[e].accyearList[n].groups,c=0;c<r.length;c++)this.selectThisGroupStu(e,n,c,t);this.loadingService.hideLoading()}selectThisGroupStu(e,n,t,r){this.loadingService.showLoading(),this.degreeDeptGroup[e].checked=r,this.degreeDeptGroup[e].accyearList[n].checked=r,this.degreeDeptGroup[e].accyearList[n].groups[t].checked=r;var c=this.degreeDeptGroup[e].accyearList[n].groups[t];if(this.setStudentcount(e,n,t,null,r),r)this.filteredGroupIds.push(c.id);else{let m=this.filteredGroupIds.indexOf(c.id);m>-1&&this.filteredGroupIds.splice(m,1)}this.filteredStudentIds.length!=0&&this.announcementRosterService.loadGroupStudents(c.id).then(m=>{m.forEach(C=>{var k=this.filteredStudentIds.indexOf(C.id);k!=-1&&this.filteredStudentIds.splice(k,1)})}),this.loadingService.hideLoading()}showStudents(e,n,t,r){let c=this.modalService.open(Ee,{size:"lg"});c.componentInstance.alreadySelectedGroupIds=this.filteredGroupIds,c.componentInstance.groupId=r,c.componentInstance.alreadySelectedStudentIds=this.filteredStudentIds,c.componentInstance.groupStudents.subscribe(m=>{this.thisGroupStudents=m}),c.componentInstance.finalSelectedStu.subscribe(m=>{this.selectedStudents=m}),c.componentInstance.studentCount.subscribe(m=>{this.studentCounts=m}),c.componentInstance.allSelected.subscribe(m=>{if(m){var C=this.filteredGroupIds.indexOf(r);C==-1&&this.filteredGroupIds.push(r),this.thisGroupStudents.forEach(V=>{var z=this.filteredStudentIds.indexOf(V.id);z!=-1&&this.filteredStudentIds.splice(z,1)})}else{this.selectedStudents.forEach(V=>{var z=this.filteredStudentIds.indexOf(V);z==-1&&this.filteredStudentIds.push(V)});var k=this.filteredGroupIds.indexOf(r);k!=-1&&this.filteredGroupIds.splice(k,1)}this.setStudentcount(e,n,t,this.studentCounts,m)})}setStudentcount(e,n,t,r,c){this.loadingService.showLoading(),c?(this.degreeDeptGroup[e].accyearList[n].groups[t].count="All",this.degreeDeptGroup[e].accyearList[n].groups[t].checked=!0):r>0?(this.degreeDeptGroup[e].accyearList[n].groups[t].count=r,this.degreeDeptGroup[e].accyearList[n].groups[t].checked=!0):(this.degreeDeptGroup[e].accyearList[n].groups[t].count=0,this.degreeDeptGroup[e].accyearList[n].groups[t].checked=!1),this.loadingService.hideLoading()}getParentsDegDeptWithGroup(e,n){this.loadingService.showLoading(),this.allDeptParentsSelected.checked=!1,this.filteredParentsGroupIds=[],this.filteredParentsIds=[],this.departmentService.getDegreeDepartmentWithGroup(e,n).then(t=>{this.parentsDegreeDeptGroup=t,this.loadingService.hideLoading()})}getParentsAccYears(e){this.loadingService.showLoading(),e=="current"?this.getParentsDegDeptWithGroup("CURRENT","NO"):e=="old"&&this.getParentsDegDeptWithGroup("OLD","YES")}selectUnselectAllDeptParents(e){this.loadingService.showLoading(),this.filteredParentsGroupIds=[],this.filteredParentsIds=[];for(var n=0;n<this.parentsDegreeDeptGroup.length;n++){this.parentsDegreeDeptGroup[n].checked=e;for(var t=0;t<this.parentsDegreeDeptGroup[n].accyearList.length;t++){this.parentsDegreeDeptGroup[n].accyearList[t].checked=e;for(var r=0;r<this.parentsDegreeDeptGroup[n].accyearList[t].groups.length;r++)this.parentsDegreeDeptGroup[n].accyearList[t].groups[r].checked=e,e?(this.filteredParentsGroupIds.push(this.parentsDegreeDeptGroup[n].accyearList[t].groups[r].id),this.parentsDegreeDeptGroup[n].accyearList[t].groups[r].count="All"):this.parentsDegreeDeptGroup[n].accyearList[t].groups[r].count=0}}this.loadingService.hideLoading()}selectThisDeptParents(e,n){this.loadingService.showLoading(),this.parentsDegreeDeptGroup[e].checked=n;for(var t=this.parentsDegreeDeptGroup[e].accyearList,r=0;r<t.length;r++)this.selectThisAccYearParents(e,r,n);this.loadingService.hideLoading()}selectThisAccYearParents(e,n,t){this.loadingService.showLoading(),this.parentsDegreeDeptGroup[e].accyearList[n].checked=t;for(var r=this.parentsDegreeDeptGroup[e].accyearList[n].groups,c=0;c<r.length;c++)this.selectThisGroupParents(e,n,c,t);this.loadingService.hideLoading()}selectThisGroupParents(e,n,t,r){this.loadingService.showLoading(),this.parentsDegreeDeptGroup[e].checked=r,this.parentsDegreeDeptGroup[e].accyearList[n].checked=r,this.parentsDegreeDeptGroup[e].accyearList[n].groups[t].checked=r;var c=this.parentsDegreeDeptGroup[e].accyearList[n].groups[t];if(this.setParentcount(e,n,t,null,r),r)this.filteredParentsGroupIds.push(c.id);else{let m=this.filteredParentsGroupIds.indexOf(c.id);m>-1&&this.filteredParentsGroupIds.splice(m,1)}this.filteredParentsIds.length!=0&&this.announcementRosterService.loadGroupStudents(c.id).then(m=>{m.forEach(C=>{var k=this.filteredParentsIds.indexOf(C.id);k!=-1&&this.filteredParentsIds.splice(k,1)})}),this.loadingService.hideLoading()}showParentStu(e,n,t,r){let c=this.modalService.open(Ee,{size:"lg"});c.componentInstance.alreadySelectedGroupIds=this.filteredParentsGroupIds,c.componentInstance.groupId=r,c.componentInstance.alreadySelectedStudentIds=this.filteredParentsIds,c.componentInstance.groupStudents.subscribe(m=>{this.thisGroupStudents=m}),c.componentInstance.finalSelectedStu.subscribe(m=>{this.selectedStudents=m}),c.componentInstance.studentCount.subscribe(m=>{this.studentCounts=m}),c.componentInstance.allSelected.subscribe(m=>{if(m){var C=this.filteredParentsGroupIds.indexOf(r);C==-1&&this.filteredParentsGroupIds.push(r),this.thisGroupStudents.forEac
2h(V=>{var z=this.filteredParentsIds.indexOf(V.id);z!=-1&&this.filteredParentsIds.splice(z,1)})}else{this.selectedStudents.forEach(V=>{var z=this.filteredParentsIds.indexOf(V);z==-1&&this.filteredParentsIds.push(V)});var k=this.filteredParentsGroupIds.indexOf(r);k!=-1&&this.filteredParentsGroupIds.splice(k,1)}this.setParentcount(e,n,t,this.studentCounts,m)})}setParentcount(e,n,t,r,c){this.loadingService.showLoading(),c?(this.parentsDegreeDeptGroup[e].accyearList[n].groups[t].count="All",this.parentsDegreeDeptGroup[e].accyearList[n].groups[t].checked=!0):r>0?(this.parentsDegreeDeptGroup[e].accyearList[n].groups[t].count=r,this.parentsDegreeDeptGroup[e].accyearList[n].groups[t].checked=!0):(this.parentsDegreeDeptGroup[e].accyearList[n].groups[t].count=0,this.parentsDegreeDeptGroup[e].accyearList[n].groups[t].checked=!1),this.loadingService.hideLoading()}send(){if(this.loadingService.showLoading(),this.filteredHods.length!=0||this.filteredStaff.length!=0||this.filteredGroupIds.length!=0||this.filteredStudentIds.length!=0||this.filteredParentsGroupIds.length!=0||this.filteredParentsIds.length!=0){var e=[],n=[],t=[],r=[];this.filteredHods.forEach(C=>{e.push(C)}),this.filteredStaff.forEach(C=>{e.push(C)}),this.filteredStudentIds.forEach(C=>{e.push(C)}),this.filteredGroupIds.forEach(C=>{n.push(C)}),this.filteredParentsIds.forEach(C=>{t.push(C)}),this.filteredParentsGroupIds.forEach(C=>{r.push(C)});var c=this.announcementService.announcementData;if(c!=null){var m={};m.userIds=e,m.groupIds=n,m.parentsUserIds=[],m.parentsGroupIds=[],this.sms.checked?(m.sms="YES",m.parentsUserIds=t,m.parentsGroupIds=r):m.sms="NO",m.title=c.title,m.message=this.announcementService.toPlainText(c.message),c.file!=null&&c.file.fileKey!=null&&c.file.versionId!=null&&(m.file=c.file),this.announcementService.create(m).then(C=>{this.announcementData=C,(this.announcementData.sms="YES")&&this.announcementService.sendAnnouncementAsSms(this.announcementData).then(k=>{}),this.toastr.success("Announcement Sent Successfully"),this.router.navigate(["/announcement/home"]),this.loadingService.hideLoading()})}else this.loadingService.hideLoading(),this.toastr.error("No message or Data")}else this.loadingService.hideLoading(),this.toastr.error("please select atleast one user")}static \u0275fac=function(n){return new(n||i)(f(je),f(G),f(St),f(ee),f(A),f(st),f(be),f(O),f(at),f(_e),f(Se))};static \u0275cmp=E({type:i,selectors:[["app-select-members"]],viewQuery:function(n,t){if(n&1&&Le(An,5),n&2){let r;Ve(r=Oe())&&(t.staffCount=r)}},decls:49,vars:11,consts:[["staffCount",""],[2,"padding-left","37%"],["type","checkbox",3,"ngModelChange","ngModel","checked"],["label","HOD"],[1,"text-center"],[1,"form-check"],["type","checkbox","id","selectAllHod",1,"form-check-input",3,"ngModelChange","change","ngModel"],["for","selectAllHod",1,"form-check-label"],["class","form-check",4,"ngFor","ngForOf"],["label","STAFFS"],["style","padding-left: 2%;",4,"ngIf"],["label","STUDENTS"],[1,"row"],[1,"col-1"],[1,"col-5"],["type","radio","value","CURRENT",3,"ngModelChange","change","ngModel"],["type","radio","value","OLD",3,"ngModelChange","change","ngModel"],[2,"padding-left","2%"],[1,"row","form-check"],[4,"ngFor","ngForOf"],["label","PARENTS"],["class","alert alert-warning",4,"ngIf"],[4,"ngIf"],[2,"padding-left","45%"],[1,"btn","btn-success",3,"click"],["type","checkbox","id","hod",1,"form-check-input",3,"ngModelChange","change","ngModel"],["for","hod",1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"ngModelChange","change","ngModel"],["for","hod ",1,"form-check-label"],[1,"col-md-1"],[1,"col-md-12","form-check"],[3,"click","routerLink"],[1,"alert","alert-warning"],[1,"badge","badge-warning"],["type","radio","value","current",3,"ngModelChange","change","ngModel"],["type","radio","value","old",3,"ngModelChange","change","ngModel"]],template:function(n,t){n&1&&(a(0,"div",1)(1,"input",2),M("ngModelChange",function(c){return I(t.sms.checked,c)||(t.sms.checked=c),c}),o(),a(2,"Strong"),s(3," \xA0Send as SMS"),o()(),a(4,"mat-tab-group")(5,"mat-tab",3)(6,"div",4)(7,"h5"),s(8,"Hods"),o()(),a(9,"div",5)(10,"input",6),M("ngModelChange",function(c){return I(t.allHodSelected.checked,c)||(t.allHodSelected.checked=c),c}),v("change",function(){return t.selectUnselectAllHod(t.allHodSelected)}),o(),a(11,"label",7),s(12," \xA0 Select All "),o()(),S(13,Tn,6,7,"div",8),o(),a(14,"mat-tab",9)(15,"div",4)(16,"h5"),s(17,"Staffs"),o()(),S(18,Fn,6,2,"div",10),o(),a(19,"mat-tab",11)(20,"div",4)(21,"h5"),s(22,"Students"),o()(),a(23,"div",12),_(24,"div",13),a(25,"div",14)(26,"span")(27,"input",15),M("ngModelChange",function(c){return I(t.studentRadio,c)||(t.studentRadio=c),c}),v("change",function(){return t.getAccYears(t.studentRadio)}),o(),s(28,"\xA0Current Students"),o()(),a(29,"div",14)(30,"span")(31,"input",16),M("ngModelChange",function(c){return I(t.studentRadio,c)||(t.studentRadio=c),c}),v("change",function(){return t.getAccYears(t.studentRadio)}),o(),s(32,"\xA0Previous Students"),o()()(),a(33,"span"),_(34,"br"),o(),a(35,"div",17)(36,"div",18)(37,"input",6),M("ngModelChange",function(c){return I(t.allDeptStudentsSelected.checked,c)||(t.allDeptStudentsSelected.checked=c),c}),v("change",function(){return t.selectUnselectAllDeptStudents(t.allDeptStudentsSelected.checked)}),o(),a(38,"label",7),s(39," \xA0Select All "),o()(),S(40,Nn,6,3,"div",19),o()(),a(41,"mat-tab",20),S(42,Wn,4,0,"div",21)(43,Yn,22,4,"div",22),o()(),a(44,"span"),_(45,"br"),o(),a(46,"span",23)(47,"button",24),v("click",function(){return t.send()}),s(48,"Send"),o()()),n&2&&(l(),w("ngModel",t.sms.checked),d("checked",t.sms.checked),l(9),w("ngModel",t.allHodSelected.checked),l(3),d("ngForOf",t.allHods),l(5),d("ngIf",t.staffLoaded),l(9),w("ngModel",t.studentRadio),l(4),w("ngModel",t.studentRadio),l(6),w("ngModel",t.allDeptStudentsSelected.checked),l(3),d("ngForOf",t.degreeDeptGroup),l(2),d("ngIf",!t.sms.checked),l(),d("ngIf",t.sms.checked))},dependencies:[R,B,se,qe,Y,q,L,P,lt,ct,Ge],styles:[".mat-tab-label[_ngcontent-%COMP%]{padding:5px;background-color:transparent;font-style:normal;font-weight:bolder;color:#080808}.mat-tab-label.mat-tab-label-active[_ngcontent-%COMP%]{padding:5px;background-color:#3461e3;color:#fff;font-weight:700}"]})}return i})();function Kn(i,u){if(i&1&&(a(0,"span")(1,"strong"),s(2,"File Name : "),o(),s(3),o()),i&2){let e=p(2);l(3),x(" ",e.announcement.file.fileKey," ")}}function Xn(i,u){if(i&1&&(a(0,"span"),s(1," \xA0"),a(2,"strong"),s(3,"Title : "),o(),s(4),_(5,"br"),s(6," \xA0"),a(7,"strong"),s(8,"Message : "),o(),s(9),_(10,"br"),s(11," \xA0"),S(12,Kn,4,1,"span",2),o()),i&2){let e=p();l(4),x(" ",e.announcement.title,""),l(5),x(" ",e.announcement.message,""),l(3),d("ngIf",e.announcement.file!=null&&e.announcement.file.fileKey!=null)}}var Tt=(()=>{class i{announcementService;announcement;constructor(e){this.announcementService=e}ngOnInit(){this.announcement={},this.announcementData()}announcementData(){this.announcement=this.announcementService.announcementData,this.announcement&&(this.announcement.message=this.announcementService.toPlainText(this.announcement.message))}static \u0275fac=function(n){return new(n||i)(f(O))};static \u0275cmp=E({type:i,selectors:[["app-previewannouncement"]],decls:11,vars:1,consts:[[1,"bg-light","card"],[2,"text-align","center","margin-top","15px"],[4,"ngIf"],[1,"card",2,"padding-bottom","40px"],[1,"row"],[1,"col-md-1"],[1,"col-md-11"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"div",0)(2,"h3",1),s(3,"Preview Announcement"),o(),S(4,Xn,13,3,"span",2),o(),a(5,"div",3)(6,"div",4),_(7,"div",5),a(8,"div",6),_(9,"br")(10,"app-select-members"),o()()()()),n&2&&(l(4),d("ngIf",t.announcement!=null))},dependencies:[P,At]})}return i})();var pe=()=>({exact:!0});function Qn(i,u){i&1&&(a(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),_(4,"router-outlet"),o()()(),a(5,"div",6)(6,"div",7)(7,"a",8),_(8,"i",9),s(9,"\xA0Home"),o(),a(10,"a",10),_(11,"i",11),s(12,"\xA0Compose"),o(),a(13,"a",12),_(14,"i",13),s(1
25,"\xA0Sent"),o(),a(16,"a",14),_(17,"i",11),s(18,"\xA0Communication Sms"),o(),a(19,"a",15),_(20,"i",13),s(21,"\xA0Monthly Sms"),o()()()()),i&2&&(l(7),d("routerLinkActiveOptions",Z(5,pe)),l(3),d("routerLinkActiveOptions",Z(6,pe)),l(3),d("routerLinkActiveOptions",Z(7,pe)),l(3),d("routerLinkActiveOptions",Z(8,pe)),l(3),d("routerLinkActiveOptions",Z(9,pe)))}function Jn(i,u){i&1&&(a(0,"div",2)(1,"div",16)(2,"div",4)(3,"div",5),_(4,"router-outlet"),o()()()())}var Pt=(()=>{class i{userService;loadingService;currentUser;constructor(e,n){this.userService=e,this.loadingService=n}ngOnInit(){this.currentUser={},this.getCurrentUser()}getCurrentUser(){this.loadingService.showLoading(),this.userService.getCurrentUser().then(e=>{this.currentUser=e,this.loadingService.hideLoading()})}static \u0275fac=function(n){return new(n||i)(f(ee),f(A))};static \u0275cmp=E({type:i,selectors:[["app-announcement-parent"]],decls:3,vars:2,consts:[[1,"container-fluid","flex-grow"],["class","row",4,"ngIf"],[1,"row"],[1,"col-md-10","order-md-1","pt-3"],[1,"bg-faded","mb-3"],[1,"card","bg-light"],[1,"col-md-2","order-md-2","pt-4"],[1,"list-group"],["routerLink","/announcement/home","routerLinkActive","active-link",1,"list-group-item","list-group-item-action",3,"routerLinkActiveOptions"],[1,"fa","fa-home"],["routerLink","/announcement/compose","routerLinkActive","active-link",1,"list-group-item","list-group-item-action",3,"routerLinkActiveOptions"],[1,"fa","fa-edit"],["routerLink","/announcement/send","routerLinkActive","active-link",1,"list-group-item","list-group-item-action",3,"routerLinkActiveOptions"],[1,"fa","fa-paper-plane"],["routerLink","/announcement/sentsms","routerLinkActive","active-link",1,"list-group-item","list-group-item-action",3,"routerLinkActiveOptions"],["routerLink","/announcement/monthlysms","routerLinkActive","active-link",1,"list-group-item","list-group-item-action",3,"routerLinkActiveOptions"],[1,"col-md-12","order-md-1","pt-3"]],template:function(n,t){n&1&&(a(0,"div",0),S(1,Qn,22,10,"div",1)(2,Jn,5,0,"div",1),o()),n&2&&(l(),d("ngIf",t.currentUser.userType!="STUDENT"),l(),d("ngIf",t.currentUser.userType=="STUDENT"))},dependencies:[ge,R,We,P]})}return i})();var ao={headers:new re({"Content-Type":"application/json"})},Lt=(()=>{class i{http;currentUri=D.URI+"/api/sms";announcement;constructor(e){this.http=e}getSentSms(e){return this.http.get(this.currentUri+"/sentSms"+e)}getDayCount(e){return this.http.get(this.currentUri+"/daySmsCount/"+e)}getMonthly(){return this.http.get(this.currentUri+"/report/monthly")}exportAsXLSX(e){let n=this.currentUri+"/excelReport/monthly/"+e;ve(n,"template")}filterSms(e,n){return this.http.get(this.currentUri+"/sentSms?filter=sDate eq "+e+",status eq "+n+"&start=0&count=25&order=des&sort=_id")}ShowAll(e){return this.http.get(this.currentUri+"/sentSms?filter=sDate eq "+e+"&start=0&count=25&order=des&sort=_id")}getSmsCount(){return this.http.get(this.currentUri+"/smsCount")}static \u0275fac=function(n){return new(n||i)(N(ae))};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var lo={headers:new re({"Content-Type":"application/json"})},we=(()=>{class i{smsProvider;constructor(e){this.smsProvider=e}getSentSms(e){return new Promise((n,t)=>{this.smsProvider.getSentSms(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getDayCount(e){return new Promise((n,t)=>{this.smsProvider.getDayCount(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getMonthlySms(){return new Promise((e,n)=>{this.smsProvider.getMonthly().subscribe(t=>{e(t)},t=>console.log("Error :: "+t))})}exportAsXLSX(e){this.smsProvider.exportAsXLSX(e)}filterSms(e,n){return new Promise((t,r)=>{this.smsProvider.filterSms(n,e).subscribe(c=>{t(c)},c=>console.log("Error :: "+c))})}showAll(e){return new Promise((n,t)=>{this.smsProvider.ShowAll(e).subscribe(r=>{n(r)},r=>console.log("Error :: "+r))})}getSmsCount(){return new Promise((e,n)=>{this.smsProvider.getSmsCount().subscribe(t=>{e(t)},t=>console.log("Error :: "+t))})}static \u0275fac=function(n){return new(n||i)(N(Lt))};static \u0275prov=U({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function $n(i,u){if(i&1&&(a(0,"ng-option",20),s(1),o()),i&2){let e=u.$implicit;d("value",e.status),l(),x("",e.name," ")}}function ei(i,u){if(i&1&&(a(0,"div",2),s(1),o()),i&2){let e=p();l(),y(e.dayCount.length)}}function ti(i,u){i&1&&(a(0,"div"),_(1,"i",30),s(2,"\xA0Queued "),o())}function ni(i,u){i&1&&(a(0,"div"),_(1,"i",31),s(2,"\xA0Sent "),o())}function ii(i,u){i&1&&(a(0,"div"),_(1,"i",32),s(2,"\xA0Failed "),o())}function oi(i,u){if(i&1&&(a(0,"div",22)(1,"div",23)(2,"div",24),s(3),o(),a(4,"div",25)(5,"p"),s(6),o()(),a(7,"div",26)(8,"div",27)(9,"div",0)(10,"div",28),s(11),o(),a(12,"div",29),S(13,ti,3,0,"div",16)(14,ni,3,0,"div",16)(15,ii,3,0,"div",16),o()()()()()()),i&2){let e=u.$implicit;l(3),Fe("",e.fUser," Sent to ",e.toName,"",e.toUserType," "),l(3),y(e.msg),l(5),y(e.phone),l(2),d("ngIf",e.status=="P"),l(),d("ngIf",e.status=="S"),l(),d("ngIf",e.status=="F")}}function ri(i,u){if(i&1&&(a(0,"div")(1,"div",0),S(2,oi,16,8,"div",21),F(3,"slice"),o()()),i&2){let e=p();l(2),d("ngForOf",ie(3,1,e.sentSms,(e.page-1)*e.pageSize,(e.page-1)*e.pageSize+e.pageSize))}}function ai(i,u){i&1&&(a(0,"div"),_(1,"br"),a(2,"div",33)(3,"span",34),s(4,"Warning"),o(),s(5," \xA0Sorry!, No data found. "),o()())}var Ot=(()=>
2{class i{smsService;loadingService;datepipe;smsCount;sentSms=[];dateCtrl;dayCount;time;itemStatus;filterOptions;page=1;pageSize=10;filterItem;dayCounts;constructor(e,n,t){this.smsService=e,this.loadingService=n,this.datepipe=t}ngOnInit(){this.getSmsCount(),this.smsCount={},this.sentSms=[],this.filterOptions={options:[{name:"Show All",status:"A"},{name:"Failed",status:"F"},{name:"Queued",status:"P"},{name:"Sent",status:"S"}]},this.filterItem={showAll:this.filterOptions.options}}getSmsCount(){this.loadingService.showLoading(),this.smsService.getSmsCount().then(e=>{this.smsCount=e}),this.loadingService.hideLoading()}getSenTSms(e){this.loadingService.showLoading();let n="?filter=sDate eq"+e+"&start=0&count=25&order=des&sort=_id";this.smsService.getSentSms(n).then(t=>{this.sentSms=t}),this.loadingService.hideLoading()}getDayCount(e){var n=e.getTime().valueOf().toString();this.time=n,this.loadingService.showLoading(),this.smsService.getDayCount(n).then(t=>{this.dayCount=t}),this.getSenTSms(this.time),this.loadingService.hideLoading()}getList(e,n){var t=e.getTime().valueOf().toString();n==null?this.smsService.showAll(t).then(r=>{this.dayCount=r,this.getDaySmsCount(t)}):this.smsService.filterSms(n,t).then(r=>{this.sentSms=r,this.getDaySmsCount(t)})}getDaySmsCount(e){this.smsService.getDayCount(e).then(n=>{this.dayCounts=n})}static \u0275fac=function(n){return new(n||i)(f(we),f(A),f(H))};static \u0275cmp=E({type:i,selectors:[["app-sent-sms"]],decls:47,vars:17,consts:[[1,"row"],[1,"col-md-12","card","card-body","bg-light"],[1,"col-md-2"],[1,"container","mb-1"],[1,"row","justify-content-end"],[1,"col-md-2","text-end",2,"color","teal"],[1,"form-group","row"],[1,"col-md-2","col-form-label","text-end"],[1,"col-md-3"],["type","text","name","dateCtrl","placeholder","Select Date","bsDatepicker","",1,"form-control",3,"ngModelChange","ngModel"],["type","button","value","View",1,"btn","btn-secondary",3,"click"],[1,"col-md-3","col-form-label","text-end"],["name","itemStatus","placeholder","--Filter--",3,"ngModelChange","change","searchable","clearable","ngModel"],["value",""],[3,"value",4,"ngFor","ngForOf"],["class","col-md-2",4,"ngIf"],[4,"ngIf"],[1,"row","justify-content-center"],[1,"pagination"],[3,"pageChange","collectionSize","page","maxSize","rotate","ellipses","boundaryLinks"],[3,"value"],["class","col-md-11",4,"ngFor","ngForOf"],[1,"col-md-11"],[1,"card","mb-5",2,"font-size","17px"],[1,"card-header"],[1,"card-body",2,"max-height","25px","overflow-y","scroll"],[1,"card-footer"],[1,"container-fluid"],[1,"col-md-6"],[1,"col-md-6",2,"text-align","right"],[1,"fa","fa-upload"],[1,"fa","fa-ok"],[1,"fa","fa-remove"],[1,"alert","alert-warning"],[1,"badge","badge-warning"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"div",1)(2,"div",0)(3,"h4",2),s(4,"Sent Items"),o()(),a(5,"div",3)(6,"div",4)(7,"label",5)(8,"strong"),s(9,"Total \xA0 "),o()(),a(10,"div",2),s(11),o()(),a(12,"div",4)(13,"label",5)(14,"strong"),s(15,"Sent \xA0 "),o()(),a(16,"div",2),s(17),o()(),a(18,"div",4)(19,"label",5)(20,"strong"),s(21,"Available \xA0 "),o()(),a(22,"div",2),s(23),o()()(),a(24,"div",6)(25,"label",7),s(26,"Date :"),o(),a(27,"div",8)(28,"input",9),M("ngModelChange",function(c){return I(t.dateCtrl,c)||(t.dateCtrl=c),c}),o()(),a(29,"input",10),v("click",function(){return t.getDayCount(t.dateCtrl)}),o(),a(30,"label",11),s(31,"Filter :"),o(),a(32,"div",2)(33,"ng-select",12),M("ngModelChange",function(c){return I(t.itemStatus,c)||(t.itemStatus=c),c}),v("change",function(){return t.getList(t.dateCtrl,t.itemStatus)}),a(34,"ng-option",13),s(35,"-------Select Status-------"),o(),S(36,$n,2,2,"ng-option",14),o()()(),a(37,"div",4)(38,"label",5)(39,"strong"),s(40," Day Count\xA0 "),o()(),S(41,ei,2,1,"div",15),o(),S(42,ri,4,5,"div",16)(43,ai,6,0,"div",16),a(44,"div",17)(45,"div",18)(46,"ngb-pagination",19),M("pageChange",function(c){return I(t.page,c)||(t.page=c),c}),o()()()()()),n&2&&(l(11),y(t.smsCount.cAvailable),l(6),y(t.smsCount.totalSent),l(6),y(t.smsCount.cAvailable-t.smsCount.totalSent),l(5),w("ngModel",t.dateCtrl),l(5),d("searchable",!0)("clearable",!1),w("ngModel",t.itemStatus),l(3),d("ngForOf",t.filterOptions.options),l(5),d("ngIf",t.dayCount!=null),l(),d("ngIf",t.sentSms.length>0),l(),d("ngIf",t.sentSms.length==0),l(3),d("collectionSize",t.sentSms.length),w("page",t.page),d("maxSize",5)("rotate",!0)("ellipses",!1)("boundaryLinks",!0))},dependencies:[le,B,Y,q,L,P,tt,et,nt,it,oe]})}return i})();function si(i,u){if(i&1){let e=b();a(0,"span")(1,"a",15),v("click",function(){h(e);let t=p().$implicit,r=p();return g(r.exportAsXLSX(t.monthYear))}),_(2,"i",16),o()()}}function li(i,u){i&1&&(a(0,"span"),_(1,"i",17),o())}function ci(i,u){if(i&1&&(a(0,"tr")(1,"td",12),s(2),o(),a(3,"td",13),s(4),o(),a(5,"td",14),s(6),o(),a(7,"td",14),s(8),o(),a(9,"td",14),S(10,si,3,0,"span",10)(11,li,2,0,"span",10),o()()),i&2){let e=u.$implicit,n=u.index;l(2),y(n+1),l(2),y(e.monthYear),l(2),y(e.smsCount),l(2),y(e.smsFailCount),l(2),d("ngIf",e.smsCount!=0),l(),d("ngIf",e.smsCount==0)}}function di(i,u){i&1&&(a(0,"div"),_(1,"br"),a(2,"div",18)(3,"span",19),s(4,"Warning"),o(),s(5," \xA0Sorry!, No data found. "),o()())}var Ft=(()=>
2{class i{smsService;loadingService;datepipe;smsCount;smsReview;constructor(e,n,t){this.smsService=e,this.loadingService=n,this.datepipe=t}ngOnInit(){this.getMonthly(),this.smsCount()}getMonthly(){this.loadingService.showLoading(),this.smsService.getMonthlySms().then(e=>{this.smsReview=e}),this.loadingService.hideLoading()}getSmsCount(){this.loadingService.showLoading(),this.smsService.getSmsCount().then(e=>{this.smsCount=e}),this.loadingService.hideLoading()}exportAsXLSX(e){this.smsService.exportAsXLSX(e)}static \u0275fac=function(n){return new(n||i)(f(we),f(A),f(H))};static \u0275cmp=E({type:i,selectors:[["app-monthly-sms"]],decls:23,vars:2,consts:[[1,"row"],[1,"col-md-12","card","card-body","bg-light"],[1,"page-header"],["ng-if","smsSent.length > 0"],[1,"table","table-striped","table-condensed",2,"width","100%"],[2,"color","teal","width","10%","text-align","center"],[2,"color","teal","width","22%","padding-left","5%"],[2,"color","teal","width","18%"],[2,"color","teal","width","30%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["ui-view","rightContainer",1,"col-md-2"],[2,"width","10%","text-align","center"],[2,"width","10%","padding-left","5%"],[2,"width","10%","padding-left","4%"],[3,"click","routerLink"],[1,"fa","fa-download"],[1,"fa","fa-ban"],[1,"alert","alert-warning"],[1,"badge","badge-warning"]],template:function(n,t){n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h4"),s(4,"Monthly SMS Review"),o()(),a(5,"div",3)(6,"table",4)(7,"thead")(8,"tr")(9,"th",5),s(10,"#"),o(),a(11,"th",6),s(12,"Month & Year"),o(),a(13,"th",7),s(14,"Total SMS Sent"),o(),a(15,"th",7),s(16,"Total Fail Count"),o(),a(17,"th",8),s(18,"Export Excel"),o()()(),a(19,"tbody"),S(20,ci,12,6,"tr",9),o()()(),S(21,di,6,0,"div",10),o(),_(22,"div",11),o()),n&2&&(l(20),d("ngForOf",t.smsReview),l(),d("ngIf",t.smsReview.length==0))},dependencies:[R,L,P]})}return i})();var mi=[{path:"",redirectTo:"home",pathMatch:"full"},{path:"",component:Pt,children:[{path:"home",component:_t},{path:"compose",component:xt},{path:"send",component:Mt},{path:"preview",component:Tt},{path:"sentsms",component:Ot},{path:"monthlysms",component:Ft}]}],Rt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=fe({type:i});static \u0275inj=ue({imports:[me.forChild(mi),me]})}return i})();var Gt=(()=>{class i{title="venue";static \u0275fac=function(n){return new(n||i)};static \u0275cmp=E({type:i,selectors:[["app-root"]],decls:1,vars:0,template:function(n,t){n&1&&_(0,"router-outlet")},dependencies:[ge]})}return i})();var cr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=fe({type:i,bootstrap:[Gt]});static \u0275inj=ue({providers:[H],imports:[Rt,$e,Xe,Qe,Je,Ze,Ue,rt,mt,me,dt,ot.forRoot(),gt.forRoot()]})}return i})();export{cr as AnnouncementModule};

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.