dealpos 25.38.4 → 25.39.1

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 (138) hide show
  1. package/browser/{chunk-TB765VUC.js → chunk-23OOL7UP.js} +1 -1
  2. package/browser/{chunk-A4P6PGBD.js → chunk-23X4TU5M.js} +1 -1
  3. package/browser/{chunk-CAU4D2TY.js → chunk-277FJY7G.js} +1 -1
  4. package/browser/{chunk-DFG27WZ4.js → chunk-2HCIB2TD.js} +1 -1
  5. package/browser/{chunk-F4RAPB7T.js → chunk-2JCKAW74.js} +1 -1
  6. package/browser/{chunk-Y5RVOKMC.js → chunk-2JXQKW4J.js} +1 -1
  7. package/browser/{chunk-VUVCBLHS.js → chunk-365GNBX3.js} +1 -1
  8. package/browser/{chunk-TMEELAKA.js → chunk-3E2POQOE.js} +1 -1
  9. package/browser/{chunk-EA5E44M5.js → chunk-3RXBPKLI.js} +1 -1
  10. package/browser/{chunk-BDJCEICU.js → chunk-3UP4RL34.js} +1 -1
  11. package/browser/{chunk-CYUJRWL3.js → chunk-3WDOZUDH.js} +1 -1
  12. package/browser/{chunk-USQURX46.js → chunk-45IBPFMD.js} +1 -1
  13. package/browser/{chunk-VCLNMSWH.js → chunk-4D5LU6WP.js} +1 -1
  14. package/browser/{chunk-OM5XHSEH.js → chunk-4O6WXPMX.js} +1 -1
  15. package/browser/{chunk-IO54HRLP.js → chunk-5TIJEZIR.js} +1 -1
  16. package/browser/{chunk-WIFNNBNO.js → chunk-5UD5FCK5.js} +1 -1
  17. package/browser/{chunk-SRSSABUM.js → chunk-64TO4BSY.js} +3 -3
  18. package/browser/{chunk-MZB2FOLE.js → chunk-6IH2M6ZG.js} +1 -1
  19. package/browser/{chunk-L7K767B2.js → chunk-6T5AX7KT.js} +1 -1
  20. package/browser/{chunk-TESD7Z62.js → chunk-6YSKFV5B.js} +1 -1
  21. package/browser/{chunk-DNA6EMSK.js → chunk-7DXTNKFV.js} +1 -1
  22. package/browser/chunk-7STM3WMS.js +1 -0
  23. package/browser/{chunk-QQY4INTY.js → chunk-7WSRVEP4.js} +1 -1
  24. package/browser/{chunk-WBLR5N2Q.js → chunk-A5LNLL32.js} +1 -1
  25. package/browser/{chunk-TSUYOGZ7.js → chunk-AHC4QMET.js} +1 -1
  26. package/browser/{chunk-ERBXMPSY.js → chunk-AP7SDPBZ.js} +1 -1
  27. package/browser/{chunk-GNIXWNP2.js → chunk-B7JJIPG3.js} +1 -1
  28. package/browser/{chunk-RJ4NEGMD.js → chunk-BEAF7Q4K.js} +1 -1
  29. package/browser/{chunk-TNJUQ6BJ.js → chunk-BFBWJV3S.js} +1 -1
  30. package/browser/{chunk-HNO36ILE.js → chunk-CAKATCRA.js} +1 -1
  31. package/browser/{chunk-7HPUCFSE.js → chunk-CCZZYGNK.js} +1 -1
  32. package/browser/{chunk-TF3Q66XY.js → chunk-CSGP6E2Y.js} +1 -1
  33. package/browser/{chunk-QVRCMMJJ.js → chunk-DBX3G54S.js} +1 -1
  34. package/browser/{chunk-EF5QKCYE.js → chunk-DE2KR7E4.js} +1 -1
  35. package/browser/{chunk-XBFWYWJ7.js → chunk-DFYI47OA.js} +3 -3
  36. package/browser/{chunk-B3KOTUMH.js → chunk-DMBA7X3J.js} +1 -1
  37. package/browser/{chunk-HFMOHPY7.js → chunk-DS4FO4PF.js} +1 -1
  38. package/browser/{chunk-WPRDVYRS.js → chunk-EJFSGEW3.js} +1 -1
  39. package/browser/{chunk-T4BIKBND.js → chunk-EO34FGSE.js} +1 -1
  40. package/browser/{chunk-SGOO265R.js → chunk-EUKUPVTC.js} +1 -1
  41. package/browser/chunk-EZHMLFME.js +125 -0
  42. package/browser/{chunk-WLIVNIHK.js → chunk-F2GVSRJF.js} +1 -1
  43. package/browser/{chunk-ZC5TUX6E.js → chunk-FAIQRIIW.js} +1 -1
  44. package/browser/{chunk-KLL2FS2O.js → chunk-FI7QIPEN.js} +2 -2
  45. package/browser/{chunk-3WCGKOCQ.js → chunk-FQBWTGP7.js} +1 -1
  46. package/browser/{chunk-V6WTKD4V.js → chunk-G2PX75WQ.js} +13 -13
  47. package/browser/{chunk-GWHR6QGI.js → chunk-G47DQPAS.js} +1 -1
  48. package/browser/chunk-GUENPOXA.js +1 -0
  49. package/browser/{chunk-XG6WOYOZ.js → chunk-H5ASSFZI.js} +1 -1
  50. package/browser/{chunk-EBR5GJGA.js → chunk-HARALEZH.js} +1 -1
  51. package/browser/{chunk-AYRPYHVC.js → chunk-HCOCU2U4.js} +1 -1
  52. package/browser/{chunk-SP3U2IDW.js → chunk-HCQXSFP4.js} +1 -1
  53. package/browser/{chunk-JSETQAUZ.js → chunk-I46S3P6Y.js} +1 -1
  54. package/browser/{chunk-ICQLVIY5.js → chunk-I4HXIYOM.js} +1 -1
  55. package/browser/{chunk-WCX5WWNH.js → chunk-I5ZU4QA5.js} +1 -1
  56. package/browser/{chunk-XAP2O3OZ.js → chunk-I7DLJ5BI.js} +1 -1
  57. package/browser/chunk-IVTBFY5K.js +2 -0
  58. package/browser/{chunk-W6TD44BK.js → chunk-IZL4EXFB.js} +1 -1
  59. package/browser/{chunk-NH53MKW7.js → chunk-JFSGRUDU.js} +1 -1
  60. package/browser/{chunk-SEFRBZL6.js → chunk-JKYIIESS.js} +1 -1
  61. package/browser/{chunk-73MSULVJ.js → chunk-JYFBUDHQ.js} +1 -1
  62. package/browser/{chunk-PEMX7O2Q.js → chunk-JYW3ZTOC.js} +1 -1
  63. package/browser/{chunk-V4VZQ5KY.js → chunk-JZN5OZUP.js} +1 -1
  64. package/browser/{chunk-BYHJNRE3.js → chunk-KE7I2M72.js} +1 -1
  65. package/browser/{chunk-L3BBA7TR.js → chunk-KVSCR7WW.js} +1 -1
  66. package/browser/{chunk-RPNTNFVK.js → chunk-L3O2ASVB.js} +1 -1
  67. package/browser/chunk-L5FSQ5F6.js +1 -0
  68. package/browser/{chunk-UF66Z7HD.js → chunk-L74MRZTG.js} +1 -1
  69. package/browser/{chunk-IV6VX4SW.js → chunk-LAHTI3RX.js} +1 -1
  70. package/browser/{chunk-W77QC6LK.js → chunk-LGYCRWQ4.js} +1 -1
  71. package/browser/{chunk-Y6ACRZOB.js → chunk-LLFZBTF3.js} +1 -1
  72. package/browser/{chunk-EAENAZFY.js → chunk-N2CLDG3C.js} +1 -1
  73. package/browser/{chunk-Z2BNHBC2.js → chunk-NDAWG7SW.js} +1 -1
  74. package/browser/{chunk-SDAGKCVZ.js → chunk-NDIM325Y.js} +1 -1
  75. package/browser/{chunk-LIHWABXN.js → chunk-NQUVDWF3.js} +1 -1
  76. package/browser/{chunk-4XFO5HXB.js → chunk-NSNBYR6U.js} +1 -1
  77. package/browser/{chunk-Y3XAADIW.js → chunk-NW5AJUUW.js} +1 -1
  78. package/browser/{chunk-B63WLQVF.js → chunk-NWG5G44C.js} +1 -1
  79. package/browser/chunk-OAGRRZG4.js +1 -0
  80. package/browser/{chunk-TTGCLMYO.js → chunk-OQ5SOBRF.js} +1 -1
  81. package/browser/{chunk-TSQKBIK3.js → chunk-OUL26K4D.js} +1 -1
  82. package/browser/{chunk-ORVJZDEF.js → chunk-PENIHHYB.js} +1 -1
  83. package/browser/{chunk-CKBNUI2K.js → chunk-PIX6WTZV.js} +1 -1
  84. package/browser/{chunk-WO4BYI7W.js → chunk-PJTJA37G.js} +1 -1
  85. package/browser/{chunk-AO44F2NK.js → chunk-PKSFDPQL.js} +1 -1
  86. package/browser/{chunk-4IZK3E4I.js → chunk-PR7RNYJZ.js} +1 -1
  87. package/browser/{chunk-YJN34SN3.js → chunk-PWGLDS46.js} +2 -2
  88. package/browser/{chunk-JIFR7UDE.js → chunk-QF2FN7R2.js} +1 -1
  89. package/browser/{chunk-5LJAKAH7.js → chunk-QPGHT5ME.js} +1 -1
  90. package/browser/{chunk-O27UF6WP.js → chunk-RRTOTW4I.js} +1 -1
  91. package/browser/{chunk-EGJEWTIR.js → chunk-RSKOUVVW.js} +1 -1
  92. package/browser/{chunk-JEW6T547.js → chunk-RTX5XAH7.js} +1 -1
  93. package/browser/{chunk-X4UVY3YK.js → chunk-SHFOA2UU.js} +1 -1
  94. package/browser/{chunk-LJYCLPTA.js → chunk-SLC7LAI3.js} +1 -1
  95. package/browser/{chunk-MHV3KSPR.js → chunk-SPWVFE3S.js} +1 -1
  96. package/browser/{chunk-OGNT4GF7.js → chunk-SUNT3LCJ.js} +1 -1
  97. package/browser/chunk-SXOBYT7M.js +1 -0
  98. package/browser/{chunk-ALMWSCCS.js → chunk-T7NKMFBC.js} +1 -1
  99. package/browser/{chunk-AESCW6DK.js → chunk-TBGCJUXF.js} +1 -1
  100. package/browser/{chunk-6YZQTAKQ.js → chunk-TFEIBMHX.js} +1 -1
  101. package/browser/{chunk-IUATJVYE.js → chunk-TXIF5LPE.js} +1 -1
  102. package/browser/{chunk-UYJZPS2Q.js → chunk-U4JITHEB.js} +1 -1
  103. package/browser/{chunk-53HKNZ5U.js → chunk-UCW4YKTO.js} +1 -1
  104. package/browser/{chunk-RWG3ZQDM.js → chunk-UDQTRTX2.js} +1 -1
  105. package/browser/{chunk-EY4B3BCK.js → chunk-UJWY2RAO.js} +1 -1
  106. package/browser/{chunk-X4OHSOA3.js → chunk-VETGCCN5.js} +1 -1
  107. package/browser/{chunk-WZ6UAKEL.js → chunk-VJ5D6M65.js} +1 -1
  108. package/browser/{chunk-DV4SS5LL.js → chunk-VJQGRCCE.js} +1 -1
  109. package/browser/{chunk-MICQTLUU.js → chunk-VSYIBZTH.js} +1 -1
  110. package/browser/{chunk-P7BMSNSP.js → chunk-VXDPSA46.js} +1 -1
  111. package/browser/{chunk-ZDAFQN4I.js → chunk-VZZN7ID6.js} +1 -1
  112. package/browser/{chunk-HDFLSFHM.js → chunk-W3WUQRTZ.js} +1 -1
  113. package/browser/{chunk-4QPI5R4J.js → chunk-WHHFDS3G.js} +1 -1
  114. package/browser/{chunk-BWUGTN45.js → chunk-WJZPCVXD.js} +1 -1
  115. package/browser/{chunk-6QKPMFLS.js → chunk-X7FAMNA4.js} +1 -1
  116. package/browser/chunk-XLK4IMKW.js +18 -0
  117. package/browser/{chunk-IFSKJCII.js → chunk-XM2BCJOR.js} +1 -1
  118. package/browser/{chunk-QXK4GGIN.js → chunk-XNGSDIQN.js} +1 -1
  119. package/browser/{chunk-F36FREBS.js → chunk-Y6E6JEKH.js} +1 -1
  120. package/browser/{chunk-WNWQWQ7T.js → chunk-Y6X5IB6T.js} +1 -1
  121. package/browser/chunk-YQKGQMBQ.js +1 -0
  122. package/browser/{chunk-RCRLKTEV.js → chunk-YUORKVN5.js} +1 -1
  123. package/browser/{chunk-PKYDYRCQ.js → chunk-Z63B2IPB.js} +2 -2
  124. package/browser/{chunk-CMTZAHVY.js → chunk-ZB5TZ4QM.js} +1 -1
  125. package/browser/{chunk-75M3O563.js → chunk-ZCSQ4WB2.js} +1 -1
  126. package/browser/{chunk-VCU3MBYA.js → chunk-ZL4GSXVP.js} +1 -1
  127. package/browser/{chunk-PMTKXVGT.js → chunk-ZSNREHJV.js} +1 -1
  128. package/browser/index.html +2 -2
  129. package/browser/{main-HLZF5ZMF.js → main-WUMYSVAP.js} +2 -2
  130. package/package.json +1 -1
  131. package/browser/chunk-ADOOGXVH.js +0 -1
  132. package/browser/chunk-FKQ2TIBW.js +0 -125
  133. package/browser/chunk-GI43GPSN.js +0 -1
  134. package/browser/chunk-OQN4WGVB.js +0 -2
  135. package/browser/chunk-PPVMHN7V.js +0 -18
  136. package/browser/chunk-Q3GWLSDE.js +0 -1
  137. package/browser/chunk-RCPOPNKZ.js +0 -1
  138. package/browser/chunk-RSAIBJCC.js +0 -1
@@ -1 +1 @@
1
- import{a as P}from"./chunk-ALMWSCCS.js";import{a as w}from"./chunk-CAU4D2TY.js";import{a as A}from"./chunk-LIHWABXN.js";import{a as C}from"./chunk-6ZOGADBZ.js";import{a as I}from"./chunk-ZZ7LHETD.js";import{a as l}from"./chunk-2FWFPV5I.js";import{a as c}from"./chunk-AHCRE4GP.js";import{fa as y,na as f,t as L,z as S}from"./chunk-DZT5XHBQ.js";import{a as F}from"./chunk-7DCB7DB2.js";var g=class{enabledDragItem;constructor(){this.enabledDragItem=!1}drop(o,t){C(t.Data,o.previousIndex,o.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.postListID(o,t.data.Data)}onPutSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.putListID(o,t.data.Data)}};var u=class{constructor(o){this.httpService=o}exportCSV(o,t,e,i){e.pageData.Filter.Export=!0,e.pageData.Filter.FormatType=0,i=i||"export.csv",this.httpService.post(`/api/${t}`,e.pageData.Filter).subscribe(r=>{o.convertToCSV(r,i),e.pageData.Filter.Export=!1})}convertToCSV(o,t=!1,e){let i=this.ExportDataFromUI2(t);o.convertToCSV(i,e)}ExportDataFromUI2(o=!1){let t=document.getElementById("tableGrid"),e=[];return c.IsNotEmpty(t)&&t.querySelectorAll("tr").forEach(r=>{let a=new Object,s=0;r.querySelectorAll("th, td").forEach(n=>{s++;let b=parseInt(n.getAttribute("colspan"));for(let h=1;h<b;h++)a["column"+s]="",s++;let m=n.innerText,v=m.toString().split("");if(o&&v[0]==="0"&&v.length>1){let h="'"+m.trim();a["column"+s]=h}else a["column"+s]=m.trim()}),e.push(a)}),e}};var d=class{listTotal;pageSize;show;constructor(){this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(o){this.pageSize=o.pageData.Filter.RowCount,this.listTotal=o.data?.ListTotal??o.data?.Data?.total?.value,this.show=this.pageSize<=this.listTotal}changePage(o,t,e){t.Filter.PageNumber=o.pageIndex+1,e.getListData()}};var x=class extends A{constructor(t,e,i,r,a,s,p){super(t);this.httpService=e;this.dataAPI=i;this.pageAPI=r;this.toastrService=a;this.route=s;this.initOpenDialog=p;this.exportHandler=new u(e),r?(s&&(this.loaderPayload=F({ListIDs:this.reportFilterService?.initOutletFilter()},s.snapshot.queryParams)),this.preInitLoader(),S([this.menuData$,this.httpService.post("/api/"+this.pageAPI,this.loaderPayload)]).pipe(L(([n,b])=>b)).pipe(I()).subscribe(n=>{this.pageData=n,this.pageData.Filter||(this.pageData.Filter={},this.pageData.Filter.RowCount=20),this.pageData.Filter.PageNumber=1,this.pageData.Filter.ID=this.loaderPayload.ID,this.preInitList(),p?this.openDialogFilter.openDialog():this.getListData()})):(this.pageData.Filter.RowCount=20,this.pageData.Filter.PageNumber=1,this.preInitList(),S({menuData:this.menuData$,listData:this.getListData$()}).pipe(I()).subscribe())}openDialogFilter=f(w);reportFilterService=f(P);pageData={Filter:{},Options:{},Roles:{},Config:{}};data;pagination=new d;dragDrop=new g;exportHandler;comparation=0;loaderPayload={};preInitLoader(){}preInitList(){}getListData(t){this.preGetList(),this.dataAPI&&this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).subscribe(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)})}getListData$(t){return this.preGetList(),this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).pipe(y(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)}))}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(t){t.PageTitle!=null&&(this.menuData.H=t.PageTitle)}preGetList(){this.pageData.Filter.From==null&&(this.pageData.Filter.From=c.MinDate),this.pageData.Filter.To==null&&(this.pageData.Filter.To=c.MinDate)}preSearchFromPageOne(){}onPaginationChange(t){this.pagination.changePage(t,this.pageData,this)}onSelectAllData(t){this.data.Data=this.data.Data.map(e=>(e.selected=t,e))}getSelectedData(){let t=[];return this.data&&(t=this.data.Data.filter(e=>e.selected)),t}httpPostListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.postListID(t,r,i)}httpPutListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.putListID(t,r,i)}httpDeleteListID(t,e,i){if(e||(e="Are you sure you want to delete selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.DeleteListID(t,r,i)}onSaveDragAndDrop(t){this.dragDrop.onSaveDragAndDrop(t,this)}onPutSaveDragAndDrop(t){this.dragDrop.onPutSaveDragAndDrop(t,this)}postListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.post(`/api/${t}`,r,1e6,!0).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()},a=>{let s=a.status+" "+a.statusText;this.toastrService.error(a.error.Message!=""?a.error.Message:"An unknown error has occured!",s,{enableHtml:!0})})}putListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.put(`/api/${t}`,r).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.delete(`/api/${t}`,{body:r}).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()})}postData(t,e){this.httpService.post("/API/"+t,e).subscribe(i=>{this.getListData(),this.toastrService.success(i.Message?i.Message:i,l.Success)})}compare(t,e,i){return(t<e?-1:1)*(i?1:-1)}exportCSV(t,e,i){this.exportHandler.exportCSV(t,e,this,i)}s2ab(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),r=0;r!=t.length;++r)i[r]=t.charCodeAt(r)&255;return e}exportXlsx(t,e){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${t}`,this.pageData.Filter).subscribe(i=>{e=decodeURI(e);let r=window.URL.createObjectURL(new Blob([this.s2ab(atob(i))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),a=document.createElement("a");a.href=r,a.setAttribute("download",e),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(r),a.remove()})}convertToCSV(t,e=!1,i){let r=this.exportHandler.ExportDataFromUI2(e);t.convertToCSV(r,i)}OnCompare(t){let e=t?this.data[t]:this.data;if(e.length<1)return;let i=Object.assign({},this.pageData.Filter);i.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),i.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/API/"+this.dataAPI,i).subscribe(r=>{let a=t?r[t]:r;this.comparation=0,e.forEach(s=>{s.PrevIndex="-",s.CurrentIndex="-",s.Increase="-";let p=a.filter(n=>n.EntityID==s.EntityID);if(s.CurrentIndex=s.Rank,p.length>0){let n=p[0];s.PrevIndex=n.Rank,n.SalesNet?s.Increase=(s.SalesNet-n.SalesNet)/n.SalesNet*100:n.Sales&&(s.Increase=(s.Sales-n.Sales)/n.Sales*100),s.IsPositive=s.Increase>0,s.IsNegative=s.Increase<0,this.comparation+=s.Increase}})})}};export{x as a};
1
+ import{a as P}from"./chunk-T7NKMFBC.js";import{a as w}from"./chunk-277FJY7G.js";import{a as A}from"./chunk-NQUVDWF3.js";import{a as C}from"./chunk-6ZOGADBZ.js";import{a as I}from"./chunk-ZZ7LHETD.js";import{a as l}from"./chunk-2FWFPV5I.js";import{a as c}from"./chunk-AHCRE4GP.js";import{fa as y,na as f,t as L,z as S}from"./chunk-DZT5XHBQ.js";import{a as F}from"./chunk-7DCB7DB2.js";var g=class{enabledDragItem;constructor(){this.enabledDragItem=!1}drop(o,t){C(t.Data,o.previousIndex,o.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.postListID(o,t.data.Data)}onPutSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.putListID(o,t.data.Data)}};var u=class{constructor(o){this.httpService=o}exportCSV(o,t,e,i){e.pageData.Filter.Export=!0,e.pageData.Filter.FormatType=0,i=i||"export.csv",this.httpService.post(`/api/${t}`,e.pageData.Filter).subscribe(r=>{o.convertToCSV(r,i),e.pageData.Filter.Export=!1})}convertToCSV(o,t=!1,e){let i=this.ExportDataFromUI2(t);o.convertToCSV(i,e)}ExportDataFromUI2(o=!1){let t=document.getElementById("tableGrid"),e=[];return c.IsNotEmpty(t)&&t.querySelectorAll("tr").forEach(r=>{let a=new Object,s=0;r.querySelectorAll("th, td").forEach(n=>{s++;let b=parseInt(n.getAttribute("colspan"));for(let h=1;h<b;h++)a["column"+s]="",s++;let m=n.innerText,v=m.toString().split("");if(o&&v[0]==="0"&&v.length>1){let h="'"+m.trim();a["column"+s]=h}else a["column"+s]=m.trim()}),e.push(a)}),e}};var d=class{listTotal;pageSize;show;constructor(){this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(o){this.pageSize=o.pageData.Filter.RowCount,this.listTotal=o.data?.ListTotal??o.data?.Data?.total?.value,this.show=this.pageSize<=this.listTotal}changePage(o,t,e){t.Filter.PageNumber=o.pageIndex+1,e.getListData()}};var x=class extends A{constructor(t,e,i,r,a,s,p){super(t);this.httpService=e;this.dataAPI=i;this.pageAPI=r;this.toastrService=a;this.route=s;this.initOpenDialog=p;this.exportHandler=new u(e),r?(s&&(this.loaderPayload=F({ListIDs:this.reportFilterService?.initOutletFilter()},s.snapshot.queryParams)),this.preInitLoader(),S([this.menuData$,this.httpService.post("/api/"+this.pageAPI,this.loaderPayload)]).pipe(L(([n,b])=>b)).pipe(I()).subscribe(n=>{this.pageData=n,this.pageData.Filter||(this.pageData.Filter={},this.pageData.Filter.RowCount=20),this.pageData.Filter.PageNumber=1,this.pageData.Filter.ID=this.loaderPayload.ID,this.preInitList(),p?this.openDialogFilter.openDialog():this.getListData()})):(this.pageData.Filter.RowCount=20,this.pageData.Filter.PageNumber=1,this.preInitList(),S({menuData:this.menuData$,listData:this.getListData$()}).pipe(I()).subscribe())}openDialogFilter=f(w);reportFilterService=f(P);pageData={Filter:{},Options:{},Roles:{},Config:{}};data;pagination=new d;dragDrop=new g;exportHandler;comparation=0;loaderPayload={};preInitLoader(){}preInitList(){}getListData(t){this.preGetList(),this.dataAPI&&this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).subscribe(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)})}getListData$(t){return this.preGetList(),this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).pipe(y(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)}))}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(t){t.PageTitle!=null&&(this.menuData.H=t.PageTitle)}preGetList(){this.pageData.Filter.From==null&&(this.pageData.Filter.From=c.MinDate),this.pageData.Filter.To==null&&(this.pageData.Filter.To=c.MinDate)}preSearchFromPageOne(){}onPaginationChange(t){this.pagination.changePage(t,this.pageData,this)}onSelectAllData(t){this.data.Data=this.data.Data.map(e=>(e.selected=t,e))}getSelectedData(){let t=[];return this.data&&(t=this.data.Data.filter(e=>e.selected)),t}httpPostListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.postListID(t,r,i)}httpPutListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.putListID(t,r,i)}httpDeleteListID(t,e,i){if(e||(e="Are you sure you want to delete selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.DeleteListID(t,r,i)}onSaveDragAndDrop(t){this.dragDrop.onSaveDragAndDrop(t,this)}onPutSaveDragAndDrop(t){this.dragDrop.onPutSaveDragAndDrop(t,this)}postListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.post(`/api/${t}`,r,1e6,!0).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()},a=>{let s=a.status+" "+a.statusText;this.toastrService.error(a.error.Message!=""?a.error.Message:"An unknown error has occured!",s,{enableHtml:!0})})}putListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.put(`/api/${t}`,r).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.delete(`/api/${t}`,{body:r}).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()})}postData(t,e){this.httpService.post("/API/"+t,e).subscribe(i=>{this.getListData(),this.toastrService.success(i.Message?i.Message:i,l.Success)})}compare(t,e,i){return(t<e?-1:1)*(i?1:-1)}exportCSV(t,e,i){this.exportHandler.exportCSV(t,e,this,i)}s2ab(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),r=0;r!=t.length;++r)i[r]=t.charCodeAt(r)&255;return e}exportXlsx(t,e){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${t}`,this.pageData.Filter).subscribe(i=>{e=decodeURI(e);let r=window.URL.createObjectURL(new Blob([this.s2ab(atob(i))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),a=document.createElement("a");a.href=r,a.setAttribute("download",e),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(r),a.remove()})}convertToCSV(t,e=!1,i){let r=this.exportHandler.ExportDataFromUI2(e);t.convertToCSV(r,i)}OnCompare(t){let e=t?this.data[t]:this.data;if(e.length<1)return;let i=Object.assign({},this.pageData.Filter);i.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),i.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/API/"+this.dataAPI,i).subscribe(r=>{let a=t?r[t]:r;this.comparation=0,e.forEach(s=>{s.PrevIndex="-",s.CurrentIndex="-",s.Increase="-";let p=a.filter(n=>n.EntityID==s.EntityID);if(s.CurrentIndex=s.Rank,p.length>0){let n=p[0];s.PrevIndex=n.Rank,n.SalesNet?s.Increase=(s.SalesNet-n.SalesNet)/n.SalesNet*100:n.Sales&&(s.Increase=(s.Sales-n.Sales)/n.Sales*100),s.IsPositive=s.Increase>0,s.IsNegative=s.Increase<0,this.comparation+=s.Increase}})})}};export{x as a};
@@ -1 +1 @@
1
- import{a as ne,b as oe}from"./chunk-GNIXWNP2.js";import"./chunk-V4VZQ5KY.js";import{a as Z}from"./chunk-NOHORPPM.js";import"./chunk-L2EDFSBR.js";import"./chunk-LJYCLPTA.js";import"./chunk-JKYTSC2D.js";import{d as me,e as ue}from"./chunk-CAU4D2TY.js";import"./chunk-VCLNMSWH.js";import"./chunk-FD5YMPRL.js";import"./chunk-MV3QRRW6.js";import{a as re,b as le}from"./chunk-LIHWABXN.js";import"./chunk-52EOLV7I.js";import"./chunk-5UL73W4S.js";import"./chunk-GWHR6QGI.js";import"./chunk-CIBQBSM6.js";import{P as N}from"./chunk-Q3GWLSDE.js";import{d as ae,e as pe}from"./chunk-LPGMI3V2.js";import{a as ie}from"./chunk-ZZ7LHETD.js";import"./chunk-567HXZXC.js";import"./chunk-CGESXTHC.js";import"./chunk-2FWFPV5I.js";import"./chunk-TLOTIYIE.js";import{F as Y,c as K,h as Q,o as X}from"./chunk-2RSBMS36.js";import"./chunk-OM5XHSEH.js";import"./chunk-BYHJNRE3.js";import{a as h,d as te}from"./chunk-AHCRE4GP.js";import"./chunk-NH53MKW7.js";import{$a as p,Ac as y,Bc as T,Fc as V,Ib as o,Jb as r,Kb as F,Ma as v,Ob as I,Od as j,Qb as w,Rb as u,Rd as z,Td as J,Va as R,Y as C,Yc as k,Yd as ee,Zc as W,cd as $,db as D,ec as m,ed as A,fa as H,fc as f,jc as G,jd as q,kb as L,kc as M,lc as P,mc as E,na as b,ob as U,qb as g,qc as B,rc as O,va as d,vb as l,wa as _,zc as c}from"./chunk-DZT5XHBQ.js";import{a as x,b as S}from"./chunk-7DCB7DB2.js";var ce=()=>["/menu/Users/User/Groups/Info"],de=i=>({ID:i});function _e(i,s){if(i&1){let e=I();o(0,"div",9)(1,"h6"),m(2,"Group"),r(),o(3,"ng-select",10),P("ngModelChange",function(t){d(e);let a=u(2);return M(a.filter().GroupID,t)||(a.filter().GroupID=t),_(t)}),r(),o(4,"h6"),m(5,"Row Count"),r(),o(6,"input",11),P("ngModelChange",function(t){d(e);let a=u(2);return M(a.filter().RowCount,t)||(a.filter().RowCount=t),_(t)}),r()()}if(i&2){let e=u(2);p(3),l("items",e.options().Groups),G("ngModel",e.filter().GroupID),p(3),l("max",1e4),G("ngModel",e.filter().RowCount)}}function ge(i,s){if(i&1&&(o(0,"a",16),m(1),r()),i&2){let e=u().$implicit;l("routerLink",B(3,ce))("queryParams",O(4,de,e._source==null||e._source.Log==null?null:e._source.Log.id)),p(),f(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function fe(i,s){if(i&1&&(o(0,"span"),m(1),r()),i&2){let e=u().$implicit;p(),f(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function ye(i,s){if(i&1&&(o(0,"tr",12)(1,"td"),g(2,ge,2,6,"a",13)(3,fe,2,1,"span",14),r(),o(4,"td"),m(5),c(6,"date"),r(),o(7,"td"),m(8),r(),F(9,"td",15),c(10,"newlines"),r()),i&2){let e=s.$implicit,n=u(2);p(2),l("ngIf",n.role.users.Edit),p(),l("ngIf",!n.role.users.Edit),p(2),f(T(6,5,e._source["@timestamp"],"dd MMM yyyy HH:mm")),p(3),f(e._source==null||e._source.Log==null?null:e._source.Log.creator),p(),l("innerHtml",y(10,8,e._source==null||e._source.Log==null?null:e._source.Log.note),R)}}function he(i,s){if(i&1){let e=I();o(0,"mainpanel-cmp",2),w("onSubmit",function(){d(e);let t=u();return _(t.initData())}),o(1,"filters"),g(2,_e,7,4,"ng-template",null,0,V),r(),o(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr")(10,"th"),m(11,"Group"),r(),o(12,"th"),m(13,"Modified"),r(),o(14,"th"),m(15,"Modify By"),r(),o(16,"th"),m(17,"Note"),r()()(),o(18,"tbody"),g(19,ye,11,10,"tr",7),c(20,"async"),r()(),o(21,"div"),E(22),c(23,"async"),o(24,"mat-paginator",8),w("page",function(t){d(e);let a=u();return _(a.onPaginationChange(t))}),r()()()()()()}if(i&2){let e,n,t=u();l("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),p(19),l("ngForOf",(e=y(20,7,t.data$))==null||e.Data==null?null:e.Data.hits);let a=(n=y(23,9,t.data$))==null||n.Data==null||n.Data.hits==null?null:n.Data.hits.length;p(5),l("length",a)("pageSize",t.filter().RowCount)("pageIndex",t.filter().PageNumber==0?0:t.filter().PageNumber-1)}}var se=class i extends re{constructor(e,n){super(e);this.role=n;this.menuData$.pipe(ie()).subscribe();let t=this.routeSnapshot.snapshot?.queryParams?.ID;h.IsNotEmpty(t)&&(this.filter.update(a=>S(x({},a),{GroupID:t})),this.initData())}httpService=b(ee);routeSnapshot=b(j);filter=v({PageNumber:1,RowCount:20,GroupID:h.GuidEmpty});options=v({Groups:[]});loader$=this.httpService.get(N.GroupHistoryLoader).pipe(H(e=>{this.options.set(e.Options),this.initData()}),C(1));data$;initData(){let e=h.IsNotEmpty(this.filter().GroupID)?this.filter().GroupID:h.GuidEmpty;this.data$=this.httpService.get(N.GroupHistoryData,[{key:"PageNumber",value:this.filter().PageNumber},{key:"RowCount",value:this.filter().RowCount},{key:"GroupID",value:e}]).pipe(C(1))}onPaginationChange(e){this.filter.update(n=>S(x({},n),{PageNumber:e.pageIndex+1})),this.initData()}static \u0275fac=function(n){return new(n||i)(D(le),D(te))};static \u0275cmp=L({type:i,selectors:[["app-group-update-history"]],features:[U],decls:3,vars:3,consts:[["pageFilterTemplate",""],["searchBoxPlaceholder","Search Note...",3,"pageData","isFilterOnDropdown","hideSearchBox","onSubmit",4,"ngIf"],["searchBoxPlaceholder","Search Note...",3,"onSubmit","pageData","isFilterOnDropdown","hideSearchBox"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["class","border-bottom",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group","appendTo","body",3,"ngModelChange","items","ngModel"],["type","text","autoNum","",1,"input-left","w-100","form-control","input-filter",3,"ngModelChange","max","ngModel"],[1,"border-bottom"],[3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[3,"innerHtml"],[3,"routerLink","queryParams"]],template:function(n,t){if(n&1&&(E(0),c(1,"async"),g(2,he,25,11,"mainpanel-cmp",1)),n&2){let a=y(1,1,t.loader$);p(2),l("ngIf",a)}},dependencies:[q,k,W,$,A,ue,me,oe,ne,J,z,Y,K,Q,X,pe,ae,Z],encapsulation:2})};export{se as GroupUpdateHistoryComponent};
1
+ import{a as ne,b as oe}from"./chunk-B7JJIPG3.js";import"./chunk-JZN5OZUP.js";import{a as Z}from"./chunk-NOHORPPM.js";import"./chunk-L2EDFSBR.js";import"./chunk-SLC7LAI3.js";import"./chunk-JKYTSC2D.js";import{d as me,e as ue}from"./chunk-277FJY7G.js";import"./chunk-4D5LU6WP.js";import"./chunk-FD5YMPRL.js";import"./chunk-MV3QRRW6.js";import{a as re,b as le}from"./chunk-NQUVDWF3.js";import"./chunk-52EOLV7I.js";import"./chunk-5UL73W4S.js";import"./chunk-G47DQPAS.js";import"./chunk-CIBQBSM6.js";import{O as N}from"./chunk-L5FSQ5F6.js";import{d as ae,e as pe}from"./chunk-LPGMI3V2.js";import{a as ie}from"./chunk-ZZ7LHETD.js";import"./chunk-567HXZXC.js";import"./chunk-CGESXTHC.js";import"./chunk-2FWFPV5I.js";import"./chunk-TLOTIYIE.js";import{F as Y,c as K,h as Q,o as X}from"./chunk-2RSBMS36.js";import"./chunk-4O6WXPMX.js";import"./chunk-KE7I2M72.js";import{a as h,d as te}from"./chunk-AHCRE4GP.js";import"./chunk-JFSGRUDU.js";import{$a as p,Ac as y,Bc as T,Fc as V,Ib as o,Jb as r,Kb as F,Ma as v,Ob as I,Od as j,Qb as w,Rb as u,Rd as z,Td as J,Va as R,Y as C,Yc as k,Yd as ee,Zc as W,cd as $,db as D,ec as m,ed as A,fa as H,fc as f,jc as G,jd as q,kb as L,kc as M,lc as P,mc as E,na as b,ob as U,qb as g,qc as B,rc as O,va as d,vb as l,wa as _,zc as c}from"./chunk-DZT5XHBQ.js";import{a as x,b as S}from"./chunk-7DCB7DB2.js";var ce=()=>["/menu/Users/User/Groups/Info"],de=i=>({ID:i});function _e(i,s){if(i&1){let e=I();o(0,"div",9)(1,"h6"),m(2,"Group"),r(),o(3,"ng-select",10),P("ngModelChange",function(t){d(e);let a=u(2);return M(a.filter().GroupID,t)||(a.filter().GroupID=t),_(t)}),r(),o(4,"h6"),m(5,"Row Count"),r(),o(6,"input",11),P("ngModelChange",function(t){d(e);let a=u(2);return M(a.filter().RowCount,t)||(a.filter().RowCount=t),_(t)}),r()()}if(i&2){let e=u(2);p(3),l("items",e.options().Groups),G("ngModel",e.filter().GroupID),p(3),l("max",1e4),G("ngModel",e.filter().RowCount)}}function ge(i,s){if(i&1&&(o(0,"a",16),m(1),r()),i&2){let e=u().$implicit;l("routerLink",B(3,ce))("queryParams",O(4,de,e._source==null||e._source.Log==null?null:e._source.Log.id)),p(),f(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function fe(i,s){if(i&1&&(o(0,"span"),m(1),r()),i&2){let e=u().$implicit;p(),f(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function ye(i,s){if(i&1&&(o(0,"tr",12)(1,"td"),g(2,ge,2,6,"a",13)(3,fe,2,1,"span",14),r(),o(4,"td"),m(5),c(6,"date"),r(),o(7,"td"),m(8),r(),F(9,"td",15),c(10,"newlines"),r()),i&2){let e=s.$implicit,n=u(2);p(2),l("ngIf",n.role.users.Edit),p(),l("ngIf",!n.role.users.Edit),p(2),f(T(6,5,e._source["@timestamp"],"dd MMM yyyy HH:mm")),p(3),f(e._source==null||e._source.Log==null?null:e._source.Log.creator),p(),l("innerHtml",y(10,8,e._source==null||e._source.Log==null?null:e._source.Log.note),R)}}function he(i,s){if(i&1){let e=I();o(0,"mainpanel-cmp",2),w("onSubmit",function(){d(e);let t=u();return _(t.initData())}),o(1,"filters"),g(2,_e,7,4,"ng-template",null,0,V),r(),o(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr")(10,"th"),m(11,"Group"),r(),o(12,"th"),m(13,"Modified"),r(),o(14,"th"),m(15,"Modify By"),r(),o(16,"th"),m(17,"Note"),r()()(),o(18,"tbody"),g(19,ye,11,10,"tr",7),c(20,"async"),r()(),o(21,"div"),E(22),c(23,"async"),o(24,"mat-paginator",8),w("page",function(t){d(e);let a=u();return _(a.onPaginationChange(t))}),r()()()()()()}if(i&2){let e,n,t=u();l("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),p(19),l("ngForOf",(e=y(20,7,t.data$))==null||e.Data==null?null:e.Data.hits);let a=(n=y(23,9,t.data$))==null||n.Data==null||n.Data.hits==null?null:n.Data.hits.length;p(5),l("length",a)("pageSize",t.filter().RowCount)("pageIndex",t.filter().PageNumber==0?0:t.filter().PageNumber-1)}}var se=class i extends re{constructor(e,n){super(e);this.role=n;this.menuData$.pipe(ie()).subscribe();let t=this.routeSnapshot.snapshot?.queryParams?.ID;h.IsNotEmpty(t)&&(this.filter.update(a=>S(x({},a),{GroupID:t})),this.initData())}httpService=b(ee);routeSnapshot=b(j);filter=v({PageNumber:1,RowCount:20,GroupID:h.GuidEmpty});options=v({Groups:[]});loader$=this.httpService.get(N.GroupHistoryLoader).pipe(H(e=>{this.options.set(e.Options),this.initData()}),C(1));data$;initData(){let e=h.IsNotEmpty(this.filter().GroupID)?this.filter().GroupID:h.GuidEmpty;this.data$=this.httpService.get(N.GroupHistoryData,[{key:"PageNumber",value:this.filter().PageNumber},{key:"RowCount",value:this.filter().RowCount},{key:"GroupID",value:e}]).pipe(C(1))}onPaginationChange(e){this.filter.update(n=>S(x({},n),{PageNumber:e.pageIndex+1})),this.initData()}static \u0275fac=function(n){return new(n||i)(D(le),D(te))};static \u0275cmp=L({type:i,selectors:[["app-group-update-history"]],features:[U],decls:3,vars:3,consts:[["pageFilterTemplate",""],["searchBoxPlaceholder","Search Note...",3,"pageData","isFilterOnDropdown","hideSearchBox","onSubmit",4,"ngIf"],["searchBoxPlaceholder","Search Note...",3,"onSubmit","pageData","isFilterOnDropdown","hideSearchBox"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["class","border-bottom",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group","appendTo","body",3,"ngModelChange","items","ngModel"],["type","text","autoNum","",1,"input-left","w-100","form-control","input-filter",3,"ngModelChange","max","ngModel"],[1,"border-bottom"],[3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[3,"innerHtml"],[3,"routerLink","queryParams"]],template:function(n,t){if(n&1&&(E(0),c(1,"async"),g(2,he,25,11,"mainpanel-cmp",1)),n&2){let a=y(1,1,t.loader$);p(2),l("ngIf",a)}},dependencies:[q,k,W,$,A,ue,me,oe,ne,J,z,Y,K,Q,X,pe,ae,Z],encapsulation:2})};export{se as GroupUpdateHistoryComponent};