dealpos 25.50.3 → 25.50.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/browser/{chunk-5EDMTMQE.js → chunk-23VPQAH7.js} +1 -1
  2. package/browser/{chunk-LZ2R3WSV.js → chunk-2BO3IFU3.js} +1 -1
  3. package/browser/{chunk-S7EPVPRI.js → chunk-2LKYW2KM.js} +1 -1
  4. package/browser/{chunk-J53YFCCL.js → chunk-3NPCLTJT.js} +1 -1
  5. package/browser/{chunk-MA257SYA.js → chunk-3NPP3FHR.js} +1 -1
  6. package/browser/{chunk-7PIO3JIN.js → chunk-3TWVKV7J.js} +1 -1
  7. package/browser/{chunk-O7LZALSI.js → chunk-45Z7RKI2.js} +1 -1
  8. package/browser/{chunk-VITAWR3T.js → chunk-54UGZEAQ.js} +1 -1
  9. package/browser/{chunk-ZE44HGGG.js → chunk-5UMDVS4U.js} +1 -1
  10. package/browser/{chunk-TNPMDRZO.js → chunk-65JSM2XC.js} +1 -1
  11. package/browser/{chunk-DED7477D.js → chunk-7AZJVR4Y.js} +1 -1
  12. package/browser/{chunk-NZBEEY37.js → chunk-7NZLZJYF.js} +1 -1
  13. package/browser/{chunk-3QDTSIB6.js → chunk-7Q672H4P.js} +1 -1
  14. package/browser/{chunk-K3S2VA3C.js → chunk-7SRLQQ53.js} +1 -1
  15. package/browser/{chunk-HVYBU6TY.js → chunk-AKRUT4XG.js} +1 -1
  16. package/browser/{chunk-54UMDIKR.js → chunk-AXUSK4R7.js} +2 -2
  17. package/browser/{chunk-EGU7BITH.js → chunk-BAEWHHDC.js} +1 -1
  18. package/browser/{chunk-SUO6DJYC.js → chunk-BKTC6IB2.js} +1 -1
  19. package/browser/{chunk-7CUDTVLZ.js → chunk-D55YCZRM.js} +1 -1
  20. package/browser/chunk-DDWKAORH.js +4 -0
  21. package/browser/{chunk-JZ5MD4LC.js → chunk-DI2O7SU5.js} +1 -1
  22. package/browser/{chunk-QBMO2OPJ.js → chunk-DSNA2CBA.js} +1 -1
  23. package/browser/{chunk-2LVKRR2R.js → chunk-DWYMJ5NO.js} +1 -1
  24. package/browser/{chunk-O3WVNFF3.js → chunk-E4VY3BC3.js} +1 -1
  25. package/browser/{chunk-XOHCGYTO.js → chunk-EHEOIROM.js} +1 -1
  26. package/browser/{chunk-VOQLYG7T.js → chunk-EJWFW6Y5.js} +1 -1
  27. package/browser/{chunk-TBWTD5VK.js → chunk-EQ4O2B6P.js} +1 -1
  28. package/browser/{chunk-HHOJ4YQR.js → chunk-ERE6AE7H.js} +1 -1
  29. package/browser/{chunk-WFFRWPW6.js → chunk-FBNETY2W.js} +1 -1
  30. package/browser/{chunk-65FDGBJO.js → chunk-FIOEXMKH.js} +1 -1
  31. package/browser/{chunk-T6FJJ74N.js → chunk-GRGZQFG6.js} +1 -1
  32. package/browser/{chunk-NTXNJZOI.js → chunk-HXXX3USD.js} +1 -1
  33. package/browser/{chunk-OLM3XNOA.js → chunk-IA5RDP6C.js} +1 -1
  34. package/browser/{chunk-Z2JW3BVY.js → chunk-IBGFKSEC.js} +1 -1
  35. package/browser/{chunk-WUCW3BSG.js → chunk-ILTEBIEO.js} +1 -1
  36. package/browser/{chunk-EEJ5ZZ5K.js → chunk-KWWIO4GT.js} +1 -1
  37. package/browser/{chunk-6CVIKPGY.js → chunk-KZG64H5Q.js} +1 -1
  38. package/browser/{chunk-PR34T5VJ.js → chunk-L7NMU3EE.js} +2 -2
  39. package/browser/{chunk-GMEXYYR5.js → chunk-LOWQOYUL.js} +1 -1
  40. package/browser/{chunk-DM3MYART.js → chunk-LUKLFBAY.js} +1 -1
  41. package/browser/{chunk-24QQSO3I.js → chunk-M5R2CYXH.js} +1 -1
  42. package/browser/{chunk-C6KDEINU.js → chunk-MHD5SGI2.js} +1 -1
  43. package/browser/{chunk-2BFJWET6.js → chunk-MLEUJB3A.js} +1 -1
  44. package/browser/{chunk-7MGUJEON.js → chunk-NFOJONR6.js} +1 -1
  45. package/browser/{chunk-BYEJOHI5.js → chunk-NIDHEU4E.js} +2 -2
  46. package/browser/{chunk-U5VPMH5B.js → chunk-NVOIIOWN.js} +1 -1
  47. package/browser/{chunk-64YDRVDG.js → chunk-O4RWYZYV.js} +1 -1
  48. package/browser/{chunk-7GCZ5FDQ.js → chunk-OP66LK4H.js} +1 -1
  49. package/browser/{chunk-TKLP46GO.js → chunk-PWTUEIUR.js} +1 -1
  50. package/browser/{chunk-7AABZJ3Q.js → chunk-Q6APDC4Z.js} +1 -1
  51. package/browser/{chunk-WJKZQDGG.js → chunk-QG4B6W6L.js} +1 -1
  52. package/browser/{chunk-54E6DGPE.js → chunk-QHXZVGLB.js} +1 -1
  53. package/browser/{chunk-DGANMYLB.js → chunk-QIQOKWUA.js} +1 -1
  54. package/browser/{chunk-EO3NFUMI.js → chunk-QMOYHBVM.js} +1 -1
  55. package/browser/{chunk-SZE5I2OK.js → chunk-QR7VN5GL.js} +1 -1
  56. package/browser/{chunk-C4DUGK4U.js → chunk-QTAF2OHJ.js} +1 -1
  57. package/browser/{chunk-PDYPX3HL.js → chunk-QVKXQ4BK.js} +1 -1
  58. package/browser/{chunk-UKGYRZRL.js → chunk-RL24GQSJ.js} +1 -1
  59. package/browser/{chunk-DYZFZ736.js → chunk-RQFU4YVM.js} +1 -1
  60. package/browser/{chunk-KQPUNL5V.js → chunk-RTQ4SJP2.js} +1 -1
  61. package/browser/{chunk-5D6LHDW2.js → chunk-S2B6A2P3.js} +1 -1
  62. package/browser/{chunk-DRCWIWR4.js → chunk-SLYXMED6.js} +1 -1
  63. package/browser/{chunk-42J4XDZQ.js → chunk-SVVH6PSD.js} +9 -9
  64. package/browser/{chunk-6PBVX5TT.js → chunk-SXYJ7APZ.js} +1 -1
  65. package/browser/{chunk-N6UOMCS6.js → chunk-TOPX3JFU.js} +1 -1
  66. package/browser/{chunk-YZ4V72WH.js → chunk-TZGHU6I5.js} +2 -2
  67. package/browser/{chunk-NNGM7TLL.js → chunk-UEN2SKB2.js} +1 -1
  68. package/browser/{chunk-2PV32D5Q.js → chunk-VBIZF245.js} +1 -1
  69. package/browser/{chunk-KZG4CPJW.js → chunk-VDZXLRMK.js} +1 -1
  70. package/browser/{chunk-24PYQCLS.js → chunk-VGTN2T5K.js} +1 -1
  71. package/browser/{chunk-REVYYB46.js → chunk-VLISY5AT.js} +1 -1
  72. package/browser/{chunk-SFXHBMXV.js → chunk-VX7AVGUY.js} +1 -1
  73. package/browser/{chunk-ZT6WLRQU.js → chunk-W2HVYAUB.js} +1 -1
  74. package/browser/{chunk-2MVZ322B.js → chunk-W3PBP3KZ.js} +1 -1
  75. package/browser/{chunk-DC4YXLBE.js → chunk-WBWMUDOK.js} +1 -1
  76. package/browser/{chunk-7VATOIW5.js → chunk-WJXKZZS2.js} +1 -1
  77. package/browser/{chunk-JE4O3B4S.js → chunk-WWWSD2MX.js} +1 -1
  78. package/browser/{chunk-YREC2Y5A.js → chunk-X5XDXZ47.js} +1 -1
  79. package/browser/{chunk-PV6VJ5DU.js → chunk-XFGPCEKV.js} +1 -1
  80. package/browser/{chunk-CANKLN6H.js → chunk-Y7QIF2WS.js} +1 -1
  81. package/browser/{chunk-ZHT26XL2.js → chunk-YSRJI33K.js} +1 -1
  82. package/browser/{chunk-BESZUYFF.js → chunk-YWOH2LVD.js} +2 -2
  83. package/browser/{chunk-SZB5MY63.js → chunk-ZNBXH3TQ.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-E2WDTYZB.js → main-4WYCY6M5.js} +2 -2
  86. package/package.json +1 -1
  87. package/browser/chunk-6QQ7TKNG.js +0 -4
@@ -1 +1 @@
1
- import{a as re,b as ae}from"./chunk-B36P4U32.js";import"./chunk-BNNKSBQ6.js";import"./chunk-4CPRMZL6.js";import{a as ne}from"./chunk-4SRWAPD4.js";import"./chunk-4OEDK7YE.js";import"./chunk-GWKBJZYT.js";import"./chunk-B5IABJO5.js";import"./chunk-FAED643P.js";import{d as te,e as ie}from"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{e as $}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{c as ee}from"./chunk-2MVZ322B.js";import{a as K}from"./chunk-ZE44HGGG.js";import"./chunk-J53YFCCL.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as J,e as Y,f as Z}from"./chunk-NNGM7TLL.js";import"./chunk-O7LZALSI.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-6P2ASCNY.js";import"./chunk-TBWTD5VK.js";import{b as X}from"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as F}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import{d as Q}from"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import{a as z}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as U,h as j,o as G}from"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import{p as H,s as q}from"./chunk-LGOSIAUC.js";import{Ab as D,Bb as L,Ca as B,Db as V,Eb as W,Fb as m,Fc as b,Gb as r,Gc as x,Hb as a,Ib as S,Lc as O,Pb as y,Sb as w,Ub as s,Xa as c,Y as k,eb as h,fa as I,hc as u,ib as A,mb as M,mc as g,nc as _,ob as E,oc as f,od as N,pa as P,ta as l,ua as p,vd as R,yb as v}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function le(o,d){if(o&1){let t=y();r(0,"button",6),w("click",function(){l(t);let e=s();return p(e.onPrint())}),S(1,"i",7),r(2,"span"),u(3,"Print"),a()()}}function pe(o,d){if(o&1){let t=y();r(0,"div",8)(1,"h6"),u(2,"Outlet"),a(),r(3,"outlet-selector",9),f("ngModelChange",function(e){l(t);let i=s();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),p(e)}),a(),r(4,"h6"),u(5,"Sales Order Tag"),a(),r(6,"ng-select",10),f("ngModelChange",function(e){l(t);let i=s();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),p(e)}),a(),r(7,"h6"),u(8,"From"),a(),r(9,"div",11)(10,"div",12)(11,"datepicker",13),f("dateChange",function(e){l(t);let i=s();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),p(e)}),a()(),r(12,"div",12)(13,"app-timepicker",14),f("timeChange",function(e){l(t);let i=s();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),p(e)}),a()()(),r(14,"h6"),u(15,"To"),a(),r(16,"div",11)(17,"div",12)(18,"datepicker",15),f("dateChange",function(e){l(t);let i=s();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),p(e)}),a()(),r(19,"div",12)(20,"app-timepicker",14),f("timeChange",function(e){l(t);let i=s();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),p(e)}),a()()()()}if(o&2){let t=s();c(3),m("accessType",2),g("ngModel",t.pageData.Filter.EntityID),c(3),m("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),c(5),m("isFloatingLabel",!1),g("date",t.pageData.Filter.From),m("hidelClearBtn",!0),c(2),g("time",t.pageData.Filter.StartTime),m("fullWidth",!0),c(5),m("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),c(2),g("time",t.pageData.Filter.EndTime),m("fullWidth",!0)}}function me(o,d){o&1&&(r(0,"div",19),u(1,"\xA0"),a())}function se(o,d){if(o&1&&(S(0,"pos-receipt-a4",16),r(1,"div",17),S(2,"div",18),a(),v(3,me,2,0,"div",19)),o&2){let t=d.$implicit,n=d.$index,e=s(),i=s();m("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),c(3),D(n!==(e.Data==null?null:e.Data.length)-1?3:-1)}}function ce(o,d){o&1&&V(0,se,4,7,null,null,L),o&2&&W(d.Data)}var oe=class o extends K{constructor(t,n,e){super(t,n,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=n;this.initPrintListener()}dialogFilter=P(J);receipts$;printTemplates;invoiceIds=B([]);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(F.GetBulkPrintA4,this.pageData.Filter).pipe(I(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",z.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.post(F.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(n){return new(n||o)(h(X),h(q),h(H))};static \u0275cmp=A({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"],[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(T){return l(i),_(e.pageData.Filter.Number,T)||(e.pageData.Filter.Number=T),p(T)}),w("onSubmit",function(){return l(i),p(e.onFilter())}),r(1,"actions"),v(2,le,4,0,"button",2),b(3,"async"),r(4,"button",3),w("click",function(){return l(i),p(e.onNewPrint())}),u(5,"New"),a()(),r(6,"div",4),E(7,pe,21,14,"ng-template",null,0,O),a(),r(9,"content")(10,"div",5),v(11,ce,2,0),b(12,"async"),a()()()}if(n&2){let i,C;m("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),m("hideSearchDropdown",!0),c(2),D(((i=x(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),c(9),D((C=x(12,8,e.printTemplates&&e.receipts$))?11:-1,C)}},dependencies:[R,ae,re,Z,Y,ee,Q,ie,te,$,U,j,G,ne,N],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{oe as BulkInvoiceA4Component};
1
+ import{a as re,b as ae}from"./chunk-B36P4U32.js";import"./chunk-BNNKSBQ6.js";import"./chunk-4CPRMZL6.js";import{a as ne}from"./chunk-4SRWAPD4.js";import"./chunk-4OEDK7YE.js";import"./chunk-GWKBJZYT.js";import"./chunk-B5IABJO5.js";import"./chunk-FAED643P.js";import{d as te,e as ie}from"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{e as $}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{c as ee}from"./chunk-W3PBP3KZ.js";import{a as K}from"./chunk-5UMDVS4U.js";import"./chunk-3NPCLTJT.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as J,e as Y,f as Z}from"./chunk-UEN2SKB2.js";import"./chunk-45Z7RKI2.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-6P2ASCNY.js";import"./chunk-EQ4O2B6P.js";import{b as X}from"./chunk-SLYXMED6.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as F}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import{d as Q}from"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import{a as z}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as U,h as j,o as G}from"./chunk-DWZ5JTI2.js";import"./chunk-ILTEBIEO.js";import"./chunk-PWTUEIUR.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-7AZJVR4Y.js";import{p as H,s as q}from"./chunk-LGOSIAUC.js";import{Ab as D,Bb as L,Ca as B,Db as V,Eb as W,Fb as m,Fc as b,Gb as r,Gc as x,Hb as a,Ib as S,Lc as O,Pb as y,Sb as w,Ub as s,Xa as c,Y as k,eb as h,fa as I,hc as u,ib as A,mb as M,mc as g,nc as _,ob as E,oc as f,od as N,pa as P,ta as l,ua as p,vd as R,yb as v}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function le(o,d){if(o&1){let t=y();r(0,"button",6),w("click",function(){l(t);let e=s();return p(e.onPrint())}),S(1,"i",7),r(2,"span"),u(3,"Print"),a()()}}function pe(o,d){if(o&1){let t=y();r(0,"div",8)(1,"h6"),u(2,"Outlet"),a(),r(3,"outlet-selector",9),f("ngModelChange",function(e){l(t);let i=s();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),p(e)}),a(),r(4,"h6"),u(5,"Sales Order Tag"),a(),r(6,"ng-select",10),f("ngModelChange",function(e){l(t);let i=s();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),p(e)}),a(),r(7,"h6"),u(8,"From"),a(),r(9,"div",11)(10,"div",12)(11,"datepicker",13),f("dateChange",function(e){l(t);let i=s();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),p(e)}),a()(),r(12,"div",12)(13,"app-timepicker",14),f("timeChange",function(e){l(t);let i=s();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),p(e)}),a()()(),r(14,"h6"),u(15,"To"),a(),r(16,"div",11)(17,"div",12)(18,"datepicker",15),f("dateChange",function(e){l(t);let i=s();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),p(e)}),a()(),r(19,"div",12)(20,"app-timepicker",14),f("timeChange",function(e){l(t);let i=s();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),p(e)}),a()()()()}if(o&2){let t=s();c(3),m("accessType",2),g("ngModel",t.pageData.Filter.EntityID),c(3),m("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),c(5),m("isFloatingLabel",!1),g("date",t.pageData.Filter.From),m("hidelClearBtn",!0),c(2),g("time",t.pageData.Filter.StartTime),m("fullWidth",!0),c(5),m("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),c(2),g("time",t.pageData.Filter.EndTime),m("fullWidth",!0)}}function me(o,d){o&1&&(r(0,"div",19),u(1,"\xA0"),a())}function se(o,d){if(o&1&&(S(0,"pos-receipt-a4",16),r(1,"div",17),S(2,"div",18),a(),v(3,me,2,0,"div",19)),o&2){let t=d.$implicit,n=d.$index,e=s(),i=s();m("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),c(3),D(n!==(e.Data==null?null:e.Data.length)-1?3:-1)}}function ce(o,d){o&1&&V(0,se,4,7,null,null,L),o&2&&W(d.Data)}var oe=class o extends K{constructor(t,n,e){super(t,n,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=n;this.initPrintListener()}dialogFilter=P(J);receipts$;printTemplates;invoiceIds=B([]);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(F.GetBulkPrintA4,this.pageData.Filter).pipe(I(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",z.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.post(F.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(n){return new(n||o)(h(X),h(q),h(H))};static \u0275cmp=A({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"],[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(T){return l(i),_(e.pageData.Filter.Number,T)||(e.pageData.Filter.Number=T),p(T)}),w("onSubmit",function(){return l(i),p(e.onFilter())}),r(1,"actions"),v(2,le,4,0,"button",2),b(3,"async"),r(4,"button",3),w("click",function(){return l(i),p(e.onNewPrint())}),u(5,"New"),a()(),r(6,"div",4),E(7,pe,21,14,"ng-template",null,0,O),a(),r(9,"content")(10,"div",5),v(11,ce,2,0),b(12,"async"),a()()()}if(n&2){let i,C;m("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),m("hideSearchDropdown",!0),c(2),D(((i=x(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),c(9),D((C=x(12,8,e.printTemplates&&e.receipts$))?11:-1,C)}},dependencies:[R,ae,re,Z,Y,ee,Q,ie,te,$,U,j,G,ne,N],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{oe as BulkInvoiceA4Component};
@@ -1 +1 @@
1
- import{a as Qe}from"./chunk-IFIH2CE2.js";import{a as Ae,f as Le}from"./chunk-54E6DGPE.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-BYTV42NJ.js";import"./chunk-DC3TCY6D.js";import{c as Ge}from"./chunk-2VE2WNSA.js";import"./chunk-4OEDK7YE.js";import"./chunk-GWKBJZYT.js";import{e as Ne}from"./chunk-B5IABJO5.js";import"./chunk-PHH2AA3W.js";import"./chunk-EO3NFUMI.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import"./chunk-FAED643P.js";import{b as be}from"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-M3DKYPGC.js";import"./chunk-VM4K4MNV.js";import{d as he}from"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-NNGM7TLL.js";import"./chunk-O7LZALSI.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import{c as Oe,d as De}from"./chunk-TBWTD5VK.js";import{a as ve,b as Pe}from"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as Me,v as Te,w as Ee}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as q}from"./chunk-TEGIL5RZ.js";import{e as we,f as Ie,g as ye}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-SLX34TWD.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-DED7477D.js";import{s as Ce}from"./chunk-LGOSIAUC.js";import{Ab as x,Ac as ae,Bb as te,Ca as k,Db as ie,E as Y,Eb as ne,Fb as c,Fc as g,Gb as n,Gc as C,Hb as o,Hc as me,I as J,Ib as b,Mb as T,Nb as E,Pb as S,Sa as Z,Sb as f,Sc as H,Tc as A,Ub as s,Vb as oe,Wb as Q,Xa as a,Y as z,Yb as U,Zb as V,_b as F,aa as X,cc as N,eb as G,ec as re,fa as $,gd as se,hc as l,ib as I,ic as d,jc as v,k as K,mb as ee,mc as P,nc as O,ob as y,oc as D,od as de,pa as M,sd as ce,ta as u,ua as _,vd as L,xc as le,yb as h,yc as pe}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};
1
+ import{a as Qe}from"./chunk-IFIH2CE2.js";import{a as Ae,f as Le}from"./chunk-QHXZVGLB.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-BYTV42NJ.js";import"./chunk-DC3TCY6D.js";import{c as Ge}from"./chunk-2VE2WNSA.js";import"./chunk-4OEDK7YE.js";import"./chunk-GWKBJZYT.js";import{e as Ne}from"./chunk-B5IABJO5.js";import"./chunk-PHH2AA3W.js";import"./chunk-QMOYHBVM.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import"./chunk-FAED643P.js";import{b as be}from"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-M3DKYPGC.js";import"./chunk-VM4K4MNV.js";import{d as he}from"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-UEN2SKB2.js";import"./chunk-45Z7RKI2.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import{c as Oe,d as De}from"./chunk-EQ4O2B6P.js";import{a as ve,b as Pe}from"./chunk-SLYXMED6.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as Me,v as Te,w as Ee}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as q}from"./chunk-TEGIL5RZ.js";import{e as we,f as Ie,g as ye}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-SLX34TWD.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-DWZ5JTI2.js";import"./chunk-ILTEBIEO.js";import"./chunk-PWTUEIUR.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-7AZJVR4Y.js";import{s as Ce}from"./chunk-LGOSIAUC.js";import{Ab as x,Ac as ae,Bb as te,Ca as k,Db as ie,E as Y,Eb as ne,Fb as c,Fc as g,Gb as n,Gc as C,Hb as o,Hc as me,I as J,Ib as b,Mb as T,Nb as E,Pb as S,Sa as Z,Sb as f,Sc as H,Tc as A,Ub as s,Vb as oe,Wb as Q,Xa as a,Y as z,Yb as U,Zb as V,_b as F,aa as X,cc as N,eb as G,ec as re,fa as $,gd as se,hc as l,ib as I,ic as d,jc as v,k as K,mb as ee,mc as P,nc as O,ob as y,oc as D,od as de,pa as M,sd as ce,ta as u,ua as _,vd as L,xc as le,yb as h,yc as pe}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};
@@ -1 +1 @@
1
- import{c as W,d as X}from"./chunk-T6FJJ74N.js";import{a as Y,b as Z}from"./chunk-L6PKNRWO.js";import{b as Q,c as U}from"./chunk-JBS5UYZC.js";import{a as B}from"./chunk-B7AC4RMR.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as J,h as q,o as G}from"./chunk-DWZ5JTI2.js";import{a as d}from"./chunk-WUV22SZ4.js";import{s as C}from"./chunk-LGOSIAUC.js";import{Ab as V,Fb as l,Fc as k,Gb as c,Gc as F,Hb as m,Lc as N,Ob as L,Pb as j,Sb as E,Ub as n,Xa as _,Y as f,Ya as M,ca as S,cc as I,d as x,eb as b,fa as T,ga as u,hc as v,ib as $,jc as R,la as w,nd as P,o as h,oa as O,ob as a,od as z,pa as D,ta as p,ua as g,vd as A,yb as H}from"./chunk-IEVGW2RT.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("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,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";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&&(d.IsEmpty(this.selectedCategoryID)&&d.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=this.placeholder}findSelectedCategory(t,e){if(d.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(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",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",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],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{ee as a};
1
+ import{c as W,d as X}from"./chunk-GRGZQFG6.js";import{a as Y,b as Z}from"./chunk-L6PKNRWO.js";import{b as Q,c as U}from"./chunk-JBS5UYZC.js";import{a as B}from"./chunk-B7AC4RMR.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as J,h as q,o as G}from"./chunk-DWZ5JTI2.js";import{a as d}from"./chunk-WUV22SZ4.js";import{s as C}from"./chunk-LGOSIAUC.js";import{Ab as V,Fb as l,Fc as k,Gb as c,Gc as F,Hb as m,Lc as N,Ob as L,Pb as j,Sb as E,Ub as n,Xa as _,Y as f,Ya as M,ca as S,cc as I,d as x,eb as b,fa as T,ga as u,hc as v,ib as $,jc as R,la as w,nd as P,o as h,oa as O,ob as a,od as z,pa as D,ta as p,ua as g,vd as A,yb as H}from"./chunk-IEVGW2RT.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("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,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";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&&(d.IsEmpty(this.selectedCategoryID)&&d.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=this.placeholder}findSelectedCategory(t,e){if(d.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(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",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",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],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{ee as a};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-XMZLK7EB.js";import{a as ve}from"./chunk-JE4O3B4S.js";import{a as Ce}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-NNGM7TLL.js";import"./chunk-TBWTD5VK.js";import{b as se}from"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as pe,v as me,w as ue}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as k}from"./chunk-TEGIL5RZ.js";import{e as ae,f as le,g as de}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import{b as re}from"./chunk-WFQIMZGL.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import{p as z,s as ie}from"./chunk-LGOSIAUC.js";import{Ab as u,Bb as O,Ca as V,Db as U,E as T,Eb as H,Fb as p,Gb as i,Hb as r,Ib as c,Lc as K,Nd as W,Ob as $,Oc as L,Pb as G,Sb as v,Ub as C,Xa as l,cc as j,eb as f,gd as M,hc as a,ib as y,ic as x,jc as w,mb as A,nd as B,ob as I,pa as _,t as D,ta as P,ua as E,vd as R,yb as m,yc as b,zc as q}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
1
+ import{a as ge}from"./chunk-XMZLK7EB.js";import{a as ve}from"./chunk-WWWSD2MX.js";import{a as Ce}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-UEN2SKB2.js";import"./chunk-EQ4O2B6P.js";import{b as se}from"./chunk-SLYXMED6.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as pe,v as me,w as ue}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as k}from"./chunk-TEGIL5RZ.js";import{e as ae,f as le,g as de}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-DWZ5JTI2.js";import"./chunk-ILTEBIEO.js";import"./chunk-PWTUEIUR.js";import"./chunk-36GWLMZX.js";import{b as re}from"./chunk-WFQIMZGL.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-7AZJVR4Y.js";import{p as z,s as ie}from"./chunk-LGOSIAUC.js";import{Ab as u,Bb as O,Ca as V,Db as U,E as T,Eb as H,Fb as p,Gb as i,Hb as r,Ib as c,Lc as K,Nd as W,Ob as $,Oc as L,Pb as G,Sb as v,Ub as C,Xa as l,cc as j,eb as f,gd as M,hc as a,ib as y,ic as x,jc as w,mb as A,nd as B,ob as I,pa as _,t as D,ta as P,ua as E,vd as R,yb as m,yc as b,zc as q}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-R2GUMKAU.js";import{c as ve,j as Se,k as C,l as _e}from"./chunk-FU2ZGMX4.js";import{X as xe,Y as ge,oa as Ce,pa as F,xa as ye}from"./chunk-SLX34TWD.js";import{a as me,g as ke}from"./chunk-DWZ5JTI2.js";import{a as be,c as fe}from"./chunk-WUCW3BSG.js";import{a as H}from"./chunk-WUV22SZ4.js";import{$c as g,Ab as J,Ca as Y,Fb as c,Gb as m,Hb as k,Ia as h,Ib as M,Lb as E,Mb as A,Nb as O,Oc as ae,Pb as W,Pd as ue,Qd as pe,Sb as ee,Sd as he,Tc as j,Ub as u,Xa as a,Xb as R,Ya as _,Yb as te,Zb as B,_b as w,ad as se,eb as I,fc as ne,gc as l,gd as D,hc as T,ib as d,jb as K,jc as ie,jd as le,ka as P,la as $,ma as q,mb as b,na as G,nb as X,nd as de,ob as x,pa as y,ta as v,ua as S,va as p,vd as N,wb as z,wc as oe,xc as ce,ya as U,yb as Z,yc as V,zc as re}from"./chunk-IEVGW2RT.js";var Ne=e=>({"pe-none":e}),Fe=()=>["/menu/Profile/Main/My_Subscription"],Le=e=>({"text-decoration-none":e}),ze=e=>({"text-capitalize":e});function Ae(e,o){if(e&1&&(m(0,"div",1)(1,"h5",2),T(2),m(3,"a",3)(4,"u",4)(5,"span",4),T(6,"please"),k(),T(7," process your payment! "),k()()()()),e&2){let t=u();l("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),a(2),ie(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),a(),c("ngClass",V(7,Ne,t.isMySubscriptionMenu))("routerLink",ce(9,Fe)),a(),c("ngClass",V(10,Le,t.isMySubscriptionMenu)),a(),c("ngClass",V(12,ze,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var Ie=class e{constructor(o,t,i){this.document=o;this.router=t;this.authService=i}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=be;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(o){return H.IsNotEmpty(o)}overrideCssStickyHeader(){if(H.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let o=`.sticky-top-thead th {
1
+ import{a as L}from"./chunk-R2GUMKAU.js";import{c as ve,j as Se,k as C,l as _e}from"./chunk-FU2ZGMX4.js";import{X as xe,Y as ge,oa as Ce,pa as F,xa as ye}from"./chunk-SLX34TWD.js";import{a as me,g as ke}from"./chunk-DWZ5JTI2.js";import{a as be,c as fe}from"./chunk-ILTEBIEO.js";import{a as H}from"./chunk-WUV22SZ4.js";import{$c as g,Ab as J,Ca as Y,Fb as c,Gb as m,Hb as k,Ia as h,Ib as M,Lb as E,Mb as A,Nb as O,Oc as ae,Pb as W,Pd as ue,Qd as pe,Sb as ee,Sd as he,Tc as j,Ub as u,Xa as a,Xb as R,Ya as _,Yb as te,Zb as B,_b as w,ad as se,eb as I,fc as ne,gc as l,gd as D,hc as T,ib as d,jb as K,jc as ie,jd as le,ka as P,la as $,ma as q,mb as b,na as G,nb as X,nd as de,ob as x,pa as y,ta as v,ua as S,va as p,vd as N,wb as z,wc as oe,xc as ce,ya as U,yb as Z,yc as V,zc as re}from"./chunk-IEVGW2RT.js";var Ne=e=>({"pe-none":e}),Fe=()=>["/menu/Profile/Main/My_Subscription"],Le=e=>({"text-decoration-none":e}),ze=e=>({"text-capitalize":e});function Ae(e,o){if(e&1&&(m(0,"div",1)(1,"h5",2),T(2),m(3,"a",3)(4,"u",4)(5,"span",4),T(6,"please"),k(),T(7," process your payment! "),k()()()()),e&2){let t=u();l("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),a(2),ie(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),a(),c("ngClass",V(7,Ne,t.isMySubscriptionMenu))("routerLink",ce(9,Fe)),a(),c("ngClass",V(10,Le,t.isMySubscriptionMenu)),a(),c("ngClass",V(12,ze,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var Ie=class e{constructor(o,t,i){this.document=o;this.router=t;this.authService=i}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=be;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(o){return H.IsNotEmpty(o)}overrideCssStickyHeader(){if(H.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let o=`.sticky-top-thead th {
2
2
  top: 100px !important;
3
3
  z-index: 1020;
4
4
  }`;this.htmlBodyElement=this.document.getElementsByTagName("body")[0],this.htmlStyleElement=this.document.createElement("style"),this.htmlStyleElement.appendChild(this.document.createTextNode(o)),this.htmlBodyElement.appendChild(this.htmlStyleElement)}}initSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus(),this.subscriptionStatus=[{status:1,class:"alert-warning",message:"Your subscription is overdue. To avoid suspension, "},{status:2,class:"alert-danger",message:"Your subscription is partially suspended."},{status:3,class:"alert-danger",message:"Your subscription is suspended."}],this.subscriptionState=this.subscriptionStatus.filter(o=>o.status==this.currentSubStatus)[0]}ngOnDestroy(){this.htmlBodyElement&&this.htmlBodyElement.removeChild(this.htmlStyleElement)}static \u0275fac=function(t){return new(t||e)(I(U),I(ue),I(fe))};static \u0275cmp=d({type:e,selectors:[["subscription-alert"]],decls:1,vars:1,consts:[["role","alert",3,"class"],["role","alert"],[1,"fw-normal"],[1,"alert-link",3,"ngClass","routerLink"],[3,"ngClass"]],template:function(t,i){t&1&&Z(0,Ae,8,14,"div",0),t&2&&J((i.subscriptionState==null?null:i.subscriptionState.status)==i.currentSubStatus&&i.isNotEmpty(i.currentSubStatus)?0:-1)},dependencies:[N,D,he,pe],encapsulation:2})};var Oe=["data-p-icon","check"],Me=(()=>{class e extends L{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=d({type:e,selectors:[["","data-p-icon","check"]],features:[b],attrs:Oe,decls:1,vars:0,consts:[["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(i,n){i&1&&(p(),E(0,"path",0))},encapsulation:2})}return e})();var Re=["data-p-icon","minus"],Ee=(()=>{class e extends L{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=d({type:e,selectors:[["","data-p-icon","minus"]],features:[b],attrs:Re,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(i,n){i&1&&(p(),E(0,"path",0))},encapsulation:2})}return e})();var Be=`
@@ -1 +1 @@
1
- import{b as c}from"./chunk-WUCW3BSG.js";import{la as r,pa as s}from"./chunk-IEVGW2RT.js";var i=class{to;from;constructor(){this.to=new Date,this.from=new Date}};var n=class o{cookiesService=s(c);_cookiesName="PaymentDate";dateFilter={from:new Date,to:new Date};set(e){this.saveFilterToCookie(e),this.dateFilter=e}initFilterDate(e){let t;if(this.checkCookieExists())t=this.get();else{let a=e.From||new Date,m=e.To||new Date;t={from:a,to:m}}return e.From=t.from,e.To=t.to,e}get(){return this.checkCookieExists()?this.dateFilter=JSON.parse(this.cookiesService.get(this._cookiesName)):this.dateFilter=new i,this.dateFilter}checkCookieExists(){return this.cookiesService.check(this._cookiesName)}saveFilterToCookie(e){this.cookiesService.set(this._cookiesName,JSON.stringify(e),this.getExpiredDate(),"/")}clear(){this.cookiesService.delete(this._cookiesName,"/"),this.dateFilter=new i}getExpiredDate(){let e=new Date,a=1*60*60*1e3;return e.setTime(e.getTime()+a),e}static \u0275fac=function(t){return new(t||o)};static \u0275prov=r({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
1
+ import{b as c}from"./chunk-ILTEBIEO.js";import{la as r,pa as s}from"./chunk-IEVGW2RT.js";var i=class{to;from;constructor(){this.to=new Date,this.from=new Date}};var n=class o{cookiesService=s(c);_cookiesName="PaymentDate";dateFilter={from:new Date,to:new Date};set(e){this.saveFilterToCookie(e),this.dateFilter=e}initFilterDate(e){let t;if(this.checkCookieExists())t=this.get();else{let a=e.From||new Date,m=e.To||new Date;t={from:a,to:m}}return e.From=t.from,e.To=t.to,e}get(){return this.checkCookieExists()?this.dateFilter=JSON.parse(this.cookiesService.get(this._cookiesName)):this.dateFilter=new i,this.dateFilter}checkCookieExists(){return this.cookiesService.check(this._cookiesName)}saveFilterToCookie(e){this.cookiesService.set(this._cookiesName,JSON.stringify(e),this.getExpiredDate(),"/")}clear(){this.cookiesService.delete(this._cookiesName,"/"),this.dateFilter=new i}getExpiredDate(){let e=new Date,a=1*60*60*1e3;return e.setTime(e.getTime()+a),e}static \u0275fac=function(t){return new(t||o)};static \u0275prov=r({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-NZBEEY37.js";import"./chunk-5EDMTMQE.js";import"./chunk-AQW4VS3Y.js";import"./chunk-4W3WYXI2.js";import"./chunk-T6FJJ74N.js";import"./chunk-2MVZ322B.js";import"./chunk-VXPORXGI.js";import"./chunk-ZE44HGGG.js";import"./chunk-J53YFCCL.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import"./chunk-J6M7UWVR.js";import"./chunk-NNGM7TLL.js";import"./chunk-O7LZALSI.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-TBWTD5VK.js";import"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import"./chunk-LGOSIAUC.js";import"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";export{a as CompositeInventoryComponent};
1
+ import{a}from"./chunk-7NZLZJYF.js";import"./chunk-23VPQAH7.js";import"./chunk-AQW4VS3Y.js";import"./chunk-4W3WYXI2.js";import"./chunk-GRGZQFG6.js";import"./chunk-W3PBP3KZ.js";import"./chunk-VXPORXGI.js";import"./chunk-5UMDVS4U.js";import"./chunk-3NPCLTJT.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import"./chunk-J6M7UWVR.js";import"./chunk-UEN2SKB2.js";import"./chunk-45Z7RKI2.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-EQ4O2B6P.js";import"./chunk-SLYXMED6.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-ILTEBIEO.js";import"./chunk-PWTUEIUR.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-7AZJVR4Y.js";import"./chunk-LGOSIAUC.js";import"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";export{a as CompositeInventoryComponent};
@@ -1 +1 @@
1
- import{f as u}from"./chunk-NNGM7TLL.js";import"./chunk-TBWTD5VK.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import"./chunk-LGOSIAUC.js";import{Gb as o,Hb as m,Ib as p,Sd as d,hc as c,ib as f,jb as i,ma as n,vd as l}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var a=class t{menuData={H:"Not Found"};constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=f({type:t,selectors:[["POS-not-found-page"]],standalone:!1,decls:12,vars:0,consts:[[1,"container-fluid","mt-12"],[1,"row"],[1,"col-1"],[1,"col-6","d-flex","align-items-center","justify-content-center","pe-0"],[1,"ms-12"],[1,"mb-0","fw-normal",2,"margin-top","20px","font-size","55px"],[1,"fs-4"],[1,"col-5","ps-0"],["src","https://cdn.dealpos.xyz/web-image/MicrosoftTeams-image.jpg","alt","",2,"width","50%"]],template:function(e,y){e&1&&(o(0,"content")(1,"div",0)(2,"div",1),p(3,"div",2),o(4,"div",3)(5,"div",4)(6,"h1",5),c(7," Page Not Found "),m(),o(8,"p",6),c(9,"The page you are trying to access cannot be found"),m()()(),o(10,"div",7),p(11,"img",8),m()()()())},encapsulation:2})};var M=[{path:"",component:a}],r=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[d.forChild(M),d]})};var N=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[l,r,u]})};export{N as NotFoundModule};
1
+ import{f as u}from"./chunk-UEN2SKB2.js";import"./chunk-EQ4O2B6P.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-ILTEBIEO.js";import"./chunk-PWTUEIUR.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-7AZJVR4Y.js";import"./chunk-LGOSIAUC.js";import{Gb as o,Hb as m,Ib as p,Sd as d,hc as c,ib as f,jb as i,ma as n,vd as l}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var a=class t{menuData={H:"Not Found"};constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=f({type:t,selectors:[["POS-not-found-page"]],standalone:!1,decls:12,vars:0,consts:[[1,"container-fluid","mt-12"],[1,"row"],[1,"col-1"],[1,"col-6","d-flex","align-items-center","justify-content-center","pe-0"],[1,"ms-12"],[1,"mb-0","fw-normal",2,"margin-top","20px","font-size","55px"],[1,"fs-4"],[1,"col-5","ps-0"],["src","https://cdn.dealpos.xyz/web-image/MicrosoftTeams-image.jpg","alt","",2,"width","50%"]],template:function(e,y){e&1&&(o(0,"content")(1,"div",0)(2,"div",1),p(3,"div",2),o(4,"div",3)(5,"div",4)(6,"h1",5),c(7," Page Not Found "),m(),o(8,"p",6),c(9,"The page you are trying to access cannot be found"),m()()(),o(10,"div",7),p(11,"img",8),m()()()())},encapsulation:2})};var M=[{path:"",component:a}],r=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[d.forChild(M),d]})};var N=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[l,r,u]})};export{N as NotFoundModule};
@@ -1,4 +1,4 @@
1
- import{a as wt,b as Et}from"./chunk-L6PKNRWO.js";import{b as vt}from"./chunk-SIQZO2WM.js";import{a as Tt,b as Ct,c as xt,d as St,e as Nt}from"./chunk-7YUPYNWQ.js";import{a as yt}from"./chunk-LGINK7BD.js";import{a as Ie,b as He}from"./chunk-QPAUI5EG.js";import{a as bt}from"./chunk-45E6XCHN.js";import{a as It}from"./chunk-SIDUUVNA.js";import{c as _t}from"./chunk-TBWTD5VK.js";import{b as mt,c as ht}from"./chunk-JBS5UYZC.js";import{a as Ze}from"./chunk-B7AC4RMR.js";import{a as Se,b as dt,c as gt,d as ft}from"./chunk-S7FOJJP2.js";import{b as at,c as pe,d as Pe,j as pt,k as O,l as ut}from"./chunk-FU2ZGMX4.js";import{A as it,F as ot,H as rt,V as Le,W as lt,a as R,ga as Ae,m as tt,oa as ee,pa as P,qa as st,ra as ct,v as Be,w as nt,x as Z,xa as xe,z as de}from"./chunk-SLX34TWD.js";import{F as ce,a as et,h as be,o as ve}from"./chunk-DWZ5JTI2.js";import{a as Te}from"./chunk-WUV22SZ4.js";import{s as Ce}from"./chunk-LGOSIAUC.js";import{$c as T,Ab as U,Ac as Ke,Ca as fe,Fb as a,Fc as We,Gb as m,Gc as Ge,Hb as y,Ia as G,Ib as I,Lc as k,Mb as N,Nb as w,Ob as S,Oc as H,Pb as V,Sb as C,Sc as Ye,Tc as le,Ub as s,Xa as c,Xb as v,Y as Me,Ya as b,Yb as M,Zb as h,_b as _,ad as q,ca as Ve,cc as Y,d as ze,dc as Fe,eb as ie,fa as Qe,fc as J,ga as Oe,gc as f,gd as Je,hc as L,ib as z,ic as _e,id as ae,jb as me,jc as X,jd as se,ka as ue,la as W,ma as ge,mb as oe,mc as $e,md as ye,na as ne,nb as he,nc as qe,nd as j,o as De,oa as Ue,ob as d,oc as je,od as Xe,pa as D,ta as u,ua as g,va as B,vd as K,wb as E,wc as re,yb as Q,yc as A,zc as $}from"./chunk-IEVGW2RT.js";import{a as te}from"./chunk-SNAKHGZS.js";var kt=`
1
+ import{a as wt,b as Et}from"./chunk-L6PKNRWO.js";import{b as vt}from"./chunk-SIQZO2WM.js";import{a as Tt,b as Ct,c as xt,d as St,e as Nt}from"./chunk-7YUPYNWQ.js";import{a as yt}from"./chunk-LGINK7BD.js";import{a as Ie,b as He}from"./chunk-QPAUI5EG.js";import{a as bt}from"./chunk-45E6XCHN.js";import{a as It}from"./chunk-SIDUUVNA.js";import{c as _t}from"./chunk-EQ4O2B6P.js";import{b as mt,c as ht}from"./chunk-JBS5UYZC.js";import{a as Ze}from"./chunk-B7AC4RMR.js";import{a as Se,b as dt,c as gt,d as ft}from"./chunk-S7FOJJP2.js";import{b as at,c as pe,d as Pe,j as pt,k as O,l as ut}from"./chunk-FU2ZGMX4.js";import{A as it,F as ot,H as rt,V as Le,W as lt,a as R,ga as Ae,m as tt,oa as ee,pa as P,qa as st,ra as ct,v as Be,w as nt,x as Z,xa as xe,z as de}from"./chunk-SLX34TWD.js";import{F as ce,a as et,h as be,o as ve}from"./chunk-DWZ5JTI2.js";import{a as Te}from"./chunk-WUV22SZ4.js";import{s as Ce}from"./chunk-LGOSIAUC.js";import{$c as T,Ab as U,Ac as Ke,Ca as fe,Fb as a,Fc as We,Gb as m,Gc as Ge,Hb as y,Ia as G,Ib as I,Lc as k,Mb as N,Nb as w,Ob as S,Oc as H,Pb as V,Sb as C,Sc as Ye,Tc as le,Ub as s,Xa as c,Xb as v,Y as Me,Ya as b,Yb as M,Zb as h,_b as _,ad as q,ca as Ve,cc as Y,d as ze,dc as Fe,eb as ie,fa as Qe,fc as J,ga as Oe,gc as f,gd as Je,hc as L,ib as z,ic as _e,id as ae,jb as me,jc as X,jd as se,ka as ue,la as W,ma as ge,mb as oe,mc as $e,md as ye,na as ne,nb as he,nc as qe,nd as j,o as De,oa as Ue,ob as d,oc as je,od as Xe,pa as D,ta as u,ua as g,va as B,vd as K,wb as E,wc as re,yb as Q,yc as A,zc as $}from"./chunk-IEVGW2RT.js";import{a as te}from"./chunk-SNAKHGZS.js";var kt=`
2
2
  .p-tree {
3
3
  display: block;
4
4
  background: dt('tree.background');