PageSourceSearch

https://almutahidah.com/chunk-4AVW62Z2.js

js almutahidah.com collected 2026-09-27 07:09:50 UTC 8,465 bytes, 1 lines download raw bytes

1import{a as Q,b as J}from"./chunk-WSGEBQRD.js";import{a as H}from"./chunk-MUUT3CMA.js";import"./chunk-HL27X4PX.js";import"./chunk-QPVJBQNK.js";import"./chunk-KRKLOAW6.js";import{c as V,e as x,g as k,h as z,m as G,p as R,s as A,w as $,y as q}from"./chunk-2R4AZB5W.js";import{a as U}from"./chunk-KELMSLCR.js";import{a as N}from"./chunk-N6W3AF2G.js";import{a as h}from"./chunk-IENL4UJA.js";import{b as j,d as L,e as B}from"./chunk-JLWCQ6UT.js";import{H as T,V as D}from"./chunk-P4C42LQP.js";import{d as F}from"./chunk-RZZCZ2VH.js";import{m as O,w as I}from"./chunk-Z7IUSDSQ.js";import{Fa as r,Je as n,Kd as v,Ke as a,Le as d,Pe as y,Ra as E,Vf as c,Xf as m,ff as M,hf as f,ig as P,kb as S,lb as w,ma as C,pe as l,vg as u,wg as p,zc as o}from"./chunk-SRTQBDBP.js";import{a as Z}from"./chunk-EJD3L6HM.js";import{g as Y}from"./chunk-T7NDVU76.js";var K=(()=>{class e{constructor(){this.http=r(F)}getEvaluation(t,i,s){return this.http.get(h.apiUrl+`EvaluationTrigger/GetTriggerEvaluationPoints?ToEvaluateId=${t}&code=${i}&Sector=${s}`)}submitEvaluation(t){return this.http.post(h.apiUrl+"EvaluationTrigger/Evaluate",t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var W=Y(Z());function et(e,b){e&1&&(n(0,"div",4),d(1,"div",5),a())}function it(e,b){e&1&&(n(0,"div",23),c(1),u(2,"translate"),a()),e&2&&(o(),m(" ",p(2,1,"validation.required")," "))}function nt(e,b){if(e&1){let t=y();n(0,"div",6)(1,"div",7)(2,"div",8),d(3,"img",9),a(),n(4,"div",10)(5,"div",11),c(6),u(7,"translate"),a(),n(8,"form",12),M("ngSubmit",function(){S(t);let s=f();return w(s.onSubmit())}),n(9,"div",13)(10,"div",14)(11,"div",15),d(12,"p-rating",16),a(),n(13,"div",17),c(14),u(15,"translate"),a()(),v(16,it,3,3,"div",18),n(17,"div",19)(18,"div",15),d(19,"textarea",20),a(),n(20,"div",17),c(21),u(22,"translate"),a()()(),n(23,"div",21)(24,"button",22),c(25),u(26,"translate"),a()()()()()()}if(e&2){let t,i=f();o(6),m(" ",p(7,8,"evaluation.title")," "),o(2),l("formGroup",i.evaluationForm),o(4),l("stars",5)("cancel",!1),o(2),m(" ",p(15,10,"evaluation.rateExperience")," "),o(2),l("ngIf",i.isFormSubmitted&&((t=i.getControl("rating"))==null?null:t.hasError("min"))),o(5),m(" ",p(22,12,"evaluation.comments")," "),o(4),m(" ",p(26,14,"evaluation.submit")," ")}}var wt=(()=>{class e{constructor(){this.isFormSubmitted=!1,this.isLoading=!0,this.subscriptions=[],this.evaluationData=[],this.id="",this.code="",this.sector=0,this.fb=r($),this.route=r(T),this.router=r(D),this.evaluationService=r(K),this.swalService=r(H),this.langService=r(N),this.translateService=r(j),this.createForm()}ngOnInit(){this.getQueryParams()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}createForm(){this.evaluationForm=this.fb.group({rating:[0,[x.required,x.min(1)]],comment:[""]})}getQueryParams(){this.subscriptions.push(this.route.queryParams.subscribe(t=>{this.id=t.id||"",this.code=t.code||"",this.sector=parseInt(t.Sector||t.sector||"0",10),this.id&&this.code&&this.sector?this.loadEvaluationData():this.isLoading=!1}))}loadEvaluationData(){this.subscriptions.push(this.evaluationService.getEvaluation(this.id,this.code,this.sector).subscribe({next:t=>{this.evaluationData=t.data||[],this.isLoading=!1},error:()=>{this.isLoading=!1}}))}onSubmit(){if(this.isFormSubmitted=!0,this.evaluationForm.invalid)return;let t=this.evaluationData.length>0?this.evaluationData[0]:null,i=this.evaluationForm.get("rating")?.value,s=[];if(t)for(let g of t.criteria)for(let _ of g.points)s.push({evaluationPointId:_.evaluationPointId,criteriaId:_.criteriaId,degree:i,answer:!0});let X={custEvaluation:s,evaluationId:t?.evaluationId||null,evaluationTriggerId:t?.triggerId||"",companyEvaluation:i,notes:this.evaluationForm.get("comment")?.value||"",sector:t?.sector||this.sector,toEvaluateId:t?.toEvaluateId||this.id};this.subscriptions.push(this.evaluationService.submitEvaluation(X).subscribe({next:()=>{this.displaySuccessMessage()},error:g=>{this.swalService.displaySwalError(g.error?.message||"\u062D\u062F\u062B \u062E\u0637\u0623")}}))}displaySuccessMessage(){let t=this.langService.getCurrentLang()==="ar"?"\u062A\u0645 \u062D\u064
11\u0638 \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0628\u0646\u062C\u0627\u062D":"Evaluation saved successfully";W.default.fire({iconHtml:`<img src="${U}" alt="success"/>`,title:t,confirmButtonText:this.langService.getOkMessageAccordingToLanguage()}).then(()=>{this.router.navigate(["/home"])})}getControl(t){return this.evaluationForm.get(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=E({type:e,selectors:[["app-user-evaluation"]],standalone:!0,features:[P],decls:4,vars:2,consts:[[1,"evaluation-page"],[1,"container"],["class","loading-container",4,"ngIf"],["class","evaluation-container",4,"ngIf"],[1,"loading-container"],[1,"spinner"],[1,"evaluation-container"],[1,"evaluation-content"],[1,"illustration-section"],["src","assets/images/dynamic/Evaluation/Evaluation.svg","alt","Evaluation",1,"illustration-img"],[1,"form-section"],[1,"evaluation-title","fs-32","f-w-regular","text-B51A04"],[3,"ngSubmit","formGroup"],[1,"form-grid"],[1,"form-row"],[1,"input-col"],["formControlName","rating",3,"stars","cancel"],[1,"label-col","fs-16","f-w-regular","text-999999"],["class","error-msg",4,"ngIf"],[1,"form-row","align-items-start"],["formControlName","comment","rows","6",1,"form-control","comment-textarea"],[1,"submit-row"],["type","submit",1,"btn","btn-submit"],[1,"error-msg"]],template:function(i,s){i&1&&(n(0,"div",0)(1,"div",1),v(2,et,2,0,"div",2)(3,nt,27,16,"div",3),a()()),i&2&&(o(2),l("ngIf",s.isLoading),o(),l("ngIf",!s.isLoading))},dependencies:[I,O,B,L,q,G,V,k,z,R,A,J,Q],styles:[".evaluation-page[_ngcontent-%COMP%]{min-height:calc(100vh - 200px);background-color:#fff;padding:60px 0}.loading-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;min-height:400px}.spinner[_ngcontent-%COMP%]{width:48px;height:48px;border:4px solid #e5e5e5;border-top-color:#bd1c03;border-radius:50%;animation:_ngcontent-%COMP%_spin 1s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.evaluation-container[_ngcontent-%COMP%]{max-width:1200px;margin:0 auto;padding:0 20px}.evaluation-content[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse;gap:80px;align-items:flex-start;justify-content:center}.illustration-section[_ngcontent-%COMP%]{flex:0 0 350px;display:flex;align-items:flex-start;padding-top:40px}.illustration-img[_ngcontent-%COMP%]{width:100%;height:auto}.form-section[_ngcontent-%COMP%]{flex:0 0 600px;text-align:right;direction:rtl}.evaluation-title[_ngcontent-%COMP%]{margin-bottom:20px;line-height:1.4}.criterion-title[_ngcontent-%COMP%]{color:#555;margin-bottom:10px;font-size:18px}.form-grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.form-row[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse;align-items:center;gap:20px}.label-col[_ngcontent-%COMP%]{flex:0 0 auto;white-space:nowrap}.input-col[_ngcontent-%COMP%]{flex:1}  .p-rating{display:flex;gap:5px}  .p-rating .p-rating-item .p-rating-icon{color:#e0e0e0;font-size:32px}  .p-rating .p-rating-item.p-rating-item-active .p-rating-icon{color:#ffc107}  .p-rating .p-rating-item:focus{box-shadow:none}.comment-textarea[_ngcontent-%COMP%]{width:100%;padding:15px;border:1px solid #e0e0e0;border-radius:15px;font-size:14px;resize:none;min-height:150px;background-color:#fff;box-shadow:0 2px 10px #00000005}.comment-textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:#bd1c03}.submit-row[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:20px}.btn-submit[_ngcontent-%COMP%]{background-color:#bd1c03;color:#fff;padding:10px 40px;border:none;border-radius:25px;font-size:16px;font-weight:700;cursor:pointer;transition:opacity .3s}.btn-submit[_ngcontent-%COMP%]:hover{opacity:.9}.error-msg[_ngcontent-%COMP%]{color:#bd1c03;font-size:12px;margin-top:5px}@media (max-width: 992px){.evaluation-content[_ngcontent-%COMP%]{flex-direction:column;align-items:center;gap:40px}.form-section[_ngcontent-%COMP%]{flex:none;width:100%;max-width:600px;text-align:center}.illustration-section[_ngcontent-%COMP%]{flex:none;width:100%;max-width:300px;padding-top:0;justify-content:center}.rating-row[_ngcontent-%COMP%], .submit-row[_ngcontent-%COMP%]{justify-content:center}.evaluation-title[_ngcontent-%COMP%]{text-align:center}}"]})}}return e})();export{wt as UserEvaluationComponent};

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.