PageSourceSearch

https://qr.waccsa.co.za/chunk-RDV3SSZC.js

js waccsa.co.za collected 2026-10-02 00:43:12 UTC 8,992 bytes, 1 lines download raw bytes

1import{b as Z,f as ee}from"./chunk-RJCLEUJZ.js";import{a as X}from"./chunk-SPNGZ6OB.js";import{c as U,e as B,m as L,o as K,q as Y,r as J,s as Q,t as W}from"./chunk-TMZMPAP3.js";import"./chunk-3X32PWK7.js";import{b as $,d as H}from"./chunk-KRPOEOFV.js";import{a as z}from"./chunk-43T6Z6MD.js";import"./chunk-D2EPPDWC.js";import"./chunk-GAGU5ZFO.js";import{c as F,e as A}from"./chunk-VGNSDNVC.js";import"./chunk-VLJOXDW6.js";import"./chunk-36U4BYTI.js";import{a as C}from"./chunk-JXMAD3LX.js";import{a as E,b as _,c as M}from"./chunk-VZT67X34.js";import"./chunk-GAXL64IM.js";import{c as V,d as h,f as T,g as I,h as N,j as k,l as R,p as D,q as j,u as q,x as G,y as O,z as P}from"./chunk-KGBC5V5Z.js";import{a as w}from"./chunk-FHLNPX44.js";import"./chunk-NRJGTESK.js";import{c as S}from"./chunk-UASB7NQA.js";import"./chunk-WMO2VXSQ.js";import"./chunk-UO7X6BCZ.js";import{v as y}from"./chunk-RBKZ3TQU.js";import{Db as v,Pa as x,W as b,Xb as u,Yb as r,Zb as n,_b as a,jc as c,mb as d,xb as s,xc as o}from"./chunk-IXVPWH67.js";var te=(()=>{let p=class p{constructor(e,i,t,m,l,f,ie,re){this.afs=e,this.element=i,this.route=t,this.storage=m,this.formBuilder=l,this.notification=f,this.spinner=ie,this.authService=re,this.insurances=["OUT","Old Mutual","Discovery"],this.manufactures=["Kwikot","Heat tank","Ren Tek"],this.validTextType=!1,this.disabled=!1,this.gId="iii",this.validGeyser=!1,this.nativeElement=i.nativeElement}ngOnInit(){this.form=this.formBuilder.group({insurance:[null,h.required],manufacture:[null,h.required],notes:[null],geyser_number:["",h.required],name:[null],t_c:[null],date:[null],sub_date:[null],uid:[null],phone_number:[null],email:[null],id_number:[null]}),this.userSub=this.authService.userDoc$().subscribe(e=>{e&&e.uid&&(this.uid=e.uid,this.user=e,this.form.patchValue({uid:this.uid}),this.form.patchValue({name:`${e.first_name||""} ${e.last_name||""}`.trim()}),this.form.patchValue({t_c:e.t_c}),this.form.patchValue({phone_number:e.phone_number}),this.form.patchValue({email:e.email}),this.form.patchValue({sub_date:Date.now()}),this.form.patchValue({id_number:e.id_number}))})}update(){this.spinner.show(),this.disabled=!0,this.afs.collection("submissions").doc(this.form.get("geyser_number").value).set(this.form.value,{merge:!0}).then(e=>{this.notification.showNotification("Form submitted","top","center","success","Success"),this.spinner.hide(),this.form.reset(),this.disabled=!1}).catch(e=>{this.disabled=!1,this.notification.showNotification("Submission failed please try again","top","center","danger","Failed"),this.spinner.hide()})}onType(){this.form.valid||this.validateAllFormFields(this.form)}isFieldValid(e,i){return!e.get(i).valid&&e.get(i).touched}displayFieldCss(e,i){return{"has-error":this.isFieldValid(e,i),"has-feedback":this.isFieldValid(e,i)}}validateAllFormFields(e){Object.keys(e.controls).forEach(i=>{let t=e.get(i);t instanceof k?t.markAsTouched({onlySelf:!0}):t instanceof N&&this.validateAllFormFields(t)})}makeid(){for(var e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=0;t<15;t++)e+=i.charAt(Math.floor(Math.random()*i.length));return e}uploadFile(e){let i=e.target.files[0],t=this.makeid(),m=this.storage.ref(t),l=this.storage.upload(t,i);this.uploadPercent=l.percentageChanges(),this.upload=l.snapshotChanges().pipe(b(()=>{this.downloadURL=m.getDownloadURL(),m.getDownloadURL().subscribe(f=>{console.log(f),this.form.patchValue({image:f})})})).subscribe()}findGeyser(e){this.afs.collection("geysers").doc(e).valueChanges().subscribe(i=>{i?(this.form.patchValue({date:i.date}),this.spinner.hide(),this.update()):(this.form.patchValue({geyser_number:null}),this.spinner.hide())})}textValidationType(e){this.validTextType=!!e}geyserValidation(e){console.log(e),this.validGeyser=e==this.gId}submit(){this.spinner.show(),this.findGeyser(this.form.get("geyser_number").value)}ngOnDestroy(){this.userSub?.unsubscribe()}};p.\u0275fac=function(i){return new(i||p)(s(z),s(x),s(S),s(X),s(G),s(C),s(E),s(w))},p.\u0275cmp=v({type:p,selectors:[["app-user-cmp"]],decls:64,vars:8,consts:[[1,"min-h-screen","bg-slate-50"],["bdColor","rgba(51,51,51,0.8)","size","medium","color","#fff","type","ball-clip-rotate-multiple"],[2,"font-size","20px","color","white"],[1,"mx-auto","max-w-5xl","px-4","py-8","sm:px-6"],[1,"rounded-2xl","bg-white","shadow-lg","ring-1","ring-slate-200"],[1,"flex","items-center","gap-3","border-b","border-slate-100","bg-slate-50","px-5","py-4"],[1,"flex","h-10","w-10","items-center","justify-center","rounded-xl","bg-[#4162AE]","text-white","shadow-sm"],[1,"material-icons","text-base"],[1,"text-lg","font-semibold","text-slate-900"],[1,"text-sm","text-slate-500"],[1,"space-y-6","p-5","sm:p-6",3,"ngSubmit","formGroup"],[1,"grid","grid-cols-1","gap-4","md:grid-cols-2"],[1,"mb-1.5","block","text-xs","font-semibold","uppercase","tracking-wide","text-slate-600"],[1,"text-red-600"],["formControlName","geyser_number","placeholder","Geyser Serial",1,"h-11","w-full","appearance-none","rounded-lg","bg-white","px-3","text-sm","text-slate-700","placeholder:text-slate-400","focus:outline-none","disabled:cursor-not-allowed","disabled:bg-slate-50","disabled:text-slate-400","border","border-slate-300","focus:ring-2","focus:border-[#4162AE]","focus:ring-[#4162AE]/20"],["errorMsg","Geyser serial number is invali
1d",3,"displayError"],[1,"block","text-sm","font-medium","text-slate-700"],["accept","image/png, image/gif, image/jpeg","type","file",1,"mt-2","block","w-full","rounded-lg","border","border-slate-300","bg-white","p-3","text-sm","text-slate-900","shadow-sm","focus:border-[#4162AE]","focus:outline-none","focus:ring-2","focus:ring-[#4162AE]/20",3,"change"],["formControlName","geyser_number","placeholder","Existing size",1,"h-11","w-full","appearance-none","rounded-lg","bg-white","px-3","text-sm","text-slate-700","placeholder:text-slate-400","focus:outline-none","disabled:cursor-not-allowed","disabled:bg-slate-50","disabled:text-slate-400","border","border-slate-300","focus:ring-2","focus:border-[#4162AE]","focus:ring-[#4162AE]/20"],[1,"mt-2","flex","flex-wrap","gap-3"],[1,"inline-flex","items-center","gap-2","text-sm","text-slate-700"],["type","checkbox",1,"h-4","w-4","rounded","border-slate-300","text-[#4162AE]","focus:ring-[#4162AE]"],["formControlName","manufacture","label","Select manufacture","errorMessage","Required text",3,"options","required"],["formControlName","insurance","label","Select Insurance","errorMessage","Required text",3,"options","required"],["formControlName","notes","placeholder","Notes","name","notes","rows","5",1,"mt-2","w-full","rounded-xl","border","border-slate-200","p-3","text-sm","text-slate-900","shadow-sm","focus:border-[#4162AE]","focus:outline-none","focus:ring-2","focus:ring-[#4162AE]/20",3,"ngModelChange"],["errorMsg","Required text",3,"displayError"],["type","submit","variant","primary",1,"w-full","justify-center",3,"disabled"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"ngx-spinner",1),a(2,"p",2),n(),r(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"i",7),o(8,"perm_identity"),n()(),r(9,"div")(10,"h4",8),o(11,"Profile Details"),n(),r(12,"p",9),o(13,"Please fill all fields"),n()()(),r(14,"form",10),c("ngSubmit",function(){return t.submit()}),r(15,"div",11)(16,"div")(17,"label",12),o(18,"Geyser Serial "),r(19,"span",13),o(20,"*"),n()(),a(21,"input",14)(22,"app-field-error-display",15),n(),r(23,"div")(24,"label",16),o(25,"Image attachment"),n(),r(26,"input",17),c("change",function(l){return t.uploadFile(l)}),n()()(),r(27,"div",11)(28,"div")(29,"label",12),o(30,"Existing size"),n(),a(31,"input",18),r(32,"div",19)(33,"label",20),a(34,"input",21),o(35,"50 "),n(),r(36,"label",20),a(37,"input",21),o(38,"100 "),n(),r(39,"label",20),a(40,"input",21),o(41,"150 "),n(),r(42,"label",20),a(43,"input",21),o(44,"200 "),n(),r(45,"label",20),a(46,"input",21),o(47,"250 "),n()()(),r(48,"div")(49,"label",16),o(50,"Image attachment"),n(),r(51,"input",17),c("change",function(l){return t.uploadFile(l)}),n()()(),r(52,"div",11)(53,"div"),a(54,"app-select",22),n(),r(55,"div"),a(56,"app-select",23),n()(),r(57,"div")(58,"label",16),o(59,"Notes"),n(),r(60,"textarea",24),c("ngModelChange",function(l){return t.textValidationType(l)}),n(),a(61,"app-field-error-display",25),n(),r(62,"app-btn",26),o(63,"Submit"),n()()()()()),i&2&&(d(14),u("formGroup",t.form),d(8),u("displayError",t.isFieldValid(t.form,"geyser_number")),d(32),u("options",t.manufactures)("required",!0),d(2),u("options",t.insurances)("required",!0),d(5),u("displayError",t.isFieldValid(t.form,"notes")),d(),u("disabled",!t.form.valid))},dependencies:[y,O,R,V,T,I,q,P,D,j,M,_,Z,ee,F,$,L,A,H,K,Y,B,J,U,Q,W],styles:[".example-section[_ngcontent-%COMP%]{margin:12px 0}.example-margin[_ngcontent-%COMP%]{margin:0 12px}ul[_ngcontent-%COMP%]{list-style-type:none;margin-top:4px}.card-avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:200px!important;height:auto}"]});let g=p;return g})();var ke=[{path:"",children:[{path:"submit3",component:te}]}];export{ke as UserRoutes};

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.