dealpos 25.45.1 → 25.45.2

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-LKKENA2L.js → chunk-2BSYBLS4.js} +1 -1
  2. package/browser/{chunk-FPO73IWN.js → chunk-3MUHZKUR.js} +1 -1
  3. package/browser/{chunk-LP2YX47Z.js → chunk-3RGQWWNI.js} +1 -1
  4. package/browser/{chunk-YTOGQOIP.js → chunk-4KBU47GN.js} +1 -1
  5. package/browser/{chunk-BA466YBV.js → chunk-5I74KDE7.js} +1 -1
  6. package/browser/{chunk-4AUOGTXI.js → chunk-5PWOYB4R.js} +2 -2
  7. package/browser/{chunk-UPC37DMP.js → chunk-5ZU5FBGM.js} +1 -1
  8. package/browser/{chunk-6MU3ID6Q.js → chunk-6A3BN6JC.js} +1 -1
  9. package/browser/{chunk-CRLFATTL.js → chunk-6Q7J43H4.js} +1 -1
  10. package/browser/{chunk-WQNTJH2X.js → chunk-6VM27TUY.js} +1 -1
  11. package/browser/{chunk-TYUL4J6N.js → chunk-7EVERJPZ.js} +1 -1
  12. package/browser/{chunk-4NLZJJA4.js → chunk-7FUWLNHK.js} +1 -1
  13. package/browser/{chunk-RVKNSR2K.js → chunk-7USHMTB5.js} +1 -1
  14. package/browser/{chunk-AMUMNTYT.js → chunk-A6F6V3WW.js} +1 -1
  15. package/browser/{chunk-JRP5O56W.js → chunk-B6EKSPI2.js} +1 -1
  16. package/browser/{chunk-7O6Z7YZS.js → chunk-BXGUZIC4.js} +1 -1
  17. package/browser/{chunk-UP2UDOTJ.js → chunk-DG4IHOM2.js} +1 -1
  18. package/browser/{chunk-HQWW3C2M.js → chunk-DJNB7COU.js} +1 -1
  19. package/browser/{chunk-JTRNQBXF.js → chunk-DU7W2G2L.js} +1 -1
  20. package/browser/{chunk-B3EZEY4B.js → chunk-DZA27E5L.js} +1 -1
  21. package/browser/{chunk-J5FCCS76.js → chunk-EGADVOKH.js} +1 -1
  22. package/browser/{chunk-OZGLZGND.js → chunk-FAGD2TBB.js} +1 -1
  23. package/browser/{chunk-2TXCUXTF.js → chunk-FAN4YDVT.js} +1 -1
  24. package/browser/{chunk-IVBM4Y3J.js → chunk-FSGCO2Z5.js} +1 -1
  25. package/browser/{chunk-3IWVFLM3.js → chunk-G4XFK7EF.js} +1 -1
  26. package/browser/{chunk-OND3CFSL.js → chunk-GINPKODK.js} +1 -1
  27. package/browser/{chunk-BZVCDBQR.js → chunk-GUF6JXSS.js} +1 -1
  28. package/browser/{chunk-W6PT2SCS.js → chunk-HBH23XBO.js} +1 -1
  29. package/browser/{chunk-QUAMZZS6.js → chunk-HC2YTBED.js} +1 -1
  30. package/browser/{chunk-DC5TNUBW.js → chunk-HHSXXJFJ.js} +1 -1
  31. package/browser/{chunk-PXOXHTNI.js → chunk-IAFZ6YAO.js} +1 -1
  32. package/browser/{chunk-KQXOXN6S.js → chunk-IAFZ75L3.js} +2 -2
  33. package/browser/{chunk-KFDGG6IE.js → chunk-IE2H4VRD.js} +1 -1
  34. package/browser/{chunk-ZGSYDQBM.js → chunk-IJXCL7KL.js} +1 -1
  35. package/browser/{chunk-2SM2HFRR.js → chunk-IPJU7D3K.js} +1 -1
  36. package/browser/{chunk-JKBJ3O3G.js → chunk-IQ7VK4UE.js} +3 -3
  37. package/browser/{chunk-ICDZ6ZG2.js → chunk-IT7I47UZ.js} +1 -1
  38. package/browser/{chunk-IFARYZIK.js → chunk-IUE6IUOH.js} +1 -1
  39. package/browser/{chunk-V75YVSP3.js → chunk-J3OQGBIN.js} +1 -1
  40. package/browser/{chunk-IVR7R22T.js → chunk-JGWQC4DI.js} +1 -1
  41. package/browser/{chunk-UH2PJXPG.js → chunk-KB64CIW5.js} +2 -2
  42. package/browser/{chunk-36JFFXJO.js → chunk-KDOS4X4T.js} +1 -1
  43. package/browser/{chunk-NGRJ35NF.js → chunk-KL5VH4OU.js} +1 -1
  44. package/browser/{chunk-SH3T5X7H.js → chunk-KTV4REGV.js} +1 -1
  45. package/browser/{chunk-H3RJALHH.js → chunk-L3JI6OZ3.js} +1 -1
  46. package/browser/{chunk-I26CNUBY.js → chunk-L453AX2W.js} +1 -1
  47. package/browser/{chunk-MOLMIGZ2.js → chunk-M4BTEXS6.js} +1 -1
  48. package/browser/{chunk-FQTHN2D5.js → chunk-M76YU6SQ.js} +1 -1
  49. package/browser/{chunk-THGBNMLF.js → chunk-MFDMUMA4.js} +1 -1
  50. package/browser/{chunk-4JCHCMUR.js → chunk-MHZV4BL7.js} +1 -1
  51. package/browser/{chunk-JTTRYU4G.js → chunk-MXGNASOC.js} +1 -1
  52. package/browser/{chunk-DV6Z7FPV.js → chunk-N43HXORE.js} +1 -1
  53. package/browser/{chunk-NNONJUQ3.js → chunk-N7C7P5QN.js} +1 -1
  54. package/browser/{chunk-OTIPYKW7.js → chunk-NERV3W42.js} +1 -1
  55. package/browser/{chunk-P2CKEL54.js → chunk-NM3RF6OH.js} +1 -1
  56. package/browser/{chunk-55FE5P6P.js → chunk-OKEI5RKW.js} +1 -1
  57. package/browser/{chunk-YY3636UT.js → chunk-OKVQYK4Y.js} +1 -1
  58. package/browser/{chunk-43CXFI4D.js → chunk-OLT6DXR7.js} +1 -1
  59. package/browser/chunk-PCFR4J66.js +131 -0
  60. package/browser/{chunk-X6MBRJTG.js → chunk-PIW2M2DH.js} +2 -2
  61. package/browser/{chunk-7TEDBCUJ.js → chunk-PNN75KZR.js} +1 -1
  62. package/browser/{chunk-SXPVIX36.js → chunk-PUFGTKWO.js} +1 -1
  63. package/browser/{chunk-D5RACD33.js → chunk-RKCNENWQ.js} +1 -1
  64. package/browser/{chunk-M6SFCHJQ.js → chunk-SICZ4VWZ.js} +1 -1
  65. package/browser/{chunk-E424AX7J.js → chunk-T3HVVJIV.js} +1 -1
  66. package/browser/{chunk-G4D3XN53.js → chunk-TCR2YYM5.js} +1 -1
  67. package/browser/{chunk-IMM7CUI7.js → chunk-TPHEWWHE.js} +3 -3
  68. package/browser/{chunk-KMIXT3V6.js → chunk-TWVDGGTY.js} +1 -1
  69. package/browser/{chunk-FDH4S2DG.js → chunk-USEPOJ5L.js} +1 -1
  70. package/browser/{chunk-MFHN36L5.js → chunk-UYXD7WPN.js} +1 -1
  71. package/browser/{chunk-TNZMSOM3.js → chunk-VBX5VOJG.js} +1 -1
  72. package/browser/{chunk-GYYMO4YR.js → chunk-W34NDG3T.js} +1 -1
  73. package/browser/{chunk-BZ44CISC.js → chunk-W5N6DMDQ.js} +1 -1
  74. package/browser/{chunk-PYATA4SM.js → chunk-WRZUQ2QI.js} +1 -1
  75. package/browser/{chunk-IGHHLZWC.js → chunk-WXJTNRD3.js} +1 -1
  76. package/browser/{chunk-5VUKKQUZ.js → chunk-X6XUOWVT.js} +2 -2
  77. package/browser/{chunk-TIGG24TH.js → chunk-XF5XKXE6.js} +1 -1
  78. package/browser/{chunk-6ASBLKNZ.js → chunk-XHA6WGTO.js} +1 -1
  79. package/browser/{chunk-VVB7545X.js → chunk-XKAKP3E6.js} +1 -1
  80. package/browser/{chunk-Y6JQWF34.js → chunk-XRLRUCRR.js} +1 -1
  81. package/browser/{chunk-IKJNYXIS.js → chunk-YM2ZQTDF.js} +1 -1
  82. package/browser/{chunk-EBHLJ7D3.js → chunk-YQE3PJGM.js} +2 -2
  83. package/browser/{chunk-4JVPFRFP.js → chunk-ZEXXJZ7U.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-WVCGTGWV.js → main-7FKCOQYA.js} +2 -2
  86. package/package.json +1 -1
  87. package/browser/chunk-VPBOQNZA.js +0 -131
@@ -1,4 +1,4 @@
1
- import{a as te,c as Mt,d as Dt}from"./chunk-SH3T5X7H.js";import{d as ne}from"./chunk-3LPZYQS6.js";import{a as ft}from"./chunk-BJKHMXAA.js";import{F as Tt,G as kt,u as yt,v as xt,w as wt}from"./chunk-EGUIWOC3.js";import{b as _t,c as ht}from"./chunk-VQBUIUJC.js";import{N as Vt,n as St}from"./chunk-HYXSN2J6.js";import{a as tt,e as bt,f as Ct,g as vt}from"./chunk-QGYIPOLS.js";import{s as gt}from"./chunk-WACBOZDR.js";import{c as ut,g as mt}from"./chunk-YZP4FX7D.js";import{F as be,L as rt,M as lt,b as nt,ia as st,k as it,la as ct,ma as ee,p as ot,ra as dt,ua as pt,v as at}from"./chunk-WAXYETAG.js";import{F as Xe,c as Ue,h as qe,i as Ze,k as $e,o as Ye,p as Ge}from"./chunk-OJ5SEYSF.js";import{a as Qe,c as et}from"./chunk-W6PT2SCS.js";import{a as Je}from"./chunk-BA466YBV.js";import{a as N}from"./chunk-TS6CZC3J.js";import{$b as de,$d as We,Ab as V,Bb as u,Bc as q,Cb as a,Cc as me,Db as l,Dc as Be,Eb as _,Ia as ce,Id as Ne,Jd as _e,Kb as Fe,Lb as b,Lc as fe,Ld as X,Md as J,N as Se,Nb as g,Od as he,Pb as c,Pc as ge,Qb as Q,Qc as Z,Rb as T,Sb as P,Ub as F,Va as Te,Vb as E,Wa as s,Wc as Ke,Xa as y,Xb as z,Xc as $,Ya as ke,Yb as Ee,Yc as Oe,Zd as je,_d as He,aa as Ve,bc as pe,be as ze,cb as v,cc as h,cd as Ae,d as xe,dc as O,ec as A,fd as Le,gb as B,hb as W,hc as k,ic as M,id as Re,jb as Me,jc as D,jd as Y,kb as De,la as j,ma as H,mb as K,nc as L,pa as I,rc as Ie,rd as R,sb as Pe,sc as U,sd as G,t as we,ta as d,tc as x,ua as p,ub as m,uc as ue,wb as f,yb as w,zb as S}from"./chunk-VS3RTXZC.js";import{a as se,b as ye}from"./chunk-SNAKHGZS.js";var ie=class t{_openDialog=new xe;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=j({token:t,factory:t.\u0275fac,providedIn:"root"})};var At=["content"],Lt=["*"],Rt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),Nt=(t,o)=>({value:t,params:o}),jt=t=>({closeCallback:t});function Ht(t,o){}function Wt(t,o){t&1&&K(0,Ht,0,0,"ng-template")}function Qt(t,o){if(t&1){let e=b();a(0,"div",1),g("click",function(i){d(e);let r=c();return p(r.onOverlayClick(i))})("@animation.start",function(i){d(e);let r=c();return p(r.onAnimationStart(i))})("@animation.done",function(i){d(e);let r=c();return p(r.onAnimationEnd(i))}),a(1,"div",2),g("click",function(i){d(e);let r=c();return p(r.onContentClick(i))})("mousedown",function(i){d(e);let r=c();return p(r.onContentClick(i))}),T(2),K(3,Wt,1,0,null,3),l()()}if(t&2){let e=c();pe(e.cn(e.cx("root"),e.styleClass)),u("ngStyle",e.style)("@animation",ue(14,Nt,e.overlayVisible?"open":"close",ue(11,Rt,e.showTransitionOptions,e.hideTransitionOptions))),Pe("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),s(),pe(e.cx("content")),s(2),u("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",x(17,jt,e.onCloseClick.bind(e)))}}var zt=`
1
+ import{a as te,c as Mt,d as Dt}from"./chunk-KTV4REGV.js";import{d as ne}from"./chunk-3LPZYQS6.js";import{a as ft}from"./chunk-BJKHMXAA.js";import{F as Tt,G as kt,u as yt,v as xt,w as wt}from"./chunk-EGUIWOC3.js";import{b as _t,c as ht}from"./chunk-VQBUIUJC.js";import{N as Vt,n as St}from"./chunk-HYXSN2J6.js";import{a as tt,e as bt,f as Ct,g as vt}from"./chunk-QGYIPOLS.js";import{s as gt}from"./chunk-WACBOZDR.js";import{c as ut,g as mt}from"./chunk-YZP4FX7D.js";import{F as be,L as rt,M as lt,b as nt,ia as st,k as it,la as ct,ma as ee,p as ot,ra as dt,ua as pt,v as at}from"./chunk-WAXYETAG.js";import{F as Xe,c as Ue,h as qe,i as Ze,k as $e,o as Ye,p as Ge}from"./chunk-OJ5SEYSF.js";import{a as Qe,c as et}from"./chunk-HBH23XBO.js";import{a as Je}from"./chunk-5I74KDE7.js";import{a as N}from"./chunk-TS6CZC3J.js";import{$b as de,$d as We,Ab as V,Bb as u,Bc as q,Cb as a,Cc as me,Db as l,Dc as Be,Eb as _,Ia as ce,Id as Ne,Jd as _e,Kb as Fe,Lb as b,Lc as fe,Ld as X,Md as J,N as Se,Nb as g,Od as he,Pb as c,Pc as ge,Qb as Q,Qc as Z,Rb as T,Sb as P,Ub as F,Va as Te,Vb as E,Wa as s,Wc as Ke,Xa as y,Xb as z,Xc as $,Ya as ke,Yb as Ee,Yc as Oe,Zd as je,_d as He,aa as Ve,bc as pe,be as ze,cb as v,cc as h,cd as Ae,d as xe,dc as O,ec as A,fd as Le,gb as B,hb as W,hc as k,ic as M,id as Re,jb as Me,jc as D,jd as Y,kb as De,la as j,ma as H,mb as K,nc as L,pa as I,rc as Ie,rd as R,sb as Pe,sc as U,sd as G,t as we,ta as d,tc as x,ua as p,ub as m,uc as ue,wb as f,yb as w,zb as S}from"./chunk-VS3RTXZC.js";import{a as se,b as ye}from"./chunk-SNAKHGZS.js";var ie=class t{_openDialog=new xe;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=j({token:t,factory:t.\u0275fac,providedIn:"root"})};var At=["content"],Lt=["*"],Rt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),Nt=(t,o)=>({value:t,params:o}),jt=t=>({closeCallback:t});function Ht(t,o){}function Wt(t,o){t&1&&K(0,Ht,0,0,"ng-template")}function Qt(t,o){if(t&1){let e=b();a(0,"div",1),g("click",function(i){d(e);let r=c();return p(r.onOverlayClick(i))})("@animation.start",function(i){d(e);let r=c();return p(r.onAnimationStart(i))})("@animation.done",function(i){d(e);let r=c();return p(r.onAnimationEnd(i))}),a(1,"div",2),g("click",function(i){d(e);let r=c();return p(r.onContentClick(i))})("mousedown",function(i){d(e);let r=c();return p(r.onContentClick(i))}),T(2),K(3,Wt,1,0,null,3),l()()}if(t&2){let e=c();pe(e.cn(e.cx("root"),e.styleClass)),u("ngStyle",e.style)("@animation",ue(14,Nt,e.overlayVisible?"open":"close",ue(11,Rt,e.showTransitionOptions,e.hideTransitionOptions))),Pe("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),s(),pe(e.cx("content")),s(2),u("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",x(17,jt,e.onCloseClick.bind(e)))}}var zt=`
2
2
  .p-popover {
3
3
  margin-top: dt('popover.gutter');
4
4
  background: dt('popover.background');
@@ -1 +1 @@
1
- import{a as te}from"./chunk-NJB3X4XL.js";import{d as ee}from"./chunk-I4WJ5CEN.js";import{a as z,b as J}from"./chunk-L5HF7UAT.js";import{c as $}from"./chunk-BZVCDBQR.js";import{b as X}from"./chunk-HVRLWPZX.js";import{a as K}from"./chunk-FPO73IWN.js";import{e as Z}from"./chunk-36JFFXJO.js";import{b as Y}from"./chunk-J5FCCS76.js";import{g as U}from"./chunk-QGYIPOLS.js";import{h as q,o as H}from"./chunk-OJ5SEYSF.js";import{d as Q}from"./chunk-TS6CZC3J.js";import{Ab as W,Bb as g,Bc as D,Cb as i,Db as r,Dc as x,Eb as M,Hc as B,Lb as C,Nb as h,Pb as c,Wa as l,Wd as O,Zd as j,be as A,cb as f,cc as o,dc as v,ec as L,ee as G,gb as E,hc as S,ic as u,jc as y,kb as R,mb as b,md as N,ta as m,ua as s,ub as T,vc as P,wb as F,yb as I,yc as k,zb as V}from"./chunk-VS3RTXZC.js";var ae=(p,d,t,n,e,a)=>({LogisticServiceID:p,EntityID:d,From:t,To:n,StartTime:e,EndTime:a}),re=(p,d,t)=>({From:p,To:d,LogisticsServiceID:t});function ne(p,d){if(p&1){let t=C();i(0,"button",4),h("click",function(){m(t);let e=c();return s(e.openExportModal())}),M(1,"i",5),o(2," Export "),r()}}function oe(p,d){if(p&1){let t=C();i(0,"div",6)(1,"h6"),o(2,"Outlet"),r(),i(3,"outlet-selector",7),y("ngModelChange",function(e){m(t);let a=c();return u(a.pageData.Filter.EntityID,e)||(a.pageData.Filter.EntityID=e),s(e)}),r(),i(4,"h6"),o(5,"From"),r(),i(6,"datepicker",8),y("dateChange",function(e){m(t);let a=c();return u(a.pageData.Filter.From,e)||(a.pageData.Filter.From=e),s(e)}),r(),i(7,"h6"),o(8,"To"),r(),i(9,"datepicker",9),y("dateChange",function(e){m(t);let a=c();return u(a.pageData.Filter.To,e)||(a.pageData.Filter.To=e),s(e)}),r(),i(10,"h6"),o(11,"Time"),r(),i(12,"div",10)(13,"div",11)(14,"app-timepicker",12),y("timeChange",function(e){m(t);let a=c();return u(a.pageData.Filter.StartTime,e)||(a.pageData.Filter.StartTime=e),s(e)}),r()(),i(15,"div",11)(16,"app-timepicker",12),y("timeChange",function(e){m(t);let a=c();return u(a.pageData.Filter.EndTime,e)||(a.pageData.Filter.EndTime=e),s(e)}),r()()()()}if(p&2){let t=c();l(3),g("accessType",2),S("ngModel",t.pageData.Filter.EntityID),g("outlets",t.pageData.Options==null?null:t.pageData.Options.Entities),l(3),S("date",t.pageData.Filter.From),l(3),S("date",t.pageData.Filter.To),l(5),g("fullWidth",!0),S("time",t.pageData.Filter.StartTime),l(2),g("fullWidth",!0),S("time",t.pageData.Filter.EndTime)}}function pe(p,d){if(p&1&&(i(0,"tr")(1,"td"),o(2),r(),i(3,"td"),o(4),r(),i(5,"td",21)(6,"a",22),D(7,"date"),D(8,"date"),o(9),r()(),i(10,"td",21)(11,"a",23),D(12,"date"),D(13,"date"),o(14),r()(),i(15,"td",21),o(16),r()()),p&2){let t=d.$implicit,n=d.$index,e=c(2);l(2),v(n+1),l(2),v(t.Name),l(2),g("queryParams",k(19,ae,t.ID,e.pageData.Filter.EntityID,x(7,7,e.pageData.Filter.From,"yyyy-MM-dd"),x(8,10,e.pageData.Filter.To,"yyyy-MM-dd"),e.pageData.Filter.StartTime,e.pageData.Filter.EndTime)),l(3),L(" ",t.Trans," "),l(2),g("queryParams",P(26,re,x(12,13,e.pageData.Filter.From,"yyyy-MM-dd"),x(13,16,e.pageData.Filter.To,"yyyy-MM-dd"),t.ID)),l(3),L(" ",t.Qty," "),l(2),v(t.Weight)}}function le(p,d){if(p&1){let t=C();i(0,"content")(1,"div",13)(2,"table",14),h("matSortChange",function(e){m(t);let a=c();return s(a.sortData(e))}),i(3,"thead",15)(4,"tr")(5,"th",16),o(6,"No"),r(),i(7,"th"),o(8,"Logistics Service Name"),r(),i(9,"th",17),o(10,"Trans"),r(),i(11,"th",18),o(12,"Qty"),r(),i(13,"th",19),o(14,"Weight "),i(15,"small",20),o(16,"(gram)"),r()()()(),i(17,"tbody"),V(18,pe,17,30,"tr",null,I),r()()()()}if(p&2){let t=c();l(18),W(t.data.Data)}}var ie=class p extends K{constructor(t,n,e,a,w,_){super(t,n,"Report/GetLogisticsService","ReportLoader/GetLogisticsService",e,a);this.matDialog=w;this.roleService=_}originalData=[];postInit(t){this.originalData=t.Data}sortData(t){let n=this.data.Data.slice();if(!t.active||t.direction===""){this.data.Data=this.originalData;return}this.data.Data=n.sort((e,a)=>this.compare(e[t.active],a[t.active],t.direction==="asc"))}openExportModal(){this.matDialog.open(X,{data:{title:"Logistic Service",exportTypes:[{ID:"ReportExport/LogisticService",Value:"Default",FileName:"Logistics Service"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}onChangeTime(t,n){let e=t.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[n]=e}static \u0275fac=function(n){return new(n||p)(f(Y),f(G),f(A),f(O),f(U),f(Q))};static \u0275cmp=E({type:p,selectors:[["POS-logistics-service-report"]],standalone:!1,features:[R],decls:9,vars:6,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],[1,"btn","btn-outline-secondary","me-3"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","50px"],["mat-sort-header","Trans",1,"align-right"],["mat-sort-header","Qty",1,"align-right"],["mat-sort-header","Weight",1,"align-right",2,"width","180px"],[1,"fst-italic","text-dark"],[1,"text-end"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",3,"queryParams"],["routerLink","/menu/Reports/Sales_Report/Standard/Products_Sold",3,"queryParams"]],template:function(n,e){if(n&1){let a=C();i(0,"mainpanel-cmp",1),y("textChange",function(_){return m(a),u(e.pageData.Filter.Name,_)||(e.pageData.Filter.Name=_),s(_)}),h("onSubmit",function(){return m(a),s(e.searchFromPageOne())}),y("filterChange",function(_){return m(a),u(e.pageData.Filter,_)||(e.pageData.Filter=_),s(_)}),i(1,"actions"),T(2,ne,3,0,"button",2),i(3,"a",3),o(4," View Detail "),r()(),i(5,"filters"),b(6,oe,17,9,"ng-template",null,0,B),r(),T(8,le,20,0,"content"),r()}n&2&&(g("pageData",e.menuData),S("text",e.pageData.Filter.Name),g("isFilterOnDropdown",!1),S("filter",e.pageData.Filter),l(2),F(e.roleService.global.Export?2:-1),l(6),F(e.data?8:-1))},dependencies:[j,q,H,Z,ee,z,J,te,$,N],encapsulation:2})};export{ie as a};
1
+ import{a as te}from"./chunk-NJB3X4XL.js";import{d as ee}from"./chunk-I4WJ5CEN.js";import{a as z,b as J}from"./chunk-L5HF7UAT.js";import{c as $}from"./chunk-GUF6JXSS.js";import{b as X}from"./chunk-HVRLWPZX.js";import{a as K}from"./chunk-3MUHZKUR.js";import{e as Z}from"./chunk-KDOS4X4T.js";import{b as Y}from"./chunk-EGADVOKH.js";import{g as U}from"./chunk-QGYIPOLS.js";import{h as q,o as H}from"./chunk-OJ5SEYSF.js";import{d as Q}from"./chunk-TS6CZC3J.js";import{Ab as W,Bb as g,Bc as D,Cb as i,Db as r,Dc as x,Eb as M,Hc as B,Lb as C,Nb as h,Pb as c,Wa as l,Wd as O,Zd as j,be as A,cb as f,cc as o,dc as v,ec as L,ee as G,gb as E,hc as S,ic as u,jc as y,kb as R,mb as b,md as N,ta as m,ua as s,ub as T,vc as P,wb as F,yb as I,yc as k,zb as V}from"./chunk-VS3RTXZC.js";var ae=(p,d,t,n,e,a)=>({LogisticServiceID:p,EntityID:d,From:t,To:n,StartTime:e,EndTime:a}),re=(p,d,t)=>({From:p,To:d,LogisticsServiceID:t});function ne(p,d){if(p&1){let t=C();i(0,"button",4),h("click",function(){m(t);let e=c();return s(e.openExportModal())}),M(1,"i",5),o(2," Export "),r()}}function oe(p,d){if(p&1){let t=C();i(0,"div",6)(1,"h6"),o(2,"Outlet"),r(),i(3,"outlet-selector",7),y("ngModelChange",function(e){m(t);let a=c();return u(a.pageData.Filter.EntityID,e)||(a.pageData.Filter.EntityID=e),s(e)}),r(),i(4,"h6"),o(5,"From"),r(),i(6,"datepicker",8),y("dateChange",function(e){m(t);let a=c();return u(a.pageData.Filter.From,e)||(a.pageData.Filter.From=e),s(e)}),r(),i(7,"h6"),o(8,"To"),r(),i(9,"datepicker",9),y("dateChange",function(e){m(t);let a=c();return u(a.pageData.Filter.To,e)||(a.pageData.Filter.To=e),s(e)}),r(),i(10,"h6"),o(11,"Time"),r(),i(12,"div",10)(13,"div",11)(14,"app-timepicker",12),y("timeChange",function(e){m(t);let a=c();return u(a.pageData.Filter.StartTime,e)||(a.pageData.Filter.StartTime=e),s(e)}),r()(),i(15,"div",11)(16,"app-timepicker",12),y("timeChange",function(e){m(t);let a=c();return u(a.pageData.Filter.EndTime,e)||(a.pageData.Filter.EndTime=e),s(e)}),r()()()()}if(p&2){let t=c();l(3),g("accessType",2),S("ngModel",t.pageData.Filter.EntityID),g("outlets",t.pageData.Options==null?null:t.pageData.Options.Entities),l(3),S("date",t.pageData.Filter.From),l(3),S("date",t.pageData.Filter.To),l(5),g("fullWidth",!0),S("time",t.pageData.Filter.StartTime),l(2),g("fullWidth",!0),S("time",t.pageData.Filter.EndTime)}}function pe(p,d){if(p&1&&(i(0,"tr")(1,"td"),o(2),r(),i(3,"td"),o(4),r(),i(5,"td",21)(6,"a",22),D(7,"date"),D(8,"date"),o(9),r()(),i(10,"td",21)(11,"a",23),D(12,"date"),D(13,"date"),o(14),r()(),i(15,"td",21),o(16),r()()),p&2){let t=d.$implicit,n=d.$index,e=c(2);l(2),v(n+1),l(2),v(t.Name),l(2),g("queryParams",k(19,ae,t.ID,e.pageData.Filter.EntityID,x(7,7,e.pageData.Filter.From,"yyyy-MM-dd"),x(8,10,e.pageData.Filter.To,"yyyy-MM-dd"),e.pageData.Filter.StartTime,e.pageData.Filter.EndTime)),l(3),L(" ",t.Trans," "),l(2),g("queryParams",P(26,re,x(12,13,e.pageData.Filter.From,"yyyy-MM-dd"),x(13,16,e.pageData.Filter.To,"yyyy-MM-dd"),t.ID)),l(3),L(" ",t.Qty," "),l(2),v(t.Weight)}}function le(p,d){if(p&1){let t=C();i(0,"content")(1,"div",13)(2,"table",14),h("matSortChange",function(e){m(t);let a=c();return s(a.sortData(e))}),i(3,"thead",15)(4,"tr")(5,"th",16),o(6,"No"),r(),i(7,"th"),o(8,"Logistics Service Name"),r(),i(9,"th",17),o(10,"Trans"),r(),i(11,"th",18),o(12,"Qty"),r(),i(13,"th",19),o(14,"Weight "),i(15,"small",20),o(16,"(gram)"),r()()()(),i(17,"tbody"),V(18,pe,17,30,"tr",null,I),r()()()()}if(p&2){let t=c();l(18),W(t.data.Data)}}var ie=class p extends K{constructor(t,n,e,a,w,_){super(t,n,"Report/GetLogisticsService","ReportLoader/GetLogisticsService",e,a);this.matDialog=w;this.roleService=_}originalData=[];postInit(t){this.originalData=t.Data}sortData(t){let n=this.data.Data.slice();if(!t.active||t.direction===""){this.data.Data=this.originalData;return}this.data.Data=n.sort((e,a)=>this.compare(e[t.active],a[t.active],t.direction==="asc"))}openExportModal(){this.matDialog.open(X,{data:{title:"Logistic Service",exportTypes:[{ID:"ReportExport/LogisticService",Value:"Default",FileName:"Logistics Service"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}onChangeTime(t,n){let e=t.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[n]=e}static \u0275fac=function(n){return new(n||p)(f(Y),f(G),f(A),f(O),f(U),f(Q))};static \u0275cmp=E({type:p,selectors:[["POS-logistics-service-report"]],standalone:!1,features:[R],decls:9,vars:6,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],[1,"btn","btn-outline-secondary","me-3"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","50px"],["mat-sort-header","Trans",1,"align-right"],["mat-sort-header","Qty",1,"align-right"],["mat-sort-header","Weight",1,"align-right",2,"width","180px"],[1,"fst-italic","text-dark"],[1,"text-end"],["routerLink","/menu/Logistics/Report/Outbound/Logistics_Service/Detail",3,"queryParams"],["routerLink","/menu/Reports/Sales_Report/Standard/Products_Sold",3,"queryParams"]],template:function(n,e){if(n&1){let a=C();i(0,"mainpanel-cmp",1),y("textChange",function(_){return m(a),u(e.pageData.Filter.Name,_)||(e.pageData.Filter.Name=_),s(_)}),h("onSubmit",function(){return m(a),s(e.searchFromPageOne())}),y("filterChange",function(_){return m(a),u(e.pageData.Filter,_)||(e.pageData.Filter=_),s(_)}),i(1,"actions"),T(2,ne,3,0,"button",2),i(3,"a",3),o(4," View Detail "),r()(),i(5,"filters"),b(6,oe,17,9,"ng-template",null,0,B),r(),T(8,le,20,0,"content"),r()}n&2&&(g("pageData",e.menuData),S("text",e.pageData.Filter.Name),g("isFilterOnDropdown",!1),S("filter",e.pageData.Filter),l(2),F(e.roleService.global.Export?2:-1),l(6),F(e.data?8:-1))},dependencies:[j,q,H,Z,ee,z,J,te,$,N],encapsulation:2})};export{ie as a};
@@ -1,4 +1,4 @@
1
- import{a as N}from"./chunk-3LPZYQS6.js";import{i as Ce}from"./chunk-YZP4FX7D.js";import{W as ke,X as xe,la as fe,ma as B,ua as ge}from"./chunk-WAXYETAG.js";import{a as he,g as be}from"./chunk-OJ5SEYSF.js";import{a as pe,c as me}from"./chunk-W6PT2SCS.js";import{a as R}from"./chunk-TS6CZC3J.js";import{$d as de,Bb as a,Ca as G,Cb as k,Db as x,Eb as M,Ha as U,Hb as I,Ia as h,Ib as L,Jb as O,Kc as ce,Lb as X,Nb as J,Pb as d,Pc as A,Sb as z,Tb as W,Ub as E,Vb as w,Wa as r,Xa as _,Xc as C,Yc as re,Yd as le,Zd as ue,ac as ee,bc as l,cb as S,cc as V,cd as D,ec as te,fd as ae,gb as u,hb as Y,jd as se,ka as Q,kb as b,la as H,ma as P,mb as g,pa as $,rc as ne,rd as F,sb as m,sc as ie,ta as y,tc as T,ua as v,ub as Z,uc as oe,va as p,wb as K,ya as q}from"./chunk-VS3RTXZC.js";var we=e=>({"pe-none":e}),Ve=()=>["/menu/Profile/Main/My_Subscription"],Te=e=>({"text-decoration-none":e}),De=e=>({"text-capitalize":e});function Fe(e,o){if(e&1&&(k(0,"div",1)(1,"h5",2),V(2),k(3,"a",3)(4,"u",4)(5,"span",4),V(6,"please"),x(),V(7," process your payment! "),x()()()()),e&2){let t=d();l("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),r(2),te(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),r(),a("ngClass",T(7,we,t.isMySubscriptionMenu))("routerLink",ie(9,Ve)),r(),a("ngClass",T(10,Te,t.isMySubscriptionMenu)),r(),a("ngClass",T(12,De,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var ye=class e{constructor(o,t,i){this.document=o;this.router=t;this.authService=i}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=pe;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 R.IsNotEmpty(o)}overrideCssStickyHeader(){if(R.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let o=`.sticky-top-thead th {
1
+ import{a as N}from"./chunk-3LPZYQS6.js";import{i as Ce}from"./chunk-YZP4FX7D.js";import{W as ke,X as xe,la as fe,ma as B,ua as ge}from"./chunk-WAXYETAG.js";import{a as he,g as be}from"./chunk-OJ5SEYSF.js";import{a as pe,c as me}from"./chunk-HBH23XBO.js";import{a as R}from"./chunk-TS6CZC3J.js";import{$d as de,Bb as a,Ca as G,Cb as k,Db as x,Eb as M,Ha as U,Hb as I,Ia as h,Ib as L,Jb as O,Kc as ce,Lb as X,Nb as J,Pb as d,Pc as A,Sb as z,Tb as W,Ub as E,Vb as w,Wa as r,Xa as _,Xc as C,Yc as re,Yd as le,Zd as ue,ac as ee,bc as l,cb as S,cc as V,cd as D,ec as te,fd as ae,gb as u,hb as Y,jd as se,ka as Q,kb as b,la as H,ma as P,mb as g,pa as $,rc as ne,rd as F,sb as m,sc as ie,ta as y,tc as T,ua as v,ub as Z,uc as oe,va as p,wb as K,ya as q}from"./chunk-VS3RTXZC.js";var we=e=>({"pe-none":e}),Ve=()=>["/menu/Profile/Main/My_Subscription"],Te=e=>({"text-decoration-none":e}),De=e=>({"text-capitalize":e});function Fe(e,o){if(e&1&&(k(0,"div",1)(1,"h5",2),V(2),k(3,"a",3)(4,"u",4)(5,"span",4),V(6,"please"),x(),V(7," process your payment! "),x()()()()),e&2){let t=d();l("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),r(2),te(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),r(),a("ngClass",T(7,we,t.isMySubscriptionMenu))("routerLink",ie(9,Ve)),r(),a("ngClass",T(10,Te,t.isMySubscriptionMenu)),r(),a("ngClass",T(12,De,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var ye=class e{constructor(o,t,i){this.document=o;this.router=t;this.authService=i}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=pe;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 R.IsNotEmpty(o)}overrideCssStickyHeader(){if(R.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)(S(q),S(le),S(me))};static \u0275cmp=u({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,Fe,8,14,"div",0),t&2&&K((i.subscriptionState==null?null:i.subscriptionState.status)==i.currentSubStatus&&i.isNotEmpty(i.currentSubStatus)?0:-1)},dependencies:[F,D,de,ue],encapsulation:2})};var Be=["data-p-icon","check"],ve=(()=>{class e extends N{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=u({type:e,selectors:[["","data-p-icon","check"]],features:[b],attrs:Be,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(),I(0,"path",0))},encapsulation:2})}return e})();var Ne=["data-p-icon","minus"],_e=(()=>{class e extends N{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=u({type:e,selectors:[["","data-p-icon","minus"]],features:[b],attrs:Ne,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(),I(0,"path",0))},encapsulation:2})}return e})();var Se=`
@@ -1 +1 @@
1
- import{a as k}from"./chunk-GYYMO4YR.js";import{C as N,F as L,G as j,c as E,h as A,i as V,k as I,o as R,p as U}from"./chunk-OJ5SEYSF.js";import{c as D}from"./chunk-W6PT2SCS.js";import"./chunk-BA466YBV.js";import{a as p}from"./chunk-TS6CZC3J.js";import"./chunk-TYUL4J6N.js";import{Cb as i,Db as n,Eb as u,Lb as C,Nb as g,Tb as S,Ub as _,Vb as x,Wa as b,Yd as M,be as P,cb as d,cc as s,d as f,da as v,gb as y,hc as w,ic as O,jc as T,ta as l,ua as m}from"./chunk-VS3RTXZC.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var z=["totpCode"],F=class h{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){p.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),p.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return p.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return p.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||h)(d(k),d(M),d(D),d(P))};static \u0275cmp=y({type:h,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&S(z,5),t&2){let r;_(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","//res.cloudinary.com/pos/image/upload/v1666079494/POS/Images/Login/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=C();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),g("submit",function(){return l(r),m(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),m(a)}),g("keypress",function(a){return l(r),m(o.numberOnly(a))})("ngModelChange",function(a){return l(r),m(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[j,U,E,A,V,N,L,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{F as AuthTotpComponent};
1
+ import{a as k}from"./chunk-W34NDG3T.js";import{C as N,F as L,G as j,c as E,h as A,i as V,k as I,o as R,p as U}from"./chunk-OJ5SEYSF.js";import{c as D}from"./chunk-HBH23XBO.js";import"./chunk-5I74KDE7.js";import{a as p}from"./chunk-TS6CZC3J.js";import"./chunk-7EVERJPZ.js";import{Cb as i,Db as n,Eb as u,Lb as C,Nb as g,Tb as S,Ub as _,Vb as x,Wa as b,Yd as M,be as P,cb as d,cc as s,d as f,da as v,gb as y,hc as w,ic as O,jc as T,ta as l,ua as m}from"./chunk-VS3RTXZC.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var z=["totpCode"],F=class h{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){p.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),p.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return p.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return p.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||h)(d(k),d(M),d(D),d(P))};static \u0275cmp=y({type:h,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&S(z,5),t&2){let r;_(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","//res.cloudinary.com/pos/image/upload/v1666079494/POS/Images/Login/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=C();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),g("submit",function(){return l(r),m(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),m(a)}),g("keypress",function(a){return l(r),m(o.numberOnly(a))})("ngModelChange",function(a){return l(r),m(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[j,U,E,A,V,N,L,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{F as AuthTotpComponent};
@@ -1,4 +1,4 @@
1
- import{a as Ct,b as St}from"./chunk-RFVQHGYD.js";import{b as _t}from"./chunk-V7HBROQ5.js";import{a as ft}from"./chunk-G7HGWSUU.js";import{a as ht,b as yt,c as bt,d as vt,e as xt}from"./chunk-2QD46TNT.js";import{a as Te,b as Le}from"./chunk-YQ5GJPDB.js";import{a as mt}from"./chunk-KMYTSO3Q.js";import{a as Tt}from"./chunk-BRHHRJLT.js";import{c as gt}from"./chunk-SH3T5X7H.js";import{b as pt,c as ut}from"./chunk-VQBUIUJC.js";import{a as Ye}from"./chunk-DB3W42KN.js";import{a as ve,b as at,c as ct,d as dt}from"./chunk-TX6ZFPHY.js";import{b as ot,c as Fe,i as st}from"./chunk-YZP4FX7D.js";import{E as tt,G as nt,U as Ve,V as it,a as z,da as Oe,la as Z,m as Xe,ma as H,na as lt,oa as rt,u as De,ua as be,v as Ze,w as X,y as se,z as et}from"./chunk-WAXYETAG.js";import{F as ae,a as Je,h as me,o as _e}from"./chunk-OJ5SEYSF.js";import{a as he}from"./chunk-TS6CZC3J.js";import{Bb as s,Bc as qe,Ca as pe,Cb as h,Cc as Ke,Db as y,Eb as N,Ha as Re,Hc as k,Ia as W,Ib as I,Jb as w,Kb as C,Kc as P,Lb as D,Nb as x,Oc as je,Pb as a,Pc as oe,Sb as T,Tb as M,Ub as m,Vb as _,Wa as c,Xa as v,Xc as b,Y as we,Yc as $,Zb as G,_b as Me,ac as Y,bc as f,ca as Ee,cb as te,cc as L,cd as We,d as He,dc as ge,ec as J,ed as le,ee as ye,fa as Pe,fd as re,ga as ke,gb as R,hb as ue,hc as Qe,ic as Be,id as fe,jc as Ue,jd as q,ka as ce,kb as ne,kd as Ge,la as j,ma as de,mb as d,o as Ie,oa as ze,pa as O,rc as ie,rd as K,sb as E,ta as u,tc as A,ua as g,ub as Q,uc as U,va as F,vc as $e,wb as B}from"./chunk-VS3RTXZC.js";import{a as ee}from"./chunk-SNAKHGZS.js";var Nt=`
1
+ import{a as Ct,b as St}from"./chunk-RFVQHGYD.js";import{b as _t}from"./chunk-V7HBROQ5.js";import{a as ft}from"./chunk-G7HGWSUU.js";import{a as ht,b as yt,c as bt,d as vt,e as xt}from"./chunk-2QD46TNT.js";import{a as Te,b as Le}from"./chunk-YQ5GJPDB.js";import{a as mt}from"./chunk-KMYTSO3Q.js";import{a as Tt}from"./chunk-BRHHRJLT.js";import{c as gt}from"./chunk-KTV4REGV.js";import{b as pt,c as ut}from"./chunk-VQBUIUJC.js";import{a as Ye}from"./chunk-DB3W42KN.js";import{a as ve,b as at,c as ct,d as dt}from"./chunk-TX6ZFPHY.js";import{b as ot,c as Fe,i as st}from"./chunk-YZP4FX7D.js";import{E as tt,G as nt,U as Ve,V as it,a as z,da as Oe,la as Z,m as Xe,ma as H,na as lt,oa as rt,u as De,ua as be,v as Ze,w as X,y as se,z as et}from"./chunk-WAXYETAG.js";import{F as ae,a as Je,h as me,o as _e}from"./chunk-OJ5SEYSF.js";import{a as he}from"./chunk-TS6CZC3J.js";import{Bb as s,Bc as qe,Ca as pe,Cb as h,Cc as Ke,Db as y,Eb as N,Ha as Re,Hc as k,Ia as W,Ib as I,Jb as w,Kb as C,Kc as P,Lb as D,Nb as x,Oc as je,Pb as a,Pc as oe,Sb as T,Tb as M,Ub as m,Vb as _,Wa as c,Xa as v,Xc as b,Y as we,Yc as $,Zb as G,_b as Me,ac as Y,bc as f,ca as Ee,cb as te,cc as L,cd as We,d as He,dc as ge,ec as J,ed as le,ee as ye,fa as Pe,fd as re,ga as ke,gb as R,hb as ue,hc as Qe,ic as Be,id as fe,jc as Ue,jd as q,ka as ce,kb as ne,kd as Ge,la as j,ma as de,mb as d,o as Ie,oa as ze,pa as O,rc as ie,rd as K,sb as E,ta as u,tc as A,ua as g,ub as Q,uc as U,va as F,vc as $e,wb as B}from"./chunk-VS3RTXZC.js";import{a as ee}from"./chunk-SNAKHGZS.js";var Nt=`
2
2
  .p-tree {
3
3
  display: block;
4
4
  background: dt('tree.background');
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-HK2NKWCI.js";import{a as ve}from"./chunk-IKJNYXIS.js";import{a as Ce}from"./chunk-MTU6753J.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-36JFFXJO.js";import"./chunk-SH3T5X7H.js";import{b as se}from"./chunk-J5FCCS76.js";import"./chunk-3LPZYQS6.js";import"./chunk-BJKHMXAA.js";import{u as pe,v as me,w as ue}from"./chunk-EGUIWOC3.js";import"./chunk-VQBUIUJC.js";import{O as k}from"./chunk-HYXSN2J6.js";import{e as ae,f as le,g as de}from"./chunk-QGYIPOLS.js";import"./chunk-WACBOZDR.js";import"./chunk-YZP4FX7D.js";import"./chunk-2FWFPV5I.js";import"./chunk-WAXYETAG.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-OJ5SEYSF.js";import"./chunk-W6PT2SCS.js";import"./chunk-BA466YBV.js";import{a as F,d as re}from"./chunk-TS6CZC3J.js";import"./chunk-TYUL4J6N.js";import{Ab as H,Bb as p,Ca as V,Cb as i,Db as r,E as T,Eb as c,Hc as K,Kb as $,Kc as L,Lb as G,Nb as v,Pb as C,Wa as l,Wd as W,Zb as j,be as z,cb as f,cc as a,cd as M,dc as x,ec as w,ee as ie,gb as y,jd as B,kb as A,mb as I,pa as _,rd as R,t as D,ta as P,tc as b,ua as E,ub as m,uc as q,wb as u,xb as O,zb as U}from"./chunk-VS3RTXZC.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-HK2NKWCI.js";import{a as ve}from"./chunk-YM2ZQTDF.js";import{a as Ce}from"./chunk-MTU6753J.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-KDOS4X4T.js";import"./chunk-KTV4REGV.js";import{b as se}from"./chunk-EGADVOKH.js";import"./chunk-3LPZYQS6.js";import"./chunk-BJKHMXAA.js";import{u as pe,v as me,w as ue}from"./chunk-EGUIWOC3.js";import"./chunk-VQBUIUJC.js";import{O as k}from"./chunk-HYXSN2J6.js";import{e as ae,f as le,g as de}from"./chunk-QGYIPOLS.js";import"./chunk-WACBOZDR.js";import"./chunk-YZP4FX7D.js";import"./chunk-2FWFPV5I.js";import"./chunk-WAXYETAG.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-OJ5SEYSF.js";import"./chunk-HBH23XBO.js";import"./chunk-5I74KDE7.js";import{a as F,d as re}from"./chunk-TS6CZC3J.js";import"./chunk-7EVERJPZ.js";import{Ab as H,Bb as p,Ca as V,Cb as i,Db as r,E as T,Eb as c,Hc as K,Kb as $,Kc as L,Lb as G,Nb as v,Pb as C,Wa as l,Wd as W,Zb as j,be as z,cb as f,cc as a,cd as M,dc as x,ec as w,ee as ie,gb as y,jd as B,kb as A,mb as I,pa as _,rd as R,t as D,ta as P,tc as b,ua as E,ub as m,uc as q,wb as u,xb as O,zb as U}from"./chunk-VS3RTXZC.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};