dealpos 25.42.2 → 25.43.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 (105) hide show
  1. package/browser/{chunk-QCEQZT7E.js → chunk-2DCP5K6S.js} +1 -1
  2. package/browser/{chunk-GGPT7WIY.js → chunk-3LKY4V7E.js} +1 -1
  3. package/browser/{chunk-SIH5NVFR.js → chunk-3REOXXPI.js} +1 -1
  4. package/browser/{chunk-OSSHGIDA.js → chunk-3WSASNIT.js} +1 -1
  5. package/browser/chunk-4G2HIE3A.js +1 -0
  6. package/browser/{chunk-C2CGBWBH.js → chunk-4JM455M6.js} +1 -1
  7. package/browser/chunk-4PPRFE5H.js +1 -0
  8. package/browser/{chunk-LQ3Q52LD.js → chunk-4SFHOQ3Y.js} +1 -1
  9. package/browser/{chunk-53ACYG5V.js → chunk-5CDAHDI5.js} +1 -1
  10. package/browser/{chunk-QFO3KUMD.js → chunk-5NDARG5X.js} +1 -1
  11. package/browser/{chunk-Q5IKPX3P.js → chunk-5SRC2QUI.js} +1 -1
  12. package/browser/{chunk-P6LA3P5N.js → chunk-64EULF5I.js} +1 -1
  13. package/browser/{chunk-HGADEAZ4.js → chunk-7C7GJT3E.js} +1 -1
  14. package/browser/{chunk-TU4O5BX3.js → chunk-7O3BTVW2.js} +1 -1
  15. package/browser/{chunk-BVVYVR6R.js → chunk-7S4WUQBK.js} +1 -1
  16. package/browser/{chunk-TSBV5MA4.js → chunk-7V7Q67KX.js} +1 -1
  17. package/browser/{chunk-6ZN7JR6K.js → chunk-7VKFVS7K.js} +1 -1
  18. package/browser/{chunk-VKJIDCM7.js → chunk-7WLFUG2A.js} +1 -1
  19. package/browser/{chunk-C32V5IHL.js → chunk-A7R2DZD3.js} +1 -1
  20. package/browser/{chunk-7MYFXXHY.js → chunk-AJCH3WAF.js} +1 -1
  21. package/browser/{chunk-D5QLS4SZ.js → chunk-AQUQUDDZ.js} +1 -1
  22. package/browser/{chunk-Z5HBVHYO.js → chunk-ASGXDOOQ.js} +1 -1
  23. package/browser/{chunk-CKSMLIVU.js → chunk-CX4UR7ZZ.js} +4 -4
  24. package/browser/{chunk-A3CWPPXF.js → chunk-CXRVPHHO.js} +1 -1
  25. package/browser/{chunk-TDO7VOF5.js → chunk-D5P4CYL5.js} +1 -1
  26. package/browser/{chunk-6IQQC2YT.js → chunk-D6VG5PSE.js} +1 -1
  27. package/browser/{chunk-XGGQUHUR.js → chunk-E7L36INB.js} +1 -1
  28. package/browser/{chunk-MW6BE5UI.js → chunk-EH6IO5FW.js} +1 -1
  29. package/browser/{chunk-GOZYJRWV.js → chunk-EJDIY62U.js} +1 -1
  30. package/browser/{chunk-IU526HWZ.js → chunk-EYE63KIO.js} +1 -1
  31. package/browser/{chunk-ERTAWD4X.js → chunk-F2Z6MRHX.js} +1 -1
  32. package/browser/{chunk-ZHIGBBGN.js → chunk-FF56HWOF.js} +5 -5
  33. package/browser/{chunk-TIX624OU.js → chunk-G2NUOEHT.js} +1 -1
  34. package/browser/{chunk-PDKNFOY7.js → chunk-GFT5QOAV.js} +1 -1
  35. package/browser/{chunk-LWDGMGFV.js → chunk-GNXJCMBC.js} +1 -1
  36. package/browser/{chunk-PZANARAM.js → chunk-HIALMESF.js} +1 -1
  37. package/browser/{chunk-O3NKN7KT.js → chunk-HYRNR45J.js} +1 -1
  38. package/browser/{chunk-G5P4GFMX.js → chunk-IE6UBT7C.js} +1 -1
  39. package/browser/chunk-IFQV5GDJ.js +1 -0
  40. package/browser/{chunk-V52QD5BS.js → chunk-IGEAG6HP.js} +1 -1
  41. package/browser/{chunk-3JVX2T6M.js → chunk-INCYKSJF.js} +1 -1
  42. package/browser/{chunk-CRJOVQ56.js → chunk-IUDDIQMT.js} +2 -2
  43. package/browser/{chunk-ZOIQWHQE.js → chunk-JDZEWPPQ.js} +1 -1
  44. package/browser/{chunk-XPEGAYJO.js → chunk-JLL2ILJJ.js} +1 -1
  45. package/browser/{chunk-QPXWIIQK.js → chunk-JORCTO5O.js} +1 -1
  46. package/browser/{chunk-DNBZTRXL.js → chunk-JU6MGU3M.js} +1 -1
  47. package/browser/{chunk-HYZX6TUF.js → chunk-LC3XCQL2.js} +1 -1
  48. package/browser/{chunk-GKKKOTYZ.js → chunk-LGVT3CR2.js} +1 -1
  49. package/browser/{chunk-TRUZ46QL.js → chunk-M7QHMLIG.js} +1 -1
  50. package/browser/{chunk-H66NFIQQ.js → chunk-MDGMZ65B.js} +1 -1
  51. package/browser/{chunk-2O3TR26P.js → chunk-MDY5R453.js} +1 -1
  52. package/browser/{chunk-IRIE5DZT.js → chunk-MMX7JWK6.js} +1 -1
  53. package/browser/chunk-MXUYJQOT.js +57 -0
  54. package/browser/{chunk-R7Y776E5.js → chunk-NGLW2JVN.js} +1 -1
  55. package/browser/{chunk-HGM42PVN.js → chunk-NIAATSHN.js} +1 -1
  56. package/browser/{chunk-EJFVZSWQ.js → chunk-NZXT22JH.js} +1 -1
  57. package/browser/{chunk-I6NIUHOQ.js → chunk-OEEJBHA6.js} +1 -1
  58. package/browser/{chunk-K7ON3WKW.js → chunk-OL6COSQS.js} +1 -1
  59. package/browser/{chunk-HA6VJJLI.js → chunk-PHGUFK7B.js} +1 -1
  60. package/browser/chunk-Q3SBBXUT.js +1 -0
  61. package/browser/{chunk-W7Z44R3C.js → chunk-Q3T47ZI6.js} +1 -1
  62. package/browser/chunk-QDE7PB5F.js +1 -0
  63. package/browser/{chunk-NOQM2VPB.js → chunk-QEZV5DGZ.js} +1 -1
  64. package/browser/{chunk-Q7GDNJAI.js → chunk-QU4LPPFI.js} +8 -8
  65. package/browser/{chunk-7R3X2A2H.js → chunk-R4FFGZYI.js} +1 -1
  66. package/browser/{chunk-7X35YY3T.js → chunk-R6NHGFCL.js} +1 -1
  67. package/browser/{chunk-4WYJGX5K.js → chunk-RADHAROZ.js} +1 -1
  68. package/browser/{chunk-FKYUI33J.js → chunk-RAIYXIUN.js} +1 -1
  69. package/browser/{chunk-W7R2NCKA.js → chunk-RDLECCOU.js} +2 -2
  70. package/browser/chunk-RE4ILURJ.js +1 -0
  71. package/browser/{chunk-FNUNWZ2W.js → chunk-RJ5DYWUR.js} +1 -1
  72. package/browser/{chunk-VGNMBCUC.js → chunk-RXIPRX4H.js} +1 -1
  73. package/browser/{chunk-W7I2T4SZ.js → chunk-TAVO3B4U.js} +1 -1
  74. package/browser/{chunk-47W54HJY.js → chunk-TJOJSY2L.js} +1 -1
  75. package/browser/{chunk-4WW3BBDP.js → chunk-TP762HYD.js} +2 -2
  76. package/browser/{chunk-7275MAOI.js → chunk-TROJCJRS.js} +1 -1
  77. package/browser/{chunk-4XWCWJZC.js → chunk-TTHREZAR.js} +1 -1
  78. package/browser/{chunk-DV4MQXAE.js → chunk-TZKLOUVL.js} +1 -1
  79. package/browser/{chunk-ZFXZABWG.js → chunk-U5OIRIFT.js} +1 -1
  80. package/browser/{chunk-OAY4ZDTS.js → chunk-UP43YMU4.js} +1 -1
  81. package/browser/{chunk-SHPUXNKO.js → chunk-VFGDPNH2.js} +1 -1
  82. package/browser/chunk-W3VF2RCW.js +1 -0
  83. package/browser/{chunk-SV4HJFAL.js → chunk-W6A2EZUH.js} +1 -1
  84. package/browser/{chunk-EOY5VQKV.js → chunk-WYHR2ET7.js} +2 -2
  85. package/browser/{chunk-XBMOSDDE.js → chunk-XDJ4AOAR.js} +1 -1
  86. package/browser/{chunk-VD4QQDNI.js → chunk-YCN42CZP.js} +1 -1
  87. package/browser/chunk-YWGMCAEP.js +3 -0
  88. package/browser/{chunk-T5HYNGEA.js → chunk-ZBTG35T6.js} +1 -1
  89. package/browser/chunk-ZPZDGQWP.js +16 -0
  90. package/browser/{chunk-GIKR6Y2K.js → chunk-ZVDY66SR.js} +1 -1
  91. package/browser/index.html +2 -2
  92. package/browser/{main-C7YDPF2T.js → main-XJRM5GZV.js} +2 -2
  93. package/browser/{styles-EM6OTRT2.css → styles-SJXE22QD.css} +1 -1
  94. package/package.json +1 -1
  95. package/browser/chunk-4ODUHZAT.js +0 -1
  96. package/browser/chunk-6A45AGTK.js +0 -1
  97. package/browser/chunk-BKUC3UED.js +0 -1
  98. package/browser/chunk-EHV62EGB.js +0 -57
  99. package/browser/chunk-JU5FQANB.js +0 -1
  100. package/browser/chunk-NII66FBK.js +0 -3
  101. package/browser/chunk-NM2P4KR5.js +0 -1
  102. package/browser/chunk-OG45AMIC.js +0 -1
  103. package/browser/chunk-PNQGP25W.js +0 -1
  104. package/browser/chunk-UE53BLCC.js +0 -16
  105. package/browser/chunk-YTGZYBEI.js +0 -1
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-TRUZ46QL.js";import{a as ne,b as ie,c as oe}from"./chunk-ITLMINSX.js";import{a as fe,b as ye}from"./chunk-HMER2IC5.js";import{f as Ce}from"./chunk-HA6VJJLI.js";import{c as ge}from"./chunk-SV4HJFAL.js";import{b as pe}from"./chunk-TZ74SUXJ.js";import{a as se}from"./chunk-XZR3IMWZ.js";import{e as _e,f as ue}from"./chunk-TSBV5MA4.js";import{b as de}from"./chunk-DV4MQXAE.js";import{b as ee,c as te}from"./chunk-JOXTERIM.js";import{a as le,d as me,e as ce}from"./chunk-XYB3YDKL.js";import{g as re}from"./chunk-3YKVLHZG.js";import{F as Y,c as K,h as J,o as U,q as X}from"./chunk-RVXZOIFQ.js";import{d as $}from"./chunk-ZZGSAFGO.js";import{$a as i,Ac as w,Db as C,Fc as H,Ib as o,Jb as a,Kb as W,Lb as A,Ma as F,Mb as M,Ob as T,Qb as V,Qc as j,Rb as r,Rd as q,Ub as N,Vd as z,Yc as k,Yd as Z,Zc as Q,db as h,ec as c,fc as D,gc as f,gd as G,jc as y,jd as R,kb as O,kc as v,lc as x,na as E,ob as L,qb as g,rc as B,va as s,vb as d,wa as _,zc as S}from"./chunk-UXRO4UFY.js";import{a as b,b as P}from"./chunk-7DCB7DB2.js";var xe=n=>({ID:n});function Ie(n,p){if(n&1){let e=T();o(0,"button",18),V("click",function(){s(e);let t=r();return _(t.openExportModal())}),W(1,"i",19),c(2," Export "),a()}}function he(n,p){if(n&1&&(o(0,"span",29),c(1),a()),n&2){let e=p.item;N("matTooltip",e.Value),i(),D(e.Value)}}function De(n,p){if(n&1){let e=T();o(0,"div",20)(1,"div")(2,"h6"),c(3,"Outlet"),a(),o(4,"outlet-selector",21),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),c(7,"Category"),a(),o(8,"POS-product-category-select",22),x("selectedCategoryIDChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),c(11,"Brand"),a(),o(12,"ng-select",23),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),g(13,he,2,2,"ng-template",24),a()(),o(14,"div")(15,"h6"),c(16,"Product Tags"),a(),o(17,"ng-select",25),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),c(20,"Quantity From - To"),a(),o(21,"div",26)(22,"input",27),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),c(23," - "),o(24,"input",28),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),d("accessType",2),y("ngModel",e.pageData.Filter.OutletID),i(4),y("selectedCategoryID",e.pageData.Filter.ProductCategoryID),d("showClear",!0),i(4),d("items",e.pageData.Options==null?null:e.pageData.Options.Brands),y("ngModel",e.pageData.Filter.ProductBrandID),i(5),d("items",e.pageData.Options==null?null:e.pageData.Options.Tags),y("ngModel",e.pageData.Filter.ProductTagID),i(5),y("ngModel",e.pageData.Filter.QtyFrom),i(2),y("ngModel",e.pageData.Filter.QtyTo)}}function Se(n,p){if(n&1&&(o(0,"th",10),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantName.name," ")}}function we(n,p){if(n&1&&(o(0,"th",11),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantCode.name," ")}}function Te(n,p){if(n&1&&(o(0,"th",12),c(1),a()),n&2){let e=r();i(),f(" ",e.column.OnHand.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",30),c(1),a()),n&2){let e=r();i(),f(" ",e.column.DirectAllocated.name," ")}}function be(n,p){if(n&1&&(o(0,"th",14),c(1),a()),n&2){let e=r();i(),f(" ",e.column.IndirectAllocated.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",15),c(1),a()),n&2){let e=r();i(),f(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",31),c(2),a()()),n&2){let e=r().$implicit;i(),d("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",B(3,xe,e.VariantID)),i(),f(" ",e.VariantName," ")}}function Me(n,p){if(n&1&&(o(0,"td"),c(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Ee(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Fe(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function Oe(n,p){if(n&1&&g(0,Fe,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Le(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&g(0,Le,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Ne(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function Be(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function He(n,p){if(n&1&&(o(0,"tr"),g(1,Ae,3,5,"td")(2,Me,2,1,"td")(3,Ee,3,3,"td")(4,Oe,1,1,"td")(5,We,1,1,"td")(6,Ne,3,3,"td")(7,Be,3,3,"td"),a()),n&2){let e=r();i(),C(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),C(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),C(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),C(e.totalIndirect()>0?4:5),i(2),C(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),C(e.column.Available&&e.column.Available.selected?7:-1)}}function je(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",32),V("jumpToPage",function(){s(e);let t=r();return _(t.getListData())})("previousPage",function(){s(e);let t=r();return _(t.getListData())})("nextPage",function(){s(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),d("total",e.data.Data.length)("pageData",e.pageData)}}var ve=class n extends ae{constructor(e,m,t,l,I){super(e,m,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=m;this.csvConverter=l;this.roleService=I;j(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=F(null);dialog=E(re);afterPostInit(e){console.log("Composite Inventory Data",e);let m=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",m),this.totalIndirect.set(m)}sortData(e){let m=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=m;return}this.infiniteList=m.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(pe,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(m){return new(m||n)(h(de),h(Z),h(z),h(se),h($))};static \u0275cmp=O({type:n,selectors:[["pos-composite-inventory"]],features:[L],decls:21,vars:14,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["style","width: 10%","mat-sort-header","DirectAllocated",4,"ngIf"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],["mat-sort-header","DirectAllocated",2,"width","10%"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(m,t){if(m&1){let l=T();o(0,"mainpanel-cmp",1),x("textChange",function(u){return s(l),v(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return s(l),_(t.searchFromPageOne())}),x("filterChange",function(u){return s(l),v(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),A(1,2),g(2,Ie,3,0,"button",3),M(),A(3,4),g(4,De,25,10,"ng-template",null,0,H),M(),A(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return s(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),g(12,Se,2,1,"th",10)(13,we,2,1,"th",11)(14,Te,2,1,"th",12)(15,Ve,2,1,"th",13)(16,be,2,1,"th",14)(17,Pe,2,1,"th",15),a()(),o(18,"tbody"),g(19,He,8,6,"tr",16),a()()(),g(20,je,2,2,"div",17),a(),M(),a()}m&2&&(d("pageData",t.menuData),y("text",t.pageData.Filter.SearchText),d("isFilterOnDropdown",!1),y("filter",t.pageData.Filter),d("column",t.column),i(2),d("ngIf",t.roleService.global.Export),i(10),C(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),C(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),C(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),d("ngIf",t.column.DirectAllocated&&t.column.DirectAllocated.selected),i(),C(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),C(t.column.Available&&t.column.Available.selected?17:-1),i(2),d("ngForOf",t.infiniteList),i(),d("ngIf",t.data))},dependencies:[ue,_e,ge,Ce,Y,K,X,J,U,ce,me,le,te,ee,ye,fe,R,k,Q,G,q,oe,ne,ie],styles:["[_nghost-%COMP%]{display:block}"]})};export{ve as a};
1
+ import{a as ae}from"./chunk-M7QHMLIG.js";import{a as ne,b as ie,c as oe}from"./chunk-ITLMINSX.js";import{a as fe,b as ye}from"./chunk-HMER2IC5.js";import{f as Ce}from"./chunk-PHGUFK7B.js";import{c as ge}from"./chunk-W6A2EZUH.js";import{b as pe}from"./chunk-TZ74SUXJ.js";import{a as se}from"./chunk-XZR3IMWZ.js";import{e as _e,f as ue}from"./chunk-7V7Q67KX.js";import{b as de}from"./chunk-TZKLOUVL.js";import{b as ee,c as te}from"./chunk-JOXTERIM.js";import{a as le,d as me,e as ce}from"./chunk-XYB3YDKL.js";import{g as re}from"./chunk-3YKVLHZG.js";import{F as Y,c as K,h as J,o as U,q as X}from"./chunk-RVXZOIFQ.js";import{d as $}from"./chunk-ZZGSAFGO.js";import{$a as i,Ac as w,Db as C,Fc as H,Ib as o,Jb as a,Kb as W,Lb as A,Ma as F,Mb as M,Ob as T,Qb as V,Qc as j,Rb as r,Rd as q,Ub as N,Vd as z,Yc as k,Yd as Z,Zc as Q,db as h,ec as c,fc as D,gc as f,gd as G,jc as y,jd as R,kb as O,kc as v,lc as x,na as E,ob as L,qb as g,rc as B,va as s,vb as d,wa as _,zc as S}from"./chunk-UXRO4UFY.js";import{a as b,b as P}from"./chunk-7DCB7DB2.js";var xe=n=>({ID:n});function Ie(n,p){if(n&1){let e=T();o(0,"button",18),V("click",function(){s(e);let t=r();return _(t.openExportModal())}),W(1,"i",19),c(2," Export "),a()}}function he(n,p){if(n&1&&(o(0,"span",29),c(1),a()),n&2){let e=p.item;N("matTooltip",e.Value),i(),D(e.Value)}}function De(n,p){if(n&1){let e=T();o(0,"div",20)(1,"div")(2,"h6"),c(3,"Outlet"),a(),o(4,"outlet-selector",21),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),c(7,"Category"),a(),o(8,"POS-product-category-select",22),x("selectedCategoryIDChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),c(11,"Brand"),a(),o(12,"ng-select",23),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),g(13,he,2,2,"ng-template",24),a()(),o(14,"div")(15,"h6"),c(16,"Product Tags"),a(),o(17,"ng-select",25),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),c(20,"Quantity From - To"),a(),o(21,"div",26)(22,"input",27),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),c(23," - "),o(24,"input",28),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),d("accessType",2),y("ngModel",e.pageData.Filter.OutletID),i(4),y("selectedCategoryID",e.pageData.Filter.ProductCategoryID),d("showClear",!0),i(4),d("items",e.pageData.Options==null?null:e.pageData.Options.Brands),y("ngModel",e.pageData.Filter.ProductBrandID),i(5),d("items",e.pageData.Options==null?null:e.pageData.Options.Tags),y("ngModel",e.pageData.Filter.ProductTagID),i(5),y("ngModel",e.pageData.Filter.QtyFrom),i(2),y("ngModel",e.pageData.Filter.QtyTo)}}function Se(n,p){if(n&1&&(o(0,"th",10),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantName.name," ")}}function we(n,p){if(n&1&&(o(0,"th",11),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantCode.name," ")}}function Te(n,p){if(n&1&&(o(0,"th",12),c(1),a()),n&2){let e=r();i(),f(" ",e.column.OnHand.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",30),c(1),a()),n&2){let e=r();i(),f(" ",e.column.DirectAllocated.name," ")}}function be(n,p){if(n&1&&(o(0,"th",14),c(1),a()),n&2){let e=r();i(),f(" ",e.column.IndirectAllocated.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",15),c(1),a()),n&2){let e=r();i(),f(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",31),c(2),a()()),n&2){let e=r().$implicit;i(),d("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",B(3,xe,e.VariantID)),i(),f(" ",e.VariantName," ")}}function Me(n,p){if(n&1&&(o(0,"td"),c(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Ee(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Fe(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function Oe(n,p){if(n&1&&g(0,Fe,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Le(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&g(0,Le,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Ne(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function Be(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function He(n,p){if(n&1&&(o(0,"tr"),g(1,Ae,3,5,"td")(2,Me,2,1,"td")(3,Ee,3,3,"td")(4,Oe,1,1,"td")(5,We,1,1,"td")(6,Ne,3,3,"td")(7,Be,3,3,"td"),a()),n&2){let e=r();i(),C(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),C(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),C(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),C(e.totalIndirect()>0?4:5),i(2),C(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),C(e.column.Available&&e.column.Available.selected?7:-1)}}function je(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",32),V("jumpToPage",function(){s(e);let t=r();return _(t.getListData())})("previousPage",function(){s(e);let t=r();return _(t.getListData())})("nextPage",function(){s(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),d("total",e.data.Data.length)("pageData",e.pageData)}}var ve=class n extends ae{constructor(e,m,t,l,I){super(e,m,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=m;this.csvConverter=l;this.roleService=I;j(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=F(null);dialog=E(re);afterPostInit(e){console.log("Composite Inventory Data",e);let m=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",m),this.totalIndirect.set(m)}sortData(e){let m=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=m;return}this.infiniteList=m.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(pe,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(m){return new(m||n)(h(de),h(Z),h(z),h(se),h($))};static \u0275cmp=O({type:n,selectors:[["pos-composite-inventory"]],features:[L],decls:21,vars:14,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["style","width: 10%","mat-sort-header","DirectAllocated",4,"ngIf"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],["mat-sort-header","DirectAllocated",2,"width","10%"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(m,t){if(m&1){let l=T();o(0,"mainpanel-cmp",1),x("textChange",function(u){return s(l),v(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return s(l),_(t.searchFromPageOne())}),x("filterChange",function(u){return s(l),v(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),A(1,2),g(2,Ie,3,0,"button",3),M(),A(3,4),g(4,De,25,10,"ng-template",null,0,H),M(),A(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return s(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),g(12,Se,2,1,"th",10)(13,we,2,1,"th",11)(14,Te,2,1,"th",12)(15,Ve,2,1,"th",13)(16,be,2,1,"th",14)(17,Pe,2,1,"th",15),a()(),o(18,"tbody"),g(19,He,8,6,"tr",16),a()()(),g(20,je,2,2,"div",17),a(),M(),a()}m&2&&(d("pageData",t.menuData),y("text",t.pageData.Filter.SearchText),d("isFilterOnDropdown",!1),y("filter",t.pageData.Filter),d("column",t.column),i(2),d("ngIf",t.roleService.global.Export),i(10),C(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),C(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),C(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),d("ngIf",t.column.DirectAllocated&&t.column.DirectAllocated.selected),i(),C(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),C(t.column.Available&&t.column.Available.selected?17:-1),i(2),d("ngForOf",t.infiniteList),i(),d("ngIf",t.data))},dependencies:[ue,_e,ge,Ce,Y,K,X,J,U,ce,me,le,te,ee,ye,fe,R,k,Q,G,q,oe,ne,ie],styles:["[_nghost-%COMP%]{display:block}"]})};export{ve as a};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-XKUQPHUA.js";import"./chunk-Q4CKRRGM.js";import"./chunk-PIYM2FOP.js";import"./chunk-2OWHEMAL.js";import"./chunk-XZELBTQR.js";import{a as oe,b as le}from"./chunk-KBO5VO7S.js";import"./chunk-AEHOTFB4.js";import"./chunk-MPSML3FA.js";import{d as ne,e as re}from"./chunk-6G37ZXRX.js";import"./chunk-BXAYNP7A.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-6CQ6XYJG.js";import"./chunk-YEDKRNXU.js";import"./chunk-TQZQYUFG.js";import"./chunk-7QWJJPNG.js";import{e as te}from"./chunk-VSF6PYZW.js";import"./chunk-VHAM2DWK.js";import{c as ie}from"./chunk-SV4HJFAL.js";import{a as X}from"./chunk-V52QD5BS.js";import"./chunk-IU526HWZ.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as Q,e as $,f as ee}from"./chunk-TSBV5MA4.js";import"./chunk-BVVYVR6R.js";import"./chunk-5JJSLRVS.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-VGNMBCUC.js";import{b as Z}from"./chunk-DV4MQXAE.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-CD3BSGAP.js";import"./chunk-JOXTERIM.js";import{O as x}from"./chunk-5OS5VELO.js";import{d as Y}from"./chunk-XYB3YDKL.js";import"./chunk-6ZN7JR6K.js";import"./chunk-GIKR6Y2K.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import{a as K}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as z,h as U,o as q}from"./chunk-RVXZOIFQ.js";import"./chunk-TDO7VOF5.js";import"./chunk-NOQM2VPB.js";import"./chunk-ZZGSAFGO.js";import"./chunk-PZANARAM.js";import{$a as s,Ac as I,Db as L,Eb as V,Fc as N,Gb as W,Hb as O,Ib as r,Jb as a,Kb as S,Lb as w,Ma as A,Mb as T,Ob as y,Qb as v,Rb as c,Vd as G,Y as k,Yd as J,Zc as R,cd as H,db as C,ec as u,fa as P,jc as g,jd as j,kb as E,kc as _,lc as f,na as B,ob as M,qb as h,va as p,vb as l,wa as m,zc as b}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";function me(o,d){if(o&1){let t=y();r(0,"button",7),v("click",function(){p(t);let e=c();return m(e.onPrint())}),S(1,"i",8),r(2,"span"),u(3,"Print"),a()()}}function se(o,d){if(o&1){let t=y();r(0,"div",9)(1,"h6"),u(2,"Outlet"),a(),r(3,"outlet-selector",10),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),m(e)}),a(),r(4,"h6"),u(5,"Sales Order Tag"),a(),r(6,"ng-select",11),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),m(e)}),a(),r(7,"h6"),u(8,"From"),a(),r(9,"div",12)(10,"div",13)(11,"datepicker",14),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),m(e)}),a()(),r(12,"div",13)(13,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),m(e)}),a()()(),r(14,"h6"),u(15,"To"),a(),r(16,"div",12)(17,"div",13)(18,"datepicker",16),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),m(e)}),a()(),r(19,"div",13)(20,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),m(e)}),a()()()()}if(o&2){let t=c();s(3),l("accessType",2),g("ngModel",t.pageData.Filter.EntityID),s(3),l("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),s(5),l("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l("hidelClearBtn",!0),s(2),g("time",t.pageData.Filter.StartTime),l("fullWidth",!0),s(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),s(2),g("time",t.pageData.Filter.EndTime),l("fullWidth",!0)}}function ce(o,d){o&1&&(w(0),r(1,"div",20),u(2,"\xA0"),a(),T())}function de(o,d){if(o&1&&(S(0,"pos-receipt-a4",17),r(1,"div",18),S(2,"div",19),a(),h(3,ce,3,0,"ng-container",6)),o&2){let t=d.$implicit,n=d.$index,e=c().ngIf,i=c();l("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),s(3),l("ngIf",n!==(e.Data==null?null:e.Data.length)-1)}}function ue(o,d){if(o&1&&(w(0),W(1,de,4,7,null,null,V),T()),o&2){let t=d.ngIf;s(),O(t.Data)}}var pe=class o extends X{constructor(t,n,e){super(t,n,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=n;this.initPrintListener()}dialogFilter=B(Q);receipts$;printTemplates;invoiceIds=A([]);preInitList(){this.pageData.Filter.From=new Date,this.pageData.Filter.To=new Date,this.pageData.Filter.StartTime="00:00",this.pageData.Filter.EndTime="23:59"}onFilter(){this.receipts$=this.httpService.post(x.GetBulkPrintA4,this.pageData.Filter).pipe(P(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",K.Info):this.generatePrintTemplate(t.PrintTemplates),this.invoiceIds.set(t.Data.map(n=>n?.Invoice?.ID))}),k(1))}generatePrintTemplate(t=[]){this.printTemplates=new Map(t.map(n=>[n.ID,n]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.put(x.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(n){return new(n||o)(C(Z),C(J),C(G))};static \u0275cmp=E({type:o,selectors:[["bulk-invoice-A4"]],features:[M],decls:13,vars:10,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","pageData","hideSearchBox","text","hideSearchDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-success",3,"click"],["filters",""],[1,"container-fluid","mt-5"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales Order Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],[3,"data","printTemplate","config","workOrderMode","fullMode","stylesheet"],[1,"d-print-none","mt-8"],[2,"border-top-style","dotted","margin-bottom","5px"],[1,"page-break"]],template:function(n,e){if(n&1){let i=y();r(0,"mainpanel-cmp",1),f("textChange",function(D){return p(i),_(e.pageData.Filter.Number,D)||(e.pageData.Filter.Number=D),m(D)}),v("onSubmit",function(){return p(i),m(e.onFilter())}),r(1,"actions"),h(2,me,4,0,"button",2),b(3,"async"),r(4,"button",3),v("click",function(){return p(i),m(e.onNewPrint())}),u(5,"New"),a()(),r(6,"div",4),h(7,se,21,14,"ng-template",null,0,N),a(),r(9,"content")(10,"div",5),h(11,ue,3,0,"ng-container",6),b(12,"async"),a()()()}if(n&2){let i;l("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),l("hideSearchDropdown",!0),s(2),L(((i=I(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),s(9),l("ngIf",I(12,8,e.printTemplates&&e.receipts$))}},dependencies:[j,R,H,le,oe,ee,$,ie,Y,re,ne,te,z,U,q,ae],styles:["input.p-inputtext{height:46.63px;border-color:#0000001f!important} input.p-inputtext :hover{border-color:#0000001f!important}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})};export{pe as BulkInvoiceA4Component};
1
+ import{a as ae}from"./chunk-XKUQPHUA.js";import"./chunk-Q4CKRRGM.js";import"./chunk-PIYM2FOP.js";import"./chunk-2OWHEMAL.js";import"./chunk-XZELBTQR.js";import{a as oe,b as le}from"./chunk-KBO5VO7S.js";import"./chunk-AEHOTFB4.js";import"./chunk-MPSML3FA.js";import{d as ne,e as re}from"./chunk-6G37ZXRX.js";import"./chunk-BXAYNP7A.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-6CQ6XYJG.js";import"./chunk-YEDKRNXU.js";import"./chunk-TQZQYUFG.js";import"./chunk-7QWJJPNG.js";import{e as te}from"./chunk-VSF6PYZW.js";import"./chunk-VHAM2DWK.js";import{c as ie}from"./chunk-W6A2EZUH.js";import{a as X}from"./chunk-IGEAG6HP.js";import"./chunk-EYE63KIO.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as Q,e as $,f as ee}from"./chunk-7V7Q67KX.js";import"./chunk-7S4WUQBK.js";import"./chunk-5JJSLRVS.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-RXIPRX4H.js";import{b as Z}from"./chunk-TZKLOUVL.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-CD3BSGAP.js";import"./chunk-JOXTERIM.js";import{O as x}from"./chunk-5OS5VELO.js";import{d as Y}from"./chunk-XYB3YDKL.js";import"./chunk-7VKFVS7K.js";import"./chunk-ZVDY66SR.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import{a as K}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as z,h as U,o as q}from"./chunk-RVXZOIFQ.js";import"./chunk-D5P4CYL5.js";import"./chunk-QEZV5DGZ.js";import"./chunk-ZZGSAFGO.js";import"./chunk-HIALMESF.js";import{$a as s,Ac as I,Db as L,Eb as V,Fc as N,Gb as W,Hb as O,Ib as r,Jb as a,Kb as S,Lb as w,Ma as A,Mb as T,Ob as y,Qb as v,Rb as c,Vd as G,Y as k,Yd as J,Zc as R,cd as H,db as C,ec as u,fa as P,jc as g,jd as j,kb as E,kc as _,lc as f,na as B,ob as M,qb as h,va as p,vb as l,wa as m,zc as b}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";function me(o,d){if(o&1){let t=y();r(0,"button",7),v("click",function(){p(t);let e=c();return m(e.onPrint())}),S(1,"i",8),r(2,"span"),u(3,"Print"),a()()}}function se(o,d){if(o&1){let t=y();r(0,"div",9)(1,"h6"),u(2,"Outlet"),a(),r(3,"outlet-selector",10),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),m(e)}),a(),r(4,"h6"),u(5,"Sales Order Tag"),a(),r(6,"ng-select",11),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),m(e)}),a(),r(7,"h6"),u(8,"From"),a(),r(9,"div",12)(10,"div",13)(11,"datepicker",14),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),m(e)}),a()(),r(12,"div",13)(13,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),m(e)}),a()()(),r(14,"h6"),u(15,"To"),a(),r(16,"div",12)(17,"div",13)(18,"datepicker",16),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),m(e)}),a()(),r(19,"div",13)(20,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),m(e)}),a()()()()}if(o&2){let t=c();s(3),l("accessType",2),g("ngModel",t.pageData.Filter.EntityID),s(3),l("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),s(5),l("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l("hidelClearBtn",!0),s(2),g("time",t.pageData.Filter.StartTime),l("fullWidth",!0),s(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),s(2),g("time",t.pageData.Filter.EndTime),l("fullWidth",!0)}}function ce(o,d){o&1&&(w(0),r(1,"div",20),u(2,"\xA0"),a(),T())}function de(o,d){if(o&1&&(S(0,"pos-receipt-a4",17),r(1,"div",18),S(2,"div",19),a(),h(3,ce,3,0,"ng-container",6)),o&2){let t=d.$implicit,n=d.$index,e=c().ngIf,i=c();l("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),s(3),l("ngIf",n!==(e.Data==null?null:e.Data.length)-1)}}function ue(o,d){if(o&1&&(w(0),W(1,de,4,7,null,null,V),T()),o&2){let t=d.ngIf;s(),O(t.Data)}}var pe=class o extends X{constructor(t,n,e){super(t,n,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=n;this.initPrintListener()}dialogFilter=B(Q);receipts$;printTemplates;invoiceIds=A([]);preInitList(){this.pageData.Filter.From=new Date,this.pageData.Filter.To=new Date,this.pageData.Filter.StartTime="00:00",this.pageData.Filter.EndTime="23:59"}onFilter(){this.receipts$=this.httpService.post(x.GetBulkPrintA4,this.pageData.Filter).pipe(P(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",K.Info):this.generatePrintTemplate(t.PrintTemplates),this.invoiceIds.set(t.Data.map(n=>n?.Invoice?.ID))}),k(1))}generatePrintTemplate(t=[]){this.printTemplates=new Map(t.map(n=>[n.ID,n]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.put(x.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(n){return new(n||o)(C(Z),C(J),C(G))};static \u0275cmp=E({type:o,selectors:[["bulk-invoice-A4"]],features:[M],decls:13,vars:10,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","pageData","hideSearchBox","text","hideSearchDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-success",3,"click"],["filters",""],[1,"container-fluid","mt-5"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales Order Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],[3,"data","printTemplate","config","workOrderMode","fullMode","stylesheet"],[1,"d-print-none","mt-8"],[2,"border-top-style","dotted","margin-bottom","5px"],[1,"page-break"]],template:function(n,e){if(n&1){let i=y();r(0,"mainpanel-cmp",1),f("textChange",function(D){return p(i),_(e.pageData.Filter.Number,D)||(e.pageData.Filter.Number=D),m(D)}),v("onSubmit",function(){return p(i),m(e.onFilter())}),r(1,"actions"),h(2,me,4,0,"button",2),b(3,"async"),r(4,"button",3),v("click",function(){return p(i),m(e.onNewPrint())}),u(5,"New"),a()(),r(6,"div",4),h(7,se,21,14,"ng-template",null,0,N),a(),r(9,"content")(10,"div",5),h(11,ue,3,0,"ng-container",6),b(12,"async"),a()()()}if(n&2){let i;l("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),l("hideSearchDropdown",!0),s(2),L(((i=I(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),s(9),l("ngIf",I(12,8,e.printTemplates&&e.receipts$))}},dependencies:[j,R,H,le,oe,ee,$,ie,Y,re,ne,te,z,U,q,ae],styles:["input.p-inputtext{height:46.63px;border-color:#0000001f!important} input.p-inputtext :hover{border-color:#0000001f!important}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})};export{pe as BulkInvoiceA4Component};