dealpos 25.49.5 → 25.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/browser/{chunk-D3QY3EBZ.js → chunk-2ENLMKGR.js} +1 -1
  2. package/browser/{chunk-SMDHPNT7.js → chunk-2FJNMKCN.js} +1 -1
  3. package/browser/{chunk-OZLXHOG4.js → chunk-2ITJBRJU.js} +1 -1
  4. package/browser/{chunk-72YVHXTD.js → chunk-2KI73XNT.js} +1 -1
  5. package/browser/{chunk-YZCJFJZL.js → chunk-2SZZVWQD.js} +11 -11
  6. package/browser/{chunk-FXPNLU4X.js → chunk-3AZAILT2.js} +1 -1
  7. package/browser/{chunk-FQNL3TLZ.js → chunk-3CUT73ZP.js} +1 -1
  8. package/browser/{chunk-IK4DEQSO.js → chunk-3ZWJMFYL.js} +1 -1
  9. package/browser/{chunk-NPQFE4EO.js → chunk-4KYROBKJ.js} +1 -1
  10. package/browser/{chunk-6ESMI6WH.js → chunk-4MQZXTMM.js} +1 -1
  11. package/browser/{chunk-55DB5BOP.js → chunk-4YZVDERU.js} +1 -1
  12. package/browser/{chunk-PXFCSUBN.js → chunk-5SIEW7SH.js} +1 -1
  13. package/browser/{chunk-FHL5KFJX.js → chunk-7L5VMLEF.js} +1 -1
  14. package/browser/{chunk-MFNPIWGR.js → chunk-7MJWZXSK.js} +2 -2
  15. package/browser/{chunk-R546P6WC.js → chunk-A5CTHLE4.js} +1 -1
  16. package/browser/{chunk-BEIHC6NO.js → chunk-A6Z5ZHVO.js} +1 -1
  17. package/browser/{chunk-SRAJGU6Y.js → chunk-B7BVEOOI.js} +1 -1
  18. package/browser/{chunk-YVO66RJF.js → chunk-BFNGPKGX.js} +1 -1
  19. package/browser/{chunk-BGT22RIZ.js → chunk-BLEJLNEO.js} +1 -1
  20. package/browser/{chunk-GIPUEMTC.js → chunk-BQ7QT5RB.js} +1 -1
  21. package/browser/chunk-BZ3GMUQ7.js +14 -0
  22. package/browser/{chunk-G5NXVDID.js → chunk-CB6QEEJX.js} +1 -1
  23. package/browser/{chunk-63B7VXCP.js → chunk-CCJ6SHBL.js} +1 -1
  24. package/browser/{chunk-TXPKRCHR.js → chunk-COL56R4A.js} +1 -1
  25. package/browser/chunk-CXWICNFP.js +1 -0
  26. package/browser/{chunk-7MMDSCS7.js → chunk-CZHWPDAM.js} +1 -1
  27. package/browser/{chunk-WW4UBOYF.js → chunk-DYBRYTEM.js} +1 -1
  28. package/browser/chunk-EAEOJMTA.js +4 -0
  29. package/browser/{chunk-T6SZ4L7O.js → chunk-F765TCAS.js} +1 -1
  30. package/browser/{chunk-EV422BEJ.js → chunk-FMKY4THI.js} +1 -1
  31. package/browser/{chunk-MVJSAD2O.js → chunk-FSOHJLXB.js} +1 -1
  32. package/browser/{chunk-FBHH3WPM.js → chunk-FV4MYFQI.js} +1 -1
  33. package/browser/{chunk-5QMBTXFS.js → chunk-G3DZI5XK.js} +1 -1
  34. package/browser/{chunk-FBN34CVL.js → chunk-G5JGQBAG.js} +1 -1
  35. package/browser/{chunk-Q3FMCFAP.js → chunk-GBSRXCWH.js} +1 -1
  36. package/browser/{chunk-MOXEW4DH.js → chunk-GDQGP7DV.js} +1 -1
  37. package/browser/{chunk-NENPGICH.js → chunk-GESNWWTD.js} +2 -2
  38. package/browser/{chunk-BCGIIVLI.js → chunk-GRLVYPPM.js} +1 -1
  39. package/browser/{chunk-234VD4PN.js → chunk-HFDJ5XSI.js} +1 -1
  40. package/browser/{chunk-H6UWRJHQ.js → chunk-HFOJZ3B5.js} +1 -1
  41. package/browser/{chunk-WVMPGK5K.js → chunk-HFZ437GH.js} +1 -1
  42. package/browser/{chunk-Z3UTJURO.js → chunk-IPPIH4F4.js} +1 -1
  43. package/browser/{chunk-AGJ3GOR7.js → chunk-ISN5K6K2.js} +1 -1
  44. package/browser/{chunk-QHP7VC2R.js → chunk-ISQHQTAS.js} +1 -1
  45. package/browser/chunk-JCLYKROE.js +1 -0
  46. package/browser/chunk-KUF3JPB2.js +1 -0
  47. package/browser/{chunk-Y7D34HYN.js → chunk-KZBVWICA.js} +1 -1
  48. package/browser/{chunk-2M6MJMM7.js → chunk-LIX7XJ55.js} +1 -1
  49. package/browser/{chunk-DG6Y623Z.js → chunk-LIXEWT4U.js} +3 -3
  50. package/browser/{chunk-3ZZJHIUG.js → chunk-M2HEFQUY.js} +1 -1
  51. package/browser/{chunk-UNZLSKV5.js → chunk-MFJH22SW.js} +1 -1
  52. package/browser/{chunk-Y67EVUWI.js → chunk-MZSJCSUV.js} +2 -2
  53. package/browser/{chunk-VFQES62Q.js → chunk-O3ENARQZ.js} +1 -1
  54. package/browser/{chunk-PFF34SZG.js → chunk-OZ3MKU4C.js} +1 -1
  55. package/browser/chunk-PHYDJ3P5.js +1 -0
  56. package/browser/{chunk-N5IOOG55.js → chunk-PIAQ4TBN.js} +1 -1
  57. package/browser/{chunk-OUOI5WK2.js → chunk-PLR55YR2.js} +1 -1
  58. package/browser/chunk-PMDFKXZY.js +1 -0
  59. package/browser/{chunk-LJJMNCST.js → chunk-PV4YHZX5.js} +1 -1
  60. package/browser/chunk-PVBS6SYW.js +3 -0
  61. package/browser/{chunk-IDZHSRCH.js → chunk-PXIMA665.js} +2 -2
  62. package/browser/{chunk-P75DFAMB.js → chunk-Q3DS2RLM.js} +1 -1
  63. package/browser/chunk-QWB3USYP.js +3 -0
  64. package/browser/{chunk-QLMHWHUW.js → chunk-QZRMHLML.js} +1 -1
  65. package/browser/{chunk-Y7KMZ7BT.js → chunk-RE6SQEP6.js} +1 -1
  66. package/browser/{chunk-LSC2CYCL.js → chunk-S4D5UGSM.js} +1 -1
  67. package/browser/{chunk-CIJROL7R.js → chunk-S65MPEJS.js} +1 -1
  68. package/browser/{chunk-P6DRDJVZ.js → chunk-SBTTKQ4L.js} +1 -1
  69. package/browser/{chunk-3SIDOYEU.js → chunk-SK6Y77W4.js} +4 -4
  70. package/browser/{chunk-G6PEAZWA.js → chunk-SOW7VMSU.js} +1 -1
  71. package/browser/{chunk-OOKDKXRB.js → chunk-T3ZHKT2K.js} +1 -1
  72. package/browser/{chunk-6G74X2UP.js → chunk-T7PBUS2H.js} +1 -1
  73. package/browser/{chunk-NKQHQCUV.js → chunk-TTCSYFRX.js} +1 -1
  74. package/browser/{chunk-CNHLZU3Z.js → chunk-UZN4OKOJ.js} +2 -2
  75. package/browser/{chunk-DYI547BZ.js → chunk-WXYXGYFH.js} +1 -1
  76. package/browser/{chunk-IRQYLVRP.js → chunk-X2GHGFH2.js} +2 -2
  77. package/browser/{chunk-5YHDDJI4.js → chunk-XFAV2VZL.js} +1 -1
  78. package/browser/{chunk-U57PBUPN.js → chunk-XSZJISVJ.js} +1 -1
  79. package/browser/{chunk-7PVAZYM4.js → chunk-Y5DX5U5Q.js} +1 -1
  80. package/browser/{chunk-7SAEXKAX.js → chunk-Y7KCHRMM.js} +1 -1
  81. package/browser/{chunk-A4Y2ZLGW.js → chunk-YBUERVXV.js} +1 -1
  82. package/browser/{chunk-LC7GFFEX.js → chunk-YLEKN2EU.js} +1 -1
  83. package/browser/{chunk-RJNG3PZF.js → chunk-YUILNWDI.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-FS6A5G45.js → main-4PHVOJ3C.js} +2 -2
  86. package/package.json +1 -1
  87. package/browser/chunk-6UC76HYF.js +0 -4
  88. package/browser/chunk-CEVAKZDN.js +0 -3
  89. package/browser/chunk-CLWGVNBY.js +0 -14
  90. package/browser/chunk-D3KDSFJU.js +0 -1
  91. package/browser/chunk-DHKZDGY6.js +0 -1
  92. package/browser/chunk-GLOUVXOJ.js +0 -1
  93. package/browser/chunk-RXPEUS2G.js +0 -3
  94. package/browser/chunk-V3FPQMVB.js +0 -1
  95. package/browser/chunk-WXEEGAH5.js +0 -1
@@ -1 +1 @@
1
- import{a as st,b as ft}from"./chunk-D3KDSFJU.js";import"./chunk-ZKOARDC2.js";import{a as mt}from"./chunk-BQUL7SGN.js";import{a as _t}from"./chunk-R546P6WC.js";import{a as ut}from"./chunk-ZMJLTU5O.js";import"./chunk-PRVQ3NAP.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-363IDTE3.js";import{d as dt,e as pt}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 rt,e as lt}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as X}from"./chunk-BCGIIVLI.js";import{f as ct}from"./chunk-Q3FMCFAP.js";import{b as Z}from"./chunk-VXPORXGI.js";import"./chunk-OOKDKXRB.js";import"./chunk-H6UWRJHQ.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as et}from"./chunk-J6M7UWVR.js";import{e as ot,f as at}from"./chunk-YVO66RJF.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-PFF34SZG.js";import{b as tt}from"./chunk-V3FPQMVB.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as K,c as U}from"./chunk-JBS5UYZC.js";import{N as nt,g as it}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Y}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 z}from"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{s as Q}from"./chunk-LGOSIAUC.js";import{Ab as m,Bb as M,Db as N,Eb as j,Fb as s,Fc as d,Gb as o,Gc as f,Hb as n,Hc as x,Ib as w,Jd as R,Lc as q,Pb as P,Qd as H,Sb as h,Ub as c,Xa as i,eb as T,hc as r,ib as O,ic as D,jc as u,jd as W,mb as V,mc as g,nc as I,ob as E,oc as S,sd as A,ta as v,ua as y,vd as G,wb as k,xc as b,yb as p,yc as B}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["/menu/Outlets/Master/Outlets/Info"],Ct=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){v(e);let a=c();return y(a.openExportModal())}),w(1,"i",12),r(2," Export "),n()}}function gt(t,l){if(t&1){let e=P();o(0,"div",13)(1,"h6"),r(2,"Outlet Group"),n(),o(3,"POS-outlet-group-tree-select",14),S("selectedOutletGroupIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.OutletGroupID,a)||(C.pageData.Filter.OutletGroupID=a),y(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.CategoryID,a)||(C.pageData.Filter.CategoryID=a),y(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){v(e);let C=c();return I(C.pageData.Filter.ListProductID,a)||(C.pageData.Filter.ListProductID=a),y(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.From,a)||(C.pageData.Filter.From=a),y(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.To,a)||(C.pageData.Filter.To=a),y(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){v(e);let C=c();return I(C.pageData.Filter.InventoryType,a)||(C.pageData.Filter.InventoryType=a),y(a)}),n()()}if(t&2){let e=c();i(3),s("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),s("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),s("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),s("isFloatingLabel",!1),g("date",e.pageData.Filter.From),s("hidelClearBtn",!0),i(2),s("isFloatingLabel",!1),g("date",e.pageData.Filter.To),s("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),s("options",e.pageData.Options.InventoryTypes)}}function It(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function Dt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function bt(t,l){t&1&&(o(0,"th",9)(1,"span",28),r(2," Now "),n()())}function Bt(t,l){t&1&&(o(0,"th",9)(1,"span",29),r(2," % "),n()())}function Lt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),u(" ",e.ProductCode," ")}}function Ot(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Start),i(),u(" ",f(2,2,e.Start)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Bought)," ")}}function kt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Sold)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredIn)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredOut)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Adjustment),i(),u(" ",e.Adjustment<0?e.Adjustment*-1:f(2,2,e.Adjustment)," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.End),i(),u(" ",e.End," ")}}function Wt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Now),i(),u(" ",e.Now," ")}}function At(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.SellTransferInRate)," ")}}function Gt(t,l){if(t&1&&(o(0,"tr")(1,"td")(2,"a",30),r(3),n()(),o(4,"td")(5,"a",30),r(6),n()(),p(7,Lt,2,1,"td",31),p(8,Ot,3,4,"td",32),p(9,Vt,3,3,"td",33),p(10,kt,3,3,"td",34),p(11,Mt,3,3,"td",33),p(12,Nt,3,3,"td",34),p(13,jt,3,4,"td",32),p(14,qt,2,2,"td",32),p(15,Wt,2,2,"td",32),p(16,At,3,3,"td",31),n()),t&2){let e=l.$implicit,_=c(2);i(2),s("routerLink",b(16,vt))("queryParams",B(17,Ct,e.OutletID)),i(),u(" ",e.OutletName," "),i(2),s("routerLink",b(19,yt))("queryParams",B(20,Ct,e.ProductID)),i(),D(e.ProductName),i(),m(_.column.code.selected?7:-1),i(),m(_.column.start.selected?8:-1),i(),m(_.column.bought.selected?9:-1),i(),m(_.column.sold.selected?10:-1),i(),m(_.column.transferredIn.selected?11:-1),i(),m(_.column.transferredOut.selected?12:-1),i(),m(_.column.adjust.selected?13:-1),i(),m(_.column.end.selected?14:-1),i(),m(_.column.now.selected?15:-1),i(),m(_.column.percent.selected?16:-1)}}function Rt(t,l){if(t&1&&N(0,Gt,17,22,"tr",null,M),t&2){let e=c();j(e.infiniteList)}}function Ht(t,l){t&1&&(o(0,"tr")(1,"td",35),w(2,"app-empty-state"),n()())}function zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Start"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Start"))," ")}}function Qt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Bought"))," ")}}function Jt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Sold"))," ")}}function Kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredIn"))," ")}}function Ut(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredOut"))," ")}}function Xt(t,l){if(t&1&&(o(0,"td",38),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Adjustment"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Adjustment"))," ")}}function Yt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"End"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"End"))," ")}}function Zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Now"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Now"))," ")}}function $t(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),p(4,zt,6,12,"td",32),p(5,Qt,4,6,"td",33),p(6,Jt,4,6,"td",34),p(7,Kt,4,6,"td",33),p(8,Ut,4,6,"td",34),p(9,Xt,6,12,"td",38),p(10,Yt,6,12,"td",32),p(11,Zt,6,12,"td",32),n()()),t&2){let e=c();i(2),k("colspan",e.column.code.selected?3:2),i(2),m(e.column.start.selected?4:-1),i(),m(e.column.bought.selected?5:-1),i(),m(e.column.sold.selected?6:-1),i(),m(e.column.transferredIn.selected?7:-1),i(),m(e.column.transferredOut.selected?8:-1),i(),m(e.column.adjust.selected?9:-1),i(),m(e.column.end.selected?10:-1),i(),m(e.column.now.selected?11:-1)}}function te(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){v(e);let a=c(2);return y(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function ee(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),D(f(2,1,e.listTotal))}}function ie(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),E(5,te,3,0,"span",41)(6,ee,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){v(e);let a=c();return y(a.NextPage(!0))}),w(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),u(" Showing 1 - ",f(4,4,e.infiniteList.length)," of "),i(2),s("ngIf",!e.pageData.HideStoreApiCount),i(),s("ngIf",e.pageData.HideStoreApiCount),i(),u(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var xt=class t extends X{constructor(e,_,a,C,L,F,ne){super(e,_,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=_;this.csvConverter=a;this.pageTitle=C;this.converter=L;this.roleService=F;this.matDialog=ne;this.pageTitle.setTitle(this.menuData.T)}column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(_){return new(_||t)(T(tt),T(Q),T(et),T(R),T(mt),T(J),T(Y))};static \u0275cmp=O({type:t,selectors:[["POS-product-inventory-traffic"]],features:[V],decls:31,vars:19,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(_,a){if(_&1){let C=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return v(C),y(a.searchFromPageOne())}),S("filterChange",function(F){return v(C),I(a.pageData.Filter,F)||(a.pageData.Filter=F),y(F)}),o(1,"actions"),E(2,Tt,3,0,"button",2),n(),o(3,"filters"),E(4,gt,17,20,"ng-template",null,0,q),n(),o(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),o(14,"th"),r(15,"Product"),n(),p(16,It,2,0,"th",8),p(17,St,3,0,"th",9),p(18,Pt,3,0,"th",9),p(19,ht,3,0,"th",9),p(20,Ft,3,0,"th",9),p(21,Et,3,0,"th",9),p(22,wt,3,0,"th",9),p(23,Dt,3,0,"th",9),p(24,bt,3,0,"th",9),p(25,Bt,3,0,"th",9),n()(),o(26,"tbody"),p(27,Rt,2,0)(28,Ht,3,0,"tr"),n(),p(29,$t,12,9,"tfoot"),n()(),p(30,ie,11,6,"div",10),n()()()}_&2&&(s("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),s("column",a.column),i(2),s("ngIf",a.roleService.global.Export),i(14),m(a.column.code.selected?16:-1),i(),m(a.column.start.selected?17:-1),i(),m(a.column.bought.selected?18:-1),i(),m(a.column.sold.selected?19:-1),i(),m(a.column.transferredIn.selected?20:-1),i(),m(a.column.transferredOut.selected?21:-1),i(),m(a.column.adjust.selected?22:-1),i(),m(a.column.end.selected?23:-1),i(),m(a.column.now.selected?24:-1),i(),m(a.column.percent.selected?25:-1),i(2),m(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),m(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),m(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[at,ot,G,W,z,_t,ct,st,nt,H,pt,dt,lt,rt,ut,ft,U,K,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
1
+ import{a as st,b as ft}from"./chunk-PMDFKXZY.js";import"./chunk-ZKOARDC2.js";import{a as mt}from"./chunk-BQUL7SGN.js";import{a as _t}from"./chunk-A5CTHLE4.js";import{a as ut}from"./chunk-ZMJLTU5O.js";import"./chunk-PRVQ3NAP.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-363IDTE3.js";import{d as dt,e as pt}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 rt,e as lt}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as X}from"./chunk-GRLVYPPM.js";import{f as ct}from"./chunk-GBSRXCWH.js";import{b as Z}from"./chunk-VXPORXGI.js";import"./chunk-T3ZHKT2K.js";import"./chunk-HFOJZ3B5.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as et}from"./chunk-J6M7UWVR.js";import{e as ot,f as at}from"./chunk-BFNGPKGX.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-OZ3MKU4C.js";import{b as tt}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as K,c as U}from"./chunk-JBS5UYZC.js";import{N as nt,g as it}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Y}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 z}from"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-EAEOJMTA.js";import{s as Q}from"./chunk-LGOSIAUC.js";import{Ab as m,Bb as M,Db as N,Eb as j,Fb as s,Fc as d,Gb as o,Gc as f,Hb as n,Hc as x,Ib as w,Jd as R,Lc as q,Pb as P,Qd as H,Sb as h,Ub as c,Xa as i,eb as T,hc as r,ib as O,ic as D,jc as u,jd as W,mb as V,mc as g,nc as I,ob as E,oc as S,sd as A,ta as v,ua as y,vd as G,wb as k,xc as b,yb as p,yc as B}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["/menu/Outlets/Master/Outlets/Info"],Ct=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){v(e);let a=c();return y(a.openExportModal())}),w(1,"i",12),r(2," Export "),n()}}function gt(t,l){if(t&1){let e=P();o(0,"div",13)(1,"h6"),r(2,"Outlet Group"),n(),o(3,"POS-outlet-group-tree-select",14),S("selectedOutletGroupIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.OutletGroupID,a)||(C.pageData.Filter.OutletGroupID=a),y(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.CategoryID,a)||(C.pageData.Filter.CategoryID=a),y(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){v(e);let C=c();return I(C.pageData.Filter.ListProductID,a)||(C.pageData.Filter.ListProductID=a),y(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.From,a)||(C.pageData.Filter.From=a),y(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.To,a)||(C.pageData.Filter.To=a),y(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){v(e);let C=c();return I(C.pageData.Filter.InventoryType,a)||(C.pageData.Filter.InventoryType=a),y(a)}),n()()}if(t&2){let e=c();i(3),s("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),s("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),s("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),s("isFloatingLabel",!1),g("date",e.pageData.Filter.From),s("hidelClearBtn",!0),i(2),s("isFloatingLabel",!1),g("date",e.pageData.Filter.To),s("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),s("options",e.pageData.Options.InventoryTypes)}}function It(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function Dt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function bt(t,l){t&1&&(o(0,"th",9)(1,"span",28),r(2," Now "),n()())}function Bt(t,l){t&1&&(o(0,"th",9)(1,"span",29),r(2," % "),n()())}function Lt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),u(" ",e.ProductCode," ")}}function Ot(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Start),i(),u(" ",f(2,2,e.Start)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Bought)," ")}}function kt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Sold)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredIn)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredOut)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Adjustment),i(),u(" ",e.Adjustment<0?e.Adjustment*-1:f(2,2,e.Adjustment)," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.End),i(),u(" ",e.End," ")}}function Wt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Now),i(),u(" ",e.Now," ")}}function At(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.SellTransferInRate)," ")}}function Gt(t,l){if(t&1&&(o(0,"tr")(1,"td")(2,"a",30),r(3),n()(),o(4,"td")(5,"a",30),r(6),n()(),p(7,Lt,2,1,"td",31),p(8,Ot,3,4,"td",32),p(9,Vt,3,3,"td",33),p(10,kt,3,3,"td",34),p(11,Mt,3,3,"td",33),p(12,Nt,3,3,"td",34),p(13,jt,3,4,"td",32),p(14,qt,2,2,"td",32),p(15,Wt,2,2,"td",32),p(16,At,3,3,"td",31),n()),t&2){let e=l.$implicit,_=c(2);i(2),s("routerLink",b(16,vt))("queryParams",B(17,Ct,e.OutletID)),i(),u(" ",e.OutletName," "),i(2),s("routerLink",b(19,yt))("queryParams",B(20,Ct,e.ProductID)),i(),D(e.ProductName),i(),m(_.column.code.selected?7:-1),i(),m(_.column.start.selected?8:-1),i(),m(_.column.bought.selected?9:-1),i(),m(_.column.sold.selected?10:-1),i(),m(_.column.transferredIn.selected?11:-1),i(),m(_.column.transferredOut.selected?12:-1),i(),m(_.column.adjust.selected?13:-1),i(),m(_.column.end.selected?14:-1),i(),m(_.column.now.selected?15:-1),i(),m(_.column.percent.selected?16:-1)}}function Rt(t,l){if(t&1&&N(0,Gt,17,22,"tr",null,M),t&2){let e=c();j(e.infiniteList)}}function Ht(t,l){t&1&&(o(0,"tr")(1,"td",35),w(2,"app-empty-state"),n()())}function zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Start"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Start"))," ")}}function Qt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Bought"))," ")}}function Jt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Sold"))," ")}}function Kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredIn"))," ")}}function Ut(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredOut"))," ")}}function Xt(t,l){if(t&1&&(o(0,"td",38),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Adjustment"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Adjustment"))," ")}}function Yt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"End"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"End"))," ")}}function Zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Now"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Now"))," ")}}function $t(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),p(4,zt,6,12,"td",32),p(5,Qt,4,6,"td",33),p(6,Jt,4,6,"td",34),p(7,Kt,4,6,"td",33),p(8,Ut,4,6,"td",34),p(9,Xt,6,12,"td",38),p(10,Yt,6,12,"td",32),p(11,Zt,6,12,"td",32),n()()),t&2){let e=c();i(2),k("colspan",e.column.code.selected?3:2),i(2),m(e.column.start.selected?4:-1),i(),m(e.column.bought.selected?5:-1),i(),m(e.column.sold.selected?6:-1),i(),m(e.column.transferredIn.selected?7:-1),i(),m(e.column.transferredOut.selected?8:-1),i(),m(e.column.adjust.selected?9:-1),i(),m(e.column.end.selected?10:-1),i(),m(e.column.now.selected?11:-1)}}function te(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){v(e);let a=c(2);return y(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function ee(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),D(f(2,1,e.listTotal))}}function ie(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),E(5,te,3,0,"span",41)(6,ee,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){v(e);let a=c();return y(a.NextPage(!0))}),w(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),u(" Showing 1 - ",f(4,4,e.infiniteList.length)," of "),i(2),s("ngIf",!e.pageData.HideStoreApiCount),i(),s("ngIf",e.pageData.HideStoreApiCount),i(),u(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var xt=class t extends X{constructor(e,_,a,C,L,F,ne){super(e,_,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=_;this.csvConverter=a;this.pageTitle=C;this.converter=L;this.roleService=F;this.matDialog=ne;this.pageTitle.setTitle(this.menuData.T)}column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(_){return new(_||t)(T(tt),T(Q),T(et),T(R),T(mt),T(J),T(Y))};static \u0275cmp=O({type:t,selectors:[["POS-product-inventory-traffic"]],features:[V],decls:31,vars:19,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(_,a){if(_&1){let C=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return v(C),y(a.searchFromPageOne())}),S("filterChange",function(F){return v(C),I(a.pageData.Filter,F)||(a.pageData.Filter=F),y(F)}),o(1,"actions"),E(2,Tt,3,0,"button",2),n(),o(3,"filters"),E(4,gt,17,20,"ng-template",null,0,q),n(),o(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),o(14,"th"),r(15,"Product"),n(),p(16,It,2,0,"th",8),p(17,St,3,0,"th",9),p(18,Pt,3,0,"th",9),p(19,ht,3,0,"th",9),p(20,Ft,3,0,"th",9),p(21,Et,3,0,"th",9),p(22,wt,3,0,"th",9),p(23,Dt,3,0,"th",9),p(24,bt,3,0,"th",9),p(25,Bt,3,0,"th",9),n()(),o(26,"tbody"),p(27,Rt,2,0)(28,Ht,3,0,"tr"),n(),p(29,$t,12,9,"tfoot"),n()(),p(30,ie,11,6,"div",10),n()()()}_&2&&(s("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),s("column",a.column),i(2),s("ngIf",a.roleService.global.Export),i(14),m(a.column.code.selected?16:-1),i(),m(a.column.start.selected?17:-1),i(),m(a.column.bought.selected?18:-1),i(),m(a.column.sold.selected?19:-1),i(),m(a.column.transferredIn.selected?20:-1),i(),m(a.column.transferredOut.selected?21:-1),i(),m(a.column.adjust.selected?22:-1),i(),m(a.column.end.selected?23:-1),i(),m(a.column.now.selected?24:-1),i(),m(a.column.percent.selected?25:-1),i(2),m(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),m(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),m(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[at,ot,G,W,z,_t,ct,st,nt,H,pt,dt,lt,rt,ut,ft,U,K,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
@@ -1 +1 @@
1
- import{a as L}from"./chunk-FHL5KFJX.js";import{C as N,F as j,G as D,c as P,h as A,i as V,k as I,o as R,p as U}from"./chunk-DWZ5JTI2.js";import{c as k}from"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as m}from"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{p as E}from"./chunk-LGOSIAUC.js";import{Gb as i,Hb as n,Ib as u,Pb as y,Pd as M,Sb as h,Xa as b,Yb as _,Zb as S,_b as x,d as f,da as v,eb as d,hc as s,ib as C,mc as w,nc as O,oc as T,ta as l,ua as p}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var F=["totpCode"],z=class g{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){m.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),m.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return m.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return m.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||g)(d(L),d(M),d(k),d(E))};static \u0275cmp=C({type:g,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&_(F,5),t&2){let r;S(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","https://cdn.dealpos.xyz/web-image/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","https://cdn.dealpos.app/public/logo/dealpos_130.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=y();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),h("submit",function(){return l(r),p(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),p(a)}),h("keypress",function(a){return l(r),p(o.numberOnly(a))})("ngModelChange",function(a){return l(r),p(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[D,U,P,A,V,N,j,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{z as AuthTotpComponent};
1
+ import{a as L}from"./chunk-7L5VMLEF.js";import{C as N,F as j,G as D,c as P,h as A,i as V,k as I,o as R,p as U}from"./chunk-DWZ5JTI2.js";import{c as k}from"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as m}from"./chunk-WUV22SZ4.js";import"./chunk-EAEOJMTA.js";import{p as E}from"./chunk-LGOSIAUC.js";import{Gb as i,Hb as n,Ib as u,Pb as y,Pd as M,Sb as h,Xa as b,Yb as _,Zb as S,_b as x,d as f,da as v,eb as d,hc as s,ib as C,mc as w,nc as O,oc as T,ta as l,ua as p}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var F=["totpCode"],z=class g{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){m.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),m.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return m.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return m.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||g)(d(L),d(M),d(k),d(E))};static \u0275cmp=C({type:g,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&_(F,5),t&2){let r;S(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","https://cdn.dealpos.xyz/web-image/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","https://cdn.dealpos.app/public/logo/dealpos_130.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=y();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),h("submit",function(){return l(r),p(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),p(a)}),h("keypress",function(a){return l(r),p(o.numberOnly(a))})("ngModelChange",function(a){return l(r),p(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[D,U,P,A,V,N,j,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{z as AuthTotpComponent};
@@ -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-SRAJGU6Y.js";import{b as X}from"./chunk-VXPORXGI.js";import{a as K}from"./chunk-OOKDKXRB.js";import{e as Z}from"./chunk-YVO66RJF.js";import{b as Y}from"./chunk-V3FPQMVB.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-B7BVEOOI.js";import{b as X}from"./chunk-VXPORXGI.js";import{a as K}from"./chunk-T3ZHKT2K.js";import{e as Z}from"./chunk-BFNGPKGX.js";import{b as Y}from"./chunk-JCLYKROE.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,4 +1,4 @@
1
- import{a as Ai,b as Bi}from"./chunk-QI7I46MV.js";import{a as dt}from"./chunk-Y7KMZ7BT.js";import{a as Oi}from"./chunk-KB4247J2.js";import{a as at,b as mi}from"./chunk-COA4UL2V.js";import"./chunk-32QBWLTN.js";import{b as Ni,c as Vi}from"./chunk-7F4QLFQQ.js";import{a as ki,b as Fi}from"./chunk-6C2HPRJZ.js";import{a as ot}from"./chunk-FHL5KFJX.js";import{a as Ci}from"./chunk-363IDTE3.js";import{a as _i}from"./chunk-QZZ2NRA3.js";import{d as Fe,e as Ii}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 Mi,e as wi}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as Ei,b as Pi}from"./chunk-4W3WYXI2.js";import{a as ke}from"./chunk-OOKDKXRB.js";import"./chunk-H6UWRJHQ.js";import{a as Ti,b as Di}from"./chunk-L6PKNRWO.js";import{e as X,f as yi}from"./chunk-YVO66RJF.js";import"./chunk-2CL5FM3P.js";import"./chunk-45E6XCHN.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import{a as ui,c as fi}from"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-PFF34SZG.js";import{a as pi,b as re}from"./chunk-V3FPQMVB.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{F as Si,G as vi,u as Q,v as Y,w as rt}from"./chunk-26YFRPR2.js";import{b as Ce,c as ci}from"./chunk-JBS5UYZC.js";import{F as st,N as xi,g as lt,o as bi,s as gi,u as hi}from"./chunk-TEGIL5RZ.js";import{a as oi}from"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import{d as ve}from"./chunk-THT6CY5E.js";import{e as z,f as ie,g as J}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import{a as F}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{A as Oe,C as li,D as tt,E as si,F as it,G as di,c as Z,e as At,h as B,i as xe,k as Ie,o as j,p as Se,t as ai,w as ri}from"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import{b as nt}from"./chunk-WFQIMZGL.js";import{a as W}from"./chunk-WUV22SZ4.js";import{a as je}from"./chunk-6UC76HYF.js";import{p as L,s as E}from"./chunk-LGOSIAUC.js";import{Ab as p,Cb as N,Db as V,E as de,Eb as A,Fb as u,Fc as b,Gb as i,Gc as y,Hb as t,Hc as I,Ib as h,Ic as Ee,Jd as ni,Lc as Jt,N as Gt,Nd as et,Pb as v,Pc as Xt,Pd as he,Qa as G,Qd as Pe,Sa as ge,Sb as g,Sd as Vt,Tc as ei,Ub as d,Xa as s,Y as Ze,Za as qe,aa as ee,c as We,cc as te,d as Ut,da as qt,e as Ue,eb as f,ec as Qe,fa as $e,fc as Ye,gc as fe,gd as Xe,hc as o,ib as M,ic as x,jb as ze,jc as S,kc as De,la as ue,lc as Nt,ma as Ge,mb as ae,mc as w,nc as T,o as Zt,oa as oe,ob as Qt,oc as D,od as ti,pa as we,qd as U,sc as Le,sd as _e,t as se,ta as _,tc as Yt,ua as C,vd as ii,wc as Kt,x as $t,xc as Ke,ya as zt,yb as m,yc as R,zc as Je}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as Ht,b as Wt}from"./chunk-SNAKHGZS.js";function Bt(n){if(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray)return new DataView(n.buffer,n.byteOffset,n.byteLength);if(n instanceof ArrayBuffer)return new DataView(n);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Gi="0123456789ABCDEFGHIJKLMNOPQRSTUV",qi="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Rt(n,l,e){e=e||{};let a,r;switch(l){case"RFC3548":case"RFC4648":a=$i,r=!0;break;case"RFC4648-HEX":a=Gi,r=!0;break;case"Crockford":a=qi,r=!1;break;default:throw new Error("Unknown base32 variant: "+l)}let c=e.padding!==void 0?e.padding:r,P=Bt(n),q=0,O=0,pe="";for(let Re=0;Re<P.byteLength;Re++)for(O=O<<8|P.getUint8(Re),q+=8;q>=5;)pe+=a[O>>>q-5&31],q-=5;if(q>0&&(pe+=a[O<<5-q&31]),c)for(;pe.length%8!==0;)pe+="=";return pe}var ct=class n{constructor(l){this.dialogRef=l}config;ngOnInit(){this.config=new Q,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=F.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(e){return new(e||n)(f(z))};static \u0275cmp=M({type:n,selectors:[["POS-modal-confirmation-disabled"]],standalone:!1,decls:5,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"p",2),o(4,"Are you sure you want to disable two factor authentication for your account? "),t()()()()),e&2&&u("config",a.config)},dependencies:[Y],encapsulation:2})};function Qi(n,l){if(n&1){let e=v();i(0,"div")(1,"div",1),o(2," Two Factor Authentication Status: "),i(3,"span",2),o(4,"Enabled"),t()()(),i(5,"div",3)(6,"button",4),g("click",function(){_(e);let r=d();return C(r.onDisableTotp())}),o(7,"Disable Two Factor Authentication"),t()()}}function Yi(n,l){if(n&1){let e=v();i(0,"div",5)(1,"div",6)(2,"h4"),o(3,"Connect Your DealPOS account to an Authenticator Application"),t(),i(4,"p"),o(5,"Secure your login with One Time Password using an Authenticator Application!"),t()()(),i(6,"div",5)(7,"div",6)(8,"ol",7)(9,"li",8)(10,"h5"),o(11,"Download Authenticator application"),t(),i(12,"div",9)(13,"a",10),h(14,"img",11),o(15," Microsoft Authenticator "),t(),i(16,"a",12),h(17,"img",13),o(18," Google Authenticator "),t()()(),i(19,"li",14)(20,"h5"),o(21,"Scan the QR code below"),t(),i(22,"div",3),h(23,"qr-code",15),t()(),i(24,"li",14)(25,"h5"),o(26,"Validate your QR Code"),t(),i(27,"form",16),g("submit",function(){_(e);let r=d();return C(r.onValidate())}),i(28,"div")(29,"input",17),g("keypress",function(r){_(e);let c=d();return C(c.numberOnly(r))}),D("ngModelChange",function(r){_(e);let c=d();return T(c.validation2FA.ValidationCode,r)||(c.validation2FA.ValidationCode=r),C(r)}),t()(),i(30,"div",3)(31,"button",18),o(32,"Validate"),t()()()()()()()}if(n&2){let e=d();s(23),u("value",e.qrcodeContent)("size",265),s(6),w("ngModel",e.validation2FA.ValidationCode)}}var mt=class n{constructor(l,e,a,r){this.document=l;this.authenticatorService=e;this.toastrService=a;this.dialog=r;this.destroy$=new Ut}qrcodeContent;validation2FA={SecretKey:null,ValidationCode:null,Enabled:!0};destroy$;totpEnabled;ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){let l=this.getDomainName(),e=this.generateRandomSecret();this.validation2FA.SecretKey=e;var a=W.parseJwt(localStorage.getItem("Token"));let r=a.LID;this.qrcodeContent=`otpauth://totp/${r}?secret=${e}&issuer=${l}`}generateRandomSecret(){let l=W.Guid_NewGuid(),e=new TextEncoder().encode(l);return Rt(e,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(qt(this.destroy$)).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let l=!0;return W.IsEmpty(this.validation2FA.ValidationCode)?(l=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validation2FA.ValidationCode.length<6||this.validation2FA.ValidationCode.length>6)&&(l=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),l}numberOnly(l){return W.numberOnly(l)}onDisableTotp(){this.dialog.open(ct).afterClosed().pipe(de(l=>W.IsNotEmpty(l)),ee(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(e){return new(e||n)(f(zt),f(ot),f(L),f(J))};static \u0275cmp=M({type:n,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},standalone:!1,decls:3,vars:1,consts:[[1,"container-fluid","mt-6"],[1,"d-inline-block","fs-5"],[1,"text-success","fw-bold"],[1,"mt-6"],["type","button","type","submit",1,"btn","btn-sm","btn-danger",3,"click"],[1,"row"],[1,"col-12"],[1,"ps-7"],[1,"fw-bold"],[1,"d-flex","align-items-center","mt-6"],["href","https://play.google.com/store/apps/details?id=com.azure.authenticator","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Microsoft_Authenticator.png",2,"width","35px"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Google_Authenticator.png",2,"width","35px"],[1,"fw-bold","mt-6"],["errorCorrectionLevel","H",1,"qr2fa",3,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(e,a){e&1&&(i(0,"div",0),m(1,Qi,8,0)(2,Yi,33,3),t()),e&2&&(s(),p(a.totpEnabled?1:2))},dependencies:[Se,Z,B,xe,j,Ie,ki],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
1
+ import{a as Ai,b as Bi}from"./chunk-QI7I46MV.js";import{a as dt}from"./chunk-RE6SQEP6.js";import{a as Oi}from"./chunk-KB4247J2.js";import{a as at,b as mi}from"./chunk-COA4UL2V.js";import"./chunk-32QBWLTN.js";import{b as Ni,c as Vi}from"./chunk-7F4QLFQQ.js";import{a as ki,b as Fi}from"./chunk-6C2HPRJZ.js";import{a as ot}from"./chunk-7L5VMLEF.js";import{a as Ci}from"./chunk-363IDTE3.js";import{a as _i}from"./chunk-QZZ2NRA3.js";import{d as Fe,e as Ii}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 Mi,e as wi}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as Ei,b as Pi}from"./chunk-4W3WYXI2.js";import{a as ke}from"./chunk-T3ZHKT2K.js";import"./chunk-HFOJZ3B5.js";import{a as Ti,b as Di}from"./chunk-L6PKNRWO.js";import{e as X,f as yi}from"./chunk-BFNGPKGX.js";import"./chunk-2CL5FM3P.js";import"./chunk-45E6XCHN.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import{a as ui,c as fi}from"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-OZ3MKU4C.js";import{a as pi,b as re}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{F as Si,G as vi,u as Q,v as Y,w as rt}from"./chunk-26YFRPR2.js";import{b as Ce,c as ci}from"./chunk-JBS5UYZC.js";import{F as st,N as xi,g as lt,o as bi,s as gi,u as hi}from"./chunk-TEGIL5RZ.js";import{a as oi}from"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import{d as ve}from"./chunk-THT6CY5E.js";import{e as z,f as ie,g as J}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import{a as F}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{A as Oe,C as li,D as tt,E as si,F as it,G as di,c as Z,e as At,h as B,i as xe,k as Ie,o as j,p as Se,t as ai,w as ri}from"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import{b as nt}from"./chunk-WFQIMZGL.js";import{a as W}from"./chunk-WUV22SZ4.js";import{a as je}from"./chunk-EAEOJMTA.js";import{p as L,s as E}from"./chunk-LGOSIAUC.js";import{Ab as p,Cb as N,Db as V,E as de,Eb as A,Fb as u,Fc as b,Gb as i,Gc as y,Hb as t,Hc as I,Ib as h,Ic as Ee,Jd as ni,Lc as Jt,N as Gt,Nd as et,Pb as v,Pc as Xt,Pd as he,Qa as G,Qd as Pe,Sa as ge,Sb as g,Sd as Vt,Tc as ei,Ub as d,Xa as s,Y as Ze,Za as qe,aa as ee,c as We,cc as te,d as Ut,da as qt,e as Ue,eb as f,ec as Qe,fa as $e,fc as Ye,gc as fe,gd as Xe,hc as o,ib as M,ic as x,jb as ze,jc as S,kc as De,la as ue,lc as Nt,ma as Ge,mb as ae,mc as w,nc as T,o as Zt,oa as oe,ob as Qt,oc as D,od as ti,pa as we,qd as U,sc as Le,sd as _e,t as se,ta as _,tc as Yt,ua as C,vd as ii,wc as Kt,x as $t,xc as Ke,ya as zt,yb as m,yc as R,zc as Je}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as Ht,b as Wt}from"./chunk-SNAKHGZS.js";function Bt(n){if(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray)return new DataView(n.buffer,n.byteOffset,n.byteLength);if(n instanceof ArrayBuffer)return new DataView(n);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Gi="0123456789ABCDEFGHIJKLMNOPQRSTUV",qi="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Rt(n,l,e){e=e||{};let a,r;switch(l){case"RFC3548":case"RFC4648":a=$i,r=!0;break;case"RFC4648-HEX":a=Gi,r=!0;break;case"Crockford":a=qi,r=!1;break;default:throw new Error("Unknown base32 variant: "+l)}let c=e.padding!==void 0?e.padding:r,P=Bt(n),q=0,O=0,pe="";for(let Re=0;Re<P.byteLength;Re++)for(O=O<<8|P.getUint8(Re),q+=8;q>=5;)pe+=a[O>>>q-5&31],q-=5;if(q>0&&(pe+=a[O<<5-q&31]),c)for(;pe.length%8!==0;)pe+="=";return pe}var ct=class n{constructor(l){this.dialogRef=l}config;ngOnInit(){this.config=new Q,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=F.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(e){return new(e||n)(f(z))};static \u0275cmp=M({type:n,selectors:[["POS-modal-confirmation-disabled"]],standalone:!1,decls:5,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"p",2),o(4,"Are you sure you want to disable two factor authentication for your account? "),t()()()()),e&2&&u("config",a.config)},dependencies:[Y],encapsulation:2})};function Qi(n,l){if(n&1){let e=v();i(0,"div")(1,"div",1),o(2," Two Factor Authentication Status: "),i(3,"span",2),o(4,"Enabled"),t()()(),i(5,"div",3)(6,"button",4),g("click",function(){_(e);let r=d();return C(r.onDisableTotp())}),o(7,"Disable Two Factor Authentication"),t()()}}function Yi(n,l){if(n&1){let e=v();i(0,"div",5)(1,"div",6)(2,"h4"),o(3,"Connect Your DealPOS account to an Authenticator Application"),t(),i(4,"p"),o(5,"Secure your login with One Time Password using an Authenticator Application!"),t()()(),i(6,"div",5)(7,"div",6)(8,"ol",7)(9,"li",8)(10,"h5"),o(11,"Download Authenticator application"),t(),i(12,"div",9)(13,"a",10),h(14,"img",11),o(15," Microsoft Authenticator "),t(),i(16,"a",12),h(17,"img",13),o(18," Google Authenticator "),t()()(),i(19,"li",14)(20,"h5"),o(21,"Scan the QR code below"),t(),i(22,"div",3),h(23,"qr-code",15),t()(),i(24,"li",14)(25,"h5"),o(26,"Validate your QR Code"),t(),i(27,"form",16),g("submit",function(){_(e);let r=d();return C(r.onValidate())}),i(28,"div")(29,"input",17),g("keypress",function(r){_(e);let c=d();return C(c.numberOnly(r))}),D("ngModelChange",function(r){_(e);let c=d();return T(c.validation2FA.ValidationCode,r)||(c.validation2FA.ValidationCode=r),C(r)}),t()(),i(30,"div",3)(31,"button",18),o(32,"Validate"),t()()()()()()()}if(n&2){let e=d();s(23),u("value",e.qrcodeContent)("size",265),s(6),w("ngModel",e.validation2FA.ValidationCode)}}var mt=class n{constructor(l,e,a,r){this.document=l;this.authenticatorService=e;this.toastrService=a;this.dialog=r;this.destroy$=new Ut}qrcodeContent;validation2FA={SecretKey:null,ValidationCode:null,Enabled:!0};destroy$;totpEnabled;ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){let l=this.getDomainName(),e=this.generateRandomSecret();this.validation2FA.SecretKey=e;var a=W.parseJwt(localStorage.getItem("Token"));let r=a.LID;this.qrcodeContent=`otpauth://totp/${r}?secret=${e}&issuer=${l}`}generateRandomSecret(){let l=W.Guid_NewGuid(),e=new TextEncoder().encode(l);return Rt(e,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(qt(this.destroy$)).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let l=!0;return W.IsEmpty(this.validation2FA.ValidationCode)?(l=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validation2FA.ValidationCode.length<6||this.validation2FA.ValidationCode.length>6)&&(l=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),l}numberOnly(l){return W.numberOnly(l)}onDisableTotp(){this.dialog.open(ct).afterClosed().pipe(de(l=>W.IsNotEmpty(l)),ee(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(e){return new(e||n)(f(zt),f(ot),f(L),f(J))};static \u0275cmp=M({type:n,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},standalone:!1,decls:3,vars:1,consts:[[1,"container-fluid","mt-6"],[1,"d-inline-block","fs-5"],[1,"text-success","fw-bold"],[1,"mt-6"],["type","button","type","submit",1,"btn","btn-sm","btn-danger",3,"click"],[1,"row"],[1,"col-12"],[1,"ps-7"],[1,"fw-bold"],[1,"d-flex","align-items-center","mt-6"],["href","https://play.google.com/store/apps/details?id=com.azure.authenticator","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Microsoft_Authenticator.png",2,"width","35px"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Google_Authenticator.png",2,"width","35px"],[1,"fw-bold","mt-6"],["errorCorrectionLevel","H",1,"qr2fa",3,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(e,a){e&1&&(i(0,"div",0),m(1,Qi,8,0)(2,Yi,33,3),t()),e&2&&(s(),p(a.totpEnabled?1:2))},dependencies:[Se,Z,B,xe,j,Ie,ki],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
2
2
  `],encapsulation:2})};var Lt=n=>({active:n}),Ri=n=>({"ng-invalid ng-dirty":n}),Xi=(n,l)=>({border:n,"border-danger":l}),en=n=>({"border-top-0":n});function tn(n,l){if(n&1){let e=v();i(0,"button",64),g("click",function(){_(e);let r=d(3);return C(r.validate())}),o(1," Submit "),t()}if(n&2){d(2);let e=te(36);u("disabled",e==null||e.form==null?null:e.form.invalid)}}function nn(n,l){if(n&1&&m(0,tn,2,1,"button",63),n&2){let e=d(2);p(e.roleService.users.View||e.roleService.profile.View?0:-1)}}function on(n,l){n&1&&(i(0,"small",67),o(1,"*Email is required"),t())}function an(n,l){n&1&&(i(0,"small",67),o(1,"*Enter a valid email address"),t())}function rn(n,l){if(n&1&&(m(0,on,2,0,"small",67),m(1,an,2,0,"small",67)),n&2){d();let e=te(2);p(e.errors!=null&&e.errors.required?0:-1),s(),p(e.errors!=null&&e.errors.pattern?1:-1)}}function ln(n,l){if(n&1){let e=v();i(0,"div",22)(1,"input",65,3),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.formData.Email,r)||(c.formData.Email=r),C(r)}),t(),i(3,"label",66),o(4,"Email"),t(),m(5,rn,2,2),t()}if(n&2){let e=te(2),a=d(2);s(),fe(Je(5,Xi,e.touched&&e.invalid,e.touched&&e.invalid)),w("ngModel",a.formData.Email),u("disabled",!(a.roleService.users.View||a.roleService.profile.View)),s(4),p(e.touched?5:-1)}}function sn(n,l){n&1&&(i(0,"small",67),o(1,"*Enter a valid email address"),t())}function dn(n,l){if(n&1&&m(0,sn,2,0,"small",67),n&2){d();let e=te(2);p(e.errors!=null&&e.errors.pattern?0:-1)}}function cn(n,l){if(n&1){let e=v();i(0,"div",22)(1,"input",68,3),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.formData.Email,r)||(c.formData.Email=r),C(r)}),t(),i(3,"label",66),o(4,"Email"),t(),m(5,dn,1,1),t()}if(n&2){let e=te(2),a=d(2);s(),u("disabled",!(a.roleService.users.View||a.roleService.profile.View)),w("ngModel",a.formData.Email),s(4),p(e.touched?5:-1)}}function mn(n,l){n&1&&(i(0,"i",32),o(1," Password is required. "),t())}function pn(n,l){n&1&&(i(0,"i",32),o(1," These passwords don't match."),t())}function un(n,l){if(n&1&&(i(0,"ul",40)(1,"li",69),o(2),t()()),n&2){let e=l.$implicit;s(2),x(e)}}function fn(n,l){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=l.$implicit,a=l.$index;s(2),x(a+1),s(2),x(e.Key),s(2),x(e.Value)}}function _n(n,l){if(n&1&&(i(0,"ul",40)(1,"li",69),o(2),t()()),n&2){let e=l.$implicit;s(2),x(e)}}function Cn(n,l){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=l.$implicit,a=l.$index;s(2),x(a+1),s(2),x(e.Key),s(2),x(e.Value)}}function bn(n,l){if(n&1&&(i(0,"div",71)(1,"div",72),o(2),t()()),n&2){let e=l.$implicit,a=l.$index;s(),fe(R(3,en,a/4>=1)),s(),S(" ",e.Model," ")}}function gn(n,l){if(n&1&&(i(0,"div",47)(1,"div",70),o(2),t(),i(3,"div",39)(4,"div",17),V(5,bn,3,5,"div",71,N),t()()()),n&2){let e=l.$implicit;s(2),S(" ",e.Name," "),s(3),A(e.ListRole)}}function hn(n,l){if(n&1){let e=v();i(0,"button",74),g("click",function(){_(e);let r=d(3);return C(r.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=d(3);u("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientID)}}function xn(n,l){if(n&1){let e=v();i(0,"a",75),g("click",function(){_(e);let r=d(3);return C(r.preview("Profile/GenerateClientID"))}),o(1,"Generate"),t()}}function Sn(n,l){if(n&1&&(i(0,"div",18)(1,"div",57),h(2,"input",58),t()()),n&2){let e=d(3);s(2),u("value",e.formData.ClientSecret)}}function vn(n,l){if(n&1){let e=v();i(0,"button",74),g("click",function(){_(e);let r=d(3);return C(r.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=d(3);u("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientSecret)}}function yn(n,l){if(n&1){let e=v();i(0,"a",75),g("click",function(){_(e);let r=d(3);return C(r.preview("Profile/GenerateClientSecret"))}),o(1,"Generate"),t()}}function Mn(n,l){if(n&1&&(i(0,"div",54)(1,"h3"),o(2,"API Client ID"),t(),i(3,"small",73),o(4,"(developer.dealpos.com)"),t()(),i(5,"div",56)(6,"div",18)(7,"div",57),h(8,"input",58),t()(),i(9,"div",18)(10,"div",22),m(11,hn,2,2,"button",59),m(12,xn,2,0,"a",60),t()()(),i(13,"div",54)(14,"h3"),o(15,"API Client Secret"),t(),i(16,"small",73),o(17,"(developer.dealpos.com)"),t()(),i(18,"div",56),m(19,Sn,3,1,"div",18),i(20,"div",18)(21,"div",22),m(22,vn,2,2,"button",59),m(23,yn,2,0,"a",60),t()()()),n&2){let e=d(2);s(8),u("value",e.formData.ClientID),s(3),p(e.formData.ClientID?11:-1),s(),p(e.roleService.users.View||e.roleService.profile.View?12:-1),s(7),p(e.formData.ClientSecret?19:-1),s(3),p(e.formData.ClientSecret?22:-1),s(),p(e.roleService.users.View||e.roleService.profile.View?23:-1)}}function wn(n,l){n&1&&(i(0,"div",49)(1,"h4"),o(2," You have no access to view this info, please contact your administrator to view this tab information "),t()())}function Tn(n,l){if(n&1){let e=v();i(0,"button",74),g("click",function(){_(e);let r=d(2);return C(r.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=d(2);u("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.OTTUrl)}}function Dn(n,l){if(n&1){let e=v();i(0,"a",75),g("click",function(){_(e);let r=d(2);return C(r.generateOTT("Profile/GenerateOneTimeToken"))}),o(1,"Generate"),t()}}function En(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",4)(1,"actions"),m(2,nn,1,1),t(),i(3,"content")(4,"div",5)(5,"div")(6,"ul",6)(7,"li",7)(8,"a",8),g("click",function(){_(e);let r=d();return C(r.onSelectTab("GENERAL"))}),o(9,"General"),t()(),i(10,"li",7)(11,"a",9),g("click",function(){_(e);let r=d();return C(r.onSelectTab("SECURITY"))}),o(12,"Outlet Access"),t()(),i(13,"li",7)(14,"a",10),g("click",function(){_(e);let r=d();return C(r.onSelectTab("ROLES"))}),o(15,"Roles"),t()(),i(16,"li",7)(17,"a",11),g("click",function(){_(e);let r=d();return C(r.onSelectTab("API"))}),o(18,"Developer API"),t()(),i(19,"li",7)(20,"a",12),g("click",function(){_(e);let r=d();return C(r.onSelectTab("TOTP"))}),o(21,"TOTP"),t()(),i(22,"li",7)(23,"a",13),g("click",function(){_(e);let r=d();return C(r.onSelectTab("OTT"))}),o(24,"One Time Token"),t()()(),i(25,"div",14)(26,"div",15)(27,"div",16)(28,"div",17)(29,"div",18)(30,"div",19)(31,"div",20)(32,"h2"),o(33,"General Credential"),t()(),i(34,"div",21)(35,"form",null,0)(37,"div",22)(38,"input",23),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.FirstName,r)||(c.formData.FirstName=r),C(r)}),t(),i(39,"label",24),o(40,"First Name"),t()(),i(41,"div",22)(42,"input",25),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.LastName,r)||(c.formData.LastName=r),C(r)}),t(),i(43,"label",26),o(44,"Last Name"),t()(),i(45,"div",22)(46,"input",27),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.LoginID,r)||(c.formData.LoginID=r),C(r)}),t(),i(47,"label",28),o(48,"Username"),t()(),m(49,ln,6,8,"div",22),m(50,cn,6,3,"div",22),t()()()(),i(51,"div",18)(52,"div",19)(53,"div",20)(54,"h2"),o(55,"Change Password"),t(),i(56,"small",29),o(57,"Leave blank if you do not want to change"),t()(),i(58,"div",21)(59,"div")(60,"p-floatLabel")(61,"p-password",30,1),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.NewPassword,r)||(c.formData.NewPassword=r),C(r)}),t(),i(63,"label",31),o(64,"Password"),t()(),m(65,mn,2,0,"i",32),t(),i(66,"div",33)(67,"p-floatLabel")(68,"p-password",34,2),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.RePassword,r)||(c.formData.RePassword=r),C(r)}),t(),i(70,"label",31),o(71,"Re-Password"),t()(),m(72,pn,2,0,"i",32),t()()()()()()(),i(73,"div",35)(74,"div",36)(75,"div",37)(76,"h5",38),o(77,"Group"),t(),i(78,"i"),o(79,"Profile Groups"),t()(),i(80,"div",39)(81,"div",17),V(82,un,3,1,"ul",40,N),t()()(),i(84,"div",41)(85,"div",42)(86,"h5",38),o(87,"Outlets"),t(),i(88,"i"),o(89,"Profile Outlets"),t()(),i(90,"div",39)(91,"div",17)(92,"div")(93,"table",43)(94,"thead",44)(95,"tr")(96,"th"),o(97,"No"),t(),i(98,"th"),o(99,"Outlet"),t(),i(100,"th"),o(101,"Access"),t()()(),i(102,"tbody"),V(103,fn,7,3,"tr",null,N),t()()()()()()(),i(105,"div",45)(106,"div",36)(107,"div",37)(108,"h5",38),o(109,"Group"),t(),i(110,"i"),o(111,"Profile Groups"),t()(),i(112,"div",39)(113,"div",17),V(114,_n,3,1,"ul",40,N),t()()(),i(116,"div",41)(117,"div",42)(118,"h5",38),o(119,"Outlets"),t(),i(120,"i"),o(121,"Profile Outlets"),t()(),i(122,"div",39)(123,"div",17)(124,"div")(125,"table",43)(126,"thead",44)(127,"tr")(128,"th"),o(129,"No"),t(),i(130,"th"),o(131,"Outlet"),t(),i(132,"th"),o(133,"Access"),t()()(),i(134,"tbody"),V(135,Cn,7,3,"tr",null,N),t()()()()()()(),i(137,"div",46),V(138,gn,7,1,"div",47,N),t(),i(140,"div",48),m(141,Mn,24,6)(142,wn,3,0,"div",49),t(),i(143,"div",50),h(144,"POS-setup-2FA",51),t(),i(145,"div",52)(146,"div",47)(147,"div",53)(148,"div",54)(149,"h3"),o(150,"One Time Token"),t(),i(151,"small",55),o(152,"*Token will expire in 1 hour"),t()(),i(153,"div",56)(154,"div",18)(155,"div",57),h(156,"input",58),t()(),i(157,"div",18)(158,"div",22),m(159,Tn,2,2,"button",59),m(160,Dn,2,0,"a",60),t()(),i(161,"div",53)(162,"small",61),o(163," Please refer this "),i(164,"a",62),o(165,"article"),t(),o(166," for more information "),t()()()()()()()()()()()}if(n&2){let e=te(62),a=te(69),r=d();u("pageData",r.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p(r.activeTab=="GENERAL"?2:-1),s(6),u("ngClass",R(32,Lt,r.activeTab=="GENERAL")),s(3),u("ngClass",R(34,Lt,r.activeTab=="SECURITY")),s(15),u("ngClass",R(36,Lt,r.activeTab=="GENERAL")),s(12),w("ngModel",r.formData.FirstName),u("disabled",!(r.roleService.users.View||r.roleService.profile.View)),s(4),w("ngModel",r.formData.LastName),u("disabled",!(r.roleService.users.View||r.roleService.profile.View)),s(4),w("ngModel",r.formData.LoginID),u("disabled",!(r.roleService.users.View||r.roleService.profile.View)),s(3),p(r.data.EmailRequired?49:-1),s(),p(r.data.EmailRequired?-1:50),s(11),u("toggleMask",!0)("feedback",!1)("disabled",!(r.roleService.users.View||r.roleService.profile.View)),w("ngModel",r.formData.NewPassword),u("ngClass",R(38,Ri,e.touched&&e.invalid)),s(4),p((e.touched||a.dirty)&&e.invalid?65:-1),s(3),w("ngModel",r.formData.RePassword),u("toggleMask",!0)("feedback",!1)("disabled",!(r.roleService.users.View||r.roleService.profile.View))("ngClass",R(40,Ri,r.formData.NewPassword!=r.formData.RePassword&&(a.touched||a.dirty))),s(4),p(r.formData.NewPassword!=r.formData.RePassword&&(a.touched||a.dirty)?72:-1),s(10),A(r.data.Security.Groups),s(21),A(r.data.Security.Outlets),s(11),A(r.data.Security.Groups),s(21),A(r.data.Security.Outlets),s(3),A(r.data.Role),s(3),p(r.roleService.developer.Api?141:142),s(3),u("totpEnabled",r.totpEnabled),s(12),u("value",r.formData.OneTimeToken),s(3),p(r.formData.OneTimeToken?159:-1),s(),p(r.roleService.users.View||r.roleService.profile.View?160:-1)}}var pt=class n extends dt{constructor(e,a,r,c,P,q,O){super(e,a,"Profile/MyProfileFormInitial",r);this.toastr=c;this.dialog=P;this.authenticatorService=q;this.roleService=O}tooltipText="Copy to Clipboard";totpEnabled;activeTab="GENERAL";postBindForm(e){this.totpEnabled=e?.Form?.TOTPEnabled,this.data.Form.OTTUrl=window.location.hostname+`?OTT=${e?.Form?.OneTimeToken}`}validate(){if(this.formData.NewPassword!=this.formData.RePassword){this.toastr.error("Password and re-enter password must be equal.",F.Error);return}this.onSubmit("Profile/SubmitProfile")}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",F.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form=a},error:a=>{this.toastr.error(a,F.Error)}})}copyToClipboard(){this.tooltipText="Token has been copied to clipboard",setTimeout(()=>{this.tooltipText="Copy to Clipboard"},2e3)}onSelectTab(e){this.activeTab=e}generateOTT(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form.OneTimeToken=a.OneTimeToken,this.data.Form.OTTUrl="https://"+window.location.hostname+`?OTT=${this.data.Form.OneTimeToken}`},error:a=>{this.toastr.error(a,F.Error)}})}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(et),f(L),f(J),f(ot),f(nt))};static \u0275cmp=M({type:n,selectors:[["POS-my-profile"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[["validation","ngForm"],["password","ngModel"],["rePassword","ngModel"],["email","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-5"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item","cursor"],["id","general-tab","data-bs-toggle","tab","href","#general","role","tab","aria-controls","general","aria-selected","false",1,"nav-link","active",3,"click","ngClass"],["id","security-tab","data-bs-toggle","tab","href","#security","role","tab","aria-controls","profile","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","roles-tab","data-bs-toggle","tab","href","#roles","role","tab","aria-controls","contact","aria-selected","false",1,"nav-link",3,"click"],["id","developerApi-tab","data-bs-toggle","tab","href","#developerApi","role","tab","aria-controls","developerApi","aria-selected","false",1,"nav-link",3,"click"],["id","setupAuth-tab","data-bs-toggle","tab","href","#setupAuth","role","tab","aria-controls","setupAuth","aria-selected","false",1,"nav-link",3,"click"],["id","ott-tab","data-bs-toggle","tab","href","#ott","role","tab","aria-controls","ott","aria-selected","false",1,"nav-link",3,"click"],["id","myTabContent",1,"tab-content"],["id","general","role","tab",1,"tab-pane","fade","show","active","mt-0","pt-8","border","border-top-0",3,"ngClass"],[1,"container"],[1,"row"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputFirstName","name","firstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputFirstName"],["type","text","id","inputLastName","name","lastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputLastName"],["type","text","id","inputName","name","userName","placeholder","Username","readonly","",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputName"],[1,"text-body-secondary","h6"],["required","",1,"p-change-password",3,"ngModelChange","toggleMask","feedback","disabled","ngModel","ngClass"],["for","password"],[1,"control-label","text-danger"],[1,"mt-6"],[1,"p-change-password",3,"ngModelChange","ngModel","toggleMask","feedback","disabled","ngClass"],["id","security","role","tab",1,"tab-pane","fade","show","border","border-top-0","mt-0"],[1,"border-bottom","row","pt-8","ms-3","me-3"],[1,"col-sm-2","mt-3"],[1,"fw-bold"],[1,"col-sm-10"],[1,"mb-4"],[1,"row","border-bottom","mt-10","ms-3"],[1,"col-sm-2"],[1,"table"],[1,"thead-light","sticky-top-thead"],["id","security","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],["id","roles","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],[1,"row","pt-8","ms-3","me-3"],["id","developerApi","role","tab",1,"tab-pane","fade","show","border","border-top-0","p-5","mt-0"],[1,"d-flex","justify-content-center","align-items-center","p-12"],["id","setupAuth","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[3,"totpEnabled"],["id","ott","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[1,"col-12"],[1,"d-flex","align-items-center"],[1,"text-danger","ms-5"],[1,"row","d-flex","align-items-center"],[1,"form-floating-outline","bg-light-gray"],["type","text","name","api-client","readonly","",1,"form-control",3,"value"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm"],[1,"text-body-secondary","fst-italic","h6","ms-2"],["href","https://support.dealpos.com/en/articles/9890206-one-time-token","target","_blank"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"disabled"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"click","disabled"],["type","text","id","email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","email"],[1,"text-danger"],["id","email","type","Email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$",1,"form-control",3,"ngModelChange","disabled","ngModel"],[2,"list-style","circle"],[1,"col-sm-2","border","fw-bold","p-3","text-center",2,"background-color","#f6f6f6"],[1,"col-md-3","px-0"],[1,"p-3","border","border-start-0"],[1,"text-body-secondary","h6","ms-2"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"click","matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm",3,"click"]],template:function(a,r){a&1&&m(0,En,167,42,"mainpanel-cmp",4),a&2&&p(r.data&&r.formData?0:-1)},dependencies:[Xe,Se,Z,B,xe,Oe,tt,j,Ie,X,Ce,Ni,Ai,Ti,mt],styles:["p-password.p-change-password>div.p-password.p-component.p-inputwrapper{width:100%!important} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>input{width:100%!important;height:58px!important;padding-left:15px!important;border:1px solid #dee2e6} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>eyeicon.p-element.p-icon-wrapper{margin-right:10px}"]})};var Pn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],In=n=>({ID:n});function On(n,l){if(n&1){let e=v();i(0,"div",17)(1,"h6"),o(2,"Type"),t(),i(3,"ng-select",18),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.pageData.Filter.TypeID,r)||(c.pageData.Filter.TypeID=r),C(r)}),t(),i(4,"h6"),o(5,"Customer"),t(),i(6,"autocompleteV2",19),g("onInputChange",function(r){_(e);let c=d(2);return C(c.resetCustomer(r))})("onSelect",function(r){_(e);let c=d(2);return C(c.onSelectCustomer(r))}),t(),i(7,"h6"),o(8,"From"),t(),i(9,"datepicker",20),D("dateChange",function(r){_(e);let c=d(2);return T(c.pageData.Filter.From,r)||(c.pageData.Filter.From=r),C(r)}),t(),i(10,"h6"),o(11,"To"),t(),i(12,"datepicker",21),D("dateChange",function(r){_(e);let c=d(2);return T(c.pageData.Filter.To,r)||(c.pageData.Filter.To=r),C(r)}),t()()}if(n&2){let e=d(2);s(3),u("items",e.pageData.Options.Types),w("ngModel",e.pageData.Filter.TypeID),s(6),w("date",e.pageData.Filter.From),s(3),w("date",e.pageData.Filter.To)}}function kn(n,l){n&1&&(i(0,"th",10),o(1," @@ Cost "),t())}function Fn(n,l){if(n&1&&(i(0,"span",29),o(1),b(2,"amountFraction"),t()),n&2){let e=d().$implicit;s(),x(" - Profit: "+y(2,1,e.Profit))}}function Nn(n,l){if(n&1&&(i(0,"small"),o(1),t()),n&2){let e=d(2).$implicit;s(),S("( ",e.Commissions[0].Quantity," unit )")}}function Vn(n,l){if(n&1&&(i(0,"i",42),o(1),m(2,Nn,2,1,"small"),t()),n&2){let e=d().$implicit;s(),S("sold by ",e.Commissions[0].SalesName," "),s(),p(e.Commissions[0].Quantity<e.Quantity?2:-1)}}function An(n,l){if(n&1&&(i(0,"li")(1,"i"),o(2),t()()),n&2){let e=l.$implicit;s(2),S("( ",e.Quantity+" unit by "+e.SalesName," )")}}function Bn(n,l){if(n&1&&(i(0,"ul",43)(1,"li")(2,"i"),o(3,"sold by"),t()(),V(4,An,3,1,"li",null,N),t()),n&2){let e=d().$implicit;s(4),A(e.Commissions)}}function Rn(n,l){if(n&1&&(i(0,"th",48),o(1),b(2,"amountFraction"),t()),n&2){let e=d().$implicit;s(),S(" ",y(2,1,e.UnitCost)," ")}}function Ln(n,l){if(n&1&&(i(0,"tr",37)(1,"th",39)(2,"div",40)(3,"span",41),o(4),t(),m(5,Vn,3,2,"i",42),m(6,Bn,6,0,"ul",43),h(7,"span",44),b(8,"newlines"),t()(),i(9,"th",45),o(10),t(),i(11,"th",46),o(12),b(13,"quantityFraction"),t(),i(14,"th",47),o(15),t(),m(16,Rn,3,3,"th",48),i(17,"th",49),o(18),b(19,"amountFraction"),t(),i(20,"th",50),o(21),t(),i(22,"th",51),o(23),b(24,"amountFraction"),t()()),n&2){let e=l.$implicit,a=d(3);s(4),x(e.Name),s(),p(e.Commissions.length==1?5:-1),s(),p(e.Commissions.length>1?6:-1),s(),u("innerHTML",y(8,11,e.Note),G),s(3),S(" ",e.Code," "),s(2),S(" ",y(13,13,e.Quantity)," "),s(3),S(" ",e.UOMName," "),s(),p(a.roleService.product.Cost?16:-1),s(2),S(" ",y(19,15,e.UnitPrice)," "),s(3),S(" ",e.Discount==0?"":e.Discount+"%"," "),s(2),S(" ",y(24,17,e.Total)," ")}}function jn(n,l){if(n&1&&(i(0,"tr")(1,"th",52),o(2),t(),i(3,"th",53),o(4),t(),i(5,"th",54),o(6),b(7,"amountFraction"),t()()),n&2){let e=l.$implicit;s(2),S("",e.Label," :"),s(2),S(" ",e.CurrencySymbol," "),s(2),S(" ",y(7,3,e.Amount)," ")}}function Hn(n,l){if(n&1&&(i(0,"div")(1,"div",22)(2,"div",23)(3,"a",24),h(4,"span",25),b(5,"date"),h(6,"small",26),b(7,"date"),t(),i(8,"span"),o(9),b(10,"showIfNotNullOrEmptyString"),t(),h(11,"span",27),i(12,"strong",28),o(13),b(14,"sum"),i(15,"span"),o(16),b(17,"showIfNotNullOrEmptyString"),t()(),m(18,Fn,3,3,"span",29),i(19,"i",30),o(20),t(),i(21,"span",31),o(22),t(),i(23,"span",32),o(24),t()(),i(25,"div",33),h(26,"label",34),t()(),i(27,"table",35)(28,"tbody",36),V(29,Ln,25,19,"tr",37,N),t()(),i(31,"table",38),V(32,jn,8,5,"tr",null,N),t()()),n&2){let e=l.$implicit,a=d(2);s(3),u("routerLink",Ke(27,Pn))("queryParams",R(28,In,e.ID)),s(),u("innerHTML",e.EntityName+" #"+e.Number+" - "+I(5,12,e.Date,"dd MMM yyyy"),G),s(2),u("innerHTML","("+I(7,15,e.Created,"HH:mm")+")",G),s(3),x(I(10,18,e.CustomerNameDisplay," - {0}")),s(4),S(" ","[Q: "+I(14,21,e.Items,"Quantity")+"]"," "),s(3),x(I(17,24,e.SalesName," - Sales: {0}")),s(2),p(a.roleService.report.Profit?18:-1),s(2),x(e.DeliveryOutlet==null?"":": Delivered from "+e.DeliveryOutlet),s(2),x(e.PromotionCoupon==null?"":": "+e.PromotionCoupon),s(2),x(e.SONote==null?"":": "+e.SONote),s(2),u("innerHTML",e.PaymentStateLabel,G),s(3),A(e.Items),s(3),A(e.Aggregate)}}function Wn(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",2),g("onSubmit",function(){_(e);let r=d();return C(r.searchFromPageOne())}),i(1,"filters"),Qt(2,On,13,4,"ng-template",null,0,Jt),t(),i(4,"content")(5,"div",3)(6,"table",4)(7,"thead",5)(8,"tr")(9,"th",6),o(10,"Name"),t(),i(11,"th",7),o(12,"Code"),t(),i(13,"th",8),o(14,"Qty"),t(),i(15,"th",9),o(16,"UOM"),t(),m(17,kn,2,0,"th",10),i(18,"th",11),o(19,"@@ Price"),t(),i(20,"th",12),o(21,"%"),t(),i(22,"th",13),o(23,"Total"),t()()()(),V(24,Hn,34,30,"div",null,N),i(26,"div",14)(27,"button",15),g("click",function(){_(e);let r=d();return C(r.showSummaryReport())}),o(28," View Report Summary "),t()(),i(29,"POS-complex-pagination",16),g("jumpToPage",function(){_(e);let r=d();return C(r.getListData())})("previousPage",function(){_(e);let r=d();return C(r.getListData())})("nextPage",function(){_(e);let r=d();return C(r.getListData())}),t()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),s(17),p(e.roleService.product.Cost?17:-1),s(7),A(e.data.Data),s(5),u("total",e.data.Data?e.data.Data.length:0)("pageData",e.pageData)}}var ft=class n extends ke{constructor(e,a,r){super(e,a,"Report/MySales","ReportLoader/MyActivity");this.roleService=r}dialog=we(J);onSelectCustomer(e){this.pageData.Filter.CustomerID=e}resetCustomer(e){e==""&&(this.pageData.Filter.CustomerID=null)}showSummaryReport(){this.dialog.open(Oi,{data:{Filter:this.pageData.Filter}})}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(nt))};static \u0275cmp=M({type:n,selectors:[["POS-my-sales"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","660px"],[2,"width","68px"],[1,"text-end",2,"width","30px"],[2,"width","50px"],["id","thCost",1,"text-end",2,"width","80px"],[1,"text-end",2,"width","80px"],[1,"red",2,"width","30px"],[1,"text-end",2,"width","90px"],[1,"text-center"],["role","button",1,"btn","btn-outline-primary",3,"click"],["api","Report/ReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"onInputChange","onSelect"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block","mt-8","mb-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4",3,"innerHTML"],[1,"fst-italic","fw-bold",3,"innerHTML"],[1,"d-block"],[1,"text-danger","ms-3"],[1,"fw-bold"],["id","deliveryNote"],[1,"d-inline-block","fst-italic"],[1,"d-inline-block"],[1,"d-lg-block","mt-8","me-2","fw-bold","fst-italic"],[1,"status",3,"innerHTML"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"border-start","border-end"],[1,"table","table-sm","table-borderless"],[2,"width","645px"],[1,"lh-base"],[1,"fw-normal"],[1,"text-warning","inlineMarginLeft"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"d-block","fw-normal","fst-italic",3,"innerHTML"],[1,"fw-normal",2,"width","75px"],[1,"fw-normal","text-end",2,"width","42px"],[1,"fst-italic","small",2,"width","52px"],[1,"fw-normal","text-end",2,"width","80px"],[1,"fw-normal","text-end",2,"width","92px"],[1,"fw-normal","text-end","text-danger",2,"width","30px"],[1,"fw-normal","text-end",2,"width","102px"],[1,"text-end"],[1,"p-0","fw-normal","text-end",2,"width","1%"],[1,"fw-normal","text-end",2,"width","5%"]],template:function(a,r){a&1&&m(0,Wn,30,6,"mainpanel-cmp",1),a&2&&p(r.data?0:-1)},dependencies:[B,j,Pe,X,Fe,ve,Ei,Si,U,lt,bi,gi,_i,Ci],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{line-height:13px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:20px!important}"]})};function Un(n,l){n&1&&(i(0,"small",15),o(1,"*Enter a valid phone number"),t())}function Zn(n,l){if(n&1&&m(0,Un,2,0,"small",15),n&2){d();let e=te(9);p(e.errors!=null&&e.errors.pattern?0:-1)}}function $n(n,l){n&1&&(i(0,"small",15),o(1,"*Enter a valid email address"),t())}function Gn(n,l){if(n&1&&m(0,$n,2,0,"small",15),n&2){d();let e=te(16);p(e.errors!=null&&e.errors.pattern?0:-1)}}var _t=class n{constructor(l,e,a,r,c){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.router=c;this.config.title="Subscribe Account Info",this.config.okText="I want to subscribe",this.config.cancelText="Cancel",this.config.customWidth="35vw"}config=new Q;onOk(l){if(l!=="Enter"){if(this.data.form.Qty==0){this.toastr.error("The number of outlets can't be empty",F.Error),this.dialogRef.close();return}this.httpService.post("/API/Subscription/SendSubscription",this.data.form).subscribe(e=>{this.toastr.success(e,F.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L),f(he))};static \u0275cmp=M({type:n,selectors:[["POS-modal-subscribe"]],standalone:!1,decls:26,vars:7,consts:[["validation","ngForm"],["phoneCtrl","ngModel"],["emailCtrl","ngModel"],[3,"onOk","onCancel","onClose","dynamicValidated","config"],[1,"container"],[1,"row"],[1,"col-6"],[1,"form-floating-outline"],["type","text","id","inputPhone","placeholder","Phone","name","phone","pattern","[0-9]{0,15}","required","","matTooltipPosition","above","matTooltip","Your number will be saved to help our customer service quickly identify you in the future",1,"form-control",3,"ngModelChange","ngModel"],["for","inputPhone"],["type","text","id","inputEmail","placeholder","Email","name","email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","","matTooltipPosition","above","matTooltip","Your monthly recurring invoice will be sent to the email you specified above",1,"form-control",3,"ngModelChange","ngModel"],["for","inputEmail"],[1,"col-12"],["name","note","id","inputNote","placeholder","Note","rows","6",1,"form-control",3,"ngModelChange","ngModel"],["for","inputNote"],[1,"text-danger"]],template:function(e,a){if(e&1){let r=v();i(0,"modal-material",3),g("onOk",function(P){return _(r),C(a.onOk(P))})("onCancel",function(){return _(r),C(a.dialogRef.close())})("onClose",function(){return _(r),C(a.dialogRef.close())}),i(1,"content")(2,"div",4)(3,"form",null,0)(5,"div",5)(6,"div",6)(7,"div",7)(8,"input",8,1),D("ngModelChange",function(P){return _(r),T(a.data.form.Phone,P)||(a.data.form.Phone=P),C(P)}),t(),i(10,"label",9),o(11,"Phone*"),t(),m(12,Zn,1,1),t()(),i(13,"div",6)(14,"div",7)(15,"input",10,2),D("ngModelChange",function(P){return _(r),T(a.data.form.Email,P)||(a.data.form.Email=P),C(P)}),t(),i(17,"label",11),o(18,"Email*"),t(),m(19,Gn,1,1),t()()(),i(20,"div",5)(21,"div",12)(22,"div",7)(23,"textarea",13),D("ngModelChange",function(P){return _(r),T(a.data.form.Note,P)||(a.data.form.Note=P),C(P)}),t(),i(24,"label",14),o(25,"Note"),t()()()()()()()()}if(e&2){let r=te(9),c=te(16);u("dynamicValidated",(r==null?null:r.valid)||(c==null?null:c.valid))("config",a.config),s(8),w("ngModel",a.data.form.Phone),s(4),p(r.touched&&r.dirty?12:-1),s(3),w("ngModel",a.data.form.Email),s(4),p(c.touched&&c.dirty?19:-1),s(4),w("ngModel",a.data.form.Note)}},dependencies:[Se,Z,B,xe,Oe,tt,j,Ie,Y,Ce],encapsulation:2})};function qn(n,l){if(n&1){let e=v();i(0,"div",20),g("click",function(){let r=_(e).$implicit,c=d(2);return C(c.onCycleChange(r.key))}),i(1,"div",21)(2,"span",22),o(3),t(),h(4,"div",23),t()()}if(n&2){let e=l.$implicit,a=d(2);fe(e.key==a.formData.Cycle?"active":""),s(3),x(e.dicount),s(),u("innerHTML",e.desc,G)}}function zn(n,l){if(n&1){let e=v();i(0,"tr")(1,"th",24),o(2,"Register"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"input",25),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.formData.Register,r)||(c.formData.Register=r),C(r)}),g("ngModelChange",function(){_(e);let r=d(2);return C(r.onQtyRegisterChange())}),t(),i(7,"span"),o(8),b(9,"number"),t()()()}if(n&2){let e=d(2);s(6),u("preventNegative",!0),w("ngModel",e.formData.Register),s(2),S("/ ",y(9,3,e.data.Options.Register))}}function Qn(n,l){if(n&1){let e=v();i(0,"div",6)(1,"div",26)(2,"div",8)(3,"h2",9),o(4,"Setup Fee "),t(),i(5,"small",10),o(6,"(One-time payment)"),t()()(),i(7,"div",19)(8,"table",27)(9,"tr")(10,"th"),o(11,"POS"),t(),i(12,"td"),o(13,"\xA0:"),t(),i(14,"td")(15,"label",28)(16,"radio-options",29),D("modelChange",function(r){_(e);let c=d(2);return T(c.data.Options.SetupFee,r)||(c.data.Options.SetupFee=r),C(r)}),g("modelChange",function(){_(e);let r=d(2);return C(r.calculateSetupFee())}),t()()()()()()()}if(n&2){let e=d(2);s(16),w("model",e.data.Options.SetupFee)}}function Yn(n,l){n&1&&o(0," s ")}function Kn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),o(3,"Additional Register"),t(),i(4,"p")(5,"small",37),o(6),t()()(),i(7,"td",32),o(8),t(),i(9,"td",33),h(10,"span",36),o(11),b(12,"number"),t(),i(13,"td",34),o(14),t(),i(15,"td",33),h(16,"span",36),o(17),b(18,"number"),t()()),n&2){let e=d(4);s(6),De("",e.formData.Register," Register",e.formData.Register>1?"s":""," "),s(2),x(e.formData.Cycle),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(12,8,e.data.Options.Register)),s(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(18,10,e.registerFee))}}function Jn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong")(3,"span"),o(4,"POS"),t()(),i(5,"p")(6,"small",37),o(7," - Consultation "),h(8,"br"),o(9," - Training 2x "),h(10,"br"),o(11," - 1 Month Support Group"),t()()(),h(12,"td",32),i(13,"td",33)(14,"span"),o(15,"IDR "),t(),o(16),b(17,"number"),t(),h(18,"td",34),i(19,"td",33)(20,"span"),o(21,"IDR "),t(),o(22),b(23,"number"),t()()),n&2){let e=d(4);s(16),x(y(17,2,e.formData.Setup)),s(6),x(y(23,4,e.formData.Setup))}}function Xn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),h(3,"span",36),t(),i(4,"p")(5,"small",37),o(6),m(7,Yn,1,0),t()()(),i(8,"td",32),o(9),t(),i(10,"td",33),h(11,"span",36),o(12),b(13,"number"),t(),i(14,"td",34),o(15),t(),i(16,"td",33),h(17,"span",36),o(18),b(19,"number"),t()(),m(20,Kn,19,12,"tr"),m(21,Jn,24,6,"tr")),n&2){let e=d(3);s(3),u("innerHTML",e.formData.Type==1?"Starter Subscription":"Standard Subscription",G),s(3),S(" ",e.formData.Qty," Outlet"),s(),p(e.formData.Qty>1?7:-1),s(2),x(e.formData.Cycle),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(13,11,e.data.Options.Type)),s(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(19,13,e.outletFee)),s(2),p(e.formData.Register>0?20:-1),s(),p(e.data.Options.SetupFee?21:-1)}}function eo(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Sub Total"),t(),i(3,"td",39),o(4,":"),t(),i(5,"td",33)(6,"strong"),h(7,"span",36),o(8),b(9,"number"),t()()()),n&2){let e=d(4);s(7),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(9,2,e.subTotal))}}function to(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Tax (11%)"),t(),i(3,"td",39),o(4,":"),t(),i(5,"td",33)(6,"strong"),h(7,"span",36),o(8),b(9,"number"),t()()()),n&2){let e=d(4);s(7),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(9,2,e.subTotal*.11))}}function io(n,l){if(n&1&&(i(0,"div",35)(1,"table",38),m(2,eo,10,4,"tr"),m(3,to,10,4,"tr"),i(4,"tr")(5,"th"),o(6,"Total"),t(),i(7,"td",39),o(8,":"),t(),i(9,"td",33)(10,"strong"),h(11,"span",36),o(12),b(13,"number"),t()()()()()),n&2){let e=d(3);s(2),p(e.data.vatEnabled?2:-1),s(),p(e.data.vatEnabled?3:-1),s(8),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),S("",y(13,4,e.subTotal+(e.data.vatEnabled?e.subTotal*.11:0))," ")}}function no(n,l){if(n&1&&(i(0,"div",19)(1,"table",30)(2,"thead",31)(3,"tr")(4,"th"),o(5,"Product"),t(),i(6,"th",32),o(7,"Month"),t(),i(8,"th",33),o(9,"Price"),t(),i(10,"th",34),o(11,"Disc"),t(),i(12,"th",33),o(13,"Total"),t()()(),i(14,"tbody"),m(15,Xn,22,15),t()(),m(16,io,14,6,"div",35),t()),n&2){let e=d(2);s(15),p((e.formData==null?null:e.formData.Qty)>0?15:-1),s(),p((e.formData==null?null:e.formData.Qty)>0?16:-1)}}function oo(n,l){n&1&&(i(0,"div",6)(1,"div",26)(2,"h2"),o(3,'Your payment currency is "IDR"'),t()(),i(4,"div",19)(5,"div",40)(6,"div",41)(7,"h2",42)(8,"button",43),o(9," I Want to pay in USD "),t()(),i(10,"div",44)(11,"div",45)(12,"ol",46)(13,"li",47),o(14," Go to setup menu"),t(),i(15,"li",47),o(16," Click tab currency"),t(),i(17,"li",47),o(18," Select the currency you want to make for payment"),t(),i(19,"li",47),o(20," Select Yes at primary currency box and click save"),t(),i(21,"li",48),o(22," Then you can check to my subscribe again "),t()(),i(23,"p",49),o(24,"For more detailed information, please check the following article: "),i(25,"a",50),o(26,"Added Currency Conversion"),t()()()()()()()())}function ao(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1)(1,"actions")(2,"button",2),g("click",function(){_(e);let r=d();return C(r.onOpenSubscribeDialog())}),o(3,"Subscribe Now"),t()(),i(4,"content")(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"h2",9),o(12,"Subscribe "),t(),i(13,"small",10),o(14,"(Recurring)"),t()(),i(15,"a",11),g("click",function(){_(e);let r=d();return C(r.showRegister=!r.showRegister)}),o(16,"More"),t()(),i(17,"div",12)(18,"table",13)(19,"tr")(20,"th"),o(21,"Outlets"),t(),i(22,"td"),o(23,":"),t(),i(24,"td")(25,"input",14,0),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.Qty,r)||(c.formData.Qty=r),C(r)}),g("ngModelChange",function(){_(e);let r=d();return C(r.onQtyOutletChange())}),t(),i(27,"span"),o(28),b(29,"number"),t()()(),i(30,"tr")(31,"th"),o(32,"Cycle"),t(),i(33,"td"),o(34,":"),t(),i(35,"td"),V(36,qn,5,4,"div",15,N),t()(),m(38,zn,10,5,"tr"),t()()(),m(39,Qn,17,1,"div",6),t(),i(40,"div",16)(41,"div",6)(42,"div",17),g("click",function(){_(e);let r=d();return C(r.invoice=!r.invoice)}),i(43,"h2",18),o(44,"Invoice Preview"),t()(),m(45,no,17,2,"div",19),t(),m(46,oo,27,0,"div",6),t()()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("hideMenu",!0),s(2),u("disabled",e.formData.Qty==0),s(23),u("preventNegative",!0),w("ngModel",e.formData.Qty),s(3),S("/ ",y(29,12,e.data.Type[0].amount)),s(8),A(e.data.DiscountOptions),s(2),p(e.showRegister?38:-1),s(),p(e.data.Options.Setup?39:-1),s(6),p(e.invoice?45:-1),s(),p(e.data.Options.Setup?46:-1)}}var Ct=class n extends dt{constructor(e,a,r,c){super(e,a,"Subscription/MySubscriptionLoader",r);this.matDialog=c}showRegister=!1;invoice=!0;outletFee=0;registerFee=0;subTotal=0;postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(_t,{data:{form:this.formData}})}onCycleChange(e){switch(this.formData.Cycle=e,e){case 3:this.formData.Discount=0;break;case 6:this.formData.Discount=10;break;case 12:this.formData.Discount=15;break}this.calculateregisterFee(),this.calculate()}onQtyOutletChange(){this.calculate()}calculate(){if(this.formData.Cycle>1){let e=this.data.Options.Type*this.formData.Qty*this.formData.Cycle;this.data.Discount=e*this.formData.Discount/100,this.outletFee=this.data.Options.Type*this.formData.Qty*this.formData.Cycle-this.data.Discount,this.subTotal=this.outletFee+this.registerFee}else this.outletFee=this.data.Options.Type*this.formData.Qty,this.subTotal=this.outletFee+this.registerFee,this.data.Discount=0;this.data.Options.SetupFee&&(this.subTotal=this.subTotal+this.formData.Setup)}calculateSetupFee(){this.data.Options.SetupFee?(this.formData.SetupFee=!0,this.subTotal=this.subTotal+this.formData.Setup):(this.formData.SetupFee=!1,this.subTotal=this.subTotal-this.formData.Setup)}onQtyRegisterChange(){this.calculateregisterFee(),this.calculate()}calculateregisterFee(){let e=this.data.Options.Register*this.formData.Cycle*this.formData.Register;if(this.formData.Discount>0){let a=e*this.formData.Discount/100;this.registerFee=e-a}else this.registerFee=e}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(et),f(J))};static \u0275cmp=M({type:n,selectors:[["POS-choose-plan"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[["outletQty","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu"],[1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","bg-light-gray","pb-10"],[1,"row","pt-5"],[1,"col-md-5","m-0","pe-0","pt-0","pb-0"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"card-body",2,"padding-right","0.625rem"],[1,"table-sm"],["type","text","autoNum","",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"class"],[1,"col-md-7"],[1,"card-header",3,"click"],[1,"title"],[1,"card-body"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"click"],[1,"card-body","text-center",2,"cursor","pointer","width","80px","padding","10px 5px"],[1,"fw-bold"],[1,"fw-normal","border-top","border-dark",3,"innerHTML"],["matTooltipPosition","above","matTooltip","Additional Register"],["type","text","autoNum","","maxlength","3",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card-header"],[1,"form-horizontal"],[1,"form-check","form-check-inline",2,"cursor","pointer","padding-top","8px"],["name","POS",3,"modelChange","model"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"min-width","65px"],[1,"text-end"],[1,"text-end",2,"min-width","85px"],[1,"d-flex","justify-content-end"],[3,"innerHTML"],[2,"font-size","90% !important"],[1,"table-sm","table-borderless","me-3"],[1,"sep"],["id","accordionExample",1,"accordion"],[1,"accordion-item"],["id","panelsStayOpen-headingTwo",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#panelsStayOpen-collapseTwo","aria-expanded","false","aria-controls","panelsStayOpen-collapseTwo",1,"accordion-button","collapsed"],["id","panelsStayOpen-collapseTwo","aria-labelledby","panelsStayOpen-headingTwo",1,"accordion-collapse","collapse"],[1,"accordion-body","pt-2"],[1,"list-group","list-group-numbered","mt-5","mb-3"],[1,"list-group-item","mb-3","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"list-group-item","rounded-0","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"ms-2","mt-6"],["href","https://support.dealpos.com/en/articles/8956190-how-to-create-new-currency","target","_blank"]],template:function(a,r){a&1&&m(0,ao,47,14,"mainpanel-cmp",1),a&2&&p(r.data&&r.formData?0:-1)},dependencies:[Z,B,li,j,X,fi,Mi,Ce,_e],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})};var bt=class n{constructor(l,e,a){this.dialogRef=l;this.data=e;this.router=a;this.config.title=this.data.title,this.config.okText="Yes",this.config.cancelText="No"}config=new Q;onOk(){this.router.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"]),this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)(f(z),f(ie),f(he))};static \u0275cmp=M({type:n,selectors:[["POS-modal-choose-plan"]],standalone:!1,decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"text-center",2,"width","440px"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"h4",1),o(3),i(4,"span"),o(5,"Do you want to Choose your Plan ?"),t()()()()),e&2&&(u("config",a.config),s(3),S(" ",a.data.body," "))},dependencies:[Y],encapsulation:2})};var gt=class n{constructor(l,e,a,r){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.config.title="Confim Adjusted Subscription"}message="";config=new Q;onOk(){let l={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Confirm",l).subscribe(e=>{this.toastr.success(e.Message,F.Success),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-modal-confirm-adjusted-plan"]],standalone:!1,decls:8,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"font-weight","h4","mb-5"],[1,"form-floating-outline"],["name","address","id","inputAddress","placeholder","Address","matTooltipPosition","above","matTooltip","Address","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","inputAddress"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"p",1),o(3," Do you agree about billing adjusted? "),t(),i(4,"div",2)(5,"textarea",3),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(6,"label",4),o(7,"Reason"),t()()()()),e&2&&(u("config",a.config),s(5),w("ngModel",a.message))},dependencies:[Z,B,Oe,j,Y,Ce],encapsulation:2})};var Ve=class n{constructor(l,e,a,r){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.config.title="Stop Subscription",this.config.customWidth="450px"}message="";config=new Q;onOk(){let l={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",l).subscribe(e=>{this.toastr.success(e.Message,F.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-modal-stop-subscription"]],standalone:!1,decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","200px",3,"ngModelChange","ngModel"],["for","message"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"textarea",2),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(4,"label",3),o(5,"Reason"),t()()()()),e&2&&(u("config",a.config),s(3),w("ngModel",a.message))},dependencies:[Z,B,j,Y],encapsulation:2})};var Ae=class n{apiUrl="https://app.midtrans.com/snap/snap.js";injected=!1;initScript(){return new We(l=>{let e;this.injected||(e=document.createElement("script"),e.src=this.apiUrl,e.async=!0,e.setAttribute("data-client-key",je.midtransClientKey),this.injected=!0,document.body.appendChild(e))})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var ro=()=>["/menu/Profile/Main/My_Subscription/Choose_your_plan"],lo=(n,l)=>({"bg-warning":n,"bg-danger":l}),so=n=>({"background-color":n}),co=n=>({"bg-gradient-warning":n});function mo(n,l){n&1&&(i(0,"a",1),o(1,"Choose Your Plan"),t()),n&2&&u("routerLink",Ke(1,ro))}function po(n,l){if(n&1&&(i(0,"div",13),o(1),b(2,"date"),t()),n&2){let e=d(2);s(),S(" ",I(2,1,e.data.Zoho.Subscription.Since,"dd MMM yyyy")," ")}}function uo(n,l){if(n&1&&(i(0,"div",15)(1,"div",31)(2,"h5",12),o(3," Subscription "),t(),i(4,"div",13),o(5),t()()()),n&2){let e=d(2);s(),fe(Je(3,lo,e.data.Zoho.Subscription.SubscriptionState=="SellOnly"||e.data.Zoho.Subscription.SubscriptionState=="Overdue",e.data.Zoho.Subscription.SubscriptionState=="Suspended")),s(4),S(" ",e.data.Zoho.Subscription.SubscriptionState," ")}}function fo(n,l){if(n&1&&(i(0,"span",35),o(1),b(2,"number"),t()),n&2){let e=d(3);s(),S("",y(2,1,e.data.Zoho.Subscription.Discount)," %")}}function _o(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),b(3,"number"),t(),h(4,"br"),t()),n&2){let e=d(3);s(2),x(y(3,1,e.data.Zoho.Subscription.TotalAmount))}}function Co(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"h2"),o(3,"Current Plan"),t()(),i(4,"div",24)(5,"table",25)(6,"thead",26)(7,"tr")(8,"th",32),o(9,"Usage"),t(),i(10,"th",32),o(11,"Frequency"),t(),i(12,"th",33),o(13,"Amount"),t()()(),i(14,"tbody")(15,"tr")(16,"td",34),o(17),h(18,"br"),o(19),b(20,"number"),i(21,"small"),o(22,"month"),t(),o(23,") "),t(),i(24,"td",34)(25,"span"),o(26),h(27,"br"),t(),m(28,fo,3,3,"span",35),t(),i(29,"td",34),m(30,_o,5,3,"span"),i(31,"span"),o(32),b(33,"number"),t()()()()()()()),n&2){let e=d(2);s(17),S(" ",e.data.Zoho.Subscription.OutletCount," Outlet"),s(2),S(" (",y(20,6,e.data.Zoho.Subscription.RecurringAmount)," / "),s(7),x(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==1?"Monthly":e.data.Zoho.Subscription.Frequency==3?"3 Months":"6 Months"),s(2),p(e.data.Zoho.Subscription.Discount!=0?28:-1),s(2),p(e.data.Zoho.Subscription.Discount!=0?30:-1),s(2),x(y(33,8,e.data.Zoho.Subscription.TotalAfterDiscount))}}function bo(n,l){if(n&1&&(i(0,"span",35),o(1),b(2,"number"),t()),n&2){let e=d(3);s(),S("",y(2,1,e.data.Zoho.Subscription.Discount)," %")}}function go(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),b(3,"number"),t(),h(4,"br"),t()),n&2){let e=d(3);s(2),x(y(3,1,e.data.NextBilling.TotalAmount))}}function ho(n,l){if(n&1){let e=v();i(0,"div",5)(1,"div",6)(2,"div")(3,"h2"),o(4,"Adjusted Plan"),t()(),i(5,"div",36)(6,"button",37),g("click",function(){_(e);let r=d(2);return C(r.onOpenConfirmAdjustedModal())}),o(7," Confirm "),t()()(),i(8,"div",24)(9,"table",25)(10,"thead",26)(11,"tr")(12,"th",32),o(13,"Usage"),t(),i(14,"th",32),o(15,"Frequency"),t(),i(16,"th",33),o(17,"Amount"),t()()(),i(18,"tbody")(19,"tr")(20,"td",34),o(21),h(22,"br"),o(23),b(24,"number"),i(25,"small"),o(26,"month"),t(),o(27,") "),t(),i(28,"td",34)(29,"span"),o(30),h(31,"br"),t(),m(32,bo,3,3,"span",35),t(),i(33,"td",34),m(34,go,5,3,"span"),i(35,"span"),o(36),b(37,"number"),t()()()()()()()}if(n&2){let e=d(2);s(21),S(" ",e.data.NextBilling.Outlet," Outlet"),s(2),S(" (",y(24,6,e.data.NextBilling.RecurringAmount)," / "),s(7),x(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==3?"3 Monthly":"6 Months"),s(2),p(e.data.Zoho.Subscription.Discount!=0?32:-1),s(2),p(e.data.Zoho.Subscription.Discount!=0?34:-1),s(2),x(y(37,8,e.data.NextBilling.TotalAfterDiscount))}}function xo(n,l){if(n&1&&(i(0,"tr")(1,"th",40),o(2,"Withholding Tax"),t(),i(3,"td"),o(4,":"),t(),i(5,"td"),o(6),t()()),n&2){let e=d(3);s(6),S(" ",e.data.Zoho.WHTPercentage," % ")}}function So(n,l){if(n&1&&(i(0,"tr")(1,"th",40),o(2,"Document Link"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"a",41),h(7,"i",42),o(8," Upload "),t()()()),n&2){let e=d(3);s(6),u("href",Le(e.data.Zoho.DocumentLink),ge)}}function vo(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"h2"),h(3,"i",38),o(4,"Tax Information"),t()(),i(5,"div",8)(6,"table",39),m(7,xo,7,1,"tr"),m(8,So,9,2,"tr"),t()()()),n&2){let e=d(2);s(7),p(e.data.Zoho.WHTPercentage>0?7:-1),s(),p(e.data.Zoho.DocumentLink?8:-1)}}function yo(n,l){if(n&1){let e=v();i(0,"a",55),g("click",function(){_(e);let r=d(3);return C(r.payAllInvoice())}),h(1,"i",56),o(2),b(3,"Filter"),b(4,"sum"),b(5,"Filter"),b(6,"sum"),b(7,"number"),t()}if(n&2){let e=d(3);s(2),S(" Pay All ~ IDR ",y(7,15,I(4,5,Ee(3,1,e.data.Zoho.invoices,"overdue","status"),"total")+I(6,12,Ee(5,8,e.data.Zoho.invoices,"sent","status"),"total"))," ")}}function Mo(n,l){if(n&1&&(i(0,"p",57),o(1),b(2,"number"),t()),n&2){let e=d().$implicit;s(),S("(",y(2,1,e.balance)," due)")}}function wo(n,l){if(n&1&&(i(0,"a",60),h(1,"i",62),i(2,"span",63),o(3,"View"),t()()),n&2){let e=d().$implicit;u("href",Le(e.invoice_url),ge)}}function To(n,l){if(n&1){let e=v();i(0,"button",64),g("click",function(){_(e);let r=d().$implicit,c=d(3);return C(c.paySingleInvoice(r))}),h(1,"i",56),i(2,"span",63),o(3,"Pay Now"),t()()}if(n&2){let e=d().$implicit;u("id",Yt("pay-button",e.invoice_number))}}function Do(n,l){if(n&1&&(i(0,"tr",30)(1,"td"),o(2),t(),i(3,"td"),o(4),b(5,"date"),t(),i(6,"td"),o(7),t(),i(8,"td",50),o(9),b(10,"number"),m(11,Mo,3,3,"p",57),t(),i(12,"td"),o(13),t(),i(14,"td",58),o(15),t(),i(16,"td",59),m(17,wo,4,2,"a",60),m(18,To,4,2,"button",61),t()()),n&2){let e=l.$implicit,a=l.$index;Ye(R(16,so,e.status=="overdue"?"#f2dede":"")),s(2),x(a+1+"."),s(2),x(I(5,11,e.date,"dd MMM yyyy")),s(3),x(e.invoice_number),s(2),S(" ",y(10,14,e.total)," "),s(2),p(e.total!=e.balance&&e.balance>0?11:-1),s(2),x(e.currency_code),s(2),x(e.status),s(2),p(e.status!="draft"&&e.status!="void"?17:-1),s(),p((e.status=="sent"||e.status=="overdue")&&e.currency_code=="IDR"?18:-1)}}function Eo(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"div",43)(3,"h2",44),h(4,"i",45),o(5," Invoices"),t()(),m(6,yo,8,17,"a",46),t(),i(7,"div",24)(8,"table",47)(9,"thead",26)(10,"tr")(11,"th",27),o(12,"No"),t(),i(13,"th",48),o(14,"Date"),t(),i(15,"th",49),o(16,"Number"),t(),i(17,"th",50),o(18,"Amount"),t(),h(19,"th",51),i(20,"th",52),o(21,"Status"),t(),i(22,"th"),o(23,"Invoice"),t()()(),i(24,"tbody"),V(25,Do,19,18,"tr",53,N),t()(),i(27,"p",54),o(28," Please pay your biling directly inside our platform. We provide multiple methods ex: Credit Card/Bank Transfer/E-Money. "),t()()()),n&2){let e=d(2);s(6),p(e.outstandingInvoiceCount>1&&e.data.Zoho.Subscription.Currency=="RP"?6:-1),s(19),A(e.data.Zoho.invoices)}}function Po(n,l){if(n&1){let e=v();i(0,"button",65),g("click",function(){_(e);let r=d(2);return C(r.load())}),o(1," Load "),t()}}function Io(n,l){if(n&1&&(i(0,"tr",30)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",50),o(6),b(7,"number"),t(),i(8,"td",50),o(9),t(),i(10,"td",50),o(11),b(12,"date"),t(),i(13,"td",50),o(14),b(15,"date"),t()()),n&2){let e=l.$implicit,a=l.$index;s(2),x(a+1+"."),s(2),x(e.Name),s(),fe(R(16,co,e.OrdersCount<25)),s(),S(" ",y(7,8,e.OrdersCount)),s(3),x(e.RegisterCount),s(2),x(I(12,10,e.MinDate,"dd MMM yyyy")),s(3),x(I(15,13,e.MaxDate,"dd MMM yyyy"))}}function Oo(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",0)(1,"actions"),m(2,mo,2,2,"a",1),t(),i(3,"content")(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"h2"),h(10,"i",7),o(11," Account"),t()(),i(12,"div",8)(13,"div",9)(14,"div",10)(15,"div",11)(16,"h5",12),o(17," Since "),t(),m(18,po,3,4,"div",13),t()(),i(19,"div",14)(20,"div",11)(21,"h5",12),o(22," Type "),t(),i(23,"div",13),o(24),t()()(),m(25,uo,6,6,"div",15),t()()(),m(26,Co,34,10,"div",5),m(27,ho,38,10,"div",5),m(28,vo,9,2,"div",5),i(29,"div",5)(30,"div",6)(31,"h2"),h(32,"i",16),o(33," Close Store"),t()(),i(34,"div",8)(35,"div"),o(36," You can close your store to stop your billing. "),t(),i(37,"div",17)(38,"button",18),g("click",function(){_(e);let r=d();return C(r.onOpenCloseModal())}),o(39," Close "),t()()()()(),i(40,"div",19),m(41,Eo,29,1,"div",5),i(42,"div",5)(43,"div",20)(44,"h2"),h(45,"i",21),o(46," Outlets Usage "),i(47,"small",22),o(48),b(49,"date"),b(50,"date"),t()(),m(51,Po,2,0,"button",23),t(),i(52,"div",24)(53,"table",25)(54,"thead",26)(55,"tr")(56,"th",27),o(57,"No"),t(),i(58,"th"),o(59,"Outlet Name"),t(),i(60,"th",28),o(61,"Orders"),t(),i(62,"th",28),o(63,"Registers"),t(),i(64,"th",29),o(65,"Min Date"),t(),i(66,"th",29),o(67,"Max Date"),t()()(),i(68,"tbody"),V(69,Io,16,18,"tr",30,N),b(71,"sortBy"),t()()()()()()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p(e.data.Account.Type=="Trial"?2:-1),s(16),p(e.data.Zoho.Subscription?18:-1),s(6),S(" ",e.data.Account.Type," "),s(),p(e.data.Zoho.CustomerID!=null?25:-1),s(),p(e.data.Zoho.Subscription!=null?26:-1),s(),p(e.data.Zoho.Subscription!=null&&e.data.NextBilling&&e.data.Billed>e.data.Zoho.Subscription.OutletCount?27:-1),s(),p(e.data.Zoho.WHTPercentage>0||e.data.Zoho.DocumentLink?28:-1),s(13),p(e.data.Zoho.invoices&&e.data.Zoho.invoices.length>0?41:-1),s(7),De("(",I(49,14,e.data.From,"dd MMM yyyy")," - ",I(50,17,e.data.To,"dd MMM yyyy"),")"),s(3),p(e.data.Outlets.length==0?51:-1),s(18),A(Ee(71,20,e.data.Outlets,"desc","OrdersCount"))}}var ht=class n extends pi{constructor(e,a,r,c,P,q){super(e);this.httpService=a;this.matDialog=r;this.midtrans=c;this.ngZone=P;this.toastr=q;this.data=null}modalTitle;modalBody;data;loadOutlet=!1;outstandingInvoiceCount=0;ngOnInit(){this.midtrans.initScript().subscribe(),this.menuData$.subscribe(()=>{this.getData()})}getData(){let e={LoadOutlet:this.loadOutlet};this.httpService.post("/API/Subscription/GetData",e).subscribe({next:a=>{this.data=a,W.IsEmpty(this.data.Outlets)&&(this.data.Outlets=[]),this.postInit(a)}})}postInit(e){e.Zoho.invoices=e.Zoho.invoices?e.Zoho.invoices:[],e.Zoho.code!=200&&(e.Zoho.code==401?this.modalTitle="Trial Customer":e.Zoho.code==400&&(this.modalTitle="your account customer"),e.Zoho.message==null?this.modalBody=e.Zoho.message:this.modalBody=e.Zoho.message,this.matDialog.open(bt,{data:{title:this.modalTitle,body:this.modalBody}})),e.Zoho.invoices.forEach(a=>{(a.status=="sent"||a.status=="overdue")&&this.outstandingInvoiceCount++})}showToaster(e){var a="Payment Successful!";e>1&&(a+=`
3
3
  Please Log out and re-login if your account is currently suspended!`),this.toastr.success(a,F.Success)}payAllInvoice(){let e=0,a,r,c,P;this.data.Zoho.invoices.forEach(O=>{(O.status=="sent"||O.status=="overdue")&&(e+=O.total,r==null?(a=O.invoice_number,r=O.invoice_number.concat("$"+O.total+";"),c=O.invoice_id,P=O.invoice_id.concat("$"+O.total+";")):(a=a.concat("_"+O.invoice_number),r=r.concat(O.invoice_number.concat("$"+O.total+";")),c=c.concat(";"+O.invoice_id),P=P.concat(O.invoice_id.concat("$"+O.total)+";")))});let q={CustomerID:this.data.Zoho.invoices[0].customer_id,InvNumber:r,OrderID:a,GrossAmount:e,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:P};this.httpService.post("/API/Subscription/GetSNAPTokenMultipleInvoice",q).subscribe(O=>{this.openSNAPDialog(O)})}paySingleInvoice(e){let a={InvNumber:e.invoice_number,GrossAmount:e.balance,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:e.invoice_id,CustomerID:e.customer_id};this.httpService.post("/API/Subscription/GetSNAPToken",a).subscribe(r=>{this.openSNAPDialog(r)})}openSNAPDialog(e){let a=this.data.Account.SubscriptionStatus;snap.pay(e.token,{onSuccess:r=>{this.ngZone.run(()=>{this.showToaster(a),this.getData()})}})}onOpenCloseModal(){this.matDialog.open(Ve)}onOpenConfirmAdjustedModal(){this.matDialog.open(gt)}load(){this.loadOutlet=!0,this.getData()}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(J),f(Ae),f(qe),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-my-subscription"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success",3,"routerLink"],[1,"container-fluid","bg-light-gray"],[1,"row","pt-5","ms-3"],[1,"col-md-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-user"],[1,"card-body"],[1,"row"],[1,"col","pe-0","ps-3"],[1,"p-3","border","rounded","bg-light-gray","text-black"],[1,"fw-bold"],[1,"mt-4","h6"],[1,"col","pe-3","ps-3"],[1,"col","ps-0","pe-3"],[1,"fa-solid","fa-xmark-circle"],[1,"mt-4"],["type","button",1,"btn","btn-sm","btn-danger","py-2",3,"click"],[1,"col-md-8"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa","fa-location-dot"],[1,"text-body-secondary","h6"],[1,"btn","btn-outline-secondary"],[1,"card-body","table-responsive"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[2,"width","20px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","120px"],[1,"border"],[1,"p-3","border","rounded","bg-success","text-white"],[1,"text-center"],[1,"text-center",2,"width","104px"],[1,"text-center","align-top"],[1,"text-danger"],[1,"btn-group"],["type","button",1,"btn","btn-sm","btn-success","py-2",3,"click"],[1,"fa-solid","fa-file-circle-plus"],[1,"table-sm","table-borderless"],[2,"width","103px"],["target","_blank",1,"btn","btn-light","btn-sm",2,"height","32px",3,"href"],[1,"fa","fa-upload"],[1,"me-auto","d-sm-block"],[1,"d-inline"],[1,"fa-solid","fa-file-invoice"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm"],["id","tableGrid",1,"table","mt-5"],[2,"width","120px"],[2,"width","100px"],[1,"text-end"],[2,"width","60px"],[2,"width","80px"],[1,"border",3,"style"],[1,"pt-3"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm",3,"click"],[1,"fa-lg","fa-solid","fa-arrows-rotate"],[1,"fst-italic","text-warning"],[1,"text-uppercase"],[1,"d-flex","justify-content-between"],["target","_blank",3,"href"],[2,"border-width","1px",3,"id"],[1,"fa-lg","fa-solid","fa-file-lines"],[1,"ms-3"],[2,"border-width","1px",3,"click","id"],[1,"btn","btn-outline-secondary",3,"click"]],template:function(a,r){a&1&&m(0,Oo,72,24,"mainpanel-cmp",0),a&2&&p(r.data?0:-1)},dependencies:[Pe,X,Ce,_e,U,lt,hi,st],encapsulation:2})};function ko(n,l){n&1&&(i(0,"div",10)(1,"h5",12),h(2,"i",13),o(3," You are not listening to any outlet. Please select one. "),t()())}function Fo(n,l){if(n&1&&(i(0,"div",11)(1,"h5",12),h(2,"i",13),o(3),t()()),n&2){let e=d(2);s(3),S(" You are currently listening to ",e.selectedOutlet==null?null:e.selectedOutlet.Name,". ")}}function No(n,l){if(n&1&&(i(0,"div",2)(1,"div",9),m(2,ko,4,0,"div",10),m(3,Fo,4,1,"div",11),t()()),n&2){let e=d();s(2),p(e.selectedOutlet?-1:2),s(),p(e.selectedOutlet?3:-1)}}var xt=class n{constructor(l,e,a,r){this.signalrClientService=l;this.httpService=e;this.dialogRef=a;this.toastr=r;this.modalConfig=new Q,this.modalConfig.title="Subscribe Notification",this.modalConfig.customWidth="475px",this.initModalLoader(),this.touchOnSelectOption=!1}modalConfig;entities;outletID;selectedOutlet;initialOutlet;touchOnSelectOption;previousSelectedOutlet;initModalLoader(){this.httpService.post("/api/NotificationLoader/PushNotificationList").pipe(de(l=>W.IsNotEmpty(l))).subscribe(l=>{this.entities=l.Options.Entities,W.IsNotEmpty(l.SubscribeOn)&&(this.outletID=l.SubscribeOn),this.initSelectedOutlet()})}initSelectedOutlet(){this.selectedOutlet=this.findOutletByID(this.outletID),this.previousSelectedOutlet=this.selectedOutlet,this.initialOutlet=this.selectedOutlet,this.checkValidateButtonOk()}checkValidateButtonOk(){this.modalConfig.validated=!0,W.IsEmpty(this.selectedOutlet)&&(this.modalConfig.validated=!1)}onSelectOutlet(l){this.previousSelectedOutlet=this.selectedOutlet,this.selectedOutlet=l,this.modalConfig.validated=!0}onOpenSelectOutlet(){this.touchOnSelectOption=!0}onCancel(){this.dialogRef.close()}onOk(){let l=this.initialOutlet?this.initialOutlet.ID:null;this.outletID!==l?W.IsNotEmpty(this.outletID)?this.subscribeToPushNotification(`Listening to ${this.selectedOutlet?.Name}`,"Push Notification Enabled"):this.unsubscribeToPushNotification():this.dialogRef.close()}unsubscribeToPushNotification(){this.subscribeToPushNotification(`You are no longer listening to ${this.previousSelectedOutlet?.Name}`,"Push Notification Disabled"),this.setLocalStorage(!0)}subscribeToPushNotification(l,e){let a=localStorage.getItem("PushNotificationID"),r={EntityID:this.outletID};this.httpService.post("/api/PushNotification/Subscribe",r).subscribe(c=>{this.signalrClientService.SubscribeGroup(this.outletID?this.outletID:"",a),this.setLocalStorage(),this.toastr.success(l,e),this.dialogRef.close()})}setLocalStorage(l=!1){l?localStorage.removeItem("NotificationOutletID"):localStorage.setItem("NotificationOutletID",this.outletID)}findOutletByID(l){return this.entities.find(a=>a.ID==l)}static \u0275fac=function(e){return new(e||n)(f(oi),f(E),f(z),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-modal-subscribe-notification"]],standalone:!1,decls:11,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container"],[1,"row"],[1,"row","mt-1"],[1,"col-md-2"],[1,"pt-10"],[1,"col-md-10"],[1,"form-floating-outline","selected"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Options","id","outlet",1,"productform",3,"open","clear","ngModelChange","change","items","ngModel"],[1,"col-12"],[1,"alert","alert-danger"],[1,"alert","alert-success"],[1,"d-flex"],["aria-hidden","true",1,"fa-solid","fa-circle-info","me-3","mt-1"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()})("onClose",function(){return a.onCancel()}),i(1,"content")(2,"div",1),m(3,No,4,2,"div",2),i(4,"div",3)(5,"div",4)(6,"h5",5),o(7,"Outlet"),t()(),i(8,"div",6)(9,"div",7)(10,"ng-select",8),g("open",function(){return a.onOpenSelectOutlet()})("clear",function(){return a.onOpenSelectOutlet()}),D("ngModelChange",function(c){return T(a.outletID,c)||(a.outletID=c),c}),g("change",function(c){return a.onSelectOutlet(c)}),t()()()()()()()),e&2&&(u("config",a.modalConfig),s(3),p(a.touchOnSelectOption?-1:3),s(7),u("items",a.entities),w("ngModel",a.outletID))},dependencies:[B,j,Y,ve],encapsulation:2})};var Ao=n=>({ID:n});function Bo(n,l){if(n&1&&(i(0,"a",15),o(1),t()),n&2){let e=d().$implicit;u("routerLink","/menu"+e.URL)("queryParams",R(3,Ao,e.ObjectID)),s(),S(" ",e.Body," ")}}function Ro(n,l){if(n&1&&(i(0,"a",16),o(1),t()),n&2){let e=d().$implicit;u("href",Le(e.URL),ge),s(),S(" ",e.Body," ")}}function Lo(n,l){if(n&1&&(i(0,"tr",13)(1,"td"),o(2),t(),i(3,"td")(4,"b"),o(5),t(),h(6,"br"),i(7,"span"),m(8,Bo,2,5,"a",15),m(9,Ro,2,3,"a",16),t()(),i(10,"td"),o(11),b(12,"date"),t(),i(13,"td"),o(14),t()()),n&2){let e=l.$implicit;s(2),x(e.OutletName),s(3),x(e.Header),s(3),p(e.ObjectIDType>0?8:-1),s(),p(e.ObjectIDType==0?9:-1),s(2),x(I(12,6,e.Created,"dd MMM yyyy HH:mm")),s(3),x(e.TypeString)}}function jo(n,l){if(n&1){let e=v();i(0,"mat-paginator",17),g("page",function(r){_(e);let c=d(2);return C(c.onPaginationChange(r))}),t()}if(n&2){let e=d(2);u("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Ho(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1),g("onSubmit",function(){_(e);let r=d();return C(r.searchFromPageOne())}),i(1,"actions")(2,"a",2),g("click",function(){_(e);let r=d();return C(r.openSubscribeModal())}),o(3,"Subscribe"),t()(),i(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),o(9,"Outlet"),t(),i(10,"ng-select",5),D("ngModelChange",function(r){_(e);let c=d();return T(c.pageData.Filter.ListIDs,r)||(c.pageData.Filter.ListIDs=r),C(r)}),t()(),i(11,"div")(12,"h6"),o(13,"From"),t(),i(14,"datepicker",6),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.From,r)||(c.pageData.Filter.From=r),C(r)}),t()(),i(15,"div")(16,"h6"),o(17,"To"),t(),i(18,"datepicker",7),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.To,r)||(c.pageData.Filter.To=r),C(r)}),t()()()()(),i(19,"content")(20,"div",8)(21,"table",9)(22,"thead",10)(23,"tr",11)(24,"th",12),o(25,"Outlet"),t(),i(26,"th"),o(27,"Message"),t(),i(28,"th"),o(29,"Created"),t(),i(30,"th"),o(31,"Type"),t()()(),i(32,"tbody"),V(33,Lo,15,9,"tr",13,N),t()(),i(35,"div"),m(36,jo,1,3,"mat-paginator",14),t()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0),s(10),u("items",e.pageData.Options.Entities),w("ngModel",e.pageData.Filter.ListIDs),u("multiple",!0),s(4),w("date",e.pageData.Filter.From),s(4),w("date",e.pageData.Filter.To),s(15),A(e.data.Data),s(3),p(e.pagination.listTotal>0?36:-1)}}var St=class n extends ke{constructor(e,a,r){super(e,a,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList");this.dialog=r}preInitList(){let e=new Date;e.setHours(0,0,0,0);let a=new Date;a.setHours(23,59,59,59),this.pageData.Filter.From=e,this.pageData.Filter.To=a}openSubscribeModal(){this.dialog.open(xt)}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(J))};static \u0275cmp=M({type:n,selectors:[["POS-notification"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],["role","button",1,"btn","btn-success",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel","multiple"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","200px"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],[3,"page","length","pageSize","pageIndex"]],template:function(a,r){a&1&&m(0,Ho,37,8,"mainpanel-cmp",0),a&2&&p(r.data?0:-1)},dependencies:[B,j,Pe,X,at,Fe,ve,U],encapsulation:2})};var le=class n{_loadSubscriptionData=new Ue(null);loadSubscriptionData$=this._loadSubscriptionData.asObservable();subscriptionData$;lastUnpaidInvoiceDate$;constructor(l){this.subscriptionData$=this.loadSubscriptionData$.pipe(ee(()=>l.get("/API/Subscription/GetInitialData").pipe($e(e=>{let a=0;e.Subscription?.SubscriptionState=="Overdue"?a=1:e.Subscription?.SubscriptionState=="Sell Only"?a=2:e.Subscription?.SubscriptionState=="Suspended"&&(a=3),W.IsNotEmpty(e.Subscription)&&(e.Subscription.SubscriptionStatus=a)}))),Ze(1)),this.lastUnpaidInvoiceDate$=this.subscriptionData$.pipe(se(e=>e.invoices.filter(a=>(a.status=="sent"||a.status=="overdue")&&a.currency_code=="IDR")),se(e=>e.length>0?e[0].date:"-"))}loadSubscriptionData(){this._loadSubscriptionData.next()}static \u0275fac=function(e){return new(e||n)(oe(E))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var Be=class n{constructor(l,e){l.subscriptionData$.pipe(de(r=>r.code!=200),ee(()=>Zt(e.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"])))).subscribe()}static \u0275fac=function(e){return new(e||n)(oe(le),oe(he))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var Me=class n{outlets$;from$;to$;_isLoadOutlet=new Ue(!1);isLoadOutlet$=this._isLoadOutlet.asObservable().pipe(de(l=>l));showLoadButton$;constructor(l,e){let a=this.isLoadOutlet$.pipe(ee(()=>l.post("/API/Subscription/GetUsage").pipe()),Ze(1));this.outlets$=a.pipe(se(r=>r.Outlets)),this.from$=a.pipe(se(r=>r.From)),this.to$=a.pipe(se(r=>r.To)),e.subscriptionData$.pipe(de(r=>r.Subscription?.OutletCount<=je.outletMaximumSubscription),$e(()=>this.loadOutlet())).subscribe(),this.showLoadButton$=$t(e.subscriptionData$.pipe(se(r=>r.Subscription?.OutletCount>je.outletMaximumSubscription),Gt(1)),a.pipe(se(()=>!1)))}loadOutlet(){this._isLoadOutlet.next(!0)}static \u0275fac=function(e){return new(e||n)(oe(E),oe(le))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var yt=class n{constructor(l,e,a){this.http=l;this.ngZone=e;this.toastr=a}payInvoice(l,e,a,r){let c={InvNumber:l.invoice_number,GrossAmount:l.balance,WHTPercentage:e,VATEnabled:a,InvoiceID:l.invoice_id,CustomerID:l.customer_id};return this.http.post("/API/Subscription/GetSNAPToken",c).pipe(ee(P=>this.openSNAPDialog(P,r)))}payAllInvoices(l,e,a,r){let c=0,P,q,O,pe;l.forEach($=>{($.status=="sent"||$.status=="overdue")&&(c+=$.total,q==null?(P=$.invoice_number,q=$.invoice_number.concat("$"+$.total+";"),O=$.invoice_id,pe=$.invoice_id.concat("$"+$.total+";")):(P=P.concat("_"+$.invoice_number),q=q.concat($.invoice_number.concat("$"+$.total+";")),O=O.concat(";"+$.invoice_id),pe=pe.concat($.invoice_id.concat("$"+$.total)+";")))});let Re={CustomerID:l[0].customer_id,InvNumber:q,OrderID:P,GrossAmount:c,WHTPercentage:e,VATEnabled:a,InvoiceID:pe};return this.http.post("/API/Subscription/GetSNAPTokenMultipleInvoice",Re).pipe(ee($=>this.openSNAPDialog($,r)))}openSNAPDialog(l,e){let a=e;return new We(r=>{snap.pay(l.token,{onSuccess:()=>{this.ngZone.run(()=>{this.showToaster(a),r.next(),r.complete()})}})})}showToaster(l){let e="Payment Successful!";l>1&&(e+=`
4
4
  Please Log out and re-login if your account is currently suspended!`),this.toastr.success(e,F.Success)}static \u0275fac=function(e){return new(e||n)(oe(E),oe(qe),oe(L))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var Zo=n=>({"background-color":n});function $o(n,l){if(n&1){let e=v();i(0,"button",10),g("click",function(){_(e);let r=d();return C(r.payAllInvoices())}),o(1),b(2,"number"),t()}if(n&2){let e=d();s(),S("PAY ALL - ",e.currency+" "+y(2,1,e.totalPayable))}}function Go(n,l){if(n&1&&(i(0,"a",15),o(1),t()),n&2){let e=d().$implicit;u("href",e.invoice_url,ge),s(),x(e.invoice_number)}}function qo(n,l){if(n&1&&(i(0,"span"),o(1),t()),n&2){let e=d().$implicit;s(),x(e.invoice_number)}}function zo(n,l){if(n&1){let e=v();i(0,"button",21),g("click",function(){_(e);let r=d().$implicit,c=d();return C(c.payInvoice(r))}),o(1,"Pay"),t()}}function Qo(n,l){if(n&1&&(i(0,"button",20),o(1),t()),n&2){let e=d().$implicit;s(),x(e.status)}}function Yo(n,l){if(n&1&&(i(0,"div",11)(1,"div",12)(2,"div",13)(3,"h3",14),m(4,Go,2,2,"a",15)(5,qo,2,1,"span"),t(),i(6,"small",5),o(7),b(8,"date"),t(),i(9,"small",16),o(10),b(11,"date"),t()(),i(12,"div",17)(13,"span",18),o(14),b(15,"number"),t(),m(16,zo,2,0,"button",19)(17,Qo,2,1,"button",20),t()()()),n&2){let e=l.$implicit,a=d();Ye(R(16,Zo,e.status=="overdue"?"#f2dede":"")),s(4),p(e.invoice_url?4:5),s(3),S("Invoice Date: ",I(8,8,e.date,"dd MMM yyyy")),s(3),S("Due Date: ",I(11,11,e.date,"dd MMM yyyy")),s(4),De("",a.currency," ",y(15,14,e.total)),s(2),p(e.status=="sent"||e.status=="overdue"?16:17)}}var Mt=class n{constructor(l,e,a){this.payment=l;this.subscription=e;this.router=a}showPayAll=!0;totalPayable=0;get invoices(){return this._invoices}set invoices(l){W.IsNotEmpty(l)&&(this._invoices=l,this.showPayAll=l.filter(e=>e.status=="sent"||e.status=="overdue"&&e.currency_code=="IDR").length>1,this.totalPayable=l.filter(e=>e.status=="sent"||e.status=="overdue"&&e.currency_code=="IDR").reduce((e,a)=>e+a.total,0))}_invoices=[];WHTPercentage;VATEnabled;subscriptionStatus;currency;payAllInvoices(){this.payment.payAllInvoices(this.invoices,this.WHTPercentage,this.VATEnabled,this.subscriptionStatus).subscribe(()=>this.subscription.loadSubscriptionData())}payInvoice(l){this.currency=="USD"?window.open(l.invoice_url,"_blank"):this.payment.payInvoice(l,this.WHTPercentage,this.VATEnabled,this.subscriptionStatus).subscribe(()=>this.subscription.loadSubscriptionData())}static \u0275fac=function(e){return new(e||n)(f(yt),f(le),f(he))};static \u0275cmp=M({type:n,selectors:[["POS-invoices-card"]],inputs:{invoices:"invoices",WHTPercentage:"WHTPercentage",VATEnabled:"VATEnabled",subscriptionStatus:"subscriptionStatus",currency:"currency"},standalone:!1,decls:14,vars:3,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between",2,"padding-left","15px"],[1,"d-flex","align-items-center"],[1,"fa-solid","fa-file-invoice","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-primary","btn-pay"],[1,"card-body","px-0"],[1,"row","gx-0"],[1,"invoice-list","col-12",2,"padding","0px 15px",3,"style"],[1,"btn","btn-sm","btn-outline-primary","btn-pay",3,"click"],[1,"invoice-list","col-12",2,"padding","0px 15px"],[1,"py-10","border-top","d-flex","justify-content-between"],[1,"invoice-info"],[1,"fw-normal"],["target","_blank",3,"href"],[1,"sub-text"],[1,"invoice-payment","text-end","d-flex","flex-column","justify-content-between"],[1,"d-block","invoice-total"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2"],["disabled","",1,"btn","btn-sm","btn-outline-secondary","btn-pay","text-uppercase","py-2"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2",3,"click"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),h(3,"i",3),i(4,"div")(5,"h3",4),o(6,"Invoices"),t(),i(7,"small",5),o(8,"Invoice are created for each subscription cycle."),t()()(),m(9,$o,3,3,"button",6),t(),i(10,"div",7)(11,"div",8),V(12,Yo,18,18,"div",9,N),t()()()),e&2&&(s(9),p(a.showPayAll&&a.currency!="USD"?9:-1),s(),Qe("pb-0",a.invoices.length==1),s(2),A(a.invoices))},dependencies:[_e,U],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-pay[_ngcontent-%COMP%]{min-width:140px}.invoice-total[_ngcontent-%COMP%]{font-size:14.5px}"]})};var wt=class n{subscribedSince;outlets;frequency;total;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["POS-billing-info-card"]],inputs:{subscribedSince:"subscribedSince",outlets:"outlets",frequency:"frequency",total:"total"},standalone:!1,decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"card-body"],[1,"bill-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Billing Information"),t(),i(5,"small",2),o(6),b(7,"date"),t()()(),i(8,"div",3)(9,"div",4)(10,"div")(11,"h3",5),o(12),t(),i(13,"h5",6),o(14,"Outlet"),t()(),h(15,"div",7),i(16,"div")(17,"h3",5),o(18),t(),i(19,"h5",6),o(20,"Frequency"),t()(),h(21,"div",7),i(22,"div")(23,"h3",5),o(24),b(25,"number"),t(),i(26,"h5",6),o(27,"Amount"),t()()()()()),e&2&&(s(6),S("Subscribe Since: ",I(7,4,a.subscribedSince,"dd MMM yyyy")),s(6),x(a.outlets),s(6),S("",a.frequency," Month"),s(6),x(y(25,7,a.total)))},dependencies:[_e,U],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media (max-width: 576px){.bill-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}"]})};var jt=n=>({"is-invalid":n});function Xo(n,l){n&1&&(i(0,"div",7),o(1,"Email is required."),t())}function ea(n,l){n&1&&(i(0,"div",7),o(1,"Phone is required."),t())}function ta(n,l){n&1&&h(0,"div",7)}var Tt=class n{constructor(l,e,a){this.dialogRef=l;this.toastr=a;this.config.title="Update Billing Contact",this.config.customWidth="500px",this.email=e.email,this.phone=e.phone,this.mobilePhone=e.mobilePhone}email;phone="";mobilePhone="";form;fb=we(si);data=we(ie);config=new Q;generateForm(){this.form=this.fb.group({email:this.fb.control(null,[At.required]),phone:this.fb.control(null,[At.required]),mobilePhone:this.fb.control(null,[])})}ngOnInit(){this.generateForm(),this.form.patchValue({email:this.data.email,phone:this.data.phone,mobilePhone:this.data.mobilePhone})}ok(){let{email:l,phone:e,mobilePhone:a}=this.form.value;this.dialogRef.close({email:l,phone:e,mobilePhone:a})}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)(f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-dialog-update-billing"]],standalone:!1,decls:25,vars:15,consts:[[3,"onOk","onCancel","onClose","config","dynamicValidated"],[3,"formGroup"],[1,"mb-3","row"],["for","email",1,"col-4","fs-4"],[1,"text-danger","ms-2"],[1,"col"],["type","text","formControlName","email","id","email",1,"form-control","rounded",3,"ngClass"],["id","",1,"invalid-feedback"],["for","phone",1,"col-4","fs-4"],["formControlName","phone","type","text","id","phone",1,"form-control","rounded",3,"ngClass"],["for","mobilePhone",1,"col-4","fs-4"],["formControlName","mobilePhone","type","text","id","mobilePhone",1,"form-control","rounded",3,"ngClass"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),i(1,"content")(2,"form",1)(3,"div",2)(4,"label",3),o(5,"Email"),i(6,"sup",4),o(7,"*"),t()(),i(8,"div",5),h(9,"input",6),m(10,Xo,2,0,"div",7),t()(),i(11,"div",2)(12,"label",8),o(13,"Phone"),i(14,"sup",4),o(15,"*"),t()(),i(16,"div",5),h(17,"input",9),m(18,ea,2,0,"div",7),t()(),i(19,"div",2)(20,"label",10),o(21,"Mobile Phone"),t(),i(22,"div",5),h(23,"input",11),m(24,ta,1,0,"div",7),t()()()()()),e&2&&(u("config",a.config)("dynamicValidated",a.form.valid),s(2),u("formGroup",a.form),s(7),u("ngClass",R(9,jt,a.form.controls.email.invalid&&(a.form.controls.email.dirty||a.form.controls.email.touched))),s(),p(a.form.controls.email.errors!=null&&a.form.controls.email.errors.required?10:-1),s(7),u("ngClass",R(11,jt,a.form.controls.phone.invalid&&(a.form.controls.phone.dirty||a.form.controls.phone.touched))),s(),p(a.form.controls.phone.errors!=null&&a.form.controls.phone.errors.required?18:-1),s(5),u("ngClass",R(13,jt,a.form.controls.mobilePhone.invalid&&(a.form.controls.mobilePhone.dirty||a.form.controls.mobilePhone.touched))),s(),p(a.form.controls.mobilePhone.errors?24:-1))},dependencies:[Xe,Se,Z,B,xe,ai,ri,Y],styles:["form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:2.5rem;border-radius:2px}form[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:invalid:focus, .form-control.is-invalid[_ngcontent-%COMP%]:focus{box-shadow:none}"]})};var Dt=class n{constructor(l,e,a,r){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.config.title="Pause Subscription",this.config.customWidth="480px"}message="";month=1;config=new Q;onOk(){let l={Month:this.month,Reason:this.message};if(this.message.trim().length==0){this.toastr.error("The reason cannot be empty",F.Error);return}this.month==0&&this.toastr.error("Month must be bigger than zero",F.Error),this.httpService.post("/api/subscription/pause",l).subscribe(e=>{this.toastr.success(e.Message,F.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-dialog-pause-subscription"]],decls:15,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"],[1,"form-floating-outline","mt-5"],["type","text","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","message"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","220px",3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"h6",1),o(3,"Your data will be retained but you will lose access until renewal is made"),t(),h(4,"br"),i(5,"h4",1),o(6,"How long would you like to pause your subscription? "),t(),i(7,"div",2)(8,"input",3),D("ngModelChange",function(c){return T(a.month,c)||(a.month=c),c}),t(),i(9,"label",4),o(10,"Months"),t()(),i(11,"div",5)(12,"textarea",6),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(13,"label",4),o(14,"Reason"),t()()()()),e&2&&(u("config",a.config),s(8),w("ngModel",a.month),s(4),w("ngModel",a.message))},dependencies:[rt,Y,it,Z,B,j],encapsulation:2})};var Et=class n{constructor(l,e,a){this.matDialog=l;this.http=e;this.toastr=a;Xt(()=>{this.updateBillingOnPageLoad()&&this.updateBilling()})}updateBillingOnPageLoad=ei();lastUnpaidInvoiceDate;email;phone;mobilePhone;recurringStatus;cancel(){this.matDialog.open(Ve).afterClosed().subscribe()}pause(){this.matDialog.open(Dt).afterClosed().subscribe()}updateBilling(){this.matDialog.open(Tt,{data:{email:this.email,phone:this.phone,mobilePhone:this.mobilePhone}}).afterClosed().pipe(de(l=>W.IsNotEmpty(l)),ee(l=>this.http.post("/API/Subscription/UpdateBillingData",{Email:l.email,Phone:l.phone,Mobile:l.mobilePhone}).pipe(se(e=>Wt(Ht({},l),{Message:e.Message}))))).subscribe(l=>{this.toastr.success(l.Message,F.Success),this.email=l.email,this.phone=l.phone,this.mobilePhone=l.mobilePhone})}static \u0275fac=function(e){return new(e||n)(f(J),f(E),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-renewal-card"]],inputs:{updateBillingOnPageLoad:[1,"updateBillingOnPageLoad"],lastUnpaidInvoiceDate:"lastUnpaidInvoiceDate",email:"email",phone:"phone",mobilePhone:"mobilePhone",recurringStatus:"recurringStatus"},standalone:!1,decls:40,vars:16,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text","text-capitalize"],[1,"btn-group"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],[1,"dropdown-item",3,"click"],[1,"card-body"],[1,"renewal-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"text-center","invdate-container",2,"flex-grow","1"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"],[1,"d-flex","flex-column","ps-0","ps-sm-10","emwa-container",2,"flex-grow","2.5"],[1,"mt-sm-4","mt-8"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Renewal"),t(),i(5,"small",2),o(6),t()(),i(7,"div",3)(8,"button",4),h(9,"b",5),t(),i(10,"ul",6)(11,"li")(12,"a",7),g("click",function(){return a.updateBilling()}),o(13,"Update Billing Contact"),t()(),i(14,"li")(15,"a",7),g("click",function(){return a.pause()}),o(16,"Pause Subscription"),t()(),i(17,"li")(18,"a",7),g("click",function(){return a.cancel()}),o(19,"Cancel Renewal"),t()()()()(),i(20,"div",8)(21,"div",9)(22,"div",10)(23,"h3",11),o(24),b(25,"date"),t(),i(26,"h5",12),o(27,"Invoice Date"),t()(),h(28,"div",13),i(29,"div",14)(30,"div")(31,"h3",11),o(32),t(),i(33,"h5",12),o(34,"Billing Email"),t()(),i(35,"div",15)(36,"h3",11),o(37),t(),i(38,"h5",12),o(39),t()()()()()()),e&2&&(s(5),Qe("text-success",a.recurringStatus=="active")("text-danger",a.recurringStatus=="stopped"),s(),x(a.recurringStatus),s(18),x(a.lastUnpaidInvoiceDate=="-"?a.lastUnpaidInvoiceDate:I(25,13,a.lastUnpaidInvoiceDate,"dd MMM yyyy")),s(8),x(a.email??"-"),s(5),Nt("",a.phone," ",a.phone&&a.mobilePhone?"/":""," ",a.mobilePhone),s(2),Nt("",a.phone?"Phone":""," ",a.phone&&a.mobilePhone?"/":""," ",a.mobilePhone?"Mobile Phone":""))},dependencies:[U],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-cancel[_ngcontent-%COMP%]{width:140px}.renewal-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media (max-width: 576px){.renewal-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}@media (max-width: 576px){.invdate-container[_ngcontent-%COMP%], .emwa-container[_ngcontent-%COMP%]{flex-grow:0!important}}@media (max-width: 576px){ #modal_material{width:100%!important}}"]})};var na=n=>({"bg-gradient-warning":n});function oa(n,l){if(n&1&&(i(0,"small",5),o(1),b(2,"date"),b(3,"date"),t()),n&2){let e=d();s(),S("(",I(2,1,e.lastMonthDate,"dd MMM yyyy")+" - "+I(3,4,e.currentDate,"dd MMM yyyy"),")")}}function aa(n,l){if(n&1){let e=v();i(0,"button",13),g("click",function(){_(e);let r=d();return C(r.loadOutlet())}),o(1,"Load"),t()}}function ra(n,l){if(n&1){let e=v();i(0,"button",13),g("click",function(){_(e);let r=d();return C(r.loadMinMax())}),o(1,"Load Min Max Date"),t()}}function la(n,l){n&1&&(i(0,"th",11),o(1,"Min Date"),t())}function sa(n,l){n&1&&(i(0,"th",11),o(1,"Max Date"),t())}function da(n,l){if(n&1&&(i(0,"td",14),o(1),b(2,"date"),t()),n&2){let e=d().$implicit;s(),x(I(2,1,e.MinDate,"dd MMM yyyy"))}}function ca(n,l){if(n&1&&(i(0,"td",14),o(1),b(2,"date"),t()),n&2){let e=d().$implicit;s(),x(I(2,1,e.MaxDate,"dd MMM yyyy"))}}function ma(n,l){if(n&1&&(i(0,"tr",12)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",14),o(6),b(7,"number"),t(),i(8,"td",14),o(9),b(10,"number"),t(),m(11,da,3,4,"td",14),m(12,ca,3,4,"td",14),t()),n&2){let e=l.$implicit,a=l.$index,r=d();s(2),x(a+1),s(2),S(" ",e.Name," "),s(),fe(R(12,na,(e==null?null:e.OrdersCount)<25||e.OrdersCount==null)),s(),S(" ",y(7,8,e.OrdersCount??0)),s(3),x(y(10,10,e.RegisterCount??1)),s(2),p(r.isLoadMinMaxDate?11:-1),s(),p(r.isLoadMinMaxDate?12:-1)}}var Pt=class n{constructor(l,e){this.outletUsage=l;this.http=e}lastMonthDate;currentDate;outlets;showLoadButton;isLoadMinMaxDate=!1;loadOutlet(){this.outletUsage.loadOutlet()}loadMinMax(){this.http.post("/api/subscription/GetOutletWithMinMax").subscribe(l=>{this.outlets=l.Outlets,this.isLoadMinMaxDate=!0})}static \u0275fac=function(e){return new(e||n)(f(Me),f(E))};static \u0275cmp=M({type:n,selectors:[["POS-outlet-card"]],inputs:{lastMonthDate:"lastMonthDate",currentDate:"currentDate",outlets:"outlets",showLoadButton:"showLoadButton"},standalone:!1,decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-os-center","justify-content-between"],[1,"d-flex","align-items-center"],[1,"fa","fa-location-dot","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-secondary"],[1,"card-body","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],[1,"text-end",2,"width","120px"],[1,"border"],[1,"btn","btn-sm","btn-outline-secondary",3,"click"],[1,"text-end"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),h(3,"i",3),i(4,"div")(5,"h3",4),o(6,"Outlets Usage"),t(),m(7,oa,4,7,"small",5),t()(),m(8,aa,2,0,"button",6),m(9,ra,2,0,"button",6),t(),i(10,"div",7)(11,"table",8)(12,"thead",9)(13,"tr")(14,"th",10),o(15,"No"),t(),i(16,"th"),o(17,"Name"),t(),i(18,"th",11),o(19,"Orders"),t(),i(20,"th",11),o(21,"Registers"),t(),m(22,la,2,0,"th",11),m(23,sa,2,0,"th",11),t()(),i(24,"tbody"),V(25,ma,13,14,"tr",12,N),b(27,"sortBy"),t()()()()),e&2&&(s(7),p(a.outlets!=null&&a.outlets.length?7:-1),s(),p(a.showLoadButton?8:-1),s(),p(!a.showLoadButton&&!a.isLoadMinMaxDate?9:-1),s(13),p(a.isLoadMinMaxDate?22:-1),s(),p(a.isLoadMinMaxDate?23:-1),s(2),A(Ee(27,5,a.outlets,"desc","OrdersCount")))},dependencies:[_e,U,st],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:16px}"]})};function ua(n,l){if(n&1){let e=v();i(0,"input",11),D("ngModelChange",function(r){_(e);let c=d();return T(c.nameForm,r)||(c.nameForm=r),C(r)}),t()}if(n&2){let e=d();w("ngModel",e.nameForm)}}function fa(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=d();s(),x(e.name??"-")}}function _a(n,l){if(n&1){let e=v();i(0,"input",11),D("ngModelChange",function(r){_(e);let c=d();return T(c.npwpForm,r)||(c.npwpForm=r),C(r)}),t()}if(n&2){let e=d();w("ngModel",e.npwpForm)}}function Ca(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=d();s(),x(e.npwp??"-")}}function ba(n,l){if(n&1){let e=v();i(0,"textarea",12),D("ngModelChange",function(r){_(e);let c=d();return T(c.addressForm,r)||(c.addressForm=r),C(r)}),t()}if(n&2){let e=d();w("ngModel",e.addressForm)}}function ga(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=d();s(),S(" ",e.taxAddress??"-"," ")}}function ha(n,l){if(n&1&&(i(0,"div",9)(1,"h4",6),o(2,"Document Link"),t(),i(3,"h4",8)(4,"a",13),o(5,"view"),t()()()),n&2){let e=d();s(4),u("href",e.documentLink,ge)}}function xa(n,l){if(n&1&&(i(0,"div",9)(1,"h4",6),o(2,"WHT"),t(),i(3,"h4",8),o(4),t()()),n&2){let e=d();s(4),S(" ",e.whtPercentage??"-","% ")}}var It=class n{constructor(l){this.http=l}outletCount;name;npwp;documentLink;whtPercentage;frequency;taxAddress;isEdit=!1;nameForm="";npwpForm="";addressForm="";editData(){this.isEdit?this.http.post("/API/Subscription/UpdateTaxInformation",{TaxID:this.npwpForm,TaxName:this.nameForm,TaxAddress:this.addressForm}).subscribe(()=>{this.isEdit=!1,this.name=this.nameForm,this.npwp=this.npwpForm,this.taxAddress=this.addressForm}):(this.isEdit=!0,this.nameForm=this.name,this.npwpForm=this.npwp,this.addressForm=this.taxAddress)}static \u0275fac=function(e){return new(e||n)(f(E))};static \u0275cmp=M({type:n,selectors:[["POS-tax-card"]],inputs:{outletCount:"outletCount",name:"name",npwp:"npwp",documentLink:"documentLink",whtPercentage:"whtPercentage",frequency:"frequency",taxAddress:"taxAddress"},standalone:!1,decls:27,vars:6,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"btn","btn-sm","btn-outline-primary","btn-upgrade",3,"click"],[1,"card-body"],[1,"d-flex","justify-content-between"],[1,"fw-normal","title-form"],["type","text",1,"form-control",2,"width","250px",3,"ngModel"],[1,"text-secondary","fw-normal","user-info"],[1,"d-flex","justify-content-between","mt-8"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModel"],["type","text",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["target","_blank",3,"href"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Tax Information"),t(),i(5,"small",2),o(6,"PPN 11% + Tax Invoice"),t()(),i(7,"button",3),g("click",function(){return a.editData()}),o(8),t()(),i(9,"div",4)(10,"div",5)(11,"h4",6),o(12,"Full Name"),t(),m(13,ua,1,1,"input",7)(14,fa,2,1,"h4",8),t(),i(15,"div",9)(16,"h4",6),o(17,"NPWP"),t(),m(18,_a,1,1,"input",7)(19,Ca,2,1,"h4",8),t(),i(20,"div",9)(21,"h4",6),o(22,"Tax Address"),t(),m(23,ba,1,1,"textarea",10)(24,ga,2,1,"h4",8),t(),m(25,ha,6,1,"div",9),m(26,xa,5,1,"div",9),t()()),e&2&&(s(8),S(" ",a.isEdit?"Save":"Edit"," "),s(5),p(a.isEdit?13:14),s(5),p(a.isEdit?18:19),s(5),p(a.isEdit?23:24),s(2),p(a.documentLink?25:-1),s(),p(a.whtPercentage?26:-1))},dependencies:[Z,B,j],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080}.user-info[_ngcontent-%COMP%]{max-width:50%}@media (max-width: 576px){.title-form[_ngcontent-%COMP%]{flex-basis:100px;word-break:break-all}}"]})};function va(n,l){if(n&1&&h(0,"POS-tax-card",10),n&2){let e=d();u("name",e.Subscription==null?null:e.Subscription.TaxName)("npwp",e.Subscription==null?null:e.Subscription.TaxID)("outletCount",e.Subscription==null?null:e.Subscription.OutletCount)("documentLink",e.DocumentLink)("whtPercentage",e.WHTPercentage)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("taxAddress",e.Subscription==null?null:e.Subscription.TaxAddress)}}function ya(n,l){if(n&1&&(i(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"section",2)(4,"div",3)(5,"div",4),h(6,"POS-invoices-card",5)(7,"POS-outlet-card",6),b(8,"async"),b(9,"async"),b(10,"async"),b(11,"async"),t(),i(12,"div",7),h(13,"POS-billing-info-card",8)(14,"POS-renewal-card",9),m(15,va,1,7,"POS-tax-card",10),t()()()()()()),n&2){let e=l,a=d();u("pageData",a.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),s(6),u("invoices",e.invoices)("WHTPercentage",e.WHTPercentage)("VATEnabled",e.VATEnabled)("subscriptionStatus",e.Subscription==null?null:e.Subscription.SubscriptionStatus)("currency",e.Subscription==null?null:e.Subscription.Currency),s(),u("lastMonthDate",y(8,23,a.from$))("currentDate",y(9,25,a.to$))("outlets",y(10,27,a.outlets$))("showLoadButton",y(11,29,a.showLoadButton$)),s(6),u("subscribedSince",e.Subscription==null?null:e.Subscription.Since)("outlets",e.Subscription==null?null:e.Subscription.OutletCount)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("total",e.Subscription==null?null:e.Subscription.TotalAmount),s(),u("updateBillingOnPageLoad",!(e.Subscription!=null&&e.Subscription.MobilePhone&&(e.Subscription!=null&&e.Subscription.Email)))("lastUnpaidInvoiceDate",e.Subscription==null?null:e.Subscription.NextRecurring)("email",e.Subscription==null?null:e.Subscription.Email)("phone",e.Subscription==null?null:e.Subscription.Phone)("mobilePhone",e.Subscription==null?null:e.Subscription.MobilePhone)("recurringStatus",e.Subscription==null?null:e.Subscription.RecurringStatus),s(),p((e.Subscription==null?null:e.Subscription.Currency)!="USD"?15:-1)}}var Ot=class n{title=we(ni);menuData={H:"My Subscription",N:{SM:[]},T:"My Subscription",U:[]};outlets$;from$;to$;subscriptionData$;lastUnpaidInvoiceDate$;showLoadButton$;constructor(l,e,a,r){let P=this.title.getTitle().split("|")[0]+"| My Subscription";this.title.setTitle(P),this.subscriptionData$=l.subscriptionData$,this.lastUnpaidInvoiceDate$=l.lastUnpaidInvoiceDate$,this.outlets$=a.outlets$,this.showLoadButton$=a.showLoadButton$,this.from$=a.from$,this.to$=a.to$,r.initScript().subscribe()}static \u0275fac=function(e){return new(e||n)(f(le),f(Be),f(Me),f(Ae))};static \u0275cmp=M({type:n,selectors:[["POS-my-subscription-v2"]],standalone:!1,features:[Kt([le,Be,Me])],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"subs-container"],[1,"content"],[1,"d-flex","flex-sm-row","flex-column",2,"column-gap","20px"],[1,"left-container"],[3,"invoices","WHTPercentage","VATEnabled","subscriptionStatus","currency"],[3,"lastMonthDate","currentDate","outlets","showLoadButton"],[1,"right-container"],[3,"subscribedSince","outlets","frequency","total"],[3,"updateBillingOnPageLoad","lastUnpaidInvoiceDate","email","phone","mobilePhone","recurringStatus"],[3,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress"]],template:function(e,a){if(e&1&&(m(0,ya,16,31,"mainpanel-cmp",0),b(1,"async")),e&2){let r;p((r=y(1,1,a.subscriptionData$))?0:-1,r)}},dependencies:[X,Mt,wt,Et,Pt,It,ti],styles:[".subs-container[_ngcontent-%COMP%]{padding:18px 20px 0;background:#fafaf9}.subs-container[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding-left:15px}.subs-container[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{width:60%}.subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:40%}@media (max-width: 576px){.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%], .subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:100%}}"]})};function Ma(n,l){if(n&1){let e=v();i(0,"div",14),g("click",function(){_(e);let r=d().$index,c=d(2);return C(c.readMore(r))}),o(1,"read more..."),t()}}function wa(n,l){if(n&1&&(i(0,"tr",10)(1,"td")(2,"b"),o(3),t(),h(4,"div",12),m(5,Ma,2,0,"div",13),t(),i(6,"td"),o(7),b(8,"date"),t(),i(9,"td"),o(10),t()()),n&2){let e=l.$implicit;s(3),x(e.Header),s(),u("innerHTML",e.displayedMessage,G),s(),p(e.showReadMore?5:-1),s(2),x(I(8,5,e.Created,"dd MMM yyyy HH:mm")),s(3),x(e.IsFinished?"Finished":"In Progress")}}function Ta(n,l){if(n&1){let e=v();i(0,"mat-paginator",15),g("page",function(r){_(e);let c=d(2);return C(c.onPaginationChange(r))}),t()}if(n&2){let e=d(2);u("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Da(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1),g("onSubmit",function(){_(e);let r=d();return C(r.searchFromPageOne())}),i(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),o(6,"From"),t(),i(7,"datepicker",4),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.From,r)||(c.pageData.Filter.From=r),C(r)}),t()(),i(8,"div")(9,"h6"),o(10,"To"),t(),i(11,"datepicker",5),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.To,r)||(c.pageData.Filter.To=r),C(r)}),t()()()()(),i(12,"content")(13,"div",6)(14,"table",7)(15,"thead",8)(16,"tr",9)(17,"th"),o(18,"Message"),t(),i(19,"th"),o(20,"Created"),t(),i(21,"th"),o(22,"Status"),t()()(),i(23,"tbody"),V(24,wa,11,8,"tr",10,N),t()(),i(26,"div"),m(27,Ta,1,3,"mat-paginator",11),t()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0),s(7),w("date",e.pageData.Filter.From),s(4),w("date",e.pageData.Filter.To),s(13),A(e.data.Data),s(3),p(e.pagination.listTotal>0?27:-1)}}var kt=class n extends ke{constructor(l,e){super(l,e,"AsyncNotification/Get","AsyncNotification/Loader")}preInitList(){let l=new Date;l.setHours(0,0,0,0);let e=new Date;e.setHours(23,59,59,59),this.pageData.Filter.From=l,this.pageData.Filter.To=e}postInit(l){l.Data.forEach(e=>{let a=e.Body;e.displayedMessage=a.length<=120?a:a.slice(0,120),e.showReadMore=a.length>120})}readMore(l){this.data.Data[l].displayedMessage=this.data.Data[l].Body,this.data.Data[l].showReadMore=!1}static \u0275fac=function(e){return new(e||n)(f(re),f(E))};static \u0275cmp=M({type:n,selectors:[["POS-async-notification"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],[1,"d-flex"],["container",""],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],[2,"word-break","break-all",3,"innerHTML"],[1,"text-primary","pointer"],[1,"text-primary","pointer",3,"click"],[3,"page","length","pageSize","pageIndex"]],template:function(e,a){e&1&&m(0,Da,28,5,"mainpanel-cmp",0),e&2&&p(a.data?0:-1)},dependencies:[X,at,Fe,U],encapsulation:2})};var Ea=[{path:"Main/My_Profile",component:pt},{path:"Main/My_Subscription",component:Ot},{path:"Main/My_Subscription/V2",component:ht},{path:"Notification/Push",component:St},{path:"Notification/Async",component:kt},{path:"Main/My_Sales",component:ft},{path:"Main/My_Subscription/Choose_your_plan",component:Ct}],Ft=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=ze({type:n});static \u0275inj=Ge({imports:[Vt.forChild(Ea),Vt]})};var Zi=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=ze({type:n});static \u0275inj=Ge({providers:[U],imports:[ii,it,di,Ft,yi,xi,rt,ui,wi,mi,Ii,ve,Pi,vi,ci,Vi,Fi,Bi,Di]})};export{Zi as ProfileModule};
@@ -1 +1 @@
1
- import{c as J}from"./chunk-SRAJGU6Y.js";import{a as G}from"./chunk-OOKDKXRB.js";import"./chunk-H6UWRJHQ.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as q,f as z}from"./chunk-YVO66RJF.js";import"./chunk-5QMBTXFS.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-6P2ASCNY.js";import"./chunk-PFF34SZG.js";import{b as A}from"./chunk-V3FPQMVB.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as j,c as k}from"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as W,h as B,o as H}from"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{p as V,s as R}from"./chunk-LGOSIAUC.js";import{Bb as x,Db as M,Eb as w,Fb as d,Fc as C,Gb as i,Gc as F,Hb as n,Hc as T,Lc as E,Pb as v,Sb as N,Ub as S,Xa as l,eb as c,hc as o,ib as D,ic as u,mb as y,mc as _,nc as b,ob as I,oc as h,qd as P,sd as L,ta as p,ua as s,vd as O}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function U(r,g){if(r&1){let e=v();i(0,"div")(1,"div",9)(2,"h6"),o(3,"Outlet"),n(),i(4,"outlet-selector",10),h("ngModelChange",function(t){p(e);let m=S();return b(m.pageData.Filter.ListIDs,t)||(m.pageData.Filter.ListIDs=t),s(t)}),n()()()}if(r&2){let e=S();l(4),d("accessType",2),_("ngModel",e.pageData.Filter.ListIDs),d("multiple",!0)}}function X(r,g){if(r&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td"),o(4),C(5,"number"),n(),i(6,"td"),o(7),C(8,"date"),n()()),r&2){let e=g.$implicit;l(2),u(e==null?null:e.EntityName),l(2),u(F(5,3,e==null?null:e.Number)),l(3),u(T(8,5,e==null?null:e.Modified,"dd MMM yyyy HH:mm"))}}var K=class r extends G{constructor(e,a,t){super(e,a,"Setup/Data/TransactionInvoiceNumber",null,t);this.httpService=a}preGetList(){let e=this.pageData.Filter?.ListIDs?this.pageData.Filter?.ListIDs:[];this.pageData.Filter={ListIDs:e}}static \u0275fac=function(a){return new(a||r)(c(A),c(R),c(V))};static \u0275cmp=D({type:r,selectors:[["app-invoice-numbering"]],features:[y],decls:19,vars:4,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","isFilterOnDropdown","hideSearchBox","filter"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],["matTooltip","Next invoice number index to be generated",2,"width","200px"],[2,"width","200px"],[1,"dialog-filter"],["placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","multiple"]],template:function(a,t){if(a&1){let m=v();i(0,"mainpanel-cmp",1),N("onSubmit",function(){return p(m),s(t.searchFromPageOne())}),h("filterChange",function(f){return p(m),b(t.pageData.Filter,f)||(t.pageData.Filter=f),s(f)}),i(1,"filters"),I(2,U,5,3,"ng-template",null,0,E),n(),i(4,"content")(5,"div",2)(6,"div",3)(7,"table",4)(8,"thead",5)(9,"tr",6)(10,"th"),o(11,"Outlet"),n(),i(12,"th",7),o(13," Next Number "),n(),i(14,"th",8),o(15,"Modified"),n()()(),i(16,"tbody"),M(17,X,9,8,"tr",null,x),n()()()()()()}a&2&&(d("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),_("filter",t.pageData.Filter),l(17),w(t.data==null?null:t.data.Data))},dependencies:[O,z,q,J,W,B,H,k,j,L,P],encapsulation:2})};export{K as InvoiceNumberingComponent};
1
+ import{c as J}from"./chunk-B7BVEOOI.js";import{a as G}from"./chunk-T3ZHKT2K.js";import"./chunk-HFOJZ3B5.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as q,f as z}from"./chunk-BFNGPKGX.js";import"./chunk-G3DZI5XK.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-6P2ASCNY.js";import"./chunk-OZ3MKU4C.js";import{b as A}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as j,c as k}from"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as W,h as B,o as H}from"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-EAEOJMTA.js";import{p as V,s as R}from"./chunk-LGOSIAUC.js";import{Bb as x,Db as M,Eb as w,Fb as d,Fc as C,Gb as i,Gc as F,Hb as n,Hc as T,Lc as E,Pb as v,Sb as N,Ub as S,Xa as l,eb as c,hc as o,ib as D,ic as u,mb as y,mc as _,nc as b,ob as I,oc as h,qd as P,sd as L,ta as p,ua as s,vd as O}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function U(r,g){if(r&1){let e=v();i(0,"div")(1,"div",9)(2,"h6"),o(3,"Outlet"),n(),i(4,"outlet-selector",10),h("ngModelChange",function(t){p(e);let m=S();return b(m.pageData.Filter.ListIDs,t)||(m.pageData.Filter.ListIDs=t),s(t)}),n()()()}if(r&2){let e=S();l(4),d("accessType",2),_("ngModel",e.pageData.Filter.ListIDs),d("multiple",!0)}}function X(r,g){if(r&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td"),o(4),C(5,"number"),n(),i(6,"td"),o(7),C(8,"date"),n()()),r&2){let e=g.$implicit;l(2),u(e==null?null:e.EntityName),l(2),u(F(5,3,e==null?null:e.Number)),l(3),u(T(8,5,e==null?null:e.Modified,"dd MMM yyyy HH:mm"))}}var K=class r extends G{constructor(e,a,t){super(e,a,"Setup/Data/TransactionInvoiceNumber",null,t);this.httpService=a}preGetList(){let e=this.pageData.Filter?.ListIDs?this.pageData.Filter?.ListIDs:[];this.pageData.Filter={ListIDs:e}}static \u0275fac=function(a){return new(a||r)(c(A),c(R),c(V))};static \u0275cmp=D({type:r,selectors:[["app-invoice-numbering"]],features:[y],decls:19,vars:4,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","isFilterOnDropdown","hideSearchBox","filter"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],["matTooltip","Next invoice number index to be generated",2,"width","200px"],[2,"width","200px"],[1,"dialog-filter"],["placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","multiple"]],template:function(a,t){if(a&1){let m=v();i(0,"mainpanel-cmp",1),N("onSubmit",function(){return p(m),s(t.searchFromPageOne())}),h("filterChange",function(f){return p(m),b(t.pageData.Filter,f)||(t.pageData.Filter=f),s(f)}),i(1,"filters"),I(2,U,5,3,"ng-template",null,0,E),n(),i(4,"content")(5,"div",2)(6,"div",3)(7,"table",4)(8,"thead",5)(9,"tr",6)(10,"th"),o(11,"Outlet"),n(),i(12,"th",7),o(13," Next Number "),n(),i(14,"th",8),o(15,"Modified"),n()()(),i(16,"tbody"),M(17,X,9,8,"tr",null,x),n()()()()()()}a&2&&(d("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),_("filter",t.pageData.Filter),l(17),w(t.data==null?null:t.data.Data))},dependencies:[O,z,q,J,W,B,H,k,j,L,P],encapsulation:2})};export{K as InvoiceNumberingComponent};