1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8314],{8314:(Yo,q,h)=>{h.r(q),h.d(q,{CustomerViewPageModule:()=>qo});var f=h(6895),P=h(4006),_=h(12),S=h(4821),d=h(5861),b=h(8746),C=h(7414),x=h(262),J=h(7918),E=h(5041),O=h(5415),I=h(7579),y=h(9848),t=h(1571),L=h(958),M=h(529),N=h(4219),D=h(6111),B=h(3890);function F(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"img",11),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.qbHistory(o.ORDER_ID))}),t.qZA()}if(2&a){const n=t.oxw(3);t.Q6J("src",n.QB_ICON,t.LSH)}}function H(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"img",11),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.qbHistory(o.ORDER_ID))}),t.qZA()}if(2&a){const n=t.oxw(3);t.Q6J("src",n.WARNING_ICON,t.LSH)}}function V(a,r){if(1&a&&(t.TgZ(0,"ion-label",12),t._uU(1),t.qZA()),2&a){const n=t.oxw().index,e=t.oxw(2);t.Q6J("ngClass",e.orderstatuscolor(e.orderstatus[n])),t.xp6(1),t.hij(" ",e.orderstatus[n],"")}}function G(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"tr",4)(1,"td",5),t._uU(2),t.qZA(),t.TgZ(3,"td",5),t._uU(4),t.qZA(),t.TgZ(5,"td",5),t._uU(6),t.YNc(7,F,1,1,"img",6),t.YNc(8,H,1,1,"img",6),t.qZA(),t.TgZ(9,"td",5),t._uU(10),t.qZA(),t.TgZ(11,"td",5),t._uU(12),t.qZA(),t.TgZ(13,"td",5),t.YNc(14,V,2,2,"ion-label",7),t.qZA(),t.TgZ(15,"td",8)(16,"button",9),t.NdJ("click",function(o){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.actionPopUp(o,s,"customerorder",!1))}),t.TgZ(17,"ion-label"),t._uU(18,"Action"),t.qZA(),t._UZ(19,"ion-icon",10),t.qZA()()()}if(2&a){const n=r.$implicit,e=t.oxw(2);t.xp6(2),t.AsE("",n.FIRST_NAME," ",n.LAST_NAME,""),t.xp6(2),t.Oqu(n.SIDE_MARK),t.xp6(2),t.hij("",n.ORDER_SERIAL_NO," "),t.xp6(1),t.Q6J("ngIf","Y"==e.qbStatus&&("SUCCESS"==n.QB_STATUS||"VOID"==n.QB_STATUS)),t.xp6(1),t.Q6J("ngIf","Y"==e.qbStatus&&"ERROR"==n.QB_STATUS),t.xp6(2),t.Oqu(n.CREATE_TIME),t.xp6(2),t.hij(" ",n.UPDT_TIME,""),t.xp6(2),t.Q6J("ngIf",null!=e.orderstatus)}}function z(a,r){if(1&a&&(t.TgZ(0,"tbody"),t.YNc(1,G,20,9,"tr",3),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.orders)}}function j(a,r){1&a&&(t.TgZ(0,"tbody")(1,"tr")(2,"td",13),t._uU(3,"No Records Available"),t.qZA()()())}let K=(()=>{var a;class r{constructor(e,o,i,s,l,c,u,p){this.constant=e,this.http=o,this.globals=i,this.alertctrl=s,this.appcom=l,this.popctrl=c,this.loadctrl=u,this.modalctrl=p,this.dtOptionsorder={},this.dtTrigger=new I.x,this.orderstatus=[],this.QB_ICON="./assets/icon/quickbooks.png",this.WARNING_ICON="./assets/icon/qbIconError.png"}ngOnInit(){this.preloadIcons(),this.fetchOrderStatus=!0,this.datatabledata={username:this.constant.getUsername(),companyid:this.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:this.constant.platform,custid:this.custid};const e=this;this.dtOptionsorder={scrollCollapse:!0,pagingType:"full_numbers",pageLength:10,order:[3,"desc"],serverSide:!0,stateSave:!0,dom:"lfrtip",processing:!0,searchDelay:1e3,ajax:(o,i)=>{e.http.post(this.globals.url+"ctrl_order.php?run=displayOrderDB",Object.assign(o,this.datatabledata),{withCredentials:!0}).subscribe(s=>{if("logout"==s.status)this.message=s.message,this.showAlert(),this.appcom.clearValue();else{if(e.orders=s.data,this.ord=s.data,this.fetchOrderStatus)this.fetchOrderStatus=!1,this.ordersWorkflowStatus();else for(let l=0;l<this.orders.length;l++)for(let c=0;c<this.workflowstatuslist.length;c++)this.workflowstatuslist[c].ORDER_STATUS_CD==this.orders[l].ORDER_STATUS&&(this.orderstatus[l]=this.workflowstatuslist[c].ORDER_STATUS_DESC);i({recordsTotal:s.recordsTotal,recordsFiltered:s.recordsFiltered,data:[]})}}),(0,C.V)(this.constant.connectionTimeout),(0,x.K)(s=>{throw this.alert(this.constant.invalidResponse),"error in source. Details: "+s})},columns:[{data:"FIRST_NAME"},{data:"SIDE_MARK"},{data:"ORDER_SERIAL_NO"},{data:"CREATE_TIME"},{data:"UPDT_TIME"},{data:"ORDER_STATUS"}]},this.checkQbStatus()}showAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,buttons:[{text:"Ok"}]})).present()})()}alert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,backdropDismiss:!1,buttons:[{text:"Ok"}]})).present()})()}
1orderstatuscolor(e){return"Balance Due"==e?"redcolor":"blackcolor"}actionPopUp(e,o,i,s){var l=this;return(0,d.Z)(function*(){const c=yield l.popctrl.create({component:y.Z,componentProps:{page:i,data:o,event:e,repair:s},mode:"md",event:e,cssClass:"morepop"});yield c.present(),c.onDidDismiss().then(u=>{null!=u.data&&l.rerender()})})()}rerender(){this.datatableElement.dtInstance.then(e=>{e.ajax.reload()})}ngAfterViewInit(){}ordersWorkflowStatus(){var e=this;return(0,d.Z)(function*(){yield e.loadctrl.create({message:"Loading.."});let i={companyid:e.constant.getCompanyId(),deviceType:e.constant.platform};e.http.post(e.globals.url+"ctrl_order.php?run=workflowstatus",JSON.stringify(i),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(s=>{throw"error in source. Details: "+s})).subscribe(s=>{if(e.status=s.status,"success"==e.status){e.workflowstatuslist=s.message.orderstatus,e.orderstatus=[];for(let l=0;l<e.orders.length;l++)for(let c=0;c<e.workflowstatuslist.length;c++)e.workflowstatuslist[c].ORDER_STATUS_CD==e.orders[l].ORDER_STATUS&&(e.orderstatus[l]=e.workflowstatuslist[c].ORDER_STATUS_DESC)}else"failure"==e.status&&(e.workflowstatuslist=s.message)})})()}checkQbStatus(){let e={companyid:this.constant.getCompanyId(),deviceType:this.constant.platform};this.http.post(this.globals.url+"ctrl_order.php?run=checkQbStatus",JSON.stringify(e),{headers:this.globals.header,withCredentials:!0}).subscribe(o=>{const i=o.status;"success"==i?(this.qbStatus=o.message,console.log("qbStatus >> ",this.qbStatus)):"failure"==i?this.showalert(o.message):"logout"==i&&this.appcom.clearValue()})}preloadIcons(){[this.QB_ICON,this.WARNING_ICON].forEach(e=>{(new Image).src=e})}qbHistory(e){var o=this;return(0,d.Z)(function*(){yield(yield o.modalctrl.create({component:B.M,componentProps:{orderId:e,companyid:o.constant.getCompanyId()}})).present()})()}showalert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({message:e,buttons:[{text:"Ok"}]})).present()})()}}return(a=r).\u0275fac=function(e){return new(e||a)(t.Y36(N.s),t.Y36(M.eN),t.Y36(D.x),t.Y36(_.Br),t.Y36(E.y),t.Y36(_.Dh),t.Y36(_.HT),t.Y36(_.IN))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-orders-datatable"]],viewQuery:function(e,o){if(1&e&&t.Gf(O.G,5),2&e){let i;t.iGM(i=t.CRH())&&(o.datatableElement=i.first)}},inputs:{custid:"custid"},decls:19,vars:3,consts:[["id","your-datatable-idao","datatable","",1,"row-border","hover","tablewidth",3,"dtOptions"],[1,"tableheader"],[4,"ngIf"],["style","text-align:center",4,"ngFor","ngForOf"],[2,"text-align","center"],[1,"tdwidth","tdborderleft"],["class","customerimg",3,"src","click",4,"ngIf"],[3,"ngClass",4,"ngIf"],[1,"tdwidth","tdborderleft","tdborderright","mobileborder"],[1,"actionbtn","font16",3,"click"],["mode","ios","name","chevron-down-outline",2,"height","10px"],[1,"customerimg",3,"src","click"],[3,"ngClass"],["colspan","7",1,"no-data-available",2,"text-align","center"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"thead",1)(2,"tr")(3,"th"),t._uU(4,"Name"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"Side Mark"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Order No"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"Created Time"),t.qZA(),t.TgZ(11,"th"),t._uU(12,"Last Updated Time"),t.qZA(),t.TgZ(13,"th"),t._uU(14,"Status"),t.qZA(),t.TgZ(15,"th"),t._uU(16,"Action"),t.qZA()()(),t.YNc(17,z,2,1,"tbody",2),t.YNc(18,j,4,0,"tbody",2),t.qZA()),2&e&&(t.Q6J("dtOptions",o.dtOptionsorder),t.xp6(17),t.Q6J("ngIf",0!=(null==o.orders?null:o.orders.length)),t.xp6(1),t.Q6J("ngIf",0==(null==o.orders?null:o.orders.length)))},dependencies:[f.mk,f.sg,f.O5,_.gu,_.Q$,O.G],styles:[".customerimg[_ngcontent-%COMP%]{width:20px;height:20px;margin-right:15px;vertical-align:middle;display:inline-block!important}",".card[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;padding:20px!important;box-shadow:none!important;width:1000px}.lowercase[_ngcontent-%COMP%]{text-transform:capitalize}.btn[_ngcontent-%COMP%]{--border-radius:0px !important;font-size:16px!important;height:43px!important}ion-input[_ngcontent-%COMP%], ion-select[_ngcontent-%COMP%]{height:42px;color:var(--ion-color-dark);border:1px solid var(--ion-color-dark);
1display:flex;font-size:16px!important}.txtarea[_ngcontent-%COMP%]{border:1px solid black!important;color:#000;font-size:15px}.txt[_ngcontent-%COMP%]{color:#205493;font-weight:700;font-size:large;font-family:Merriweather}.table[_ngcontent-%COMP%]{width:100%;border-width:1px 1px 1px 1px;border-style:solid;border-color:#000}.scroll[_ngcontent-%COMP%]{height:250px;width:100%;overflow-y:scroll}.tr[_ngcontent-%COMP%], .td[_ngcontent-%COMP%]{padding:10px;color:#000;font-size:15px}.tdwidth[_ngcontent-%COMP%]{width:23%!important}.listcolor[_ngcontent-%COMP%]{background:var(--ion-color-white)!important}.label[_ngcontent-%COMP%]{font-size:16px!important;color:var(--ion-color-dark)!important}.itemcolor[_ngcontent-%COMP%]{--background:var(--ion-color-white) !important;display:flex}.line[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-dark)!important}ion-radio[_ngcontent-%COMP%]{margin-right:5px!important}.radiobtn[_ngcontent-%COMP%]{margin-right:10px!important;display:inline!important;font-size:16px!important;padding-top:5px!important}.segment[_ngcontent-%COMP%]{--color:#000000;background:lightgray;--indicator-color-checked: 0;--background-checked:rgb(0, 113, 188);--color-checked:rgb(255, 255, 255);--background-hover:none;overflow:auto}.segmentbt[_ngcontent-%COMP%]{box-shadow:-7px 0 #eff3f6}.show[_ngcontent-%COMP%]{display:block}.hide[_ngcontent-%COMP%]{display:none}.border[_ngcontent-%COMP%]{border:1px solid var(--ion-color-dark)!important;color:var(--ion-color-dark)!important}.actionbtn[_ngcontent-%COMP%]{border:2px solid var(--ion-color-primary)!important;background-color:var(--ion-color-white)!important;width:100px!important;height:38px!important;color:var(--ion-color-primary)!important;font-weight:700!important;padding:3px!important}.selectcss[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:var(--ion-color-white)!important}td[_ngcontent-%COMP%]{width:16.6%!important}@media only screen and (max-width: 500px){.tdwidth[_ngcontent-%COMP%]{width:100%!important}th[_ngcontent-%COMP%]{width:83%!important;border:none!important}}@media only screen and (max-width: 420px){.segmentmobileview[_ngcontent-%COMP%]{display:table}}.link[_ngcontent-%COMP%]{cursor:pointer;color:#0071bc}.link[_ngcontent-%COMP%]:hover{cursor:pointer;color:#0071bc;text-decoration:underline}.redcolor[_ngcontent-%COMP%]{color:red}.blackcolor[_ngcontent-%COMP%]{color:#000}.grayout[_ngcontent-%COMP%]{background:lightgray}.selectcss1[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:lightgray!important}.colborder[_ngcontent-%COMP%]{border:3px solid lightgray;margin-right:10px;margin-top:15px}.cancelicon[_ngcontent-%COMP%]{position:absolute;margin-right:2px;margin-left:91%;margin-top:10px;z-index:100;font-size:25px;cursor:pointer}.editsize[_ngcontent-%COMP%]{width:40px;height:25px;color:#0071bc;cursor:pointer}.alert[_ngcontent-%COMP%]{font-size:24px;color:#0071bc;padding:5px}.instructionlabel[_ngcontent-%COMP%]{padding:5px;color:#098dd2}.star[_ngcontent-%COMP%]{font-stretch:extra-condensed;font-size:20px}"]}),r})();function $(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"div",4)(1,"ion-label"),t._uU(2),t.TgZ(3,"ion-button",5),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.poMultiPayment())}),t._uU(4,"Pay"),t.qZA()()()}if(2&a){const n=t.oxw();t.xp6(2),t.hij(" Selected POs Total: $ ",n.totalAmtOfPO," ")}}function W(a,r){1&a&&(t.TgZ(0,"th"),t._uU(1,"Order No"),t.qZA())}function X(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"td",10)(1,"div",16),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.customervieworder(o))}),t._uU(2),t.qZA()()}if(2&a){const n=t.oxw().$implicit;t.xp6(2),t.Oqu(n.ORDER_SERIAL_NO)}}function tt(a,r){if(1&a&&(t.TgZ(0,"ion-label",17),t._uU(1),t.qZA()),2&a){const n=t.oxw().$implicit,e=t.oxw(2);
1t.Q6J("ngClass",e.postatuscolor(n.PO_STATUS_DESC)),t.xp6(1),t.hij(" ",n.PO_STATUS_DESC,"")}}const et=function(a,r){return{unselectable:a,selectable:r}};function ot(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"tr",7)(1,"td",8)(2,"ion-checkbox",9),t.NdJ("ngModelChange",function(){const o=t.CHM(n),i=o.$implicit,s=o.index,l=t.oxw(2);return t.KtG(l.selectRow(i,s))})("ngModelChange",function(o){const s=t.CHM(n).index,l=t.oxw(2);return t.KtG(l.selectedRowCheckbox[s]=o)}),t.qZA()(),t.TgZ(3,"td",10),t._uU(4),t.qZA(),t.TgZ(5,"td",10),t._uU(6),t.qZA(),t.YNc(7,X,3,1,"td",11),t.TgZ(8,"td",10),t._uU(9),t.qZA(),t.TgZ(10,"td",10),t._uU(11),t.qZA(),t.TgZ(12,"td",10),t._uU(13),t.qZA(),t.TgZ(14,"td",10),t.YNc(15,tt,2,2,"ion-label",12),t._uU(16),t.qZA(),t.TgZ(17,"td",10),t._uU(18),t.qZA(),t.TgZ(19,"td",10),t._uU(20),t.qZA(),t.TgZ(21,"td",10),t._uU(22),t.qZA(),t.TgZ(23,"td",10),t._uU(24),t.qZA(),t.TgZ(25,"td",13)(26,"button",14),t.NdJ("click",function(o){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.actionPopUp(o,s,"customerpo",!1))}),t.TgZ(27,"ion-label"),t._uU(28,"Action"),t.qZA(),t._UZ(29,"ion-icon",15),t.qZA()()()}if(2&a){const n=r.$implicit,e=r.index,o=t.oxw(2);t.MGl("id","rowid-",e,""),t.xp6(1),t.Q6J("ngClass",t.WLB(17,et,"Y"!=n.ENTERPRISE_FLG||"Y"!=n.PAYMENT_FLAG||!o.isPOPaymentStatus(n)||n.COST_VALUE-n.PAID_TO_MFG==0,"Y"==n.ENTERPRISE_FLG&&"Y"==n.PAYMENT_FLAG&&o.isPOPaymentStatus(n)&&n.COST_VALUE-n.PAID_TO_MFG!=0)),t.xp6(1),t.Q6J("ngModel",o.selectedRowCheckbox[e])("disabled","Y"!=n.ENTERPRISE_FLG||"Y"!=n.PAYMENT_FLAG||!o.isPOPaymentStatus(n)||n.COST_VALUE-n.PAID_TO_MFG==0),t.xp6(2),t.AsE("",n.FIRST_NAME," ",n.LAST_NAME,""),t.xp6(2),t.Oqu("S"==n.PO_SIDEMARK_FLG?n.SIDE_MARK:n.FIRST_NAME+" "+n.LAST_NAME),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(2),t.hij(" ",n.UPDT_TIME,""),t.xp6(2),t.Oqu(n.PO_SERIAL_NO),t.xp6(2),t.hij(" ",n.MFR_NAME,""),t.xp6(2),t.Q6J("ngIf",null!=n.PO_STATUS_DESC),t.xp6(1),t.hij("",""," "),t.xp6(2),t.Oqu(n.COST_VALUE),t.xp6(2),t.Oqu(n.PAID_TO_MFG),t.xp6(2),t.Oqu((n.COST_VALUE-n.PAID_TO_MFG).toFixed(2)),t.xp6(2),t.Oqu(n.PAYMENT_DUE_DATE)}}function nt(a,r){if(1&a&&(t.TgZ(0,"tbody"),t.YNc(1,ot,30,20,"tr",6),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.pos)}}function at(a,r){1&a&&(t.TgZ(0,"tbody")(1,"tr")(2,"td",18),t._uU(3,"No Records Available"),t.qZA()()())}let it=(()=>{var a;class r{constructor(e,o,i,s,l,c,u,p){this.http=e,this.globals=o,this.appcom=i,this.alertctrl=s,this.constant=l,this.navctrl=c,this.popctrl=u,this.loadctrl=p,this.dtOptionspo={},this.dtTrigger=new I.x,this.totalAmtOfPO=0,this.dealerPortalrestflg=localStorage.getItem("dealerPortalrestflg")}ngOnInit(){this.fetchPoStatus=!0,this.datatabledata={username:this.constant.getUsername(),companyid:this.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:this.constant.platform,custid:this.custid},this.selectedRowCheckbox=[],this.selectedRow=[];const e=this;
1this.dtOptionspo={scrollCollapse:!0,pagingType:"full_numbers",pageLength:10,order:[4,"desc"],serverSide:!0,stateSave:!0,dom:"lfrtip",processing:!0,searchDelay:1e3,ajax:(o,i)=>{e.http.post(this.globals.url+"ctrl_Pos.php?run=displayPOrderDB",Object.assign(o,this.datatabledata),{withCredentials:!0}).subscribe(s=>{if("logout"==s.status)this.message=s.message,this.showAlert(),this.appcom.clearValue();else{e.pos=s.data,this.selectedRow=[],this.totalAmtOfPO=0;for(let l=0;l<this.pos.length;l++)this.selectedRowCheckbox[l]=!1;if(this.fetchPoStatus)this.fetchPoStatus=!1,this.ordersWorkflowStatus();else for(let l=0;l<this.pos.length;l++)for(let c=0;c<this.workflowstatuslist.length;c++)this.workflowstatuslist[c].ORDER_STATUS_CD==this.pos[l].ORDER_STATUS&&(this.postatus[l]=this.workflowstatuslist[c].ORDER_STATUS_DESC);i({recordsTotal:s.recordsTotal,recordsFiltered:s.recordsFiltered,data:[]})}}),(0,C.V)(this.constant.connectionTimeout),(0,x.K)(s=>{throw this.alert(this.constant.invalidResponse),"error in source. Details: "+s})},columns:[{data:"CHECK_BOX"},{data:"FIRST_NAME"},{data:"SIDE_MARK"},{data:"ORDER_SERIAL_NO"},{data:"UPDT_TIME"},{data:"PO_SERIAL_NO"},{data:"MFR_NAME"},{data:"PO_STATUS"},{data:"COST_VALUE"},{data:"PAID_TO_MFG"},{data:"REMAINING_AMT"},{data:"PAYMENT_DUE_DATE"}],columnDefs:[{targets:[0],orderable:!1},{targets:[10],orderable:!1}]}}showAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,buttons:[{text:"Ok"}]})).present()})()}alert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,backdropDismiss:!1,buttons:[{text:"Ok"}]})).present()})()}customervieworder(e){this.orderid=e.ORDER_ID,localStorage.setItem("orderview",JSON.stringify({data:e,useroption:"view",page:this.page})),this.navctrl.navigateRoot("/orderview")}actionPopUp(e,o,i,s){var l=this;return(0,d.Z)(function*(){const c=yield l.popctrl.create({component:y.Z,componentProps:{page:i,data:o,event:e,repair:s},mode:"md",event:e,cssClass:"morepop"});yield c.present(),c.onDidDismiss().then(u=>{null!=u.data&&l.rerender()})})()}rerender(){this.datatableElement.dtInstance.then(e=>{e.ajax.reload()})}ordersWorkflowStatus(){var e=this;return(0,d.Z)(function*(){yield e.loadctrl.create({message:"Loading.."});let i={companyid:e.constant.getCompanyId(),deviceType:e.constant.platform};e.http.post(e.globals.url+"ctrl_order.php?run=workflowstatus",JSON.stringify(i),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(s=>{throw"error in source. Details: "+s})).subscribe(s=>{if(e.status=s.status,"success"==e.status){e.workflowstatuslist=s.message.orderstatus,e.postatus=[];for(let l=0;l<e.pos.length;l++)for(let c=0;c<e.workflowstatuslist.length;c++)e.workflowstatuslist[c].ORDER_STATUS_CD==e.pos[l].ORDER_STATUS&&(e.postatus[l]=e.workflowstatuslist[c].ORDER_STATUS_DESC)}else"failure"==e.status&&(e.workflowstatuslist=s.message)})})()}ngAfterViewInit(){}
1postatuscolor(e){return"PO Sent"==e?"redcolor":"blackcolor"}selectRow(e,o){var i=this;return(0,d.Z)(function*(){if(console.log(i.selectedRow,"selected Row--"),typeof i.selectedRow[o]>"u"){for(let s of i.selectedRow)if(s&&s&&s.MANUFACTURER_ID!=e.MANUFACTURER_ID)return i.alert("Manufacturer should be smiliar."),void setTimeout(()=>{i.selectedRowCheckbox[o]=!1},0);i.selectedRow[o]=e,i.selectedRowCheckbox[o]=!0,setTimeout(()=>{document.getElementById("rowid-"+o).style.background="#BEDDF2",i.totalAmtOfPO=0;for(let s=0;s<i.selectedRow.length;s++)null!=i.selectedRow[s]&&(i.totalAmtOfPO=Number(Number(i.totalAmtOfPO)+Number(Number(i.selectedRow[s].COST_VALUE)-Number(i.selectedRow[s].PAID_TO_MFG))).toFixed(2))},200)}else i.selectedRowCheckbox[o]=!1,delete i.selectedRow[o],console.log("Removed Item:",i.selectedRow[o]),setTimeout(()=>{document.getElementById("rowid-"+o).style.background="white",i.totalAmtOfPO=0;for(let s=0;s<i.selectedRow.length;s++)null!=i.selectedRow[s]&&(i.totalAmtOfPO=Number(Number(i.totalAmtOfPO)+Number(Number(i.selectedRow[s].COST_VALUE)-Number(i.selectedRow[s].PAID_TO_MFG))).toFixed(2))},200)})()}isPOPaymentStatus(e){return e.PAYMENT_ALLOW_PO_STATUS.split(",").includes(e.PO_STATUS)}poMultiPayment(){var e=this;return(0,d.Z)(function*(){e.selectedRow=e.selectedRow.filter(i=>null!=i),console.log(e.selectedRow,"slected row--"),localStorage.setItem("poPayment",JSON.stringify({selectedPoDetails:e.selectedRow,poCost:e.totalAmtOfPO,page:"customerPoList"})),e.navctrl.navigateRoot("/po-paymentpage")})()}}return(a=r).\u0275fac=function(e){return new(e||a)(t.Y36(M.eN),t.Y36(D.x),t.Y36(E.y),t.Y36(_.Br),t.Y36(N.s),t.Y36(L.SH),t.Y36(_.Dh),t.Y36(_.HT))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-po-datatable"]],viewQuery:function(e,o){if(1&e&&t.Gf(O.G,5),2&e){let i;t.iGM(i=t.CRH())&&(o.datatableElement=i.first)}},inputs:{custid:"custid",page:"page"},decls:30,vars:5,consts:[["class","totalPoAmtLabel",4,"ngIf"],["id","your-datatable-idapo","datatable","",1,"row-border","hover","tablewidth",3,"dtOptions"],[1,"tableheader"],[4,"ngIf"],[1,"totalPoAmtLabel"],[2,"vertical-align","middle",3,"click"],["style","text-align:center",3,"id",4,"ngFor","ngForOf"],[2,"text-align","center",3,"id"],[1,"tdborderleft",3,"ngClass"],["aria-label","",2,"vertical-align","top",3,"ngModel","disabled","ngModelChange"],[1,"tdwidth","tdborderleft"],["class","tdwidth tdborderleft",4,"ngIf"],[3,"ngClass",4,"ngIf"],[1,"tdwidth","tdborderleft","tdborderright","mobileborder"],[1,"actionbtn","font16",3,"click"],["mode","ios","name","chevron-down-outline",2,"height","10px"],[1,"link",3,"click"],[3,"ngClass"],["colspan","8",1,"n
1o-data-available",2,"text-align","center"]],template:function(e,o){1&e&&(t.YNc(0,$,5,1,"div",0),t.TgZ(1,"table",1)(2,"thead",2)(3,"tr"),t._UZ(4,"th"),t.TgZ(5,"th"),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Side Mark"),t.qZA(),t.YNc(9,W,2,0,"th",3),t.TgZ(10,"th"),t._uU(11,"Last Updated Time"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Purchase Order No"),t.qZA(),t.TgZ(14,"th"),t._uU(15,"Manufacturer Name"),t.qZA(),t.TgZ(16,"th"),t._uU(17,"Status"),t.qZA(),t.TgZ(18,"th"),t._uU(19,"PO Cost"),t.qZA(),t.TgZ(20,"th"),t._uU(21,"Paid Amount"),t.qZA(),t.TgZ(22,"th"),t._uU(23,"Due Amount"),t.qZA(),t.TgZ(24,"th"),t._uU(25,"Payment Due Date"),t.qZA(),t.TgZ(26,"th"),t._uU(27,"Action"),t.qZA()()(),t.YNc(28,nt,2,1,"tbody",3),t.YNc(29,at,4,0,"tbody",3),t.qZA()),2&e&&(t.Q6J("ngIf",0!=o.totalAmtOfPO),t.xp6(1),t.Q6J("dtOptions",o.dtOptionspo),t.xp6(8),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(19),t.Q6J("ngIf",0!=(null==o.pos?null:o.pos.length)),t.xp6(1),t.Q6J("ngIf",0==(null==o.pos?null:o.pos.length)))},dependencies:[f.mk,f.sg,f.O5,P.JJ,P.On,_.YG,_.nz,_.gu,_.Q$,_.w,O.G],styles:[".redcolor[_ngcontent-%COMP%]{color:red}.blackcolor[_ngcontent-%COMP%]{color:#000}.unselectable[_ngcontent-%COMP%]{background-color:#d3d3d3;cursor:not-allowed}.selectable[_ngcontent-%COMP%]{cursor:pointer}@media only screen and (min-width: 768px) and (max-width: 1099px){.totalPoAmtLabel[_ngcontent-%COMP%]{text-align:center;color:#0071bc;font-weight:700;font-size:16px}}@media only screen and (min-width: 1100px){.totalPoAmtLabel[_ngcontent-%COMP%]{text-align:end;padding-right:15%;color:#0071bc;font-weight:700;font-size:16px}}@media only screen and (max-width: 767px){.totalPoAmtLabel[_ngcontent-%COMP%]{color:#0071bc;font-weight:700;font-size:16px;text-align:center}}",".card[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;padding:20px!important;box-shadow:none!important;width:1000px}.lowercase[_ngcontent-%COMP%]{text-transform:capitalize}.btn[_ngcontent-%COMP%]{--border-radius:0px !important;font-size:16px!important;height:43px!important}ion-input[_ngcontent-%COMP%], ion-select[_ngcontent-%COMP%]{height:42px;color:var(--ion-color-dark);border:1px solid var(--ion-color-dark);display:flex;font-size:16px!important}.txtarea[_ngcontent-%COMP%]{border:1px solid black!important;color:#000;font-size:15px}.txt[_ngcontent-%COMP%]{color:#205493;font-weight:700;font-size:large;font-family:Merriweather}.table[_ngcontent-%COMP%]{width:100%;border-width:1px 1px 1px 1px;border-style:solid;border-color:#000}.scroll[_ngcontent-%COMP%]{height:250px;width:100%;overflow-y:scroll}.tr[_ngcontent-%COMP%], .td[_ngcontent-%COMP%]{padding:10px;color:#000;font-size:15px}.tdwidth[_ngcontent-%COMP%]{width:23%!important}.listcolor[_ngcontent-%COMP%]{background:var(--ion-color-white)!important}.label[_ngcontent-%COMP%]{font-size:16px!important;color:var(--ion-color-dark)!important}.itemcolor[_ngcontent-%COMP%]{--background:var(--ion-color-white) !important;display:flex}.line[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-dark)!important}ion-radio[_ngcontent-%COMP%]{margin-right:5px!important}.radiobtn[_ngcontent-%COMP%]{margin-right:10px!important;display:inline!important;font-size:16px!important;padding-top:5px!important}.segment[_ngcontent-%COMP%]{--color:#000000;background:lightgray;--indicator-color-checked: 0;--background-checked:rgb(0, 113, 188);--color-checked:rgb(255, 255, 255);--background-hover:none;overflow:auto}.segmentbt[_ngcontent-%COMP%]{box-shadow:-7px 0 #eff3f6}.show[_ngcontent-%COMP%]{display:block}.hide[_ngcontent-%COMP%]{display:none}.border[_ngcontent-%COMP%]{border:1px solid var(--ion-color-dark)!important;color:var(--ion-color-dark)!important}.actionbtn[_ngcontent-%COMP%]{border:2px solid var(--ion-color-primary)!important;background-color:var(--ion-color-white)!important;width:100px!important;height:38px!important;color:var(--ion-color-primary)!important;font-weight:700!important;padding:3px!important}.selectcss[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:var(--ion-color-white)!important}td[_ngcontent-%COMP%]{width:16.6%!important}@media only screen and (max-width: 500px){.tdwidth[_ngcontent-%COMP%]{width:100%!important}th[_ngcontent-%COMP%]{width:83%!important;border:none!important}}@media only screen and (max-width: 420px){.segmentmobileview[_ngcontent-%COMP%]{display:table}}.link[_ngcontent-%COMP%]{cursor:pointer;color:#0071bc}.link[_ngcontent-%COMP%]:hover{cursor:pointer;color:#0071bc;text-decoration:underline}.redcolor[_ngcontent-%COMP%]{color:red}.blackcolor[_ngcontent-%COMP%]{color:#000}.grayout[_ngcontent-%COMP%]{background:lightgray}.selectcss1[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:lightgray!important}.colborder[_ngcontent-%COMP%]{border:3px solid lightgray;margin-right:10px;margin-top:15px}.cancelicon[_ngcontent-%COMP%]{position:absolute;margin-right:2px;margin-left:91%;margin-top:10px;z-index:100;font-size:25px;cursor:pointer}.editsize[_ngcontent-%COMP%]{width:40px;height:25px;color:#0071bc;cursor:pointer}.alert[_ngcontent-%COMP%]{font-size:24px;color:#0071bc;padding:5px}.instructionlabel[_ngcontent-%COMP%]{padding:5px;color:#098dd2}.star[_ngcontent-%COMP%]{font-stretch:extra-condensed;font-size:20px}"]}),r})();function st(a,r){if(1&a&&(t.TgZ(0,"ion-label",10),t._uU(1),t.qZA()),2&a){const n=t.oxw().index,e=t.oxw(2);
1t.Q6J("ngClass",e.repairstatuscolor(e.repairstatus[n])),t.xp6(1),t.hij(" ",e.repairstatus[n],"")}}function rt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"tr",4)(1,"td",5),t._uU(2),t.qZA(),t.TgZ(3,"td",5),t._uU(4),t.qZA(),t.TgZ(5,"td",5),t._uU(6),t.qZA(),t.TgZ(7,"td",5),t._uU(8),t.qZA(),t.TgZ(9,"td",5),t.YNc(10,st,2,2,"ion-label",6),t._uU(11),t.qZA(),t.TgZ(12,"td",7)(13,"button",8),t.NdJ("click",function(o){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.actionPopUp(o,s,"customerrepair",!0))}),t.TgZ(14,"ion-label"),t._uU(15,"Action"),t.qZA(),t._UZ(16,"ion-icon",9),t.qZA()()()}if(2&a){const n=r.$implicit,e=t.oxw(2);t.xp6(2),t.AsE("",n.FIRST_NAME," ",n.LAST_NAME,""),t.xp6(2),t.Oqu(n.SIDE_MARK),t.xp6(2),t.Oqu(n.ORDER_SERIAL_NO),t.xp6(2),t.hij(" ",n.UPDT_TIME,""),t.xp6(2),t.Q6J("ngIf",null!=e.repairstatus),t.xp6(1),t.hij("",""," ")}}function lt(a,r){if(1&a&&(t.TgZ(0,"tbody"),t.YNc(1,rt,17,7,"tr",3),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.repairs)}}function ct(a,r){1&a&&(t.TgZ(0,"tbody")(1,"tr")(2,"td",11),t._uU(3,"No Records Available"),t.qZA()()())}let dt=(()=>{var a;class r{constructor(e,o,i,s,l,c,u){this.http=e,this.globals=o,this.constant=i,this.alertctrl=s,this.appcom=l,this.loadctrl=c,this.popctrl=u,this.dtOptionsrepair={},this.dtTrigger=new I.x}ngOnInit(){this.fetchRepairStatus=!0;const e=this;this.datatabledata={username:this.constant.getUsername(),companyid:this.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:this.constant.platform,custid:this.custid},this.dtOptionsrepair={scrollCollapse:!0,pagingType:"full_numbers",pageLength:10,order:[3,"desc"],serverSide:!0,stateSave:!0,dom:"lfrtip",processing:!0,searchDelay:1e3,ajax:(o,i)=>{e.http.post(this.globals.url+"ctrl_repair.php?run=displayrepairDB",Object.assign(o,this.datatabledata),{withCredentials:!0}).subscribe(s=>{if("logout"==s.status)this.message=s.message,this.showAlert(),this.appcom.clearValue();else{if(e.repairs=s.data,this.fetchRepairStatus)this.fetchRepairStatus=!1,this.repairworkflowstatus();else for(let l=0;l<this.repairs.length;l++)for(let c=0;c<this.workflowstatuslist.length;c++)this.workflowstatuslist[c].ORDER_STATUS_CD==this.repairs[l].ORDER_STATUS&&(this.repairstatus[l]=this.workflowstatuslist[c].ORDER_STATUS_DESC);i({recordsTotal:s.recordsTotal,recordsFiltered:s.recordsFiltered,data:[]})}}),(0,C.V)(this.constant.connectionTimeout),(0,x.K)(s=>{throw this.alert(this.constant.invalidResponse),"error in source. Details: "+s})},columns:[{data:"FIRST_NAME"},{data:"SIDE_MARK"},{data:"ORDER_SERIAL_NO"},{data:"UPDT_TIME"},{data:"ORDER_STATUS"}]}}showAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,buttons:[{text:"Ok"}]})).present()})()}alert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,backdropDismiss:!1,buttons:[{text:"Ok"}]})).present()})()}repairworkflowstatus(){var e=this;return(0,d.Z)(function*(){yield e.loadctrl.create({message:"Loading.."});let i={companyid:e.constant.getCompanyId(),deviceType:e.constant.platform};e.http.post(e.globals.url+"ctrl_order.php?run=workflowstatus",JSON.stringify(i),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(s=>{throw"error in source. Details: "+s})).subscribe(s=>{if(e.status=s.status,"success"==e.status){e.workflowstatuslist=s.message.orderstatus,e.repairstatus=[];for(let l=0;l<e.repairs.length;l++)for(let c=0;c<e.workflowstatuslist.length;c++)e.workflowstatuslist[c].ORDER_STATUS_CD==e.repairs[l].ORDER_STATUS&&(e.repairstatus[l]=e.workflowstatuslist[c].ORDER_STATUS_DESC)}else"failure"==e.status&&(e.workflowstatuslist=s.message)})})()}repairstatuscolor(e){return"Balance Due"==e?"redcolor":"blackcolor"}actionPopUp(e,o,i,s){var l=this;return(0,d.Z)(function*(){const c=yield l.popctrl.create({component:y.Z,componentProps:{page:i,data:o,event:e,repair:s},mode:"md",event:e,cssClass:"morepop"});yield c.present(),c.onDidDismiss().then(u=>{null!=u.data&&l.rerender()})})()}rerender(){this.datatableElement.dtInstance.then(e=>{e.ajax.reload()})}ngAfterViewInit(){}}return(a=r).\u0275fac=function(e){return new(e||a)(t.Y36(M.eN),t.Y36(D.x),t.Y36(N.s),t.Y36(_.Br),t.Y36(E.y),t.Y36(_.HT),t.Y36(_.Dh))}
1,a.\u0275cmp=t.Xpm({type:a,selectors:[["app-repair-datatable"]],viewQuery:function(e,o){if(1&e&&t.Gf(O.G,5),2&e){let i;t.iGM(i=t.CRH())&&(o.datatableElement=i.first)}},inputs:{custid:"custid"},decls:17,vars:3,consts:[["id","your-datatable-idar","datatable","",1,"row-border","hover","tablewidth",3,"dtOptions"],[1,"tableheader"],[4,"ngIf"],["style","text-align:center",4,"ngFor","ngForOf"],[2,"text-align","center"],[1,"tdwidth","tdborderleft"],[3,"ngClass",4,"ngIf"],[1,"tdwidth","tdborderleft","tdborderright","mobileborder"],[1,"actionbtn","font16",3,"click"],["mode","ios","name","chevron-down-outline",2,"height","10px"],[3,"ngClass"],["colspan","6",1,"no-data-available",2,"text-align","center"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"thead",1)(2,"tr")(3,"th"),t._uU(4,"Name"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"Side Mark"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Order No"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"Last Updated Time"),t.qZA(),t.TgZ(11,"th"),t._uU(12,"Status"),t.qZA(),t.TgZ(13,"th"),t._uU(14,"Action"),t.qZA()()(),t.YNc(15,lt,2,1,"tbody",2),t.YNc(16,ct,4,0,"tbody",2),t.qZA()),2&e&&(t.Q6J("dtOptions",o.dtOptionsrepair),t.xp6(15),t.Q6J("ngIf",0!=(null==o.repairs?null:o.repairs.length)),t.xp6(1),t.Q6J("ngIf",0==(null==o.repairs?null:o.repairs.length)))},dependencies:[f.mk,f.sg,f.O5,_.gu,_.Q$,O.G],styles:[".card[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;padding:20px!important;box-shadow:none!important;width:1000px}.lowercase[_ngcontent-%COMP%]{text-transform:capitalize}.btn[_ngcontent-%COMP%]{--border-radius:0px !important;font-size:16px!important;height:43px!important}ion-input[_ngcontent-%COMP%], ion-select[_ngcontent-%COMP%]{height:42px;color:var(--ion-color-dark);border:1px solid var(--ion-color-dark);display:flex;font-size:16px!important}.txtarea[_ngcontent-%COMP%]{border:1px solid black!important;color:#000;font-size:15px}.txt[_ngcontent-%COMP%]{color:#205493;font-weight:700;font-size:large;font-family:Merriweather}.table[_ngcontent-%COMP%]{width:100%;border-width:1px 1px 1px 1px;border-style:solid;border-color:#000}.scroll[_ngcontent-%COMP%]{height:250px;width:100%;overflow-y:scroll}.tr[_ngcontent-%COMP%], .td[_ngcontent-%COMP%]{padding:10px;color:#000;font-size:15px}.tdwidth[_ngcontent-%COMP%]{width:23%!important}.listcolor[_ngcontent-%COMP%]{background:var(--ion-color-white)!important}.label[_ngcontent-%COMP%]{font-size:16px!important;color:var(--ion-color-dark)!important}.itemcolor[_ngcontent-%COMP%]{--background:var(--ion-color-white) !important;display:flex}.line[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-dark)!important}ion-radio[_ngcontent-%COMP%]{margin-right:5px!important}.radiobtn[_ngcontent-%COMP%]{margin-right:10px!important;display:inline!important;font-size:16px!important;padding-top:5px!important}.segment[_ngcontent-%COMP%]{--color:#000000;background:lightgray;--indicator-color-checked: 0;--background-checked:rgb(0, 113, 188);--color-checked:rgb(255, 255, 255);--background-hover:none;overflow:auto}.segmentbt[_ngcontent-%COMP%]{box-shadow:-7px 0 #eff3f6}.show[_ngcontent-%COMP%]{display:block}.hide[_ngcontent-%COMP%]{display:none}.border[_ngcontent-%COMP%]{border:1px solid var(--ion-color-dark)!important;color:var(--ion-color-dark)!important}.actionbtn[_ngcontent-%COMP%]{border:2px solid var(--ion-color-primary)!important;background-color:var(--ion-color-white)!important;width:100px!important;height:38px!important;color:var(--ion-color-primary)!important;font-weight:700!important;padding:3px!important}.selectcss[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:var(--ion-color-white)!important}td[_ngcontent-%COMP%]{width:16.6%!important}@media only screen and (max-width: 500px){.tdwidth[_ngcontent-%COMP%]{width:100%!important}th[_ngcontent-%COMP%]{width:83%!important;border:none!important}}@media only screen and (max-width: 420px){.segmentmobileview[_ngcontent-%COMP%]{display:table}}.link[_ngcontent-%COMP%]{cursor:pointer;color:#0071bc}.link[_ngcontent-%COMP%]:hover{cursor:pointer;color:#0071bc;text-decoration:underline}.redcolor[_ngcontent-%COMP%]{color:red}.blackcolor[_ngcontent-%COMP%]{color:#000}.grayout[_ngcontent-%COMP%]{background:lightgray}.selectcss1[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:lightgray!important}.colborder[_ngcontent-%COMP%]{border:3px solid lightgray;margin-right:10px;margin-top:15px}.cancelicon[_ngcontent-%COMP%]{position:absolute;margin-right:2px;margin-left:91%;margin-top:10px;z-index:100;font-size:25px;cursor:pointer}.editsize[_ngcontent-%COMP%]{width:40px;height:25px;color:#0071bc;cursor:pointer}.alert[_ngcontent-%COMP%]{font-size:24px;color:#0071bc;padding:5px}.instructionlabel[_ngcontent-%COMP%]{padding:5px;color:#098dd2}.star[_ngcontent-%COMP%]{font-stretch:extra-condensed;font-size:20px}"]}),r})();function _t(a,r){if(1&a&&(t.TgZ(0,"ion-label",10),t._uU(1),t.qZA()),2&a){const n=t.oxw().index,e=t.oxw(2);
1t.Q6J("ngClass",e.quotestatuscolor(e.quotestatus[n])),t.xp6(1),t.hij(" ",e.quotestatus[n],"")}}function pt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"tr",4)(1,"td",5),t._uU(2),t.qZA(),t.TgZ(3,"td",5),t._uU(4),t.qZA(),t.TgZ(5,"td",5),t._uU(6),t.qZA(),t.TgZ(7,"td",5),t._uU(8),t.qZA(),t.TgZ(9,"td",5),t._uU(10),t.qZA(),t.TgZ(11,"td",5),t.YNc(12,_t,2,2,"ion-label",6),t._uU(13),t.qZA(),t.TgZ(14,"td",7)(15,"button",8),t.NdJ("click",function(o){const s=t.CHM(n).$implicit,l=t.oxw(2);return t.KtG(l.actionPopUpquote(o,s))}),t.TgZ(16,"ion-label"),t._uU(17,"Action"),t.qZA(),t._UZ(18,"ion-icon",9),t.qZA()()()}if(2&a){const n=r.$implicit,e=t.oxw(2);t.xp6(2),t.AsE("",n.FIRST_NAME," ",n.LAST_NAME,""),t.xp6(2),t.Oqu(n.SIDE_MARK),t.xp6(2),t.Oqu(n.QUOTE_SERIAL_NO),t.xp6(2),t.Oqu(n.CREATE_TIME),t.xp6(2),t.Oqu(n.UPDT_TIME),t.xp6(2),t.Q6J("ngIf",null!=e.quotestatus),t.xp6(1),t.hij("",""," ")}}function ut(a,r){if(1&a&&(t.TgZ(0,"tbody"),t.YNc(1,pt,19,8,"tr",3),t.qZA()),2&a){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.quotes)}}function gt(a,r){1&a&&(t.TgZ(0,"tbody")(1,"tr")(2,"td",11),t._uU(3,"No Records Available"),t.qZA()()())}let mt=(()=>{var a;class r{constructor(e,o,i,s,l,c,u,p){this.constant=e,this.http=o,this.globals=i,this.alertctrl=s,this.appcom=l,this.popctrl=c,this.loadctrl=u,this.toastctrl=p,this.dtOptionsquote={},this.dtTrigger=new I.x}ngOnInit(){this.fetchQuoteStatus=!0,this.datatabledata={username:this.constant.getUsername(),companyid:this.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:this.constant.platform,custid:this.custid};const e=this;this.dtOptionsquote={scrollCollapse:!0,pagingType:"full_numbers",pageLength:10,order:[3,"desc"],serverSide:!0,stateSave:!0,dom:"lfrtip",processing:!0,searchDelay:1e3,ajax:(o,i)=>{e.http.post(this.globals.url+"ctrl_quote.php?run=displayQuotesDB",Object.assign(o,this.datatabledata),{withCredentials:!0}).subscribe(s=>{if("logout"==s.status)this.message=s.message,this.showAlert(),this.appcom.clearValue();else{if(this.quotes=s.data,this.fetchQuoteStatus)this.fetchQuoteStatus=!1,this.quoteworkflowstatus();else for(let l=0;l<this.quotes.length;l++)for(let c=0;c<this.workflowquotestatuslist.length;c++)this.workflowquotestatuslist[c].ORDER_STATUS_CD==this.quotes[l].QUOTE_STATUS&&(this.quotestatus[l]=this.workflowquotestatuslist[c].ORDER_STATUS_DESC);i({recordsTotal:s.recordsTotal,recordsFiltered:s.recordsFiltered,data:[]})}}),(0,C.V)(this.constant.connectionTimeout),(0,x.K)(s=>{throw this.alert(this.constant.invalidResponse),"error in source. Details: "+s})},columns:[{data:"FIRST_NAME"},{data:"SIDE_MARK"},{data:"QUOTE_SERIAL_NO"},{data:"CREATE_TIME"},{data:"UPDT_TIME"},{data:"QUOTE_STATUS"}]}}quoteworkflowstatus(){var e=this;return(0,d.Z)(function*(){let o={companyid:e.constant.getCompanyId(),deviceType:e.constant.platform};e.http.post(e.globals.url+"ctrl_quote.php?run=getQuoteworkflowstatus",JSON.stringify(o),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(i=>{throw"error in source. Details: "+i})).subscribe(i=>{if(e.status=i.status,"success"==e.status){e.workflowquotestatuslist=i.message.quotestatus,e.quotestatus=[];for(let s=0;s<e.quotes.length;s++)for(let l=0;l<e.workflowquotestatuslist.length;l++)e.workflowquotestatuslist[l].ORDER_STATUS_CD==e.quotes[s].QUOTE_STATUS&&(e.quotestatus[s]=e.workflowquotestatuslist[l].ORDER_STATUS_DESC)}else"failure"==e.status&&(e.workflowquotestatuslist=i.message)})})()}alert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,backdropDismiss:!1,buttons:[{text:"Ok"}]})).present()})()}quotestatuscolor(e){return"Not Emailed"==e?"redcolor":"Draft"==e?(console.log("blueclorr"),"bluecolor"):"Revised"==e?"greencolor":"blackcolor"}showAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,buttons:[{text:"Ok"}]})).present()})()}actionPopUpquote(e,o){var i=this;return(0,d.Z)(function*(){i.selecteddata=o;const s=yield i.popctrl.create({component:y.Z,componentProps:{page:"quote",data:o},mode:"md",event:e,cssClass:"quotepop"});
1yield s.present(),s.onDidDismiss().then(l=>{null!=l.data&&("delete"==l.data?i.deleteQuoteAlert():i.rerender())})})()}deleteQuoteAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({message:"Are you sure to delete",buttons:[{text:"Cancel"},{text:"Ok",handler:()=>{e.deleteQuote()}}]})).present()})()}deleteQuote(){var e=this;return(0,d.Z)(function*(){let o={companyid:e.constant.getCompanyId(),quoteid:e.selecteddata.QUOTE_ID,deviceType:e.constant.platform};e.http.post(e.globals.url+"ctrl_quote.php?run=deleteQuote",JSON.stringify(o),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{"success"==e.status?(e.status="",e.rerender()):"failure"==e.status&&(e.status="")})).subscribe(i=>{e.status=i.status,"success"==e.status?(e.message=i.message,e.showtoast(e.message)):"logout"==i.status?(e.message=i.message,e.showAlert(),e.appcom.clearValue()):"failure"==e.status&&(e.message=i.message,e.alert(e.message))})})()}showtoast(e){var o=this;return(0,d.Z)(function*(){yield(yield o.toastctrl.create({message:e,duration:1500})).present()})()}rerender(){this.datatableElement.dtInstance.then(e=>{e.ajax.reload()})}ngAfterViewInit(){}}return(a=r).\u0275fac=function(e){return new(e||a)(t.Y36(N.s),t.Y36(M.eN),t.Y36(D.x),t.Y36(_.Br),t.Y36(E.y),t.Y36(_.Dh),t.Y36(_.HT),t.Y36(_.yF))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-quote-datatable"]],viewQuery:function(e,o){if(1&e&&t.Gf(O.G,5),2&e){let i;t.iGM(i=t.CRH())&&(o.datatableElement=i.first)}},inputs:{custid:"custid"},decls:19,vars:3,consts:[["id","your-datatable-idaq","datatable","",1,"row-border","hover","tablewidth",3,"dtOptions"],[1,"tableheader"],[4,"ngIf"],["style","text-align:center",4,"ngFor","ngForOf"],[2,"text-align","center"],[1,"tdwidth","tdborderleft"],[3,"ngClass",4,"ngIf"],[1,"tdwidth","tdborderleft","tdborderright","mobileborder"],[1,"actionbtn","font16",3,"click"],["mode","ios","name","chevron-down-outline",2,"height","10px"],[3,"ngClass"],["colspan","7",1,"textaligncenter"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"thead",1)(2,"tr")(3,"th"),t._uU(4,"Name"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"Side Mark"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Quote No"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"Created Time"),t.qZA(),t.TgZ(11,"th"),t._uU(12,"Last Updated Time"),t.qZA(),t.TgZ(13,"th"),t._uU(14,"Status"),t.qZA(),t.TgZ(15,"th"),t._uU(16,"Action"),t.qZA()()(),t.YNc(17,ut,2,1,"tbody",2),t.YNc(18,gt,4,0,"tbody",2),t.qZA()),2&e&&(t.Q6J("dtOptions",o.dtOptionsquote),t.xp6(17),t.Q6J("ngIf",0!=(null==o.quotes?null:o.quotes.length)),t.xp6(1),t.Q6J("ngIf",0==(null==o.quotes?null:o.quotes.length)))},dependencies:[f.mk,f.sg,f.O5,_.gu,_.Q$,O.G],styles:[".bluecolor[_ngcontent-%COMP%]{color:#00f}.greencolor[_ngcontent-%COMP%]{color:green}",".card[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;padding:20px!important;box-shadow:none!important;width:1000px}.lowercase[_ngcontent-%COMP%]{text-transform:capitalize}.btn[_ngcontent-%COMP%]{--border-radius:0px !important;font-size:16px!important;height:43px!important}ion-input[_ngcontent-%COMP%], ion-select[_ngcontent-%COMP%]{height:42px;color:var(--ion-color-dark);border:1px solid var(--ion-color-dark);display:flex;font-size:16px!important}.txtarea[_ngcontent-%COMP%]{border:1px solid black!important;color:#000;font-size:15px}.txt[_ngcontent-%COMP%]{color:#205493;font-weight:700;font-size:large;font-family:Merriweather}.table[_ngcontent-%COMP%]{width:100%;border-width:1px 1px 1px 1px;border-style:solid;border-color:#000}.scroll[_ngcontent-%COMP%]{height:250px;width:100%;overflow-y:scroll}.tr[_ngcontent-%COMP%], .td[_ngcontent-%COMP%]{padding:10px;color:#000;font-size:15px}.tdwidth[_ngcontent-%COMP%]{width:23%!important}.listcolor[_ngcontent-%COMP%]{background:var(--ion-color-white)!important}.label[_ngcontent-%COMP%]{font-size:16px!important;color:var(--ion-color-dark)!important}.itemcolor[_ngcontent-%COMP%]{--background:var(--ion-color-white) !important;display:flex}.line[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-dark)!important}ion-radio[_ngcontent-%COMP%]{margin-right:5px!important}.radiobtn[_ngcontent-%COMP%]{margin-right:10px!important;display:inline!important;font-size:16px!important;padding-top:5px!important}.segment[_ngcontent-%COMP%]{--color:#000000;background:lightgray;--indicator-color-checked: 0;--background-checked:rgb(0, 113, 188);--color-checked:rgb(255, 255, 255);--background-hover:none;overflow:auto}.segmentbt[_ngcontent-%COMP%]{box-shadow:-7px 0 #eff3f6}.show[_ngcontent-%COMP%]{display:block}.hide[_ngcontent-%COMP%]{display:none}.border[_ngcontent-%COMP%]{border:1px solid var(--ion-color-dark)!important;color:var(--ion-color-dark)!important}.actionbtn[_ngcontent-%COMP%]{border:2px solid var(--ion-color-primary)!important;background-color:var(--ion-color-white)!important;width:100px!important;height:38px!important;color:var(--ion-color-primary)!important;font-weight:700!important;padding:3px!important}.selectcss[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:var(--ion-color-white)!important}td[_ngcontent-%COMP%]{width:16.6%!important}@media only screen and (max-width: 500px){.tdwidth[_ngcontent-%COMP%]{width:100%!important}th[_ngcontent-%COMP%]{width:83%!important;border:none!important}}@media only screen and (max-width: 420px){.segmentmobileview[_ngcontent-%COMP%]{display:table}}.link[_ngcontent-%COMP%]{cursor:pointer;color:#0071bc}.link[_ngcontent-%COMP%]:hover{cursor:pointer;color:#0071bc;text-decoration:underline}.redcolor[_ngcontent-%COMP%]{color:red}.blackcolor[_ngcontent-%COMP%]{color:#000}.grayout[_ngcontent-%COMP%]{background:lightgray}.selectcss1[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:lightgray!important}.colborder[_ngcontent-%COMP%]{border:3px solid lightgray;margin-right:10px;margin-top:15px}.cancelicon[_ngcontent-%COMP%]{position:absolute;margin-right:2px;margin-left:91%;margin-top:10px;z-index:100;font-size:25px;cursor:pointer}.editsize[_ngcontent-%COMP%]{width:40px;height:25px;color:#0071bc;cursor:pointer}.alert[_ngcontent-%COMP%]{font-size:24px;color:#0071bc;padding:5px}.instructionlabel[_ngcontent-%COMP%]{padding:5px;color:#098dd2}.star[_ngcontent-%COMP%]{font-stretch:extra-condensed;font-size:20px}"]}),r})();var R=h(6732),Y=h(780),Q=h(3391),ht=h(1481);function ft(a,r){if(1&a&&t._UZ(0,"div",32),2&a){const n=t.oxw().$implicit,e=t.oxw(2);t.Q6J("innerHTML",e.getDisplayContent(n.TO_DO_MESSAGE,20),t.oJD)}}function Tt(a,r){if(1&a&&(t.TgZ(0,"div",33),t._uU(1),t.qZA()),2&a){const n=t.oxw().$implicit,e=t.oxw(2);t.xp6(1),t.Oqu(e.getTruncatedText(e.getDecodedMessage(n),20))}}function bt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-button",34),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.showFullContent(o))}),t._uU(1," More "),t.qZA()}}function xt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-icon",35),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.Delete(o))}),t.qZA()}}function Ct(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-icon",36),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.editTodo(o))}),t.qZA()}}function Ot(a,r){1&a&&(t.TgZ(0,"div")(1,"ion-text",37)(2,"p",38),t._uU(3,"Deleted"),t.qZA()()())}function At(a,r){1&a&&(t.TgZ(0,"div")(1,"ion-text",37)(2,"p",39),t._uU(3,"Completed"),t.qZA()()())}const wt=function(a){return{strikethrough:a,tdwidth2:!0,tdborderleft:!0}};function Pt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"tr",19)(1,"td",20)(2,"ion-checkbox",21),t.NdJ("ionChange",function(){const o=t.CHM(n),i=o.$implicit,s=o.index,l=t.oxw(2);return t.KtG(l.selectedtodo(i.TO_DO_LIST_ID,s))}),t.qZA()(),t.TgZ(3,"td",20),t._uU(4),t.qZA(),t.TgZ(5,"td",20),t._uU(6),t.qZA(),t.TgZ(7,"td",22)(8,"div",23),t.YNc(9,ft,1,1,"div",24),t.YNc(10,Tt,2,1,"div",25),t.YNc(11,bt,2,0,"ion-button",26),t.qZA()(),t.TgZ(12,"td",20)(13,"ion-badge",27),t._uU(14),t.qZA()(),t.TgZ(15,"td",20),t._uU(16),t.qZA(),t.TgZ(17,"td",28),t._uU(18),t.qZA(),t.TgZ(19,"td",29),t.YNc(20,xt,1,0,"ion-icon",30),t.YNc(21,Ct,1,0,"ion-icon",31),t.YNc(22,Ot,4,0,"div",17),t.YNc(23,At,4,0,"div",17),t.qZA()()}if(2&a){const n=r.$implicit,e=t.oxw(2);t.xp6(2),t.MGl("id","id",n.TO_DO_LIST_ID,""),t.Q6J("checked",null!=n.TO_DO_COMPLETE_DATE)("disabled",null==n.TO_DO_COMPLETE_DATE&&1==e.inActivecheckbox),t.xp6(2),t.Oqu(n.TO_DO_USER),t.xp6(2),t.Oqu(n.QUOTE_ORDER_SERIAL_NO),t.xp6(1),t.Q6J("ngClass",t.VKq(17,wt,null!=n.TO_DO_COMPLETE_DATE)),t.xp6(2),t.Q6J("ngIf",e.isDecodedHtmlContent(n)),t.xp6(1),t.Q6J("ngIf",!e.isDecodedHtmlContent(n)),t.xp6(1),t.Q6J("ngIf",e.getVisibleLength(n)>20),t.xp6(2),t.Q6J("ngClass",e.getPriorityColor(n.TO_DO_PRIORITY)),t.xp6(1),t.hij(" ",e.getPriorityLabel(n.TO_DO_PRIORITY)," "),t.xp6(2),t.Oqu(n.TO_DO_CREATE_DATE),t.xp6(2),t.Oqu(n.TO_DO_COMPLETE_DATE),t.xp6(2),t.Q6J("ngIf",null==n.TO_DO_COMPLETE_DATE&&0==e.inActivecheckbox),t.xp6(1),t.Q6J("ngIf",null==n.TO_DO_COMPLETE_DATE&&0==e.inActivecheckbox),t.xp6(1),t.Q6J("ngIf",null==n.TO_DO_COMPLETE_DATE&&1==e.inActivecheckbox),t.xp6(1),t.Q6J("ngIf",null!=n.TO_DO_COMPLETE_DATE)}}function Et(a,r){if(1&a&&(t.TgZ(0,"tbody"),t.YNc(1,Pt,24,19,"tr",18),t.qZA()),2&a){const n=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",n.todo)}}function It(a,r){1&a&&(t.TgZ(0,"tbody")(1,"tr")(2,"td",40),t._uU(3,"No Records Available"),t.qZA()()())}let Mt=(()=>{var a;class r{isHtmlContent(e){return!!e&&/<[a-z][\s\S]*>/i.test(e)}extractPlainText(e){if(!e)return"";const o=document.createElement("div");return o.innerHTML=e,o.textContent||o.innerText||""}getContentLength(e){return e?e.length:0}getTruncatedText(e,o=50){return e?e.length>o?e.substring(0,o)+"...":e:""}getTruncatedHtmlContent(e,o=50){if(!e)return"";const i=document.createElement("div");i.innerHTML=e;let s=0,l=!1;const c=p=>{if(p.nodeType===Node.TEXT_NODE){const T=p.textContent||"",m=o-s;T.length>m?(p.textContent=T.substring(0,m)+"...",l=!0):s+=T.length}const g=Array.from(p.childNodes);for(const T of g)if(c(T),l){g.slice(g.indexOf(T)+1).forEach(w=>w.remove());break}};c(i);const u=p=>{Array.from(p.children).forEach(g=>{var T;u(g),!(null===(T=g.textContent)||void 0===T?void 0:T.trim())&&!(g.children.length>0)&&g.remove()})};return u(i),i.innerHTML.trim()}getFullText(e){return e||""}getVisibleLength(e){const o=this.getDecodedMessage(e);return this.extractPlainText(o).trim().length}getDisplayContent(e,o=50){if(!e)return"";const i=this.decodeBase64Content(e);if(this.isHtmlContent(i)){const s=this.getTruncatedHtmlContent(i,o);return this.sanitizer.bypassSecurityTrustHtml(s)}return this.getTruncatedText(i,o)}constructor(e,o,i,s,l,c,u,p,g,T,m,w){this.constant=e,this.http=o,this.globals=i,this.alertctrl=s,this.appcom=l,this.popctrl=c,this.loadctrl=u,this.navctrl=p,this.modalctrl=g,this.datepipe=T,this.toastctrl=m,this.sanitizer=w,this.dtOptionstodo={},this.dtTrigger=new I.x,this.inActivecheckbox=!1,this.showInactiveoractive="1",this.selectedPriorityFilter=null}ngOnInit(){this.initializeData()}initializeData(){console.log("Initializing data with activecheck:",this.showInactiveoractive),this.datatabledata={username:this.constant.getUsername(),companyid:this.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:this.constant.platform,custid:this.custid,activecheck:this.showInactiveoractive,todo_priority:this.selectedPriorityFilter},this.setupDataTable()}setupDataTable(){const e=this;this.dtOptionstodo={scrollCollapse:!0,pagingType:"full_numbers",pageLength:10,order:[3,"desc"],serverSide:!0,stateSave:!0,dom:"lfrtip",processing:!0,searchDelay:1e3,ajax:(o,i)=>{e.http.post(this.globals.url+"ctrl_todo.php?run=displayTodoListDB",Object.assign(o,this.datatabledata),{withCredentials:!0}).subscribe(s=>{"logout"==s.status?(this.message=s.message,this.showAlert(),this.appcom.clearValue()):(this.todo=s.data,console.log(this.todo,"todooo"),i({recordsTotal:s.recordsTotal,recordsFiltered:s.recordsFiltered,data:[]}))}),(0,C.V)(this.constant.connectionTimeout),(0,x.K)(s=>{throw this.alert(this.constant.invalidResponse),"error in source. Details: "+s})},columns:[{data:"TO_DO_USER"},{data:"QUOTE_ORDER_SERIAL_NO"},{data:"TO_DO_MESSAGE"},{data:"TO_DO_PRIORITY"},{data:"TO_DO_CREATE_DATE"},{data:"TO_DO_COMPLETE_DATE"}]}}alert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,backdropDismiss:!1,buttons:[{text:"Ok"}]})).present()})()}showAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,buttons:[{text:"Ok"}]})).present()})()}showtoast(e){var o=this;return(0,d.Z)(function*(){yield(yield o.toastctrl.create({message:e,duration:1500})).present()})()}rerender(){this.datatableElement.dtInstance.then(e=>{e.ajax.reload()})}tododelete(e){var o=this;return(0,d.Z)(function*(){console.log("totolist",e);let i={companyid:o.constant.getCompanyId(),username:o.constant.getUsername(),deviceType:o.constant.platform,todoid:e.TO_DO_LIST_ID};o.http.post(o.globals.url+"ctrl_todo.php?run=deletetodo",JSON.stringify(i),{headers:o.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{"success"==o.status&&(o.status=""),"failure"==o.status&&(o.status="")})).subscribe(s=>{o.status=s.status,"success"==o.status?(o.showtoast(s.message),o.rerender()):"logout"==s.status?(o.showalert(s.message),o.clearValue()):"failure"==s.status&&o.showalert(s.message)})})()}Delete(e){var o=this;return(0,d.Z)(function*(){console.log("companyid",e),console.log(e),(null==e.TO_DO_COMPLETE_DATE||"D"==e.DELET
1ED_FLG)&&o.deletealert(e)})()}deletealert(e){var o=this;return(0,d.Z)(function*(){var i,s;const l=yield o.modalctrl.create({component:Q.S,cssClass:"content-viewer-modal",backdropDismiss:!1,componentProps:{config:{type:"delete",title:"Delete To-Do",subtitle:(null==e||null===(i=e.contact_name)||void 0===i||null===(s=i.trim())||void 0===s?void 0:s.length)>0?" For - "+e.contact_name:"",message:"Are you sure you want to delete this To-Do item?",content:o.decodeBase64Content(e.TO_DO_MESSAGE||"")}}});yield l.present();const{data:c}=yield l.onDidDismiss();null!=c&&c.confirmed&&o.tododelete(e)})()}showalert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,buttons:[{text:"Ok",role:"Cancel"}]})).present()})()}clearValue(){localStorage.clear(),this.navctrl.navigateRoot("/login")}createtodo(){var e=this;return(0,d.Z)(function*(){let o=[{CUSTOMER_ID:e.custid,contact_name:e.firstname}];var i=(0,Y.Z)(new Date,"yyyy-MM-dd");console.log(i,"this.userdata");const s=yield e.modalctrl.create({component:R.c,componentProps:{data:{userdata:"",todo_create_date:i,todo_customer:o,custid:e.custid},show:"todo"},mode:"md",cssClass:"todomodel"});yield s.present(),s.onDidDismiss().then(l=>{null!=l.data&&""!=l.data&&e.rerender()})})()}showinActive(){var e=this;return(0,d.Z)(function*(){console.log(e.inActivecheckbox,"inActivecheckbox"),e.showInactiveoractive=e.inActivecheckbox?"2":"1",yield e.initializeData(),console.log(e.showInactiveoractive,"inActivecheckbox"),yield e.rerender()})()}selectedtodo(e,o){var i=this;return(0,d.Z)(function*(){var s;let l;console.log(e,"TO_DO_id,this.checkedIdx"),console.log("id",document.getElementById("id"+e).checked),l=document.getElementById("id"+e).checked;for(let c=0;c<i.todo.length;c++)i.todo[c].TO_DO_LIST_ID==e&&(s=i.todo[c]);console.log("todocomplete",l),1==l&&null==s.TO_DO_COMPLETE_DATE?i.todocomplete(s,l):0==l&&null!=s.TO_DO_COMPLETE_DATE&&i.showcreatetodoalert(s,l)})()}todocomplete(e,o){var i=this;return(0,d.Z)(function*(){const s=yield i.loadctrl.create({message:"loading.."});yield s.present();let l={companyid:i.constant.getCompanyId(),username:i.constant.getUsername(),deviceType:i.constant.platform,todo_id:e.TO_DO_LIST_ID,todocomplete:o,todo_complete_date:i.datepipe.transform(new Date,"yyyy-MM-dd")};console.log(l,"tocompletedata"),i.http.post(i.globals.url+"ctrl_cal.php?run=todocomplete",JSON.stringify(l),{headers:i.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{s.dismiss(),"success"==i.status&&(i.status=""),"failure"==i.status&&(i.status="")})).subscribe(c=>{i.status=c.status,"success"==i.status?(i.showtoast(c.message),i.rerender()):"logout"==c.status?(i.modalctrl.dismiss(),i.showalert(c.message),i.appcom.clearValue()):"failure"==c.status&&(i.modalctrl.dismiss(),i.showalert(c.message),document.getElementById("id"+e.TO_DO_LIST_ID).checked=!1)})})()}showcreatetodoalert(e,o){var i=this;return(0,d.Z)(function*(){yield(yield i.alertctrl.create({message:"Are you sure to duplicate this TO DO, please confirm?",buttons:[{text:"Cancel",handler:()=>{document.getElementById("id"+e.TO_DO_LIST_ID).checked=!0}},{text:"Confirm",handler:()=>{i.addtodo(e,o)}}]})).present()})()}addtodo(e,o){var i=this;return(0,d.Z)(function*(){let s,l;if(null!=e.TO_DO_MESSAGE&&null!=e.TO_DO_MESSAGE){const c=i.decodeBase64Content(e.TO_DO_MESSAGE).trim();s=i.encodeBase64Content(c)}if(l=e.TO_DO_USER,""!=s&&null!=s){const c=yield i.loadctrl.create({message:"loading.."});yield c.present();let u={todo_create_date:i.datepipe.transform(new Date,"yyyy-MM-dd"),todo_msg:s,todo_user:l,companyid:i.constant.getCompanyId(),todocomplete:o,username:i.constant.getUsername(),deviceType:i.constant.platform,contactid:e.CONTACT_ID,quoorordserialno:e.QUOTE_ORDER_SERIAL_NO,flag:"N",todo_priority:e.TO_DO_PRIORITY||"4"};i.http.post(i.globals.url+"ctrl_cal.php?run=createTodo",JSON.stringify(u),{headers:i.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{c.dismiss(),"success"==i.status&&(i.status="",i.rerender()),"failure"==i.status&&(i.status="")})).subscribe(p=>{i.status=p.status,"success"==i.status?i.showtoast(p.message):"logout"==p.status&&(i.modalctrl.dismiss(),i.showalert(p.message),i.clearValue())})}else i.showalert(i.constant.mandatoryMsg)})()}editTodo(e){var o=this;return(0,d.Z)(function*(){console.log(o.firstname,"list"),(0,Y.Z)(new Date,"yyyy-MM-dd");const s=yield o.modalctrl.create({component:R.c,componentProps:{data:{editLine:e,editFlag:"U",firstname:o.firstname},show:"updatetodo"},mode:"md",cssClass:"todomodel"});yield s.present(),s.onDidDismiss().then(l=>{null!=l.data&&""!=l.data&&o.rerender()})})()}showFullContent(e){var o=this;return(0,d.Z)(function*(){var i,s;const l=o.decodeBase64Content(e.TO_DO_MESSAGE);yield(yield o.modalctrl.create({component:Q.S,cssClass:"content-viewer-modal",backdropDismiss:!0,showBackdrop:!1,componentProps:{config:{title:"To Do Notes",subtitle:(null==e||null===(i=e.contact_name)||void 0===i||null===(s=i.trim())||void 0===s?void 0:s.length)>0?" For - "+e.contact_name:"",content:l}}})).present()})()}getPriorityLabel(e){switch(e){case"1":return"Very High";case"2":return"High";case"3":return"Medium";default:return"Low"}}getPriorityColor(e){switch(console.log("priority",e),e){case"1":return"very-high";case"2":return"high";case"3":return"medium";default:return"low"}}onPriorityFilterChange(e){this.selectedPriorityFilter=e,console.log("Priority filter changed to:",e),this.initializeData(),this.rerender()}getDecodedMessage(e){return this.decodeBase64Content(e.TO_DO_MESSAGE)}isDecodedHtmlContent(e){const o=this.getDecodedMessage(e);return this.isHtmlContent(o)}decodeBase64Content(e){if(!e)return"";if(!/^(?:[A-Za-z0-9+/]{4}
1)*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e.trim()))return e;try{const i=atob(e.trim()),s=Uint8Array.from(i,l=>l.charCodeAt(0));return new TextDecoder("utf-8").decode(s)}catch(i){return console.warn("Base64 decode failed:",i),e}}encodeBase64Content(e){if(!e)return"";try{return btoa(unescape(encodeURIComponent(e)))}catch(o){return console.warn("Error encoding base64:",e,o),e}}}return(a=r).\u0275fac=function(e){return new(e||a)(t.Y36(N.s),t.Y36(M.eN),t.Y36(D.x),t.Y36(_.Br),t.Y36(E.y),t.Y36(_.Dh),t.Y36(_.HT),t.Y36(L.SH),t.Y36(_.IN),t.Y36(f.uU),t.Y36(_.yF),t.Y36(ht.H7))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-todo-datatable"]],viewQuery:function(e,o){if(1&e&&t.Gf(O.G,5),2&e){let i;t.iGM(i=t.CRH())&&(o.datatableElement=i.first)}},inputs:{custid:"custid",firstname:"firstname"},decls:46,vars:14,consts:[[1,"cardtable"],[1,"todobtnrow",2,"display","flex","align-items","center","justify-content","center","flex-wrap","wrap"],[1,"checkbox",2,"display","flex","max-width","fit-content","align-items","center"],["aria-label","","name","inActivecheckbox","id","checkbox","color","primary",2,"vertical-align","top",3,"ngModel","ngModelChange","ionChange"],["color","primary",2,"margin-left","10px"],[1,"col-priority",2,"display","flex","width","fit-content","align-items","center","justify-content","center","max-width","500px"],[1,"priority-scroll"],["fill","outline","shape","round","size","small",1,"priority-btn","priority-btn-all",3,"click"],["fill","outline","shape","round","size","small",1,"priority-btn","priority-btn-1",3,"click"],["fill","outline","shape","round","size","small",1,"priority-btn","priority-btn-2",3,"click"],["fill","outline","shape","round","size","small",1,"priority-btn","priority-btn-3",3,"click"],["fill","outline","shape","round","size","small",1,"priority-btn","priority-btn-4",3,"click"],[2,"max-width","200px"],[1,"btnalign"],["size","small",1,"ion-text-capitalize",2,"height","36px",3,"click"],["id","your-datatable-idCT","datatable","",1,"row-border","hover","tablewidth",3,"dtOptions"],[1,"tableheader"],[4,"ngIf"],["style","text-align:center",4,"ngFor","ngForOf"],[2,"text-align","center"],[1,"tdwidth","tdborderleft"],["aria-label","",3,"id","checked","disabled","ionChange"],[3,"ngClass"],[1,"todo-message-container"],["class","html-content single-line",3,"innerHTML",4,"ngIf"],["class","text-content single-line",4,"ngIf"],["fill","clear","size","small","class","more-btn","style","margin: 0px;",3,"click",4,"ngIf"],[1,"priority-badge",3,"ngClass"],[1,"tdwidth","tdborderleft","tdborderright","mobileborder"],[1,"tdwidth1","tdborderleft","tdborderright","mobileborder"],["size","small","fill","outline","class","htmlbtn ion-text-capitalize","color","danger","name","trash-outline",3,"click",4,"ngIf"],["fill","outline","class","htmlbtn ion-text-capitalize","color","primary","name","create-outline",3,"click",4,"ngIf"],[1,"html-content","single-line",3,"innerHTML"],[1,"text-content","single-line"],["fill","clear","size","small",1,"more-btn",2,"margin","0px",3,"click"],["size","small","fill","outline","color","danger","name","trash-outline",1,"htmlbtn","ion-text-capitalize",3,"click"],["fill","outline","color","primary","name","create-outline",1,"htmlbtn","ion-text-capitalize",3,"click"],["color","primary"],[1,"tododelnote"],[1,"todocomnote"],["colspan","8",1,"textaligncenter"]],template:function(e,o){1&e&&(t.TgZ(0,"ion-card",0)(1,"ion-row",1)(2,"ion-col",2)(3,"div")(4,"ion-checkbox",3),t.NdJ("ngModelChange",function(s){return o.inActivecheckbox=s})("ionChange",function(){return o.showinActive()}),t.qZA(),t.TgZ(5,"ion-label",4),t._uU(6,"Show Deleted"),t.TgZ(7,"b"),t._uU(8,"/"),t.qZA(),t._uU(9,"completed"),t.qZA()()(),t.TgZ(10,"ion-col",5)(11,"div",6)(12,"ion-button",7),t.NdJ("click",function(){return o.onPriorityFilterChange(null)}),t._uU(13,"All"),t.qZA(),t.TgZ(14,"ion-button",8),t.NdJ("click",function(){return o.onPriorityFilterChange(1)}),t._uU(15,"Very High"),t.qZA(),t.TgZ(16,"ion-button",9),t.NdJ("click",function(){return o.onPriorityFilterChange(2)}),t._uU(17,"High"),t.qZA(),t.TgZ(18,"ion-button",10),t.NdJ("click",function(){return o.onPriorityFilterChange(3)}
1),t._uU(19,"Medium"),t.qZA(),t.TgZ(20,"ion-button",11),t.NdJ("click",function(){return o.onPriorityFilterChange(4)}),t._uU(21,"Low"),t.qZA()()(),t.TgZ(22,"ion-col",12)(23,"div",13)(24,"ion-button",14),t.NdJ("click",function(){return o.createtodo()}),t._uU(25,"ADD TO DO "),t.qZA()()()(),t.TgZ(26,"table",15)(27,"thead",16)(28,"tr"),t._UZ(29,"th"),t.TgZ(30,"th"),t._uU(31,"User Name"),t.qZA(),t.TgZ(32,"th"),t._uU(33,"Serial no"),t.qZA(),t.TgZ(34,"th"),t._uU(35,"TO DO message"),t.qZA(),t.TgZ(36,"th"),t._uU(37,"Priority"),t.qZA(),t.TgZ(38,"th"),t._uU(39,"Date of Creation"),t.qZA(),t.TgZ(40,"th"),t._uU(41,"Date of Completion"),t.qZA(),t.TgZ(42,"th"),t._uU(43,"Action"),t.qZA()()(),t.YNc(44,Et,2,1,"tbody",17),t.YNc(45,It,4,0,"tbody",17),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("ngModel",o.inActivecheckbox),t.xp6(8),t.ekj("active",null===o.selectedPriorityFilter),t.xp6(2),t.ekj("active",1===o.selectedPriorityFilter),t.xp6(2),t.ekj("active",2===o.selectedPriorityFilter),t.xp6(2),t.ekj("active",3===o.selectedPriorityFilter),t.xp6(2),t.ekj("active",4===o.selectedPriorityFilter),t.xp6(6),t.Q6J("dtOptions",o.dtOptionstodo),t.xp6(18),t.Q6J("ngIf",0!=(null==o.todo?null:o.todo.length)),t.xp6(1),t.Q6J("ngIf",0==(null==o.todo?null:o.todo.length)))},dependencies:[f.mk,f.sg,f.O5,P.JJ,P.On,_.yp,_.YG,_.PM,_.nz,_.wI,_.gu,_.Q$,_.Nd,_.yW,_.w,O.G],styles:[".cardtable[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;box-shadow:none!important;overflow:auto!important;min-height:90%;margin-top:0!important;padding:0!important}.selectdropdown[_ngcontent-%COMP%]{z-index:121221212}.strikethrough[_ngcontent-%COMP%]{text-decoration-line:line-through;text-decoration-color:currentcolor;text-decoration-thickness:2px}.todonote[_ngcontent-%COMP%]{color:#000!important;font-size:14px!important;font-weight:700}.tododelnote[_ngcontent-%COMP%]{color:red!important;font-size:14px!important;font-weight:700}.todocomnote[_ngcontent-%COMP%]{color:green!important;font-size:14px!important;font-weight:700}.priority-filter-col[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;padding-left:2%;width:100%;margin-top:8px}.priority-filter-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap;width:100%}.priority-filter-buttons[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap;align-items:center;width:100%}.priority-btn[_ngcontent-%COMP%]{font-weight:500;transition:all .3s ease}.priority-btn[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.priority-scroll[_ngcontent-%COMP%]{display:flex;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}.priority-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.todobtnrow[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;align-items:center;gap:8px}.priority-btn-all[_ngcontent-%COMP%]{--border-color: #999;--color: #666}.priority-btn-all.active[_ngcontent-%COMP%]{--background: #999;--color: #fff;--border-color: #999}.priority-btn-1[_ngcontent-%COMP%]{--border-color: #b91c1c;--color: #b91c1c}.priority-btn-1.active[_ngcontent-%COMP%]{--background: #b91c1c;--color: #fff;--border-color: #b91c1c}.priority-btn-2[_ngcontent-%COMP%]{--border-color: #c2410c;--color: #c2410c}.priority-btn-2.active[_ngcontent-%COMP%]{--background: #c2410c;--color: #fff;--border-color: #c2410c}.priority-btn-3[_ngcontent-%COMP%]{--border-color: #92400e;--color: #92400e}.priority-btn-3.active[_ngcontent-%COMP%]{--background: #92400e;--color: #fff;--border-color: #92400e}.priority-btn-4[_ngcontent-%COMP%]{--border-color: #166534;--color: #166534}.priority-btn-4.active[_ngcontent-%COMP%]{--background: #166534;--color: #fff;--border-color: #166534}.single-line[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.todo-message-container[_ngcontent-%COMP%]{max-width:100%}.todo-message-content[_ngcontent-%COMP%]{display:flex;flex-grow:1;justify-content:center}.more-btn[_ngcontent-%COMP%]{--padding-start: 4px;--padding-end: 4px;--padding-top: 0;--padding-bottom: 0;
1height:24px;font-size:12px;margin-left:4px;white-space:nowrap;flex-shrink:0;text-transform:none!important}.html-content[_ngcontent-%COMP%]{font-size:13px;line-height:1.5}.html-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 8px;font-size:13px}.html-content[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-weight:600}.html-content[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-style:italic}.html-content[_ngcontent-%COMP%] u[_ngcontent-%COMP%]{text-decoration:underline}.html-content[_ngcontent-%COMP%] s[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] strike[_ngcontent-%COMP%]{text-decoration:line-through}.html-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:0 0 8px 20px;padding:0}.html-content[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 4px}.html-content[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{border-left:4px solid #ccc;margin:0 0 8px;padding-left:10px;color:#666}.html-content[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#f5f5f5;padding:2px 6px;border-radius:3px;font-family:Courier New,monospace;font-size:12px}.html-content[_ngcontent-%COMP%] p{margin:0}.text-content[_ngcontent-%COMP%]{font-size:13px;line-height:1.5}.htmlbtn[_ngcontent-%COMP%]{width:50px!important;height:28px!important;font-size:14px!important;color:red}.tdwidth1[_ngcontent-%COMP%]{width:10%!important;border-left:none!important}.tdwidth2[_ngcontent-%COMP%]{width:30%!important;text-align:center}@media only screen and (min-width: 1201px){.btnalign[_ngcontent-%COMP%]{text-align:center}}@media only screen and (max-width: 767px){.btnalign[_ngcontent-%COMP%]{text-align:center}}@media only screen and (min-width: 768px) and (max-width: 991px){.btnalign[_ngcontent-%COMP%]{text-align:center;margin-left:35px}.dropdownalign[_ngcontent-%COMP%]{margin-top:-9px;margin-left:-33px;width:180px}[_nghost-%COMP%] .multiselect-dropdown .dropdown-btn{padding:6px 18px!important}.priority-btn[_ngcontent-%COMP%]{--padding-start: 10px;--padding-end: 10px;--padding-top: 6px;--padding-bottom: 6px;font-size:12px}}@media only screen and (max-width: 768px){.col-priority[_ngcontent-%COMP%]{width:100%;flex-basis:100%;padding-right:0;margin-top:10px}.priority-scroll[_ngcontent-%COMP%]{width:100%}.priority-btn[_ngcontent-%COMP%]{--padding-start: 10px;--padding-end: 10px;--padding-top: 6px;--padding-bottom: 6px;font-size:12px;flex:1;min-width:70px}}@media only screen and (max-width: 480px){.col-priority[_ngcontent-%COMP%]{width:100%;flex-basis:100%;padding-left:1%;padding-right:0;margin-top:8px}.priority-scroll[_ngcontent-%COMP%]{width:100%;gap:4px}.priority-btn[_ngcontent-%COMP%]{--padding-start: 8px;--padding-end: 8px;--padding-top: 5px;--padding-bottom: 5px;font-size:10px;min-width:60px}}"]}),r})();var Nt=h(1038);function Dt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-icon",16),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.onPreviewClick(o))}),t.qZA()}}function yt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-icon",17),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.onPreviewClick(o))}),t.qZA()}}function vt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-icon",18),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.onPreviewClick(o))}),t.qZA()}}function Zt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-icon",19),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,i=t.oxw(2);return t.KtG(i.onPreviewClick(o))}),t.qZA()}}function St(a,r){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&a){const n=t.oxw().$implicit;t.xp6(1),t.AsE(" latitude: ",n.GEOIMG_LATITUDE," longitude: ",n.GEOIMG_LONGITUDE," ")}}function Lt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"tr",5)(1,"td",6),t.YNc(2,Dt,1,0,"ion-icon",7),t.YNc(3,yt,1,0,"ion-icon",8),t.YNc(4,vt,1,0,"ion-icon",9),t.YNc(5,Zt,1,0,"ion-icon",10),t.qZA(),t.TgZ(6,"td",6),t._uU(7),t.ALo(8,"date"),t.qZA(),t.TgZ(9,"td",6),t._uU(10),t.qZA(),t.TgZ(11,"td",6),t._uU(12),t.qZA(),t.TgZ(13,"td",6)(14,"div"),t._uU(15),t.YNc(16,St,2,2,"div",3),t.qZA()(),t.TgZ(17,"td",11),t._uU(18),t.qZA(),t.TgZ(19,"td",12)(20,"div",13)(21,"ion-icon",14),t.NdJ("click",function(){const i=t.CHM(n).$implicit,s=t.oxw(2);return t.KtG(s.onDownloadClick(i))}),t.qZA(),t.TgZ(22,"ion-icon",15),t.NdJ("click",function(){const i=t.CHM(n).$implicit,s=t.oxw(2);return t.KtG(s.onDeleteClick(i))}),t.qZA()()()()}if(2&a){const n=r.$implicit;t.xp6(2),t.Q6J("ngIf","pdf"==n.FILE_TYPE),t.xp6(1),t.Q6J("ngIf","image"==n.FILE_TYPE),t.xp6(1),t.Q6J("ngIf","video"==n.FILE_TYPE),t.xp6(1),t.Q6J("ngIf",""==n.FILE_TYPE||null==n.FILE_TYPE||null==n.FILE_TYPE),t.xp6(2),t.Oqu(t.xi3(8,10,n.CREATED_DT_TM1,"MM/dd/y")),t.xp6(3),t.Oqu(n.IMG_NAME),t.xp6(2),t.Oqu(n.ORDER_SERIAL_NO),t.xp6(3),t.hij(" ",n.IMAGE_DESCRIPTION," "),t.xp6(1),t.Q6J("ngIf",n.GEOIMG_LATITUDE&&n.GEOIMG_LONGITUDE),t.xp6(2),t.hij(" ",n.USER,"")}}function Rt(a,r){if(1&a&&(t.TgZ(0,"tbody"),t.YNc(1,Lt,23,13,"tr",4),t.qZA()),2&a){const n=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",n.files)}}function Ut(a,r){1&a&&(t.TgZ(0,"tbody")(1,"tr")(2,"td",20),t._uU(3,"No Records Available"),t.qZA()()())}let kt=(()=>{var a;class r{constructor(e,o,i,s,l,c,u,p,g){this.http=e,this.constant=o,this.modalctrl=i,this.appcom=s,this.loadctrl=l,this.globals=c,this.navctrl=u,this.alertctrl=p,this.toastctrl=g,this.dtOptionsrepair={},this.dtTrigger=new I.x,this.singedcookie()}ngOnInit(){const e=this;this.datatabledata={username:this.constant.getUsername(),companyid:this.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:this.constant.platform,custid:this.custid},this.dtOptionsrepair={scrollCollapse:!0,pagingType:"full_numbers",pageLength:10,order:[1,"desc"],serverSide:!0,stateSave:!0,dom:"lfrtip",processing:!0,searchDelay:1e3,ajax:(o,i)=>{e.http.post(this.globals.url+"ctrl_pindrop.php?run=customerFiles",Object.assign(o,this.datatabledata),{withCredentials:!0}).subscribe(s=>{"logout"==s.status?(this.message=s.message,this.showAlert(),this.appcom.clearValue()):(s.data.forEach((l,c)=>{const p=l.GEOIMG_URL.split(".").at(-1);"png"==p||"jpeg"==p||"jpg"==p||"webp"==p?s.data[c].FILE_TYPE="image":"pdf"==p?s.data[c].FILE_TYPE="pdf":"docx"==p?s.data[c].FILE_TYPE="docx":"doc"==p?s.data[c].FILE_TYPE="doc":"txt"==p?s.data[c].FILE_TYPE="text":("mov"==p||"mp4"==p||"WEBM"==p||"mkv"==p||"avi"==p)&&(s.data[c].FILE_TYPE="video")}),e.files=s.data,i({recordsTotal:s.recordsTotal,recordsFiltered:s.recordsFiltered,data:[]}))}),(0,C.V)(this.constant.connectionTimeout),(0,x.K)(s=>{throw this.alert(this.constant.invalidResponse),"error in source. Details: "+s})},columns:[{data:"FILE_TYPE"},{data:"CREATED_DT_TM1"},{data:"IMG_NAME"},,{data:"ORDER_SERIAL_NO"},{data:"IMAGE_DESCRIPTION"},{data:"USER"}],columnDefs:[{orderable:!1,targets:[0,6]}]}}ionViewDidEnter(){var e=this;return(0,d.Z)(function*(){e.user_name=e.constant.getUsername(),e.c_id=e.constant.getCompanyId()})()}alert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,backdropDismiss:!1,buttons:[{text:"Ok"}]})).present()})()}rerender(){this.datatableElement.dtInstance.then(e=>{e.ajax.reload()})}showalert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,buttons:[{text:"Ok",role:"Cancel"}]})).present()})()}showAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,buttons:[{text:"Ok"}]})).present()})()}onDeleteClick(e){var o=this;return(0,d.Z)(function*(){o.deletealert(e)})()}deletealert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({message:"Are you sure to want to delete, please confirm?",buttons:[{text:"Cancel"},{text:"Confirm",handler:()=>{o.deletePindrop(e)}}]})).present()})()}deletePindrop(e){var o=this;return(0,d.Z)(function*(){o.http.post(o.globals.url+"ctrl_pindrop.php?run=delete_pindrop",JSON.stringify({companyid:o.c_id,username:o.user_name,deviceType:o.constant.platform,pindropid:e.PIN_DROP_ID}),{headers:o.globals.header,withCredentials:!0}).subscribe(s=>{o.status=s.status,"success"==o.status?(o.showtoast(s.message),o.singedcookie(),o.rerender()):"logout"==s.status?(o.modalctrl.dismiss(),o.showalert(s.message),o.clearValue()):"failure"==s.status&&(o.modalctrl.dismiss(),o.showalert(s.message))})})()}onDownloadClick(e){const i=e.GEOIMG_URL.split("/").at(-1);window.location.href=encodeURI(`${this.globals.url}download.php?filename=${i}&companyid=${e.COMPANY_ID}`)}showtoast(e){var o=this;return(0,d.Z)(function*(){yield(yield o.toastctrl.create({message:e,duration:1500})).present()})()}clearValue(){localStorage.clear(),this.navctrl.navigateRoot("/login")}singedcookie(){var e=this;return(0,d.Z)(function*(){e.http.get(e.globals.url+"awssingedcokkie.php").subscribe(i=>{console.log(i,"response response"),document.cookie="CloudFront-Policy="+i["CloudFront-Policy"]+"; path=/;;secure;SameSite=None",document.cookie="CloudFront-Key-Pair-Id= "+i["CloudFront-Key-Pair-Id"]+";path=/;secure;SameSite=None",document.cookie="CloudFront-Signature= "+i["CloudFront-Signature"]+";path=/;secure;SameSite=None"})})()}addFilePopup(){var e=this;return(0,d.Z)(function*(){const o=yield e.modalctrl.create({component:R.c,componentProps:{show:"fileupload",custid:e.custid},mode:"md",cssClass:"todomodel"});yield o.present(),o.onDidDismiss().then(i=>{null!=i.data&&""!=i.data&&e.rerender()})})()}onPreviewClick(e){var o=this;return(0,d.Z)(function*(){let i=window.location.origin;const s=e.GEOIMG_URL.split(".").at(-1),l=e.IMG_NAME.split(".").at(-1);let c=i+"/images/"+e.COMPANY_ID+"/"+e.IMG_NAME;s!=l&&(c=i+"/images/"+e.COMPANY_ID+"/"+e.IMG_NAME+"."+s),yield(yield o.modalctrl.create({component:Nt.z,componentProps:{show:"pdf"==e.FILE_TYPE?"iframe":"img",imgUrl:c},backdropDismiss:!1,cssClass:["preview-img-model","preview-img","model"]})).present()})()}}return(a=r).\u0275fac=function(e){return new(e||a)(t.Y36(M.eN),t.Y36(N.s),t.Y36(_.IN),t.Y36(E.y),t.Y36(_.HT),t.Y36(D.x),t.Y36(L.SH),t.Y36(_.Br),t.Y36(_.yF))}
1,a.\u0275cmp=t.Xpm({type:a,selectors:[["app-files-list"]],viewQuery:function(e,o){if(1&e&&t.Gf(O.G,5),2&e){let i;t.iGM(i=t.CRH())&&(o.datatableElement=i.first)}},inputs:{custid:"custid"},decls:21,vars:3,consts:[["id","your-datatable-idaf","datatable","",1,"row-border","hover","tablewidth",3,"dtOptions"],[1,"upload-btn",3,"click"],[1,"tableheader"],[4,"ngIf"],["style","text-align:center",4,"ngFor","ngForOf"],[2,"text-align","center"],[1,"tdwidth","tdborderleft"],["title","Preview","class","actionicon","color","primary","name","document-text","mode","ios",3,"click",4,"ngIf"],["title","Preview","class","actionicon","color","primary","name","image","mode","ios",3,"click",4,"ngIf"],["title","Preview","class","actionicon","color","primary","name","play-circle-sharp","mode","ios",3,"click",4,"ngIf"],["title","Preview","class","actionicon","color","primary","name","help-sharp","mode","ios",3,"click",4,"ngIf"],[1,"tdwidth","tdborderleft","tdborderright"],[1,"tdwidth1","tdborderleft","tdborderright","mobileborder"],[2,"display","flex","gap",".7rem","justify-content","flex-end"],["title","Download","color","primary","name","download","mode","ios",1,"actionicon",3,"click"],["title","Delete","color","danger","name","trash","mode","ios",1,"actionicon",3,"click"],["title","Preview","color","primary","name","document-text","mode","ios",1,"actionicon",3,"click"],["title","Preview","color","primary","name","image","mode","ios",1,"actionicon",3,"click"],["title","Preview","color","primary","name","play-circle-sharp","mode","ios",1,"actionicon",3,"click"],["title","Preview","color","primary","name","help-sharp","mode","ios",1,"actionicon",3,"click"],["colspan","7",1,"no-data-available",2,"text-align","center"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"ion-button",1),t.NdJ("click",function(){return o.addFilePopup()}),t._uU(2,"add file"),t.qZA(),t.TgZ(3,"thead",2)(4,"tr")(5,"th"),t._uU(6,"File Type"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Date of creation"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"File Name"),t.qZA(),t.TgZ(11,"th"),t._uU(12,"Order"),t.qZA(),t.TgZ(13,"th"),t._uU(14,"Description"),t.qZA(),t.TgZ(15,"th"),t._uU(16,"User"),t.qZA(),t.TgZ(17,"th"),t._uU(18,"Action"),t.qZA()()(),t.YNc(19,Rt,2,1,"tbody",3),t.YNc(20,Ut,4,0,"tbody",3),t.qZA()),2&e&&(t.Q6J("dtOptions",o.dtOptionsrepair),t.xp6(19),t.Q6J("ngIf",0!=(null==o.files?null:o.files.length)),t.xp6(1),t.Q6J("ngIf",0==(null==o.files?null:o.files.length)))},dependencies:[f.sg,f.O5,_.YG,_.gu,O.G,f.uU],styles:[".tdwidth1[_ngcontent-%COMP%]{width:20%!important;border-left:none!important}.htmlbtn[_ngcontent-%COMP%]{width:100px!important;height:38px!important;font-size:14px!important;color:red}.actionicon[_ngcontent-%COMP%]{font-size:30px}table[_ngcontent-%COMP%]{position:relative}.upload-btn[_ngcontent-%COMP%]{position:absolute;top:-60px;left:40%}@media only screen and (max-width: 640px){.upload-btn[_ngcontent-%COMP%]{top:-120px;left:0%}}@media only screen and (max-width: 500px){.htmlbtn[_ngcontent-%COMP%]{margin-left:4px}.tdwidth1[_ngcontent-%COMP%]{width:100%!important}}",".card[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;padding:20px!important;box-shadow:none!important;width:1000px}.lowercase[_ngcontent-%COMP%]{text-transform:capitalize}.btn[_ngcontent-%COMP%]{--border-radius:0px !important;font-size:16px!important;height:43px!important}ion-input[_ngcontent-%COMP%], ion-select[_ngcontent-%COMP%]{height:42px;color:var(--ion-color-dark);border:1px solid var(--ion-color-dark);display:flex;font-size:16px!important}.txtarea[_ngcontent-%COMP%]{border:1px solid black!important;color:#000;font-size:15px}.txt[_ngcontent-%COMP%]{color:#205493;font-weight:700;font-size:large;font-family:Merriweather}.table[_ngcontent-%COMP%]{width:100%;border-width:1px 1px 1px 1px;border-style:solid;border-color:#000}.scroll[_ngcontent-%COMP%]{height:250px;width:100%;overflow-y:scroll}.tr[_ngcontent-%COMP%], .td[_ngcontent-%COMP%]{padding:10px;color:#000;font-size:15px}.tdwidth[_ngcontent-%COMP%]{width:23%!important}.listcolor[_ngcontent-%COMP%]{background:var(--ion-color-white)!important}.label[_ngcontent-%COMP%]{font-size:16px!important;color:var(--ion-color-dark)!important}.itemcolor[_ngcontent-%COMP%]{--background:var(--ion-color-white) !important;display:flex}.line[_ngcontent-%COMP%]{border-bottom:1px solid var(--ion-color-dark)!important}ion-radio[_ngcontent-%COMP%]{margin-right:5px!important}.radiobtn[_ngcontent-%COMP%]{margin-right:10px!important;display:inline!important;font-size:16px!important;padding-top:5px!important}.segment[_ngcontent-%COMP%]{--color:#000000;background:lightgray;--indicator-color-checked: 0;--background-checked:rgb(0, 113, 188);--color-checked:rgb(255, 255, 255);--background-hover:none;overflow:auto}.segmentbt[_ngcontent-%COMP%]{box-shadow:-7px 0 #eff3f6}.show[_ngcontent-%COMP%]{display:block}.hide[_ngcontent-%COMP%]{display:none}.border[_ngcontent-%COMP%]{border:1px solid var(--ion-color-dark)!important;color:var(--ion-color-dark)!important}.actionbtn[_ngcontent-%COMP%]{border:2px solid var(--ion-color-primary)!important;background-color:var(--ion-color-white)!important;width:100px!important;height:38px!important;color:var(--ion-color-primary)!important;font-weight:700!important;padding:3px!important}.selectcss[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:var(--ion-color-white)!important}td[_ngcontent-%COMP%]{width:16.6%!important}@media only screen and (max-width: 500px){.tdwidth[_ngcontent-%COMP%]{width:100%!important}th[_ngcontent-%COMP%]{width:83%!important;border:none!important}}@media only screen and (max-width: 420px){.segmentmobileview[_ngcontent-%COMP%]{display:table}}.link[_ngcontent-%COMP%]{cursor:pointer;color:#0071bc}.link[_ngcontent-%COMP%]:hover{cursor:pointer;color:#0071bc;text-decoration:underline}.redcolor[_ngcontent-%COMP%]{color:red}.blackcolor[_ngcontent-%COMP%]{color:#000}.grayout[_ngcontent-%COMP%]{background:lightgray}.selectcss1[_ngcontent-%COMP%]{height:42px!important;width:100%!important;background:lightgray!important}.colborder[_ngcontent-%COMP%]{border:3px solid lightgray;margin-right:10px;margin-top:15px}.cancelicon[_ngcontent-%COMP%]{position:absolute;margin-right:2px;margin-left:91%;margin-top:10px;z-index:100;font-size:25px;cursor:pointer}.editsize[_ngcontent-%COMP%]{width:40px;height:25px;color:#0071bc;cursor:pointer}.alert[_ngcontent-%COMP%]{font-size:24px;color:#0071bc;padding:5px}.instructionlabel[_ngcontent-%COMP%]{padding:5px;color:#098dd2}.star[_ngcontent-%COMP%]{font-stretch:extra-condensed;font-size:20px}"]}),r})();
1function qt(a,r){1&a&&t._UZ(0,"ion-spinner",36)}function Yt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-label",37),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.showsynfailedalert(o.duplicateupdatemassage))}),t._UZ(1,"ion-icon",38),t._uU(2),t.qZA()}if(2&a){const n=t.oxw();t.xp6(2),t.hij(" Last ",n.responsedata.GHL_COMPANY_URL_NAME," sync was failed.")}}function Qt(a,r){1&a&&t._UZ(0,"ion-icon",45)}function Jt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"a",43),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.birdeyeopen(null==o.responsedata?null:o.responsedata.BIRDEYE_CUSTOMER_ID))}),t.YNc(1,Qt,1,0,"ion-icon",44),t.qZA()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null!=(null==n.responsedata?null:n.responsedata.BIRDEYE_CUSTOMER_ID)&&"2"==(null==n.responsedata?null:n.responsedata.CONTACT_TYPE))}}function Bt(a,r){1&a&&t._UZ(0,"ion-icon",45)}function Ft(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"a",43),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.birdeyeopen(null==o.responsedata?null:o.responsedata.BIRDEYE_CUSTOMER_ID))}),t.YNc(1,Bt,1,0,"ion-icon",44),t.qZA()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null!=(null==n.responsedata?null:n.responsedata.BIRDEYE_CUSTOMER_ID)&&"1"==(null==n.responsedata?null:n.responsedata.CONTACT_TYPE))}}function Ht(a,r){1&a&&t._UZ(0,"ion-icon",45)}function Vt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"a",43),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.ghlopen(o.responsedata))}),t.YNc(1,Ht,1,0,"ion-icon",44),t.qZA()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null!=(null==n.responsedata?null:n.responsedata.MY5STARZ_ID)&&""!=(null==n.responsedata?null:n.responsedata.MY5STARZ_ID)&&null!=(null==n.responsedata?null:n.responsedata.MY5STARZ_ID)&&("2"==(null==n.responsedata?null:n.responsedata.CONTACT_TYPE)||null==(null==n.responsedata?null:n.responsedata.CONTACT_TYPE)))}}function Gt(a,r){1&a&&t._UZ(0,"ion-icon",45)}function zt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"a",43),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.ghlopen(o.responsedata))}),t.YNc(1,Gt,1,0,"ion-icon",44),t.qZA()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null!=(null==n.responsedata?null:n.responsedata.MY5STARZ_ID)&&""!=(null==n.responsedata?null:n.responsedata.MY5STARZ_ID)&&null!=(null==n.responsedata?null:n.responsedata.MY5STARZ_ID)&&"1"==(null==n.responsedata?null:n.responsedata.CONTACT_TYPE))}}function jt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-button",42),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.sendContactToGhl())}),t._uU(1,"Send M5S"),t.qZA()}}function Kt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-button",42),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.createAppoint())}),t._uU(1,"Create Appointment"),t.qZA()}}function $t(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-button",42),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.createQuote())}),t._uU(1,"Create Quote"),t.qZA()}}function Wt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-col",39),t.YNc(1,Jt,2,1,"a",40),t.YNc(2,Ft,2,1,"a",40),t.YNc(3,Vt,2,1,"a",40),t.YNc(4,zt,2,1,"a",40),t.YNc(5,jt,2,0,"ion-button",41),t.YNc(6,Kt,2,0,"ion-button",41),t.YNc(7,$t,2,0,"ion-button",41),t.TgZ(8,"ion-button",42),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.viewCustomer())}),t._uU(9,"Edit"),t.qZA()()}if(2&a){const n=t.oxw();t.xp6(1),t.Q6J("ngIf","BE"===(null==n.responsedata?null:n.responsedata.MY5STARZ_FLG)),t.xp6(1),t.Q6J("ngIf","BE"===(null==n.responsedata?null:n.responsedata.MY5STARZ_FLG)),t.xp6(1),t.Q6J("ngIf","GHL"===(null==n.responsedata?null:n.responsedata.MY5STARZ_FLG)),t.xp6(1),t.Q6J("ngIf","GHL"===(null==n.responsedata?null:n.responsedata.MY5STARZ_FLG)),t.xp6(1),t.Q6J("ngIf",n.checkContactDuplicate()),t.xp6(1),t.Q6J("ngIf",n.customertypeandstatuscheck()&&"N"==n.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf",n.customertypeandstatuscheck())}}function Xt(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-col",46)(1,"ion-label",47),t._uU(2,"Deleted"),t.qZA(),t.TgZ(3,"ion-button",48),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.restoreContact())}),t._uU(4,"Restore"),t.qZA()()}}function te(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Type:"),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();
1t.xp6(4),t.AsE(" ",n.cont_type," / ",n.cust_type," ")}}function ee(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Sales Person: "),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.sales_person," ")}}function oe(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"SO/POC: "),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.spouseName," ")}}function ne(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Kids: "),t.qZA(),t._uU(4),t.qZA(),t.TgZ(5,"ion-label",18)(6,"span",19),t._uU(7,"Pets: "),t.qZA(),t._uU(8),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.Oqu(n.childName),t.xp6(4),t.hij(" ",n.petName,"")}}function ae(a,r){if(1&a&&(t.TgZ(0,"ion-label")(1,"span",19),t._uU(2,"No Sales Tax: "),t.qZA(),t._uU(3),t.qZA()),2&a){const n=t.oxw();t.xp6(3),t.Oqu(n.salestax)}}function ie(a,r){if(1&a&&(t.TgZ(0,"ion-label",18)(1,"span",19),t._uU(2,"Gate code: "),t.qZA(),t._uU(3),t.qZA()),2&a){const n=t.oxw(2);t.xp6(3),t.hij("",n.gateCode," ")}}function se(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Reference: "),t.qZA(),t._uU(4),t.qZA(),t.YNc(5,ie,4,1,"ion-label",49),t.qZA()),2&a){const n=t.oxw();t.xp6(4),t.Oqu(n.reference),t.xp6(1),t.Q6J("ngIf","N"==n.dealerPortalrestflg)}}function re(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Neighborhood: "),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.subdiviname,"")}}function le(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Location: "),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.custLocation,"")}}function ce(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Sidemark: "),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.sidemark,"")}}function de(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Lead Time: "),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.leadTimeLabel,"")}}function _e(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Shipvia: "),t.qZA(),t._uU(4),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.hij(" ",n.shipViaLabel,"")}}function pe(a,r){if(1&a&&(t.TgZ(0,"ion-label"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.hij(", ",n.address2,"")}}function ue(a,r){if(1&a&&(t.TgZ(0,"ion-label"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.statecode,",")}}function ge(a,r){if(1&a&&(t.TgZ(0,"ion-label"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Oqu(n.phoneMobile)}}function me(a,r){if(1&a&&(t.TgZ(0,"ion-label"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.hij(" ,",n.phoneHome," ")}}function he(a,r){if(1&a&&(t.TgZ(0,"ion-label"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.hij(", ",n.phoneWork," ")}}function fe(a,r){if(1&a&&(t.TgZ(0,"span",19),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.hij("",n.secemail,": ")}}function Te(a,r){if(1&a&&(t.TgZ(0,"ion-col",15)(1,"ion-card",16)(2,"p")(3,"ion-label",50),t._uU(4,"Ship To / Jobsite "),t.qZA()(),t.TgZ(5,"p")(6,"ion-label"),t._uU(7),t.qZA(),t.YNc(8,pe,2,1,"ion-label",17),t.qZA(),t.TgZ(9,"p")(10,"ion-label"),t._uU(11),t.qZA(),t.YNc(12,ue,2,1,"ion-label",17),t.TgZ(13,"ion-label"),t._uU(14),t.qZA()(),t.TgZ(15,"p"),t.YNc(16,ge,2,1,"ion-label",17),t.YNc(17,me,2,1,"ion-label",17),t.YNc(18,he,2,1,"ion-label",17),t.qZA(),t.TgZ(19,"p")(20,"ion-label")(21,"span",19),t._uU(22,"Primary Email: "),t.qZA(),t._uU(23),t.qZA()(),t.TgZ(24,"p")(25,"ion-label"),t.YNc(26,fe,2,1,"span",51),t._uU(27),t.qZA()()()()),2&a){const n=t.oxw();t.xp6(7),t.Oqu(n.address1),t.xp6(1),t.Q6J("ngIf",""!=n.address2),t.xp6(3),t.Oqu(n.cityName),t.xp6(1),t.Q6J("ngIf",n.statecode),t.xp6(2),t.hij(" ",n.Zipcode,""),t.xp6(2),t.Q6J("ngIf",""!=n.phoneMobile),t.xp6(1),t.Q6J("ngIf",""!=n.phoneHome),t.xp6(1),t.Q6J("ngIf",""!=n.phoneWork),t.xp6(5),t.hij("",n.email," "),t.xp6(3),t.Q6J("ngIf",""!=n.secondaryemail),t.xp6(1),t.hij("",n.secondaryemail," ")}}function be(a,r){if(1&a&&(t.TgZ(0,"ion-label"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.hij("",n.billName," ")}}function xe(a,r){if(1&a&&(t.TgZ(0,"ion-label",18),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Oqu(n.bussnesbillName)}}function Ce(a,r){if(1&a&&(t.TgZ(0,"ion-label"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.hij(" ",n.selectedbillstateCode,",")}}function Oe(a,r){if(1&a&&(t.TgZ(0,"ion-col",15)(1,"ion-card",16)(2,"p")(3,"ion-label",50),t._uU(4,"Bill To "),t.qZA()(),t.TgZ(5,"p"),t.YNc(6,be,2,1,"ion-label",17),t.YNc(7,xe,2,1,"ion-label",49),t.qZA(),t.TgZ(8,"p")(9,"ion-label"),t._uU(10),t.qZA(),t.TgZ(11,"ion-label"),t._uU(12),t.qZA()(),t.TgZ(13,"p")(14,"ion-label"),t._uU(15),t.qZA(),t.YNc(16,Ce,2,1,"ion-label",17),t.TgZ(17,"ion-label"),t._uU(18),t.qZA()(),t.TgZ(19,"p")(20,"ion-label")(21,"span",19),t._uU(22,"Phone C: "),t.qZA(),t._uU(23),t.qZA()(),t.TgZ(24,"p")(25,"ion-label")(26,"span",19),t._uU(27,"Primary Email: "),t.qZA(),t._uU(28),t.qZA()(),t.TgZ(29,"p")(30,"ion-label")(31,"span",19),t._uU(32,"Neighborhood: "),t.qZA(),t._uU(33),t.qZA()()()()),2&a){const n=t.oxw();
1t.xp6(6),t.Q6J("ngIf",""!=n.billName),t.xp6(1),t.Q6J("ngIf",""!=n.bussnesbillName),t.xp6(3),t.Oqu(n.billaddress1),t.xp6(2),t.hij("",n.billaddress2," "),t.xp6(3),t.Oqu(n.billcityName),t.xp6(1),t.Q6J("ngIf",n.selectedbillstateCode),t.xp6(2),t.hij(" ",n.billZipcode,""),t.xp6(5),t.hij("",n.billphone," "),t.xp6(5),t.hij(" ",n.billemail," "),t.xp6(5),t.hij(" ",n.billsubdiviname," ")}}function Ae(a,r){1&a&&(t.TgZ(0,"p")(1,"ion-label",50),t._uU(2,"Appointment / Quote / Order Summary "),t.qZA()())}function we(a,r){1&a&&(t.TgZ(0,"p")(1,"ion-label",50),t._uU(2,"Quote Summary"),t.qZA()())}function Pe(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,n.appt_start_time,"MM/dd/yyyy hh:mm a"))}}function Ee(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1," to "),t.qZA())}function Ie(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,n.appt_end_time,"hh:mm a"))}}function Me(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Last Appt:"),t.qZA(),t.YNc(4,Pe,3,4,"span",17),t.YNc(5,Ee,2,0,"span",17),t.YNc(6,Ie,3,4,"span",17),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.Q6J("ngIf",n.appt_start_time),t.xp6(1),t.Q6J("ngIf",n.appt_start_time&&n.appt_end_time),t.xp6(1),t.Q6J("ngIf",n.appt_end_time)}}function Ne(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,n.appt_start_time,"MM/dd/yyyy hh:mm a"))}}function De(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1," to "),t.qZA())}function ye(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&a){const n=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,n.appt_end_time,"hh:mm a"))}}function ve(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Upcoming Appt:"),t.qZA(),t.YNc(4,Ne,3,4,"span",17),t.YNc(5,De,2,0,"span",17),t.YNc(6,ye,3,4,"span",17),t.qZA()()),2&a){const n=t.oxw();t.xp6(4),t.Q6J("ngIf",n.appt_start_time),t.xp6(1),t.Q6J("ngIf",n.appt_start_time&&n.appt_end_time),t.xp6(1),t.Q6J("ngIf",n.appt_end_time)}}function Ze(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1,":"),t.qZA())}function Se(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1,"$"),t.qZA())}function Le(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1,":"),t.qZA())}function Re(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1,"$"),t.qZA())}function Ue(a,r){if(1&a&&(t.TgZ(0,"p")(1,"ion-label")(2,"span",19),t._uU(3,"Last Order: "),t.qZA(),t._uU(4),t.YNc(5,Le,2,0,"span",17),t.YNc(6,Re,2,0,"span",17),t._uU(7),t.TgZ(8,"span",21),t._uU(9),t.qZA()()()),2&a){const n=t.oxw();t.xp6(4),t.Oqu(n.order_serial_no),t.xp6(1),t.Q6J("ngIf",n.order_serial_no),t.xp6(1),t.Q6J("ngIf",n.order_total_no),t.xp6(1),t.Oqu(n.order_total_no),t.xp6(2),t.hij(" ",n.order_sts,"")}}function ke(a,r){1&a&&(t.TgZ(0,"ion-segment-button",52)(1,"ion-label"),t._uU(2,"Orders"),t.qZA()())}function qe(a,r){1&a&&(t.TgZ(0,"ion-segment-button",53)(1,"ion-label"),t._uU(2,"Repair"),t.qZA()())}function Ye(a,r){1&a&&(t.TgZ(0,"ion-segment-button",54)(1,"ion-label"),t._uU(2,"To-do"),t.qZA()())}function Qe(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"span")(1,"ion-checkbox",60),t.NdJ("ngModelChange",function(o){t.CHM(n);const i=t.oxw(2);return t.KtG(i.isChecked=o)})("ionChange",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.updatecustomer())}),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngModel",n.isChecked)("disabled",n.notesLoadingSpinner)}}function Je(a,r){1&a&&(t.TgZ(0,"span",61),t._uU(1," Hide appointment update history"),t.qZA())}function Be(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"ion-row")(1,"ion-textarea",62),t.NdJ("ngModelChange",function(o){t.CHM(n);const i=t.oxw(2);return t.KtG(i.savenote=o)}),t.qZA()()}if(2&a){const n=t.oxw(2);t.xp6(1),t.Q6J("ngModel",n.savenote)}}function Fe(a,r){1&a&&(t.TgZ(0,"ion-list",63)(1,"ion-item",64)(2,"ion-label")(3,"h3"),t._UZ(4,"ion-skeleton-text",65),t.qZA(),t.TgZ(5,"p"),t._UZ(6,"ion-skeleton-text",66),t.qZA(),t.TgZ(7,"p"),t._UZ(8,"ion-skeleton-text",67),t.qZA()()()()),2&a&&(t.xp6(4),t.Q6J("animated",!0),t.xp6(2),t.Q6J("animated",!0),t.xp6(2),t.Q6J("animated",!0))}function He(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.hij(" ",n.NOTE_TXT,"")}}function Ve(a,r){if(1&a&&(t.TgZ(0,"span",82),t._uU(1),t.qZA()),2&a){const n=t.oxw(4).$implicit;t.xp6(1),t.Oqu(n.OLD_NOTES)}}function Ge(a,r){if(1&a&&(t.TgZ(0,"div",79),t.YNc(1,Ve,2,1,"span",80),t.TgZ(2,"span",81),t._uU(3),t.qZA()()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("ngIf",n.OLD_NOTES),t.xp6(2),t.Oqu(n.NOTE_TXT)}}function ze(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"span",76),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2),i=o.$implicit,s=o.index,l=t.oxw(3);return t.KtG(l.startEditing(i,s))}),t.YNc(1,He,2,1,"span",17),t.YNc(2,Ge,4,2,"div",77),t._UZ(3,"ion-icon",78),t.qZA()}if(2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngIf","U"!=n.DELETED_FLG),t.xp6(1),t.Q6J("ngIf","U"==n.DELETED_FLG)}}function je(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"span",83)(1,"input",84),t.NdJ("ngModelChange",function(o){t.CHM(n);const i=t.oxw(5);return t.KtG(i.editedNote=o)}),t.qZA(),t.TgZ(2,"ion-icon",85),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2),i=o.$implicit,s=o.index,l=t.oxw(3);return t.KtG(l.saveNote(i,s,"contact"))}),t.qZA(),t.TgZ(3,"ion-icon",86),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(5);return t.KtG(o.cancelEdit())}),t.qZA()()}if(2&a){const n=t.oxw(5);t.xp6(1),t.Q6J("ngModel",n.editedNote)}}function Ke(a,r){if(1&a&&(t.TgZ(0,"ion-label",71)(1,"p",72)(2,"span",73),t._uU(3),t.qZA(),t._uU(4," by "),t.TgZ(5,"span",73),t._uU(6),t.qZA(),t.YNc(7,ze,4,2,"span",74),t.YNc(8,je,4,1,"span",75),t.TgZ(9,"span",73),t._uU(10," Notes Upd
1ated Time: "),t.qZA(),t.TgZ(11,"span"),t._uU(12),t.qZA(),t.TgZ(13,"span",73),t._uU(14," Notes Updated User: "),t.qZA(),t.TgZ(15,"span"),t._uU(16),t.qZA()()()),2&a){const n=t.oxw(),e=n.$implicit,o=n.index,i=t.oxw(3);t.xp6(3),t.hij(" ",e.CREATED_TIME," "),t.xp6(3),t.hij(" ",e.CREATED_USER,": "),t.xp6(1),t.Q6J("ngIf",!((null==i.editingIndex?null:i.editingIndex.parentIndex)===o&&void 0===(null==i.editingIndex?null:i.editingIndex.childIndex))),t.xp6(1),t.Q6J("ngIf",(null==i.editingIndex?null:i.editingIndex.parentIndex)===o&&void 0===(null==i.editingIndex?null:i.editingIndex.childIndex)),t.xp6(4),t.Oqu(e.LAST_UPDT_TIME?e.LAST_UPDT_TIME:e.CREATED_TIME),t.xp6(4),t.Oqu(e.LAST_UPDT_USER)}}function $e(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.ALo(3,"date"),t.qZA()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.AsE(" ",t.xi3(2,2,n.APPT_BEGIN_DT_TM,"hh:mm a")," to ",t.xi3(3,5,n.APPT_END_DT_TM,"hh:mm a")," ")}}function We(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.ALo(3,"date"),t.qZA()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.AsE(" ",t.xi3(2,2,n.RA_APPT_BEGIN_DT_TM,"hh:mm a")," to ",t.xi3(3,5,n.RA_APPT_END_DT_TM,"hh:mm a")," ")}}function Xe(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"a",90),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2).$implicit,i=t.oxw(3);return t.KtG(i.apptnavigate(o.APPT_BEGIN_DT_TM,o.APPT_END_DT_TM,o))}),t._uU(1),t.ALo(2,"date"),t.ALo(3,"date"),t.YNc(4,$e,4,8,"span",17),t.YNc(5,We,4,8,"span",17),t.qZA()}if(2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.AsE(" ",t.xi3(2,4,n.APPT_BEGIN_DT_TM,"MM/dd/yyyy")," ",t.xi3(3,7,n.RA_APPT_BEGIN_DT_TM,"MM/dd/yyyy")," "),t.xp6(3),t.Q6J("ngIf",n.APPT_BEGIN_DT_TM),t.xp6(1),t.Q6J("ngIf",n.RA_APPT_BEGIN_DT_TM)}}function to(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.ALo(3,"date"),t.qZA()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.AsE(" ",t.xi3(2,2,n.APPT_BEGIN_DT_TM,"hh:mm a")," to ",t.xi3(3,5,n.APPT_END_DT_TM,"hh:mm a")," ")}}function eo(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.ALo(3,"date"),t.qZA()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.AsE(" ",t.xi3(2,2,n.RA_APPT_BEGIN_DT_TM,"hh:mm a")," to ",t.xi3(3,5,n.RA_APPT_END_DT_TM,"hh:mm a")," ")}}function oo(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.ALo(3,"date"),t.YNc(4,to,4,8,"span",17),t.YNc(5,eo,4,8,"span",17),t.qZA()),2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.AsE(" ",t.xi3(2,4,n.APPT_BEGIN_DT_TM,"MM/dd/yyyy")," ",t.xi3(3,7,n.RA_APPT_BEGIN_DT_TM,"MM/dd/yyyy")," "),t.xp6(3),t.Q6J("ngIf",n.APPT_BEGIN_DT_TM),t.xp6(1),t.Q6J("ngIf",n.RA_APPT_BEGIN_DT_TM)}}function no(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.Oqu(n.NOTE_TXT)}}function ao(a,r){if(1&a&&(t.TgZ(0,"span",82),t._uU(1),t.qZA()),2&a){const n=t.oxw(4).$implicit;t.xp6(1),t.Oqu(n.OLD_NOTES)}}function io(a,r){if(1&a&&(t.TgZ(0,"div",79),t.YNc(1,ao,2,1,"span",80),t.TgZ(2,"span",81),t._uU(3),t.qZA()()),2&a){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("ngIf",n.OLD_NOTES),t.xp6(2),t.Oqu(n.NOTE_TXT)}}function so(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"span",76),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2),i=o.$implicit,s=o.index,l=t.oxw(2).index,c=t.oxw(3);return t.KtG(c.startEditing(i,l,s))}),t.YNc(1,no,2,1,"span",17),t.YNc(2,io,4,2,"div",77),t._UZ(3,"ion-icon",78),t.qZA()}if(2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngIf","U"!=n.DELETED_FLG),t.xp6(1),t.Q6J("ngIf","U"==n.DELETED_FLG)}}function ro(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"span",83)(1,"input",92),t.NdJ("ngModelChange",function(o){t.CHM(n);const i=t.oxw(7);return t.KtG(i.editedNote=o)}),t.qZA(),t.TgZ(2,"ion-icon",85),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2),i=o.$implicit,s=o.index,l=t.oxw(2).index,c=t.oxw(3);return t.KtG(c.saveNote(i,l,s))}),t.qZA(),t.TgZ(3,"ion-icon",86),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(7);return t.KtG(o.cancelEdit())}),t.qZA()()}if(2&a){const n=t.oxw(7);t.xp6(1),t.Q6J("ngModel",n.editedNote)}}function lo(a,r){1&a&&(t.TgZ(0,"span",73),t._uU(1," Window Count: "),t.qZA())}function co(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",n.WINDOW_COUNT,"")}}function _o(a,r){1&a&&(t.TgZ(0,"span",73),t._uU(1," Estimate date: "),t.qZA())}function po(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,n.ESTIMATE_DATE,"MM/dd/yyyy"),"")}}function uo(a,r){1&a&&(t.TgZ(0,"span",73),t._uU(1," Equipment req: "),t.qZA())}function go(a,r){if(1&a&&(t.TgZ(0,"span")(1,"span",73),t._uU(2),t.qZA(),t._uU(3," by "),t.TgZ(4,"span",73),t._uU(5),t.qZA(),t.TgZ(6,"span"),t._uU(7),t.qZA(),t.TgZ(8,"span",73),t._uU(9," Note: "),t.qZA(),t.YNc(10,so,4,2,"span",74),t.YNc(11,ro,4,1,"span",75),t.TgZ(12,"span",73),t._uU(13," Notes Upd
1ated Time: "),t.qZA(),t.TgZ(14,"span"),t._uU(15),t.qZA(),t.TgZ(16,"span",73),t._uU(17," Notes Updated User: "),t.qZA(),t.TgZ(18,"span"),t._uU(19),t.qZA(),t.YNc(20,lo,2,0,"span",91),t.YNc(21,co,2,1,"span",17),t.YNc(22,_o,2,0,"span",91),t.YNc(23,po,3,4,"span",17),t.YNc(24,uo,2,0,"span",91),t._uU(25),t.qZA()),2&a){const n=t.oxw(),e=n.$implicit,o=n.index,i=t.oxw(2).index,s=t.oxw(3);t.xp6(2),t.Oqu(e.CREATED_DT),t.xp6(3),t.hij(" ",e.CREATED_USER_NAME,": "),t.xp6(2),t.Oqu(e.APPOINTMENT_ACTIVITY_DETAILS),t.xp6(3),t.Q6J("ngIf",!((null==s.editingIndex?null:s.editingIndex.parentIndex)===i&&(null==s.editingIndex?null:s.editingIndex.childIndex)===o)),t.xp6(1),t.Q6J("ngIf",(null==s.editingIndex?null:s.editingIndex.parentIndex)===i&&(null==s.editingIndex?null:s.editingIndex.childIndex)===o),t.xp6(4),t.Oqu(e.LAST_UPDT_TIME?e.LAST_UPDT_TIME:e.CREATED_DT),t.xp6(4),t.Oqu(e.LAST_UPDT_USER),t.xp6(1),t.Q6J("ngIf",0!=e.WINDOW_COUNT&&null!==e.WINDOW_COUNT&&e.WINDOW_COUNT),t.xp6(1),t.Q6J("ngIf",0!=e.WINDOW_COUNT),t.xp6(1),t.Q6J("ngIf","0000-00-00 00:00:00"!=e.ESTIMATE_DATE&&null!==e.ESTIMATE_DATE&&e.ESTIMATE_DATE),t.xp6(1),t.Q6J("ngIf","0000-00-00 00:00:00"!=e.ESTIMATE_DATE),t.xp6(1),t.Q6J("ngIf",""!=e.EQUIPMENT_REQUIRED&&null!==e.EQUIPMENT_REQUIRED&&e.EQUIPMENT_REQUIRED),t.xp6(1),t.hij(" ",e.APPT_EQUIPMENT_DESC," ")}}function mo(a,r){1&a&&(t.TgZ(0,"span",73),t._uU(1," Window Count: "),t.qZA())}function ho(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",n.WINDOW_COUNT,"")}}function fo(a,r){1&a&&(t.TgZ(0,"span",73),t._uU(1," Estimate date: "),t.qZA())}function To(a,r){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&a){const n=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,n.ESTIMATE_DATE,"MM/dd/yyyy"),"")}}function bo(a,r){1&a&&(t.TgZ(0,"span",73),t._uU(1," Equipment req: "),t.qZA())}function xo(a,r){if(1&a&&(t.TgZ(0,"span")(1,"span",73),t._uU(2),t.qZA(),t._uU(3," by "),t.TgZ(4,"span",73),t._uU(5),t.qZA(),t._uU(6),t.YNc(7,mo,2,0,"span",91),t.YNc(8,ho,2,1,"span",17),t.YNc(9,fo,2,0,"span",91),t.YNc(10,To,3,4,"span",17),t.YNc(11,bo,2,0,"span",91),t._uU(12),t.qZA()),2&a){const n=t.oxw().$implicit;t.xp6(2),t.hij("",n.AA_CREATED_TIME," "),t.xp6(3),t.hij("",n.CREATED_USER," : "),t.xp6(1),t.hij(" ",n.APPOINTMENT_ACTIVITY_DETAILS," "),t.xp6(1),t.Q6J("ngIf",0!=n.WINDOW_COUNT&&null!==n.WINDOW_COUNT&&n.WINDOW_COUNT),t.xp6(1),t.Q6J("ngIf",0!=n.WINDOW_COUNT),t.xp6(1),t.Q6J("ngIf","0000-00-00 00:00:00"!=n.ESTIMATE_DATE&&null!==n.ESTIMATE_DATE&&n.ESTIMATE_DATE),t.xp6(1),t.Q6J("ngIf","0000-00-00 00:00:00"!=n.ESTIMATE_DATE),t.xp6(1),t.Q6J("ngIf",""!=n.EQUIPMENT_REQUIRED&&null!==n.EQUIPMENT_REQUIRED&&n.EQUIPMENT_REQUIRED),t.xp6(1),t.hij(" ",n.APPT_EQUIPMENT_DESC," ")}}function Co(a,r){if(1&a&&(t.TgZ(0,"p",72),t.YNc(1,go,26,13,"span",17),t.YNc(2,xo,13,9,"span",17),t.qZA()),2&a){const n=r.$implicit,e=t.oxw(5);t.xp6(1),t.Q6J("ngIf",null!=n.NOTE_TXT&&null!=n.NOTE_TXT&&""!=n.NOTE_TXT),t.xp6(1),t.Q6J("ngIf",(null==n.NOTE_TXT||null==n.NOTE_TXT||""==n.NOTE_TXT)&&"N"==e.hisflg)}}const Oo=function(a,r,n){return{darkgray:a,red:r,green:n}};function Ao(a,r){if(1&a&&(t.TgZ(0,"ion-label")(1,"p",72)(2,"span",73),t._uU(3,"Appointment Date:"),t.qZA(),t.YNc(4,Xe,6,10,"a",87),t.YNc(5,oo,6,10,"span",17),t.TgZ(6,"span",88)(7,"span",73),t._uU(8," Type: "),t.qZA(),t._uU(9),t.TgZ(10,"span",73),t._uU(11," Users: "),t.qZA(),t._uU(12),t.TgZ(13,"span",73),t._uU(14," Status: "),t.qZA(),t._uU(15),t.qZA()(),t.YNc(16,Co,3,2,"p",89),t.qZA()),2&a){const n=t.oxw().$implicit;t.xp6(4),t.Q6J("ngIf","D"!=n.DELETED_FLG),t.xp6(1),t.Q6J("ngIf","D"==n.DELETED_FLG),t.xp6(1),t.Q6J("ngClass",t.kEZ(8,Oo,null!=n.DELETED_FLG&&"D"!=n.DELETED_FLG||null!=n.DELETED_FLG&&"D"!=n.DELETED_FLG,"D"==n.DELETED_FLG||"D"==n.DELETED_FLG,"U"==n.DELETED_FLG||"U"==n.DELETED_FLG)),t.xp6(3),t.hij(" ",n.APPT_TYPE_DESC," "),t.xp6(3),t.AsE(" ",n.APPT_USER," ",n.RA_APPT_USER," "),t.xp6(3),t.hij("",n.APPT_STATUS_DESC," "),t.xp6(1),t.Q6J("ngForOf",n.Appt_notes_List)}}function wo(a,r){if(1&a&&(t.TgZ(0,"ion-item",64),t.YNc(1,Ke,17,6,"ion-label",70),t.YNc(2,Ao,17,12,"ion-label",17),t.qZA()),2&a){const n=r.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!e.hasAppointmentId(n)&&e.hasNoteText(n)),t.xp6(1),t.Q6J("ngIf",e.hasAppointmentId(n)&&"N"==e.dealerPortalrestflg)}}function Po(a,r){1&a&&(t.TgZ(0,"ion-item",64)(1,"ion-label",71),t._uU(2,"No Records Available."),t.qZA()())}function Eo(a,r){if(1&a&&(t.TgZ(0,"ion-list",63)(1,"ion-item-group"),t.YNc(2,wo,3,2,"ion-item",68),t.YNc(3,Po,3,0,"ion-item",69),t.qZA()()),2&a){const n=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",n.visibleNotes),t.xp6(1),t.Q6J("ngIf",0==n.visibleNotes.length)}}function Io(a,r){if(1&a){const n=t.EpF();t.TgZ(0,"div")(1,"ion-row")(2,"ion-col")(3,"ion-label",55),t._uU(4," History: "),t.YNc(5,Qe,2,2,"span",17),t.YNc(6,Je,2,0,"span",56),t.qZA()(),t.TgZ(7,"ion-col",57)(8,"ion-button",58),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.addnotes())}),t._uU(9),t.qZA()()(),t.YNc(10,Be,2,1,"ion-row",17),t.YNc(11,Fe,9,3,"ion-list",59),t.YNc(12,Eo,4,2,"ion-list",59),t.qZA()}if(2&a){const n=t.oxw();
1t.xp6(5),t.Q6J("ngIf","N"==n.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==n.dealerPortalrestflg),t.xp6(2),t.Q6J("disabled",n.notesLoadingSpinner),t.xp6(1),t.Oqu(n.btnname),t.xp6(1),t.Q6J("ngIf","Y"==n.noteflg),t.xp6(1),t.Q6J("ngIf",n.notesLoadingSpinner),t.xp6(1),t.Q6J("ngIf",!n.notesLoadingSpinner)}}function Mo(a,r){if(1&a&&t._UZ(0,"app-quote-datatable",93),2&a){const n=t.oxw();t.Q6J("custid",n.custid)}}function No(a,r){if(1&a&&t._UZ(0,"app-orders-datatable",93),2&a){const n=t.oxw(2);t.Q6J("custid",n.custid)}}function Do(a,r){if(1&a&&(t.TgZ(0,"div",31)(1,"ion-card",32),t.YNc(2,No,1,1,"app-orders-datatable",33),t.qZA()()),2&a){const n=t.oxw();t.Q6J("ngClass",n.orderlist()),t.xp6(2),t.Q6J("ngIf",n.showOrdersDatatable)}}function yo(a,r){if(1&a&&t._UZ(0,"app-po-datatable",94),2&a){const n=t.oxw();t.Q6J("page",n.page)("custid",n.custid)}}function vo(a,r){if(1&a&&t._UZ(0,"app-repair-datatable",93),2&a){const n=t.oxw(2);t.Q6J("custid",n.custid)}}function Zo(a,r){if(1&a&&(t.TgZ(0,"div",31)(1,"ion-card",32),t.YNc(2,vo,1,1,"app-repair-datatable",33),t.qZA()()),2&a){const n=t.oxw();t.Q6J("ngClass",n.repairlist()),t.xp6(2),t.Q6J("ngIf",n.showRepairDatatable)}}function So(a,r){if(1&a&&t._UZ(0,"app-files-list",93),2&a){const n=t.oxw();t.Q6J("custid",n.custid)}}function Lo(a,r){if(1&a&&t._UZ(0,"app-todo-datatable",97),2&a){const n=t.oxw(2);t.Q6J("custid",n.custid)("firstname",n.firstname+" "+n.lastName)}}function Ro(a,r){if(1&a&&(t.TgZ(0,"div",31)(1,"ion-card",95),t.YNc(2,Lo,1,2,"app-todo-datatable",96),t.qZA()()),2&a){const n=t.oxw();t.Q6J("ngClass",n.todolist()),t.xp6(2),t.Q6J("ngIf",n.showTodoDatatable)}}const Uo=[{path:"",component:(()=>{var a;class r{constructor(e,o,i,s,l,c,u,p,g,T,m,w,v,Z){this.popctrl=e,this.route=o,this.router=i,this.menu=s,this.http=l,this.constant=c,this.modalctrl=u,this.appcom=p,this.loadctrl=g,this.globals=T,this.navctrl=m,this.alertctrl=w,this.toastctrl=v,this.datePipe=Z,this.dtOptionsorder={},this.dtOptionspo={},this.dtOptionsquote={},this.dtOptionsrepair={},this.dtTrigger=new I.x,this.isDtInitialized=!1,this.quoteData=[],this.tableStyle="material",this.limit=10,this.dataLoadedFlag=!1,this.firstname="",this.lastName="",this.bussnesName="",this.spouseName="",this.childName="",this.petName="",this.address1="",this.address2="",this.Zipcode="",this.solicit="Y",this.cityName="",this.phoneMobile="",this.phoneWork="",this.phoneHome="",this.email="",this.gateCode="",this.salestax="N",this.sCode=[],this.cType=[],this.custid="",this.cusType="",this.cusDet=[],this.notes=[],this.visibleNotes=[],this.referalmethos="",this.statecode="",this.sessionid="",this.savenote="",this.validateFlag=!1,this.notesValidate=!1,this.orderstatus=[],this.postatus=[],this.repairstatus=[],this.quotestatus=[],this.cus_exist=!1,this.leadContactStatusAry=[],this.otherContactStatusAry=[],this.ContactStatusAry=[],this.ContactStatus="",this.empty="",this.notesLoadingSpinner=!1,this.updatevalue=!0,this.updatephn2value=!0,this.secemaillabel=!0,this.subdiviname="",this.cityEdit=!1,this.showTooltip=!1,this.tooltipContent="This is your tooltip content",this.isChecked=!0,this.hisflg="Y",this.editingIndex=null,this.editedNote="",this.custLocation="",this.leadTimeList=[{label:"Standard",code:"ST"},{label:"Rush",code:"RS"},{label:"Express",code:"EX"},{label:"Next Day",code:"NX"}],this.shipViaList=[{label:"Standard Shipping",code:"STD"},{label:"FedEx",code:"FEX"},{label:"UPS",code:"UPS"},{label:"DHL",code:"DHL"},{label:"Blue Dart",code:"BLD"},{label:"Customer Pickup",code:"CUP"}],this.duplicateupdatemassage="",this.duplicateupdateInforequest=!1,this.navdata=JSON.parse(localStorage.getItem("customerview_data")),this.protalQuoteFlg=localStorage.getItem("protalQuoteFlg"),this.usertodoflg=localStorage.getItem("usertodoflg"),this.dealerPortalrestflg=localStorage.getItem("dealerPortalrestflg"),console.log(this.usertodoflg,"usertodoflg"),null!=this.navdata?(this.data=this.navdata.data,this.useroption=this.navdata.useroption,this.page=this.navdata.page,this.quotenaviflg=this.navdata.quotenaviflg,"add"==this.useroption?(this.buttonText="Submit",this.showother=!1,this.heading="Add Contact",this.sameaddress=!0,this.selectcontact=!1):"view"==this.useroption?(this.selectedsegment="histroy",this.buttonText="Update",this.showother=!0,this.heading="Contact View","Y"==this.quotenaviflg?(this.custid=this.navdata.qcustid,c
1onsole.log(this.navdata.qcustid,this.navdata.data.CUSTOMER_ID,"idss")):this.custid=this.navdata.data.CUSTOMER_ID,console.log(this.navdata.data.CUSTOMER_ID,"data"),this.firstname=this.navdata.selectedcustomerName):"edit"==this.useroption&&(this.buttonText="Update",this.selectedsegment="histroy",this.showother="4"!=this.constant.usertype,this.heading="Contact View",this.customerdata=this.navdata.data,this.custid="Y"==this.quotenaviflg?this.navdata.qcustid:this.navdata.data.CUSTOMER_ID)):this.back()}ngOnInit(){console.log("cus id & temp cus id ",this.custid,this.tempcustid),this.datatabledata={username:this.constant.getUsername(),companyid:this.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:this.constant.platform,custid:this.custid}}ionViewDidEnter(){var e=this;return(0,d.Z)(function*(){e.workflowstatus(),e.quoteworkflowstatus(),console.log(e.custid,"this.custid"),e.getcustomerdetailscount(),e.noteflg="N",e.btnname="Add Notes",e.phonelblone="Phone W",e.phonelbltwo="Phone H",e.secemail="Secondary Email",e.tempphonelbltwo=e.phonelbltwo,e.tempphonelblone=e.phonelblone,e.tempmpseclbl=e.secemail,e.user_name=e.constant.getUsername(),e.c_id=e.constant.getCompanyId(),e.constant.usertype=localStorage.getItem("usertype"),e.navdata=JSON.parse(localStorage.getItem("customerview_data")),e.protalQuoteFlg=localStorage.getItem("protalQuoteFlg"),null!=e.navdata&&(e.data=e.navdata.data,e.useroption=e.navdata.useroption,e.page=e.navdata.page,"add"==e.useroption?(e.buttonText="Submit",e.showother=!1,e.heading="Add Contact",e.sameaddress=!0,e.selectcontact=!1):"view"==e.useroption?(e.selectedsegment="histroy",e.buttonText="Update",e.showother=!0,e.heading="Contact Details",e.custid="Y"==e.quotenaviflg?e.navdata.qcustid:e.navdata.data.CUSTOMER_ID,console.log(e.navdata.qcustid,e.navdata.data.CUSTOMER_ID,"idss"),console.log(e.custid,"inview")):"edit"==e.useroption&&(e.buttonText="Update",e.selectedsegment="histroy",e.showother="4"!=e.constant.usertype,e.heading="Contact Details",e.customerdata=e.navdata.data,"Y"==e.quotenaviflg?(e.custid=e.navdata.qcustid,console.log(e.navdata.qcustid,e.navdata.data.CUSTOMER_ID,"idssee")):e.custid=e.navdata.data.CUSTOMER_ID)),null!=e.navdata&&(e.savenote=""),console.log(e.custid,"idssss"),yield e.getCustomerRecords(),yield e.viewNotes()})()}back(){var e=this;return(0,d.Z)(function*(){if(console.log("hiw--2",e.useroption),"Y"==e.addcontactnew)console.log("hiw--2"),e.hideselectcontact="N",e.useroption="view",e.selectedsegment="histroy",e.buttonText="Update",e.showother=!0,e.heading="Contact Details","Y"==e.savecusbfrbillflg?(console.log("back-1"),e.custid=e.navdata.data.CUSTOMER_ID,e.datatabledata={username:e.constant.getUsername(),companyid:e.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:e.constant.platform,custid:e.custid}):(e.navdata=JSON.parse(localStorage.getItem("customerview_data")),e.savecusbfrbillflg="",console.log("back-2",e.navdata),e.custid=e.navdata.data.CUSTOMER_ID,e.datatabledata={username:e.constant.getUsername(),companyid:e.constant.getCompanyId(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:e.constant.platform,custid:e.custid},console.log("this.datatabledata",e.datatabledata),e.quotes=[]),e.ionViewDidEnter();else if("view"==e.useroption&&"calendardayview"!=e.page&&"quote"!=e.page&&"todo-list"!=e.page)console.log("view"),localStorage.removeItem("customerview_data"),localStorage.removeItem("customerview_edit"),e.navctrl.navigateRoot("/customer");else if("add"==e.useroption&&"customerlist"==e.page)console.log("add - customerlist"),e.navdata=JSON.parse(localStorage.getItem("customerview_data")),e.protalQuoteFlg=localStorage.getItem("protalQuoteFlg"),null!=e.navdata?(console.log("hi--1"),e.data=e.navdata.data,e.useroption=e.navdata.useroption,e.page=e.navdata.page,"add"==e.useroption?(e.buttonText="Submit",e.showother=!1,e.heading="Add Contact",e.sameaddress=!0,e.selectcontact=!1):"view"==e.useroption&&"quote"!=e.page?(e.selectedsegment="histroy",e.buttonText="Update",e.showother=!0,e.heading="Contact Details",e.custid=e.navdata.data.CUSTOMER_ID):"edit"==e.useroption?(e.buttonText="Update",e.selectedsegment="histroy",e.showother="4"!=e.constant.usertype,e.heading="Contact Details",e.customerdata=e.navdata.data,e.custid=e.navdata.data.CUSTOMER_ID):"quote"==e.page&&e.navctrl.back(),e.navctrl.back()):e.back();else if("add"==e.useroption)console.log("add "),e.navctrl.back();else{const s=JSON.parse(localStorage.getItem("calendar_dailyViewData"));var o=new Date(e.navdata.datestart),i={data:e.customerdata,userdata:e.navdata.userdata||(null==s?void 0:s.userdata)||"",date:o.getDate()||(null==s?void 0:s.date)||"",month:o.getMonth()+1||(null==s?void 0:s.month)||"",year:o.getFullYear()||(null==s?void 0:s.year)||"",time:e.navdata.time,customerAdress:e.customerdata,selecteduser:e.navdata.selecteduser,selectedAppointmentType:e.navdata.selectedAppointmentType,selectedStatus:e.navdata.selectedStatus,orders:e.navdata.orders,pos:e.navdata.pos,selectedpos:e.navdata.selectedpos,selectedorder:e.navdata.selectedorder,apptpageflag:e.navdata.apptpageflag,appointments:e.navdata.appointments,flag:"monthly"};"calendardayview"===e.page?e.navctrl.navigateRoot("/calendar-dailyview"):(localStorage.setItem("calendar_dailyViewData",JSON.stringify(i)),e.navctrl.back())}})()}quoteworkflowstatus(){var e=this;return(0,d.Z)(function*(){e.http.post(e.globals.url+"ctrl_quote.php?run=getQuoteworkflowstatus",JSON.stringify({companyid:e.c_id,deviceType:e.constant.platform}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(i=>{throw"error in source. Details: "+i})).subscribe(i=>{if(e.status=i.status,"success"==e.status){e.quotes=[],e.workflowquotestatuslist=i.message.quotestatus,e.quotestatus=[];for(let l=0;l<e.quotes.length;l++)for(let c=0;c<(null===(s=e.workflowquotestatuslist)||void 0===s?void 0:s.length);c++){var s;e.workflowquotestatuslist[c].ORDER_STATUS_CD==e.quotes[l].QUOTE_
1STATUS&&(e.quotestatus[l]=e.workflowquotestatuslist[c].ORDER_STATUS_DESC)}}else"failure"==e.status&&(e.workflowquotestatuslist=i.message)})})()}workflowstatus(){var e=this;return(0,d.Z)(function*(){e.http.post(e.globals.url+"ctrl_order.php?run=workflowstatus",JSON.stringify({companyid:e.c_id,deviceType:e.constant.platform}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(i=>{throw"error in source. Details: "+i})).subscribe(i=>{if(e.status=i.status,"success"==e.status){e.workflowstatuslist=i.message.orderstatus;for(let l=0;l<(null===(s=e.workflowstatuslist)||void 0===s?void 0:s.length);l++){var s;console.log(e.customerorderlast,"workingggg"),null!=e.customerorderlast&&e.workflowstatuslist[l].ORDER_STATUS_CD==e.customerorderlast[0].ORDER_STATUS&&(e.order_sts=e.workflowstatuslist[l].ORDER_STATUS_DESC)}}else"failure"==e.status&&(e.workflowstatuslist=i.message)})})()}repairworkflowstatus(){var e=this;return(0,d.Z)(function*(){e.http.post(e.globals.url+"ctrl_order.php?run=workflowstatus",JSON.stringify({companyid:e.c_id,deviceType:e.constant.platform}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(i=>{throw"error in source. Details: "+i})).subscribe(i=>{if(e.status=i.status,"success"==e.status){e.workflowstatuslist=i.message.orderstatus,e.orderstatus=[],e.postatus=[],e.repairstatus=[];for(let s=0;s<e.orders.length;s++)for(let l=0;l<e.workflowstatuslist.length;l++)e.workflowstatuslist[l].ORDER_STATUS_CD==e.orders[s].ORDER_STATUS&&(e.orderstatus[s]=e.workflowstatuslist[l].ORDER_STATUS_DESC);e.workflowpostatuslist=i.message.postatus;for(let s=0;s<e.pos.length;s++)for(let l=0;l<e.workflowpostatuslist.length;l++)e.workflowpostatuslist[l].ORDER_STATUS_CD==e.pos[s].PO_STATUS&&(e.postatus[s]=e.workflowpostatuslist[l].ORDER_STATUS_DESC);for(let s=0;s<e.repairs.length;s++)for(let l=0;l<e.workflowstatuslist.length;l++)e.workflowstatuslist[l].ORDER_STATUS_CD==e.repairs[s].ORDER_STATUS&&(e.repairstatus[s]=e.workflowstatuslist[l].ORDER_STATUS_DESC)}else"failure"==e.status&&(e.workflowstatuslist=i.message)})})()}poworkflowstatus(){var e=this;return(0,d.Z)(function*(){e.http.post(e.globals.url+"ctrl_order.php?run=workflowstatus",JSON.stringify({companyid:e.c_id,deviceType:e.constant.platform}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{}),(0,C.V)(e.constant.connectionTimeout),(0,x.K)(i=>{throw"error in source. Details: "+i})).subscribe(i=>{e.status=i.status,"success"==e.status||"failure"==e.status&&(e.workflowstatuslist=i.message)})})()}ionViewDidLeave(){this.doneflg="Y",this.secdoneflg="Y",this.firstname="",this.lastName="",this.bussnesName="",this.spouseName="",this.childName="",this.petName="",this.address1="",this.address2="",this.Zipcode="",this.solicit="Y",this.cityName="",this.phoneMobile="",this.phoneWork="",this.phoneHome="",this.email="",this.gateCode="",this.salestax="N",this.sCode=[],this.selectedstateCode="",this.state="",this.cType=[],this.selectedrefer="",this.cusType="",this.selectedcus="",this.cusDet=[],this.notes=[],this.updateVisibleNotes(),this.referalmethos="",this.statecode="",this.billfirstname="",this.billlastName="",this.billaddress1="",this.billaddress2="",this.billZipcode="",this.billphone="",this.billemail="",this.billcityName="",this.billstate="",this.ContactStatus="",this.SelectedContactStatus="",this.leadContactStatusAry=[],this.otherContactStatusAry=[],this.ContactType="",this.SalesPerson="",this.contType=[],this.selectedcontacttype="",this.selectcontact=!1,this.custid="",this.subdiviname="",this.billsubdiviname="",this.custLocation=""}getCustomerRecords(){var e=this;return(0,d.Z)(function*(){let o,i;console.log("cust id",e.custid,e.navdata),console.log("getCustomerRecords()"),null!=e.navdata.data&&null!=e.navdata.data.COMPANY_ID?(o=e.navdata.data.COMPANY_ID,i="brosewer"):(o=e.c_id,i=e.constant.platform);const s=yield e.loadctrl.create({message:"Loading.."});return yield s.present(),e.http.post(e.globals.url+"ctrl_cust.php?run=displaySingleCustomerRecords",JSON.stringify({companyid:e.c_id,custid:e.custid,deviceType:e.constant.platform}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>
1{s.dismiss(),("success"==e.status||"failure"==e.status)&&(e.status="")})).subscribe(c=>{if(e.status=c.status,"logout"==e.status)e.logoutalert(c.message),e.appcom.clearValue();else if("success"==c.SingleCustomerRecord.status){var u,p,g,T,m,w,v,Z,U,k;e.responsedata=c.SingleCustomerRecord.message[0],e.cusType=e.responsedata.CUSTOMER_TYPE_CODE||"",""!=e.navdata.selectedcustomerName&&null!=e.navdata.selectedcustomerName&&e.navdata.qcustid?e.firstname=e.navdata.selectedcustomerName:(e.firstname=e.responsedata.FIRST_NAME||"",e.lastName=e.responsedata.LAST_NAME||""),e.deletedflg=e.responsedata.DELETED_FLG||"",e.bussnesName=e.responsedata.BUSINESS_NAME||"",e.spouseName=e.responsedata.SPOUSE_NAME||"",e.childName=e.responsedata.CHILDREN_NAME||"",e.petName=e.responsedata.PET_NAME||"",e.address1=e.responsedata.ADDRESS_1||"",e.address2=e.responsedata.ADDRESS_2||"",e.Zipcode=e.responsedata.ZIP_CD||"",e.solicit="Y"==e.responsedata.SOLICIT_FLG?"Yes":"No",e.statecode=e.responsedata.STATE_CD||"",e.selectedstateCode=e.responsedata.STATE_CD||"",e.cityName=e.responsedata.CITY_NAME||"",e.phoneMobile=e.responsedata.PHONE_MOBILE||"",e.phoneWork=e.responsedata.PHONE_WORK||"",e.phoneHome=e.responsedata.PHONE_HOME||"",e.email=e.responsedata.EMAIL_PRIMARY||"",e.gateCode=e.responsedata.GATE_CODE||"",e.custLocation=e.responsedata.LOCATION_ID_DESC||"",e.sidemark=e.responsedata.SIDE_MARK||"",e.leadTimeLabel=(null===(u=e.leadTimeList.find(A=>A.code===e.responsedata.LEAD_TIME))||void 0===u?void 0:u.label)||"-",e.shipViaLabel=(null===(p=e.shipViaList.find(A=>A.code===e.responsedata.SHIP_VIA))||void 0===p?void 0:p.label)||"-",e.salestax="Y"==e.responsedata.NO_SALES_TAX?"Yes":"No",e.referalmethos=e.responsedata.REFERAL_METHOD||"",e.sessionid=e.responsedata.UPD_SYNC_SESS_ID||"",e.ContactTypeFlg=e.responsedata.CONTACT_TYPE_FLG||"",e.ContactType=e.responsedata.CONTACT_TYPE||"",e.ContactStatus=e.responsedata.CONTACT_STATUS||"",e.selectedcontacttype=e.ContactType||"",e.SelectedContactStatus=e.ContactStatus||"",e.selectedcus=e.cusType||"",e.selectedrefer=e.referalmethos||"",e.billcontactid=e.responsedata.BILL_CONTACT_ID||"",e.subdiviname=e.responsedata.NEIGHBORHOOD||"",e.secondaryemail=e.responsedata.SECONDARY_EMAIL||"",e.reference=e.responsedata.REFERAL_METHOD_DESC||"",e.cust_type=e.responsedata.CUSTOMER_TYPE_DESC||"",e.cont_type=e.responsedata.CONTACT_TYPE_DESC||"",e.cont_sts=e.responsedata.CONTACT_STATUS_DESC||"",e.sales_person=(e.responsedata.USER_FIRST_NAME||"")+" "+(e.responsedata.USER_LAST_NAME||""),e.data.CC_SURCHARGE_PERCENT=e.responsedata.CC_SURCHARGE_PERCENT||"",e.secemail=null==e.responsedata.SEC_EAMIL_LBL?"Secondary Email":e.responsedata.SEC_EAMIL_LBL||"",e.tempphonelbltwo=e.phonelbltwo||"",e.cusDet=[{CUSTOMER_TYPE_CODE:e.responsedata.CUSTOMER_TYPE_CODE,CUSTOMER_TYPE_NAME:e.responsedata.CUSTOMER_TYPE_DESC}],e.cType=[{CODE_VALUE:e.responsedata.REFERAL_METHOD,CODE_DESC:e.responsedata.REFERAL_METHOD_DESC}],e.sCode=[{ST_CD:e.statecode}],"Y"==e.addcontactnew?""!=e.responsedata.BILL_CONTACT_ID&&null!=e.responsedata.BILL_CONTACT_ID?(e.billcontactid=e.responsedata.BILL_CONTACT_ID,e.sameaddress=!1,e.selectcontact=!1):""!=e.responsedata.BILL_FIRST_NAME&&null!=e.responsedata.BILL_FIRST_NAME&&(""!=e.responsedata.BILL_ADDRESS_1&&null!=e.responsedata.BILL_ADDRESS_1||""!=e.responsedata.BILL_ADDRESS_2&&null!=e.responsedata.BILL_ADDRESS_2)&&""!=e.responsedata.BILL_ZIP_CD&&null!=e.responsedata.BILL_ZIP_CD&&""!=e.responsedata.BILL_STATE_CD&&null!=e.responsedata.BILL_STATE_CD&&""!=e.responsedata.BILL_CITY_NAME&&null!=e.responsedata.BILL_CITY_NAME&&""!=e.responsedata.BILL_PHONE_MOBILE&&null!=e.responsedata.BILL_PHONE_MOBILE&&""!=e.responsedata.BILL_EMAIL_PRIMARY&&null!=e.responsedata.BILL_EMAIL_PRIMARY&&""!=e.responsedata.BILL_NEIGHBORHOOD&&null!=e.responsedata.BILL_NEIGHBORHOOD?(e.sameaddress=!1,e.selectcontact=!1):(e.sameaddress=!0,e.selectcontact=!0):""!=e.responsedata.BILL_FIRST_NAME&&null!=e.responsedata.BILL_FIRST_NAME&&(""!=e.responsedata.BILL_ADDRESS_1&&null!=e.responsedata.BILL_ADDRESS_1||""!=e.responsedata.BILL_ADDRESS_2&&null!=e.responsedata.BILL_ADDRESS_2)&&""!=e.responsedata.BILL_ZIP_CD&&null!=e.responsedata.BILL_ZIP_CD&&""!=e.responsedata.BILL_STATE_CD&&null!=e.responsedata.BILL_STATE_CD&&""!=e.responsedata.BILL_CITY_NAME&&null!=e.responsedata.BILL_CITY_NAME&&""!=e.responsedata.BILL_PHONE_MOBILE&&null!=e.responsedata.BILL_PHONE_MOBILE&&""!=e.responsedata.BILL_EMAIL_PRIMARY&&null!=e.responsedata.BILL_EMAIL_PRIMARY||""!=e.responsedata.BILL_CONTACT_ID&&null!=e.responsedata.BILL_CONTACT_ID?(e.sameaddress=!1,e.selectcontact=!1):(e.sameaddress=!0,e.selectcontact=!1),"Y"==e.addcontactnew?(console.log("get customer records"),console.log("bill id",e.billcontactid),""!=e.billcontactid&&null!=e.billcontactid?(e.sameaddress=!1,e.selectcontact=!0,e.savecusbfrbillflg="",e.selectedcustomer=e.billcontactid,console.log("sameaddr",e.sameaddressflg,e.sameaddress),""!=e.responsedata.CONTACT_BILL_FIRST_NAME&&null!=e.responsedata.CONTACT_BILL_FIRST_NAME&&""!=e.responsedata.CONTACT_BILL_ADDRESS_1&&null!=e.responsedata.CONTACT_BILL_ADDRESS_1||(""!=e.responsedata.CONTACT_BILL_ADDRESS_2||null!=e.responsedata.CONTACT_BILL_ADDRESS_2)&&""!=e.responsedata.CONTACT_BILL_ZIP_CD&&null!=e.responsedata.CONTACT_BILL_ZIP_CD&&""!=e.responsedata.CONTACT_BILL_CITY_NAME&&null!=e.responsedata.CONTACT_BILL_CITY_NAME&&""!=e.responsedata.CONTACT_BILL_STATE_CD&&null!=e.responsedata.CONTACT_BILL_STATE_CD&&""!=e.responsedata.CONTACT_SHIP_NEIGHBORHOOD&&null!=e.responsedata.CONTACT_SHIP_NEIGHBORHOOD?(e.billcontact=e.responsedata.CONTACT_SHIP_FIRST_NAME+" "+e.responsedata.CONTACT_SHIP_LAST_NAME,e.billName=e.responsedata.CONTACT_BILL_FIRST_NAME+" "+e.responsedata.CONTACT_BILL_LAST_NAME,e.bussnesbillName=e.responsedata.CONTACT_BILL_BUSINESS,e.billphone=e.responsedata.CONTACT_BILL_PHONE_MOBILE,e.billemail=e.responsedata.CONTACT_BILL_EMAIL_PRIMARY,e.billaddress1=e.responsedata.CONTACT_BILL_ADDRESS_1,e.billaddress2=e.responsedata.CONTACT_BILL_ADDRESS_2,e.billZipcode=e.responsedata.CONTACT_BILL_ZIP_CD,e.billcityName=e.responsedata.CONTACT_BILL_CITY_NAME,e.selectedbillstateCode=e.responsedata.CONTACT_BILL_STATE_CD,e.billsubdiviname=e.responsedata.CONTACT_BILL_NEIGHBORHOOD):(e.billcontact=e.responsedata.CONTACT_SHIP_FIRST_NAME+" "+e.responsedata.CONTACT_SHIP_LAST_NAME,e.billName=e.responsedata.CONTACT_SHIP_FIRST_NAME+" "+e.responsedata.CONTACT_SHIP_LAST_NAME,e.bussnesbillName=e.responsedata.CONTACT_SHIP_BUSINESS_NAME,e.billphone=e.getPhoneNO({PHONE_HOME:e.responsedata.CONTACT_SHIP_PHONE_HOME,PHONE_MOBILE:e.responsedata.CONTACT_SHIP_PHONE_MOBILE,PHONE_WORK:e.responsedata.CONTACT_SHIP_PHONE_WORK}),e.billemail=e.responsedata.CONTACT_SHIP_EMAIL_PRIMARY,e.billZipcode=e.responsedata.CONTACT_SHIP_ZIP_CD,e.billaddress1=e.responsedata.CONTACT_SHIP_ADDRESS_1,e.billaddress2=e.responsedata.CONTACT_SHIP_ADDRESS_2,e.bill
1cityName=e.responsedata.CONTACT_SHIP_CITY_NAME,e.selectedbillstateCode=e.responsedata.CONTACT_SHIP_STATE_CD,e.billsubdiviname=e.responsedata.CONTACT_SHIP_NEIGHBORHOOD)):""!=e.responsedata.BILL_FIRST_NAME&&null!=e.responsedata.BILL_FIRST_NAME&&(""!=e.responsedata.BILL_ADDRESS_1&&null!=e.responsedata.BILL_ADDRESS_1||""!=e.responsedata.BILL_ADDRESS_2&&null!=e.responsedata.BILL_ADDRESS_2)&&""!=e.responsedata.BILL_ZIP_CD&&null!=e.responsedata.BILL_ZIP_CD&&""!=e.responsedata.BILL_STATE_CD&&null!=e.responsedata.BILL_STATE_CD&&""!=e.responsedata.BILL_CITY_NAME&&null!=e.responsedata.BILL_CITY_NAME&&""!=e.responsedata.BILL_PHONE_MOBILE&&null!=e.responsedata.BILL_PHONE_MOBILE&&""!=e.responsedata.BILL_EMAIL_PRIMARY&&null!=e.responsedata.BILL_EMAIL_PRIMARY&&""!=e.responsedata.BILL_NEIGHBORHOOD&&null!=e.responsedata.BILL_NEIGHBORHOOD?(e.billfirstname=e.responsedata.BILL_FIRST_NAME,e.billlastName=e.responsedata.BILL_LAST_NAME,e.billName=e.billfirstname+" "+e.billlastName,e.bussnesbillName=e.responsedata.BILL_BUSINESS,e.billaddress1=e.responsedata.BILL_ADDRESS_1,e.billaddress2=e.responsedata.BILL_ADDRESS_2,e.billZipcode=e.responsedata.BILL_ZIP_CD,e.billstate=e.responsedata.BILL_STATE_CD,e.billcityName=e.responsedata.BILL_CITY_NAME,e.billphone=e.responsedata.BILL_PHONE_MOBILE,e.billemail=e.responsedata.BILL_EMAIL_PRIMARY,e.billsubdiviname=e.responsedata.BILL_NEIGHBORHOOD):(console.log("sameadr",e.sameaddressflg),e.sameaddress=!0,e.selectcontact=!1,e.billaddress1=e.responsedata.ADDRESS_1,e.billaddress2=e.responsedata.ADDRESS_2,e.billZipcode=e.responsedata.ZIP_CD,e.billstate=e.responsedata.STATE_CD,e.billcityName=e.responsedata.CITY_NAME,e.billsubdiviname=e.responsedata.NEIGHBORHOOD),e.addcontactnew="N",e.hideselectcontact="N"):""!=e.responsedata.BILL_CONTACT_ID&&null!=e.responsedata.BILL_CONTACT_ID?(e.selectcontact=!0,e.savecusbfrbillflg="",e.selectedcustomer=e.responsedata.BILL_CONTACT_ID,console.log("this.responsedata.BILL_CONTACT_ID",e.responsedata.BILL_CONTACT_ID),""!=e.responsedata.CONTACT_BILL_FIRST_NAME&&null!=e.responsedata.CONTACT_BILL_FIRST_NAME&&""!=e.responsedata.CONTACT_BILL_ADDRESS_1&&null!=e.responsedata.CONTACT_BILL_ADDRESS_1||(""!=e.responsedata.CONTACT_BILL_ADDRESS_2||null!=e.responsedata.CONTACT_BILL_ADDRESS_2)&&""!=e.responsedata.CONTACT_BILL_ZIP_CD&&null!=e.responsedata.CONTACT_BILL_ZIP_CD&&""!=e.responsedata.CONTACT_BILL_CITY_NAME&&null!=e.responsedata.CONTACT_BILL_CITY_NAME&&""!=e.responsedata.CONTACT_BILL_STATE_CD&&null!=e.responsedata.CONTACT_BILL_STATE_CD&&""!=e.responsedata.CONTACT_SHIP_NEIGHBORHOOD&&null!=e.responsedata.CONTACT_SHIP_NEIGHBORHOOD?(e.billcontact=e.responsedata.CONTACT_SHIP_FIRST_NAME+" "+e.responsedata.CONTACT_SHIP_LAST_NAME,e.billName=e.responsedata.CONTACT_BILL_FIRST_NAME+" "+e.responsedata.CONTACT_BILL_LAST_NAME,e.bussnesbillName=e.responsedata.CONTACT_BILL_BUSINESS,e.billphone=e.responsedata.CONTACT_BILL_PHONE_MOBILE,e.billemail=e.responsedata.CONTACT_BILL_EMAIL_PRIMARY,e.billaddress1=e.responsedata.CONTACT_BILL_ADDRESS_1,e.billaddress2=e.responsedata.CONTACT_BILL_ADDRESS_2,e.billZipcode=e.responsedata.CONTACT_BILL_ZIP_CD,e.billcityName=e.responsedata.CONTACT_BILL_CITY_NAME,e.selectedbillstateCode=e.responsedata.CONTACT_BILL_STATE_CD,e.billsubdiviname=e.responsedata.CONTACT_BILL_NEIGHBORHOOD):(e.billcontact=e.responsedata.CONTACT_SHIP_FIRST_NAME+" "+e.responsedata.CONTACT_SHIP_LAST_NAME,e.billName=e.responsedata.CONTACT_SHIP_FIRST_NAME+" "+e.responsedata.CONTACT_SHIP_LAST_NAME,e.bussnesbillName=e.responsedata.CONTACT_SHIP_BUSINESS_NAME,e.billphone=e.getPhoneNO({PHONE_HOME:e.responsedata.CONTACT_SHIP_PHONE_HOME,PHONE_MOBILE:e.responsedata.CONTACT_SHIP_PHONE_MOBILE,PHONE_WORK:e.responsedata.CONTACT_SHIP_PHONE_WORK}),e.billemail=e.responsedata.CONTACT_SHIP_EMAIL_PRIMARY,e.billZipcode=e.responsedata.CONTACT_SHIP_ZIP_CD,e.billaddress1=e.responsedata.CONTACT_SHIP_ADDRESS_1,e.billaddress2=e.responsedata.CONTACT_SHIP_ADDRESS_2,e.billcityName=e.responsedata.CONTACT_SHIP_CITY_NAME,e.selectedbillstateCode=e.responsedata.CONTACT_SHIP_STATE_CD,e.billsubdiviname=e.responsedata.CONTACT_SHIP_NEIGHBORHOOD)):e.sameaddress?(e.billName="",e.billaddress1=e.responsedata.ADDRESS_1,e.billaddress2=e.responsedata.ADDRESS_2,e.billZipcode=e.responsedata.ZIP_CD,e.billstate=e.responsedata.STATE_CD,e.billcityName=e.responsedata.CITY_NAME,e.billphone=e.responsedata.PHONE_MOBILE,e.billemail=e.responsedata.EMAIL_PRIMARY,e.bussnesbillName="",e.billsubdiviname=e.responsedata.NEIGHBORHOOD):(e.billfirstname=""!=e.responsedata.BILL_FIRST_NAME&&null!=e.responsedata.BILL_FIRST_NAME?e.responsedata.BILL_FIRST_NAME:"",e.billlastName=""!=e.responsedata.BILL_LAST_NAME&&null!=e.responsedata.BILL_LAST_NAME?e.responsedata.BILL_LAST_NAME:"",e.billName=e.billfirstname+" "+e.billlastName,e.billaddress1=""!=e.responsedata.BILL_ADDRESS_1&&null!=e.responsedata.BILL_ADDRESS_1?e.responsedata.BILL_ADDRESS_1:"",e.billaddress2=""!=e.responsedata.BILL_ADDRESS_2&&null!=e.responsedata.BILL_ADDRESS_2?e.responsedata.BILL_ADDRESS_2:"",e.billZipcode=""!=e.responsedata.BILL_ZIP_CD&&null!=e.responsedata.BILL_ZIP_CD?e.responsedata.BILL_ZIP_CD:"",e.billstate=""!=e.responsedata.BILL_STATE_CD&&null!=e.responsedata.BILL_STATE_CD?e.responsedata.BILL_STATE_CD:"",e.bill
1cityName=""!=e.responsedata.BILL_CITY_NAME&&null!=e.responsedata.BILL_CITY_NAME?e.responsedata.BILL_CITY_NAME:"",e.billphone=""!=e.responsedata.BILL_PHONE_MOBILE&&null!=e.responsedata.BILL_PHONE_MOBILE?e.responsedata.BILL_PHONE_MOBILE:"",e.billemail=""!=e.responsedata.BILL_EMAIL_PRIMARY&&null!=e.responsedata.BILL_EMAIL_PRIMARY?e.responsedata.BILL_EMAIL_PRIMARY:"",e.bussnesbillName=""!=e.responsedata.BILL_BUSINESS&&null!=e.responsedata.BILL_BUSINESS?e.responsedata.BILL_BUSINESS:"",e.billsubdiviname=""!=e.responsedata.BILL_NEIGHBORHOOD&&null!=e.responsedata.BILL_NEIGHBORHOOD?e.responsedata.BILL_NEIGHBORHOOD:""),"success"==c.statecode.status?(e.sCode=c.statecode.message,e.sCode.forEach(A=>{e.statecode==A.ST_CD&&(e.selectedstateCode=A.ST_CD),e.billstate==A.ST_CD&&(e.selectedbillstateCode=A.ST_CD)}),null!=(null===(g=e.responsedata)||void 0===g?void 0:g.MY5STARZ_ID)&&""!=(null===(T=e.responsedata)||void 0===T?void 0:T.MY5STARZ_ID)&&null!=(null===(m=e.responsedata)||void 0===m?void 0:m.MY5STARZ_ID)&&null!=(null===(w=e.responsedata)||void 0===w?void 0:w.MY5STARZ_DUP_ID)&&""!=(null===(v=e.responsedata)||void 0===v?void 0:v.MY5STARZ_DUP_ID)&&null!=(null===(Z=e.responsedata)||void 0===Z?void 0:Z.MY5STARZ_DUP_ID)&&(null===(U=e.responsedata)||void 0===U?void 0:U.MY5STARZ_DUP_ID)!=(null===(k=e.responsedata)||void 0===k?void 0:k.MY5STARZ_ID)&&e.showDuplicateupdateInfo(e.responsedata)):"failure"==c.statecode.status&&(e.sCode=[],e.message=c.statecode.message,e.showAlert())}else"failure"==c.SingleCustomerRecord.message&&(e.message=c.SingleCustomerRecord.message[0],e.showAlert());console.log("record",e.selectedrefer)}),console.log("NT",e.notes),!0})()}logoutalert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({message:e,buttons:[{text:"Ok"}]})).present()})()}viewNotes(){var e=this;return(0,d.Z)(function*(){e.notesLoadingSpinner=!0;let o={companyid:e.c_id,custid:e.custid,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceType:e.constant.platform};e.http.post(e.globals.url+"ctrl_cust.php?run=viewnotes",o,{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{e.notesLoadingSpinner=!1,("success"==e.status||"failure"==e.status)&&(e.status="")})).subscribe(i=>{e.status=i.status,"success"==e.status&&(e.notes=i.message,e.updateVisibleNotes())})})()}hasAppointmentId(e){const o=null==e?void 0:e.APPOINTMENT_ID;return null!=o&&""!==`${o}`.trim()}hasNoteText(e){const o=null==e?void 0:e.NOTE_TXT;return null!=o&&""!==`${o}`.trim()}shouldShowNote(e){const o=this.hasAppointmentId(e),i=this.hasNoteText(e);return"Y"===this.dealerPortalrestflg?!o&&i:o||i}updateVisibleNotes(){const e=Array.isArray(this.notes)?this.notes:[];this.visibleNotes=e.filter(o=>this.shouldShowNote(o))}showAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,buttons:[{text:"Ok"}]})).present()})()}createQuote(){null!=this.data.CC_SURCHARGE_PERCENT&&""!=this.data.CC_SURCHARGE_PERCENT?(console.log(this.data,"createQuote: this.data"),this.data=this.data):(this.data=this.responsedata,console.log(this.responsedata,"createQuote :this.responsedata")),"Y"==this.dealerPortalrestflg?this.data.SIDE_MARK=this.sidemark:this.data.LAST_NAME=this.lastName,this.data.FIRST_NAME=this.firstname,this.data.CREATED_USER=this.constant.createduser,this.data.PHONE_MOBILE=this.phoneMobile,this.data.EMAIL_PRIMARY=this.email;var e={data:this.data,custid:this.custid,CREATED_USER:this.constant.createduser,option:"add"};console.log(e),localStorage.setItem("addquotedata",JSON.stringify(e)),this.navctrl.navigateForward("/addquote")}createAppoint(){var e=this;return(0,d.Z)(function*(){var o={name:e.user_name};yield(yield e.modalctrl.create({component:J.I,componentProps:{data:e.data,username:o,customerdata:e.responsedata,option:"customer"}})).present()})()}apptnavigate(e,o,i){var s=this;return(0,d.Z)(function*(){s.userdata=[],s.userdata.push({name:s.appt_user});const l=new Date(e);s.formattedDate=s.datePipe.transform(l,"EEE dd MMMM yyyy"),console.log(e,"formattedDate"),s.time=s.datePipe.transform(l,"hh:mm a");var c=s.datePipe.transform(l,"yyyy"),u=s.datePipe.transform(l,"MM/dd"),p=s.datePipe.transform(l,"MM");i.FIRST_NAME=s.firstname,i.LAST_NAME=s.lastName,i.USER_GROUP=i.APPT_USER,i.PHONE_HOME=s.phoneHome,i.PHONE_MOBILE=s.phoneMobile,i.PHONE_WORK=s.phoneWork,i.ADDRESS_1=s.address1,i.ADDRESS_2=s.address2,i.CITY_NAME=s.cityName,i.STATE_CD=s.statecode,i.ZIP_CD=s.Zi
1pcode,i.CUSTOMER_TYPE_NAME=s.cust_type;let g=s.navdata.data;g.APPT_BEGIN_DT_TM=i.APPT_BEGIN_DT_TM,g.APPT_END_DT_TM=i.APPT_END_DT_TM,g.USER_GROUP=i.APPT_USER,g.ARRIVAL_TIME=i.ARRIVAL_TIME,g.STATUS=i.STATUS,g.APPT_TYP=i.APPT_TYP,g.ORDERS_POS=i.ORDERS_POS,g.ORDERS_POS_FLG=i.ORDERS_POS_FLG,g.APPT_REPEAT_TYPE_FLG=i.APPT_REPEAT_TYPE_FLG,g.APPOINTMENT_ID=i.APPOINTMENT_ID,g.REPEAT_APPOINTMENT_ID=i.REPEAT_APPOINTMENT_ID;var T={date:u,month:p,year:c,appointment:i,Appflag:"edit",time:s.time,userdata:{name:i.APPT_USER},flag:"contview",data:s.navdata.data,customerAdress:g,selectedAppointmentType:i.APPT_TYP,selecteduser:i.APPT_USER,apptpageflag:"edit",appt_rpt_type_flg:i.APPT_REPEAT_TYPE_FLG};console.log(T,i,"values"),localStorage.setItem("calendar_dailyViewData",JSON.stringify(T)),s.navctrl.navigateRoot("/calendar-dailyview")})()}segmentChanged(e){var o=this;return(0,d.Z)(function*(){console.log("Segment changed",o.selectedsegment),"order"==o.selectedsegment?o.showOrdersDatatable=!0:"po"==o.selectedsegment?o.showPoDatatable=!0:"repair"==o.selectedsegment?o.showRepairDatatable=!0:"quote"==o.selectedsegment?o.showQuoteDatatable=!0:"files"==o.selectedsegment?o.showFilesDatatable=!0:"histroy"==o.selectedsegment?yield o.viewNotes():"todo"==o.selectedsegment?o.showTodoDatatable=!0:(o.showQuoteDatatable=!1,o.showOrdersDatatable=!1,o.showPoDatatable=!1,o.showRepairDatatable=!1,o.showFilesDatatable=!1,o.showTodoDatatable=!1)})()}orderlist(){return"order"==this.selectedsegment?"show":"hide"}polist(){return"po"==this.selectedsegment?"show":"hide"}quotelist(){return"quote"==this.selectedsegment?"show":"hide"}repairlist(){return"repair"==this.selectedsegment?"show":"hide"}fileslist(){return"files"==this.selectedsegment?"show":"hide"}todolist(){return"todo"==this.selectedsegment?"show":"hide"}actionPopUp(e,o,i,s){var l=this;return(0,d.Z)(function*(){const c=yield l.popctrl.create({component:y.Z,componentProps:{page:i,data:o,event:e,repair:s},mode:"md",event:e,cssClass:"morepop"});yield c.present(),c.onDidDismiss().then(u=>{})})()}quotestatuscolor(e){return"Not Emailed"==e?"redcolor":"blackcolor"}orderstatuscolor(e){return"Balance Due"==e?"redcolor":"blackcolor"}customervieworder(e){this.orderid=e.ORDER_ID,localStorage.setItem("orderview",JSON.stringify({data:e,useroption:"view",page:this.page})),this.navctrl.navigateRoot("/orderview")}ionViewWillLeave(){}getPhoneNO(e){return""!=e.PHONE_HOME&&""==e.PHONE_MOBILE&&""==e.PHONE_WORK?e.PHONE_HOME:""!=e.PHONE_MOBILE?e.PHONE_MOBILE:""!=e.PHONE_WORK&&""==e.PHONE_MOBILE&&""==e.PHONE_HOME?e.PHONE_WORK:void 0}viewCustomer(){var e=this;return(0,d.Z)(function*(){localStorage.setItem("customerview_edit",JSON.stringify({useroption:"edit",page:"customerview"})),e.navctrl.navigateRoot("/customer-edit")})()}showNoteAlert(){var e=this;return(0,d.Z)(function*(){yield(yield e.alertctrl.create({header:"Alert",message:e.message,backdropDismiss:!1,buttons:[{text:"Ok",handler:()=>{e.ionViewDidEnter()}}]})).present()})()}addnotes(){var e=this;return(0,d.Z)(function*(){e.noteflg="Y",e.btnname="Save Notes",e.save()})()}save(){var e=this;return(0,d.Z)(function*(){e.notesValidate=!0,e.savenote=e.savenote.trim();const o=yield e.loadctrl.create({message:"Loading.."});yield o.present(),e.http.post(e.globals.url+"ctrl_cust.php?run=savenotes",JSON.stringify({username:e.user_name,companyid:e.c_id,custid:e.custid,notetxt:e.savenote,deviceType:e.constant.platform}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{o.dismiss(),e.notesValidate=!1,("success"==e.status||"failure"==e.status)&&(e.status="")})).subscribe(s=>{e.status=s.status,e.message=s.message,"success"==e.status?(e.showNoteAlert(),e.noteflg="N",e.btnname="Add Notes"):"failure"==e.status?e.showNoteAlert():"logout"==s.status&&(e.logoutalert(s.message),e.appcom.clearValue())})})()}getcustomerdetailscount(){var e=this;return(0,d.Z)(function*(){let o,i;return null!=e.navdata.data&&null!=e.navdata.data.COMPANY_ID?(o=e.navdata.data.COMPANY_ID,i="brosewer"):(o=e.c_id,i=e.constant.platform),yield e.loadctrl.create({message:"Loading.."}),e.http.post(e.globals.url+"ctrl_cust.php?run=getcustomerdetailscount",JSON.stringify({companyid:e.c_id,custid:e.custid,deviceType:e.constant.platform}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{("success"==e.status||"failure"==e.status)&&(e.status="")})).subscribe(c=>{if(console.log(c,"reponse"),"logout"==e.status)e.logoutalert(c.message),e.appcom.clearValue();else if("success"==c.status1||"success"==c.status2||"success"==c.status3||"success"==c.status4||"success"==c.status5){e.quote_serial_no=c.message1[0].QUOTE_SERIAL_NO,e.quote_total_no=c.message1[0].QUOTE_TOTAL_AMT,e.customerorderlast=c.message2,e.apptresstatus=c.status3;for(let m=0;m<(null===(u=e.workflowquotestatuslist)||void 0===u?void 0:u.length);m++){var u;e.workflowquotestatuslist[m].ORDER_STATUS_CD==c.message1[0].QUOTE_STATUS&&(e.quote_sts=e.workflowquotestatuslist[m].ORDER_STATUS_DESC)}for(let m=0;m<(null===(p=e.workflowstatuslist)||void 0===p?void 0:p.length);m++){var p;e.workflowstatuslist[m].ORDER_STATUS_CD==e.customerorderlast[0].ORDER_STATUS&&(e.order_sts=e.workflowstatuslist[m].ORDER_STATUS_DESC)}console.log(e.quote_sts,"quote_sts"),e.order_serial_no=c.message2[0].ORDER_SERIAL_NO,e.order_total_no=c.message2[0].ORDER_TOTAL_AMT,e.appt_user=c.message3[0].APPT_USER,e.appt_start_time=c.message3[0].APPT_BEGIN_DT_TM,e.a
1ppt_end_time=c.message3[0].APPT_END_DT_TM,e.order_total_no=c.message2[0].ORDER_TOTAL_AMT,e.appt_id=c.message3[0].APPOINTMENT_ID,e.not_ordered=e.quote_count-e.order_count,e.arrival_time=c.message3[0].ARRIVAL_TIME,e.time_differnce=c.message3[0].timediffernce,e.remain_count=e.appt_count-e.complete_appt,console.log("count",e.appt_count,e.complete_appt,e.remain_count),console.log(e.not_ordered,"order_count")}else"failure"==c&&e.showAlert();if("failure"!=c.status2){e.roworderdate=c.message2[0].CREATE_DTM;for(let m=0;m<(null===(g=e.workflowstatuslist)||void 0===g?void 0:g.length);m++){var g;e.workflowstatuslist[m].ORDER_STATUS_CD==c.message2[0].ORDER_STATUS&&(e.rowordersts=e.workflowstatuslist[m].ORDER_STATUS_DESC)}e.textlabel="Order"}else if("failure"!=c.status1){e.roworderdate=c.message1[0].CREATE_DTM;for(let m=0;m<(null===(T=e.workflowquotestatuslist)||void 0===T?void 0:T.length);m++){var T;e.workflowquotestatuslist[m].ORDER_STATUS_CD==c.message1[0].QUOTE_STATUS&&(e.rowordersts=e.workflowquotestatuslist[m].ORDER_STATUS_DESC)}e.textlabel="Quote"}else"failure"!=c.status3&&(e.roworderdate=c.message3[0].APPT_BEGIN_DT_TM,e.rowordersts=c.message3[0].APPT_STATUS,e.textlabel="Appointment");console.log("record",e.selectedrefer)}),console.log("NT",e.notes),!0})()}updatecustomer(){this.hisflg=this.isChecked?"Y":"N"}customertypeandstatuscheck(){return this.contstflg=!("7"==this.ContactStatus&&"2"==this.ContactType||"2"==this.ContactStatus&&"1"==this.ContactType),this.contstflg}ghlopen(e){var o=this;return(0,d.Z)(function*(){window.open("https://app."+o.responsedata.GHL_COMPANY_URL_NAME+".com/v2/location/"+o.responsedata.GHL_LOCATION_ID+"/contacts/detail/"+o.responsedata.MY5STARZ_ID,"_blank")})()}birdeyeopen(e){var o=this;return(0,d.Z)(function*(){window.open(o.globals.url+"brideyegpage.php?&companyid="+o.responsedata.COMPANY_ID+"&ecid="+o.responsedata.BIRDEYE_CUSTOMER_ID+"&username="+o.constant.createduser,"_blank")})()}startEditing(e,o,i){console.log(e,"apptnote"),this.oldNoteText=e.NOTE_TXT,this.editingIndex={parentIndex:o,childIndex:i},this.editedNote=e.NOTE_TXT}saveNote(e,o,i){this.appt_notesid="contact"===i?e.LINKED_NOTE_ID:e.NOTE_ID,this.savenote=this.editedNote?this.editedNote.trim():"",this.savenote?(e.NOTE_TXT=this.savenote,e.CUSTOMER_ID=this.custid,this.oldNoteText!=this.savenote?(this.UpdateNote(),this.editingIndex=null):this.emptyNoteAlert("Please do some changes before save")):this.emptyNoteAlert("Please enter the notes")}cancelEdit(){this.editingIndex=null,this.editedNote=""}UpdateNote(){var e=this;return(0,d.Z)(function*(){e.notesValidate=!0,e.savenote=e.savenote.trim();const o=yield e.loadctrl.create({message:"Loading.."});yield o.present(),e.http.post(e.globals.url+"ctrl_cal.php?run=updateNotes",JSON.stringify({username:e.user_name,companyid:e.c_id,custid:e.custid,notes_text:e.savenote,deviceType:e.constant.platform,notes_id:e.appt_notesid,update_from:"contact",old_notes_text:e.oldNoteText}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{o.dismiss(),e.notesValidate=!1,("success"==e.status||"failure"==e.status)&&(e.status="")})).subscribe(s=>{e.status=s.status,e.message=s.message,"success"==e.status?(e.showNoteAlert(),e.noteflg="N",e.btnname="Add Notes"):"failure"==e.status?e.showNoteAlert():"logout"==s.status&&(e.logoutalert(s.message),e.appcom.clearValue())})})()}emptyNoteAlert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({message:e,buttons:[{text:"Ok"}]})).present()})()}checkContactDuplicate(){var e,o,i,s;return!(null===(e=this.responsedata)||void 0===e||!e.MY5STARZ_DUP_ID||null!=(null===(o=this.responsedata)||void 0===o?void 0:o.MY5STARZ_ID)&&""!=(null===(i=this.responsedata)||void 0===i?void 0:i.MY5STARZ_ID)&&null!=(null===(s=this.responsedata)||void 0===s?void 0:s.MY5STARZ_ID))}sendContactToGhl(){this.reSendContactToGhl(this.responsedata,"N")}reSendContactToGhl(e,o){var i=this;return(0,d.Z)(function*(){const s=yield i.loadctrl.create({message:"Loading.."});yield s.present(),i.http.post(i.globals.url+"ctrl_cust.php?run=SendContactToGHL",JSON.stringify({companyid:i.c_id,customerId:e.CUSTOMER_ID,updateType:
1o,deviceType:i.constant.platform}),{headers:i.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{s.dismiss()}),(0,x.K)(c=>{throw"error in source. Details: "+c})).subscribe(c=>{"success"==c.status?i.showalert("Contact Sent to GHL Successfully"):"failure"==c.status&&c.ghldupcustomerid.length>0&&400==c.responseData.statusCode?i.contactSwapAlert(c.responseData.meta,e):i.showalert("Failed to send contact to GHL")})})()}contactSwapAlert(e,o){var i=this;return(0,d.Z)(function*(){yield(yield i.alertctrl.create({message:`A duplicate contact has been detected in GHL.\n A Customer named ${e.contactName} already exists with the same email address or phone number.\n Do you want to set ${o.FIRST_NAME} ${o.LAST_NAME} in GHL instead of ${e.contactName} Customer?`,buttons:[{text:"cancel"},{text:"Ok",handler:()=>{i.swapGHLContactId(e,o)}}]})).present()})()}swapGHLContactId(e,o){var i=this;return(0,d.Z)(function*(){const s=yield i.loadctrl.create({message:"Loading.."});yield s.present(),i.http.post(i.globals.url+"ctrl_cust.php?run=swapGHLContactId",JSON.stringify({companyid:i.c_id,currentCustomerId:o.CUSTOMER_ID,my5StarzId:e.contactId,deviceType:i.constant.platform}),{headers:i.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{s.dismiss()}),(0,x.K)(c=>{throw"error in source. Details: "+c})).subscribe(c=>{1==c.responseData.succeded&&(i.showalert("Contact Sent to GHL Successfully"),i.ionViewDidEnter())})})()}showalert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({header:"Alert",message:e,buttons:[{text:"Ok"}]})).present()})()}showtoast(e){var o=this;return(0,d.Z)(function*(){yield(yield o.toastctrl.create({message:e,duration:1500})).present()})()}restoreContact(){var e=this;return(0,d.Z)(function*(){const o=yield e.loadctrl.create({message:"Loading.."});yield o.present(),e.http.post(e.globals.url+"ctrl_cust.php?run=restoreDeletedContact",JSON.stringify({companyid:e.c_id,CustomerId:e.custid,deviceType:e.constant.platform,username:e.user_name}),{headers:e.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{o.dismiss()}),(0,x.K)(s=>{throw"error in source. Details: "+s})).subscribe(s=>{"success"==s.status?(e.showtoast(s.message),e.popctrl.dismiss(s),e.getCustomerRecords()):"failure"==s.status&&e.showalert(s.message)})})()}showDuplicateupdateInfo(e){var o=this;return(0,d.Z)(function*(){let i={companyid:o.c_id,customers:e,deviceType:o.constant.platform};o.duplicateupdateInforequest=!0,o.http.post(o.globals.url+"ctrl_cust.php?run=showDuplicateupdateInfo",JSON.stringify(i),{headers:o.globals.header,withCredentials:!0}).pipe((0,b.x)(()=>{o.duplicateupdateInforequest=!1}),(0,x.K)(s=>{throw o.showalert("Error syncing contacts. Please try again."),"error in source. Details: "+s})).subscribe(s=>{"success"===s.status?o.duplicateupdatemassage="Last "+o.responsedata.GHL_COMPANY_URL_NAME+' sync failed. "'+o.responsedata.FIRST_NAME+" "+o.responsedata.LAST_NAME+"\"'s email/phone details were updated with '\""+s.message.FIRST_NAME+" "+s.message.LAST_NAME+"\"'s customer details, resulting in a duplicate email/phone in "+o.responsedata.GHL_COMPANY_URL_NAME+". Please update unique email/phone details to sync "+o.responsedata.GHL_COMPANY_URL_NAME+" successfully.":"failure"===s.status?o.showalert(s.message):"logout"==s.status&&o.appcom.clearValue()})})()}showsynfailedalert(e){var o=this;return(0,d.Z)(function*(){yield(yield o.alertctrl.create({message:e,header:o.responsedata.GHL_COMPANY_URL_NAME+" Sync Failed",buttons:[{text:"Ok"}]})).present()})()}}return(a=r).\u0275fac=function(e){return new(e||a)(t.Y36(_.Dh),t.Y36(S.gz),t.Y36(S.F0),t.Y36(_._q),t.Y36(M.eN),t.Y36(N.s),t.Y36(_.IN),t.Y36(E.y),t.Y36(_.HT),t.Y36(D.x),t.Y36(L.SH),t.Y36(_.Br),t.Y36(_.yF),t.Y36(f.uU))},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-customer-view"]],viewQuery:function(e,o){if(1&e&&t.Gf(O.G,5),2&e){let i;t.iGM(i=t.CRH())&&(o.dtInstance=i.first)}},features:[t._Bn([f.uU])],decls:95,vars:49,consts:[["mode","ios","color","primary",1,"titlewidth"],["slot","start","name","arrow-back",1,"cursor",2,"font-size","32px",3,"click"],[3,"fullscreen"],[1,"customerheader"],[2,"padding-top","25px"],[2,"padding-top","25px","text-align","center"],[2,"color","#ee08b5","font-size","17px","font-weight","500"],[2,"color","green","font-weight","bold"],["name","dots","color","primary",4,"ngIf"],["class","duplicatemassageinfo",3,"click",4,"ngIf"],["style","text-align: right;
1",4,"ngIf"],["class","restorestyle",4,"ngIf"],[2,"padding","0px 20px 0px 20px","background-color","white","margin-top","-8px"],[1,"rowcard"],[2,"margin-top","-5px"],[2,"min-width","250px"],[1,"card"],[4,"ngIf"],[2,"margin-left","5px"],[2,"color","black"],["style","min-width: 250px;",4,"ngIf"],[2,"color","brown"],["mode","md","name","segmenttab",1,"segment","segmentmobileview",3,"hidden","ngModel","ionChange","ngModelChange"],["value","histroy"],["value","quote",1,"segmentbt"],["value","order","class","segmentbt",4,"ngIf"],["value","po",1,"segmentbt"],["value","repair","class","segmentbt",4,"ngIf"],["value","files",1,"segmentbt"],["value","todo","class","segmentbt",4,"ngIf"],[1,"custom-notes-card"],[3,"ngClass"],[1,"tablecard"],[3,"custid",4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"page","custid",4,"ngIf"],["name","dots","color","primary"],[1,"duplicatemassageinfo",3,"click"],["name","information-circle",1,"infoicon"],[2,"text-align","right"],["target","blank",3,"click",4,"ngIf"],["class","capitalize",3,"click",4,"ngIf"],[1,"capitalize",3,"click"],["target","blank",3,"click"],["name","navigate","class","birdicon",4,"ngIf"],["name","navigate",1,"birdicon"],[1,"restorestyle"],[2,"color","red","font-size","17px","font-weight","500"],["color","medium",1,"capitalize",3,"click"],["style","margin-left: 5px;",4,"ngIf"],[2,"color","#0071bc","font-weight","500"],["style","color: black;",4,"ngIf"],["value","order",1,"segmentbt"],["value","repair",1,"segmentbt"],["value","todo",1,"segmentbt"],[1,"txt"],["style","color:black;font-size: initial;margin-left: 10px",4,"ngIf"],[1,"ion-text-end"],[1,"capitalize",2,"height","25px",3,"disabled","click"],["class","listview",4,"ngIf"],["aria-label","","mode","md","name","Upd",2,"top","3px","left","10px",3,"ngModel","disabled","ngModelChange","ionChange"],[2,"color","black","font-size","initial","margin-left","10px"],["aria-label","","mode","md","maxlength","1000",1,"txtarea",3,"ngModel","ngModelChange"],[1,"listview"],[1,"itemview"],[2,"width","80%","margin-left","5px",3,"animated"],[2,"width","60%","margin-left","5px",3,"animated"],[2,"width","30%","margin-left","5px",3,"animated"],["class","itemview",4,"ngFor","ngForOf"],["class","itemview",4,"ngIf"],["style","color: #666;",4,"ngIf"],[2,"color","#666"],[1,"ion-text-wrap"],[2,"color","black","font-weight","500"],[3,"click",4,"ngIf"],["class","edit-container",4,"ngIf"],[3,"click"],["class","note-inline",4,"ngIf"],["name","create-outline",1,"editsize"],[1,"note-inline"],["class","old-text",4,"ngIf"],[1,"new-text"],[1,"old-text"],[1,"edit-container"],["maxlength","1000",2,"height","30px",3,"ngModel","ngModelChange"],["name","checkmark-outline",1,"editsize",3,"click"],["name","close-outline",1,"deletesize",3,"click"],["class","cursor",3,"click",4,"ngIf"],[1,"ion-text-wrap",3,"ngClass"],["class","ion-text-wrap",4,"ngFor","ngForOf"],[1,"cursor",3,"click"],["style","color: black;font-weight: 500;",4,"ngIf"],["maxlength","500",2,"height","30px",3,"ngModel","ngModelChange"],[3,"custid"],[3,"page","custid"],[1,"tablecard",2,"padding","0px !important"],[3,"custid","firstname",4,"ngIf"],[3,"custid","firstname"]],template:function(e,o){1&e&&(t.TgZ(0,"ion-header")(1,"ion-toolbar",0)(2,"ion-icon",1),t.NdJ("click",function(){return o.back()}),t.qZA(),t.TgZ(3,"ion-title"),t._uU(4),t.qZA()()(),t.TgZ(5,"ion-content",2)(6,"ion-row",3)(7,"ion-col",4),t._uU(8),t.qZA(),t.TgZ(9,"ion-col",5)(10,"ion-label")(11,"span",6),t._uU(12),t.qZA(),t._uU(13," ("),t.TgZ(14,"span",7),t._uU(15),t.qZA(),t._uU(16,") "),t.qZA(),t._UZ(17,"br"),t.YNc(18,qt,1,0,"ion-spinner",8),t.YNc(19,Yt,3,1,"ion-label",9),t.qZA(),t.YNc(20,Wt,10,7,"ion-col",10),t.YNc(21,Xt,5,0,"ion-col",11),t.qZA(),t.TgZ(22,"ion-grid",12)(23,"ion-card",13)(24,"ion-row",14)(25,"ion-col",15)(26,"ion-card",16),t.YNc(27,te,5,2,"p",17),t.YNc(28,ee,5,1,"p",17),t.YNc(29,oe,5,1,"p",17),t.YNc(30,ne,9,2,"p",17),t._UZ(31,"p"),t.TgZ(32,"p"),t.YNc(33,ae,4,1,"ion-label",17),t.TgZ(34,"ion-label",18)(35,"span",19),t._uU(36,"Do Not Solicit: "),t.qZA(),t._uU(37),t.qZA()(),t.YNc(38,se,6,2,"p",17),t.YNc(39,re,5,1,"p",17),t.YNc(40,le,5,1,"p",17),t.YNc(41,ce,5,1,"p",17),t.YNc(42,de,5,1,"p",17),t.YNc(43,_e,5,
11,"p",17),t.qZA()(),t.YNc(44,Te,28,11,"ion-col",20),t.YNc(45,Oe,34,10,"ion-col",20),t.TgZ(46,"ion-col")(47,"ion-card",16),t.YNc(48,Ae,3,0,"p",17),t.YNc(49,we,3,0,"p",17),t.YNc(50,Me,7,3,"p",17),t.YNc(51,ve,7,3,"p",17),t.TgZ(52,"p")(53,"ion-label")(54,"span",19),t._uU(55,"Last Quote: "),t.qZA(),t._uU(56),t.YNc(57,Ze,2,0,"span",17),t.YNc(58,Se,2,0,"span",17),t._uU(59),t.TgZ(60,"span",21),t._uU(61),t.qZA()()(),t.YNc(62,Ue,10,5,"p",17),t.qZA()()()(),t.TgZ(63,"ion-card",16)(64,"ion-row")(65,"ion-segment",22),t.NdJ("ionChange",function(s){return o.segmentChanged(s)})("ngModelChange",function(s){return o.selectedsegment=s}),t.TgZ(66,"ion-segment-button",23)(67,"ion-label"),t._uU(68,"Notes"),t.qZA()(),t.TgZ(69,"ion-segment-button",24)(70,"ion-label"),t._uU(71,"Quote"),t.qZA()(),t.YNc(72,ke,3,0,"ion-segment-button",25),t.TgZ(73,"ion-segment-button",26)(74,"ion-label"),t._uU(75,"Purchase Orders"),t.qZA()(),t.YNc(76,qe,3,0,"ion-segment-button",27),t.TgZ(77,"ion-segment-button",28)(78,"ion-label"),t._uU(79,"Files"),t.qZA()(),t.YNc(80,Ye,3,0,"ion-segment-button",29),t.qZA()(),t.TgZ(81,"ion-card",30),t.YNc(82,Io,13,7,"div",17),t.TgZ(83,"div",31)(84,"ion-card",32),t.YNc(85,Mo,1,1,"app-quote-datatable",33),t.qZA()(),t.YNc(86,Do,3,2,"div",34),t.TgZ(87,"div",31)(88,"ion-card",32),t.YNc(89,yo,1,2,"app-po-datatable",35),t.qZA()(),t.YNc(90,Zo,3,2,"div",34),t.TgZ(91,"div",31)(92,"ion-card",32),t.YNc(93,So,1,1,"app-files-list",33),t.qZA()(),t.YNc(94,Ro,3,2,"div",34),t.qZA()()()()),2&e&&(t.xp6(4),t.Oqu(o.heading),t.xp6(1),t.Q6J("fullscreen",!0),t.xp6(3),t.hij(" ",o.bussnesName," "),t.xp6(4),t.AsE("",o.firstname," ",o.lastName," "),t.xp6(3),t.Oqu(o.cont_sts),t.xp6(3),t.Q6J("ngIf",o.duplicateupdateInforequest),t.xp6(1),t.Q6J("ngIf",""!=o.duplicateupdatemassage&&null!=(null==o.responsedata?null:o.responsedata.MY5STARZ_ID)&&""!=(null==o.responsedata?null:o.responsedata.MY5STARZ_ID)&&null!=(null==o.responsedata?null:o.responsedata.MY5STARZ_ID)&&null!=(null==o.responsedata?null:o.responsedata.MY5STARZ_DUP_ID)&&""!=(null==o.responsedata?null:o.responsedata.MY5STARZ_DUP_ID)&&null!=(null==o.responsedata?null:o.responsedata.MY5STARZ_DUP_ID)&&(null==o.responsedata?null:o.responsedata.MY5STARZ_DUP_ID)!=(null==o.responsedata?null:o.responsedata.MY5STARZ_ID)),t.xp6(1),t.Q6J("ngIf","D"!=o.deletedflg),t.xp6(1),t.Q6J("ngIf","D"==o.deletedflg),t.xp6(6),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(3),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(4),t.hij("",o.solicit," "),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","Y"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","Y"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","Y"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(3),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf","Y"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf",o.time_differnce<0&&"N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngIf",o.time_differnce>0&&"N"==o.dealerPortalrestflg),t.xp6(5),t.Oqu(o.quote_serial_no),t.xp6(1),t.Q6J("ngIf",o.quote_serial_no),t.xp6(1),t.Q6J("ngIf",o.quote_total_no),t.xp6(1),t.Oqu(o.quote_total_no),t.xp6(2),t.hij(" ",o.quote_sts,""),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(3),t.Q6J("hidden","4"==o.constant.usertype)("ngModel",o.selectedsegment),t.xp6(7),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(4),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(4),t.Q6J("ngIf","Y"==o.usertodoflg&&"N"==o.dealerPortalrestflg),t.xp6(2),t.Q6J("ngIf","histroy"==o.selectedsegment),t.xp6(1),t.Q6J("ngClass",o.quotelist()),t.xp6(2),t.Q6J("ngIf",o.showQuoteDatatable),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngClass",o.polist()),t.xp6(2),t.Q6J("ngIf",o.showPoDatatable),t.xp6(1),t.Q6J("ngIf","N"==o.dealerPortalrestflg),t.xp6(1),t.Q6J("ngClass",o.fileslist()),t.xp6(2),t.Q6J("ngIf",o.showFilesDatatable),t.xp6(1),t.Q6J("ngIf","Y"==o.usertodoflg&&"N"==o.dealerPortalrestflg))},dependencies:[f.mk,f.sg,f.O5,P.Fj,P.JJ,P.nD,P.On,_.YG,_.PM,_.nz,_.wI,_.W2,_.jY,_.Gu,_.gu,_.Ie,_.Ub,_.Q$,_.q_,_.Nd,_.cJ,_.GO,_.CK,_.PQ,_.g2,_.wd,_.sr,_.w,_.QI,_.j9,K,it,dt,mt,Mt,kt,f.uU],styles:[".card[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;box-shadow:none!important;margin:0}.rowcard[_ngcontent-%COMP%]{background:var(--ion-color-white)!important;border:none!important;padding:3px!important;box-shadow:1px!important;margin-left:0;box-shadow:0 4px 8px #0003}.tablerow[_ngcontent-%COMP%]{vertical-align:middle;display:table-row;height:23px;margin-top:5px}td[_ngcontent-%COMP%]{padding-top:2px;height:12px;vertical-align:middle;margin-top:5px}.td[_ngcontent-%COMP%]{flex:1;padding:6px;color:#000}.td2[_ngcontent-%COMP%]{flex:1;padding:6px}.segmentbt[_ngcontent-%COMP%]{box-shadow:-7px 0 #eff3f6}.segment[_ngcontent-%COMP%]{--color: #000000;background:lightgray;--indicator-color-checked: 0;--background-checked: rgb(0, 113, 188);--color-checked: rgb(255, 255, 255);--background-hover: none;overflow:auto}.table[_ngcontent-%COMP%]{width:100%;border:1px solid black;border-collapse:collapse}.scroll[_ngcontent-%COMP%]{height:200px;width:100%;overflow-y:auto}.custom-notes-card[_ngcontent-%COMP%]{margin:auto;border-radius:0;box-shadow:none;background-color:var(--ion-color-white)!important}.txt[_ngcontent-%COMP%]{color:#205493;font-weight:700;font-size:large;font-family:Merriweather;margin-top:9px;display:block}.tdt[_ngcontent-%COMP%]{color:#000;padding:10px;font-size:17px!important}.spaced-label[_ngcontent-%COMP%]{display:block}.spaced-label[_ngcontent-%COMP%]{display:block;margin-bottom:10px}.fixed-top-border[_ngcontent-%COMP%]{position:sticky;top:0;width:100%;height:1px;z-index:1}.customerheader[_ngcontent-%COMP%]{position:sticky;top:0;width:100%;z-index:1;background-color:#fff;padding:0 20px 0 2px}.show[_ngcontent-%COMP%]{display:block}.hide[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 768px){.table[_ngcontent-%COMP%], .td[_ngcontent-%COMP%]{font-size:14px}.td[_ngcontent-%COMP%]{word-wrap:break-word}}@media only screen and (max-width: 420px){.table[_ngcontent-%COMP%], .td[_ngcontent-%COMP%]{font-size:12px}.td[_ngcontent-%COMP%]{word-wrap:break-word}.segmentmobileview[_ngcontent-%COMP%]{display:table}}@media only screen and (max-width: 768px){.spaced-label[_ngcontent-%COMP%]{display:block;margin-bottom:10px;word-wrap:break-word}.tdt[_ngcontent-%COMP%]{padding:5px}}@media only screen and (max-width: 420px){.spaced-label[_ngcontent-%COMP%]{display:block;margin-bottom:10px;word-wrap:break-word}.tdt[_ngcontent-%COMP%]{padding:5px}.table[_ngcontent-%COMP%]{height:100%}}.txtarea[_ngcontent-%COMP%]{border:1px solid black!important;color:#000;font-size:15px}.listview[_ngcontent-%COMP%]{background-color:#fff;padding:.5%;width:100%}.itemview[_ngcontent-%COMP%]{--background:var(--ion-color-white) !important;font-size:14px}.red[_ngcontent-%COMP%]{color:red;text-decoration:line-through}.darkgray[_ngcontent-%COMP%]{color:#666}.info[_ngcontent-%COMP%]{font-size:20px;vertical-align:middle}.tooltip[_ngcontent-%COMP%]{position:relative;display:inline-block}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;background-color:#dddede;color:#666;text-align:center;border-radius:6px;margin-left:5px;margin-top:-3px;padding:5px}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}p[_ngcontent-%COMP%]{margin:6px}.cursor[_ngcontent-%COMP%]{cursor:pointer}.green[_ngcontent-%COMP%]{color:green}.birdicon[_ngcontent-%COMP%]{font-size:30px;vertical-align:middle;margin-top:13px;color:var(--ion-color-primary);margin-right:10px}.editsize[_ngcontent-%COMP%]{width:30px;height:20px;color:#0071bc;cursor:pointer;margin-left:6px;
1margin-bottom:-5px}.deletesize[_ngcontent-%COMP%]{width:23px;height:23px;color:red;cursor:pointer;margin-bottom:-6px}.note-inline[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.old-text[_ngcontent-%COMP%]{text-decoration:line-through;background-color:#fde8e2;color:#000;padding:1px 6px;border-radius:4px}.new-text[_ngcontent-%COMP%]{background-color:#dffced;color:#000;padding:1px 6px;border-radius:4px}.restorestyle[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:10px}.duplicatemassageinfo[_ngcontent-%COMP%]{color:#ff4500;cursor:pointer}.infoicon[_ngcontent-%COMP%]{font-size:25px;color:#ff4500;cursor:pointer;vertical-align:middle}.single-line[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.todo-message-container[_ngcontent-%COMP%]{max-width:100%}.todo-message-content[_ngcontent-%COMP%]{display:flex;flex-grow:1}.more-btn[_ngcontent-%COMP%]{--padding-start: 4px;--padding-end: 4px;--padding-top: 0;--padding-bottom: 0;height:24px;font-size:12px;margin-left:4px;white-space:nowrap;flex-shrink:0}.html-content[_ngcontent-%COMP%]{font-size:13px;line-height:1.5}.html-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 8px;font-size:13px}.html-content[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-weight:600}.html-content[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-style:italic}.html-content[_ngcontent-%COMP%] u[_ngcontent-%COMP%]{text-decoration:underline}.html-content[_ngcontent-%COMP%] s[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] strike[_ngcontent-%COMP%]{text-decoration:line-through}.html-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .html-content[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:0 0 8px 20px;padding:0}.html-content[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 4px}.html-content[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{border-left:4px solid #ccc;margin:0 0 8px;padding-left:10px;color:#666}.html-content[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#f5f5f5;padding:2px 6px;border-radius:3px;font-family:Courier New,monospace;font-size:12px}.text-content[_ngcontent-%COMP%]{font-size:13px;line-height:1.5}"]}),r})()}];let ko=(()=>{var a;class r{}return(a=r).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[S.Bz.forChild(Uo),S.Bz]}),r})(),qo=(()=>{var a;class r{}return(a=r).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[f.ez,P.u5,_.Pc,ko,O.T]}),r})()}}]);
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.