dealpos 25.43.1 → 25.44.0

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 (96) hide show
  1. package/browser/{chunk-2JIKUIDL.js → chunk-2FWXO7SV.js} +1 -1
  2. package/browser/{chunk-57MXTPFO.js → chunk-2HUEFC2T.js} +1 -1
  3. package/browser/{chunk-C6IQAVJS.js → chunk-2KCCP5UQ.js} +1 -1
  4. package/browser/{chunk-VENGWIVD.js → chunk-2PX7ZCAH.js} +2 -2
  5. package/browser/{chunk-Z37RWBOK.js → chunk-35WLGG74.js} +1 -1
  6. package/browser/{chunk-OLSCBS7E.js → chunk-3PTKHKTZ.js} +1 -1
  7. package/browser/{chunk-XSFHNUQ6.js → chunk-476U7URX.js} +2 -2
  8. package/browser/{chunk-3GMOIUSS.js → chunk-4TW7XHFP.js} +1 -1
  9. package/browser/{chunk-NO3WSZS5.js → chunk-6ABP4TP7.js} +1 -1
  10. package/browser/{chunk-NFOTQGFN.js → chunk-6PWFGFWQ.js} +1 -1
  11. package/browser/chunk-6SNK3MMW.js +1 -0
  12. package/browser/{chunk-6RZ53266.js → chunk-7CMBWKFF.js} +1 -1
  13. package/browser/chunk-7J36T25H.js +1 -0
  14. package/browser/{chunk-H6GRYEQ4.js → chunk-7NGYBSTA.js} +2 -2
  15. package/browser/{chunk-Y2OQ4XO7.js → chunk-7V7QIPRV.js} +1 -1
  16. package/browser/{chunk-A2TEU2OJ.js → chunk-A4HMT7IS.js} +1 -1
  17. package/browser/{chunk-I6HHFYJH.js → chunk-AJLKESQV.js} +1 -1
  18. package/browser/{chunk-JVMOM4H4.js → chunk-ARKU4MG5.js} +1 -1
  19. package/browser/{chunk-BYKM6B3Q.js → chunk-BJBJJUF7.js} +1 -1
  20. package/browser/{chunk-Z2CJVOIM.js → chunk-BMMZ2W3C.js} +1 -1
  21. package/browser/{chunk-GFLMSLNA.js → chunk-BMW3GOBJ.js} +1 -1
  22. package/browser/{chunk-4CNWLAOB.js → chunk-BSQJETW6.js} +1 -1
  23. package/browser/chunk-BX366TSG.js +1 -0
  24. package/browser/chunk-C2W6JXEB.js +3 -0
  25. package/browser/{chunk-JMXQLXVT.js → chunk-CN4B6FUG.js} +1 -1
  26. package/browser/{chunk-DOQHHRXL.js → chunk-CXTL5YYJ.js} +2 -2
  27. package/browser/{chunk-T5WB2M55.js → chunk-DEVO5OTP.js} +1 -1
  28. package/browser/{chunk-NI5NXM2W.js → chunk-EVWNBQBC.js} +1 -1
  29. package/browser/{chunk-RN5G3YLF.js → chunk-F4F5V5CZ.js} +2 -2
  30. package/browser/{chunk-U5PGKEGA.js → chunk-FA4ADELT.js} +1 -1
  31. package/browser/{chunk-UBUK5KM7.js → chunk-FHMDB7MQ.js} +1 -1
  32. package/browser/{chunk-VYI363VS.js → chunk-G6USNHW7.js} +1 -1
  33. package/browser/{chunk-H3BDFRHN.js → chunk-GBQSPBVZ.js} +1 -1
  34. package/browser/{chunk-IFZ2NAV2.js → chunk-GV2PUDWZ.js} +2 -2
  35. package/browser/{chunk-NGCYLGR7.js → chunk-GYNHYLZQ.js} +1 -1
  36. package/browser/{chunk-UGXAYAI3.js → chunk-HCSPFPLE.js} +1 -1
  37. package/browser/chunk-HKZQN5TX.js +14 -0
  38. package/browser/{chunk-CDKC2IEJ.js → chunk-IHFA5AEL.js} +1 -1
  39. package/browser/{chunk-2GLNGDED.js → chunk-IOJ4YVHD.js} +1 -1
  40. package/browser/{chunk-LIBVAZGG.js → chunk-IQQGAD2W.js} +1 -1
  41. package/browser/{chunk-3IKQFILS.js → chunk-JUTITMC7.js} +2 -2
  42. package/browser/{chunk-WQJI7XHD.js → chunk-JXYRDQVO.js} +1 -1
  43. package/browser/{chunk-OV75G3U6.js → chunk-K4LAZCXZ.js} +1 -1
  44. package/browser/{chunk-PQETJOPQ.js → chunk-KKRF45KI.js} +1 -1
  45. package/browser/{chunk-4D4MCKGG.js → chunk-KXCEORNJ.js} +1 -1
  46. package/browser/{chunk-GXORILER.js → chunk-LI2NYODY.js} +1 -1
  47. package/browser/{chunk-CNAUUTLV.js → chunk-LLQVL4JL.js} +1 -1
  48. package/browser/{chunk-ZRLTY3JK.js → chunk-LVYO35LX.js} +1 -1
  49. package/browser/{chunk-52ZEPEED.js → chunk-M5PJHCX4.js} +1 -1
  50. package/browser/{chunk-JS46U7DQ.js → chunk-NRYWKVQ2.js} +1 -1
  51. package/browser/{chunk-SGMOAMW4.js → chunk-ODOWAGLZ.js} +1 -1
  52. package/browser/{chunk-BCG3SRBR.js → chunk-PANAC2WS.js} +1 -1
  53. package/browser/{chunk-6YAUV6CS.js → chunk-PQDYHLJ2.js} +1 -1
  54. package/browser/{chunk-NQOLXD3A.js → chunk-QHGWF2RX.js} +1 -1
  55. package/browser/{chunk-TDQR33OS.js → chunk-QVPSWY5E.js} +1 -1
  56. package/browser/{chunk-YVHW6R5M.js → chunk-QXU66IK7.js} +1 -1
  57. package/browser/{chunk-E6PWTYNB.js → chunk-RABEENVP.js} +1 -1
  58. package/browser/{chunk-YWN3ZCUG.js → chunk-RF2OEHPO.js} +1 -1
  59. package/browser/{chunk-W32SMIPG.js → chunk-RMOQAAKS.js} +1 -1
  60. package/browser/{chunk-UDLO26TH.js → chunk-RW4LIELV.js} +1 -1
  61. package/browser/{chunk-P4CJOEI6.js → chunk-S22XRS4J.js} +1 -1
  62. package/browser/chunk-S2QC3PGR.js +112 -0
  63. package/browser/chunk-S5ZMZ6ZK.js +1 -0
  64. package/browser/{chunk-U4L3DUPD.js → chunk-SJPYABFR.js} +1 -1
  65. package/browser/{chunk-LNYS472E.js → chunk-SMZ4VMLX.js} +1 -1
  66. package/browser/{chunk-RCY7OLTB.js → chunk-SVV5ZTGZ.js} +1 -1
  67. package/browser/{chunk-3Z3OMRKK.js → chunk-T6WJAS3H.js} +1 -1
  68. package/browser/{chunk-PVJW7F4C.js → chunk-TGFYFTBV.js} +1 -1
  69. package/browser/{chunk-5EQYYGRS.js → chunk-TMADIQOR.js} +1 -1
  70. package/browser/{chunk-6HRNGZFH.js → chunk-UMDNTO5M.js} +1 -1
  71. package/browser/{chunk-7N5UGQ7Y.js → chunk-USUWU5NE.js} +1 -1
  72. package/browser/{chunk-ZT4JJ72K.js → chunk-V26H2UIF.js} +1 -1
  73. package/browser/{chunk-NHKBCTZ6.js → chunk-V5ZK5RT7.js} +14 -14
  74. package/browser/{chunk-UP6OSHOB.js → chunk-VIJLHA7Q.js} +1 -1
  75. package/browser/{chunk-XFE22V65.js → chunk-VIPGZJM3.js} +1 -1
  76. package/browser/{chunk-W7ENV5BI.js → chunk-W5U5OOLP.js} +2 -2
  77. package/browser/{chunk-RQMKNBVM.js → chunk-WAMC5CEY.js} +1 -1
  78. package/browser/{chunk-3XLXCEOJ.js → chunk-WLGAEGPV.js} +1 -1
  79. package/browser/{chunk-DE6YZETL.js → chunk-WQDFMYT7.js} +1 -1
  80. package/browser/{chunk-CRD6NHJP.js → chunk-WQDUNDSA.js} +1 -1
  81. package/browser/{chunk-WRHHRT4D.js → chunk-XDINGYNX.js} +1 -1
  82. package/browser/{chunk-52JGOESX.js → chunk-XPWSJXFB.js} +1 -1
  83. package/browser/{chunk-JYLR5O5Q.js → chunk-XQ6JBIMX.js} +1 -1
  84. package/browser/chunk-YEAPJ2OC.js +1 -0
  85. package/browser/index.html +2 -2
  86. package/browser/{main-CSOK2PD4.js → main-GH4LELYQ.js} +2 -2
  87. package/browser/{styles-SJXE22QD.css → styles-NK7HCBOK.css} +1 -1
  88. package/package.json +1 -1
  89. package/browser/chunk-B353J3HM.js +0 -1
  90. package/browser/chunk-BO3347ID.js +0 -1
  91. package/browser/chunk-EY5ARDBV.js +0 -112
  92. package/browser/chunk-GNWOJUDL.js +0 -3
  93. package/browser/chunk-JD2KU6EZ.js +0 -1
  94. package/browser/chunk-KAVRH6F5.js +0 -1
  95. package/browser/chunk-SRYUX7SP.js +0 -1
  96. package/browser/chunk-XFH6XZNJ.js +0 -14
@@ -1 +1 @@
1
- import{c as U,d as W}from"./chunk-2GLNGDED.js";import{a as X,b as Y}from"./chunk-6JAL37Y4.js";import{b as K,c as Q}from"./chunk-JOXTERIM.js";import{a as A}from"./chunk-7VKFVS7K.js";import{la as J}from"./chunk-EEEAUYZ6.js";import{F as G,h as B,o as q}from"./chunk-RVXZOIFQ.js";import{a as C}from"./chunk-ZZGSAFGO.js";import{$a as _,Ac as k,Db as H,Fa as M,Fc as F,Ib as c,Jb as m,Nb as L,Ob as V,Qb as j,Rb as n,Y as S,Yd as d,bd as N,ca as h,cd as P,d as x,db as b,dc as I,ec as v,fa as T,ga as u,gc as E,ja as w,jd as z,kb as $,ma as O,na as D,o as f,qb as a,va as p,vb as l,wa as g,zc as R}from"./chunk-UXRO4UFY.js";var y=class o{signalRClient=D(A);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):f(e),[]),S(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):f(e),[]),S(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(d))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function ie(o,t){o&1&&L(0)}function re(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,ie,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ne(o,t){o&1&&L(0)}function ae(o,t){if(o&1&&a(0,ne,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function le(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),E(" ",e.selectedCategoryLabel," ")}}function ce(o,t){if(o&1){let e=V();c(0,"p-treeSelect",4),R(1,"async"),j("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,le,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",k(1,3,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)}}var Z=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(C.IsEmpty(this.selectedCategoryID)&&C.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel="Select Storage Location"}findSelectedCategory(t,e){if(C.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(d),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory","placeholder","Select Storage Location",3,"click","ngModelChange","onClear","options","ngModel","showClear"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&a(0,re,4,1,"p-floatLabel",1)(1,ae,1,1,"ng-container")(2,ce,3,5,"ng-template",null,0,F),e&2&&H(i.showLabel?0:1)},dependencies:[z,N,P,Q,K,W,U,J,G,B,q,Y,X],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{Z as a};
1
+ import{c as U,d as W}from"./chunk-IOJ4YVHD.js";import{a as X,b as Y}from"./chunk-6JAL37Y4.js";import{b as K,c as Q}from"./chunk-JOXTERIM.js";import{a as A}from"./chunk-7VKFVS7K.js";import{la as J}from"./chunk-EEEAUYZ6.js";import{F as G,h as B,o as q}from"./chunk-RVXZOIFQ.js";import{a as C}from"./chunk-ZZGSAFGO.js";import{$a as _,Ac as k,Db as H,Fa as M,Fc as F,Ib as c,Jb as m,Nb as L,Ob as V,Qb as j,Rb as n,Y as S,Yd as d,bd as N,ca as h,cd as P,d as x,db as b,dc as I,ec as v,fa as T,ga as u,gc as E,ja as w,jd as z,kb as $,ma as O,na as D,o as f,qb as a,va as p,vb as l,wa as g,zc as R}from"./chunk-UXRO4UFY.js";var y=class o{signalRClient=D(A);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):f(e),[]),S(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):f(e),[]),S(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(d))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function ie(o,t){o&1&&L(0)}function re(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,ie,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ne(o,t){o&1&&L(0)}function ae(o,t){if(o&1&&a(0,ne,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function le(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),E(" ",e.selectedCategoryLabel," ")}}function ce(o,t){if(o&1){let e=V();c(0,"p-treeSelect",4),R(1,"async"),j("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,le,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",k(1,3,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)}}var Z=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(C.IsEmpty(this.selectedCategoryID)&&C.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel="Select Storage Location"}findSelectedCategory(t,e){if(C.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(d),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory","placeholder","Select Storage Location",3,"click","ngModelChange","onClear","options","ngModel","showClear"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&a(0,re,4,1,"p-floatLabel",1)(1,ae,1,1,"ng-container")(2,ce,3,5,"ng-template",null,0,F),e&2&&H(i.showLabel?0:1)},dependencies:[z,N,P,Q,K,W,U,J,G,B,q,Y,X],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{Z as a};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-ZZGSAFGO.js";import{a as t}from"./chunk-TDQR33OS.js";import{ja as i}from"./chunk-UXRO4UFY.js";import{a}from"./chunk-7DCB7DB2.js";var n=class o{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:t.intercom.appId,name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!0,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!1,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return c.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static \u0275fac=function(r){return new(r||o)};static \u0275prov=i({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
1
+ import{a as c}from"./chunk-ZZGSAFGO.js";import{a as t}from"./chunk-QVPSWY5E.js";import{ja as i}from"./chunk-UXRO4UFY.js";import{a}from"./chunk-7DCB7DB2.js";var n=class o{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:t.intercom.appId,name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!0,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!1,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return c.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static \u0275fac=function(r){return new(r||o)};static \u0275prov=i({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
@@ -1,2 +1,2 @@
1
- import{O as b}from"./chunk-TSIYPTYI.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-TDQR33OS.js";import{Vd as d,Yd as h,ja as n,na as c}from"./chunk-UXRO4UFY.js";import{j as l}from"./chunk-7DCB7DB2.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
1
+ import{O as b}from"./chunk-TSIYPTYI.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-QVPSWY5E.js";import{Vd as d,Yd as h,ja as n,na as c}from"./chunk-UXRO4UFY.js";import{j as l}from"./chunk-7DCB7DB2.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
2
2
  `,"WhatsApp not installed")},2e3)}copyToClipboard(t){return new Promise((o,r)=>this.copyToClipBoard.copy(t).then(()=>{this.toastr.info("Message copied to clipboard. If WhatsApp doesn't show the message, please paste it manually.","Receipt Ready",{timeOut:8e3}),o("Copied to clipboard")}).catch(e=>{console.log(e),this.toastr.warning("Could not copy message to clipboard","Clipboard Error",{timeOut:8e3}),r(e)}))}sendReceiptToWhatsapp(t,o,r,e){return l(this,null,function*(){try{let i=this.createWhatsappReceipt(o,r,e);try{yield this.copyToClipboard(i)}finally{this.redirectToWhatsapp(t,i)}}catch(i){console.warn(i),this.toastr.error("Failed to send receipt")}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac})};export{y as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-TGFYFTBV.js";import"./chunk-NJIOGT5G.js";import"./chunk-HCSPFPLE.js";import"./chunk-XJ7SOVB2.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-7QWJJPNG.js";import"./chunk-3PTKHKTZ.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MUJ6277G.js";import"./chunk-ARKU4MG5.js";import"./chunk-S22XRS4J.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-H7F34T25.js";import"./chunk-JOXTERIM.js";import"./chunk-TSIYPTYI.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import"./chunk-RVXZOIFQ.js";import"./chunk-2FWXO7SV.js";import"./chunk-6ABP4TP7.js";import"./chunk-ZZGSAFGO.js";import"./chunk-QVPSWY5E.js";import"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";export{a as SensitiveFieldComponent};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-SGMOAMW4.js";import{a as t}from"./chunk-7DCB7DB2.js";var i=class extends e{constructor(r,a,o,l,s,p,F){super(r,a,o,l,s,p,F)}preInitLoader(){this.loaderPayload=t({ListIDs:this.reportFilterService.initOutletFilter([])},this.loaderPayload)}preInitList(){this.pageData.Filter.ListIDs=this.loaderPayload.ListIDs,this.pageData.Filter.From=this.reportFilterService.initDateFromFilter(this.pageData?.Filter?.From),this.pageData.Filter.To=this.reportFilterService.initDateToFilter(this.pageData?.Filter?.To)}onFilterOutlets(){this.reportFilterService.setOutletFilter(this.pageData.Filter.ListIDs)}onFilterFromDate(){this.reportFilterService.setDateFromFilter(this.pageData?.Filter?.From)}onFilterToDate(){this.reportFilterService.setDateToFilter(this.pageData?.Filter?.To)}};export{i as a};
1
+ import{a as e}from"./chunk-ODOWAGLZ.js";import{a as t}from"./chunk-7DCB7DB2.js";var i=class extends e{constructor(r,a,o,l,s,p,F){super(r,a,o,l,s,p,F)}preInitLoader(){this.loaderPayload=t({ListIDs:this.reportFilterService.initOutletFilter([])},this.loaderPayload)}preInitList(){this.pageData.Filter.ListIDs=this.loaderPayload.ListIDs,this.pageData.Filter.From=this.reportFilterService.initDateFromFilter(this.pageData?.Filter?.From),this.pageData.Filter.To=this.reportFilterService.initDateToFilter(this.pageData?.Filter?.To)}onFilterOutlets(){this.reportFilterService.setOutletFilter(this.pageData.Filter.ListIDs)}onFilterFromDate(){this.reportFilterService.setDateFromFilter(this.pageData?.Filter?.From)}onFilterToDate(){this.reportFilterService.setDateToFilter(this.pageData?.Filter?.To)}};export{i as a};
@@ -0,0 +1 @@
1
+ import{a as ut,b as Ct}from"./chunk-BX366TSG.js";import{a as _t}from"./chunk-FKDZ5OWB.js";import{a as st}from"./chunk-DEVO5OTP.js";import{a as ft}from"./chunk-BXQFYW4R.js";import"./chunk-4UYZJCFI.js";import"./chunk-BYXBJQAS.js";import{d as dt,e as mt}from"./chunk-GIDGCFLX.js";import"./chunk-XBRBYCWJ.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-H3OZSV6V.js";import"./chunk-YEDKRNXU.js";import"./chunk-VZEPVRCY.js";import"./chunk-7QWJJPNG.js";import{d as rt,e as lt}from"./chunk-6647Y35T.js";import"./chunk-VHAM2DWK.js";import{a as $}from"./chunk-JPXXXD26.js";import{a as X}from"./chunk-ODOWAGLZ.js";import{b as pt}from"./chunk-BBGWXLHJ.js";import{f as ct}from"./chunk-IOJ4YVHD.js";import{b as Z}from"./chunk-QHBWVJIQ.js";import"./chunk-XQ6JBIMX.js";import"./chunk-EVWNBQBC.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as et}from"./chunk-XZR3IMWZ.js";import{e as ot,f as at}from"./chunk-3PTKHKTZ.js";import"./chunk-B6LPY2IZ.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-MUJ6277G.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-ARKU4MG5.js";import{b as tt}from"./chunk-S22XRS4J.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-H7F34T25.js";import{b as J,c as U}from"./chunk-JOXTERIM.js";import{N as nt,g as it}from"./chunk-TSIYPTYI.js";import"./chunk-XYB3YDKL.js";import"./chunk-7VKFVS7K.js";import"./chunk-ZVDY66SR.js";import{g as Y}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as z}from"./chunk-RVXZOIFQ.js";import"./chunk-2FWXO7SV.js";import"./chunk-6ABP4TP7.js";import{d as Q}from"./chunk-ZZGSAFGO.js";import"./chunk-QVPSWY5E.js";import{$a as i,Ac as f,Bc as y,Db as p,Eb as k,Fc as q,Gb as N,Hb as W,Ib as a,Jb as n,Kb as D,Ob as h,Qb as V,Rb as c,Rd as H,Yd as K,Zc as j,db as S,ec as r,fc as P,gc as u,gd as A,jc as T,jd as G,kb as L,kc as g,lc as I,ob as M,qb as v,qc as w,rc as E,ub as O,va as C,vb as s,wa as x,wd as R,zc as d}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";var yt=()=>["/menu/Outlets/Master/Outlets/Info"],b=e=>({ID:e}),vt=()=>["/menu/Products/Catalog/Products/Info"],Tt=()=>["/menu/Products/Catalog/Variants/Info"];function gt(e,l){if(e&1){let t=h();a(0,"button",13),V("click",function(){C(t);let o=c();return x(o.openExportModal())}),D(1,"i",14),r(2," Export "),n()}}function It(e,l){if(e&1){let t=h();a(0,"div",15)(1,"h6"),r(2,"Outlet Group"),n(),a(3,"POS-outlet-group-tree-select",16),I("selectedOutletGroupIDChange",function(o){C(t);let _=c();return g(_.pageData.Filter.OutletGroupID,o)||(_.pageData.Filter.OutletGroupID=o),x(o)}),n(),a(4,"h6"),r(5,"Category"),n(),a(6,"POS-product-category-select",17),I("selectedCategoryIDChange",function(o){C(t);let _=c();return g(_.pageData.Filter.CategoryID,o)||(_.pageData.Filter.CategoryID=o),x(o)}),n(),a(7,"h6"),r(8,"Search Type"),n(),a(9,"radio-options",18),I("modelChange",function(o){C(t);let _=c();return g(_.pageData.Filter.ProductVariantSearchMode,o)||(_.pageData.Filter.ProductVariantSearchMode=o),x(o)}),V("modelChange",function(o){C(t);let _=c();return x(_.onChangeSearchType(o))}),n(),a(10,"autocompleteV3",19),I("modelNameChange",function(o){C(t);let _=c();return g(_.productVariantModel,o)||(_.productVariantModel=o),x(o)}),n(),a(11,"h6"),r(12,"From - To"),n(),a(13,"div")(14,"datepicker",20),I("dateChange",function(o){C(t);let _=c();return g(_.pageData.Filter.From,o)||(_.pageData.Filter.From=o),x(o)}),n()(),a(15,"div",21)(16,"datepicker",22),I("dateChange",function(o){C(t);let _=c();return g(_.pageData.Filter.To,o)||(_.pageData.Filter.To=o),x(o)}),n()(),a(17,"h6"),r(18,"Inventory Type"),n(),a(19,"radio-options",23),I("modelChange",function(o){C(t);let _=c();return g(_.pageData.Filter.InventoryType,o)||(_.pageData.Filter.InventoryType=o),x(o)}),n()()}if(e&2){let t=c();i(3),s("showClear",!0),T("selectedOutletGroupID",t.pageData.Filter.OutletGroupID),i(3),T("selectedCategoryID",t.pageData.Filter.CategoryID),s("showClear",!0),i(3),T("model",t.pageData.Filter.ProductVariantSearchMode),s("options",t.pageData.Options.ProductVariantSearchModes),i(),T("modelName",t.productVariantModel),s("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","Key"),i(4),s("isFloatingLabel",!1),T("date",t.pageData.Filter.From),s("hidelClearBtn",!0),i(2),s("isFloatingLabel",!1),T("date",t.pageData.Filter.To),s("hidelClearBtn",!0),i(3),T("model",t.pageData.Filter.InventoryType),s("options",t.pageData.Options.InventoryTypes)}}function St(e,l){e&1&&(a(0,"th",9)(1,"span",24),r(2," P.Code "),n()())}function ht(e,l){e&1&&(a(0,"th",10),r(1,"Code"),n())}function Vt(e,l){e&1&&(a(0,"th",11)(1,"span",25),r(2," Start "),n()())}function Ft(e,l){e&1&&(a(0,"th",11)(1,"span",26),r(2," Bought "),n()())}function Dt(e,l){e&1&&(a(0,"th",11)(1,"span",27),r(2," Sold "),n()())}function wt(e,l){e&1&&(a(0,"th",11)(1,"span",28),r(2," T.In "),n()())}function Et(e,l){e&1&&(a(0,"th",11)(1,"span",29),r(2," T.Out "),n()())}function Pt(e,l){e&1&&(a(0,"th",11)(1,"span",30),r(2," Adjust "),n()())}function bt(e,l){e&1&&(a(0,"th",11)(1,"span",31),r(2," End "),n()())}function Bt(e,l){e&1&&(a(0,"th",11)(1,"span",32),r(2," Now "),n()())}function Lt(e,l){e&1&&(a(0,"th",11)(1,"span",33),r(2," % "),n()())}function Mt(e,l){if(e&1&&(a(0,"td"),r(1),n()),e&2){let t=c().$implicit;i(),u(" ",t.ProductCode," ")}}function Ot(e,l){if(e&1&&(a(0,"td",35),r(1),n()),e&2){let t=c().$implicit;i(),u(" ",t.VariantCode," ")}}function kt(e,l){if(e&1&&(a(0,"td",36),r(1),d(2,"quantityFraction"),n()),e&2){let t=c().$implicit;s("colsFontColor",t.Start),i(),u(" ",f(2,2,t.Start)," ")}}function Nt(e,l){if(e&1&&(a(0,"td",37),r(1),d(2,"quantityFraction"),n()),e&2){let t=c().$implicit;i(),u(" ",f(2,1,t.Bought)," ")}}function Wt(e,l){if(e&1&&(a(0,"td",38),r(1),d(2,"quantityFraction"),n()),e&2){let t=c().$implicit;i(),u(" ",f(2,1,t.Sold)," ")}}function qt(e,l){if(e&1&&(a(0,"td",37),r(1),d(2,"quantityFraction"),n()),e&2){let t=c().$implicit;i(),u(" ",f(2,1,t.TransferredIn)," ")}}function jt(e,l){if(e&1&&(a(0,"td",38),r(1),d(2,"quantityFraction"),n()),e&2){let t=c().$implicit;i(),u(" ",f(2,1,t.TransferredOut)," ")}}function At(e,l){if(e&1&&(a(0,"td",36),r(1),d(2,"quantityFraction"),n()),e&2){let t=c().$implicit;s("colsFontColor",t.Adjustment),i(),u(" ",t.Adjustment<0?t.Adjustment*-1:f(2,2,t.Adjustment)," ")}}function Gt(e,l){if(e&1&&(a(0,"td",36),r(1),n()),e&2){let t=c().$implicit;s("colsFontColor",t.End),i(),u(" ",t.End," ")}}function Rt(e,l){if(e&1&&(a(0,"td",36),r(1),n()),e&2){let t=c().$implicit;s("colsFontColor",t.Now),i(),u(" ",t.Now," ")}}function Ht(e,l){if(e&1&&(a(0,"td",35),r(1),d(2,"quantityFraction"),n()),e&2){let t=c().$implicit;i(),u(" ",f(2,1,t.SellTransferInRate)," ")}}function zt(e,l){if(e&1&&(a(0,"tr")(1,"td")(2,"a",34),r(3),n()(),a(4,"td")(5,"a",34),r(6),n()(),v(7,Mt,2,1,"td"),a(8,"td")(9,"a",34),r(10),n()(),v(11,Ot,2,1,"td",35)(12,kt,3,4,"td",36)(13,Nt,3,3,"td",37)(14,Wt,3,3,"td",38)(15,qt,3,3,"td",37)(16,jt,3,3,"td",38)(17,At,3,4,"td",36)(18,Gt,2,2,"td",36)(19,Rt,2,2,"td",36)(20,Ht,3,3,"td",35),n()),e&2){let t=l.$implicit,m=c(2);i(2),s("routerLink",w(20,yt))("queryParams",E(21,b,t.OutletID)),i(),u(" ",t.OutletName," "),i(2),s("routerLink",w(23,vt))("queryParams",E(24,b,t.ProductID)),i(),u(" ",t.ProductName," "),i(),p(m.column.productcode.selected?7:-1),i(2),s("routerLink",w(26,Tt))("queryParams",E(27,b,t.VariantID)),i(),P(t.VariantName),i(),p(m.column.code.selected?11:-1),i(),p(m.column.start.selected?12:-1),i(),p(m.column.bought.selected?13:-1),i(),p(m.column.sold.selected?14:-1),i(),p(m.column.transferredIn.selected?15:-1),i(),p(m.column.transferredOut.selected?16:-1),i(),p(m.column.adjust.selected?17:-1),i(),p(m.column.end.selected?18:-1),i(),p(m.column.now.selected?19:-1),i(),p(m.column.percent.selected?20:-1)}}function Kt(e,l){if(e&1&&N(0,zt,21,29,"tr",null,k),e&2){let t=c();W(t.infiniteList)}}function Qt(e,l){e&1&&(a(0,"tr")(1,"td",39),D(2,"app-empty-state"),n()())}function Jt(e,l){if(e&1&&(a(0,"td",36),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),e&2){let t=c(2);s("colsFontColor",f(2,5,y(1,2,t.infiniteList,"Start"))),i(3),u(" ",f(5,10,y(4,7,t.infiniteList,"Start"))," ")}}function Ut(e,l){if(e&1&&(a(0,"td",37),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),e&2){let t=c(2);i(),u(" ",f(3,4,y(2,1,t.infiniteList,"Bought"))," ")}}function Xt(e,l){if(e&1&&(a(0,"td",38),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),e&2){let t=c(2);i(),u(" ",f(3,4,y(2,1,t.infiniteList,"Sold"))," ")}}function Yt(e,l){if(e&1&&(a(0,"td",37),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),e&2){let t=c(2);i(),u(" ",f(3,4,y(2,1,t.infiniteList,"TransferredIn"))," ")}}function Zt(e,l){if(e&1&&(a(0,"td",38),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),e&2){let t=c(2);i(),u(" ",f(3,4,y(2,1,t.infiniteList,"TransferredOut"))," ")}}function $t(e,l){if(e&1&&(a(0,"td",36),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),e&2){let t=c(2);s("colsFontColor",f(2,5,y(1,2,t.infiniteList,"Adjustment"))),i(3),u(" ",f(5,10,y(4,7,t.infiniteList,"Adjustment"))," ")}}function te(e,l){if(e&1&&(a(0,"td",36),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),e&2){let t=c(2);s("colsFontColor",f(2,5,y(1,2,t.infiniteList,"End"))),i(3),u(" ",f(5,10,y(4,7,t.infiniteList,"End"))," ")}}function ee(e,l){if(e&1&&(a(0,"td",36),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),e&2){let t=c(2);s("colsFontColor",f(2,5,y(1,2,t.infiniteList,"Now"))),i(3),u(" ",f(5,10,y(4,7,t.infiniteList,"Now"))," ")}}function ie(e,l){if(e&1&&(a(0,"tfoot")(1,"tr",40)(2,"th",41),r(3," Total: "),n(),v(4,Jt,6,12,"td",36)(5,Ut,4,6,"td",37)(6,Xt,4,6,"td",38)(7,Yt,4,6,"td",37)(8,Zt,4,6,"td",38)(9,$t,6,12,"td",36)(10,te,6,12,"td",36)(11,ee,6,12,"td",36),n()()),e&2){let t=c();i(2),O("colspan",t.column.code.selected?4:3),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)}}function ne(e,l){if(e&1){let t=h();a(0,"span",48),V("click",function(){C(t);let o=c(2);return x(o.StoreRowsCountAPIResult("inventory/GetCountVariantInventoryTraffic"))}),a(1,"i",49),r(2,"?"),n()()}}function oe(e,l){if(e&1&&(a(0,"span"),r(1),d(2,"number"),n()),e&2){let t=c(2);i(),P(f(2,1,t.listTotal))}}function ae(e,l){if(e&1){let t=h();a(0,"div",12)(1,"div",42)(2,"div",43),r(3),d(4,"number"),v(5,ne,3,0,"span",44)(6,oe,3,3,"span",45),r(7),n()(),a(8,"a",46),V("click",function(){C(t);let o=c();return x(o.NextPage(!0))}),D(9,"i",47),r(10," Next"),n()()}if(e&2){let t=c();i(3),u(" Showing 1 - ",f(4,4,t.infiniteList.length)," of "),i(2),s("ngIf",!t.pageData.HideStoreApiCount),i(),s("ngIf",t.pageData.HideStoreApiCount),i(),u(" records ~ ",t.pageData.Filter.PageNumber," Page ")}}var xt=class e extends X{constructor(t,m,o,_,B,F,re){super(t,m,"inventory/GetVariantInventoryTraffic","inventoryloader/GetVariantInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=o;this.pageTitle=_;this.converter=B;this.roleService=F;this.matDialog=re;this.pageTitle.setTitle(this.menuData.T)}column={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:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{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(R),S(_t),S(Q),S(Y))};static \u0275cmp=L({type:e,selectors:[["POS-variant-inventory-traffic"]],features:[M],decls:34,vars:20,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[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"],["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"],["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-success"],[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"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["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,o){if(m&1){let _=h();a(0,"mainpanel-cmp",1),V("onSubmit",function(){return C(_),x(o.searchFromPageOne())}),I("filterChange",function(F){return C(_),g(o.pageData.Filter,F)||(o.pageData.Filter=F),x(F)}),a(1,"actions"),v(2,gt,3,0,"button",2),n(),a(3,"filters"),v(4,It,20,22,"ng-template",null,0,q),n(),a(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),a(14,"th",8),r(15,"Product"),n(),v(16,St,3,0,"th",9),a(17,"th"),r(18,"Variant"),n(),v(19,ht,2,0,"th",10)(20,Vt,3,0,"th",11)(21,Ft,3,0,"th",11)(22,Dt,3,0,"th",11)(23,wt,3,0,"th",11)(24,Et,3,0,"th",11)(25,Pt,3,0,"th",11)(26,bt,3,0,"th",11)(27,Bt,3,0,"th",11)(28,Lt,3,0,"th",11),n()(),a(29,"tbody"),v(30,Kt,2,0)(31,Qt,3,0,"tr"),n(),v(32,ie,12,9,"tfoot"),n()(),v(33,ae,11,6,"div",12),n()()()}m&2&&(s("pageData",o.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),T("filter",o.pageData.Filter),s("column",o.column),i(2),s("ngIf",o.roleService.global.Export),i(14),p(o.column.productcode.selected?16:-1),i(3),p(o.column.code.selected?19:-1),i(),p(o.column.start.selected?20:-1),i(),p(o.column.bought.selected?21:-1),i(),p(o.column.sold.selected?22:-1),i(),p(o.column.transferredIn.selected?23:-1),i(),p(o.column.transferredOut.selected?24:-1),i(),p(o.column.adjust.selected?25:-1),i(),p(o.column.end.selected?26:-1),i(),p(o.column.now.selected?27:-1),i(),p(o.column.percent.selected?28:-1),i(2),p(o.infiniteList&&o.infiniteList.length>0?30:31),i(2),p(o.infiniteList&&o.infiniteList.length>0?32:-1),i(),p(o.infiniteList&&o.infiniteList.length>0?33:-1))},dependencies:[at,ot,G,j,A,z,st,ct,ut,nt,it,H,$,mt,dt,lt,rt,ft,pt,Ct,U,J],encapsulation:2})};export{xt as Variant_Inventory_TrafficComponent};