-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6852.ac52ae55777a73f1d848.js
1 lines (1 loc) · 161 KB
/
6852.ac52ae55777a73f1d848.js
1
"use strict";(self.webpackChunkchekt_web_wcs=self.webpackChunkchekt_web_wcs||[]).push([[6852],{39014:(D,y,_)=>{_.d(y,{a:()=>N});var l=_(42741),S=_(98753),C=_(16274);const M=["sortable-column",""];function u(g,x){1&g&&(l.O4$(),l.TgZ(0,"svg",2),l.TgZ(1,"g",3),l.TgZ(2,"g",4),l._UZ(3,"polygon",5),l.qZA(),l.qZA(),l.qZA())}function h(g,x){1&g&&(l.O4$(),l.TgZ(0,"svg",2),l.TgZ(1,"g"),l.TgZ(2,"g",6),l._UZ(3,"polygon",7),l.qZA(),l.TgZ(4,"g",6),l._UZ(5,"polygon",5),l.qZA(),l.qZA(),l.qZA())}function t(g,x){1&g&&(l.O4$(),l.TgZ(0,"svg",2),l.TgZ(1,"g",3),l.TgZ(2,"g",4),l._UZ(3,"polygon",7),l.qZA(),l.qZA(),l.qZA())}function A(g,x){if(1&g&&(l.YNc(0,u,4,0,"svg",1),l.YNc(1,h,6,0,"svg",1),l.YNc(2,t,4,0,"svg",1)),2&g){const p=l.oxw();l.Q6J("ngIf","asc"===p.sortDirection),l.xp6(1),l.Q6J("ngIf",""===p.sortDirection),l.xp6(1),l.Q6J("ngIf","desc"===p.sortDirection)}}function I(g,x){1&g&&(l.O4$(),l.TgZ(0,"svg",2),l.TgZ(1,"g",3),l.TgZ(2,"g",4),l._UZ(3,"polygon",5),l.qZA(),l.qZA(),l.qZA())}function q(g,x){1&g&&(l.O4$(),l.TgZ(0,"svg",2),l.TgZ(1,"g"),l.TgZ(2,"g",6),l._UZ(3,"polygon",7),l.qZA(),l.TgZ(4,"g",6),l._UZ(5,"polygon",5),l.qZA(),l.qZA(),l.qZA())}function k(g,x){1&g&&(l.O4$(),l.TgZ(0,"svg",2),l.TgZ(1,"g",3),l.TgZ(2,"g",4),l._UZ(3,"polygon",7),l.qZA(),l.qZA(),l.qZA())}function z(g,x){if(1&g&&(l.YNc(0,I,4,0,"svg",1),l.YNc(1,q,6,0,"svg",1),l.YNc(2,k,4,0,"svg",1)),2&g){const p=l.oxw();l.Q6J("ngIf","asc"===p.sortDirection),l.xp6(1),l.Q6J("ngIf",""===p.sortDirection),l.xp6(1),l.Q6J("ngIf","desc"===p.sortDirection)}}const L=["*"];let N=(()=>{class g{constructor(p){this.sortService=p,this.sortDirection="",this.iconPosition="right"}sort(){this.sortDirection="asc"===this.sortDirection?"desc":"asc",this.sortService.columnSorted({sortColumn:this.columnName,sortDirection:this.sortDirection})}ngOnInit(){this.columnSortedSubscription=this.sortService.columnSorted$.subscribe(p=>{this.columnName!=p.sortColumn&&(this.sortDirection="")})}ngOnDestroy(){this.columnSortedSubscription.unsubscribe()}}return g.\u0275fac=function(p){return new(p||g)(l.Y36(S.K))},g.\u0275cmp=l.Xpm({type:g,selectors:[["","sortable-column",""]],hostBindings:function(p,Z){1&p&&l.NdJ("click",function(){return Z.sort()})},inputs:{columnName:["sortable-column","columnName"],sortDirection:["sort-direction","sortDirection"],iconPosition:["sort-icon","iconPosition"]},attrs:M,ngContentSelectors:L,decls:3,vars:2,consts:[[3,"ngIf"],["width","12","height","8px","viewBox","0 0 200 200",4,"ngIf"],["width","12","height","8px","viewBox","0 0 200 200"],["fill","#5A6574"],["id","arrow-drop-down"],["points","0,120 100,200 200,120"],["id","arrow-drop-down","fill","#5A6574"],["points","0,80 100,0 200,80"]],template:function(p,Z){1&p&&(l.F$t(),l.YNc(0,A,3,3,"ng-template",0),l.Hsn(1),l.YNc(2,z,3,3,"ng-template",0)),2&p&&(l.Q6J("ngIf","left"===Z.iconPosition&&Z.columnName),l.xp6(2),l.Q6J("ngIf","right"===Z.iconPosition&&Z.columnName))},directives:[C.O5],encapsulation:2}),g})()},28522:(D,y,_)=>{_.d(y,{Q:()=>C});var l=_(42741),S=_(98753);let C=(()=>{class M{constructor(h){this.sortService=h,this.sorted=new l.vpe}ngOnInit(){this.columnSortedSubscription=this.sortService.columnSorted$.subscribe(h=>{this.sorted.emit(h)})}ngOnDestroy(){this.columnSortedSubscription.unsubscribe()}}return M.\u0275fac=function(h){return new(h||M)(l.Y36(S.K))},M.\u0275dir=l.lG2({type:M,selectors:[["","sortable-table",""]],outputs:{sorted:"sorted"}}),M})()},56852:(D,y,_)=>{_.r(y),_.d(y,{SiteNoteManagerModule:()=>Te});var l=_(16274),S=_(688),C=_(93324),M=_(29535),u=_(61855),h=_(25229),t=_(42741),A=_(1906),I=_(54414),q=_(78806),k=_(56880),z=_(91486),L=_(35460),N=_(73121),g=_(28522),x=_(95974),p=_(39014);const Z=["siteActionMenus"];function R(r,s){1&r&&(t.TgZ(0,"div",2),t.O4$(),t.TgZ(1,"svg",3),t._UZ(2,"circle",4),t.qZA(),t.qZA())}function H(r,s){1&r&&t._UZ(0,"col",23),2&r&&t.Q6J("width",s.$implicit.width)}function j(r,s){if(1&r&&(t.TgZ(0,"th",24),t._uU(1),t.qZA()),2&r){const e=s.$implicit;t.Q6J("sortable-column",e.value),t.xp6(1),t.hij(" ",e.name,"")}}function B(r,s){1&r&&(t.TgZ(0,"div",25),t.TgZ(1,"i",26),t._uU(2,"people"),t.qZA(),t.TgZ(3,"div"),t._uU(4,"No Customer"),t.qZA(),t.TgZ(5,"div"),t._uU(6,"Create a customer to provide your service."),t.qZA(),t.qZA())}function $(r,s){1&r&&(t.TgZ(0,"div",25),t.TgZ(1,"i",26),t._uU(2,"do_not_disturb_on"),t.qZA(),t.TgZ(3,"div"),t._uU(4,"Permission Denied"),t.qZA(),t.qZA())}function G(r,s){1&r&&t._UZ(0,"col",23),2&r&&t.Q6J("width",s.$implicit.width)}function W(r,s){1&r&&(t.TgZ(0,"tr",30),t.TgZ(1,"td",31),t._uU(2,"No Service Note"),t.qZA(),t.qZA())}function V(r,s){if(1&r&&(t.TgZ(0,"div"),t.TgZ(1,"div",45),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.TgZ(4,"span",46),t._uU(5),t.qZA(),t.qZA(),t.qZA()),2&r){const e=s.$implicit;t.xp6(3),t.hij("",e.type," : "),t.xp6(2),t.Oqu(e.count)}}function K(r,s){if(1&r&&(t.TgZ(0,"i",49),t._uU(1),t.qZA()),2&r){const e=t.oxw().$implicit,n=t.oxw(5);t.xp6(1),t.Oqu(n.computedStatusLabelIcon(e))}}function X(r,s){if(1&r&&(t.TgZ(0,"div"),t.TgZ(1,"div",47),t.YNc(2,K,2,1,"i",48),t.TgZ(3,"div"),t._uU(4),t.qZA(),t.TgZ(5,"div",46),t._uU(6),t.qZA(),t.qZA(),t.qZA()),2&r){const e=s.$implicit,n=t.oxw(5);t.xp6(1),t.Q6J("ngClass",n.computedStatusLabelColor(e)),t.xp6(1),t.Q6J("ngIf",n.computedStatusLabelIcon(e)),t.xp6(2),t.hij("",e.type," : "),t.xp6(2),t.Oqu(e.count)}}function tt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",43),t.NdJ("click",function(i){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(4).moveToServiceNote(i,o)}),t.TgZ(1,"div"),t._uU(2,"Go to Service Notes \u2192"),t.qZA(),t.qZA()}}function et(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"div",33),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(5,"div",34),t._uU(6),t.qZA(),t.TgZ(7,"div",35),t._uU(8),t.qZA(),t.qZA(),t.qZA(),t.TgZ(9,"td"),t.TgZ(10,"div",33),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(11,"div",34),t._uU(12),t.qZA(),t.TgZ(13,"div",35),t._uU(14),t.qZA(),t.qZA(),t.qZA(),t.TgZ(15,"td"),t.TgZ(16,"div",36),t.YNc(17,V,6,2,"div",32),t.qZA(),t.qZA(),t.TgZ(18,"td"),t.TgZ(19,"div",36),t.YNc(20,X,7,4,"div",32),t.qZA(),t.qZA(),t.TgZ(21,"td"),t.TgZ(22,"div",37,38),t.NdJ("mouseover",function(){const o=t.CHM(e).$implicit;return t.oxw(4).setMorePosition(o.site_id)}),t.TgZ(24,"div",39),t.NdJ("click",function(i){const a=t.CHM(e).$implicit,c=t.oxw(4);return i.stopPropagation(),c.toggleMenu(a)}),t._UZ(25,"comp-icon",40),t.qZA(),t.TgZ(26,"div",41),t.YNc(27,tt,3,0,"div",42),t.TgZ(28,"div",43),t.NdJ("click",function(i){const a=t.CHM(e).$implicit;return t.oxw(4).moveToMpDirection(i,a)}),t.TgZ(29,"div"),t._uU(30,"Go to MP directions \u2192"),t.qZA(),t.qZA(),t.TgZ(31,"div",44),t.NdJ("click",function(i){const a=t.CHM(e).$implicit;return t.oxw(4).goToSite(i,a.site_id)}),t.TgZ(32,"div"),t._uU(33,"Go to Site"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=s.$implicit,n=t.oxw(4);t.xp6(2),t.Oqu(e.site_id),t.xp6(1),t.ekj("unknown","No Site Name"===e.name),t.xp6(3),t.Oqu(e.name),t.xp6(2),t.Oqu(e.name),t.xp6(1),t.ekj("unknown","No Dealer Name"===e.dealer_name),t.xp6(3),t.Oqu(e.dealer_name),t.xp6(2),t.Oqu(e.dealer_name),t.xp6(3),t.Q6J("ngForOf",e.service_notes),t.xp6(3),t.Q6J("ngForOf",e.mp_directions),t.xp6(2),t.Q6J("id",e.site_id),t.xp6(3),t.Q6J("icon","more_horiz")("size",20)("color","hsla(0, 0%, 0%, 0.87)"),t.xp6(1),t.ekj("show",e.isShowMenu),t.Q6J("id","more-"+e.site_id),t.xp6(1),t.Q6J("ngIf",n.isShowGoToServiceNoteButton(e))}}function nt(r,s){if(1&r&&(t.ynx(0),t.YNc(1,et,34,19,"tr",32),t.BQk()),2&r){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.pagedItems)}}function it(r,s){if(1&r&&(t.TgZ(0,"div",27),t.TgZ(1,"table"),t.TgZ(2,"colgroup"),t.YNc(3,G,1,1,"col",8),t.qZA(),t.TgZ(4,"tbody"),t.YNc(5,W,3,0,"tr",28),t.YNc(6,nt,2,1,"ng-container",29),t.qZA(),t.qZA(),t.qZA()),2&r){const e=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",e.siteTableHeader),t.xp6(2),t.Q6J("ngIf",0===(null==e.pagedItems?null:e.pagedItems.length)&&!e.isLoading),t.xp6(1),t.Q6J("ngIf",!e.isLoading)}}function ot(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",5),t.TgZ(1,"div",6),t.TgZ(2,"table",7),t.NdJ("sorted",function(i){return t.CHM(e),t.oxw().sortTableByColumnInSiteList(i)}),t.TgZ(3,"colgroup"),t.YNc(4,H,1,1,"col",8),t.qZA(),t.TgZ(5,"thead"),t.TgZ(6,"tr"),t.YNc(7,j,2,2,"th",9),t.qZA(),t.qZA(),t.qZA(),t.YNc(8,B,7,0,"div",10),t.YNc(9,$,5,0,"div",10),t.YNc(10,it,7,3,"div",11),t.TgZ(11,"div",12),t._UZ(12,"div",13),t._UZ(13,"div",14),t.TgZ(14,"div",15),t.TgZ(15,"div"),t._uU(16),t.qZA(),t.TgZ(17,"div"),t._uU(18,"of "),t.qZA(),t.TgZ(19,"div"),t._uU(20),t.qZA(),t.qZA(),t.TgZ(21,"div",16),t.TgZ(22,"div",17),t.TgZ(23,"div",18),t.TgZ(24,"div",19),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return i.setPage(i.pager.currentPage-1)}),t.TgZ(25,"div",20),t.TgZ(26,"i",21),t._uU(27,"arrow_back"),t.qZA(),t.TgZ(28,"span"),t._uU(29,"Prev"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(30,"div",18),t.TgZ(31,"div",19),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return i.setPage(i.pager.currentPage+1)}),t.TgZ(32,"div",20),t.TgZ(33,"span"),t._uU(34,"Next"),t.qZA(),t._UZ(35,"comp-icon",22),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(4),t.Q6J("ngForOf",e.siteTableHeader),t.xp6(3),t.Q6J("ngForOf",e.siteTableHeader),t.xp6(1),t.Q6J("ngIf","no-data"===e.determineElementToShowInSiteListTable()),t.xp6(1),t.Q6J("ngIf","no-permission"===e.determineElementToShowInSiteListTable()),t.xp6(1),t.Q6J("ngIf","normal"===e.determineElementToShowInSiteListTable()),t.xp6(6),t.AsE("",e.pageOffsetStart," - ",e.pageOffsetEnd,""),t.xp6(4),t.Oqu(e.totalItem),t.xp6(4),t.ekj("disabled",1===e.pager.currentPage||0===e.pager.currentPage),t.xp6(2),t.ekj("disabled",1===e.pager.currentPage||0===e.pager.currentPage),t.xp6(5),t.ekj("disabled",e.pager.currentPage===e.pager.totalPages),t.xp6(4),t.ekj("disabled",e.pager.currentPage===e.pager.totalPages),t.Q6J("icon","arrow_forward_n")("color","#000")("size",16)}}let rt=(()=>{class r{constructor(e,n,i){this.pagerService=e,this.commonService=n,this.helper=i,this.siteListPagedItems=[],this.serviceNotePagedItems=[],this.mpDirectionList=[],this.moveToSiteDetail=new t.vpe,this.isLoading=!0,this.hasReadSiteDetailPermission=!1,this.siteTableHeader=[{name:"SITE ID",value:"site_id",width:"7%"},{name:"SITE NAME",value:"site_name",width:"15%"},{name:"DEALER NAME",value:"dealer_name",width:"15%"},{name:"SERVICE NOTES",value:"service_note_length",width:"25%"},{name:"MP DIRECTIONS",value:"mp_direction_length",width:"25%"},{name:"",value:null,width:"5%"}],this.pagedItems=[],this.originalSiteListPagedItems=[],this.pager={},this.curPage=1,this.totalItem=0,this.pageOffset=50,this.pageOffsetStart=1,this.pageOffsetEnd=1,this.lastPage=1}ngOnChanges(e){this.applyItemList(e),this.applySearch(e)}onGlobalClick(e){this.siteActionMenus&&this.siteActionMenus.toArray().forEach(i=>{var o;null===(o=this.siteListPagedItems)||void 0===o||o.forEach(a=>{a.site_id===parseInt(i.nativeElement.id)&&(i.nativeElement.contains(e.target)||(a.isShowMenu=!1))})})}applyItemList(e){var n,i,o;!(null==e?void 0:e.pagedItemIsReady)||(null===(n=null==e?void 0:e.pagedItemIsReady)||void 0===n?void 0:n.currentValue)!==(null===(i=null==e?void 0:e.pagedItemIsReady)||void 0===i?void 0:i.previousValue)&&(!(null===(o=null==e?void 0:e.pagedItemIsReady)||void 0===o?void 0:o.currentValue)||(this.isLoading=!0,this.checkPermission(),this.parseSiteList(),this.setPage(1),this.isLoading=!1))}checkPermission(){this.hasReadSiteDetailPermission=this.helper.permission.has("dealer_site_read")}applySearch(e){var n,i;!(null==e?void 0:e.searchText)||(null===(n=null==e?void 0:e.searchText)||void 0===n?void 0:n.currentValue)!==(null===(i=null==e?void 0:e.searchText)||void 0===i?void 0:i.previousValue)&&(this.search(),this.setPage(1))}parseSiteList(){var e;null===(e=this.siteListPagedItems)||void 0===e||e.forEach(n=>{n.dealer_name=this.setDealerName(n),n.service_notes=this.siteServiceNotes(n),n.mp_directions=this.siteMPDirections(n),n.isShowMenu=!1}),this.originalSiteListPagedItems=N.Z._.cloneDeep(this.siteListPagedItems)}setDealerName(e){var n,i,o;return(null==e?void 0:e.dealer_id)&&(null===(n=this.dealerList)||void 0===n?void 0:n.length)&&null!==(o=null===(i=this.dealerList.find(a=>(null==a?void 0:a.dealer_id)===(null==e?void 0:e.dealer_id)))||void 0===i?void 0:i.external_dealer_id_with_company_name)&&void 0!==o?o:"No Dealer Name"}siteServiceNotes(e){var n;let i=[];return null===(n=this.serviceNotePagedItems)||void 0===n||n.forEach(o=>{if((null==o?void 0:o.site_id)===(null==e?void 0:e.site_id)){const a=null==o?void 0:o.type_label;if(!a)return;const c=i.findIndex(d=>(null==d?void 0:d.type)===a);-1===c?i.push({type:a,count:1}):i[c].count++}}),i}siteMPDirections(e){var n;let i=[];return null===(n=this.mpDirectionList)||void 0===n||n.forEach(o=>{if((null==o?void 0:o.site_id)===(null==e?void 0:e.site_id)){const a=null==o?void 0:o.statusLabel,c=i.findIndex(d=>(null==d?void 0:d.type)===a);-1===c?i.push({type:a,count:1,status:o.status}):i[c].count++}}),i}search(){if(0==this.searchText.length||this.searchText.length<3)return this.siteListPagedItems=this.originalSiteListPagedItems,void this.setPage(1);this.siteListPagedItems=this.searchSite(),this.setPage(1)}searchSite(){let e=this.searchText.toLowerCase();return this.originalSiteListPagedItems.filter(n=>{let i=n.site_id+n.name.toLowerCase()+n.dealer_name.toLowerCase();return!!e&&i.search(e)>-1})}setMorePosition(e){const n=document.documentElement;let i=document.getElementById(e),o=document.getElementById("more-"+e),a=null==i?void 0:i.getBoundingClientRect();const d=a.bottom+7;o.style.right=n.clientWidth-a.right-10+"px",o.style.top=d+"px"}toggleMenu(e){e.isShowMenu=!e.isShowMenu}computedStatusLabelColor(e){return e?this.isNoContents(e)?"no-contents":0===e.status?"not-approved-label":1===e.status?"pending-label":2===e.status?"finalized-label":3===e.status?"pending-label":4===e.status?"delete-requested-label":void 0:""}computedStatusLabelIcon(e){return!e||this.isNoContents(e)?"":0===e.status?"edit":1===e.status?"schedule":2===e.status?"check_circle":3===e.status?"schedule":4===e.status?"do_not_disturb_on":void 0}isShowGoToServiceNoteButton(e){return e.dealer_id==this.dealerId}isNoContents(e){return null===e.status}isNeedToCheck(e){return"Need to Check"===e}determineElementToShowInSiteListTable(){var e;return!this.isLoading&&(this.hasReadSiteDetailPermission?(null===(e=this.pagedItems)||void 0===e?void 0:e.length)?"normal":"no-data":"no-permission")}moveToServiceNote(e,n){e.stopPropagation(),this.moveToSiteDetail.emit({type:"service notes",site:n})}moveToMpDirection(e,n){e.stopPropagation(),this.moveToSiteDetail.emit({type:"monitoring portal directions",site:n})}goToSite(e,n){null==e||e.stopPropagation(),this.helper.router.navigate_to("/customers/devices/note",{id:n})}compare(e,n,i){return(e<n?-1:1)*(i?1:-1)}sortTableByColumnInSiteList(e){if(!e.sortColumn||""===e.sortDirection)return;const i=this.siteListPagedItems.sort((o,a)=>{var c,d,m,v,f,O,T,w;const P="asc"===e.sortDirection;switch(e.sortColumn){case"site_id":return this.compare(o.site_id,a.site_id,P);case"site_name":return this.compare(null===(c=o.name)||void 0===c?void 0:c.toLowerCase(),null===(d=a.name)||void 0===d?void 0:d.toLowerCase(),P);case"dealer_name":return this.compare(null===(m=o.dealer_name)||void 0===m?void 0:m.toLowerCase(),null===(v=a.dealer_name)||void 0===v?void 0:v.toLowerCase(),P);case"service_note_length":return this.compare(null===(f=o.service_notes)||void 0===f?void 0:f.length,null===(O=a.service_notes)||void 0===O?void 0:O.length,P);case"mp_direction_length":return this.compare(null===(T=o.mp_directions)||void 0===T?void 0:T.length,null===(w=a.mp_directions)||void 0===w?void 0:w.length,P);default:return 0}});this.siteListPagedItems=i,this.setPage(1)}setPage(e){this.pagedItems=[];const n=this.siteListPagedItems;if(!n)return console.debug("\u26a0\ufe0f list is lost",n),this.isLoading=!1;this.pager=this.pagerService.getPager(null==n?void 0:n.length,e,this.pageOffset),this.totalItem=null==n?void 0:n.length,this.pagedItems=n.slice(this.pager.startIndex,this.pager.endIndex+1),this.curPage=this.pager.currentPage,this.pageOffsetStart=this.curPage-1<0?0:this.curPage-1==0?1:(this.curPage-1)*this.pageOffset+1,this.pageOffsetEnd=this.curPage*this.pageOffset>this.totalItem?this.totalItem:this.curPage*this.pageOffset}}return r.\u0275fac=function(e){return new(e||r)(t.Y36(A.e),t.Y36(k.v),t.Y36(L.W))},r.\u0275cmp=t.Xpm({type:r,selectors:[["c_dtable_site_list"]],viewQuery:function(e,n){if(1&e&&t.Gf(Z,5),2&e){let i;t.iGM(i=t.CRH())&&(n.siteActionMenus=i)}},hostBindings:function(e,n){1&e&&t.NdJ("mousedown",function(o){return n.onGlobalClick(o)},!1,t.evT)},inputs:{pagedItemIsReady:"pagedItemIsReady",dealerId:"dealerId",searchText:"searchText",siteListPagedItems:"siteListPagedItems",dealerList:"dealerList",serviceNotePagedItems:"serviceNotePagedItems",mpDirectionList:"mpDirectionList"},outputs:{moveToSiteDetail:"moveToSiteDetail"},features:[t.TTD],decls:3,vars:2,consts:[["class","loader absolute",4,"ngIf"],["class","table-area",4,"ngIf"],[1,"loader","absolute"],["viewBox","25 25 50 50",1,"circular"],["cx","50","cy","50","r","20","fill","none","stroke-width","4","stroke-miterlimit","10",1,"path"],[1,"table-area"],[1,"content-body","table-container"],["sortable-table","",1,"table-header",3,"sorted"],[3,"width",4,"ngFor","ngForOf"],[3,"sortable-column",4,"ngFor","ngForOf"],["class","alternative-contents",4,"ngIf"],["class","table-body",4,"ngIf"],[1,"pagination-area"],[2,"font-size","12px","padding-right","7px"],[1,"space"],[1,"flex",2,"font-size","12px","padding-right","7px","gap","2px"],[1,"pagination"],[1,"page-mover"],[1,"btn-area"],[1,"button","button-white",3,"click"],[1,"btn-inner"],[1,"material-icons",2,"font-size","16px"],[3,"icon","color","size"],[3,"width"],[3,"sortable-column"],[1,"alternative-contents"],[1,"material-icons"],[1,"table-body"],["style","text-align: center; color: #999;",4,"ngIf"],[4,"ngIf"],[2,"text-align","center","color","#999"],["colspan","11"],[4,"ngFor","ngForOf"],[1,"--g-tooltip-content",2,"margin","0",3,"mouseenter"],[1,"ellipsis"],[1,"--g-tooltip","tooltip-background"],[1,"v-center",2,"gap","4px","flex-wrap","wrap"],[1,"more-content","v-center",3,"id","mouseover"],["siteActionMenus",""],[1,"more-selector",3,"click"],[3,"icon","size","color"],[1,"more",3,"id"],["class","more-item text-primary row",3,"click",4,"ngIf"],[1,"more-item","text-primary","row",3,"click"],[1,"more-item","row",3,"click"],[1,"service-note-tag"],[1,"text-black"],[1,"small-font","v-center",3,"ngClass"],["class","material-icons-outlined","style","margin-right: 5px; font-size: 14px",4,"ngIf"],[1,"material-icons-outlined",2,"margin-right","5px","font-size","14px"]],template:function(e,n){1&e&&(t.ynx(0),t.YNc(1,R,3,0,"div",0),t.YNc(2,ot,36,19,"div",1),t.BQk()),2&e&&(t.xp6(1),t.Q6J("ngIf",n.isLoading),t.xp6(1),t.Q6J("ngIf",!n.isLoading))},directives:[l.O5,g.Q,l.sg,x.U,p.a,l.mk],styles:['table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:50%;width:35px;height:35px}table.table-header[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;overflow-y:hidden}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{min-height:31px;background-color:#f7fafc;border-bottom:solid 1px rgba(0,0,0,.1);border-top:solid 1px rgba(0,0,0,.1);box-sizing:border-box;padding:0 6px}.table-container[_ngcontent-%COMP%] .table-header.no-top-border[_ngcontent-%COMP%]{border-top:0}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}table.table-header-v2[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 30px);flex:1;overflow-y:overlay}.table-container[_ngcontent-%COMP%] .no-record[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:7px 0}.has-child[_ngcontent-%COMP%]{cursor:pointer}.has-child[_ngcontent-%COMP%]:hover{background:#f0f0f0}.table-container[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;align-items:center}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px;color:#56657bde;text-transform:uppercase;text-align:left;font-size:13px;font-weight:normal}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px rgba(0,0,0,.1) solid}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.table-container[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:14px;color:#000000de;padding:7px;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;max-width:1vw}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}','@charset "UTF-8";.no-info[_ngcontent-%COMP%]{color:#00000061}.selected[_ngcontent-%COMP%]{color:#1e88e5;cursor:not-allowed}.text-primary[_ngcontent-%COMP%]{color:#1e88e5}.space[_ngcontent-%COMP%]{flex:1}.disabled[_ngcontent-%COMP%]{cursor:default;filter:contrast(60%) brightness(1.2);opacity:1;pointer-events:none;-webkit-user-select:none;user-select:none}.no-contents[_ngcontent-%COMP%]{color:#adb4bf!important}.default-label[_ngcontent-%COMP%]{padding:2px 8px;background:#F2F6F9;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content}.not-approved-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(255,184,0,.1);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:orange}.need-to-check[_ngcontent-%COMP%]{color:#cd3d64}.pending-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(128,128,128,.2);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:gray}.finalized-label[_ngcontent-%COMP%]{padding:2px 8px;background:#90ee9042;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#1a9267}.delete-requested-label[_ngcontent-%COMP%]{padding:2px 8px;background:#FFE2DD;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#ff6b6b}.approved_by_label[_ngcontent-%COMP%]{color:#0000004d}.tooltip-background[_ngcontent-%COMP%]{padding:4px 8px;background:rgba(0,0,0,.7);color:#fff;font-size:12px}.small-font[_ngcontent-%COMP%]{font-size:12px}.text-black[_ngcontent-%COMP%]{color:#000}.service-note-tag[_ngcontent-%COMP%]{background:#E3E8EE;padding:2px 8px;border-radius:3px;color:#55647b;font-size:12px}.pagination-area[_ngcontent-%COMP%]{position:absolute;background:white;bottom:0;display:flex;padding:12px;width:calc(100% - 24px);align-items:center;height:45px}.pagination-area[_ngcontent-%COMP%] .pagination-result[_ngcontent-%COMP%]{display:flex}.pagination-area[_ngcontent-%COMP%] .pagination-result-value[_ngcontent-%COMP%]{margin-right:5px;font-size:14px;color:#000000de}.pagination-area[_ngcontent-%COMP%] .pagination-result-label[_ngcontent-%COMP%]{font-size:14px;color:#0009}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%]{display:inline-block}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;color:#0009}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]:hover{color:#000000de}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn.mover-disabled[_ngcontent-%COMP%]{cursor:initial;color:#0000004d}.tab-table[_ngcontent-%COMP%]{height:calc(100% - 92px)}.table-area[_ngcontent-%COMP%]{height:100%}.table-container[_ngcontent-%COMP%]{position:relative}.table-container[_ngcontent-%COMP%] .unknown[_ngcontent-%COMP%]{color:#00000061}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.1);height:100%;max-height:calc(100% - 122px)}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#F6F8FA}.chekt-select-option-wrapper[_ngcontent-%COMP%]{position:relative}.chekt-select-option[_ngcontent-%COMP%]{height:30px;width:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;position:relative;z-index:1;background-color:#fff;border-radius:4px;box-shadow:#0000 0 0,#0000 0 0,#0000 0 0,#40445229 0 0 0 1px,#0000 0 0,#0000 0 0,#0000 0 0}.chekt-select-option.input-err[_ngcontent-%COMP%]{outline:none;background-color:#fbd0d6;box-shadow:0 0 0 2px #f1556c}.chekt-select-option[_ngcontent-%COMP%] > .chekt-select-option-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;position:relative;z-index:1;flex:0 1 auto;margin:0;text-decoration:none;vertical-align:middle;word-break:normal;background:transparent;border:0;outline:0;transition:color .24s;padding:4px 30px 4px 8px;-webkit-appearance:none;width:100%;appearance:none;-webkit-user-select:auto;user-select:auto;height:20px;cursor:pointer;font-family:Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;color:#3c4257}.chekt-select-option-icon[_ngcontent-%COMP%]{position:absolute;top:50%;right:8px;z-index:2;margin-top:-9px;transition:color .24s;pointer-events:none;color:#3c4257}.my-icon[_ngcontent-%COMP%]{width:1em;height:1em;display:flex;justify-content:center;align-items:center}.chekt-select-dropdown[_ngcontent-%COMP%]{background-color:#fff;width:100%;position:absolute;box-shadow:0 0 0 1px #8898aa1a,0 15px 35px #31315d1a,0 5px 15px #00000014;border-radius:4px;margin-top:7px;z-index:100;-webkit-user-select:none;user-select:none;transition:transform .3s cubic-bezier(.075,.82,.165,1),opacity .3s cubic-bezier(.075,.82,.165,1)}.select-option-modal-list[_ngcontent-%COMP%]{cursor:pointer;max-height:200px;color:#55647b;font-size:14px;overflow-y:auto}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 0 8px 8px}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .selected[_ngcontent-%COMP%]{color:#1e88e5;cursor:not-allowed}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:hover{background-color:#f7fafc}.loader[_ngcontent-%COMP%]{width:30px}.loader[_ngcontent-%COMP%] .circular[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{stroke:#8792a2}.more-content[_ngcontent-%COMP%]{position:relative;justify-content:flex-end;cursor:pointer}.more-content[_ngcontent-%COMP%] .more-selector[_ngcontent-%COMP%]{padding:0 7px}.more-content[_ngcontent-%COMP%] .more-selector[_ngcontent-%COMP%]:hover{outline:1px solid rgba(0,0,0,.1);border-radius:5px}.more-content[_ngcontent-%COMP%] .more-icon[_ngcontent-%COMP%]{cursor:pointer;padding:0 4px;border-radius:4px;margin-right:10px;font-size:18px;color:#0009;-webkit-user-select:none;user-select:none}.more-content[_ngcontent-%COMP%] .more-icon[_ngcontent-%COMP%]:hover, .more-content[_ngcontent-%COMP%] .more-icon.show[_ngcontent-%COMP%]{box-shadow:0 0 4px gray}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{visibility:hidden;opacity:0;background-color:#fff;color:#000000de;box-sizing:border-box;border-radius:6px;font-size:14px;box-shadow:0 0 10px #0000001a;border:1px solid rgba(0,0,0,.1);position:fixed;z-index:100;top:25px;right:0px}.more-content[_ngcontent-%COMP%] .more.show[_ngcontent-%COMP%]{visibility:visible;opacity:1}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-title[_ngcontent-%COMP%]{color:#000000de;margin-bottom:5px;font-weight:500}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-content[_ngcontent-%COMP%]{color:#0009;margin-bottom:14px;line-height:20px}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item[_ngcontent-%COMP%]{padding:7px 14px;box-sizing:border-box;font-size:14px;font-weight:400;cursor:pointer}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item[_ngcontent-%COMP%]:hover{background-color:#f7fafc}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item.txt-primary[_ngcontent-%COMP%]{color:#2383e2}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{color:#8792a2;margin-right:8px}.alternative-contents[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%;font-size:14px;color:#8792a2}.alternative-contents[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#8792a2;font-size:24px;margin:8px}']}),r})();var Y=_(17611);const at=["serviceNoteActionMenus"];function st(r,s){1&r&&(t.TgZ(0,"div",4),t.O4$(),t.TgZ(1,"svg",5),t._UZ(2,"circle",6),t.qZA(),t.qZA())}function ct(r,s){1&r&&t._UZ(0,"col",25),2&r&&t.Q6J("width",s.$implicit.width)}function lt(r,s){if(1&r&&(t.TgZ(0,"th",26),t._uU(1),t.qZA()),2&r){const e=s.$implicit;t.Q6J("sortable-column",e.value),t.xp6(1),t.hij(" ",e.name,"")}}function dt(r,s){1&r&&(t.TgZ(0,"div",27),t.TgZ(1,"i",28),t._uU(2,"inventory_2"),t.qZA(),t.TgZ(3,"div"),t._uU(4,"No Service Notes"),t.qZA(),t.qZA())}function _t(r,s){1&r&&(t.TgZ(0,"div",27),t.TgZ(1,"i",28),t._uU(2,"do_not_disturb_on"),t.qZA(),t.TgZ(3,"div"),t._uU(4,"Permission Denied"),t.qZA(),t.qZA())}function gt(r,s){1&r&&t._UZ(0,"col",25),2&r&&t.Q6J("width",s.$implicit.width)}function pt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",41),t.NdJ("click",function(i){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(4).goToServiceNoteDetail(i,o)}),t.TgZ(1,"div"),t._uU(2,"Go to Detail"),t.qZA(),t.qZA()}}function ut(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",41),t.NdJ("click",function(i){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(4).goToAddServiceNote(i,o)}),t.TgZ(1,"div"),t._uU(2,"Add Service Note"),t.qZA(),t.qZA()}}function ht(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"div",32),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(5,"div",33),t._uU(6),t.qZA(),t.TgZ(7,"div",34),t._uU(8),t.qZA(),t.qZA(),t.qZA(),t.TgZ(9,"td"),t.TgZ(10,"div",32),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(11,"div",33),t._uU(12),t.qZA(),t.TgZ(13,"div",34),t._uU(14),t.qZA(),t.qZA(),t.qZA(),t.TgZ(15,"td"),t._uU(16),t.qZA(),t.TgZ(17,"td"),t._uU(18),t.qZA(),t.TgZ(19,"td"),t._uU(20),t.qZA(),t.TgZ(21,"td"),t.TgZ(22,"div",35,36),t.NdJ("mouseover",function(){const o=t.CHM(e).$implicit;return t.oxw(4).setMorePosition(o.id)}),t.TgZ(24,"div",37),t.NdJ("click",function(i){const a=t.CHM(e).$implicit,c=t.oxw(4);return i.stopPropagation(),c.toggleMenu(a)}),t._UZ(25,"comp-icon",38),t.qZA(),t.TgZ(26,"div",39),t.YNc(27,pt,3,0,"div",40),t.YNc(28,ut,3,0,"div",40),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=s.$implicit;let n,i;t.xp6(1),t.ekj("no-contents",!e.type_label),t.xp6(1),t.Oqu(e.site_id),t.xp6(1),t.ekj("unknown","No Site Name"===e.site_name)("no-contents",!e.type_label),t.xp6(3),t.Oqu(e.site_name),t.xp6(2),t.Oqu(e.site_name),t.xp6(1),t.ekj("unknown","No Title"===e.title)("no-contents",!e.type_label),t.xp6(3),t.Oqu(e.title),t.xp6(2),t.Oqu(e.title),t.xp6(1),t.ekj("no-contents",!e.type_label),t.xp6(1),t.Oqu(e.type_label),t.xp6(1),t.ekj("no-contents",!e.type_label),t.xp6(1),t.Oqu(null!==(n=e.created_at)&&void 0!==n?n:"-"),t.xp6(1),t.ekj("no-contents",!e.type_label),t.xp6(1),t.Oqu(null!==(i=e.updated_at)&&void 0!==i?i:"-"),t.xp6(2),t.Q6J("id","service-note-"+e.id),t.xp6(3),t.Q6J("icon","more_horiz")("size",20)("color","hsla(0, 0%, 0%, 0.87)"),t.xp6(1),t.ekj("show",e.isShowMenu),t.Q6J("id","service-note-more-"+e.id),t.xp6(1),t.Q6J("ngIf",null==e?null:e.type),t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.type))}}function mt(r,s){if(1&r&&(t.ynx(0),t.YNc(1,ht,29,33,"tr",31),t.BQk()),2&r){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.pagedItems)}}function ft(r,s){if(1&r&&(t.TgZ(0,"div",29),t.TgZ(1,"table"),t.TgZ(2,"colgroup"),t.YNc(3,gt,1,1,"col",10),t.qZA(),t.TgZ(4,"tbody"),t.YNc(5,mt,2,1,"ng-container",30),t.qZA(),t.qZA(),t.qZA()),2&r){const e=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",e.serviceTableHeader),t.xp6(2),t.Q6J("ngIf",!e.isLoading)}}function xt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div",8),t.TgZ(2,"table",9),t.NdJ("sorted",function(i){return t.CHM(e),t.oxw().sortTableByColumnInServiceNote(i)}),t.TgZ(3,"colgroup"),t.YNc(4,ct,1,1,"col",10),t.qZA(),t.TgZ(5,"thead"),t.TgZ(6,"tr"),t.YNc(7,lt,2,2,"th",11),t.qZA(),t.qZA(),t.qZA(),t.YNc(8,dt,5,0,"div",12),t.YNc(9,_t,5,0,"div",12),t.YNc(10,ft,6,2,"div",13),t.TgZ(11,"div",14),t._UZ(12,"div",15),t._UZ(13,"div",16),t.TgZ(14,"div",17),t.TgZ(15,"div"),t._uU(16),t.qZA(),t.TgZ(17,"div"),t._uU(18,"of "),t.qZA(),t.TgZ(19,"div"),t._uU(20),t.qZA(),t.qZA(),t.TgZ(21,"div",18),t.TgZ(22,"div",19),t.TgZ(23,"div",20),t.TgZ(24,"div",21),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return i.setPage(i.pager.currentPage-1)}),t.TgZ(25,"div",22),t.TgZ(26,"i",23),t._uU(27,"arrow_back"),t.qZA(),t.TgZ(28,"span"),t._uU(29,"Prev"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(30,"div",20),t.TgZ(31,"div",21),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return i.setPage(i.pager.currentPage+1)}),t.TgZ(32,"div",22),t.TgZ(33,"span"),t._uU(34,"Next"),t.qZA(),t._UZ(35,"comp-icon",24),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(4),t.Q6J("ngForOf",e.serviceTableHeader),t.xp6(3),t.Q6J("ngForOf",e.serviceTableHeader),t.xp6(1),t.Q6J("ngIf","no-data"===e.determineElementToShowInServiceNoteTable()),t.xp6(1),t.Q6J("ngIf","no-permission"===e.determineElementToShowInServiceNoteTable()),t.xp6(1),t.Q6J("ngIf","normal"===e.determineElementToShowInServiceNoteTable()),t.xp6(6),t.AsE("",e.pageOffsetStart," - ",e.pageOffsetEnd,""),t.xp6(4),t.Oqu(e.totalItem),t.xp6(4),t.ekj("disabled",1===e.pager.currentPage||0===e.pager.currentPage),t.xp6(2),t.ekj("disabled",1===e.pager.currentPage||0===e.pager.currentPage),t.xp6(5),t.ekj("disabled",e.pager.currentPage===e.pager.totalPages),t.xp6(4),t.ekj("disabled",e.pager.currentPage===e.pager.totalPages),t.Q6J("icon","arrow_forward_n")("color","#000")("size",16)}}let bt=(()=>{class r{constructor(e,n,i,o){this.pagerService=e,this.commonService=n,this.c_components=i,this.helper=o,this.isLoading=!1,this.hasReadSiteNotesPermission=!1,this.hasCreateSiteNotesPermission=!1,this.hasUpdateSiteNotesPermission=!1,this.generalTypeCount=0,this.installationTypeCount=0,this.accountingTypeCount=0,this.serviceTypeCount=0,this.salesTypeCount=0,this.noContentTypeCount=0,this.serviceTableHeader=[{name:"SITE ID",value:"site_id",width:"7%"},{name:"SITE NAME",value:"site_name",width:"22%"},{name:"SERVICE TITLE",value:"note_title",width:"31%"},{name:"TYPE",value:"type_label",width:"5%"},{name:"DATE CREATED",value:"created_at",width:"10%"},{name:"DATE UPDATED",value:"updated_at",width:"10%"},{name:"",value:null,width:"5%"}],this.pagedItems=[],this.pager={},this.curPage=1,this.totalItem=0,this.pageOffset=50,this.pageOffsetStart=1,this.pageOffsetEnd=1,this.lastPage=1}ngOnChanges(e){this.applyItemList(e),this.applyFilter(e)}onGlobalClick(e){this.serviceNoteActionMenus&&this.serviceNoteActionMenus.toArray().forEach(i=>{this.pagedItems.forEach(o=>{`service-note-${o.id}`===i.nativeElement.id&&(i.nativeElement.contains(e.target)||(o.isShowMenu=!1))})})}applyItemList(e){var n,i,o;!(null==e?void 0:e.pagedItemIsReady)||(null===(n=null==e?void 0:e.pagedItemIsReady)||void 0===n?void 0:n.currentValue)!==(null===(i=null==e?void 0:e.pagedItemIsReady)||void 0===i?void 0:i.previousValue)&&(!(null===(o=null==e?void 0:e.pagedItemIsReady)||void 0===o?void 0:o.currentValue)||(this.isLoading=!0,this.checkPermission(),this.setPage(1),this.isLoading=!1))}checkPermission(){this.hasReadSiteNotesPermission=this.helper.permission.has("site_note_read"),this.hasCreateSiteNotesPermission=this.helper.permission.has("site_note_create"),this.hasUpdateSiteNotesPermission=this.helper.permission.has("site_note_update")}applyFilter(e){var n,i,o;!(null==e?void 0:e.filterList)||(null===(n=null==e?void 0:e.filterList)||void 0===n?void 0:n.currentValue)!==(null===(i=null==e?void 0:e.filterList)||void 0===i?void 0:i.previousValue)&&(!(null===(o=null==e?void 0:e.filterList)||void 0===o?void 0:o.currentValue)||(this.isLoading=!0,this.setPage(1),this.isLoading=!1))}goToServiceNoteDetail(e,n){e.stopPropagation();const i=n.id;this.commonService.emitSiteTab([{targetNoteId:i,targetUrl:`/customers/devices/note/${i}/note-detail`,name:"Notes",link:"note"},"note"]),this.helper.router.navigate_to(`/customers/devices/note/${i}/note-detail`,{id:n.site_id})}goToAddServiceNote(e,n){if(e.stopPropagation(),!this.hasCreateSiteNotesPermission)return this.openWarningDialog("add");this.commonService.emitSiteTab([{targetNoteId:n.id,targetUrl:"/customers/devices/note/note-detail/add",name:"Notes",link:"note"},"note"]),this.helper.router.navigate_to("/customers/devices/note/note-detail/add",{id:n.site_id})}setMorePosition(e){const n=document.documentElement;let i=document.getElementById("service-note-"+e),o=document.getElementById("service-note-more-"+e),a=null==i?void 0:i.getBoundingClientRect();const d=a.bottom+7;o.style.right=n.clientWidth-a.right-10+"px",o.style.top=d+"px"}toggleMenu(e){e.isShowMenu=!e.isShowMenu}checkTotalCountInServiceNote(e){this.generalTypeCount=0,this.installationTypeCount=0,this.accountingTypeCount=0,this.serviceTypeCount=0,this.salesTypeCount=0,this.noContentTypeCount=0,e.forEach(n=>{var i,o,a,c,d;"general"===(null===(i=null==n?void 0:n.type_label)||void 0===i?void 0:i.toLowerCase())&&this.generalTypeCount++,"installation"===(null===(o=null==n?void 0:n.type_label)||void 0===o?void 0:o.toLowerCase())&&this.installationTypeCount++,"accounting"===(null===(a=null==n?void 0:n.type_label)||void 0===a?void 0:a.toLowerCase())&&this.accountingTypeCount++,"service"===(null===(c=null==n?void 0:n.type_label)||void 0===c?void 0:c.toLowerCase())&&this.serviceTypeCount++,"sales"===(null===(d=null==n?void 0:n.type_label)||void 0===d?void 0:d.toLowerCase())&&this.salesTypeCount++,(null==n?void 0:n.type_label)||this.noContentTypeCount++})}determineElementToShowInServiceNoteTable(){var e;return!this.isLoading&&(this.hasReadSiteNotesPermission?(null===(e=this.pagedItems)||void 0===e?void 0:e.length)?"normal":"no-data":"no-permission")}compare(e,n,i){return(e<n?-1:1)*(i?1:-1)}sortTableByColumnInServiceNote(e){if(!e.sortColumn||""===e.sortDirection)return;const i=this.serviceNotePagedItems.sort((o,a)=>{var c,d,m,v;const f="asc"===e.sortDirection;switch(e.sortColumn){case"site_id":return this.compare(o.site_id,a.site_id,f);case"site_name":return this.compare(null===(c=o.site_name)||void 0===c?void 0:c.toLowerCase(),null===(d=a.site_name)||void 0===d?void 0:d.toLowerCase(),f);case"note_title":return this.compare(null===(m=o.title)||void 0===m?void 0:m.toLowerCase(),null===(v=a.title)||void 0===v?void 0:v.toLowerCase(),f);case"type_label":return this.compare(o.type_label,a.type_label,f);case"created_at":return this.compare(o.created_at,a.created_at,f);case"updated_at":return this.compare(o.updated_at,a.updated_at,f);default:return 0}});this.serviceNotePagedItems=i,this.setPage(1)}setPage(e){this.pagedItems=[];const n=this.filterItems();if(this.checkTotalCountInServiceNote(n),!n)return console.debug("\u26a0\ufe0f list is lost",n),this.isLoading=!1;this.pager=this.pagerService.getPager(null==n?void 0:n.length,e,this.pageOffset),this.totalItem=null==n?void 0:n.length,this.pagedItems=n.slice(this.pager.startIndex,this.pager.endIndex+1),this.curPage=this.pager.currentPage,this.pageOffsetStart=this.curPage-1<0?0:this.curPage-1==0?1:(this.curPage-1)*this.pageOffset+1,this.pageOffsetEnd=this.curPage*this.pageOffset>this.totalItem?this.totalItem:this.curPage*this.pageOffset}filterItems(){var e,n;if(!this.filterList)return;const i=null===(e=this.filterList)||void 0===e?void 0:e.selectedSite,o=null===(n=this.filterList)||void 0===n?void 0:n.noteTypeList;return N.Z._.cloneDeep(this.serviceNotePagedItems).filter(c=>{var d,m,v,f,O,T,w,P;const E=!i||i.site_id===c.site_id,F=0===o.length||o.includes(c.type_label)||o.includes("None : No Content")&&!c.type_label,U=(!(null===(d=this.filterList)||void 0===d?void 0:d.createdAtRange.start)||new Date(c.created_at)>=new Date(null===(m=this.filterList)||void 0===m?void 0:m.createdAtRange.start))&&(!(null===(v=this.filterList)||void 0===v?void 0:v.createdAtRange.end)||new Date(c.created_at)<=new Date(null===(f=this.filterList)||void 0===f?void 0:f.createdAtRange.end)),J=(!(null===(O=this.filterList)||void 0===O?void 0:O.updatedAtRange.start)||new Date(c.updated_at)>=new Date(null===(T=this.filterList)||void 0===T?void 0:T.updatedAtRange.start))&&(!(null===(w=this.filterList)||void 0===w?void 0:w.updatedAtRange.end)||new Date(c.updated_at)<=new Date(null===(P=this.filterList)||void 0===P?void 0:P.updatedAtRange.end));return E&&F&&U&&J})}openWarningDialog(e){let n="";"add"===e?n="<p>You do not have add permissions to access this.</b></p>":"edit"===e&&(n="<p>You do not have edit permissions to access this.</b></p>"),this.c_components.dialog.open("warning",{header:"Access Denied",contents:n,submit_btn:"OK",submit_class:["button-danger"],icon:"do_not_disturb_on",isConfirm:!0,color:"orange",submit_func:()=>{}})}}return r.\u0275fac=function(e){return new(e||r)(t.Y36(A.e),t.Y36(k.v),t.Y36(Y.I),t.Y36(L.W))},r.\u0275cmp=t.Xpm({type:r,selectors:[["c_dtable_service_note"]],viewQuery:function(e,n){if(1&e&&t.Gf(at,5),2&e){let i;t.iGM(i=t.CRH())&&(n.serviceNoteActionMenus=i)}},hostBindings:function(e,n){1&e&&t.NdJ("mousedown",function(o){return n.onGlobalClick(o)},!1,t.evT)},inputs:{pagedItemIsReady:"pagedItemIsReady",serviceNotePagedItems:"serviceNotePagedItems",filterList:"filterList"},features:[t.TTD],decls:16,vars:8,consts:[[1,"v-center",2,"font-size","14px","gap","4px","justify-content","end","padding","8px 20px"],[1,"default-label","small-font"],["class","loader absolute",4,"ngIf"],["class","table-area","style","height: calc(100% - 35px);",4,"ngIf"],[1,"loader","absolute"],["viewBox","25 25 50 50",1,"circular"],["cx","50","cy","50","r","20","fill","none","stroke-width","4","stroke-miterlimit","10",1,"path"],[1,"table-area",2,"height","calc(100% - 35px)"],[1,"content-body","table-container"],["sortable-table","",1,"table-header",3,"sorted"],[3,"width",4,"ngFor","ngForOf"],[3,"sortable-column",4,"ngFor","ngForOf"],["class","alternative-contents",4,"ngIf"],["class","table-body","style","max-height: calc(100% - 139px);",4,"ngIf"],[1,"pagination-area"],[2,"font-size","12px","padding-right","7px"],[1,"space"],[1,"flex",2,"font-size","12px","padding-right","7px","gap","2px"],[1,"pagination"],[1,"page-mover"],[1,"btn-area"],[1,"button","button-white",3,"click"],[1,"btn-inner"],[1,"material-icons",2,"font-size","16px"],[3,"icon","color","size"],[3,"width"],[3,"sortable-column"],[1,"alternative-contents"],[1,"material-icons"],[1,"table-body",2,"max-height","calc(100% - 139px)"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"--g-tooltip-content",2,"margin","0",3,"mouseenter"],[1,"ellipsis"],[1,"--g-tooltip","tooltip-background"],[1,"more-content","v-center",3,"id","mouseover"],["serviceNoteActionMenus",""],[1,"more-selector",3,"click"],[3,"icon","size","color"],[1,"more",3,"id"],["class","more-item pointer row",3,"click",4,"ngIf"],[1,"more-item","pointer","row",3,"click"]],template:function(e,n){1&e&&(t.ynx(0),t.TgZ(1,"div",0),t.TgZ(2,"div",1),t._uU(3),t.qZA(),t.TgZ(4,"div",1),t._uU(5),t.qZA(),t.TgZ(6,"div",1),t._uU(7),t.qZA(),t.TgZ(8,"div",1),t._uU(9),t.qZA(),t.TgZ(10,"div",1),t._uU(11),t.qZA(),t.TgZ(12,"div",1),t._uU(13),t.qZA(),t.qZA(),t.YNc(14,st,3,0,"div",2),t.YNc(15,xt,36,19,"div",3),t.BQk()),2&e&&(t.xp6(3),t.hij("General : ",n.generalTypeCount,""),t.xp6(2),t.hij("Installation : ",n.installationTypeCount,""),t.xp6(2),t.hij("Accounting : ",n.accountingTypeCount,""),t.xp6(2),t.hij("Service : ",n.serviceTypeCount,""),t.xp6(2),t.hij("Sales : ",n.salesTypeCount,""),t.xp6(2),t.hij("None : ",n.noContentTypeCount,""),t.xp6(1),t.Q6J("ngIf",n.isLoading),t.xp6(1),t.Q6J("ngIf",!n.isLoading))},directives:[l.O5,g.Q,l.sg,x.U,p.a],styles:['table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:50%;width:35px;height:35px}table.table-header[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;overflow-y:hidden}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{min-height:31px;background-color:#f7fafc;border-bottom:solid 1px rgba(0,0,0,.1);border-top:solid 1px rgba(0,0,0,.1);box-sizing:border-box;padding:0 6px}.table-container[_ngcontent-%COMP%] .table-header.no-top-border[_ngcontent-%COMP%]{border-top:0}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}table.table-header-v2[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 30px);flex:1;overflow-y:overlay}.table-container[_ngcontent-%COMP%] .no-record[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:7px 0}.has-child[_ngcontent-%COMP%]{cursor:pointer}.has-child[_ngcontent-%COMP%]:hover{background:#f0f0f0}.table-container[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;align-items:center}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px;color:#56657bde;text-transform:uppercase;text-align:left;font-size:13px;font-weight:normal}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px rgba(0,0,0,.1) solid}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.table-container[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:14px;color:#000000de;padding:7px;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;max-width:1vw}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}','@charset "UTF-8";.no-info[_ngcontent-%COMP%]{color:#00000061}.selected[_ngcontent-%COMP%]{color:#1e88e5;cursor:not-allowed}.text-primary[_ngcontent-%COMP%]{color:#1e88e5}.space[_ngcontent-%COMP%]{flex:1}.disabled[_ngcontent-%COMP%]{cursor:default;filter:contrast(60%) brightness(1.2);opacity:1;pointer-events:none;-webkit-user-select:none;user-select:none}.no-contents[_ngcontent-%COMP%]{color:#adb4bf!important}.default-label[_ngcontent-%COMP%]{padding:2px 8px;background:#F2F6F9;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content}.not-approved-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(255,184,0,.1);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:orange}.need-to-check[_ngcontent-%COMP%]{color:#cd3d64}.pending-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(128,128,128,.2);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:gray}.finalized-label[_ngcontent-%COMP%]{padding:2px 8px;background:#90ee9042;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#1a9267}.delete-requested-label[_ngcontent-%COMP%]{padding:2px 8px;background:#FFE2DD;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#ff6b6b}.approved_by_label[_ngcontent-%COMP%]{color:#0000004d}.tooltip-background[_ngcontent-%COMP%]{padding:4px 8px;background:rgba(0,0,0,.7);color:#fff;font-size:12px}.small-font[_ngcontent-%COMP%]{font-size:12px}.text-black[_ngcontent-%COMP%]{color:#000}.service-note-tag[_ngcontent-%COMP%]{background:#E3E8EE;padding:2px 8px;border-radius:3px;color:#55647b;font-size:12px}.pagination-area[_ngcontent-%COMP%]{position:absolute;background:white;bottom:0;display:flex;padding:12px;width:calc(100% - 24px);align-items:center;height:45px}.pagination-area[_ngcontent-%COMP%] .pagination-result[_ngcontent-%COMP%]{display:flex}.pagination-area[_ngcontent-%COMP%] .pagination-result-value[_ngcontent-%COMP%]{margin-right:5px;font-size:14px;color:#000000de}.pagination-area[_ngcontent-%COMP%] .pagination-result-label[_ngcontent-%COMP%]{font-size:14px;color:#0009}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%]{display:inline-block}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;color:#0009}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]:hover{color:#000000de}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn.mover-disabled[_ngcontent-%COMP%]{cursor:initial;color:#0000004d}.tab-table[_ngcontent-%COMP%]{height:calc(100% - 92px)}.table-area[_ngcontent-%COMP%]{height:100%}.table-container[_ngcontent-%COMP%]{position:relative}.table-container[_ngcontent-%COMP%] .unknown[_ngcontent-%COMP%]{color:#00000061}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.1);height:100%;max-height:calc(100% - 122px)}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#F6F8FA}.chekt-select-option-wrapper[_ngcontent-%COMP%]{position:relative}.chekt-select-option[_ngcontent-%COMP%]{height:30px;width:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;position:relative;z-index:1;background-color:#fff;border-radius:4px;box-shadow:#0000 0 0,#0000 0 0,#0000 0 0,#40445229 0 0 0 1px,#0000 0 0,#0000 0 0,#0000 0 0}.chekt-select-option.input-err[_ngcontent-%COMP%]{outline:none;background-color:#fbd0d6;box-shadow:0 0 0 2px #f1556c}.chekt-select-option[_ngcontent-%COMP%] > .chekt-select-option-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;position:relative;z-index:1;flex:0 1 auto;margin:0;text-decoration:none;vertical-align:middle;word-break:normal;background:transparent;border:0;outline:0;transition:color .24s;padding:4px 30px 4px 8px;-webkit-appearance:none;width:100%;appearance:none;-webkit-user-select:auto;user-select:auto;height:20px;cursor:pointer;font-family:Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;color:#3c4257}.chekt-select-option-icon[_ngcontent-%COMP%]{position:absolute;top:50%;right:8px;z-index:2;margin-top:-9px;transition:color .24s;pointer-events:none;color:#3c4257}.my-icon[_ngcontent-%COMP%]{width:1em;height:1em;display:flex;justify-content:center;align-items:center}.chekt-select-dropdown[_ngcontent-%COMP%]{background-color:#fff;width:100%;position:absolute;box-shadow:0 0 0 1px #8898aa1a,0 15px 35px #31315d1a,0 5px 15px #00000014;border-radius:4px;margin-top:7px;z-index:100;-webkit-user-select:none;user-select:none;transition:transform .3s cubic-bezier(.075,.82,.165,1),opacity .3s cubic-bezier(.075,.82,.165,1)}.select-option-modal-list[_ngcontent-%COMP%]{cursor:pointer;max-height:200px;color:#55647b;font-size:14px;overflow-y:auto}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 0 8px 8px}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .selected[_ngcontent-%COMP%]{color:#1e88e5;cursor:not-allowed}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:hover{background-color:#f7fafc}.loader[_ngcontent-%COMP%]{width:30px}.loader[_ngcontent-%COMP%] .circular[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{stroke:#8792a2}.more-content[_ngcontent-%COMP%]{position:relative;justify-content:flex-end;cursor:pointer}.more-content[_ngcontent-%COMP%] .more-selector[_ngcontent-%COMP%]{padding:0 7px}.more-content[_ngcontent-%COMP%] .more-selector[_ngcontent-%COMP%]:hover{outline:1px solid rgba(0,0,0,.1);border-radius:5px}.more-content[_ngcontent-%COMP%] .more-icon[_ngcontent-%COMP%]{cursor:pointer;padding:0 4px;border-radius:4px;margin-right:10px;font-size:18px;color:#0009;-webkit-user-select:none;user-select:none}.more-content[_ngcontent-%COMP%] .more-icon[_ngcontent-%COMP%]:hover, .more-content[_ngcontent-%COMP%] .more-icon.show[_ngcontent-%COMP%]{box-shadow:0 0 4px gray}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{visibility:hidden;opacity:0;background-color:#fff;color:#000000de;box-sizing:border-box;border-radius:6px;font-size:14px;box-shadow:0 0 10px #0000001a;border:1px solid rgba(0,0,0,.1);position:fixed;z-index:100;top:25px;right:0px}.more-content[_ngcontent-%COMP%] .more.show[_ngcontent-%COMP%]{visibility:visible;opacity:1}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-title[_ngcontent-%COMP%]{color:#000000de;margin-bottom:5px;font-weight:500}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-content[_ngcontent-%COMP%]{color:#0009;margin-bottom:14px;line-height:20px}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item[_ngcontent-%COMP%]{padding:7px 14px;box-sizing:border-box;font-size:14px;font-weight:400;cursor:pointer}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item[_ngcontent-%COMP%]:hover{background-color:#f7fafc}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item.txt-primary[_ngcontent-%COMP%]{color:#2383e2}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{color:#8792a2;margin-right:8px}.alternative-contents[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%;font-size:14px;color:#8792a2}.alternative-contents[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#8792a2;font-size:24px;margin:8px}']}),r})();const vt=["directionActionMenus"];function Ct(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw().commonService.setTooltipPosition(i,"top-center")}),t.TgZ(1,"div",5),t.TgZ(2,"i",6),t._uU(3,"edit"),t.qZA(),t.TgZ(4,"div"),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"div",7),t._uU(7,"The current directions are still in draft status. When you are ready, you may approve these directions for review. Once you have approved them for review, the directions will show as \u201cPending\u201d for further review and approval for display in the operator monitoring portal."),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(5),t.hij("Draft : ",e.notApprovedCount,"")}}function Pt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw().commonService.setTooltipPosition(i,"top-center")}),t.TgZ(1,"div",8),t.TgZ(2,"i",6),t._uU(3,"schedule"),t.qZA(),t.TgZ(4,"div"),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"div",7),t._uU(7,"These directions are waiting for approvals to be shown in the operator monitoring portal. Please review and approve it to ensure it\u2019s visible to operators."),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(5),t.hij("Approval Pending : ",e.approvalPendingCount,"")}}function Mt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw().commonService.setTooltipPosition(i,"top-center")}),t.TgZ(1,"div",9),t.TgZ(2,"i",6),t._uU(3,"check_circle"),t.qZA(),t.TgZ(4,"div"),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"div",7),t._uU(7,"The directions are finalized and visible to operators in the monitoring portal. If these directions are edited, the approval process must be completed again."),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(5),t.hij("Finalized : ",e.finalizedCount,"")}}function Ot(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw().commonService.setTooltipPosition(i,"top-center")}),t.TgZ(1,"div",10),t.TgZ(2,"i",6),t._uU(3,"do_not_disturb_on"),t.qZA(),t.TgZ(4,"div"),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"div",7),t._uU(7,"These directions are waiting for deleting to be hide in the operator monitoring portal. Please review and delete it to ensure it\u2019s visible to operators."),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(5),t.hij("Delete Requested : ",e.deleteRequested,"")}}function Tt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw().commonService.setTooltipPosition(i,"top-center")}),t.TgZ(1,"div",11),t._uU(2),t.qZA(),t.TgZ(3,"div",7),t._uU(4,"No Content"),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(2),t.hij("None : ",e.noContentCount,"")}}function wt(r,s){1&r&&(t.TgZ(0,"div",12),t.O4$(),t.TgZ(1,"svg",13),t._UZ(2,"circle",14),t.qZA(),t.qZA())}function yt(r,s){1&r&&t._UZ(0,"col",33),2&r&&t.Q6J("width",s.$implicit.width)}function Zt(r,s){if(1&r&&(t.TgZ(0,"th",34),t._uU(1),t.qZA()),2&r){const e=s.$implicit;t.Q6J("sortable-column",e.value),t.xp6(1),t.hij(" ",e.name,"")}}function St(r,s){1&r&&(t.TgZ(0,"div",35),t.TgZ(1,"i",36),t._uU(2,"inventory_2"),t.qZA(),t.TgZ(3,"div"),t._uU(4,"No Monitoring Portal Directions"),t.qZA(),t.qZA())}function At(r,s){1&r&&(t.TgZ(0,"div",35),t.TgZ(1,"i",36),t._uU(2,"do_not_disturb_on"),t.qZA(),t.TgZ(3,"div"),t._uU(4,"Permission Denied"),t.qZA(),t.qZA())}function kt(r,s){1&r&&t._UZ(0,"col",33),2&r&&t.Q6J("width",s.$implicit.width)}function Lt(r,s){if(1&r&&(t.TgZ(0,"i",6),t._uU(1),t.qZA()),2&r){const e=t.oxw().$implicit,n=t.oxw(4);t.xp6(1),t.Oqu(n.computedStatusLabelIcon(e))}}function Nt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(i){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(4).goToDirectionDetail(i,o)}),t.TgZ(1,"div"),t._uU(2,"Go to Detail"),t.qZA(),t.qZA()}}function It(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(i){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(4).goToAddDirectionDetail(i,o)}),t.TgZ(1,"div"),t._uU(2,"Add Direction"),t.qZA(),t.qZA()}}function Dt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",51),t.NdJ("click",function(i){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(4).onClickApprove(i,o)}),t.TgZ(1,"div"),t._uU(2),t.qZA(),t.qZA()}if(2&r){const e=t.oxw().$implicit;t.xp6(2),t.Oqu(e.isOwnSite||e.isSiteMonitoringDealer?"Finalize":"Approve")}}function qt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(5,"div",40),t._uU(6),t.qZA(),t.TgZ(7,"div",7),t._uU(8),t.qZA(),t.qZA(),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td"),t.TgZ(12,"div",41),t.YNc(13,Lt,2,1,"i",42),t.TgZ(14,"div"),t._uU(15),t.qZA(),t.qZA(),t.qZA(),t.TgZ(16,"td"),t.TgZ(17,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(18,"div",40),t._uU(19),t.qZA(),t.TgZ(20,"div",7),t._uU(21),t.qZA(),t.qZA(),t.qZA(),t.TgZ(22,"td"),t.TgZ(23,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(24,"div",40),t._uU(25),t.qZA(),t.TgZ(26,"div",7),t._uU(27),t.qZA(),t.qZA(),t.qZA(),t.TgZ(28,"td"),t.TgZ(29,"div"),t.TgZ(30,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(31,"div",40),t._uU(32),t.qZA(),t.TgZ(33,"div",7),t._uU(34),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(35,"td"),t.TgZ(36,"div"),t.TgZ(37,"div",4),t.NdJ("mouseenter",function(i){return t.CHM(e),t.oxw(4).commonService.setTooltipPosition(i,"top-center")}),t.TgZ(38,"div",40),t._uU(39),t.qZA(),t.TgZ(40,"div",7),t._uU(41),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(42,"td"),t._uU(43),t.qZA(),t.TgZ(44,"td"),t._uU(45),t.qZA(),t.TgZ(46,"td"),t.TgZ(47,"div",43,44),t.NdJ("mouseover",function(){const o=t.CHM(e).$implicit;return t.oxw(4).setMorePosition(o.id)}),t.TgZ(49,"div",45),t.NdJ("click",function(i){const a=t.CHM(e).$implicit,c=t.oxw(4);return i.stopPropagation(),c.toggleMenu(a)}),t._UZ(50,"comp-icon",46),t.qZA(),t.TgZ(51,"div",47),t.YNc(52,Nt,3,0,"div",48),t.YNc(53,It,3,0,"div",48),t.YNc(54,Dt,3,1,"div",49),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=s.$implicit,n=t.oxw(4);let i,o;t.xp6(1),t.ekj("no-contents",null===e.status),t.xp6(1),t.Oqu(e.site_id),t.xp6(1),t.ekj("no-contents",null===e.status),t.xp6(3),t.Oqu(e.site_name),t.xp6(2),t.Oqu(e.site_name),t.xp6(1),t.ekj("no-contents",null===e.status),t.xp6(1),t.Oqu(e.type),t.xp6(2),t.ekj("no-contents",null===e.status),t.Q6J("ngClass",n.computedStatusLabelColor(e)),t.xp6(1),t.Q6J("ngIf",n.computedStatusLabelIcon(e)),t.xp6(2),t.Oqu(e.statusLabel),t.xp6(1),t.ekj("no-contents",null===e.status),t.xp6(3),t.Oqu("Site"===e.type?"-":e.zone_number),t.xp6(2),t.Oqu("Site"===e.type?"-":e.zone_number),t.xp6(1),t.ekj("unknown","No Name"===e.name)("no-contents",null===e.status),t.xp6(3),t.Oqu(e.name),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.ekj("need-to-check",n.isNeedToCheck(null==e?null:e.site_owned_dealer_approved_by))("no-contents",null===e.status)("approved_by_label",n.computedMPDirectionStatusLabelColor(null==e?null:e.site_owned_dealer_approved_by)),t.xp6(3),t.Oqu(e.site_owned_dealer_approved_by),t.xp6(2),t.Oqu(e.site_owned_dealer_approved_by),t.xp6(2),t.ekj("need-to-check",n.isNeedToCheck(null==e?null:e.monitoring_operator_approved_by))("no-contents",null===e.status)("approved_by_label",n.computedMPDirectionStatusLabelColor(null==e?null:e.monitoring_operator_approved_by)),t.xp6(3),t.Oqu(e.monitoring_operator_approved_by),t.xp6(2),t.Oqu(e.monitoring_operator_approved_by),t.xp6(1),t.ekj("no-contents",null===e.status),t.xp6(1),t.Oqu(null!==(i=e.created_at)&&void 0!==i?i:"-"),t.xp6(1),t.ekj("no-contents",null===e.status),t.xp6(1),t.Oqu(null!==(o=e.updated_at)&&void 0!==o?o:"-"),t.xp6(2),t.Q6J("id","direction-"+e.id),t.xp6(3),t.Q6J("icon","more_horiz")("size",20)("color","hsla(0, 0%, 0%, 0.87)"),t.xp6(1),t.ekj("show",e.isShowMenu),t.Q6J("id","more-direction-"+e.id),t.xp6(1),t.Q6J("ngIf",null!=(null==e?null:e.status)),t.xp6(1),t.Q6J("ngIf",null===(null==e?null:e.status)),t.xp6(1),t.Q6J("ngIf",n.doWeNeedApproveBtn(e))}}function zt(r,s){if(1&r&&(t.ynx(0),t.YNc(1,qt,55,57,"tr",39),t.BQk()),2&r){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.pagedItems)}}function Et(r,s){if(1&r&&(t.TgZ(0,"div",37),t.TgZ(1,"table"),t.TgZ(2,"colgroup"),t.YNc(3,kt,1,1,"col",18),t.qZA(),t.TgZ(4,"tbody"),t.YNc(5,zt,2,1,"ng-container",38),t.qZA(),t.qZA(),t.qZA()),2&r){const e=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",e.mpDirectionTableHeader),t.xp6(2),t.Q6J("ngIf",!e.isLoading)}}function Ft(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",15),t.TgZ(1,"div",16),t.TgZ(2,"table",17),t.NdJ("sorted",function(i){return t.CHM(e),t.oxw().sortTableByColumnInMPDirections(i)}),t.TgZ(3,"colgroup"),t.YNc(4,yt,1,1,"col",18),t.qZA(),t.TgZ(5,"thead"),t.TgZ(6,"tr"),t.YNc(7,Zt,2,2,"th",19),t.qZA(),t.qZA(),t.qZA(),t.YNc(8,St,5,0,"div",20),t.YNc(9,At,5,0,"div",20),t.YNc(10,Et,6,2,"div",21),t.TgZ(11,"div",22),t._UZ(12,"div",23),t._UZ(13,"div",24),t.TgZ(14,"div",25),t.TgZ(15,"div"),t._uU(16),t.qZA(),t.TgZ(17,"div"),t._uU(18,"of "),t.qZA(),t.TgZ(19,"div"),t._uU(20),t.qZA(),t.qZA(),t.TgZ(21,"div",26),t.TgZ(22,"div",27),t.TgZ(23,"div",28),t.TgZ(24,"div",29),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return i.setPage(i.pager.currentPage-1)}),t.TgZ(25,"div",30),t.TgZ(26,"i",31),t._uU(27,"arrow_back"),t.qZA(),t.TgZ(28,"span"),t._uU(29,"Prev"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(30,"div",28),t.TgZ(31,"div",29),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return i.setPage(i.pager.currentPage+1)}),t.TgZ(32,"div",30),t.TgZ(33,"span"),t._uU(34,"Next"),t.qZA(),t._UZ(35,"comp-icon",32),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(4),t.Q6J("ngForOf",e.mpDirectionTableHeader),t.xp6(3),t.Q6J("ngForOf",e.mpDirectionTableHeader),t.xp6(1),t.Q6J("ngIf","no-data"===e.determineElementToShowInMPDirection()),t.xp6(1),t.Q6J("ngIf","no-permission"===e.determineElementToShowInMPDirection()),t.xp6(1),t.Q6J("ngIf","normal"===e.determineElementToShowInMPDirection()),t.xp6(6),t.AsE("",e.pageOffsetStart," - ",e.pageOffsetEnd,""),t.xp6(4),t.Oqu(e.totalItem),t.xp6(4),t.ekj("disabled",1===e.pager.currentPage||0===e.pager.currentPage),t.xp6(2),t.ekj("disabled",1===e.pager.currentPage||0===e.pager.currentPage),t.xp6(5),t.ekj("disabled",e.pager.currentPage===e.pager.totalPages),t.xp6(4),t.ekj("disabled",e.pager.currentPage===e.pager.totalPages),t.Q6J("icon","arrow_forward_n")("color","#000")("size",16)}}let Ut=(()=>{class r{constructor(e,n,i,o,a){this.pagerService=e,this.commonService=n,this.sitesService=i,this.c_components=o,this.helper=a,this.reload=new t.vpe,this.isLoading=!1,this.hasReadDirectionPermission=!1,this.hasCreateDirectionPermission=!1,this.hasUpdateDirectionPermission=!1,this.hasApproveDirectionPermission=!1,this.mpDirectionTableHeader=[{name:"SITE ID",value:"site_id",width:"7%"},{name:"SITE NAME",value:"site_name",width:"10%"},{name:"TYPE",value:"type",width:"5%"},{name:"STATUS",value:"status",width:"10%"},{name:"CH#",value:"zone_number",width:"5%"},{name:"SITE / CAMERA NAME",value:"direction_name",width:"22%"},{name:"DEALER APPROVAL",value:"site_owned_dealer_approved_by",width:"10%"},{name:"STATION APPROVAL",value:"monitoring_operator_approved_by",width:"10%"},{name:"DATE CREATED",value:"created_at",width:"8%"},{name:"DATE UPDATED",value:"updated_at",width:"8%"},{name:"",value:null,width:"5%"}],this.pagedItems=[],this.notApprovedCount=0,this.approvalPendingCount=0,this.finalizedCount=0,this.deleteRequested=0,this.noContentCount=0,this.pager={},this.curPage=1,this.totalItem=0,this.pageOffset=50,this.pageOffsetStart=1,this.pageOffsetEnd=1,this.lastPage=1}ngOnChanges(e){this.applyItemList(e),this.applyFilter(e)}onGlobalClick(e){this.directionActionMenus&&this.directionActionMenus.toArray().forEach(i=>{this.pagedItems.forEach(o=>{`direction-${o.id}`===i.nativeElement.id&&(i.nativeElement.contains(e.target)||(o.isShowMenu=!1))})})}applyItemList(e){var n,i,o;!(null==e?void 0:e.pagedItemIsReady)||(null===(n=null==e?void 0:e.pagedItemIsReady)||void 0===n?void 0:n.currentValue)!==(null===(i=null==e?void 0:e.pagedItemIsReady)||void 0===i?void 0:i.previousValue)&&(!(null===(o=null==e?void 0:e.pagedItemIsReady)||void 0===o?void 0:o.currentValue)||(this.isLoading=!0,this.checkPermission(),this.setPage(1),this.isLoading=!1))}checkPermission(){this.hasReadDirectionPermission=this.helper.permission.has("mp_direction_read"),this.hasCreateDirectionPermission=this.helper.permission.has("mp_direction_create"),this.hasUpdateDirectionPermission=this.helper.permission.has("mp_direction_update"),this.hasApproveDirectionPermission=this.helper.permission.has("mp_direction_approve")}applyFilter(e){var n,i,o;!(null==e?void 0:e.filterList)||(null===(n=null==e?void 0:e.filterList)||void 0===n?void 0:n.currentValue)!==(null===(i=null==e?void 0:e.filterList)||void 0===i?void 0:i.previousValue)&&(!(null===(o=null==e?void 0:e.filterList)||void 0===o?void 0:o.currentValue)||(this.isLoading=!0,this.setPage(1),this.isLoading=!1))}setMorePosition(e){const n=document.documentElement;let i=document.getElementById("direction-"+e),o=document.getElementById("more-direction-"+e),a=null==i?void 0:i.getBoundingClientRect();const d=(null==a?void 0:a.bottom)+7;o.style.right=n.clientWidth-(null==a?void 0:a.right)-10+"px",o.style.top=d+"px"}toggleMenu(e){e.isShowMenu=!e.isShowMenu}computedStatusLabelColor(e){return e?this.isNoContents(e)?"no-contents":0===e.status?"not-approved-label":1===e.status?"pending-label":2===e.status?"finalized-label":3===e.status?"pending-label":4===e.status?"delete-requested-label":void 0:""}computedStatusLabelIcon(e){return!e||this.isNoContents(e)?"":0===e.status?"edit":1===e.status?"schedule":2===e.status?"check_circle":3===e.status?"schedule":4===e.status?"do_not_disturb_on":void 0}computedMPDirectionStatusLabelColor(e){return"Skip"===e||"Waiting for approval"===e}isNoContents(e){return null===e.status}isNeedToCheck(e){return"Need to Check"===e}determineElementToShowInMPDirection(){var e;return!this.isLoading&&(this.hasReadDirectionPermission?(null===(e=this.pagedItems)||void 0===e?void 0:e.length)?"normal":"no-data":"no-permission")}goToDirectionDetail(e,n){var i;e.stopPropagation();try{const o=null==n?void 0:n.id,a=`/customers/monitoring/direction/${o}/monitoring-detail`;this.sitesService.selSite=null===(i=this.sitesService.sites)||void 0===i?void 0:i.find(c=>c.site_id===n.site_id),this.commonService.emitSiteTab([{targetNoteId:o,targetUrl:a,name:"Directions",link:"monitoring/direction"},"direction"]),this.helper.router.navigate_to(`/customers/monitoring/direction/${o}/monitoring-detail`,{id:n.site_id})}catch(o){console.debug("goToDirectionDetail",o)}}goToAddDirectionDetail(e,n){var i;if(e.stopPropagation(),!this.hasCreateDirectionPermission)return this.openWarningPermissionDialog("add");try{const o=null==n?void 0:n.id,a=`/customers/devices/note/monitoring-detail/add/${o}`;this.sitesService.selSite=null===(i=this.sitesService.sites)||void 0===i?void 0:i.find(c=>c.site_id===n.site_id),this.commonService.emitSiteTab([{targetNoteId:o,targetUrl:a,name:"Notes",link:"note"},"note"]),this.helper.router.navigate_to(`/customers/devices/note/monitoring-detail/add/${o}`,{id:n.site_id})}catch(o){console.debug("goToAddDirectionDetail",o)}}checkTotalCountInMPDirection(e){this.notApprovedCount=0,this.approvalPendingCount=0,this.finalizedCount=0,this.deleteRequested=0,this.noContentCount=0,e.forEach(n=>{0===n.status&&this.notApprovedCount++,1===n.status&&this.approvalPendingCount++,2===n.status&&this.finalizedCount++,3===n.status&&this.approvalPendingCount++,4===n.status&&this.deleteRequested++,null===n.status&&this.noContentCount++})}doWeNeedApproveBtn(e){if(!(null==e?void 0:e.id)||null===(null==e?void 0:e.status)||4===(null==e?void 0:e.status)||!this.hasApproveDirectionPermission)return!1;if(1===(null==e?void 0:e.status)){if(e.isOwnSite)return!0;if(e.monitoring_operator_approved_by)return e.isSiteMonitoringDealer;if(e.site_owned_dealer_approved_by)return!e.isSiteOwnerDealer}return 2!==(null==e?void 0:e.status)}onClickApprove(e,n){return(0,u.mG)(this,void 0,void 0,function*(){let i;e.stopPropagation(),this.isLoading=!0,i=n.isOwnSite||n.isSiteMonitoringDealer||1===n.status?2:1,(yield this.editMonitoringNoteStatus(n,i))?(yield N.Z.tool.sleep(500),this.reload.emit(),this.commonService.showSuccessToast("Success","Monitoring direction updated successfully.")):this.commonService.showErrorToast("Error","Invalid status"),n.isShowMenu=!1,this.isLoading=!1})}editMonitoringNoteStatus(e,n){return(0,u.mG)(this,void 0,void 0,function*(){try{if(!(null==e?void 0:e.id))return!1;const i={status:n};return yield this.helper.note_directions.update_monitoring_direction_status(e.site_id,e.id,i),!0}catch(i){return this.isLoading=!1,console.debug("editMonitoringNoteStatus:>",i),!1}})}compare(e,n,i){return(e<n?-1:1)*(i?1:-1)}openWarningPermissionDialog(e){let n="";"add"===e?n="<p>You do not have add permissions to access this.</b></p>":"edit"===e&&(n="<p>You do not have edit permissions to access this.</b></p>"),this.c_components.dialog.open("warning",{header:"Access Denied",contents:n,submit_btn:"OK",submit_class:["button-danger"],icon:"do_not_disturb_on",isConfirm:!0,color:"orange",submit_func:()=>{}})}sortTableByColumnInMPDirections(e){if(!e.sortColumn||""===e.sortDirection)return;const i=this.mpDirectionPagedItems.sort((o,a)=>{const c="asc"===e.sortDirection;switch(e.sortColumn){case"site_id":return this.compare(o.site_id,a.site_id,c);case"site_name":return this.compare(o.site_name,a.site_name,c);case"type":return this.compare(o.type,a.type,c);case"status":return this.compare(o.status,a.status,c);case"zone_number":return this.compare(o.zone_number,a.zone_number,c);case"direction_name":return this.compare(o.name.toLowerCase(),a.name.toLowerCase(),c);case"site_owned_dealer_approved_by":return this.compare(o.site_owned_dealer_approved_by.toLowerCase(),a.site_owned_dealer_approved_by.toLowerCase(),c);case"monitoring_operator_approved_by":return this.compare(o.monitoring_operator_approved_by.toLowerCase(),a.monitoring_operator_approved_by.toLowerCase(),c);case"created_at":return this.compare(o.created_at,a.created_at,c);case"updated_at":return this.compare(o.updated_at,a.updated_at,c);default:return 0}});this.mpDirectionPagedItems=i,this.setPage(1)}setPage(e){this.pagedItems=[];const n=this.filterItems();if(this.checkTotalCountInMPDirection(n),!n)return console.debug("\u26a0\ufe0f list is lost",n),this.isLoading=!1;this.pager=this.pagerService.getPager(null==n?void 0:n.length,e,this.pageOffset),this.totalItem=null==n?void 0:n.length,this.pagedItems=n.slice(this.pager.startIndex,this.pager.endIndex+1),this.curPage=this.pager.currentPage,this.pageOffsetStart=this.curPage-1<0?0:this.curPage-1==0?1:(this.curPage-1)*this.pageOffset+1,this.pageOffsetEnd=this.curPage*this.pageOffset>this.totalItem?this.totalItem:this.curPage*this.pageOffset}filterItems(){var e,n;if(!this.filterList)return;const i=null===(e=this.filterList)||void 0===e?void 0:e.selectedSite,o=null===(n=this.filterList)||void 0===n?void 0:n.directionStatusList;return N.Z._.cloneDeep(this.mpDirectionPagedItems).filter(c=>{var d,m,v,f,O,T,w,P;const E=!i||i.site_id===c.site_id,F=0===o.length||o.includes(c.statusLabel)||o.includes("None : No Content")&&null===c.status,U=(!(null===(d=this.filterList)||void 0===d?void 0:d.createdAtRange.start)||new Date(c.created_at)>=new Date(null===(m=this.filterList)||void 0===m?void 0:m.createdAtRange.start))&&(!(null===(v=this.filterList)||void 0===v?void 0:v.createdAtRange.end)||new Date(c.created_at)<=new Date(null===(f=this.filterList)||void 0===f?void 0:f.createdAtRange.end)),J=(!(null===(O=this.filterList)||void 0===O?void 0:O.updatedAtRange.start)||new Date(c.updated_at)>=new Date(null===(T=this.filterList)||void 0===T?void 0:T.updatedAtRange.start))&&(!(null===(w=this.filterList)||void 0===w?void 0:w.updatedAtRange.end)||new Date(c.updated_at)<=new Date(null===(P=this.filterList)||void 0===P?void 0:P.updatedAtRange.end));return E&&F&&U&&J})}}return r.\u0275fac=function(e){return new(e||r)(t.Y36(A.e),t.Y36(k.v),t.Y36(I.f),t.Y36(Y.I),t.Y36(L.W))},r.\u0275cmp=t.Xpm({type:r,selectors:[["c_dtable_monitoring_portal_direction"]],viewQuery:function(e,n){if(1&e&&t.Gf(vt,5),2&e){let i;t.iGM(i=t.CRH())&&(n.directionActionMenus=i)}},hostBindings:function(e,n){1&e&&t.NdJ("mousedown",function(o){return n.onGlobalClick(o)},!1,t.evT)},inputs:{pagedItemIsReady:"pagedItemIsReady",mpDirectionPagedItems:"mpDirectionPagedItems",filterList:"filterList"},outputs:{reload:"reload"},features:[t.TTD],decls:9,vars:7,consts:[[1,"v-center",2,"font-size","14px","gap","4px","justify-content","end","padding","8px 20px"],["class","--g-tooltip-content","style","margin: 0",3,"mouseenter",4,"ngIf"],["class","loader absolute",4,"ngIf"],["class","table-area","style","height: calc(100% - 35px);",4,"ngIf"],[1,"--g-tooltip-content",2,"margin","0",3,"mouseenter"],[1,"not-approved-label","small-font","v-center",2,"cursor","pointer"],[1,"material-icons-outlined",2,"margin-right","5px","font-size","14px"],[1,"--g-tooltip","tooltip-background"],[1,"pending-label","small-font","v-center",2,"cursor","pointer"],[1,"finalized-label","small-font","v-center",2,"cursor","pointer"],[1,"delete-requested-label","small-font","v-center",2,"cursor","pointer"],[1,"default-label","small-font"],[1,"loader","absolute"],["viewBox","25 25 50 50",1,"circular"],["cx","50","cy","50","r","20","fill","none","stroke-width","4","stroke-miterlimit","10",1,"path"],[1,"table-area",2,"height","calc(100% - 35px)"],[1,"content-body","table-container"],["sortable-table","",1,"table-header",3,"sorted"],[3,"width",4,"ngFor","ngForOf"],[3,"sortable-column",4,"ngFor","ngForOf"],["class","alternative-contents",4,"ngIf"],["class","table-body","style","max-height: calc(100% - 139px);",4,"ngIf"],[1,"pagination-area"],[2,"font-size","12px","padding-right","7px"],[1,"space"],[1,"flex",2,"font-size","12px","padding-right","7px","gap","2px"],[1,"pagination"],[1,"page-mover"],[1,"btn-area"],[1,"button","button-white",3,"click"],[1,"btn-inner"],[1,"material-icons",2,"font-size","16px"],[3,"icon","color","size"],[3,"width"],[3,"sortable-column"],[1,"alternative-contents"],[1,"material-icons"],[1,"table-body",2,"max-height","calc(100% - 139px)"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"ellipsis"],[1,"v-center",3,"ngClass"],["class","material-icons-outlined","style","margin-right: 5px; font-size: 14px",4,"ngIf"],[1,"more-content","v-center",3,"id","mouseover"],["directionActionMenus",""],[1,"more-selector",3,"click"],[3,"icon","size","color"],[1,"more",3,"id"],["class","more-item row",3,"click",4,"ngIf"],["class","more-item text-primary row",3,"click",4,"ngIf"],[1,"more-item","row",3,"click"],[1,"more-item","text-primary","row",3,"click"]],template:function(e,n){1&e&&(t.ynx(0),t.TgZ(1,"div",0),t.YNc(2,Ct,8,1,"div",1),t.YNc(3,Pt,8,1,"div",1),t.YNc(4,Mt,8,1,"div",1),t.YNc(5,Ot,8,1,"div",1),t.YNc(6,Tt,5,1,"div",1),t.qZA(),t.YNc(7,wt,3,0,"div",2),t.YNc(8,Ft,36,19,"div",3),t.BQk()),2&e&&(t.xp6(2),t.Q6J("ngIf",n.notApprovedCount),t.xp6(1),t.Q6J("ngIf",n.approvalPendingCount),t.xp6(1),t.Q6J("ngIf",n.finalizedCount),t.xp6(1),t.Q6J("ngIf",n.deleteRequested),t.xp6(1),t.Q6J("ngIf",n.noContentCount),t.xp6(1),t.Q6J("ngIf",n.isLoading),t.xp6(1),t.Q6J("ngIf",!n.isLoading))},directives:[l.O5,g.Q,l.sg,x.U,p.a,l.mk],styles:['table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:50%;width:35px;height:35px}table.table-header[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;overflow-y:hidden}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{min-height:31px;background-color:#f7fafc;border-bottom:solid 1px rgba(0,0,0,.1);border-top:solid 1px rgba(0,0,0,.1);box-sizing:border-box;padding:0 6px}.table-container[_ngcontent-%COMP%] .table-header.no-top-border[_ngcontent-%COMP%]{border-top:0}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}table.table-header-v2[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 30px);flex:1;overflow-y:overlay}.table-container[_ngcontent-%COMP%] .no-record[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:7px 0}.has-child[_ngcontent-%COMP%]{cursor:pointer}.has-child[_ngcontent-%COMP%]:hover{background:#f0f0f0}.table-container[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;align-items:center}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px;color:#56657bde;text-transform:uppercase;text-align:left;font-size:13px;font-weight:normal}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px rgba(0,0,0,.1) solid}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.table-container[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:14px;color:#000000de;padding:7px;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;max-width:1vw}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}','@charset "UTF-8";.no-info[_ngcontent-%COMP%]{color:#00000061}.selected[_ngcontent-%COMP%]{color:#1e88e5;cursor:not-allowed}.text-primary[_ngcontent-%COMP%]{color:#1e88e5}.space[_ngcontent-%COMP%]{flex:1}.disabled[_ngcontent-%COMP%]{cursor:default;filter:contrast(60%) brightness(1.2);opacity:1;pointer-events:none;-webkit-user-select:none;user-select:none}.no-contents[_ngcontent-%COMP%]{color:#adb4bf!important}.default-label[_ngcontent-%COMP%]{padding:2px 8px;background:#F2F6F9;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content}.not-approved-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(255,184,0,.1);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:orange}.need-to-check[_ngcontent-%COMP%]{color:#cd3d64}.pending-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(128,128,128,.2);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:gray}.finalized-label[_ngcontent-%COMP%]{padding:2px 8px;background:#90ee9042;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#1a9267}.delete-requested-label[_ngcontent-%COMP%]{padding:2px 8px;background:#FFE2DD;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#ff6b6b}.approved_by_label[_ngcontent-%COMP%]{color:#0000004d}.tooltip-background[_ngcontent-%COMP%]{padding:4px 8px;background:rgba(0,0,0,.7);color:#fff;font-size:12px}.small-font[_ngcontent-%COMP%]{font-size:12px}.text-black[_ngcontent-%COMP%]{color:#000}.service-note-tag[_ngcontent-%COMP%]{background:#E3E8EE;padding:2px 8px;border-radius:3px;color:#55647b;font-size:12px}.pagination-area[_ngcontent-%COMP%]{position:absolute;background:white;bottom:0;display:flex;padding:12px;width:calc(100% - 24px);align-items:center;height:45px}.pagination-area[_ngcontent-%COMP%] .pagination-result[_ngcontent-%COMP%]{display:flex}.pagination-area[_ngcontent-%COMP%] .pagination-result-value[_ngcontent-%COMP%]{margin-right:5px;font-size:14px;color:#000000de}.pagination-area[_ngcontent-%COMP%] .pagination-result-label[_ngcontent-%COMP%]{font-size:14px;color:#0009}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%]{display:inline-block}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;color:#0009}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]:hover{color:#000000de}.pagination-area[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn.mover-disabled[_ngcontent-%COMP%]{cursor:initial;color:#0000004d}.tab-table[_ngcontent-%COMP%]{height:calc(100% - 92px)}.table-area[_ngcontent-%COMP%]{height:100%}.table-container[_ngcontent-%COMP%]{position:relative}.table-container[_ngcontent-%COMP%] .unknown[_ngcontent-%COMP%]{color:#00000061}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.1);height:100%;max-height:calc(100% - 122px)}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#F6F8FA}.chekt-select-option-wrapper[_ngcontent-%COMP%]{position:relative}.chekt-select-option[_ngcontent-%COMP%]{height:30px;width:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;position:relative;z-index:1;background-color:#fff;border-radius:4px;box-shadow:#0000 0 0,#0000 0 0,#0000 0 0,#40445229 0 0 0 1px,#0000 0 0,#0000 0 0,#0000 0 0}.chekt-select-option.input-err[_ngcontent-%COMP%]{outline:none;background-color:#fbd0d6;box-shadow:0 0 0 2px #f1556c}.chekt-select-option[_ngcontent-%COMP%] > .chekt-select-option-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;position:relative;z-index:1;flex:0 1 auto;margin:0;text-decoration:none;vertical-align:middle;word-break:normal;background:transparent;border:0;outline:0;transition:color .24s;padding:4px 30px 4px 8px;-webkit-appearance:none;width:100%;appearance:none;-webkit-user-select:auto;user-select:auto;height:20px;cursor:pointer;font-family:Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;color:#3c4257}.chekt-select-option-icon[_ngcontent-%COMP%]{position:absolute;top:50%;right:8px;z-index:2;margin-top:-9px;transition:color .24s;pointer-events:none;color:#3c4257}.my-icon[_ngcontent-%COMP%]{width:1em;height:1em;display:flex;justify-content:center;align-items:center}.chekt-select-dropdown[_ngcontent-%COMP%]{background-color:#fff;width:100%;position:absolute;box-shadow:0 0 0 1px #8898aa1a,0 15px 35px #31315d1a,0 5px 15px #00000014;border-radius:4px;margin-top:7px;z-index:100;-webkit-user-select:none;user-select:none;transition:transform .3s cubic-bezier(.075,.82,.165,1),opacity .3s cubic-bezier(.075,.82,.165,1)}.select-option-modal-list[_ngcontent-%COMP%]{cursor:pointer;max-height:200px;color:#55647b;font-size:14px;overflow-y:auto}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 0 8px 8px}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .selected[_ngcontent-%COMP%]{color:#1e88e5;cursor:not-allowed}.select-option-modal-list[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:hover{background-color:#f7fafc}.loader[_ngcontent-%COMP%]{width:30px}.loader[_ngcontent-%COMP%] .circular[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{stroke:#8792a2}.more-content[_ngcontent-%COMP%]{position:relative;justify-content:flex-end;cursor:pointer}.more-content[_ngcontent-%COMP%] .more-selector[_ngcontent-%COMP%]{padding:0 7px}.more-content[_ngcontent-%COMP%] .more-selector[_ngcontent-%COMP%]:hover{outline:1px solid rgba(0,0,0,.1);border-radius:5px}.more-content[_ngcontent-%COMP%] .more-icon[_ngcontent-%COMP%]{cursor:pointer;padding:0 4px;border-radius:4px;margin-right:10px;font-size:18px;color:#0009;-webkit-user-select:none;user-select:none}.more-content[_ngcontent-%COMP%] .more-icon[_ngcontent-%COMP%]:hover, .more-content[_ngcontent-%COMP%] .more-icon.show[_ngcontent-%COMP%]{box-shadow:0 0 4px gray}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{visibility:hidden;opacity:0;background-color:#fff;color:#000000de;box-sizing:border-box;border-radius:6px;font-size:14px;box-shadow:0 0 10px #0000001a;border:1px solid rgba(0,0,0,.1);position:fixed;z-index:100;top:25px;right:0px}.more-content[_ngcontent-%COMP%] .more.show[_ngcontent-%COMP%]{visibility:visible;opacity:1}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-title[_ngcontent-%COMP%]{color:#000000de;margin-bottom:5px;font-weight:500}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-content[_ngcontent-%COMP%]{color:#0009;margin-bottom:14px;line-height:20px}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item[_ngcontent-%COMP%]{padding:7px 14px;box-sizing:border-box;font-size:14px;font-weight:400;cursor:pointer}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item[_ngcontent-%COMP%]:hover{background-color:#f7fafc}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .more-item.txt-primary[_ngcontent-%COMP%]{color:#2383e2}.more-content[_ngcontent-%COMP%] .more[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{color:#8792a2;margin-right:8px}.alternative-contents[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%;font-size:14px;color:#8792a2}.alternative-contents[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#8792a2;font-size:24px;margin:8px}'],changeDetection:0}),r})();var Q=_(80646),b=_(59053);const Jt=["searcherDate"];function Rt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",7),t.NdJ("click",function(){return t.CHM(e),t.oxw().clearDates()}),t.TgZ(1,"i",3),t._uU(2,"cancel"),t.qZA(),t.qZA()}}let Yt=(()=>{class r{constructor(e,n,i,o){this.sitesService=e,this.router=n,this.renderer=i,this.cdr=o,this.label="Create",this.dateRange=new t.vpe,this.currentUrl="",this.selected={start:null,end:null},this.isSelectedDate=!1,this.timePicker=!1,this.timePicker24Houre=!1,this.isFocusSearchDate=!1,this.today=b.Z.moment(),this.startDate=b.Z.moment().utc().startOf("day"),this.endDate=b.Z.moment().utc().endOf("day"),this.locale={format:"MMM/DD/YY",displayFormat:"MMM/DD/YY",separator:" To ",cancelLabel:"Cancel",applyLabel:"Apply"},this.ranges={Today:[b.Z.moment().startOf("day"),b.Z.moment().endOf("day")],Yesterday:[b.Z.moment().subtract(1,"days").startOf("day"),b.Z.moment().subtract(1,"days").endOf("day")],"Last 7 Days":[b.Z.moment().subtract(6,"days").startOf("day"),b.Z.moment().endOf("day")],"Last 30 Days":[b.Z.moment().subtract(29,"days").startOf("day"),b.Z.moment().endOf("day")],"This Month":[b.Z.moment().startOf("month").startOf("day"),b.Z.moment().endOf("month")],"Last Month":[b.Z.moment().subtract(1,"month").startOf("month").startOf("day"),b.Z.moment().subtract(1,"month").endOf("month")]}}onGlobalClick(e){this.searcherDate&&(this.searcherDate.nativeElement.contains(e.target)||(this.isFocusSearchDate=!1))}ngOnInit(){this.initData()}ngAfterViewInit(){return(0,u.mG)(this,void 0,void 0,function*(){yield b.Z.tool.sleep(80),this.showOnlySelectedCalendar({rightHide:!0,leftHide:!1}),this.setCalenderWidth(),this.clearDates()})}ngOnChanges(e){!e.tab||e.tab.previousValue!==e.tab.currentValue&&e.tab.currentValue&&this.clearDates()}initData(){this.isFocusSearchDate=!1,this.isSelectedDate=!1,this.currentUrl=this.router.url,this.currentUrl.includes("customers")&&(this.site=this.sitesService.selSite,this.timePicker=!0,this.timePicker24Houre=!0,this.locale.format="MM/DD/YY HH:mm",this.locale.displayFormat="MM/DD/YY HH:mm")}setSearchFocusStartDate(e){this.isFocusSearchDate=e}setCalenderWidth(){const e=document.querySelectorAll(".md-drppicker");!e||!(null==e?void 0:e.length)||e.forEach(n=>{this.renderer.setStyle(n,"width","390px")})}clearDates(){this.picker&&(this.picker.clear(),this.isSelectedDate=!1,this.cdr.detectChanges())}calandarUpdate(e){var n;if(!e)return;const{startDate:i,endDate:o}=e;i&&(this.isSelectedDate=!0),(null===(n=this.site)||void 0===n?void 0:n.timezone)?(this.selected.start=i.tz(this.site.timezone),this.selected.end=o.tz(this.site.timezone)):(this.selected.start=i,this.selected.end=o),this.dateRange.emit({label:this.label,selected:this.selected})}calandarUpdateInRange(e){var n;if(!e)return;const{label:i,dates:o}=e;this.selected.start===o[0]&&this.selected.end===o[1]||((null===(n=this.site)||void 0===n?void 0:n.timezone)?(this.selected.start=o[0].tz(this.site.timezone),this.selected.end=o[1].tz(this.site.timezone)):(this.selected.start=o[0],this.selected.end=o[1]),this.showOnlySelectedCalendar("Today"===i||"Yesterday"===i||"Last 7 Days"===i?{rightHide:!1,leftHide:!0}:{rightHide:!0,leftHide:!1}),this.dateRange.emit({label:this.label,selected:this.selected}))}showOnlySelectedCalendar(e){const n=document.querySelectorAll(".calendar.right"),i=document.querySelectorAll(".calendar.left"),{rightHide:o,leftHide:a}=e;if(o){if(!n||!(null==n?void 0:n.length))return;n.forEach(c=>{this.renderer.setStyle(c,"display","none")}),i.forEach(c=>{this.renderer.setStyle(c,"display","block")})}if(a){if(!i||!(null==i?void 0:i.length))return;i.forEach(c=>{this.renderer.setStyle(c,"display","none")}),n.forEach(c=>{this.renderer.setStyle(c,"display","block")})}}}return r.\u0275fac=function(e){return new(e||r)(t.Y36(I.f),t.Y36(M.F0),t.Y36(t.Qsj),t.Y36(t.sBO))},r.\u0275cmp=t.Xpm({type:r,selectors:[["c_filter_date_range"]],viewQuery:function(e,n){if(1&e&&(t.Gf(Jt,5),t.Gf(Q.SP,5)),2&e){let i;t.iGM(i=t.CRH())&&(n.searcherDate=i.first),t.iGM(i=t.CRH())&&(n.picker=i.first)}},hostBindings:function(e,n){1&e&&t.NdJ("mousedown",function(o){return n.onGlobalClick(o)},!1,t.evT)},inputs:{label:"label",tab:"tab"},outputs:{dateRange:"dateRange"},features:[t.TTD],decls:9,vars:14,consts:[[2,"display","flex","max-width","350px","position","unset"],[1,"search-container",2,"margin-right","12px","position","unset","font-size","14px","height","30px",3,"click"],["searcherDate",""],[1,"material-icons",2,"font-size","16px"],[2,"font-size","13px","color","gray"],["autocomplete","off","type","text","ngxDaterangepickerMd","","placeholder","All Date Range","startKey","start","endKey","end",2,"color","hsla(0,0%,0%,0.87)",3,"ngModel","locale","maxDate","ranges","showClearButton","showRangeLabelOnInput","alwaysShowCalendars","keepCalendarOpeningWithRange","timePicker","timePicker24Hour","ngModelChange","datesUpdated","rangeClicked"],["class","search-close",3,"click",4,"ngIf"],[1,"search-close",3,"click"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1,2),t.NdJ("click",function(){return n.setSearchFocusStartDate(!0)}),t.TgZ(3,"i",3),t._uU(4,"date_range"),t.qZA(),t.TgZ(5,"div",4),t._uU(6),t.qZA(),t.TgZ(7,"input",5),t.NdJ("ngModelChange",function(o){return n.selected=o})("datesUpdated",function(o){return n.calandarUpdate(o)})("rangeClicked",function(o){return n.calandarUpdateInRange(o)}),t.qZA(),t.YNc(8,Rt,3,0,"div",6),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.ekj("search-focus",n.isFocusSearchDate),t.xp6(5),t.hij("",n.label," : "),t.xp6(1),t.Q6J("ngModel",n.selected)("locale",n.locale)("maxDate",n.today)("ranges",n.ranges)("showClearButton",!0)("showRangeLabelOnInput",!0)("alwaysShowCalendars",!0)("keepCalendarOpeningWithRange",!0)("timePicker",n.timePicker)("timePicker24Hour",n.timePicker24Houre),t.xp6(1),t.Q6J("ngIf",n.isSelectedDate))},directives:[Q.SP,C.Fj,C.JJ,C.On,l.O5],styles:[".hide[_ngcontent-%COMP%]{display:none}input[_ngcontent-%COMP%]{border:none;width:165px!important}"]}),r})();const Qt=["searchInput"],Ht=["filterBox"],jt=["siteSelect"],Bt=["selectSearchInput"],$t=["noteTypeSelect"],Gt=["statusSelect"];function Wt(r,s){1&r&&t._UZ(0,"div",16)}function Vt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",13),t.NdJ("click",function(){const o=t.CHM(e).$implicit;return t.oxw().moveToTab(o)}),t.TgZ(1,"div",14),t._uU(2),t.qZA(),t.YNc(3,Wt,1,0,"div",15),t.qZA()}if(2&r){const e=s.$implicit,n=t.oxw();t.ekj("btn-selected",n.tab==e)("disabled",n.isLoading),t.xp6(2),t.Oqu(e),t.xp6(1),t.Q6J("ngIf",n.tab==e)}}function Kt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",17),t.TgZ(1,"div",18),t.NdJ("click",function(){return t.CHM(e),t.oxw().setSearchFocus()}),t.TgZ(2,"i",19),t._uU(3,"search"),t.qZA(),t.TgZ(4,"input",20,21),t.NdJ("ngModelChange",function(i){return t.CHM(e),t.oxw().searchText=i}),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=t.oxw();t.xp6(1),t.ekj("search-focus",e.isFocusSearch)("disabled",e.isLoading),t.xp6(3),t.Q6J("ngModel",e.searchText)}}function Xt(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",30),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).isShowSiteSelect=!0}),t._UZ(1,"comp-icon",31),t.TgZ(2,"span"),t._uU(3,"Site Filter"),t.qZA(),t.qZA()}2&r&&(t.xp6(1),t.Q6J("icon","filter_list")("size",16)("color","hsla(0,0%,0%,0.6)"))}function te(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"span",35),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).isShowSiteSelect=!0}),t._uU(1),t.qZA()}if(2&r){const e=t.oxw(3);t.xp6(1),t.Oqu(e.selectedSite.name)}}function ee(r,s){if(1&r){const e=t.EpF();t.ynx(0),t.TgZ(1,"i",32),t._uU(2,"person"),t.qZA(),t.YNc(3,te,2,1,"span",33),t.TgZ(4,"i",34),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).clearSiteFilter()}),t._uU(5,"cancel"),t.qZA(),t.BQk()}if(2&r){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf",e.selectedSite)}}function ne(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",44),t.NdJ("click",function(i){const a=t.CHM(e).$implicit,c=t.oxw(3);return i.stopPropagation(),c.selectSite(a)}),t.TgZ(1,"div",45),t._uU(2),t.qZA(),t.qZA()}if(2&r){const e=s.$implicit,n=t.oxw(3);t.xp6(1),t.ekj("selected",(null==e?null:e.site_id)==(null==n.selectedSite?null:n.selectedSite.site_id)),t.xp6(1),t.Oqu(e.name)}}function ie(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",36),t.TgZ(1,"div",37,38),t.TgZ(3,"div",39),t.TgZ(4,"input",40,41),t.NdJ("ngModelChange",function(i){return t.CHM(e),t.oxw(2).searchSiteTxt=i})("input",function(){t.CHM(e);const i=t.oxw(2);return i.searchSite(i.searchSiteTxt)}),t.qZA(),t.qZA(),t.TgZ(6,"div",42),t.YNc(7,ne,3,3,"div",43),t.qZA(),t.qZA(),t.qZA()}if(2&r){const e=t.oxw(2);t.xp6(4),t.Q6J("ngModel",e.searchSiteTxt),t.xp6(3),t.Q6J("ngForOf",e.filteredSiteList)}}function oe(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",30),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).isShowNoteTypeSelect=!0}),t._UZ(1,"comp-icon",31),t.TgZ(2,"span"),t._uU(3,"Status"),t.qZA(),t.qZA()}2&r&&(t.xp6(1),t.Q6J("icon","filter_list")("size",16)("color","hsla(0,0%,0%,0.6)"))}function re(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"span",35),t.NdJ("click",function(){return t.CHM(e),t.oxw(4).isShowNoteTypeSelect=!0}),t._uU(1),t.qZA()}if(2&r){const e=t.oxw(4);t.xp6(1),t.Oqu(e.selectedNoteTypeListLabels)}}function ae(r,s){if(1&r){const e=t.EpF();t.ynx(0),t.TgZ(1,"i",32),t._uU(2,"expand_circle_down"),t.qZA(),t.YNc(3,re,2,1,"span",33),t.TgZ(4,"i",34),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).clearNoteTypeFilter()}),t._uU(5,"cancel"),t.qZA(),t.BQk()}if(2&r){const e=t.oxw(3);t.xp6(3),t.Q6J("ngIf",null==e.selectedNoteTypeList?null:e.selectedNoteTypeList.length)}}function se(r,s){1&r&&(t.TgZ(0,"i",55),t._uU(1,"check_box_outline_blank"),t.qZA())}function ce(r,s){1&r&&(t.TgZ(0,"i",56),t._uU(1,"check_box"),t.qZA())}function le(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",44),t.NdJ("click",function(i){const a=t.CHM(e).$implicit;return t.oxw(4).selectStatus(i,a)}),t.TgZ(1,"div",52),t.YNc(2,se,2,0,"i",53),t.YNc(3,ce,2,0,"i",54),t.qZA(),t.TgZ(4,"div"),t._uU(5),t.qZA(),t.qZA()}if(2&r){const e=s.$implicit;t.xp6(2),t.Q6J("ngIf",!e.isSelected),t.xp6(1),t.Q6J("ngIf",e.isSelected),t.xp6(2),t.Oqu(e.label)}}function de(r,s){if(1&r&&(t.TgZ(0,"div",47),t.TgZ(1,"div",37,48),t.TgZ(3,"div",49),t.TgZ(4,"div",50),t.TgZ(5,"div",51),t._uU(6,"Status"),t.qZA(),t.qZA(),t.YNc(7,le,6,3,"div",43),t.qZA(),t.qZA(),t.qZA()),2&r){const e=t.oxw(3);t.xp6(7),t.Q6J("ngForOf",e.noteTypeList)}}function _e(r,s){if(1&r&&(t.TgZ(0,"div",24),t.TgZ(1,"div",25),t.TgZ(2,"div",26),t.YNc(3,oe,4,3,"div",27),t.YNc(4,ae,6,1,"ng-container",9),t.qZA(),t.qZA(),t.YNc(5,de,8,1,"div",46),t.qZA()),2&r){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf","All"==e.selectedNoteTypeListLabels),t.xp6(1),t.Q6J("ngIf","All"!=e.selectedNoteTypeListLabels),t.xp6(1),t.Q6J("ngIf",e.isShowNoteTypeSelect)}}function ge(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",30),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).isShowDirectionStatusSelect=!0}),t._UZ(1,"comp-icon",31),t.TgZ(2,"span"),t._uU(3,"Status"),t.qZA(),t.qZA()}2&r&&(t.xp6(1),t.Q6J("icon","filter_list")("size",16)("color","hsla(0,0%,0%,0.6)"))}function pe(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"span",35),t.NdJ("click",function(){return t.CHM(e),t.oxw(4).isShowDirectionStatusSelect=!0}),t._uU(1),t.qZA()}if(2&r){const e=t.oxw(4);t.xp6(1),t.Oqu(e.selectedDirectionStatusListLabels)}}function ue(r,s){if(1&r){const e=t.EpF();t.ynx(0),t.TgZ(1,"i",32),t._uU(2,"expand_circle_down"),t.qZA(),t.YNc(3,pe,2,1,"span",33),t.TgZ(4,"i",34),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).clearDirectionStatusFilter()}),t._uU(5,"cancel"),t.qZA(),t.BQk()}if(2&r){const e=t.oxw(3);t.xp6(3),t.Q6J("ngIf",null==e.selectedDirectionStatusList?null:e.selectedDirectionStatusList.length)}}function he(r,s){1&r&&(t.TgZ(0,"i",55),t._uU(1,"check_box_outline_blank"),t.qZA())}function me(r,s){1&r&&(t.TgZ(0,"i",56),t._uU(1,"check_box"),t.qZA())}function fe(r,s){if(1&r){const e=t.EpF();t.TgZ(0,"div",44),t.NdJ("click",function(i){const a=t.CHM(e).$implicit;return t.oxw(4).selectStatus(i,a)}),t.TgZ(1,"div",52),t.YNc(2,he,2,0,"i",53),t.YNc(3,me,2,0,"i",54),t.qZA(),t.TgZ(4,"div"),t._uU(5),t.qZA(),t.qZA()}if(2&r){const e=s.$implicit;t.xp6(2),t.Q6J("ngIf",!e.isSelected),t.xp6(1),t.Q6J("ngIf",e.isSelected),t.xp6(2),t.Oqu(e.label)}}function xe(r,s){if(1&r&&(t.TgZ(0,"div",47),t.TgZ(1,"div",37,57),t.TgZ(3,"div",49),t.TgZ(4,"div",50),t.TgZ(5,"div",51),t._uU(6,"Status"),t.qZA(),t.qZA(),t.YNc(7,fe,6,3,"div",43),t.qZA(),t.qZA(),t.qZA()),2&r){const e=t.oxw(3);t.xp6(7),t.Q6J("ngForOf",e.directionStatusList)}}function be(r,s){if(1&r&&(t.TgZ(0,"div",24),t.TgZ(1,"div",25),t.TgZ(2,"div",26),t.YNc(3,ge,4,3,"div",27),t.YNc(4,ue,6,1,"ng-container",9),t.qZA(),t.qZA(),t.YNc(5,xe,8,1,"div",46),t.qZA()),2&r){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf","All"==e.selectedDirectionStatusListLabels),t.xp6(1),t.Q6J("ngIf","All"!=e.selectedDirectionStatusListLabels),t.xp6(1),t.Q6J("ngIf",e.isShowDirectionStatusSelect)}}function ve(r,s){if(1&r){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",17),t.TgZ(2,"c_filter_date_range",22),t.NdJ("dateRange",function(i){return t.CHM(e),t.oxw().dateRange(i)}),t.qZA(),t.TgZ(3,"c_filter_date_range",22),t.NdJ("dateRange",function(i){return t.CHM(e),t.oxw().dateRange(i)}),t.qZA(),t.qZA(),t.TgZ(4,"div",17,23),t.TgZ(6,"div",24),t.TgZ(7,"div",25),t.TgZ(8,"div",26),t.YNc(9,Xt,4,3,"div",27),t.YNc(10,ee,6,1,"ng-container",9),t.qZA(),t.qZA(),t.YNc(11,ie,8,2,"div",28),t.qZA(),t.YNc(12,_e,6,3,"div",29),t.YNc(13,be,6,3,"div",29),t.qZA(),t.BQk()}if(2&r){const e=t.oxw();t.xp6(2),t.Q6J("label","Created")("tab",e.tab),t.xp6(1),t.Q6J("label","Updated")("tab",e.tab),t.xp6(6),t.Q6J("ngIf",!e.selectedSite),t.xp6(1),t.Q6J("ngIf",e.selectedSite),t.xp6(1),t.Q6J("ngIf",e.isShowSiteSelect),t.xp6(1),t.Q6J("ngIf","service notes"===e.tab),t.xp6(1),t.Q6J("ngIf","monitoring portal directions"===e.tab)}}const Pe=M.Bz.forChild([{path:"",component:(()=>{class r{constructor(e,n,i,o,a,c){this.pagerService=e,this.sitesService=n,this.devicesService=i,this.commonService=o,this.integrationService=a,this.helper=c,this.isLoading=!1,this.pagedItemIsReady=!1,this.amIMainDealer=!1,this.dealerId=null,this.meDealerInfo=null,this.hasReadSiteNotesPermission=!1,this.hasReadDirectionPermission=!1,this.hasReadDealerPartnersPermission=!1,this.isFocusSearch=!1,this.searchText="",this.isSiteFilter=!1,this.isShowNoteTypeSelect=!1,this.isDirectionStatusFilter=!1,this.originalIsSiteFilter=!1,this.originalIsShowNoteTypeSelect=!1,this.originalIsDirectionStatusFilter=!1,this.isShowFilter=!1,this.totalFilter=0,this.filterList={selectedSite:"",noteTypeList:[],directionStatusList:[],createdAtRange:{start:null,end:null},updatedAtRange:{start:null,end:null}},this.isShowSiteSelect=!1,this.filteredSiteList=[],this.searchSiteTxt="",this.selectedSite=null,this.originalSelectedSite=null,this.isNoteTypeFilter=!1,this.noteTypeList=[{label:"General",isSelected:!0},{label:"Installation",isSelected:!0},{label:"Accounting",isSelected:!0},{label:"Service",isSelected:!0},{label:"Sales",isSelected:!0},{label:"None : No Content",isSelected:!0}],this.selectedNoteTypeList=this.noteTypeList.filter(d=>d.isSelected),this.originalNoteTypeList=this.selectedNoteTypeList,this.selectedNoteTypeListLabels="All",this.isShowDirectionStatusSelect=!1,this.directionStatusList=[{label:"Draft",isSelected:!0},{label:"Approval Pending",isSelected:!0},{label:"Finalized",isSelected:!0},{label:"Delete Requested",isSelected:!0},{label:"None : No Content",isSelected:!0}],this.selectedDirectionStatusList=this.directionStatusList.filter(d=>d.isSelected),this.originalDirectionStatusList=this.selectedDirectionStatusList,this.selectedDirectionStatusListLabels="All",this.tab_list=["site list","service notes","monitoring portal directions"],this.tab=this.tab_list[0],this.siteListPagedItems=[],this.serviceNotePagedItems=[],this.mpDirectionPagedItems=[],this.dealerList=[],this.siteList=[],this.searchSiteList=[],this.cameraList=[],this.monitoringStationList=[],this.mpDirectionList=[],this.isCalledDevices=!1}ngOnInit(){return(0,u.mG)(this,void 0,void 0,function*(){this.isLoading=!0,this.pagedItemIsReady=!1,yield this.checkAmIMainDealer(),yield this.checkPermission(),yield Promise.all([this.setDealerInfo(),this.getPartners(),this.getSites(),this.getDevices(),this.getMonitoringStationList()]),yield Promise.all([this.getServiceNotes(),this.getMPDirections()]),this.pagedItemIsReady=!0,this.isLoading=!1})}onGlobalClick(e){var n,i;this.searchInput&&((null===(n=this.searchInput)||void 0===n?void 0:n.nativeElement.contains(e.target))||(this.isFocusSearch=!1)),this.filterBox&&((null===(i=this.filterBox)||void 0===i?void 0:i.nativeElement.contains(e.target))||(this.isShowFilter=!1,this.isSiteFilter=this.originalIsSiteFilter,this.selectedSite=this.originalSelectedSite,this.isDirectionStatusFilter=this.originalIsDirectionStatusFilter,this.selectedDirectionStatusList=this.originalDirectionStatusList,this.isNoteTypeFilter=this.originalIsShowNoteTypeSelect,this.selectedNoteTypeList=this.originalNoteTypeList,this.computedSelectedNoteTypeListLabels(),this.computedSelectedDirectionStatusLabels())),this.siteSelect&&(this.siteSelect.nativeElement.contains(e.target)||this.cancelSiteFilter()),this.statusSelect&&(this.statusSelect.nativeElement.contains(e.target)||this.cancelDirectionStatusFilter()),this.noteTypeSelect&&(this.noteTypeSelect.nativeElement.contains(e.target)||this.cancelNoteTypeFilter())}checkAmIMainDealer(){return(0,u.mG)(this,void 0,void 0,function*(){try{const e=yield this.helper.me.get_me();this.amIMainDealer=2===(null==e?void 0:e.type),this.dealerId=e.dealer_id}catch(e){this.isLoading=!1}})}checkPermission(){return(0,u.mG)(this,void 0,void 0,function*(){yield h.Z.tool.sleep(100),this.hasReadSiteNotesPermission=this.helper.permission.has("site_note_read"),this.hasReadDirectionPermission=this.helper.permission.has("mp_direction_read"),this.hasReadDealerPartnersPermission=this.helper.permission.has("dealer_partner_read")})}getServiceNotes(){return(0,u.mG)(this,void 0,void 0,function*(){try{if(!this.hasReadSiteNotesPermission)return;const e=yield this.helper.note_directions.get_dealer_site_notes();this.parseServiceNotes(e)}catch(e){console.debug("getServiceNotes:>",e),this.isLoading=!1}})}getMPDirections(){return(0,u.mG)(this,void 0,void 0,function*(){try{if(!this.hasReadDirectionPermission)return;this.pagedItemIsReady=!1;const e=yield this.helper.note_directions.get_dealer_monitoring_directions();yield this.parseMPDirections(e),this.pagedItemIsReady=!0}catch(e){console.debug("getServiceNotes:>",e),this.isLoading=!1,this.pagedItemIsReady=!0}})}setDealerInfo(){return(0,u.mG)(this,void 0,void 0,function*(){try{const e=yield this.helper.dealer.get_dealer_info();this.meDealerInfo=e[0]}catch(e){console.debug("setDealerInfo:>",e),this.isLoading=!1}})}getPartners(){var e,n;return(0,u.mG)(this,void 0,void 0,function*(){if(this.hasReadDealerPartnersPermission)try{let i=[],o=[];this.amIMainDealer&&(i=null!==(e=yield this.helper.partner.get_partners(!0))&&void 0!==e?e:[]),o=null!==(n=yield this.helper.dealer.get_site_partners())&&void 0!==n?n:[],i.find(c=>c.dealer_id==this.dealerId)||i.unshift(this.meDealerInfo),o.forEach(c=>{i.find(m=>(null==m?void 0:m.dealer_id)===(null==c?void 0:c.dealer_id))||i.push(c)}),this.dealerList=i}catch(i){console.debug("getPartners:>",i),this.isLoading=!1}})}getSites(){return(0,u.mG)(this,void 0,void 0,function*(){try{const e=this.dealerId,n="site.name,site.site_id,dealer.dealer_id,dealer.type,site.partner_id,site.dealer_station_id",i=yield this.sitesService.fetch(e,null,n).toPromise();this.siteList=i,this.siteListPagedItems=i,this.searchSiteList=i,this.filteredSiteList=i}catch(e){console.debug("getSites:>",e),this.isLoading=!1}})}getDevices(){return(0,u.mG)(this,void 0,void 0,function*(){try{const e=this.dealerId,n=yield this.devicesService.getDevices(e,null,!0).toPromise();this.cameraList=n.filter(i=>12===i.type),this.isCalledDevices=!0}catch(e){console.debug("getDevices:>",e),this.isLoading=!1}})}getMonitoringStationList(){return(0,u.mG)(this,void 0,void 0,function*(){try{const e=this.dealerId;this.monitoringStationList=yield this.integrationService.getMonitoringStations(e).toPromise()}catch(e){console.debug(e),this.isLoading=!1}})}parseServiceNotes(e){!e||!(null==e?void 0:e.length)||(e.forEach(n=>{var i,o;null==n||delete n.description,n.created_at=h.Z.moment(null==n?void 0:n.created_at).format("YYYY/MM/DD"),n.updated_at=h.Z.moment(null==n?void 0:n.updated_at).format("YYYY/MM/DD"),n.site_name=null!==(o=null===(i=this.siteList.find(a=>a.site_id===n.site_id))||void 0===i?void 0:i.name)&&void 0!==o?o:"No Site Name",n.type_label=this.parseServiceNoteType(n.type),n.isShowMenu=!1}),this.serviceNotePagedItems=[...e],this.makeServiceNotePagedItems(e))}makeServiceNotePagedItems(e){this.siteList.forEach(n=>{if(!e.find(o=>o.site_id===n.site_id)){const o={id:parseInt(n.site_id),site_id:n.site_id,site_name:n.name,type_label:null,created_at:"",updated_at:"",isShowMenu:!1};this.serviceNotePagedItems.push(o)}})}parseServiceNoteType(e){switch(e){case 1:return"General";case 2:return"Installation";case 3:return"Accounting";case 4:return"Service";case 5:return"Sales";default:return""}}parseMPDirections(e){return(0,u.mG)(this,void 0,void 0,function*(){!e||!(null==e?void 0:e.length)||(this.isCalledDevices||(yield h.Z.tool.sleep(500)),e.forEach(n=>{var i,o,a;null==n||delete n.description;const c=this.siteList.find(d=>d.site_id===n.site_id);n.site_name=null!==(i=null==c?void 0:c.name)&&void 0!==i?i:"No Site Name",n.type=(null==n?void 0:n.device_id)?"Camera":"Site",n.statusLabel=this.parseMPDirectionStatus(n),n.zone_number=(null==n?void 0:n.device_id)?null===(o=this.cameraList.find(d=>d.device_id===n.device_id))||void 0===o?void 0:o.zone_number:"-",n.name=(null==n?void 0:n.device_id)?null===(a=this.cameraList.find(d=>d.device_id===n.device_id))||void 0===a?void 0:a.name:null==n?void 0:n.site_name,n.site_owned_dealer_approved_by=this.parseSiteOwnedDealerApprovedBy(n),n.monitoring_operator_approved_by=this.parseMonitoringOperatorApprovedBy(n),n.created_at=h.Z.moment(null==n?void 0:n.created_at).format("YYYY/MM/DD"),n.updated_at=h.Z.moment(null==n?void 0:n.updated_at).format("YYYY/MM/DD"),n.isOwnSite=this.parseIsOwnSite(n,c),n.isSiteOwnerDealer=(null==c?void 0:c.dealer_id)===this.dealerId,n.isSiteMonitoringDealer=(null==c?void 0:c.dealer_id)!=this.dealerId&&c.partner_id===this.dealerId,n.isShowMenu=!1,this.parseMPDirectionName(n)}),this.mpDirectionList=this.filterListByStatus(e),this.mpDirectionPagedItems=[...this.mpDirectionList],this.makeMPDirectionPagedItems())})}makeMPDirectionPagedItems(){this.siteList.forEach(e=>{if(!this.mpDirectionList.find(i=>i.site_id===e.site_id&&!i.device_id)){const i={id:parseInt(e.site_id),site_id:e.site_id,site_name:e.name,name:e.name,type:"Site",statusLabel:"None",status:null,zone_number:"-",site_owned_dealer_approved_by:"-",monitoring_operator_approved_by:"-",created_at:"",updated_at:"",isShowMenu:!1};this.mpDirectionPagedItems.push(i)}}),this.cameraList.forEach(e=>{var n,i;if(!this.mpDirectionList.find(a=>a.device_id===e.device_id)){const a={id:parseInt(e.device_id),site_id:e.site_id,site_name:null!==(i=null===(n=this.siteList.find(c=>c.site_id===e.site_id))||void 0===n?void 0:n.name)&&void 0!==i?i:"No Site Name",name:e.name,type:"Camera",statusLabel:"None",status:null,zone_number:"-",site_owned_dealer_approved_by:"-",monitoring_operator_approved_by:"-",created_at:"",updated_at:"",isShowMenu:!1};this.mpDirectionPagedItems.push(a)}}),this.mpDirectionPagedItems=this.mpDirectionPagedItems.sort((e,n)=>{if(e.site_id===n.site_id){if(e.device_id&&n.device_id)return e.device_id-n.device_id;if(!e.device_id&&!n.device_id)return 0;if(e.device_id&&!n.device_id)return 1;if(!e.device_id&&n.device_id)return-1}return e.site_id-n.site_id})}parseMPDirectionStatus(e){switch(e.status){case 0:return"Draft";case 1:return e.site_owned_dealer_approved_by||e.monitoring_operator_approved_by?"Approval Pending":"Invalid Data";case 2:return"Finalized";case 3:return"Approval Pending";case 4:return"Delete requested";default:return"No Content"}}parseMPDirectionName(e){var n,i,o,a;e.name=(null==e?void 0:e.device_id)?null!==(i=null===(n=this.cameraList.find(c=>c.device_id===e.device_id))||void 0===n?void 0:n.name)&&void 0!==i?i:"No Name":null!==(a=null===(o=this.siteList.find(c=>c.site_id===e.site_id))||void 0===o?void 0:o.name)&&void 0!==a?a:"No Name"}parseIsOwnSite(e,n){const i=(null==n?void 0:n.dealer_id)===this.dealerId&&n.partner_id===this.dealerId;if(!e.dealer_station_id)return i;const o=this.monitoringStationList.find(c=>c.id===e.dealer_station_id);return!o||i?i:!!(null==o?void 0:o.station_hosted)}parseSiteOwnedDealerApprovedBy(e){var n;if(e.site_owned_dealer_approved_by)return e.site_owned_dealer_approved_by;const i=null===(n=this.siteList.find(o=>o.site_id===e.site_id))||void 0===n?void 0:n.dealer_id;return 3===(null==e?void 0:e.status)?"Waiting for approval":e.monitoring_operator_approved_by?"Skip":i===this.dealerId?"Need to Check":"-"}parseMonitoringOperatorApprovedBy(e){var n;if(e.monitoring_operator_approved_by)return e.monitoring_operator_approved_by;const i=null===(n=this.siteList.find(o=>o.site_id===e.site_id))||void 0===n?void 0:n.dealer_id;return 1===(null==e?void 0:e.status)?"Waiting for approval":i!=this.dealerId?"Need to Check":"-"}filterListByStatus(e){const n=new Map;e.forEach(o=>{const a=`${o.site_id}-${o.device_id}`;n.has(a)||n.set(a,[]),n.get(a).push(o)});const i=[];return n.forEach(o=>{const a=o.filter(c=>2!=c.status);a.length>0?i.push(...a):i.push(...o)}),i}moveToTab(e){this.tab=e,this.totalFilter=0,this.searchText="",this.isSiteFilter=!1,this.selectedSite=null,this.originalSelectedSite=null,"service notes"===this.tab&&(this.searchSiteList=this.siteList.filter(n=>n.dealer_id===this.dealerId),this.filteredSiteList=h.Z._.cloneDeep(this.searchSiteList)),"monitoring portal directions"===this.tab&&(this.searchSiteList=h.Z._.cloneDeep(this.siteList),this.filteredSiteList=h.Z._.cloneDeep(this.siteList)),this.isNoteTypeFilter=!1,this.isNoteTypeFilter=!1,this.selectedNoteTypeList=this.noteTypeList.filter(n=>n.isSelected),this.originalNoteTypeList=this.selectedNoteTypeList,this.computedSelectedNoteTypeListLabels(),this.isDirectionStatusFilter=!1,this.directionStatusList.forEach(n=>n.isSelected=!0),this.selectedDirectionStatusList=this.directionStatusList.filter(n=>n.isSelected),this.originalDirectionStatusList=this.selectedDirectionStatusList,this.computedSelectedDirectionStatusLabels(),this.filterList={selectedSite:"",noteTypeList:[],directionStatusList:[],createdAtRange:{start:null,end:null},updatedAtRange:{start:null,end:null}}}moveToSiteDetail(e){const{type:n,site:i}=e;this.moveToTab(n),this.selectSite(i),this.isSiteFilter=!0}isShowAllStatus(e){return"note"===e?this.selectedNoteTypeList.length===this.noteTypeList.length||!this.selectedNoteTypeList.length:"direction"===e?this.selectedDirectionStatusList.length===this.directionStatusList.length||!this.selectedDirectionStatusList.length:void 0}isShowSelectedStatusLength(e){return"note"===e?this.selectedNoteTypeList.length!==this.noteTypeList.length&&this.selectedNoteTypeList.length>0:"direction"===e?this.selectedDirectionStatusList.length!==this.directionStatusList.length&&this.selectedDirectionStatusList.length>0:void 0}setSearchFocus(){this.isFocusSearch=!0}doFilter(){this.applySiteFilter(),this.applyNoteTypeFilter(),this.applyDirectionStatusFilter(),this.computeTotalFilter(),this.isShowFilter=!1}dateRange(e){if(!e)return;const{label:n,selected:i}=e,{start:o,end:a}=i,c=null==o?void 0:o.format("YYYY/MM/DD"),d=null==a?void 0:a.format("YYYY/MM/DD");if("created"===n.toLowerCase()){if(this.filterList.createdAtRange.start===c&&this.filterList.createdAtRange.end===d)return;this.filterList={selectedSite:this.filterList.selectedSite,noteTypeList:this.filterList.noteTypeList,directionStatusList:this.filterList.directionStatusList,createdAtRange:{start:c,end:d},updatedAtRange:this.filterList.updatedAtRange}}if("updated"===n.toLowerCase()){if(this.filterList.updatedAtRange.start===c&&this.filterList.updatedAtRange.end===d)return;this.filterList={selectedSite:this.filterList.selectedSite,noteTypeList:this.filterList.noteTypeList,directionStatusList:this.filterList.directionStatusList,createdAtRange:this.filterList.createdAtRange,updatedAtRange:{start:c,end:d}}}}onChangeSiteFilter(e){e.checked||(this.selectedSite=null,this.originalSelectedSite=null)}selectSite(e){this.selectedSite=e,this.isShowSiteSelect=!1,this.searchSiteTxt="",this.doFilter()}searchSite(e){this.filteredSiteList=this.searchSiteList.filter(n=>n.name.toLowerCase().indexOf(e.toLowerCase())>-1)}cancelSiteFilter(){this.isShowSiteSelect=!1,this.searchSiteTxt="",this.filteredSiteList=this.searchSiteList}clearSiteFilter(){this.searchSiteTxt="",this.selectedSite=null,this.originalSelectedSite=null,this.filteredSiteList=this.searchSiteList,this.doFilter()}applySiteFilter(){this.originalIsSiteFilter=this.isSiteFilter,this.originalSelectedSite=this.selectedSite,this.filterList={selectedSite:this.selectedSite,noteTypeList:this.filterList.noteTypeList,directionStatusList:this.filterList.directionStatusList,createdAtRange:{start:this.filterList.createdAtRange.start,end:this.filterList.createdAtRange.end},updatedAtRange:{start:this.filterList.updatedAtRange.start,end:this.filterList.updatedAtRange.end}}}onChangeFilter(e,n){e.checked||("direction"===n&&(this.directionStatusList.forEach(o=>o.isSelected=!0),this.selectedDirectionStatusList=this.directionStatusList.filter(o=>o.isSelected),this.originalDirectionStatusList=this.directionStatusList.filter(o=>o.isSelected),this.computedSelectedDirectionStatusLabels()),"note"===n&&(this.noteTypeList.forEach(o=>o.isSelected=!0),this.selectedNoteTypeList=this.noteTypeList.filter(o=>o.isSelected),this.originalNoteTypeList=this.selectedNoteTypeList,this.computedSelectedNoteTypeListLabels()))}selectStatus(e,n){e.stopPropagation(),n.isSelected=!n.isSelected,"service notes"===this.tab&&this.changeNoteTypeFilter(),"monitoring portal directions"===this.tab&&this.changeDirectionStatusFilter()}clearNoteTypeFilter(){this.noteTypeList.forEach(e=>e.isSelected=!1),this.selectedNoteTypeList=[],this.originalNoteTypeList=[],this.selectedNoteTypeListLabels="All",this.doFilter()}clearDirectionStatusFilter(){this.directionStatusList.forEach(e=>e.isSelected=!1),this.selectedDirectionStatusList=[],this.originalDirectionStatusList=[],this.selectedDirectionStatusListLabels="All",this.doFilter()}cancelNoteTypeFilter(){this.isShowNoteTypeSelect=!1,this.selectedNoteTypeList=this.originalNoteTypeList,this.noteTypeList.forEach(e=>e.isSelected=!1),this.originalNoteTypeList.forEach(e=>{this.noteTypeList.find(i=>i.label===e.label).isSelected=!0}),this.computedSelectedNoteTypeListLabels()}cancelDirectionStatusFilter(){this.isShowDirectionStatusSelect=!1,this.selectedDirectionStatusList=this.originalDirectionStatusList,this.directionStatusList.forEach(e=>e.isSelected=!1),this.originalDirectionStatusList.forEach(e=>{this.directionStatusList.find(i=>i.label===e.label).isSelected=!0}),this.computedSelectedDirectionStatusLabels()}changeNoteTypeFilter(){this.selectedNoteTypeList=this.noteTypeList.filter(e=>e.isSelected),this.originalNoteTypeList=this.selectedNoteTypeList,this.computedSelectedNoteTypeListLabels(),this.doFilter()}changeDirectionStatusFilter(){this.selectedDirectionStatusList=this.directionStatusList.filter(e=>e.isSelected),this.originalDirectionStatusList=this.selectedDirectionStatusList,this.computedSelectedDirectionStatusLabels(),this.doFilter()}applyNoteTypeFilter(){if("service notes"!=this.tab)return;this.originalIsShowNoteTypeSelect=this.isNoteTypeFilter;const e=this.selectedNoteTypeList.map(n=>n.label);this.filterList={selectedSite:this.filterList.selectedSite,noteTypeList:e,directionStatusList:this.filterList.directionStatusList,createdAtRange:{start:this.filterList.createdAtRange.start,end:this.filterList.createdAtRange.end},updatedAtRange:{start:this.filterList.updatedAtRange.start,end:this.filterList.updatedAtRange.end}}}applyDirectionStatusFilter(){if("monitoring portal directions"!=this.tab)return;this.originalIsDirectionStatusFilter=this.isDirectionStatusFilter;const e=this.selectedDirectionStatusList.map(n=>n.label);this.filterList={selectedSite:this.filterList.selectedSite,noteTypeList:this.filterList.noteTypeList,directionStatusList:e,createdAtRange:{start:this.filterList.createdAtRange.start,end:this.filterList.createdAtRange.end},updatedAtRange:{start:this.filterList.updatedAtRange.start,end:this.filterList.updatedAtRange.end}}}computeTotalFilter(){let e=0;this.isSiteFilter&&e++,this.isNoteTypeFilter&&e++,this.isDirectionStatusFilter&&e++,this.totalFilter=e}computedSelectedNoteTypeListLabels(){this.selectedNoteTypeListLabels=this.noteTypeList.every(e=>e.isSelected)||this.noteTypeList.every(e=>!e.isSelected)?"All":this.selectedNoteTypeList.map(e=>e.label).join(", ")}computedSelectedDirectionStatusLabels(){this.selectedDirectionStatusListLabels=this.directionStatusList.every(e=>e.isSelected)||this.directionStatusList.every(e=>!e.isSelected)?"All":this.selectedDirectionStatusList.map(e=>e.label).join(", ")}}return r.\u0275fac=function(e){return new(e||r)(t.Y36(A.e),t.Y36(I.f),t.Y36(q.I),t.Y36(k.v),t.Y36(z.V),t.Y36(L.W))},r.\u0275cmp=t.Xpm({type:r,selectors:[["app-site-note-manager"]],viewQuery:function(e,n){if(1&e&&(t.Gf(Qt,5),t.Gf(Ht,5),t.Gf(jt,5),t.Gf(Bt,5),t.Gf($t,5),t.Gf(Gt,5)),2&e){let i;t.iGM(i=t.CRH())&&(n.searchInput=i.first),t.iGM(i=t.CRH())&&(n.filterBox=i.first),t.iGM(i=t.CRH())&&(n.siteSelect=i.first),t.iGM(i=t.CRH())&&(n.selectSearchInput=i.first),t.iGM(i=t.CRH())&&(n.noteTypeSelect=i.first),t.iGM(i=t.CRH())&&(n.statusSelect=i.first)}},hostBindings:function(e,n){1&e&&t.NdJ("mousedown",function(o){return n.onGlobalClick(o)},!1,t.evT)},decls:14,vars:22,consts:[[1,"sub-component"],[1,"widget-area",2,"overflow","hidden"],[1,"widget",2,"max-width","calc(100% - 50px)","height","100%","max-height","100%"],[1,"header"],[1,"title"],[1,"report-tab"],["class","btn",3,"btn-selected","disabled","click",4,"ngFor","ngForOf"],[1,"filters-area"],["class","filter",4,"ngIf"],[4,"ngIf"],[1,"tab-table",3,"pagedItemIsReady","dealerId","searchText","siteListPagedItems","dealerList","serviceNotePagedItems","mpDirectionList","moveToSiteDetail"],[1,"tab-table",3,"pagedItemIsReady","serviceNotePagedItems","filterList"],[1,"tab-table",3,"pagedItemIsReady","mpDirectionPagedItems","filterList","reload"],[1,"btn",3,"click"],[1,"tab-title"],["class","tab-selected-bar",4,"ngIf"],[1,"tab-selected-bar"],[1,"filter"],[1,"search-container",2,"height","30px",3,"click"],[1,"material-icons",2,"padding","6px 10px"],["autocomplete","off","type","text","placeholder","Search...",3,"ngModel","ngModelChange"],["searchInput",""],[3,"label","tab","dateRange"],["filterBox",""],[1,"btn-area"],[1,"button","button-white","dense-icon-btn"],[1,"btn-inner","dense-icon-btn","filter-btn"],[3,"click",4,"ngIf"],["class","filter-box",4,"ngIf"],["class","btn-area",4,"ngIf"],[3,"click"],[1,"filter-icon",3,"icon","size","color"],[1,"material-icons","filter-icon"],["class","exist-filter ellipsis","style","max-width: 200px;",3,"click",4,"ngIf"],[1,"material-icons","filter-icon",2,"margin-left","8px",3,"click"],[1,"exist-filter","ellipsis",2,"max-width","200px",3,"click"],[1,"filter-box"],[1,"select-list"],["siteSelect",""],[1,"search-result-input"],["autocomplete","off","type","text","placeholder","Search Site",1,"list-search-input",3,"ngModel","ngModelChange","input"],["selectSearchInput",""],[2,"max-height","200px","overflow-y","auto","border-bottom","1px solid rgba(0, 0, 0, 0.1)"],["class","select-result has-child selectitem",3,"click",4,"ngFor","ngForOf"],[1,"select-result","has-child","selectitem",3,"click"],[1,"ellipsis"],["class","filter-box","style","width: 180px",4,"ngIf"],[1,"filter-box",2,"width","180px"],["noteTypeSelect",""],[2,"border-bottom","1px solid rgba(0, 0, 0, 0.1)"],[1,"select-result","selectitem"],[2,"color","hsla(0,0%,0%,0.87)"],[1,"check-area"],["class","material-icons check-icon",4,"ngIf"],["class","material-icons check-icon checked",4,"ngIf"],[1,"material-icons","check-icon"],[1,"material-icons","check-icon","checked"],["statusSelect",""]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"div",2),t.TgZ(3,"div",3),t.TgZ(4,"div",4),t._uU(5,"Site Notes Manager"),t.qZA(),t.qZA(),t.TgZ(6,"div",5),t.YNc(7,Vt,4,6,"div",6),t.qZA(),t.TgZ(8,"div",7),t.YNc(9,Kt,6,5,"div",8),t.YNc(10,ve,14,9,"ng-container",9),t.qZA(),t.TgZ(11,"c_dtable_site_list",10),t.NdJ("moveToSiteDetail",function(o){return n.moveToSiteDetail(o)}),t.qZA(),t._UZ(12,"c_dtable_service_note",11),t.TgZ(13,"c_dtable_monitoring_portal_direction",12),t.NdJ("reload",function(){return n.getMPDirections()}),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(7),t.Q6J("ngForOf",n.tab_list),t.xp6(2),t.Q6J("ngIf","site list"===n.tab),t.xp6(1),t.Q6J("ngIf","site list"!=n.tab),t.xp6(1),t.Udp("display","site list"===n.tab?"block":"none"),t.Q6J("pagedItemIsReady",n.pagedItemIsReady)("dealerId",n.dealerId)("searchText",n.searchText)("siteListPagedItems",n.siteListPagedItems)("dealerList",n.dealerList)("serviceNotePagedItems",n.serviceNotePagedItems)("mpDirectionList",n.mpDirectionList),t.xp6(1),t.Udp("display","service notes"===n.tab?"block":"none"),t.Q6J("pagedItemIsReady",n.pagedItemIsReady)("serviceNotePagedItems",n.serviceNotePagedItems)("filterList",n.filterList),t.xp6(1),t.Udp("display","monitoring portal directions"===n.tab?"block":"none"),t.Q6J("pagedItemIsReady",n.pagedItemIsReady)("mpDirectionPagedItems",n.mpDirectionPagedItems)("filterList",n.filterList))},directives:[l.sg,l.O5,rt,bt,Ut,C.Fj,C.JJ,C.On,Yt,x.U],styles:['.scroll-screen[_ngcontent-%COMP%]{flex:1;flex-direction:column;overflow-y:overlay;height:100%;position:relative;padding:7px;-webkit-user-select:none;user-select:none;display:flex;align-items:center}.row[_ngcontent-%COMP%]{flex-direction:row;display:flex;height:100%;overflow-y:overlay;transition:.5s}.col[_ngcontent-%COMP%]{flex-direction:column;display:flex;flex:1;height:100%}.customer-widget-area[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{min-width:300px}.customer-widget-area[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:only-child{min-width:600px}.customer-widget-area.deactivated[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{height:calc(100% - 43px)}.col[_ngcontent-%COMP%] .widget[_ngcontent-%COMP%]{min-width:300px}.sub-nav[_ngcontent-%COMP%]{position:relative;left:0px;transition:all ease-in-out .3s;min-width:250px;max-width:250px;flex:1;background:#fff;border-right:.5px solid #d7d7d7;display:flex;flex-direction:column;overflow-y:overlay;z-index:3}.sub-nav[_ngcontent-%COMP%]:focus{outline:none}.sub-nav[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;flex:initial;align-items:center}.sub-nav[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{overflow-y:overlay}.sub-nav[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{padding:6px 12px 6px 0;box-sizing:border-box;border:0;background-color:transparent;background-size:24px;background-position:4px 8px;background-repeat:no-repeat;flex:1}.sub-nav[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin-right:8px;color:#777;transition:.2s}.sub-nav[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{cursor:pointer;color:#000}.sub-nav[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{background-color:red;color:#fff;width:8px;height:14px;margin-left:8px;padding:2px 4px 2px 5px;border-radius:4px;font-size:12px}.sub-nav[_ngcontent-%COMP%] .plan-badge[_ngcontent-%COMP%]{background-color:red;width:6px;height:6px;margin-left:4px;border-radius:10px}.sub-nav[_ngcontent-%COMP%] .list-category[_ngcontent-%COMP%]{padding:24px 0 7px 20px;color:#2f96fb;font-size:14px;text-transform:uppercase}.sub-nav[_ngcontent-%COMP%] .list-category[_ngcontent-%COMP%]:first-child{padding:30px 0 7px 20px;color:#2f96fb;font-size:14px}.sub-nav[_ngcontent-%COMP%] .list-item[_ngcontent-%COMP%]{display:flex;align-items:center;color:#0009;cursor:pointer}.sub-nav[_ngcontent-%COMP%] .list-item[_ngcontent-%COMP%]:hover{background:rgba(0,0,0,.05)}.sub-nav[_ngcontent-%COMP%] .list-item[_ngcontent-%COMP%]:hover.settings{background:transparent}.sub-nav[_ngcontent-%COMP%] .list-item-selected[_ngcontent-%COMP%]{background:#dcf0fd!important;color:#000000de}.sub-nav[_ngcontent-%COMP%] .list-item-selected[_ngcontent-%COMP%]:after{background-color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .list-item-selected.settings[_ngcontent-%COMP%]{background:transparent!important;color:#000000de;font-weight:500;color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .menu-label[_ngcontent-%COMP%]{display:flex;font-size:14px;padding:7px 0 7px 15px}.sub-nav[_ngcontent-%COMP%] .menu-label.settings[_ngcontent-%COMP%]{padding-left:16px;width:100%;margin:0 4px;border-radius:4px}.sub-nav[_ngcontent-%COMP%] .menu-label.settings[_ngcontent-%COMP%]:hover{padding:8px 16px;background:#e8eaed}.sub-nav[_ngcontent-%COMP%] .menu-label.settings.selected-label[_ngcontent-%COMP%]{width:100%;margin:0 4px;padding:8px 12px;border-radius:4px;font-weight:500;color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .menu-label.settings.selected-label[_ngcontent-%COMP%]:hover{padding:8px 12px;background:#dcf0fd}.sub-nav[_ngcontent-%COMP%] .select-mark[_ngcontent-%COMP%]{background-color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .select-mark.settings[_ngcontent-%COMP%]{background-color:#2383e2;width:4px;min-height:30px;height:30px;border-radius:4px}.component-body[_ngcontent-%COMP%]{position:relative;flex:5;height:100%;flex-direction:column;display:flex;transition:all ease-in-out .3s}.component-body-no-data[_ngcontent-%COMP%]{flex:5;height:100%;flex-direction:column;align-items:center;justify-content:center;display:flex}.tab[_ngcontent-%COMP%]{height:60px;color:#888;background:#f7f7fc;box-shadow:0 4px 2px -2px #888;display:flex;align-items:center;z-index:1}.tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;position:relative}.tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#2383e2;cursor:pointer}.tab[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#2383e2}.tab[_ngcontent-%COMP%] .icn-button[_ngcontent-%COMP%]{padding:0 16px}.tab[_ngcontent-%COMP%] .icn-button-active[_ngcontent-%COMP%]{color:#000}.tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:0 32px;text-transform:capitalize;font-size:14px}.tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;bottom:-2px;width:100%;height:4px;background:#2383e2}.plan-upgrade-badge[_ngcontent-%COMP%]{background:linear-gradient(90deg,#2A517E 17.88%,#1E88E5 69.03%);border-radius:10px;padding:2px 6px;margin-left:-8px;color:#fff;font-size:12px;font-weight:400;cursor:pointer}.customer-tab[_ngcontent-%COMP%]{color:#7a7a7a;background:#fff;border-bottom:1px solid rgba(0,0,0,.1);display:flex;align-items:center;z-index:1;font-weight:500;font-size:14px;flex-flow:wrap}.customer-tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center;height:50px;position:relative;cursor:pointer}.customer-tab[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#1e88e5;font-weight:500}.customer-tab[_ngcontent-%COMP%] .icn-button[_ngcontent-%COMP%]{padding:0 16px}.customer-tab[_ngcontent-%COMP%] .icn-button-active[_ngcontent-%COMP%]{color:#000}.customer-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:8px 20px;text-transform:capitalize;font-size:14px;font-weight:400}.customer-tab[_ngcontent-%COMP%] .tab-title.selected[_ngcontent-%COMP%]{font-weight:500}.customer-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]:hover{background:#e8eaed;border-radius:7px}.customer-tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;bottom:-2px;width:100%;height:3px;background:#2383e2}.setting-tab[_ngcontent-%COMP%]{height:41px;box-sizing:border-box;color:#7a7a7a;background:#fff;display:flex;flex-direction:row;align-items:center;z-index:1;font-size:14px;font-weight:500;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.1);background-color:#fbfbfa}.setting-tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;position:relative;cursor:pointer}.setting-tab[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#000}.setting-tab[_ngcontent-%COMP%] .button-selected-red[_ngcontent-%COMP%]{color:#f67474}.setting-tab[_ngcontent-%COMP%] .icn-button[_ngcontent-%COMP%]{padding:0 16px}.setting-tab[_ngcontent-%COMP%] .icn-button-active[_ngcontent-%COMP%]{color:#000}.setting-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:5px 20px;text-transform:capitalize;font-size:13px;font-weight:400;margin:0 1px}.setting-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]:hover{background:#e8eaed;border-radius:5px}.setting-tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;height:4px;background:#2383e2;border-radius:4px}.setting-tab[_ngcontent-%COMP%] .tab-selected-bar-red[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;height:5px;background:#f67474}.btn-icon[_ngcontent-%COMP%]{color:#7c7c7c;background-color:#f1f1f1;cursor:pointer}.btn-icon[_ngcontent-%COMP%]:hover{color:#7c7c7c;background-color:#efeff6}.space[_ngcontent-%COMP%]{flex:1}.sub-component[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;width:100%;height:100%}.widget-area[_ngcontent-%COMP%]{flex-direction:row;display:flex;height:100%;flex:1;overflow-y:overlay;padding:20px 30px;flex-wrap:wrap;justify-content:center;box-sizing:border-box}.customer-widget-area[_ngcontent-%COMP%]{position:absolute;height:auto;bottom:0;top:0;left:0;right:0;flex-direction:row;display:flex;flex:1;overflow:initial;padding:14px;box-sizing:border-box;flex-wrap:wrap;justify-content:center}.customer-widget-area.deactivated[_ngcontent-%COMP%]{padding:0 7px 7px}.wcs-widget-area[_ngcontent-%COMP%]{position:absolute;height:auto;bottom:0;top:0;left:0;right:0;flex-direction:row;display:flex;flex:1;overflow-y:overlay;padding:12px;flex-wrap:wrap;align-items:center;grid-gap:12px;gap:12px}.wcs-widget-area[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{align-items:center}.setting-widget[_ngcontent-%COMP%]{height:calc(100% - 44px)}.setting-router[_ngcontent-%COMP%]{width:100%;flex:1;position:relative;overflow:auto;overflow-y:overlay}.container[_ngcontent-%COMP%]{width:calc(100% - 14px);height:100%;display:flex;flex-direction:column;align-items:center;padding:7px}.widget[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;max-width:1400px;min-width:300px;max-height:calc(100% - 15px);background:white;transition:.5s;border-radius:3px;border:1px solid rgba(0,0,0,.1);margin:0 5px 10px}.widget[_ngcontent-%COMP%]:last-child{margin:0 5px}.widget[_ngcontent-%COMP%]:only-child{min-width:600px}.widget[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;border-bottom:solid 1px rgba(0,0,0,.1)}.widget[_ngcontent-%COMP%] .widget-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:calc(100% - 108px);padding:20px}.widget[_ngcontent-%COMP%] .widget-body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{padding-bottom:14px}.widget-item[_ngcontent-%COMP%]{flex:none;font-size:14px;color:#000000de}.widget-item[_ngcontent-%COMP%] .widget-body[_ngcontent-%COMP%]{padding:14px 30px}.widget[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{font-size:14px;color:#0009;margin-bottom:7px}.widget[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:200px;font-size:14px;color:#0009}.widget[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%]{display:flex;padding:7px 0}.widget[_ngcontent-%COMP%] .bottom-line[_ngcontent-%COMP%]{border-bottom:solid 1px rgba(0,0,0,.1)}.scroll-widget[_ngcontent-%COMP%]{max-height:initial}.item[_ngcontent-%COMP%] .w-1[_ngcontent-%COMP%]{width:10%}.item[_ngcontent-%COMP%] .w-2[_ngcontent-%COMP%]{width:20%}.item[_ngcontent-%COMP%] .w-3[_ngcontent-%COMP%]{width:30%}.item[_ngcontent-%COMP%] .w-4[_ngcontent-%COMP%]{width:40%}.item[_ngcontent-%COMP%] .w-5[_ngcontent-%COMP%]{width:50%}.item[_ngcontent-%COMP%] .fs-12[_ngcontent-%COMP%]{font-size:12px}.item[_ngcontent-%COMP%] .right-align[_ngcontent-%COMP%]{text-align:right}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]{display:flex;padding:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;font-size:14px}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:80%;box-sizing:border-box;padding:8px;font-size:14px;background-color:#f0f0f0;border:none;border-bottom:2px solid #f0f0f0;-webkit-appearance:none;-moz-appearance:none;transition:.2s}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #2383e2}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{position:absolute;left:12px;top:12px;color:#00000080}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;padding-left:32px}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer}.cell[_ngcontent-%COMP%]{padding-bottom:14px}.widget[_ngcontent-%COMP%] .widget-bottom[_ngcontent-%COMP%]{display:flex;padding-top:6px}.table-area[_ngcontent-%COMP%]{height:100%;overflow:overlay}.table-container[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;overflow-y:hidden}table.table-header[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{min-height:31px;background-color:#f7fafc;border-bottom:solid 1px rgba(0,0,0,.1);border-top:solid 1px rgba(0,0,0,.1);box-sizing:border-box}.table-container[_ngcontent-%COMP%] .table-header.no-top-border[_ngcontent-%COMP%]{border-top:0}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}table.table-header-v2[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 30px);flex:1;overflow-y:overlay}.table-container[_ngcontent-%COMP%] .no-record[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:7px 0}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;font-size:16px;padding:12px 20px;color:#000000de}.header[_ngcontent-%COMP%] .btn-area[_ngcontent-%COMP%]{padding:7px 16px}.header[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#000}.header[_ngcontent-%COMP%] .button-disable[_ngcontent-%COMP%]:hover{color:#aaa;cursor:default;pointer-events:none}.header[_ngcontent-%COMP%] .button-primary[_ngcontent-%COMP%]{color:#1e90ff}.header[_ngcontent-%COMP%] .button-primary[_ngcontent-%COMP%]:hover{color:#30b0ff}.widget[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{flex:1;padding:14px 16px;overflow-y:overlay}.body-center[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.body-center[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{text-align:center}.body-center[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px;color:#2383e2}.body-center[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin-bottom:14px;font-size:14px;color:#0009;text-align:center;line-height:1.5}.body-center[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:8px;font-size:18px;color:#000000de}.body[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14px;color:#777}.body[_ngcontent-%COMP%] > .contents[_ngcontent-%COMP%]{font-size:15px;color:#333;margin-top:4px;padding:4px 0;display:flex;min-height:24px;align-items:center}.body[_ngcontent-%COMP%] .editable[_ngcontent-%COMP%]{border-bottom:1px solid #fff;transition:.5s}.body[_ngcontent-%COMP%] .editable[_ngcontent-%COMP%]:hover{cursor:text;border-bottom:1px solid #ccc}.body[_ngcontent-%COMP%] .selectbox[_ngcontent-%COMP%]{color:#777;padding:16px;box-shadow:0 0 2px #888;transition:.2s;cursor:pointer;display:flex;flex-direction:row}.body[_ngcontent-%COMP%] .selectbox[_ngcontent-%COMP%]:hover{color:#333;box-shadow:0 0 6px #888}.widget[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{margin:12px;padding:12px 12px 12px 36px;box-sizing:border-box;border:0;border-bottom:2px solid #ddd;background-color:transparent;background-image:url(/assets/icons/ic_search_72pt.png);background-size:24px;background-position:4px 8px;background-repeat:no-repeat;flex:1;transition:.3s}.widget[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #777}.widget[_ngcontent-%COMP%] .filter-area[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;flex-direction:row-reverse}.tab[_ngcontent-%COMP%] .combo-box[_ngcontent-%COMP%]{display:flex}.filter-area[_ngcontent-%COMP%] .combo-box[_ngcontent-%COMP%]{color:#777;font-size:14px;padding:0 8px 0 0;text-align:right;position:relative;cursor:pointer}.header[_ngcontent-%COMP%] .combo-box[_ngcontent-%COMP%]{color:#777;font-size:14px;text-align:right;position:relative;cursor:pointer}.combo-box[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{transition:.2s}.combo-box[_ngcontent-%COMP%] > .button-active[_ngcontent-%COMP%]{color:#000}.combo-box[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{vertical-align:middle}.combo-box-contents[_ngcontent-%COMP%]{position:absolute;right:16px;z-index:101;text-align:left;box-sizing:border-box;background-color:#fff;transition:.2s;box-shadow:0 2px 4px #00000080;border:solid 1px #d9d9d9;border-radius:5px}.combo-box-contents[_ngcontent-%COMP%] .items[_ngcontent-%COMP%]{cursor:pointer;padding:8px;color:#333;font-size:12px}.combo-box-contents[_ngcontent-%COMP%] .items[_ngcontent-%COMP%]:hover{background:#eee}.list[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid rgba(0,0,0,.1);min-height:28px;transition:.1s;padding:10px 20px}.list.locked-list[_ngcontent-%COMP%]{background-color:#f7fafc}.list-group[_ngcontent-%COMP%]:hover{background-color:#fafcff}.list-bottom-clear[_ngcontent-%COMP%]{border-bottom:none}.list-bottom-line[_ngcontent-%COMP%]{border-bottom:1px solid #aaa}.widget[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]:hover{background:#f5f5f5;cursor:pointer}.widget[_ngcontent-%COMP%] .list.locked-list[_ngcontent-%COMP%]:hover{background:#F7FAFC;cursor:initial}.list[_ngcontent-%COMP%] > .contents[_ngcontent-%COMP%]{padding:12px 0;font-size:14px;color:#333;flex:1}.list[_ngcontent-%COMP%] > .stat-contents[_ngcontent-%COMP%]{padding:12px 0;float:right;font-size:13px;color:#aaa}.list[_ngcontent-%COMP%] > .button-contents[_ngcontent-%COMP%]{padding:12px 0;float:right;font-size:13px}.list[_ngcontent-%COMP%] > .button-contents[_ngcontent-%COMP%]:hover{opacity:.8}.list[_ngcontent-%COMP%] > .icon[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 10px 0 6px;height:40px}.list[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{width:8px;background:#aaa}.contents[_ngcontent-%COMP%] > .contents-small[_ngcontent-%COMP%]{margin-left:4px;font-size:11px;color:#555}.contents[_ngcontent-%COMP%] .sub-contents[_ngcontent-%COMP%]{font-size:12px;color:#0009;margin-top:6px}.widget[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;align-items:center}.widget[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.widget[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px;color:#56657bde;text-transform:uppercase;text-align:left;font-size:13px;font-weight:normal}.widget[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px rgba(0,0,0,.1) solid}.widget[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.widget[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:14px;color:#000000de;padding:7px}td[_ngcontent-%COMP%] .sub-contents[_ngcontent-%COMP%]{font-size:11px;color:#888;margin-top:4px}td[_ngcontent-%COMP%] .edit-btn[_ngcontent-%COMP%]{cursor:pointer;color:#1e90ff}td[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{cursor:pointer;color:#f1556c}table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{float:right;color:#bbb;transition:.2s;cursor:pointer}table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#333}table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:50%;width:35px;height:35px}.div-table-header[_ngcontent-%COMP%]{display:flex;height:30px;border-style:solid;border-width:1px;border-image-source:linear-gradient(to bottom,#dfdfdf,#bcbcbc);border-image-slice:1;border-collapse:separate;background-image:linear-gradient(to bottom,#f7f7f7,#ececed);font-size:14px;align-items:center}.div-table-header[_ngcontent-%COMP%] .div-table-head[_ngcontent-%COMP%]{padding:7px 16px}.face[_ngcontent-%COMP%]{border-radius:50%;width:28px;height:28px;display:inline-block;margin-right:8px;vertical-align:middle}.folding-list[_ngcontent-%COMP%]{cursor:pointer}.folding-list[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:8px}.folding-list[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]{color:#555;font-size:16px;padding:12px 0;border-bottom:1px solid #aaa;transition:.1s;height:54px}.folding-list[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]:hover{background:#f5f5f5}.folding-list[_ngcontent-%COMP%] .sub-list-title[_ngcontent-%COMP%]{margin-left:16px;padding:12px 0 4px;color:#777;font-size:12px;font-weight:bold;border-bottom:1px solid #ccc;display:flex}.folding-list[_ngcontent-%COMP%] .sub-list[_ngcontent-%COMP%]{margin-left:16px;padding:8px 0;color:#333;font-size:14px;border-bottom:1px solid #ccc;transition:.1s;display:flex}.folding-list[_ngcontent-%COMP%] .sub-list[_ngcontent-%COMP%]:hover{background:#f5f5f5}.folding-list[_ngcontent-%COMP%] .sub-list-selected[_ngcontent-%COMP%]{background:#f5f5f5}.empty-contents[_ngcontent-%COMP%]{font-size:16px;color:#bbb;font-weight:bold;text-transform:uppercase}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;box-sizing:border-box;padding:4px;border:0;border-bottom:1px solid #ccc;background:rgba(0,0,0,0);transition:.2s}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none;border-bottom:1px solid #777}.body[_ngcontent-%COMP%] .hidden-input[_ngcontent-%COMP%]{padding:4px 0;border-bottom:1px solid #fff;background:rgba(0,0,0,0)}.body[_ngcontent-%COMP%] .hidden-input[_ngcontent-%COMP%]:hover{border-bottom:1px solid #777}.dropdown[_ngcontent-%COMP%]{font-size:14px;position:relative;flex:1}.dropdown-contents[_ngcontent-%COMP%]{position:absolute;width:100%;margin-top:8px;left:0px;z-index:100;text-align:left;box-sizing:border-box;background-color:#fff;box-shadow:0 1px 13px 1px #0003;transition:.2s}.dropdown-contents[_ngcontent-%COMP%] > .list-item[_ngcontent-%COMP%]{cursor:pointer;padding:8px;color:#333;font-size:14px;display:flex;align-items:center}.dropdown-contents[_ngcontent-%COMP%] > .list-item[_ngcontent-%COMP%]:hover{background:#eee}.dropdown[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;background:rgba(0,0,0,0)}.face[_ngcontent-%COMP%]{border-radius:50%;width:32px;height:32px;margin-right:8px}.no-face[_ngcontent-%COMP%]{border-radius:50%;width:38x;height:38px;min-width:38px;min-height:38px;background-color:#ccc;display:inline-block;margin-right:8px;vertical-align:middle;color:#fff;text-align:center;text-transform:uppercase}.calendar[_ngcontent-%COMP%]{width:100%}.contents[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{color:#777;transition:.2s;cursor:pointer}.contents[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]:hover{color:#333}.list[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{display:flex;width:32px;height:32px;justify-content:center;align-items:center;padding:5px;color:#777;transition:.2s;cursor:pointer;border-radius:21px}.list[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]:hover{color:#333;background:rgba(0,0,0,.05)}.btn-danger[_ngcontent-%COMP%]{color:#f1556d}.btn-danger[_ngcontent-%COMP%]:hover{color:#f47185}.svg-icon[_ngcontent-%COMP%]{font-size:24px;color:#000;width:1em;height:1em;position:relative}.svg-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:currentColor;width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.png-icon[_ngcontent-%COMP%]{width:36px;height:36px;position:relative}.png-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.child-item[_ngcontent-%COMP%]{padding-left:24px}.title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:4px}.widget[_ngcontent-%COMP%] .has-child[_ngcontent-%COMP%]:hover{background:#f5f5f5;cursor:pointer}.body[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex:1;background:white;box-sizing:border-box;margin-top:8px;padding:4px 0;border:0;border-bottom:1px solid #ccc;transition:.2s}.body[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-bottom:1px solid #777}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.absolute[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px);z-index:10}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.path.white[_ngcontent-%COMP%]{stroke:#fff}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.list-item[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{position:relative;background-color:#2383e2;border:none;font-size:14px;color:#fff;padding:8px 16px;margin-left:8px;text-align:center;transition-duration:.4s;text-decoration:none;overflow:hidden;cursor:pointer;outline:none}.list-item[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#fff}.content-list[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{position:relative;background-color:#2383e2;border:none;font-size:14px;color:#fff;padding:8px 16px;margin-left:8px;text-align:center;transition-duration:.4s;text-decoration:none;overflow:hidden;cursor:pointer;outline:none}.title-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin-top:28px}.title-row[_ngcontent-%COMP%] .list-title[_ngcontent-%COMP%]{flex:1;color:#777;padding-top:12px;justify-content:center}.title-row[_ngcontent-%COMP%] .tail[_ngcontent-%COMP%]{flex:1;text-align:right}.disabled[_ngcontent-%COMP%]{cursor:default;filter:contrast(60%) brightness(1.2);opacity:1;pointer-events:none;-webkit-user-select:none;user-select:none}.input-err[_ngcontent-%COMP%]{outline:none;background-color:#fbd0d6;box-shadow:0 0 0 2px #f1556c}.page-item[_ngcontent-%COMP%]{padding-bottom:14px!important}.unselectable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.pager[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:14px;color:#0009}.pager[_ngcontent-%COMP%] .page-info[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:80px;padding-left:16px}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 0 0 28px}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;color:#0009}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]:hover{color:#000000de}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn.mover-disabled[_ngcontent-%COMP%]{cursor:initial;color:#0000004d}.pager[_ngcontent-%COMP%] .page-all[_ngcontent-%COMP%]{display:flex;align-items:center;padding-right:15px}.inner-input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:6px 8px;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:5px;font-size:14px;transition:.2s;text-indent:0px;font-weight:400}.top-noti[_ngcontent-%COMP%]{width:100%;min-height:36px;display:flex;flex-direction:row;justify-content:center;align-items:center;margin-bottom:7px;background-color:#fcf9e9;font-size:14px;color:#000000de;border-bottom:rgba(0,0,0,.1)}',"@media screen and (max-height: 750px){.custom-widget-area[_ngcontent-%COMP%]{position:relative;flex-direction:column;align-items:center;flex-wrap:nowrap;height:-moz-fit-content;height:fit-content;overflow-y:visible}.custom-widget[_ngcontent-%COMP%]{position:relative}}@media screen and (min-height: 751px){.custom-widget-area[_ngcontent-%COMP%]{position:relative;flex-direction:column;align-items:center;overflow:hidden;flex-wrap:nowrap}.custom-widget[_ngcontent-%COMP%]{position:relative;max-height:calc(100% - 238px)}}.filters-area[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;grid-gap:14px;gap:14px;padding:8px 20px;font-size:14px;border-top:1px solid rgba(0,0,0,.1)}.filters-area[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;grid-gap:8px;gap:8px;flex-wrap:wrap}.selected[_ngcontent-%COMP%]{color:#1e88e5;cursor:not-allowed}.ellipsis[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:break-all}.no-contents[_ngcontent-%COMP%]{color:#adb4bf!important}.not-approved-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(255,184,0,.1);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:orange!important}.need-to-check[_ngcontent-%COMP%]{color:#cd3d64}.pending-label[_ngcontent-%COMP%]{padding:2px 8px;background:rgba(128,128,128,.2);border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:gray!important}.finalized-label[_ngcontent-%COMP%]{padding:2px 8px;background:#90ee9042;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#1a9267!important}.delete-requested-label[_ngcontent-%COMP%]{padding:2px 8px;background:#FFE2DD;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content;color:#ff6b6b!important}.default-label[_ngcontent-%COMP%]{padding:2px 8px;background:#F2F6F9;border-radius:3px;text-align:center;width:-moz-fit-content;width:fit-content}.tooltip-background[_ngcontent-%COMP%]{padding:4px 8px;background:rgba(0,0,0,.7);color:#fff;font-size:12px}.small-font[_ngcontent-%COMP%]{font-size:12px}.text-black[_ngcontent-%COMP%]{color:#000}.service-note-tag[_ngcontent-%COMP%]{background:#E3E8EE;padding:2px 8px;border-radius:3px;color:#55647b;font-size:12px}.report-tab[_ngcontent-%COMP%]{height:48px;min-height:45px;color:#888;display:flex;align-items:center}.report-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;position:relative}.report-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{color:#2383e2;cursor:pointer}.report-tab[_ngcontent-%COMP%] .btn-selected[_ngcontent-%COMP%]{color:#2383e2;background:transparent}.report-tab[_ngcontent-%COMP%] .icn-btn[_ngcontent-%COMP%]{padding:0 16px}.report-tab[_ngcontent-%COMP%] .icn-btn-active[_ngcontent-%COMP%]{color:#000}.report-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:0 20px;text-transform:uppercase;font-size:14px}.report-tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;bottom:0px;width:100%;height:4px;background:#2383e2}.space[_ngcontent-%COMP%]{flex:1}input[type=text][_ngcontent-%COMP%]{font-size:14px;transition:.2s;text-indent:0px;font-weight:400}input[type=text][_ngcontent-%COMP%]::placeholder{color:#00000061}.filter-btn[_ngcontent-%COMP%]{color:#0009}.filter-btn[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{margin-right:5px;font-size:16px;color:#0009}.filter-btn[_ngcontent-%COMP%] .exist-filter[_ngcontent-%COMP%]{font-size:14px;color:#1e88e5;border-left:solid 1px rgba(0,0,0,.1);padding-left:10px}.filter-box[_ngcontent-%COMP%]{position:absolute;top:28px;transition:all .3s;width:300px}.filter-box-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;width:100%;padding:7px 10px;box-sizing:border-box;justify-content:space-between;background-color:#f7fafc;border-bottom:1px solid rgba(0,0,0,.1)}.filter-box-header-title[_ngcontent-%COMP%]{font-size:16px;color:#000000de}.filter-box-header[_ngcontent-%COMP%] .filter-btn[_ngcontent-%COMP%]{margin:6px 12px}.filter-box-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;box-sizing:border-box;transition:all .2s}.filter-box-category[_ngcontent-%COMP%]{min-height:44px;padding:12px;display:flex;align-items:center;box-sizing:border-box;border-bottom:1px solid rgba(0,0,0,.1)}.filter-box-items[_ngcontent-%COMP%]{visibility:hidden;display:block;line-height:0;height:0;opacity:0;overflow:hidden;padding:0 24px;background:#F7FAFC;transition:all .2s}.filter-box-items-item[_ngcontent-%COMP%]{margin-bottom:16px}.filter-box-items-item[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%]{font-size:13px;color:#55647b}.filter-box-items-item[_ngcontent-%COMP%]:last-child{margin-bottom:0}.filter-box-items.expend[_ngcontent-%COMP%]{height:-moz-fit-content;height:fit-content;line-height:normal;padding:16px 24px;opacity:1;overflow:initial}.filter-box-items.expend.show[_ngcontent-%COMP%]{visibility:visible}.widget[_ngcontent-%COMP%] tr.bottom-no-line[_ngcontent-%COMP%]{border-bottom:none}.tab-table[_ngcontent-%COMP%]{height:calc(100% - 142px)}.table-area[_ngcontent-%COMP%]{height:100%}.loader[_ngcontent-%COMP%]{width:30px}.loader[_ngcontent-%COMP%] .circular[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{stroke:#8792a2}"]}),r})()}]);var Me=_(84699),Oe=_(28774);let Te=(()=>{class r{}return r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=t.oAB({type:r}),r.\u0275inj=t.cJS({imports:[[l.ez,S.m,C.u5,Pe,Me.p9,Oe.U]]}),r})()},25229:(D,y,_)=>{_.d(y,{Z:()=>h});var l=_(46243),C=_(76052),M=_.n(C),u=_(49951);const h={_:l,moment:M(),tool:u.Z}}}]);