PageSourceSearch

https://tts.tranzaura.com/2673.0b7b12f25568e525.js

js tranzaura.com collected 2026-10-04 18:30:06 UTC 12,774 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktranzaura=self.webpackChunktranzaura||[]).push([[2673],{38460:(O,g,n)=>{n.d(g,{D:()=>w});var t=n(54438),_=n(37023),d=n(15752),p=n(20951),u=n(39520),f=n(21189),C=n(48256),c=n(45957),j=n(68531),E=n(60177),M=n(85956),b=n(44613),v=n(224),D=n(52920),m=n(89417);const T=["orgCustomerForm"];function y(s,h){if(1&s){const o=t.RV6();t.j41(0,"div",29),t.EFF(1),t.j41(2,"button",30,1),t.bIt("click",function(){t.eBV(o);const e=t.XpG();return t.Njj(e.closeCustomerModel("adhocCustomer"))}),t.EFF(4,"\xd7 "),t.k0s()()}if(2&s){const o=t.XpG();t.R7$(),t.JRh(o.master.datalist.AddCustomer)}}function F(s,h){if(1&s){const o=t.RV6();t.j41(0,"div",29),t.EFF(1),t.j41(2,"button",30,1),t.bIt("click",function(){t.eBV(o);const e=t.XpG();return t.Njj(e.closeCustomerModel("adhocCustomer"))}),t.EFF(4,"\xd7 "),t.k0s()()}if(2&s){const o=t.XpG();t.R7$(),t.JRh(o.master.datalist.NewWorkshop)}}function A(s,h){if(1&s&&(t.j41(0,"mat-label",31),t.EFF(1),t.j41(2,"span",13),t.EFF(3,"*"),t.k0s()()),2&s){const o=t.XpG();t.R7$(),t.JRh(o.master.datalist.Name)}}function R(s,h){if(1&s&&(t.j41(0,"mat-label",31),t.EFF(1),t.j41(2,"span",13),t.EFF(3,"*"),t.k0s()()),2&s){const o=t.XpG();t.R7$(),t.SpI(" ",o.master.datalist.Workshop,"")}}function P(s,h){1&s&&(t.j41(0,"span",13),t.EFF(1,"*"),t.k0s())}function I(s,h){1&s&&(t.j41(0,"span",13),t.EFF(1,"*"),t.k0s())}function k(s,h){1&s&&(t.j41(0,"span",13),t.EFF(1,"*"),t.k0s())}function S(s,h){1&s&&(t.j41(0,"span",13),t.EFF(1,"*"),t.k0s())}function H(s,h){1&s&&(t.j41(0,"span",13),t.EFF(1,"*"),t.k0s())}let w=(()=>{class s{get isAdhocCustomerMandatoryFieldsEnabled(){const o=this.master?.navSelectedOrgID;return!!o&&!!(this.master?.masterOrgList?.find(e=>e.id===o&&!e.isDelete)||this.master?.masterAllOrgList?.find(e=>e.id===o&&!e.isDelete))?.isMandatoryFields}constructor(o,i,e,r){this.master=o,this.toastrService=i,this.modalService=e,this.orgService=r,this.subs=new u.S,this.objOrgData=new _.Bh,this.SaveCount=0,this.btnDisable=!1,this.from="",this.cusType="Workshop",this.updatedCustomer=new t.bkB,this.addWorkShop=!1}ngOnChanges(o){o.hasOwnProperty("from")&&(this.cusType=this.from,"defect"===this.cusType&&(this.addWorkShop=!0))}closeCustomerModel(o){this.modalService.close(o)}saveCustomer(o){if(this.SaveCount>0)return;const i=this.master.masterOrgList.filter(e=>e.id===this.master.navSelectedOrgID);if(this.objOrgData.id=this.master.newGuid(),this.objOrgData.orgID_PK=this.objOrgData.id,this.objOrgData.createdBy=this.master.userInfo?.id||"",this.objOrgData.createdDate=d.H.moment(new Date).utc().format(),this.objOrgData.parentOrgID=this.master.navSelectedOrgID,i&&i.length>0){const e=i[0];this.objOrgData.subscriptionStartDate=e.subscriptionStartDate,this.objOrgData.subscriptionEndDate=e.subscriptionEndDate,this.objOrgData.mainColour=e.mainColour,this.objOrgData.highlightColour=e.highlightColour}this.objOrgData.status=1,this.SaveCount=Number(this.SaveCount)+1,this.btnDisable=!0,this.objOrgData.updatedDate=d.H.moment(new Date).utc().format(),this.objOrgData.updatedBy=this.master.userInfo?.id||"",this.addWorkShop?(this.objOrgData.isCustomer=!1,this.objOrgData.orgType=[d.H.id7],this.objOrgData.operatorLicense="",this.objOrgData.customerType=""):(this.objOrgData.isCustomer=!0,this.objOrgData.orgType=[1,d.H.id2,d.H.id3],this.objOrgData.operatorLicense="1",this.objOrgData.updatedBy=this.master.userInfo?.id||"",this.objOrgData.customerType=this.cusType),this.subs.add=this.orgService.createOrganization(this.objOrgData).subscribe(e=>{this.SaveCount=0,this.master.masterOrgList.push(e),this.master.masterAllOrgList.push(e),this.master.getOrganization(),this.closeCustomerModel(o),this.toastrService.success(this.addWorkShop?"Added External workshop successfully":"Customer added successfully"),this.updatedCustomer.emit({data:e}),this.objOrgData.companyName="",this.objOrgData.address1="",this.objOrgData.address2="",this.objOrgData.cityTown="",this.objOrgData.postCode="",this.objOrgData.phone="",this.objOrgData.orgType=[],this.objOrgData.operatorLicense="",this.btnDisable=!1},()=>{this.SaveCount=0,this.btnDisable=!1})}validateCustomer(o){let i=[this.objOrgData.companyName,this.objOrgData.address1];
1if(i=this.isAdhocCustomerMandatoryFieldsEnabled?[...i,this.objOrgData.address2,this.objOrgData.cityTown,this.objOrgData.postCode,this.objOrgData.phone,this.objOrgData.email]:this.addWorkShop?[...i,this.objOrgData.cityTown,this.objOrgData.postCode,this.objOrgData.phone,this.objOrgData.email]:[...i,this.objOrgData.cityTown,this.objOrgData.postCode,this.objOrgData.phone],!i.every(e=>e))return this.toastrService.warning("Please fill the required fields!!!"),void(this.btnDisable=!1);if(this.objOrgData.phone){if(this.objOrgData.phone.replace(/\s+/g,"").length<d.H.id7)return void this.toastrService.warning("Invalid Phone number; must be 7 digits.");if(!d.H.isValid(this.objOrgData.phone,p._1g.Phone))return void this.toastrService.warning("Please enter valid Phone number.")}!this.objOrgData.email||d.H.isValid(this.objOrgData.email.trim(),p._1g.Email)?this.saveCustomer(o):this.toastrService.warning("Please enter valid email.")}ngOnDestroy(){this.subs.dispose()}static{this.\u0275fac=function(i){return new(i||s)(t.rXU(f.m),t.rXU(C.tw),t.rXU(c.B),t.rXU(j.P))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-ad-hoc-customer"]],viewQuery:function(i,e){if(1&i&&t.GBs(T,5),2&i){let r;t.mGM(r=t.lsd())&&(e.form=r.first)}},inputs:{from:"from"},outputs:{updatedCustomer:"updatedCustomer"},features:[t.OA$],decls:62,vars:30,consts:[["orgCustomerForm","ngForm"],["closebutton",""],[1,"theme-model"],[1,"theme-modeltitle"],["class","title mbtm-5",4,"ngIf"],[1,"theme-modelbody"],[1,"formfields","themeinputgrp"],["fxLayout","row wrap","fxLayoutAlign","flex-start center",1,"mob-column"],["id","lblCustomerName","class","l-wt100",4,"ngIf"],[1,"md-form","form-group"],["appearance","outline",1,"example-full-width"],["id","txtCompanyName","name","CompanyName","matInput","","matTooltip","Customer Name","required","","maxlength","100","matTooltipClass","mat-tooltip-below-spacer",1,"visibleField",3,"ngModelChange","ngModel"],["id","lblAddress1",1,"l-wt100"],[1,"required"],["id","txtaddress1","name","address1","matInput","","matTooltip","Address1","required","","matTooltipClass","mat-tooltip-below-spacer","maxlength","100",1,"visibleField",3,"ngModelChange","ngModel"],["id","lblAddress2",1,"l-wt100"],["class","required",4,"ngIf"],["id","txtaddress2","name","address2","matInput","","matTooltip","Address2","maxlength","100","matTooltipClass","mat-tooltip-below-spacer",1,"visibleField",3,"ngModelChange","ngModel","required"],["id","lblCity",1,"l-wt100"],["id","txtCityTown","name","CityTown","matInput","","matTooltip","City Town","matTooltipClass","mat-tooltip-below-spacer","maxlength","100",1,"visibleField",3,"ngModelChange","ngModel","required"],["id","lblpostCode",1,"l-wt100"],["id","txtpostCode","name","postCode","matInput","","matTooltip","Post Code","matTooltipClass","mat-tooltip-below-spacer","maxlength","100",1,"visibleField",3,"ngModelChange","ngModel","required"],["id","lblphone",1,"l-wt100"],["id","txtphone","name","Phone","matInput","","matTooltip","phone","min","7","maxlength","25","matTooltipClass","mat-tooltip-below-spacer",1,"visibleField",3,"ngModelChange","keypress","ngModel","required"],["id","lblEmail",1,"l-wt100"],["id","txtEmail","name","Email","matInput","","matTooltip","Email","matTooltipClass","mat-tooltip-below-spacer","maxlength","100",1,"visibleField",3,"ngModelChange","ngModel","required"],[1,"theme-modelfooter","camicon"],["id","btncancel","name","cancel","mat-raised-button","",1,"defaultbtn","camicon",3,"click"],["id","btnsave","name","save","mat-raised-button","",1,"themebtn",3,"click","disabled"],[1,"title","mbtm-5"],["type","button","id","btnCloseField",1,"my-close",3,"click"],["id","lblCustomerName",1,"l-wt100"]],template:function(i,e){if(1&i){const r=t.RV6();t.j41(0,"div",2)(1,"div",3),t.DNE(2,y,5,1,"div",4)(3,F,5,1,"div",4),t.k0s(),t.j41(4,"div",5)(5,"div",6)(6,"form",null,0)(8,"div",7),t.DNE(9,A,4,1,"mat-label",8)(10,R,4,1,"mat-label",8),t.j41(11,"div",9)(12,"mat-form-field",10)(13,"input",11),t.mxI("ngModelChange",function(a){return t.eBV(r),t.DH7(e.objOrgData.companyName,a)||(e.objOrgData.companyName=a),t.Njj(a)}
1),t.k0s()()()(),t.j41(14,"div",7)(15,"mat-label",12),t.EFF(16),t.j41(17,"span",13),t.EFF(18,"*"),t.k0s()(),t.j41(19,"div",9)(20,"mat-form-field",10)(21,"input",14),t.mxI("ngModelChange",function(a){return t.eBV(r),t.DH7(e.objOrgData.address1,a)||(e.objOrgData.address1=a),t.Njj(a)}),t.k0s()()()(),t.j41(22,"div",7)(23,"mat-label",15),t.EFF(24),t.DNE(25,P,2,0,"span",16),t.k0s(),t.j41(26,"div",9)(27,"mat-form-field",10)(28,"input",17),t.mxI("ngModelChange",function(a){return t.eBV(r),t.DH7(e.objOrgData.address2,a)||(e.objOrgData.address2=a),t.Njj(a)}),t.k0s()()()(),t.j41(29,"div",7)(30,"mat-label",18),t.EFF(31),t.DNE(32,I,2,0,"span",16),t.k0s(),t.j41(33,"div",9)(34,"mat-form-field",10)(35,"input",19),t.mxI("ngModelChange",function(a){return t.eBV(r),t.DH7(e.objOrgData.cityTown,a)||(e.objOrgData.cityTown=a),t.Njj(a)}),t.k0s()()()(),t.j41(36,"div",7)(37,"mat-label",20),t.EFF(38),t.DNE(39,k,2,0,"span",16),t.k0s(),t.j41(40,"div",9)(41,"mat-form-field",10)(42,"input",21),t.mxI("ngModelChange",function(a){return t.eBV(r),t.DH7(e.objOrgData.postCode,a)||(e.objOrgData.postCode=a),t.Njj(a)}),t.k0s()()()(),t.j41(43,"div",7)(44,"mat-label",22),t.EFF(45),t.DNE(46,S,2,0,"span",16),t.k0s(),t.j41(47,"div",9)(48,"mat-form-field",10)(49,"input",23),t.mxI("ngModelChange",function(a){return t.eBV(r),t.DH7(e.objOrgData.phone,a)||(e.objOrgData.phone=a),t.Njj(a)}),t.bIt("keypress",function(a){return t.eBV(r),t.Njj(e.master.numberKeyPress(a))}),t.k0s()()()(),t.j41(50,"div",7)(51,"mat-label",24),t.EFF(52),t.DNE(53,H,2,0,"span",16),t.k0s(),t.j41(54,"div",9)(55,"mat-form-field",10)(56,"input",25),t.mxI("ngModelChange",function(a){return t.eBV(r),t.DH7(e.objOrgData.email,a)||(e.objOrgData.email=a),t.Njj(a)}),t.k0s()()()()()()(),t.j41(57,"div",26)(58,"button",27),t.bIt("click",function(){return t.eBV(r),t.Njj(e.closeCustomerModel("adhocCustomer"))}),t.EFF(59),t.k0s(),t.j41(60,"button",28),t.bIt("click",function(){return t.eBV(r),t.Njj(e.validateCustomer("adhocCustomer"))}),t.EFF(61),t.k0s()()()}2&i&&(t.R7$(2),t.Y8G("ngIf",!e.addWorkShop),t.R7$(),t.Y8G("ngIf",e.addWorkShop),t.R7$(6),t.Y8G("ngIf",!e.addWorkShop),t.R7$(),t.Y8G("ngIf",e.addWorkShop),t.R7$(3),t.R50("ngModel",e.objOrgData.companyName),t.R7$(3),t.JRh(e.master.datalist.Address1),t.R7$(5),t.R50("ngModel",e.objOrgData.address1),t.R7$(3),t.JRh(e.master.datalist.Address2),t.R7$(),t.Y8G("ngIf",e.isAdhocCustomerMandatoryFieldsEnabled),t.R7$(3),t.R50("ngModel",e.objOrgData.address2),t.Y8G("required",e.isAdhocCustomerMandatoryFieldsEnabled),t.R7$(3),t.JRh(e.master.datalist.CityTown),t.R7$(),t.Y8G("ngIf",e.isAdhocCustomerMandatoryFieldsEnabled||e.addWorkShop),t.R7$(3),t.R50("ngModel",e.objOrgData.cityTown),t.Y8G("required",e.isAdhocCustomerMandatoryFieldsEnabled||e.addWorkShop),t.R7$(3),t.JRh(e.master.datalist.PostCode),t.R7$(),t.Y8G("ngIf",e.isAdhocCustomerMandatoryFieldsEnabled||e.addWorkShop),t.R7$(3),t.R50("ngModel",e.objOrgData.postCode),t.Y8G("required",e.isAdhocCustomerMandatoryFieldsEnabled||e.addWorkShop),t.R7$(3),t.JRh(e.master.datalist.Phone),t.R7$(),t.Y8G("ngIf",e.isAdhocCustomerMandatoryFieldsEnabled||e.addWorkShop),t.R7$(3),t.R50("ngModel",e.objOrgData.phone),t.Y8G("required",e.isAdhocCustomerMandatoryFieldsEnabled||e.addWorkShop),t.R7$(3),t.SpI("",e.master.datalist.Email," "),t.R7$(),t.Y8G("ngIf",e.addWorkShop||e.isAdhocCustomerMandatoryFieldsEnabled),t.R7$(3),t.R50("ngModel",e.objOrgData.email),t.Y8G("required",e.addWorkShop||e.isAdhocCustomerMandatoryFieldsEnabled),t.R7$(3),t.JRh(e.master.datalist.Cancel),t.R7$(),t.Y8G("disabled",e.btnDisable),t.R7$(),t.JRh(e.master.datalist.Save))},dependencies:[E.bT,M.iV,b.Ky,b.aw,v.aL,D.DJ,D.sA,m.qT,m.me,m.BC,m.cb,m.YS,m.tU,m.vS,m.cV],styles:[".l-wt100[_ngcontent-%COMP%]{width:100px!important}.mat-raised-button[_ngcontent-%COMP%]:not([class*=mat-elevation-z]){box-shadow:0 0 #0003,0 0 2px #00000024,0 1px 5px #0000001f;margin-right:10px}@media screen and (max-width: 767px){.theme-model[_ngcontent-%COMP%]   .themeinputgrp[_ngcontent-%COMP%]   mat-label[_ngcontent-%COMP%]{width:auto!important;text-align:left}}@media screen and (max-width: 736px){.mob-column[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;width:100%;justify-items:flex-end!important;place-content:end!important}}"]})}}return s})()},6796:(O,g,n)=>{n.d(g,{R:()=>p});var t=n(82631),_=n(60177),d=n(54438);let p=(()=>{class u{static{this.\u0275fac=function(c){return new(c||u)}}static{this.\u0275mod=d.$C({type:u})}static{this.\u0275inj=d.G2t({imports:[_.MD,t.G]})}}return u})()}}]);

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.