uawdijnntqw1x1x1
IP : 216.73.216.55
Hostname : srv913213
Kernel : Linux srv913213 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
krbed.in
/
..
/
..
/
www
/
..
/
www
/
html
/
..
/
school_portal_admin
/
61-es2015.ba2edd0c947b5b43de93.js
/
/
(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{"73gp":function(t,e,i){"use strict";var c=i("tk/3"),o=i("2Vo4"),r=i("lJxs"),s=i("rnHP"),n=i("fXoL");let a=(()=>{class t{constructor(t){this.adapter=t}adapt(t){let e=[];return t.data.forEach(t=>{e.push(this.adapter.adapt(t))}),{keyword:t.keyword,message:t.message,sections:e,pageSize:t.count,page:t.page}}}return t.\u0275fac=function(e){return new(e||t)(n.hc(s.a))},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var l=i("qc5V");i.d(e,"a",(function(){return d}));let d=(()=>{class t{constructor(t,e){this.adapter=t,this.apiService=e,this.recordAddedSubject=new o.a([{}]),this.recordUpdatedSubject=new o.a([{}])}create(t){return this.apiService.post("section/create",t).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}update(t){return this.apiService.post("section/update",t).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}status(t,e){return this.apiService.post(2!=e?"section/status":"section/delete",t)}getList(t){let e=new c.e;for(let i in t)e=e.set(i,t[i]);return this.apiService.get("section",e).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}getRecordAddedSub(){return this.recordAddedSubject.asObservable()}getRecordUpdatedSub(){return this.recordUpdatedSubject.asObservable()}}return t.\u0275fac=function(e){return new(e||t)(n.hc(a),n.hc(l.a))},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},Attm:function(t,e,i){"use strict";class c{constructor(){this.classId="",this.className="",this.status=""}}var o=i("fXoL");i.d(e,"a",(function(){return r}));let r=(()=>{class t{adapt(t){return this.obj=new c,this.obj.classId=t.class_id,this.obj.className=t.class_name,this.obj.status=t.status,this.obj}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},Lzaa:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));class c{constructor(){this.categoryId="",this.categoryName="",this.branchId="",this.status=""}}},btqD:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));class c{constructor(){this.positionId="",this.positionName="",this.categoryName="",this.categoryId="",this.status=""}}},cZdB:function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"a",(function(){return o}));var c=i("fXoL");let o=(()=>{class t{transform(e,i){return i&&e?t.filter(e,i):e}static filter(t,e){const i=e.toLowerCase();return t.filter((function(t){return function t(e,c){for(let o in e)if(null!==e[o]&&null!=e[o]){if("object"==typeof e[o]&&t(e[o],c))return!0;if(e[o].toString().toLowerCase().includes(i))return!0}return!1}(t,e)}))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=c.Wb({name:"filter",type:t,pure:!1}),t.\u0275prov=c.Tb({token:t,factory:t.\u0275fac}),t})(),r=(()=>{class t{}return t.\u0275mod=c.Vb({type:t}),t.\u0275inj=c.Ub({factory:function(e){return new(e||t)}}),t})()},elPL:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return h})),i.d(e,"c",(function(){return u})),i.d(e,"d",(function(){return l})),i.d(e,"e",(function(){return d})),i.d(e,"f",(function(){return p}));var c=i("fXoL"),o=i("R0Ic"),r=i("ofXK");const s=["*"],n=[[["mgl-timeline-entry-side"]],[["mgl-timeline-entry-dot"]],[["mgl-timeline-entry-header"]],[["mgl-timeline-entry-content"]]],a=["mgl-timeline-entry-side","mgl-timeline-entry-dot","mgl-timeline-entry-header","mgl-timeline-entry-content"];let l=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=c.Rb({type:t,selectors:[["mgl-timeline-entry-header"]],ngContentSelectors:s,decls:1,vars:0,template:function(t,e){1&t&&(c.xc(),c.wc(0))},styles:["mgl-timeline-entry-header{position:relative;display:block;overflow:hidden;padding:15px;text-align:center}"],encapsulation:2}),t})(),d=(()=>{let t=class{constructor(t,e,i,o,r){this.animationBuilder=t,this.elementRef=e,this.renderer=i,this.changeDetectorRef=o,this.document=r,this._expanded=!1,this._alternate=!1,this._mobile=!1,this._size=50,this.animationDone=new c.o,this.expandAnimationTiming="200ms ease",this.collapseAnimationTiming="100ms ease",this.clazz="primary"}set size(t){this._size=t,this.setStyle()}get size(){return this._size}set alternate(t){this._alternate=t,this.setStyle()}get alternate(){return this._alternate}set mobile(t){this._mobile=t,this.setStyle()}get mobile(){return this._mobile}set expanded(t){const e=this._expanded!==t;this._expanded=t,e?this.animate():this.setStyle()}get expanded(){return this._expanded}ngAfterViewInit(){this.initialStyle=this.document.defaultView.getComputedStyle(this.elementRef.nativeElement),this.setStyle(),this.changeDetectorRef.detectChanges()}getCollapsedStyle(){return{top:"50%",left:this.alternate||this.mobile?"-5px":"calc(100% + 5px)",width:this.size+"px",height:this.size+"px",opacity:1,transform:"translateY(-50%) translateX(-50%)",boxShadow:this.initialStyle&&this.initialStyle.boxShadow,borderRadius:"100px"}}getTransitionStyle(){return Object.assign(Object.assign({},this.getCollapsedStyle()),{left:"50%",opacity:.5,boxShadow:"none"})}getExpandedStyle(){return Object.assign(Object.assign({},this.getTransitionStyle()),{left:"0",transform:"translateX(0) translateY(-50%)",width:"100%",height:"100%",opacity:1,borderRadius:0})}animate(){this.destroyAnimation(),this.expanded?(this.animation=this.animationBuilder.build([Object(o.m)(this.getCollapsedStyle()),Object(o.e)(this.expandAnimationTiming,Object(o.m)(this.getTransitionStyle())),Object(o.e)(this.expandAnimationTiming,Object(o.m)(this.getExpandedStyle()))]).create(this.elementRef.nativeElement),this.animation.onDone(()=>this.animationDone.emit({toState:"expanded"})),this.animation.play()):(this.animation=this.animationBuilder.build([Object(o.m)(this.getExpandedStyle()),Object(o.e)(this.collapseAnimationTiming,Object(o.m)(this.getTransitionStyle())),Object(o.e)(this.collapseAnimationTiming,Object(o.m)(this.getCollapsedStyle()))]).create(this.elementRef.nativeElement),this.animation.onDone(()=>this.animationDone.emit({toState:"collapsed"})),this.animation.play())}setStyle(){this.destroyAnimation();const t=this.expanded?this.getExpandedStyle():this.getCollapsedStyle();Object.keys(t).forEach(e=>{this.renderer.setStyle(this.elementRef.nativeElement,e,t[e])})}destroyAnimation(){this.animation&&(this.animation.destroy(),delete this.animation)}};return t.\u0275fac=function(e){return new(e||t)(c.Xb(o.b),c.Xb(c.l),c.Xb(c.G),c.Xb(c.h),c.Xb(r.d))},t.\u0275cmp=c.Rb({type:t,selectors:[["mgl-timeline-entry-dot"]],hostVars:2,hostBindings:function(t,e){2&t&&c.Jb(e.clazz)},inputs:{expandAnimationTiming:"expandAnimationTiming",collapseAnimationTiming:"collapseAnimationTiming",clazz:["class","clazz"],size:"size"},ngContentSelectors:s,decls:1,vars:0,template:function(t,e){1&t&&(c.xc(),c.wc(0))},styles:["mgl-timeline-entry-dot{display:block;position:absolute}"],encapsulation:2}),t})(),m=(()=>{let t=class{constructor(t,e,i){this.elementRef=t,this.animationBuilder=e,this.renderer=i,this.expandAnimationTiming="200ms ease",this.collapseAnimationTiming="100ms ease",this.animationDone=new c.o,this._expanded=!1}set expanded(t){this.contentHeight=this.elementRef.nativeElement.scrollHeight;const e=this._expanded!==t;this._expanded=t,e&&this.animate()}get expanded(){return this._expanded}ngAfterViewInit(){this.contentHeight=this.elementRef.nativeElement.scrollHeight,this.setStyle()}getCollapsedStyle(){return{height:"0px"}}getExpandedStyle(){return{height:this.contentHeight+"px"}}animate(){if(this.expanded){const t=this.animationBuilder.build([Object(o.m)(this.getCollapsedStyle()),Object(o.e)(this.expandAnimationTiming,Object(o.m)(this.getExpandedStyle()))]).create(this.elementRef.nativeElement);t.onDone(()=>this.animationDone.emit({toState:"expanded"})),t.play()}else{const t=this.animationBuilder.build([Object(o.m)(this.getExpandedStyle()),Object(o.e)(this.collapseAnimationTiming,Object(o.m)(this.getCollapsedStyle()))]).create(this.elementRef.nativeElement);t.onDone(()=>this.animationDone.emit({toState:"collapsed"})),t.play()}}setStyle(){const t=this.expanded?this.getExpandedStyle():this.getCollapsedStyle();Object.keys(t).forEach(e=>{this.renderer.setStyle(this.elementRef.nativeElement,e,t[e])})}};return t.\u0275fac=function(e){return new(e||t)(c.Xb(c.l),c.Xb(o.b),c.Xb(c.G))},t.\u0275cmp=c.Rb({type:t,selectors:[["mgl-timeline-entry-content"]],inputs:{expandAnimationTiming:"expandAnimationTiming",collapseAnimationTiming:"collapseAnimationTiming"},ngContentSelectors:s,decls:2,vars:0,template:function(t,e){1&t&&(c.xc(),c.dc(0,"div"),c.wc(1),c.cc())},styles:["mgl-timeline-entry-content{position:relative;display:block;overflow:hidden}mgl-timeline-entry-content>div{padding:10px}"],encapsulation:2}),t})(),p=(()=>{let t=class{constructor(t){this.elementRef=t}set alternate(t){this.elementRef.nativeElement.classList.toggle("alternate",t)}set mobile(t){this.elementRef.nativeElement.classList.toggle("mobile",t)}};return t.\u0275fac=function(e){return new(e||t)(c.Xb(c.l))},t.\u0275cmp=c.Rb({type:t,selectors:[["mgl-timeline-entry-side"]],ngContentSelectors:s,decls:1,vars:0,template:function(t,e){1&t&&(c.xc(),c.wc(0))},styles:["mgl-timeline-entry-side{position:absolute;top:0;left:100%;width:100%;text-align:center}mgl-timeline-entry-side.alternate{left:-100%}mgl-timeline-entry-side.mobile{display:none}"],encapsulation:2}),t})(),u=(()=>{let t=class{constructor(t){this.elementRef=t,this.subscriptions=[],this.focusOnOpen=!1,this._mobile=!1,this.changed=new c.o,this.animationDone=new c.o}set expanded(t){this.dot&&t?this.dot.expanded=t:this.content.expanded=t,this.changed.emit(t)}get expanded(){return this.dot?this.dot.expanded&&this.content.expanded:this.content.expanded}set mobile(t){this.elementRef.nativeElement.classList.toggle("mobile",t),this.dot&&(this.dot.mobile=t),this.side&&(this.side.mobile=t)}ngAfterViewInit(){this.dot&&this.subscriptions.push(this.dot.animationDone.subscribe(t=>{"expanded"===t.toState?this.content.expanded=!0:this.animationDone.emit(t)})),this.content&&this.subscriptions.push(this.content.animationDone.subscribe(t=>{this.dot&&"collapsed"===t.toState?this.dot.expanded=!1:(this.focusOnOpen&&this.elementRef.nativeElement.scrollIntoView({behavior:"smooth"}),this.animationDone.emit(t))}))}set alternate(t){this.elementRef.nativeElement.classList.toggle("alternate",t),this.dot&&(this.dot.alternate=t),this.side&&(this.side.alternate=t)}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}collapse(){this.expanded=!1}expand(){this.expanded=!0}toggle(t){const e=this.containsInPath(t,"mgl-timeline-entry-header"),i=this.containsInPath(t,"mgl-timeline-entry-dot");(e||i)&&(this.expanded=!this.expanded)}containsInPath(t,e){let i=t.target;for(;i;){if(i.localName===e)return!0;i=i.parentElement}return!1}};return t.\u0275fac=function(e){return new(e||t)(c.Xb(c.l))},t.\u0275cmp=c.Rb({type:t,selectors:[["mgl-timeline-entry"]],contentQueries:function(t,e,i){var o;1&t&&(c.Pb(i,m,!0),c.Pb(i,l,!0),c.Pb(i,d,!0),c.Pb(i,p,!0)),2&t&&(c.Nc(o=c.mc())&&(e.content=o.first),c.Nc(o=c.mc())&&(e.header=o.first),c.Nc(o=c.mc())&&(e.dot=o.first),c.Nc(o=c.mc())&&(e.side=o.first))},hostVars:2,hostBindings:function(t,e){2&t&&c.Nb("expanded",e.expanded)},outputs:{changed:"expand",animationDone:"animationDone"},ngContentSelectors:a,decls:6,vars:0,consts:[[1,"mgl-timeline-entry-card"],[1,"mgl-timeline-entry-card-header",3,"click"]],template:function(t,e){1&t&&(c.xc(n),c.wc(0),c.dc(1,"div",0),c.dc(2,"div",1),c.lc("click",(function(t){return e.toggle(t)})),c.wc(3,1),c.wc(4,2),c.cc(),c.wc(5,3),c.cc())},styles:["mgl-timeline-entry{display:block;position:relative;margin-bottom:50px;width:calc(50% - 5px)}mgl-timeline-entry.alternate{margin-left:calc(50% + 5px)}mgl-timeline-entry.mobile{width:calc(100% - 30px);margin-left:30px}mgl-timeline-entry .mgl-timeline-entry-card{background-color:#f0f0f0}mgl-timeline-entry .mgl-timeline-entry-card .mgl-timeline-entry-card-header{position:relative;background-color:#e6e6e6}"],encapsulation:2}),t})(),h=(()=>{let t=class{constructor(t,e){this.elementRef=t,this.changeDetectorRef=e,this.toggle=!0,this.mobileWidthThreshold=640,this.alternate=!0,this.side="left",this._focusOnOpen=!1,this.subscriptions=[]}set mobile(t){this.content&&this.content.forEach(e=>e.mobile=t),this.elementRef.nativeElement.classList.toggle("mobile",t)}get mobile(){return this.elementRef.nativeElement.classList.contains("mobile")}set focusOnOpen(t){this.content&&this.content.forEach(e=>e.focusOnOpen=t),this._focusOnOpen=t}get focusOnOpen(){return this._focusOnOpen}ngOnChanges(t){this.updateContent()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}ngAfterViewInit(){this.mobile=this.elementRef.nativeElement.clientWidth<this.mobileWidthThreshold,setTimeout(()=>this.updateContent()),this.content.changes.subscribe(t=>{this.updateContent()})}updateContent(){this.ngOnDestroy(),this.content&&this.content.forEach((t,e)=>{this.toggle&&this.subscriptions.push(t.changed.subscribe(e=>{!0===e&&this.content.filter(e=>e!==t).forEach(t=>t.collapse())})),t.alternate=this.alternate?e%2!=0:"right"===this.side,t.mobile=this.mobile,t.focusOnOpen=this.focusOnOpen})}onResize(t){this.mobile=this.elementRef.nativeElement.clientWidth<this.mobileWidthThreshold}};return t.\u0275fac=function(e){return new(e||t)(c.Xb(c.l),c.Xb(c.h))},t.\u0275cmp=c.Rb({type:t,selectors:[["mgl-timeline"]],contentQueries:function(t,e,i){var o;1&t&&c.Pb(i,u,!1),2&t&&c.Nc(o=c.mc())&&(e.content=o)},hostBindings:function(t,e){1&t&&c.lc("resize",(function(t){return e.onResize(t)}),!1,c.Rc)},inputs:{toggle:"toggle",mobileWidthThreshold:"mobileWidthThreshold",alternate:"alternate",side:"side",focusOnOpen:"focusOnOpen"},features:[c.Eb()],ngContentSelectors:s,decls:2,vars:0,consts:[[1,"mgl-timeline-line"]],template:function(t,e){1&t&&(c.xc(),c.Yb(0,"div",0),c.wc(1))},styles:["mgl-timeline{position:relative;display:block;padding:50px 0}mgl-timeline .mgl-timeline-line{position:absolute;top:0;height:100%;background-color:#a0a0a0;left:50%;width:10px;-webkit-transform:translateX(-50%);transform:translateX(-50%)}mgl-timeline.mobile .mgl-timeline-line{left:20px;-webkit-transform:none;transform:none}"],encapsulation:2}),t})(),g=(()=>{let t=class{};return t.\u0275mod=c.Vb({type:t}),t.\u0275inj=c.Ub({factory:function(e){return new(e||t)}}),t})()},g3s5:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var c=i("btqD"),o=i("fXoL");let r=(()=>{class t{adapt(t){var e,i,o,r;return this.obj=new c.a,this.obj.positionId=null!=(e=t.employee_position_id)?e:null===(i=t)||void 0===i?void 0:i.position_id,this.obj.positionName=null!=(o=t.position_name)?o:null===(r=t)||void 0===r?void 0:r.name,this.obj.categoryName=t.category_name,this.obj.categoryId=t.employee_category_id,this.obj.status=t.status,this.obj}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},k9Bo:function(t,e,i){"use strict";var c=i("tk/3"),o=i("2Vo4"),r=i("lJxs"),s=i("Attm"),n=i("fXoL");let a=(()=>{class t{constructor(t){this.adapter=t}adapt(t){let e=[];return t.data.forEach(t=>{e.push(this.adapter.adapt(t))}),{keyword:t.keyword,message:t.message,classes:e,pageSize:t.count,page:t.page}}}return t.\u0275fac=function(e){return new(e||t)(n.hc(s.a))},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var l=i("qc5V");i.d(e,"a",(function(){return d}));let d=(()=>{class t{constructor(t,e){this.adapter=t,this.apiService=e,this.recordAddedSubject=new o.a([{}]),this.recordUpdatedSubject=new o.a([{}]),this.userId=0}create(t){return this.apiService.post("class/create",t).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}update(t){return this.apiService.post("class/update",t).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}status(t,e){return this.apiService.post(2!=e?"class/status":"class/delete",t)}getListForClass(t){let e=new c.e;for(let i in t)e=e.set(i,t[i]);return this.apiService.get("class",e).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}getList(){let t=new c.e;return this.apiService.get("class",t).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}getRecordAddedSub(){return this.recordAddedSubject.asObservable()}getRecordUpdatedSub(){return this.recordUpdatedSubject.asObservable()}getClassByBatch(t){return this.apiService.get(`loadClassByBatch/${t}`).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}getClasses(t){return this.apiService.get(`getAttendClass/${t}`).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}}return t.\u0275fac=function(e){return new(e||t)(n.hc(a),n.hc(l.a))},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},kjEt:function(t,e,i){"use strict";i.r(e);var c=i("tyNb"),o=i("ofXK"),r=i("3Pt+"),s=i("bTqV"),n=i("Wp6s"),a=i("bSwM"),l=i("FKr1"),d=i("iadO"),m=i("NFeN"),p=i("qFsG"),u=i("MutI"),h=i("bv9b"),g=i("QibW"),v=i("xHqg"),f=i("YUcS"),b=i("STbY"),y=i("CzEO"),F=i("lDzL"),x=i("7pIB"),w=i("M9IT"),S=i("Dh3D"),k=i("+0xr"),I=i("rIor"),C=i("d3UM"),G=i("/1cH"),_=i("cZdB"),O=i("R0Ic"),D=i("JX91"),V=i("lJxs"),N=i("Qi2G"),P=i("Gg3P"),A=i("Olgc"),T=i("k9Bo"),E=i("73gp"),j=i("UTcx"),M=i("t/Tn"),q=i("fXoL"),R=i("0IaG"),B=i("f0Cb"),z=i("XiUz"),X=i("kmnG");function L(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",18),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit;return q.pc().getClass(c.batchId)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.batchId),q.Gb(1),q.ed(" ",t.batchName," ")}}function Y(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the batch name "),q.cc())}function $(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",18),q.lc("click",(function(e){return q.Sc(t),q.pc().getStudent()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.classId),q.Gb(1),q.ed(" ",t.className," ")}}function W(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the class name "),q.cc())}function H(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",18),q.lc("click",(function(e){return q.Sc(t),q.pc().getStudent()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.sectionId),q.Gb(1),q.ed(" ",t.sectionName," ")}}function U(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the section name "),q.cc())}function J(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",18),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit;return q.pc().particularStudent(c)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.studentId),q.Gb(1),q.ed(" ",t.studentName," ")}}function K(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the student name "),q.cc())}let Q=(()=>{class t{constructor(t,e,i,c,o,s,n,a,l,d,m){this.dialog=t,this.dialogRef=e,this.classService=i,this.sectionService=c,this.router=o,this.formBuilder=s,this.loader=n,this.toaster=a,this.studentService=l,this.batchService=d,this.modelService=m,this.formData={},this.studnames=[{value:"Hari Hara Pandiyan",viewValue:"Hari Hara Pandiyan"},{value:"Meera Krishnan",viewValue:"Meera Krishnan"},{value:"Malini",viewValue:"Malini"}],this.myControl=new r.g,this.options=["Ram","Malini","Meera","Shalini"]}ngOnInit(){this.filteredOptions=this.myControl.valueChanges.pipe(Object(D.a)(""),Object(V.a)(t=>this._filter(t))),this.studentsearchForm=new r.j({class:new r.g("",[r.B.required]),section:new r.g("",[r.B.required]),studname:new r.g("",[r.B.required]),batch:new r.g("",[r.B.required])}),this.getAcademic(),this.getSection()}_filter(t){const e=t.toLowerCase();return this.options.filter(t=>t.toLowerCase().includes(e))}getAcademic(){this.modelService.currentAcademic().subscribe(t=>{"success"==t.keyword&&(this.academicId=t.data[0].academic_year_id,this.getBatch(this.academicId))})}getBatch(t){this.batchService.getListByAcademic(t).subscribe(t=>{"success"==t.keyword&&(this.batches=t.batches)})}getClass(t){this.classService.getClassByBatch(t).subscribe(t=>{"success"==t.keyword&&(this.classes=t.classes)})}getSection(){this.sectionService.getList({}).subscribe(t=>{"success"==t.keyword&&(this.sections=t.sections.filter(t=>"1"==t.status))})}getStudent(){var t=this.studentsearchForm.value;""!=t.class&&""!=t.section&&""!=this.academicId&&""!=t.batch&&this.studentService.getStudentName(this.academicId,t.batch,t.class,t.section).subscribe(t=>{this.students=t.studentRegistrations,console.log(this.students)})}particularStudent(t){this.studentName=t}submite(){this.dialogRef.close(!0),this.studentService.recordAddedStudentSubject.next(this.studentName)}discard(){this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(R.b),q.Xb(R.f),q.Xb(T.a),q.Xb(E.a),q.Xb(c.g),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(N.a),q.Xb(M.a),q.Xb(j.a))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-create"]],decls:64,vars:10,consts:[[1,"p-0"],[1,""],[1,"card-title-text"],[1,"mb-0","pb-4"],[3,"formGroup"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","30",1,"mt-12"],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","70",1,"mt-12"],["appearance","fill"],["formControlName","batch"],[3,"value","click",4,"ngFor","ngForOf"],[4,"ngIf"],["formControlName","class"],["formControlName","section"],["formControlName","studname"],["mat-raised-button","","color","primary",1,"btn-primary-bg","mr-12",3,"disabled","click"],[1,"pl-8","primary-txt-color",3,"click"],[3,"value","click"]],template:function(t,e){1&t&&(q.dc(0,"mat-card",0),q.dc(1,"mat-card-title",1),q.dc(2,"div",2),q.cd(3,"Searching Student"),q.cc(),q.Yb(4,"mat-divider"),q.cc(),q.dc(5,"mat-card-content",3),q.dc(6,"form",4),q.dc(7,"div",5),q.dc(8,"div",6),q.dc(9,"label"),q.dc(10,"strong"),q.cd(11," Batch"),q.cc(),q.dc(12,"span",7),q.cd(13,"*"),q.cc(),q.cc(),q.cc(),q.dc(14,"div",8),q.dc(15,"mat-form-field",9),q.Yb(16,"mat-label"),q.dc(17,"mat-select",10),q.ad(18,L,2,2,"mat-option",11),q.cc(),q.ad(19,Y,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(20,"div",5),q.dc(21,"div",6),q.dc(22,"label"),q.dc(23,"strong"),q.cd(24," Class"),q.cc(),q.dc(25,"span",7),q.cd(26,"*"),q.cc(),q.cc(),q.cc(),q.dc(27,"div",8),q.dc(28,"mat-form-field",9),q.Yb(29,"mat-label"),q.dc(30,"mat-select",13),q.ad(31,$,2,2,"mat-option",11),q.cc(),q.ad(32,W,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(33,"div",5),q.dc(34,"div",6),q.dc(35,"label"),q.dc(36,"strong"),q.cd(37," Section"),q.cc(),q.dc(38,"span",7),q.cd(39,"*"),q.cc(),q.cc(),q.cc(),q.dc(40,"div",8),q.dc(41,"mat-form-field",9),q.Yb(42,"mat-label"),q.dc(43,"mat-select",14),q.ad(44,H,2,2,"mat-option",11),q.cc(),q.ad(45,U,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(46,"div",5),q.dc(47,"div",6),q.dc(48,"label"),q.dc(49,"strong"),q.cd(50," Student Name"),q.cc(),q.dc(51,"span",7),q.cd(52,"*"),q.cc(),q.cc(),q.cc(),q.dc(53,"div",8),q.dc(54,"mat-form-field",9),q.Yb(55,"mat-label"),q.dc(56,"mat-select",15),q.ad(57,J,2,2,"mat-option",11),q.cc(),q.ad(58,K,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(59,"mat-card-footer"),q.dc(60,"button",16),q.lc("click",(function(t){return e.submite()})),q.cd(61,"Submit"),q.cc(),q.dc(62,"a",17),q.lc("click",(function(t){return e.discard()})),q.cd(63,"Discard"),q.cc(),q.cc(),q.cc()),2&t&&(q.Gb(6),q.yc("formGroup",e.studentsearchForm),q.Gb(12),q.yc("ngForOf",e.batches),q.Gb(1),q.yc("ngIf",(null==e.studentsearchForm.controls.batch.errors?null:e.studentsearchForm.controls.batch.errors.required)&&e.studentsearchForm.controls.batch.touched),q.Gb(12),q.yc("ngForOf",e.classes),q.Gb(1),q.yc("ngIf",(null==e.studentsearchForm.controls.class.errors?null:e.studentsearchForm.controls.class.errors.required)&&e.studentsearchForm.controls.class.touched),q.Gb(12),q.yc("ngForOf",e.sections),q.Gb(1),q.yc("ngIf",(null==e.studentsearchForm.controls.section.errors?null:e.studentsearchForm.controls.section.errors.required)&&e.studentsearchForm.controls.section.touched),q.Gb(12),q.yc("ngForOf",e.students),q.Gb(1),q.yc("ngIf",(null==e.studentsearchForm.controls.studname.errors?null:e.studentsearchForm.controls.studname.errors.required)&&e.studentsearchForm.controls.studname.touched),q.Gb(2),q.yc("disabled",e.studentsearchForm.invalid))},directives:[n.a,n.f,B.a,n.c,r.D,r.u,r.k,z.c,z.a,X.b,X.e,C.a,r.t,r.i,o.n,o.o,n.d,s.a,l.p,X.a],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f16[_ngcontent-%COMP%]{font-size:16px}"]}),t})();var Z=i("dJ6x"),tt=i("wr8E"),et=i("TGtP");function it(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",17),q.lc("click",(function(e){return q.Sc(t),q.pc().getEmployees()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.departmentId),q.Gb(1),q.ed(" ",t.name," ")}}function ct(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the department name "),q.cc())}function ot(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",17),q.lc("click",(function(e){return q.Sc(t),q.pc().getEmployees()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.positionId),q.Gb(1),q.ed(" ",t.positionName," ")}}function rt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the position name "),q.cc())}function st(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",17),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit;return q.pc().particularEmp(c)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.employeeId),q.Gb(1),q.ed(" ",t.employeeName," ")}}function nt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the employee name "),q.cc())}let at=(()=>{class t{constructor(t,e,i,c,o,s,n,a,l,d){this.dialog=t,this.dialogRef=e,this.departmentservice=i,this.positionservice=c,this.router=o,this.formBuilder=s,this.loader=n,this.toaster=a,this.modelService=l,this.employeeService=d,this.formData={},this.empnames=[{value:"Hari Hara Pandiyan",viewValue:"Hari Hara Pandiyan"},{value:"Meera Krishnan",viewValue:"Meera Krishnan"},{value:"Malini",viewValue:"Malini"}],this.myControl=new r.g,this.options=["Ram","Malini","Meera","Shalini"]}ngOnInit(){this.filteredOptions=this.myControl.valueChanges.pipe(Object(D.a)(""),Object(V.a)(t=>this._filter(t))),this.empsearchForm=new r.j({department:new r.g("",[r.B.required]),position:new r.g("",[r.B.required]),empname:new r.g("",[r.B.required])}),this.getDepartment(),this.getPossition()}_filter(t){const e=t.toLowerCase();return this.options.filter(t=>t.toLowerCase().includes(e))}getDepartment(){this.departmentservice.getList({}).subscribe(t=>{this.departments=t.departments,this.departments=this.departments.filter(t=>"1"==t.status)})}getPossition(){this.positionservice.getList({}).subscribe(t=>{this.positions=t.positions,this.positions=this.positions.filter(t=>"1"==t.status)})}getEmployees(){var t=this.empsearchForm.value;""!=t.department&&""!=t.position&&this.modelService.getempName(t.department,t.position).subscribe(t=>{this.empIds=t.employees})}particularEmp(t){this.employees=t}submite(){this.dialogRef.close(!0),this.modelService.recordAddedSubject.next(this.employees)}discard(){this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(R.b),q.Xb(R.f),q.Xb(Z.a),q.Xb(tt.a),q.Xb(c.g),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(j.a),q.Xb(et.a))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-create"]],decls:51,vars:8,consts:[[1,"p-0"],[1,""],[1,"card-title-text"],[1,"mb-0","pb-4"],[3,"formGroup"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","30",1,"mt-12"],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","70",1,"mt-12"],["appearance","fill"],["formControlName","department"],[3,"value","click",4,"ngFor","ngForOf"],[4,"ngIf"],["formControlName","position"],["formControlName","empname"],["mat-raised-button","","color","primary",1,"btn-primary-bg","mr-12",3,"disabled","click"],[1,"pl-8","primary-txt-color",3,"click"],[3,"value","click"]],template:function(t,e){1&t&&(q.dc(0,"mat-card",0),q.dc(1,"mat-card-title",1),q.dc(2,"div",2),q.cd(3,"Searching Employee"),q.cc(),q.Yb(4,"mat-divider"),q.cc(),q.dc(5,"mat-card-content",3),q.dc(6,"form",4),q.dc(7,"div",5),q.dc(8,"div",6),q.dc(9,"label"),q.dc(10,"strong"),q.cd(11," Department"),q.cc(),q.dc(12,"span",7),q.cd(13,"*"),q.cc(),q.cc(),q.cc(),q.dc(14,"div",8),q.dc(15,"mat-form-field",9),q.Yb(16,"mat-label"),q.dc(17,"mat-select",10),q.ad(18,it,2,2,"mat-option",11),q.cc(),q.ad(19,ct,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(20,"div",5),q.dc(21,"div",6),q.dc(22,"label"),q.dc(23,"strong"),q.cd(24," Position"),q.cc(),q.dc(25,"span",7),q.cd(26,"*"),q.cc(),q.cc(),q.cc(),q.dc(27,"div",8),q.dc(28,"mat-form-field",9),q.Yb(29,"mat-label"),q.dc(30,"mat-select",13),q.ad(31,ot,2,2,"mat-option",11),q.cc(),q.ad(32,rt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(33,"div",5),q.dc(34,"div",6),q.dc(35,"label"),q.dc(36,"strong"),q.cd(37," Employee Name"),q.cc(),q.dc(38,"span",7),q.cd(39,"*"),q.cc(),q.cc(),q.cc(),q.dc(40,"div",8),q.dc(41,"mat-form-field",9),q.Yb(42,"mat-label"),q.dc(43,"mat-select",14),q.ad(44,st,2,2,"mat-option",11),q.cc(),q.ad(45,nt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(46,"mat-card-footer"),q.dc(47,"button",15),q.lc("click",(function(t){return e.submite()})),q.cd(48,"Submit"),q.cc(),q.dc(49,"a",16),q.lc("click",(function(t){return e.discard()})),q.cd(50,"Discard"),q.cc(),q.cc(),q.cc()),2&t&&(q.Gb(6),q.yc("formGroup",e.empsearchForm),q.Gb(12),q.yc("ngForOf",e.departments),q.Gb(1),q.yc("ngIf",(null==e.empsearchForm.controls.department.errors?null:e.empsearchForm.controls.department.errors.required)&&e.empsearchForm.controls.department.touched),q.Gb(12),q.yc("ngForOf",e.positions),q.Gb(1),q.yc("ngIf",(null==e.empsearchForm.controls.position.errors?null:e.empsearchForm.controls.position.errors.required)&&e.empsearchForm.controls.position.touched),q.Gb(12),q.yc("ngForOf",e.empIds),q.Gb(1),q.yc("ngIf",(null==e.empsearchForm.controls.empname.errors?null:e.empsearchForm.controls.empname.errors.required)&&e.empsearchForm.controls.empname.touched),q.Gb(2),q.yc("disabled",e.empsearchForm.invalid))},directives:[n.a,n.f,B.a,n.c,r.D,r.u,r.k,z.c,z.a,X.b,X.e,C.a,r.t,r.i,o.n,o.o,n.d,s.a,l.p,X.a],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f16[_ngcontent-%COMP%]{font-size:16px}"]}),t})();var lt=i("xe9D"),dt=i("ZuSq"),mt=i("LUqs"),pt=i("PSD3"),ut=i.n(pt),ht=i("Gh3/"),gt=i("live"),vt=i("34SS"),ft=i("LvDl"),bt=i("jtrZ"),yt=i("r3oX"),Ft=i("znSr");function xt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the visitor name "),q.cc())}function wt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid visitor name "),q.cc())}function St(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the mobile no "),q.cc())}function kt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid mobile no "),q.cc())}function It(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please select any one gender "),q.cc())}function Ct(t,e){if(1&t){const t=q.ec();q.dc(0,"button",77),q.lc("click",(function(e){return q.Sc(t),q.pc(),q.Oc(56).click()})),q.dc(1,"mat-icon",78),q.cd(2,"attach_file"),q.cc(),q.cd(3," Add File "),q.cc()}}function Gt(t,e){if(1&t){const t=q.ec();q.dc(0,"a",79),q.lc("click",(function(e){return q.Sc(t),q.pc().clearAttach()})),q.dc(1,"mat-icon",80),q.cd(2,"close"),q.cc(),q.cc()}}function _t(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2,"Please provide the identity attachment"),q.cc(),q.cc())}function Ot(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2," JPG, JPEG, PNG, BMP, PDF are allowed "),q.cc(),q.cc())}function Dt(t,e){1&t&&(q.dc(0,"p",81),q.cd(1," File size should be 2MB maximumn "),q.cc())}function Vt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the purpose of visit "),q.cc())}function Nt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid purpose of visit "),q.cc())}function Pt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the from date "),q.cc())}function At(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the to date "),q.cc())}function Tt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," please provide the start time "),q.cc())}function Et(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," please provide the end time "),q.cc())}function jt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please select any one "),q.cc())}function Mt(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",89),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit;return q.pc(2).studentkeyup(c)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.Dc("value","",t.studentName," - ",t.admissionNo," - ",t.className," ",t.sectionName?"-":""," ",t.sectionName," ",t.rollNumber?"-":""," ",t.rollNumber,""),q.Gb(1),q.kd(" ",t.studentName," - ",t.admissionNo," - ",t.className," ",t.sectionName?"-":""," ",t.sectionName," ",t.rollNumber?"-":""," ",t.rollNumber," ")}}function qt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the roll no "),q.cc())}function Rt(t,e){if(1&t&&(q.dc(0,"div",13),q.dc(1,"div",90),q.dc(2,"label"),q.dc(3,"strong"),q.cd(4,"Student Name"),q.cc(),q.cc(),q.cc(),q.dc(5,"div",91),q.dc(6,"h2",92),q.cd(7),q.cc(),q.dc(8,"h5",92),q.cd(9),q.cc(),q.dc(10,"h5",92),q.cd(11),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc(2);q.Gb(7),q.dd(t.studentdetails.student_name?t.studentdetails.student_name:t.studentdetails.studentName),q.Gb(2),q.dd(t.studentdetails.rollNumber),q.Gb(2),q.gd("",t.studentdetails.class_name?t.studentdetails.class_name:t.studentdetails.className," ",""!=t.studentdetails.class_name?"-":""!=t.studentdetails.className?"-":""," ",t.studentdetails.section_name?t.studentdetails.section_name:t.studentdetails.sectionName,"")}}function Bt(t,e){if(1&t){const t=q.ec();q.dc(0,"div",82),q.dc(1,"div",38),q.dc(2,"div",19),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Roll No"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",27),q.dc(9,"mat-form-field",10),q.dc(10,"input",83),q.lc("keyup",(function(e){return q.Sc(t),q.pc().studentclear(e)})),q.cc(),q.dc(11,"mat-autocomplete",null,84),q.ad(13,Mt,2,14,"mat-option",85),q.qc(14,"filter"),q.cc(),q.ad(15,qt,2,0,"mat-error",12),q.cc(),q.dc(16,"div",68),q.dc(17,"a",86),q.lc("click",(function(e){return q.Sc(t),q.pc().openDialog()})),q.dc(18,"u"),q.cd(19,"Advanced Search"),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(20,"h3",87),q.dc(21,"strong"),q.dc(22,"u"),q.cd(23,"Student Details"),q.cc(),q.cc(),q.cc(),q.ad(24,Rt,12,5,"div",88),q.cc()}if(2&t){const t=q.Oc(12),e=q.pc();q.Gb(10),q.yc("matAutocomplete",t),q.Gb(3),q.yc("ngForOf",q.sc(14,4,e.students,e.visitorForm.controls.rollno.value)),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.rollno.errors?null:e.visitorForm.controls.rollno.errors.required)&&e.visitorForm.controls.rollno.touched),q.Gb(9),q.yc("ngIf",""!=e.studentdetails.student_name||""!=e.studentdetails.studentName)}}function zt(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",89),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit,o=q.pc(2);return o.Employeekeyup(c,o.i)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.Bc("value","",t.employeeCode," - ",t.employeeName,""),q.Gb(1),q.fd(" ",t.employeeCode," - ",t.employeeName," ")}}function Xt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the employee code "),q.cc())}function Lt(t,e){if(1&t&&(q.dc(0,"div",13),q.dc(1,"div",90),q.dc(2,"label"),q.dc(3,"strong"),q.cd(4,"Employee Name"),q.cc(),q.cc(),q.cc(),q.dc(5,"div",91),q.dc(6,"h2",92),q.cd(7),q.cc(),q.dc(8,"h5",92),q.cd(9),q.cc(),q.dc(10,"h5",92),q.cd(11),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc(2);q.Gb(7),q.fd("",t.employeedetails.employee_name,"",t.employeedetails.employeeName,""),q.Gb(2),q.dd(t.employeedetails.employeeCode),q.Gb(2),q.gd("",t.employeedetails.department_name?t.employeedetails.department_name:t.employeedetails.departmentName," ",""!=t.employeedetails.department_name?"-":""," ",t.employeedetails.position_name?t.employeedetails.position_name:t.employeedetails.positionName,"")}}function Yt(t,e){if(1&t){const t=q.ec();q.dc(0,"div",93),q.dc(1,"div",38),q.dc(2,"div",19),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Employee ID"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",27),q.dc(9,"mat-form-field",10),q.dc(10,"input",94),q.lc("keyup",(function(e){q.Sc(t);const i=q.pc();return i.Employeekeyup(e.target.value,i.i)})),q.cc(),q.dc(11,"mat-autocomplete",null,84),q.ad(13,zt,2,4,"mat-option",85),q.qc(14,"filter"),q.cc(),q.ad(15,Xt,2,0,"mat-error",12),q.cc(),q.dc(16,"div",68),q.dc(17,"a",86),q.lc("click",(function(e){return q.Sc(t),q.pc().openClick()})),q.dc(18,"u"),q.cd(19,"Advanced Search"),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(20,"h3",87),q.dc(21,"strong"),q.dc(22,"u"),q.cd(23,"Employee Details"),q.cc(),q.cc(),q.cc(),q.ad(24,Lt,12,6,"div",88),q.cc()}if(2&t){const t=q.Oc(12),e=q.pc();q.Gb(10),q.yc("matAutocomplete",t),q.Gb(3),q.yc("ngForOf",q.sc(14,4,e.empIds,e.visitorForm.controls.empcode.value)),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.empcode.errors?null:e.visitorForm.controls.empcode.errors.required)&&e.visitorForm.controls.empcode.touched),q.Gb(9),q.yc("ngIf",null!=e.employeedetails.employee_name||null!=e.employeedetails.employeeName)}}function $t(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",89),q.lc("click",(function(e){return q.Sc(t),q.pc(2).getEmployeebaseId()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.departmentId),q.Gb(1),q.ed(" ",t.name," ")}}function Wt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the department name "),q.cc())}function Ht(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",89),q.lc("click",(function(e){return q.Sc(t),q.pc(2).getEmployeebaseId()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.positionId),q.Gb(1),q.ed(" ",t.positionName," ")}}function Ut(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the position name "),q.cc())}function Jt(t,e){if(1&t&&(q.dc(0,"mat-option",106),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.yc("value",t.employeeId),q.Gb(1),q.ed(" ",t.employeeName," ")}}function Kt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the employee name "),q.cc())}function Qt(t,e){if(1&t&&(q.dc(0,"div",95),q.dc(1,"div",96),q.dc(2,"div",97),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5," Department"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",98),q.dc(9,"mat-form-field",41),q.Yb(10,"mat-label"),q.dc(11,"mat-select",99),q.ad(12,$t,2,2,"mat-option",85),q.cc(),q.ad(13,Wt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(14,"div",100),q.dc(15,"div",101),q.dc(16,"label"),q.dc(17,"strong"),q.cd(18," Position"),q.cc(),q.dc(19,"span",15),q.cd(20,"*"),q.cc(),q.cc(),q.cc(),q.dc(21,"div",98),q.dc(22,"mat-form-field",41),q.Yb(23,"mat-label"),q.dc(24,"mat-select",102),q.ad(25,Ht,2,2,"mat-option",85),q.cc(),q.ad(26,Ut,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(27,"div",100),q.dc(28,"div",101),q.dc(29,"label"),q.dc(30,"strong"),q.cd(31," Employee Name"),q.cc(),q.dc(32,"span",15),q.cd(33,"*"),q.cc(),q.cc(),q.cc(),q.dc(34,"div",98),q.dc(35,"mat-form-field",103),q.dc(36,"mat-select",104),q.ad(37,Jt,2,2,"mat-option",105),q.cc(),q.ad(38,Kt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(12),q.yc("ngForOf",t.departments),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.department.errors?null:t.visitorForm.controls.department.errors.required)&&t.visitorForm.controls.department.touched),q.Gb(12),q.yc("ngForOf",t.positions),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.position.errors?null:t.visitorForm.controls.position.errors.required)&&t.visitorForm.controls.position.touched),q.Gb(11),q.yc("ngForOf",t.employees),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.employee.errors?null:t.visitorForm.controls.employee.errors.required)&&t.visitorForm.controls.employee.touched)}}function Zt(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the description "),q.cc())}function te(t,e){if(1&t&&(q.dc(0,"div",107),q.dc(1,"div",38),q.dc(2,"div",19),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Description"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",27),q.dc(9,"mat-form-field",10),q.Yb(10,"textarea",108),q.ad(11,Zt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(11),q.yc("ngIf",(null==t.visitorForm.controls.description.errors?null:t.visitorForm.controls.description.errors.required)&&t.visitorForm.controls.description.touched)}}const ee=function(){return{position:"relative",bottom:"117px",left:"101px"}};function ie(t,e){if(1&t){const t=q.ec();q.dc(0,"a",109),q.lc("click",(function(e){return q.Sc(t),q.pc().clearLogo()})),q.dc(1,"mat-icon",110),q.cd(2,"clear"),q.cc(),q.cc()}2&t&&(q.Gb(1),q.yc("ngStyle",q.Ec(1,ee)))}function ce(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2," Allowed file formats are jpg , jpeg , png"),q.cc(),q.cc())}function oe(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2,"File size should not be higher than 10 mb"),q.cc(),q.cc())}function re(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the mac address "),q.cc())}let se=(()=>{class t{constructor(t,e,i,c,o,s,n,a,l,d,m,p){this.dialog=t,this.employeeService=e,this.departmentservice=i,this.positionservice=c,this.router=o,this.config=s,this.formBuilder=n,this.loader=a,this.toaster=l,this.StudentService=d,this.modelService=m,this.severdatePipe=p,this.years=[{value:"2018-2020",viewValue:"2018-2020"}],this.imageChangedEvent="",this.croppedImg="assets/images/camera.png",this.myControl=new r.g,this.options=["Ram","Malini","Meera","Shalini"],this.vist=new dt.a,this.studentdetails=[],this.employeedetails=[],this.vistersdetails=[],this.urls=[],this.images=[],this.uploads=[],this.timeFormat=Number(this.config.timeFormat)}ngOnDestroy(){this.recordAddedSub.unsubscribe(),this.recordstudentSub.unsubscribe()}ngOnInit(){this.filteredOptions=this.myControl.valueChanges.pipe(Object(D.a)(""),Object(V.a)(t=>this._filter(t))),this.visitorForm=new r.j({visitorsname:new r.g("",[r.B.required]),photo:new r.g("",[r.B.pattern(Object(lt.b)().app.validators.image)]),mobileno:new r.g("",[r.B.required,r.B.pattern(Object(lt.b)().app.validators.tenDigitInteger)]),purposeofvisit:new r.g("",[r.B.required]),WhomGoing:new r.g("",[r.B.required]),rollno:new r.g(""),fromDate:new r.g("",[r.B.required]),endTime:new r.g("",[r.B.required]),toDate:new r.g("",[r.B.required]),startTime:new r.g("",[r.B.required]),macaddress:new r.g("",[r.B.required]),gender:new r.g("",[r.B.required]),devicename:new r.g(""),empcode:new r.g(""),department:new r.g(""),position:new r.g(""),employee:new r.g(""),description:new r.g(""),IdentyName:new r.g(""),indentyAttach:new r.g("",[r.B.required,r.B.pattern(Object(lt.b)().app.validators.imageAndPdf)])}),this.whomValidate(),this.getPossition(),this.getDepartment(),this.getStudents(),this.getEmployees()}ngAfterViewInit(){this.addSub(),this.addStudentSub()}whomValidate(){this.visitorForm.get("WhomGoing").valueChanges.subscribe(t=>{1==t?(this.employeedetails=[],this.getemployeeCode="",this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValue(""),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValidators([r.B.required]),this.visitorForm.get("rollno").markAsDirty(),this.visitorForm.get("rollno").markAsUntouched(),this.visitorForm.get("rollno")):2==t?(this.studentdetails=[],this.studentRollno="",this.studentId="",this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("description"),this.visitorForm.get("position"),this.visitorForm.get("department"),this.visitorForm.get("employee"),this.visitorForm.get("description"),this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValidators([r.B.required]),this.visitorForm.get("empcode").markAsDirty(),this.visitorForm.get("empcode").markAsUntouched(),this.visitorForm.get("empcode"),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue("")):3==t?(this.studentdetails=[],this.employeedetails=[],this.getemployeeCode="",this.studentRollno="",this.studentId="",this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValue(""),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("rollno"),this.visitorForm.get("description"),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("employee").setValidators([r.B.required]),this.visitorForm.get("department").setValidators([r.B.required]),this.visitorForm.get("position").setValidators([r.B.required]),this.visitorForm.get("employee").markAsUntouched(),this.visitorForm.get("department").markAsUntouched(),this.visitorForm.get("position").markAsUntouched(),this.visitorForm.get("employee").markAsDirty(),this.visitorForm.get("department").markAsDirty(),this.visitorForm.get("position").markAsDirty(),this.visitorForm.get("employee"),this.visitorForm.get("department"),this.visitorForm.get("position")):4==t&&(this.studentdetails=[],this.employeedetails=[],this.studentRollno="",this.getemployeeCode="",this.studentId="",this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValue(""),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("description").setValidators([r.B.required]),this.visitorForm.get("description").markAsUntouched(),this.visitorForm.get("description").markAsDirty(),this.visitorForm.get("description"),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators())})}_filter(t){const e=t.toLowerCase();return this.options.filter(t=>t.toLowerCase().includes(e))}getUrl(){return"url('assets/images/camera.png')"}addSub(){this.recordAddedSub=this.modelService.getRecordAddedSub().subscribe(t=>{this.employeedetails=t,this.getemployeeCode=this.employeedetails.employeeId,console.log(t),this.employeedetails.employeeCode&&this.visitorForm.get("empcode").setValue(this.employeedetails.employeeCode+" - "+this.employeedetails.employeeName)})}addStudentSub(){this.recordstudentSub=this.StudentService.getRecordAddedSub().subscribe(t=>{this.studentdetails=t,this.studentId=t.studentId;var e=t.studentName+" - "+t.className+" "+(t.sectionName?"-":"")+" "+t.sectionName+" "+(t.rollNumber?"-":"")+" "+t.rollNumber;this.studentdetails?this.visitorForm.get("rollno").setValue(e):this.studentdetails&&this.visitorForm.get("rollno").setValue(e)})}studentkeyup(t,e){this.studentId=t.studentId,console.log(this.studentId),this.studentdetails=t}studentclear(t){""==t.target.value&&(this.studentdetails=[],this.studentId="")}Employeekeyup(t,e){""!==t?(this.employeedetails=t,this.getemployeeCode=t.employeeId):(this.employeedetails=[],this.getemployeeCode="")}getDepartment(){this.departmentservice.getList({}).subscribe(t=>{this.departments=t.departments,this.departments=this.departments.filter(t=>"1"==t.status)})}getPossition(){this.positionservice.getList({}).subscribe(t=>{this.positions=t.positions,this.positions=this.positions.filter(t=>"1"==t.status)})}getStudents(){this.StudentService.getList(void 0).subscribe(t=>{this.students=t.studentRegistrations,this.students=this.students.filter(t=>""!==t.rollNumber),this.students=this.students.filter(t=>"1"==t.status)})}getEmployees(){this.employeeService.getList(void 0).subscribe(t=>{this.empIds=t.employees,this.empIds=this.empIds.filter(t=>"1"==t.status)})}getEmployeebaseId(){var t=this.visitorForm.value;""!=t.department&&""!=t.position&&this.modelService.getempName(t.department,t.position).subscribe(t=>{this.employees=t.employees})}fileChangeEvent(t){var e;t.target.files[0]&&(this.imageChangedEvent=t,t.target.files[0].size>1e7?this.isFileSizeTooHigh=!0:t.target.files[0].size>96e4?(this.isFileSizeTooHigh=!1,this.isFileResolutionHigh=!0):(this.isFileResolutionHigh=!1,(null===(e=this.visitorForm.controls.photo.errors)||void 0===e?void 0:e.pattern)||this.openCropBox(t.target.files[0])))}openCropBox(t){this.dialog.open(mt.a,{width:"40%",data:{payload:t}}).afterClosed().subscribe(t=>{var e,i,c;t&&(this.croppedImg=null===(e=t)||void 0===e?void 0:e.dataUrl,console.log(this.croppedImg,"this.croppedImg "),this.vist.imageDataUrl=null===(i=t)||void 0===i?void 0:i.dataUrl,this.vist.image=null===(c=t)||void 0===c?void 0:c.blobData)})}onChangeFile(t){t.target.files&&t.target.files[0]?t.target.files[0].size>2e6?(this.isAttachFileSizeTooHigh=!0,this.indentyattachment=null):(this.isAttachFileSizeTooHigh=!1,this.indentyattachment=t.target.files[0],this.visitorForm.get("IdentyName").setValue(this.indentyattachment.name)):(this.indentyattachment=null,this.visitorForm.get("IdentyName").setValue(""))}clearAttach(){this.isAttachFileSizeTooHigh=!1,this.indentyattachment="",this.visitorForm.get("IdentyName").setValue(""),this.visitorForm.get("indentyAttach").setValue(""),this.visitorForm.get("indentyAttach").markAsTouched(),this.visitorForm.get("indentyAttach")}openDialog(){console.log("1234556"),this.dialog.open(Q,{width:"33%",disableClose:!0}).afterClosed().subscribe(t=>{console.log("The dialog was closed")})}openClick(){console.log("123000"),this.dialog.open(at,{width:"33%",disableClose:!0}).afterClosed().subscribe(t=>{console.log("The dialog was closed")})}clearLogo(){this.croppedImg="assets/images/camera.png",this.vist.imageDataUrl="",this.vist.image=""}create(){var t,e,i,c,o,r,s,n,a,l,d,m,p,u;if(this.findInvalidControls(),this.visitorForm.valid){var h=this.visitorForm.value;const g=this.severdatePipe.transform(null===(t=h)||void 0===t?void 0:t.fromDate),v=this.severdatePipe.transform(null===(e=h)||void 0===e?void 0:e.toDate);if(this.visitorForm.valid){let t=new FormData;t.append("visitor_name",h.visitorsname),this.vist.image&&t.append("photo",this.vist.image),t.append("to_date",v||""),t.append("mobile_no",null===(i=h)||void 0===i?void 0:i.mobileno),t.append("purpose_of_visit",null===(c=h)||void 0===c?void 0:c.purposeofvisit),t.append("whom_visit",null===(o=h)||void 0===o?void 0:o.WhomGoing),t.append("from_time",null===(r=h)||void 0===r?void 0:r.startTime),t.append("roll_no",this.studentId),t.append("from_date",g||""),t.append("to_time",null===(s=h)||void 0===s?void 0:s.endTime),t.append("employee_code",this.getemployeeCode),t.append("department",null===(n=h)||void 0===n?void 0:n.department),t.append("position",null===(a=h)||void 0===a?void 0:a.position),t.append("emp_name",null===(l=h)||void 0===l?void 0:l.employee),t.append("device_name",null===(d=h)||void 0===d?void 0:d.devicename),t.append("description",null===(m=h)||void 0===m?void 0:m.description),t.append("mac_address",null===(p=h)||void 0===p?void 0:p.macaddress),t.append("gender",null===(u=h)||void 0===u?void 0:u.gender),t.append("attachment",this.indentyattachment),t.append("type","1"),this.loader.open(),this.modelService.save(t,"create").subscribe(t=>{"success"==t.keyword?(this.vistersdetails=t.visitors[0],this.deviceCreate(),this.toaster.present(t.message,"")):"failed"==t.keyword&&(this.loader.close(),this.toaster.present(t.message,""))})}}else ut.a.fire({title:"Check Required",text:"Fill Mandatory Fields ",icon:"warning"})}deviceCreate(){var t,e,i,c,o,r,s,n,a,l;const d=Object(vt.b)();var m=Object(ft.get)(d,"customer_id"),p=Object(ft.get)(d,"branch_id"),u=this.visitorForm.value;const h=this.severdatePipe.transform(null===(t=u)||void 0===t?void 0:t.fromDate),g=this.severdatePipe.transform(null===(e=u)||void 0===e?void 0:e.toDate);let v=new FormData;v.append("customerId",null!=m?m:""),v.append("schoolId",null!=p?p:""),v.append("mac",String(null===(i=u)||void 0===i?void 0:i.macaddress)),v.append("gender",null!=(c=String(u.gender))?c:""),v.append("visitorMobile",null!=(r=String(null===(o=u)||void 0===o?void 0:o.mobileno))?r:""),v.append("visitorName",null!=(n=String(null===(s=u)||void 0===s?void 0:s.visitorsname))?n:""),v.append("fromDate",null!=(a=String(h))?a:""),v.append("toDate",null!=(l=String(g))?l:""),this.modelService.createVisitor(v).subscribe(t=>{"Success"==t.keyword?this.deviceInsert():"Failed"==t.keyword&&this.loader.close()})}deviceInsert(){let t=new FormData;t.append("id",this.vistersdetails.visitorId),t.append("type","visitor"),this.modelService.deviceStatus(t).subscribe(t=>{"success"==t.keyword?(this.loader.close(),this.router.navigate(["/school/visitors/list"])):this.loader.close()})}findInvalidControls(){const t=[],e=this.visitorForm.controls;for(const i in e)e[i].invalid&&t.push(i);return console.log(t,"invalid"),t}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(R.b),q.Xb(et.a),q.Xb(Z.a),q.Xb(tt.a),q.Xb(c.g),q.Xb(bt.a),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(N.a),q.Xb(j.a),q.Xb(ht.d))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-create"]],features:[q.Fb([{provide:l.c,useClass:gt.b},{provide:l.f,useValue:gt.a},ht.d])],decls:189,vars:39,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"pl-8","primary-txt-color",3,"routerLink"],[1,"form_bg"],[1,"p-0"],[1,""],[1,"card-title-text"],[3,"formGroup"],["fxLayout","row wrap",1,"row","mt-24"],["fxFlex","100","fxFlex.gt-xs","55",1,""],["appearance","fill",1,"full-width"],["matInput","","name","visitorsname","placeholder","Visitors Name","formControlName","visitorsname","value","",1,"batch-name"],[4,"ngIf"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","23.5",1,""],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","67.5",1,""],["matInput","","name","mobileno","placeholder","","formControlName","mobileno","value",""],["fxLayout","row wrap",1,"mb-12"],["fxFlex","100","fxFlex.gt-xs","23",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","67",1,"mt-8"],["aria-label","Select an option","name","gender","formControlName","gender",1,"ml-15"],["value","Male",1,"mr-12"],["value","Female",1,"mr-12"],["value","Transgender",1,"mr-12"],["fxLayout","row wrap",1,"mt-28"],["fxFlex","100","fxFlex.gt-xs","23",1,""],["fxFlex","100","fxFlex.gt-xs","67",1,""],["type","file","formControlName","indentyAttach",2,"display","none",3,"change"],["docfileInput",""],["mat-raised-button","","class","btn-primary-bg ml-0","type","button",3,"click",4,"ngIf"],[1,"ml-4","mt-8"],["formControlName","IdentyName","readonly","",2,"display","none"],["class","ml-8",3,"click",4,"ngIf"],[1,"mt-8"],["style","color: red;",4,"ngIf"],["fxLayout","row wrap",1,"row"],["fxFlex","100","fxFlex.gt-xs","100",1,""],["fxLayout","row wrap",1,"mt-12"],["matInput","","name","purposeofvisit","placeholder","","formControlName","purposeofvisit","value",""],["fxFlex","100","fxFlex.gt-xs","37",1,""],["appearance","fill"],["matInput","","formControlName","fromDate",3,"matDatepicker","focus","click"],["matSuffix","",3,"for"],["picker5",""],["fxFlex","100","fxFlex.gt-xs","30",1,"pl-16"],["matInput","","placeholder","From date","formControlName","toDate",3,"matDatepicker","min","focus","click"],["picker1",""],["fxFlex","100","fxFlex.gt-xs","25",1,""],["appearance","fill",1,"stime"],["type","text","formControlName","startTime","matInput","","readonly","","value","",3,"ngxTimepicker","format"],["timePickerFrom",""],["fxFlex","100","fxFlex.gt-xs","15",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","27"],["appearance","fill",1,"etime"],["type","text","formControlName","endTime","matInput","","readonly","","value","",3,"min","ngxTimepicker","format"],["timePickerFroms",""],["fxLayout","row wrap",1,"mt-24","mb-28"],["aria-label","Select an option","name","report","formControlName","WhomGoing",1,"ml-15"],["value","1",1,"mr-12"],["value","2",1,"mr-12"],["value","3",1,"mr-12"],["value","4"],["class","student-block",4,"ngIf"],["class","employee-block",4,"ngIf"],["class","official-block mt-12",4,"ngIf"],["class","others-block mt-16",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","45",1,"preview_image","mt-8"],[1,"text-right"],["type","file","formControlName","photo",2,"display","none",3,"change"],["file",""],["width","100px","height","100px",3,"src","click"],["matRipple","","style","color:red",3,"click",4,"ngIf"],[1,"mt-28"],["fxLayout","row wrap",1,"mt-16"],["matInput","","name","devicename","formControlName","devicename","placeholder","","value",""],["matInput","","name","macaddress","formControlName","macaddress","placeholder","","value",""],["mat-raised-button","","type","button",1,"btn-primary-bg","ml-0",3,"click"],[1,"attachment"],[1,"ml-8",3,"click"],[1,"delete-icon"],[2,"color","red"],[1,"student-block"],["matInput","","name","rollno","formControlName","rollno","placeholder","","value","",1,"",3,"matAutocomplete","keyup"],["auto","matAutocomplete"],[3,"value","click",4,"ngFor","ngForOf"],[1,"primary-txt-color",3,"click"],[1,"mt-4"],["fxLayout","row wrap","class","mt-8",4,"ngIf"],[3,"value","click"],["fxFlex","100","fxFlex.gt-xs","23",1,"pt-8","mr-4"],["fxFlex","100","fxFlex.gt-xs","75",1,"pt-12"],[1,"mb-4"],[1,"employee-block"],["matInput","","name","empcode","placeholder","","formControlName","empcode",3,"matAutocomplete","keyup"],[1,"official-block","mt-12"],["fxLayout","row wrap",1,"mt-4"],["fxFlex","100","fxFlex.gt-xs","23",1,"mt-16"],["fxFlex","100","fxFlex.gt-xs","67",1,"mt-12"],["formControlName","department"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","23",1,"mt-12"],["formControlName","position"],[1,"example-full-width"],["formControlName","employee"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"others-block","mt-16"],["matInput","","placeholder","","formControlName","description"],["matRipple","",2,"color","red",3,"click"],[1,"delete-icon","text-right",3,"ngStyle"]],template:function(t,e){if(1&t){const t=q.ec();q.dc(0,"div",0),q.dc(1,"button",1),q.lc("click",(function(t){return e.create()})),q.cd(2,"Save"),q.cc(),q.dc(3,"a",2),q.cd(4,"Discard"),q.cc(),q.cc(),q.dc(5,"div",3),q.dc(6,"mat-card",4),q.dc(7,"mat-card-title",5),q.dc(8,"div",6),q.cd(9,"Create New Visitors"),q.cc(),q.Yb(10,"mat-divider"),q.cc(),q.dc(11,"mat-card-content"),q.dc(12,"form",7),q.dc(13,"div",8),q.dc(14,"div",9),q.dc(15,"mat-form-field",10),q.Yb(16,"input",11),q.ad(17,xt,2,0,"mat-error",12),q.ad(18,wt,2,0,"mat-error",12),q.cc(),q.dc(19,"div",13),q.dc(20,"div",14),q.dc(21,"label"),q.dc(22,"strong"),q.cd(23,"Mobile No"),q.cc(),q.dc(24,"span",15),q.cd(25,"*"),q.cc(),q.cc(),q.cc(),q.dc(26,"div",16),q.dc(27,"mat-form-field",10),q.Yb(28,"input",17),q.ad(29,St,2,0,"mat-error",12),q.ad(30,kt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(31,"div",18),q.dc(32,"div",19),q.dc(33,"label"),q.dc(34,"strong"),q.cd(35,"Gender"),q.cc(),q.dc(36,"span",15),q.cd(37,"*"),q.cc(),q.cc(),q.cc(),q.dc(38,"div",20),q.dc(39,"mat-radio-group",21),q.dc(40,"mat-radio-button",22),q.cd(41," Male"),q.cc(),q.dc(42,"mat-radio-button",23),q.cd(43,"Female"),q.cc(),q.dc(44,"mat-radio-button",24),q.cd(45,"Transgender"),q.cc(),q.cc(),q.ad(46,It,2,0,"mat-error",12),q.cc(),q.cc(),q.dc(47,"div",25),q.dc(48,"div",26),q.dc(49,"label"),q.dc(50,"strong"),q.cd(51,"Identity"),q.cc(),q.dc(52,"span",15),q.cd(53,"*"),q.cc(),q.cc(),q.cc(),q.dc(54,"div",27),q.dc(55,"input",28,29),q.lc("change",(function(t){return e.onChangeFile(t)})),q.cc(),q.ad(57,Ct,4,0,"button",30),q.dc(58,"label",31),q.cd(59),q.cc(),q.Yb(60,"input",32),q.ad(61,Gt,3,0,"a",33),q.dc(62,"div",34),q.ad(63,_t,3,0,"mat-error",12),q.ad(64,Ot,3,0,"mat-error",12),q.ad(65,Dt,2,0,"p",35),q.dc(66,"span"),q.cd(67,"Format : JPG, JPEG, PNG, BMP, PDF"),q.cc(),q.Yb(68,"br"),q.dc(69,"span"),q.cd(70,"File Size : Maximum 2MB"),q.cc(),q.Yb(71,"br"),q.cc(),q.cc(),q.cc(),q.dc(72,"div",36),q.dc(73,"div",37),q.dc(74,"div",38),q.dc(75,"div",26),q.dc(76,"label"),q.dc(77,"strong"),q.cd(78,"Purpose of Visit"),q.cc(),q.dc(79,"span",15),q.cd(80,"*"),q.cc(),q.cc(),q.cc(),q.dc(81,"div",27),q.dc(82,"mat-form-field",10),q.Yb(83,"input",39),q.ad(84,Vt,2,0,"mat-error",12),q.ad(85,Nt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(86,"div",13),q.dc(87,"div",19),q.dc(88,"label"),q.dc(89,"strong"),q.cd(90,"Date"),q.cc(),q.dc(91,"span",15),q.cd(92,"*"),q.cc(),q.cc(),q.cc(),q.dc(93,"div",40),q.dc(94,"mat-form-field",41),q.dc(95,"mat-label"),q.cd(96,"From Date"),q.cc(),q.dc(97,"input",42),q.lc("focus",(function(e){return q.Sc(t),q.Oc(100).open()}))("click",(function(e){return q.Sc(t),q.Oc(100).open()})),q.cc(),q.Yb(98,"mat-datepicker-toggle",43),q.Yb(99,"mat-datepicker",null,44),q.ad(101,Pt,2,0,"mat-error",12),q.cc(),q.cc(),q.dc(102,"div",45),q.dc(103,"mat-form-field",10),q.dc(104,"mat-label"),q.cd(105,"To Date"),q.cc(),q.dc(106,"input",46),q.lc("focus",(function(e){return q.Sc(t),q.Oc(109).open()}))("click",(function(e){return q.Sc(t),q.Oc(109).open()})),q.cc(),q.Yb(107,"mat-datepicker-toggle",43),q.Yb(108,"mat-datepicker",null,47),q.ad(110,At,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(111,"div",13),q.dc(112,"div",26),q.dc(113,"label"),q.dc(114,"strong"),q.cd(115,"Start Time"),q.cc(),q.dc(116,"span",15),q.cd(117,"*"),q.cc(),q.cc(),q.cc(),q.dc(118,"div",48),q.dc(119,"mat-form-field",49),q.Yb(120,"input",50),q.Yb(121,"ngx-material-timepicker",null,51),q.ad(123,Tt,2,0,"mat-error",12),q.cc(),q.cc(),q.dc(124,"div",52),q.dc(125,"label"),q.dc(126,"strong"),q.cd(127,"End Time"),q.cc(),q.dc(128,"span",15),q.cd(129,"*"),q.cc(),q.cc(),q.cc(),q.dc(130,"div",53),q.dc(131,"mat-form-field",54),q.Yb(132,"input",55),q.Yb(133,"ngx-material-timepicker",null,56),q.ad(135,Et,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(136,"div",57),q.dc(137,"div",26),q.dc(138,"label"),q.dc(139,"strong"),q.cd(140,"Whom going to visit"),q.cc(),q.dc(141,"span",15),q.cd(142,"*"),q.cc(),q.cc(),q.cc(),q.dc(143,"div",27),q.dc(144,"mat-radio-group",58),q.dc(145,"mat-radio-button",59),q.cd(146,"Student "),q.cc(),q.dc(147,"mat-radio-button",60),q.cd(148,"Employee"),q.cc(),q.dc(149,"mat-radio-button",61),q.cd(150,"Official"),q.cc(),q.dc(151,"mat-radio-button",62),q.cd(152,"Others"),q.cc(),q.ad(153,jt,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.ad(154,Bt,25,7,"div",63),q.ad(155,Yt,25,7,"div",64),q.ad(156,Qt,39,6,"div",65),q.ad(157,te,12,1,"div",66),q.cc(),q.cc(),q.cc(),q.dc(158,"div",67),q.dc(159,"div",68),q.dc(160,"input",69,70),q.lc("change",(function(t){return e.fileChangeEvent(t)})),q.cc(),q.dc(162,"img",71),q.lc("click",(function(e){return q.Sc(t),q.Oc(161).click()})),q.cc(),q.ad(163,ie,3,2,"a",72),q.ad(164,ce,3,0,"mat-error",12),q.ad(165,oe,3,0,"mat-error",12),q.cc(),q.dc(166,"h3",73),q.dc(167,"strong"),q.dc(168,"u"),q.cd(169,"Device Info"),q.cc(),q.cc(),q.cc(),q.dc(170,"div",74),q.dc(171,"div",26),q.dc(172,"label"),q.dc(173,"strong"),q.cd(174,"Device Name"),q.cc(),q.cc(),q.cc(),q.dc(175,"div",27),q.dc(176,"mat-form-field",10),q.Yb(177,"input",75),q.cc(),q.cc(),q.cc(),q.dc(178,"div",74),q.dc(179,"div",26),q.dc(180,"label"),q.dc(181,"strong"),q.cd(182,"Device Mac"),q.cc(),q.dc(183,"span",15),q.cd(184,"*"),q.cc(),q.cc(),q.cc(),q.dc(185,"div",27),q.dc(186,"mat-form-field",10),q.Yb(187,"input",76),q.ad(188,re,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc()}if(2&t){const t=q.Oc(100),i=q.Oc(109),c=q.Oc(122),o=q.Oc(134);q.Gb(3),q.yc("routerLink","/school/visitors/list"),q.Gb(9),q.yc("formGroup",e.visitorForm),q.Gb(5),q.yc("ngIf",null==e.visitorForm.controls.visitorsname.errors?null:e.visitorForm.controls.visitorsname.errors.required),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.visitorsname.errors?null:e.visitorForm.controls.visitorsname.errors.pattern),q.Gb(11),q.yc("ngIf",null==e.visitorForm.controls.mobileno.errors?null:e.visitorForm.controls.mobileno.errors.required),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.mobileno.errors?null:e.visitorForm.controls.mobileno.errors.pattern),q.Gb(16),q.yc("ngIf",(null==e.visitorForm.controls.gender.errors?null:e.visitorForm.controls.gender.errors.required)&&e.visitorForm.controls.gender.touched),q.Gb(11),q.yc("ngIf",!(null!=e.visitorForm.controls.IdentyName&&e.visitorForm.controls.IdentyName.value)),q.Gb(2),q.dd(null==e.visitorForm.controls.IdentyName?null:e.visitorForm.controls.IdentyName.value),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.IdentyName?null:e.visitorForm.controls.IdentyName.value)||(null==e.visitorForm.controls.indentyAttach?null:null==e.visitorForm.controls.indentyAttach.errors?null:e.visitorForm.controls.indentyAttach.errors.pattern)||e.isAttachFileSizeTooHigh),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.indentyAttach.errors?null:e.visitorForm.controls.indentyAttach.errors.required)&&e.visitorForm.controls.indentyAttach.touched),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.indentyAttach?null:null==e.visitorForm.controls.indentyAttach.errors?null:e.visitorForm.controls.indentyAttach.errors.pattern),q.Gb(1),q.yc("ngIf",e.isAttachFileSizeTooHigh),q.Gb(19),q.yc("ngIf",null==e.visitorForm.controls.purposeofvisit.errors?null:e.visitorForm.controls.purposeofvisit.errors.required),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.purposeofvisit.errors?null:e.visitorForm.controls.purposeofvisit.errors.pattern),q.Gb(12),q.yc("matDatepicker",t),q.Gb(1),q.yc("for",t),q.Gb(3),q.yc("ngIf",null==e.visitorForm.controls.fromDate.errors?null:e.visitorForm.controls.fromDate.errors.required),q.Gb(5),q.yc("matDatepicker",i)("min",e.visitorForm.controls.fromDate.value),q.Gb(1),q.yc("for",i),q.Gb(3),q.yc("ngIf",null==e.visitorForm.controls.toDate.errors?null:e.visitorForm.controls.toDate.errors.required),q.Gb(10),q.yc("ngxTimepicker",c)("format",e.timeFormat),q.Gb(3),q.yc("ngIf",(null==e.visitorForm.controls?null:null==e.visitorForm.controls.startTime?null:null==e.visitorForm.controls.startTime.errors?null:e.visitorForm.controls.startTime.errors.required)&&e.visitorForm.controls.startTime.touched),q.Gb(9),q.yc("min",null==e.visitorForm.controls.startTime.value?12:e.visitorForm.controls.startTime.value)("ngxTimepicker",o)("format",e.timeFormat),q.Gb(3),q.yc("ngIf",(null==e.visitorForm.controls.endTime?null:null==e.visitorForm.controls.endTime.errors?null:e.visitorForm.controls.endTime.errors.required)&&e.visitorForm.controls.endTime.touched),q.Gb(18),q.yc("ngIf",(null==e.visitorForm.controls.WhomGoing.errors?null:e.visitorForm.controls.WhomGoing.errors.required)&&e.visitorForm.controls.WhomGoing.touched),q.Gb(1),q.yc("ngIf","1"===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","2"===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","3"===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","4"===e.visitorForm.controls.WhomGoing.value),q.Gb(5),q.yc("src",e.croppedImg,q.Vc),q.Gb(1),q.yc("ngIf","assets/images/camera.png"!==e.croppedImg),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.photo.errors?null:e.visitorForm.controls.photo.errors.pattern),q.Gb(1),q.yc("ngIf",e.isFileSizeTooHigh),q.Gb(23),q.yc("ngIf",(null==e.visitorForm.controls.macaddress.errors?null:e.visitorForm.controls.macaddress.errors.required)&&e.visitorForm.controls.macaddress.touched)}},directives:[s.a,c.j,n.a,n.f,B.a,n.c,r.D,r.u,r.k,z.c,z.a,X.b,p.b,r.c,r.t,r.i,o.o,g.b,g.a,X.e,d.b,d.d,X.f,d.a,yt.d,yt.a,X.a,m.a,G.c,G.a,o.n,l.p,C.a,o.p,Ft.b],pipes:[_.a],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.batch-name[_ngcontent-%COMP%]{font-size:24px}mat-checkbox[_ngcontent-%COMP%]{margin-right:24px}.preview_image[_ngcontent-%COMP%]{height:100px;margin:0 auto}image-cropper[_ngcontent-%COMP%]{width:120px;height:113px}.mt13[_ngcontent-%COMP%]{margin-top:-14px}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%;width:85px}.ml-0[_ngcontent-%COMP%]{margin-left:0!important}"],data:{animation:[Object(O.o)("detailExpand",[Object(O.l)("collapsed",Object(O.m)({height:"0px",minHeight:"0",visibility:"hidden"})),Object(O.l)("expanded",Object(O.m)({height:"*",visibility:"visible"})),Object(O.n)("expanded <=> collapsed",Object(O.e)("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}}),t})();function ne(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the visitor name "),q.cc())}function ae(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid visitor name "),q.cc())}function le(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the mobile no "),q.cc())}function de(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid mobile no "),q.cc())}function me(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please select any one gender "),q.cc())}function pe(t,e){if(1&t){const t=q.ec();q.dc(0,"button",76),q.lc("click",(function(e){return q.Sc(t),q.pc(),q.Oc(56).click()})),q.dc(1,"mat-icon",77),q.cd(2,"attach_file"),q.cc(),q.cd(3," Add File "),q.cc()}}function ue(t,e){if(1&t){const t=q.ec();q.dc(0,"a",78),q.lc("click",(function(e){return q.Sc(t),q.pc().clearAttach()})),q.dc(1,"mat-icon",79),q.cd(2,"close"),q.cc(),q.cc()}}function he(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2,"Please provide the identity attachment"),q.cc(),q.cc())}function ge(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2," JPG, JPEG, PNG, BMP, PDF are allowed "),q.cc(),q.cc())}function ve(t,e){1&t&&(q.dc(0,"p",80),q.cd(1," File size should be 2MB maximumn "),q.cc())}function fe(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the purpose of visit "),q.cc())}function be(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid purpose of visit "),q.cc())}function ye(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the from date "),q.cc())}function Fe(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the to date "),q.cc())}function xe(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," please provide the start time "),q.cc())}function we(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," please provide the end time "),q.cc())}function Se(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please select any one "),q.cc())}function ke(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",88),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit;return q.pc(2).studentkeyup(c)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.Dc("value","",t.studentName," - ",t.admissionNo," - ",t.className," ",t.sectionName?"-":""," ",t.sectionName," ",t.rollNumber?"-":""," ",t.rollNumber,""),q.Gb(1),q.kd(" ",t.studentName," - ",t.admissionNo," - ",t.className," ",t.sectionName?"-":""," ",t.sectionName," ",t.rollNumber?"-":""," ",t.rollNumber," ")}}function Ie(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the roll no "),q.cc())}function Ce(t,e){if(1&t&&(q.dc(0,"div",13),q.dc(1,"div",89),q.dc(2,"label"),q.dc(3,"strong"),q.cd(4,"Student Name"),q.cc(),q.cc(),q.cc(),q.dc(5,"div",90),q.dc(6,"h2",91),q.cd(7),q.cc(),q.dc(8,"h5",91),q.cd(9),q.cc(),q.dc(10,"h5",91),q.cd(11),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc(2);q.Gb(7),q.dd(t.studentdetails.student_name?t.studentdetails.student_name:t.studentdetails.studentName?t.studentdetails.studentName:t.studentdetails.first_name),q.Gb(2),q.dd(t.studentdetails.rollNumber?t.studentdetails.rollNumber:t.studentdetails.roll_no),q.Gb(2),q.gd("",t.studentdetails.class_name?t.studentdetails.class_name:t.studentdetails.className," ",""!=t.studentdetails.class_name?"-":""!=t.studentdetails.className?"-":""," ",t.studentdetails.section_name?t.studentdetails.section_name:t.studentdetails.sectionName,"")}}function Ge(t,e){if(1&t){const t=q.ec();q.dc(0,"div",81),q.dc(1,"div",73),q.dc(2,"div",26),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Roll No"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",27),q.dc(9,"mat-form-field",10),q.dc(10,"input",82),q.lc("keyup",(function(e){return q.Sc(t),q.pc().studentclear(e)})),q.cc(),q.dc(11,"mat-autocomplete",null,83),q.ad(13,ke,2,14,"mat-option",84),q.qc(14,"filter"),q.cc(),q.ad(15,Ie,2,0,"mat-error",12),q.cc(),q.dc(16,"div",67),q.dc(17,"a",85),q.lc("click",(function(e){return q.Sc(t),q.pc().openDialog()})),q.dc(18,"u"),q.cd(19,"Advanced Search"),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(20,"h3",86),q.dc(21,"strong"),q.dc(22,"u"),q.cd(23,"Student Details"),q.cc(),q.cc(),q.cc(),q.ad(24,Ce,12,5,"div",87),q.cc()}if(2&t){const t=q.Oc(12),e=q.pc();q.Gb(10),q.yc("matAutocomplete",t),q.Gb(3),q.yc("ngForOf",q.sc(14,4,e.students,e.visitorForm.controls.rollno.value)),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.rollno.errors?null:e.visitorForm.controls.rollno.errors.required)&&e.visitorForm.controls.rollno.touched),q.Gb(9),q.yc("ngIf",""!=e.studentdetails.student_name||""!=e.studentdetails.studentName)}}function _e(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",88),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit,o=q.pc(2);return o.Employeekeyup(c,o.i)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.Bc("value","",t.employeeCode," - ",t.employeeName,""),q.Gb(1),q.fd(" ",t.employeeCode," - ",t.employeeName," ")}}function Oe(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the employee code "),q.cc())}function De(t,e){if(1&t&&(q.dc(0,"div",13),q.dc(1,"div",89),q.dc(2,"label"),q.dc(3,"strong"),q.cd(4,"Employee Name"),q.cc(),q.cc(),q.cc(),q.dc(5,"div",90),q.dc(6,"h2",91),q.cd(7),q.cc(),q.dc(8,"h5",91),q.cd(9),q.cc(),q.dc(10,"h5",91),q.cd(11),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc(2);q.Gb(7),q.fd("",t.employeedetails.employee_name?t.employeedetails.employee_name:t.employeedetails.name,"",t.employeedetails.employeeName,""),q.Gb(2),q.dd(t.employeedetails.employeeCode?t.employeedetails.employeeCode:t.employeedetails.employee_code),q.Gb(2),q.gd("",t.employeedetails.department_name?t.employeedetails.department_name:t.employeedetails.departmentName?t.employeedetails.departmentName:t.employeedetails.dept_name," ",""!=t.employeedetails.department_name?"-":""," ",t.employeedetails.position_name?t.employeedetails.position_name:t.employeedetails.positionName?t.employeedetails.positionName:t.employeedetails.pos_name,"")}}function Ve(t,e){if(1&t){const t=q.ec();q.dc(0,"div",92),q.dc(1,"div",73),q.dc(2,"div",26),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Employee ID"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",27),q.dc(9,"mat-form-field",10),q.dc(10,"input",93),q.lc("keyup",(function(e){q.Sc(t);const i=q.pc();return i.Employeekeyup(e.target.value,i.i)})),q.cc(),q.dc(11,"mat-autocomplete",null,83),q.ad(13,_e,2,4,"mat-option",84),q.qc(14,"filter"),q.cc(),q.ad(15,Oe,2,0,"mat-error",12),q.cc(),q.dc(16,"div",67),q.dc(17,"a",85),q.lc("click",(function(e){return q.Sc(t),q.pc().openClick()})),q.dc(18,"u"),q.cd(19,"Advanced Search"),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(20,"h3",86),q.dc(21,"strong"),q.dc(22,"u"),q.cd(23,"Employee Details"),q.cc(),q.cc(),q.cc(),q.ad(24,De,12,6,"div",87),q.cc()}if(2&t){const t=q.Oc(12),e=q.pc();q.Gb(10),q.yc("matAutocomplete",t),q.Gb(3),q.yc("ngForOf",q.sc(14,4,e.empIds,e.visitorForm.controls.empcode.value)),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.empcode.errors?null:e.visitorForm.controls.empcode.errors.required)&&e.visitorForm.controls.empcode.touched),q.Gb(9),q.yc("ngIf",""!=e.employeedetails.employee_name||""!=e.employeedetails.employeeName)}}function Ne(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",88),q.lc("click",(function(e){return q.Sc(t),q.pc(2).getEmployeebaseId()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.departmentId),q.Gb(1),q.ed(" ",t.name," ")}}function Pe(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the department name "),q.cc())}function Ae(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",88),q.lc("click",(function(e){return q.Sc(t),q.pc(2).getEmployeebaseId()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.positionId),q.Gb(1),q.ed(" ",t.positionName," ")}}function Te(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the position name "),q.cc())}function Ee(t,e){if(1&t&&(q.dc(0,"mat-option",103),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.yc("value",t.employeeId),q.Gb(1),q.ed(" ",t.employeeName," ")}}function je(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the employee name "),q.cc())}function Me(t,e){if(1&t&&(q.dc(0,"div",94),q.dc(1,"div",73),q.dc(2,"div",26),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5," Department"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",27),q.dc(9,"mat-form-field",40),q.Yb(10,"mat-label"),q.dc(11,"mat-select",95),q.ad(12,Ne,2,2,"mat-option",84),q.cc(),q.ad(13,Pe,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(14,"div",73),q.dc(15,"div",26),q.dc(16,"label"),q.dc(17,"strong"),q.cd(18," Position"),q.cc(),q.dc(19,"span",15),q.cd(20,"*"),q.cc(),q.cc(),q.cc(),q.dc(21,"div",27),q.dc(22,"mat-form-field",40),q.Yb(23,"mat-label"),q.dc(24,"mat-select",96),q.ad(25,Ae,2,2,"mat-option",84),q.cc(),q.ad(26,Te,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(27,"div",97),q.dc(28,"div",98),q.dc(29,"label"),q.dc(30,"strong"),q.cd(31," Employee Name"),q.cc(),q.dc(32,"span",15),q.cd(33,"*"),q.cc(),q.cc(),q.cc(),q.dc(34,"div",99),q.dc(35,"mat-form-field",100),q.dc(36,"mat-select",101),q.ad(37,Ee,2,2,"mat-option",102),q.cc(),q.ad(38,je,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(12),q.yc("ngForOf",t.departments),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.department.errors?null:t.visitorForm.controls.department.errors.required)&&t.visitorForm.controls.department.touched),q.Gb(12),q.yc("ngForOf",t.positions),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.position.errors?null:t.visitorForm.controls.position.errors.required)&&t.visitorForm.controls.position.touched),q.Gb(11),q.yc("ngForOf",t.employees),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.employee.errors?null:t.visitorForm.controls.employee.errors.required)&&t.visitorForm.controls.employee.touched)}}function qe(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the description "),q.cc())}function Re(t,e){if(1&t&&(q.dc(0,"div",104),q.dc(1,"div",73),q.dc(2,"div",19),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Description"),q.cc(),q.dc(6,"span",15),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",27),q.dc(9,"mat-form-field",10),q.Yb(10,"textarea",105),q.ad(11,qe,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(11),q.yc("ngIf",(null==t.visitorForm.controls.description.errors?null:t.visitorForm.controls.description.errors.required)&&t.visitorForm.controls.description.touched)}}const Be=function(){return{position:"relative",bottom:"117px",left:"101px"}};function ze(t,e){if(1&t){const t=q.ec();q.dc(0,"a",106),q.lc("click",(function(e){return q.Sc(t),q.pc().clearLogo()})),q.dc(1,"mat-icon",107),q.cd(2,"clear"),q.cc(),q.cc()}2&t&&(q.Gb(1),q.yc("ngStyle",q.Ec(1,Be)))}function Xe(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2," Allowed file formats are jpg , jpeg , png"),q.cc(),q.cc())}function Le(t,e){1&t&&(q.dc(0,"mat-error"),q.dc(1,"small"),q.cd(2,"File size should not be higher than 10 mb"),q.cc(),q.cc())}function Ye(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the mac address "),q.cc())}let $e=(()=>{class t{constructor(t,e,i,c,o,s,n,a,l,d,m,p,u){this.dialog=t,this.employeeService=e,this.departmentservice=i,this.positionservice=c,this.router=o,this.config=s,this.formBuilder=n,this.loader=a,this.toaster=l,this.StudentService=d,this.modelService=m,this.severdatePipe=p,this.activateRoute=u,this.imageChangedEvent="",this.croppedImg="assets/images/camera.png",this.myControl=new r.g,this.options=["Ram","Malini","Meera","Shalini"],this.vist=new dt.a,this.studentdetails=[],this.employeedetails=[],this.particular=[],this.urls=[],this.images=[],this.uploads=[],this.timeFormat=Number(this.config.timeFormat)}onSelectFile(t){if(t.target.files&&t.target.files[0]){var e=t.target.files.length;for(let c=0;c<e;c++){var i=new FileReader;i.onload=t=>{console.log(t.target.result),this.urls.push(t.target.result)},i.readAsDataURL(t.target.files[c])}}}ngOnInit(){this.filteredOptions=this.myControl.valueChanges.pipe(Object(D.a)(""),Object(V.a)(t=>this._filter(t))),this.visitorForm=new r.j({visitorsname:new r.g("",[r.B.required]),photo:new r.g("",[r.B.pattern(Object(lt.b)().app.validators.image)]),mobileno:new r.g("",[r.B.required,r.B.pattern(Object(lt.b)().app.validators.tenDigitInteger)]),purposeofvisit:new r.g("",[r.B.required]),WhomGoing:new r.g("",[r.B.required]),rollno:new r.g(""),fromDate:new r.g("",[r.B.required]),endTime:new r.g("",[r.B.required]),toDate:new r.g("",[r.B.required]),startTime:new r.g("",[r.B.required]),macaddress:new r.g("",[r.B.required]),gender:new r.g("",[r.B.required]),devicename:new r.g(""),empcode:new r.g(""),department:new r.g(""),position:new r.g(""),employee:new r.g(""),description:new r.g(""),indentyAttach:new r.g(""),IdentyName:new r.g("")}),this.getOne(),this.whomValidate(),this.getPossition(),this.getDepartment(),this.getStudents(),this.getEmployees()}ngOnDestroy(){this.recordAddedSub.unsubscribe(),this.recordstudentSub.unsubscribe()}ngAfterViewInit(){this.addSub(),this.addStudentSub()}whomValidate(){this.visitorForm.get("WhomGoing").valueChanges.subscribe(t=>{1==t?(this.employeedetails=[],this.getemployeeCode="",this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValue(""),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValidators([r.B.required]),this.visitorForm.get("rollno").markAsDirty(),this.visitorForm.get("rollno").markAsUntouched(),this.visitorForm.get("rollno")):2==t?(this.studentdetails=[],this.studentRollno="",this.studentId="",this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("description"),this.visitorForm.get("position"),this.visitorForm.get("department"),this.visitorForm.get("employee"),this.visitorForm.get("description"),this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValidators([r.B.required]),this.visitorForm.get("empcode").markAsDirty(),this.visitorForm.get("empcode").markAsUntouched(),this.visitorForm.get("empcode"),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue("")):3==t?(this.studentdetails=[],this.employeedetails=[],this.getemployeeCode="",this.studentRollno="",this.studentId="",this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("rollno"),this.visitorForm.get("description"),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("employee").setValidators([r.B.required]),this.visitorForm.get("department").setValidators([r.B.required]),this.visitorForm.get("position").setValidators([r.B.required]),this.visitorForm.get("employee").markAsUntouched(),this.visitorForm.get("department").markAsUntouched(),this.visitorForm.get("position").markAsUntouched(),this.visitorForm.get("employee").markAsDirty(),this.visitorForm.get("department").markAsDirty(),this.visitorForm.get("position").markAsDirty(),this.visitorForm.get("employee"),this.visitorForm.get("department"),this.visitorForm.get("position")):4==t&&(this.studentdetails=[],this.employeedetails=[],this.studentRollno="",this.getemployeeCode="",this.studentId="",this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("description").setValidators([r.B.required]),this.visitorForm.get("description").markAsUntouched(),this.visitorForm.get("description").markAsDirty(),this.visitorForm.get("description"),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators())})}_filter(t){const e=t.toLowerCase();return this.options.filter(t=>t.toLowerCase().includes(e))}getUrl(){return"url('assets/images/camera.png')"}onChangeFile(t){t.target.files&&t.target.files[0]?t.target.files[0].size>2e6?(this.isAttachFileSizeTooHigh=!0,this.indentyattachment=null):(this.isAttachFileSizeTooHigh=!1,this.indentyattachment=t.target.files[0],this.visitorForm.get("IdentyName").setValue(this.indentyattachment.name),this.visitorForm.get("indentyAttach").setValue(this.indentyattachment.name)):(this.indentyattachment=null,this.visitorForm.get("IdentyName").setValue(""))}clearAttach(){this.isAttachFileSizeTooHigh=!1,this.indentyattachment="",this.visitorForm.get("IdentyName").setValue(""),this.visitorForm.get("indentyAttach").setValidators([r.B.required,r.B.pattern(Object(lt.b)().app.validators.imageAndPdf)]),this.visitorForm.get("indentyAttach").markAsTouched(),this.visitorForm.get("indentyAttach"),this.visitorForm.get("indentyAttach").setValue("")}getOne(){this.visitorId=this.activateRoute.snapshot.params.id,this.loader.open(),this.modelService.getOne(this.visitorId).subscribe(t=>{"success"==t.keyword?(this.loader.close(),this.vist=t.visitors[0],t.visitors[0].particular[0].roll_no?this.studentdetails=t.visitors[0].particular[0]:"2"==t.visitors[0].whomVisit?(this.employeedetails=t.visitors[0].particular[0],console.log(this.employeedetails)):"3"==t.visitors[0].whomVisit&&(this.particular=t.visitors[0].particular[0]),this.getEmployeebaseId(this.particular.department,this.particular.position),""===this.vist.photo||(this.croppedImg=this.vist.photo),this.setValue(this.vist)):(this.loader.close(),this.toaster.present(t.message,""))})}setValue(t){console.log(t,"visiters"),this.visitorForm.patchValue({visitorsname:t.visitorName,mobileno:t.mobileNo,gender:t.gender,purposeofvisit:t.purposeOfVisit,WhomGoing:t.whomVisit,rollno:this.studentdetails.first_name+" - "+this.studentdetails.class_name+" "+(this.studentdetails.section_name?"-":"")+" "+this.studentdetails.section_name+" "+(this.studentdetails.roll_no?"-":"")+" "+this.studentdetails.roll_no,fromDate:t.fromDate,endTime:t.toTime,toDate:t.toDate,startTime:t.fromTime,macaddress:t.macAddress,devicename:null==t.deviceName?"":t.deviceName,empcode:this.employeedetails.employee_code+" - "+this.employeedetails.name,department:this.particular.department,position:this.particular.position,employee:Number(this.particular.employee_id),description:this.vist.particular[0].description,IdentyName:t.attachment}),this.indentyattachment=t.attachment,this.vist.image=t.photo,this.selectedGender=t.gender,this.getemployeeCode=this.employeedetails.employee_id,this.studentId=this.studentdetails.student_id}addSub(){this.recordAddedSub=this.modelService.getRecordAddedSub().subscribe(t=>{this.employeedetails=t,this.getemployeeCode=this.employeedetails.employeeId,console.log(t),this.employeedetails.employeeCode&&this.visitorForm.get("empcode").setValue(this.employeedetails.employeeCode+" - "+this.employeedetails.employeeName)})}addStudentSub(){this.recordstudentSub=this.StudentService.getRecordAddedSub().subscribe(t=>{this.studentdetails=t,this.studentId=t.studentId;var e=t.studentName+" - "+t.className+" "+(t.sectionName?"-":"")+" "+t.sectionName+" "+(t.rollNumber?"-":"")+" "+t.rollNumber;this.studentdetails?this.visitorForm.get("rollno").setValue(e):this.studentdetails&&this.visitorForm.get("rollno").setValue(e)})}studentkeyup(t,e){this.studentId=t.studentId,console.log(this.studentId),this.studentdetails=t}studentclear(t){""==t.target.value&&(this.studentdetails=[],this.studentId="")}Employeekeyup(t,e){""!==t?(this.employeedetails=t,this.getemployeeCode=t.employeeId):(this.employeedetails=[],this.getemployeeCode="")}getDepartment(){this.departmentservice.getList({}).subscribe(t=>{this.departments=t.departments,this.departments=this.departments.filter(t=>"1"==t.status)})}getPossition(){this.positionservice.getList({}).subscribe(t=>{this.positions=t.positions,this.positions=this.positions.filter(t=>"1"==t.status)})}getStudents(){this.StudentService.getList(void 0).subscribe(t=>{this.students=t.studentRegistrations,this.students=this.students.filter(t=>""!==t.rollNumber),this.students=this.students.filter(t=>"1"==t.status)})}getEmployees(){this.employeeService.getList(void 0).subscribe(t=>{this.empIds=t.employees,this.empIds=this.empIds.filter(t=>"1"==t.status)})}getEmployeebaseId(t,e){console.log(t,e,"1234");var i=this.visitorForm.value;""!=i.department&&""!=i.position?this.modelService.getempName(i.department,i.position).subscribe(t=>{this.employees=t.employees}):""!=t&&""!=e&&this.modelService.getempName(t,e).subscribe(t=>{this.employees=t.employees})}fileChangeEvent(t){var e;t.target.files[0]&&(this.imageChangedEvent=t,t.target.files[0].size>1e7?this.isFileSizeTooHigh=!0:t.target.files[0].size>96e4?(this.isFileSizeTooHigh=!1,this.isFileResolutionHigh=!0):(this.isFileResolutionHigh=!1,(null===(e=this.visitorForm.controls.photo.errors)||void 0===e?void 0:e.pattern)||this.openCropBox(t.target.files[0])))}openCropBox(t){this.dialog.open(mt.a,{width:"40%",data:{payload:t}}).afterClosed().subscribe(t=>{var e,i,c;t&&(this.croppedImg=null===(e=t)||void 0===e?void 0:e.dataUrl,this.vist.imageDataUrl=null===(i=t)||void 0===i?void 0:i.dataUrl,this.vist.image=null===(c=t)||void 0===c?void 0:c.blobData)})}openDialog(){console.log("1234556"),this.dialog.open(Q,{width:"33%",disableClose:!0}).afterClosed().subscribe(t=>{console.log("The dialog was closed")})}openClick(){console.log("123000"),this.dialog.open(at,{width:"33%",disableClose:!0}).afterClosed().subscribe(t=>{console.log("The dialog was closed")})}clearLogo(){this.croppedImg="assets/images/camera.png",this.vist.imageDataUrl="",this.vist.image=""}create(){var t,e,i,c,o,r,s,n,a,l,d,m,p,u;if(this.findInvalidControls(),console.log(this.visitorForm.value),this.visitorForm.valid){var h=this.visitorForm.value;const g=this.severdatePipe.transform(null===(t=h)||void 0===t?void 0:t.fromDate),v=this.severdatePipe.transform(null===(e=h)||void 0===e?void 0:e.toDate);if(this.visitorForm.valid){let t=new FormData;t.append("visitor_id",this.visitorId),t.append("visitor_name",h.visitorsname),this.vist.image&&t.append("photo",this.vist.image),t.append("to_date",v||""),t.append("mobile_no",null===(i=h)||void 0===i?void 0:i.mobileno),t.append("purpose_of_visit",null===(c=h)||void 0===c?void 0:c.purposeofvisit),t.append("whom_visit",null===(o=h)||void 0===o?void 0:o.WhomGoing),t.append("from_time",null===(r=h)||void 0===r?void 0:r.startTime),t.append("roll_no",this.studentId),t.append("from_date",g||""),t.append("to_time",null===(s=h)||void 0===s?void 0:s.endTime),t.append("employee_code",this.getemployeeCode),t.append("department",null===(n=h)||void 0===n?void 0:n.department),t.append("position",null===(a=h)||void 0===a?void 0:a.position),t.append("emp_name",null===(l=h)||void 0===l?void 0:l.employee),t.append("device_name",null===(d=h)||void 0===d?void 0:d.devicename),t.append("description",null===(m=h)||void 0===m?void 0:m.description),t.append("mac_address",null===(p=h)||void 0===p?void 0:p.macaddress),t.append("gender",null===(u=h)||void 0===u?void 0:u.gender),t.append("attachment",this.indentyattachment),t.append("type","2"),this.loader.open(),this.modelService.save(t,"Update").subscribe(t=>{"success"==t.keyword?(this.deviceUpdate(),this.toaster.present(t.message,"")):"failed"==t.keyword&&(this.loader.close(),this.toaster.present(t.message,""))})}}else ut.a.fire({title:"Check Required",text:"Fill Mandatory Fields ",icon:"warning"})}deviceUpdate(){var t,e,i,c,o,r,s,n,a,l;const d=Object(vt.b)();var m=Object(ft.get)(d,"customer_id"),p=Object(ft.get)(d,"branch_id"),u=this.visitorForm.value;const h=this.severdatePipe.transform(null===(t=u)||void 0===t?void 0:t.fromDate),g=this.severdatePipe.transform(null===(e=u)||void 0===e?void 0:e.toDate);let v=new FormData;v.append("customerId",null!=m?m:""),v.append("schoolId",null!=p?p:""),v.append("mac",String(null===(i=u)||void 0===i?void 0:i.macaddress)),v.append("gender",null!=(c=String(u.gender))?c:""),v.append("visitorMobile",null!=(r=String(null===(o=u)||void 0===o?void 0:o.mobileno))?r:""),v.append("visitorName",null!=(n=String(null===(s=u)||void 0===s?void 0:s.visitorsname))?n:""),v.append("fromDate",null!=(a=String(h))?a:""),v.append("toDate",null!=(l=String(g))?l:""),this.modelService.createVisitor(v).subscribe(t=>{"Success"==t.keyword?this.deviceInsert():"Failed"==t.keyword&&this.loader.close()})}deviceInsert(){let t=new FormData;t.append("id",this.visitorId),t.append("type","visitor"),this.modelService.deviceStatus(t).subscribe(t=>{"success"==t.keyword?(this.loader.close(),this.router.navigate(["/school/visitors/list"])):this.loader.close()})}findInvalidControls(){const t=[],e=this.visitorForm.controls;for(const i in e)e[i].invalid&&t.push(i);return console.log(t,"invalid"),t}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(R.b),q.Xb(et.a),q.Xb(Z.a),q.Xb(tt.a),q.Xb(c.g),q.Xb(bt.a),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(N.a),q.Xb(j.a),q.Xb(ht.d),q.Xb(c.a))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-edit"]],features:[q.Fb([{provide:l.c,useClass:gt.b},{provide:l.f,useValue:gt.a},ht.d])],decls:189,vars:46,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"pl-8","primary-txt-color",3,"routerLink"],[1,"form_bg"],[1,"p-0"],[1,""],[1,"card-title-text"],[3,"formGroup"],["fxLayout","row wrap",1,"row","mt-24"],["fxFlex","100","fxFlex.gt-xs","55",1,""],["appearance","fill",1,"full-width"],["matInput","","name","visitorsname","placeholder","Visitors Name","formControlName","visitorsname","value","",1,"batch-name"],[4,"ngIf"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","23.5",1,""],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","67.5",1,""],["matInput","","name","mobileno","placeholder","","formControlName","mobileno","value",""],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","23",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","67",1,"mt-8"],["aria-label","Select an option","name","gender","formControlName","gender",1,"ml-15"],["value","Male",1,"mr-12",3,"checked"],["value","Female",1,"mr-12",3,"checked"],["value","Transgender",1,"mr-12",3,"checked"],["fxLayout","row wrap",1,"mt-28"],["fxFlex","100","fxFlex.gt-xs","23",1,""],["fxFlex","100","fxFlex.gt-xs","67",1,""],["type","file","formControlName","indentyAttach",2,"display","none",3,"change"],["docfileInput",""],["mat-raised-button","","class","btn-primary-bg ml-0","type","button",3,"click",4,"ngIf"],[1,"ml-4","mt-8"],["formControlName","IdentyName","readonly","",2,"display","none"],["class","ml-8",3,"click",4,"ngIf"],[1,"mt-8"],["style","color: red;",4,"ngIf"],["fxLayout","row wrap",1,"mt-32"],["fxFlex","100","fxFlex.gt-xs","100",1,""],["matInput","","name","purposeofvisit","placeholder","","formControlName","purposeofvisit","value",""],["fxFlex","100","fxFlex.gt-xs","37",1,""],["appearance","fill"],["matInput","","formControlName","fromDate",3,"matDatepicker","focus","click"],["matSuffix","",3,"for"],["picker5",""],["fxFlex","100","fxFlex.gt-xs","30",1,"pl-16"],["matInput","","placeholder","From date","formControlName","toDate",3,"matDatepicker","min","focus","click"],["picker1",""],["fxFlex","100","fxFlex.gt-xs","25",1,""],["appearance","fill",1,"stime"],["type","text","formControlName","startTime","matInput","","readonly","","value","",3,"ngxTimepicker","format"],["timePickerFrom",""],["fxFlex","100","fxFlex.gt-xs","15",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","27"],["appearance","fill",1,"etime"],["type","text","formControlName","endTime","matInput","","readonly","","value","",3,"min","ngxTimepicker","format"],["timePickerFroms",""],["fxLayout","row wrap",1,"mt-12","mb-28"],["aria-label","Select an option","name","report","formControlName","WhomGoing",1,"ml-15"],["value","1",1,"mr-12",3,"checked"],["value","2",1,"mr-12",3,"checked"],["value","3",1,"mr-12",3,"checked"],["value","4",3,"checked"],["class","student-block",4,"ngIf"],["class","employee-block",4,"ngIf"],["class","official-block mt-12",4,"ngIf"],["class","others-block mt-16",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","45",1,"preview_image","mt-8"],[1,"text-right"],["type","file","formControlName","photo",2,"display","none",3,"change"],["file",""],["width","100px","height","100px",3,"src","click"],["matRipple","","style","color:red",3,"click",4,"ngIf"],[1,"mt-28"],["fxLayout","row wrap",1,"mt-12"],["matInput","","name","devicename","formControlName","devicename","placeholder","","value",""],["matInput","","name","macaddress","formControlName","macaddress","placeholder","","value",""],["mat-raised-button","","type","button",1,"btn-primary-bg","ml-0",3,"click"],[1,"attachment"],[1,"ml-8",3,"click"],[1,"delete-icon"],[2,"color","red"],[1,"student-block"],["matInput","","name","rollno","formControlName","rollno","placeholder","","value","",1,"",3,"matAutocomplete","keyup"],["auto","matAutocomplete"],[3,"value","click",4,"ngFor","ngForOf"],[1,"primary-txt-color",3,"click"],[1,"mt-4"],["fxLayout","row wrap","class","mt-8",4,"ngIf"],[3,"value","click"],["fxFlex","100","fxFlex.gt-xs","23",1,"mr-4"],["fxFlex","100","fxFlex.gt-xs","75",1,""],[1,"mb-4"],[1,"employee-block"],["matInput","","name","empcode","placeholder","","formControlName","empcode",3,"matAutocomplete","keyup"],[1,"official-block","mt-12"],["formControlName","department"],["formControlName","position"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","23",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","67",1,"mt-12"],[1,"example-full-width"],["formControlName","employee"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"others-block","mt-16"],["matInput","","placeholder","","formControlName","description"],["matRipple","",2,"color","red",3,"click"],[1,"delete-icon","text-right",3,"ngStyle"]],template:function(t,e){if(1&t){const t=q.ec();q.dc(0,"div",0),q.dc(1,"button",1),q.lc("click",(function(t){return e.create()})),q.cd(2,"Update"),q.cc(),q.dc(3,"a",2),q.cd(4,"Discard"),q.cc(),q.cc(),q.dc(5,"div",3),q.dc(6,"mat-card",4),q.dc(7,"mat-card-title",5),q.dc(8,"div",6),q.cd(9,"Update Visitors"),q.cc(),q.Yb(10,"mat-divider"),q.cc(),q.dc(11,"mat-card-content"),q.dc(12,"form",7),q.dc(13,"div",8),q.dc(14,"div",9),q.dc(15,"mat-form-field",10),q.Yb(16,"input",11),q.ad(17,ne,2,0,"mat-error",12),q.ad(18,ae,2,0,"mat-error",12),q.cc(),q.dc(19,"div",13),q.dc(20,"div",14),q.dc(21,"label"),q.dc(22,"strong"),q.cd(23,"Mobile No"),q.cc(),q.dc(24,"span",15),q.cd(25,"*"),q.cc(),q.cc(),q.cc(),q.dc(26,"div",16),q.dc(27,"mat-form-field",10),q.Yb(28,"input",17),q.ad(29,le,2,0,"mat-error",12),q.ad(30,de,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(31,"div",18),q.dc(32,"div",19),q.dc(33,"label"),q.dc(34,"strong"),q.cd(35,"Gender"),q.cc(),q.dc(36,"span",15),q.cd(37,"*"),q.cc(),q.cc(),q.cc(),q.dc(38,"div",20),q.dc(39,"mat-radio-group",21),q.dc(40,"mat-radio-button",22),q.cd(41," Male "),q.cc(),q.dc(42,"mat-radio-button",23),q.cd(43,"Female"),q.cc(),q.dc(44,"mat-radio-button",24),q.cd(45,"Transgender"),q.cc(),q.cc(),q.ad(46,me,2,0,"mat-error",12),q.cc(),q.cc(),q.dc(47,"div",25),q.dc(48,"div",26),q.dc(49,"label"),q.dc(50,"strong"),q.cd(51,"Identity"),q.cc(),q.dc(52,"span",15),q.cd(53,"*"),q.cc(),q.cc(),q.cc(),q.dc(54,"div",27),q.dc(55,"input",28,29),q.lc("change",(function(t){return e.onChangeFile(t)})),q.cc(),q.ad(57,pe,4,0,"button",30),q.dc(58,"label",31),q.cd(59),q.cc(),q.Yb(60,"input",32),q.ad(61,ue,3,0,"a",33),q.dc(62,"div",34),q.ad(63,he,3,0,"mat-error",12),q.ad(64,ge,3,0,"mat-error",12),q.ad(65,ve,2,0,"p",35),q.dc(66,"span"),q.cd(67,"Format : JPG, JPEG, PNG, BMP, PDF"),q.cc(),q.Yb(68,"br"),q.dc(69,"span"),q.cd(70,"File Size : Maximum 2MB"),q.cc(),q.Yb(71,"br"),q.cc(),q.cc(),q.cc(),q.dc(72,"div",36),q.dc(73,"div",37),q.dc(74,"div",18),q.dc(75,"div",26),q.dc(76,"label"),q.dc(77,"strong"),q.cd(78,"Purpose of Visit"),q.cc(),q.dc(79,"span",15),q.cd(80,"*"),q.cc(),q.cc(),q.cc(),q.dc(81,"div",27),q.dc(82,"mat-form-field",10),q.Yb(83,"input",38),q.ad(84,fe,2,0,"mat-error",12),q.ad(85,be,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(86,"div",18),q.dc(87,"div",19),q.dc(88,"label"),q.dc(89,"strong"),q.cd(90,"Date"),q.cc(),q.dc(91,"span",15),q.cd(92,"*"),q.cc(),q.cc(),q.cc(),q.dc(93,"div",39),q.dc(94,"mat-form-field",40),q.dc(95,"mat-label"),q.cd(96,"From Date"),q.cc(),q.dc(97,"input",41),q.lc("focus",(function(e){return q.Sc(t),q.Oc(100).open()}))("click",(function(e){return q.Sc(t),q.Oc(100).open()})),q.cc(),q.Yb(98,"mat-datepicker-toggle",42),q.Yb(99,"mat-datepicker",null,43),q.ad(101,ye,2,0,"mat-error",12),q.cc(),q.cc(),q.dc(102,"div",44),q.dc(103,"mat-form-field",10),q.dc(104,"mat-label"),q.cd(105,"To Date"),q.cc(),q.dc(106,"input",45),q.lc("focus",(function(e){return q.Sc(t),q.Oc(109).open()}))("click",(function(e){return q.Sc(t),q.Oc(109).open()})),q.cc(),q.Yb(107,"mat-datepicker-toggle",42),q.Yb(108,"mat-datepicker",null,46),q.ad(110,Fe,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(111,"div",13),q.dc(112,"div",26),q.dc(113,"label"),q.dc(114,"strong"),q.cd(115,"Start Time"),q.cc(),q.dc(116,"span",15),q.cd(117,"*"),q.cc(),q.cc(),q.cc(),q.dc(118,"div",47),q.dc(119,"mat-form-field",48),q.Yb(120,"input",49),q.Yb(121,"ngx-material-timepicker",null,50),q.ad(123,xe,2,0,"mat-error",12),q.cc(),q.cc(),q.dc(124,"div",51),q.dc(125,"label"),q.dc(126,"strong"),q.cd(127,"End Time"),q.cc(),q.dc(128,"span",15),q.cd(129,"*"),q.cc(),q.cc(),q.cc(),q.dc(130,"div",52),q.dc(131,"mat-form-field",53),q.Yb(132,"input",54),q.Yb(133,"ngx-material-timepicker",null,55),q.ad(135,we,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.dc(136,"div",56),q.dc(137,"div",26),q.dc(138,"label"),q.dc(139,"strong"),q.cd(140,"Whom going to visit"),q.cc(),q.dc(141,"span",15),q.cd(142,"*"),q.cc(),q.cc(),q.cc(),q.dc(143,"div",27),q.dc(144,"mat-radio-group",57),q.dc(145,"mat-radio-button",58),q.cd(146,"Student "),q.cc(),q.dc(147,"mat-radio-button",59),q.cd(148,"Employee"),q.cc(),q.dc(149,"mat-radio-button",60),q.cd(150,"Official"),q.cc(),q.dc(151,"mat-radio-button",61),q.cd(152,"Others"),q.cc(),q.ad(153,Se,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.ad(154,Ge,25,7,"div",62),q.ad(155,Ve,25,7,"div",63),q.ad(156,Me,39,6,"div",64),q.ad(157,Re,12,1,"div",65),q.cc(),q.cc(),q.cc(),q.dc(158,"div",66),q.dc(159,"div",67),q.dc(160,"input",68,69),q.lc("change",(function(t){return e.fileChangeEvent(t)})),q.cc(),q.dc(162,"img",70),q.lc("click",(function(e){return q.Sc(t),q.Oc(161).click()})),q.cc(),q.ad(163,ze,3,2,"a",71),q.ad(164,Xe,3,0,"mat-error",12),q.ad(165,Le,3,0,"mat-error",12),q.cc(),q.dc(166,"h3",72),q.dc(167,"strong"),q.dc(168,"u"),q.cd(169,"Device Info"),q.cc(),q.cc(),q.cc(),q.dc(170,"div",73),q.dc(171,"div",26),q.dc(172,"label"),q.dc(173,"strong"),q.cd(174,"Device Name"),q.cc(),q.cc(),q.cc(),q.dc(175,"div",27),q.dc(176,"mat-form-field",10),q.Yb(177,"input",74),q.cc(),q.cc(),q.cc(),q.dc(178,"div",13),q.dc(179,"div",26),q.dc(180,"label"),q.dc(181,"strong"),q.cd(182,"Device Mac"),q.cc(),q.dc(183,"span",15),q.cd(184,"*"),q.cc(),q.cc(),q.cc(),q.dc(185,"div",27),q.dc(186,"mat-form-field",10),q.Yb(187,"input",75),q.ad(188,Ye,2,0,"mat-error",12),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc()}if(2&t){const t=q.Oc(100),i=q.Oc(109),c=q.Oc(122),o=q.Oc(134);q.Gb(3),q.yc("routerLink","/school/visitors/list"),q.Gb(9),q.yc("formGroup",e.visitorForm),q.Gb(5),q.yc("ngIf",null==e.visitorForm.controls.visitorsname.errors?null:e.visitorForm.controls.visitorsname.errors.required),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.visitorsname.errors?null:e.visitorForm.controls.visitorsname.errors.pattern),q.Gb(11),q.yc("ngIf",null==e.visitorForm.controls.mobileno.errors?null:e.visitorForm.controls.mobileno.errors.required),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.mobileno.errors?null:e.visitorForm.controls.mobileno.errors.pattern),q.Gb(10),q.zc("checked","Male"===e.selectedGender),q.Gb(2),q.zc("checked","Female"===e.selectedGender),q.Gb(2),q.zc("checked","Transgender"===e.selectedGender),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.gender.errors?null:e.visitorForm.controls.gender.errors.required)&&e.visitorForm.controls.gender.touched),q.Gb(11),q.yc("ngIf",!(null!=e.visitorForm.controls.IdentyName&&e.visitorForm.controls.IdentyName.value)),q.Gb(2),q.dd(null==e.visitorForm.controls.IdentyName?null:e.visitorForm.controls.IdentyName.value),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.IdentyName?null:e.visitorForm.controls.IdentyName.value)||(null==e.visitorForm.controls.indentyAttach?null:null==e.visitorForm.controls.indentyAttach.errors?null:e.visitorForm.controls.indentyAttach.errors.pattern)||e.isAttachFileSizeTooHigh),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.indentyAttach.errors?null:e.visitorForm.controls.indentyAttach.errors.required)&&e.visitorForm.controls.indentyAttach.touched),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.indentyAttach?null:null==e.visitorForm.controls.indentyAttach.errors?null:e.visitorForm.controls.indentyAttach.errors.pattern),q.Gb(1),q.yc("ngIf",e.isAttachFileSizeTooHigh),q.Gb(19),q.yc("ngIf",null==e.visitorForm.controls.purposeofvisit.errors?null:e.visitorForm.controls.purposeofvisit.errors.required),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.purposeofvisit.errors?null:e.visitorForm.controls.purposeofvisit.errors.pattern),q.Gb(12),q.yc("matDatepicker",t),q.Gb(1),q.yc("for",t),q.Gb(3),q.yc("ngIf",null==e.visitorForm.controls.fromDate.errors?null:e.visitorForm.controls.fromDate.errors.required),q.Gb(5),q.yc("matDatepicker",i)("min",e.visitorForm.controls.fromDate.value),q.Gb(1),q.yc("for",i),q.Gb(3),q.yc("ngIf",null==e.visitorForm.controls.toDate.errors?null:e.visitorForm.controls.toDate.errors.required),q.Gb(10),q.yc("ngxTimepicker",c)("format",e.timeFormat),q.Gb(3),q.yc("ngIf",(null==e.visitorForm.controls?null:null==e.visitorForm.controls.startTime?null:null==e.visitorForm.controls.startTime.errors?null:e.visitorForm.controls.startTime.errors.required)&&e.visitorForm.controls.startTime.touched),q.Gb(9),q.yc("min",e.visitorForm.controls.startTime.value?e.visitorForm.controls.startTime.value:12)("ngxTimepicker",o)("format",e.timeFormat),q.Gb(3),q.yc("ngIf",(null==e.visitorForm.controls.endTime?null:null==e.visitorForm.controls.endTime.errors?null:e.visitorForm.controls.endTime.errors.required)&&e.visitorForm.controls.endTime.touched),q.Gb(10),q.zc("checked",1===e.visitorForm.controls.WhomGoing.value),q.Gb(2),q.zc("checked",2===e.visitorForm.controls.WhomGoing.value),q.Gb(2),q.zc("checked",3===e.visitorForm.controls.WhomGoing.value),q.Gb(2),q.zc("checked",4===e.visitorForm.controls.WhomGoing.value),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.WhomGoing.errors?null:e.visitorForm.controls.WhomGoing.errors.required)&&e.visitorForm.controls.WhomGoing.touched),q.Gb(1),q.yc("ngIf","1"===e.visitorForm.controls.WhomGoing.value||1===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","2"===e.visitorForm.controls.WhomGoing.value||2===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","3"===e.visitorForm.controls.WhomGoing.value||3===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","4"===e.visitorForm.controls.WhomGoing.value||4===e.visitorForm.controls.WhomGoing.value),q.Gb(5),q.yc("src",e.croppedImg,q.Vc),q.Gb(1),q.yc("ngIf","assets/images/camera.png"!==e.croppedImg),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.photo.errors?null:e.visitorForm.controls.photo.errors.pattern),q.Gb(1),q.yc("ngIf",e.isFileSizeTooHigh),q.Gb(23),q.yc("ngIf",(null==e.visitorForm.controls.macaddress.errors?null:e.visitorForm.controls.macaddress.errors.required)&&e.visitorForm.controls.macaddress.touched)}},directives:[s.a,c.j,n.a,n.f,B.a,n.c,r.D,r.u,r.k,z.c,z.a,X.b,p.b,r.c,r.t,r.i,o.o,g.b,g.a,X.e,d.b,d.d,X.f,d.a,yt.d,yt.a,X.a,m.a,G.c,G.a,o.n,l.p,C.a,o.p,Ft.b],pipes:[_.a],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.batch-name[_ngcontent-%COMP%]{font-size:24px}mat-checkbox[_ngcontent-%COMP%]{margin-right:24px}.preview_image[_ngcontent-%COMP%]{height:100px}image-cropper[_ngcontent-%COMP%]{width:120px;height:113px}.mt13[_ngcontent-%COMP%]{margin-top:-14px}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%;width:85px}.ml-0[_ngcontent-%COMP%]{margin-left:0!important}"],data:{animation:[Object(O.o)("detailExpand",[Object(O.l)("collapsed",Object(O.m)({height:"0px",minHeight:"0",visibility:"hidden"})),Object(O.l)("expanded",Object(O.m)({height:"*",visibility:"visible"})),Object(O.n)("expanded <=> collapsed",Object(O.e)("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}}),t})();var We=i("0EQZ"),He=i("Kj3r"),Ue=i("/uUt"),Je=i("xgIS");class Ke{constructor(){this.limit=10,this.offset=0,this.sortByKey="",this.sortByType="",this.searchWith="",this.filterVisit="",this.filterDate="",this.filterStatus="",this.totalSize=0}}var Qe=i("VxG0"),Ze=i("qc5V");function ti(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please select any one type "),q.cc())}function ei(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the mobile no "),q.cc())}function ii(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid mobile no "),q.cc())}function ci(t,e){if(1&t&&(q.dc(0,"div",13),q.dc(1,"div",14),q.dc(2,"mat-form-field",15),q.Yb(3,"input",16),q.ad(4,ei,2,0,"mat-error",9),q.ad(5,ii,2,0,"mat-error",9),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(4),q.yc("ngIf",(null==t.exitingForm.controls.mobileno.errors?null:t.exitingForm.controls.mobileno.errors.required)&&t.exitingForm.controls.mobileno.touched),q.Gb(1),q.yc("ngIf",(null==t.exitingForm.controls.mobileno.errors?null:t.exitingForm.controls.mobileno.errors.pattern)&&t.exitingForm.controls.mobileno.touched)}}let oi=(()=>{class t{constructor(t,e,i,c,o,r,s,n,a){this.data=t,this.dialogRef=e,this.dialog=i,this.router=c,this.formBuilder=o,this.loader=r,this.toaster=s,this.modelService=n,this.studentService=a,this.console=console,this.empty=[]}ngOnInit(){this.form()}form(){this.exitingForm=new r.j({type:new r.g("",r.B.required),mobileno:new r.g("")}),this.exitingForm.get("type").valueChanges.subscribe(t=>{1==t?(this.exitingForm.get("mobileno").setValidators([r.B.required,r.B.pattern(Object(lt.b)().app.validators.tenDigitInteger)]),this.exitingForm.get("mobileno").markAsDirty()):(this.exitingForm.get("mobileno").clearValidators(),this.exitingForm.get("mobileno")),this.exitingForm.get("mobileno")})}get scheduleFormControl(){return this.exitingForm.controls}exitingvisiter(){if(this.exitingForm.valid){var t=this.exitingForm.value;"1"==t.type?(this.modelService.recordAddedSubject.next(this.empty),this.studentService.recordAddedStudentSubject.next(this.empty),this.router.navigate(["/school/visitors/create"]),this.dialogRef.close(!0)):"2"==t.type&&(this.loader.open(),this.modelService.exitingVister(t.mobileno).subscribe(t=>{this.data=t,"success"==this.data.keyword?(this.modelService.recordAddedvisitors.next(t.visitors),this.loader.close(),this.dialogRef.close(!0),this.router.navigate(["/school/visitors/existing-visitor"]),this.toaster.present(this.data.message,"")):(this.loader.close(),this.toaster.present(this.data.message,""))}))}}discard(){this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(R.a),q.Xb(R.f),q.Xb(R.b),q.Xb(c.g),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(j.a),q.Xb(N.a))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-create"]],decls:20,vars:3,consts:[[1,"p-0","fees-type"],[1,""],[1,"card-title-text"],[1,"mb-0","pb-4"],[3,"formGroup"],["fxFlex","100","fxFlex.gt-xs","100",1,"flex-row","mt-16","mb-12"],["aria-label","Select an option","name","report","formControlName","type",1,"ml-15"],["value","1","name","visitors",1,"mr-40"],["value","2","name","visitors",1,"mr-40"],[4,"ngIf"],["fxLayout","row wrap","class","row mt-24",4,"ngIf"],["mat-raised-button","","color","primary",1,"btn-primary-bg","mr-12",3,"click"],[1,"pl-8","primary-txt-color",3,"click"],["fxLayout","row wrap",1,"row","mt-24"],["fxFlex","100","fxFlex.gt-xs","100",1,""],["appearance","fill",1,"full-width"],["matInput","","name","mobileno","placeholder","Mobile No","formControlName","mobileno","value","",1,"f24"]],template:function(t,e){1&t&&(q.dc(0,"mat-card",0),q.dc(1,"mat-card-title",1),q.dc(2,"div",2),q.cd(3,"Type"),q.cc(),q.Yb(4,"mat-divider"),q.cc(),q.dc(5,"mat-card-content",3),q.dc(6,"form",4),q.dc(7,"div",5),q.dc(8,"mat-radio-group",6),q.dc(9,"mat-radio-button",7),q.cd(10,"New Visitors"),q.cc(),q.dc(11,"mat-radio-button",8),q.cd(12,"Existing Visitors"),q.cc(),q.ad(13,ti,2,0,"mat-error",9),q.cc(),q.ad(14,ci,6,2,"div",10),q.cc(),q.cc(),q.cc(),q.dc(15,"mat-card-footer"),q.dc(16,"button",11),q.lc("click",(function(t){return e.exitingvisiter()})),q.cd(17,"Submit"),q.cc(),q.dc(18,"a",12),q.lc("click",(function(t){return e.discard()})),q.cd(19,"Discard"),q.cc(),q.cc(),q.cc()),2&t&&(q.Gb(6),q.yc("formGroup",e.exitingForm),q.Gb(7),q.yc("ngIf",(null==e.exitingForm.controls.type.errors?null:e.exitingForm.controls.type.errors.required)&&e.exitingForm.controls.type.touched),q.Gb(1),q.yc("ngIf","2"==e.scheduleFormControl.type.value))},directives:[n.a,n.f,B.a,n.c,r.D,r.u,r.k,z.a,g.b,r.t,r.i,g.a,o.o,n.d,s.a,X.a,z.c,X.b,p.b,r.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f16[_ngcontent-%COMP%]{font-size:16px}.checked-section[_ngcontent-%COMP%]{background:#019fa2!important;color:#fff!important;box-shadow:0 2px 1px 0 #222!important}.unchecked-section[_ngcontent-%COMP%]{background:hsla(0,0%,80%,.3686274509803922)!important;border:1px solid #9f9c9c!important;color:#222!important}.fees-type[_ngcontent-%COMP%] .mat-radio-container[_ngcontent-%COMP%]{zoom:1.4!important}.f24[_ngcontent-%COMP%]{font-size:24px}"]}),t})();var ri=i("Qu3c");const si=["filterInput"];function ni(t,e){if(1&t){const t=q.ec();q.dc(0,"button",44),q.lc("click",(function(e){return q.Sc(t),q.pc().openClick()})),q.cd(1,"Create"),q.cc()}}function ai(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-checkbox",14),q.lc("change",(function(i){q.Sc(t);const c=e.$implicit;return q.pc().onDateChange(i.checked,c.from_date)})),q.cd(1),q.qc(2,"displayDate"),q.cc()}if(2&t){const t=e.$implicit;q.Gb(1),q.dd(q.rc(2,1,t.from_date))}}function li(t,e){if(1&t){const t=q.ec();q.dc(0,"button",45),q.lc("click",(function(e){q.Sc(t);const i=q.pc();return i.value="",i.applyFilter("")})),q.dc(1,"mat-icon"),q.cd(2,"close"),q.cc(),q.cc()}}function di(t,e){if(1&t){const t=q.ec();q.dc(0,"th",46),q.dc(1,"mat-checkbox",47),q.lc("change",(function(e){q.Sc(t);const i=q.pc();return e?i.masterToggle():null})),q.cc(),q.cc()}if(2&t){const t=q.pc();q.Gb(1),q.yc("checked",t.selection.hasValue()&&t.isAllSelected())("indeterminate",t.selection.hasValue()&&!t.isAllSelected())}}function mi(t,e){if(1&t){const t=q.ec();q.dc(0,"td",48),q.dc(1,"mat-checkbox",49),q.lc("click",(function(e){return q.Sc(t),e.stopPropagation()}))("change",(function(i){q.Sc(t);const c=e.$implicit,o=q.pc();return i?o.selection.toggle(c):null})),q.cc(),q.cc()}if(2&t){const t=e.$implicit,i=q.pc();q.Gb(1),q.yc("checked",i.selection.isSelected(t))}}function pi(t,e){1&t&&(q.dc(0,"th",50),q.dc(1,"b"),q.cd(2,"Date"),q.cc(),q.cc())}function ui(t,e){if(1&t&&(q.dc(0,"td",51),q.cd(1),q.qc(2,"displayDate"),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.ed(" ",q.rc(2,1,t.fromDate)," ")}}function hi(t,e){1&t&&(q.dc(0,"th",52),q.dc(1,"b"),q.cd(2,"Visitor's Name"),q.cc(),q.cc())}function gi(t,e){if(1&t&&(q.dc(0,"td",51),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.ed(" ",t.visitorName," ")}}function vi(t,e){1&t&&(q.dc(0,"th",53),q.dc(1,"b"),q.cd(2,"Mobile No"),q.cc(),q.cc())}function fi(t,e){if(1&t&&(q.dc(0,"td",51),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.ed(" ",t.mobileNo," ")}}function bi(t,e){1&t&&(q.dc(0,"th",54),q.cd(1," Purpose of Visit "),q.cc())}function yi(t,e){if(1&t&&(q.dc(0,"td",51),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.ed(" ",t.purposeOfVisit," ")}}function Fi(t,e){1&t&&(q.dc(0,"th",55),q.cd(1," Whom going to Visit "),q.cc())}function xi(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Student"),q.cc())}function wi(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Employee"),q.cc())}function Si(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Official"),q.cc())}function ki(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Others"),q.cc())}function Ii(t,e){if(1&t&&(q.dc(0,"td",51),q.ad(1,xi,2,0,"lable",42),q.ad(2,wi,2,0,"lable",42),q.ad(3,Si,2,0,"lable",42),q.ad(4,ki,2,0,"lable",42),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.yc("ngIf",1==t.whomVisit),q.Gb(1),q.yc("ngIf",2==t.whomVisit),q.Gb(1),q.yc("ngIf",3==t.whomVisit),q.Gb(1),q.yc("ngIf",4==t.whomVisit)}}function Ci(t,e){1&t&&(q.dc(0,"th",56),q.cd(1," Mac"),q.cc())}function Gi(t,e){if(1&t&&(q.dc(0,"td",51),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.ed(" ",t.macAddress," ")}}function _i(t,e){if(1&t){const t=q.ec();q.dc(0,"button",60),q.lc("click",(function(e){return q.Sc(t),q.pc(2).action("view")})),q.dc(1,"mat-icon",61),q.cd(2,"visibility"),q.cc(),q.dc(3,"span"),q.cd(4,"View"),q.cc(),q.cc()}}function Oi(t,e){if(1&t){const t=q.ec();q.dc(0,"button",60),q.lc("click",(function(e){return q.Sc(t),q.pc(2).action("edit")})),q.dc(1,"mat-icon",62),q.cd(2,"edit"),q.cc(),q.dc(3,"span"),q.cd(4,"Edit"),q.cc(),q.cc()}}function Di(t,e){if(1&t){const t=q.ec();q.dc(0,"button",60),q.lc("click",(function(e){return q.Sc(t),q.pc(2).revoke(3)})),q.dc(1,"mat-icon",63),q.cd(2,"settings_backup_restore"),q.cc(),q.dc(3,"span"),q.cd(4,"Revoke Visitor Card"),q.cc(),q.cc()}}function Vi(t,e){if(1&t){const t=q.ec();q.dc(0,"button",60),q.lc("click",(function(e){return q.Sc(t),q.pc(2).setStaus(1)})),q.dc(1,"mat-icon",64),q.cd(2,"check"),q.cc(),q.dc(3,"span"),q.cd(4,"Active"),q.cc(),q.cc()}}function Ni(t,e){if(1&t){const t=q.ec();q.dc(0,"button",60),q.lc("click",(function(e){return q.Sc(t),q.pc(2).setStaus(0)})),q.dc(1,"mat-icon",65),q.cd(2,"block"),q.cc(),q.dc(3,"span"),q.cd(4,"Inactive"),q.cc(),q.cc()}}function Pi(t,e){if(1&t){const t=q.ec();q.dc(0,"button",60),q.lc("click",(function(e){return q.Sc(t),q.pc(2).setStaus(2)})),q.dc(1,"mat-icon",66),q.cd(2,"delete"),q.cc(),q.dc(3,"span"),q.cd(4,"Delete"),q.cc(),q.cc()}}const Ai=function(){return["visitors"]},Ti=function(){return["visitors_view"]},Ei=function(){return["visitors_update"]},ji=function(){return["visitors_revoke"]},Mi=function(){return["visitors_status"]},qi=function(){return["visitors_delete"]};function Ri(t,e){if(1&t&&(q.dc(0,"th",55),q.cd(1," Status "),q.dc(2,"mat-icon",57),q.cd(3,"more_vert"),q.cc(),q.dc(4,"mat-menu",null,58),q.ad(6,_i,5,0,"button",59),q.ad(7,Oi,5,0,"button",59),q.ad(8,Di,5,0,"button",59),q.ad(9,Vi,5,0,"button",59),q.ad(10,Ni,5,0,"button",59),q.ad(11,Pi,5,0,"button",59),q.cc(),q.cc()),2&t){const t=q.Oc(5),e=q.pc();q.Gb(2),q.yc("matMenuTriggerFor",t),q.Gb(4),q.yc("ngIf",e.permission.hasPermission(q.Ec(7,Ai),q.Ec(8,Ti))),q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(9,Ai),q.Ec(10,Ei))),q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(11,Ai),q.Ec(12,ji))),q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(13,Ai),q.Ec(14,Mi))),q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(15,Ai),q.Ec(16,Mi))),q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(17,Ai),q.Ec(18,qi)))}}function Bi(t,e){1&t&&(q.dc(0,"label",71),q.cd(1,"Active"),q.cc())}function zi(t,e){1&t&&(q.dc(0,"label",72),q.cd(1,"Inactive"),q.cc())}function Xi(t,e){1&t&&(q.dc(0,"label",73),q.cd(1,"Revoked"),q.cc())}function Li(t,e){1&t&&(q.dc(0,"label",74),q.cd(1,"Incompleted"),q.cc())}function Yi(t,e){if(1&t){const t=q.ec();q.dc(0,"span"),q.dc(1,"mat-icon",75),q.lc("click",(function(e){q.Sc(t);const i=q.pc().$implicit;return q.pc().deviceCreate(i)})),q.cd(2,"refresh"),q.cc(),q.cc()}}function $i(t,e){if(1&t&&(q.dc(0,"td",51),q.ad(1,Bi,2,0,"label",67),q.ad(2,zi,2,0,"label",68),q.ad(3,Xi,2,0,"label",69),q.ad(4,Li,2,0,"label",70),q.ad(5,Yi,3,0,"span",42),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.yc("ngIf",1==t.status),q.Gb(1),q.yc("ngIf",0==t.status),q.Gb(1),q.yc("ngIf",3==t.status),q.Gb(1),q.yc("ngIf",4==t.status),q.Gb(1),q.yc("ngIf",4==t.status)}}function Wi(t,e){1&t&&q.Yb(0,"tr",76)}function Hi(t,e){1&t&&q.Yb(0,"tr",77)}function Ui(t,e){1&t&&(q.bc(0),q.dc(1,"p",78),q.dc(2,"b"),q.cd(3,"No Data Found..."),q.cc(),q.cc(),q.ac())}const Ji=function(){return["visitors_create"]},Ki=function(){return{margin:"8px 15px 0px 15px"}},Qi=function(){return{"flex-flow":"column"}};let Zi=(()=>{class t{constructor(t,e,i,c,o,r,s){this.router=t,this.modelService=e,this.toaster=i,this.loader=c,this.permission=o,this.apiserv=r,this.dialog=s,this.displayedColumns=["select","visitordate","visitorname","mobileno","purposevisit","whomgoingvisit","mac","status"],this.dataSource=new k.o,this.selection=new We.c(!0,[]),this.currentPageDataSize=0,this.pageSizeOptions=0,this.vehicleSearch="",this.vehicleList=new Set,this.selectedVisit=new Set,this.selectedDate=new Set,this.selectedStatus=new Set,this.dates=[],this.paginationDTO=new Ke,this.pageSizeOptions=Object(lt.b)().app.table.filtering.pageSizeOptions}ngOnInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}ngAfterViewInit(){this.overAll(),this.getDate()}overAll(){Object(Je.a)(this.filter.nativeElement,"keyup").pipe(Object(He.a)(150),Object(Ue.a)()).subscribe(()=>{if(!this.dataSource)return;let t=this.filter.nativeElement.value;t=t.trim(),t=t.toLowerCase(),this.paginationDTO.searchWith=t,this.getData()}),this.getData()}onDateChange(t,e){t?this.selectedDate.add(e):this.selectedDate.delete(e);let i=Array.from(this.selectedDate).length<=0;this.paginationDTO.filterDate=i?"":JSON.stringify(Array.from(this.selectedDate)),this.getData()}onWhomChange(t,e){t?this.selectedVisit.add(e):this.selectedVisit.delete(e);let i=Array.from(this.selectedVisit).length<=0;this.paginationDTO.filterVisit=i?"":JSON.stringify(Array.from(this.selectedVisit)),this.getData()}getDate(){this.modelService.loadDate().subscribe(t=>{this.dates=t.data,console.log(this.dates)})}onStatusChange(t,e){t?this.selectedStatus.add(e):this.selectedStatus.delete(e);let i=Array.from(this.selectedStatus).length<=0;this.paginationDTO.filterStatus=i?"":JSON.stringify(Array.from(this.selectedStatus)),this.getData()}openClick(){this.dialog.open(oi,{width:"40%",disableClose:!0,autoFocus:!1}).afterClosed().subscribe(t=>{})}sortData(t){this.paginationDTO.sortByKey=t.active,this.paginationDTO.sortByType=t.direction.toUpperCase(),this.getData()}getData(){this.modelService.getList(this.paginationDTO).subscribe(t=>{this.paginationDTO.totalSize=t.pageSize,this.currentPageDataSize=t.visitors.length,this.dataSource=new k.o(t.visitors)})}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.paginationDTO.searchWith=t,this.getData()}onPaginateChange(t){this.paginationDTO.offset=t.pageIndex,this.paginationDTO.limit=t.pageSize,this.getData()}action(t){1==this.getCheckedValue().length&&"3"==this.getCheckedValue()[0].status&&"edit"==t?ut.a.fire({icon:"error",title:"Visitor Status",text:"Visitor Revoked So can not update!"}):1==this.getCheckedValue().length?ut.a.fire({title:"edit"==t?"Update Visitor":"View Visitor",text:"Are you sure? You want to "+t+" !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, "+t+" it!"}).then(e=>{if(e.value){var i=this.getCheckedValue()[0].visitorId,c=this.getCheckedValue()[0].mobileNo,o=this.getCheckedValue()[0].status;this.router.navigate(["edit"==t?`school/visitors/edit/${i}`:`school/visitors/view/${i}/${c}/${o}`])}}):ut.a.fire({icon:"error",title:"edit"==t?"Update Visitor":"View Visitor",text:"Please Select One Visitor!"})}revoke(t){let e="";3==t&&(e="revoke"),1==this.getCheckedValue().length?this.isMultiStatus(String(t))?this.statusAlert(e,t):ut.a.fire({icon:"error",title:"Visitor Status",text:"Its already revoked!"}):ut.a.fire({icon:"error",title:"Change Visitor Status",text:"Please Select One Visitor!"})}statusAlert(t,e){ut.a.fire({title:"Confirm?",text:"Are you sure? You want to "+t+" it !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, "+t+" it!"}).then(t=>{t.value&&this.saveStatus(e)})}setStaus(t){let e="";if(1==t?e="active":0==t?e="Inactive":2==t&&(e="delete"),this.getCheckedValue().length>=1){let i=1==t?0:1;2==t?this.statusAlert(e,t):this.getCheckedValue().length>=1&&"4"==this.getCheckedValue()[0].status?ut.a.fire({icon:"error",title:"Visitor Status",text:"Visitor information incompleted So can not "+e+"!"}):this.getCheckedValue().length>=1&&"3"==this.getCheckedValue()[0].status?ut.a.fire({icon:"error",title:"Visitor Status",text:3==t?"Visitor Already Revoked !":"Visitor Revoked So can not "+e+"!"}):this.isMultiStatus(String(i))?ut.a.fire({icon:"error",title:"Visitor Status",text:"Please select the "+(1==t?"Inactive":"active")+" status of the Visitor!"}):this.statusAlert(e,t)}else ut.a.fire({icon:"error",title:2==t?"Delete Visitor":"Change Visitor Status",text:"Please Select Altleast One Visitor!"})}saveStatus(t){let e=[];this.getCheckedValue().forEach(t=>{e.push(t.visitorId)});let i=new FormData;i.append("id",JSON.stringify(e)),i.append("status",String(t)),this.loader.open(),this.modelService.status(i,t).subscribe(e=>{let i=e;if("success"==i.keyword){if(2==t){let t=[];this.getCheckedValue().forEach(e=>{t.push(e.mobileNo)}),this.delete(t)}this.refreshTable(2==t?"delete":"other"),this.loader.close(),this.toaster.present(i.message)}else this.loader.close(),this.toaster.present(i.message)})}delete(t){var e;const i=Object(vt.b)();var c=Object(ft.get)(i,"customer_id"),o=Object(ft.get)(i,"branch_id");let r=new FormData;r.append("customerId",null!=c?c:""),r.append("schoolId",null!=o?o:""),r.append("visitorMobiles",null!=(e=String(t))?e:""),this.modelService.delete(r).subscribe(t=>{})}deviceCreate(t){var e,i,c,o,r,s,n,a;const l=Object(vt.b)();var d=Object(ft.get)(l,"customer_id"),m=Object(ft.get)(l,"branch_id");let p=new FormData;p.append("customerId",null!=d?d:""),p.append("schoolId",null!=m?m:""),p.append("mac",String(null===(e=t)||void 0===e?void 0:e.macAddress)),p.append("gender",null!=(i=String(t.gender))?i:""),p.append("fromDate",null!=(c=String(t.fromDate))?c:""),p.append("toDate",null!=(o=String(t.toDate))?o:""),p.append("visitorMobile",null!=(s=String(null===(r=t)||void 0===r?void 0:r.mobileNo))?s:""),p.append("visitorName",null!=(a=String(null===(n=t)||void 0===n?void 0:n.visitorName))?a:""),this.modelService.createVisitor(p).subscribe(e=>{"Success"==e.keyword?this.deviceInsert(t):"Failed"==e.keyword&&this.loader.close()})}deviceInsert(t){let e=new FormData;e.append("id",t.visitorId),e.append("type","visitor"),this.modelService.deviceStatus(e).subscribe(t=>{"success"==t.keyword?(this.loader.close(),this.getData()):this.loader.close()})}refreshTable(t){this.filter.nativeElement.value="",this.value="",this.paginationDTO.offset=this.paginator.pageIndex,this.paginationDTO.limit=this.paginator.pageSize,this.paginationDTO.totalSize=this.paginator.length,"add"==t&&(this.paginationDTO.offset=0),"delete"==t&&this.getCheckedValue().length==this.currentPageDataSize&&(this.paginationDTO.offset=this.paginator.pageIndex>0?this.paginator.pageIndex-1:0),this.getData(),this.paginator.pageIndex=this.paginationDTO.offset,this.paginator.pageSize=this.paginationDTO.limit,this.paginator.length=this.paginationDTO.totalSize,this.selection=new We.c(!0,[])}isAllSelected(){return this.selection.selected.length===this.dataSource.data.length}masterToggle(){this.isAllSelected()?this.selection.clear():this.dataSource.data.forEach(t=>this.selection.select(t))}getCheckedValue(){let t=[];return this.dataSource.connect().value.forEach(e=>{this.selection.isSelected(e)&&t.push(e)}),t}isMultiStatus(t){return this.getCheckedValue().filter(e=>{if(e.status!=t)return e}).length>0}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(c.g),q.Xb(j.a),q.Xb(A.a),q.Xb(P.a),q.Xb(Qe.a),q.Xb(Ze.a),q.Xb(R.b))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-list"]],viewQuery:function(t,e){var i;1&t&&(q.Yc(w.a,!0),q.Yc(S.a,!0),q.md(si,!0)),2&t&&(q.Nc(i=q.mc())&&(e.paginator=i.first),q.Nc(i=q.mc())&&(e.sort=i.first),q.Nc(i=q.mc())&&(e.filter=i.first))},decls:82,vars:23,consts:[["fxLayout","row wrap",1,"pagewrap"],["fxFlex","100","fxFlex.gt-xs","50",1,"pr-1"],[1,"example-button-row","mt-10"],["mat-flat-button","","class","btn-primary-bg",3,"click",4,"ngIf"],["mat-button","","color","primary",3,"matMenuTriggerFor"],[1,"material-icons"],["filter","matMenu"],[1,"filter-menu",3,"ngStyle","click"],[1,"mt-24","mb-24"],["appearance","fill",1,"",2,"width","100%"],["matInput","","placeholder","Search","value",""],[1,"cb-wrapper",3,"ngStyle"],["class","example-margin pr-12",3,"change",4,"ngFor","ngForOf"],[1,"mt-12"],[1,"example-margin","pr-12",3,"change"],[1,"search",2,"width","100%"],["matInput","","id","filterInput","placeholder","Search","value","",3,"ngModel","ngModelChange"],["filterInput",""],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"material-icons","search-icon"],[1,"table_container","pb-1"],[1,""],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource","matSortChange"],["matColumnDef","select",1,"checkbox-field"],["style","width: 5%;\n text-align: center;","mat-header-cell","",4,"matHeaderCellDef"],["style","width: 5%;\n text-align: center;","mat-cell","",4,"matCellDef"],["matColumnDef","visitordate"],["mat-header-cell","","mat-sort-header","from_date",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","visitorname"],["mat-header-cell","","style","width:19%;","mat-sort-header","visitor_name",4,"matHeaderCellDef"],["matColumnDef","mobileno"],["mat-header-cell","","mat-sort-header","mobile_no",4,"matHeaderCellDef"],["matColumnDef","purposevisit"],["mat-header-cell","","style","width:27%;","mat-sort-header","purpose_of_visit",4,"matHeaderCellDef"],["matColumnDef","whomgoingvisit"],["mat-header-cell","","style","width:12%;",4,"matHeaderCellDef"],["matColumnDef","mac"],["mat-header-cell","","style","width:11%;","mat-sort-header","mac_address",4,"matHeaderCellDef"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[4,"ngIf"],[3,"length","pageSize","pageIndex","pageSizeOptions","page"],["mat-flat-button","",1,"btn-primary-bg",3,"click"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["mat-header-cell","",2,"width","5%","text-align","center"],[3,"checked","indeterminate","change"],["mat-cell","",2,"width","5%","text-align","center"],[3,"checked","click","change"],["mat-header-cell","","mat-sort-header","from_date"],["mat-cell",""],["mat-header-cell","","mat-sort-header","visitor_name",2,"width","19%"],["mat-header-cell","","mat-sort-header","mobile_no"],["mat-header-cell","","mat-sort-header","purpose_of_visit",2,"width","27%"],["mat-header-cell","",2,"width","12%"],["mat-header-cell","","mat-sort-header","mac_address",2,"width","11%"],[1,"action",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","",3,"click"],[2,"color","#3F51B5"],[2,"color","grey"],[2,"color","#13dec2"],[2,"color","green"],[2,"color","#f19421"],[2,"color","red"],["class","mat-chip mat-primary mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip bg-inactive mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip revokestatus mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted ",4,"ngIf"],["class","mat-block mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted","matTooltip","Please update/refresh it again",4,"ngIf"],[1,"mat-chip","mat-primary","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","bg-inactive","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","revokestatus","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],["matTooltip","Please update/refresh it again",1,"mat-block","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"ml-8","refresh-icon",3,"click"],["mat-header-row",""],["mat-row",""],[1,"text-center"]],template:function(t,e){if(1&t&&(q.dc(0,"div",0),q.dc(1,"div",1),q.dc(2,"div",2),q.ad(3,ni,2,0,"button",3),q.dc(4,"button",4),q.dc(5,"span",5),q.cd(6," filter_list "),q.cc(),q.cd(7," Filters "),q.cc(),q.cc(),q.dc(8,"mat-menu",null,6),q.dc(10,"div",7),q.lc("click",(function(t){return t.stopPropagation()})),q.dc(11,"div",8),q.dc(12,"h4"),q.cd(13,"Date"),q.cc(),q.dc(14,"mat-form-field",9),q.Yb(15,"input",10),q.cc(),q.dc(16,"div",11),q.ad(17,ai,3,3,"mat-checkbox",12),q.cc(),q.cc(),q.dc(18,"div",13),q.dc(19,"h4"),q.cd(20,"Whom going to visit"),q.cc(),q.dc(21,"mat-form-field",9),q.Yb(22,"input",10),q.cc(),q.dc(23,"div",11),q.dc(24,"mat-checkbox",14),q.lc("change",(function(t){return e.onWhomChange(t.checked,"1")})),q.cd(25,"Student"),q.cc(),q.dc(26,"mat-checkbox",14),q.lc("change",(function(t){return e.onWhomChange(t.checked,"2")})),q.cd(27,"Employee"),q.cc(),q.dc(28,"mat-checkbox",14),q.lc("change",(function(t){return e.onWhomChange(t.checked,"3")})),q.cd(29,"Official"),q.cc(),q.dc(30,"mat-checkbox",14),q.lc("change",(function(t){return e.onWhomChange(t.checked,"4")})),q.cd(31,"Others"),q.cc(),q.cc(),q.cc(),q.dc(32,"div",13),q.dc(33,"h4"),q.cd(34,"Status"),q.cc(),q.dc(35,"mat-form-field",9),q.Yb(36,"input",10),q.cc(),q.dc(37,"div",11),q.dc(38,"mat-checkbox",14),q.lc("change",(function(t){return e.onStatusChange(t.checked,"1")})),q.cd(39,"Active"),q.cc(),q.dc(40,"mat-checkbox",14),q.lc("change",(function(t){return e.onStatusChange(t.checked,"0")})),q.cd(41,"Inactive"),q.cc(),q.dc(42,"mat-checkbox",14),q.lc("change",(function(t){return e.onStatusChange(t.checked,"3")})),q.cd(43,"Revoked"),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(44,"div",1),q.dc(45,"mat-form-field",15),q.dc(46,"input",16,17),q.lc("ngModelChange",(function(t){return e.value=t})),q.cc(),q.ad(48,li,3,0,"button",18),q.cc(),q.dc(49,"i",19),q.cd(50," search "),q.cc(),q.cc(),q.cc(),q.dc(51,"div",20),q.dc(52,"div",21),q.dc(53,"table",22),q.lc("matSortChange",(function(t){return e.sortData(t)})),q.bc(54,23),q.ad(55,di,2,2,"th",24),q.ad(56,mi,2,1,"td",25),q.ac(),q.bc(57,26),q.ad(58,pi,3,0,"th",27),q.ad(59,ui,3,3,"td",28),q.ac(),q.bc(60,29),q.ad(61,hi,3,0,"th",30),q.ad(62,gi,2,1,"td",28),q.ac(),q.bc(63,31),q.ad(64,vi,3,0,"th",32),q.ad(65,fi,2,1,"td",28),q.ac(),q.bc(66,33),q.ad(67,bi,2,0,"th",34),q.ad(68,yi,2,1,"td",28),q.ac(),q.bc(69,35),q.ad(70,Fi,2,0,"th",36),q.ad(71,Ii,5,4,"td",28),q.ac(),q.bc(72,37),q.ad(73,Ci,2,0,"th",38),q.ad(74,Gi,2,1,"td",28),q.ac(),q.bc(75,39),q.ad(76,Ri,12,19,"th",36),q.ad(77,$i,6,5,"td",28),q.ac(),q.ad(78,Wi,1,0,"tr",40),q.ad(79,Hi,1,0,"tr",41),q.cc(),q.ad(80,Ui,4,0,"ng-container",42),q.dc(81,"mat-paginator",43),q.lc("page",(function(t){return e.onPaginateChange(t)})),q.cc(),q.cc(),q.cc()),2&t){const t=q.Oc(9);q.Gb(3),q.yc("ngIf",e.permission.hasPermission(q.Ec(17,Ai),q.Ec(18,Ji))),q.Gb(1),q.yc("matMenuTriggerFor",t),q.Gb(6),q.yc("ngStyle",q.Ec(19,Ki)),q.Gb(6),q.yc("ngStyle",q.Ec(20,Qi)),q.Gb(1),q.yc("ngForOf",e.dates),q.Gb(6),q.yc("ngStyle",q.Ec(21,Qi)),q.Gb(14),q.yc("ngStyle",q.Ec(22,Qi)),q.Gb(9),q.yc("ngModel",e.value),q.Gb(2),q.yc("ngIf",e.value),q.Gb(5),q.yc("dataSource",e.dataSource),q.Gb(25),q.yc("matHeaderRowDef",e.displayedColumns),q.Gb(1),q.yc("matRowDefColumns",e.displayedColumns),q.Gb(1),q.yc("ngIf",0===e.dataSource.filteredData.length||0===e.dataSource.data.length),q.Gb(1),q.yc("length",e.paginationDTO.totalSize)("pageSize",e.paginationDTO.limit)("pageIndex",e.paginationDTO.offset)("pageSizeOptions",e.pageSizeOptions)}},directives:[z.c,z.a,o.o,s.a,b.d,b.e,o.p,Ft.b,X.b,p.b,o.n,a.a,r.c,r.t,r.w,k.n,S.a,k.c,k.i,k.b,k.k,k.m,w.a,X.f,m.a,k.h,k.a,S.b,b.b,ri.a,k.j,k.l],pipes:[ht.a],styles:[".filter-menu[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block!important}.revokestatus[_ngcontent-%COMP%]{background-color:#07d6b9!important;color:#fff!important;padding:2px 4px 1px 5px!important;border-radius:0!important;font-size:11px!important}"]}),t})();var tc=i("tk/3");function ec(t,e){if(1&t){const t=q.ec();q.dc(0,"button",38),q.lc("click",(function(e){return q.Sc(t),q.pc().edit()})),q.cd(1,"Edit"),q.cc()}}function ic(t,e){if(1&t){const t=q.ec();q.dc(0,"button",38),q.lc("click",(function(e){return q.Sc(t),q.pc().openClick()})),q.cd(1,"Create"),q.cc()}}function cc(t,e){1&t&&(q.dc(0,"th",39),q.dc(1,"b"),q.cd(2,"S.No"),q.cc(),q.cc())}function oc(t,e){if(1&t&&(q.dc(0,"td",40),q.cd(1),q.cc()),2&t){const t=e.index;q.Gb(1),q.ed(" ",t+1," ")}}function rc(t,e){1&t&&(q.dc(0,"th",41),q.dc(1,"b"),q.cd(2,"Date"),q.cc(),q.cc())}function sc(t,e){if(1&t&&(q.dc(0,"td",42),q.cd(1),q.qc(2,"displayDate"),q.qc(3,"displayDate"),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.fd(" ",q.rc(2,2,t.from_date)," - ",q.rc(3,4,t.to_date),"")}}function nc(t,e){1&t&&(q.dc(0,"th",43),q.dc(1,"b"),q.cd(2,"Time"),q.cc(),q.cc())}function ac(t,e){if(1&t&&(q.dc(0,"td",42),q.cd(1),q.qc(2,"displayTime"),q.qc(3,"displayTime"),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.fd(" ",q.rc(2,2,t.from_time)," - ",q.rc(3,4,t.to_time)," ")}}function lc(t,e){1&t&&(q.dc(0,"th",44),q.cd(1," Purpose of Visit "),q.cc())}function dc(t,e){if(1&t&&(q.dc(0,"td",45),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.ed(" ",t.purpose_of_visit," ")}}function mc(t,e){1&t&&(q.dc(0,"th",46),q.cd(1," Whom going to Visit "),q.cc())}function pc(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Student"),q.cc())}function uc(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Employee"),q.cc())}function hc(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Official"),q.cc())}function gc(t,e){1&t&&(q.dc(0,"lable"),q.cd(1,"Others"),q.cc())}function vc(t,e){if(1&t&&(q.dc(0,"td",45),q.ad(1,pc,2,0,"lable",47),q.ad(2,uc,2,0,"lable",47),q.ad(3,hc,2,0,"lable",47),q.ad(4,gc,2,0,"lable",47),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.yc("ngIf",1==t.whom_visit),q.Gb(1),q.yc("ngIf",2==t.whom_visit),q.Gb(1),q.yc("ngIf",3==t.whom_visit),q.Gb(1),q.yc("ngIf",4==t.whom_visit)}}function fc(t,e){1&t&&(q.dc(0,"th",48),q.cd(1," Particulars "),q.cc())}function bc(t,e){if(1&t&&(q.dc(0,"lable"),q.cd(1),q.cc()),2&t){const t=q.pc().$implicit;q.Gb(1),q.hd(" ",t.particular[0].first_name,",",t.particular[0].roll_no,",",t.particular[0].class_name,",",t.particular[0].section_name," ")}}function yc(t,e){if(1&t&&(q.dc(0,"lable"),q.cd(1),q.cc()),2&t){const t=q.pc().$implicit;q.Gb(1),q.hd(" ",t.particular[0].name?t.particular[0].name:t.particular[0].first_name,",",t.particular[0].employee_code,",",t.particular[0].dept_name,",",t.particular[0].pos_name," ")}}function Fc(t,e){if(1&t&&(q.dc(0,"lable"),q.cd(1),q.cc()),2&t){const t=q.pc().$implicit;q.Gb(1),q.hd(" ",t.particular[0].employee_name?t.particular[0].employee_name:t.particular[0].first_name,",",t.particular[0].employee_code,",",t.particular[0].dept_name,",",t.particular[0].pos_name," ")}}function xc(t,e){if(1&t&&(q.dc(0,"lable"),q.cd(1),q.cc()),2&t){const t=q.pc().$implicit;q.Gb(1),q.dd(t.particular[0].description)}}function wc(t,e){if(1&t&&(q.dc(0,"td",45),q.ad(1,bc,2,4,"lable",47),q.ad(2,yc,2,4,"lable",47),q.ad(3,Fc,2,4,"lable",47),q.ad(4,xc,2,1,"lable",47),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.yc("ngIf",1==t.whom_visit),q.Gb(1),q.yc("ngIf",2==t.whom_visit),q.Gb(1),q.yc("ngIf",3==t.whom_visit),q.Gb(1),q.yc("ngIf",4==t.whom_visit)}}function Sc(t,e){1&t&&(q.dc(0,"th",49),q.cd(1," Mac"),q.cc())}function kc(t,e){if(1&t&&(q.dc(0,"td",45),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.ed(" ",t.mac_address," ")}}function Ic(t,e){1&t&&(q.dc(0,"th",50),q.dc(1,"b"),q.cd(2,"Status"),q.cc(),q.cc())}function Cc(t,e){1&t&&(q.dc(0,"label",55),q.cd(1,"Active"),q.cc())}function Gc(t,e){1&t&&(q.dc(0,"label",56),q.cd(1,"Inactive"),q.cc())}function _c(t,e){1&t&&(q.dc(0,"label",57),q.cd(1,"Revoked"),q.cc())}function Oc(t,e){if(1&t&&(q.dc(0,"td",51),q.ad(1,Cc,2,0,"label",52),q.ad(2,Gc,2,0,"label",53),q.ad(3,_c,2,0,"label",54),q.cc()),2&t){const t=e.$implicit;q.Gb(1),q.yc("ngIf",1==t.status),q.Gb(1),q.yc("ngIf",0==t.status),q.Gb(1),q.yc("ngIf",3==t.status)}}function Dc(t,e){1&t&&q.Yb(0,"tr",58)}function Vc(t,e){if(1&t){const t=q.ec();q.dc(0,"tr",59),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit,o=q.pc();return 1==o.permission.hasPermission(["visitors"],["visitors_tracking"])?o.gototrack(c):""})),q.cc()}}const Nc=function(){return["visitors"]},Pc=function(){return["visitors_update"]},Ac=function(){return["visitors_create"]};let Tc=(()=>{class t{constructor(t,e,i,c,o,r,s,n,a){this.router=t,this.formBuilder=e,this.loader=i,this.toaster=c,this.modelService=o,this.permission=r,this.activateRoute=s,this.apiserv=n,this.dialog=a,this.displayedColumns=["sno","visitordate","visitortime","purposevisit","whomgoingvisit","particulars","mac","status"],this.dataSource=new k.o,this.employeedetails=[],this.studentdetails=[],this.particular=[],this.vist=new dt.a}ngOnInit(){this.getOne()}getOne(){this.visitorId=this.activateRoute.snapshot.params.id,this.mobileno=this.activateRoute.snapshot.params.mobile,this.visiterStatus=this.activateRoute.snapshot.params.status,this.loader.open(),this.modelService.viewVisiters(this.mobileno).subscribe(t=>{"success"==t.keyword?(this.loader.close(),this.vist=t.visitors[0],this.dataSource.data=t.visitors[0].details,this.toaster.present(t.message,"")):(this.loader.close(),this.toaster.present(t.message,""))})}openClick(){this.dialog.open(oi,{width:"40%",disableClose:!0,autoFocus:!1}).afterClosed().subscribe(t=>{})}download(t){this.apiserv.downloadFile(`visitor/download/${t}`,{fileName:t}).subscribe(e=>{switch(e.type){case tc.d.DownloadProgress:break;case tc.d.Response:const i=new Blob([e.body],{type:e.body.type}),c=document.createElement("a");c.setAttribute("style","display:none;"),document.body.appendChild(c),c.download=t,c.href=URL.createObjectURL(i),c.target="_blank",c.click(),document.body.removeChild(c)}},t=>{})}edit(){3==this.visiterStatus?ut.a.fire({icon:"error",title:"Update Visitor",text:"Visitor Revoked So can not update!"}):this.router.navigate([`school/visitors/edit/${this.visitorId}`])}gototrack(t){this.router.navigate([`school/visitors/track/${t.visitor_id}/${this.mobileno}/${this.visiterStatus}`])}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(c.g),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(j.a),q.Xb(Qe.a),q.Xb(c.a),q.Xb(Ze.a),q.Xb(R.b))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-view"]],decls:59,vars:15,consts:[[1,"create_btn"],["mat-raised-button","","color","primary","class","btn-primary-bg",3,"click",4,"ngIf"],["href","#",1,"pl-8","primary-txt-color",3,"routerLink"],[1,"form_bg"],[1,"p-0"],[1,""],[1,"card-title-text"],["fxLayout","row wrap",1,"row"],["fxFlex","100","fxFlex.gt-xs","60",1,""],["fxFlex","100","fxFlex.gt-xs","12",1,"pt-8"],["alt","",1,"contact_person_detail",3,"src"],["fxFlex","100","fxFlex.gt-xs","87",1,"pt-16","pl-8"],["fxFlex","100","fxFlex.gt-xs","40",1,"mt-24"],["target","_blank",2,"color","blue",3,"click"],[1,"table_container","pb-1","mt-16","p-0"],["mat-table","",1,"employee-table",3,"dataSource"],["matColumnDef","sno"],["mat-header-cell","","class","text-center pl-4","style","width:4%;",4,"matHeaderCellDef"],["mat-cell","","class","text-center pl-4",4,"matCellDef"],["matColumnDef","visitordate"],["mat-header-cell","","style","width:12%;","class","text-center",4,"matHeaderCellDef"],["mat-cell","","class","text-center",4,"matCellDef"],["matColumnDef","visitortime"],["mat-header-cell","","style","width:10%;","class","text-center",4,"matHeaderCellDef"],["matColumnDef","purposevisit"],["mat-header-cell","","style","width:25%;",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","whomgoingvisit"],["mat-header-cell","","style","width:11%;",4,"matHeaderCellDef"],["matColumnDef","particulars"],["mat-header-cell","","style","width:20%;",4,"matHeaderCellDef"],["matColumnDef","mac"],["mat-header-cell","","style","width:8%;",4,"matHeaderCellDef"],["matColumnDef","status"],["mat-header-cell","","class","text-center","style","width:8%;",4,"matHeaderCellDef"],["mat-cell","","class","text-center pb-8",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],["mat-header-cell","",1,"text-center","pl-4",2,"width","4%"],["mat-cell","",1,"text-center","pl-4"],["mat-header-cell","",1,"text-center",2,"width","12%"],["mat-cell","",1,"text-center"],["mat-header-cell","",1,"text-center",2,"width","10%"],["mat-header-cell","",2,"width","25%"],["mat-cell",""],["mat-header-cell","",2,"width","11%"],[4,"ngIf"],["mat-header-cell","",2,"width","20%"],["mat-header-cell","",2,"width","8%"],["mat-header-cell","",1,"text-center",2,"width","8%"],["mat-cell","",1,"text-center","pb-8"],["class","mat-chip mat-primary mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip bg-inactive mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip revokestatus mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted ",4,"ngIf"],[1,"mat-chip","mat-primary","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","bg-inactive","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","revokestatus","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(t,e){1&t&&(q.dc(0,"div",0),q.ad(1,ec,2,0,"button",1),q.ad(2,ic,2,0,"button",1),q.dc(3,"a",2),q.cd(4,"Discard"),q.cc(),q.cc(),q.dc(5,"div",3),q.dc(6,"mat-card",4),q.dc(7,"mat-card-title",5),q.dc(8,"div",6),q.cd(9,"View Visitors"),q.cc(),q.Yb(10,"mat-divider"),q.cc(),q.dc(11,"mat-card-content"),q.dc(12,"div",7),q.dc(13,"div",8),q.dc(14,"div",9),q.Yb(15,"img",10),q.cc(),q.dc(16,"div",11),q.dc(17,"h2"),q.cd(18),q.cc(),q.dc(19,"h5"),q.cd(20),q.cc(),q.dc(21,"h5"),q.cd(22),q.cc(),q.cc(),q.cc(),q.dc(23,"div",12),q.dc(24,"h3"),q.dc(25,"b"),q.dc(26,"u"),q.cd(27,"Identity Info"),q.cc(),q.cc(),q.cc(),q.dc(28,"a",13),q.lc("click",(function(t){return e.download(e.vist.attachment)})),q.cd(29),q.cc(),q.cc(),q.cc(),q.dc(30,"div",14),q.dc(31,"div",5),q.dc(32,"table",15),q.bc(33,16),q.ad(34,cc,3,0,"th",17),q.ad(35,oc,2,1,"td",18),q.ac(),q.bc(36,19),q.ad(37,rc,3,0,"th",20),q.ad(38,sc,4,6,"td",21),q.ac(),q.bc(39,22),q.ad(40,nc,3,0,"th",23),q.ad(41,ac,4,6,"td",21),q.ac(),q.bc(42,24),q.ad(43,lc,2,0,"th",25),q.ad(44,dc,2,1,"td",26),q.ac(),q.bc(45,27),q.ad(46,mc,2,0,"th",28),q.ad(47,vc,5,4,"td",26),q.ac(),q.bc(48,29),q.ad(49,fc,2,0,"th",30),q.ad(50,wc,5,4,"td",26),q.ac(),q.bc(51,31),q.ad(52,Sc,2,0,"th",32),q.ad(53,kc,2,1,"td",26),q.ac(),q.bc(54,33),q.ad(55,Ic,3,0,"th",34),q.ad(56,Oc,4,3,"td",35),q.ac(),q.ad(57,Dc,1,0,"tr",36),q.ad(58,Vc,1,0,"tr",37),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc()),2&t&&(q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(11,Nc),q.Ec(12,Pc))),q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(13,Nc),q.Ec(14,Ac))),q.Gb(1),q.yc("routerLink","/school/visitors/list"),q.Gb(12),q.zc("src",e.vist.photo?e.vist.photo:"assets/images/avartar.jpg",q.Vc),q.Gb(3),q.ed("",e.vist.visitorName," "),q.Gb(2),q.dd(e.vist.gender),q.Gb(2),q.dd(e.vist.mobileNo),q.Gb(7),q.dd(e.vist.attachment),q.Gb(3),q.yc("dataSource",e.dataSource),q.Gb(25),q.yc("matHeaderRowDef",e.displayedColumns),q.Gb(1),q.yc("matRowDefColumns",e.displayedColumns))},directives:[o.o,c.j,n.a,n.f,B.a,n.c,z.c,z.a,k.n,k.c,k.i,k.b,k.k,k.m,s.a,k.h,k.a,k.j,k.l],pipes:[ht.a,ht.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.batch-name[_ngcontent-%COMP%]{font-size:24px}mat-checkbox[_ngcontent-%COMP%]{margin-right:24px}.f24[_ngcontent-%COMP%]{font-size:24px}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%;width:85px;height:85px}.employee-table[_ngcontent-%COMP%]{border:1px solid #ccc}.employee-table[_ngcontent-%COMP%] td.mat-cell[_ngcontent-%COMP%], .employee-table[_ngcontent-%COMP%] td.mat-footer-cell[_ngcontent-%COMP%], .employee-table[_ngcontent-%COMP%] th.mat-header-cell[_ngcontent-%COMP%]{border:solid hsla(0,0%,80%,.4588235294117647)!important;border-width:1px 1px 0!important;padding:5px!important}.text-center[_ngcontent-%COMP%]{text-align:center!important}.revokestatus[_ngcontent-%COMP%]{background-color:#07d6b9!important;color:#fff!important;padding:2px 4px 1px 5px!important;border-radius:0!important;font-size:11px!important}"]}),t})();var Ec=i("elPL");function jc(t,e){if(1&t&&(q.dc(0,"button",22),q.cd(1,"Edit"),q.cc()),2&t){const t=q.pc();q.yc("routerLink","/school/visitors/edit/"+t.visitorId)}}function Mc(t,e){1&t&&(q.dc(0,"button",22),q.cd(1,"Create"),q.cc()),2&t&&q.yc("routerLink","/school/visitors/create")}function qc(t,e){1&t&&(q.dc(0,"h2"),q.dc(1,"b"),q.cd(2,"Student"),q.cc(),q.cc())}function Rc(t,e){1&t&&(q.dc(0,"h2"),q.dc(1,"b"),q.cd(2,"Employee"),q.cc(),q.cc())}function Bc(t,e){1&t&&(q.dc(0,"h2"),q.dc(1,"b"),q.cd(2,"Official"),q.cc(),q.cc())}function zc(t,e){1&t&&(q.dc(0,"h2"),q.dc(1,"b"),q.cd(2,"Others"),q.cc(),q.cc())}function Xc(t,e){1&t&&(q.dc(0,"h3",23),q.dc(1,"b"),q.dc(2,"u"),q.cd(3,"Student Info"),q.cc(),q.cc(),q.cc())}function Lc(t,e){1&t&&(q.dc(0,"h3",23),q.dc(1,"b"),q.dc(2,"u"),q.cd(3,"Employee Info"),q.cc(),q.cc(),q.cc())}function Yc(t,e){1&t&&(q.dc(0,"h3",23),q.dc(1,"b"),q.dc(2,"u"),q.cd(3,"Official Info"),q.cc(),q.cc(),q.cc())}function $c(t,e){1&t&&(q.dc(0,"h3",23),q.dc(1,"b"),q.dc(2,"u"),q.cd(3,"Others Info"),q.cc(),q.cc(),q.cc())}function Wc(t,e){if(1&t&&(q.dc(0,"div",24),q.dc(1,"div",25),q.Yb(2,"img",10),q.cc(),q.dc(3,"div",26),q.dc(4,"h2"),q.cd(5),q.cc(),q.dc(6,"h5"),q.cd(7),q.cc(),q.dc(8,"h5"),q.cd(9),q.cc(),q.dc(10,"h5"),q.cd(11),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(2),q.zc("src",t.particular.photo?t.particular.photo:"assets/images/avartar.jpg",q.Vc),q.Gb(3),q.ed("",null!=t.particular&&t.particular.name?null==t.particular?null:t.particular.name:null==t.particular?null:t.particular.first_name," "),q.Gb(2),q.dd(null!=t.particular&&t.particular.employee_code?null==t.particular?null:t.particular.employee_code:null==t.particular?null:t.particular.roll_no),q.Gb(2),q.gd("",null!=t.particular&&t.particular.dept_name?null==t.particular?null:t.particular.dept_name:null==t.particular?null:t.particular.class_name," ",null!=t.particular&&t.particular.dept_name?null!=t.particular&&t.particular.dept_name?"-":"":null!=t.particular&&t.particular.class_name?"-":"","",null!=t.particular&&t.particular.pos_name?null==t.particular?null:t.particular.pos_name:null==t.particular?null:t.particular.section_name," "),q.Gb(2),q.dd(null==t.particular?null:t.particular.description)}}function Hc(t,e){if(1&t&&(q.dc(0,"mgl-timeline-entry-header",30),q.dc(1,"div",31),q.dc(2,"h1",32),q.dc(3,"span",33),q.cd(4),q.cc(),q.dc(5,"span",34),q.cd(6),q.qc(7,"displayDate"),q.cc(),q.Yb(8,"br"),q.dc(9,"span",35),q.cd(10),q.qc(11,"displayTime"),q.qc(12,"displayTime"),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc().$implicit;q.Gb(4),q.ed("",null==t?null:t.locationName," - Allowed"),q.Gb(2),q.dd(q.rc(7,4,null==t?null:t.thisDate)),q.Gb(4),q.fd("",q.rc(11,6,null==t?null:t.inTime)," - ",q.rc(12,8,null==t?null:t.outTime),"")}}function Uc(t,e){if(1&t&&(q.dc(0,"mgl-timeline-entry"),q.ad(1,Hc,13,10,"mgl-timeline-entry-header",29),q.Yb(2,"mgl-timeline-entry-dot"),q.cc()),2&t){const t=q.pc(2);q.Gb(1),q.yc("ngIf",0!=(null==t.tracks?null:t.tracks.length))}}function Jc(t,e){if(1&t&&(q.dc(0,"mgl-timeline-entry-header",37),q.dc(1,"div",31),q.dc(2,"h1",32),q.dc(3,"span",33),q.cd(4),q.cc(),q.dc(5,"span",34),q.cd(6),q.qc(7,"displayDate"),q.cc(),q.Yb(8,"br"),q.dc(9,"span",35),q.cd(10),q.qc(11,"displayTime"),q.qc(12,"displayTime"),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc().$implicit;q.Gb(4),q.ed("",null==t?null:t.locationName," - Not Allowed"),q.Gb(2),q.dd(q.rc(7,4,null==t?null:t.thisDate)),q.Gb(4),q.fd("",q.rc(11,6,null==t?null:t.inTime)," - ",q.rc(12,8,null==t?null:t.outTime),"")}}function Kc(t,e){if(1&t&&(q.dc(0,"mgl-timeline-entry"),q.ad(1,Jc,13,10,"mgl-timeline-entry-header",36),q.Yb(2,"mgl-timeline-entry-dot"),q.cc()),2&t){const t=q.pc(2);q.Gb(1),q.yc("ngIf",0!=(null==t.notallowed?null:t.notallowed.length))}}function Qc(t,e){if(1&t&&(q.dc(0,"mgl-timeline",27),q.ad(1,Uc,3,1,"mgl-timeline-entry",28),q.ad(2,Kc,3,1,"mgl-timeline-entry",28),q.cc()),2&t){const t=q.pc();q.Gb(1),q.yc("ngForOf",t.tracks),q.Gb(1),q.yc("ngForOf",t.notallowed)}}function Zc(t,e){1&t&&(q.dc(0,"div",38),q.cd(1," No Data Found..."),q.cc())}const to=function(){return["visitors"]},eo=function(){return["visitors_update"]},io=function(){return["visitors_create"]};let co=(()=>{class t{constructor(t,e,i,c,o,r,s){this.router=t,this.formBuilder=e,this.loader=i,this.toaster=c,this.modelService=o,this.activateRoute=r,this.permission=s,this.employeedetails=[],this.studentdetails=[],this.particular=[],this.tracks=[],this.vist=new dt.a,this.randomColor=[],this.notallowed=[],this.visitorId=this.activateRoute.snapshot.params.id,this.mobile=this.activateRoute.snapshot.params.mobile,this.status=this.activateRoute.snapshot.params.status}ngOnInit(){this.getOne()}getOne(){this.loader.open(),this.modelService.getOne(this.visitorId).subscribe(t=>{"success"==t.keyword?(this.vist=t.visitors[0],this.particular=t.visitors[0].particular[0],this.getdeviceTrack(),this.toaster.present(t.message,"")):(this.loader.close(),this.toaster.present(t.message,""))})}getdeviceTrack(){const t=Object(vt.b)();var e=Object(ft.get)(t,"customer_id"),i=Object(ft.get)(t,"branch_id");let c={customerId:String(e),schoolId:String(i),visitorMobile:this.mobile,fromDate:this.vist.fromDate,toDate:this.vist.toDate};this.modelService.trackVisitor(c).subscribe(t=>{this.tracks=t.allowedAreas,this.notallowed=t.nonAllowedAreas,this.loader.close()})}gotoView(){this.router.navigate([`/school/visitors/view/${this.visitorId}/${this.mobile}/${this.status}`])}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(c.g),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(j.a),q.Xb(c.a),q.Xb(Qe.a))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-view"]],decls:56,vars:27,consts:[[1,"create_btn"],["mat-raised-button","","color","primary","class","btn-primary-bg",3,"routerLink",4,"ngIf"],[1,"pl-8","primary-txt-color",3,"click"],[1,"form_bg"],[1,"p-0"],[1,""],[1,"card-title-text"],["fxLayout","row wrap",1,"row"],["fxFlex","100","fxFlex.gt-xs","60",1,""],["fxFlex","100","fxFlex.gt-xs","12",1,"pt-8"],["alt","",1,"contact_person_detail",3,"src"],["fxFlex","100","fxFlex.gt-xs","87",1,"pt-24","pl-8"],["fxFlex","100","fxFlex.gt-xs","40",1,"mt-24"],["fxLayout","row wrap",1,"row","mt-16","mb-16"],["fxFlex","100","fxFlex.gt-xs","40",1,"mt-12"],[4,"ngIf"],["class","mt-16 mb-4",4,"ngIf"],["fxLayout","row wrap",1,"row","mt-8","mb-8"],["fxFlex","100","fxFlex.gt-xs","100","class","",4,"ngIf"],[1,"white-bg","timeline-block","mt-24"],["class","mt-12",4,"ngIf"],["class","text-center",4,"ngIf"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"routerLink"],[1,"mt-16","mb-4"],["fxFlex","100","fxFlex.gt-xs","100",1,""],["fxFlex","100","fxFlex.gt-xs","8",1,"pt-8"],["fxFlex","100","fxFlex.gt-xs","90",1,"pt-24","pl-8"],[1,"mt-12"],[4,"ngFor","ngForOf"],["class","green-400",4,"ngIf"],[1,"green-400"],[1,"header-block","font-white"],[1,"mb-0"],[2,"font-size","14px","position","relative","top","5px"],[1,"float-right"],[1,"float-right","pt-2"],["class","orange-400",4,"ngIf"],[1,"orange-400"],[1,"text-center"]],template:function(t,e){1&t&&(q.dc(0,"div",0),q.ad(1,jc,2,1,"button",1),q.ad(2,Mc,2,1,"button",1),q.dc(3,"a",2),q.lc("click",(function(t){return e.gotoView()})),q.cd(4,"Discard"),q.cc(),q.cc(),q.dc(5,"div",3),q.dc(6,"mat-card",4),q.dc(7,"mat-card-title",5),q.dc(8,"div",6),q.cd(9," Visitors Track"),q.cc(),q.Yb(10,"mat-divider"),q.cc(),q.dc(11,"mat-card-content"),q.dc(12,"div",7),q.dc(13,"div",8),q.dc(14,"div",9),q.Yb(15,"img",10),q.cc(),q.dc(16,"div",11),q.dc(17,"h2"),q.cd(18),q.cc(),q.dc(19,"h5"),q.cd(20),q.cc(),q.cc(),q.cc(),q.dc(21,"div",12),q.dc(22,"h3"),q.dc(23,"u"),q.cd(24,"Date of Visit"),q.cc(),q.cc(),q.dc(25,"h2"),q.dc(26,"b"),q.cd(27),q.qc(28,"displayDate"),q.qc(29,"displayDate"),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(30,"div",13),q.dc(31,"div",8),q.dc(32,"h3"),q.dc(33,"u"),q.cd(34,"Purpose of Visit"),q.cc(),q.cc(),q.dc(35,"h2"),q.dc(36,"b"),q.cd(37),q.cc(),q.cc(),q.cc(),q.dc(38,"div",14),q.dc(39,"h3"),q.dc(40,"u"),q.cd(41,"Whom going to visit"),q.cc(),q.cc(),q.ad(42,qc,3,0,"h2",15),q.ad(43,Rc,3,0,"h2",15),q.ad(44,Bc,3,0,"h2",15),q.ad(45,zc,3,0,"h2",15),q.cc(),q.cc(),q.ad(46,Xc,4,0,"h3",16),q.ad(47,Lc,4,0,"h3",16),q.ad(48,Yc,4,0,"h3",16),q.ad(49,$c,4,0,"h3",16),q.dc(50,"div",17),q.ad(51,Wc,12,7,"div",18),q.cc(),q.Yb(52,"mat-divider"),q.dc(53,"div",19),q.ad(54,Qc,3,2,"mgl-timeline",20),q.ad(55,Zc,2,0,"div",21),q.cc(),q.cc(),q.cc(),q.cc()),2&t&&(q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(23,to),q.Ec(24,eo))),q.Gb(1),q.yc("ngIf",e.permission.hasPermission(q.Ec(25,to),q.Ec(26,io))),q.Gb(13),q.zc("src",e.vist.photo?e.vist.photo:"assets/images/avartar.jpg",q.Vc),q.Gb(3),q.ed("",e.vist.visitorName," "),q.Gb(2),q.dd(e.vist.mobileNo),q.Gb(7),q.fd("",q.rc(28,19,e.vist.fromDate)," - ",q.rc(29,21,e.vist.toDate),""),q.Gb(10),q.dd(e.vist.purposeOfVisit),q.Gb(5),q.yc("ngIf","1"==e.vist.whomVisit),q.Gb(1),q.yc("ngIf","2"==e.vist.whomVisit),q.Gb(1),q.yc("ngIf","3"==e.vist.whomVisit),q.Gb(1),q.yc("ngIf","4"==e.vist.whomVisit),q.Gb(1),q.yc("ngIf","1"==e.vist.whomVisit),q.Gb(1),q.yc("ngIf","2"==e.vist.whomVisit),q.Gb(1),q.yc("ngIf","3"==e.vist.whomVisit),q.Gb(1),q.yc("ngIf","4"==e.vist.whomVisit),q.Gb(2),q.yc("ngIf","1"==e.vist.whomVisit||"2"==e.vist.whomVisit||"3"==e.vist.whomVisit),q.Gb(3),q.yc("ngIf",0!=(null==e.notallowed?null:e.notallowed.length)||0!=(null==e.tracks?null:e.tracks.length)),q.Gb(1),q.yc("ngIf",0==(null==e.tracks?null:e.tracks.length)&&0==(null==e.notallowed?null:e.notallowed.length)))},directives:[o.o,n.a,n.f,B.a,n.c,z.c,z.a,s.a,c.h,Ec.b,o.n,Ec.c,Ec.e,Ec.d],pipes:[ht.a,ht.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%;width:85px;height:85px}.white-bg[_ngcontent-%COMP%]{background:#fff}.text-center[_ngcontent-%COMP%]{text-align:center}.float-right[_ngcontent-%COMP%]{float:right;font-size:12px}mgl-timeline-entry-header[_ngcontent-%COMP%]{padding:7px!important;margin-left:40px;text-align:left!important;pointer-events:none}.font-white[_ngcontent-%COMP%]{color:#fff}.active[_ngcontent-%COMP%]{background:hsla(0,0%,50.2%,.12941176470588237)}mgl-timeline[_ngcontent-%COMP%]{width:80%}mgl-timeline-entry-dot[_ngcontent-%COMP%]{width:36px!important;height:36px!important;box-shadow:inset 0 0 3px 8px #d6daef!important;background:#6170c2!important;left:-6px!important;pointer-events:none}mgl-timeline-entry-side[_ngcontent-%COMP%]{left:-69%!important}mgl-timeline[_ngcontent-%COMP%] .mgl-timeline-line[_ngcontent-%COMP%]{border:dotted #6170c2;background-color:snow!important;width:0!important}mgl-timeline-entry[_ngcontent-%COMP%]{margin-left:calc(25% + 5px)!important;width:calc(50% - 120px)!important}mgl-timeline-entry-side[_ngcontent-%COMP%] span.material-icons.font-white[_ngcontent-%COMP%]{border-radius:50%;font-size:17px;padding:8px;margin-top:2px}.header-block[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:relative;bottom:3px}.header-block[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.header-block[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:13px;font-weight:400}mgl-timeline-entry-header[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:15px}mgl-timeline-entry-dot.primary[_ngcontent-%COMP%]{top:42%!important}.pt-2[_ngcontent-%COMP%]{padding-top:2px}.header-block[_ngcontent-%COMP%]{padding:6px}@media(max-width:1024px){mgl-timeline-entry[_ngcontent-%COMP%]{width:unset!important}}"]}),t})();function oo(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the purpose of visit "),q.cc())}function ro(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the valid purpose of visit "),q.cc())}function so(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the from date "),q.cc())}function no(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the to date "),q.cc())}function ao(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," please provide the start time "),q.cc())}function lo(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," please provide the end time "),q.cc())}function mo(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please select any one "),q.cc())}function po(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",65),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit;return q.pc(2).studentkeyup(c)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.Dc("value","",t.studentName," - ",t.admissionNo," - ",t.className," ",t.sectionName?"-":""," ",t.sectionName," ",t.rollNumber?"-":""," ",t.rollNumber,""),q.Gb(1),q.kd(" ",t.studentName," - ",t.admissionNo," - ",t.className," ",t.sectionName?"-":""," ",t.sectionName," ",t.rollNumber?"-":""," ",t.rollNumber," ")}}function uo(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the roll no "),q.cc())}function ho(t,e){if(1&t){const t=q.ec();q.dc(0,"div",54),q.dc(1,"div",55),q.dc(2,"div",17),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Roll No"),q.cc(),q.dc(6,"span",18),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",19),q.dc(9,"mat-form-field",20),q.dc(10,"input",56),q.lc("keyup",(function(e){return q.Sc(t),q.pc().studentclear(e)})),q.cc(),q.dc(11,"mat-autocomplete",null,57),q.ad(13,po,2,14,"mat-option",58),q.qc(14,"filter"),q.cc(),q.ad(15,uo,2,0,"mat-error",22),q.cc(),q.dc(16,"div",59),q.dc(17,"a",60),q.lc("click",(function(e){return q.Sc(t),q.pc().openDialog()})),q.dc(18,"u"),q.cd(19,"Advanced Search"),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(20,"h3",61),q.dc(21,"strong"),q.dc(22,"u"),q.cd(23,"Student Details"),q.cc(),q.cc(),q.cc(),q.dc(24,"div",32),q.dc(25,"div",62),q.dc(26,"label"),q.dc(27,"strong"),q.cd(28,"Student Name"),q.cc(),q.cc(),q.cc(),q.dc(29,"div",63),q.dc(30,"h2",64),q.cd(31),q.cc(),q.dc(32,"h5",64),q.cd(33),q.cc(),q.dc(34,"h5",64),q.cd(35),q.cc(),q.cc(),q.cc(),q.cc()}if(2&t){const t=q.Oc(12),e=q.pc();q.Gb(10),q.yc("matAutocomplete",t),q.Gb(3),q.yc("ngForOf",q.sc(14,8,e.students,e.visitorForm.controls.rollno.value)),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.rollno.errors?null:e.visitorForm.controls.rollno.errors.required)&&e.visitorForm.controls.rollno.touched),q.Gb(16),q.dd(null!=e.studentdetails&&e.studentdetails.student_name?null==e.studentdetails?null:e.studentdetails.student_name:null==e.studentdetails?null:e.studentdetails.studentName),q.Gb(2),q.dd(null==e.studentdetails?null:e.studentdetails.rollNumber),q.Gb(2),q.gd("",null!=e.studentdetails&&e.studentdetails.class_name?null==e.studentdetails?null:e.studentdetails.class_name:null==e.studentdetails?null:e.studentdetails.className," ",""!=(null==e.studentdetails?null:e.studentdetails.class_name)?"-":""!=(null==e.studentdetails?null:e.studentdetails.className)?"-":""," ",null!=e.studentdetails&&e.studentdetails.section_name?null==e.studentdetails?null:e.studentdetails.section_name:null==e.studentdetails?null:e.studentdetails.sectionName,"")}}function go(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",65),q.lc("click",(function(i){q.Sc(t);const c=e.$implicit,o=q.pc(2);return o.Employeekeyup(c,o.i)})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.Bc("value","",t.employeeCode," - ",t.employeeName,""),q.Gb(1),q.fd(" ",t.employeeCode," - ",t.employeeName," ")}}function vo(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the employee code "),q.cc())}function fo(t,e){if(1&t&&(q.dc(0,"div",32),q.dc(1,"div",62),q.dc(2,"label"),q.dc(3,"strong"),q.cd(4,"Employee Name"),q.cc(),q.cc(),q.cc(),q.dc(5,"div",63),q.dc(6,"h2",64),q.cd(7),q.cc(),q.dc(8,"h5",64),q.cd(9),q.cc(),q.dc(10,"h5",64),q.cd(11),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc(2);q.Gb(7),q.fd("",null==t.employeedetails?null:t.employeedetails.employee_name,"",null==t.employeedetails?null:t.employeedetails.employeeName,""),q.Gb(2),q.dd(null==t.employeedetails?null:t.employeedetails.employeeCode),q.Gb(2),q.gd("",null!=t.employeedetails&&t.employeedetails.department_name?null==t.employeedetails?null:t.employeedetails.department_name:null==t.employeedetails?null:t.employeedetails.departmentName," ",""!=(null==t.employeedetails?null:t.employeedetails.department_name)?"-":""," ",null!=t.employeedetails&&t.employeedetails.position_name?null==t.employeedetails?null:t.employeedetails.position_name:null==t.employeedetails?null:t.employeedetails.positionName,"")}}function bo(t,e){if(1&t){const t=q.ec();q.dc(0,"div",66),q.dc(1,"div",55),q.dc(2,"div",17),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Employee ID"),q.cc(),q.dc(6,"span",18),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",19),q.dc(9,"mat-form-field",20),q.dc(10,"input",67),q.lc("keyup",(function(e){q.Sc(t);const i=q.pc();return i.Employeekeyup(e.target.value,i.i)})),q.cc(),q.dc(11,"mat-autocomplete",null,57),q.ad(13,go,2,4,"mat-option",58),q.qc(14,"filter"),q.cc(),q.ad(15,vo,2,0,"mat-error",22),q.cc(),q.dc(16,"div",59),q.dc(17,"a",60),q.lc("click",(function(e){return q.Sc(t),q.pc().openClick()})),q.dc(18,"u"),q.cd(19,"Advanced Search"),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(20,"h3",61),q.dc(21,"strong"),q.dc(22,"u"),q.cd(23,"Employee Details"),q.cc(),q.cc(),q.cc(),q.ad(24,fo,12,6,"div",68),q.cc()}if(2&t){const t=q.Oc(12),e=q.pc();q.Gb(10),q.yc("matAutocomplete",t),q.Gb(3),q.yc("ngForOf",q.sc(14,4,e.empIds,e.visitorForm.controls.empcode.value)),q.Gb(2),q.yc("ngIf",(null==e.visitorForm.controls.empcode.errors?null:e.visitorForm.controls.empcode.errors.required)&&e.visitorForm.controls.empcode.touched),q.Gb(9),q.yc("ngIf",null!=(null==e.employeedetails?null:e.employeedetails.employee_name)||null!=(null==e.employeedetails?null:e.employeedetails.employeeName))}}function yo(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",65),q.lc("click",(function(e){return q.Sc(t),q.pc(2).getEmployeebaseId()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.departmentId),q.Gb(1),q.ed(" ",t.name," ")}}function Fo(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the department name "),q.cc())}function xo(t,e){if(1&t){const t=q.ec();q.dc(0,"mat-option",65),q.lc("click",(function(e){return q.Sc(t),q.pc(2).getEmployeebaseId()})),q.cd(1),q.cc()}if(2&t){const t=e.$implicit;q.yc("value",t.positionId),q.Gb(1),q.ed(" ",t.positionName," ")}}function wo(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the position name "),q.cc())}function So(t,e){if(1&t&&(q.dc(0,"mat-option",78),q.cd(1),q.cc()),2&t){const t=e.$implicit;q.yc("value",t.employeeId),q.Gb(1),q.ed(" ",t.employeeName," ")}}function ko(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the employee name "),q.cc())}function Io(t,e){if(1&t&&(q.dc(0,"div",69),q.dc(1,"div",55),q.dc(2,"div",17),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5," Department"),q.cc(),q.dc(6,"span",18),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",19),q.dc(9,"mat-form-field",25),q.Yb(10,"mat-label"),q.dc(11,"mat-select",70),q.ad(12,yo,2,2,"mat-option",58),q.cc(),q.ad(13,Fo,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.dc(14,"div",55),q.dc(15,"div",17),q.dc(16,"label"),q.dc(17,"strong"),q.cd(18," Position"),q.cc(),q.dc(19,"span",18),q.cd(20,"*"),q.cc(),q.cc(),q.cc(),q.dc(21,"div",19),q.dc(22,"mat-form-field",25),q.Yb(23,"mat-label"),q.dc(24,"mat-select",71),q.ad(25,xo,2,2,"mat-option",58),q.cc(),q.ad(26,wo,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.dc(27,"div",72),q.dc(28,"div",73),q.dc(29,"label"),q.dc(30,"strong"),q.cd(31," Employee Name"),q.cc(),q.dc(32,"span",18),q.cd(33,"*"),q.cc(),q.cc(),q.cc(),q.dc(34,"div",74),q.dc(35,"mat-form-field",75),q.dc(36,"mat-select",76),q.ad(37,So,2,2,"mat-option",77),q.cc(),q.ad(38,ko,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(12),q.yc("ngForOf",t.departments),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.department.errors?null:t.visitorForm.controls.department.errors.required)&&t.visitorForm.controls.department.touched),q.Gb(12),q.yc("ngForOf",t.positions),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.position.errors?null:t.visitorForm.controls.position.errors.required)&&t.visitorForm.controls.position.touched),q.Gb(11),q.yc("ngForOf",t.employees),q.Gb(1),q.yc("ngIf",(null==t.visitorForm.controls.employee.errors?null:t.visitorForm.controls.employee.errors.required)&&t.visitorForm.controls.employee.touched)}}function Co(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the description "),q.cc())}function Go(t,e){if(1&t&&(q.dc(0,"div",79),q.dc(1,"div",55),q.dc(2,"div",23),q.dc(3,"label"),q.dc(4,"strong"),q.cd(5,"Description"),q.cc(),q.dc(6,"span",18),q.cd(7,"*"),q.cc(),q.cc(),q.cc(),q.dc(8,"div",19),q.dc(9,"mat-form-field",20),q.Yb(10,"textarea",80),q.ad(11,Co,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.cc()),2&t){const t=q.pc();q.Gb(11),q.yc("ngIf",(null==t.visitorForm.controls.description.errors?null:t.visitorForm.controls.description.errors.required)&&t.visitorForm.controls.description.touched)}}function _o(t,e){1&t&&(q.dc(0,"mat-error"),q.cd(1," Please provide the mac address "),q.cc())}const Oo=[{path:"",children:[{path:"existing-visitor",component:(()=>{class t{constructor(t,e,i,c,o,s,n,a,l,d,m,p,u){this.dialog=t,this.employeeService=e,this.departmentservice=i,this.positionservice=c,this.router=o,this.formBuilder=s,this.loader=n,this.toaster=a,this.StudentService=l,this.modelService=d,this.severdatePipe=m,this.activateRoute=p,this.apiserv=u,this.years=[{value:"2018-2020",viewValue:"2018-2020"}],this.imageChangedEvent="",this.croppedImg="assets/images/camera.png",this.urls=[],this.images=[],this.uploads=[],this.myControl=new r.g,this.options=["Ram","Malini","Meera","Shalini"],this.vist=new dt.a,this.studentdetails=[],this.exitingvisiter=[],this.employeedetails=[],this.vistersdetails=[]}ngOnInit(){this.filteredOptions=this.myControl.valueChanges.pipe(Object(D.a)(""),Object(V.a)(t=>this._filter(t))),this.visitorForm=new r.j({purposeofvisit:new r.g("",[r.B.required]),WhomGoing:new r.g("",[r.B.required]),rollno:new r.g(""),fromDate:new r.g("",[r.B.required]),endTime:new r.g("",[r.B.required]),toDate:new r.g("",[r.B.required]),startTime:new r.g("",[r.B.required]),macaddress:new r.g("",[r.B.required]),devicename:new r.g(""),empcode:new r.g(""),department:new r.g(""),position:new r.g(""),employee:new r.g(""),description:new r.g(""),IdentyName:new r.g("")}),this.whomValidate(),this.getPossition(),this.getDepartment(),this.getStudents(),this.getEmployees()}ngOnDestroy(){this.recordAddedSub.unsubscribe(),this.recordstudentSub.unsubscribe(),this.recordexitingvisit.unsubscribe()}ngAfterViewInit(){this.addSub(),this.addStudentSub(),this.addExitingSub()}whomValidate(){this.visitorForm.get("WhomGoing").valueChanges.subscribe(t=>{1==t?(this.employeedetails=[],this.getemployeeCode="",this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValue(""),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValidators([r.B.required]),this.visitorForm.get("rollno").markAsDirty(),this.visitorForm.get("rollno").markAsUntouched(),this.visitorForm.get("rollno")):2==t?(this.studentdetails=[],this.studentRollno="",this.studentId="",this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("description"),this.visitorForm.get("position"),this.visitorForm.get("department"),this.visitorForm.get("employee"),this.visitorForm.get("description"),this.visitorForm.get("empcode").clearValidators(),this.visitorForm.get("empcode").setValidators([r.B.required]),this.visitorForm.get("empcode").markAsDirty(),this.visitorForm.get("empcode").markAsUntouched(),this.visitorForm.get("empcode"),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue("")):3==t?(this.studentdetails=[],this.employeedetails=[],this.getemployeeCode="",this.studentRollno="",this.studentId="",this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("rollno"),this.visitorForm.get("description"),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("employee").setValidators([r.B.required]),this.visitorForm.get("department").setValidators([r.B.required]),this.visitorForm.get("position").setValidators([r.B.required]),this.visitorForm.get("employee").markAsUntouched(),this.visitorForm.get("department").markAsUntouched(),this.visitorForm.get("position").markAsUntouched(),this.visitorForm.get("employee").markAsDirty(),this.visitorForm.get("department").markAsDirty(),this.visitorForm.get("position").markAsDirty(),this.visitorForm.get("employee"),this.visitorForm.get("department"),this.visitorForm.get("position")):4==t&&(this.studentdetails=[],this.employeedetails=[],this.studentRollno="",this.getemployeeCode="",this.studentId="",this.visitorForm.get("rollno").clearValidators(),this.visitorForm.get("rollno").setValue(""),this.visitorForm.get("employee").clearValidators(),this.visitorForm.get("employee").setValue(""),this.visitorForm.get("department").clearValidators(),this.visitorForm.get("department").setValue(""),this.visitorForm.get("position").clearValidators(),this.visitorForm.get("position").setValue(""),this.visitorForm.get("description").clearValidators(),this.visitorForm.get("description").setValidators([r.B.required]),this.visitorForm.get("description").markAsUntouched(),this.visitorForm.get("description").markAsDirty(),this.visitorForm.get("description"),this.visitorForm.get("description").setValue(""),this.visitorForm.get("description").clearValidators())})}_filter(t){const e=t.toLowerCase();return this.options.filter(t=>t.toLowerCase().includes(e))}getUrl(){return"url('assets/images/camera.png')"}addSub(){this.recordAddedSub=this.modelService.getRecordAddedSub().subscribe(t=>{this.employeedetails=t,this.getemployeeCode=this.employeedetails.employeeId,console.log(t),this.employeedetails.employeeCode&&this.visitorForm.get("empcode").setValue(this.employeedetails.employeeCode+" - "+this.employeedetails.employeeName)})}addStudentSub(){this.recordstudentSub=this.StudentService.getRecordAddedSub().subscribe(t=>{this.studentdetails=t,this.studentId=t.studentId;var e=t.studentName+" - "+t.className+" "+(t.sectionName?"-":"")+" "+t.sectionName+" "+(t.rollNumber?"-":"")+" "+t.rollNumber;this.studentdetails?this.visitorForm.get("rollno").setValue(e):this.studentdetails&&this.visitorForm.get("rollno").setValue(e)})}studentkeyup(t,e){this.studentId=t.studentId,console.log(this.studentId),this.studentdetails=t}studentclear(t){""==t.target.value&&(this.studentdetails=[],this.studentId="")}Employeekeyup(t,e){""!==t?(this.employeedetails=t,this.getemployeeCode=t.employeeId):(this.employeedetails=[],this.getemployeeCode="")}addExitingSub(){this.recordexitingvisit=this.modelService.getRecordAddedvisitors().subscribe(t=>{this.exitingvisiter=t[0]})}getDepartment(){this.departmentservice.getList({}).subscribe(t=>{this.departments=t.departments,this.departments=this.departments.filter(t=>"1"==t.status)})}getPossition(){this.positionservice.getList({}).subscribe(t=>{this.positions=t.positions,this.positions=this.positions.filter(t=>"1"==t.status)})}getStudents(){this.StudentService.getList(void 0).subscribe(t=>{this.students=t.studentRegistrations,this.students=this.students.filter(t=>""!==t.rollNumber),this.students=this.students.filter(t=>"1"==t.status)})}getEmployees(){this.employeeService.getList(void 0).subscribe(t=>{this.empIds=t.employees,this.empIds=this.empIds.filter(t=>"1"==t.status)})}getEmployeebaseId(){var t=this.visitorForm.value;""!=t.department&&""!=t.position&&this.modelService.getempName(t.department,t.position).subscribe(t=>{this.employees=t.employees})}fileChangeEvent(t){var e;t.target.files[0]&&(this.imageChangedEvent=t,t.target.files[0].size>1e7?this.isFileSizeTooHigh=!0:t.target.files[0].size>96e4?(this.isFileSizeTooHigh=!1,this.isFileResolutionHigh=!0):(this.isFileResolutionHigh=!1,(null===(e=this.visitorForm.controls.photo.errors)||void 0===e?void 0:e.pattern)||this.openCropBox(t.target.files[0])))}openCropBox(t){this.dialog.open(mt.a,{width:"40%",data:{payload:t}}).afterClosed().subscribe(t=>{var e,i,c;t&&(this.croppedImg=null===(e=t)||void 0===e?void 0:e.dataUrl,this.vist.imageDataUrl=null===(i=t)||void 0===i?void 0:i.dataUrl,this.vist.image=null===(c=t)||void 0===c?void 0:c.blobData)})}onChangeFile(t){t.target.files&&t.target.files[0]?t.target.files[0].size>2e6?(this.isAttachFileSizeTooHigh=!0,this.indentyattachment=null):(this.isAttachFileSizeTooHigh=!1,this.indentyattachment=t.target.files[0],this.visitorForm.get("IdentyName").setValue(this.indentyattachment.name)):(this.indentyattachment=null,this.visitorForm.get("IdentyName").setValue(""))}clearAttach(){this.isAttachFileSizeTooHigh=!1,this.indentyattachment="",this.visitorForm.get("IdentyName").setValue(""),this.visitorForm.get("indentyAttach").setValue("")}openDialog(){console.log("1234556"),this.dialog.open(Q,{width:"33%",disableClose:!0}).afterClosed().subscribe(t=>{console.log("The dialog was closed")})}openClick(){console.log("123000"),this.dialog.open(at,{width:"33%",disableClose:!0}).afterClosed().subscribe(t=>{console.log("The dialog was closed")})}clearLogo(){this.croppedImg="assets/images/camera.png",this.vist.imageDataUrl="",this.vist.image=""}create(){var t,e,i,c,o,r,s,n,a,l,d,m;if(this.findInvalidControls(),this.visitorForm.valid){var p=this.visitorForm.value;const u=this.severdatePipe.transform(null===(t=p)||void 0===t?void 0:t.fromDate),h=this.severdatePipe.transform(null===(e=p)||void 0===e?void 0:e.toDate);if(this.visitorForm.valid){let t=new FormData;t.append("visitor_name",this.exitingvisiter.visitorName),this.exitingvisiter.photo&&t.append("photo",this.exitingvisiter.image),t.append("to_date",h||""),t.append("mobile_no",this.exitingvisiter.mobileNo),t.append("purpose_of_visit",null===(i=p)||void 0===i?void 0:i.purposeofvisit),t.append("whom_visit",null===(c=p)||void 0===c?void 0:c.WhomGoing),t.append("from_time",null===(o=p)||void 0===o?void 0:o.startTime),t.append("roll_no",this.studentId),t.append("from_date",u||""),t.append("to_time",null===(r=p)||void 0===r?void 0:r.endTime),t.append("employee_code",this.getemployeeCode),t.append("department",null===(s=p)||void 0===s?void 0:s.department),t.append("position",null===(n=p)||void 0===n?void 0:n.position),t.append("emp_name",null===(a=p)||void 0===a?void 0:a.employee),t.append("device_name",null===(l=p)||void 0===l?void 0:l.devicename),t.append("description",null===(d=p)||void 0===d?void 0:d.description),t.append("mac_address",null===(m=p)||void 0===m?void 0:m.macaddress),t.append("gender",this.exitingvisiter.gender),t.append("type","2"),t.append("attachment",this.exitingvisiter.attachment),this.loader.open(),this.modelService.save(t,"create").subscribe(t=>{"success"==t.keyword?(this.vistersdetails=t.visitors[0],this.deviceCreate(),this.toaster.present(t.message,"")):"failed"==t.keyword&&(this.loader.close(),this.toaster.present(t.message,""))})}}else ut.a.fire({title:"Check Required",text:"Fill Mandatory Fields ",icon:"warning"})}deviceCreate(){var t,e,i,c,o,r,s,n;const a=Object(vt.b)();var l=Object(ft.get)(a,"customer_id"),d=Object(ft.get)(a,"branch_id"),m=this.visitorForm.value;const p=this.severdatePipe.transform(null===(t=m)||void 0===t?void 0:t.fromDate),u=this.severdatePipe.transform(null===(e=m)||void 0===e?void 0:e.toDate);let h=new FormData;h.append("customerId",null!=l?l:""),h.append("schoolId",null!=d?d:""),h.append("mac",String(null===(i=m)||void 0===i?void 0:i.macaddress)),h.append("gender",null!=(c=String(this.exitingvisiter.gender))?c:""),h.append("visitorMobile",null!=(o=String(this.exitingvisiter.mobileNo))?o:""),h.append("visitorName",null!=(r=String(this.exitingvisiter.visitorName))?r:""),h.append("fromDate",null!=(s=String(p))?s:""),h.append("toDate",null!=(n=String(u))?n:""),this.modelService.createVisitor(h).subscribe(t=>{"Success"==t.keyword?this.deviceInsert():"Failed"==t.keyword&&this.loader.close()})}deviceInsert(){let t=new FormData;t.append("id",this.vistersdetails.visitorId),t.append("type","visitor"),this.modelService.deviceStatus(t).subscribe(t=>{"success"==t.keyword?(this.loader.close(),this.router.navigate(["/school/visitors/list"])):this.loader.close()})}findInvalidControls(){const t=[],e=this.visitorForm.controls;for(const i in e)e[i].invalid&&t.push(i);return console.log(t,"invalid"),t}download(t){this.apiserv.downloadFile(`visitor/download/${t}`,{fileName:t}).subscribe(e=>{switch(e.type){case tc.d.DownloadProgress:break;case tc.d.Response:const i=new Blob([e.body],{type:e.body.type}),c=document.createElement("a");c.setAttribute("style","display:none;"),document.body.appendChild(c),c.download=t,c.href=URL.createObjectURL(i),c.target="_blank",c.click(),document.body.removeChild(c)}},t=>{})}}return t.\u0275fac=function(e){return new(e||t)(q.Xb(R.b),q.Xb(et.a),q.Xb(Z.a),q.Xb(tt.a),q.Xb(c.g),q.Xb(r.f),q.Xb(P.a),q.Xb(A.a),q.Xb(N.a),q.Xb(j.a),q.Xb(ht.d),q.Xb(c.a),q.Xb(Ze.a))},t.\u0275cmp=q.Rb({type:t,selectors:[["app-create"]],features:[q.Fb([{provide:l.c,useClass:gt.b},{provide:l.f,useValue:gt.a},ht.d])],decls:136,vars:29,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"pl-8","primary-txt-color",3,"routerLink"],[1,"form_bg"],[1,"p-0"],[1,""],[1,"card-title-text"],[3,"formGroup"],["fxLayout","row wrap",1,"row","mt-24"],["fxFlex","100","fxFlex.gt-xs","100",1,""],["fxFlex","100","fxFlex.gt-xs","8",1,"pt-8"],["alt","",1,"contact_person_detail",3,"src"],["fxFlex","100","fxFlex.gt-xs","90",1,"pt-16","pl-8"],["target","_blank",2,"color","blue",3,"click"],["fxLayout","row wrap",1,"mt-32"],["fxFlex","100","fxFlex.gt-xs","50",1,""],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","23",1,""],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","67",1,""],["appearance","fill",1,"full-width"],["matInput","","name","purposeofvisit","placeholder","","formControlName","purposeofvisit","value",""],[4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","23",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","35",1,""],["appearance","fill"],["matInput","","formControlName","fromDate",3,"matDatepicker","focus","click"],["matSuffix","",3,"for"],["picker5",""],["fxFlex","100","fxFlex.gt-xs","32",1,"pl-16"],["matInput","","placeholder","From date","formControlName","toDate",3,"matDatepicker","min","focus","click"],["picker1",""],["fxLayout","row wrap",1,"mt-8"],["appearance","fill",1,"stime"],["type","text","formControlName","startTime","matInput","","readonly","","value","",3,"ngxTimepicker","format"],["timePickerFrom",""],["fxFlex","100","fxFlex.gt-xs","15",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","29"],["appearance","fill",1,"etime"],["type","text","formControlName","endTime","matInput","","readonly","","value","",3,"min","ngxTimepicker","format"],["timePickerFroms",""],["fxLayout","row wrap",1,"mt-12","mb-28"],["aria-label","Select an option","name","report","formControlName","WhomGoing",1,"ml-15"],["value","1",1,"mr-12"],["value","2",1,"mr-12"],["value","3",1,"mr-12"],["value","4"],["class","student-block",4,"ngIf"],["class","employee-block",4,"ngIf"],["class","official-block mt-12",4,"ngIf"],["class","others-block mt-16",4,"ngIf"],["fxLayout","row wrap",1,"mt-16"],["matInput","","name","devicename","formControlName","devicename","placeholder","","value",""],["matInput","","name","macaddress","formControlName","macaddress","placeholder","","value",""],[1,"student-block"],["fxLayout","row wrap",1,"mt-12"],["matInput","","name","rollno","formControlName","rollno","placeholder","","value","",1,"",3,"matAutocomplete","keyup"],["auto","matAutocomplete"],[3,"value","click",4,"ngFor","ngForOf"],[1,"text-right"],[1,"primary-txt-color",3,"click"],[1,"mt-4"],["fxFlex","100","fxFlex.gt-xs","23",1,"mr-4"],["fxFlex","100","fxFlex.gt-xs","75",1,""],[1,"mb-4"],[3,"value","click"],[1,"employee-block"],["matInput","","name","empcode","placeholder","","formControlName","empcode",3,"matAutocomplete","keyup"],["fxLayout","row wrap","class","mt-8",4,"ngIf"],[1,"official-block","mt-12"],["formControlName","department"],["formControlName","position"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","23",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","67",1,"mt-12"],[1,"example-full-width"],["formControlName","employee"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"others-block","mt-16"],["matInput","","placeholder","","formControlName","description"]],template:function(t,e){if(1&t){const t=q.ec();q.dc(0,"div",0),q.dc(1,"button",1),q.lc("click",(function(t){return e.create()})),q.cd(2,"Save"),q.cc(),q.dc(3,"a",2),q.cd(4,"Discard"),q.cc(),q.cc(),q.dc(5,"div",3),q.dc(6,"mat-card",4),q.dc(7,"mat-card-title",5),q.dc(8,"div",6),q.cd(9,"Create Existing Visitors"),q.cc(),q.Yb(10,"mat-divider"),q.cc(),q.dc(11,"mat-card-content"),q.dc(12,"form",7),q.dc(13,"div",8),q.dc(14,"div",9),q.dc(15,"div",10),q.Yb(16,"img",11),q.cc(),q.dc(17,"div",12),q.dc(18,"h2"),q.cd(19),q.cc(),q.dc(20,"h5"),q.cd(21),q.cc(),q.dc(22,"h5"),q.cd(23),q.cc(),q.dc(24,"a",13),q.lc("click",(function(t){return e.download(e.exitingvisiter.attachment)})),q.cd(25),q.cc(),q.cc(),q.cc(),q.cc(),q.dc(26,"div",14),q.dc(27,"div",15),q.dc(28,"div",16),q.dc(29,"div",17),q.dc(30,"label"),q.dc(31,"strong"),q.cd(32,"Purpose of Visit"),q.cc(),q.dc(33,"span",18),q.cd(34,"*"),q.cc(),q.cc(),q.cc(),q.dc(35,"div",19),q.dc(36,"mat-form-field",20),q.Yb(37,"input",21),q.ad(38,oo,2,0,"mat-error",22),q.ad(39,ro,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.dc(40,"div",16),q.dc(41,"div",23),q.dc(42,"label"),q.dc(43,"strong"),q.cd(44,"Date"),q.cc(),q.dc(45,"span",18),q.cd(46,"*"),q.cc(),q.cc(),q.cc(),q.dc(47,"div",24),q.dc(48,"mat-form-field",25),q.dc(49,"mat-label"),q.cd(50,"From Date"),q.cc(),q.dc(51,"input",26),q.lc("focus",(function(e){return q.Sc(t),q.Oc(54).open()}))("click",(function(e){return q.Sc(t),q.Oc(54).open()})),q.cc(),q.Yb(52,"mat-datepicker-toggle",27),q.Yb(53,"mat-datepicker",null,28),q.ad(55,so,2,0,"mat-error",22),q.cc(),q.cc(),q.dc(56,"div",29),q.dc(57,"mat-form-field",20),q.dc(58,"mat-label"),q.cd(59,"To Date"),q.cc(),q.dc(60,"input",30),q.lc("focus",(function(e){return q.Sc(t),q.Oc(63).open()}))("click",(function(e){return q.Sc(t),q.Oc(63).open()})),q.cc(),q.Yb(61,"mat-datepicker-toggle",27),q.Yb(62,"mat-datepicker",null,31),q.ad(64,no,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.dc(65,"div",32),q.dc(66,"div",17),q.dc(67,"label"),q.dc(68,"strong"),q.cd(69,"Start Time"),q.cc(),q.dc(70,"span",18),q.cd(71,"*"),q.cc(),q.cc(),q.cc(),q.dc(72,"div",17),q.dc(73,"mat-form-field",33),q.Yb(74,"input",34),q.Yb(75,"ngx-material-timepicker",null,35),q.ad(77,ao,2,0,"mat-error",22),q.cc(),q.cc(),q.dc(78,"div",36),q.dc(79,"label"),q.dc(80,"strong"),q.cd(81,"End Time"),q.cc(),q.dc(82,"span",18),q.cd(83,"*"),q.cc(),q.cc(),q.cc(),q.dc(84,"div",37),q.dc(85,"mat-form-field",38),q.Yb(86,"input",39),q.Yb(87,"ngx-material-timepicker",null,40),q.ad(89,lo,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.dc(90,"div",41),q.dc(91,"div",17),q.dc(92,"label"),q.dc(93,"strong"),q.cd(94,"Whom going to visit"),q.cc(),q.dc(95,"span",18),q.cd(96,"*"),q.cc(),q.cc(),q.cc(),q.dc(97,"div",19),q.dc(98,"mat-radio-group",42),q.dc(99,"mat-radio-button",43),q.cd(100,"Student "),q.cc(),q.dc(101,"mat-radio-button",44),q.cd(102,"Employee"),q.cc(),q.dc(103,"mat-radio-button",45),q.cd(104,"Official"),q.cc(),q.dc(105,"mat-radio-button",46),q.cd(106,"Others"),q.cc(),q.ad(107,mo,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.ad(108,ho,36,11,"div",47),q.ad(109,bo,25,7,"div",48),q.ad(110,Io,39,6,"div",49),q.ad(111,Go,12,1,"div",50),q.cc(),q.dc(112,"div",15),q.dc(113,"h3",5),q.dc(114,"strong"),q.dc(115,"u"),q.cd(116,"Device Info"),q.cc(),q.cc(),q.cc(),q.dc(117,"div",51),q.dc(118,"div",17),q.dc(119,"label"),q.dc(120,"strong"),q.cd(121,"Device Name"),q.cc(),q.cc(),q.cc(),q.dc(122,"div",19),q.dc(123,"mat-form-field",20),q.Yb(124,"input",52),q.cc(),q.cc(),q.cc(),q.dc(125,"div",32),q.dc(126,"div",17),q.dc(127,"label"),q.dc(128,"strong"),q.cd(129,"Device Mac"),q.cc(),q.dc(130,"span",18),q.cd(131,"*"),q.cc(),q.cc(),q.cc(),q.dc(132,"div",19),q.dc(133,"mat-form-field",20),q.Yb(134,"input",53),q.ad(135,_o,2,0,"mat-error",22),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc(),q.cc()}if(2&t){const t=q.Oc(54),i=q.Oc(63),c=q.Oc(76),o=q.Oc(88);q.Gb(3),q.yc("routerLink","/school/visitors/list"),q.Gb(9),q.yc("formGroup",e.visitorForm),q.Gb(4),q.zc("src",""!=(null==e.exitingvisiter?null:e.exitingvisiter.photo)?null==e.exitingvisiter?null:e.exitingvisiter.photo:"assets/images/avartar.jpg",q.Vc),q.Gb(3),q.ed("",null==e.exitingvisiter?null:e.exitingvisiter.visitorName," "),q.Gb(2),q.dd(null==e.exitingvisiter?null:e.exitingvisiter.gender),q.Gb(2),q.dd(null==e.exitingvisiter?null:e.exitingvisiter.mobileNo),q.Gb(2),q.dd(null==e.exitingvisiter?null:e.exitingvisiter.attachment),q.Gb(13),q.yc("ngIf",null==e.visitorForm.controls.purposeofvisit.errors?null:e.visitorForm.controls.purposeofvisit.errors.required),q.Gb(1),q.yc("ngIf",null==e.visitorForm.controls.purposeofvisit.errors?null:e.visitorForm.controls.purposeofvisit.errors.pattern),q.Gb(12),q.yc("matDatepicker",t),q.Gb(1),q.yc("for",t),q.Gb(3),q.yc("ngIf",null==e.visitorForm.controls.fromDate.errors?null:e.visitorForm.controls.fromDate.errors.required),q.Gb(5),q.yc("matDatepicker",i)("min",e.visitorForm.controls.fromDate.value),q.Gb(1),q.yc("for",i),q.Gb(3),q.yc("ngIf",null==e.visitorForm.controls.toDate.errors?null:e.visitorForm.controls.toDate.errors.required),q.Gb(10),q.yc("ngxTimepicker",c)("format",24),q.Gb(3),q.yc("ngIf",(null==e.visitorForm.controls?null:null==e.visitorForm.controls.startTime?null:null==e.visitorForm.controls.startTime.errors?null:e.visitorForm.controls.startTime.errors.required)&&e.visitorForm.controls.startTime.touched),q.Gb(9),q.yc("min",null==e.visitorForm.controls.startTime.value?12:e.visitorForm.controls.startTime.value)("ngxTimepicker",o)("format",24),q.Gb(3),q.yc("ngIf",(null==e.visitorForm.controls.endTime?null:null==e.visitorForm.controls.endTime.errors?null:e.visitorForm.controls.endTime.errors.required)&&e.visitorForm.controls.endTime.touched),q.Gb(18),q.yc("ngIf",(null==e.visitorForm.controls.WhomGoing.errors?null:e.visitorForm.controls.WhomGoing.errors.required)&&e.visitorForm.controls.WhomGoing.touched),q.Gb(1),q.yc("ngIf","1"===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","2"===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","3"===e.visitorForm.controls.WhomGoing.value),q.Gb(1),q.yc("ngIf","4"===e.visitorForm.controls.WhomGoing.value),q.Gb(24),q.yc("ngIf",(null==e.visitorForm.controls.macaddress.errors?null:e.visitorForm.controls.macaddress.errors.required)&&e.visitorForm.controls.macaddress.touched)}},directives:[s.a,c.j,n.a,n.f,B.a,n.c,r.D,r.u,r.k,z.c,z.a,X.b,p.b,r.c,r.t,r.i,o.o,X.e,d.b,d.d,X.f,d.a,yt.d,yt.a,g.b,g.a,X.a,G.c,G.a,o.n,l.p,C.a],pipes:[_.a],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.batch-name[_ngcontent-%COMP%]{font-size:24px}mat-checkbox[_ngcontent-%COMP%]{margin-right:24px}.preview_image[_ngcontent-%COMP%]{max-width:100px!important;height:100px;margin:0 auto}image-cropper[_ngcontent-%COMP%]{width:120px;height:113px}.mt13[_ngcontent-%COMP%]{margin-top:-14px}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%}.ml-0[_ngcontent-%COMP%]{margin-left:0!important}"],data:{animation:[Object(O.o)("detailExpand",[Object(O.l)("collapsed",Object(O.m)({height:"0px",minHeight:"0",visibility:"hidden"})),Object(O.l)("expanded",Object(O.m)({height:"*",visibility:"visible"})),Object(O.n)("expanded <=> collapsed",Object(O.e)("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}}),t})(),data:{title:"Existing Visitor",breadcrumb:"Existing Visitor"}},{path:"type",component:oi,data:{title:"Visitors Type",breadcrumb:"Visitors Type"}},{path:"create",component:se,data:{title:"Create Visitors",breadcrumb:"New"}},{path:"edit/:id",component:$e,data:{title:"Edit Visitors",breadcrumb:"Update"}},{path:"list",component:Zi,data:{title:"List of Visitors",breadcrumb:"List"}},{path:"studentsearch",component:Q,data:{title:"Search Student",breadcrumb:"Search Student"}},{path:"employeesearch",component:at,data:{title:"Search Employee",breadcrumb:"Search Employee"}},{path:"view/:id/:mobile/:status",component:Tc,data:{title:"View Visitors",breadcrumb:"View "}},{path:"track/:id/:mobile/:status",component:co,data:{title:"Track",breadcrumb:"Track "}}]}];var Do=i("aYsj");i.d(e,"AppVisitorsModule",(function(){return Vo}));let Vo=(()=>{class t{}return t.\u0275mod=q.Vb({type:t}),t.\u0275inj=q.Ub({factory:function(e){return new(e||t)},imports:[[o.c,r.m,r.z,p.c,u.c,n.e,ri.b,d.c,l.n,h.b,g.c,a.b,b.c,s.b,m.b,v.a,f.a,y.b,C.b,F.a,w.b,Ec.a,_.b,yt.b,I.a,S.c,G.b,k.p,x.a,Do.a,c.k.forChild(Oo)]]}),t})()},rnHP:function(t,e,i){"use strict";class c{constructor(){this.sectionId="",this.sectionName="",this.status=""}}var o=i("fXoL");i.d(e,"a",(function(){return r}));let r=(()=>{class t{adapt(t){return this.obj=new c,this.obj.sectionId=t.section_id,this.obj.sectionName=t.section_name,this.obj.status=t.status,this.obj}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},wr8E:function(t,e,i){"use strict";var c=i("tk/3"),o=i("2Vo4"),r=i("lJxs"),s=i("g3s5"),n=i("fXoL");let a=(()=>{class t{constructor(t){this.adapter=t}adapt(t){let e=[];return t.data.forEach(t=>{e.push(this.adapter.adapt(t))}),{keyword:t.keyword,message:t.message,positions:e,pageSize:t.count,page:t.page}}}return t.\u0275fac=function(e){return new(e||t)(n.hc(s.a))},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var l=i("qc5V"),d=i("Lzaa");let m=(()=>{class t{adapt(t){return this.obj=new d.a,this.obj.categoryId=t.employee_category_id,this.obj.categoryName=t.name,this.obj.branchId=t.branch_id,this.obj.status=t.status,this.obj}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),p=(()=>{class t{constructor(t){this.adapter=t}adapt(t){let e=[];return t.data.forEach(t=>{e.push(this.adapter.adapt(t))}),{keyword:t.keyword,message:t.message,categories:e,pageSize:t.total_size,page:t.page}}}return t.\u0275fac=function(e){return new(e||t)(n.hc(m))},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();i.d(e,"a",(function(){return u}));let u=(()=>{class t{constructor(t,e,i){this.adapter=t,this.catAdapter=e,this.apiService=i,this.recordAddedSubject=new o.a([{}]),this.recordUpdatedSubject=new o.a([{}]),this.userId=0}create(t){let e=new FormData;return e.append("position_name",t.positionName),e.append("employee_category_id",t.categoryId),this.apiService.post("position/create",e).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}update(t){let e=new FormData;return e.append("position_name",t.positionName),e.append("employee_category_id",t.categoryId),e.append("employee_position_id",t.positionId),this.apiService.post("position/update",e).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}status(t,e){return this.apiService.post(2!=e?"position/status":"position/delete",t)}getList(t){let e=new c.e;for(let i in t)e=e.set(i,t[i]);return this.apiService.get("position",e).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}getCategory(){let t=new c.e;return this.apiService.get("category ",t).pipe(Object(r.a)(t=>this.catAdapter.adapt(t)))}getRecordAddedSub(){return this.recordAddedSubject.asObservable()}getRecordUpdatedSub(){return this.recordUpdatedSubject.asObservable()}getpostion(t){return this.apiService.get(`employee/loadPosition/${t}`).pipe(Object(r.a)(t=>this.adapter.adapt(t)))}}return t.\u0275fac=function(e){return new(e||t)(n.hc(a),n.hc(p),n.hc(l.a))},t.\u0275prov=n.Tb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()}}]);
/var/www/krbed.in/../../www/../www/html/../school_portal_admin/61-es2015.ba2edd0c947b5b43de93.js