dealpos 26.22.3 → 26.22.4

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 (114) hide show
  1. package/browser/{chunk-DR4TMAYN.js → chunk-26FPOL2Z.js} +1 -1
  2. package/browser/{chunk-QRBDV7QS.js → chunk-2C6FCV47.js} +1 -1
  3. package/browser/{chunk-UKMVGESE.js → chunk-2SCMKR5I.js} +1 -1
  4. package/browser/{chunk-6DLXE3JU.js → chunk-2SDMVLR3.js} +1 -1
  5. package/browser/{chunk-UL4S2FU5.js → chunk-36XZFUG2.js} +1 -1
  6. package/browser/{chunk-AFJD6GHF.js → chunk-3A4IV47X.js} +1 -1
  7. package/browser/{chunk-6WJHXDKL.js → chunk-3VICOTNO.js} +1 -1
  8. package/browser/{chunk-JD7UP3FE.js → chunk-4OKIVQZ3.js} +1 -1
  9. package/browser/{chunk-HGCOMCVK.js → chunk-4UQK4SY5.js} +1 -1
  10. package/browser/{chunk-KQ4HO57T.js → chunk-57VAH3DF.js} +1 -1
  11. package/browser/{chunk-3YQQXJZI.js → chunk-5H3TS6GO.js} +1 -1
  12. package/browser/{chunk-MHJEBDOK.js → chunk-5RSHIBDO.js} +1 -1
  13. package/browser/{chunk-A2WSRPZ2.js → chunk-6FF7TRB2.js} +1 -1
  14. package/browser/{chunk-ZRZNFJKA.js → chunk-6HYBRMN3.js} +1 -1
  15. package/browser/{chunk-FF5NT6E3.js → chunk-6IRUWNLE.js} +1 -1
  16. package/browser/{chunk-EPNSLX5U.js → chunk-6LYCY2LH.js} +2 -2
  17. package/browser/{chunk-WJMV2GGG.js → chunk-6OEH5VAG.js} +1 -1
  18. package/browser/{chunk-ABIVPSDV.js → chunk-6PB6HGKN.js} +1 -1
  19. package/browser/{chunk-U3K7ADCL.js → chunk-6PVPE7NU.js} +1 -1
  20. package/browser/{chunk-W56PUFJG.js → chunk-6RFZWUOW.js} +1 -1
  21. package/browser/{chunk-O4C2QJTC.js → chunk-6SZ2LADS.js} +1 -1
  22. package/browser/{chunk-KSMI2LRS.js → chunk-6ZO6ZINP.js} +1 -1
  23. package/browser/{chunk-IJDE2DXI.js → chunk-7EJFKF2Q.js} +1 -1
  24. package/browser/{chunk-2WB7CJT4.js → chunk-7XBE23YM.js} +1 -1
  25. package/browser/{chunk-FPSLDZGQ.js → chunk-A5IIBIZD.js} +1 -1
  26. package/browser/{chunk-LO2BYOFI.js → chunk-BD2XHZ6M.js} +1 -1
  27. package/browser/{chunk-AL67NSTX.js → chunk-BHWEAZLA.js} +2 -2
  28. package/browser/{chunk-CDMARWYK.js → chunk-BRKO5GO2.js} +1 -1
  29. package/browser/{chunk-U2WMHWLA.js → chunk-BTLMUXHT.js} +1 -1
  30. package/browser/{chunk-XWY6CIQE.js → chunk-C5UGXGAM.js} +1 -1
  31. package/browser/{chunk-LUN2DK42.js → chunk-CMKNPJ4U.js} +1 -1
  32. package/browser/{chunk-E7Q73OG5.js → chunk-CSCEL5O5.js} +1 -1
  33. package/browser/{chunk-SBHJLKGF.js → chunk-CSTP4TXD.js} +2 -2
  34. package/browser/{chunk-Q6TCR6KD.js → chunk-CWEUGWP6.js} +1 -1
  35. package/browser/{chunk-FDCT7AZV.js → chunk-CZMEXBOK.js} +1 -1
  36. package/browser/{chunk-LJZNVHLV.js → chunk-D6AMSQAJ.js} +2 -2
  37. package/browser/{chunk-CEBIL4JU.js → chunk-DACACI2R.js} +1 -1
  38. package/browser/{chunk-TS7WQARC.js → chunk-EHKXKFKM.js} +1 -1
  39. package/browser/{chunk-SRMJK4KQ.js → chunk-EMORPE3L.js} +1 -1
  40. package/browser/{chunk-U4V27VHF.js → chunk-ERFZMJEN.js} +1 -1
  41. package/browser/{chunk-IHIMTTEY.js → chunk-FAYPK6OV.js} +1 -1
  42. package/browser/{chunk-AYISZ4UZ.js → chunk-FJ5Z6G2T.js} +1 -1
  43. package/browser/{chunk-TKHTBVUW.js → chunk-FRKZBX2L.js} +1 -1
  44. package/browser/chunk-FSWWJ65K.js +18 -0
  45. package/browser/{chunk-CXP5WRVQ.js → chunk-FZZN7JRG.js} +1 -1
  46. package/browser/chunk-GERX7IDG.js +1 -0
  47. package/browser/{chunk-6URHTLN2.js → chunk-HAAHWPOF.js} +1 -1
  48. package/browser/{chunk-RML7F7C6.js → chunk-HJUOZQTX.js} +2 -2
  49. package/browser/{chunk-X5NV24AP.js → chunk-HLO2AGAR.js} +1 -1
  50. package/browser/{chunk-FMFS2LLS.js → chunk-IL6SZ4BD.js} +1 -1
  51. package/browser/{chunk-VWO2KHCF.js → chunk-IYI3JHG5.js} +1 -1
  52. package/browser/{chunk-H7WLFXOY.js → chunk-J3KGWYUN.js} +1 -1
  53. package/browser/{chunk-QYMOMKB2.js → chunk-JDLBSJT5.js} +1 -1
  54. package/browser/{chunk-XWIHLWXU.js → chunk-JZ2BEY7A.js} +1 -1
  55. package/browser/{chunk-W32TOKKF.js → chunk-K5XXBGRY.js} +1 -1
  56. package/browser/{chunk-3JKW6L66.js → chunk-LACOLO2N.js} +1 -1
  57. package/browser/{chunk-3RONXWLA.js → chunk-LH2E3VZ7.js} +1 -1
  58. package/browser/{chunk-FNK4UD6E.js → chunk-LPNB2327.js} +1 -1
  59. package/browser/{chunk-67NMSW64.js → chunk-LVGPXGGN.js} +1 -1
  60. package/browser/{chunk-LQDQDI4N.js → chunk-M7OFDT6K.js} +1 -1
  61. package/browser/{chunk-AYK7NPJA.js → chunk-ME6GRGNL.js} +1 -1
  62. package/browser/{chunk-A6UKGYA6.js → chunk-MQIE7YZJ.js} +1 -1
  63. package/browser/{chunk-5E6TENSP.js → chunk-N27P5AUM.js} +1 -1
  64. package/browser/{chunk-HTWCBCDU.js → chunk-NIORTGA6.js} +1 -1
  65. package/browser/{chunk-YPU6WRZS.js → chunk-NR3F4GV4.js} +1 -1
  66. package/browser/{chunk-CV2GJTD2.js → chunk-NSDWKGMW.js} +1 -1
  67. package/browser/{chunk-JLRN6GYX.js → chunk-O5KJOGVH.js} +1 -1
  68. package/browser/{chunk-DEZJZE2X.js → chunk-PCCF2QZ5.js} +1 -1
  69. package/browser/{chunk-YQKFBWVT.js → chunk-PGLYV7WP.js} +1 -1
  70. package/browser/{chunk-JQYHZZNB.js → chunk-PMDPMYZV.js} +1 -1
  71. package/browser/{chunk-BNI6H3MB.js → chunk-PWO3ONDD.js} +2 -2
  72. package/browser/{chunk-DPFGETFF.js → chunk-QTFPWTUS.js} +1 -1
  73. package/browser/chunk-QTGAY6DS.js +2 -0
  74. package/browser/{chunk-E2U27ODW.js → chunk-R6TYUUY5.js} +1 -1
  75. package/browser/{chunk-JCUKXR6S.js → chunk-RJJ5KEDE.js} +2 -2
  76. package/browser/{chunk-AHMJVYUG.js → chunk-RULWCLF4.js} +1 -1
  77. package/browser/{chunk-FLOIQAIB.js → chunk-SCKDC3CO.js} +1 -1
  78. package/browser/{chunk-MB6XYKNP.js → chunk-SH7Z66TN.js} +1 -1
  79. package/browser/{chunk-WX2IEEHN.js → chunk-SS3QQOFL.js} +1 -1
  80. package/browser/{chunk-GTS4MVGT.js → chunk-T2HEHT77.js} +2 -2
  81. package/browser/{chunk-P5XU6INT.js → chunk-T77BLOPU.js} +1 -1
  82. package/browser/{chunk-TJFFM4HN.js → chunk-TJ6RINMN.js} +1 -1
  83. package/browser/{chunk-A5F4XNPB.js → chunk-TLTS6R2D.js} +1 -1
  84. package/browser/{chunk-46JRHWG7.js → chunk-UGTPBYJ7.js} +2 -2
  85. package/browser/{chunk-OXCRGZGP.js → chunk-UKGT6Y2D.js} +1 -1
  86. package/browser/{chunk-AOI64GJ6.js → chunk-UWETS4QT.js} +1 -1
  87. package/browser/{chunk-7WXNWXL7.js → chunk-UZ2ED2LT.js} +1 -1
  88. package/browser/{chunk-GVXJZN23.js → chunk-VE75T4NU.js} +1 -1
  89. package/browser/{chunk-3I2BZ5JA.js → chunk-VILFQ4E4.js} +1 -1
  90. package/browser/{chunk-WMGH6KPO.js → chunk-VPJRSOOB.js} +1 -1
  91. package/browser/{chunk-S6MAHCHF.js → chunk-WEROK2NM.js} +1 -1
  92. package/browser/{chunk-QBATIT4O.js → chunk-WH4C7VZ6.js} +1 -1
  93. package/browser/{chunk-NWDIGIYU.js → chunk-WPQEGVA5.js} +1 -1
  94. package/browser/{chunk-R57FGRWP.js → chunk-WVLGQXZH.js} +1 -1
  95. package/browser/{chunk-7AZKQ5T6.js → chunk-XBVTLVVJ.js} +1 -1
  96. package/browser/{chunk-X7WEEXVX.js → chunk-XODE4DNH.js} +1 -1
  97. package/browser/{chunk-KBSSSNKC.js → chunk-XWR575BE.js} +1 -1
  98. package/browser/{chunk-A5W3X6RG.js → chunk-XYN5BNFD.js} +1 -1
  99. package/browser/{chunk-XGC4Y46J.js → chunk-XZVNQRSH.js} +1 -1
  100. package/browser/chunk-Y7HXBEAC.js +1 -0
  101. package/browser/{chunk-KGJRS52S.js → chunk-YEBD62EN.js} +1 -1
  102. package/browser/{chunk-YBJV7L3X.js → chunk-YJCC7NCW.js} +1 -1
  103. package/browser/{chunk-A3R6CFMM.js → chunk-YZ56F4ZA.js} +1 -1
  104. package/browser/{chunk-JVCXRB6X.js → chunk-ZD5CWA2A.js} +1 -1
  105. package/browser/{chunk-AW5LLBG7.js → chunk-ZMZNNXKN.js} +4 -4
  106. package/browser/{chunk-FCISB5B4.js → chunk-ZNZSO6M5.js} +1 -1
  107. package/browser/{chunk-2CSPT6PQ.js → chunk-ZYBPOWDV.js} +1 -1
  108. package/browser/index.html +2 -2
  109. package/browser/{main-Z4V4V2GC.js → main-UC6WOZXX.js} +2 -2
  110. package/package.json +1 -1
  111. package/browser/chunk-2JY3YH47.js +0 -2
  112. package/browser/chunk-EIY6FYXM.js +0 -1
  113. package/browser/chunk-NBEZDEDX.js +0 -18
  114. package/browser/chunk-OG2EXITQ.js +0 -1
@@ -1 +1 @@
1
- import{a as ye}from"./chunk-A5W3X6RG.js";import{a as _e}from"./chunk-DYMB65KX.js";import{a as Oe}from"./chunk-ZRZNFJKA.js";import{a as Me}from"./chunk-LXFJ7QGK.js";import{a as Ce,b as Pe}from"./chunk-5TTXT2K2.js";import"./chunk-YNQPX5G6.js";import{a as fe}from"./chunk-JFJPOKIM.js";import"./chunk-QYSFCWV7.js";import"./chunk-4P6SOZDY.js";import{E as be,b as he,h as ge,o as ve}from"./chunk-MDIMQ3H3.js";import{a as x,c as f}from"./chunk-X5NV24AP.js";import{a as Se}from"./chunk-P5XU6INT.js";import"./chunk-MWDJTJ3O.js";import{b as I}from"./chunk-7CQSSHSC.js";import{a as M}from"./chunk-3DEA4WWC.js";import{a as de}from"./chunk-UKMVGESE.js";import{n as me}from"./chunk-TKVDP62Z.js";import{Ad as se,Dc as ie,Ec as ne,F as E,Fb as j,Gb as F,Hb as V,Ib as h,Jb as o,Kb as s,Kc as re,Lb as u,Mc as oe,Rd as le,Td as ce,Ua as W,Ud as b,Vd as pe,Wd as ue,Xb as C,Xd as G,Za as p,Zb as K,aa as Y,d as q,ea as D,eb as v,ib as Q,ic as X,jb as T,jc as ee,lc as $,mc as m,na as d,nc as B,nd as ae,oa as O,oc as z,qa as _,ra as c,xb as Z,yc as te}from"./chunk-GJDGQISV.js";import"./chunk-WFMAM73Y.js";import{a as J}from"./chunk-SNAKHGZS.js";var r=class e{constructor(n,t){this.authService=n;this.router=t}canLoad(n,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(n){let t="/menu";n.forEach(a=>t+=`/${a.path}`);let i=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[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(n){this.toastrService=n;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(n){console.error(n)}}showAlert(n,t,i,l){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:n,icon:l});g.onerror=(N=>{this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})}setBody(n,t){return this.hasUrl(t)&&(n=`<a href="${t}" target="_blank" class="ps-0">${n}</a>`),n}hasUrl(n){return!!(n&&n.length!==0)}static \u0275fac=function(t){return new(t||e)(_(me))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Te=[{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:"Settings",U:"/menu/Settings",I:"fas fa-sliders"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=c(I);authService=c(f);menu=Te;filteredMenu=[];initFilteredMenu(){let n=this.menu.map(i=>J({},i)),t=n.findIndex(i=>i.T==="Reports");if(t!==-1){let i=!!this.role.report?.View,l=!!this.role.report?.Advanced,a=!!this.role.report?.Periodic;i?n[t].U="/menu/Reports":l?n[t].U="/menu/Reports/Sales_Report/Standard/Top_Customers":a?n[t].U="/menu/Reports/Sales_Report/Standard/Daily":n[t].U="/menu/Reports"}this.filteredMenu=n.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||!!this.role.report?.Advanced||!!this.role.report?.Periodic: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"||i.T==="Settings"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(n){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 xe=[{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 U=class e{role=c(I);authService=c(f);filteredMenu=[];initFilteredMenu(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=xe.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&&n!=2&&n!=3:t.T=="My Sales"?n!=2&&n!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ne=(e,n)=>({"full-container":e,"subscription-bar-visible":n}),Ee=e=>[e];function De(e,n){if(e&1&&(o(0,"a",11),u(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=n.$implicit;h("routerLink",t==null?null:t.U),p(),$((t==null?null:t.I)+" me-2"),p(2),B(t==null?null:t.T)}}function je(e,n){if(e&1&&(o(0,"li",33,0)(2,"a",36),u(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=n.$implicit,i=K();h("routerLinkActiveOptions",i.isActiveMatchOptions),Z("data-cy",t==null?null:t.T),p(2),h("matTooltip",i.toggleSideMenu?t==null?null:t.T:"")("routerLink",ie(7,Ee,t==null?null:t.U)),p(),$(t==null?null:t.I),p(2),B(t==null?null:t.T)}}var P=class e{constructor(n,t,i,l,a,g,N,H){this.toggleSidebar=n;this.signalRClientService=t;this.notificationAlertService=i;this.router=l;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(we=>this.isNavOpen=we),this.destroy$=new q,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=de.version;currentSubStatus;subsStatusEnum=x;isFullContainer=!1;isSettingsPage=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(n=>n instanceof le),Y(null),D(this.destroy$)).subscribe(n=>{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.router.url.includes("/menu/Settings"))&&(this.isFullContainer=!0),this.router.url.includes("Settings")&&(this.isSettingsPage=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let n=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(n)&&M.isGuid(n)?this.signalRClientService.SubscribeGroup(n):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let i=JSON.parse(t),l="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(i.Icon)&&(l=i.Icon),this.notificationAlertService.showAlert(i.Body,i.Header,i.URL,l)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(n){return M.IsNotEmpty(n)}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(Me),v(fe),v(w),v(b),v(f),v(Se),v(k),v(U))};static \u0275cmp=Q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:19,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,i){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return i.toggleMenu()}),u(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return i.onShowDropdown()}),m(7),re(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),u(12,"div",10),F(13,De,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),u(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 i.chatToggleChange()}),s(),u(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return i.logout()}),u(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),u(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),u(32,"i",23),o(33,"span"),m(34,"What's New"),u(35,"i",24),s()(),o(36,"a",25),u(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),u(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),u(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,je,6,9,"li",33,j),s()()(),o(52,"div",34),u(53,"router-outlet"),s()()),t&2&&(ee("nav-open",i.isNavOpen),p(),h("ngClass",i.toggleSideMenu?"collapses":""),p(2),h("ngClass",i.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),p(3),h("matTooltip",i.accountInfo==null?null:i.accountInfo.BrandName),p(),z(" ",oe(8,13,i.accountInfo==null?null:i.accountInfo.BrandName,12)," "),p(4),z("",i.accountInfo==null?null:i.accountInfo.UserName," "),p(2),V(i.topMenu),p(9),h("ngModel",!i.isHideIntercomLauncher),p(9),h("href",te("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",i.appVersion),W),p(19),V(i.leftSidebarMenu),p(2),X("background-color",(i.isSettingsPage,"")),h("ngClass",ne(16,Ne,i.isFullContainer,i.isNotEmpty(i.currentSubStatus)&&i.currentSubStatus!==i.subsStatusEnum.PAID)))},dependencies:[Ce,ce,pe,ue,he,ge,ve,ae,_e],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 Fe(e){let n=c(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let i=n.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}var y=(e,n)=>{let t=c(f),i=t.isTokenExpired(),l=c(b);return i?(t.returnUrl=Fe(n),l.navigate(["/"]),!1):e.path=="Dashboard"?Ve():!0};function Ve(){let e=c(b),n=c(f),t=!1,i=n.getRedirectUrl();return t=i.includes("Dashboard"),t==!1&&e.navigate([i]),t}var A=class e{paymentStorageService=c(ye);canActivate(n,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 R=class e{reportService=c(Oe);canActivate(n,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 $e=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-OG2EXITQ.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-AL67NSTX.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[R]},{path:"Sell",loadChildren:()=>import("./chunk-JCUKXR6S.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-6WL7VJTP.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-RML7F7C6.js").then(e=>e.BuyV2Component),canMatch:[y]},{path:"Sell/V2",loadComponent:()=>import("./chunk-WMGH6KPO.js").then(e=>e.SellV2Component),canMatch:[y]},{path:"Dashboard",loadComponent:()=>import("./chunk-FCISB5B4.js").then(e=>e.DashboardV2Component),canMatch:[y],data:{preload:!0}},{path:"Products",loadChildren:()=>import("./chunk-AW5LLBG7.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-TS7WQARC.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-SBHJLKGF.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-BNI6H3MB.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-GTS4MVGT.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-EPNSLX5U.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Settings",loadChildren:()=>import("./chunk-JUW7KWJN.js").then(e=>e.routes),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-KBSSSNKC.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-WJMV2GGG.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-LJZNVHLV.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-NBEZDEDX.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-WX2IEEHN.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-S6MAHCHF.js").then(e=>e.EstimateV2Component),canMatch:[y]},{path:"Adjustment",loadChildren:()=>import("./chunk-KQ4HO57T.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-OXCRGZGP.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[A]},{path:"Promotion",loadChildren:()=>import("./chunk-AOI64GJ6.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-MB6XYKNP.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-A5F4XNPB.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-46JRHWG7.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-5E6TENSP.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-E7Q73OG5.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],L=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=T({type:e});static \u0275inj=O({imports:[G.forChild($e),G]})};var Ie=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=T({type:e,bootstrap:[P]});static \u0275inj=O({imports:[Pe,L,be,se]})};export{Ie as MenuMasterModule};
1
+ import{a as ye}from"./chunk-XYN5BNFD.js";import{a as _e}from"./chunk-DYMB65KX.js";import{a as Oe}from"./chunk-6HYBRMN3.js";import{a as Me}from"./chunk-LXFJ7QGK.js";import{a as Ce,b as Pe}from"./chunk-5TTXT2K2.js";import"./chunk-YNQPX5G6.js";import{a as fe}from"./chunk-JFJPOKIM.js";import"./chunk-QYSFCWV7.js";import"./chunk-4P6SOZDY.js";import{E as be,b as he,h as ge,o as ve}from"./chunk-MDIMQ3H3.js";import{a as x,c as f}from"./chunk-HLO2AGAR.js";import{a as Se}from"./chunk-T77BLOPU.js";import"./chunk-MWDJTJ3O.js";import{b as I}from"./chunk-7CQSSHSC.js";import{a as M}from"./chunk-3DEA4WWC.js";import{a as de}from"./chunk-2SCMKR5I.js";import{n as me}from"./chunk-TKVDP62Z.js";import{Ad as se,Dc as ie,Ec as ne,F as E,Fb as j,Gb as F,Hb as V,Ib as h,Jb as o,Kb as s,Kc as re,Lb as u,Mc as oe,Rd as le,Td as ce,Ua as W,Ud as b,Vd as pe,Wd as ue,Xb as C,Xd as G,Za as p,Zb as K,aa as Y,d as q,ea as D,eb as v,ib as Q,ic as X,jb as T,jc as ee,lc as $,mc as m,na as d,nc as B,nd as ae,oa as O,oc as z,qa as _,ra as c,xb as Z,yc as te}from"./chunk-GJDGQISV.js";import"./chunk-WFMAM73Y.js";import{a as J}from"./chunk-SNAKHGZS.js";var r=class e{constructor(n,t){this.authService=n;this.router=t}canLoad(n,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(n){let t="/menu";n.forEach(a=>t+=`/${a.path}`);let i=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[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(n){this.toastrService=n;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(n){console.error(n)}}showAlert(n,t,i,l){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:n,icon:l});g.onerror=(N=>{this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})}setBody(n,t){return this.hasUrl(t)&&(n=`<a href="${t}" target="_blank" class="ps-0">${n}</a>`),n}hasUrl(n){return!!(n&&n.length!==0)}static \u0275fac=function(t){return new(t||e)(_(me))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Te=[{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:"Settings",U:"/menu/Settings",I:"fas fa-sliders"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=c(I);authService=c(f);menu=Te;filteredMenu=[];initFilteredMenu(){let n=this.menu.map(i=>J({},i)),t=n.findIndex(i=>i.T==="Reports");if(t!==-1){let i=!!this.role.report?.View,l=!!this.role.report?.Advanced,a=!!this.role.report?.Periodic;i?n[t].U="/menu/Reports":l?n[t].U="/menu/Reports/Sales_Report/Standard/Top_Customers":a?n[t].U="/menu/Reports/Sales_Report/Standard/Daily":n[t].U="/menu/Reports"}this.filteredMenu=n.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||!!this.role.report?.Advanced||!!this.role.report?.Periodic: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"||i.T==="Settings"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(n){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 xe=[{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 U=class e{role=c(I);authService=c(f);filteredMenu=[];initFilteredMenu(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=xe.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&&n!=2&&n!=3:t.T=="My Sales"?n!=2&&n!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ne=(e,n)=>({"full-container":e,"subscription-bar-visible":n}),Ee=e=>[e];function De(e,n){if(e&1&&(o(0,"a",11),u(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=n.$implicit;h("routerLink",t==null?null:t.U),p(),$((t==null?null:t.I)+" me-2"),p(2),B(t==null?null:t.T)}}function je(e,n){if(e&1&&(o(0,"li",33,0)(2,"a",36),u(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=n.$implicit,i=K();h("routerLinkActiveOptions",i.isActiveMatchOptions),Z("data-cy",t==null?null:t.T),p(2),h("matTooltip",i.toggleSideMenu?t==null?null:t.T:"")("routerLink",ie(7,Ee,t==null?null:t.U)),p(),$(t==null?null:t.I),p(2),B(t==null?null:t.T)}}var P=class e{constructor(n,t,i,l,a,g,N,H){this.toggleSidebar=n;this.signalRClientService=t;this.notificationAlertService=i;this.router=l;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(we=>this.isNavOpen=we),this.destroy$=new q,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=de.version;currentSubStatus;subsStatusEnum=x;isFullContainer=!1;isSettingsPage=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(n=>n instanceof le),Y(null),D(this.destroy$)).subscribe(n=>{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.router.url.includes("/menu/Settings"))&&(this.isFullContainer=!0),this.router.url.includes("Settings")&&(this.isSettingsPage=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let n=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(n)&&M.isGuid(n)?this.signalRClientService.SubscribeGroup(n):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let i=JSON.parse(t),l="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(i.Icon)&&(l=i.Icon),this.notificationAlertService.showAlert(i.Body,i.Header,i.URL,l)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(n){return M.IsNotEmpty(n)}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(Me),v(fe),v(w),v(b),v(f),v(Se),v(k),v(U))};static \u0275cmp=Q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:19,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,i){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return i.toggleMenu()}),u(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return i.onShowDropdown()}),m(7),re(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),u(12,"div",10),F(13,De,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),u(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 i.chatToggleChange()}),s(),u(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return i.logout()}),u(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),u(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),u(32,"i",23),o(33,"span"),m(34,"What's New"),u(35,"i",24),s()(),o(36,"a",25),u(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),u(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),u(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,je,6,9,"li",33,j),s()()(),o(52,"div",34),u(53,"router-outlet"),s()()),t&2&&(ee("nav-open",i.isNavOpen),p(),h("ngClass",i.toggleSideMenu?"collapses":""),p(2),h("ngClass",i.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),p(3),h("matTooltip",i.accountInfo==null?null:i.accountInfo.BrandName),p(),z(" ",oe(8,13,i.accountInfo==null?null:i.accountInfo.BrandName,12)," "),p(4),z("",i.accountInfo==null?null:i.accountInfo.UserName," "),p(2),V(i.topMenu),p(9),h("ngModel",!i.isHideIntercomLauncher),p(9),h("href",te("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",i.appVersion),W),p(19),V(i.leftSidebarMenu),p(2),X("background-color",(i.isSettingsPage,"")),h("ngClass",ne(16,Ne,i.isFullContainer,i.isNotEmpty(i.currentSubStatus)&&i.currentSubStatus!==i.subsStatusEnum.PAID)))},dependencies:[Ce,ce,pe,ue,he,ge,ve,ae,_e],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 Fe(e){let n=c(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let i=n.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}var y=(e,n)=>{let t=c(f),i=t.isTokenExpired(),l=c(b);return i?(t.returnUrl=Fe(n),l.navigate(["/"]),!1):e.path=="Dashboard"?Ve():!0};function Ve(){let e=c(b),n=c(f),t=!1,i=n.getRedirectUrl();return t=i.includes("Dashboard"),t==!1&&e.navigate([i]),t}var A=class e{paymentStorageService=c(ye);canActivate(n,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 R=class e{reportService=c(Oe);canActivate(n,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 $e=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-GERX7IDG.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-BHWEAZLA.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[R]},{path:"Sell",loadChildren:()=>import("./chunk-RJJ5KEDE.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-6WL7VJTP.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-HJUOZQTX.js").then(e=>e.BuyV2Component),canMatch:[y]},{path:"Sell/V2",loadComponent:()=>import("./chunk-VPJRSOOB.js").then(e=>e.SellV2Component),canMatch:[y]},{path:"Dashboard",loadComponent:()=>import("./chunk-ZNZSO6M5.js").then(e=>e.DashboardV2Component),canMatch:[y],data:{preload:!0}},{path:"Products",loadChildren:()=>import("./chunk-ZMZNNXKN.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-EHKXKFKM.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-CSTP4TXD.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-PWO3ONDD.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-T2HEHT77.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-6LYCY2LH.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Settings",loadChildren:()=>import("./chunk-JUW7KWJN.js").then(e=>e.routes),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-XWR575BE.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-6OEH5VAG.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-D6AMSQAJ.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-FSWWJ65K.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-SS3QQOFL.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-WEROK2NM.js").then(e=>e.EstimateV2Component),canMatch:[y]},{path:"Adjustment",loadChildren:()=>import("./chunk-57VAH3DF.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-UKGT6Y2D.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[A]},{path:"Promotion",loadChildren:()=>import("./chunk-UWETS4QT.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-SH7Z66TN.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-TLTS6R2D.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-UGTPBYJ7.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-N27P5AUM.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-CSCEL5O5.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],L=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=T({type:e});static \u0275inj=O({imports:[G.forChild($e),G]})};var Ie=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=T({type:e,bootstrap:[P]});static \u0275inj=O({imports:[Pe,L,be,se]})};export{Ie as MenuMasterModule};
@@ -1 +1 @@
1
- import{a as st,b as ut}from"./chunk-AYK7NPJA.js";import{a as pt}from"./chunk-OTT4TTOC.js";import"./chunk-7AZKQ5T6.js";import{a as _t}from"./chunk-A2WSRPZ2.js";import{a as J}from"./chunk-VWO2KHCF.js";import"./chunk-YTZPBL5O.js";import"./chunk-HT6DSP63.js";import{d as dt}from"./chunk-OQMWV4LA.js";import{a as mt}from"./chunk-4VRCKWUY.js";import"./chunk-R3DFB5VD.js";import"./chunk-2D4XBF6C.js";import"./chunk-J63OB27M.js";import"./chunk-MPN57TB5.js";import"./chunk-KF3MHC66.js";import"./chunk-KBZZ7PX4.js";import"./chunk-ETGLCIRD.js";import{b as ct}from"./chunk-IGJSYOLU.js";import{e as lt}from"./chunk-TJFFM4HN.js";import"./chunk-IJDE2DXI.js";import"./chunk-WJGP2CLN.js";import"./chunk-2ZXCNSZZ.js";import{d as rt}from"./chunk-LMI6FIPG.js";import{a as $}from"./chunk-4F45HHZT.js";import"./chunk-3S3T7QLT.js";import{b as Y}from"./chunk-HP5IPESO.js";import"./chunk-6N2DU4HB.js";import"./chunk-JD7UP3FE.js";import"./chunk-JLQUTBFH.js";import"./chunk-YHXZO4DY.js";import"./chunk-JEKS3WOF.js";import"./chunk-6URHTLN2.js";import"./chunk-ZRZNFJKA.js";import"./chunk-XKQYXDV6.js";import"./chunk-4KO3X4S2.js";import"./chunk-BACG4SJJ.js";import"./chunk-CQTLBAQD.js";import"./chunk-OFSPPASQ.js";import"./chunk-JFIKQKZJ.js";import"./chunk-N4NZWFKH.js";import"./chunk-ABIVPSDV.js";import"./chunk-XULGDGRO.js";import"./chunk-43NB6BM4.js";import"./chunk-OVEGWW7W.js";import"./chunk-LL4377Z2.js";import"./chunk-GAOYV53E.js";import"./chunk-W6JPMHYE.js";import"./chunk-BXA2JYKG.js";import{a as et}from"./chunk-W6N427P2.js";import{f as ot,g as at}from"./chunk-QBATIT4O.js";import"./chunk-7WXNWXL7.js";import"./chunk-HNHLGX7F.js";import{a as tt}from"./chunk-EIY6FYXM.js";import"./chunk-FVUFPTGH.js";import"./chunk-LXFJ7QGK.js";import"./chunk-YBJV7L3X.js";import"./chunk-YPU6WRZS.js";import"./chunk-G7E24J2R.js";import"./chunk-VYA2NFJ5.js";import"./chunk-SH55PTEY.js";import"./chunk-VPS35GPI.js";import"./chunk-UGBMCXS6.js";import{a as U,b as Z}from"./chunk-5TTXT2K2.js";import"./chunk-YNQPX5G6.js";import{N as nt,g as it}from"./chunk-3NJAM5KX.js";import"./chunk-JFJPOKIM.js";import"./chunk-QYSFCWV7.js";import"./chunk-IEJVBN5K.js";import"./chunk-XWIHLWXU.js";import{c as X}from"./chunk-BQPO535K.js";import"./chunk-HLLBCLO6.js";import"./chunk-4P6SOZDY.js";import"./chunk-XN7T54IM.js";import"./chunk-RULWGB4E.js";import"./chunk-2HIDUY57.js";import"./chunk-U5Y75IZ5.js";import"./chunk-HY3IUHOC.js";import"./chunk-4AEX2WLA.js";import"./chunk-2MELUOYA.js";import"./chunk-WOPE6PPO.js";import{E as z}from"./chunk-MDIMQ3H3.js";import"./chunk-X5NV24AP.js";import"./chunk-P5XU6INT.js";import"./chunk-MWDJTJ3O.js";import{b as Q}from"./chunk-7CQSSHSC.js";import"./chunk-3DEA4WWC.js";import"./chunk-UKMVGESE.js";import{q as K}from"./chunk-TKVDP62Z.js";import{Ad as R,Bb as d,Cc as F,Db as p,Dc as E,Eb as W,Gb as N,Hb as j,Ib as f,Jb as a,Kb as o,Kc as _,Lb as D,Lc as C,Mc as v,Od as G,Qc as q,Ub as I,Vd as H,Xb as V,Za as i,Zb as c,eb as S,ib as M,mc as r,nb as L,nc as P,ob as O,oc as u,rc as T,sc as g,tc as h,va as x,wa as y,xb as k,xd as A}from"./chunk-GJDGQISV.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ct=()=>["View inventory traffic using each transaction\u2019s created date. Transfer Orders always use actual dispatch and receive dates","View inventory traffic using each transaction\u2019s invoice date (including backdated). Transfer Orders always use actual dispatch and receive dates"],xt=()=>["/menu/Outlets/Master/Outlets/Info"],b=e=>({ID:e}),yt=()=>["/menu/Products/Catalog/Variants/Info"],vt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(e,l){if(e&1){let t=I();a(0,"button",13),V("click",function(){x(t);let n=c();return y(n.openExportModal())}),D(1,"i",14),r(2," Export "),o()}}function gt(e,l){if(e&1){let t=I();a(0,"div",15)(1,"h6"),r(2,"Outlet Group"),o(),a(3,"POS-outlet-group-tree-select",16),h("selectedOutletGroupIDChange",function(n){x(t);let s=c();return g(s.pageData.Filter.OutletGroupID,n)||(s.pageData.Filter.OutletGroupID=n),y(n)}),o(),a(4,"h6"),r(5,"Category"),o(),a(6,"POS-product-category-select",17),h("selectedCategoryIDChange",function(n){x(t);let s=c();return g(s.pageData.Filter.CategoryID,n)||(s.pageData.Filter.CategoryID=n),y(n)}),o(),a(7,"h6"),r(8,"Search Type"),o(),a(9,"radio-options",18),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.ProductVariantSearchMode,n)||(s.pageData.Filter.ProductVariantSearchMode=n),y(n)}),V("modelChange",function(n){x(t);let s=c();return y(s.onChangeSearchType(n))}),o(),a(10,"autocompleteV3",19),h("modelNameChange",function(n){x(t);let s=c();return g(s.productVariantModel,n)||(s.productVariantModel=n),y(n)}),o(),a(11,"h6"),r(12,"From - To"),o(),a(13,"div")(14,"datepicker",20),h("dateChange",function(n){x(t);let s=c();return g(s.pageData.Filter.From,n)||(s.pageData.Filter.From=n),y(n)}),o()(),a(15,"div",21)(16,"datepicker",22),h("dateChange",function(n){x(t);let s=c();return g(s.pageData.Filter.To,n)||(s.pageData.Filter.To=n),y(n)}),o()(),a(17,"h6"),r(18,"Inventory Type"),o(),a(19,"radio-options",23),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.InventoryType,n)||(s.pageData.Filter.InventoryType=n),y(n)}),o(),a(20,"h6"),r(21,"Movement Type"),o(),a(22,"radio-options",24),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.MovementType,n)||(s.pageData.Filter.MovementType=n),y(n)}),o(),a(23,"h6"),r(24,"Hide Zero Traffic"),o(),a(25,"radio-options",25),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.RowOption,n)||(s.pageData.Filter.RowOption=n),y(n)}),o()()}if(e&2){let t=c();i(3),f("showClear",!0),T("selectedOutletGroupID",t.pageData.Filter.OutletGroupID),i(3),T("selectedCategoryID",t.pageData.Filter.CategoryID),f("showClear",!0),i(3),T("model",t.pageData.Filter.ProductVariantSearchMode),f("options",t.pageData.Options.ProductVariantSearchModes),i(),T("modelName",t.productVariantModel),f("placeholder",t.pageData.Filter.ProductVariantSearchMode===0?"Search Product":"Search Variant")("isShowEmptyMessage",!0)("emptyMessage",t.pageData.Filter.ProductVariantSearchMode===0?"No Product found":"No Variant found")("tooltipMessage",t.pageData.Filter.ProductVariantSearchMode===0?"Search by product name":"Search by variant name")("label",t.pageData.Filter.ProductVariantSearchMode===0?"Product to Analyze":"Variant to Analyze")("listDataEndpoint",t.pageData.Filter.ProductVariantSearchMode===0?"/api/ac/GetProductSuggestionByCodeNName":"/API/AC/GetVariantSuggestionByCodeNName")("valueField",t.pageData.Filter.ProductVariantSearchMode===0?"Name":"Value")("showThumbnail",!0)("thumbnailKey","ImageURL"),i(4),f("isFloatingLabel",!1),T("date",t.pageData.Filter.From),f("hidelClearBtn",!0),i(2),f("isFloatingLabel",!1),T("date",t.pageData.Filter.To),f("hidelClearBtn",!0),i(3),T("model",t.pageData.Filter.InventoryType),f("options",t.pageData.Options.InventoryTypes),i(3),T("model",t.pageData.Filter.MovementType),f("options",t.pageData.Options.MovementTypes)("title",F(29,Ct)),i(3),T("model",t.pageData.Filter.RowOption),f("options",t.pageData.Options.RowOptions)}}function ht(e,l){e&1&&(a(0,"th",8),r(1,"Product"),o())}function St(e,l){e&1&&(a(0,"th",9)(1,"span",26),r(2," P.Code "),o()())}function It(e,l){e&1&&(a(0,"th",10),r(1,"Code"),o())}function Vt(e,l){e&1&&(a(0,"th",11)(1,"span",27),r(2," Start "),o()())}function Ft(e,l){e&1&&(a(0,"th",11)(1,"span",28),r(2," Bought "),o()())}function wt(e,l){e&1&&(a(0,"th",11)(1,"span",29),r(2," Sold "),o()())}function Dt(e,l){e&1&&(a(0,"th",11)(1,"span",30),r(2," T.In "),o()())}function Et(e,l){e&1&&(a(0,"th",11)(1,"span",31),r(2," T.Out "),o()())}function Pt(e,l){e&1&&(a(0,"th",11)(1,"span",32),r(2," Adjust "),o()())}function bt(e,l){e&1&&(a(0,"th",11)(1,"span",33),r(2," End "),o()())}function Bt(e,l){e&1&&(a(0,"th",11)(1,"span",34),r(2," Now "),o()())}function Mt(e,l){e&1&&(a(0,"th",11)(1,"span",35),r(2," % "),o()())}function Lt(e,l){if(e&1&&(a(0,"td")(1,"a",36),r(2),o()()),e&2){let t=c().$implicit;i(),f("routerLink",F(3,vt))("queryParams",E(4,b,t.ProductID)),i(),u(" ",t.ProductName," ")}}function Ot(e,l){if(e&1&&(a(0,"td"),r(1),o()),e&2){let t=c().$implicit;i(),u(" ",t.ProductCode," ")}}function kt(e,l){if(e&1&&(a(0,"td",37),r(1),o()),e&2){let t=c().$implicit;i(),u(" ",t.VariantCode," ")}}function Wt(e,l){if(e&1&&(a(0,"td",38),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;f("colsFontColor",t.Start),i(),u(" ",C(2,2,t.Start)," ")}}function Nt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.Bought)," ")}}function jt(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.Sold)," ")}}function qt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.TransferredIn)," ")}}function At(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.TransferredOut)," ")}}function Rt(e,l){if(e&1&&(a(0,"td",38),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;f("colsFontColor",t.Adjustment),i(),u(" ",t.Adjustment<0?t.Adjustment*-1:C(2,2,t.Adjustment)," ")}}function Gt(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;f("colsFontColor",t.End),i(),u(" ",t.End," ")}}function Ht(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;f("colsFontColor",t.Now),i(),u(" ",t.Now," ")}}function zt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.SellTransferInRate)," ")}}function Kt(e,l){if(e&1&&(a(0,"tr")(1,"td")(2,"a",36),r(3),o()(),d(4,Lt,3,6,"td"),d(5,Ot,2,1,"td"),a(6,"td")(7,"a",36),r(8),o()(),d(9,kt,2,1,"td",37),d(10,Wt,3,4,"td",38),d(11,Nt,3,3,"td",37),d(12,jt,3,3,"td",39),d(13,qt,3,3,"td",37),d(14,At,3,3,"td",39),d(15,Rt,3,4,"td",38),d(16,Gt,2,2,"td",38),d(17,Ht,2,2,"td",38),d(18,zt,3,3,"td",37),o()),e&2){let t=l.$implicit,m=c(2);i(2),f("routerLink",F(18,xt))("queryParams",E(19,b,t.OutletID)),i(),u(" ",t.OutletName," "),i(),p(m.column.productname.selected?4:-1),i(),p(m.column.productcode.selected?5:-1),i(2),f("routerLink",F(21,yt))("queryParams",E(22,b,t.VariantID)),i(),P(t.VariantName),i(),p(m.column.code.selected?9:-1),i(),p(m.column.start.selected?10:-1),i(),p(m.column.bought.selected?11:-1),i(),p(m.column.sold.selected?12:-1),i(),p(m.column.transferredIn.selected?13:-1),i(),p(m.column.transferredOut.selected?14:-1),i(),p(m.column.adjust.selected?15:-1),i(),p(m.column.end.selected?16:-1),i(),p(m.column.now.selected?17:-1),i(),p(m.column.percent.selected?18:-1)}}function Qt(e,l){if(e&1&&N(0,Kt,19,24,"tr",null,W),e&2){let t=c();j(t.infiniteList)}}function Ut(e,l){e&1&&(a(0,"tr")(1,"td",40),D(2,"app-empty-state"),o()())}function Zt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Start"))," ")}}function Jt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Bought"))," ")}}function Xt(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Sold"))," ")}}function Yt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"TransferredIn"))," ")}}function $t(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"TransferredOut"))," ")}}function te(e,l){if(e&1&&(a(0,"td",38),_(1,"sum"),_(2,"quantityFraction"),r(3),_(4,"sum"),_(5,"quantityFraction"),o()),e&2){let t=c(2);f("colsFontColor",C(2,5,v(1,2,t.infiniteList,"Adjustment"))),i(3),u(" ",C(5,10,v(4,7,t.infiniteList,"Adjustment"))," ")}}function ee(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"End"))," ")}}function ie(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Now"))," ")}}function ne(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"sum"),_(4,"sum"),_(5,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",v(2,1,t.infiniteList,"TransferredIn")?C(5,10,v(3,4,t.infiniteList,"Sold")/v(4,7,t.infiniteList,"TransferredIn")*100):0," ")}}function oe(e,l){if(e&1&&(a(0,"tfoot")(1,"tr",41)(2,"th",42),r(3," Total: "),o(),d(4,Zt,4,6,"td",37),d(5,Jt,4,6,"td",37),d(6,Xt,4,6,"td",39),d(7,Yt,4,6,"td",37),d(8,$t,4,6,"td",39),d(9,te,6,12,"td",38),d(10,ee,4,6,"td",37),d(11,ie,4,6,"td",37),d(12,ne,6,12,"td",37),o()()),e&2){let t=c();i(2),k("colspan",2+(t.column.productname.selected?1:0)+(t.column.productcode.selected?1:0)+(t.column.code.selected?1:0)),i(2),p(t.column.start.selected?4:-1),i(),p(t.column.bought.selected?5:-1),i(),p(t.column.sold.selected?6:-1),i(),p(t.column.transferredIn.selected?7:-1),i(),p(t.column.transferredOut.selected?8:-1),i(),p(t.column.adjust.selected?9:-1),i(),p(t.column.end.selected?10:-1),i(),p(t.column.now.selected?11:-1),i(),p(t.column.percent.selected?12:-1)}}function ae(e,l){if(e&1){let t=I();a(0,"span",48),V("click",function(){x(t);let n=c(2);return y(n.StoreRowsCountAPIResult("inventory/GetCountVariantInventoryTraffic"))}),a(1,"i",49),r(2,"?"),o()()}}function re(e,l){if(e&1&&(a(0,"span"),r(1),_(2,"number"),o()),e&2){let t=c(2);i(),P(C(2,1,t.listTotal))}}function le(e,l){if(e&1){let t=I();a(0,"div",12)(1,"div",43)(2,"div",44),r(3),_(4,"number"),d(5,ae,3,0,"span",45),d(6,re,3,3,"span"),r(7),o()(),a(8,"a",46),V("click",function(){x(t);let n=c();return y(n.NextPage(!0))}),D(9,"i",47),r(10," Next"),o()()}if(e&2){let t=c();i(3),u(" Showing 1 - ",C(4,4,t.infiniteList.length)," of "),i(2),p(t.pageData.HideStoreApiCount?-1:5),i(),p(t.pageData.HideStoreApiCount?6:-1),i(),u(" records ~ ",t.pageData.Filter.PageNumber," Page ")}}var ft=class e extends J{constructor(t,m,n,s,B,w,ce){super(t,m,"inventory/GetVariantInventoryTraffic","inventoryloader/GetVariantInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=n;this.pageTitle=s;this.converter=B;this.roleService=w;this.matDialog=ce;this.pageTitle.setTitle(this.menuData.T)}column={productname:{selected:!1,name:"Product"},productcode:{selected:!1,name:"Product Code"},code:{selected:!0,name:"Variant Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!1,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!0,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Y,{data:{title:"Variant Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportVariantInventoryTraffic",Value:"Default",FileName:"Variant Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}onChangeSearchType(t){this.pageData.Filter.ListProductID=[],this.pageData.Filter.ListVariantID=[]}get productVariantModel(){return this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID:this.pageData.Filter.ListVariantID}set productVariantModel(t){this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID=t:this.pageData.Filter.ListVariantID=t}static \u0275fac=function(m){return new(m||e)(S(tt),S(K),S(et),S(G),S(pt),S(Q),S(X))};static \u0275cmp=M({type:e,selectors:[["POS-variant-inventory-traffic"]],features:[L],decls:33,vars:21,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","180px"],[2,"width","150px"],[2,"width","80px"],[1,"text-end",2,"width","130px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","SearchType",3,"modelChange","model","options"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField","showThumbnail","thumbnailKey"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","InventoryType",3,"modelChange","model","options"],["name","MovementType",3,"modelChange","model","options","title"],["name","RowOption",3,"modelChange","model","options"],["matTooltip","Product Code","matTooltipPosition","above"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-danger"],["colspan","13"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],[2,"cursor","pointer"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(m,n){if(m&1){let s=I();a(0,"mainpanel-cmp",1),V("onSubmit",function(){return n.searchFromPageOne()}),h("filterChange",function(w){return x(s),g(n.pageData.Filter,w)||(n.pageData.Filter=w),y(w)}),a(1,"actions"),d(2,Tt,3,0,"button",2),o(),a(3,"filters"),O(4,gt,26,30,"ng-template",null,0,q),o(),a(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),o(),d(14,ht,2,0,"th",8),d(15,St,3,0,"th",9),a(16,"th"),r(17,"Variant"),o(),d(18,It,2,0,"th",10),d(19,Vt,3,0,"th",11),d(20,Ft,3,0,"th",11),d(21,wt,3,0,"th",11),d(22,Dt,3,0,"th",11),d(23,Et,3,0,"th",11),d(24,Pt,3,0,"th",11),d(25,bt,3,0,"th",11),d(26,Bt,3,0,"th",11),d(27,Mt,3,0,"th",11),o()(),a(28,"tbody"),d(29,Qt,2,0)(30,Ut,3,0,"tr"),o(),d(31,oe,13,10,"tfoot"),o()(),d(32,le,11,6,"div",12),o()()()}m&2&&(f("pageData",n.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),T("filter",n.pageData.Filter),f("column",n.column),i(2),p(n.roleService.global.Export?2:-1),i(12),p(n.column.productname.selected?14:-1),i(),p(n.column.productcode.selected?15:-1),i(3),p(n.column.code.selected?18:-1),i(),p(n.column.start.selected?19:-1),i(),p(n.column.bought.selected?20:-1),i(),p(n.column.sold.selected?21:-1),i(),p(n.column.transferredIn.selected?22:-1),i(),p(n.column.transferredOut.selected?23:-1),i(),p(n.column.adjust.selected?24:-1),i(),p(n.column.end.selected?25:-1),i(),p(n.column.now.selected?26:-1),i(),p(n.column.percent.selected?27:-1),i(2),p(n.infiniteList&&n.infiniteList.length>0?29:30),i(2),p(n.infiniteList&&n.infiniteList.length>0?31:-1),i(),p(n.infiniteList&&n.infiniteList.length>0?32:-1))},dependencies:[at,ot,R,z,_t,lt,st,nt,H,dt,rt,mt,ct,ut,Z,U,A,it,$],encapsulation:2})};export{ft as Variant_Inventory_TrafficComponent};
1
+ import{a as st,b as ut}from"./chunk-ME6GRGNL.js";import{a as pt}from"./chunk-OTT4TTOC.js";import"./chunk-XBVTLVVJ.js";import{a as _t}from"./chunk-6FF7TRB2.js";import{a as J}from"./chunk-IYI3JHG5.js";import"./chunk-YTZPBL5O.js";import"./chunk-HT6DSP63.js";import{d as dt}from"./chunk-OQMWV4LA.js";import{a as mt}from"./chunk-4VRCKWUY.js";import"./chunk-R3DFB5VD.js";import"./chunk-2D4XBF6C.js";import"./chunk-J63OB27M.js";import"./chunk-MPN57TB5.js";import"./chunk-KF3MHC66.js";import"./chunk-KBZZ7PX4.js";import"./chunk-ETGLCIRD.js";import{b as ct}from"./chunk-IGJSYOLU.js";import{e as lt}from"./chunk-TJ6RINMN.js";import"./chunk-7EJFKF2Q.js";import"./chunk-WJGP2CLN.js";import"./chunk-2ZXCNSZZ.js";import{d as rt}from"./chunk-LMI6FIPG.js";import{a as $}from"./chunk-4F45HHZT.js";import"./chunk-3S3T7QLT.js";import{b as Y}from"./chunk-HP5IPESO.js";import"./chunk-6N2DU4HB.js";import"./chunk-4OKIVQZ3.js";import"./chunk-JLQUTBFH.js";import"./chunk-YHXZO4DY.js";import"./chunk-JEKS3WOF.js";import"./chunk-HAAHWPOF.js";import"./chunk-6HYBRMN3.js";import"./chunk-XKQYXDV6.js";import"./chunk-4KO3X4S2.js";import"./chunk-BACG4SJJ.js";import"./chunk-CQTLBAQD.js";import"./chunk-OFSPPASQ.js";import"./chunk-JFIKQKZJ.js";import"./chunk-N4NZWFKH.js";import"./chunk-6PB6HGKN.js";import"./chunk-XULGDGRO.js";import"./chunk-43NB6BM4.js";import"./chunk-OVEGWW7W.js";import"./chunk-LL4377Z2.js";import"./chunk-GAOYV53E.js";import"./chunk-W6JPMHYE.js";import"./chunk-BXA2JYKG.js";import{a as et}from"./chunk-W6N427P2.js";import{f as ot,g as at}from"./chunk-WH4C7VZ6.js";import"./chunk-UZ2ED2LT.js";import"./chunk-HNHLGX7F.js";import{a as tt}from"./chunk-Y7HXBEAC.js";import"./chunk-FVUFPTGH.js";import"./chunk-LXFJ7QGK.js";import"./chunk-YJCC7NCW.js";import"./chunk-NR3F4GV4.js";import"./chunk-G7E24J2R.js";import"./chunk-VYA2NFJ5.js";import"./chunk-SH55PTEY.js";import"./chunk-VPS35GPI.js";import"./chunk-UGBMCXS6.js";import{a as U,b as Z}from"./chunk-5TTXT2K2.js";import"./chunk-YNQPX5G6.js";import{N as nt,g as it}from"./chunk-3NJAM5KX.js";import"./chunk-JFJPOKIM.js";import"./chunk-QYSFCWV7.js";import"./chunk-IEJVBN5K.js";import"./chunk-JZ2BEY7A.js";import{c as X}from"./chunk-BQPO535K.js";import"./chunk-HLLBCLO6.js";import"./chunk-4P6SOZDY.js";import"./chunk-XN7T54IM.js";import"./chunk-RULWGB4E.js";import"./chunk-2HIDUY57.js";import"./chunk-U5Y75IZ5.js";import"./chunk-HY3IUHOC.js";import"./chunk-4AEX2WLA.js";import"./chunk-2MELUOYA.js";import"./chunk-WOPE6PPO.js";import{E as z}from"./chunk-MDIMQ3H3.js";import"./chunk-HLO2AGAR.js";import"./chunk-T77BLOPU.js";import"./chunk-MWDJTJ3O.js";import{b as Q}from"./chunk-7CQSSHSC.js";import"./chunk-3DEA4WWC.js";import"./chunk-2SCMKR5I.js";import{q as K}from"./chunk-TKVDP62Z.js";import{Ad as R,Bb as d,Cc as F,Db as p,Dc as E,Eb as W,Gb as N,Hb as j,Ib as f,Jb as a,Kb as o,Kc as _,Lb as D,Lc as C,Mc as v,Od as G,Qc as q,Ub as I,Vd as H,Xb as V,Za as i,Zb as c,eb as S,ib as M,mc as r,nb as L,nc as P,ob as O,oc as u,rc as T,sc as g,tc as h,va as x,wa as y,xb as k,xd as A}from"./chunk-GJDGQISV.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ct=()=>["View inventory traffic using each transaction\u2019s created date. Transfer Orders always use actual dispatch and receive dates","View inventory traffic using each transaction\u2019s invoice date (including backdated). Transfer Orders always use actual dispatch and receive dates"],xt=()=>["/menu/Outlets/Master/Outlets/Info"],b=e=>({ID:e}),yt=()=>["/menu/Products/Catalog/Variants/Info"],vt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(e,l){if(e&1){let t=I();a(0,"button",13),V("click",function(){x(t);let n=c();return y(n.openExportModal())}),D(1,"i",14),r(2," Export "),o()}}function gt(e,l){if(e&1){let t=I();a(0,"div",15)(1,"h6"),r(2,"Outlet Group"),o(),a(3,"POS-outlet-group-tree-select",16),h("selectedOutletGroupIDChange",function(n){x(t);let s=c();return g(s.pageData.Filter.OutletGroupID,n)||(s.pageData.Filter.OutletGroupID=n),y(n)}),o(),a(4,"h6"),r(5,"Category"),o(),a(6,"POS-product-category-select",17),h("selectedCategoryIDChange",function(n){x(t);let s=c();return g(s.pageData.Filter.CategoryID,n)||(s.pageData.Filter.CategoryID=n),y(n)}),o(),a(7,"h6"),r(8,"Search Type"),o(),a(9,"radio-options",18),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.ProductVariantSearchMode,n)||(s.pageData.Filter.ProductVariantSearchMode=n),y(n)}),V("modelChange",function(n){x(t);let s=c();return y(s.onChangeSearchType(n))}),o(),a(10,"autocompleteV3",19),h("modelNameChange",function(n){x(t);let s=c();return g(s.productVariantModel,n)||(s.productVariantModel=n),y(n)}),o(),a(11,"h6"),r(12,"From - To"),o(),a(13,"div")(14,"datepicker",20),h("dateChange",function(n){x(t);let s=c();return g(s.pageData.Filter.From,n)||(s.pageData.Filter.From=n),y(n)}),o()(),a(15,"div",21)(16,"datepicker",22),h("dateChange",function(n){x(t);let s=c();return g(s.pageData.Filter.To,n)||(s.pageData.Filter.To=n),y(n)}),o()(),a(17,"h6"),r(18,"Inventory Type"),o(),a(19,"radio-options",23),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.InventoryType,n)||(s.pageData.Filter.InventoryType=n),y(n)}),o(),a(20,"h6"),r(21,"Movement Type"),o(),a(22,"radio-options",24),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.MovementType,n)||(s.pageData.Filter.MovementType=n),y(n)}),o(),a(23,"h6"),r(24,"Hide Zero Traffic"),o(),a(25,"radio-options",25),h("modelChange",function(n){x(t);let s=c();return g(s.pageData.Filter.RowOption,n)||(s.pageData.Filter.RowOption=n),y(n)}),o()()}if(e&2){let t=c();i(3),f("showClear",!0),T("selectedOutletGroupID",t.pageData.Filter.OutletGroupID),i(3),T("selectedCategoryID",t.pageData.Filter.CategoryID),f("showClear",!0),i(3),T("model",t.pageData.Filter.ProductVariantSearchMode),f("options",t.pageData.Options.ProductVariantSearchModes),i(),T("modelName",t.productVariantModel),f("placeholder",t.pageData.Filter.ProductVariantSearchMode===0?"Search Product":"Search Variant")("isShowEmptyMessage",!0)("emptyMessage",t.pageData.Filter.ProductVariantSearchMode===0?"No Product found":"No Variant found")("tooltipMessage",t.pageData.Filter.ProductVariantSearchMode===0?"Search by product name":"Search by variant name")("label",t.pageData.Filter.ProductVariantSearchMode===0?"Product to Analyze":"Variant to Analyze")("listDataEndpoint",t.pageData.Filter.ProductVariantSearchMode===0?"/api/ac/GetProductSuggestionByCodeNName":"/API/AC/GetVariantSuggestionByCodeNName")("valueField",t.pageData.Filter.ProductVariantSearchMode===0?"Name":"Value")("showThumbnail",!0)("thumbnailKey","ImageURL"),i(4),f("isFloatingLabel",!1),T("date",t.pageData.Filter.From),f("hidelClearBtn",!0),i(2),f("isFloatingLabel",!1),T("date",t.pageData.Filter.To),f("hidelClearBtn",!0),i(3),T("model",t.pageData.Filter.InventoryType),f("options",t.pageData.Options.InventoryTypes),i(3),T("model",t.pageData.Filter.MovementType),f("options",t.pageData.Options.MovementTypes)("title",F(29,Ct)),i(3),T("model",t.pageData.Filter.RowOption),f("options",t.pageData.Options.RowOptions)}}function ht(e,l){e&1&&(a(0,"th",8),r(1,"Product"),o())}function St(e,l){e&1&&(a(0,"th",9)(1,"span",26),r(2," P.Code "),o()())}function It(e,l){e&1&&(a(0,"th",10),r(1,"Code"),o())}function Vt(e,l){e&1&&(a(0,"th",11)(1,"span",27),r(2," Start "),o()())}function Ft(e,l){e&1&&(a(0,"th",11)(1,"span",28),r(2," Bought "),o()())}function wt(e,l){e&1&&(a(0,"th",11)(1,"span",29),r(2," Sold "),o()())}function Dt(e,l){e&1&&(a(0,"th",11)(1,"span",30),r(2," T.In "),o()())}function Et(e,l){e&1&&(a(0,"th",11)(1,"span",31),r(2," T.Out "),o()())}function Pt(e,l){e&1&&(a(0,"th",11)(1,"span",32),r(2," Adjust "),o()())}function bt(e,l){e&1&&(a(0,"th",11)(1,"span",33),r(2," End "),o()())}function Bt(e,l){e&1&&(a(0,"th",11)(1,"span",34),r(2," Now "),o()())}function Mt(e,l){e&1&&(a(0,"th",11)(1,"span",35),r(2," % "),o()())}function Lt(e,l){if(e&1&&(a(0,"td")(1,"a",36),r(2),o()()),e&2){let t=c().$implicit;i(),f("routerLink",F(3,vt))("queryParams",E(4,b,t.ProductID)),i(),u(" ",t.ProductName," ")}}function Ot(e,l){if(e&1&&(a(0,"td"),r(1),o()),e&2){let t=c().$implicit;i(),u(" ",t.ProductCode," ")}}function kt(e,l){if(e&1&&(a(0,"td",37),r(1),o()),e&2){let t=c().$implicit;i(),u(" ",t.VariantCode," ")}}function Wt(e,l){if(e&1&&(a(0,"td",38),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;f("colsFontColor",t.Start),i(),u(" ",C(2,2,t.Start)," ")}}function Nt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.Bought)," ")}}function jt(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.Sold)," ")}}function qt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.TransferredIn)," ")}}function At(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.TransferredOut)," ")}}function Rt(e,l){if(e&1&&(a(0,"td",38),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;f("colsFontColor",t.Adjustment),i(),u(" ",t.Adjustment<0?t.Adjustment*-1:C(2,2,t.Adjustment)," ")}}function Gt(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;f("colsFontColor",t.End),i(),u(" ",t.End," ")}}function Ht(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;f("colsFontColor",t.Now),i(),u(" ",t.Now," ")}}function zt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),u(" ",C(2,1,t.SellTransferInRate)," ")}}function Kt(e,l){if(e&1&&(a(0,"tr")(1,"td")(2,"a",36),r(3),o()(),d(4,Lt,3,6,"td"),d(5,Ot,2,1,"td"),a(6,"td")(7,"a",36),r(8),o()(),d(9,kt,2,1,"td",37),d(10,Wt,3,4,"td",38),d(11,Nt,3,3,"td",37),d(12,jt,3,3,"td",39),d(13,qt,3,3,"td",37),d(14,At,3,3,"td",39),d(15,Rt,3,4,"td",38),d(16,Gt,2,2,"td",38),d(17,Ht,2,2,"td",38),d(18,zt,3,3,"td",37),o()),e&2){let t=l.$implicit,m=c(2);i(2),f("routerLink",F(18,xt))("queryParams",E(19,b,t.OutletID)),i(),u(" ",t.OutletName," "),i(),p(m.column.productname.selected?4:-1),i(),p(m.column.productcode.selected?5:-1),i(2),f("routerLink",F(21,yt))("queryParams",E(22,b,t.VariantID)),i(),P(t.VariantName),i(),p(m.column.code.selected?9:-1),i(),p(m.column.start.selected?10:-1),i(),p(m.column.bought.selected?11:-1),i(),p(m.column.sold.selected?12:-1),i(),p(m.column.transferredIn.selected?13:-1),i(),p(m.column.transferredOut.selected?14:-1),i(),p(m.column.adjust.selected?15:-1),i(),p(m.column.end.selected?16:-1),i(),p(m.column.now.selected?17:-1),i(),p(m.column.percent.selected?18:-1)}}function Qt(e,l){if(e&1&&N(0,Kt,19,24,"tr",null,W),e&2){let t=c();j(t.infiniteList)}}function Ut(e,l){e&1&&(a(0,"tr")(1,"td",40),D(2,"app-empty-state"),o()())}function Zt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Start"))," ")}}function Jt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Bought"))," ")}}function Xt(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Sold"))," ")}}function Yt(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"TransferredIn"))," ")}}function $t(e,l){if(e&1&&(a(0,"td",39),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"TransferredOut"))," ")}}function te(e,l){if(e&1&&(a(0,"td",38),_(1,"sum"),_(2,"quantityFraction"),r(3),_(4,"sum"),_(5,"quantityFraction"),o()),e&2){let t=c(2);f("colsFontColor",C(2,5,v(1,2,t.infiniteList,"Adjustment"))),i(3),u(" ",C(5,10,v(4,7,t.infiniteList,"Adjustment"))," ")}}function ee(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"End"))," ")}}function ie(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",C(3,4,v(2,1,t.infiniteList,"Now"))," ")}}function ne(e,l){if(e&1&&(a(0,"td",37),r(1),_(2,"sum"),_(3,"sum"),_(4,"sum"),_(5,"quantityFraction"),o()),e&2){let t=c(2);i(),u(" ",v(2,1,t.infiniteList,"TransferredIn")?C(5,10,v(3,4,t.infiniteList,"Sold")/v(4,7,t.infiniteList,"TransferredIn")*100):0," ")}}function oe(e,l){if(e&1&&(a(0,"tfoot")(1,"tr",41)(2,"th",42),r(3," Total: "),o(),d(4,Zt,4,6,"td",37),d(5,Jt,4,6,"td",37),d(6,Xt,4,6,"td",39),d(7,Yt,4,6,"td",37),d(8,$t,4,6,"td",39),d(9,te,6,12,"td",38),d(10,ee,4,6,"td",37),d(11,ie,4,6,"td",37),d(12,ne,6,12,"td",37),o()()),e&2){let t=c();i(2),k("colspan",2+(t.column.productname.selected?1:0)+(t.column.productcode.selected?1:0)+(t.column.code.selected?1:0)),i(2),p(t.column.start.selected?4:-1),i(),p(t.column.bought.selected?5:-1),i(),p(t.column.sold.selected?6:-1),i(),p(t.column.transferredIn.selected?7:-1),i(),p(t.column.transferredOut.selected?8:-1),i(),p(t.column.adjust.selected?9:-1),i(),p(t.column.end.selected?10:-1),i(),p(t.column.now.selected?11:-1),i(),p(t.column.percent.selected?12:-1)}}function ae(e,l){if(e&1){let t=I();a(0,"span",48),V("click",function(){x(t);let n=c(2);return y(n.StoreRowsCountAPIResult("inventory/GetCountVariantInventoryTraffic"))}),a(1,"i",49),r(2,"?"),o()()}}function re(e,l){if(e&1&&(a(0,"span"),r(1),_(2,"number"),o()),e&2){let t=c(2);i(),P(C(2,1,t.listTotal))}}function le(e,l){if(e&1){let t=I();a(0,"div",12)(1,"div",43)(2,"div",44),r(3),_(4,"number"),d(5,ae,3,0,"span",45),d(6,re,3,3,"span"),r(7),o()(),a(8,"a",46),V("click",function(){x(t);let n=c();return y(n.NextPage(!0))}),D(9,"i",47),r(10," Next"),o()()}if(e&2){let t=c();i(3),u(" Showing 1 - ",C(4,4,t.infiniteList.length)," of "),i(2),p(t.pageData.HideStoreApiCount?-1:5),i(),p(t.pageData.HideStoreApiCount?6:-1),i(),u(" records ~ ",t.pageData.Filter.PageNumber," Page ")}}var ft=class e extends J{constructor(t,m,n,s,B,w,ce){super(t,m,"inventory/GetVariantInventoryTraffic","inventoryloader/GetVariantInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=n;this.pageTitle=s;this.converter=B;this.roleService=w;this.matDialog=ce;this.pageTitle.setTitle(this.menuData.T)}column={productname:{selected:!1,name:"Product"},productcode:{selected:!1,name:"Product Code"},code:{selected:!0,name:"Variant Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!1,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!0,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Y,{data:{title:"Variant Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportVariantInventoryTraffic",Value:"Default",FileName:"Variant Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}onChangeSearchType(t){this.pageData.Filter.ListProductID=[],this.pageData.Filter.ListVariantID=[]}get productVariantModel(){return this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID:this.pageData.Filter.ListVariantID}set productVariantModel(t){this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID=t:this.pageData.Filter.ListVariantID=t}static \u0275fac=function(m){return new(m||e)(S(tt),S(K),S(et),S(G),S(pt),S(Q),S(X))};static \u0275cmp=M({type:e,selectors:[["POS-variant-inventory-traffic"]],features:[L],decls:33,vars:21,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","180px"],[2,"width","150px"],[2,"width","80px"],[1,"text-end",2,"width","130px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","SearchType",3,"modelChange","model","options"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField","showThumbnail","thumbnailKey"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","InventoryType",3,"modelChange","model","options"],["name","MovementType",3,"modelChange","model","options","title"],["name","RowOption",3,"modelChange","model","options"],["matTooltip","Product Code","matTooltipPosition","above"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-danger"],["colspan","13"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],[2,"cursor","pointer"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(m,n){if(m&1){let s=I();a(0,"mainpanel-cmp",1),V("onSubmit",function(){return n.searchFromPageOne()}),h("filterChange",function(w){return x(s),g(n.pageData.Filter,w)||(n.pageData.Filter=w),y(w)}),a(1,"actions"),d(2,Tt,3,0,"button",2),o(),a(3,"filters"),O(4,gt,26,30,"ng-template",null,0,q),o(),a(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),o(),d(14,ht,2,0,"th",8),d(15,St,3,0,"th",9),a(16,"th"),r(17,"Variant"),o(),d(18,It,2,0,"th",10),d(19,Vt,3,0,"th",11),d(20,Ft,3,0,"th",11),d(21,wt,3,0,"th",11),d(22,Dt,3,0,"th",11),d(23,Et,3,0,"th",11),d(24,Pt,3,0,"th",11),d(25,bt,3,0,"th",11),d(26,Bt,3,0,"th",11),d(27,Mt,3,0,"th",11),o()(),a(28,"tbody"),d(29,Qt,2,0)(30,Ut,3,0,"tr"),o(),d(31,oe,13,10,"tfoot"),o()(),d(32,le,11,6,"div",12),o()()()}m&2&&(f("pageData",n.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),T("filter",n.pageData.Filter),f("column",n.column),i(2),p(n.roleService.global.Export?2:-1),i(12),p(n.column.productname.selected?14:-1),i(),p(n.column.productcode.selected?15:-1),i(3),p(n.column.code.selected?18:-1),i(),p(n.column.start.selected?19:-1),i(),p(n.column.bought.selected?20:-1),i(),p(n.column.sold.selected?21:-1),i(),p(n.column.transferredIn.selected?22:-1),i(),p(n.column.transferredOut.selected?23:-1),i(),p(n.column.adjust.selected?24:-1),i(),p(n.column.end.selected?25:-1),i(),p(n.column.now.selected?26:-1),i(),p(n.column.percent.selected?27:-1),i(2),p(n.infiniteList&&n.infiniteList.length>0?29:30),i(2),p(n.infiniteList&&n.infiniteList.length>0?31:-1),i(),p(n.infiniteList&&n.infiniteList.length>0?32:-1))},dependencies:[at,ot,R,z,_t,lt,st,nt,H,dt,rt,mt,ct,ut,Z,U,A,it,$],encapsulation:2})};export{ft as Variant_Inventory_TrafficComponent};
@@ -1,4 +1,4 @@
1
- var e={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},pos:{indexedDBVersion:3,submitOrderTimeout:2e4,fileSizeLimit:9e5},version:"26223",outletMaximumSubscription:10,midtransClientKey:"Mid-client-rdi5ridKhHfeIvTj",ngHttpLoaderDebounceDelay:175,news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:web&sort=sortOrder:asc",changelog:[],uppy:{invoicePayment:25e5,receiptTemplate:25e5},intercom:{appId:"xv1oomgl"},whatsappTemplateMessage:`Thank you for shopping at {Brand}
1
+ var e={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},pos:{indexedDBVersion:3,submitOrderTimeout:2e4,fileSizeLimit:9e5},version:"26224",outletMaximumSubscription:10,midtransClientKey:"Mid-client-rdi5ridKhHfeIvTj",ngHttpLoaderDebounceDelay:175,news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:web&sort=sortOrder:asc",changelog:[],uppy:{invoicePayment:25e5,receiptTemplate:25e5},intercom:{appId:"xv1oomgl"},whatsappTemplateMessage:`Thank you for shopping at {Brand}
2
2
  Here is the receipt for your purchase {Number} - {Currency} {Amount}
3
3
  {ReceiptLink}
4
4
  Please let us know about your shopping experience using the receipt link.`,FALLBACK_PRODUCT_IMAGE_URL:"https://cdn.dealpos.app/template/products_thumb.png",files:{csv:{sales_person_import:"https://cdn.dealpos.xyz/web-import-template/SalesPerson_DealPOS.csv",supplier_import:"https://cdn.dealpos.xyz/web-import-template/Import_Supplier_DealPOS.csv",product_serial_import:"https://cdn.dealpos.xyz/web-import-template/Sample_Serial.csv",customer_import:"https://cdn.dealpos.xyz/web-import-template/Customer_Import_TemplateV2.csv",courier_import:"https://cdn.dealpos.xyz/web-import-template/Courier-Import-Template.csv",customer_invoice_import:"https://cdn.dealpos.xyz/web-import-template/Import-Invoice-Template-V2.csv",estimate_import:"https://cdn.dealpos.xyz/web-import-template/Estimate_DealPOS_New.csv",supplier_bill_import:"https://cdn.dealpos.xyz/web-import-template/SupplierBill_Import_TemplateV2.csv",outlet_import:"https://cdn.dealpos.xyz/web-import-template/Outlet_Import_Template.csv",payment_import:"https://cdn.dealpos.xyz/web-import-template/Import-Payment.csv",product_import:"https://cdn.dealpos.xyz/web-import-template/Product_Import_TemplateV2.csv",pricebook_import:"https://res.cloudinary.com/pos/raw/upload/v1647931293/POS/CSV/Pricebook.csv",promotion_coupon_import:"https://cdn.dealpos.xyz/web-import-template/Promotion-Coupon-Import-TemplateV3.csv",adjustment_item_import:"https://cdn.dealpos.xyz/web-import-template/ImportItem_Adjustment_TemplateV2.csv",transfer_order_import:"https://res.cloudinary.com/pos/raw/upload/v1699867624/POS/CSV/ImportTransferOrder_DealPOS_New.csv",buy_import:"https://cdn.dealpos.xyz/web-import-template/ImportBuyV2_DealPOS_New.csv",sell_import:"https://res.cloudinary.com/pos/raw/upload/v1699867624/POS/CSV/ImportSell_DealPOS_New.csv",promotion_event_import:"https://cdn.dealpos.xyz/web-import-template/PromotionEvent_Import_TemplateV2.csv",promotion_event_item_requirement_import:"https://cdn.dealpos.xyz/web-import-template/PromotionEvent_ItemRequirement_Import_TemplateV2.csv",promotion_coupon_item_requirement_import:"https://cdn.dealpos.xyz/web-import-template/PromotionCoupon_ItemRequirement_Import_TemplateV2.csv"}}};export{e as a};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-U4V27VHF.js";import{b as v,c as P,d as j}from"./chunk-QIU4DALL.js";import{a as D,b as L}from"./chunk-Z3JTICHN.js";import{a as p}from"./chunk-NSNUUKNK.js";import{b as G,c as V}from"./chunk-YPU6WRZS.js";import{O as m}from"./chunk-3NJAM5KX.js";import{a as l}from"./chunk-3DEA4WWC.js";import{a as R}from"./chunk-UKMVGESE.js";import{n as w,q as U}from"./chunk-TKVDP62Z.js";import{F as A,J as g,R as N,b as f,e as C,na as x,p as S,qa as h,s as T,u as E}from"./chunk-GJDGQISV.js";import{i as u}from"./chunk-SNAKHGZS.js";var M=(o=>(o[o.IsNew=0]="IsNew",o[o.IsComplete=1]="IsComplete",o[o.IsEdit=2]="IsEdit",o[o.isPark=3]="isPark",o[o.IsRetrieve=4]="IsRetrieve",o[o.IsSplit=5]="IsSplit",o[o.IsBill=6]="IsBill",o[o.IsReturn=7]="IsReturn",o[o.IsUndo=8]="IsUndo",o[o.UploadOrderFail=9]="UploadOrderFail",o))(M||{});var H=(s=>(s[s.Unsent=0]="Unsent",s[s.AwaitingCollection=1]="AwaitingCollection",s[s.Partial=2]="Partial",s[s.Sent=3]="Sent",s))(H||{});var b=class{ID;EntityID;RegisterID;TypeID;Date;Number;CustomerID;SalesID;Discount=0;Discount2=0;DiscountAmount=0;CustomerDiscountRate=0;Note="";DeliveryOutletID;TaxTypeID;CurrencyID;CurrencyRate;PointUsed;InvoicedStateID;ReferenceNumber="";LogisticsServiceID;ParkLabel="";NumberOfPerson;ClientTimestamp;Created;PromotionCoupon="";CouponType=1;PromotionNote="";DeliveryStateID;CouponProvider="Internal";CurrencySymbol;constructor(){this.ID=l.GuidEmpty,this.EntityID=l.GuidEmpty,this.RegisterID=l.GuidEmpty,this.Number="",this.CustomerID=null,this.SalesID=null,this.Discount=0,this.Discount2=0,this.DiscountAmount=0,this.Note="",this.TaxTypeID=l.GuidEmpty,this.CurrencyID=1,this.CurrencyRate=1,this.DeliveryStateID=3,this.PointUsed=0,this.NumberOfPerson=1,this.Date=new Date}removeEnterNote(){this.Note&&(this.Note=this.Note.replace(/\n/g,""))}};var y=class{DeliveryEntityID;Type;NewOrderID;constructor(){this.DeliveryEntityID="",this.Type=3}};var d=class{Amount;ApplyToProduct;Code;Type;TypeDescription;Coupon;Notification;MaxDiscount;Note};var a=class{Order;Invoice;Shipping;Action;Payments;Items;CartItems;Promotion;ContactName;SplitParkLabel;get cartQuantity(){let t=0;for(let e of this.CartItems)t+=e.Quantity;return t}constructor(){this.Order=new b,this.Invoice=new v,this.Shipping=new P,this.Action=new y,this.Payments=Array(),this.Items=Array(),this.CartItems=Array(),this.ContactName=""}get TotalPaidAmount(){let t=0;return this.Payments.forEach(e=>{t+=e.PaidAmount}),t}get RedeemableAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID!=1);return this.GetAmountByCart(t)}get TotalQuantity(){let t=0;return this.CartItems.forEach(e=>{e.PromotionGift||(t+=e.Quantity)}),t}get CashOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==1);return this.GetAmountByCart(t)}get PointOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==2);return this.GetAmountByCart(t)}get PrepaidPackageItem(){return this.CartItems.filter(e=>e.Variant.TypeID==10)}GetAmountByCart(t){let e=0;return t.forEach(r=>{e+=r.Total}),e=e*(100-this.Order.Discount)/100,e=e*(100-this.Order.Discount2)/100,e}getRewards(){return this.CartItems.filter(e=>e.PromotionGift)}};u([p(()=>b)],a.prototype,"Order",2),u([p(()=>v)],a.prototype,"Invoice",2),u([p(()=>P)],a.prototype,"Shipping",2),u([p(()=>y)],a.prototype,"Action",2),u([p(()=>j)],a.prototype,"Payments",2),u([p(()=>D)],a.prototype,"Items",2),u([p(()=>L)],a.prototype,"CartItems",2),u([p(()=>d)],a.prototype,"Promotion",2);var O=class{Success;Message;message;ObjectID;SalesOrderID;OutDeliveryID;Contact;LoyaltyPoint;InvoiceNumber;Creator;OrderTimeString;PrintMode;PaymentStateID;PaymentStateLabel;Final;InvoiceNumberResult;constructor(){this.Success=!0,this.Message="",this.ObjectID="",this.SalesOrderID="",this.OutDeliveryID="",this.Contact=null,this.LoyaltyPoint="",this.InvoiceNumber="",this.Creator="",this.OrderTimeString="",this.PrintMode=0,this.PaymentStateID=0,this.PaymentStateLabel="",this.Final=0}};var B=class c{constructor(t,e,r,s){this.httpService=t;this._localDataService=e;this._onlineStatusService=r;this._toastrService=s;this._onlineStatusService.getOnlineStatus$().subscribe(I=>{this.isOnline=I})}_Data=new C(null);Data$=this._Data.pipe(N(),A(t=>t!==null));isOnline;get Data(){return this._Data.value}pushNewValue(t){this._Data.next(t)}getSalesOrderPrint(t){return this.httpService.post("/API/POS/GetSalesOrderPrint",{TemplateID:t})}submitOrder(t,e){let r=this.generatePOSDataForSubmission(t,this.isOnline);if(this.isOnline)return this.submitOnline(r).pipe(this.handleTimeOutError(r));if(e.ModuleSell.EnableOfflineTransaction)return this._localDataService.syncOrder(r).pipe(E(()=>this.generateCompleteData(r)));this._toastrService.warning("Offline order is not Supported!","Info!")}uploadOfflineOrder(t){return this._localDataService.uploadSingleOrder(t).pipe(g(e=>e?.message?.includes("objectStore does not exists")?this.submitOnline(t):S(()=>e)))}submitOnline(t){return this.httpService.post(m.SubmitOrder,t,R.pos.submitOrderTimeout)}handleTimeOutError(t){return f(g(e=>{if(e instanceof T||e?.name=="TimeoutError"){let r=this.generateCompleteData(t);this.pushNewValue(r)}throw e}))}generatePOSDataForSubmission(t,e=!0){let r=Object.assign(new a,t);r.Items=[],r.Order.CustomerID==null&&(r.Order.CustomerID=l.GuidEmpty),r.Order.SalesID==null&&(r.Order.SalesID=l.GuidEmpty);let s=1;r.Payments=r.Payments.map(i=>(i.Date=r.Order.Date,i.Index=s,s++,delete i.TypeID,i));let I=1;for(let i of r.CartItems){let n=new D;n.ID=i.ID,n.VariantID=i.VariantID,n.Quantity=i.Quantity,n.Cost=i.Cost,n.Price=i.Price,n.Discount=i.Discount,n.DiscountAmount=i.DiscountAmount,n.Note=i.Note,n.Taxable=i.Variant.Taxable,n.LoyaltyPoint=i.LoyaltyPoint,n.UnitCost=i.Cost,n.UnitPrice=i.Price,n.UnitPriceOriginal=i.UnitPriceOriginal,n.UnitExpense=i.UnitExpense,n.EntityID=i.EntityID,n.Index=I,n.UnitQuantity=i.UnitQuantity,n.PriceTypeID=i.PriceTypeID,n.PriceNote=i.PriceNote,n.Splited=i.SplitQuantity>0,n.SplitQuantity=i.SplitQuantity,n.InventoryTypeID=i.Variant.TypeID,n.SalesID="",n.Serial=i.Serial,i.SalesID&&(n.SalesID=i.SalesID),delete i.CouponDiscount,r.Items.push(n),I++}return e?(delete r.CartItems,delete r.Order.ClientTimestamp):r.Order.ClientTimestamp=new Date,r}generateCompleteData(t){let e=new O;return e.InvoiceNumber=t.Order.Number,e.OrderTimeString=new Date().toString(),e.PaymentStateID=t.Action?.Type,e.PaymentStateLabel="Offline",e.Success=!0,e.OutDeliveryID=t.Action.DeliveryEntityID,e}GetReturnInvoice(t,e){return this.httpService.get(m.ReturnInvoiceV2,[{key:"EntityID",value:e},{key:"Number",value:t}])}GetInvoiceBySoID(t){return this.httpService.get(m.GetPOSDataByID,[{key:"ID",value:t}])}UploadCSV(t,e){let r={CartItems:t,EntityID:e};return this.httpService.post(m.UploadCsv,r)}sendEmail(t,e){return new Promise((r,s)=>{this._localDataService.isProductFromServer().subscribe(I=>{if(I){let i={invoiceID:e,email:t};this.httpService.post(m.SendInvoiceEmail,i).subscribe({next:n=>{r(n)},error:n=>{s(n)}})}else s(G.wrongOfflineAction)})})}sendWhatsaap(t,e){let r={InvoiceID:t,PhoneNumber:e};return this.httpService.post(m.SendInvoiceWhatsapp,r)}createCustomerByInvoice(t,e){let r={InvoiceID:t,Mobile:e};return this.httpService.post(m.CreateCustomerInvoice,r)}saveCommission(t,e){let r={SOID:t,commission:e};return this.httpService.POSText("/API/Transaction/SetCommission",r)}generateReceiptA4(t){let e={ID:t};return this.httpService.post(m.InvoiceA4,e)}getVacant(t){return this.httpService.get(m.GetVacant,[{key:"EntityID",value:t}])}static \u0275fac=function(e){return new(e||c)(h(U),h(V),h(k),h(w))};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};export{H as a,a as b,M as c,O as d,B as e};
1
+ import{a as k}from"./chunk-ERFZMJEN.js";import{b as v,c as P,d as j}from"./chunk-QIU4DALL.js";import{a as D,b as L}from"./chunk-Z3JTICHN.js";import{a as p}from"./chunk-NSNUUKNK.js";import{b as G,c as V}from"./chunk-NR3F4GV4.js";import{O as m}from"./chunk-3NJAM5KX.js";import{a as l}from"./chunk-3DEA4WWC.js";import{a as R}from"./chunk-2SCMKR5I.js";import{n as w,q as U}from"./chunk-TKVDP62Z.js";import{F as A,J as g,R as N,b as f,e as C,na as x,p as S,qa as h,s as T,u as E}from"./chunk-GJDGQISV.js";import{i as u}from"./chunk-SNAKHGZS.js";var M=(o=>(o[o.IsNew=0]="IsNew",o[o.IsComplete=1]="IsComplete",o[o.IsEdit=2]="IsEdit",o[o.isPark=3]="isPark",o[o.IsRetrieve=4]="IsRetrieve",o[o.IsSplit=5]="IsSplit",o[o.IsBill=6]="IsBill",o[o.IsReturn=7]="IsReturn",o[o.IsUndo=8]="IsUndo",o[o.UploadOrderFail=9]="UploadOrderFail",o))(M||{});var H=(s=>(s[s.Unsent=0]="Unsent",s[s.AwaitingCollection=1]="AwaitingCollection",s[s.Partial=2]="Partial",s[s.Sent=3]="Sent",s))(H||{});var b=class{ID;EntityID;RegisterID;TypeID;Date;Number;CustomerID;SalesID;Discount=0;Discount2=0;DiscountAmount=0;CustomerDiscountRate=0;Note="";DeliveryOutletID;TaxTypeID;CurrencyID;CurrencyRate;PointUsed;InvoicedStateID;ReferenceNumber="";LogisticsServiceID;ParkLabel="";NumberOfPerson;ClientTimestamp;Created;PromotionCoupon="";CouponType=1;PromotionNote="";DeliveryStateID;CouponProvider="Internal";CurrencySymbol;constructor(){this.ID=l.GuidEmpty,this.EntityID=l.GuidEmpty,this.RegisterID=l.GuidEmpty,this.Number="",this.CustomerID=null,this.SalesID=null,this.Discount=0,this.Discount2=0,this.DiscountAmount=0,this.Note="",this.TaxTypeID=l.GuidEmpty,this.CurrencyID=1,this.CurrencyRate=1,this.DeliveryStateID=3,this.PointUsed=0,this.NumberOfPerson=1,this.Date=new Date}removeEnterNote(){this.Note&&(this.Note=this.Note.replace(/\n/g,""))}};var y=class{DeliveryEntityID;Type;NewOrderID;constructor(){this.DeliveryEntityID="",this.Type=3}};var d=class{Amount;ApplyToProduct;Code;Type;TypeDescription;Coupon;Notification;MaxDiscount;Note};var a=class{Order;Invoice;Shipping;Action;Payments;Items;CartItems;Promotion;ContactName;SplitParkLabel;get cartQuantity(){let t=0;for(let e of this.CartItems)t+=e.Quantity;return t}constructor(){this.Order=new b,this.Invoice=new v,this.Shipping=new P,this.Action=new y,this.Payments=Array(),this.Items=Array(),this.CartItems=Array(),this.ContactName=""}get TotalPaidAmount(){let t=0;return this.Payments.forEach(e=>{t+=e.PaidAmount}),t}get RedeemableAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID!=1);return this.GetAmountByCart(t)}get TotalQuantity(){let t=0;return this.CartItems.forEach(e=>{e.PromotionGift||(t+=e.Quantity)}),t}get CashOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==1);return this.GetAmountByCart(t)}get PointOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==2);return this.GetAmountByCart(t)}get PrepaidPackageItem(){return this.CartItems.filter(e=>e.Variant.TypeID==10)}GetAmountByCart(t){let e=0;return t.forEach(r=>{e+=r.Total}),e=e*(100-this.Order.Discount)/100,e=e*(100-this.Order.Discount2)/100,e}getRewards(){return this.CartItems.filter(e=>e.PromotionGift)}};u([p(()=>b)],a.prototype,"Order",2),u([p(()=>v)],a.prototype,"Invoice",2),u([p(()=>P)],a.prototype,"Shipping",2),u([p(()=>y)],a.prototype,"Action",2),u([p(()=>j)],a.prototype,"Payments",2),u([p(()=>D)],a.prototype,"Items",2),u([p(()=>L)],a.prototype,"CartItems",2),u([p(()=>d)],a.prototype,"Promotion",2);var O=class{Success;Message;message;ObjectID;SalesOrderID;OutDeliveryID;Contact;LoyaltyPoint;InvoiceNumber;Creator;OrderTimeString;PrintMode;PaymentStateID;PaymentStateLabel;Final;InvoiceNumberResult;constructor(){this.Success=!0,this.Message="",this.ObjectID="",this.SalesOrderID="",this.OutDeliveryID="",this.Contact=null,this.LoyaltyPoint="",this.InvoiceNumber="",this.Creator="",this.OrderTimeString="",this.PrintMode=0,this.PaymentStateID=0,this.PaymentStateLabel="",this.Final=0}};var B=class c{constructor(t,e,r,s){this.httpService=t;this._localDataService=e;this._onlineStatusService=r;this._toastrService=s;this._onlineStatusService.getOnlineStatus$().subscribe(I=>{this.isOnline=I})}_Data=new C(null);Data$=this._Data.pipe(N(),A(t=>t!==null));isOnline;get Data(){return this._Data.value}pushNewValue(t){this._Data.next(t)}getSalesOrderPrint(t){return this.httpService.post("/API/POS/GetSalesOrderPrint",{TemplateID:t})}submitOrder(t,e){let r=this.generatePOSDataForSubmission(t,this.isOnline);if(this.isOnline)return this.submitOnline(r).pipe(this.handleTimeOutError(r));if(e.ModuleSell.EnableOfflineTransaction)return this._localDataService.syncOrder(r).pipe(E(()=>this.generateCompleteData(r)));this._toastrService.warning("Offline order is not Supported!","Info!")}uploadOfflineOrder(t){return this._localDataService.uploadSingleOrder(t).pipe(g(e=>e?.message?.includes("objectStore does not exists")?this.submitOnline(t):S(()=>e)))}submitOnline(t){return this.httpService.post(m.SubmitOrder,t,R.pos.submitOrderTimeout)}handleTimeOutError(t){return f(g(e=>{if(e instanceof T||e?.name=="TimeoutError"){let r=this.generateCompleteData(t);this.pushNewValue(r)}throw e}))}generatePOSDataForSubmission(t,e=!0){let r=Object.assign(new a,t);r.Items=[],r.Order.CustomerID==null&&(r.Order.CustomerID=l.GuidEmpty),r.Order.SalesID==null&&(r.Order.SalesID=l.GuidEmpty);let s=1;r.Payments=r.Payments.map(i=>(i.Date=r.Order.Date,i.Index=s,s++,delete i.TypeID,i));let I=1;for(let i of r.CartItems){let n=new D;n.ID=i.ID,n.VariantID=i.VariantID,n.Quantity=i.Quantity,n.Cost=i.Cost,n.Price=i.Price,n.Discount=i.Discount,n.DiscountAmount=i.DiscountAmount,n.Note=i.Note,n.Taxable=i.Variant.Taxable,n.LoyaltyPoint=i.LoyaltyPoint,n.UnitCost=i.Cost,n.UnitPrice=i.Price,n.UnitPriceOriginal=i.UnitPriceOriginal,n.UnitExpense=i.UnitExpense,n.EntityID=i.EntityID,n.Index=I,n.UnitQuantity=i.UnitQuantity,n.PriceTypeID=i.PriceTypeID,n.PriceNote=i.PriceNote,n.Splited=i.SplitQuantity>0,n.SplitQuantity=i.SplitQuantity,n.InventoryTypeID=i.Variant.TypeID,n.SalesID="",n.Serial=i.Serial,i.SalesID&&(n.SalesID=i.SalesID),delete i.CouponDiscount,r.Items.push(n),I++}return e?(delete r.CartItems,delete r.Order.ClientTimestamp):r.Order.ClientTimestamp=new Date,r}generateCompleteData(t){let e=new O;return e.InvoiceNumber=t.Order.Number,e.OrderTimeString=new Date().toString(),e.PaymentStateID=t.Action?.Type,e.PaymentStateLabel="Offline",e.Success=!0,e.OutDeliveryID=t.Action.DeliveryEntityID,e}GetReturnInvoice(t,e){return this.httpService.get(m.ReturnInvoiceV2,[{key:"EntityID",value:e},{key:"Number",value:t}])}GetInvoiceBySoID(t){return this.httpService.get(m.GetPOSDataByID,[{key:"ID",value:t}])}UploadCSV(t,e){let r={CartItems:t,EntityID:e};return this.httpService.post(m.UploadCsv,r)}sendEmail(t,e){return new Promise((r,s)=>{this._localDataService.isProductFromServer().subscribe(I=>{if(I){let i={invoiceID:e,email:t};this.httpService.post(m.SendInvoiceEmail,i).subscribe({next:n=>{r(n)},error:n=>{s(n)}})}else s(G.wrongOfflineAction)})})}sendWhatsaap(t,e){let r={InvoiceID:t,PhoneNumber:e};return this.httpService.post(m.SendInvoiceWhatsapp,r)}createCustomerByInvoice(t,e){let r={InvoiceID:t,Mobile:e};return this.httpService.post(m.CreateCustomerInvoice,r)}saveCommission(t,e){let r={SOID:t,commission:e};return this.httpService.POSText("/API/Transaction/SetCommission",r)}generateReceiptA4(t){let e={ID:t};return this.httpService.post(m.InvoiceA4,e)}getVacant(t){return this.httpService.get(m.GetVacant,[{key:"EntityID",value:t}])}static \u0275fac=function(e){return new(e||c)(h(U),h(V),h(k),h(w))};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};export{H as a,a as b,M as c,O as d,B as e};
@@ -1 +1 @@
1
- import{a as $e}from"./chunk-VDBNEUI3.js";import{b as Ve,c as Le,d as Re,e as Be,f as We,g as je}from"./chunk-GOB3T42H.js";import{b as ze}from"./chunk-D2UNYCWT.js";import"./chunk-RG65F34V.js";import"./chunk-HT6DSP63.js";import{c as be}from"./chunk-J63OB27M.js";import{c as Se}from"./chunk-MPN57TB5.js";import"./chunk-KF3MHC66.js";import{b as ve}from"./chunk-KBZZ7PX4.js";import"./chunk-ETGLCIRD.js";import{a as Ne,f as Ae}from"./chunk-IJDE2DXI.js";import"./chunk-WJGP2CLN.js";import{d as Fe}from"./chunk-2ZXCNSZZ.js";import"./chunk-JD7UP3FE.js";import"./chunk-JLQUTBFH.js";import"./chunk-YHXZO4DY.js";import"./chunk-JEKS3WOF.js";import"./chunk-JFIKQKZJ.js";import"./chunk-N4NZWFKH.js";import"./chunk-ABIVPSDV.js";import"./chunk-XULGDGRO.js";import"./chunk-43NB6BM4.js";import"./chunk-OVEGWW7W.js";import"./chunk-LL4377Z2.js";import"./chunk-GAOYV53E.js";import"./chunk-W6JPMHYE.js";import{b as Oe,c as De,f as ke,g as Ue}from"./chunk-QBATIT4O.js";import"./chunk-7WXNWXL7.js";import{a as we}from"./chunk-HNHLGX7F.js";import{a as Me}from"./chunk-EIY6FYXM.js";import"./chunk-FVUFPTGH.js";import"./chunk-LXFJ7QGK.js";import{a as Ee,b as Pe}from"./chunk-YBJV7L3X.js";import"./chunk-YPU6WRZS.js";import"./chunk-G7E24J2R.js";import"./chunk-VYA2NFJ5.js";import"./chunk-SH55PTEY.js";import"./chunk-VPS35GPI.js";import"./chunk-UGBMCXS6.js";import"./chunk-5TTXT2K2.js";import"./chunk-YNQPX5G6.js";import{O as H}from"./chunk-3NJAM5KX.js";import"./chunk-XWIHLWXU.js";import{a as Ie,b as ye,c as Te}from"./chunk-BQPO535K.js";import"./chunk-HLLBCLO6.js";import"./chunk-4P6SOZDY.js";import"./chunk-XN7T54IM.js";import"./chunk-RULWGB4E.js";import"./chunk-2HIDUY57.js";import{b as Ce,c as he}from"./chunk-U5Y75IZ5.js";import"./chunk-HY3IUHOC.js";import"./chunk-4AEX2WLA.js";import"./chunk-2MELUOYA.js";import{va as xe}from"./chunk-WOPE6PPO.js";import{E as B,F as fe,h as ue,o as _e}from"./chunk-MDIMQ3H3.js";import"./chunk-X5NV24AP.js";import"./chunk-P5XU6INT.js";import"./chunk-MWDJTJ3O.js";import"./chunk-7CQSSHSC.js";import"./chunk-3DEA4WWC.js";import{a as ce}from"./chunk-UKMVGESE.js";import{q as ge}from"./chunk-TKVDP62Z.js";import{$b as G,Ad as R,Bb as S,Cc as re,Db as v,Dc as le,Eb as ee,F as K,Fa as U,Fc as pe,Gb as te,Hb as ie,Ib as c,J as Y,Jb as n,Kb as o,Kc as g,Lb as b,Lc as C,Mc as ae,Pb as E,Qb as P,Ua as X,Ub as w,Xb as f,Xc as Q,Yc as L,Z as j,Za as a,Zb as s,_b as ne,ba as J,bc as F,cc as N,dc as A,eb as $,ga as z,hc as V,ib as y,jc as oe,k as q,mc as r,nb as Z,nc as d,nd as me,ob as T,oc as I,ra as M,rc as O,sc as D,tc as k,td as se,va as u,wa as _,xd as de}from"./chunk-GJDGQISV.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var qe=["stepperRef"],Ke=[[["preview"]],[["complete"]]],Ye=["preview","complete"];function Je(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function Xe(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function Ze(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function et(t,p){t&1&&(b(0,"i",8),n(1,"span"),r(2,"Upload"),o())}function tt(t,p){if(t&1){let e=w();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),r(5," Please refer this "),n(6,"a",14),r(7,"article"),o(),r(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(),X)}}function it(t,p){if(t&1&&S(0,tt,9,3,"div",9),t&2){s();let e=V(1);v(e.selectedIndex===0?0:-1)}}function nt(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function ot(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function rt(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function lt(t,p){t&1&&(b(0,"i",15),n(1,"span"),r(2,"Preview"),o())}function pt(t,p){t&1&&G(0)}function at(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function mt(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function st(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function dt(t,p){t&1&&(b(0,"i",16),n(1,"span"),r(2,"Finish"),o())}function ct(t,p){t&1&&G(0,1)}var h=(function(t){return t[t.UPLOAD=0]="UPLOAD",t[t.PREVIEW=1]="PREVIEW",t[t.COMPLETE=2]="COMPLETE",t})(h||{}),Qe=(()=>{class t{constructor(){this.sampleUrl=L(""),this.articleLink=L(),this._onDropFile=Q({alias:"onDropFile"}),this.disabledEdit=L(!1),this._onStateChange=Q({alias:"onStateChange"}),console.log("Import Stepper Component Initialized")}get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected&&(this.stepper.selected.completed=!0),this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(e){e.selectedIndex===1?this._onStateChange.emit(h.PREVIEW):e.selectedIndex===2?this._onStateChange.emit(h.COMPLETE):this._onStateChange.emit(h.UPLOAD)}onDropFile(e){this._onDropFile.emit(e)}onRemoveFile(){}stateUpload(){}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=y({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(l,i){if(l&1&&F(qe,5),l&2){let m;N(m=A())&&(i._stepper=m.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ye,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(l,i){l&1&&(ne(Ke),n(0,"mat-stepper",1,0),f("selectionChange",function(x){return i.onStepChange(x)}),n(2,"mat-step",2),T(3,Je,1,1,"ng-template",3)(4,Xe,1,1,"ng-template",4)(5,Ze,1,1,"ng-template",5)(6,et,3,0,"ng-template",6)(7,it,1,1,"ng-template",7),o(),n(8,"mat-step",2),T(9,nt,1,1,"ng-template",3)(10,ot,1,1,"ng-template",4)(11,rt,1,1,"ng-template",5)(12,lt,3,0,"ng-template",6)(13,pt,1,0,"ng-template",7),o(),n(14,"mat-step",2),T(15,at,1,1,"ng-template",3)(16,mt,1,1,"ng-template",4)(17,st,1,1,"ng-template",5)(18,dt,3,0,"ng-template",6)(19,ct,1,0,"ng-template",7),o()()),l&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!i.disabledEdit()),a(6),c("completed",!1)("editable",!i.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[Se,B,fe,ve,be,ze,Fe,je,Be,Ve,We,Le,Re],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}"]})}}return t})();var W=class t{configModal=new Ce;dialogRef=M(Ie);data=M(ye);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=y({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,l){e&1&&(n(0,"modal-material",0),f("onOk",function(){return l.onOk()})("onCancel",function(){return l.onClose()})("onClose",function(){return l.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),r(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),r(12),g(13,"number"),o(),n(14,"span",8),r(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),r(19),g(20,"number"),o(),n(21,"span",8),r(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),r(26),g(27,"number"),o(),n(28,"span",8),r(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",l.configModal),a(12),d(C(13,4,l.data==null?null:l.data.new)),a(7),d(C(20,6,l.data==null?null:l.data.update)),a(7),d(C(27,8,l.data==null?null:l.data.newOutletGroup)))},dependencies:[R,he,de],encapsulation:2})};var ft=["importStepper"],gt=()=>({"min-width":"50rem"}),Ct=(t,p,e)=>({"btn-success":t,"btn-outline-secondary":p,"not-allowed":e}),ht=t=>({"mb-1":t});function xt(t,p){if(t&1){let e=w();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),r(1," Back "),o()}}function St(t,p){if(t&1){let e=w();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),r(3," Next "),o()}if(t&2){let e,l,i=s();c("ngClass",pe(6,Ct,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((l=C(2,4,i.importPreview$))!=null&&l.CanProceed)&&i.currentState()===1)}}function vt(t,p){if(t&1){let e=w();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),r(1," New "),o()}}function bt(t,p){if(t&1){let e=w();n(0,"tr")(1,"th",16),r(2,"Name"),o(),n(3,"th",17),r(4,"Code"),o(),n(5,"th",18),r(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=V(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),r(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),r(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),r(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),r(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),r(30,"Update"),o()()()()(),n(31,"th"),r(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),O("ngModel",e.filterTreeCondition),a(4),O("ngModel",e.filterTreeCondition),a(4),O("ngModel",e.filterTreeCondition),a(4),O("ngModel",e.filterTreeCondition)}}function wt(t,p){if(t&1&&(n(0,"div",33)(1,"span",34),r(2),o(),n(3,"span"),r(4),o()()),t&2){let e=p.$implicit,l=p.$index,i=s().$implicit;c("ngClass",le(3,ht,l<i.Issues.length-1)),a(2),I(" ",e.Issue,". "),a(2),I("",e.Solution," ")}}function It(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),o(),n(3,"td"),r(4),o(),n(5,"td"),r(6),o(),n(7,"td"),te(8,wt,5,5,"div",33,ee),o()()),t&2){let e=p.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),oe("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),I(" ",e.Action," "),a(2),ie(e.Issues)}}function yt(t,p){if(t&1&&(n(0,"div",37)(1,"span"),r(2),o(),r(3,", "),n(4,"span"),r(5),o(),n(6,"span"),r(7),o(),n(8,"span"),r(9,"succesfully imported"),o()()),t&2){let e=p;a(2),I("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),I("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),I("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Tt(t,p){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),r(3,"Upload Complete!"),o(),S(4,yt,10,3,"div",37),g(5,"async"),o()),t&2){let e,l=s();a(4),v((e=C(5,1,l.importPreview$))?4:-1,e)}}var He=class t extends we{constructor(e,l){super(e);this.httpService=l;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=U(null);importPreview$;sampleImportFileUrl=ce.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=U(h.UPLOAD);confirmImport$;importPreview=U(null);dialog=M(Te);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case h.UPLOAD:this.onPreviewImport();break;case h.PREVIEW: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(()=>h.UPLOAD),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(H.previewImportOutlet,e).pipe(z(l=>{this.importPreview.set(l),this.importStepper.nextStep()}),j(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(K(e=>e==!0),J(()=>this.httpService.post(H.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),z(e=>{this.importStepper.nextStep()}),Y(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],q)),j(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(l){return new(l||t)($(Me),$(ge))};static \u0275cmp=y({type:t,selectors:[["app-outlet-import"]],viewQuery:function(l,i){if(l&1&&F(ft,5),l&2){let m;N(m=A())&&(i.importStepper=m.first)}},features:[Z],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(l,i){if(l&1&&(n(0,"mainpanel-cmp",2),E(1,3),S(2,xt,2,0,"button",4),S(3,St,4,10,"button",5),S(4,vt,2,0,"button",4),P(),E(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(x){return i.onDropFile(x)})("onStateChange",function(x){return i.onStateChange(x)}),E(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),T(12,bt,33,5,"ng-template",10)(13,It,10,9,"ng-template",11),o(),P(),E(14,12),S(15,Tt,6,3,"div",13),g(16,"async"),P(),o(),P(),o()),l&2){let m,x;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),v(i.currentState()==1?2:-1),a(),v(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),v(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",ae(11,15,(x=C(10,13,i.importPreview$))==null?null:x.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",re(20,gt)),a(6),v(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[R,me,Qe,Ue,ke,Ae,Ne,xe,Pe,Ee,B,ue,_e,De,Oe,se,$e],encapsulation:2})};export{He as OutletImportComponent};
1
+ import{a as $e}from"./chunk-VDBNEUI3.js";import{b as Ve,c as Le,d as Re,e as Be,f as We,g as je}from"./chunk-GOB3T42H.js";import{b as ze}from"./chunk-D2UNYCWT.js";import"./chunk-RG65F34V.js";import"./chunk-HT6DSP63.js";import{c as be}from"./chunk-J63OB27M.js";import{c as Se}from"./chunk-MPN57TB5.js";import"./chunk-KF3MHC66.js";import{b as ve}from"./chunk-KBZZ7PX4.js";import"./chunk-ETGLCIRD.js";import{a as Ne,f as Ae}from"./chunk-7EJFKF2Q.js";import"./chunk-WJGP2CLN.js";import{d as Fe}from"./chunk-2ZXCNSZZ.js";import"./chunk-4OKIVQZ3.js";import"./chunk-JLQUTBFH.js";import"./chunk-YHXZO4DY.js";import"./chunk-JEKS3WOF.js";import"./chunk-JFIKQKZJ.js";import"./chunk-N4NZWFKH.js";import"./chunk-6PB6HGKN.js";import"./chunk-XULGDGRO.js";import"./chunk-43NB6BM4.js";import"./chunk-OVEGWW7W.js";import"./chunk-LL4377Z2.js";import"./chunk-GAOYV53E.js";import"./chunk-W6JPMHYE.js";import{b as Oe,c as De,f as ke,g as Ue}from"./chunk-WH4C7VZ6.js";import"./chunk-UZ2ED2LT.js";import{a as we}from"./chunk-HNHLGX7F.js";import{a as Me}from"./chunk-Y7HXBEAC.js";import"./chunk-FVUFPTGH.js";import"./chunk-LXFJ7QGK.js";import{a as Ee,b as Pe}from"./chunk-YJCC7NCW.js";import"./chunk-NR3F4GV4.js";import"./chunk-G7E24J2R.js";import"./chunk-VYA2NFJ5.js";import"./chunk-SH55PTEY.js";import"./chunk-VPS35GPI.js";import"./chunk-UGBMCXS6.js";import"./chunk-5TTXT2K2.js";import"./chunk-YNQPX5G6.js";import{O as H}from"./chunk-3NJAM5KX.js";import"./chunk-JZ2BEY7A.js";import{a as Ie,b as ye,c as Te}from"./chunk-BQPO535K.js";import"./chunk-HLLBCLO6.js";import"./chunk-4P6SOZDY.js";import"./chunk-XN7T54IM.js";import"./chunk-RULWGB4E.js";import"./chunk-2HIDUY57.js";import{b as Ce,c as he}from"./chunk-U5Y75IZ5.js";import"./chunk-HY3IUHOC.js";import"./chunk-4AEX2WLA.js";import"./chunk-2MELUOYA.js";import{va as xe}from"./chunk-WOPE6PPO.js";import{E as B,F as fe,h as ue,o as _e}from"./chunk-MDIMQ3H3.js";import"./chunk-HLO2AGAR.js";import"./chunk-T77BLOPU.js";import"./chunk-MWDJTJ3O.js";import"./chunk-7CQSSHSC.js";import"./chunk-3DEA4WWC.js";import{a as ce}from"./chunk-2SCMKR5I.js";import{q as ge}from"./chunk-TKVDP62Z.js";import{$b as G,Ad as R,Bb as S,Cc as re,Db as v,Dc as le,Eb as ee,F as K,Fa as U,Fc as pe,Gb as te,Hb as ie,Ib as c,J as Y,Jb as n,Kb as o,Kc as g,Lb as b,Lc as C,Mc as ae,Pb as E,Qb as P,Ua as X,Ub as w,Xb as f,Xc as Q,Yc as L,Z as j,Za as a,Zb as s,_b as ne,ba as J,bc as F,cc as N,dc as A,eb as $,ga as z,hc as V,ib as y,jc as oe,k as q,mc as r,nb as Z,nc as d,nd as me,ob as T,oc as I,ra as M,rc as O,sc as D,tc as k,td as se,va as u,wa as _,xd as de}from"./chunk-GJDGQISV.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var qe=["stepperRef"],Ke=[[["preview"]],[["complete"]]],Ye=["preview","complete"];function Je(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function Xe(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function Ze(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function et(t,p){t&1&&(b(0,"i",8),n(1,"span"),r(2,"Upload"),o())}function tt(t,p){if(t&1){let e=w();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),r(5," Please refer this "),n(6,"a",14),r(7,"article"),o(),r(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(),X)}}function it(t,p){if(t&1&&S(0,tt,9,3,"div",9),t&2){s();let e=V(1);v(e.selectedIndex===0?0:-1)}}function nt(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function ot(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function rt(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function lt(t,p){t&1&&(b(0,"i",15),n(1,"span"),r(2,"Preview"),o())}function pt(t,p){t&1&&G(0)}function at(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function mt(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function st(t,p){if(t&1&&r(0),t&2){let e=p.index;d(e+1)}}function dt(t,p){t&1&&(b(0,"i",16),n(1,"span"),r(2,"Finish"),o())}function ct(t,p){t&1&&G(0,1)}var h=(function(t){return t[t.UPLOAD=0]="UPLOAD",t[t.PREVIEW=1]="PREVIEW",t[t.COMPLETE=2]="COMPLETE",t})(h||{}),Qe=(()=>{class t{constructor(){this.sampleUrl=L(""),this.articleLink=L(),this._onDropFile=Q({alias:"onDropFile"}),this.disabledEdit=L(!1),this._onStateChange=Q({alias:"onStateChange"}),console.log("Import Stepper Component Initialized")}get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected&&(this.stepper.selected.completed=!0),this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(e){e.selectedIndex===1?this._onStateChange.emit(h.PREVIEW):e.selectedIndex===2?this._onStateChange.emit(h.COMPLETE):this._onStateChange.emit(h.UPLOAD)}onDropFile(e){this._onDropFile.emit(e)}onRemoveFile(){}stateUpload(){}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=y({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(l,i){if(l&1&&F(qe,5),l&2){let m;N(m=A())&&(i._stepper=m.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ye,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(l,i){l&1&&(ne(Ke),n(0,"mat-stepper",1,0),f("selectionChange",function(x){return i.onStepChange(x)}),n(2,"mat-step",2),T(3,Je,1,1,"ng-template",3)(4,Xe,1,1,"ng-template",4)(5,Ze,1,1,"ng-template",5)(6,et,3,0,"ng-template",6)(7,it,1,1,"ng-template",7),o(),n(8,"mat-step",2),T(9,nt,1,1,"ng-template",3)(10,ot,1,1,"ng-template",4)(11,rt,1,1,"ng-template",5)(12,lt,3,0,"ng-template",6)(13,pt,1,0,"ng-template",7),o(),n(14,"mat-step",2),T(15,at,1,1,"ng-template",3)(16,mt,1,1,"ng-template",4)(17,st,1,1,"ng-template",5)(18,dt,3,0,"ng-template",6)(19,ct,1,0,"ng-template",7),o()()),l&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!i.disabledEdit()),a(6),c("completed",!1)("editable",!i.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[Se,B,fe,ve,be,ze,Fe,je,Be,Ve,We,Le,Re],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}"]})}}return t})();var W=class t{configModal=new Ce;dialogRef=M(Ie);data=M(ye);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=y({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,l){e&1&&(n(0,"modal-material",0),f("onOk",function(){return l.onOk()})("onCancel",function(){return l.onClose()})("onClose",function(){return l.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),r(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),r(12),g(13,"number"),o(),n(14,"span",8),r(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),r(19),g(20,"number"),o(),n(21,"span",8),r(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),r(26),g(27,"number"),o(),n(28,"span",8),r(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",l.configModal),a(12),d(C(13,4,l.data==null?null:l.data.new)),a(7),d(C(20,6,l.data==null?null:l.data.update)),a(7),d(C(27,8,l.data==null?null:l.data.newOutletGroup)))},dependencies:[R,he,de],encapsulation:2})};var ft=["importStepper"],gt=()=>({"min-width":"50rem"}),Ct=(t,p,e)=>({"btn-success":t,"btn-outline-secondary":p,"not-allowed":e}),ht=t=>({"mb-1":t});function xt(t,p){if(t&1){let e=w();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),r(1," Back "),o()}}function St(t,p){if(t&1){let e=w();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),r(3," Next "),o()}if(t&2){let e,l,i=s();c("ngClass",pe(6,Ct,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((l=C(2,4,i.importPreview$))!=null&&l.CanProceed)&&i.currentState()===1)}}function vt(t,p){if(t&1){let e=w();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),r(1," New "),o()}}function bt(t,p){if(t&1){let e=w();n(0,"tr")(1,"th",16),r(2,"Name"),o(),n(3,"th",17),r(4,"Code"),o(),n(5,"th",18),r(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=V(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),r(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),r(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),r(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),r(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),k("ngModelChange",function(i){u(e);let m=s();return D(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),r(30,"Update"),o()()()()(),n(31,"th"),r(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),O("ngModel",e.filterTreeCondition),a(4),O("ngModel",e.filterTreeCondition),a(4),O("ngModel",e.filterTreeCondition),a(4),O("ngModel",e.filterTreeCondition)}}function wt(t,p){if(t&1&&(n(0,"div",33)(1,"span",34),r(2),o(),n(3,"span"),r(4),o()()),t&2){let e=p.$implicit,l=p.$index,i=s().$implicit;c("ngClass",le(3,ht,l<i.Issues.length-1)),a(2),I(" ",e.Issue,". "),a(2),I("",e.Solution," ")}}function It(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),o(),n(3,"td"),r(4),o(),n(5,"td"),r(6),o(),n(7,"td"),te(8,wt,5,5,"div",33,ee),o()()),t&2){let e=p.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),oe("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),I(" ",e.Action," "),a(2),ie(e.Issues)}}function yt(t,p){if(t&1&&(n(0,"div",37)(1,"span"),r(2),o(),r(3,", "),n(4,"span"),r(5),o(),n(6,"span"),r(7),o(),n(8,"span"),r(9,"succesfully imported"),o()()),t&2){let e=p;a(2),I("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),I("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),I("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Tt(t,p){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),r(3,"Upload Complete!"),o(),S(4,yt,10,3,"div",37),g(5,"async"),o()),t&2){let e,l=s();a(4),v((e=C(5,1,l.importPreview$))?4:-1,e)}}var He=class t extends we{constructor(e,l){super(e);this.httpService=l;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=U(null);importPreview$;sampleImportFileUrl=ce.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=U(h.UPLOAD);confirmImport$;importPreview=U(null);dialog=M(Te);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case h.UPLOAD:this.onPreviewImport();break;case h.PREVIEW: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(()=>h.UPLOAD),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(H.previewImportOutlet,e).pipe(z(l=>{this.importPreview.set(l),this.importStepper.nextStep()}),j(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(K(e=>e==!0),J(()=>this.httpService.post(H.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),z(e=>{this.importStepper.nextStep()}),Y(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],q)),j(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(l){return new(l||t)($(Me),$(ge))};static \u0275cmp=y({type:t,selectors:[["app-outlet-import"]],viewQuery:function(l,i){if(l&1&&F(ft,5),l&2){let m;N(m=A())&&(i.importStepper=m.first)}},features:[Z],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(l,i){if(l&1&&(n(0,"mainpanel-cmp",2),E(1,3),S(2,xt,2,0,"button",4),S(3,St,4,10,"button",5),S(4,vt,2,0,"button",4),P(),E(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(x){return i.onDropFile(x)})("onStateChange",function(x){return i.onStateChange(x)}),E(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),T(12,bt,33,5,"ng-template",10)(13,It,10,9,"ng-template",11),o(),P(),E(14,12),S(15,Tt,6,3,"div",13),g(16,"async"),P(),o(),P(),o()),l&2){let m,x;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),v(i.currentState()==1?2:-1),a(),v(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),v(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",ae(11,15,(x=C(10,13,i.importPreview$))==null?null:x.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",re(20,gt)),a(6),v(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[R,me,Qe,Ue,ke,Ae,Ne,xe,Pe,Ee,B,ue,_e,De,Oe,se,$e],encapsulation:2})};export{He as OutletImportComponent};