dealpos 25.48.1 → 25.48.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/browser/{chunk-DZ6FWYAF.js → chunk-2RYEXHZV.js} +1 -1
  2. package/browser/{chunk-YLLLGS4S.js → chunk-356KM5DR.js} +1 -1
  3. package/browser/{chunk-4RYYICV5.js → chunk-36NP63VM.js} +2 -2
  4. package/browser/{chunk-HS44M5L3.js → chunk-3DAJFE6H.js} +1 -1
  5. package/browser/{chunk-UILJOKEL.js → chunk-3ESMPFFS.js} +1 -1
  6. package/browser/{chunk-P6LF5RPW.js → chunk-3G264AW4.js} +1 -1
  7. package/browser/{chunk-HUYWGTVQ.js → chunk-3VQBBLWE.js} +1 -1
  8. package/browser/{chunk-SVECNUUA.js → chunk-3YHMSAWW.js} +1 -1
  9. package/browser/{chunk-YU4JSVLL.js → chunk-4ISL77CE.js} +1 -1
  10. package/browser/{chunk-NDSWUR7R.js → chunk-4NNOZ2BP.js} +1 -1
  11. package/browser/{chunk-2YJP5PQJ.js → chunk-4VSJH5SL.js} +1 -1
  12. package/browser/{chunk-GHBBRGW2.js → chunk-5K7KFVM3.js} +1 -1
  13. package/browser/{chunk-4KLLS7S5.js → chunk-6EJSHQWL.js} +1 -1
  14. package/browser/{chunk-22Q4GFCS.js → chunk-6ONTAEOO.js} +1 -1
  15. package/browser/{chunk-3N7EBSCG.js → chunk-6PR53KNR.js} +1 -1
  16. package/browser/{chunk-N7SUEV3C.js → chunk-6YHYVBRQ.js} +1 -1
  17. package/browser/{chunk-BWEEC6HM.js → chunk-7HRIPBOK.js} +1 -1
  18. package/browser/{chunk-DEOVGQZC.js → chunk-7MD5PKPB.js} +2 -2
  19. package/browser/{chunk-RDAIK2LU.js → chunk-7NEKXENA.js} +1 -1
  20. package/browser/{chunk-T2IWW7SS.js → chunk-7V3SLYOQ.js} +1 -1
  21. package/browser/{chunk-KR2YGW5S.js → chunk-7ZUYXNKP.js} +2 -2
  22. package/browser/{chunk-GTJDUG56.js → chunk-ANPUR4EP.js} +1 -1
  23. package/browser/{chunk-NETNL55X.js → chunk-BJF3WGIP.js} +1 -1
  24. package/browser/{chunk-M3CGB5RK.js → chunk-BOLUBS5R.js} +2 -2
  25. package/browser/{chunk-MP4RQSWT.js → chunk-BYFPLENU.js} +2 -2
  26. package/browser/{chunk-CDFNRJAQ.js → chunk-CFU6YCXT.js} +1 -1
  27. package/browser/{chunk-QA67WF7E.js → chunk-CLX7PIH6.js} +1 -1
  28. package/browser/{chunk-6QBYWFJ4.js → chunk-DHY5NYN2.js} +1 -1
  29. package/browser/{chunk-7DCWSNUN.js → chunk-DV63TLIP.js} +1 -1
  30. package/browser/{chunk-62V34GYI.js → chunk-DWNXML7N.js} +1 -1
  31. package/browser/{chunk-IMSDBLRH.js → chunk-E55DAXRW.js} +1 -1
  32. package/browser/{chunk-GEMHTJVB.js → chunk-E5IXDLDT.js} +1 -1
  33. package/browser/{chunk-UAIR26OK.js → chunk-E7AQSX2U.js} +1 -1
  34. package/browser/{chunk-REBD6XHD.js → chunk-EIHC54J5.js} +1 -1
  35. package/browser/{chunk-KQYNW4DG.js → chunk-F7KTXCW4.js} +2 -2
  36. package/browser/{chunk-HVFAKTAO.js → chunk-FO5ZTXDH.js} +1 -1
  37. package/browser/{chunk-GZ7UUU3F.js → chunk-G4G5P6ZQ.js} +1 -1
  38. package/browser/{chunk-CZYGX5TM.js → chunk-GCP2MGQL.js} +1 -1
  39. package/browser/{chunk-T2ECIFZW.js → chunk-HCCADOVL.js} +1 -1
  40. package/browser/{chunk-HNK3XQEI.js → chunk-I7FZGSZZ.js} +1 -1
  41. package/browser/{chunk-3VKLSTEH.js → chunk-IVJVUXLS.js} +1 -1
  42. package/browser/{chunk-M4HEF65P.js → chunk-IVVSNJJ3.js} +1 -1
  43. package/browser/{chunk-L5KVMIM3.js → chunk-J76F72FK.js} +1 -1
  44. package/browser/{chunk-O5CTER4C.js → chunk-K6CUAFH7.js} +2 -2
  45. package/browser/{chunk-W4ZCLNTU.js → chunk-KD24MXAU.js} +1 -1
  46. package/browser/{chunk-3ALHEPKV.js → chunk-KPHOGUDM.js} +1 -1
  47. package/browser/{chunk-5U73W2IZ.js → chunk-KRPYY55C.js} +1 -1
  48. package/browser/{chunk-ETLWM6MW.js → chunk-KZBNUY2K.js} +1 -1
  49. package/browser/{chunk-A4TTSCQT.js → chunk-LELZTT7A.js} +1 -1
  50. package/browser/{chunk-X2JCAGKP.js → chunk-LLHBXZ6B.js} +1 -1
  51. package/browser/{chunk-EHJXCRPX.js → chunk-MFLQHYOR.js} +1 -1
  52. package/browser/{chunk-FY3CQQFL.js → chunk-N3L2CE6S.js} +1 -1
  53. package/browser/{chunk-IMM4P55U.js → chunk-NJD4GKTM.js} +1 -1
  54. package/browser/{chunk-4OD3JW2M.js → chunk-NZ4SK6LY.js} +1 -1
  55. package/browser/{chunk-33ZBZA3U.js → chunk-OTUYSGSK.js} +1 -1
  56. package/browser/{chunk-LVC4ZU2C.js → chunk-OWGJVIYJ.js} +1 -1
  57. package/browser/{chunk-S3K63CGI.js → chunk-P7BRWWWC.js} +1 -1
  58. package/browser/{chunk-QFWPOP7L.js → chunk-R36QPCUA.js} +1 -1
  59. package/browser/{chunk-ZQGXWDT6.js → chunk-RJMVCGIG.js} +1 -1
  60. package/browser/{chunk-7T6YO3VY.js → chunk-S7X7547X.js} +1 -1
  61. package/browser/{chunk-FYMATMVS.js → chunk-SLDKONZE.js} +1 -1
  62. package/browser/{chunk-THUJIHI7.js → chunk-TARA6KGA.js} +1 -1
  63. package/browser/{chunk-6F4WKG7M.js → chunk-TON7E347.js} +1 -1
  64. package/browser/{chunk-CSURZQS6.js → chunk-TT2F5I7H.js} +1 -1
  65. package/browser/{chunk-37E4SNZ3.js → chunk-U4N5AZIO.js} +1 -1
  66. package/browser/{chunk-E7ISSVA3.js → chunk-U5LNORQV.js} +1 -1
  67. package/browser/{chunk-3DZLNGPO.js → chunk-UAQU4IQS.js} +1 -1
  68. package/browser/{chunk-BXOQMC5N.js → chunk-UCOXEQFM.js} +1 -1
  69. package/browser/{chunk-HIQKF5X3.js → chunk-UQ5F3YKZ.js} +1 -1
  70. package/browser/{chunk-P32JEM3L.js → chunk-USMW7JHL.js} +1 -1
  71. package/browser/{chunk-EX6JLLRB.js → chunk-UZKEO2IO.js} +1 -1
  72. package/browser/{chunk-A5WQMHVO.js → chunk-VNBCF2XF.js} +1 -1
  73. package/browser/{chunk-UHVNH2XA.js → chunk-VVYOMXKJ.js} +1 -1
  74. package/browser/{chunk-PD5SVXID.js → chunk-WBFJWUUR.js} +1 -1
  75. package/browser/{chunk-D2JKYGM3.js → chunk-WKXWWL55.js} +1 -1
  76. package/browser/{chunk-W7CJ25G5.js → chunk-WQMNK3UX.js} +1 -1
  77. package/browser/{chunk-N5SEZOII.js → chunk-WXH4A4T7.js} +1 -1
  78. package/browser/{chunk-NHWTJY64.js → chunk-X3UFVTIQ.js} +1 -1
  79. package/browser/{chunk-VAVKHKIO.js → chunk-XSHCTIUH.js} +1 -1
  80. package/browser/{chunk-327LILIU.js → chunk-YBIA6E5J.js} +1 -1
  81. package/browser/{chunk-4F6J35GL.js → chunk-YBVDBTTE.js} +1 -1
  82. package/browser/{chunk-CUU2G2CM.js → chunk-YQOU4WGG.js} +1 -1
  83. package/browser/{chunk-OU7YY2CV.js → chunk-YV4LSCS5.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-NN7FZ4DK.js → main-BTMX7TBF.js} +2 -2
  86. package/package.json +1 -1
@@ -1 +1 @@
1
- import{a as Pe}from"./chunk-6QBYWFJ4.js";import{a as Ce}from"./chunk-AFBBEIKR.js";import{a as _e}from"./chunk-7DCWSNUN.js";import{a as be}from"./chunk-JUS6LLVX.js";import{b as Se,c as Me}from"./chunk-C4WJKF7R.js";import{a as de}from"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import"./chunk-NWSIPELM.js";import{F as ge,b as me,h as fe,o as he}from"./chunk-RNLSEEMX.js";import{a as T,c as f}from"./chunk-E7ISSVA3.js";import{a as ve}from"./chunk-HVFAKTAO.js";import{a as M,d as I}from"./chunk-USJ6ILEE.js";import{a as pe}from"./chunk-NETNL55X.js";import{$ as q,$d as G,Ab as F,Bb as V,Bc as ie,Cb as h,Db as o,Dc as ne,E,Eb as s,Fb as p,Ob as C,Qb as Z,Sa as Y,Vd as ae,Xa as c,Xd as se,Yd as b,Zd as le,_d as ce,ac as K,be as ue,cc as $,cd as re,d as J,da as D,db as v,dc as m,ec as B,fc as z,hb as W,ib as x,la as d,ma as y,oa as _,pa as l,pc as X,rd as oe,tb as Q,uc as ee,vc as te,zb as j}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var r=class e{constructor(i,t){this.authService=i;this.router=t}canLoad(i,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(i){let t="/menu";i.forEach(a=>t+=`/${a.path}`);let n=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(i){this.toastrService=i;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(i){console.error(i)}}showAlert(i,t,n,u){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:i,icon:u});g.onerror=(N=>{this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}setBody(i,t){return this.hasUrl(t)&&(i=`<a href="${t}" target="_blank" class="ps-0">${i}</a>`),i}hasUrl(i){return!!(i&&i.length!==0)}static \u0275fac=function(t){return new(t||e)(_(ue))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=l(I);authService=l(f);menu=Oe;filteredMenu=[];initFilteredMenu(){this.filteredMenu=this.menu.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?this.role.report.View:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(i){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=l(I);authService=l(f);filteredMenu=[];initFilteredMenu(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=ye.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&i!=2&&i!=3:t.T=="My Sales"?i!=2&&i!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,i)=>({"full-container":e,"subscription-bar-visible":i}),Re=e=>[e];function Ne(e,i){if(e&1&&(o(0,"a",11),p(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=i.$implicit;h("routerLink",t==null?null:t.U),c(),$((t==null?null:t.I)+" me-2"),c(2),B(t==null?null:t.T)}}function Ee(e,i){if(e&1&&(o(0,"li",33,0)(2,"a",36),p(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=i.$implicit,n=Z();h("routerLinkActiveOptions",n.isActiveMatchOptions),Q("data-cy",t==null?null:t.T),c(2),h("matTooltip",n.toggleSideMenu?t==null?null:t.T:"")("routerLink",ee(7,Re,t==null?null:t.U)),c(),$(t==null?null:t.I),c(2),B(t==null?null:t.T)}}var P=class e{constructor(i,t,n,u,a,g,N,H){this.toggleSidebar=i;this.signalRClientService=t;this.notificationAlertService=n;this.router=u;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Te=>this.isNavOpen=Te),this.destroy$=new J,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=pe.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(i=>i instanceof ae),q(null),D(this.destroy$)).subscribe(i=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let i=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(i)&&M.isGuid(i)?this.signalRClientService.SubscribeGroup(i):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let n=JSON.parse(t),u="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(n.Icon)&&(u=n.Icon),this.notificationAlertService.showAlert(n.Body,n.Header,n.URL,u)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(i){return M.IsNotEmpty(i)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(be),v(de),v(w),v(b),v(f),v(ve),v(k),v(A))};static \u0275cmp=W({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,n){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return n.toggleMenu()}),p(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return n.onShowDropdown()}),m(7),ie(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),p(12,"div",10),F(13,Ne,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),p(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return n.chatToggleChange()}),s(),p(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return n.logout()}),p(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),p(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),p(32,"i",23),o(33,"span"),m(34,"What's New"),p(35,"i",24),s()(),o(36,"a",25),p(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),p(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),p(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,Ee,6,9,"li",33,j),s()()(),o(52,"div",34),p(53,"router-outlet"),s()()),t&2&&(K("nav-open",n.isNavOpen),c(),h("ngClass",n.toggleSideMenu?"collapses":""),c(2),h("ngClass",n.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),c(3),h("matTooltip",n.accountInfo==null?null:n.accountInfo.BrandName),c(),z(" ",ne(8,11,n.accountInfo==null?null:n.accountInfo.BrandName,12)," "),c(4),z("",n.accountInfo==null?null:n.accountInfo.UserName," "),c(2),V(n.topMenu),c(9),h("ngModel",!n.isHideIntercomLauncher),c(9),h("href",X("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",n.appVersion),Y),c(19),V(n.leftSidebarMenu),c(2),h("ngClass",te(14,Le,n.isFullContainer,n.isNotEmpty(n.currentSubStatus)&&n.currentSubStatus!==n.subsStatusEnum.PAID)))},dependencies:[Se,se,le,ce,me,fe,he,re,Ce],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function De(e){let i=l(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let n=i.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}var O=(e,i)=>{let t=l(f),n=t.isTokenExpired(),u=l(b);return n?(t.returnUrl=De(i),u.navigate(["/"]),!1):e.path=="Dashboard"?je():!0};function je(){let e=l(b),i=l(f),t=!1,n=i.getRedirectUrl();return t=n.includes("Dashboard"),t==!1&&e.navigate([n]),t}var U=class e{paymentStorageService=l(Pe);canActivate(i,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var L=class e{reportService=l(_e);canActivate(i,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-T2IWW7SS.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-ZQGXWDT6.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[L]},{path:"Sell",loadChildren:()=>import("./chunk-O5CTER4C.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-AVTYR2I6.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-L5KVMIM3.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-62V34GYI.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-A4TTSCQT.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-MP4RQSWT.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-PD5SVXID.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-YU4JSVLL.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-4RYYICV5.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-KR2YGW5S.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-M3CGB5RK.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-5U73W2IZ.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-3DZLNGPO.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-DEOVGQZC.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-KQYNW4DG.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-RDAIK2LU.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-GEMHTJVB.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-UAIR26OK.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-A5WQMHVO.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-NHWTJY64.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-BWEEC6HM.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-P32JEM3L.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-W7CJ25G5.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-N7SUEV3C.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-ETLWM6MW.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],R=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Fe),G]})};var xe=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Me,R,ge,oe]})};export{xe as MenuMasterModule};
1
+ import{a as Pe}from"./chunk-DHY5NYN2.js";import{a as Ce}from"./chunk-AFBBEIKR.js";import{a as _e}from"./chunk-DV63TLIP.js";import{a as be}from"./chunk-JUS6LLVX.js";import{b as Se,c as Me}from"./chunk-C4WJKF7R.js";import{a as de}from"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import"./chunk-NWSIPELM.js";import{F as ge,b as me,h as fe,o as he}from"./chunk-RNLSEEMX.js";import{a as T,c as f}from"./chunk-U5LNORQV.js";import{a as ve}from"./chunk-FO5ZTXDH.js";import{a as M,d as I}from"./chunk-USJ6ILEE.js";import{a as pe}from"./chunk-BJF3WGIP.js";import{$ as q,$d as G,Ab as F,Bb as V,Bc as ie,Cb as h,Db as o,Dc as ne,E,Eb as s,Fb as p,Ob as C,Qb as Z,Sa as Y,Vd as ae,Xa as c,Xd as se,Yd as b,Zd as le,_d as ce,ac as K,be as ue,cc as $,cd as re,d as J,da as D,db as v,dc as m,ec as B,fc as z,hb as W,ib as x,la as d,ma as y,oa as _,pa as l,pc as X,rd as oe,tb as Q,uc as ee,vc as te,zb as j}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var r=class e{constructor(i,t){this.authService=i;this.router=t}canLoad(i,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(i){let t="/menu";i.forEach(a=>t+=`/${a.path}`);let n=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(i){this.toastrService=i;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(i){console.error(i)}}showAlert(i,t,n,u){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:i,icon:u});g.onerror=(N=>{this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}setBody(i,t){return this.hasUrl(t)&&(i=`<a href="${t}" target="_blank" class="ps-0">${i}</a>`),i}hasUrl(i){return!!(i&&i.length!==0)}static \u0275fac=function(t){return new(t||e)(_(ue))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=l(I);authService=l(f);menu=Oe;filteredMenu=[];initFilteredMenu(){this.filteredMenu=this.menu.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?this.role.report.View:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(i){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=l(I);authService=l(f);filteredMenu=[];initFilteredMenu(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=ye.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&i!=2&&i!=3:t.T=="My Sales"?i!=2&&i!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,i)=>({"full-container":e,"subscription-bar-visible":i}),Re=e=>[e];function Ne(e,i){if(e&1&&(o(0,"a",11),p(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=i.$implicit;h("routerLink",t==null?null:t.U),c(),$((t==null?null:t.I)+" me-2"),c(2),B(t==null?null:t.T)}}function Ee(e,i){if(e&1&&(o(0,"li",33,0)(2,"a",36),p(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=i.$implicit,n=Z();h("routerLinkActiveOptions",n.isActiveMatchOptions),Q("data-cy",t==null?null:t.T),c(2),h("matTooltip",n.toggleSideMenu?t==null?null:t.T:"")("routerLink",ee(7,Re,t==null?null:t.U)),c(),$(t==null?null:t.I),c(2),B(t==null?null:t.T)}}var P=class e{constructor(i,t,n,u,a,g,N,H){this.toggleSidebar=i;this.signalRClientService=t;this.notificationAlertService=n;this.router=u;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Te=>this.isNavOpen=Te),this.destroy$=new J,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=pe.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(i=>i instanceof ae),q(null),D(this.destroy$)).subscribe(i=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let i=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(i)&&M.isGuid(i)?this.signalRClientService.SubscribeGroup(i):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let n=JSON.parse(t),u="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(n.Icon)&&(u=n.Icon),this.notificationAlertService.showAlert(n.Body,n.Header,n.URL,u)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(i){return M.IsNotEmpty(i)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(be),v(de),v(w),v(b),v(f),v(ve),v(k),v(A))};static \u0275cmp=W({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,n){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return n.toggleMenu()}),p(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return n.onShowDropdown()}),m(7),ie(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),p(12,"div",10),F(13,Ne,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),p(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return n.chatToggleChange()}),s(),p(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return n.logout()}),p(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),p(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),p(32,"i",23),o(33,"span"),m(34,"What's New"),p(35,"i",24),s()(),o(36,"a",25),p(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),p(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),p(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,Ee,6,9,"li",33,j),s()()(),o(52,"div",34),p(53,"router-outlet"),s()()),t&2&&(K("nav-open",n.isNavOpen),c(),h("ngClass",n.toggleSideMenu?"collapses":""),c(2),h("ngClass",n.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),c(3),h("matTooltip",n.accountInfo==null?null:n.accountInfo.BrandName),c(),z(" ",ne(8,11,n.accountInfo==null?null:n.accountInfo.BrandName,12)," "),c(4),z("",n.accountInfo==null?null:n.accountInfo.UserName," "),c(2),V(n.topMenu),c(9),h("ngModel",!n.isHideIntercomLauncher),c(9),h("href",X("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",n.appVersion),Y),c(19),V(n.leftSidebarMenu),c(2),h("ngClass",te(14,Le,n.isFullContainer,n.isNotEmpty(n.currentSubStatus)&&n.currentSubStatus!==n.subsStatusEnum.PAID)))},dependencies:[Se,se,le,ce,me,fe,he,re,Ce],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function De(e){let i=l(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let n=i.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}var O=(e,i)=>{let t=l(f),n=t.isTokenExpired(),u=l(b);return n?(t.returnUrl=De(i),u.navigate(["/"]),!1):e.path=="Dashboard"?je():!0};function je(){let e=l(b),i=l(f),t=!1,n=i.getRedirectUrl();return t=n.includes("Dashboard"),t==!1&&e.navigate([n]),t}var U=class e{paymentStorageService=l(Pe);canActivate(i,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var L=class e{reportService=l(_e);canActivate(i,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-7V3SLYOQ.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-RJMVCGIG.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[L]},{path:"Sell",loadChildren:()=>import("./chunk-K6CUAFH7.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-AVTYR2I6.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-J76F72FK.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-DWNXML7N.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-LELZTT7A.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-BYFPLENU.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-WBFJWUUR.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-4ISL77CE.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-36NP63VM.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-7ZUYXNKP.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-BOLUBS5R.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-KRPYY55C.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-UAQU4IQS.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-7MD5PKPB.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-F7KTXCW4.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-7NEKXENA.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-E5IXDLDT.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-E7AQSX2U.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-VNBCF2XF.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-X3UFVTIQ.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-7HRIPBOK.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-USMW7JHL.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-WQMNK3UX.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-6YHYVBRQ.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-KZBNUY2K.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],R=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Fe),G]})};var xe=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Me,R,ge,oe]})};export{xe as MenuMasterModule};
@@ -1 +1 @@
1
- import{a as J,b as K}from"./chunk-HD2QU6GJ.js";import{e as Y,f as z}from"./chunk-YLLLGS4S.js";import"./chunk-3VKLSTEH.js";import{a as A,b as G}from"./chunk-HIQKF5X3.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import"./chunk-BA3BDB5Y.js";import"./chunk-C4WJKF7R.js";import{O as U}from"./chunk-T25N3EEG.js";import"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import"./chunk-RNLSEEMX.js";import"./chunk-E7ISSVA3.js";import"./chunk-HVFAKTAO.js";import{d as k}from"./chunk-USJ6ILEE.js";import"./chunk-NETNL55X.js";import{$d as j,Bc as v,Cb as d,Cc as V,Db as r,Dc as S,Eb as n,Fb as c,Qb as f,Wd as B,Xa as o,Y as M,Zd as $,aa as E,db as I,dc as a,ee as q,fa as P,fc as C,hb as b,kd as N,lb as D,lc as L,mc as R,md as H,nc as s,pa as F,rd as w,t as g,tc as T,u as h,uc as O,vb as u,xb as p}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import{a as y,b as _}from"./chunk-SNAKHGZS.js";var W=()=>["/menu/Logistics/Setup/Courier/Form"],X=i=>({ID:i});function Z(i,m){if(i&1&&(r(0,"a",1),c(1,"i",16),a(2,"Edit"),n()),i&2){f();let e=s(0);d("routerLink",T(2,W))("queryParams",O(3,X,e==null||e.Form==null?null:e.Form.ID))}}function ee(i,m){if(i&1&&a(0),i&2){f(2);let e=s(0);C(" / ",e.Form.Creator," ")}}function ie(i,m){if(i&1&&(a(0),v(1,"date"),u(2,ee,1,1)),i&2){f();let e=s(0);C(" ",S(1,2,e.Form.Created,"dd MMM yyyy HH:mm")," "),o(2),p(!(e==null||e.Form==null)&&e.Form.Creator?2:-1)}}function te(i,m){i&1&&a(0," - ")}function ne(i,m){if(i&1&&a(0),i&2){f(2);let e=s(0);C(" / ",e.Form.Modifier," ")}}function oe(i,m){if(i&1&&(r(0,"span",15)(1,"b"),a(2,"Modified:"),n(),a(3),v(4,"date"),u(5,ne,1,1),n()),i&2){f();let e=s(0);o(3),C(" ",S(4,2,e==null||e.Form==null?null:e.Form.Modified,"dd MMM yyyy HH:mm")," "),o(2),p(!(e==null||e.Form==null)&&e.Form.Modified&&(!(e==null||e.Form==null)&&e.Form.Modifier)?5:-1)}}var Q=class i extends A{constructor(e,l){super(e);this.pageSetupService=e;this.role=l;this.initCourierInfo()}httpService=F(q);activeRoute=F(B);courierInfo$;ngOnInit(){}initCourierInfo(){this.courierInfo$=h([this.menuData$,this.activeRoute.queryParams]).pipe(E(([e,l])=>this.httpService.get(`${U.GetCourierInfo}/${l.ID}`)),g(e=>{let l=e?.Form?.EntityName?e?.Form?.EntityName?.join(", "):"";return e.Form=_(y({},e.Form),{Entity:l}),e}),P(e=>{this.menuData.H=e?.PageTitle||"Courier Info"}),M(1))}static \u0275fac=function(l){return new(l||i)(I(G),I(k))};static \u0275cmp=b({type:i,selectors:[["app-courier-info"]],features:[D],decls:32,vars:12,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","matTooltipPosition","above","matTooltip","Edit",1,"btn","btn-outline-secondary","me-3",3,"routerLink","queryParams"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-6"],[1,"form-floating-outline"],["labelValue","Name",3,"inputValue"],["labelValue","Suspend",3,"inputValue"],["labelValue","Destination Outlet Filter",3,"inputValue"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa","fa-file-text-o"],[1,"ms-3"],["aria-hidden","true",1,"fa-solid","fa-pen-to-square","me-3"]],template:function(l,x){if(l&1&&(L(0),v(1,"async"),r(2,"mainpanel-cmp",0)(3,"actions"),u(4,Z,3,5,"a",1),n(),r(5,"content")(6,"div",2)(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"h3"),a(12,"General"),n()(),r(13,"div",7)(14,"div",3)(15,"div",8)(16,"div",9),c(17,"POS-info-page-input",10),n()(),r(18,"div",8)(19,"div",9),c(20,"POS-info-page-input",11),n()(),r(21,"div",8)(22,"div",9),c(23,"POS-info-page-input",12),n()()()()()()(),r(24,"div",13),c(25,"i",14),r(26,"span")(27,"b"),a(28,"Created: "),n(),u(29,ie,3,5)(30,te,1,0),n(),u(31,oe,6,5,"span",15),n()()()()),l&2){let t=R(V(1,9,x.courierInfo$));o(2),d("pageData",x.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),p(x.role.logistic.Edit?4:-1),o(13),d("inputValue",t==null||t.Form==null?null:t.Form.Name),o(3),d("inputValue",!(t==null||t.Form==null)&&t.Form.Bin?"Yes":"No"),o(3),d("inputValue",t==null||t.Form==null?null:t.Form.Entity),o(6),p(!(t==null||t.Form==null)&&t.Form.Created?29:30),o(2),p(!(t==null||t.Form==null)&&t.Form.Modified?31:-1)}},dependencies:[w,z,Y,j,$,K,J,N,H],encapsulation:2})};export{Q as CourierInfoComponent};
1
+ import{a as J,b as K}from"./chunk-HD2QU6GJ.js";import{e as Y,f as z}from"./chunk-356KM5DR.js";import"./chunk-IVJVUXLS.js";import{a as A,b as G}from"./chunk-UQ5F3YKZ.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import"./chunk-BA3BDB5Y.js";import"./chunk-C4WJKF7R.js";import{O as U}from"./chunk-T25N3EEG.js";import"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import"./chunk-RNLSEEMX.js";import"./chunk-U5LNORQV.js";import"./chunk-FO5ZTXDH.js";import{d as k}from"./chunk-USJ6ILEE.js";import"./chunk-BJF3WGIP.js";import{$d as j,Bc as v,Cb as d,Cc as V,Db as r,Dc as S,Eb as n,Fb as c,Qb as f,Wd as B,Xa as o,Y as M,Zd as $,aa as E,db as I,dc as a,ee as q,fa as P,fc as C,hb as b,kd as N,lb as D,lc as L,mc as R,md as H,nc as s,pa as F,rd as w,t as g,tc as T,u as h,uc as O,vb as u,xb as p}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import{a as y,b as _}from"./chunk-SNAKHGZS.js";var W=()=>["/menu/Logistics/Setup/Courier/Form"],X=i=>({ID:i});function Z(i,m){if(i&1&&(r(0,"a",1),c(1,"i",16),a(2,"Edit"),n()),i&2){f();let e=s(0);d("routerLink",T(2,W))("queryParams",O(3,X,e==null||e.Form==null?null:e.Form.ID))}}function ee(i,m){if(i&1&&a(0),i&2){f(2);let e=s(0);C(" / ",e.Form.Creator," ")}}function ie(i,m){if(i&1&&(a(0),v(1,"date"),u(2,ee,1,1)),i&2){f();let e=s(0);C(" ",S(1,2,e.Form.Created,"dd MMM yyyy HH:mm")," "),o(2),p(!(e==null||e.Form==null)&&e.Form.Creator?2:-1)}}function te(i,m){i&1&&a(0," - ")}function ne(i,m){if(i&1&&a(0),i&2){f(2);let e=s(0);C(" / ",e.Form.Modifier," ")}}function oe(i,m){if(i&1&&(r(0,"span",15)(1,"b"),a(2,"Modified:"),n(),a(3),v(4,"date"),u(5,ne,1,1),n()),i&2){f();let e=s(0);o(3),C(" ",S(4,2,e==null||e.Form==null?null:e.Form.Modified,"dd MMM yyyy HH:mm")," "),o(2),p(!(e==null||e.Form==null)&&e.Form.Modified&&(!(e==null||e.Form==null)&&e.Form.Modifier)?5:-1)}}var Q=class i extends A{constructor(e,l){super(e);this.pageSetupService=e;this.role=l;this.initCourierInfo()}httpService=F(q);activeRoute=F(B);courierInfo$;ngOnInit(){}initCourierInfo(){this.courierInfo$=h([this.menuData$,this.activeRoute.queryParams]).pipe(E(([e,l])=>this.httpService.get(`${U.GetCourierInfo}/${l.ID}`)),g(e=>{let l=e?.Form?.EntityName?e?.Form?.EntityName?.join(", "):"";return e.Form=_(y({},e.Form),{Entity:l}),e}),P(e=>{this.menuData.H=e?.PageTitle||"Courier Info"}),M(1))}static \u0275fac=function(l){return new(l||i)(I(G),I(k))};static \u0275cmp=b({type:i,selectors:[["app-courier-info"]],features:[D],decls:32,vars:12,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","matTooltipPosition","above","matTooltip","Edit",1,"btn","btn-outline-secondary","me-3",3,"routerLink","queryParams"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-6"],[1,"form-floating-outline"],["labelValue","Name",3,"inputValue"],["labelValue","Suspend",3,"inputValue"],["labelValue","Destination Outlet Filter",3,"inputValue"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa","fa-file-text-o"],[1,"ms-3"],["aria-hidden","true",1,"fa-solid","fa-pen-to-square","me-3"]],template:function(l,x){if(l&1&&(L(0),v(1,"async"),r(2,"mainpanel-cmp",0)(3,"actions"),u(4,Z,3,5,"a",1),n(),r(5,"content")(6,"div",2)(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"h3"),a(12,"General"),n()(),r(13,"div",7)(14,"div",3)(15,"div",8)(16,"div",9),c(17,"POS-info-page-input",10),n()(),r(18,"div",8)(19,"div",9),c(20,"POS-info-page-input",11),n()(),r(21,"div",8)(22,"div",9),c(23,"POS-info-page-input",12),n()()()()()()(),r(24,"div",13),c(25,"i",14),r(26,"span")(27,"b"),a(28,"Created: "),n(),u(29,ie,3,5)(30,te,1,0),n(),u(31,oe,6,5,"span",15),n()()()()),l&2){let t=R(V(1,9,x.courierInfo$));o(2),d("pageData",x.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),p(x.role.logistic.Edit?4:-1),o(13),d("inputValue",t==null||t.Form==null?null:t.Form.Name),o(3),d("inputValue",!(t==null||t.Form==null)&&t.Form.Bin?"Yes":"No"),o(3),d("inputValue",t==null||t.Form==null?null:t.Form.Entity),o(6),p(!(t==null||t.Form==null)&&t.Form.Created?29:30),o(2),p(!(t==null||t.Form==null)&&t.Form.Modified?31:-1)}},dependencies:[w,z,Y,j,$,K,J,N,H],encapsulation:2})};export{Q as CourierInfoComponent};
@@ -1 +1 @@
1
- import{a as Qe}from"./chunk-46GHEHUK.js";import{a as Ae,f as Le}from"./chunk-X2JCAGKP.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-JR5LAUIS.js";import"./chunk-KYAKLZR7.js";import{c as Ge}from"./chunk-CA6YBQT3.js";import"./chunk-QIJEAKQK.js";import"./chunk-QEOGHVXA.js";import{e as Ne}from"./chunk-4HCSE44G.js";import"./chunk-KHR4NBM3.js";import"./chunk-HUYWGTVQ.js";import"./chunk-H7XFYY6V.js";import"./chunk-XACC6EMJ.js";import"./chunk-Q2A4MYK3.js";import{b as be}from"./chunk-CSFFF2YO.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-WNZKCNMC.js";import"./chunk-3KSZCJ6T.js";import{d as he}from"./chunk-6GLKD66N.js";import"./chunk-CBSYYTXQ.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-YLLLGS4S.js";import"./chunk-S3K63CGI.js";import"./chunk-JEL3OND6.js";import"./chunk-IDQUQBKL.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import{c as Oe,d as De}from"./chunk-3VKLSTEH.js";import{a as ve,b as Pe}from"./chunk-HIQKF5X3.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import{u as Me,v as Te,w as Ee}from"./chunk-BA3BDB5Y.js";import"./chunk-C4WJKF7R.js";import{O as q}from"./chunk-T25N3EEG.js";import{e as we,f as Ie,g as ye}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-O5SLP4JK.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-RNLSEEMX.js";import"./chunk-E7ISSVA3.js";import"./chunk-HVFAKTAO.js";import"./chunk-USJ6ILEE.js";import{a as ue}from"./chunk-NETNL55X.js";import{Ab as ie,Bb as ne,Bc as g,Ca as k,Cb as c,Cc as C,Db as n,Dc as me,E as Y,Eb as o,Fb as b,I as J,Jb as T,Kb as E,Mb as S,Ob as f,Oc as H,Pc as A,Qb as s,Rb as oe,Sa as Z,Sb as Q,Ub as U,Vb as V,Wb as F,Xa as a,Y as z,_b as N,aa as X,ac as re,cd as se,db as G,dc as l,ec as d,ee as Ce,fa as $,fc as v,hb as I,ic as P,jc as O,k as K,kc as D,kd as de,lb as ee,nb as y,od as ce,pa as M,rd as L,ta as u,tc as le,ua as _,uc as pe,vb as h,wc as ae,xb as x,yb as te}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};
1
+ import{a as Qe}from"./chunk-46GHEHUK.js";import{a as Ae,f as Le}from"./chunk-LLHBXZ6B.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-JR5LAUIS.js";import"./chunk-KYAKLZR7.js";import{c as Ge}from"./chunk-CA6YBQT3.js";import"./chunk-QIJEAKQK.js";import"./chunk-QEOGHVXA.js";import{e as Ne}from"./chunk-4HCSE44G.js";import"./chunk-KHR4NBM3.js";import"./chunk-3VQBBLWE.js";import"./chunk-H7XFYY6V.js";import"./chunk-XACC6EMJ.js";import"./chunk-Q2A4MYK3.js";import{b as be}from"./chunk-CSFFF2YO.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-WNZKCNMC.js";import"./chunk-3KSZCJ6T.js";import{d as he}from"./chunk-6GLKD66N.js";import"./chunk-CBSYYTXQ.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-356KM5DR.js";import"./chunk-P7BRWWWC.js";import"./chunk-JEL3OND6.js";import"./chunk-IDQUQBKL.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import{c as Oe,d as De}from"./chunk-IVJVUXLS.js";import{a as ve,b as Pe}from"./chunk-UQ5F3YKZ.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import{u as Me,v as Te,w as Ee}from"./chunk-BA3BDB5Y.js";import"./chunk-C4WJKF7R.js";import{O as q}from"./chunk-T25N3EEG.js";import{e as we,f as Ie,g as ye}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-O5SLP4JK.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-RNLSEEMX.js";import"./chunk-U5LNORQV.js";import"./chunk-FO5ZTXDH.js";import"./chunk-USJ6ILEE.js";import{a as ue}from"./chunk-BJF3WGIP.js";import{Ab as ie,Bb as ne,Bc as g,Ca as k,Cb as c,Cc as C,Db as n,Dc as me,E as Y,Eb as o,Fb as b,I as J,Jb as T,Kb as E,Mb as S,Ob as f,Oc as H,Pc as A,Qb as s,Rb as oe,Sa as Z,Sb as Q,Ub as U,Vb as V,Wb as F,Xa as a,Y as z,_b as N,aa as X,ac as re,cd as se,db as G,dc as l,ec as d,ee as Ce,fa as $,fc as v,hb as I,ic as P,jc as O,k as K,kc as D,kd as de,lb as ee,nb as y,od as ce,pa as M,rd as L,ta as u,tc as le,ua as _,uc as pe,vb as h,wc as ae,xb as x,yb as te}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};
@@ -1 +1 @@
1
- import{a as Q,b as U}from"./chunk-I5W4NCFM.js";import{d as te,e as ie}from"./chunk-QPOOLLKY.js";import{a as X}from"./chunk-LVC4ZU2C.js";import{e as $,f as ee}from"./chunk-YLLLGS4S.js";import{b as Z}from"./chunk-HIQKF5X3.js";import{d as Y}from"./chunk-7TBS7SPQ.js";import{F as A,c as H,h as z,o as q}from"./chunk-RNLSEEMX.js";import{d as K}from"./chunk-USJ6ILEE.js";import{$d as j,Ab as W,Bb as M,Bc as y,Cb as s,Db as i,Dc as v,Eb as o,Hc as P,Mb as h,Ob as D,Qb as m,Xa as l,Zd as R,be as O,cd as J,db as _,dc as p,ee as G,fc as S,hb as w,ic as u,jc as C,kc as b,lb as F,md as V,nb as k,od as B,rd as N,ta as c,tc as T,ua as g,uc as E,vb as f,vc as I,xb as x,zb as L}from"./chunk-JYZTRN6N.js";var ne=()=>["/menu/Developer/Webhook/Job_Logs/Detail"],ae=n=>({ID:n}),re=(n,d)=>({"text-success":n,"text-danger":d});function le(n,d){if(n&1){let e=h();i(0,"div",12)(1,"h6"),p(2,"Status"),o(),i(3,"ng-select",13),b("ngModelChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.Status,t)||(r.pageData.Filter.Status=t),g(t)}),o(),i(4,"h6"),p(5,"Job ID"),o(),i(6,"input",14),b("ngModelChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.JobID,t)||(r.pageData.Filter.JobID=t),g(t)}),o(),i(7,"h6"),p(8,"From"),o(),i(9,"datepicker",15),b("dateChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.From,t)||(r.pageData.Filter.From=t),g(t)}),o(),i(10,"h6"),p(11,"To"),o(),i(12,"datepicker",16),b("dateChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.To,t)||(r.pageData.Filter.To=t),g(t)}),o()()}if(n&2){let e=m(2);l(3),s("disabled",!e.role.developer.Edit)("items",e.pageData.Options.Status),u("ngModel",e.pageData.Filter.Status),l(3),u("ngModel",e.pageData.Filter.JobID),l(3),s("isFloatingLabel",!1),u("date",e.pageData.Filter.From),l(3),s("isFloatingLabel",!1),u("date",e.pageData.Filter.To)}}function pe(n,d){if(n&1&&(i(0,"tr",9)(1,"td")(2,"a",17),p(3),y(4,"date"),o()(),i(5,"td"),p(6),y(7,"number"),o(),i(8,"td",18),p(9),o()()),n&2){let e=d.$implicit;l(2),s("routerLink",T(12,ne))("queryParams",E(13,ae,e._id)),l(),S(" ",v(4,6,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," "),l(3),S("",v(7,9,e.DurationInSecond,"1.1-1")," s"),l(2),s("ngClass",I(15,re,e._source.log.respCode==200,e._source.log.respCode!=200)),l(),S(" ",e._source.log.respCode," ")}}function me(n,d){if(n&1){let e=h();i(0,"mat-paginator",19),D("page",function(t){c(e);let r=m(2);return g(r.onPaginationChange(t))}),o()}if(n&2){let e=m(2);s("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function se(n,d){if(n&1){let e=h();i(0,"mainpanel-cmp",2),D("onSubmit",function(){c(e);let t=m();return g(t.searchFromPageOne())}),i(1,"filters"),k(2,le,13,8,"ng-template",null,0,P),o(),i(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr",7)(10,"th",8),p(11,"Created"),o(),i(12,"th",8),p(13,"Duration"),o(),i(14,"th",8),p(15,"Status"),o()()(),i(16,"tbody"),W(17,pe,10,18,"tr",9,L),o()()(),i(19,"div",10),f(20,me,1,3,"mat-paginator",11),o()()()()}if(n&2){let e=m();s("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),l(17),M(e.data.hits),l(3),x(e.pagination.listTotal>0?20:-1)}}var oe=class n extends X{constructor(e,a,t,r){super(e,a,"Developer/DeveloperSpace/Webhook/JobLogs","Developer/DeveloperSpace/WebhookLoader/GetLogs",t);this.httpService=a;this.role=r}postInit(e){this.data.hits=this.data?.hits.map(a=>(a.DurationInSecond=parseInt(a._source?.Duration)/1e3,a)),this.data.ListTotal=e?.total?.value}static \u0275fac=function(a){return new(a||n)(_(Z),_(G),_(O),_(K))};static \u0275cmp=w({type:n,selectors:[["app-webhook-job-logs"]],features:[F],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","50px"],[1,"border-bottom"],[1,"mt-2"],[3,"length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose a status","appendTo","body",3,"ngModelChange","disabled","items","ngModel"],["type","text",1,"form-control",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline",3,"dateChange","isFloatingLabel","date"],[3,"routerLink","queryParams"],[3,"ngClass"],[3,"page","length","pageSize","pageIndex"]],template:function(a,t){a&1&&f(0,se,21,4,"mainpanel-cmp",1),a&2&&x(t.data?0:-1)},dependencies:[N,J,ee,$,ie,te,U,Q,Y,A,H,z,q,j,R,B,V],encapsulation:2})};export{oe as a};
1
+ import{a as Q,b as U}from"./chunk-I5W4NCFM.js";import{d as te,e as ie}from"./chunk-QPOOLLKY.js";import{a as X}from"./chunk-OWGJVIYJ.js";import{e as $,f as ee}from"./chunk-356KM5DR.js";import{b as Z}from"./chunk-UQ5F3YKZ.js";import{d as Y}from"./chunk-7TBS7SPQ.js";import{F as A,c as H,h as z,o as q}from"./chunk-RNLSEEMX.js";import{d as K}from"./chunk-USJ6ILEE.js";import{$d as j,Ab as W,Bb as M,Bc as y,Cb as s,Db as i,Dc as v,Eb as o,Hc as P,Mb as h,Ob as D,Qb as m,Xa as l,Zd as R,be as O,cd as J,db as _,dc as p,ee as G,fc as S,hb as w,ic as u,jc as C,kc as b,lb as F,md as V,nb as k,od as B,rd as N,ta as c,tc as T,ua as g,uc as E,vb as f,vc as I,xb as x,zb as L}from"./chunk-JYZTRN6N.js";var ne=()=>["/menu/Developer/Webhook/Job_Logs/Detail"],ae=n=>({ID:n}),re=(n,d)=>({"text-success":n,"text-danger":d});function le(n,d){if(n&1){let e=h();i(0,"div",12)(1,"h6"),p(2,"Status"),o(),i(3,"ng-select",13),b("ngModelChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.Status,t)||(r.pageData.Filter.Status=t),g(t)}),o(),i(4,"h6"),p(5,"Job ID"),o(),i(6,"input",14),b("ngModelChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.JobID,t)||(r.pageData.Filter.JobID=t),g(t)}),o(),i(7,"h6"),p(8,"From"),o(),i(9,"datepicker",15),b("dateChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.From,t)||(r.pageData.Filter.From=t),g(t)}),o(),i(10,"h6"),p(11,"To"),o(),i(12,"datepicker",16),b("dateChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.To,t)||(r.pageData.Filter.To=t),g(t)}),o()()}if(n&2){let e=m(2);l(3),s("disabled",!e.role.developer.Edit)("items",e.pageData.Options.Status),u("ngModel",e.pageData.Filter.Status),l(3),u("ngModel",e.pageData.Filter.JobID),l(3),s("isFloatingLabel",!1),u("date",e.pageData.Filter.From),l(3),s("isFloatingLabel",!1),u("date",e.pageData.Filter.To)}}function pe(n,d){if(n&1&&(i(0,"tr",9)(1,"td")(2,"a",17),p(3),y(4,"date"),o()(),i(5,"td"),p(6),y(7,"number"),o(),i(8,"td",18),p(9),o()()),n&2){let e=d.$implicit;l(2),s("routerLink",T(12,ne))("queryParams",E(13,ae,e._id)),l(),S(" ",v(4,6,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," "),l(3),S("",v(7,9,e.DurationInSecond,"1.1-1")," s"),l(2),s("ngClass",I(15,re,e._source.log.respCode==200,e._source.log.respCode!=200)),l(),S(" ",e._source.log.respCode," ")}}function me(n,d){if(n&1){let e=h();i(0,"mat-paginator",19),D("page",function(t){c(e);let r=m(2);return g(r.onPaginationChange(t))}),o()}if(n&2){let e=m(2);s("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function se(n,d){if(n&1){let e=h();i(0,"mainpanel-cmp",2),D("onSubmit",function(){c(e);let t=m();return g(t.searchFromPageOne())}),i(1,"filters"),k(2,le,13,8,"ng-template",null,0,P),o(),i(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr",7)(10,"th",8),p(11,"Created"),o(),i(12,"th",8),p(13,"Duration"),o(),i(14,"th",8),p(15,"Status"),o()()(),i(16,"tbody"),W(17,pe,10,18,"tr",9,L),o()()(),i(19,"div",10),f(20,me,1,3,"mat-paginator",11),o()()()()}if(n&2){let e=m();s("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),l(17),M(e.data.hits),l(3),x(e.pagination.listTotal>0?20:-1)}}var oe=class n extends X{constructor(e,a,t,r){super(e,a,"Developer/DeveloperSpace/Webhook/JobLogs","Developer/DeveloperSpace/WebhookLoader/GetLogs",t);this.httpService=a;this.role=r}postInit(e){this.data.hits=this.data?.hits.map(a=>(a.DurationInSecond=parseInt(a._source?.Duration)/1e3,a)),this.data.ListTotal=e?.total?.value}static \u0275fac=function(a){return new(a||n)(_(Z),_(G),_(O),_(K))};static \u0275cmp=w({type:n,selectors:[["app-webhook-job-logs"]],features:[F],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","50px"],[1,"border-bottom"],[1,"mt-2"],[3,"length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose a status","appendTo","body",3,"ngModelChange","disabled","items","ngModel"],["type","text",1,"form-control",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline",3,"dateChange","isFloatingLabel","date"],[3,"routerLink","queryParams"],[3,"ngClass"],[3,"page","length","pageSize","pageIndex"]],template:function(a,t){a&1&&f(0,se,21,4,"mainpanel-cmp",1),a&2&&x(t.data?0:-1)},dependencies:[N,J,ee,$,ie,te,U,Q,Y,A,H,z,q,j,R,B,V],encapsulation:2})};export{oe as a};
@@ -1 +1 @@
1
- import{c as u}from"./chunk-E7ISSVA3.js";import{d as s}from"./chunk-USJ6ILEE.js";import{Yd as a,pa as e}from"./chunk-JYZTRN6N.js";var g=(t,c)=>{let r=e(a),i=e(u);if(i.isTokenExpired())return i.returnUrl=c.url,r.navigate(["/"]),!1;let d=e(s),o=t.data?.roles;if(o){let n=t.data?.unauthorizedRedirect;if(!o.some(l=>d.isUserHasRole(l)))return n?r.navigate([n]):r.navigate(["menu/Unauthorized/Main/Unauthorized"]),!1}return!0};export{g as a};
1
+ import{c as u}from"./chunk-U5LNORQV.js";import{d as s}from"./chunk-USJ6ILEE.js";import{Yd as a,pa as e}from"./chunk-JYZTRN6N.js";var g=(t,c)=>{let r=e(a),i=e(u);if(i.isTokenExpired())return i.returnUrl=c.url,r.navigate(["/"]),!1;let d=e(s),o=t.data?.roles;if(o){let n=t.data?.unauthorizedRedirect;if(!o.some(l=>d.isUserHasRole(l)))return n?r.navigate([n]):r.navigate(["menu/Unauthorized/Main/Unauthorized"]),!1}return!0};export{g as a};
@@ -46,7 +46,7 @@
46
46
  </script>
47
47
  <link href="https://cdn.jsdelivr.net/npm/dealpos-font@7.0.5/font-awesome/css/all.min.css" rel="stylesheet"/>
48
48
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"/>
49
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/styles-URIEURGQ.css"></head>
49
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/styles-URIEURGQ.css"></head>
50
50
 
51
51
  <body>
52
52
  <app-root>
@@ -54,5 +54,5 @@
54
54
  </app-root>
55
55
  <script async="" src="https://cdn.jsdelivr.net/npm/dealpos-tm@7.1.0/tinymce.min.js"></script>
56
56
  <script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-element-bundle.min.js"></script>
57
- <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-MJ2YN4R7.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-LAZZHDUO.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-V432I4ZE.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-7TBS7SPQ.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-RLQLFW36.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-EQLHPWVB.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-A45GTZVV.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-NWSIPELM.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-O5SLP4JK.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/chunk-RNLSEEMX.js"><script src="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/polyfills-KVI7ACYJ.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/scripts-Z64TTWXD.js" defer></script><script src="https://cdn.jsdelivr.net/npm/dealpos@25.48.1/browser/main-NN7FZ4DK.js" type="module"></script></body>
57
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-MJ2YN4R7.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-LAZZHDUO.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-V432I4ZE.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-7TBS7SPQ.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-RLQLFW36.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-EQLHPWVB.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-A45GTZVV.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-NWSIPELM.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-O5SLP4JK.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/chunk-RNLSEEMX.js"><script src="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/polyfills-KVI7ACYJ.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/scripts-Z64TTWXD.js" defer></script><script src="https://cdn.jsdelivr.net/npm/dealpos@25.48.2/browser/main-BTMX7TBF.js" type="module"></script></body>
58
58
  </html>