PageSourceSearch

https://almutahidah.com/chunk-ONUXCSIY.js

js almutahidah.com collected 2026-09-27 07:09:49 UTC 10,332 bytes, 1 lines download raw bytes

1import{a as D}from"./chunk-HR6P7TKP.js";import{g as J,h as K}from"./chunk-JEH3B2MD.js";import"./chunk-HL27X4PX.js";import"./chunk-QPVJBQNK.js";import"./chunk-KRKLOAW6.js";import{c as V,e as g,g as G,h as j,m as A,p as U,s as H,w as Y,y as $}from"./chunk-2R4AZB5W.js";import"./chunk-NMGI7OHJ.js";import{i as z}from"./chunk-JCPUWVFC.js";import{b as T}from"./chunk-MCQML6YT.js";import{b as I}from"./chunk-XNXLFDZX.js";import{a as L}from"./chunk-KELMSLCR.js";import"./chunk-N6W3AF2G.js";import"./chunk-IENL4UJA.js";import{b as E,d as B,e as k}from"./chunk-JLWCQ6UT.js";import{V as R}from"./chunk-P4C42LQP.js";import"./chunk-RZZCZ2VH.js";import{m as N,w as F}from"./chunk-Z7IUSDSQ.js";import{Fa as c,Je as i,Kd as m,Ke as r,Le as f,Ra as q,Vf as s,Xf as d,ff as C,ig as y,pe as p,re as u,vg as a,wg as l,zc as e}from"./chunk-SRTQBDBP.js";import{a as X}from"./chunk-EJD3L6HM.js";import{g as W}from"./chunk-T7NDVU76.js";var Q=W(X());function Z(o,v){o&1&&(i(0,"div",23),s(1),a(2,"translate"),r()),o&2&&(e(),d(" ",l(2,1,"validation.required")," "))}function ee(o,v){o&1&&(i(0,"div",23),s(1),a(2,"translate"),r()),o&2&&(e(),d(" ",l(2,1,"validation.required")," "))}function te(o,v){o&1&&(i(0,"div",23),s(1),a(2,"translate"),r()),o&2&&(e(),d(" ",l(2,1,"validation.required")," "))}function ne(o,v){o&1&&(i(0,"div",23),s(1),a(2,"translate"),r()),o&2&&(e(),d(" ",l(2,1,"validation.required")," "))}var xe=(()=>{class o{constructor(){this.isFormSubmitted=!1,this.subscriptions=[],this.fb=c(Y),this.leadService=c(D),this.sessionStorageService=c(I),this.userService=c(T),this.sharedService=c(z),this.translateService=c(E),this.router=c(R),this.createForm()}ngOnInit(){this.sharedService.setActiveComponent("contactRequest.createNewRequest"),this.getCities(),this.setFormValues(),this.setupTranslations()}ngOnDestroy(){this.subscriptions.forEach(n=>n.unsubscribe()),this.sharedService.setActiveComponent("")}createForm(){this.contactRequestForm=this.fb.group({contactName:["",g.required],phoneNumber:["",g.required],cityId:["",g.required],description:["",g.required]})}getCities(){this.subscriptions.push(this.leadService.getCities().subscribe(n=>{this.cities=n.data}))}setFormValues(){this.getControl("phoneNumber")?.setValue(this.sessionStorageService.phoneNumber),this.subscriptions.push(this.userService.getUserData().subscribe(n=>{this.getControl("contactName")?.setValue(n?.name)}))}setupTranslations(){this.subscriptions.push(this.translateService.get(["Lead.LeadCreated","Lead.Ok"]).subscribe(n=>{this.title=n["Lead.LeadCreated"],this.acceptButton=n["Lead.Ok"]})),this.subscriptions.push(this.translateService.onLangChange.subscribe(n=>{this.title=n.translations.Lead.LeadCreated,this.acceptButton=n.translations.Lead.Ok}))}onSubmit(){this.isFormSubmitted=!0,this.contactRequestForm.valid&&this.subscriptions.push(this.leadService.createOtherOrders(this.contactRequestForm.value).subscribe({next:n=>{n&&this.displaySuccessMessage()},error:()=>{}}))}displaySuccessMessage(){Q.default.fire({iconHtml:`<img src="${L}" alt="success"/>`,title:this.title,confirmButtonText:this.acceptButton}).then(n=>{n.value&&this.router.navigate(["/home"])})}onCancel(){this.contactRequestForm.reset(),this.isFormSubmitted=!1,this.router.navigate(["/home"])}getControl(n){return this.contactRequestForm.get(n)}static{this.\u0275fac=function(h){return new(h||o)}}static{this.\u0275cmp=q({type:o,selectors:[["app-contact-request"]],standalone:!0,features:[y],decls:47,vars:40,consts:[[1,"contact-request-page"],[1,"container","my-5"],[1,"row","justify-content-center","main-form-container"],[1,"col-lg-8","col-md-10"],[1,"form-container"],[1,"form-header"],[1,"fs-24","f-w-bold","text-white","m-0"],[1,"form-body"],[3,"ngSubmit","formGroup"],[1,"form-row","mb-3"],["for","contactName",1,"form-label"],[1,"input-wrapper"],["type","text","id","contactName","formControlName","contactName","readonly","",1,"form-control"],["class","error-msg",4,"ngIf"],["for","phoneNumber",1,"form-label"],["type","tel","id","phoneNumber","formControlName","phoneNumber","readonly","",1,"form-control"],["for","cityId",1,"form-label"],["formControlName","cityId","optionLabel","value","o
1ptionValue","key","filterBy","value","styleClass","full-width-dropdown",3,"options","filter","showClear","placeholder"],["for","description",1,"form-label"],["type","text","id","description","formControlName","description",1,"form-control"],[1,"d-flex","gap-3","justify-content-center","mt-4"],["type","submit",1,"btn","btn-submit"],["type","button",1,"btn","btn-cancel",3,"click"],[1,"error-msg"]],template:function(h,t){if(h&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"h2",6),s(7),a(8,"translate"),r()(),i(9,"div",7)(10,"form",8),C("ngSubmit",function(){return t.onSubmit()}),i(11,"div",9)(12,"label",10),s(13),a(14,"translate"),r(),i(15,"div",11),f(16,"input",12),m(17,Z,3,3,"div",13),r()(),i(18,"div",9)(19,"label",14),s(20),a(21,"translate"),r(),i(22,"div",11),f(23,"input",15),m(24,ee,3,3,"div",13),r()(),i(25,"div",9)(26,"label",16),s(27),a(28,"translate"),r(),i(29,"div",11),f(30,"p-dropdown",17),a(31,"translate"),m(32,te,3,3,"div",13),r()(),i(33,"div",9)(34,"label",18),s(35),a(36,"translate"),r(),i(37,"div",11),f(38,"input",19),m(39,ne,3,3,"div",13),r()(),i(40,"div",20)(41,"button",21),s(42),a(43,"translate"),r(),i(44,"button",22),C("click",function(){return t.onCancel()}),s(45),a(46,"translate"),r()()()()()()()()()),h&2){let b,x,_,w,S,M,O,P;e(7),d(" ",l(8,24,"contactRequest.createNewRequest")," "),e(3),p("formGroup",t.contactRequestForm),e(3),d(" ",l(14,26,"contactRequest.fullName")," "),e(3),u("is-invalid",t.isFormSubmitted&&((b=t.getControl("contactName"))==null?null:b.invalid)),e(),p("ngIf",t.isFormSubmitted&&((x=t.getControl("contactName"))==null?null:x.hasError("required"))),e(3),d(" ",l(21,28,"contactRequest.mobileNumber")," "),e(3),u("is-invalid",t.isFormSubmitted&&((_=t.getControl("phoneNumber"))==null?null:_.invalid)),e(),p("ngIf",t.isFormSubmitted&&((w=t.getControl("phoneNumber"))==null?null:w.hasError("required"))),e(3),d(" ",l(28,30,"contactRequest.city")," "),e(3),u("is-invalid",t.isFormSubmitted&&((S=t.getControl("cityId"))==null?null:S.invalid)),p("options",t.cities)("filter",!0)("showClear",!1)("placeholder",l(31,32,"choose")),e(2),p("ngIf",t.isFormSubmitted&&((M=t.getControl("cityId"))==null?null:M.hasError("required"))),e(3),d(" ",l(36,34,"contactRequest.requestDetails")," "),e(3),u("is-invalid",t.isFormSubmitted&&((O=t.getControl("description"))==null?null:O.invalid)),e(),p("ngIf",t.isFormSubmitted&&((P=t.getControl("description"))==null?null:P.hasError("required"))),e(3),d(" ",l(43,36,"contactRequest.sendRequest")," "),e(3),d(" ",l(46,38,"common.cancel")," ")}},dependencies:[F,N,k,B,$,A,V,G,j,U,H,K,J],styles:[".contact-request-page[_ngcontent-%COMP%]{min-height:calc(100vh - 200px);padding-top:32px;padding-bottom:32px}.form-container[_ngcontent-%COMP%]{background-color:#fff;border-radius:16px;overflow:hidden;box-shadow:0 4px 12px #0000001a}.form-header[_ngcontent-%COMP%]{background-color:#bd1c03;padding:16px 32px;text-align:center;border-radius:28px;margin:16px}.form-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#fff;margin:0;font-size:18px}.form-body[_ngcontent-%COMP%]{padding:32px}.form-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px}.form-row[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]{flex:1;position:relative}.form-row[_ngcontent-%COMP%]   .form-label[_ngcontent-%COMP%]{flex-shrink:0;width:100px;text-align:right;color:#333;font-size:14px;padding-top:12px;margin-bottom:0}.form-row[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{width:100%;padding:12px 16px;border:1px solid #e0e0e0;border-radius:8px;font-size:14px;transition:all .3s ease;background-color:#fff;height:48px}.form-row[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{outline:none;border-color:#bd1c03;box-shadow:0 0 0 .2rem #bd1c031a}.form-row[_ngcontent-%COMP%]   .form-control.is-invalid[_ngcontent-%COMP%]{border-color:#dc3545}.form-row[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]::placeholder{color:#999}.form-row[_ngcontent-%COMP%]   .form-control[readonly][_ngcontent-%COMP%]{background-color:#f8f9fa}.form-row[_ngcontent-%COMP%]   .error-msg[_ngcontent-%COMP%]{color:#dc3545;font-size:12px;margin-top:4px}  .full-width-dropdown{width:100%!important;border:1px solid #e0e0e0;border-radius:8px;height:48px;min-height:48px;max-height:48px;box-sizing:border-box}  .full-width-dropdown:hover{border-color:#bd1c03}  .full-width-dropdown.p-focus{border-color:#bd1c03;box-shadow:0 0 0 .2rem #bd1c031a}  .full-width-dropdown.is-invalid{border-color:#dc3545}  .full-width-dropdown .p-dropdown-label{display:flex;align-items:center;height:100%;padding:0 16px;font-size:14px;line-height:46px}  .full-width-dropdown .p-dropdown-trigger{width:40px;height:100%}  .p-dropdown-panel{z-index:1000!important}.btn[_ngcontent-%COMP%]{padding:12px 32px;border-radius:28px;font-size:14px;font-weight:500;border:none;cursor:pointer;transition:all .3s ease;min-width:120px}.btn[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #00000026}.btn-submit[_ngcontent-%COMP%]{background-color:#bd1c03;color:#fff}.btn-submit[_ngcontent-%COMP%]:hover{background-color:#a01802}.btn-submit[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #bd1c034d}.btn-cancel[_ngcontent-%COMP%]{background-color:#6c757d;color:#fff}.btn-cancel[_ngcontent-%COMP%]:hover{background-color:#5a6268}.btn-cancel[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #6c757d4d}@media (max-width: 768px){.form-header[_ngcontent-%COMP%]{padding:14px 20px;margin:12px}.form-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:16px}.form-body[_ngcontent-%COMP%]{padding:24px 16px}.form-row[_ngcontent-%COMP%]{flex-direction:column-reverse;gap:8px}.form-row[_ngcontent-%COMP%]   .form-label[_ngcontent-%COMP%]{width:100%;text-align:right;padding-top:0}.form-row[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]{width:100%}.btn[_ngcontent-%COMP%]{padding:10px 24px;min-width:100px;font-size:13px}.d-flex.gap-3[_ngcontent-%COMP%]{flex-direction:column;gap:12px!important}.d-flex.gap-3[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{width:100%}}.main-form-container[_ngcontent-%COMP%]{background-color:#f2f2f2;padding:30px}"]})}}return o}
1)();export{xe as ContactRequestComponent};

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.