1"use strict";(self.webpackChunkmasweb_plus=self.webpackChunkmasweb_plus||[]).push([[534],{1534:(qt,N,c)=>{c.r(N),c.d(N,{JobsModule:()=>zt});var y=c(6895),j=c(2953),p=c(1390),r=c(9671),e=c(4650),h=c(4771),v=c(5591);function w(o,a){if(1&o&&(e.ynx(0),e.TgZ(1,"div",4)(2,"span",5),e._uU(3),e.qZA()(),e.BQk()),2&o){const t=e.oxw();e.xp6(3),e.Oqu(t.prompts.NoneFound)}}function R(o,a){1&o&&(e.TgZ(0,"div",17),e._UZ(1,"i",18),e.qZA())}function x(o,a){1&o&&(e.TgZ(0,"div",19),e._UZ(1,"i",20),e.qZA())}function P(o,a){1&o&&(e.TgZ(0,"div",21),e._UZ(1,"i",22),e.qZA())}function M(o,a){if(1&o&&(e.ynx(0),e.TgZ(1,"div",4),e.YNc(2,R,2,0,"div",14),e.YNc(3,x,2,0,"div",15),e.YNc(4,P,2,0,"div",16),e.TgZ(5,"span",5),e._uU(6),e.qZA()(),e.BQk()),2&o){const t=e.oxw();e.xp6(2),e.Q6J("ngIf",t.showGreen),e.xp6(1),e.Q6J("ngIf",t.showRed),e.xp6(1),e.Q6J("ngIf",t.showYellow),e.xp6(2),e.Oqu(t.label)}}function F(o,a){if(1&o){const t=e.EpF();e.TgZ(0,"div",1)(1,"button",23,24),e.NdJ("click",function(){e.CHM(t);const s=e.MAs(2);return e.KtG(s.open())}),e._UZ(3,"i",25),e.qZA()()}if(2&o){e.oxw();const t=e.MAs(32);e.xp6(1),e.Q6J("ngbPopover",t)("autoClose",!0)}}function O(o,a){if(1&o&&(e.TgZ(0,"div",26),e._UZ(1,"i",27),e.TgZ(2,"span",28),e._uU(3),e.qZA()()),2&o){const t=e.oxw();e.xp6(3),e.Oqu(t.mainState.siteAddress)}}function k(o,a){if(1&o&&(e.TgZ(0,"div",26),e._UZ(1,"i",29),e.TgZ(2,"span",28),e._uU(3),e.qZA()()),2&o){const t=e.oxw();e.xp6(3),e.Oqu(t.mainState.sitePhone)}}function Y(o,a){if(1&o){const t=e.EpF();e.TgZ(0,"div",30)(1,"button",31),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.navNewJob())}),e._UZ(2,"i",32),e._uU(3),e.qZA()()}if(2&o){const t=e.oxw();e.xp6(3),e.hij(" ",t.prompts.addJob," ")}}let L=(()=>{class o{constructor(t,n,s,i,l,m){this.router=t,this.activatedRoute=n,this.mainState=s,this.langService=i,this.windowSecurityService=l,this.dataState=m,this.showRed=!1,this.showYellow=!1,this.showGreen=!1,this.allowNewJob=!1,this.dataState.siteNo=Number(this.activatedRoute.snapshot.params.siteNo),this.dataState.systemNo=Number(this.activatedRoute.snapshot.params.systemNo),this.dataState.jobNo=Number(this.activatedRoute.snapshot.params.jobNo),this.mainState.refreshAlarmCutoffAsync(),this.mainState.refreshSiteAsync(),this.mainState.refreshJobAsync(),this.prompts=this.getPrompts(),this.sysCount=0}get hasPhone(){return!!this.mainState?.sitePhone&&this.mainState.sitePhone.trim().length>0}get hasAddress(){return!!this.mainState?.siteAddress&&this.mainState.siteAddress.trim().length>0}get currentSystem(){return this.currentSystemChange}set currentSystem(t){this.currentSystemChange=t,this.label=this.currentSystemChange?t?.acct_no?t.acct_no:this.prompts.none:this.prompts.SelectMsg,this.setSysIcon(t)}ngOnInit(){var t=this;return(0,r.Z)(function*(){const n=t.windowSecurityService.getWindowSec("webtechjobrec");t.colSub=t.dataState.systemListChange.subscribe(s=>{if(t.sysCount=s?s.length:0,0===t.dataState.systemNo&&t.sysCount>0)return void t.onSysChanged(s[0].system_no);const i=s.find(l=>l.system_no===t.dataState.systemNo);i&&(t.currentSystem=i),t.setSysCountMessage()}),t.sysNoSub=t.dataState.systemNoChange.subscribe(s=>{if(t.currentSystem?.system_no!==s){const l=t.dataState.systemListChange.value.find(m=>m.system_no===s);l&&(t.currentSystem=l)}}),t.jobSub=t.mainState.jobChange.subscribe(s=>{t.allowNewJob="N"!==t.mainState?.job?.ok_to_update&&"S"!==t.mainState?.job?.ok_to_update}),t.techjobrecWinSecItem=yield n})()}ngOnDestroy(){this.colSub&&(this.colSub.unsubscribe(),this.colSub=void 0),this.sysNoSub&&(this.sysNoSub.unsubscribe(),this.sysNoSub=void 0),this.jobSub&&(this.jobSub.unsubscribe(),this.jobSub=void 0)}setSysCountMessage(){var t=this.sysCount?.toString()??"";this.sysCountMessage=this.langService.format(1===this.sysCount?this.prompts.sysCount1:this.prompts.sysCount,[t])}onSysChanged(t){if(t){const n=this.dataState.systemListChange.value.find(s=>s.system_no===t);if(n){if(Number(this.dataState.systemNo)===Number(n.system_no))return;this.dataState.systemNo=n.system_no}}}setSysIcon(t){t?.alarm_priority?t.alarm_priority<=this.mainState.alarmHighPriorityCutoff?(this.showRed=!0,this.showYellow=!1,this.showGreen=!1):(this.showRed=!1,this.showYellow=!0,this.showGreen=!1):(this.showRed=!1,this.showYellow=!1,this.showGreen=!0)}nav(t){this.router.navigate(["/","mas","jobs","rec",this.dataState.siteNo,this.dataState.systemNo,this.dataState.jobNo,t])}navNewJob(){this.router.navigate(["/","mas","jobs","rec",this.dataState.siteNo,this.dataState.systemNo,-1,"overview","techjobrec"])}getPrompts(){return{jobOverview:"Job Overview",config:"Config",testing:"Testing",instructions:"Instructions",zones:"Zones",schedules:"Schedules",NoneFound:"No systems found...",addJob:"Add New Job",sysCount:"{0}
1 Systems",sysCount1:"{0} System",none:"(none)"}}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(h.s),e.Y36(v.yh),e.Y36(v.LH),e.Y36(v.NH))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-main"]],decls:33,vars:37,consts:[[1,"mas-row","justify-content-center","container-color","align-items-center","py-2"],[1,"col-auto","m-2"],[1,"text-lg","mas-font","font-weight-bold","align-middle"],[4,"ngIf"],[1,"masbtn","bg-primary-color-10","d-flex","align-items-center"],[1,"flex-grow-1","dd-text","no-wrap","no-select"],["class","col-auto m-2",4,"ngIf"],[1,"mas-row","justify-content-center","container-color","align-items-center"],["class","col-auto mx-1 my-2",4,"ngIf"],[1,"mas-row","container-color"],[1,"col","text-center",3,"click"],[1,"w-100","d-lg-none"],[1,"col","text-center","mas-font",3,"click"],["addTemplate",""],["class","circle-icon-sm bg-grad-success mr-1",4,"ngIf"],["class","circle-icon-sm bg-grad-error mr-1",4,"ngIf"],["class","circle-icon-sm bg-grad-warning mr-1",4,"ngIf"],[1,"circle-icon-sm","bg-grad-success","mr-1"],[1,"icon-good","circle-icon-i-sm","fg-on-status"],[1,"circle-icon-sm","bg-grad-error","mr-1"],[1,"icon-warning","circle-icon-i-sm","fg-on-status"],[1,"circle-icon-sm","bg-grad-warning","mr-1"],[1,"icon-caution","circle-icon-i-sm","fg-on-status"],["type","button","container","body","popoverClass","popover-lookup","triggers","manual",1,"btn","circle-btn","masbtn-default",3,"ngbPopover","autoClose","click"],["popOverAdd","ngbPopover"],[1,"icon-create","circle-icon-i"],[1,"col-auto","mx-1","my-2"],[1,"icon-address","secondary-color"],[1,"font-weight-bold","mas-font"],[1,"icon-phone","secondary-color"],[1,"d-grid",2,"min-width","275px"],["type","button",1,"masbtn-default","masbtn-block","mb-1",3,"click"],[1,"icon-site"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span",2),e._uU(3),e.qZA()(),e.TgZ(4,"div",1),e.YNc(5,w,4,1,"ng-container",3),e.YNc(6,M,7,4,"ng-container",3),e.qZA(),e.TgZ(7,"div",1)(8,"div",4)(9,"span",5),e._uU(10),e.qZA()()(),e.YNc(11,F,4,2,"div",6),e.qZA(),e.TgZ(12,"div",7),e.YNc(13,O,4,1,"div",8),e.YNc(14,k,4,1,"div",8),e.qZA(),e.TgZ(15,"div",9)(16,"div",10),e.NdJ("click",function(){return n.nav("overview")}),e._uU(17),e.qZA(),e.TgZ(18,"div",10),e.NdJ("click",function(){return n.nav("sysconfigview")}),e._uU(19),e.qZA(),e._UZ(20,"div",11),e.TgZ(21,"div",10),e.NdJ("click",function(){return n.nav("testing")}),e._uU(22),e.qZA(),e.TgZ(23,"div",12),e.NdJ("click",function(){return n.nav("instructions")}),e._uU(24),e.qZA(),e._UZ(25,"div",11),e.TgZ(26,"div",12),e.NdJ("click",function(){return n.nav("zones")}),e._uU(27),e.qZA(),e.TgZ(28,"div",12),e.NdJ("click",function(){return n.nav("schedules")}),e._uU(29),e.qZA()(),e._UZ(30,"router-outlet"),e.YNc(31,Y,4,1,"ng-template",null,13,e.W1O)),2&t){let s;e.xp6(3),e.Oqu(null==n.mainState.site?null:n.mainState.site.site_name),e.xp6(2),e.Q6J("ngIf",0===n.sysCount),e.xp6(1),e.Q6J("ngIf",null!==(s=n.sysCount)&&void 0!==s&&s),e.xp6(4),e.Oqu(n.mainState.jobNo),e.xp6(1),e.Q6J("ngIf",n.allowNewJob&&(null==n.techjobrecWinSecItem?null:n.techjobrecWinSecItem.p_add)),e.xp6(2),e.Q6J("ngIf",n.hasAddress),e.xp6(1),e.Q6J("ngIf",n.hasPhone),e.xp6(2),e.ekj("tab-selected",n.mainState.isActiveRoute("overview"))("tab-unselected",!n.mainState.isActiveRoute("overview")),e.xp6(1),e.hij(" ",n.prompts.jobOverview," "),e.xp6(1),e.ekj("tab-selected",n.mainState.isActiveRoute("sysconfigview"))("tab-unselected",!n.mainState.isActiveRoute("sysconfigview")),e.xp6(1),e.hij(" ",n.prompts.config," "),e.xp6(2),e.ekj("tab-selected",n.mainState.isActiveRoute("testing"))("tab-unselected",!n.mainState.isActiveRoute("testing")),e.xp6(1),e.hij(" ",n.prompts.testing," "),e.xp6(1),e.ekj("tab-selected",n.mainState.isActiveRoute("instructions"))("tab-unselected",!n.mainState.isActiveRoute("instructions")),e.xp6(1),e.hij(" ",n.prompts.instructions," "),e.xp6(2),e.ekj("tab-selected",n.mainState.isActiveRoute("zones"))("tab-unselected",!n.mainState.isActiveRoute("zones")),e.xp6(1),e.hij(" ",n.prompts.zones," "),e.xp6(1),e.ekj("tab-selected",n.mainState.isActiveRoute("schedules"))("tab-unselected",!n.mainState.isActiveRoute("schedules")),e.xp6(1),e.hij(" ",n.prompts.schedules," ")}},dependencies:[y.O5,p.lC,j.o8]}),o})();var b=c(9808),u=c(3556),f=c(114);let U=(()=>{class o{constructor(t,n,s,i){this.router=t,this.activatedRoute=n,this.mainState=s,this.jobService=i}get canUpdate(){return"Y"===this.mainState?.job?.ok_to_update}initForm(){this.formSync=new u._z2("weblaborlist",{data:[],options:this.formOptions()})}formOptions(){return{panels:{laborlistpanel:{controls:{navbtn:{isCollapsedFn:t=>!("Y"===t?.dataRow?.activate_link&&this.canUpdate)}}},laborlistbuttons:{isCollapsed:!this.canUpdate}}}}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.jobSub=t.mainState.jobChange.subscribe(()=>{t.initForm(),t.listlistPartsAsync()})})()}ngOnDestroy(){this.jobSub&&(this.jobSub.unsubscribe(),this.jobSub=void 0)}listlistPartsAsync(){var t=this;return(0,r.Z)(function*(){const n={job_no:t.mainState.jobNo},s=yield(0,b.n)(t.jobService.listLabor(n));s&&s.Result&&t.formSync?.dataSource.next(s.Result)})()}nav(t){this.router.navigate(["../laborrec",t],{relativeTo:this.activatedRoute})}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t?.actionType){case 2:n.nav(-1);break;case 18:const s=t.parms;s&&"nav"===t.info&&n.nav(+s.seqno)}})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(h.s),e.Y36(f.O7))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-labor-list"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent"]],template:function(t,n){1&t&&(e.TgZ(0,"ngm-list-form",0),e.NdJ("actionEvent",function(i){return n.onAction(i)}),e.qZA()),2&t&&e.Q6J("formSync",n.formSync)},dependencies:[u.OJd]}),o})();var _=c(7397),g=c(602),S=c(8010);function I(o,a){if(1&o){const t=e.EpF();e.TgZ(0,"ngm-dynamic-form",1),e.NdJ("actionEvent",function(s){e.CHM(t);const i=e.oxw();return e.KtG(i.onAction(s))}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("formSync",t.formSync)}}let E=(()=>{class o{constructor(t,n,s,i,l,m,d,C){this.router=t,this.activatedRoute=n,this.langService=s,this.jobService=i,this.mainState=l,this.mbService=m,this.snackbar=d,this.dateFormat=C,this.seqNo=+this.activatedRoute.snapshot.params.seqNo}
1get isAddMode(){return-1===this.seqNo}ngOnInit(){var t=this;return(0,r.Z)(function*(){const n=t.langService.translateAsync(t.getPrompts(),"JobPartRecComponent");yield t.detailJobLaborAsync(),t.prompts=yield n})()}getLaborAccess(t){var n=this;return(0,r.Z)(function*(){const s={job_no:n.mainState.jobNo,emp_no:n.isAddMode?-1:t.emp_no},i=yield(0,b.n)(n.jobService.accessJobEmp(s));n.laborAccess=i?.Result?i?.Result[0].labor_access:"N"})()}initForm(t){this.formSync=new u._z2("weblaborrec",{formMode:"Y"===this.laborAccess?this.isAddMode?2:1:0,data:t,options:{panels:{laborrecpanel:{recall:{displayValueStyle:"Y"===this.laborAccess?"":"display:block;"},recall_reason:{isCollapsed:"N"===t?.recall_reason_reqd},recall_comment:{isCollapsed:"N"===t?.recall_reason_reqd}}}}})}nav(){this.router.navigate(["../../laborlist"],{relativeTo:this.activatedRoute})}closeJob(t){return!(!(t?.clear_datetime||void 0===t?.clear_datetime&&this.jobLaborItem?.clear_datetime)||"Y"!==this.jobLaborItem?.ok_to_close)}detailJobLaborAsync(){var t=this;return(0,r.Z)(function*(){const n={contact_no:void 0,job_no:t.mainState.jobNo,seqno:t.seqNo},s=yield(0,b.n)(t.jobService.detailJobLabor(n));s&&s.Result?(t.jobLaborItem=s.Result[0],yield t.getLaborAccess(s.Result[0]),t.initForm(s.Result[0])):t.initForm(void 0)})()}SaveLaborAsync(t,n,s){var i=this;return(0,r.Z)(function*(){t.assign_datetime&&(t.assign_date=i.dateFormat.flatten(t.assign_datetime),t.assign_time=i.dateFormat.flatten(t.assign_datetime,g.xp.custom,"HH:mm")),t.enroute_datetime&&(t.enroute_date=i.dateFormat.flatten(t.enroute_datetime),t.enroute_time=i.dateFormat.flatten(t.enroute_datetime,g.xp.custom,"HH:mm")),t.onsite_datetime&&(t.onsite_date=i.dateFormat.flatten(t.onsite_datetime),t.onsite_time=i.dateFormat.flatten(t.onsite_datetime,g.xp.custom,"HH:mm")),t.clear_datetime&&(t.clear_date=i.dateFormat.flatten(t.clear_datetime),t.clear_time=i.dateFormat.flatten(t.clear_datetime,g.xp.custom,"HH:mm"));const l={req_type:n,job_no:i.mainState.jobNo,seqno:i.seqNo,data:JSON.stringify(t)},m=yield(0,b.n)(i.jobService.updateJobLabor(l));if("ok"===m?.Result?.err_msg?.toLowerCase())i.snackbar.open(s.succPrompt,i.prompts.success,{duration:5e3,panelClass:"snack-success"}),s.succFunc();else{let d=m?.Result?.err_msg.replace(/<br>/g,"\n");d||(console.log("---------unexpected error------------",m),d=i.prompts.unexpected),i.snackbar.open(d??"msg is unset",i.prompts.error,{duration:1e4,panelClass:["wrapping-snackbar","snack-error"]}),s.errFunc()}i.formSync?.commands.next({command:u.vj7.saveEnd})})()}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t.actionType){case 1:n.nav();break;case 4:n.closeJob(t.parms)&&(t.parms.close_job=(yield n.mbService.showAsync(n.prompts.closeJobMessage,{buttons:_.Zq.OkCancel,icon:_.S1.Caution,isHtml:!0}))===_.m4.Ok?"Y":"N"),yield n.SaveLaborAsync(t.parms,n.isAddMode?"A":"C",{succPrompt:n.prompts.saveSuccessMessage,succFunc:()=>{n.mainState.refreshJobAsync(),n.nav()},errFunc:()=>{}})}})()}getPrompts(){return{closeJobMessage:"Do You Want To Close This Job?</br>Click Ok to close this job or Cancel to leave the job open.",saveSuccessMessage:"Assignment saved successfully",success:"Success",error:"Error",unexpected:"An unexpected error has occured"}}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(v.yh),e.Y36(f.O7),e.Y36(h.s),e.Y36(_.SW),e.Y36(S.ux),e.Y36(g.US))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-labor-rec"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent",4,"ngIf"],[3,"formSync","actionEvent"]],template:function(t,n){1&t&&e.YNc(0,I,1,1,"ngm-dynamic-form",0),2&t&&e.Q6J("ngIf",n.formSync)},dependencies:[y.O5,u.rmD]}),o})(),z=(()=>{class o{constructor(){}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-labors"]],decls:3,vars:0,consts:[[1,"mas-row","page-container-bottom"],[1,"col"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"router-outlet"),e.qZA()())},dependencies:[p.lC]}),o})(),q=(()=>{class o{constructor(t,n,s){this.router=t,this.mainState=n,this.langService=s,this.prompts=this.getPrompts()}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.prompts=yield t.langService.translateAsync(t.getPrompts(),"JobOverviewComponent")})()}getPrompts(){return{general:"General",serviceDetails:"Service Details",payment:"Payment",parts:"Parts",labors:"Labor",eventHistory:"Event History"}}nav(t){this.router.navigate(["/","mas","jobs","rec",this.mainState.siteNo,this.mainState.systemNo,this.mainState.jobNo,"overview",t])}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(h.s),e.Y36(v.yh))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-overview"]],decls:13,vars:20,consts:[[1,"mas-row","m-1"],[1,"col","m-3","mas-font"],[1,"mas-row","tab-default"],[1,"col","text-center",3,"click"],[1,"w-100","d-lg-none"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.NdJ("click",function(){return n.nav("techjobrec")}),e._uU(4),e.qZA(),e.TgZ(5,"div",3),e.NdJ("click",function(){return n.nav("parts")}),e._uU(6),e.qZA(),e._UZ(7,"div",4),e.TgZ(8,"div",3),e.NdJ("click",function(){return n.nav("labors")}),e._uU(9),e.qZA(),e.TgZ(10,"div",3),e.NdJ("click",function(){return n.nav("jobpayments")}),e._uU(11),e.qZA()(),e._UZ(12,"router-outlet"),e.qZA()()),2&t&&(e.xp6(3),e.ekj("tab-selected",n.mainState.isActiveRoute("techjobrec"))("tab-unselected",!n.mainState.isActiveRoute("techjobrec")),e.xp6(1),e.hij(" ",n.prompts.serviceDetails," "),e.xp6(1),e.ekj("tab-selected",n.mainState.isActiveRoute("parts"))("tab-unselected",!n.mainState.isActiveRoute("parts")),e.xp6(1),e.hij(" ",n.prompts.parts," "),e.xp6(2),e.ekj("tab-selected",n.mainState.isActiveRoute("labors"))("tab-unselected",!n.mainState.isActiveRoute("labors")),e.xp6(1),e.hij(" ",n.prompts.labors," "),e.xp6(1),e.ekj("tab-selected",n.mainState.isActiveRoute("jobpayments"))("tab-unselected",!n.mainState.isActiveRoute("jobpayments")),e.xp6(1),e.hij(" ",n.prompts.payment," "))},dependencies:[p.lC],styles:[".tab-default[_ngcontent-%COMP%]{background-color:var(--container-color)}"]}),o})(),Q=(()=>{class o{constructor(t,n,s,i){this.router=t,this.activatedRoute=n,this.mainState=s,this.jobService=i}get canUpdate(){return"Y"===this.mainState?.job?.ok_to_update}initForm(){this.formSync=new u._z2("webpartlist",{data:[],options:this.formOptions()})}formOptions(){return{panels:{partlistpanel:{controls:{navbtn:{isCollapsedFn:t=>!("Y"===t?.dataRow?.activate_link&&this.canUpdate)}}},partlistbuttons:{isCollapsed:!this.canUpdate}}}}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.jobSub=t.mainState.jobChange.subscribe(n=>{t.initForm(),t.listPartsAsync()})})()}ngOnDestroy(){this.jobSub&&(this.jobSub.unsubscribe(),this.jobSub=void 0)}listPartsAsync(){var t=this;return(0,r.Z)(function*(){const n={job_no:t.mainState.jobNo,item_no:void 0},s=yield(0,b.n)(t.jobService.listParts(n));s&&s.Result&&t.formSync?.dataSource.next(s.Result)})()}nav(t){this.router.navigate(["../partrec",t],{relativeTo:this.activatedRoute})}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t?.actionType){case 2:n.nav(-1);break;case 18:const s=t.parms;s&&"nav"===t.info&&n.nav(+s.jobline_no)}})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(h.s),e.Y36(f.O7))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-part-list"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent"]],template:function(t,n){1&t&&(e.TgZ(0,"ngm-list-form",0),e.NdJ("actionEvent",function(i){return n.onAction(i)}),e.qZA()),2&t&&e.Q6J("formSync",n.formSync)},dependencies:[u.OJd]}),o})();function D(o,a){if(1&o){const t=e.EpF();e.TgZ(0,"ngm-dynamic-form",1),e.NdJ("actionEvent",function(s){e.CHM(t);const i=e.oxw();return e.KtG(i.onAction(s))}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("formSync",t.formSync)}}let H=(()=>{class o{constructor(t,n,s,i,l,m,d){this.router=t,this.activatedRoute=n,this.langService=s,this.jobService=i,this.mainState=l,this.mbService=m,this.snackbar=d,this.jobLineNo=+this.activatedRoute.snapshot.params.jobLineNo}
1get isAddMode(){return-1===this.jobLineNo}ngOnInit(){var t=this;return(0,r.Z)(function*(){const n=t.langService.translateAsync(t.getPrompts(),"JobPartRecComponent");t.initForm(),yield t.detailTechPartsAsync(),t.prompts=yield n})()}initForm(){this.formSync=new u._z2("webpartrec",{formMode:this.isAddMode?2:1,options:{panels:{partrecpanel:{item_no:{parms:{site_no:this.mainState.siteNo,job_no:this.mainState.jobNo}},system_config_item:{parms:{system_no:this.mainState.systemNo,job_no:this.mainState.jobNo},isDisabled:!this.isAddMode},item_event_id:{isDisabled:!this.isAddMode}}}},data:{}})}nav(){this.router.navigate(["../../partlist"],{relativeTo:this.activatedRoute})}detailTechPartsAsync(){var t=this;return(0,r.Z)(function*(){const n={job_no:t.mainState.jobNo,job_line:t.jobLineNo},s=yield(0,b.n)(t.jobService.detailTechParts(n));s&&s.Result&&t.formSync?.dataSource.next(s.Result[0])})()}SavePartAsync(t,n,s){var i=this;return(0,r.Z)(function*(){i.isAddMode&&(t.warr_flag||(t.warr_flag="N"),t.cust_owned_flag||(t.cust_owned_flag="N"),void 0!==t.item_event_id&&(t.event_id=t.item_event_id));const l={req_type:n,job_no:i.mainState.jobNo,jobline_no:i.jobLineNo,data:JSON.stringify(t)},m=yield(0,b.n)(i.jobService.updateJobParts(l));if("ok"===m?.Result?.err_msg?.toLowerCase())i.snackbar.open(s.succPrompt,i.prompts.success,{duration:5e3,panelClass:"snack-success"}),s.succFunc();else{let d=m?.Result?.err_msg.replace(/<br>/g,"\n");d||(console.log("---------unexpected error------------",m),d=i.prompts.unexpected),i.snackbar.open(d??"error",i.prompts.error,{duration:1e4,panelClass:["wrapping-snackbar","snack-error"]}),s.errFunc()}i.formSync?.commands.next({command:u.vj7.saveEnd})})()}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t.actionType){case 1:n.nav();break;case 4:yield n.SavePartAsync(t.parms,n.isAddMode?"A":"C",{succPrompt:n.prompts.saveSuccessMessage,succFunc:()=>{n.nav()},errFunc:()=>{}});break;case 6:(yield n.mbService.showAsync(n.prompts.deleteConfirmMsg,{okText:n.prompts.deleteConfirmOk,buttons:_.Zq.OkCancel,icon:_.S1.Caution}))===_.m4.Ok&&(yield n.SavePartAsync({},"D",{succPrompt:n.prompts.deleteSuccessMessage,succFunc:()=>{n.nav()},errFunc:()=>{}}))}})()}getPrompts(){return{saveSuccessMessage:"Parts saved successfully",deleteSuccessMessage:"Parts deleted successfully",success:"Success",error:"Error",deleteConfirmMsg:"Are you sure you want to delete the parts?",deleteConfirmOk:"Delete Parts",unexpected:"An unexpected error has occured"}}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(v.yh),e.Y36(f.O7),e.Y36(h.s),e.Y36(_.SW),e.Y36(S.ux))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-part-rec"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent",4,"ngIf"],[3,"formSync","actionEvent"]],template:function(t,n){1&t&&e.YNc(0,D,1,1,"ngm-dynamic-form",0),2&t&&e.Q6J("ngIf",n.formSync)},dependencies:[y.O5,u.rmD]}),o})(),X=(()=>{class o{constructor(){}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-parts"]],decls:3,vars:0,consts:[[1,"mas-row","page-container-bottom"],[1,"col"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"router-outlet"),e.qZA()())},dependencies:[p.lC]}),o})(),B=(()=>{class o{constructor(t,n,s,i){this.router=t,this.activatedRoute=n,this.mainState=s,this.jobService=i}get canUpdate(){return"Y"===this.mainState?.job?.ok_to_update}initForm(){this.formSync=new u._z2("webjobpaymentlist",{data:[],options:this.formOptions()})}formOptions(){return{panels:{jobpaymentlistpanel:{controls:{navbtn:{isCollapsedFn:()=>!this.canUpdate}}},jobpaymentlistbuttons:{isCollapsed:!this.canUpdate}}}}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.jobSub=t.mainState.jobChange.subscribe(n=>{t.initForm(),t.listPaymentAsync()})})()}ngOnDestroy(){this.jobSub&&(this.jobSub.unsubscribe(),this.jobSub=void 0)}listPaymentAsync(){var t=this;return(0,r.Z)(function*(){const n={job_no:t.mainState.jobNo},s=yield(0,b.n)(t.jobService.listPayment(n));s&&s.Result&&t.formSync?.dataSource.next(s.Result)})()}nav(t){this.router.navigate(["../jobpaymentrec",t],{relativeTo:this.activatedRoute})}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t?.actionType){case 2:n.nav("-1");break;case 18:const s=t.parms;s&&"nav"===t.info&&n.nav(s.jobpaymentno)}})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(h.s),e.Y36(f.O7))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-payment-list"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent"]],template:function(t,n){1&t&&(e.TgZ(0,"ngm-list-form",0),e.NdJ("actionEvent",function(i){return n.onAction(i)}),e.qZA()),2&t&&e.Q6J("formSync",n.formSync)},dependencies:[u.OJd]}),o})();function G(o,a){if(1&o){const t=e.EpF();e.TgZ(0,"ngm-dynamic-form",1),e.NdJ("actionEvent",function(s){e.CHM(t);const i=e.oxw();return e.KtG(i.onAction(s))}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("formSync",t.formSync)}}let K=(()=>{class o{constructor(t,n,s,i,l,m){this.router=t,this.activatedRoute=n,this.langService=s,this.jobService=i,this.mainState=l,this.snackbar=m,this.seqNo=+this.activatedRoute.snapshot.params.seqNo}
1get isAddMode(){return-1===this.seqNo}ngOnInit(){var t=this;return(0,r.Z)(function*(){const n=t.langService.translateAsync(t.getPrompts(),"JobPartRecComponent");yield t.detailJobPaymentAsync(),t.prompts=yield n})()}ngOnDestroy(){this.paymentSub&&(this.paymentSub.unsubscribe(),this.paymentSub=void 0)}formOptions(t){return{panels:{jobpaymentrecpanel:{controls:{card_expire_date:{isDisabled:"CC"!==t?.payment_type},check_no:{isDisabled:"CK"!==t?.payment_type}}}}}}initForm(t){this.formSync=new u._z2("webjobpaymentrec",{formMode:this.isAddMode?2:1,data:t,options:this.formOptions(t)})}nav(){this.router.navigate(["../../jobpaymentlist"],{relativeTo:this.activatedRoute})}trimData(t){t&&Object.keys(t).forEach(n=>{t[n]||delete t[n]})}detailJobPaymentAsync(){var t=this;return(0,r.Z)(function*(){const n={job_no:t.mainState.jobNo,seqno:t.seqNo},s=yield(0,b.n)(t.jobService.detailJobPayment(n));t.initForm(s&&s.Result?s.Result[0]:void 0)})()}createJobPaymentAsync(t,n,s){var i=this;return(0,r.Z)(function*(){i.isAddMode&&i.trimData(t);const l={req_type:n,job_no:i.mainState.jobNo,seq_no:i.seqNo,data:JSON.stringify(t)},m=yield(0,b.n)(i.jobService.createJobPayment(l));if("ok"===m?.Result?.err_msg?.toLowerCase())i.snackbar.open(s.succPrompt,i.prompts.success,{duration:5e3,panelClass:"snack-success"}),s.succFunc();else{let d=m?.Result?.err_msg.replace(/<br>/g,"\n");d||(console.log("---------unexpected error------------",m),d=i.prompts.unexpected),i.snackbar.open(d??"error",i.prompts.error,{duration:1e4,panelClass:["wrapping-snackbar","snack-error"]}),s.errFunc()}i.formSync?.commands.next({command:u.vj7.saveEnd})})()}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t.actionType){case 1:n.nav();break;case 4:yield n.createJobPaymentAsync(t.parms,n.isAddMode?"A":"C",{succPrompt:n.prompts.saveSuccessMessage,succFunc:()=>{n.mainState.jobPaymentChange.next(!0),n.nav()},errFunc:()=>{}});break;case 21:const s=t.parms;s.controls.payment_type.value||s.patchValue({payment_type:"CK"}),s.controls.payment_type?.valueChanges.subscribe(i=>{"CA"===i?(s.patchValue({paytype_id:i,check_no:void 0,card_expire_date:void 0}),n.formSync?.findTreeInstance("check_no").disable(),n.formSync?.findTreeInstance("card_expire_date").disable()):"CK"===i?(s.patchValue({paytype_id:i,card_expire_date:void 0}),n.formSync?.findTreeInstance("check_no").enable(),n.formSync?.findTreeInstance("card_expire_date").disable()):"CC"===i&&(s.patchValue({paytype_id:i,check_no:void 0}),n.formSync?.findTreeInstance("check_no").disable(),n.formSync?.findTreeInstance("card_expire_date").enable())})}})()}getPrompts(){return{saveSuccessMessage:"Payment applied successfully",success:"Success",error:"Error",unexpected:"An unexpected error has occured"}}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(v.yh),e.Y36(f.O7),e.Y36(h.s),e.Y36(S.ux))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-payment-rec"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent",4,"ngIf"],[3,"formSync","actionEvent"]],template:function(t,n){1&t&&e.YNc(0,G,1,1,"ngm-dynamic-form",0),2&t&&e.Q6J("ngIf",n.formSync)},dependencies:[y.O5,u.rmD]}),o})();function W(o,a){if(1&o){const t=e.EpF();e.TgZ(0,"ngm-dynamic-form",1),e.NdJ("actionEvent",function(s){e.CHM(t);const i=e.oxw();return e.KtG(i.onAction(s))}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("formSync",t.formSync)}}let V=(()=>{class o{constructor(t,n,s,i,l,m){this.router=t,this.activatedRoute=n,this.dateFormat=s,this.jobService=i,this.mainState=l,this.snackbar=m,this.prompts=this.getPrompts()}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.jobNoSub=t.activatedRoute.parent?.parent?.params.subscribe(n=>{t.jobNo=+n.jobNo,t.detailJobTechAsync()})})()}ngOnDestroy(){this.jobNoSub&&(this.jobNoSub.unsubscribe(),this.jobNoSub=void 0)}formOptions(t){return{panels:{techjobrecbuttons:{isCollapsed:"Y"!==t?.ok_to_update},techjobrecbuttons2:{isCollapsed:"S"!==t?.ok_to_update}}}}initForm(t){this.formSync=new u._z2("webtechjobrec",{formMode:this.isAddMode()?1:0,data:t,options:this.formOptions(t)})}updateForm(t){this.formSync?.formMode.next(this.isAddMode()?1:0),this.formSync?.dataSource.next(t),this.formSync?.options.next(this.formOptions(t))}isAddMode(){return-1===this.jobNo}getPrompts(){return{unexpected:"An unexpected error has occured",saveSuccessMessage:"Service information saved successfully",reopenSuccessMessage:"Job reopened successfully",success:"Success",error:"Error"}}detailJobTechAsync(){var t=this;return(0,r.Z)(function*(){const n={site_no:t.mainState.siteNo,system_no:t.mainState.systemNo,job_no:t.jobNo},s=yield(0,b.n)(t.jobService.detailJobTech(n));let i;s&&s.Result&&(i=s.Result[0],t.mainState.jobNo===+i.job_no&&(t.mainState.job=i)),t.formSync?t.updateForm(i):t.initForm(i)})()}updateJobTechAsync(t,n,s){var i=this;return(0,r.Z)(function*(){t?.commit_date&&(t.commit_date=i.dateFormat.flatten(t.commit_date));const l={req_type:n,site_no:i.mainState.siteNo,system_no:i.mainState.systemNo,job_no:i.mainState.jobNo,s_cs_no:i.mainState.csNo,data:JSON.stringify(t)}
1,m=yield i.jobService.updateJobTech(l).toPromise();if("ok"===m?.Result?.err_msg?.toLowerCase())i.snackbar.open(s.succPrompt,i.prompts.success,{duration:5e3,panelClass:"snack-success"}),i.mainState.jobNo!==m?.Result?.job_no&&(i.mainState.jobNo=m?.Result?.job_no),s.succFunc();else{let d=m?.Result?.err_msg.replace(/<br>/g,"\n");d||(console.log("---------unexpected error------------",m),d=i.prompts.unexpected),i.snackbar.open(d??"msg is unset",i.prompts.error,{duration:1e4,panelClass:["wrapping-snackbar","snack-error"]}),s.errFunc()}i.formSync?.commands.next({command:u.vj7.saveEnd})})()}reopenJobAsync(t){var n=this;return(0,r.Z)(function*(){const s={job_no:n.mainState.jobNo},i=yield n.jobService.reopenJob(s).toPromise();if("ok"===i?.Result?.err_msg?.toLowerCase())n.snackbar.open(t.succPrompt,n.prompts.success,{duration:5e3,panelClass:"snack-success"}),t.succFunc();else{let l=i?.Result?.err_msg.replace(/<br>/g,"\n");l||(console.log("---------unexpected error------------",i),l=n.prompts.unexpected),n.snackbar.open(l??"msg is unset",n.prompts.error,{duration:1e4,panelClass:["wrapping-snackbar","snack-error"]}),t.errFunc()}})()}nav(t){this.router.navigate(["../../../",t??-1,"overview","techjobrec"],{relativeTo:this.activatedRoute})}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t.actionType){case 1:n.isAddMode()?n.nav(n.mainState.jobNo):n.detailJobTechAsync();break;case 4:yield n.updateJobTechAsync(t.parms,n.isAddMode()?"A":"C",{succPrompt:n.prompts.saveSuccessMessage,succFunc:()=>{n.isAddMode()?n.nav(n.mainState.jobNo):n.detailJobTechAsync()},errFunc:()=>{}});break;case 7:yield n.reopenJobAsync({succPrompt:n.prompts.reopenSuccessMessage,succFunc:()=>{n.detailJobTechAsync()},errFunc:()=>{}})}})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0),e.Y36(p.gz),e.Y36(g.US),e.Y36(f.O7),e.Y36(h.s),e.Y36(S.ux))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-rec"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent",4,"ngIf"],[3,"formSync","actionEvent"]],template:function(t,n){1&t&&e.YNc(0,W,1,1,"ngm-dynamic-form",0),2&t&&e.Q6J("ngIf",n.formSync)},dependencies:[y.O5,u.rmD]}),o})();var $=c(1275);function tt(o,a){if(1&o&&(e.TgZ(0,"div",2)(1,"div",3),e._uU(2),e.qZA()()),2&o){const t=e.oxw();e.xp6(2),e.hij(" ",t.prompts.comments," ")}}function et(o,a){if(1&o){const t=e.EpF();e.TgZ(0,"ngm-dynamic-form",4),e.NdJ("actionEvent",function(s){e.CHM(t);const i=e.oxw();return e.KtG(i.onAction(s))}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("formSync",t.formSync)}}let nt=(()=>{class o{constructor(t,n,s,i){this.jobService=t,this.mainState=n,this.langService=s,this.snackbar=i,this.prompts=this.getPrompts()}get canUpdate(){return"Y"===this.mainState?.job?.ok_to_update}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.initForm(),t.jobSub=t.mainState.jobChange.subscribe(n=>{t.listJobCommentAsync(),t.formSync?.options.next(t.formOptions())}),t.prompts=yield t.langService.translateAsync(t.getPrompts(),"JobCommentComponent")})()}ngOnDestroy(){this.jobSub&&(this.jobSub.unsubscribe(),this.jobSub=void 0)}initForm(){this.formSync=new u._z2("webjobcomments",{formMode:3,data:{},allowInitialFocus:!1})}formOptions(){return{panels:{jobcommentspanel:{canDeleteRowFn:t=>"Added"===t?.controls?._rowstate?.value,canUserAddRows:this.canUpdate,controls:{comment:{isEditableFn:t=>t.isRowAddState}}},jobcommentsbuttons:{isCollapsed:!this.canUpdate}}}}listJobCommentAsync(){var t=this;return(0,r.Z)(function*(){const n={job_no:t.mainState.jobNo},s=yield(0,b.n)(t.jobService.listJobComment(n));s&&s.Result&&t.formSync?.dataSource.next({jobcomments:s.Result})})()}getPrompts(){return{comments:"Additional Comments",saveSuccessMessage:"Comment(s) saved successfully",success:"Success",error:"Error",unexpected:"An unexpected error has occured"}}getUpdateJobCommentListParms(t){if(!t?.jobcomments)return;const n=[];return t.jobcomments.Added.forEach(s=>{n.push({req_type:"A",job_no:this.mainState.jobNo,comment:s.comment})}),{jobComments:n}}UpdateJobCommentListAsync(t,n){var s=this;return(0,r.Z)(function*(){const i=s.getUpdateJobCommentListParms(t);if(!i)return;const l=yield(0,b.n)(s.jobService.updateJobCommentList(i));if("ok"===l?.Result?.err_msg?.toLowerCase())s.snackbar.open(n.succPrompt,s.prompts.success,{duration:5e3,panelClass:"snack-success"}),n.succFunc();
1else{let m=l?.Result?.err_msg.replace(/<br>/g,"\n");m||(console.log("---------unexpected error------------",l),m=s.prompts.unexpected),l?.Result?.jobComments&&(m=l.Result.jobComments.map(d=>d.err_msg).join("\n")),s.snackbar.open(m??"error",s.prompts.error,{duration:1e4,panelClass:"snack-error"}),n.errFunc()}s.formSync?.commands.next({command:u.vj7.saveEnd})})()}onAction(t){var n=this;return(0,r.Z)(function*(){switch(t.actionType){case 1:n.listJobCommentAsync();break;case 4:yield n.UpdateJobCommentListAsync(t.parms,{succPrompt:n.prompts.saveSuccessMessage,succFunc:()=>{n.listJobCommentAsync()},errFunc:()=>{}});break;case 19:n.formGroup=t.parms}})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(f.O7),e.Y36($.s),e.Y36(v.yh),e.Y36(S.ux))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-comment"]],decls:2,vars:2,consts:[["class","mas-row","style","margin-bottom: -15px;",4,"ngIf"],[3,"formSync","actionEvent",4,"ngIf"],[1,"mas-row",2,"margin-bottom","-15px"],[1,"col","text-center","mas-font","my-2"],[3,"formSync","actionEvent"]],template:function(t,n){1&t&&(e.YNc(0,tt,3,1,"div",0),e.YNc(1,et,1,1,"ngm-dynamic-form",1)),2&t&&(e.Q6J("ngIf",n.formGroup),e.xp6(1),e.Q6J("ngIf",n.formSync))},dependencies:[y.O5,u.rmD]}),o})();function ot(o,a){1&o&&(e.TgZ(0,"div",4)(1,"div",1),e._UZ(2,"app-job-comment"),e.qZA()())}let st=(()=>{class o{constructor(t){this.activatedRoute=t}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.jobNoSub=t.activatedRoute.parent?.parent?.params.subscribe(n=>{t.jobNo=+n.jobNo})})()}ngOnDestroy(){this.jobNoSub&&(this.jobNoSub.unsubscribe(),this.jobNoSub=void 0)}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-rec-main"]],decls:5,vars:1,consts:[[1,"mas-row","page-container-bottom"],[1,"col"],[1,"mas-row","m-3"],["class","mas-row page-container",4,"ngIf"],[1,"mas-row","page-container"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"app-job-rec"),e.qZA()(),e._UZ(3,"div",2),e.YNc(4,ot,3,0,"div",3)),2&t&&(e.xp6(4),e.Q6J("ngIf",-1!==n.jobNo))},dependencies:[y.O5,V,nt]}),o})(),it=(()=>{class o{constructor(t){this.router=t}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-jobs-main"]],decls:2,vars:0,template:function(t,n){1&t&&(e.TgZ(0,"p"),e._uU(1,"jobs-main works!"),e.qZA())}}),o})(),at=(()=>{class o{constructor(){}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["app-jobs"]],decls:1,vars:0,template:function(t,n){1&t&&e._UZ(0,"router-outlet")},dependencies:[p.lC]}),o})(),rt=(()=>{class o{constructor(t,n){this.mainState=t,this.systemService=n,this.formSync=new u._z2("websysconfigview",{data:[]})}ngOnInit(){var t=this;return(0,r.Z)(function*(){yield t.systemConfigAsync()})()}systemConfigAsync(){var t=this;return(0,r.Z)(function*(){const n={system_no:t.mainState.systemNo},s=yield t.systemService.systemConfig(n).toPromise();s&&s.Result&&t.formSync.dataSource.next(s.Result)})()}onAction(t){return(0,r.Z)(function*(){})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(h.s),e.Y36(f.o$))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-system-config"]],decls:1,vars:1,consts:[[3,"formSync","actionEvent"]],template:function(t,n){1&t&&(e.TgZ(0,"ngm-list-form",0),e.NdJ("actionEvent",function(i){return n.onAction(i)}),e.qZA()),2&t&&e.Q6J("formSync",n.formSync)},dependencies:[u.OJd]}),o})();var ct=c(7512),mt=c(2149);let lt=(()=>{class o{constructor(t){this.langService=t,this.prompts=this.getPrompts()}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.prompts=yield t.langService.translateAsync(t.getPrompts(),"TestingComponent")})()}getPrompts(){return{eventHistory:"Event History"}}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(v.yh))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-testing"]],decls:7,vars:1,consts:[[1,"mas-row","m-1"],[1,"col","page-container","m-3"],[1,"mas-row"],[1,"col","text-center","mas-font","my-2"],["activeRoute","test"]],template:function(t,n){1&t&&(e._UZ(0,"app-system-overview-status"),e.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3),e._uU(5),e.qZA()(),e._UZ(6,"app-site-overview-history",4),e.qZA()()),2&t&&(e.xp6(5),e.hij(" ",n.prompts.eventHistory," "))},dependencies:[ct.M,mt.N]}),o})(),pt=(()=>{class o{constructor(){}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-payments"]],decls:3,vars:0,consts:[[1,"mas-row","page-container-bottom"],[1,"col"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"router-outlet"),e.qZA()())},dependencies:[p.lC]}),o})(),ut=(()=>{class o{constructor(t,n){this.mainState=t,this.jobService=n,this.formSync=new u._z2("webjobbillinglist",{data:[]})}ngOnInit(){var t=this;return(0,r.Z)(function*(){yield t.jobBillingAsync()})()}jobBillingAsync(){var t=this;return(0,r.Z)(function*(){const n={job_no:t.mainState.jobNo},s=yield(0,b.n)(t.jobService.jobBilling(n));s&&s.Result&&t.formSync.dataSource.next(s.Result)})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(h.s),e.Y36(f.O7))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-billing-list"]],decls:1,vars:1,consts:[[3,"formSync"]],template:function(t,n){1&t&&e._UZ(0,"ngm-list-form",0),2&t&&e.Q6J("formSync",n.formSync)},dependencies:[u.OJd]}),o})();function dt(o,a){if(1&o&&e._UZ(0,"ngm-dynamic-form",1),2&o){const t=e.oxw();e.Q6J("formSync",t.formSync)}}let bt=(()=>{class o{constructor(t,n,s){this.settingsService=t,this.mainState=n,this.jobService=s}ngOnInit(){var t=this;return(0,r.Z)(function*(){t.initForm(),t.jobPaymentChange=t.mainState.jobPaymentChange.subscribe(n=>{t.jobBillingSummaryAsync()})})()}ngOnDestroy(){this.jobPaymentChange&&(this.jobPaymentChange.unsubscribe(),this.jobPaymentChange=void 0)}initForm(){this.formSync=new u._z2("webjobbillingsummary",{data:{}})}jobBillingSummaryAsync(){var t=this;return(0,r.Z)(function*(){let i,n=0,s=0;const l=t.settingsService.getUserAttrib("CurrencySymbol");i=yield(0,b.n)(t.jobService.jobBilling({job_no:t.mainState.jobNo})),i&&i.Result&&i.Result.length>0&&(n=i.Result[0].parts_total,s=i.Result[0].other_total);const m={cust_no:-1,job_no:t.mainState.jobNo,parts_total:n,other_total:s};if(i=yield(0,b.n)(t.jobService.jobBillHeader(m)),i&&i.Result){let d=i.Result[0].subtotal,C=i.Result[0].total_tax_amt,Z=i.Result[0].parts_total,T=i.Result[0].other_total,J=i.Result[0].collect_amt,A=i.Result[0].hdr_amt;d||(d=0),C||(C=0),Z||(Z=0),T||(T=0),J||(J=0),A||(A=0),i.Result[0].total_amt_cal=d+C,i.Result[0].balance_cal=Z+T+C-J-A,i.Result[0].hdr_amt="-"+(Math.round(100*+A)/100).toFixed(2).toString(),i.Result[0].collect_amt="-"+(Math.round(100*+J)/100).toFixed(2).toString(),i.Result[0].currency_symbol=yield l,t.formSync?.dataSource.next(i.Result[0])}})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(f.gb),e.Y36(h.s),e.Y36(f.O7))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-billing-summary"]],decls:1,vars:1,consts:[[3,"formSync",4,"ngIf"],[3,"formSync"]],template:function(t,n){1&t&&e.YNc(0,dt,1,1,"ngm-dynamic-form",0),2&t&&e.Q6J("ngIf",n.formSync)},dependencies:[y.O5,u.rmD]}),o}
1)(),ft=(()=>{class o{constructor(){}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-job-payments-main"]],decls:11,vars:0,consts:[[1,"mas-row","page-container-bottom"],[1,"col"],[1,"mas-row","m-3"],[1,"mas-row","page-container"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"app-job-payments"),e.qZA()(),e._UZ(3,"div",2),e.TgZ(4,"div",3)(5,"div",1),e._UZ(6,"app-job-billing-list"),e.qZA()(),e._UZ(7,"div",2),e.TgZ(8,"div",3)(9,"div",1),e._UZ(10,"app-job-billing-summary"),e.qZA()())},dependencies:[pt,ut,bt]}),o})();const ht=function(){var o=(0,r.Z)(function*(a){const t=(0,e.f3M)(f.O7),n=(0,e.f3M)(p.F0),s=+a.params.siteNo,i=+a.params.systemNo,l=+a.params.jobNo;return(yield(0,b.n)(t.canAccessJob(s,i,-1===l?void 0:l)))||n.parseUrl("/mas/error/permission")});return function(t){return o.apply(this,arguments)}}();var yt=c(9650),vt=c(387),_t=c(6327),gt=c(8064),St=c(6062),Ct=c(3051),jt=c(2496),Jt=c(2628),At=c(8157),Zt=c(5780),Tt=c(4445),Nt=c(9734),wt=c(574),Rt=c(2613),xt=c(6700),Pt=c(8928),Mt=c(3921),Ft=c(7175);const kt=[{path:"",component:at,children:[{path:"list",component:it},{path:"rec/:siteNo/:systemNo/:jobNo",component:L,canActivate:[ht],resolve:{data:c(6987).o},children:[{path:"overview",component:q,children:[{path:"techjobrec",component:st},{path:"jobpayments",component:ft,children:[{path:"jobpaymentlist",component:B},{path:"jobpaymentrec/:seqNo",component:K},{path:"",redirectTo:"jobpaymentlist",pathMatch:"full"}]},{path:"parts",component:X,children:[{path:"partlist",component:Q},{path:"partrec/:jobLineNo",component:H},{path:"",redirectTo:"partlist",pathMatch:"full"}]},{path:"labors",component:z,children:[{path:"laborlist",component:U},{path:"laborrec/:seqNo",component:E},{path:"",redirectTo:"laborlist",pathMatch:"full"}]},{path:"",redirectTo:"techjobrec",pathMatch:"full"}]},{path:"sysconfigview",component:rt},{path:"testing",component:lt},{path:"instructions",component:yt.t,children:[{path:"dispatchlist",component:vt.s},{path:"dispatchlist/dispatchrec/:dispage_no/:expire_date",component:_t.n},{path:"gendispatchlist",component:gt.h},{path:"gendispatchlist/gendispatchrec/:expire_date",component:St.R},{path:"",redirectTo:"dispatchlist",pathMatch:"full"}]},{path:"zones",component:Ct.A,children:[{path:"zonelist",component:jt.w},{path:"zonelist/zonerec/:zone_id/:zonestate_id",component:Jt.Z},{path:"zonelistrec",component:At.E},{path:"opencloselist",component:Zt.o},{path:"opencloselist/opencloserec/:zone_id",component:Tt.e},{path:"alarmgrouplistrec",component:Nt.Z},{path:"",redirectTo:"zonelist",pathMatch:"full"}]},{path:"schedules",component:wt.l,children:[{path:"schedulelist",component:Rt.j},{path:"schedulerec/:sched_keys",component:xt.E,children:[{path:"holidays",component:Pt.N,children:[{path:"holschedlist",component:Mt.i},{path:"holschedulerec/:holiday_id",component:Ft.g},{path:"",redirectTo:"holschedlist",pathMatch:"full"}]},{path:"",redirectTo:"holidays",pathMatch:"full"}]},{path:"",redirectTo:"schedulelist",pathMatch:"full"}]},{path:"",redirectTo:"overview",pathMatch:"full"}]},{path:"",redirectTo:"list",pathMatch:"full"}]}];let Yt=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[p.Bz.forChild(kt),p.Bz]}),o})();var Lt=c(2216),Ut=c(4883),It=c(9068),Et=c(1782);let zt=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[y.ez,Yt,Lt.uH,It.A,j.XC,j.dT,j.HK,Ut.Cl,u.m12,_.$S,S.ZX,Et.AccountModule]}),o})()}}]);
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.