dealpos 25.49.3 → 25.49.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 (86) hide show
  1. package/browser/{chunk-K2Y7IODA.js → chunk-34X4ZZD5.js} +1 -1
  2. package/browser/{chunk-DQUCX3MH.js → chunk-3PJCCDIY.js} +2 -2
  3. package/browser/{chunk-ZYXRWVB4.js → chunk-3RQ35Y7Q.js} +1 -1
  4. package/browser/{chunk-7IHPSNZY.js → chunk-3Y2TKGP4.js} +1 -1
  5. package/browser/{chunk-ADJWIV2X.js → chunk-3YFVIHNY.js} +2 -2
  6. package/browser/{chunk-2MUHOEAS.js → chunk-46D5QBZT.js} +1 -1
  7. package/browser/{chunk-UAUE3L3L.js → chunk-52ONOTHS.js} +1 -1
  8. package/browser/{chunk-JYBOJDPO.js → chunk-5DNDULL7.js} +1 -1
  9. package/browser/{chunk-VU6OKTDN.js → chunk-6H5XBM35.js} +1 -1
  10. package/browser/{chunk-BG2SRLVD.js → chunk-6LSNTX2C.js} +1 -1
  11. package/browser/{chunk-2IQSX3TK.js → chunk-743523SK.js} +1 -1
  12. package/browser/{chunk-FWATBVBG.js → chunk-7V2CY4DW.js} +1 -1
  13. package/browser/{chunk-QICBNHRX.js → chunk-7V6NCJRQ.js} +1 -1
  14. package/browser/{chunk-ZMQBUTHW.js → chunk-ADQOH7YA.js} +1 -1
  15. package/browser/{chunk-A2F4CPF2.js → chunk-APHRANVH.js} +1 -1
  16. package/browser/{chunk-JRWOPFEW.js → chunk-ASHEF37H.js} +1 -1
  17. package/browser/{chunk-HCJAEDV7.js → chunk-BSV3Y4MG.js} +1 -1
  18. package/browser/{chunk-GC3NPYZ4.js → chunk-BVMFVFGN.js} +1 -1
  19. package/browser/{chunk-V5LXL6ED.js → chunk-C777CYT4.js} +1 -1
  20. package/browser/{chunk-MO5TC272.js → chunk-CD6ZWSFG.js} +1 -1
  21. package/browser/{chunk-F7ZEEN7E.js → chunk-CLO7U3RB.js} +1 -1
  22. package/browser/{chunk-2ELK4VEE.js → chunk-D2OMTDKS.js} +1 -1
  23. package/browser/{chunk-D54YUJEN.js → chunk-F3YWM4BJ.js} +1 -1
  24. package/browser/{chunk-W5CO3TTZ.js → chunk-FD7ICK7T.js} +1 -1
  25. package/browser/{chunk-U564QQHO.js → chunk-FQVYXDHS.js} +2 -2
  26. package/browser/{chunk-KBE7ACT6.js → chunk-FTZZHFXM.js} +1 -1
  27. package/browser/{chunk-LMSKVJOL.js → chunk-GNIF2YD2.js} +1 -1
  28. package/browser/{chunk-XRZ45CVY.js → chunk-GT5IX3D6.js} +1 -1
  29. package/browser/{chunk-RSMPFZYJ.js → chunk-H4U5GDQZ.js} +1 -1
  30. package/browser/{chunk-A2GJQTMM.js → chunk-HCMW3RC5.js} +1 -1
  31. package/browser/{chunk-EULEC2EQ.js → chunk-HOZ6XJ4Z.js} +1 -1
  32. package/browser/{chunk-2M3VVSGC.js → chunk-IFKUMLMD.js} +1 -1
  33. package/browser/{chunk-LDQZMMWQ.js → chunk-INWLOCX3.js} +1 -1
  34. package/browser/{chunk-RJ456QEQ.js → chunk-IQ5KAZ7I.js} +1 -1
  35. package/browser/{chunk-IQAICFFM.js → chunk-JZFX4FNK.js} +1 -1
  36. package/browser/{chunk-ENZHEBZ3.js → chunk-K3V25WUQ.js} +1 -1
  37. package/browser/{chunk-6CU2J77W.js → chunk-KJ5BS7KR.js} +1 -1
  38. package/browser/{chunk-AF5ZP7YV.js → chunk-KJF3M7DY.js} +1 -1
  39. package/browser/{chunk-WAVD3GYY.js → chunk-KWFL5YOV.js} +1 -1
  40. package/browser/{chunk-7GCPXPXG.js → chunk-LI6G74I7.js} +1 -1
  41. package/browser/{chunk-DQT5UJRI.js → chunk-LNZY3GKF.js} +1 -1
  42. package/browser/{chunk-MSD6ZNZJ.js → chunk-LX26RD3F.js} +1 -1
  43. package/browser/{chunk-G5YP7DBH.js → chunk-N6JQHXKN.js} +1 -1
  44. package/browser/{chunk-SMPSWQDW.js → chunk-N7M4OSQZ.js} +1 -1
  45. package/browser/{chunk-JDCZ7YOI.js → chunk-NFODKKJI.js} +2 -2
  46. package/browser/{chunk-6UDFJ3KL.js → chunk-NTCQH6TH.js} +1 -1
  47. package/browser/{chunk-JBGXOAKJ.js → chunk-NZBKYR7R.js} +1 -1
  48. package/browser/{chunk-IX3NKVEA.js → chunk-OETRAGYY.js} +1 -1
  49. package/browser/{chunk-IMWEIBLY.js → chunk-OWK34F6X.js} +1 -1
  50. package/browser/{chunk-FFUI35CT.js → chunk-OXMLRZZ4.js} +1 -1
  51. package/browser/{chunk-7MJ36ZVI.js → chunk-OYEU5L3I.js} +1 -1
  52. package/browser/{chunk-26CNGJ3T.js → chunk-P2R2O6GD.js} +2 -2
  53. package/browser/{chunk-BWN3N6E3.js → chunk-QE5OFO56.js} +1 -1
  54. package/browser/{chunk-2MU2JN6B.js → chunk-QOCGWG6L.js} +1 -1
  55. package/browser/{chunk-FG57XHDS.js → chunk-QS32TZGB.js} +1 -1
  56. package/browser/{chunk-5DKILDWP.js → chunk-QVI22QDX.js} +1 -1
  57. package/browser/{chunk-YECQSID5.js → chunk-R2Y4JAXW.js} +1 -1
  58. package/browser/{chunk-KVGIFF2D.js → chunk-RGO36X34.js} +1 -1
  59. package/browser/{chunk-VPTJ74LS.js → chunk-ROVDZJVT.js} +1 -1
  60. package/browser/{chunk-5YEAN4WU.js → chunk-RULBTV6L.js} +1 -1
  61. package/browser/{chunk-LN3Z2YMJ.js → chunk-SFXDXOSB.js} +1 -1
  62. package/browser/{chunk-45HQ3R3G.js → chunk-SO3RL6QR.js} +1 -1
  63. package/browser/{chunk-OYAHMLKS.js → chunk-SY463GX6.js} +1 -1
  64. package/browser/{chunk-XTPFVMJ5.js → chunk-T4E5A3KH.js} +2 -2
  65. package/browser/{chunk-YIEP4TNX.js → chunk-TAVEJBKL.js} +1 -1
  66. package/browser/{chunk-OOTL4WHK.js → chunk-TBBZ7RAN.js} +1 -1
  67. package/browser/{chunk-PFCAE5TL.js → chunk-TLLI6Z5X.js} +1 -1
  68. package/browser/{chunk-QWQURKKH.js → chunk-UJ63ZNAO.js} +1 -1
  69. package/browser/{chunk-V5FFXPW6.js → chunk-V3KYBOFM.js} +1 -1
  70. package/browser/{chunk-326NKS6E.js → chunk-V45WTUQ2.js} +1 -1
  71. package/browser/{chunk-I3NHLTUC.js → chunk-WFSJDUCV.js} +2 -2
  72. package/browser/{chunk-RJZLCRKU.js → chunk-WP2FVSCM.js} +1 -1
  73. package/browser/{chunk-DTBM2FVZ.js → chunk-WYRHUSXS.js} +1 -1
  74. package/browser/{chunk-RBODUQFT.js → chunk-WZWXE6GT.js} +1 -1
  75. package/browser/{chunk-CBQXDARX.js → chunk-XBRNDXDZ.js} +1 -1
  76. package/browser/{chunk-DLJQAGDR.js → chunk-XFJYJSZU.js} +1 -1
  77. package/browser/{chunk-LWV7P2HF.js → chunk-XOQUXJ6S.js} +1 -1
  78. package/browser/{chunk-S73WE6MZ.js → chunk-XTU3LHA6.js} +1 -1
  79. package/browser/{chunk-UFGFIP7Q.js → chunk-XWXXETJY.js} +1 -1
  80. package/browser/{chunk-NM7C3KTD.js → chunk-Y4XWHUVX.js} +1 -1
  81. package/browser/{chunk-VNBUPHIS.js → chunk-YTXYAEFO.js} +1 -1
  82. package/browser/{chunk-B2TQCJSQ.js → chunk-YZY45SFB.js} +1 -1
  83. package/browser/{chunk-UWWD4B2R.js → chunk-ZEI66KM2.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-W4X7ASBA.js → main-DAVMX2B6.js} +2 -2
  86. package/package.json +1 -1
@@ -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-BWN3N6E3.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-QE5OFO56.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');
@@ -1 +1 @@
1
- import{a as Ce}from"./chunk-VVYRPW2Y.js";import{a as ge}from"./chunk-JXXYVM7W.js";import"./chunk-ZMJLTU5O.js";import"./chunk-BYXBJQAS.js";import{a as te}from"./chunk-QZZ2NRA3.js";import{d as ue,e as _e}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{d as pe,e as me}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as se,b as ce}from"./chunk-4W3WYXI2.js";import{c as de}from"./chunk-LN3Z2YMJ.js";import{b as ee}from"./chunk-VXPORXGI.js";import{a as Z}from"./chunk-YECQSID5.js";import"./chunk-6UDFJ3KL.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as ae,f as le}from"./chunk-DQT5UJRI.js";import"./chunk-FWATBVBG.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.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-BWN3N6E3.js";import{b as ie}from"./chunk-AF5ZP7YV.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{F as oe,G as re}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as ne}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as $}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as Q,c as z,h as K,o as J}from"./chunk-DWZ5JTI2.js";import"./chunk-2IQSX3TK.js";import"./chunk-2MUHOEAS.js";import"./chunk-36GWLMZX.js";import{b as Y}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-45HQ3R3G.js";import{s as X}from"./chunk-LGOSIAUC.js";import{Ab as g,Bb as b,Ca as H,Db as O,Eb as L,Fb as u,Fc as f,Gb as t,Gc as I,Hb as i,Hc as w,Ib as N,Lc as U,Pb as P,Qd as q,Sb as h,Sd as G,Ub as d,Xa as a,eb as M,gc as k,hc as l,ib as T,ic as S,jc as D,jd as B,mb as V,mc as C,nc as x,ob as E,oc as y,pa as F,qd as R,sd as A,ta as s,ua as c,vd as j,xc as W,yb as _,yc as v}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var xe=o=>({ID:o}),fe=()=>["/menu/Contacts/Contact/Customers/Info"],Pe=o=>({"text-danger":o});function Se(o,m){if(o&1){let e=P();t(0,"button",15),h("click",function(){s(e);let n=d();return c(n.openExportModal())}),N(1,"i",16),l(2," Export "),i()}}function De(o,m){if(o&1){let e=P();t(0,"h6"),l(1,"User"),i(),t(2,"autocompleteV2",27),y("ngModelChange",function(n){s(e);let p=d(2);return x(p.pageData.Filter.UserID,n)||(p.pageData.Filter.UserID=n),c(n)}),i()}if(o&2){let e=d(2);a(2),C("ngModel",e.pageData.Filter.UserID)}}function he(o,m){if(o&1){let e=P();t(0,"div",17)(1,"h6"),l(2,"Outlets"),i(),t(3,"outlet-selector",18),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.ListOutletID,n)||(p.pageData.Filter.ListOutletID=n),c(n)}),i(),t(4,"h6"),l(5,"Customer"),i(),t(6,"autocompleteV2",19),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.CustomerID,n)||(p.pageData.Filter.CustomerID=n),c(n)}),i(),t(7,"h6"),l(8,"From - To"),i(),t(9,"div",20)(10,"div",21)(11,"datepicker",22),y("dateChange",function(n){s(e);let p=d();return x(p.pageData.Filter.From,n)||(p.pageData.Filter.From=n),c(n)}),i()(),t(12,"div",23)(13,"datepicker",24),y("dateChange",function(n){s(e);let p=d();return x(p.pageData.Filter.To,n)||(p.pageData.Filter.To=n),c(n)}),i()()(),t(14,"h6"),l(15,"Printed"),i(),t(16,"radio-options",25),y("modelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.Printed,n)||(p.pageData.Filter.Printed=n),c(n)}),i(),_(17,De,3,1),t(18,"h6"),l(19,"Page Size"),i(),t(20,"div")(21,"input",26),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.RowCount,n)||(p.pageData.Filter.RowCount=n),c(n)}),i()()()}if(o&2){let e=d();a(3),C("ngModel",e.pageData.Filter.ListOutletID),u("multiple",!0),a(3),C("ngModel",e.pageData.Filter.CustomerID),a(5),u("isFloatingLabel",!1),C("date",e.pageData.Filter.From),a(2),u("isFloatingLabel",!1),C("date",e.pageData.Filter.To),a(3),C("model",e.pageData.Filter.Printed),u("options",e.pageData.Options.PrintedOptions),a(),g(e.pageData.Filter.Printed!==0?17:-1),a(4),C("ngModel",e.pageData.Filter.RowCount)}}function we(o,m){o&1&&(t(0,"th",10),l(1,"Print By"),i())}function ve(o,m){o&1&&(t(0,"th",8),l(1,"Print Date"),i())}function Fe(o,m){o&1&&(t(0,"th",11),l(1,"Time"),i())}function Me(o,m){if(o&1&&(t(0,"td"),l(1),i()),o&2){let e=d().$implicit;a(),S(e.CreatorName)}}function Ee(o,m){if(o&1&&(t(0,"td"),l(1),f(2,"date"),i()),o&2){let e=d().$implicit;a(),D(" ",e.Created==="0001-01-01T00:00:00"?"":w(2,1,e.Created,"dd MMM yyyy")," ")}}function Ie(o,m){if(o&1&&(t(0,"td"),l(1),f(2,"date"),i()),o&2){let e=d().$implicit;a(),D(" ",e.Created==="0001-01-01T00:00:00"?"":w(2,1,e.Created,"HH:mm")," ")}}function He(o,m){if(o&1&&(t(0,"td",32),l(1),f(2,"amountFraction"),i()),o&2){let e=d().$implicit;k(v(5,Pe,e.InvoiceAmount<0)),a(),D(" ",I(2,3,e.InvoiceAmount)," ")}}function Te(o,m){if(o&1){let e=P();t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"a",28),l(5),i()(),t(6,"td")(7,"a",29),l(8),i()(),t(9,"td"),l(10),f(11,"date"),i(),t(12,"td"),l(13),f(14,"date"),i(),_(15,Me,2,1,"td"),_(16,Ee,3,4,"td"),_(17,Ie,3,4,"td"),E(18,He,3,7,"td",30),t(19,"td",31),h("click",function(){let n=s(e).$implicit,p=d();return c(p.onInvoiceCountClick(n))}),l(20),f(21,"number"),i()()}if(o&2){let e=m.$implicit,r=d();a(2),S(e.EntityName),a(2),u("queryParams",v(21,xe,e.InvoiceID)),a(),S(e.Number),a(2),u("routerLink",W(23,fe))("queryParams",v(24,xe,e.CustomerID)),a(),D(" ",e.CustomerName," "),a(2),S(w(11,13,e.InvoiceDate,"dd MMM yyyy")),a(3),S(w(14,16,e.InvoiceDueDate,"dd MMM")),a(2),g(r.isNotUnprintedOnly()?15:-1),a(),g(r.isNotUnprintedOnly()?16:-1),a(),g(r.isNotUnprintedOnly()?17:-1),a(),u("ngIf",r.roleService.sell.PriceVisible),a(2),D(" ",I(21,19,e.Count)," ")}}var ye=class o extends Z{roleService=F(Y);dialog=F($);isNotUnprintedOnly=H(!0);constructor(m,e){super(m,e,"invoice/GetPrintHistoryList","invoiceLoader/GetPrintHistoryList")}openExportModal(){this.pageData.Filter.Export=!0,this.dialog.open(ee,{data:{title:"Print History",exportTypes:[{ID:"invoice/GetPrintHistoryList",Value:"Default",FileName:"Print History"}],filterExport:this.pageData.Filter,pagination:!0}}).afterClosed().subscribe(()=>{this.pageData.Filter.Export=!1})}onSubmit(){let m=this.pageData.Filter.Printed!==0;this.isNotUnprintedOnly.set(m),this.getListData()}onInvoiceCountClick(m){let e=`${ne.InvoicePrintHistory}/${m.InvoiceID}`;this.httpService.get(e).subscribe(r=>{this.dialog.open(Ce,{data:r?.Data})})}static \u0275fac=function(e){return new(e||o)(M(ie),M(X))};static \u0275cmp=T({type:o,selectors:[["app-print-history"]],features:[V],decls:32,vars:10,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-5"],["matSort","",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","130px"],[2,"width","150px"],[2,"width","100px"],[2,"width","90px"],[2,"width","80px"],[2,"width","30px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","30px"],[3,"jumpToPage","previousPage","nextPage","total","totalAllData","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[3,"ngModelChange","ngModel","multiple"],["name","Key","requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Search Customer",1,"w-100","ac-filter",3,"ngModelChange","ngModel"],[1,"row"],[1,"col-6","pe-2"],["placeholder","From","appearance","outline",3,"dateChange","isFloatingLabel","date"],[1,"col-6","ps-2"],["placeholder","To","appearance","outline",3,"dateChange","isFloatingLabel","date"],[3,"modelChange","model","options"],["type","text","placeholder","Page Size","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["requestUrl","/API/AC/GetUserSuggestion",1,"w-100","ac-filter",3,"ngModelChange","ngModel"],["routerLink","/menu/Orders/Orders/Customer_Invoice/Info",1,"link-primary","cursor-pointer",3,"queryParams"],[1,"link-primary","cursor-pointer",3,"routerLink","queryParams"],["class","text-end",3,"class",4,"ngIf"],[1,"cursor-pointer","text-end","link-primary",3,"click"],[1,"text-end"]],template:function(e,r){if(e&1){let n=P();t(0,"mainpanel-cmp",1),h("onSubmit",function(){return s(n),c(r.onSubmit())}),t(1,"actions"),_(2,Se,3,0,"button",2),i(),t(3,"filters"),E(4,he,22,11,"ng-template",null,0,U),i(),t(6,"content")(7,"div",3)(8,"table",4)(9,"thead",5)(10,"tr")(11,"th",6),l(12,"Outlet"),i(),t(13,"th",7),l(14,"Number"),i(),t(15,"th"),l(16,"Customer"),i(),t(17,"th",8),l(18,"Date"),i(),t(19,"th",9),l(20,"Due"),i(),_(21,we,2,0,"th",10),_(22,ve,2,0,"th",8),_(23,Fe,2,0,"th",11),t(24,"th",12),l(25,"Amount"),i(),t(26,"th",13),l(27,"Count"),i()()(),t(28,"tbody"),O(29,Te,22,26,"tr",null,b),i()(),t(31,"POS-complex-pagination",14),h("jumpToPage",function(){return s(n),c(r.getListData())})("previousPage",function(){return s(n),c(r.getListData())})("nextPage",function(){return s(n),c(r.getListData())}),i()()()()}e&2&&(u("pageData",r.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),a(2),g(r.roleService.global.Export?2:-1),a(19),g(r.isNotUnprintedOnly()?21:-1),a(),g(r.isNotUnprintedOnly()?22:-1),a(),g(r.isNotUnprintedOnly()?23:-1),a(6),L(r.data==null?null:r.data.Data),a(2),u("total",r.data==null||r.data.Data==null?null:r.data.Data.length)("totalAllData",r.data==null?null:r.data.ListTotal)("pageData",r.pageData))},dependencies:[j,B,le,ae,de,Q,z,K,J,_e,ue,ce,se,ge,G,q,re,oe,me,pe,A,R,te],encapsulation:2})};export{ye as PrintHistoryComponent};
1
+ import{a as Ce}from"./chunk-VVYRPW2Y.js";import{a as ge}from"./chunk-JXXYVM7W.js";import"./chunk-ZMJLTU5O.js";import"./chunk-BYXBJQAS.js";import{a as te}from"./chunk-QZZ2NRA3.js";import{d as ue,e as _e}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{d as pe,e as me}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as se,b as ce}from"./chunk-4W3WYXI2.js";import{c as de}from"./chunk-SFXDXOSB.js";import{b as ee}from"./chunk-VXPORXGI.js";import{a as Z}from"./chunk-R2Y4JAXW.js";import"./chunk-NTCQH6TH.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as ae,f as le}from"./chunk-LNZY3GKF.js";import"./chunk-7V2CY4DW.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.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-QE5OFO56.js";import{b as ie}from"./chunk-KJF3M7DY.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{F as oe,G as re}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as ne}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as $}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as Q,c as z,h as K,o as J}from"./chunk-DWZ5JTI2.js";import"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import{b as Y}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{s as X}from"./chunk-LGOSIAUC.js";import{Ab as g,Bb as b,Ca as H,Db as O,Eb as L,Fb as u,Fc as f,Gb as t,Gc as I,Hb as i,Hc as w,Ib as N,Lc as U,Pb as P,Qd as q,Sb as h,Sd as G,Ub as d,Xa as a,eb as M,gc as k,hc as l,ib as T,ic as S,jc as D,jd as B,mb as V,mc as C,nc as x,ob as E,oc as y,pa as F,qd as R,sd as A,ta as s,ua as c,vd as j,xc as W,yb as _,yc as v}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var xe=o=>({ID:o}),fe=()=>["/menu/Contacts/Contact/Customers/Info"],Pe=o=>({"text-danger":o});function Se(o,m){if(o&1){let e=P();t(0,"button",15),h("click",function(){s(e);let n=d();return c(n.openExportModal())}),N(1,"i",16),l(2," Export "),i()}}function De(o,m){if(o&1){let e=P();t(0,"h6"),l(1,"User"),i(),t(2,"autocompleteV2",27),y("ngModelChange",function(n){s(e);let p=d(2);return x(p.pageData.Filter.UserID,n)||(p.pageData.Filter.UserID=n),c(n)}),i()}if(o&2){let e=d(2);a(2),C("ngModel",e.pageData.Filter.UserID)}}function he(o,m){if(o&1){let e=P();t(0,"div",17)(1,"h6"),l(2,"Outlets"),i(),t(3,"outlet-selector",18),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.ListOutletID,n)||(p.pageData.Filter.ListOutletID=n),c(n)}),i(),t(4,"h6"),l(5,"Customer"),i(),t(6,"autocompleteV2",19),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.CustomerID,n)||(p.pageData.Filter.CustomerID=n),c(n)}),i(),t(7,"h6"),l(8,"From - To"),i(),t(9,"div",20)(10,"div",21)(11,"datepicker",22),y("dateChange",function(n){s(e);let p=d();return x(p.pageData.Filter.From,n)||(p.pageData.Filter.From=n),c(n)}),i()(),t(12,"div",23)(13,"datepicker",24),y("dateChange",function(n){s(e);let p=d();return x(p.pageData.Filter.To,n)||(p.pageData.Filter.To=n),c(n)}),i()()(),t(14,"h6"),l(15,"Printed"),i(),t(16,"radio-options",25),y("modelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.Printed,n)||(p.pageData.Filter.Printed=n),c(n)}),i(),_(17,De,3,1),t(18,"h6"),l(19,"Page Size"),i(),t(20,"div")(21,"input",26),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.RowCount,n)||(p.pageData.Filter.RowCount=n),c(n)}),i()()()}if(o&2){let e=d();a(3),C("ngModel",e.pageData.Filter.ListOutletID),u("multiple",!0),a(3),C("ngModel",e.pageData.Filter.CustomerID),a(5),u("isFloatingLabel",!1),C("date",e.pageData.Filter.From),a(2),u("isFloatingLabel",!1),C("date",e.pageData.Filter.To),a(3),C("model",e.pageData.Filter.Printed),u("options",e.pageData.Options.PrintedOptions),a(),g(e.pageData.Filter.Printed!==0?17:-1),a(4),C("ngModel",e.pageData.Filter.RowCount)}}function we(o,m){o&1&&(t(0,"th",10),l(1,"Print By"),i())}function ve(o,m){o&1&&(t(0,"th",8),l(1,"Print Date"),i())}function Fe(o,m){o&1&&(t(0,"th",11),l(1,"Time"),i())}function Me(o,m){if(o&1&&(t(0,"td"),l(1),i()),o&2){let e=d().$implicit;a(),S(e.CreatorName)}}function Ee(o,m){if(o&1&&(t(0,"td"),l(1),f(2,"date"),i()),o&2){let e=d().$implicit;a(),D(" ",e.Created==="0001-01-01T00:00:00"?"":w(2,1,e.Created,"dd MMM yyyy")," ")}}function Ie(o,m){if(o&1&&(t(0,"td"),l(1),f(2,"date"),i()),o&2){let e=d().$implicit;a(),D(" ",e.Created==="0001-01-01T00:00:00"?"":w(2,1,e.Created,"HH:mm")," ")}}function He(o,m){if(o&1&&(t(0,"td",32),l(1),f(2,"amountFraction"),i()),o&2){let e=d().$implicit;k(v(5,Pe,e.InvoiceAmount<0)),a(),D(" ",I(2,3,e.InvoiceAmount)," ")}}function Te(o,m){if(o&1){let e=P();t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"a",28),l(5),i()(),t(6,"td")(7,"a",29),l(8),i()(),t(9,"td"),l(10),f(11,"date"),i(),t(12,"td"),l(13),f(14,"date"),i(),_(15,Me,2,1,"td"),_(16,Ee,3,4,"td"),_(17,Ie,3,4,"td"),E(18,He,3,7,"td",30),t(19,"td",31),h("click",function(){let n=s(e).$implicit,p=d();return c(p.onInvoiceCountClick(n))}),l(20),f(21,"number"),i()()}if(o&2){let e=m.$implicit,r=d();a(2),S(e.EntityName),a(2),u("queryParams",v(21,xe,e.InvoiceID)),a(),S(e.Number),a(2),u("routerLink",W(23,fe))("queryParams",v(24,xe,e.CustomerID)),a(),D(" ",e.CustomerName," "),a(2),S(w(11,13,e.InvoiceDate,"dd MMM yyyy")),a(3),S(w(14,16,e.InvoiceDueDate,"dd MMM")),a(2),g(r.isNotUnprintedOnly()?15:-1),a(),g(r.isNotUnprintedOnly()?16:-1),a(),g(r.isNotUnprintedOnly()?17:-1),a(),u("ngIf",r.roleService.sell.PriceVisible),a(2),D(" ",I(21,19,e.Count)," ")}}var ye=class o extends Z{roleService=F(Y);dialog=F($);isNotUnprintedOnly=H(!0);constructor(m,e){super(m,e,"invoice/GetPrintHistoryList","invoiceLoader/GetPrintHistoryList")}openExportModal(){this.pageData.Filter.Export=!0,this.dialog.open(ee,{data:{title:"Print History",exportTypes:[{ID:"invoice/GetPrintHistoryList",Value:"Default",FileName:"Print History"}],filterExport:this.pageData.Filter,pagination:!0}}).afterClosed().subscribe(()=>{this.pageData.Filter.Export=!1})}onSubmit(){let m=this.pageData.Filter.Printed!==0;this.isNotUnprintedOnly.set(m),this.getListData()}onInvoiceCountClick(m){let e=`${ne.InvoicePrintHistory}/${m.InvoiceID}`;this.httpService.get(e).subscribe(r=>{this.dialog.open(Ce,{data:r?.Data})})}static \u0275fac=function(e){return new(e||o)(M(ie),M(X))};static \u0275cmp=T({type:o,selectors:[["app-print-history"]],features:[V],decls:32,vars:10,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-5"],["matSort","",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","130px"],[2,"width","150px"],[2,"width","100px"],[2,"width","90px"],[2,"width","80px"],[2,"width","30px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","30px"],[3,"jumpToPage","previousPage","nextPage","total","totalAllData","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[3,"ngModelChange","ngModel","multiple"],["name","Key","requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Search Customer",1,"w-100","ac-filter",3,"ngModelChange","ngModel"],[1,"row"],[1,"col-6","pe-2"],["placeholder","From","appearance","outline",3,"dateChange","isFloatingLabel","date"],[1,"col-6","ps-2"],["placeholder","To","appearance","outline",3,"dateChange","isFloatingLabel","date"],[3,"modelChange","model","options"],["type","text","placeholder","Page Size","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["requestUrl","/API/AC/GetUserSuggestion",1,"w-100","ac-filter",3,"ngModelChange","ngModel"],["routerLink","/menu/Orders/Orders/Customer_Invoice/Info",1,"link-primary","cursor-pointer",3,"queryParams"],[1,"link-primary","cursor-pointer",3,"routerLink","queryParams"],["class","text-end",3,"class",4,"ngIf"],[1,"cursor-pointer","text-end","link-primary",3,"click"],[1,"text-end"]],template:function(e,r){if(e&1){let n=P();t(0,"mainpanel-cmp",1),h("onSubmit",function(){return s(n),c(r.onSubmit())}),t(1,"actions"),_(2,Se,3,0,"button",2),i(),t(3,"filters"),E(4,he,22,11,"ng-template",null,0,U),i(),t(6,"content")(7,"div",3)(8,"table",4)(9,"thead",5)(10,"tr")(11,"th",6),l(12,"Outlet"),i(),t(13,"th",7),l(14,"Number"),i(),t(15,"th"),l(16,"Customer"),i(),t(17,"th",8),l(18,"Date"),i(),t(19,"th",9),l(20,"Due"),i(),_(21,we,2,0,"th",10),_(22,ve,2,0,"th",8),_(23,Fe,2,0,"th",11),t(24,"th",12),l(25,"Amount"),i(),t(26,"th",13),l(27,"Count"),i()()(),t(28,"tbody"),O(29,Te,22,26,"tr",null,b),i()(),t(31,"POS-complex-pagination",14),h("jumpToPage",function(){return s(n),c(r.getListData())})("previousPage",function(){return s(n),c(r.getListData())})("nextPage",function(){return s(n),c(r.getListData())}),i()()()()}e&2&&(u("pageData",r.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),a(2),g(r.roleService.global.Export?2:-1),a(19),g(r.isNotUnprintedOnly()?21:-1),a(),g(r.isNotUnprintedOnly()?22:-1),a(),g(r.isNotUnprintedOnly()?23:-1),a(6),L(r.data==null?null:r.data.Data),a(2),u("total",r.data==null||r.data.Data==null?null:r.data.Data.length)("totalAllData",r.data==null?null:r.data.ListTotal)("pageData",r.pageData))},dependencies:[j,B,le,ae,de,Q,z,K,J,_e,ue,ce,se,ge,G,q,re,oe,me,pe,A,R,te],encapsulation:2})};export{ye as PrintHistoryComponent};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-ZKOARDC2.js";import{b as ue,c as de}from"./chunk-BQUL7SGN.js";import{g as he}from"./chunk-PRVQ3NAP.js";import{c as ce,d as pe}from"./chunk-BWN3N6E3.js";import{A as re,G as me}from"./chunk-26YFRPR2.js";import{b as le,c as ae}from"./chunk-JBS5UYZC.js";import{F as ne,G as oe,h as te,o as ie}from"./chunk-DWZ5JTI2.js";import{p as ee,s as se}from"./chunk-LGOSIAUC.js";import{Ab as V,Ca as I,Fb as y,Gb as m,Ha as _,Hb as p,I as O,Ib as E,Ja as D,Lc as Y,Pb as k,Sa as j,Sb as C,Ub as u,Xa as c,Ya as d,Yb as H,Zb as Q,_b as q,c as N,db as R,e as T,eb as w,fa as K,fc as W,hc as S,ib as P,ic as A,jc as B,kb as U,la as L,mc as z,nc as G,o as F,ob as $,oc as J,pa as f,ta as a,ua as r,vd as Z,xc as v,yb as x,yc as X}from"./chunk-IEVGW2RT.js";var M=class o{selectionsSubject=new T(new Map);getSelectedItems(t){return this.selectionsSubject.value.get(t)||[]}setSelectedItems(t,e){let i=new Map(this.selectionsSubject.value);i.set(t,[...e]),this.selectionsSubject.next(i)}clearSelectedItems(t){let e=new Map(this.selectionsSubject.value);e.delete(t),this.selectionsSubject.next(e)}getSelectedItems$(t){return new N(e=>{let i=this.selectionsSubject.subscribe(n=>{e.next(n.get(t)||[])});return()=>i.unsubscribe()})}getAllSelections(){return this.selectionsSubject.value}clearAllSelections(){this.selectionsSubject.next(new Map)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=L({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ie=["autocomplete"],_e=()=>({width:"100%"}),we=()=>({width:"100%",maxWidth:"400px"}),xe=o=>({style:o});function Ve(o,t){if(o&1&&E(0,"img",10),o&2){let e=u(2).$implicit,i=u();y("src",e[i.thumbnailKey],j)}}function Ee(o,t){o&1&&(m(0,"div",11),E(1,"i",12),p())}function ke(o,t){if(o&1&&(m(0,"div"),x(1,Ve,1,1,"img",10)(2,Ee,2,0,"div",11),p()),o&2){let e=u().$implicit,i=u();c(),V(e[i.thumbnailKey]&&e[i.thumbnailKey].trim()!==""?1:2)}}function Ae(o,t){if(o&1){let e=k();m(0,"div",5),C("click",function(n){let s=a(e).$implicit,l=u();return r(l.toggleCheckbox(s,n))}),m(1,"p-checkbox",6),J("ngModelChange",function(n){let s=a(e).$implicit;return G(s._checked,n)||(s._checked=n),r(n)}),C("onChange",function(){let n=a(e).$implicit,s=u();return r(s.onCheckboxChange(n))})("click",function(n){return a(e),r(n.stopPropagation())}),p(),x(2,ke,3,1,"div"),m(3,"div",7)(4,"div",8),S(5),p(),m(6,"div",9),S(7),p()()()}if(o&2){let e=t.$implicit,i=u();c(),z("ngModel",e._checked),y("binary",!0),c(),V(i.showThumbnail?2:-1),c(3),A(e[i.valueField]),c(2),B(" ",e.Code," ")}}var ye=class o{autocomplete;matTooltip;modelName;isMultiple=!0;placeholder="Search";isShowEmptyMessage=!1;emptyMessage="No results found";tooltipMessage="";valueField="Name";paramsKey="Key";label;listDataEndpoint;showThumbnail=!1;thumbnailKey="";maxSelectedItems=0;modelNameChange=new d;onSelectItem=new d;onRemoveItem=new d;completeMethod=new d;onSelect=new d;onUnselect=new d;httpService=f(se);toastr=f(ee);autocompleteV3Service=f(M);selectedItems=I([]);suggestionList;internalSuggestionList=I([]);ngOnInit(){if(this.isMultiple&&this.modelName&&Array.isArray(this.modelName)&&this.modelName.length>0){if(this.suggestionList&&this.suggestionList.length>0){let e=this.modelName.map(i=>this.suggestionList.find(n=>n[this.paramsKey]===i)).filter(i=>i!==void 0);if(e.length>0){this.selectedItems.set(e),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,e);return}}let t=this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint);if(t&&t.length>0){let e=t.filter(i=>this.modelName.includes(i[this.paramsKey]));if(e.length>0){this.selectedItems.set(e);return}}}}ngOnChanges(t){let e=t.modelName;e&&e?.currentValue?.length===0&&this.resetSelection()}resetSelection(){this.selectedItems.set([])}onModelChange(t){if(this.isMultiple&&Array.isArray(t)){this.selectedItems.set(t),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,t);let e=t.map(i=>i[this.paramsKey]);this.modelNameChange.emit(e)}else this.isMultiple||this.modelNameChange.emit(t)}onCompleteHandler(t){let e=t.query;if(this.suggestionList&&this.suggestionList.length>0){let s=this.selectedItems(),l=this.suggestionList.filter(h=>{let g=e.toLowerCase(),b=(h.Name||"").toLowerCase(),Se=(h.Key||"").toLowerCase(),ve=b.includes(g)||Se.includes(g),Me=!s.some(be=>be[this.paramsKey]===h[this.paramsKey]);return ve&&Me});this.internalSuggestionList.set(l);return}let i=new URLSearchParams({Prefix:e,Count:"100"}).toString(),n=this.listDataEndpoint;n&&this.httpService.get(`${n}?${i}`).pipe(O(()=>F([])),K(s=>{let l=this.selectedItems(),h=s.filter(g=>!l.some(b=>b[this.paramsKey]===g[this.paramsKey]));this.internalSuggestionList.set(h)})).subscribe()}onSelectHandler(t){let e=this.isMultiple,i=this.maxSelectedItems;if(e&&i>0){let n=this.selectedItems();if(n.length>=i){this.toastr.warning(`Maximum ${i} items can be selected`,"Selection Limit"),setTimeout(()=>{this.modelNameChange.emit([...n])},0);return}}this.onSelectItem.emit(t),this.onSelect.emit(t)}onRemoveHandler(t){this.onRemoveItem.emit(t.value),this.onUnselect.emit(t.value),t.value&&(t.value._checked=!1)}isChecked(t){let e=this.selectedItems(),i=this.valueField;return e.some(n=>n[i]===t[i])}clearSelections(){this.selectedItems.set([]),this.autocompleteV3Service.clearSelectedItems(this.listDataEndpoint),this.modelNameChange.emit([])}getCurrentSelectionsFromService(){return this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint)}onCheckboxChange(t){if(t._checked)this.isChecked(t)||(this.selectedItems.set([...this.selectedItems(),t]),this.onModelChange(this.selectedItems()));else{let e=this.selectedItems().filter(i=>i[this.paramsKey]!==t[this.paramsKey]);this.selectedItems.set(e),this.onModelChange(e)}setTimeout(()=>{this.autocomplete&&this.autocomplete.inputEL.nativeElement.focus()},0)}toggleCheckbox(t,e){t._checked=!t._checked,this.onCheckboxChange(t),e.stopPropagation()}ngOnDestroy(){}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["autocompleteV3"]],viewQuery:function(e,i){if(e&1&&H(Ie,5),e&2){let n;Q(n=q())&&(i.autocomplete=n.first)}},inputs:{matTooltip:"matTooltip",modelName:"modelName",isMultiple:"isMultiple",placeholder:"placeholder",isShowEmptyMessage:"isShowEmptyMessage",emptyMessage:"emptyMessage",tooltipMessage:"tooltipMessage",valueField:"valueField",paramsKey:"paramsKey",label:"label",listDataEndpoint:"listDataEndpoint",showThumbnail:"showThumbnail",thumbnailKey:"thumbnailKey",maxSelectedItems:"maxSelectedItems"},outputs:{modelNameChange:"modelNameChange",onSelectItem:"onSelectItem",onRemoveItem:"onRemoveItem",completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect"},features:[_],decls:8,vars:18,consts:[["autocomplete",""],["item",""],[1,"d-flex","flex-column","gap-2",2,"margin-top","1rem"],[1,"w-100",2,"width","100%"],[1,"w-100",3,"ngModelChange","completeMethod","onSelect","onUnselect","matTooltip","ngModel","suggestions","optionLabel","multiple","placeholder","showEmptyMessage","emptyMessage","inputStyle","overlayOptions"],[1,"d-flex","align-items-center","gap-2","p-6","w-100",3,"click"],[2,"margin","0",3,"ngModelChange","onChange","click","ngModel","binary"],[1,"ms-2"],[1,"font-medium"],[1,"text-muted",2,"font-size","10px !important"],["width","30","height","30","brokenImageIconFailSafe","","brokenImageIconFailSafeClass","ms-2 empty-image d-flex justify-content-center align-items-center rounded-1",1,"ms-2","empty-image",3,"src"],[1,"empty-image","d-flex","justify-content-center","align-items-center","rounded-1","ms-2"],[1,"fa-solid","fa-image","fa-image-autocomplete",2,"color","#b4b4b4c2"]],template:function(e,i){if(e&1){let n=k();m(0,"div",2)(1,"h6"),S(2),p(),m(3,"div",3)(4,"p-autocomplete",4,0),C("ngModelChange",function(l){return a(n),r(i.onModelChange(l))})("completeMethod",function(l){return a(n),r(i.onCompleteHandler(l))})("onSelect",function(l){return a(n),r(i.onSelectHandler(l))})("onUnselect",function(l){return a(n),r(i.onRemoveHandler(l))}),$(6,Ae,8,5,"ng-template",null,1,Y),p()()()}e&2&&(c(2),A(i.label),c(2),W(v(13,_e)),y("matTooltip",i.tooltipMessage)("ngModel",i.selectedItems())("suggestions",i.internalSuggestionList())("optionLabel",i.valueField)("multiple",i.isMultiple)("placeholder",i.placeholder)("showEmptyMessage",i.isShowEmptyMessage)("emptyMessage",i.emptyMessage)("inputStyle",v(14,_e))("overlayOptions",X(16,xe,v(15,we))))},dependencies:[re,Z,oe,te,ne,ie,ae,le,me,he,de,ue,pe,ce,ge],styles:["div[_ngcontent-%COMP%] > .empty-image[_ngcontent-%COMP%]{height:32px;width:30px;border:solid 1px #dddddd}"]})};var Ce=class o{constructor(t,e){this.el=t;this.renderer=e}value=null;ngOnChanges(){if(this.value===null||this.value===void 0)return;this.renderer.removeClass(this.el.nativeElement,"text-black"),this.renderer.removeClass(this.el.nativeElement,"text-danger");let t=+this.value==0||+this.value>=1?"text-black":"text-danger";this.renderer.addClass(this.el.nativeElement,t)}static \u0275fac=function(e){return new(e||o)(w(D),w(R))};static \u0275dir=U({type:o,selectors:[["","colsFontColor",""]],inputs:{value:[0,"colsFontColor","value"]},features:[_]})};export{ye as a,Ce as b};
1
+ import{a as ge}from"./chunk-ZKOARDC2.js";import{b as ue,c as de}from"./chunk-BQUL7SGN.js";import{g as he}from"./chunk-PRVQ3NAP.js";import{c as ce,d as pe}from"./chunk-QE5OFO56.js";import{A as re,G as me}from"./chunk-26YFRPR2.js";import{b as le,c as ae}from"./chunk-JBS5UYZC.js";import{F as ne,G as oe,h as te,o as ie}from"./chunk-DWZ5JTI2.js";import{p as ee,s as se}from"./chunk-LGOSIAUC.js";import{Ab as V,Ca as I,Fb as y,Gb as m,Ha as _,Hb as p,I as O,Ib as E,Ja as D,Lc as Y,Pb as k,Sa as j,Sb as C,Ub as u,Xa as c,Ya as d,Yb as H,Zb as Q,_b as q,c as N,db as R,e as T,eb as w,fa as K,fc as W,hc as S,ib as P,ic as A,jc as B,kb as U,la as L,mc as z,nc as G,o as F,ob as $,oc as J,pa as f,ta as a,ua as r,vd as Z,xc as v,yb as x,yc as X}from"./chunk-IEVGW2RT.js";var M=class o{selectionsSubject=new T(new Map);getSelectedItems(t){return this.selectionsSubject.value.get(t)||[]}setSelectedItems(t,e){let i=new Map(this.selectionsSubject.value);i.set(t,[...e]),this.selectionsSubject.next(i)}clearSelectedItems(t){let e=new Map(this.selectionsSubject.value);e.delete(t),this.selectionsSubject.next(e)}getSelectedItems$(t){return new N(e=>{let i=this.selectionsSubject.subscribe(n=>{e.next(n.get(t)||[])});return()=>i.unsubscribe()})}getAllSelections(){return this.selectionsSubject.value}clearAllSelections(){this.selectionsSubject.next(new Map)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=L({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ie=["autocomplete"],_e=()=>({width:"100%"}),we=()=>({width:"100%",maxWidth:"400px"}),xe=o=>({style:o});function Ve(o,t){if(o&1&&E(0,"img",10),o&2){let e=u(2).$implicit,i=u();y("src",e[i.thumbnailKey],j)}}function Ee(o,t){o&1&&(m(0,"div",11),E(1,"i",12),p())}function ke(o,t){if(o&1&&(m(0,"div"),x(1,Ve,1,1,"img",10)(2,Ee,2,0,"div",11),p()),o&2){let e=u().$implicit,i=u();c(),V(e[i.thumbnailKey]&&e[i.thumbnailKey].trim()!==""?1:2)}}function Ae(o,t){if(o&1){let e=k();m(0,"div",5),C("click",function(n){let s=a(e).$implicit,l=u();return r(l.toggleCheckbox(s,n))}),m(1,"p-checkbox",6),J("ngModelChange",function(n){let s=a(e).$implicit;return G(s._checked,n)||(s._checked=n),r(n)}),C("onChange",function(){let n=a(e).$implicit,s=u();return r(s.onCheckboxChange(n))})("click",function(n){return a(e),r(n.stopPropagation())}),p(),x(2,ke,3,1,"div"),m(3,"div",7)(4,"div",8),S(5),p(),m(6,"div",9),S(7),p()()()}if(o&2){let e=t.$implicit,i=u();c(),z("ngModel",e._checked),y("binary",!0),c(),V(i.showThumbnail?2:-1),c(3),A(e[i.valueField]),c(2),B(" ",e.Code," ")}}var ye=class o{autocomplete;matTooltip;modelName;isMultiple=!0;placeholder="Search";isShowEmptyMessage=!1;emptyMessage="No results found";tooltipMessage="";valueField="Name";paramsKey="Key";label;listDataEndpoint;showThumbnail=!1;thumbnailKey="";maxSelectedItems=0;modelNameChange=new d;onSelectItem=new d;onRemoveItem=new d;completeMethod=new d;onSelect=new d;onUnselect=new d;httpService=f(se);toastr=f(ee);autocompleteV3Service=f(M);selectedItems=I([]);suggestionList;internalSuggestionList=I([]);ngOnInit(){if(this.isMultiple&&this.modelName&&Array.isArray(this.modelName)&&this.modelName.length>0){if(this.suggestionList&&this.suggestionList.length>0){let e=this.modelName.map(i=>this.suggestionList.find(n=>n[this.paramsKey]===i)).filter(i=>i!==void 0);if(e.length>0){this.selectedItems.set(e),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,e);return}}let t=this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint);if(t&&t.length>0){let e=t.filter(i=>this.modelName.includes(i[this.paramsKey]));if(e.length>0){this.selectedItems.set(e);return}}}}ngOnChanges(t){let e=t.modelName;e&&e?.currentValue?.length===0&&this.resetSelection()}resetSelection(){this.selectedItems.set([])}onModelChange(t){if(this.isMultiple&&Array.isArray(t)){this.selectedItems.set(t),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,t);let e=t.map(i=>i[this.paramsKey]);this.modelNameChange.emit(e)}else this.isMultiple||this.modelNameChange.emit(t)}onCompleteHandler(t){let e=t.query;if(this.suggestionList&&this.suggestionList.length>0){let s=this.selectedItems(),l=this.suggestionList.filter(h=>{let g=e.toLowerCase(),b=(h.Name||"").toLowerCase(),Se=(h.Key||"").toLowerCase(),ve=b.includes(g)||Se.includes(g),Me=!s.some(be=>be[this.paramsKey]===h[this.paramsKey]);return ve&&Me});this.internalSuggestionList.set(l);return}let i=new URLSearchParams({Prefix:e,Count:"100"}).toString(),n=this.listDataEndpoint;n&&this.httpService.get(`${n}?${i}`).pipe(O(()=>F([])),K(s=>{let l=this.selectedItems(),h=s.filter(g=>!l.some(b=>b[this.paramsKey]===g[this.paramsKey]));this.internalSuggestionList.set(h)})).subscribe()}onSelectHandler(t){let e=this.isMultiple,i=this.maxSelectedItems;if(e&&i>0){let n=this.selectedItems();if(n.length>=i){this.toastr.warning(`Maximum ${i} items can be selected`,"Selection Limit"),setTimeout(()=>{this.modelNameChange.emit([...n])},0);return}}this.onSelectItem.emit(t),this.onSelect.emit(t)}onRemoveHandler(t){this.onRemoveItem.emit(t.value),this.onUnselect.emit(t.value),t.value&&(t.value._checked=!1)}isChecked(t){let e=this.selectedItems(),i=this.valueField;return e.some(n=>n[i]===t[i])}clearSelections(){this.selectedItems.set([]),this.autocompleteV3Service.clearSelectedItems(this.listDataEndpoint),this.modelNameChange.emit([])}getCurrentSelectionsFromService(){return this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint)}onCheckboxChange(t){if(t._checked)this.isChecked(t)||(this.selectedItems.set([...this.selectedItems(),t]),this.onModelChange(this.selectedItems()));else{let e=this.selectedItems().filter(i=>i[this.paramsKey]!==t[this.paramsKey]);this.selectedItems.set(e),this.onModelChange(e)}setTimeout(()=>{this.autocomplete&&this.autocomplete.inputEL.nativeElement.focus()},0)}toggleCheckbox(t,e){t._checked=!t._checked,this.onCheckboxChange(t),e.stopPropagation()}ngOnDestroy(){}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["autocompleteV3"]],viewQuery:function(e,i){if(e&1&&H(Ie,5),e&2){let n;Q(n=q())&&(i.autocomplete=n.first)}},inputs:{matTooltip:"matTooltip",modelName:"modelName",isMultiple:"isMultiple",placeholder:"placeholder",isShowEmptyMessage:"isShowEmptyMessage",emptyMessage:"emptyMessage",tooltipMessage:"tooltipMessage",valueField:"valueField",paramsKey:"paramsKey",label:"label",listDataEndpoint:"listDataEndpoint",showThumbnail:"showThumbnail",thumbnailKey:"thumbnailKey",maxSelectedItems:"maxSelectedItems"},outputs:{modelNameChange:"modelNameChange",onSelectItem:"onSelectItem",onRemoveItem:"onRemoveItem",completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect"},features:[_],decls:8,vars:18,consts:[["autocomplete",""],["item",""],[1,"d-flex","flex-column","gap-2",2,"margin-top","1rem"],[1,"w-100",2,"width","100%"],[1,"w-100",3,"ngModelChange","completeMethod","onSelect","onUnselect","matTooltip","ngModel","suggestions","optionLabel","multiple","placeholder","showEmptyMessage","emptyMessage","inputStyle","overlayOptions"],[1,"d-flex","align-items-center","gap-2","p-6","w-100",3,"click"],[2,"margin","0",3,"ngModelChange","onChange","click","ngModel","binary"],[1,"ms-2"],[1,"font-medium"],[1,"text-muted",2,"font-size","10px !important"],["width","30","height","30","brokenImageIconFailSafe","","brokenImageIconFailSafeClass","ms-2 empty-image d-flex justify-content-center align-items-center rounded-1",1,"ms-2","empty-image",3,"src"],[1,"empty-image","d-flex","justify-content-center","align-items-center","rounded-1","ms-2"],[1,"fa-solid","fa-image","fa-image-autocomplete",2,"color","#b4b4b4c2"]],template:function(e,i){if(e&1){let n=k();m(0,"div",2)(1,"h6"),S(2),p(),m(3,"div",3)(4,"p-autocomplete",4,0),C("ngModelChange",function(l){return a(n),r(i.onModelChange(l))})("completeMethod",function(l){return a(n),r(i.onCompleteHandler(l))})("onSelect",function(l){return a(n),r(i.onSelectHandler(l))})("onUnselect",function(l){return a(n),r(i.onRemoveHandler(l))}),$(6,Ae,8,5,"ng-template",null,1,Y),p()()()}e&2&&(c(2),A(i.label),c(2),W(v(13,_e)),y("matTooltip",i.tooltipMessage)("ngModel",i.selectedItems())("suggestions",i.internalSuggestionList())("optionLabel",i.valueField)("multiple",i.isMultiple)("placeholder",i.placeholder)("showEmptyMessage",i.isShowEmptyMessage)("emptyMessage",i.emptyMessage)("inputStyle",v(14,_e))("overlayOptions",X(16,xe,v(15,we))))},dependencies:[re,Z,oe,te,ne,ie,ae,le,me,he,de,ue,pe,ce,ge],styles:["div[_ngcontent-%COMP%] > .empty-image[_ngcontent-%COMP%]{height:32px;width:30px;border:solid 1px #dddddd}"]})};var Ce=class o{constructor(t,e){this.el=t;this.renderer=e}value=null;ngOnChanges(){if(this.value===null||this.value===void 0)return;this.renderer.removeClass(this.el.nativeElement,"text-black"),this.renderer.removeClass(this.el.nativeElement,"text-danger");let t=+this.value==0||+this.value>=1?"text-black":"text-danger";this.renderer.addClass(this.el.nativeElement,t)}static \u0275fac=function(e){return new(e||o)(w(D),w(R))};static \u0275dir=U({type:o,selectors:[["","colsFontColor",""]],inputs:{value:[0,"colsFontColor","value"]},features:[_]})};export{ye as a,Ce as b};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-XMZLK7EB.js";import{a as ve}from"./chunk-UFGFIP7Q.js";import{a as Ce}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-DQT5UJRI.js";import"./chunk-BWN3N6E3.js";import{b as se}from"./chunk-AF5ZP7YV.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-2IQSX3TK.js";import"./chunk-2MUHOEAS.js";import"./chunk-36GWLMZX.js";import{b as re}from"./chunk-WFQIMZGL.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-45HQ3R3G.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-XWXXETJY.js";import{a as Ce}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-LNZY3GKF.js";import"./chunk-QE5OFO56.js";import{b as se}from"./chunk-KJF3M7DY.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-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import{b as re}from"./chunk-WFQIMZGL.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.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 +1 @@
1
- import{a as te}from"./chunk-4SRWAPD4.js";import{d as ee}from"./chunk-WMZLH4YK.js";import{a as z,b as J}from"./chunk-AQW4VS3Y.js";import{c as $}from"./chunk-LN3Z2YMJ.js";import{b as X}from"./chunk-VXPORXGI.js";import{a as K}from"./chunk-YECQSID5.js";import{e as Z}from"./chunk-DQT5UJRI.js";import{b as Y}from"./chunk-AF5ZP7YV.js";import{g as U}from"./chunk-ZTD4APMR.js";import{h as q,o as H}from"./chunk-DWZ5JTI2.js";import{b as Q}from"./chunk-WFQIMZGL.js";import{p as A,s as G}from"./chunk-LGOSIAUC.js";import{Ab as F,Ac as P,Cb as I,Db as V,Dc as k,Eb as W,Fb as g,Fc as D,Gb as i,Hb as r,Hc as x,Ib as M,Lc as B,Nd as O,Pb as C,Qd as j,Sb as h,Ub as c,Xa as l,eb as f,hc as o,ib as E,ic as v,jc as L,mb as R,mc as S,nc as u,ob as b,oc as y,qd as N,ta as m,ua as s,yb as T}from"./chunk-IEVGW2RT.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-4SRWAPD4.js";import{d as ee}from"./chunk-WMZLH4YK.js";import{a as z,b as J}from"./chunk-AQW4VS3Y.js";import{c as $}from"./chunk-SFXDXOSB.js";import{b as X}from"./chunk-VXPORXGI.js";import{a as K}from"./chunk-R2Y4JAXW.js";import{e as Z}from"./chunk-LNZY3GKF.js";import{b as Y}from"./chunk-KJF3M7DY.js";import{g as U}from"./chunk-ZTD4APMR.js";import{h as q,o as H}from"./chunk-DWZ5JTI2.js";import{b as Q}from"./chunk-WFQIMZGL.js";import{p as A,s as G}from"./chunk-LGOSIAUC.js";import{Ab as F,Ac as P,Cb as I,Db as V,Dc as k,Eb as W,Fb as g,Fc as D,Gb as i,Hb as r,Hc as x,Ib as M,Lc as B,Nd as O,Pb as C,Qd as j,Sb as h,Ub as c,Xa as l,eb as f,hc as o,ib as E,ic as v,jc as L,mb as R,mc as S,nc as u,ob as b,oc as y,qd as N,ta as m,ua as s,yb as T}from"./chunk-IEVGW2RT.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 +1 @@
1
- import{c as Z}from"./chunk-2IQSX3TK.js";import"./chunk-2MUHOEAS.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as D}from"./chunk-WUV22SZ4.js";import"./chunk-45HQ3R3G.js";import{s as j}from"./chunk-LGOSIAUC.js";import{$ as _,Ab as u,Fc as k,Gc as A,Jb as o,Kb as e,Lb as f,N as b,Pb as w,Pd as G,Qb as M,Tb as S,Ub as x,Xa as l,Y as p,Za as O,aa as m,c as s,eb as c,fa as C,fc as L,hc as a,ib as P,ic as h,n as v,od as I,ta as E,ua as y,vd as R,yb as g}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function N(r,n){r&1&&(o(0,"div",13)(1,"span",20),a(2,"Latitude and Longitude is empty, please allow your browser location permission!"),e(),o(3,"a",21),a(4,"Click here to learn how to manually activate the location permission"),e()())}function T(r,n){if(r&1){let t=w();o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),a(4,"Geo Fencing"),e(),o(5,"p",4),a(6,"You are about to sign-in from this location"),e(),o(7,"div",5)(8,"div",6)(9,"div",7)(10,"span",8),a(11,"LAT"),e(),o(12,"span",9),a(13),e()(),o(14,"div",7)(15,"span",10),a(16,"LONG"),e(),o(17,"span",11),a(18),e()()(),o(19,"button",12),S("click",function(){E(t);let d=x();return y(d.proceed())}),a(20,"Proceed"),e()(),g(21,N,5,0,"div",13),e(),o(22,"div",14),f(23,"img",15),e()(),o(24,"div",16)(25,"div",17)(26,"div")(27,"span"),a(28,"powered by :"),e(),f(29,"a",18)(30,"img",19),e()()()()}if(r&2){let t=n,i=x();l(2),L(t.latitude&&t.longitude?i.centerGeoPanelStyle:""),l(11),h(t.latitude),l(5),h(t.longitude),l(),M("disabled",!(t.latitude&&t.longitude)),l(2),u(t.latitude&&t.longitude?-1:21)}}var z=class r{constructor(n,t,i,d){this.ngZone=n;this.auth=t;this.http=i;this.router=d}centerGeoPanelStyle="display: flex; flex-direction: column; justify-content: center;";latLong$;ngOnInit(){this.checkOnRefreshPage(),document.body.classList.add("login-body");let n=v(navigator.permissions.query({name:"geolocation"})).pipe(m(t=>new s(i=>{i.next(t.state),t.onchange=()=>this.ngZone.run(()=>i.next(t.state))})),p(1));this.latLong$=n.pipe(m(()=>new s(t=>{navigator.geolocation.getCurrentPosition(i=>this.ngZone.run(()=>{t.next({latitude:i.coords.latitude.toString(),longitude:i.coords.longitude.toString()}),t.complete()}),()=>this.ngZone.run(()=>{t.next({latitude:"",longitude:""}),t.complete()}),{enableHighAccuracy:!0,maximumAge:0,timeout:8e3})})),_({latitude:"",longitude:""}),p(1))}ngOnDestroy(){document.body.classList.remove("login-body")}checkOnRefreshPage(){D.IsEmpty(this.auth.loginResponse)&&this.router.navigate(["/"])}proceed(){this.latLong$.pipe(m(n=>this.http.post("/api/Authentication/LoginGeoRestriction",{UserID:this.auth.loginResponse.UserID,Latitude:n.latitude,Longitude:n.longitude})),C(n=>this.auth.saveLoginConfigToStorage(n)),m(()=>this.router.navigate([this.auth.getRedirectUrl()])),b(1)).subscribe()}static \u0275fac=function(t){return new(t||r)(c(O),c(Z),c(j),c(G))};static \u0275cmp=P({type:r,selectors:[["POS-auth-geolocation"]],decls:2,vars:3,consts:[[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-last","form-pane"],[1,"text-start"],[1,"text-start","mb-7"],[1,"d-flex","flex-column","flex-md-row",2,"column-gap","10px"],[1,"latlong-container","d-flex","flex-grow-1"],[1,"flex-grow-1","text-start","d-flex"],[1,"lat-label","fw-bold"],[1,"ps-5","lat-value","flex-grow-1","d-flex","align-items-center"],[1,"long-label","fw-bold"],[1,"ps-5","long-value","flex-grow-1","d-flex","align-items-center"],[1,"btn","btn-success","mt-5","mx-auto","mx-md-0","mt-md-0","w-25","w-md-100",3,"click","disabled"],[1,"text-start","mt-7"],[1,"col-md-5","order-md-last","order-first","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane","py-6"],["src","https://cdn.dealpos.xyz/web-image/geolocation-map.png",1,"border-0","w-100"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","https://cdn.dealpos.app/public/logo/dealpos_130.png",1,"ms-3","border-0"],[1,"text-danger"],["href","https://support.dealpos.com/en/articles/7963864-enable-location-services-for-several-browser","target","_blank",1,"d-block"]],template:function(t,i){if(t&1&&(g(0,T,31,6,"div",0),k(1,"async")),t&2){let d;u((d=A(1,1,i.latLong$))?0:-1,d)}},dependencies:[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:2rem}@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}.latlong-container[_ngcontent-%COMP%]{background:#fff;border:1px solid #000000;border-radius:5px}.latlong-container[_ngcontent-%COMP%] .lat-label[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{display:inline-block;padding:12px;border-right:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{border-left:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .lat-value[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-value[_ngcontent-%COMP%]{background:#d9d9d94d}"]})};export{z as AuthGeolocationComponent};
1
+ import{c as Z}from"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as D}from"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{s as j}from"./chunk-LGOSIAUC.js";import{$ as _,Ab as u,Fc as k,Gc as A,Jb as o,Kb as e,Lb as f,N as b,Pb as w,Pd as G,Qb as M,Tb as S,Ub as x,Xa as l,Y as p,Za as O,aa as m,c as s,eb as c,fa as C,fc as L,hc as a,ib as P,ic as h,n as v,od as I,ta as E,ua as y,vd as R,yb as g}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function N(r,n){r&1&&(o(0,"div",13)(1,"span",20),a(2,"Latitude and Longitude is empty, please allow your browser location permission!"),e(),o(3,"a",21),a(4,"Click here to learn how to manually activate the location permission"),e()())}function T(r,n){if(r&1){let t=w();o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),a(4,"Geo Fencing"),e(),o(5,"p",4),a(6,"You are about to sign-in from this location"),e(),o(7,"div",5)(8,"div",6)(9,"div",7)(10,"span",8),a(11,"LAT"),e(),o(12,"span",9),a(13),e()(),o(14,"div",7)(15,"span",10),a(16,"LONG"),e(),o(17,"span",11),a(18),e()()(),o(19,"button",12),S("click",function(){E(t);let d=x();return y(d.proceed())}),a(20,"Proceed"),e()(),g(21,N,5,0,"div",13),e(),o(22,"div",14),f(23,"img",15),e()(),o(24,"div",16)(25,"div",17)(26,"div")(27,"span"),a(28,"powered by :"),e(),f(29,"a",18)(30,"img",19),e()()()()}if(r&2){let t=n,i=x();l(2),L(t.latitude&&t.longitude?i.centerGeoPanelStyle:""),l(11),h(t.latitude),l(5),h(t.longitude),l(),M("disabled",!(t.latitude&&t.longitude)),l(2),u(t.latitude&&t.longitude?-1:21)}}var z=class r{constructor(n,t,i,d){this.ngZone=n;this.auth=t;this.http=i;this.router=d}centerGeoPanelStyle="display: flex; flex-direction: column; justify-content: center;";latLong$;ngOnInit(){this.checkOnRefreshPage(),document.body.classList.add("login-body");let n=v(navigator.permissions.query({name:"geolocation"})).pipe(m(t=>new s(i=>{i.next(t.state),t.onchange=()=>this.ngZone.run(()=>i.next(t.state))})),p(1));this.latLong$=n.pipe(m(()=>new s(t=>{navigator.geolocation.getCurrentPosition(i=>this.ngZone.run(()=>{t.next({latitude:i.coords.latitude.toString(),longitude:i.coords.longitude.toString()}),t.complete()}),()=>this.ngZone.run(()=>{t.next({latitude:"",longitude:""}),t.complete()}),{enableHighAccuracy:!0,maximumAge:0,timeout:8e3})})),_({latitude:"",longitude:""}),p(1))}ngOnDestroy(){document.body.classList.remove("login-body")}checkOnRefreshPage(){D.IsEmpty(this.auth.loginResponse)&&this.router.navigate(["/"])}proceed(){this.latLong$.pipe(m(n=>this.http.post("/api/Authentication/LoginGeoRestriction",{UserID:this.auth.loginResponse.UserID,Latitude:n.latitude,Longitude:n.longitude})),C(n=>this.auth.saveLoginConfigToStorage(n)),m(()=>this.router.navigate([this.auth.getRedirectUrl()])),b(1)).subscribe()}static \u0275fac=function(t){return new(t||r)(c(O),c(Z),c(j),c(G))};static \u0275cmp=P({type:r,selectors:[["POS-auth-geolocation"]],decls:2,vars:3,consts:[[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-last","form-pane"],[1,"text-start"],[1,"text-start","mb-7"],[1,"d-flex","flex-column","flex-md-row",2,"column-gap","10px"],[1,"latlong-container","d-flex","flex-grow-1"],[1,"flex-grow-1","text-start","d-flex"],[1,"lat-label","fw-bold"],[1,"ps-5","lat-value","flex-grow-1","d-flex","align-items-center"],[1,"long-label","fw-bold"],[1,"ps-5","long-value","flex-grow-1","d-flex","align-items-center"],[1,"btn","btn-success","mt-5","mx-auto","mx-md-0","mt-md-0","w-25","w-md-100",3,"click","disabled"],[1,"text-start","mt-7"],[1,"col-md-5","order-md-last","order-first","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane","py-6"],["src","https://cdn.dealpos.xyz/web-image/geolocation-map.png",1,"border-0","w-100"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","https://cdn.dealpos.app/public/logo/dealpos_130.png",1,"ms-3","border-0"],[1,"text-danger"],["href","https://support.dealpos.com/en/articles/7963864-enable-location-services-for-several-browser","target","_blank",1,"d-block"]],template:function(t,i){if(t&1&&(g(0,T,31,6,"div",0),k(1,"async")),t&2){let d;u((d=A(1,1,i.latLong$))?0:-1,d)}},dependencies:[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:2rem}@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}.latlong-container[_ngcontent-%COMP%]{background:#fff;border:1px solid #000000;border-radius:5px}.latlong-container[_ngcontent-%COMP%] .lat-label[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{display:inline-block;padding:12px;border-right:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{border-left:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .lat-value[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-value[_ngcontent-%COMP%]{background:#d9d9d94d}"]})};export{z as AuthGeolocationComponent};
@@ -1 +1 @@
1
- import{b as X}from"./chunk-COA4UL2V.js";import"./chunk-32QBWLTN.js";import{d as se,e as ge}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"./chunk-ZZBF7AOW.js";import{a as me,b as ce}from"./chunk-4W3WYXI2.js";import{b as ie}from"./chunk-VXPORXGI.js";import{a as Z}from"./chunk-YECQSID5.js";import"./chunk-6UDFJ3KL.js";import{a as ae}from"./chunk-J6M7UWVR.js";import{e as pe,f as le}from"./chunk-DQT5UJRI.js";import"./chunk-IKKPP4JS.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-BWN3N6E3.js";import{b as ne}from"./chunk-AF5ZP7YV.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{G as oe,N as re}from"./chunk-TEGIL5RZ.js";import{d as ee,e as te}from"./chunk-THT6CY5E.js";import{g as $}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as Y,h as K,o as U}from"./chunk-DWZ5JTI2.js";import"./chunk-2IQSX3TK.js";import"./chunk-2MUHOEAS.js";import"./chunk-36GWLMZX.js";import{b as Q}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-45HQ3R3G.js";import{p as q,s as z}from"./chunk-LGOSIAUC.js";import{Bb as V,Db as L,Eb as A,Fb as c,Fc as b,Gb as n,Hb as i,Hc as v,Ib as F,Jd as R,Lc as j,Mb as y,Nb as h,Pb as D,Qd as H,Sb as I,Sd as J,Ub as m,Xa as p,Zc as B,eb as C,hc as l,ib as E,ic as f,jc as W,jd as N,mb as P,mc as _,nc as d,ob as x,oc as u,pa as w,ta as s,ua as g,vd as G,xc as k,yc as O}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as T,b as M}from"./chunk-SNAKHGZS.js";var ue=()=>["/menu/Contacts/Contact/Customers/Info"],Se=o=>({ID:o});function Ce(o,S){if(o&1){let e=D();n(0,"button",9),I("click",function(){s(e);let t=m(2);return g(t.openExportModal())}),F(1,"i",10),l(2," Export "),i()}}function xe(o,S){if(o&1){let e=D();n(0,"div")(1,"div",11)(2,"h6"),l(3,"Status"),i(),n(4,"ng-select",12),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.contactState,t)||(a.contactState=t),g(t)}),i(),n(5,"h6"),l(6,"Outlet Sign Up"),i(),n(7,"ng-select",13),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.CreatorEntityID,t)||(a.pageData.Filter.CreatorEntityID=t),g(t)}),i(),n(8,"h6"),l(9,"Group"),i(),n(10,"ng-select",14),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.GroupID,t)||(a.pageData.Filter.GroupID=t),g(t)}),i(),n(11,"h6"),l(12,"Join Date Range"),i(),n(13,"div")(14,"datepicker",15),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.From,t)||(a.pageData.Filter.From=t),g(t)}),i()(),n(15,"div",16)(16,"datepicker",17),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.To,t)||(a.pageData.Filter.To=t),g(t)}),i()(),n(17,"h6"),l(18,"Sign In Date Range"),i(),n(19,"div")(20,"datepicker",15),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.SignFrom,t)||(a.pageData.Filter.SignFrom=t),g(t)}),i()(),n(21,"div",16)(22,"datepicker",17),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.SignTo,t)||(a.pageData.Filter.SignTo=t),g(t)}),i()()()()}if(o&2){let e=m(2);p(4),_("ngModel",e.contactState),c("items",e.pageData.Options.ContactStates)("clearable",!1),p(3),_("ngModel",e.pageData.Filter.CreatorEntityID),c("items",e.pageData.Options.Entities),p(3),_("ngModel",e.pageData.Filter.GroupID),c("items",e.pageData.Options.Groups),p(4),c("isFloatingLabel",!1),_("date",e.pageData.Filter.From),p(2),c("isFloatingLabel",!1),_("date",e.pageData.Filter.To),p(4),c("isFloatingLabel",!1),_("date",e.pageData.Filter.SignFrom),p(2),c("isFloatingLabel",!1),_("date",e.pageData.Filter.SignTo)}}function fe(o,S){if(o&1&&(n(0,"tr")(1,"th")(2,"a",28),l(3),i()(),n(4,"td"),l(5),i(),n(6,"td"),l(7),i(),n(8,"td"),l(9),i(),n(10,"td"),l(11),b(12,"IsMinDate"),i(),n(13,"td"),l(14),b(15,"IsMinDate"),i()()),o&2){let e=S.$implicit;p(2),c("routerLink",k(14,ue))("queryParams",O(15,Se,e.ID)),p(),f(e.Name),p(2),f(e.Code),p(2),f(e.Mobile),p(2),f(e.Email),p(2),f(v(12,8,e.JoinDate,"dd MMM yyyy")),p(3),W(" ",v(15,11,e.AppLastSignIn,"dd MMM yyyy HH:mm")," ")}}function De(o,S){if(o&1){let e=D();n(0,"div",29)(1,"POS-complex-pagination",30),I("jumpToPage",function(){s(e);let t=m(3);return g(t.getListData())})("previousPage",function(){s(e);let t=m(3);return g(t.getListData())})("nextPage",function(){s(e);let t=m(3);return g(t.getListData())}),i()()}if(o&2){let e=m(3);p(),c("total",e.data.Data.length)("pageData",e.pageData)}}function ye(o,S){if(o&1&&(y(0,18),n(1,"div",19)(2,"div",20)(3,"table",21)(4,"thead",22)(5,"tr",23)(6,"th"),l(7,"Name"),i(),n(8,"th",24),l(9,"Code"),i(),n(10,"th",24),l(11,"Mobile"),i(),n(12,"th",25),l(13,"Email"),i(),n(14,"th",26),l(15,"Join Date"),i(),n(16,"th",24),l(17,"Last Sign In"),i()()(),n(18,"tbody"),L(19,fe,16,17,"tr",null,V),i()()(),x(21,De,2,2,"div",27),i(),h()),o&2){let e=m(2);p(19),A(e.data.Data),p(2),c("ngIf",e.pageData.Filter)}}function he(o,S){if(o&1){let e=D();n(0,"mainpanel-cmp",2),u("textChange",function(t){s(e);let a=m();return d(a.pageData.Filter.Text,t)||(a.pageData.Filter.Text=t),g(t)}),I("onSubmit",function(){s(e);let t=m();return g(t.searchFromPageOne())}),u("filterChange",function(t){s(e);let a=m();return d(a.pageData.Filter,t)||(a.pageData.Filter=t),g(t)}),y(1,3),n(2,"a",4),F(3,"i",5),l(4,"Get Your Brand Loyalty App "),i(),x(5,Ce,3,0,"button",6),h(),y(6,7),x(7,xe,23,15,"ng-template",null,0,j),h(),x(9,ye,22,1,"ng-container",8),i()}if(o&2){let e=m();c("pageData",e.menuData),_("text",e.pageData.Filter.Text),c("isFilterOnDropdown",!1),_("filter",e.pageData.Filter),p(5),c("ngIf",e.role.global.Export),p(4),c("ngIf",e.data&&e.data.Data)}}var _e=class o extends Z{constructor(e,r,t,a,de,Ie){super(e,r,"Contact/CustomerAppSignInList","ContactLoader/CustomerList",de);this.httpService=r;this.csvConverter=t;this.matDialog=a;this.role=Ie}cdr=w(B);title=w(R);contactState;ngOnInit(){let e=JSON.parse(localStorage.getItem("AccountInfo"));this.title.setTitle(e.BrandName+" POS | App Sign In")}postInit(e){this.menuData.H="App Sign In",this.cdr.markForCheck()}preInitList(){this.contactState=this.pageData.Filter.ContactStateID,this.pageData.Options.ContactStates=[{Key:0,Value:"All"},...this.pageData.Options.ContactStates],this.pageData.Filter=M(T({},this.pageData.Filter),{SignFrom:this.pageData.Filter.SignFrom?this.pageData.Filter.SignFrom:"0001-01-01T00:00:00",SignTo:this.pageData.Filter.SignTo?this.pageData.Filter.SignTo:"0001-01-01T00:00:00"})}openExportModal(){this.matDialog.open(ie,{data:{title:"Loyalty App Last Sign In",exportTypes:[{ID:"ContactExport/LoyaltyLastSignIn",Value:"Default",FileName:"LoyaltyAppLastSignIn"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}preGetList(){this.pageData.Filter.ContactStateID=this.contactState==0?null:this.contactState}static \u0275fac=function(r){return new(r||o)(C(ne),C(z),C(ae),C($),C(q),C(Q))};static \u0275cmp=E({type:o,selectors:[["pos-app-sign-in"]],features:[P],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["ngProjectAs","actions",5,["actions"]],["target","_blank","href","https://www.dealpos.co.id/tour/customer-loyalty-program",1,"btn","btn-outline-secondary"],[1,"fa-solid","fa-mobile","me-1"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"],4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose Status",3,"ngModelChange","ngModel","items","clearable"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet...",3,"ngModelChange","ngModel","items"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Group...",3,"ngModelChange","ngModel","items"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],[2,"width","200px"],[2,"width","100px"],["class","mt-2",4,"ngIf"],[1,"fw-normal",3,"routerLink","queryParams"],[1,"mt-2"],["api","Contact/CustomerAppSignInCount",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(r,t){r&1&&x(0,he,10,6,"mainpanel-cmp",1),r&2&&c("ngIf",t.pageData.Filter)},dependencies:[G,N,le,pe,ge,se,Y,K,U,J,H,X,te,ee,ce,me,re,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{_e as AppSignInComponent};
1
+ import{b as X}from"./chunk-COA4UL2V.js";import"./chunk-32QBWLTN.js";import{d as se,e as ge}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"./chunk-ZZBF7AOW.js";import{a as me,b as ce}from"./chunk-4W3WYXI2.js";import{b as ie}from"./chunk-VXPORXGI.js";import{a as Z}from"./chunk-R2Y4JAXW.js";import"./chunk-NTCQH6TH.js";import{a as ae}from"./chunk-J6M7UWVR.js";import{e as pe,f as le}from"./chunk-LNZY3GKF.js";import"./chunk-IKKPP4JS.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-QE5OFO56.js";import{b as ne}from"./chunk-KJF3M7DY.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{G as oe,N as re}from"./chunk-TEGIL5RZ.js";import{d as ee,e as te}from"./chunk-THT6CY5E.js";import{g as $}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as Y,h as K,o as U}from"./chunk-DWZ5JTI2.js";import"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import{b as Q}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{p as q,s as z}from"./chunk-LGOSIAUC.js";import{Bb as V,Db as L,Eb as A,Fb as c,Fc as b,Gb as n,Hb as i,Hc as v,Ib as F,Jd as R,Lc as j,Mb as y,Nb as h,Pb as D,Qd as H,Sb as I,Sd as J,Ub as m,Xa as p,Zc as B,eb as C,hc as l,ib as E,ic as f,jc as W,jd as N,mb as P,mc as _,nc as d,ob as x,oc as u,pa as w,ta as s,ua as g,vd as G,xc as k,yc as O}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as T,b as M}from"./chunk-SNAKHGZS.js";var ue=()=>["/menu/Contacts/Contact/Customers/Info"],Se=o=>({ID:o});function Ce(o,S){if(o&1){let e=D();n(0,"button",9),I("click",function(){s(e);let t=m(2);return g(t.openExportModal())}),F(1,"i",10),l(2," Export "),i()}}function xe(o,S){if(o&1){let e=D();n(0,"div")(1,"div",11)(2,"h6"),l(3,"Status"),i(),n(4,"ng-select",12),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.contactState,t)||(a.contactState=t),g(t)}),i(),n(5,"h6"),l(6,"Outlet Sign Up"),i(),n(7,"ng-select",13),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.CreatorEntityID,t)||(a.pageData.Filter.CreatorEntityID=t),g(t)}),i(),n(8,"h6"),l(9,"Group"),i(),n(10,"ng-select",14),u("ngModelChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.GroupID,t)||(a.pageData.Filter.GroupID=t),g(t)}),i(),n(11,"h6"),l(12,"Join Date Range"),i(),n(13,"div")(14,"datepicker",15),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.From,t)||(a.pageData.Filter.From=t),g(t)}),i()(),n(15,"div",16)(16,"datepicker",17),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.To,t)||(a.pageData.Filter.To=t),g(t)}),i()(),n(17,"h6"),l(18,"Sign In Date Range"),i(),n(19,"div")(20,"datepicker",15),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.SignFrom,t)||(a.pageData.Filter.SignFrom=t),g(t)}),i()(),n(21,"div",16)(22,"datepicker",17),u("dateChange",function(t){s(e);let a=m(2);return d(a.pageData.Filter.SignTo,t)||(a.pageData.Filter.SignTo=t),g(t)}),i()()()()}if(o&2){let e=m(2);p(4),_("ngModel",e.contactState),c("items",e.pageData.Options.ContactStates)("clearable",!1),p(3),_("ngModel",e.pageData.Filter.CreatorEntityID),c("items",e.pageData.Options.Entities),p(3),_("ngModel",e.pageData.Filter.GroupID),c("items",e.pageData.Options.Groups),p(4),c("isFloatingLabel",!1),_("date",e.pageData.Filter.From),p(2),c("isFloatingLabel",!1),_("date",e.pageData.Filter.To),p(4),c("isFloatingLabel",!1),_("date",e.pageData.Filter.SignFrom),p(2),c("isFloatingLabel",!1),_("date",e.pageData.Filter.SignTo)}}function fe(o,S){if(o&1&&(n(0,"tr")(1,"th")(2,"a",28),l(3),i()(),n(4,"td"),l(5),i(),n(6,"td"),l(7),i(),n(8,"td"),l(9),i(),n(10,"td"),l(11),b(12,"IsMinDate"),i(),n(13,"td"),l(14),b(15,"IsMinDate"),i()()),o&2){let e=S.$implicit;p(2),c("routerLink",k(14,ue))("queryParams",O(15,Se,e.ID)),p(),f(e.Name),p(2),f(e.Code),p(2),f(e.Mobile),p(2),f(e.Email),p(2),f(v(12,8,e.JoinDate,"dd MMM yyyy")),p(3),W(" ",v(15,11,e.AppLastSignIn,"dd MMM yyyy HH:mm")," ")}}function De(o,S){if(o&1){let e=D();n(0,"div",29)(1,"POS-complex-pagination",30),I("jumpToPage",function(){s(e);let t=m(3);return g(t.getListData())})("previousPage",function(){s(e);let t=m(3);return g(t.getListData())})("nextPage",function(){s(e);let t=m(3);return g(t.getListData())}),i()()}if(o&2){let e=m(3);p(),c("total",e.data.Data.length)("pageData",e.pageData)}}function ye(o,S){if(o&1&&(y(0,18),n(1,"div",19)(2,"div",20)(3,"table",21)(4,"thead",22)(5,"tr",23)(6,"th"),l(7,"Name"),i(),n(8,"th",24),l(9,"Code"),i(),n(10,"th",24),l(11,"Mobile"),i(),n(12,"th",25),l(13,"Email"),i(),n(14,"th",26),l(15,"Join Date"),i(),n(16,"th",24),l(17,"Last Sign In"),i()()(),n(18,"tbody"),L(19,fe,16,17,"tr",null,V),i()()(),x(21,De,2,2,"div",27),i(),h()),o&2){let e=m(2);p(19),A(e.data.Data),p(2),c("ngIf",e.pageData.Filter)}}function he(o,S){if(o&1){let e=D();n(0,"mainpanel-cmp",2),u("textChange",function(t){s(e);let a=m();return d(a.pageData.Filter.Text,t)||(a.pageData.Filter.Text=t),g(t)}),I("onSubmit",function(){s(e);let t=m();return g(t.searchFromPageOne())}),u("filterChange",function(t){s(e);let a=m();return d(a.pageData.Filter,t)||(a.pageData.Filter=t),g(t)}),y(1,3),n(2,"a",4),F(3,"i",5),l(4,"Get Your Brand Loyalty App "),i(),x(5,Ce,3,0,"button",6),h(),y(6,7),x(7,xe,23,15,"ng-template",null,0,j),h(),x(9,ye,22,1,"ng-container",8),i()}if(o&2){let e=m();c("pageData",e.menuData),_("text",e.pageData.Filter.Text),c("isFilterOnDropdown",!1),_("filter",e.pageData.Filter),p(5),c("ngIf",e.role.global.Export),p(4),c("ngIf",e.data&&e.data.Data)}}var _e=class o extends Z{constructor(e,r,t,a,de,Ie){super(e,r,"Contact/CustomerAppSignInList","ContactLoader/CustomerList",de);this.httpService=r;this.csvConverter=t;this.matDialog=a;this.role=Ie}cdr=w(B);title=w(R);contactState;ngOnInit(){let e=JSON.parse(localStorage.getItem("AccountInfo"));this.title.setTitle(e.BrandName+" POS | App Sign In")}postInit(e){this.menuData.H="App Sign In",this.cdr.markForCheck()}preInitList(){this.contactState=this.pageData.Filter.ContactStateID,this.pageData.Options.ContactStates=[{Key:0,Value:"All"},...this.pageData.Options.ContactStates],this.pageData.Filter=M(T({},this.pageData.Filter),{SignFrom:this.pageData.Filter.SignFrom?this.pageData.Filter.SignFrom:"0001-01-01T00:00:00",SignTo:this.pageData.Filter.SignTo?this.pageData.Filter.SignTo:"0001-01-01T00:00:00"})}openExportModal(){this.matDialog.open(ie,{data:{title:"Loyalty App Last Sign In",exportTypes:[{ID:"ContactExport/LoyaltyLastSignIn",Value:"Default",FileName:"LoyaltyAppLastSignIn"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}preGetList(){this.pageData.Filter.ContactStateID=this.contactState==0?null:this.contactState}static \u0275fac=function(r){return new(r||o)(C(ne),C(z),C(ae),C($),C(q),C(Q))};static \u0275cmp=E({type:o,selectors:[["pos-app-sign-in"]],features:[P],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["ngProjectAs","actions",5,["actions"]],["target","_blank","href","https://www.dealpos.co.id/tour/customer-loyalty-program",1,"btn","btn-outline-secondary"],[1,"fa-solid","fa-mobile","me-1"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"],4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose Status",3,"ngModelChange","ngModel","items","clearable"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet...",3,"ngModelChange","ngModel","items"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Group...",3,"ngModelChange","ngModel","items"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],[2,"width","200px"],[2,"width","100px"],["class","mt-2",4,"ngIf"],[1,"fw-normal",3,"routerLink","queryParams"],[1,"mt-2"],["api","Contact/CustomerAppSignInCount",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(r,t){r&1&&x(0,he,10,6,"mainpanel-cmp",1),r&2&&c("ngIf",t.pageData.Filter)},dependencies:[G,N,le,pe,ge,se,Y,K,U,J,H,X,te,ee,ce,me,re,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{_e as AppSignInComponent};