PageSourceSearch

https://app.notchhr.io/5689.eb584e42153bda09.js

js notchhr.io collected 2026-09-24 13:22:03 UTC 51,977 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmyxalary_web_v2=self.webpackChunkmyxalary_web_v2||[]).push([[5689],{85689:(ye,w,l)=>{l.r(w),l.d(w,{PreEmploymentTestModule:()=>Ce});var d=l(60177),$=l(35865),L=l(33380),Y=l(5333),F=l(21626),U=l(55324),B=l(89912),f=l(4357),h=l(45312),R=l(74523),b=l(25869),V=l(21413),t=l(54438),j=l(37886),m=l(89417);let X=(()=>{class n{constructor(e){this.activeModal=e,this.applicantCount=0,this.action=new t.bkB,this.reason=""}ngOnInit(){}closeModal(e){this.activeModal.dismiss(e)}handleSave(){this.newDeadline>0&&this.reason&&(this.action.emit({newDeadline:this.newDeadline,reason:this.reason}),this.activeModal.close())}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(j.Lw))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-update-deadline-modal"]],inputs:{applicantCount:"applicantCount"},outputs:{action:"action"},decls:32,vars:4,consts:[[1,"card-body"],[1,"header"],[1,"m-0"],[1,"container","mt-4"],[3,"ngSubmit"],[1,"row","mb-3"],[1,"col"],["for","newDeadline"],[1,"text-danger"],["type","number","name","newDeadline","placeholder","Enter days from today to new deadline","required","","min","1",1,"form-control",3,"ngModelChange","ngModel"],["for","reason"],["name","reason","placeholder","Enter reason for extending the deadline","rows","3","required","",1,"form-control",3,"ngModelChange","ngModel"],[1,"mt-5","d-flex","justify-content-end","gap-2"],["type","button",1,"btn","btn-default","btn-slim","mr-2",3,"click"],["type","submit",1,"btn","btn-primary","btn-slim",3,"click","disabled"]],template:function(i,o){1&i&&(t.j41(0,"section")(1,"div",0)(2,"div",1)(3,"h4",2)(4,"b"),t.EFF(5,"Update Deadline"),t.k0s()()(),t.j41(6,"div",3)(7,"p"),t.EFF(8,"You are updating the deadline for "),t.j41(9,"strong"),t.EFF(10),t.k0s(),t.EFF(11," selected applicant(s)."),t.k0s(),t.j41(12,"form",4),t.bIt("ngSubmit",function(){return o.handleSave()}),t.j41(13,"div",5)(14,"div",6)(15,"label",7),t.EFF(16,"Update Deadline (Days)"),t.j41(17,"span",8),t.EFF(18,"*"),t.k0s()(),t.j41(19,"input",9),t.mxI("ngModelChange",function(r){return t.DH7(o.newDeadline,r)||(o.newDeadline=r),r}),t.k0s()()(),t.j41(20,"div",5)(21,"div",6)(22,"label",10),t.EFF(23,"Reason for Update"),t.j41(24,"span",8),t.EFF(25,"*"),t.k0s()(),t.j41(26,"textarea",11),t.mxI("ngModelChange",function(r){return t.DH7(o.reason,r)||(o.reason=r),r}),t.k0s()()()()(),t.j41(27,"div",12)(28,"button",13),t.bIt("click",function(){return o.closeModal("dismiss")}),t.EFF(29," Cancel "),t.k0s(),t.j41(30,"button",14),t.bIt("click",function(){return o.handleSave()}),t.EFF(31," Update Deadline "),t.k0s()()()()),2&i&&(t.R7$(10),t.JRh(o.applicantCount),t.R7$(9),t.R50("ngModel",o.newDeadline),t.R7$(7),t.R50("ngModel",o.reason),t.R7$(4),t.Y8G("disabled",!o.newDeadline||o.newDeadline<=0||!o.reason))},dependencies:[m.qT,m.me,m.Q0,m.BC,m.cb,m.YS,m.VZ,m.vS,m.cV],styles:[".header[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;padding-bottom:10px;margin-bottom:20px}"]})}}return n})();function A(n,s){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.nrm(2,"br"),t.j41(3,"small",13),t.EFF(4),t.k0s()()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",null==e.updatedBy?null:e.updatedBy.fullName,""),t.R7$(3),t.JRh(null==e.updatedBy?null:e.updatedBy.email)}}function N(n,s){if(1&n&&t.EFF(0),2&n){const e=t.XpG().$implicit;t.JRh(e.updatedBy)}}function Q(n,s){if(1&n&&(t.j41(0,"tr")(1,"td"),t.EFF(2),t.k0s(),t.j41(3,"td"),t.EFF(4),t.k0s(),t.j41(5,"td"),t.DNE(6,A,5,2,"span",12)(7,N,1,1,"ng-template",null,1,t.C5r),t.k0s(),t.j41(9,"td"),t.EFF(10),t.k0s(),t.j41(11,"td"),t.EFF(12),t.nI1(13,"date"),t.k0s()()),2&n){const e=s.$implicit,i=t.sdS(8);t.R7$(2),t.SpI("",e.previousDeadline," day(s)"),t.R7$(2),t.SpI("",e.newDeadline," day(s)"),t.R7$(2),t.Y8G("ngIf",(null==e.updatedBy?null:e.updatedBy.fullName)||(null==e.updatedBy?null:e.updatedBy.email))("ngIfElse",i),t.R7$(4),t.JRh(e.reason||"-"),t.R7$(2),t.JRh(t.i5U(13,6,e.updatedAt,"medium"))}}function H(n,s){if(1&n&&(t.j41(0,"table",10)(1,"thead")(2,"tr")(3,"th"),t.EFF(4,"From"),t.k0s(),t.j41(5,"th"),t.EFF(6,"To"),t.k0s(),t.j41(7,"th"),t.EFF(8,"Updated By"),t.k0s(),t.j41(9,"th"),t.EFF(10,"Reason"),t.k0s(),t.j41(11,"th"),t.EFF(12,"Date"),t.k0s()()(),t.j41(13,"tbody"),t.DNE(14,Q,
114,9,"tr",11),t.k0s()()),2&n){const e=t.XpG();t.R7$(14),t.Y8G("ngForOf",e.logs)}}function z(n,s){1&n&&(t.j41(0,"p",14),t.EFF(1,"No update logs found for this applicant."),t.k0s())}let J=(()=>{class n{constructor(e){this.activeModal=e,this.logs=[]}ngOnInit(){}closeModal(){this.activeModal.dismiss()}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(j.Lw))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-update-deadline-logs-modal"]],inputs:{logs:"logs"},decls:17,vars:2,consts:[["noLogs",""],["oldLogFormat",""],[1,"card-body"],[1,"header"],[1,"m-0"],[1,"text-muted","d-block","mt-2"],[1,"container","mt-4",2,"max-height","400px","overflow-y","auto"],["class","table table-bordered",4,"ngIf","ngIfElse"],[1,"mt-4","d-flex","justify-content-end"],["type","button",1,"btn","btn-primary","btn-slim",3,"click"],[1,"table","table-bordered"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[1,"text-muted"],[1,"text-center","text-muted"]],template:function(i,o){if(1&i){const a=t.RV6();t.j41(0,"section")(1,"div",2)(2,"div",3)(3,"h4",4)(4,"b"),t.EFF(5,"Deadline Update Logs"),t.k0s()(),t.j41(6,"small",5)(7,"strong"),t.EFF(8,"Note:"),t.k0s(),t.EFF(9," Deadline represents the total duration (in days) from the initial trigger date to the specified deadline, including any possible days after the last deadline and the new days added. "),t.k0s()(),t.j41(10,"div",6),t.DNE(11,H,15,1,"table",7)(12,z,2,0,"ng-template",null,0,t.C5r),t.k0s(),t.j41(14,"div",8)(15,"button",9),t.bIt("click",function(){return t.eBV(a),t.Njj(o.closeModal())}),t.EFF(16," Close "),t.k0s()()()()}if(2&i){const a=t.sdS(13);t.R7$(11),t.Y8G("ngIf",o.logs&&o.logs.length>0)("ngIfElse",a)}},dependencies:[d.Sq,d.bT,d.vh],styles:[".header[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;padding-bottom:15px;margin-bottom:20px}.header[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{display:block;margin-top:8px;font-size:13px;line-height:1.4}.table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background-color:#f8f9fa;font-weight:600}.table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{font-size:12px;display:inline-block;margin-top:4px}"]})}}return n})();var y=l(28912),I=l(35030),v=l(15973),S=l(65409),W=l(36471);const Z=["action"],K=["date"],q=["triggeredAt"],tt=["status"],et=["deadlineCol"],nt=["logsCol"],ot=n=>[n];function it(n,s){if(1&n&&t.nrm(0,"app-content-header",13),2&n){const e=t.XpG();t.Y8G("contentHeader",e.contentHeader)}}function at(n,s){if(1&n&&(t.j41(0,"div",14),t.nrm(1,"app-data-table",15),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("getData",e.getData)("getPagination",e.getPagination)("options",e.preEmploymentTestScoreTableConfig)("enableUrlFilters",!0)("onChanges",e.updateTable)}}function st(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",20),t.bIt("click",function(){t.eBV(e);const o=t.XpG().data,a=t.XpG();return t.Njj(a.openUpdateDeadlineForSingle(o))}),t.nrm(1,"i",21),t.EFF(2," Update Deadline "),t.k0s()}}function lt(n,s){if(1&n&&(t.j41(0,"div",16)(1,"div",17)(2,"a",18),t.EFF(3," View Scores "),t.k0s()(),t.DNE(4,st,3,0,"button",19),t.k0s()),2&n){const e=s.data,i=t.XpG();t.R7$(),t.Y8G("ngClass",e.examReport?"":"d-none"),t.R7$(),t.Y8G("routerLink",t.eq3(3,ot,"/recruitment/pre-employment-test/"+i.jobOpportunityID+"/"+(null==e?null:e._id))),t.R7$(2),t.Y8G("ngIf",!e.examReport)}}function rt(n,s){if(1&n&&(t.j41(0,"div")(1,"mat-chip",22),t.EFF(2),t.nI1(3,"titlecase"),t.k0s()()),2&n){const e=s.data;t.R7$(),t.Y8G("ngClass",null==e.examReport||null==e.examReport.status?null:e.examReport.status.toLowerCase()),t.R7$(),t.SpI(" ",t.bMT(3,2,(null==e.examReport?null:e.examReport.status)||"Not Taken")," ")}}function pt(n,s){1&n&&(t.EFF(0),t.nI1(1,"date")),2&n&&t.SpI(" ",t.i5U(1,1,s.data.createdAt,"dd/MM/yyyy")," ")}function ct(n,s){if(1&n&&(t.EFF(0),t.nI1(1,"date")),2&n){const e=s.data;t.SpI(" ",t.i5U(1,1,null==e.preEmploymentTest?null:e.preEmploymentTest.triggeredAt,"dd/MM/yyyy")," ")}}function dt(n,s){if(1&n&&t.EFF(0),2&n){let e;const i=s.data;t.SpI(" ",null!==(e=null==i.preEmploymentTest?null:i.preEmploymentTest.deadline)&&void 0!==e?e:"-"," ")}}
1function mt(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",25),t.bIt("click",function(){t.eBV(e);const o=t.XpG().data,a=t.XpG();return t.Njj(a.openLogsModal(o))}),t.EFF(1),t.k0s()}if(2&n){const e=t.XpG().data;t.R7$(),t.SpI(" View Logs (",e.preEmploymentTest.deadlineUpdates.length,") ")}}function ut(n,s){1&n&&(t.j41(0,"span",26),t.EFF(1,"-"),t.k0s())}function gt(n,s){if(1&n&&t.DNE(0,mt,2,1,"button",23)(1,ut,2,0,"span",24),2&n){const e=s.data;t.Y8G("ngIf",null==e.preEmploymentTest||null==e.preEmploymentTest.deadlineUpdates?null:e.preEmploymentTest.deadlineUpdates.length),t.R7$(),t.Y8G("ngIf",!(null!=e.preEmploymentTest&&null!=e.preEmploymentTest.deadlineUpdates&&e.preEmploymentTest.deadlineUpdates.length))}}let _t=(()=>{class n{constructor(e,i,o,a){this.router=e,this.route=i,this.preEmploymentTestService=o,this.generalService=a,this.showFilterOptions=!0,this.contentHeader={headerTitle:"Recruitment",actionButton:!0,breadcrumb:{links:[{name:"Recruitment",isLink:!0,link:"/recruitment"},{name:"Job Opportunities",isLink:!1}]}},this.showTable=!1,this.updateTable=new V.B}ngOnInit(){this.route.params.subscribe(e=>{this.jobOpportunityID=e["job-opportunity"]}),this.handleScroll()}ngAfterViewInit(){this.preEmploymentTestScoreTableConfig={useCheckBox:!0,findIfRowIsCheckable:e=>!e.preEmploymentTest?.isTaken,bulkActions:[{title:"Update Deadline",icon:"pi pi-clock",tooltip:"Update the deadline for the selected applicants",action:e=>{this.openUpdateDeadlineDialog(e.selected)}}],searchOptions:[{name:"limit",width:"8%",type:"select",options:b.A.defaultPageOptions},{name:"recent",width:"10%",type:"select",options:b.A.defaultPeriodOptions},{name:"search",width:"27%",type:"search",placeholder:"Search"},{name:"status",width:"27%",type:"select",options:[{key:"Status",value:""},{key:"Pending",value:"pending"},{key:"Completed",value:"completed"}]},{name:"date",width:"27%",type:"date"}],columns:[{label:"Applicant Name",key:"fullName",getValue:({fullName:e})=>e},{label:"Application Date",key:"createdAt",template:this.date},{label:"Triggered Date",key:"preEmploymentTest.triggeredAt",template:this.triggeredAt},{label:"Deadline (Days)",key:"preEmploymentTest.deadline",template:this.deadlineCol},{label:"Score",key:"score",getValue:e=>null!==(e.examReport?.totalScore??null)?`${e.examReport.totalScore}%`:"-"},{label:"Update Logs",key:"preEmploymentTest.deadlineUpdates",template:this.logsCol},{label:"Status",key:"status",template:this.status},{label:"Action",key:"",template:this.action}],url:`${h.c.recruitmentEndpoint}/v1/pre-employment-test/exam-reports`,fixedQuery:{jobOpportunityID:this.jobOpportunityID}},setTimeout(()=>{this.showTable=!0},0)}getData({data:{data:e}}){return e}getPagination({data:{paging:e}}){return e}handleScroll(){window.scroll({top:0,left:0,behavior:"smooth"})}openUpdateDeadlineDialog(e){var i=this;const o=e.map(c=>c._id),a=e.length,{componentInstance:r}=this.generalService.preModal(X,{size:"md",centered:!0});r.applicantCount=a,r.action.subscribe(function(){var c=(0,R.A)(function*(u){const{newDeadline:p,reason:C}=u;yield i.submitDeadlineUpdate(o,p,C)});return function(u){return c.apply(this,arguments)}}())}openUpdateDeadlineForSingle(e){this.openUpdateDeadlineDialog([e])}openLogsModal(e){const i=e.preEmploymentTest?.deadlineUpdates||[],{componentInstance:o}=this.generalService.preModal(J,{size:"lg",centered:!0});o.logs=i}submitDeadlineUpdate(e,i,o){var a=this;return(0,R.A)(function*(){try{yield a.preEmploymentTestService.updateDeadline({jobApplicationIDs:e,newDeadline:i,reason:o}).toPromise(),a.generalService.alertInfo.next({text:`Deadline updated successfully for ${e.length} applicant(s).`,btnClass:"alert-success",btnIcon:"checklist",timer:3e3}),a.updateTable.next(1)}catch(r){a.generalService.alertInfo.next({text:r?.error?.message||"Failed to update deadline",btnClass:"alert-danger",btnIcon:"error",timer:3e3})}})()}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(f.Ix),t.rXU(f.nX),t.rXU(y.P),t.rXU(I.O))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-pre-employment-test-scores"]],viewQuery:function(i,o){if(1&i&&(t.GBs(Z,5),t.GBs(K,5),t.GBs(q,5),t.GBs(tt,5),t.GBs(et,5),t.GBs(nt,5)),2&i){let a;t.mGM(a=t.lsd())&&(o.action=a.first),t.mGM(a=t.lsd())&&(o.date=a.first),t.mGM(a=t.lsd())&&(o.triggeredAt=a.first),t.mGM(a=t.lsd())&&(o.status=a.first),t.mGM(a=t.lsd())&&(o.deadlineCol=a.first),t.mGM(a=t.lsd())&&(o.logsCol=a.first)}},inputs:{showFilterOptions:"showFilterOptions"},decls:21,vars:2,consts:[["action",""],["status",""],["date",""],["triggeredAt",""],["deadlineCol",""],["logsCol",""],[3,"contentHeader",4,"ngIf"],["id","ngx-datatable-kitchen-sink"],[1,"card"],[1,"card-header","d-flex","p-3"],[1,"card-title"],[1,"card-body","p-3"],["class","",4,"ngIf"],[3,"contentHeader"],[1,""],["filterType","query",3,"getData","getPagination","options","enableUrlFilters","onChanges"],[1,"d-flex","align-items-center","gap-2"],[3,"ngClass"],[1,"btn","btn-primary","btn-sm",3,"routerLink"],["class","btn btn-default btn-sm","title","Update deadline for this applicant",3,"click",4,"ngIf"],["title","Update deadline for this applicant",1,"btn","btn-default","btn-sm",3,"click"],[1,"pi","pi-clock","mr-1"],["color","success",1,"btn-status",3,"ngClass"],["class","btn btn-sm btn-link p-0 text-primary",3,"click",4,"ngIf"],["class","text-muted",4,"ngIf"],[1,"btn","btn-sm","btn-link","p-0","text-primary",3,"click"],[1,"text-muted"]],template:function(i,o){1&i&&(t.j41(0,"div"),t.DNE(1,it,1,1,"app-content-header",6),t.j41(2,"section",7)(3,"div",8)(4,"div",9)(5,"h4",10),t.EFF(6,"Pre Employment E
1xam Scores"),t.k0s()(),t.j41(7,"div",11),t.DNE(8,at,2,5,"div",12)(9,lt,5,5,"ng-template",null,0,t.C5r)(11,rt,4,4,"ng-template",null,1,t.C5r)(13,pt,2,4,"ng-template",null,2,t.C5r)(15,ct,2,4,"ng-template",null,3,t.C5r)(17,dt,1,1,"ng-template",null,4,t.C5r)(19,gt,2,2,"ng-template",null,5,t.C5r),t.k0s()()()()),2&i&&(t.R7$(),t.Y8G("ngIf",o.showFilterOptions),t.R7$(7),t.Y8G("ngIf",o.showTable))},dependencies:[d.YU,d.bT,v.Q,S.u,f.Wk,W.Jl,d.PV,d.vh],styles:["div.table-box[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{width:100%;background:#fff}div.table-box[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], div.table-box[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{width:auto;font-size:14px}div.table-box[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%], div.table-box[_ngcontent-%COMP%]   tr.mat-mdc-row[_ngcontent-%COMP%]{border:1px solid #dee2e6;height:40px;cursor:pointer}div.table-box[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{border:1.5px solid #dee2e6;padding-left:30px!important}div.table-box[_ngcontent-%COMP%]   td.mat-mdc-cell[_ngcontent-%COMP%]{border:1px solid #dee2e6;padding-left:30px!important}.mat-icon-button[_ngcontent-%COMP%]{background:transparent!important}div.avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{border:2px solid rgba(214,33,150,.5);box-shadow:none}.count-avatar[_ngcontent-%COMP%]   span.count[_ngcontent-%COMP%]{color:#d62196;background:#fff;border:2px solid rgba(214,33,150,.5);top:0;border-radius:50%;font-size:10px;height:27px;width:27px;line-height:22px;letter-spacing:.5px}.icon[_ngcontent-%COMP%]{margin-top:2px;height:24px;width:24px;cursor:pointer}.filter-box[_ngcontent-%COMP%]   .filter-item[_ngcontent-%COMP%]{width:100%;margin-right:.8rem!important}.filter-box[_ngcontent-%COMP%]   .filter-item-count[_ngcontent-%COMP%]{width:40%}.filter-box[_ngcontent-%COMP%]   .filter-item-recent[_ngcontent-%COMP%]{width:55%}.filter-box[_ngcontent-%COMP%]   .filter-item-type[_ngcontent-%COMP%]{width:80%}.filter-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .filter-box[_ngcontent-%COMP%]   select.form-control[_ngcontent-%COMP%]{padding:.5rem .8rem;border:0;outline:1px solid #e4e6f6;color:#666;border-radius:6px}.filter-box[_ngcontent-%COMP%]   .filter-search[_ngcontent-%COMP%]{width:250px}.filter-box[_ngcontent-%COMP%]   .filter-search[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{position:absolute;margin:8px}.filter-box[_ngcontent-%COMP%]   .filter-search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:100%}.filter-box[_ngcontent-%COMP%]   .filter-search[_ngcontent-%COMP%]   input[type=text][_ngcontent-%COMP%]::placeholder{border:transparent;padding-left:16px}"]})}}return n})();var ft=l(57786),ht=l(35051),bt=l(67374),x=l.n(bt),G=l(63298),D=l(98424),Ct=l(70748),yt=l(16697),vt=l(52001),xt=l(72510),Mt=l(88834),Pt=l(71997),M=l(59115),Tt=l(99213),P=l(96850);const Et=["action"];function Ot(n,s){if(1&n&&t.nrm(0,"app-charts",20),2&n){const e=t.XpG().$implicit;t.Y8G("chartOptions",null==e?null:e.pieChartOptions)("useCustomLegend",!0)}}function kt(n,s){1&n&&(t.j41(0,"div",21)(1,"h3",22),t.EFF(2,"No Data"),t.k0s()())}function wt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",13)(1,"div",14)(2,"h3",15),t.EFF(3),t.k0s(),t.j41(4,"div",16)(5,"ng-select",17),t.mxI("ngModelChange",function(o){const a=t.eBV(e).$implicit;return t.DH7(a.selectedMonth,o)||(a.selectedMonth=o),t.Njj(o)}),t.bIt("change",function(){const o=t.eBV(e),a=o.$implicit,r=o.index,c=t.XpG();return t.Njj(c.onFilterChange(a,r))}),t.k0s(),t.j41(6,"ng-select",18),t.mxI("ngModelChange",function(o){const a=t.eBV(e).$implicit;return t.DH7(a.selectedYear,o)||(a.selectedYear=o),t.Njj(o)}),t.bIt("change",function(){const o=t.eBV(e),a=o.$implicit,r=o.index,c=t.XpG();return t.Njj(c.onFilterChange(a,r))}),t.k0s()()(),t.DNE(7,Ot,1,2,"app-charts",19)(8,kt,3,0,"ng-template",null,1,t.C5r),t.k0s()}if(2&n){const e=s.$implicit,i=t.sdS(9),o=t.XpG();t.R7$(3),t.JRh(e.label),t.R7$(2),t.Y8G("items",o.months),t.R50("ngModel",e.selectedMonth),t.Y8G("searchable",!1)("clearable",!1),t.R7$(),t.Y8G("items",o.years),t.R50("ngModel",e.selectedYear),t.Y8G("searchable",!1)("clearable",!1),t.R7$(),t.Y8G("ngIf",null==e.pieChartOptions||null==e.pieChartOptions.options||null==e.pieChartOptions.options.data||null==e.pieChartOptions.options.data.labels?null:e.pieChartOptions.options.data.labels.length)("ngIfElse",i)}}
1function Ft(n,s){if(1&n&&t.nrm(0,"app-data-table",27),2&n){const e=t.XpG(2);t.Y8G("onChanges",e.questionListener)("options",e.questionTableConfig)("enableUrlFilters",!0)}}function Rt(n,s){if(1&n&&t.nrm(0,"app-data-table",27),2&n){const e=t.XpG(2);t.Y8G("onChanges",e.examinationListener)("options",e.examinationTableConfig)("enableUrlFilters",!0)}}function jt(n,s){if(1&n){const e=t.RV6();t.j41(0,"mat-tab-group",23),t.bIt("selectedIndexChange",function(o){t.eBV(e);const a=t.XpG();return t.Njj(a.onTabChange(o))}),t.j41(1,"mat-tab",24),t.DNE(2,Ft,1,3,"ng-template",25),t.k0s(),t.j41(3,"mat-tab",26),t.DNE(4,Rt,1,3,"ng-template",25),t.k0s()()}}function It(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",28)(1,"mat-icon"),t.EFF(2,"more_vert"),t.k0s()(),t.j41(3,"mat-menu",null,2)(5,"button",29),t.bIt("click",function(){const o=t.eBV(e).data,a=t.XpG();return t.Njj(0===a.activeTabIndex?a.openQuestion(o):a.openExamination(o))}),t.EFF(6," View Questions "),t.k0s(),t.nrm(7,"mat-divider",30),t.j41(8,"button",31),t.bIt("click",function(){const o=t.eBV(e).data,a=t.XpG();return t.Njj(0===a.activeTabIndex?a.deleteQuestion(o._id):a.deleteExamination(o._id))}),t.EFF(9," Delete "),t.k0s()()}if(2&n){const e=t.sdS(4);t.Y8G("matMenuTriggerFor",e)}}let St=(()=>{class n{constructor(e,i,o,a){this.datePipe=e,this.preEmploymentTestModalService=i,this.preEmploymentTestService=o,this.tabNavService=a,this.contentHeader={headerTitle:"Recruitment",actionButton:!0,breadcrumb:{links:[{name:"Recruitment",isLink:!0,link:"/recruitment"},{name:"Pre-Employment Test",isLink:!1,link:"/recruitment/pre-employment-test"}]}},this.filterOption={title:"Analytics",useMonth:!0,useMonthDefault:!0,useYears:!0,useYearsDefault:!0,analyticsData:[{title:"0",description:"Total Question Library",icon:"briefcase",avatarBackground:"bg-yellow-green",style:"totalQuestionLibraries"},{title:"0",description:"Total Exam Library",icon:"briefcase",avatarBackground:"bg-blue-purple",style:"totalExams"},{title:"0",description:"Total Correct Answers",icon:"book-open",avatarBackground:"bg-medium-green",style:"totalCorrectAnswers"},{title:"0",description:"Total Wrong Answers",icon:"book-open",avatarBackground:"bg-pinkish-red",style:"totalWrongAnswers"}]},this.activeTabIndex=0,this.showTabs=!1,this.metricsMonthAndYear={},this.months=[{name:"January",value:1},{name:"February",value:2},{name:"March",value:3},{name:"April",value:4},{name:"May",value:5},{name:"June",value:6},{name:"July",value:7},{name:"August",value:8},{name:"September",value:9},{name:"October",value:10},{name:"November",value:11},{name:"December",value:12}],this.years=[],this.defaultMonth=x()().month()+1,this.defaultYear=x()().year(),this.charts=[]}ngAfterViewInit(){const e=[{name:"limit",width:"12.5%",type:"select",options:b.A.defaultPageOptions},{name:"recent",width:"15%",type:"select",options:b.A.defaultPeriodOptions},{name:"search",width:"37.5%",type:"search",placeholder:"Search"},{name:"date",width:"15%",type:"date"}];this.questionTableConfig={searchOptions:[...e],columns:[{label:"Question Type",key:"type",getValue:({type:i})=>i},{label:"Category",key:"category",getValue:({category:{title:i}})=>i},{label:"Date Created",key:"createdAt",getValue:({createdAt:i})=>this.formatDate(i)},{label:"Actions",key:"action",noSort:!0,template:this.action}],url:`${h.c.recruitmentEndpoint}${D.fb.Y}/questions`},this.examinationTableConfig={searchOptions:[...e],columns:[{label:"Title",key:"title",getValue:i=>i.title},{label:"Date Created",key:"createdAt",getValue:i=>this.formatDate(i.createdAt)},{label:"Actions",key:"",template:this.action}],url:`${h.c.recruitmentEndpoint}${D.fb.Y}/exams`},setTimeout(()=>{this.showTabs=!0},0)}ngOnInit(){this.examinationListener=this.preEmploymentTestModalService.examinationListener,this.questionListener=this.preEmploymentTestModalService.questionListener,(0,ft.h)(this.examinationListener,this.questionListener).subscribe(()=>{this.getAnalytics(this.metricsMonthAndYear)}),this.getAnalytics(),this.initializeYears(),this.setupChart(),this.tabStateSubscription=this.tabNavService.getTabState(1).subscribe(i=>{this.activeTabIndex=i.tabIndex})}deleteExamination(e){this.preEmploymentTestModalService.deleteExam(e)}deleteQuestion(e){this.preEmploymentTestModalService.deleteQuestion(e)}formatDate(e){return this.datePipe.transform(e,"dd/MM/yyyy")||""}getAnalytics({years:e,month:i}={}){this.metricsMonthAndYear={month:i,year:e},this.preEmploymentTestService.analytics(this.metricsMonthAndYear).subscribe(({data:o})=>{this.filterOption.analyticsData.forEach(a=>{a.title=o[a.style]||0})})}initializeYears(){const e=x()().year();for(let i=e;i>=e-10;i--)this.years.push({name:`${i}`,value:i})}onFilterChange({selectedMonth:e,selectedYear:i,group:o,title:a,isAnswer:r},c){this.preEmploymentTestService.questionAnalytics({group:o,year:i,month:e,isAnswer:r}).subscribe(({data:u})=>{this.charts[c].pieChartOptions={...this.charts[c].pieChartOptions,options:{...this.charts[c].pieChartOptions.options,data:{labels:u.map(p=>p.label),datasets:[{label:a,data:u.map(p=>p.count),backgroundColor:u.map(()=>`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`),hoverOffset:4}]}}}})}onTabChange(e){this.tabNavService.navigateToTab(e)}openExamination(e={}){this.preEmploymentTestModalService.openExamination(e)}openQuestion(e={}){this.preEmploymentTestModalService.openQuestion(e)}setupChart(){const i=(o,a,r,c)=>({isAnswer:r,group:a,label:o,selectedMonth:this.defaultMonth,selectedYear:this.defaultYear,pieChartOptions:{id:`pieChart${c}`,options:{type:"pie",plugins:[ht.A],options:{responsive:!0,plugins:{legend:{position:"right",display:!1},datalabels:{formatter:(u,p)=>`${((o,a)=>a>0?(o/a*100).toFixed(0):"0")(u,(p.chart.data.datasets[0]?.data??[]).filter(g=>"number"==typeof g).reduce((g,_)=>g+_,0))}%`,color:"#fff",font:{size:14,weight:"bold"}},tooltip:{enabled:!0}}}},height:"100%",width:"100%"}});this.charts=[{label:"Question Type",group:"type"},{label:"Question Category",group:"category"},{label:"Question Type Correct Answers",group:"type",isAnswer:!0},{label:"Question Category Correct Answers",group:"category",isAnswer:!0}].map((o,a)=>
1i(o.label,o.group,!!o.isAnswer,a)),this.charts.forEach((o,a)=>this.onFilterChange(o,a))}ngOnDestroy(){this.tabStateSubscription?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(d.vh),t.rXU(Ct.O),t.rXU(y.P),t.rXU(G.L))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-pre-employment-test-listing"]],viewQuery:function(i,o){if(1&i&&t.GBs(Et,5),2&i){let a;t.mGM(a=t.lsd())&&(o.action=a.first)}},features:[t.Jv_([G.L])],decls:15,vars:5,consts:[["action",""],["noData",""],["menu","matMenu"],[1,"content-body","pre-employment-listing"],[3,"contentHeader"],[1,"d-flex","justify-content-end","mb-3"],[1,"btn","btn-primary","mb-2","mr-2",3,"click"],[1,"btn","btn-primary","mb-2",3,"click"],[3,"infoOutput","filterOption","clearable"],[1,"pt-2"],[1,"charts","w-100","d-flex","flex-wrap","gap-10","p-1","justify-content-between"],["class","col-6 p-2 card d-flex flex-column",4,"ngFor","ngForOf"],["mat-stretch-tabs","true","class","w-100 p-1",3,"selectedIndexChange",4,"ngIf"],[1,"col-6","p-2","card","d-flex","flex-column"],[1,"form-group","d-flex","justify-content-between","align-items-center","w-100"],[1,"flex-shrink-0","mb-0"],[1,"app-ng-autocomplete","filters","d-flex","gap-5"],["bindLabel","name","bindValue","value","placeholder","Select Month",1,"border","border-dark","ng-input",3,"ngModelChange","change","items","ngModel","searchable","clearable"],["bindLabel","name","bindValue","value","placeholder","Select Year",1,"border","border-dark","ng-input",3,"ngModelChange","change","items","ngModel","searchable","clearable"],[3,"chartOptions","useCustomLegend",4,"ngIf","ngIfElse"],[3,"chartOptions","useCustomLegend"],[1,"mt-5","d-flex","justify-content-center","align-items-center"],[1,"mt-5","text-danger"],["mat-stretch-tabs","true",1,"w-100","p-1",3,"selectedIndexChange"],["label","Question Library",1,"p-2","m-1"],["matTabContent",""],["label","Examination Library",1,"p-2","m-1"],["filterType","query",3,"onChanges","options","enableUrlFilters"],["mat-icon-button","","aria-label","Open Interview",3,"matMenuTriggerFor"],["type","button","mat-menu-item","",1,"px-3",3,"click"],[1,"mx-2"],["mat-menu-item","",1,"px-3",3,"click"]],template:function(i,o){if(1&i){const a=t.RV6();t.j41(0,"div")(1,"div",3),t.nrm(2,"app-content-header",4),t.j41(3,"div",5)(4,"button",6),t.bIt("click",function(){return t.eBV(a),t.Njj(o.openQuestion())}),t.EFF(5," Create Pre-Employment Question Library "),t.k0s(),t.j41(6,"button",7),t.bIt("click",function(){return t.eBV(a),t.Njj(o.openExamination())}),t.EFF(7," Create Examination Library "),t.k0s()(),t.j41(8,"main-app-analytics",8),t.bIt("infoOutput",function(c){return t.eBV(a),t.Njj(o.getAnalytics(c))}),t.k0s(),t.j41(9,"div",9)(10,"div",10),t.DNE(11,wt,10,11,"div",11),t.k0s(),t.DNE(12,jt,5,0,"mat-tab-group",12),t.k0s(),t.DNE(13,It,10,1,"ng-template",null,0,t.C5r),t.k0s()()}2&i&&(t.R7$(2),t.Y8G("contentHeader",o.contentHeader),t.R7$(6),t.Y8G("filterOption",o.filterOption)("clearable",!1),t.R7$(3),t.Y8G("ngForOf",o.charts),t.R7$(),t.Y8G("ngIf",o.showTabs))},dependencies:[d.Sq,d.bT,v.Q,yt.e,vt.H,S.u,m.BC,m.vS,xt.vr,Mt.iY,Pt.q,M.kk,M.fb,M.Cp,Tt.An,P.$L,P.mq,P.T8],styles:["form[_ngcontent-%COMP%]   .ng-input[_ngcontent-%COMP%], form[_ngcontent-%COMP%]   .p-element.disableMenu[_ngcontent-%COMP%]   .p-editor-container[_ngcontent-%COMP%]{border:1px solid #bdbdc7!important;box-shadow:none!important;border-radius:8px!important;height:40px!important;padding:1px}form[_ngcontent-%COMP%]   select.form-control[_ngcontent-%COMP%]{outline:none!important;padding:.5rem!important}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .radio-title[_ngcontent-%COMP%], form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;margin-bottom:8px}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-check-label[_ngcontent-%COMP%]{font-size:inherit!important;font-weight:inherit!important}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-check-inline[_ngcontent-%COMP%]{margin-right:3rem!important}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-check-inline[_ngcontent-%COMP%]   .form-check-label[_ngcontent-%COMP%]{margin-bottom:0!important}form[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:20px}form[_ngcontent-%COMP%]   .p-calendar[_ngcontent-%COMP%]{width:100%!important}form[_ngcontent-%COMP%]{gap:20px;
1display:flex;flex-direction:column}[_nghost-%COMP%]     .ng-select-container{height:36px!important;border:none!important}[_nghost-%COMP%]     .p-inputtext{padding:.5rem!important}[_nghost-%COMP%]     .p-inputnumber{width:100%!important}[_nghost-%COMP%]     .p-password{display:block!important}[_nghost-%COMP%]     .p-inputmask{display:block!important;width:100%}.phone[_ngcontent-%COMP%]{outline:none!important;padding:.5rem!important;display:flex;border-radius:8px!important;gap:10px;border:1px solid #bdbdc7!important;box-shadow:none!important;justify-content:center;align-items:center}.phone[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{box-shadow:none!important;outline:none!important;border:0px!important;width:100%;height:100%}[_nghost-%COMP%]     .p-checkbox-label{margin-bottom:0!important}",".card-title[_ngcontent-%COMP%]{font-size:18px}button.mat-menu-item[_ngcontent-%COMP%]{font-size:12px;font-weight:500;font-family:Poppins;line-height:16px}  .bg-1-1{background-color:#bf171d50}  .bg-1-2{background-color:#2133d650}  .bg-1-3{background-color:#5fc7ce50}  .bg-2-1{background-color:#ff006b50}  .bg-2-2{background-color:#0f55de50}  .bg-2-3{background-color:#9747ff50}  .bg-3-1{background-color:#5e587350}  .bg-3-2{background-color:#ffc60050}  .bg-3-3{background-color:#21953750}
1  .fill-1-1 svg path{fill:#bf171d}  .fill-1-2 svg path{fill:#2133d6}  .fill-1-3 svg path{fill:#5fc7ce}  .fill-2-1 svg path{fill:#ff006b}  .fill-2-2 svg path{fill:#0f55de}  .fill-2-3 svg path{fill:#9747ff}  .fill-3-1 svg path{fill:#5e5873}  .fill-3-2 svg path{fill:#ffc600}  .fill-3-3 svg path{fill:#219537}.charts[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{min-height:350px;flex:0 1 calc(50% - 10px)}.charts[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .filters.app-ng-autocomplete[_ngcontent-%COMP%]{width:auto!important}.charts[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .filters.app-ng-autocomplete[_ngcontent-%COMP%]     .ng-select-container{height:36px!important}.charts[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]   .filters.app-ng-autocomplete[_ngcontent-%COMP%]   .ng-input[_ngcontent-%COMP%]{width:120px!important;border-radius:4px;padding:.5px}  .pre-employment-listing .media-body h4{font-size:1.4rem!important}  .pre-employment-listing .chart-legend .legend-label{display:block;width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]})}}return n})();var Gt=l(28085);function Dt(n,s){if(1&n&&(t.j41(0,"audio",4),t.nrm(1,"source",5),t.EFF(2," Your browser does not support the audio tag. "),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("src",e.url,t.B4B)("type","audio/webm")}}function $t(n,s){if(1&n&&(t.j41(0,"video",6),t.nrm(1,"source",5),t.EFF(2," Your browser does not support the video tag. "),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("src",e.url,t.B4B)("type","video/webm")}}var T=function(n){return n.AUDIO="audio",n.VIDEO="video",n}(T||{});let Lt=(()=>{class n{constructor(){this.type=T.VIDEO,this.types=T}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-media-preview"]],inputs:{url:"url",type:"type"},decls:5,vars:3,consts:[["video",""],[3,"title"],[1,"m-4"],["class","w-100","controls","",4,"ngIf","ngIfElse"],["controls","",1,"w-100"],[3,"src","type"],["controls","",1,"w-100",2,"max-height","75vh"]],template:function(i,o){if(1&i&&(t.j41(0,"modal-cover",1)(1,"div",2),t.DNE(2,Dt,3,2,"audio",3)(3,$t,3,2,"ng-template",null,0,t.C5r),t.k0s()()),2&i){const a=t.sdS(4);t.Y8G("title",o.type===o.types.VIDEO?"Video Preview":"Audio Preview"),t.R7$(2),t.Y8G("ngIf",o.type===o.types.AUDIO)("ngIfElse",a)}},dependencies:[d.bT,Gt.K],encapsulation:2})}}return n})();var Yt=l(59042),Ut=l(82765),Bt=l(5951);const Vt=()=>["text","textarea"],Xt=()=>["audio","video"];function At(n,s){if(1&n&&t.nrm(0,"app-content-header",12),2&n){const e=t.XpG();t.Y8G("contentHeader",e.contentHeader)}}function Nt(n,s){if(1&n&&(t.j41(0,"span"),t.EFF(1,"OverAll Score: "),t.j41(2,"span",7),t.EFF(3),t.k0s()()),2&n){const e=t.XpG();t.R7$(3),t.SpI("",null==e.examReport||null==e.examReport.totalScore?null:e.examReport.totalScore.toFixed(2),"%")}}function Qt(n,s){1&n&&(t.j41(0,"span",13),t.EFF(1,"In Progress"),t.k0s())}function Ht(n,s){if(1&n&&(t.j41(0,"span",31),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2).$implicit;t.R7$(),t.Lme(" ",e.answer.score," / ",e.weight," ")}}function zt(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",35),t.bIt("click",function(){t.eBV(e);const o=t.XpG(3).$implicit,a=t.XpG(3);return t.Njj(a.sendRating(o.answer.score,o))}),t.j41(1,"span",36),t.EFF(2,"Rate "),t.k0s()()}}function Jt(n,s){if(1&n){const e=t.RV6();t.j41(0,"input",33),t.mxI("ngModelChange",function(o){t.eBV(e);const a=t.XpG(2).$implicit;return t.DH7(a.answer.score,o)||(a.answer.score=o),t.Njj(o)}),t.k0s(),t.j41(1,"span",31),t.EFF(2),t.k0s(),t.DNE(3,zt,3,0,"button",34)}if(2&n){const e=t.XpG(2).$implicit;t.R50("ngModel",e.answer.score),t.R7$(2),t.SpI("/ ",e.weight,""),t.R7$(),t.Y8G("ngIf",e.answer.score<=e.weight)}}function Wt(n,s){if(1&n&&(t.j41(0,"div",30)(1,"span",31),t.EFF(2,"Weight score: "),t.k0s(),t.DNE(3,Ht,2,2,"span",32)(4,Jt,4,3,"ng-template",null,1,t.C5r),t.k0s()),2&n){const e=t.sdS(5),i=t.XpG().$implicit;t.R7$(3),t.Y8G("ngIf",null==i.answer?null:i.answer.rated)("ngIfElse",e)}}function Zt(n,s){if(1&n&&(t.j41(0,"mat-radio-button",43),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(2).$implicit,o=t.XpG(3);t.HbH(o.getButtonClass(i,e)),t.Y8G("name",i._id)("checked",e.isSelected),t.R7$(),t.SpI(" ",e.title," ")}}
1function Kt(n,s){if(1&n&&(t.j41(0,"mat-checkbox",44),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(2).$implicit,o=t.XpG(3);t.HbH(o.getButtonClass(i,e)),t.Y8G("checked",e.isSelected),t.R7$(),t.SpI(" ",e.title," ")}}function qt(n,s){1&n&&(t.qSk(),t.j41(0,"svg",46)(1,"g",47),t.nrm(2,"path",48)(3,"path",49),t.k0s(),t.j41(4,"defs")(5,"clipPath",50),t.nrm(6,"rect",51),t.k0s()()())}function te(n,s){1&n&&(t.qSk(),t.j41(0,"svg",46),t.nrm(1,"path",52),t.k0s())}function ee(n,s){if(1&n&&(t.j41(0,"span"),t.DNE(1,qt,7,0,"svg",45)(2,te,2,0,"ng-template",null,2,t.C5r),t.k0s()),2&n){const e=t.sdS(3),i=t.XpG().$implicit;t.HbH("ml-2 text-"),t.R7$(),t.Y8G("ngIf",i.useClass)("ngIfElse",e)}}function ne(n,s){if(1&n&&(t.j41(0,"div",38),t.qex(1,39),t.DNE(2,Zt,2,5,"mat-radio-button",40)(3,Kt,2,4,"mat-checkbox",41)(4,ee,4,4,"span",42),t.bVm(),t.k0s()),2&n){const e=s.$implicit,i=t.XpG(2).$implicit;t.R7$(),t.Y8G("ngSwitch",i.inputType),t.R7$(),t.Y8G("ngSwitchCase","radio"),t.R7$(),t.Y8G("ngSwitchCase","checkbox"),t.R7$(),t.Y8G("ngIf",null==i.answer||null==i.answer.selectedOptions?null:i.answer.selectedOptions.includes(e._id))}}function oe(n,s){if(1&n&&(t.j41(0,"div"),t.DNE(1,ne,5,4,"div",37),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",e.options)}}function ie(n,s){if(1&n&&t.nrm(0,"textarea",56),2&n){const e=t.XpG(2).$implicit;t.Y8G("value",(null==e.answer?null:e.answer.answer)||"")("disabled",!0)}}function ae(n,s){if(1&n&&t.nrm(0,"input",57),2&n){const e=t.XpG(2).$implicit;t.Y8G("value",(null==e.answer?null:e.answer.answer)||"")("disabled",!0)}}function se(n,s){if(1&n&&(t.j41(0,"div",53),t.DNE(1,ie,1,2,"textarea",54)(2,ae,1,2,"input",55),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Y8G("ngIf","textarea"===e.inputType),t.R7$(),t.Y8G("ngIf","text"===e.inputType)}}function le(n,s){if(1&n){const e=t.RV6();t.j41(0,"a",60),t.bIt("click",function(){t.eBV(e);const o=t.XpG(2).$implicit,a=t.XpG(3);return t.Njj(a.openMedia((null==o.answer?null:o.answer.answer)||"",o.inputType))}),t.EFF(1),t.k0s()}if(2&n){let e;const i=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",null==i.answer||null==i.answer.answer||null==(e=i.answer.answer.split("/"))||null==(e=e.pop())||null==(e=e.split("?"))?null:e[0]," ")}}function re(n,s){1&n&&(t.j41(0,"span",61),t.EFF(1," No file uploaded "),t.k0s())}function pe(n,s){if(1&n&&(t.j41(0,"div")(1,"span",23),t.EFF(2),t.nI1(3,"titlecase"),t.k0s(),t.DNE(4,le,2,1,"a",58)(5,re,2,0,"span",59),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(2),t.SpI("",t.bMT(3,3,e.inputType)," Link:"),t.R7$(2),t.Y8G("ngIf",null==e.answer?null:e.answer.answer),t.R7$(),t.Y8G("ngIf",!(null!=e.answer&&e.answer.answer))}}function ce(n,s){if(1&n&&(t.j41(0,"div",21)(1,"h3",22)(2,"span",23),t.EFF(3),t.k0s(),t.DNE(4,Wt,6,2,"div",24),t.k0s(),t.j41(5,"div",25)(6,"div",26),t.EFF(7),t.k0s(),t.DNE(8,oe,2,1,"div",27)(9,se,3,2,"div",28)(10,pe,6,5,"div",27),t.j41(11,"div",29)(12,"span",19),t.EFF(13,"Answer / Note:"),t.k0s(),t.j41(14,"span"),t.EFF(15),t.k0s()()()()),2&n){const e=s.$implicit,i=s.index,o=t.XpG(3);t.R7$(3),t.SpI("Question ",i+1,"."),t.R7$(),t.Y8G("ngIf",o.examReport.status!==o.examReportStatus.ongoing),t.R7$(3),t.JRh(e.title),t.R7$(),t.Y8G("ngIf",o.isCheckboxRadio(e.inputType)),t.R7$(),t.Y8G("ngIf",t.lJ4(7,Vt).includes(e.inputType)),t.R7$(),t.Y8G("ngIf",t.lJ4(8,Xt).includes(e.inputType)),t.R7$(5),t.SpI(" ",e.note,"")}}function de(n,s){if(1&n&&(t.j41(0,"div")(1,"h2",18)(2,"span"),t.EFF(3,"Question Category: "),t.j41(4,"span",16),t.EFF(5),t.k0s()(),t.j41(6,"span",19),t.EFF(7,"Total Score: "),t.j41(8,"span",16),t.EFF(9),t.k0s()()(),t.DNE(10,ce,16,9,"div",20),t.k0s()),2&n){const e=s.$implicit;t.R7$(5),t.JRh(e.title),t.R7$(4),t.SpI("",e.score,"%"),t.R7$(),t.Y8G("ngForOf",e.questions)}}function me(n,s){if(1&n&&(t.j41(0,"div",14)(1,"h2",15)(2,"span"),t.EFF(3,"Question Type: "),t.j41(4,"span",16),t.EFF(5),t.k0s()(),t.j41(6,"span"),t.EFF(7,"Total Score: "),t.j41(8,"span",16),t.EFF(9),t.k0s()()(),t.DNE(10,de,11,3,"div",17),t.k0s()),2&n){const e=s.$implicit;t.R7$(5),t.JRh(e.type),t.R7$(4),t.SpI("",e.score,"%"),t.R7$(),t.Y8G("ngForOf",e.categories)}}const ue={ongoing:"Ongoing",pending:"Pending",completed:"Completed"},_e=h.c.env,fe=[{path:"",component:St},{path:":job-opportunity",component:_t},{path:":job-opportunity/:job-application",component:(()=>{class n{constructor(e,i,o){this.route=e,this.genServ=i,this.preEmploymentTestService=o,this.show
1FilterOptions=!0,this.contentHeader={headerTitle:"Recruitment",actionButton:!0,breadcrumb:{links:[{name:"Recruitment",isLink:!0,link:"/recruitment"},{name:"Pre Employment Tests Result",isLink:!1}]}},this.examReportStatus=ue,this.groupedByType=[]}ngOnInit(){this.route.params.subscribe(e=>{this.jobApplicationID=e["job-application"],this.fetchReport()})}checkBoxRadioMark(e,i){let o="";return e.answer?.selectedOptions?.includes(i._id)&&(o=i.selected?"success text-white":""),o}getButtonClass(e,i){let o="";return i.isSelected&&(o+="fw-600 "),i.showAsCorrect&&(o+="bg-success text-white pr-2"),o.trim()}fetchReport(){this.preEmploymentTestService.getExamReport(this.jobApplicationID).subscribe(({data:e})=>{this.examReport=e,this.groupedByType=this.examReport.exam.questions.reduce((i,o)=>{const a=this.examReport.answers.find(p=>p.questionId===o._id);o.answer={...a,score:a?.score||0},this.isCheckboxRadio(o.inputType)&&o.options.forEach(p=>{p.useClass=this.checkBoxRadioMark(o,p),p.isSelected=o.answer?.selectedOptions?.includes(p._id),p.showAsCorrect=p.isSelected&&p.selected});const r=o.answer?.score,c=o.weight,u=i.find(p=>p.type===o.type);if(u){const p=u.categories.find(g=>g._id===o.category._id);if(p){p.questions.push(o);const g=p.questions.reduce((O,k)=>O+(k.answer?.score||0),0),_=p.questions.reduce((O,k)=>O+k.weight,0);p.score=(100*g/_).toFixed(2)}else u.categories.push({...o.category,score:(100*r/c).toFixed(2),questions:[o]});const C=u.categories.flatMap(g=>g.questions).reduce((g,_)=>g+(_.answer?.score||0),0),E=u.categories.flatMap(g=>g.questions).reduce((g,_)=>g+_.weight,0);u.score=(100*C/E).toFixed(2)}else i.push({type:o.type,score:(100*r/c).toFixed(2),categories:[{...o.category,score:(100*r/c).toFixed(2),questions:[o]}]});return i},[])})}isCheckboxRadio(e){return["checkbox","radio"].includes(e)}openMedia(e,i){if(!e)return;const{componentInstance:o}=this.genServ.preModal(Lt,{size:"xl"});Object.assign(o,{url:e,type:i})}sendRating(e,i){i.weight<e||e<0||this.preEmploymentTestService.sendRating(this.examReport._id,{questionId:i._id,score:e}).subscribe(()=>{this.fetchReport()})}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(f.nX),t.rXU(I.O),t.rXU(y.P))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-pre-employment-test-result"]],inputs:{showFilterOptions:"showFilterOptions"},decls:14,vars:5,consts:[["inProgress",""],["ratingBlock",""],["wrongAnswer",""],[3,"contentHeader",4,"ngIf"],[1,"px-2","pre-employment-test-result"],[1,"d-flex","px-2","mt-3"],[1,"mb-0","w-100","title","d-flex","justify-content-between"],[1,"fw-700"],[4,"ngIf","ngIfElse"],[1,"mt-0"],[1,"p-0"],["class","",4,"ngFor","ngForOf"],[3,"contentHeader"],[1,"fw-700","text-danger","mx-3"],[1,""],[1,"d-flex","justify-content-between","p-2","mt-4","mb-0"],[1,"fw-500"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","p-2","mb-3"],[1,"text-secondary"],["class","d-flex flex-column justify-content-between my-3 px-4 border-bottom",4,"ngFor","ngForOf"],[1,"d-flex","flex-column","justify-content-between","my-3","px-4","border-bottom"],[1,"w-100","mt-1","mb-1","d-flex","justify-content-between"],[1,"fw-600"],["class","mb-0 fw-500 form-group form-style d-flex align-items-center gap-5",4,"ngIf"],[1,"px-2","pb-3"],[1,"mb-1"],[4,"ngIf"],["class","form-group form-style",4,"ngIf"],[1,"fw-500","mt-3"],[1,"mb-0","fw-500","form-group","form-style","d-flex","align-items-center","gap-5"],[1,"text-secondary","flex-shrink-0"],["class","text-secondary flex-shrink-0",4,"ngIf","ngIfElse"],["title","weight","type","number","min","0",1,"form-control",3,"ngModelChange","ngModel"],["class","m-0 rating btn btn-default btn-slim ml-1","type","button",3,"click",4,"ngIf"],["type","button",1,"m-0","rating","btn","btn-default","btn-slim","ml-1",3,"click"],[1,"text-white","d-flex","align-items-center","flex-shrink-0"],["class","d-flex align-items-center gap-5 my-1",4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","gap-5","my-1"],[3,"ngSwitch"],["disabled","true",3,"name","class","checked",4,"ngSwitchCase"],["disabled","true",3,"class","checked",4,"ngSwitchCase"],[3,"class",4,"ngIf"],["disabled","true",3,"name","checked"],["disabled","true",3,"checked"],["width","23","height","23","viewBox","0 0 23 23","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf","ngIfElse"],["width","23","height","23","viewBox","0 0 23 23","fill","none","xmlns","http://www.w3.org/2000/svg"],["clip-path","url(#clip0_13819_47663)"],["d","M19.75 9.34049V18.0488C19.75 18.4135 19.6051 18.7632 19.3473 19.0211C19.0894 19.279 18.7397 19.4238 18.375 19.4238H4.625C4.26033 19.4238 3.91059 19.279 3.65273 19.0211C3.39487 18.7632 3.25 18.4135 3.25 18.0488V4.29883C3.25 3.93416 3.39487 3.58442 3.65273 3.32656C3.91059 3.06869 4.26033 2.92383 4.625 2.92383H14.25","stroke","#219537","stroke-width","4","stroke-linecap","round","stroke-linejoin","round"],["d","M7.83203 9.34115L12.4154 13.0078L19.2904 3.38281","stroke","#219537","stroke-width","4","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_13819_47663"],["width","22","height","22","fill","white","transform","translate(0.5 0.173828)"],["d","M6.61111 19.7294C5.63865 19.7294 4.70602 19.3431 4.01839 18.6554C3.33075 17.9678 2.94444 17.0352 2.94444 16.0627V6.28494C2.94444 5.31248 3.33075 4.37985 4.01839 3.69221C4.70602 3.00458 5.63865 2.61827 6.61111 2.61827C6.93526 2.61827 7.24614 2.4895 7.47535 2.26029C7.70456 2.03108 7.83333 1.7202 7.83333 1.39605C7.83333 1.0719 7.70456 0.76102 7.47535 0.531809C7.24614 0.302598 6.93526 0.173828 6.61111 0.173828C4.99034 0.173828 3.43596 0.817675 2.2899 1.96373C1.14385 3.10979 0.5 4.66417 0.5 6.28494V16.0627C0.5 17.6835 1.14385 19.2379 2.2899 20.3839C3.43596 21.53 4.99034 22.1738 6.61111 22.1738C6.93526 22.1738 7.24614 22.0451 7.47535 21.8158C7.70456 21.5866 7.83333 21.2758 7.83333 20.9516C7.83333 20.6275 7.70456 20.3166 7.47535 20.0874C7.24614 19.8582 6.93526 19.7294 6.61111 19.7294ZM16.0344 15.7083C16.149 15.5947 16.2399 15.4595 16.302 15.3105C16.364 15.1616 16.396 15.0018 16.396 14.8405C16.396 14.6791 16.364 14.5194 16.302 14.3705C16.2399 14.2215 16.149 14.0863 16.
10344 13.9727L13.2233 11.1738L16.0344 8.37494C16.2646 8.14479 16.3939 7.83264 16.3939 7.50716C16.3939 7.18168 16.2646 6.86953 16.0344 6.63938C15.8043 6.40923 15.4921 6.27994 15.1667 6.27994C14.8412 6.27994 14.529 6.40923 14.2989 6.63938L11.5 9.45049L8.70111 6.63938C8.47096 6.40923 8.15881 6.27994 7.83333 6.27994C7.50785 6.27994 7.1957 6.40923 6.96556 6.63938C6.73541 6.86953 6.60611 7.18168 6.60611 7.50716C6.60611 7.83264 6.73541 8.14479 6.96556 8.37494L9.77667 11.1738L6.96556 13.9727C6.851 14.0863 6.76007 14.2215 6.69802 14.3705C6.63597 14.5194 6.60402 14.6791 6.60402 14.8405C6.60402 15.0018 6.63597 15.1616 6.69802 15.3105C6.76007 15.4595 6.851 15.5947 6.96556 15.7083C7.07918 15.8228 7.21436 15.9138 7.3633 15.9758C7.51223 16.0379 7.67199 16.0698 7.83333 16.0698C7.99468 16.0698 8.15443 16.0379 8.30337 15.9758C8.45231 15.9138 8.58749 15.8228 8.70111 15.7083L11.5 12.8972L14.2989 15.7083C14.4125 15.8228 14.5477 15.9138 14.6966 15.9758C14.8456 16.0379 15.0053 16.0698 15.1667 16.0698C15.328 16.0698 15.4878 16.0379 15.6367 15.9758C15.7856 15.9138 15.9208 15.8228 16.0344 15.7083ZM16.3889 0.173828C16.0647 0.173828 15.7539 0.302598 15.5246 0.531809C15.2954 0.76102 15.1667 1.0719 15.1667 1.39605C15.1667 1.7202 15.2954 2.03108 15.5246 2.26029C15.7539 2.4895 16.0647 2.61827 16.3889 2.61827C17.3613 2.61827 18.294 3.00458 18.9816 3.69221C19.6692 4.37985 20.0556 5.31248 20.0556 6.28494V16.0627C20.0556 17.0352 19.6692 17.9678 18.9816 18.6554C18.294 19.3431 17.3613 19.7294 16.3889 19.7294C16.0647 19.7294 15.7539 19.8582 15.5246 20.0874C15.2954 20.3166 15.1667 20.6275 15.1667 20.9516C15.1667 21.2758 15.2954 21.5866 15.5246 21.8158C15.7539 22.0451 16.0647 22.1738 16.3889 22.1738C18.0097 22.1738 19.564 21.53 20.7101 20.3839C21.8562 19.2379 22.5 17.6835 22.5 16.0627V6.28494C22.5 4.66417 21.8562 3.10979 20.7101 1.96373C19.564 0.817675 18.0097 0.173828 16.3889 0.173828Z","fill","#FF0000"],[1,"form-group","form-style"],["title","answer","class","form-control w-100 p-2","matInput","","required","","rows","5",3,"value","disabled",4,"ngIf"],["title","answer","class","form-control w-100 p-2","matInput","","required","",3,"value","disabled",4,"ngIf"],["title","answer","matInput","","required","","rows","5",1,"form-control","w-100","p-2",3,"value","disabled"],["title","answer","matInput","","required","",1,"form-control","w-100","p-2",3,"value","disabled"],["class","fw-500 text-secondary ml-1 cursor-pointer",3,"click",4,"ngIf"],["class","fw-500 text-secondary ml-1",4,"ngIf"],[1,"fw-500","text-secondary","ml-1","cursor-pointer",3,"click"],[1,"fw-500","text-secondary","ml-1"]],template:function(i,o){if(1&i&&(t.j41(0,"div"),t.DNE(1,At,1,1,"app-content-header",3),t.j41(2,"section",4)(3,"div")(4,"div",5)(5,"h1",6)(6,"span",7),t.EFF(7),t.k0s(),t.DNE(8,Nt,4,1,"span",8)(9,Qt,2,0,"ng-template",null,0,t.C5r),t.k0s()(),t.nrm(11,"hr",9),t.j41(12,"div",10),t.DNE(13,me,11,3,"div",11),t.k0s()()()()),2&i){const a=t.sdS(10);t.R7$(),t.Y8G("ngIf",o.showFilterOptions),t.R7$(6),t.SpI("",null==o.examReport||null==o.examReport.jobApplicationID?null:o.examReport.jobApplicationID.fullName," Exam Result"),t.R7$(),t.Y8G("ngIf",(null==o.examReport?null:o.examReport.status)!==o.examReportStatus.ongoing)("ngIfElse",a),t.R7$(5),t.Y8G("ngForOf",o.groupedByType)}},dependencies:[d.Sq,d.bT,d.ux,d.e1,v.Q,m.me,m.Q0,m.BC,m.VZ,m.vS,Yt.fg,Ut.So,Bt._g,d.PV],styles:["form[_ngcontent-%COMP%]   .ng-input[_ngcontent-%COMP%], form[_ngcontent-%COMP%]   .p-element.disableMenu[_ngcontent-%COMP%]   .p-editor-container[_ngcontent-%COMP%]{border:1px solid #bdbdc7!important;box-shadow:none!important;border-radius:8px!important;height:40px!important;padding:1px}form[_ngcontent-%COMP%]   select.form-control[_ngcontent-%COMP%]{outline:none!important;padding:.5rem!important}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .radio-title[_ngcontent-%COMP%], form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;margin-bottom:8px}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-check-label[_ngcontent-%COMP%]{font-size:inherit!important;font-weight:inherit!important}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-check-inline[_ngcontent-%COMP%]{margin-right:3rem!important}form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .form-check-inline[_ngcontent-%COMP%]   .form-check-label[_ngcontent-%COMP%]{margin-bottom:0!important}form[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:20px}form[_ngcontent-%COMP%]   .p-calendar[_ngcontent-%COMP%]{width:100%!important}form[_ngcontent-%COMP%]{gap:20px;
1display:flex;flex-direction:column}[_nghost-%COMP%]     .ng-select-container{height:36px!important;border:none!important}[_nghost-%COMP%]     .p-inputtext{padding:.5rem!important}[_nghost-%COMP%]     .p-inputnumber{width:100%!important}[_nghost-%COMP%]     .p-password{display:block!important}[_nghost-%COMP%]     .p-inputmask{display:block!important;width:100%}.phone[_ngcontent-%COMP%]{outline:none!important;padding:.5rem!important;display:flex;border-radius:8px!important;gap:10px;border:1px solid #bdbdc7!important;box-shadow:none!important;justify-content:center;align-items:center}.phone[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{box-shadow:none!important;outline:none!important;border:0px!important;width:100%;height:100%}[_nghost-%COMP%]     .p-checkbox-label{margin-bottom:0!important}","section[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{color:#5e5873;font-family:Poppins}h1[_ngcontent-%COMP%], .overall-score[_ngcontent-%COMP%]   .percentage[_ngcontent-%COMP%], .cat-title[_ngcontent-%COMP%]{font-weight:700;font-size:22px}h2[_ngcontent-%COMP%]{background:#440f7c;font-size:17px;font-weight:600}h2[_ngcontent-%COMP%]   div[_ngcontent-%COMP%], h2[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff}h3[_ngcontent-%COMP%]{font-size:16px}.overall-score[_ngcontent-%COMP%]{font-size:19px}mat-button-toggle[_ngcontent-%COMP%]{background:#dacfe5;color:#5e5873;font-size:14px;border:2px solid #fff;width:49px;height:49px}
1mat-button-toggle[_ngcontent-%COMP%]     button{cursor:default!important}mat-button-toggle.selected[_ngcontent-%COMP%]{background:#440f7c;color:#fff}input[title=weight][_ngcontent-%COMP%]{height:34px!important;width:60px!important;text-align:center!important;padding:6px!important}.rating[_ngcontent-%COMP%]{padding:4px!important}.rating[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:hover{color:#d62196!important}  .pre-employment-test-result mat-checkbox.fw-600 label,   .pre-employment-test-result mat-radio-button.fw-600 label{font-weight:600!important;color:#000!important}  .pre-employment-test-result mat-checkbox.text-white label,   .pre-employment-test-result mat-radio-button.text-white label{color:#fff!important}  .pre-employment-test-result .bg-success{background:#219537!important}"]})}}return n})()}];let he=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({imports:[f.iI.forChild(fe.filter(e=>!1!==e[_e])),f.iI]})}}return n})();var be=l(46489);let Ce=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({providers:[Y.h,{provide:F.a7,useClass:U.z,multi:!0},{provide:F.a7,useClass:B.B,multi:!0}],imports:[d.MD,$.G,be.F,he,L.Kj]})}}return n})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.