PageSourceSearch

https://hns.edu.sa/5642.83f51652f3f668ab.js

js hns.edu.sa collected 2026-09-29 01:29:37 UTC 84,127 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkzeta=self.webpackChunkzeta||[]).push([[5642],{5642:(U,G,c)=>{c.r(G),c.d(G,{RatingModule:()=>ke});var d=c(7062),l=c(4734),t=c(4438),F=c(9285),b=c(5351),A=c(579),k=c(993),v=c(607),I=c(8859),D=c(1780),O=c(3414),E=c(2360),f=c(177),L=c(3813),$=c(1389),w=c(6911),m=c(9417);const g=i=>({label:i}),h=i=>({label:i,link:"/AcademicHour/supervision/ViewAcademicSession"}),u=(i,s)=>[i,s],p=(i,s,e)=>({"fa-sort":i,"fa-sort-up":s,"fa-sort-down":e}),_=i=>[i],B=i=>["/Rating/adminRatingResult",i],X=(i,s)=>({color:i,cursor:s}),H=(i,s)=>({color:i,fontSize:"1.5rem",cursor:s}),W=i=>["/Rating/EditRating",i],Q=i=>({isPublished:i});function K(i,s){1&i&&t.nrm(0,"i",36)}function Z(i,s){1&i&&t.nrm(0,"i",37)}function tt(i,s){if(1&i&&(t.j41(0,"option",53),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.name," ")}}function et(i,s){if(1&i&&(t.j41(0,"option",53),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.name," ")}}function nt(i,s){if(1&i&&(t.j41(0,"option",53),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.name," ")}}function it(i,s){if(1&i&&(t.j41(0,"option",53),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.JRh(e.name)}}function at(i,s){if(1&i){const e=t.RV6();t.j41(0,"div",38)(1,"div",39)(2,"div",40)(3,"label",41),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"select",42),t.bIt("change",function(n){t.eBV(e);const o=t.XpG();return t.Njj(o.onSchoolSelectionChange(n))}),t.mxI("ngModelChange",function(n){t.eBV(e);const o=t.XpG();return t.DH7(o.selectedSchoolId,n)||(o.selectedSchoolId=n),t.Njj(n)}),t.j41(7,"option",43),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.DNE(10,tt,2,2,"option",44),t.k0s()(),t.j41(11,"div",40)(12,"label",45),t.EFF(13),t.nI1(14,"translate"),t.k0s(),t.j41(15,"select",46),t.bIt("change",function(n){t.eBV(e);const o=t.XpG();return t.Njj(o.onSchoolStageSelectionChange(n))}),t.mxI("ngModelChange",function(n){t.eBV(e);const o=t.XpG();return t.DH7(o.selectedSchoolStageId,n)||(o.selectedSchoolStageId=n),t.Njj(n)}),t.j41(16,"option",43),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.DNE(19,et,2,2,"option",44),t.k0s()(),t.j41(20,"div",40)(21,"label",47),t.EFF(22),t.nI1(23,"translate"),t.k0s(),t.j41(24,"select",48),t.mxI("ngModelChange",function(n){t.eBV(e);const o=t.XpG();return t.DH7(o.selectedSchoolStageGradeId,n)||(o.selectedSchoolStageGradeId=n),t.Njj(n)}),t.j41(25,"option",43),t.EFF(26),t.nI1(27,"translate"),t.k0s(),t.DNE(28,nt,2,2,"option",44),t.k0s()(),t.j41(29,"div",40)(30,"label",49),t.EFF(31),t.nI1(32,"translate"),t.k0s(),t.j41(33,"select",50),t.mxI("ngModelChange",function(n){t.eBV(e);const o=t.XpG();return t.DH7(o.selectedTermId,n)||(o.selectedTermId=n),t.Njj(n)}),t.j41(34,"option",43),t.EFF(35),t.nI1(36,"translate"),t.k0s(),t.DNE(37,it,2,2,"option",44),t.k0s()(),t.j41(38,"div",40)(39,"label",51),t.EFF(40),t.nI1(41,"translate"),t.k0s(),t.j41(42,"select",52),t.mxI("ngModelChange",function(n){t.eBV(e);const o=t.XpG();return t.DH7(o.selectedIsActive,n)||(o.selectedIsActive=n),t.Njj(n)}),t.j41(43,"option",43),t.EFF(44),t.nI1(45,"translate"),t.k0s(),t.j41(46,"option",53),t.EFF(47),t.nI1(48,"translate"),t.k0s(),t.j41(49,"option",53),t.EFF(50),t.nI1(51,"translate"),t.k0s()()(),t.j41(52,"div",40)(53,"label",47),t.EFF(54),t.nI1(55,"translate"),t.k0s(),t.j41(56,"input",54),t.mxI("ngModelChange",function(n){t.eBV(e);const o=t.XpG();return t.DH7(o.selectedRateDate,n)||(o.selectedRateDate=n),t.Njj(n)}),t.k0s()()(),t.j41(57,"div",55)(58,"div",56)(59,"div",57)(60,"button",58),t.bIt("click",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.Search())}),t.EFF(61),t.nI1(62,"translate"),t.nrm(63,"i",59),t.k0s(),t.j41(64,"button",60),t.bIt("click",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.ClearSearch())}),t.EFF(65),t.nI1(66,"translate"),t.nrm(67,"i",61),t.k0s()()()()()}if(2&i){const e=t.XpG();t.R7$(4),t.SpI(" ",t.bMT(5,32,"WeekPlan.EducationalDepartment")," "),t.R7$(2),t.R50("ngModel",e.selectedSchoolId),t.R7$(),t.Y8G("ngValue",null),t.R7$(),t.SpI(" ",t.bMT(9,34,"WeekPlan.SelectEducationalDepartment")," "),t.R7$(2),t.Y8G("ngForOf",e.SchoolDDL),t.R7$(3),t.SpI(" ",t.bMT(14,36,"Common.stage")," "),t.R7$(2),t.R50("ngModel",e.selectedSchoolStageId),t.R7$(),t.Y8G("ngValue",null),t.R7$(),t.SpI(" ",t.bMT(18,38,"chooseSchoolAndStage.selectStage"),""),t.R7$(2),t.Y8G("ngForOf",e.SchoolStagesDDL),t.R7$(3),t.SpI(" ",t.bMT(23,40,"Common.AcademicGrades")," "),t.R7$(2),t.R50("ngModel",e.selectedSchoolStageGradeId),t.R7$(),t.Y8G("ngValue",null),t.R7$(),t.SpI(" ",t.bMT(27,42,"chooseSchoolAndStage.selectGrade"),""),t.R7$(2),t.Y8G("ngForOf",e.SchoolStageGradesDDL),t.R7$(3),t.SpI(" ",t.bMT(32,44,"Common.AcademicSemster")," "),t.R7$(2),t.R50("ngModel",e.selectedTermId),t.R7$(),t.Y8G("ngValue",null),t.R7$(),t.SpI(" ",t.bMT(36,46,"Common.SelectAcademicSemster"),""),t.R7$(2),t.Y8G("ngForOf",e.YearTermDDL),t.R7$(3),t.SpI(" ",t.bMT(41,48,"Blogs.ActivityStatus")," "),t.R7$(2),t.R50("ngModel",e.selectedIsActive),t.R7$(),t.Y8G("ngValue",null),t.R7$(),t.SpI(" ",t.bMT(45,50,"Blogs.SelectActivityStatus")," "),t.R7$(2),t.Y8G("value","true"),t.R7$(),t.SpI(" ",t.bMT(48,52,"Blogs.Active")," "),t.R7$(2),t.Y8G("value","false"),t.R7$(),t.SpI(" ",t.bMT(51,54,"Blogs.Inactive")," "),t.R7$(4),t.SpI(" ",t.bMT(55,56,"Rating.RatingDate")," "),t.R7$(2),t.R50("ngModel",e.selectedRateDate),t.R7$(5),t.SpI(" ",t.bMT(62,58,"Common.search")," "),t.R7$(4),t.SpI(" ",t.bMT(66,60,"Common.clear")," ")}}
1function ot(i,s){if(1&i){const e=t.RV6();t.j41(0,"button",62),t.bIt("click",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.clearSearch())}),t.nrm(1,"i",63),t.k0s()}}function st(i,s){if(1&i&&(t.j41(0,"div",64)(1,"button",65),t.nrm(2,"i",66),t.EFF(3),t.nI1(4,"translate"),t.k0s()()),2&i){const e=t.XpG();t.AVh("add-rating-action--arabic",e.isRTL)("add-rating-action--english",!e.isRTL),t.R7$(3),t.SpI(" ",t.bMT(4,5,"Rating.AddNewRating")," ")}}function lt(i,s){1&i&&(t.j41(0,"th",23),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.JRh(t.bMT(2,1,"Common.Status")))}function rt(i,s){1&i&&(t.j41(0,"th",23),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.JRh(t.bMT(2,1,"Rating.theResult")))}function ct(i,s){if(1&i){const e=t.RV6();t.j41(0,"td",67)(1,"span",75)(2,"label",76)(3,"input",77),t.bIt("change",function(){t.eBV(e);const n=t.XpG().$implicit,o=t.XpG();return t.Njj(o.onToggleRateStatus(n))}),t.k0s(),t.nrm(4,"span",78),t.k0s()()()}if(2&i){const e=t.XpG().$implicit,a=t.XpG();t.R7$(),t.Y8G("ngbTooltip",a.getRateToggleTooltip(e))("disableTooltip",!a.shouldShowRateTooltip(e)),t.R7$(2),t.Y8G("checked",e.isActive)("disabled",a.isRateToggleDisabled(e))}}function dt(i,s){if(1&i&&(t.j41(0,"td",67)(1,"span",72)(2,"button",79),t.nrm(3,"i",80),t.k0s()()()),2&i){const e=t.XpG().$implicit,a=t.XpG();t.R7$(),t.Y8G("ngbTooltip",a.getResultTooltip(e)),t.R7$(),t.Y8G("disabled",!a.canViewResult(e))("routerLink",a.canViewResult(e)?t.eq3(4,B,e.id):null),t.R7$(),t.Y8G("ngStyle",t.l_i(6,X,a.canViewResult(e)?"#1e88e5":"#9ca3af",a.canViewResult(e)?"pointer":"not-allowed"))}}function mt(i,s){if(1&i){const e=t.RV6();t.j41(0,"button",81),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,o=t.XpG();return t.Njj(!n.isPublished&&o.DeleteRate(n.id))}),t.nrm(1,"i",82),t.k0s()}if(2&i){const e=t.XpG().$implicit;t.Y8G("disabled",e.isPublished),t.R7$(),t.Y8G("ngStyle",t.l_i(2,H,e.isPublished?"#9ca3af":"red",e.isPublished?"not-allowed":"pointer"))}}function gt(i,s){if(1&i&&(t.j41(0,"button",83),t.nI1(1,"translate"),t.nrm(2,"i",84),t.k0s()),2&i){const e=t.XpG().$implicit;t.Y8G("ngbTooltip",t.bMT(1,3,"Common.edit"))("routerLink",t.eq3(5,W,e.id))("queryParams",t.eq3(7,Q,e.isPublished))}}function ut(i,s){if(1&i&&(t.j41(0,"tr")(1,"td",67),t.EFF(2),t.k0s(),t.j41(3,"td",67)(4,"span",68),t.EFF(5),t.k0s()(),t.j41(6,"td",67)(7,"span",69),t.EFF(8),t.k0s()(),t.j41(9,"td",67)(10,"span",69),t.EFF(11),t.k0s()(),t.j41(12,"td",67)(13,"span",69),t.EFF(14),t.k0s()(),t.j41(15,"td",67)(16,"span",69),t.EFF(17),t.k0s()(),t.j41(18,"td",67)(19,"span",69),t.EFF(20),t.k0s()(),t.DNE(21,ct,5,4,"td",70)(22,dt,4,9,"td",70),t.j41(23,"td",67),t.EFF(24),t.k0s(),t.j41(25,"td",67)(26,"div",71)(27,"span",72),t.nI1(28,"translate"),t.DNE(29,mt,2,5,"button",73),t.k0s(),t.DNE(30,gt,3,9,"button",74),t.k0s()()()),2&i){const e=s.$implicit,a=t.XpG();t.R7$(2),t.JRh(e.rateCode),t.R7$(2),t.Y8G("ngbTooltip",e.title)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI("\n",e.title," "),t.R7$(2),t.Y8G("ngbTooltip",e.schoolName)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.schoolName," "),t.R7$(2),t.Y8G("ngbTooltip",e.schoolStageName)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.schoolStageName," "),t.R7$(2),t.Y8G("ngbTooltip",e.schoolStageGradeName)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.schoolStageGradeName," "),t.R7$(2),t.Y8G("ngbTooltip",e.publishFromDate)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.publishFromDate," "),t.R7$(2),t.Y8G("ngbTooltip",e.publishToDate)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.publishToDate," "),t.R7$(),t.Y8G("ngIf",a._UserPermissionsService.hasPermission(t.eq3(27,_,a._enumService.AllPermissionEnums.ActiveRate))),t.R7$(),t.Y8G("ngIf",a._UserPermissionsService.hasPermission(t.eq3(29,_,a._enumService.AllPermissionEnums.ViewRateResult))),t.R7$(2),t.JRh(e.totalNmberofStudent),t.R7$(3),t.Y8G("ngbTooltip",e.isPublished?t.bMT(28,25,"Rating.CannotDeleteBecausePublished"):null),t.R7$(2),t.Y8G("ngIf",a._UserPermissionsService.hasPermission(t.eq3(31,_,a._enumService.AllPermissionEnums.DeleteRate))),t.R7$(),t.Y8G("ngIf",a._UserPermissionsService.hasPermission(a._enumService.AllPermissionEnums.EditRate))}}function pt(i,s){1&i&&(t.j41(0,"tr")(1,"td",85),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&i&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"Common.NoD
1ata")," "))}function ht(i,s){1&i&&(t.j41(0,"tr")(1,"td",86),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&i&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"Common.NoSearchResults")," "))}let _t=(()=>{class i{constructor(e,a,n,o,r,R,S,C,M){this._sweetAlertService=e,this.dialog=a,this._enumService=n,this._UserPermissionsService=o,this._SubjectMangementService=r,this._ratingService=R,this.translate=S,this._adminCertificationService=C,this._languageService=M,this.isExpanded=!1,this.SchoolDDL=[],this.SchoolStagesDDL=[],this.SchoolStageGradesDDL=[],this.YearTermDDL=[],this.selectedSchoolId=null,this.selectedSchoolStageId=null,this.selectedSchoolStageGradeId=null,this.selectedSchoolName=null,this.selectedStageName=null,this.selectedGradeName=null,this.selectedTermId=null,this.pageSize=10,this.page=1,this.totalLengh=0,this.selectedRateDate=null,this.rates=[],this.selectedIsActive=null,this.currentSortColumn="",this.currentSortDirection="ASC",this.isRTL=!1}ngOnDestroy(){this.languageSubscription?.unsubscribe()}ngOnInit(){this.languageSubscription=this._languageService.getCurrentLanguage().subscribe(e=>{this.isRTL="ar"===e}),this.initParams(),this.GetSchoolDDl(),this.GetYearTermDDL(),this.loadRates()}initParams(){this.rateParams={searchName:"",schoolId:null,schoolStageId:null,schoolStageGradeId:null,yearTermId:null,isActive:null,rateDate:null,pageNumber:this.page,pageSize:this.pageSize,sortColumnName:"",sortType:l.e.ASC.toString()}}loadRates(){this._ratingService.GetRates(this.rateParams).subscribe(e=>{e.success?(this.rates=e.data.collection,this.totalLengh=e.data.length):(this.rates=[],this.totalLengh=0)})}GetYearTermDDL(){this._adminCertificationService.GetYearTermDDL().subscribe(e=>{this.YearTermDDL=e.data})}GetSchoolDDl(){this._SubjectMangementService.GetSchoolstDDl().subscribe(e=>{this.SchoolDDL=e.data.schools,1===this.SchoolDDL.length?(this.selectedSchoolId=this.SchoolDDL[0].id,this.GetSchoolStagesBySchoolIdDDl(this.selectedSchoolId)):this.selectedSchoolId=null})}GetSchoolStagesBySchoolIdDDl(e){this._SubjectMangementService.GetSchoolStagesDDL(e).subscribe(a=>{if(this.SchoolStagesDDL=a.data,1===this.SchoolStagesDDL.length){const n=this.SchoolStagesDDL[0];this.selectedSchoolStageId=n.id,this.selectedStageName=n.name,this.GetSchoolStageGradesBySchoolStageIdDDl(this.selectedSchoolStageId)}else this.selectedSchoolStageId=null,this.selectedStageName=null})}GetSchoolStageGradesBySchoolStageIdDDl(e){this._SubjectMangementService.GetSchoolStagesGradeDDLBySchoolStageId(e).subscribe(a=>{if(this.SchoolStageGradesDDL=a.data,1===this.SchoolStageGradesDDL.length){const n=this.SchoolStageGradesDDL[0];this.selectedSchoolStageGradeId=n.id,this.selectedGradeName=n.name}else this.selectedSchoolStageGradeId=null,this.selectedGradeName=null})}onSchoolSelectionChange(e){const a=e.target.value;this.selectedSchoolId=a;const n=this.SchoolDDL.find(o=>o.id===a);this.selectedSchoolName=n?n.name:null,this.selectedSchoolStageId=null,this.selectedSchoolStageGradeId=null,this.SchoolStagesDDL=[],this.SchoolStageGradesDDL=[],this.GetSchoolStagesBySchoolIdDDl(a||"")}onSchoolStageSelectionChange(e){const a=e.target.value;this.selectedSchoolStageId=a,this.SchoolStagesDDL.find(o=>o.id===a),this.selectedSchoolStageGradeId=null,this.SchoolStageGradesDDL=[],this.GetSchoolStageGradesBySchoolStageIdDDl(a||"")}Search(){this.page=1,this.rateParams={...this.rateParams,searchName:this.searchTerm||"",schoolId:this.selectedSchoolId,schoolStageId:this.selectedSchoolStageId,schoolStageGradeId:this.selectedSchoolStageGradeId,yearTermId:this.selectedTermId,rateDate:this.selectedRateDate,isActive:this.selectedIsActive,pageNumber:this.page,pageSize:this.pageSize},this.loadRates()}ClearSearch(){this.searchTerm="",this.selectedSchoolId=null,this.selectedSchoolStageId=null,this.selectedSchoolStageGradeId=null,this.selectedRateDate=null,this.selectedIsActive=null,this.selectedTermId=null,this.SchoolDDL=[],this.SchoolStagesDDL=[],this.SchoolStageGradesDDL=[],this.YearTermDDL=[],this.page=1,this.initParams(),this.loadRates()}clearSearch(){this.searchTerm="",this.initParams(),this.loadRates()}toggleSearchFilters(){this.isExpanded=!this.isExpanded}onPageChange(e){this.page=e,this.rateParams.pageNumber=e,this.loadRates()}onPageSizeChange(e){this.pageSize=e,this.rateParams.pageSize=e,this.page=1,this.loadRates()}onSort(e){this.currentSortColumn===e?this.currentSortDirection="ASC"===this.currentSortDirection?"DESC":"ASC":(this.currentSortColumn=e,this.currentSortDirection="ASC"),this.page=1,this.rateParams={...this.rateParams,sortColumnName:e,sortType:this.currentSortDirection,pageNumber:this.page},this.loadRates()}onToggleRateStatus(e){const a=!e.isActive,n=e.isActive;e.isActive=a,this._ratingService.ActiveInActiveRate(e.id,a).subscribe({next:o=>{o.success||(e.isActive=n),this._sweetAlertService.runAlert(o)}})}DeleteRate(e){this._sweetAlertService.ConfirmMethod(this.translate.instant("confirm.DeleteWarningTitle"),this.translate.instant("Rating.deleteRate")).then(a=>{a.isConfirmed&&this._ratingService.DeleteRate(e).subscribe(n=>{n.success&&this.loadRates(),this._sweetAlertService.runAlert(n)})})}refresh(){this.loadRates()}get hasSearch(){return!!this.searchTerm&&this.searchTerm.trim().length>0}get showNoData(){return!(this.hasSearch||this.rates&&0!==this.rates.length)}get showNoSearchResult(){return this.hasSearch&&(!this.rates||0===this.rates.length)}isBeforePublishDate(e){if(!e.publishFromDate)return!1;const a=new Date;a.setHours(0,0,0,0);const n=new Date(e.publishFromDate);return n.setHours(0,0,0,0),a<n}isAfterEndDate(e){if(!e.publishToDate)return!1;const a=new Date;a.setHours(0,0,0,0);const n=new Date(e.publishToDate);return n.setHours(0,0,0,0),a>n}isRateToggleDisabled(e){return!e.canActive||this.isBeforePublishDate(e)||this.isAfterEndDate(e)}shouldShowRateTooltip(e){return this.isBeforePublishDate(e)||this.isAfterEndDate(e)}getRateToggleTooltip(e){return this.isBeforePublishDate(e)?this.translate.instant("Rating.CannotActivateBeforePublishDate"):this.isAfterEndDate(e)?this.translate.instant("Rating.CannotActivateAfterEndDate"):""}hasNoRates(e){return!e.totalNmberofStudent||0===e.totalNmberofStudent}isResultBeforePublishDate(e){return!!e.publishFromDate&&new Date<new Date(e.publishFromDate)}getResultTooltip(e){return this.isResultBeforePublishDate(e)?this.translate.instant("Rating.ResultNotStartedYet"):this.hasNoRates(e)?this.translate.instant("Rating.NoRatesYet"):null}canViewResult(e){return!this.isResultBeforePublishDate(e)&&!this.hasNoRates(e)}static{this.\u0275fac=function(a){return new(a||i)(t.rXU(F.W),t.rXU(b.bZ),t.rXU(A.F),t.rXU(k.N),t.rXU(v.m),t.rXU(I.F),t.rXU(D.c$),t.rXU(O.N),t.rXU(E.g))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-admin-rating-view"]],decls:75,vars:102,consts:[[3,"title","items"],[1,"card","custom-form-card","Custom-font"],["id","header-search",1,"card-header","pb-3","d-flex","justify-content-between","align-items-center","bg-primary","text-white",3,"click"],["type","button",1,"btn","btn-text","new-custom-font","expand-button","w-100","text-start","text-white","d-flex","justify-content-between","align-middle","align-items-center"],[1,"expand-text"],["class","fas fa-chevron-down me-2","style","font-size: 18px;",4,"ngIf"],["class","fas fa-chevron-up me-2","style","font-size: 18px;",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"card","custom-form-card","Custom-font","p-3"],[1,"row","align-items-center"],[1,"col-12","col-md-4","custom-search","mb-3"],["for","studentNameSearch",1,"form-label","label-large"],[1,"input-group","position-relative"],["type","text","id","studentNameSearch","name","searchStudentName",1,"form-control",3,"keyup.enter","ngModelChange","ngModel","placeholder"],["type","button","class","btn-clear",3,"click",4,"ngIf"],[1,"input-group-text",3,"click"],[1,"fa","fa-search"],["class","col-12 col-md-8 mt-3 mt-md-0 mb-1 d-flex add-rating-action",3,"add-rating-action--arabic","add-rating-action--english",4,"ngIf"],[1,"custom-table"],[1,"table-wrapper",2,"position","relative"],[1,"table-responsive-wrapper"],[1,"table","table-bordered"],[1,"bg-primary","text-white","sticky-header"],["scope","col",1,"text-center","align-middle","th-title"],["scope","col",1,"text-center","align-middle","th-title","sortable",3,"click"],[1,"fa",3,"ngClass"],["scope","col",1,"text-center","align-middle","th-studentName",3,"click"],["scope","col",1,"text-center","align-middle","th-idNumber",3,"click"],["scope","col",1,"text-center","align-middle","th-title",3,"click"],["scope","col","class","text-center align-middle th-title",4,"ngIf"],["placement","top","container","body","scope","col",1,"text-center","align-middle","th-title",3,"ngbTooltip"],[1,"fa","fa-repeat","px-3",3,"click"],[1,"Custom-font"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"pageChange","pageSizeChange","collectionSize","page","pageSize"],[1,"fas","fa-chevron-down","me-2",2,"font-size","18px"],[1,"fas","fa-chevron-up","me-2",2,"font-size","18px"],[1,"card-body"],[1,"row","g-3",2,"margin-bottom","10px"],[1,"col-md-4"],["for","SelectEducationalDepartment",1,"form-label","label-large","new-custom-font"],["id","SelectEducationalDepartment",1,"form-select",3,"change","ngModelChange","ngModel"],["disabled","",3,"ngValue"],[3,"value",4,"ngFor","ngForOf"],["for","selectStage",1,"form-label","label-large","new-custom-font"],["id","selectStage",1,"form-select",3,"change","ngModelChange","ngModel"],["for","selectGrade",1,"form-label","label-large","new-custom-font"],["id","selectGrade",1,"form-select",3,"ngModelChange","ngModel"],["for","selectClass",1,"form-label","label-large","new-custom-font"],["id","selectClass","aria-label","Class selection",1,"form-select",3,"ngModelChange","ngModel"],[1,"form-label","label-large","new-custom-font"],[1,"form-select",3,"ngModelChange","ngModel"],[3,"value"],["id","publishDateSelect1","type","date","required","","name","publishDate",1,"form-control",3,"ngModelChange","ngModel"],[1,"row"],[1,"col-md-12","d-flex","justify-content-end","align-items-end"],[1,"d-flex","flex-wrap","justify-content-start","gap-2","align-items-end"],["type","button",1,"btn","btn-primary",3,"click"],[1,"icon-search","me-2",2,"font-size",".8rem"],["type","button",1,"btn","btn-danger",3,"click"],[1,"fas","fa-times",2,"font-size",".8rem"],["type","button",1,"btn-clear",3,"click"],[1,"fa","fa-times","font-primary"],[1,"col-12","col-md-8","mt-3","mt-md-0","mb-1","d-flex","add-rating-action"],["routerLink","/Rating/AddRating",1,"btn","btn-primary","d-inline-flex","align-items-center","gap-2"],[1,"fas","fa-plus-circle"],[1,"text-center"],[1,"truncate-ellipsis","d-inline-block",3,"ngbTooltip","tooltipClass"],[1,"truncate","d-inline-block",3,"ngbTooltip","tooltipClass"],["class","text-center",4,"ngIf"],[1,"d-inline-flex","align-items-center","gap-3"],["placement","top","container","body",3,"ngbTooltip"],["class","btn btn-link p-0",3,"disabled","click",4,"ngIf"],["class","btn btn-link p-0 font-info","placement","top",3,"ngbTooltip","routerLink","queryParams",4,"ngIf"],["placement","top","container","body",1,"d-inline-block",3,"ngbTooltip","disableTooltip"],[1,"switch","switch-large"],["type","checkbox",3,"change","checked","disabled"],[1,"slider","round","switch-large"],[1,"btn","btn-link","p-0",3,"disabled","routerLink"],[1,"fa","fa-file-text-o","f-22",3,"ngStyle"],[1,"btn","btn-link","p-0",3,"click","disabled"],[1,"fa","fa-tras
1h-o",3,"ngStyle"],["placement","top",1,"btn","btn-link","p-0","font-info",3,"ngbTooltip","routerLink","queryParams"],[1,"fa","fa-pencil-square-o",2,"font-size","1.5rem"],["colspan","11",1,"text-center","text-primary","f-16","f-w-600"],["colspan","11",1,"text-center","text-muted","f-16","f-w-600"]],template:function(a,n){1&a&&(t.nrm(0,"app-bread-crump",0),t.nI1(1,"translate"),t.nI1(2,"translate"),t.nI1(3,"translate"),t.j41(4,"div",1)(5,"div",2),t.bIt("click",function(){return n.toggleSearchFilters()}),t.j41(6,"button",3)(7,"span",4),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.j41(10,"span"),t.DNE(11,K,1,0,"i",5)(12,Z,1,0,"i",6),t.k0s()()(),t.DNE(13,at,68,62,"div",7),t.k0s(),t.j41(14,"div",8)(15,"div",9)(16,"div",10)(17,"label",11),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"div",12)(21,"input",13),t.nI1(22,"translate"),t.bIt("keyup.enter",function(){return n.Search()}),t.mxI("ngModelChange",function(r){return t.DH7(n.searchTerm,r)||(n.searchTerm=r),r}),t.k0s(),t.DNE(23,ot,2,0,"button",14),t.j41(24,"span",15),t.bIt("click",function(){return n.Search()}),t.nrm(25,"i",16),t.k0s()()(),t.DNE(26,st,5,7,"div",17),t.k0s(),t.j41(27,"div",18)(28,"div",19)(29,"div",20)(30,"table",21)(31,"thead",22)(32,"tr")(33,"th",23),t.EFF(34),t.nI1(35,"translate"),t.k0s(),t.j41(36,"th",24),t.bIt("click",function(){return n.onSort("Title")}),t.EFF(37),t.nI1(38,"translate"),t.nrm(39,"i",25),t.k0s(),t.j41(40,"th",26),t.bIt("click",function(){return n.onSort("School")}),t.EFF(41),t.nI1(42,"translate"),t.nrm(43,"i",25),t.k0s(),t.j41(44,"th",27),t.bIt("click",function(){return n.onSort("Stage")}),t.EFF(45),t.nI1(46,"translate"),t.nrm(47,"i",25),t.k0s(),t.j41(48,"th",28),t.bIt("click",function(){return n.onSort("Grade")}),t.EFF(49),t.nI1(50,"translate"),t.nrm(51,"i",25),t.k0s(),t.j41(52,"th",24),t.bIt("click",function(){return n.onSort("PublishFromDate")}),t.EFF(53),t.nI1(54,"translate"),t.nrm(55,"i",25),t.k0s(),t.j41(56,"th",24),t.bIt("click",function(){return n.onSort("PublishToDate")}),t.EFF(57),t.nI1(58,"translate"),t.nrm(59,"i",25),t.k0s(),t.DNE(60,lt,3,3,"th",29)(61,rt,3,3,"th",29),t.j41(62,"th",30),t.nI1(63,"translate"),t.EFF(64),t.nI1(65,"translate"),t.j41(66,"i",31),t.bIt("click",function(){return n.refresh()}),t.k0s()(),t.j41(67,"th",23),t.EFF(68),t.nI1(69,"translate"),t.k0s()()(),t.j41(70,"tbody",32),t.DNE(71,ut,31,33,"tr",33)(72,pt,4,3,"tr",34)(73,ht,4,3,"tr",34),t.k0s()()(),t.j41(74,"app-table-pagination",35),t.mxI("pageChange",function(r){return t.DH7(n.page,r)||(n.page=r),r})("pageSizeChange",function(r){return t.DH7(n.pageSize,r)||(n.pageSize=r),r}),t.bIt("pageChange",function(r){return n.onPageChange(r)})("pageSizeChange",function(r){return n.onPageSizeChange(r)}),t.k0s()()()()),2&a&&(t.Y8G("title",t.bMT(1,35,"Rating.Ratings"))("items",t.l_i(71,u,t.eq3(67,g,t.bMT(2,37,"Common.InteractiveActivities")),t.eq3(69,h,t.bMT(3,39,"Rating.Ratings")))),t.R7$(8),t.JRh(t.bMT(9,41,"Common.SEarch")),t.R7$(3),t.Y8G("ngIf",!n.isExpanded),t.R7$(),t.Y8G("ngIf",n.isExpanded),t.R7$(),t.Y8G("ngIf",n.isExpanded),t.R7$(5),t.SpI(" ",t.bMT(19,43,"Rating.SearchByRatingNumber")," "),t.R7$(3),t.R50("ngModel",n.searchTerm),t.Y8G("placeholder",t.bMT(22,45,"Rating.SearchByRatingNumber")),t.R7$(2),t.Y8G("ngIf",n.searchTerm),t.R7$(3),t.Y8G("ngIf",n._UserPermissionsService.hasPermission(n._enumService.AllPermissionEnums.AddRate)),t.R7$(8),t.JRh(t.bMT(35,47,"Rating.RatingNumber")),t.R7$(3),t.SpI(" ",t.bMT(38,49,"Rating.RatingTitle")," "),t.R7$(2),t.Y8G("ngClass",t.sMw(74,p,"Title"!==n.currentSortColumn,"Title"===n.currentSortColumn&&"ASC"===n.currentSortDirection,"Title"===n.currentSortColumn&&"DESC"===n.currentSortDirection)),t.R7$(2),t.SpI(" ",t.bMT(42,51,"Common.Section")," "),t.R7$(2),t.Y8G("ngClass",t.sMw(78,p,"Title"!==n.currentSortColumn,"Title"===n.currentSortColumn&&"ASC"===n.currentSortDirection,"Title"===n.currentSortColumn&&"DESC"===n.currentSortDirection)),t.R7$(2),t.SpI(" ",t.bMT(46,53,"Common.stage")," "),t.R7$(2),t.Y8G("ngClass",t.sMw(82,p,"Stage"!==n.currentSortColumn,"Stage"===n.currentSortColumn&&"ASC"===n.currentSortDirection,"Stage"===n.currentSortColumn&&"DESC"===n.currentSortDirection)),t.R7$(2),t.SpI("",t.bMT(50,55,"Common.grade")," "),t.R7$(2),t.Y8G("ngClass",t.sMw(86,p,"Title"!==n.currentSortColumn,"Title"===n.currentSortColumn&&"ASC"===n.currentSortDirection,"Title"===n.currentSortColumn&&"DESC"===n.currentSortDirection)),t.R7$(2),t.SpI(" ",t.bMT(54,57,"Rating.FromDate")," "),t.R7$(2),t.Y8G("ngClass",t.sMw(90,p,"PublishFromDate"!==n.currentSortColumn,"PublishFromDate"===n.currentSortColumn&&"ASC"===n.currentSortDirection,"PublishFromDate"===n.currentSortColumn&&"DESC"===n.currentSortDirection)),t.R7$(2),t.SpI(" ",t.bMT(58,59,"Rating.ToDate")," "),t.R7$(2),t.Y8G("ngClass",t.sMw(94,p,"PublishToDate"!==n.currentSortColumn,"PublishToDate"===n.currentSortColumn&&"ASC"===n.currentSortDirection,"PublishToDate"===n.currentSortColumn&&"DESC"===n.currentSortDirection)),t.R7$(),t.Y8G("ngIf",n._UserPermissionsService.hasPermission(t.eq3(98,_,n._enumService.AllPermissionEnums.ActiveRate))),t.R7$(),t.Y8G("ngIf",n._UserPermissionsService.hasPermission(t.eq3(100,_,n._enumService.AllPermissionEnums.ViewRateResult))),t.R7$(),t.Y8G("ngbTooltip",t.bMT(63,61,"Rating.RefreshParticipantsCount")),t.R7$(2),t.SpI(" ",t.bMT(65,63,"Rating.ParticipantsCount"),""),t.R7$(4),t.JRh(t.bMT(69,65,"Common.Control")),t.R7$(3),t.Y8G("ngForOf",n.rates),t.R7$(),t.Y8G("ngIf",n.showNoData),t.R7$(),t.Y8G("ngIf",n.showNoSearchResult),t.R7$(),t.Y8G("collectionSize",n.totalLengh),t.R50("page",n.page)("pageSize",n.pageSize))},dependencies:[d.Wk,f.YU,f.Sq,f.bT,f.B3,L.w,$.X,w.md,m.xH,m.y7,m.me,m.wz,m.BC,m.YS,m.vS,D.D9],styles:['.expand-button[_ngcontent-%COMP%]{border:none;font-size:1.5rem;padding:0}.btn-clear[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;z-index:10;font-size:16px}.btn-clear[_ngcontent-%COMP%]{inset-inline-end:35px}.btn-clear[_ngcontent-%COMP%]   .fa[_ngcontent-%COMP%]{padding:0!important;margin:0!important}.truncate[_ngcontent-%COMP%]{display:inline-block;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.truncate-ellipsis[_ngcontent-%COMP%]{display:inline-block;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
1unicode-bidi:plaintext}.custom-tooltip[_ngcontent-%COMP%]   .tooltip-inner[_ngcontent-%COMP%]{max-width:500px!important;white-space:normal!important}.switch-large[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:28px}.switch-large[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.slider.round.switch-large[_ngcontent-%COMP%]{border-radius:28px}.slider.switch-large[_ngcontent-%COMP%]{position:absolute;cursor:pointer;inset:0;background-color:#ccc;transition:.4s;border-radius:28px}.slider.switch-large[_ngcontent-%COMP%]:before{position:absolute;content:"";height:22px;width:22px;left:3px;bottom:3px;background-color:#fff;transition:.4s;border-radius:50%}input[_ngcontent-%COMP%]:checked + .slider.switch-large[_ngcontent-%COMP%]{background-color:#3249e1}input[_ngcontent-%COMP%]:checked + .slider.switch-large[_ngcontent-%COMP%]:before{transform:translate(22px)}.table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{white-space:nowrap;vertical-align:middle}.switch[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:disabled + .slider[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.6}.table-responsive-wrapper[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.add-rating-action[_ngcontent-%COMP%]{display:flex!important;direction:ltr!important}.add-rating-action--arabic[_ngcontent-%COMP%]{justify-content:flex-start!important}.add-rating-action--english[_ngcontent-%COMP%]{justify-content:flex-end!important}']})}}return i})();var ft=c(4123),bt=c(8605);const Rt=(i,s)=>({"fas text-warning":i,"far text-muted":s});function St(i,s){if(1&i){const e=t.RV6();t.j41(0,"i",15),t.bIt("mouseenter",function(){const n=t.eBV(e).$implicit,o=t.XpG().$implicit;return t.Njj(o.hover=n)})("mouseleave",function(){t.eBV(e);const n=t.XpG().$implicit;return t.Njj(n.hover=0)})("click",function(){const n=t.eBV(e).$implicit,o=t.XpG().$implicit;return t.Njj(o.rating=n)}),t.k0s()}if(2&i){const e=s.$implicit,a=t.XpG().$implicit;t.Y8G("ngClass",t.l_i(1,Rt,e<=(a.hover||a.rating),e>(a.hover||a.rating)))}}function Ct(i,s){if(1&i){const e=t.RV6();t.j41(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),t.EFF(4),t.j41(5,"span",11),t.EFF(6,"*"),t.k0s()()(),t.j41(7,"div",12),t.DNE(8,St,1,4,"i",13),t.k0s()(),t.j41(9,"textarea",14),t.nI1(10,"translate"),t.mxI("ngModelChange",function(n){const o=t.eBV(e).$implicit;return t.DH7(o.comment,n)||(o.comment=n),t.Njj(n)}),t.EFF(11,"          "),t.k0s()()}if(2&i){const e=s.$implicit,a=t.XpG();t.R7$(4),t.Lme(" ",a.rate.question," \u2013 ",e.name," "),t.R7$(4),t.Y8G("ngForOf",a.stars),t.R7$(),t.R50("ngModel",e.comment),t.Y8G("placeholder",t.bMT(10,5,"Rating.CommentPlaceholder"))}}let It=(()=>{class i{constructor(e,a,n,o,r){this.rate=e,this.dialogRef=a,this.languageService=n,this.renderer=o,this._DialogService=r,this.isRTL=!1,this.stars=[1,2,3,4,5],this.rating=0,this.hoverValue=0}ngOnInit(){this.rate.subjects=this.rate.subjects.map(a=>({name:a,rating:0,hover:0,comment:""}));const e=this._DialogService.initDialogDirection();this.isRTL=e.isRTL,this.languageSubscription=e.subscription}ngOnDestroy(){this.languageSubscription.unsubscribe()}hover(e){this.hoverValue=e}leave(){this.hoverValue=0}set(e){this.rating=e}closeDialog(){this.dialogRef.close()}static{this.\u0275fac=function(a){return new(a||i)(t.rXU(b.Vh),t.rXU(b.CP),t.rXU(E.g),t.rXU(t.sFG),t.rXU(ft.o))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-admin-rating-preview-dialog"]],decls:10,vars:8,consts:[[1,"card","Custom-font","custom-form-card"],[3,"close","icon","title"],[1,"card-body","preview-scroll"],["class","question-card",4,"ngFor","ngForOf"],[1,"modal-footer","Custom-font","p-3"],["type","button",1,"btn","btn-warning",3,"click"],[1,"fas","fa-times","mx-1"],[1,"question-card"],[1,"question-row"],[1,"question-label"],[1,"fw-bold"],[1,"text-danger"],[1,"star-wrapper"],["class","fa-star",3,"ngClass","mouseenter","mouseleave","click",4,"ngFor","ngForOf"],["rows","3",1,"form-control",3,"ngModelChange","ngModel","placeholder"],[1,"fa-star",3,"mouseenter","mouseleave","click","ngClass"]],template:function(a,n){1&a&&(t.j41(0,"div",0)(1,"app-dialog-header",1),t.nI1(2,"translate"),t.bIt("close",function(){return n.closeDialog()}),t.k0s(),t.j41(3,"div",2),t.DNE(4,Ct,12,7,"div",3),t.k0s(),t.j41(5,"div",4)(6,"button",5),t.bIt("click",function(){return n.closeDialog()}),t.EFF(7),t.nI1(8,"translate"),t.nrm(9,"i",6),t.k0s()()()),2&a&&(t.R
17$(),t.Y8G("icon","fas fa-star")("title",t.bMT(2,4,"Rating.PreviewTitle")+(null!=n.rate&&n.rate.title?" ("+n.rate.title+")":"")),t.R7$(3),t.Y8G("ngForOf",n.rate.subjects),t.R7$(3),t.SpI(" ",t.bMT(8,6,"confirm.cancel"),""))},dependencies:[f.YU,f.Sq,m.me,m.BC,m.vS,bt.B,D.D9],styles:[".custom-form-card[_ngcontent-%COMP%]{margin-bottom:0;box-shadow:none}.preview-scroll[_ngcontent-%COMP%]{max-height:65vh;overflow-y:auto}.question-card[_ngcontent-%COMP%]{padding:12px;margin-bottom:18px}.question-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;flex-wrap:wrap}.question-label[_ngcontent-%COMP%]{flex:1 1 60%;word-break:break-word;overflow-wrap:anywhere;white-space:normal;font-size:15px;line-height:1.6}.star-wrapper[_ngcontent-%COMP%]{display:flex;gap:6px;font-size:20px;white-space:nowrap}.star-wrapper[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{cursor:pointer;transition:all .15s ease}.star-wrapper[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:hover{transform:scale(1.15)}textarea[_ngcontent-%COMP%]{resize:none;border-radius:10px;margin-top:12px;border:1px solid #e9ecef}@media (max-width: 768px){.question-row[_ngcontent-%COMP%]{flex-direction:column}.star-wrapper[_ngcontent-%COMP%]{margin-top:8px}}"]})}}return i})();var vt=c(6615),Dt=c(5312),Tt=c(1626);const P=Dt.c.apiURL;let Ft=(()=>{class i{constructor(e){this._http=e,this._apiAddRate=P+"api/Rate/AddRate",this._apiPreviewRate=P+"api/Rate/PreviewRate",this._apiCheckRateTermExist=P+"api/Rate/CheckRateTermExist",this._apiGetRateById=P+"api/Rate/GetRateById",this._apiEditRate=P+"api/Rate/EditRate"}AddRate(e){return this._http.post(this._apiAddRate,e)}PreviewRate(e){return this._http.get(this._apiPreviewRate,{params:e})}CheckRateTermExist(e,a){return this._http.get(this._apiCheckRateTermExist+"?schoolStageGradeId="+e+"&yearTermId="+a)}EditRate(e){return this._http.post(this._apiEditRate,e)}GetRateById(e){return this._http.get(this._apiGetRateById+"?id="+e)}static{this.\u0275fac=function(a){return new(a||i)(t.KVO(Tt.Qq))}}static{this.\u0275prov=t.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();const z=i=>({label:i}),kt=i=>({label:i,link:"/Rating/adminView"}),Mt=(i,s,e)=>[i,s,e],j=i=>({"is-invalid":i}),Gt=()=>({length:100}),Et=()=>({length:5}),wt=()=>({length:300});function jt(i,s){if(1&i&&(t.j41(0,"option",43),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.name," ")}}function xt(i,s){if(1&i){const e=t.RV6();t.qex(0),t.j41(1,"select",40),t.bIt("change",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.onTermChange())}),t.j41(2,"option",41),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.DNE(5,jt,2,2,"option",42),t.k0s(),t.bVm()}if(2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngClass",t.eq3(6,j,(null==(e=a.form.get("termId"))?null:e.invalid)&&((null==(e=a.form.get("termId"))?null:e.touched)||(null==(e=a.form.get("termId"))?null:e.dirty)))),t.R7$(),t.Y8G("value",null),t.R7$(),t.SpI(" ",t.bMT(4,4,"Common.SelectAcademicSemster")," "),t.R7$(2),t.Y8G("ngForOf",a.YearTermDDL)}}function At(i,s){if(1&i&&(t.j41(0,"div",44),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.SpI(" ",e.selectedTermName," ")}}function $t(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}function Pt(i,s){if(1&i&&(t.j41(0,"div",45),t.DNE(1,$t,3,3,"div",46),t.k0s()),2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngIf",null==(e=a.form.get("termId"))||null==e.errors?null:e.errors.required)}}function yt(i,s){if(1&i&&(t.j41(0,"option",43),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.name," ")}}function Ot(i,s){if(1&i){const e=t.RV6();t.qex(0),t.j41(1,"select",47),t.bIt("change",function(n){t.eBV(e);const o=t.XpG();return t.Njj(o.onSchoolSelectionChange(n))}),t.j41(2,"option",41),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.DNE(5,yt,2,2,"option",42),t.k0s(),t.bVm()}if(2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngClass",t.eq3(6,j,(null==(e=a.form.get("schoolId"))?null:e.invalid)&&((null==(e=a.form.get("schoolId"))?null:e.touched)||(null==(e=a.form.get("schoolId"))?null:e.dirty)))),t.R7$(),t.Y8G("value",null),t.R7$(),t.SpI(" ",t.bMT(4,4,"WeekPlan.SelectEducationalDepartment")," "),t.R7$(2),t.Y8G("ngForOf",a.SchoolDDL)}}
1function Vt(i,s){if(1&i&&(t.j41(0,"div",44),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.SpI(" ",e.selectedSchoolName," ")}}function Nt(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}function Yt(i,s){if(1&i&&(t.j41(0,"div",45),t.DNE(1,Nt,3,3,"div",46),t.k0s()),2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngIf",null==(e=a.form.get("schoolId"))||null==e.errors?null:e.errors.required)}}function Lt(i,s){if(1&i&&(t.j41(0,"option",43),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.name," ")}}function Bt(i,s){if(1&i){const e=t.RV6();t.qex(0),t.j41(1,"select",48),t.bIt("change",function(n){t.eBV(e);const o=t.XpG();return t.Njj(o.onSchoolStageSelectionChange(n))}),t.j41(2,"option",41),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.DNE(5,Lt,2,2,"option",42),t.k0s(),t.bVm()}if(2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngClass",t.eq3(6,j,(null==(e=a.form.get("stageId"))?null:e.invalid)&&((null==(e=a.form.get("stageId"))?null:e.touched)||(null==(e=a.form.get("stageId"))?null:e.dirty)))),t.R7$(),t.Y8G("value",null),t.R7$(),t.SpI(" ",t.bMT(4,4,"chooseSchoolAndStage.selectStage")," "),t.R7$(2),t.Y8G("ngForOf",a.SchoolStagesDDL)}}function Xt(i,s){if(1&i&&(t.j41(0,"div",44),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.SpI(" ",e.selectedStageName," ")}}function qt(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}function Ut(i,s){if(1&i&&(t.j41(0,"div",45),t.DNE(1,qt,3,3,"div",46),t.k0s()),2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngIf",null==(e=a.form.get("stageId"))||null==e.errors?null:e.errors.required)}}function zt(i,s){if(1&i&&(t.j41(0,"option",43),t.EFF(1),t.k0s()),2&i){const e=s.$implicit;t.Y8G("value",e.id),t.R7$(),t.SpI(" ",e.name," ")}}function Jt(i,s){if(1&i){const e=t.RV6();t.qex(0),t.j41(1,"select",49),t.bIt("change",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.onGradeChange())}),t.j41(2,"option",41),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.DNE(5,zt,2,2,"option",42),t.k0s(),t.bVm()}if(2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngClass",t.eq3(6,j,(null==(e=a.form.get("gradeId"))?null:e.invalid)&&((null==(e=a.form.get("gradeId"))?null:e.touched)||(null==(e=a.form.get("gradeId"))?null:e.dirty)))),t.R7$(),t.Y8G("value",null),t.R7$(),t.SpI(" ",t.bMT(4,4,"chooseSchoolAndStage.selectGrade")," "),t.R7$(2),t.Y8G("ngForOf",a.SchoolStageGradesDDL)}}function Ht(i,s){if(1&i&&(t.j41(0,"div",44),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.SpI(" ",e.selectedGradeName," ")}}function Wt(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}
1function Qt(i,s){if(1&i&&(t.j41(0,"div",45),t.DNE(1,Wt,3,3,"div",46),t.k0s()),2&i){let e;const a=t.XpG();t.R7$(),t.Y8G("ngIf",null==(e=a.form.get("gradeId"))||null==e.errors?null:e.errors.required)}}function Kt(i,s){if(1&i&&(t.j41(0,"div",50)(1,"div",51)(2,"div",52),t.nrm(3,"i",53),t.EFF(4),t.k0s()()()),2&i){const e=t.XpG();t.R7$(4),t.SpI(" ",e.rateExistMessage," ")}}function Zt(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}function te(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.i5U(2,1,"ValidationMsgs.MaxLength",t.lJ4(4,Gt))," "))}function ee(i,s){if(1&i&&(t.j41(0,"div",45),t.DNE(1,Zt,3,3,"div",46)(2,te,3,5,"div",46),t.k0s()),2&i){let e,a;const n=t.XpG();t.R7$(),t.Y8G("ngIf",null==(e=n.form.get("title"))||null==e.errors?null:e.errors.required),t.R7$(),t.Y8G("ngIf",null==(a=n.form.get("title"))||null==a.errors?null:a.errors.maxlength)}}function ne(i,s){1&i&&(t.j41(0,"div",54),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}function ie(i,s){1&i&&(t.j41(0,"div",54),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}function ae(i,s){1&i&&(t.j41(0,"div",55),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"Rating.EndDateBeforeStartDate")," "))}function oe(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"ValidationMsgs.RequiredField")," "))}function se(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.i5U(2,1,"ValidationMsgs.MinLength",t.lJ4(4,Et))," "))}function le(i,s){1&i&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i&&(t.R7$(),t.SpI(" ",t.i5U(2,1,"ValidationMsgs.MaxLength",t.lJ4(4,wt))," "))}function re(i,s){if(1&i&&(t.j41(0,"div",54),t.DNE(1,oe,3,3,"div",46)(2,se,3,5,"div",46)(3,le,3,5,"div",46),t.k0s()),2&i){let e,a,n;const o=t.XpG();t.R7$(),t.Y8G("ngIf",null==(e=o.form.get("questionText"))||null==e.errors?null:e.errors.required),t.R7$(),t.Y8G("ngIf",null==(a=o.form.get("questionText"))||null==a.errors?null:a.errors.minlength),t.R7$(),t.Y8G("ngIf",null==(n=o.form.get("questionText"))||null==n.errors?null:n.errors.maxlength)}}function ce(i,s){if(1&i){const e=t.RV6();t.j41(0,"div",56)(1,"button",57),t.bIt("click",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.save())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}if(2&i){const e=t.XpG();t.Y8G("ngbTooltip",e.rateExistsForTermAndGrade?e.rateExistMessage:null),t.R7$(),t.Y8G("disabled",e.rateExistsForTermAndGrade),t.R7$(),t.SpI(" ",t.bMT(3,3,"Rating.Save")," ")}}let J=(()=>{class i{constructor(e,a,n,o,r,R,S,C,M,T,x,V){this.router=e,this.translate=a,this.dialog=n,this.fb=o,this.languageService=r,this._SubjectMangementService=R,this._adminCertificationService=S,this._sweetalertService=C,this._UserPermissionsService=M,this._enumService=T,this._adminRatingService=x,this._activatedRoute=V,this.YearTermDDL=[],this.SchoolDDL=[],this.SchoolStagesDDL=[],this.SchoolStageGradesDDL=[],this.submitted=!1,this.isRTL=!1,this.rateExistsForTermAndGrade=!1,this.rateExistMessage=null,this.isEditMode=!1,this.rateId=null,this.isPublished=!1}ngOnInit(){this.today=(new Date).toISOString().split("T")[0],this.buildForm(),this.GetYearTermDDL(),this._activatedRoute.queryParams.subscribe(e=>{this.isPublished="true"===e.isPublished}),this._activatedRoute.params.subscribe(e=>{this.rateId=e.rateId,this.isEditMode=!!this.rateId,this.isEditMode&&this.rateId?this.loadRateForEdit(this.rateId):this.GetSchoolDDl()}),this.languageSubscription=this.languageService.getCurrentLanguage().subscribe(e=>{this.isRTL="ar"===e})}formatDateForInput(e){return e?e.split("T")[0]:""}loadRateForEdit(e){this._adminRatingService.GetRateById(e).subscribe(a=>{if(!a.success||!a.data)return;const n=a.data;this.form.patchValue({termId:n.yerTermId,title:n.rateTitle,questionText:n.rateQuestion,startDate:this.formatDateForInput(n.startDate),endDate:this.formatDateForInput(n.endDate)}),this.loadDDLsForEdit(n),this.isPublished&&this.lockAllExceptDates()})}loadDDLsForEdit(e){this._SubjectMangementService.GetSchoolstDDl().subscribe(a=>{this.SchoolDDL=a.data.schools,this.form.patchValue({schoolId:e.schoolId}),this._SubjectMangementService.GetSchoolStagesDDL(e.schoolId).subscribe(n=>
1{this.SchoolStagesDDL=n.data,this.form.patchValue({stageId:e.schoolStageId}),this._SubjectMangementService.GetSchoolStagesGradeDDLBySchoolStageId(e.schoolStageId).subscribe(o=>{this.SchoolStageGradesDDL=o.data,this.form.patchValue({gradeId:e.schoolStageGradeId}),this.disableDDLs()})})})}lockAllExceptDates(){this.form.get("termId")?.disable(),this.form.get("schoolId")?.disable(),this.form.get("stageId")?.disable(),this.form.get("gradeId")?.disable(),this.form.get("title")?.disable(),this.form.get("questionText")?.disable(),this.form.get("startDate")?.disable()}disableDDLs(){this.form.get("termId")?.disable(),this.form.get("schoolId")?.disable(),this.form.get("stageId")?.disable(),this.form.get("gradeId")?.disable()}ngOnDestroy(){this.languageSubscription.unsubscribe()}GetYearTermDDL(){this._adminCertificationService.GetYearTermDDL().subscribe(e=>{const a=e.data,n=a.find(o=>o.isCurrent);n?(this.YearTermDDL=a.filter(o=>o.termOrder<=n.termOrder),this.form.patchValue({termId:n.id})):this.YearTermDDL=a})}GetSchoolDDl(){this._SubjectMangementService.GetSchoolstDDl().subscribe(e=>{if(this.SchoolDDL=e.data.schools,1===this.SchoolDDL.length){let a=this.SchoolDDL[0].id;this.form.patchValue({schoolId:a}),this.GetSchoolStagesBySchoolIdDDl(a)}else this.form.patchValue({schoolId:null})})}onSchoolSelectionChange(e){this.rateExistsForTermAndGrade=!1;const a=e.target.value;this.form.patchValue({stageId:null,gradeId:null}),this.SchoolStagesDDL=[],this.SchoolStageGradesDDL=[],this.GetSchoolStagesBySchoolIdDDl(a)}GetSchoolStagesBySchoolIdDDl(e){this._SubjectMangementService.GetSchoolStagesDDL(e).subscribe(a=>{if(this.SchoolStagesDDL=a.data,1===this.SchoolStagesDDL.length){let n=this.SchoolStagesDDL[0].id;this.form.patchValue({stageId:n}),this.GetSchoolStageGradesBySchoolStageIdDDl(n)}})}onSchoolStageSelectionChange(e){this.rateExistsForTermAndGrade=!1;let a=e.target.value;this.form.patchValue({gradeId:null}),this.SchoolStageGradesDDL=[],this.GetSchoolStageGradesBySchoolStageIdDDl(a)}GetSchoolStageGradesBySchoolStageIdDDl(e){this._SubjectMangementService.GetSchoolStagesGradeDDLBySchoolStageId(e).subscribe(a=>{this.SchoolStageGradesDDL=a.data,1===this.SchoolStageGradesDDL.length&&(this.form.patchValue({gradeId:this.SchoolStageGradesDDL[0].id}),this.checkRateExist())})}onGradeChange(){this.checkRateExist()}onTermChange(){this.rateExistsForTermAndGrade=!1,this.checkRateExist()}checkRateExist(){if(this.isEditMode)return;let{gradeId:e,termId:a}=this.form.value;if(!e||!a)return this.rateExistsForTermAndGrade=!1,void(this.rateExistMessage=null);this._adminRatingService.CheckRateTermExist(e,a).subscribe(n=>{this.rateExistsForTermAndGrade=!0===n.data,this.rateExistMessage=n.message??null})}buildForm(){this.form=this.fb.group({termId:[null,m.k0.required],schoolId:[null,m.k0.required],stageId:[null,m.k0.required],gradeId:[null,m.k0.required],title:["",[m.k0.required,m.k0.maxLength(100)]],startDate:[null,m.k0.required],endDate:[null,m.k0.required],questionText:["",[m.k0.required,m.k0.minLength(5),m.k0.maxLength(300)]]},{validators:vt.c})}openPreview(){if(this.form.invalid)return this.submitted=!0,this.form.markAllAsTouched(),void this.scrollToFirstInvalidControl();const e=this.form.getRawValue().gradeId,a=this.form.getRawValue().termId;this._adminRatingService.PreviewRate({schoolStageGradeId:e,yearTermId:a,question:this.form.getRawValue().questionText,rateId:this.rateId??""}).subscribe(n=>{n.success&&n.data&&n.data.length>0?this.dialog.open(It,{width:"80%",disableClose:!0,data:{title:this.form.value.title,question:this.form.value.questionText,subjects:n.data}}):this._sweetalertService.toastWarning(this.translate.instant("Rating.NoSubjectsFound"))})}get isPreviewDisabled(){return this.form.invalid||this.rateExistsForTermAndGrade}get previewTooltip(){return this.rateExistsForTermAndGrade?this.rateExistMessage:this.form.invalid?this.translate.instant("Rating.CompleteFieldsToPreview"):null}save(){if(this.form.invalid)return this.submitted=!0,this.form.markAllAsTouched(),void this.scrollToFirstInvalidControl();if(this.isEditMode&&this.rateId){const e={id:this.rateId,rateTitle:this.form.getRawValue().title,rateQuestion:this.form.getRawValue().questionText,startDate:this.form.getRawValue().startDate,endD
1ate:this.form.getRawValue().endDate};this._adminRatingService.EditRate(e).subscribe(a=>{a.success&&this.router.navigate(["/Rating/adminView"]),this._sweetalertService.runAlert(a)})}else this.confirmRatingPublication()}confirmRatingPublication(){const e=this.form.get("startDate")?.value;if(!e)return;const a=this.normalizeDate(e),n=this.normalizeDate(new Date),o=a.getTime()===n.getTime(),r=this.formatPublicationDate(a),S=this.translate.instant(o?"Rating.PublishNowConfirmation":"Rating.PublishFutureConfirmation",{date:r});this._sweetalertService.confirmForSaveDialog(S).then(C=>{C.isConfirmed&&this.addRating()})}addRating(){const e={schoolStageGradeId:this.form.getRawValue().gradeId,yerTermId:this.form.getRawValue().termId,rateTitle:this.form.getRawValue().title,rateQuestion:this.form.getRawValue().questionText,startDate:this.form.getRawValue().startDate,endDate:this.form.getRawValue().endDate};this._adminRatingService.AddRate(e).subscribe(a=>{a.success&&this.router.navigate(["/Rating/adminView"]),this._sweetalertService.runAlert(a)})}normalizeDate(e){const a=new Date(e);return a.setHours(0,0,0,0),a}formatPublicationDate(e){return new Intl.DateTimeFormat(this.isRTL?"ar-EG":"en-GB",{year:"numeric",month:"2-digit",day:"2-digit"}).format(e)}get selectedTermName(){const e=this.form.getRawValue().termId;return this.YearTermDDL.find(a=>a.id===e)?.name||"-"}get selectedSchoolName(){const e=this.form.getRawValue().schoolId;return this.SchoolDDL.find(a=>a.id===e)?.name||"-"}get selectedStageName(){const e=this.form.getRawValue().stageId;return this.SchoolStagesDDL.find(a=>a.id===e)?.name||"-"}get selectedGradeName(){const e=this.form.getRawValue().gradeId;return this.SchoolStageGradesDDL.find(a=>a.id===e)?.name||"-"}scrollToFirstInvalidControl(){setTimeout(()=>{const e=document.querySelector(".is-invalid");if(!e)return;const n=e.getBoundingClientRect().top+window.pageYOffset+-120;window.scrollTo({top:n,behavior:"smooth"}),e.focus({preventScroll:!0})},100)}goBack(){this.form.dirty?this._sweetalertService.confirmCloseDialog().then(e=>{e.isConfirmed&&this.router.navigate(["/Rating/adminView"])}):this.router.navigate(["/Rating/adminView"])}static{this.\u0275fac=function(a){return new(a||i)(t.rXU(d.Ix),t.rXU(D.c$),t.rXU(b.bZ),t.rXU(m.ok),t.rXU(E.g),t.rXU(v.m),t.rXU(O.N),t.rXU(F.W),t.rXU(k.N),t.rXU(A.F),t.rXU(Ft),t.rXU(d.nX))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-admin-add-rating"]],decls:114,vars:106,consts:[["formRef",""],["termReadOnly",""],["schoolReadOnly",""],["stageReadOnly",""],["gradeReadOnly",""],[3,"title","items"],[1,"card","custom-form-card","Custom-font"],[1,"card-header"],[1,"mb-0","new-custom-font","Custom-font"],[1,"card-body","pt-0"],["novalidate","",3,"formGroup"],[1,"row","g-3"],[1,"col-12","col-md-4","col-lg-3"],["for","selectClass",1,"form-label","label-large","new-custom-font"],[1,"text-danger"],[4,"ngIf","ngIfElse"],["class","invalid-feedback",4,"ngIf"],["for","SelectEducationalDepartment",1,"form-label","label-large","new-custom-font"],["for","selectStage",1,"form-label","label-large","new-custom-font"],["for","selectGrade",1,"form-label","label-large","new-custom-font"],["class","row my-3",4,"ngIf"],[1,"mb-3"],["for","title",1,"form-label","label-large","new-custom-font"],["id","title","type","text","formControlName","title",1,"form-control",3,"placeholder","ngbTooltip","ngClass"],[1,"text-muted","d-block","text-end"],[1,"row"],[1,"col-md-6"],["for","startDate",1,"form-label","label-large","new-custom-font"],["id","startDate","type","date","formControlName","startDate",1,"form-control",3,"ngbTooltip"],["class","invalid-feedback d-block",4,"ngIf"],["for","endDate",1,"form-label","label-large","new-custom-font"],["id","endDate","type","date","formControlName","endDate",1,"form-control"],["class","text-danger mt-1",4,"ngIf"],["for","QuestionText",1,"form-label","label-large","new-custom-font"],["id","QuestionText","formControlName","questionText",1,"form-control",3,"placeholder","ngbTooltip","ngClass"],[1,"d-flex","justify-content-end","gap-2","mt-4"],["placement","top",1,"button-wrapp",3,"ngbTooltip"],["type","button",1,"btn","btn-light","me-2",3,"click","disabled"],["class","button-wrapp",3,"ngbTooltip",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","me-2",3,"click"],["id","selectClass","formControlName","termId","aria-label","Class selection",1,"form-select",3,"change","ngClass"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"readonly-info-field"],[1,"invalid-feedback"],[4,"ngIf"],["formControlName","schoolId","id","SelectEducationalDepartment",1,"form-select",3,"change","ngClass"],["formControlName","stageId","id","selectStage",1,"form-select",3,"change","ngClass"],["formControlName","gradeId","id","selectGrade",1,"form-select",3,"change","ngClass"],[1,"row","my-3"],[1,"col-12"],["role","alert",1,"alert","alert-warning","outline"],[1,"fa","fa-exclamation-triangle","me-2","text-warning"],[1,"invalid-feedback","d-block"],[1,"text-danger","mt-1"],[1,"button-wrapp",3,"ngbTooltip"],["type","submit",1,"btn","btn-primary",3,"click","disabled"]],template:function(a,n){if(1&a){const o=t.RV6();t.nrm(0,"app-bread-crump",5),t.nI1(1,"translate"),t.nI1(2,"translate"),t.nI1(3,"translate"),t.nI1(4,"translate"),t.nI1(5,"translate"),t.nI1(6,"translate"),t.j41(7,"div",6)(8,"div",7)(9,"h1",8),t.EFF(10),t.nI1(11,"translate"),t.nI1(12,"translate"),t.k0s()(),t.j41(13,"div",9)(14,"form",10,0)(16,"div",11)(17,"div",12)(18,"label",13),t.EFF(19),t.nI1(20,"translate"),t.j41(21,"span",14),t.EFF(22,"*"),t.k0s()(),t.DNE(23,xt,6,8,"ng-container",15)(24,At,2,1,"ng-template",null,1,t.C5r)(26,Pt,2,1,"div",16),t.k0s(),t.j41(27,"div",12)(28,"label",17),t.EFF(29),t.nI1(30,"translate"),t.j41(31,"span",14),t.EFF(32,"*"),t.k0s()(),t.DNE(33,Ot,6,8,"ng-container",15)(34,Vt,2,1,"ng-template",null,2,t.C5r)(36,Yt,2,1,"div",16),t.k0s(),t.j41(37,"div",12)(38,"label",18),t.EFF(39),t.nI1(40,"translate"),t.j41(41,"span",14),t.EFF(42,"*"),t.k0s()(),t.DNE(43,Bt,6,8,"ng-container",15)(44,Xt,2,1,"ng-template",null,3,t.C5r)(46,Ut,2,1,"div",16),t.k0s(),t.j41(47,"div",12)(48,"label",19),t.EFF(49),t.nI1(50,"translate"),t.j41(51,"span",14),t.EFF(52,"*"),t.k0s()(),t.DNE(53,Jt,6,8,"ng-container",15)(54,Ht,2,1,"ng-template",null,4,t.C5r)(56,Qt,2,1,"div",16),t.k0s()(),t.DNE(57,Kt,5,1,"div",20),t.nrm(58,"hr"),t.j41(59,"div",21)(60,"label",22),t.EFF(61),t.nI1(62,"translate"),t.j41(63,"span",14),t.EFF(64,"*"),t.k0s()(),t.nrm(65,"input",23),t.nI1(66,"translate"),t.nI1(67,"translate"),t.j41(68,"small",24),t.EFF(69),t.k0s(),t.DNE(70,ee,3,2,"div",16),t.k0s(),t.j41(71,"div",25)(72,"div",26)(73,"label",27),t.EFF(74),t.nI1(75,"translate"),t.j41(76,"span",14),t.EFF(77,"*"),t.k0s()(),t.nrm(78,"input",28),t.nI1(79,"translate"),t.DNE(80,ne,3,3,"div",29),t.k0s(),t.j41(81,"div",26)(82,"label",30),t.EFF(83),t.nI1(84,"translate"),t.j41(85,"span",14),t.EFF(86,"*"),t.k0s()(),t.nrm(87,"input",31),t.DNE(88,ie,3,3,"div",29)(89,ae,3,3,"div",32),t.k0s()(),t.nrm(90,"hr"),t.j41(91,"div",25)(92,"label",33),t.EFF(93),t.nI1(94,"translate"),t.j41(95,"span",14),t.EFF(96,"*"),t.k0s()(),t.j41(97,"textarea",34),t.nI1(98,"translate"),t.nI1(99,"translate"),t.EFF(100,"                    "),t.k0s(),t.j41(101,"small",24),t.EFF(102),t.k0s(),t.DNE(103,re,4,3,"div",29),t.k0s(),t.nrm(104,"hr"),t.j41(105,"div",35)(106,"div",36)(107,"button",37),t.bIt("click",function(){return t.eBV(o),t.Njj(n.openPreview())}),t.EFF(108),t.nI1(109,"translate"),t.k0s()(),t.DNE(110,ce,4,5,"div",38),t.j41(111,"button",39),t.bIt("click",function(){return t.eBV(o),t.Njj(n.goBack())}),t.EFF(112),t.nI1(113,"translate"),t.k0s()()()()()}if(2&a){let o,r,R,S,C,M,T,x,V,y,N,q,Y;const Me=t.sdS(25),Ge=t.sdS(35),Ee=t.sdS(45),we=t.sdS(55);t.Y8G("title",n.isEditMode?t.bMT(1,46,"Rating.EditRating"):t.bMT(2,48,"Rating.AddNewRating"))("items",t.sMw(98,Mt,t.eq3(92,z,t.bMT(3,50,"Blogs.InteractiveActivities")),t.eq3(94,kt,t.bMT(4,52,"Rating.Ratings")),t.eq3(96,z,n.isEditMode?t.bMT(5,54,"Rating.EditRating"):t.bMT(6,56,"Rating.AddNewRating")))),t.R7$(10),t.SpI(" ",n.isEditMode?t.bMT(11,58,"Rating.EditRating"):t.bMT(12,60,"Rating.AddNewRating")," "),t.R7$(4),t.Y8G("formGroup",n.form),t.R7$(5),t.SpI(" ",t.bMT(20,62,"Common.AcademicSemster")," "),t.R7$(4),t.Y8G("ngIf",!n.isEditMode)("ngIfElse",Me),t.R7$(3),t.Y8G("ngIf",(null==(o=n.form.get("termId"))?null:o.invalid)&&
1((null==(o=n.form.get("termId"))?null:o.touched)||(null==(o=n.form.get("termId"))?null:o.dirty))),t.R7$(3),t.SpI(" ",t.bMT(30,64,"WeekPlan.EducationalDepartment")," "),t.R7$(4),t.Y8G("ngIf",!n.isEditMode)("ngIfElse",Ge),t.R7$(3),t.Y8G("ngIf",(null==(r=n.form.get("schoolId"))?null:r.invalid)&&((null==(r=n.form.get("schoolId"))?null:r.touched)||(null==(r=n.form.get("schoolId"))?null:r.dirty))),t.R7$(3),t.SpI(" ",t.bMT(40,66,"Common.stage")," "),t.R7$(4),t.Y8G("ngIf",!n.isEditMode)("ngIfElse",Ee),t.R7$(3),t.Y8G("ngIf",(null==(R=n.form.get("stageId"))?null:R.invalid)&&((null==(R=n.form.get("stageId"))?null:R.touched)||(null==(R=n.form.get("stageId"))?null:R.dirty))),t.R7$(3),t.SpI(" ",t.bMT(50,68,"Common.grade")," "),t.R7$(4),t.Y8G("ngIf",!n.isEditMode)("ngIfElse",we),t.R7$(3),t.Y8G("ngIf",(null==(S=n.form.get("gradeId"))?null:S.invalid)&&((null==(S=n.form.get("gradeId"))?null:S.touched)||(null==(S=n.form.get("gradeId"))?null:S.dirty))),t.R7$(),t.Y8G("ngIf",n.rateExistsForTermAndGrade&&!n.isEditMode),t.R7$(4),t.SpI(" ",t.bMT(62,70,"Rating.RatingTitle")," "),t.R7$(4),t.Y8G("placeholder",t.bMT(66,72,"Rating.RatingTitlePlaceholder"))("ngbTooltip",n.isPublished?t.bMT(67,74,"Rating.PublishedLocked"):null)("ngClass",t.eq3(102,j,(null==(C=n.form.get("title"))?null:C.invalid)&&((null==(C=n.form.get("title"))?null:C.touched)||(null==(C=n.form.get("title"))?null:C.dirty)))),t.R7$(4),t.SpI(" ",(null==(M=n.form.get("title"))||null==M.value?null:M.value.length)||0,"/100 "),t.R7$(),t.Y8G("ngIf",(null==(T=n.form.get("title"))?null:T.invalid)&&((null==(T=n.form.get("title"))?null:T.touched)||(null==(T=n.form.get("title"))?null:T.dirty))),t.R7$(4),t.SpI(" ",t.bMT(75,76,"Common.from")," "),t.R7$(4),t.Y8G("ngbTooltip",n.isPublished?t.bMT(79,78,"Rating.PublishedLocked"):null),t.BMQ("min",n.today),t.R7$(2),t.Y8G("ngIf",(null==(x=n.form.get("startDate"))?null:x.invalid)&&(n.submitted||(null==(x=n.form.get("startDate"))?null:x.touched))),t.R7$(3),t.SpI(" ",t.bMT(84,80,"Common.to")," "),t.R7$(4),t.BMQ("min",(null==(V=n.form.get("startDate"))?null:V.value)||n.today),t.R7$(),t.Y8G("ngIf",(null==(y=n.form.get("endDate"))||null==y.errors?null:y.errors.required)&&(n.submitted||(null==(y=n.form.get("endDate"))?null:y.touched))),t.R7$(),t.Y8G("ngIf",(null==n.form.errors?null:n.form.errors.endBeforeStart)&&n.submitted),t.R7$(4),t.SpI(" ",t.bMT(94,82,"Rating.QuestionTextfield")," "),t.R7$(4),t.Y8G("placeholder",t.bMT(98,84,"Rating.QuestionPlaceholder"))("ngbTooltip",n.isPublished?t.bMT(99,86,"Rating.PublishedLocked"):null)("ngClass",t.eq3(104,j,(null==(N=n.form.get("questionText"))?null:N.invalid)&&((null==(N=n.form.get("questionText"))?null:N.touched)||n.submitted))),t.R7$(5),t.SpI(" ",(null==(q=n.form.get("questionText"))||null==q.value?null:q.value.length)||0,"/300 "),t.R7$(),t.Y8G("ngIf",(null==(Y=n.form.get("questionText"))?null:Y.errors)&&(n.submitted||(null==(Y=n.form.get("questionText"))?null:Y.touched))),t.R7$(3),t.Y8G("ngbTooltip",n.isPreviewDisabled?n.previewTooltip:null),t.R7$(),t.Y8G("disabled",n.isPreviewDisabled),t.R7$(),t.SpI(" ",t.bMT(109,88,"Rating.Preview")," "),t.R7$(2),t.Y8G("ngIf",n._UserPermissionsService.hasPermission(n._enumService.AllPermissionEnums.EditRate)&&n.isEditMode||n._UserPermissionsService.hasPermission(n._enumService.AllPermissionEnums.AddRate)&&!n.isEditMode),t.R7$(2),t.SpI(" ",t.bMT(113,90,"Blogs.Cancel")," ")}},dependencies:[f.YU,f.Sq,f.bT,$.X,w.md,m.qT,m.xH,m.y7,m.me,m.wz,m.BC,m.cb,m.j4,m.JD,D.D9],styles:[".readonly-info-field[_ngcontent-%COMP%]{min-height:48px;width:100%;padding:.75rem 1rem;display:flex;align-items:center;background-color:#f8f9fa;border:1px solid #dee2e6;border-radius:6px;color:#334155;font-size:1rem;font-weight:400;cursor:default;-webkit-user-select:text;user-select:text;box-sizing:border-box}[dir=rtl][_nghost-%COMP%]   .readonly-info-field[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .readonly-info-field[_ngcontent-%COMP%]{direction:rtl;text-align:right}[dir=ltr][_nghost-%COMP%]   .readonly-info-field[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .readonly-info-field[_ngcontent-%COMP%]{direction:ltr;text-align:left}"]})}}return i})();
1function de(i,s){if(1&i&&(t.j41(0,"small",21)(1,"span",22),t.EFF(2),t.k0s()()),2&i){const e=t.XpG().$implicit,a=t.XpG(2);t.R7$(),t.AVh("arabic-text",a.isArabicText(e.note))("english-text",!a.isArabicText(e.note)),t.Y8G("ngbTooltip",e.note)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.note," ")}}function me(i,s){if(1&i&&(t.j41(0,"li",17),t.nrm(1,"i",18),t.j41(2,"div")(3,"span",19),t.EFF(4),t.k0s(),t.DNE(5,de,3,7,"small",20),t.k0s()()),2&i){const e=s.$implicit,a=t.XpG(2);t.R7$(3),t.AVh("arabic-text",a.isArabicText(e.studentName))("english-text",!a.isArabicText(e.studentName)),t.Y8G("ngbTooltip",e.studentName)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.studentName,"\n"),t.R7$(),t.Y8G("ngIf",e.note)}}function ge(i,s){if(1&i&&(t.j41(0,"ul",15),t.DNE(1,me,6,8,"li",16),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.students)}}function ue(i,s){1&i&&(t.j41(0,"div",23),t.nrm(1,"i",24),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&i&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"Rating.NoStudents")," "))}let pe=(()=>{class i{constructor(e,a,n,o,r){this.dialogRef=e,this.data=a,this.languageService=n,this.renderer=o,this._ratingService=r,this.students=[],this.isRTL=!1}ngOnInit(){this.popupDirection(),this.loadStudents()}loadStudents(){this._ratingService.GetRateResultStudents(this.data.rateId,this.data.rateValue).subscribe({next:e=>{this.students=e.data||[]}})}ngOnDestroy(){this.languageSubscription?.unsubscribe()}closeDialouge(){this.dialogRef.close()}popupDirection(){let e=document.documentElement;this.renderer.removeAttribute(e,"style"),this.languageSubscription=this.languageService.getCurrentLanguage().subscribe(n=>{this.isRTL="ar"===n});let a=document.querySelector(".cdk-global-overlay-wrapper");a&&this.renderer.setAttribute(a,"dir",this.isRTL?"rtl":"ltr")}isArabicText(e){return!!e&&/[\u0600-\u06FF]/.test(e)}static{this.\u0275fac=function(a){return new(a||i)(t.rXU(b.CP),t.rXU(b.Vh),t.rXU(E.g),t.rXU(t.sFG),t.rXU(I.F))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-student-count-dialouge"]],decls:22,vars:14,consts:[["noLikes",""],[1,"dialog-wrapper"],[1,"Custom-font","dialog-card"],[1,"modal-header","custom-modal","d-flex","align-items-center","gap-5"],[1,"Custom-font","new-custom-font","modal-title","m-0","d-flex","align-items-center","gap-2"],[1,"fa","fa-users","text-primary","f-20"],[1,"f-w-700","f-18"],[1,"flex-grow-1"],["type","button","aria-label","Close","placement","bottom",1,"btn-close",3,"click","ngbTooltip"],[1,"modal-body","modal-scroll-area"],[1,"card-body"],["class","list-group",4,"ngIf","ngIfElse"],[1,"modal-footer","Custom-font","btn-equal","fixed-footer"],["aria-label","Close","placement","top","type","button",1,"btn","btn-danger","custom-btn",3,"click","ngbTooltip"],[1,"fas","fa-times"],[1,"list-group"],["class","list-group-item d-flex align-items-center gap-2",4,"ngFor","ngForOf"],[1,"list-group-item","d-flex","align-items-center","gap-2"],[1,"fa","fa-user-circle","text-primary","f-20"],["container","body",1,"label-large","new-custom-font","d-block","truncate",3,"ngbTooltip","tooltipClass"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["container","body",1,"truncate",3,"ngbTooltip","tooltipClass"],[1,"text-center","text-primary","py-4"],[1,"fa","fa-users","fa-2x","mb-2","d-block"]],template:function(a,n){if(1&a){const o=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"h2",4),t.nrm(4,"i",5),t.j41(5,"span",6),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.nrm(8,"div",7),t.j41(9,"button",8),t.nI1(10,"translate"),t.bIt("click",function(){return t.eBV(o),t.Njj(n.closeDialouge())}),t.k0s()(),t.j41(11,"div",9)(12,"div",10),t.DNE(13,ge,2,1,"ul",11)(14,ue,4,3,"ng-template",null,0,t.C5r),t.k0s()(),t.j41(16,"div",12)(17,"button",13),t.nI1(18,"translate"),t.bIt("click",function(){return t.eBV(o),t.Njj(n.closeDialouge())}),t.EFF(19),t.nI1(20,"translate"),t.nrm(21,"i",14),t.k0s()()()()}if(2&a){const o=t.sdS(15);t.R7$(6),t.SpI(" ",t.bMT(7,6,"Rating.RatedStudents"),"\n"),t.R7$(3),t.Y8G("ngbTooltip",t.bMT(10,8,"assignment.close")),t.R7$(4),t.Y8G("ngIf",n.students.length>0)("ngIfElse",o),t.R7$(4),t.Y8G("ngbTooltip",t.bMT(18,10,"assignment.close")),t.R7$(2),t.SpI(" ",t.bMT(20,12,"confirm.cancel")," ")}},dependencies:[f.Sq,f.bT,w.md,D.D9],styles:[".student-content[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden}.truncate[_ngcontent-%COMP%]{display:block;width:100%;max-width:600px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.arabic-text[_ngcontent-%COMP%]{direction:rtl!important;text-align:right!important;unicode-bidi:plaintext}.english-text[_ngcontent-%COMP%]{direction:ltr!important;text-align:left!important;unicode-bidi:plaintext}.custom-tooltip[_ngcontent-%COMP%]   .tooltip-inner[_ngcontent-%COMP%]{max-width:600px!important;white-space:normal!important}"]})}}return i})();const he=i=>({label:i}),_e=i=>({label:i,link:"/Rating/adminView"}),fe=i=>({label:i,link:"/AcademicHour/supervision/ViewAcademicSession"}),be=(i,s,e)=>[i,s,e];function Re(i,s){1&i&&t.nrm(0,"i",21)}function Se(i,s){1&i&&t.nrm(0,"i",22)}
1function Ce(i,s){if(1&i&&(t.j41(0,"div",23)(1,"div",24)(2,"div",25)(3,"div",26)(4,"div",27),t.nrm(5,"i",28),t.k0s(),t.j41(6,"div",29)(7,"span",30),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.j41(10,"h5",31),t.EFF(11),t.k0s()()()(),t.j41(12,"div",25)(13,"div",26)(14,"div",32),t.nrm(15,"i",33),t.k0s(),t.j41(16,"div",29)(17,"span",30),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"h5",31),t.EFF(21),t.k0s()()()(),t.j41(22,"div",25)(23,"div",26)(24,"div",34),t.nrm(25,"i",33),t.k0s(),t.j41(26,"div",29)(27,"span",30),t.EFF(28),t.nI1(29,"translate"),t.k0s(),t.j41(30,"h5",31),t.EFF(31),t.k0s()()()(),t.j41(32,"div",25)(33,"div",26)(34,"div",35),t.nrm(35,"i",36),t.k0s(),t.j41(36,"div",29)(37,"span",30),t.EFF(38),t.nI1(39,"translate"),t.k0s(),t.j41(40,"h5",37),t.EFF(41),t.k0s()()()(),t.j41(42,"div",25)(43,"div",26)(44,"div",35),t.nrm(45,"i",36),t.k0s(),t.j41(46,"div",29)(47,"span",30),t.EFF(48),t.nI1(49,"translate"),t.k0s(),t.j41(50,"h5",38),t.EFF(51),t.k0s()()()(),t.j41(52,"div",25)(53,"div",26)(54,"div",39),t.nrm(55,"i",40),t.k0s(),t.j41(56,"div",29)(57,"span",30),t.EFF(58),t.nI1(59,"translate"),t.k0s(),t.j41(60,"h5",37),t.EFF(61),t.k0s()()()(),t.j41(62,"div",25)(63,"div",26)(64,"div",41),t.nrm(65,"i",42),t.k0s(),t.j41(66,"div",29)(67,"span",30),t.EFF(68),t.nI1(69,"translate"),t.k0s(),t.j41(70,"h5",37),t.EFF(71),t.k0s()()()(),t.j41(72,"div",25)(73,"div",26)(74,"div",43),t.nrm(75,"i",44),t.k0s(),t.j41(76,"div",29)(77,"span",30),t.EFF(78),t.nI1(79,"translate"),t.k0s(),t.j41(80,"h5",37),t.EFF(81),t.k0s()()()(),t.j41(82,"div",25)(83,"div",26)(84,"div",45),t.nrm(85,"i",46),t.k0s(),t.j41(86,"div",29)(87,"span",30),t.EFF(88),t.nI1(89,"translate"),t.k0s(),t.j41(90,"h5",37),t.EFF(91),t.k0s()()()()()()),2&i){const e=t.XpG();t.R7$(8),t.JRh(t.bMT(9,27,"Common.school")),t.R7$(2),t.Y8G("ngbTooltip",null==e.rateResult?null:e.rateResult.schoolName),t.R7$(),t.SpI(" ",(null==e.rateResult?null:e.rateResult.schoolName)||"-"," "),t.R7$(7),t.JRh(t.bMT(19,29,"Common.stage")),t.R7$(2),t.Y8G("ngbTooltip",null==e.rateResult?null:e.rateResult.schoolStageName),t.R7$(),t.SpI(" ",(null==e.rateResult?null:e.rateResult.schoolStageName)||"-"," "),t.R7$(7),t.JRh(t.bMT(29,31,"Common.grade")),t.R7$(2),t.Y8G("ngbTooltip",null==e.rateResult?null:e.rateResult.schoolStageGradeName),t.R7$(),t.SpI(" ",(null==e.rateResult?null:e.rateResult.schoolStageGradeName)||"-"," "),t.R7$(7),t.JRh(t.bMT(39,33,"Common.EducationalSemester")),t.R7$(3),t.JRh(null==e.rateResult?null:e.rateResult.yearTermName),t.R7$(7),t.JRh(t.bMT(49,35,"Rating.RatingTitle")),t.R7$(2),t.AVh("arabic-text",e.isArabicText(null==e.rateResult?null:e.rateResult.title))("english-text",!e.isArabicText(null==e.rateResult?null:e.rateResult.title)),t.Y8G("ngbTooltip",null==e.rateResult?null:e.rateResult.title)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",null==e.rateResult?null:e.rateResult.title,"\n"),t.R7$(7),t.JRh(t.bMT(59,37,"Rating.RatingNumber")),t.R7$(3),t.JRh(null==e.rateResult?null:e.rateResult.code),t.R7$(7),t.JRh(t.bMT(69,39,"Rating.ParticipantsCount")),t.R7$(3),t.JRh(null==e.rateResult?null:e.rateResult.studentCount),t.R7$(7),t.JRh(t.bMT(79,41,"Rating.ParticipationRate")),t.R7$(3),t.JRh(null==e.rateResult?null:e.rateResult.studentPercent),t.R7$(7),t.JRh(t.bMT(89,43,"assignment.QuestionCount")),t.R7$(3),t.JRh(null==e.rateResult?null:e.rateResult.questionCount)}}function Ie(i,s){if(1&i){const e=t.RV6();t.j41(0,"tr")(1,"td",47)(2,"span",48),t.EFF(3),t.k0s()(),t.j41(4,"td",47)(5,"span",49),t.bIt("click",function(){const n=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.openStudentCount(n.schoolStageGradeSubjectRateId,1))}),t.EFF(6),t.k0s()(),t.j41(7,"td",47)(8,"span",50),t.bIt("click",function(){const n=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.openStudentCount(n.schoolStageGradeSubjectRateId,2))}),t.EFF(9),t.k0s()(),t.j41(10,"td",47)(11,"span",50),t.bIt("click",function(){const n=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.openStudentCount(n.schoolStageGradeSubjectRateId,3))}),t.EFF(12),t.k0s()(),t.j41(13,"td",47)(14,"span",51),t.bIt("click",function(){const n=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.openStudentCount(n.schoolStageGradeSubjectRateId,4))}),t.EFF(15),t.k0s()(),t.j41(16,"td",47)(17,"span",52),t.bIt("click",function(){const n=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.openStudentCount(n.schoolStageGradeSubjectRateId,5))}),t.EFF(18),t.k0s()()()}if(2&i){const e=s.$implicit;t.R7$(2),t.Y8G("ngbTooltip",e.questionText)("tooltipClass","custom-tooltip"),t.R7$(),t.SpI(" ",e.questionText," "),t.R7$(3),t.SpI(" ",e.countOneStar," "),t.R7$(3),t.SpI(" ",e.countTwoStars," "),t.R7$(3),t.SpI(" ",e.countThreeStars," "),t.R7$(3),t.SpI(" ",e.countFourStars," "),t.R7$(3),t.SpI(" ",e.countFiveStars," ")}}function ve(i,s){1&i&&(t.j41(0,"tr")(1,"td",53),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&i&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"Common.DataNotFound")," "))}const De=[{path:"",children:[{path:"adminView",component:_t},{path:"AddRating",component:J},{path:"EditRating/:rateId",component:J},{path:"adminRatingResult/:id",component:(()=>{class i{constructor(e,a,n,o,r,R,S){this._sweetAlertService=e,this.dialog=a,this._enumService=n,this._UserPermissionsService=o,this._SubjectMangementService=r,this._activatedRoute=R,this._ratingService=S,this.isExpanded=!1}ngOnInit(){this._activatedRoute.params.subscribe(e=>{this.id=e.id,this.id&&this.loadRateResult()})}
1loadRateResult(){this._ratingService.GetRateResult(this.id).subscribe({next:e=>{this.rateResult=e.data}})}toggleSearchFilters(){this.isExpanded=!this.isExpanded}openStudentCount(e,a){this.dialog.open(pe,{width:"80vw",maxWidth:"850px",maxHeight:"99%",data:{rateId:e,rateValue:a}})}isArabicText(e){return!!e&&/[\u0600-\u06FF]/.test(e)}static{this.\u0275fac=function(a){return new(a||i)(t.rXU(F.W),t.rXU(b.bZ),t.rXU(A.F),t.rXU(k.N),t.rXU(v.m),t.rXU(d.nX),t.rXU(I.F))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-admin-rating-result"]],decls:63,vars:46,consts:[[3,"title","items"],[1,"card","custom-form-card","Custom-font"],["id","header-search",1,"card-header","pb-3","d-flex","justify-content-between","align-items-center","bg-primary","text-white",3,"click"],["type","button",1,"btn","btn-text","new-custom-font","expand-button","w-100","text-start","text-white","d-flex","justify-content-between","align-middle","align-items-center"],[1,"expand-text"],["class","fas fa-chevron-down me-2","style","font-size: 18px;",4,"ngIf"],["class","fas fa-chevron-up me-2","style","font-size: 18px;",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"card","custom-form-card","Custom-font","p-3"],[1,"custom-table"],[1,"table-wrapper",2,"position","relative"],["id","scrollableTable",1,"table-responsive","table-scroll"],[1,"table","Custom-font"],[1,"bg-primary","Custom-font","text-white"],[1,"text-center","align-middle","th-question"],[1,"text-center","align-middle"],[1,"header-stars"],[1,"fa","fa-star","gold"],[1,"Custom-font"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"fas","fa-chevron-down","me-2",2,"font-size","18px"],[1,"fas","fa-chevron-up","me-2",2,"font-size","18px"],[1,"card-body"],[1,"row","g-4","mb-5","rating-summary"],[1,"col-md-6","col-lg-4"],[1,"info-card"],[1,"icon","bg-indigo"],[1,"fa","fa-university"],[1,"content"],[1,"label","mb-2"],[1,"value","truncate",3,"ngbTooltip"],[1,"icon","bg-purple"],[1,"fa","fa-graduation-cap"],[1,"icon","bg-teal"],[1,"icon","bg-primary"],[1,"fa","fa-commenting"],[1,"value"],[1,"value","truncateTitle",3,"ngbTooltip","tooltipClass"],[1,"icon","bg-info"],[1,"fa","fa-hashtag"],[1,"icon","bg-success"],[1,"fa","fa-users"],[1,"icon","bg-warning"],[1,"fa","fa-percent"],[1,"icon","bg-secondary"],[1,"fa","fa-question-circle"],[1,"text-center"],[1,"truncate","d-inline-block","form-label","label-large","new-custom-font",3,"ngbTooltip","tooltipClass"],[1,"count-badge","success",3,"click"],[1,"count-badge","info",3,"click"],[1,"count-badge","warning",3,"click"],[1,"count-badge","danger",3,"click"],["colspan","5",1,"text-center","text-muted"]],template:function(a,n){1&a&&(t.nrm(0,"app-bread-crump",0),t.nI1(1,"translate"),t.nI1(2,"translate"),t.nI1(3,"translate"),t.nI1(4,"translate"),t.j41(5,"div",1)(6,"div",2),t.bIt("click",function(){return n.toggleSearchFilters()}),t.j41(7,"button",3)(8,"span",4),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"span"),t.DNE(12,Re,1,0,"i",5)(13,Se,1,0,"i",6),t.k0s()()(),t.DNE(14,Ce,92,45,"div",7),t.j41(15,"div",8)(16,"div",9)(17,"div",10)(18,"div",11)(19,"table",12)(20,"thead",13)(21,"tr")(22,"th",14),t.EFF(23),t.nI1(24,"translate"),t.k0s(),t.j41(25,"th",15),t.EFF(26),t.nI1(27,"translate"),t.j41(28,"div",16),t.nrm(29,"i",17),t.k0s()(),t.j41(30,"th",15),t.EFF(31),t.nI1(32,"translate"),t.j41(33,"div",16),t.nrm(34,"i",17)(35,"i",17),t.k0s()(),t.j41(36,"th",15),t.EFF(37),t.nI1(38,"translate"),t.j41(39,"div",16),t.nrm(40,"i",17)(41,"i",17)(42,"i",17),t.k0s()(),t.j41(43,"th",15),t.EFF(44),t.nI1(45,"translate"),t.j41(46,"div",16),t.nrm(47,"i",17)(48,"i",17)(49,"i",17)(50,"i",17),t.k0s()(),t.j41(51,"th",15),t.EFF(52),t.nI1(53,"translate"),t.j41(54,"div",16),t.nrm(55,"i",17)(56,"i",17)(57,"i",17)(58,"i",17)(59,"i",17),t.k0s()()()(),t.j41(60,"tbody",18),t.DNE(61,Ie,19,8,"tr",19)(62,ve,4,3,"tr",20),t.k0s()()()()()()()),2&a&&(t.Y8G("title",t.bMT(1,14,"Rating.RatingResult"))("items",t.sMw(42,be,t.eq3(36,he,t.bMT(2,16,"Common.InteractiveActivities")),t.eq3(38,_e,t.bMT(3,18,"Rating.Ratings")),t.eq3(40,fe,t.bMT(4,20,"Rating.RatingResult")))),t.R7$(9),t.JRh(t.bMT(10,22,"Rating.EvaluationResultDetails")),t.R7$(3),t.Y8G("ngIf",!n.isExpanded),t.R7$(),t.Y8G("ngIf",n.isExpanded),t.R7$(),t.Y8G("ngIf",n.isExpanded),t.R7$(9),t.SpI(" ",t.bMT(24,24,"assignment.Questions")," "),t.R7$(3),t.SpI(" ",t.bMT(27,26,"Survey.VeryNotSatisfied")," "),t.R7$(5),t.SpI(" ",t.bMT(32,28,"Survey.NotSatisfied")," "),t.R7$(6),t.SpI(" ",t.bMT(38,30,"Survey.Neutral")," "),t.R7$(7),t.SpI(" ",t.bMT(45,32,"Survey.Satisfied")," "),t.R7$(8),t.SpI(" ",t.bMT(53,34,"Survey.VerySatisfied")," "),t.R7$(9),t.Y8G("ngForOf",null==n.rateResult?null:n.rateResult.rateQuestions),t.R7$(),t.Y8G("ngIf",0===(null==n.rateResult||null==n.rateResult.rateQuestions?null:n.rateResult.rateQuestions.length)))},dependencies:[f.Sq,f.bT,$.X,w.md,D.D9],styles:['@charset "UTF-8";.expand-button[_ngcontent-%COMP%]{border:none;font-size:1.5rem;padding:0}.expand-text[_ngcontent-%COMP%]{font-size:18px}.header-stars[_ngcontent-%COMP%]{margin-top:4px;display:flex;justify-content:center;gap:4px}.header-stars[_ngcontent-%COMP%]   .gold[_ngcontent-%COMP%]{color:#fbbf24;font-size:14px}th[_ngcontent-%COMP%]{vertical-align:middle}.th-question[_ngcontent-%COMP%]{width:350px}.rating-summary[_ngcontent-%COMP%]   .info-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:16px;background:#fff;border-radius:14px;box-shadow:0 6px 18px #0000000f;transition:transform .2s ease,box-shadow .2s ease}.rating-summary[_ngcontent-%COMP%]   .info-card[_ngcontent-%COMP%]:hover{box-shadow:0 10px 22px #0000001a}.rating-summary[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:52px;height:52px;border-radius:12px;color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px}.rating-summary[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0;overflow:hidden}.truncateTitle[_ngcontent-%COMP%]{display:block;width:100%;max-width:280px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.truncateTitle.arabic-text[_ngcontent-%COMP%]{direction:rtl!important;text-align:right!important;unicode-bidi:plaintext}.truncateTitle.english-text[_ngcontent-%COMP%]{direction:ltr!important;text-align:left!important;unicode-bidi:plaintext}.rating-summary[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-size:13px;color:#6b7280}.rating-summary[_ngcontent-%COMP%]   .value[_ngcontent-%COMP%]{font-weight:600;margin:0;color:#111827}.count-badge[_ngcontent-%COMP%]{min-width:38px;height:38px;padding:0 10px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:400;font-size:14px;cursor:pointer;border:1px solid rgb(192,191,191)}.truncate[_ngcontent-%COMP%]{display:inline-block;max-width:330px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-tooltip[_ngcontent-%COMP%]   .tooltip-inner[_ngcontent-%COMP%]{max-width:500px!important;white-space:normal!important;z-index:1000!important}.bg-indigo[_ngcontent-%COMP%]{background-color:#6366f1!important}.bg-purple[_ngcontent-%COMP%]{background-color:#8b5cf6!important}.bg-teal[_ngcontent-%COMP%]{background-color:#14b8a6!important}']})}}return i})()}]}];let Te=(()=>
1{class i{static{this.\u0275fac=function(a){return new(a||i)}}static{this.\u0275mod=t.$C({type:i})}static{this.\u0275inj=t.G2t({imports:[d.iI.forChild(De),d.iI]})}}return i})();var Fe=c(6587);let ke=(()=>{class i{static{this.\u0275fac=function(a){return new(a||i)}}static{this.\u0275mod=t.$C({type:i})}static{this.\u0275inj=t.G2t({imports:[Te,f.MD,Fe.G,m.YN]})}}return i})()},1389:(U,G,c)=>{c.d(G,{X:()=>m});var d=c(8845),l=c(4438),t=c(177),F=c(7062),b=c(565);const A=(g,h)=>({$implicit:g,baseLink:"",isLast:h}),k=g=>({"current-page":g}),v=(g,h)=>({$implicit:g,baseLink:h,isLast:!1});function I(g,h){1&g&&l.eu8(0)}function D(g,h){if(1&g&&(l.qex(0),l.DNE(1,I,1,0,"ng-container",12),l.bVm()),2&g){const u=h.$implicit,p=h.last;l.XpG();const _=l.sdS(13);l.R7$(),l.Y8G("ngTemplateOutlet",_)("ngTemplateOutletContext",l.l_i(2,A,u,p))}}function O(g,h){if(1&g&&(l.j41(0,"a",9),l.EFF(1),l.k0s()),2&g){const u=l.XpG(),p=u.$implicit;l.Y8G("routerLink",u.baseLink+p.link),l.R7$(),l.JRh(p.label)}}function E(g,h){if(1&g&&(l.j41(0,"span"),l.EFF(1),l.k0s()),2&g){const u=l.XpG().$implicit;l.R7$(),l.JRh(u.label)}}function f(g,h){1&g&&l.eu8(0)}function L(g,h){if(1&g&&(l.qex(0),l.DNE(1,f,1,0,"ng-container",12),l.bVm()),2&g){const u=h.$implicit,p=l.XpG(2),_=p.$implicit,B=p.baseLink;l.XpG();const X=l.sdS(13);l.R7$(),l.Y8G("ngTemplateOutlet",X)("ngTemplateOutletContext",l.l_i(2,v,u,B+_.link))}}function $(g,h){if(1&g&&(l.qex(0),l.DNE(1,L,2,5,"ng-container",11),l.bVm()),2&g){const u=l.XpG().$implicit;l.R7$(),l.Y8G("ngForOf",u.children)}}function w(g,h){if(1&g&&(l.j41(0,"li",13),l.DNE(1,O,2,2,"a",14)(2,E,2,1,"ng-template",null,1,l.C5r),l.k0s(),l.DNE(4,$,2,1,"ng-container",15)),2&g){const u=h.$implicit,p=h.isLast,_=l.sdS(3);l.Y8G("ngClass",l.eq3(4,k,p)),l.R7$(),l.Y8G("ngIf",!p&&u.link)("ngIfElse",_),l.R7$(3),l.Y8G("ngIf",u.children)}}let m=(()=>{class g{constructor(){this.title="",this.items=[],this.RoleGroupEnum=d.r}ngOnInit(){const u=localStorage.getItem("roleGroup");this.baseLink=this.getHomeLinkByRole(u)}getLink(u){return u.link?u.link:""}getHomeLinkByRole(u){switch(u){case d.r.Teacher:return"/DashBoard/teacherDashboard";case d.r.Student:return"/DashBoard/studentDashboard";case d.r.SuperAdmin:return"/DashBoard/adminDashboard";case d.r.EducationalSupervisor:return"/DashBoard/SupervisorDashboard";case d.r.Parent:return"/DashBoard/ParentDashboard";case d.r.StageManager:return"/DashBoard/StageManagerDashboard";case d.r.AcademicSupervisor:return"/DashBoard/AcademicSupervisorDashboard";case d.r.Security:return"/DashBoard/SecurityDashboard";default:return"/DashBoard/adminDashboard"}}static{this.\u0275fac=function(p){return new(p||g)}}static{this.\u0275cmp=l.VBU({type:g,selectors:[["app-bread-crump"]],inputs:{title:"title",items:"items"},decls:14,vars:4,consts:[["renderBreadcrumb",""],["noLink",""],[1,"container-fluid","Custom-font"],[1,"page-title"],[1,"row"],[1,"col-sm-6"],[1,"Custom-font"],[1,"breadcrumb"],[1,"breadcrumb-item","Custom-font"],[3,"routerLink"],[3,"icon"],[4,"ngFor","ngForOf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"breadcrumb-item","Custom-font",3,"ngClass"],[3,"routerLink",4,"ngIf","ngIfElse"],[4,"ngIf"]],template:function(p,_){1&p&&(l.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"h3",6),l.EFF(5),l.k0s()(),l.j41(6,"div",5)(7,"ol",7)(8,"li",8)(9,"a",9),l.nrm(10,"app-feather-icon",10),l.k0s()(),l.DNE(11,D,2,5,"ng-container",11),l.k0s()()()()(),l.DNE(12,w,5,6,"ng-template",null,0,l.C5r)),2&p&&(l.R7$(5),l.JRh(_.title),l.R7$(4),l.Y8G("routerLink",_.baseLink),l.R7$(),l.Y8G("icon","home"),l.R7$(),l.Y8G("ngForOf",_.items))},dependencies:[t.YU,t.Sq,t.bT,t.T3,F.Wk,b.i],styles:[".breadcrumb-item.current-page[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .breadcrumb-item.current-page[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:700}.page-title[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .page-wrapper[_ngcontent-%COMP%]   .page-body-wrapper[_ngcontent-%COMP%]   .page-title[_ngcontent-%COMP%]   .h3[_ngcontent-%COMP%]{text-transform:none}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:0}.breadcrumb-item[_ngcontent-%COMP%]{display:flex;align-items:center}.breadcrumb-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .breadcrumb-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:flex;align-items:center;line-height:1}.breadcrumb-item[_ngcontent-%COMP%] + .breadcrumb-item[_ngcontent-%COMP%]:before{display:flex;align-items:center}.breadcrumb[_ngcontent-%COMP%]{min-height:32px}.breadcrumb-item[_ngcontent-%COMP%]{height:32px;display:flex;align-items:center}.breadcrumb-item[_ngcontent-%COMP%]   app-feather-icon[_ngcontent-%COMP%]{display:flex;align-items:center}"]})}}return g})()},8605:(U,G,c)=>{c.d(G,{B:()=>F});var d=c(4438),l=c(6911),t=c(1780);let F=(()=>{class b{constructor(){this.icon="fas fa-chalkboard-teacher",this.title="",this.iconColor="text-primary",this.iconSize="fs-5",this.close=new d.bkB}static{this.\u0275fac=function(v){return new(v||b)}}static{this.\u0275cmp=d.VBU({type:b,selectors:[["app-dialog-header"]],inputs:{icon:"icon",title:"title",iconColor:"iconColor",iconSize:"iconSize"},outputs:{close:"close"},decls:7,vars:6,consts:[[1,"modal-header","custom-modal","pb-0"],[1,"Custom-font","new-custom-font","dialog-header"],[1,"dialog-header-title"],["type","button","aria-label","Close","placement","bottom","triggers","hover",1,"btn-close","pt-3",3,"click","ngbTooltip"]],template:function(v,I){1&v&&(d.j41(0,"div",0)(1,"h2",1),d.nrm(2,"i"),d.j41(3,"span",2),d.EFF(4),d.k0s()(),d.j41(5,"button",3),d.nI1(6,"translate"),d.bIt("click",function(){return I.close.emit()}),d.k0s()()),2&v&&(d.R7$(2),d.HbH(I.icon+" me-2 "+I.iconColor+" "+I.iconSize),d.R7$(2),d.SpI(" ",I.title," "),d.R7$(),d.Y8G("ngbTooltip",d.bMT(6,4,"Common.Close")))},dependencies:[l.md,t.D9],styles:[".dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;width:90%;flex-wrap:wrap}.dialog-header-title[_ngcontent-%COMP%]{flex:1;word-break:break-word;overflow-wrap:anywhere;white-space:normal;line-height:1.5;font-size:18px}.dialog-header-title[_ngcontent-%COMP%]{font-weight:600;font-size:1.1rem}@media (max-width: 1200px){.dialog-header-title[_ngcontent-%COMP%]{font-size:1rem}}@media (max-width: 992px){.dialog-header-title[_ngcontent-%COMP%]{font-size:.9rem}}@media (max-width: 768px){.dialog-header-title[_ngcontent-%COMP%]{font-size:.8rem}}@media (max-width: 576px){.dialog-header-title[_ngcontent-%COMP%]{font-size:.75rem}}@media (max-width: 400px){.dialog-header-title[_ngcontent-%COMP%]{font-size:.7rem}}"]})}}return b})()}}]);

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.