dealpos 25.47.1 → 25.47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/browser/{chunk-JYJW5KAE.js → chunk-3FYNWZYY.js} +1 -1
  2. package/browser/{chunk-S7Y36REW.js → chunk-3YOY54TO.js} +1 -1
  3. package/browser/{chunk-QBOUUDFD.js → chunk-44RMDJGQ.js} +1 -1
  4. package/browser/{chunk-FUKBIYWZ.js → chunk-4CKBIRQ2.js} +1 -1
  5. package/browser/{chunk-TV76G36W.js → chunk-4U2TXFUV.js} +1 -1
  6. package/browser/{chunk-GEIEF2RB.js → chunk-54OUVAKK.js} +1 -1
  7. package/browser/{chunk-IIDCCGRC.js → chunk-5BLWYLXP.js} +1 -1
  8. package/browser/{chunk-OBEXYNUM.js → chunk-5MJHW4YM.js} +1 -1
  9. package/browser/{chunk-Y3AE3TKV.js → chunk-5MWGLO24.js} +1 -1
  10. package/browser/{chunk-CC2THS3J.js → chunk-5QUOXOR7.js} +1 -1
  11. package/browser/{chunk-QDCZBCN5.js → chunk-5SJK4QC2.js} +1 -1
  12. package/browser/{chunk-T6RHBYOY.js → chunk-6PX2PA2J.js} +1 -1
  13. package/browser/{chunk-NU7GDZKC.js → chunk-6UMKFILJ.js} +1 -1
  14. package/browser/{chunk-PGVKBOVV.js → chunk-7GQF6UNI.js} +1 -1
  15. package/browser/{chunk-DQYDWBIK.js → chunk-7KAETFNH.js} +1 -1
  16. package/browser/{chunk-NDFDMJU2.js → chunk-7SJB3DEF.js} +1 -1
  17. package/browser/{chunk-7FC2PJIW.js → chunk-7WXQYKCT.js} +1 -1
  18. package/browser/{chunk-4QU3FQ4H.js → chunk-A243LOWU.js} +1 -1
  19. package/browser/{chunk-R5SLRG5P.js → chunk-A5MP4QMZ.js} +1 -1
  20. package/browser/{chunk-FUZD2YUG.js → chunk-AZBA2YOQ.js} +2 -2
  21. package/browser/{chunk-ERJKTHMS.js → chunk-BK4CA5K2.js} +1 -1
  22. package/browser/{chunk-77V3KNIS.js → chunk-BVZ7ACQM.js} +1 -1
  23. package/browser/{chunk-A56Z62HU.js → chunk-BWXXYBLG.js} +1 -1
  24. package/browser/{chunk-CPCDU4HM.js → chunk-CLBQLTFG.js} +1 -1
  25. package/browser/{chunk-RPMSR2S2.js → chunk-CUULWZUF.js} +1 -1
  26. package/browser/{chunk-7DG3RSHK.js → chunk-D6HRDYFW.js} +1 -1
  27. package/browser/{chunk-IHCO2JK3.js → chunk-EANAFODJ.js} +1 -1
  28. package/browser/{chunk-N3HGHV2Q.js → chunk-F652VZDD.js} +1 -1
  29. package/browser/{chunk-L5QFOKO7.js → chunk-FE5USLDO.js} +1 -1
  30. package/browser/{chunk-M326IFGL.js → chunk-FFNEDDOO.js} +1 -1
  31. package/browser/{chunk-FUYOSIW5.js → chunk-FFW4SP7H.js} +1 -1
  32. package/browser/{chunk-5RTCTJUG.js → chunk-FG3HLE5U.js} +1 -1
  33. package/browser/{chunk-XUDYAWGP.js → chunk-FHPFRT4L.js} +1 -1
  34. package/browser/{chunk-HEIZUI6B.js → chunk-FJC7EOO5.js} +1 -1
  35. package/browser/chunk-FSBKLNRT.js +4 -0
  36. package/browser/{chunk-7LCG4V47.js → chunk-G5VELV3S.js} +1 -1
  37. package/browser/{chunk-R4JXP55V.js → chunk-GXVEYJWC.js} +1 -1
  38. package/browser/{chunk-ICXY7J4B.js → chunk-GYNJFQPE.js} +1 -1
  39. package/browser/{chunk-QCMMZ67T.js → chunk-H2SA27YZ.js} +1 -1
  40. package/browser/{chunk-KSDWEFU5.js → chunk-I2SL4ZPJ.js} +1 -1
  41. package/browser/chunk-IVQ42QHP.js +5 -0
  42. package/browser/{chunk-IJ6NUPJY.js → chunk-JIPNMAEP.js} +1 -1
  43. package/browser/{chunk-SXAXSC44.js → chunk-JNORDOWT.js} +1 -1
  44. package/browser/{chunk-I6RQW6MV.js → chunk-JYA7PGNK.js} +1 -1
  45. package/browser/{chunk-CZIC4DAI.js → chunk-L2V3KTC6.js} +1 -1
  46. package/browser/{chunk-347WKSZO.js → chunk-LBZL2R6L.js} +1 -1
  47. package/browser/{chunk-XZ7GA7NR.js → chunk-LRXTFWOZ.js} +1 -1
  48. package/browser/{chunk-O5OL3MSI.js → chunk-M47WPS54.js} +1 -1
  49. package/browser/{chunk-TRYMZNEH.js → chunk-M4EGMZWI.js} +1 -1
  50. package/browser/{chunk-Y4LWALJN.js → chunk-MH7N5XSV.js} +1 -1
  51. package/browser/{chunk-DP3IHIJG.js → chunk-MUM4RT2P.js} +1 -1
  52. package/browser/{chunk-AS5WHW7W.js → chunk-OINIYEKP.js} +1 -1
  53. package/browser/{chunk-V2HVL2JW.js → chunk-OJM2IYYY.js} +2 -2
  54. package/browser/{chunk-TWX33MAO.js → chunk-PACJK6XZ.js} +1 -1
  55. package/browser/{chunk-5IW47S5R.js → chunk-PEIXGMKS.js} +1 -1
  56. package/browser/{chunk-GSAGOZJT.js → chunk-PKS7H624.js} +1 -1
  57. package/browser/{chunk-QECDT5UJ.js → chunk-QDHSPK4B.js} +1 -1
  58. package/browser/{chunk-75OKQPDZ.js → chunk-QGBQPCW2.js} +2 -2
  59. package/browser/{chunk-ADC6Y4AB.js → chunk-QJD336PR.js} +1 -1
  60. package/browser/{chunk-NJGJFNQG.js → chunk-QLAA4AMU.js} +1 -1
  61. package/browser/{chunk-5O2O7IB4.js → chunk-QVCQODGZ.js} +1 -1
  62. package/browser/{chunk-UNJ5ELA7.js → chunk-QXWCGE56.js} +1 -1
  63. package/browser/{chunk-V3PWVI2B.js → chunk-RB6A4M7Y.js} +12 -12
  64. package/browser/{chunk-BFLDH5QM.js → chunk-RCW2TTR7.js} +1 -1
  65. package/browser/{chunk-BE4SGNNY.js → chunk-RMU3G7EK.js} +1 -1
  66. package/browser/{chunk-2ZXSQTN3.js → chunk-RNYFGIMB.js} +1 -1
  67. package/browser/{chunk-DUJXPJ4P.js → chunk-SIS55WCN.js} +2 -2
  68. package/browser/{chunk-D3BHSTT2.js → chunk-SKDXVP3A.js} +1 -1
  69. package/browser/{chunk-FT2CPNDK.js → chunk-SQ3QIOE4.js} +1 -1
  70. package/browser/{chunk-GOZ7JJVG.js → chunk-SUKZF5RZ.js} +1 -1
  71. package/browser/{chunk-2BWSGD3Z.js → chunk-T4XIWNFQ.js} +1 -1
  72. package/browser/{chunk-6BCNB44A.js → chunk-TEV65D26.js} +1 -1
  73. package/browser/{chunk-L72RFTBD.js → chunk-TOUJ6K3E.js} +1 -1
  74. package/browser/{chunk-6OSOTMIF.js → chunk-TUM5HKY7.js} +1 -1
  75. package/browser/{chunk-WPMZWFSL.js → chunk-TYX5PWAF.js} +1 -1
  76. package/browser/{chunk-F45DK6HY.js → chunk-UTTEBWDI.js} +1 -1
  77. package/browser/{chunk-337Y6LKZ.js → chunk-VLHLS6LD.js} +1 -1
  78. package/browser/{chunk-EZRYO7BE.js → chunk-XNJ2P2ZO.js} +1 -1
  79. package/browser/{chunk-4VFIXDGC.js → chunk-XORANKYI.js} +1 -1
  80. package/browser/{chunk-3PWKXRXD.js → chunk-XVAFOEWU.js} +2 -2
  81. package/browser/{chunk-DT6QJWPF.js → chunk-ZEGLCDLU.js} +1 -1
  82. package/browser/{chunk-QIFLQIWQ.js → chunk-ZQHJ2WC2.js} +1 -1
  83. package/browser/{chunk-SMUNI47Q.js → chunk-ZVOEO2AC.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-O34B6LHF.js → main-Z44VJHQT.js} +2 -2
  86. package/package.json +1 -1
  87. package/browser/chunk-NWDPSH4M.js +0 -5
  88. package/browser/chunk-P3RYBCCQ.js +0 -4
@@ -1,4 +1,4 @@
1
- import{a as xt}from"./chunk-JEL3OND6.js";import{a as ft,b as _t,c as gt,d as yt,e as vt}from"./chunk-X57HWGVJ.js";import{a as ht}from"./chunk-5SFUSWFY.js";import{a as mt}from"./chunk-534MIVWD.js";import{a as bt}from"./chunk-TGEQUV6Z.js";import{b as ut}from"./chunk-TV76G36W.js";import{a as dt,d as _e}from"./chunk-CS6HBROS.js";import{a as pt,d as ct}from"./chunk-6SGN7MNX.js";import{b as ue,c as ne,d as me,g as at,h as rt,k as U,l as j}from"./chunk-L76WVZW6.js";import{A as Je,F as Xe,H,P as et,Q as tt,S as Ee,T as it,V as de,W,X as nt,_ as Ve,a as te,fa as ot,g as We,h as Ue,i as je,ka as lt,m as k,oa as st,p as Ce,pa as ie,qa as he,t as ce,u as Ze,w as L,x as z,xa as fe,z as Ye}from"./chunk-O5SLP4JK.js";import{a as $e}from"./chunk-RNLSEEMX.js";import{$b as Pe,Ca as K,Cb as s,Db as f,Eb as m,Fb as D,Hc as A,Ia as R,Ib as He,Jb as I,Kb as O,Kc as $,Lb as w,Lc as pe,Mb as E,Ob as x,Pc as ee,Qb as a,Tb as v,Ub as M,Vb as d,Wb as u,Xa as p,Xc as h,Ya as C,Yc as V,Za as ae,_b as q,bc as ve,cc as _,db as G,dc as Q,ec as J,ed as Ge,fb as De,fc as xe,fd as Ie,hb as Y,ib as re,ic as Re,id as Oe,jb as Ae,jc as Ne,jd as we,ka as Be,kc as Qe,la as le,lb as N,ma as se,mb as ze,na as Z,nb as c,pa as F,rd as Se,sc as X,sd as qe,ta as y,tb as T,tc as Ke,ua as b,uc as S,va as B,vb as ye,vc as Te,xb as be}from"./chunk-JYZTRN6N.js";import{a as P,b as Me}from"./chunk-SNAKHGZS.js";var Tt=`
1
+ import{a as xt}from"./chunk-JEL3OND6.js";import{a as ft,b as _t,c as gt,d as yt,e as vt}from"./chunk-X57HWGVJ.js";import{a as ht}from"./chunk-5SFUSWFY.js";import{a as mt}from"./chunk-534MIVWD.js";import{a as bt}from"./chunk-TGEQUV6Z.js";import{b as ut}from"./chunk-4U2TXFUV.js";import{a as dt,d as _e}from"./chunk-CS6HBROS.js";import{a as pt,d as ct}from"./chunk-6SGN7MNX.js";import{b as ue,c as ne,d as me,g as at,h as rt,k as U,l as j}from"./chunk-L76WVZW6.js";import{A as Je,F as Xe,H,P as et,Q as tt,S as Ee,T as it,V as de,W,X as nt,_ as Ve,a as te,fa as ot,g as We,h as Ue,i as je,ka as lt,m as k,oa as st,p as Ce,pa as ie,qa as he,t as ce,u as Ze,w as L,x as z,xa as fe,z as Ye}from"./chunk-O5SLP4JK.js";import{a as $e}from"./chunk-RNLSEEMX.js";import{$b as Pe,Ca as K,Cb as s,Db as f,Eb as m,Fb as D,Hc as A,Ia as R,Ib as He,Jb as I,Kb as O,Kc as $,Lb as w,Lc as pe,Mb as E,Ob as x,Pc as ee,Qb as a,Tb as v,Ub as M,Vb as d,Wb as u,Xa as p,Xc as h,Ya as C,Yc as V,Za as ae,_b as q,bc as ve,cc as _,db as G,dc as Q,ec as J,ed as Ge,fb as De,fc as xe,fd as Ie,hb as Y,ib as re,ic as Re,id as Oe,jb as Ae,jc as Ne,jd as we,ka as Be,kc as Qe,la as le,lb as N,ma as se,mb as ze,na as Z,nb as c,pa as F,rd as Se,sc as X,sd as qe,ta as y,tb as T,tc as Ke,ua as b,uc as S,va as B,vb as ye,vc as Te,xb as be}from"./chunk-JYZTRN6N.js";import{a as P,b as Me}from"./chunk-SNAKHGZS.js";var Tt=`
2
2
  .p-tooltip {
3
3
  position: absolute;
4
4
  display: none;
@@ -1 +1 @@
1
- import{a as $}from"./chunk-N3HGHV2Q.js";import{a as J,b as K}from"./chunk-MVUVDYGQ.js";import{a as G}from"./chunk-WNZKCNMC.js";import{e as Y,f as Z}from"./chunk-GSAGOZJT.js";import{a as Q,c as U}from"./chunk-KKLNFVVN.js";import{b as X}from"./chunk-EZRYO7BE.js";import{h as H,m as q,q as z}from"./chunk-BA3BDB5Y.js";import{b as R,c as j}from"./chunk-C4WJKF7R.js";import{a as V}from"./chunk-2FWFPV5I.js";import{F as k,c as A,h as v,o as b}from"./chunk-RNLSEEMX.js";import{Ab as P,Bb as w,Cb as p,Db as o,Eb as a,Mb as I,Ob as c,Pc as g,Qb as d,Wd as W,Xa as m,Ya as C,be as L,db as h,dc as r,ec as F,ee as B,hb as M,ic as T,jc as S,kc as E,lb as D,ta as u,ua as f,vb as N,xb as O,yb as y}from"./chunk-JYZTRN6N.js";var x=class s{stringPrefixMask=g();stringSuffixMask=g();stringPrefixMaskChange=new C;stringSuffixMaskChange=new C;onStringPrefixMaskChange(l){this.stringPrefixMaskChange.emit(l)}onStringSuffixMaskChange(l){this.stringSuffixMaskChange.emit(l)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-config"]],inputs:{stringPrefixMask:[1,"stringPrefixMask"],stringSuffixMask:[1,"stringSuffixMask"]},outputs:{stringPrefixMaskChange:"stringPrefixMaskChange",stringSuffixMaskChange:"stringSuffixMaskChange"},decls:18,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the beginning of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Prefix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the end of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Suffix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Visible Masking Settings"),a(),o(4,"i",2),r(5," Configure how many characters at the beginning and end of sensitive fields remain visible. "),a()(),o(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"input",7),c("ngModelChange",function(n){return i.onStringPrefixMaskChange(n)}),a(),o(11,"label"),r(12,"Max Visible Prefix"),a()()(),o(13,"div",5)(14,"div",8)(15,"input",9),c("ngModelChange",function(n){return i.onStringSuffixMaskChange(n)}),a(),o(16,"label"),r(17,"Max Visible Suffix"),a()()()()()()),e&2&&(m(10),p("ngModel",i.stringPrefixMask()),m(5),p("ngModel",i.stringSuffixMask()))},dependencies:[k,A,v,b,Q,U,j,R],encapsulation:2})};function oe(s,l){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=l.$implicit;p("value",e),m(),F(e)}}function ae(s,l){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=l.$implicit;p("value",e),m(),F(e)}}var _=class s{options=g();contacts=g([]);products=g([]);contactsChange=new C;productsChange=new C;onContactsChange(l){this.contactsChange.emit(l)}onProductsChange(l){this.productsChange.emit(l)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-options"]],inputs:{options:[1,"options"],contacts:[1,"contacts"],products:[1,"products"]},outputs:{contactsChange:"contactsChange",productsChange:"productsChange"},decls:27,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],["href","https://support.dealpos.com/en/articles/8278008-sensitive-field-roles-configuration-for-contacts","target","_blank"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["appearance","outline",1,"w-100"],[1,"fs-4"],["placeholder","Product","multiple","",3,"ngModelChange","ngModel"],[3,"value"],["placeholder","Contact","multiple","",3,"ngModelChange","ngModel"]],template:function(e,i){if(e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Sensitive Field"),a(),o(4,"i",2),r(5,"When you mark a property as sensitive, the property value cannot be viewed to users without 'sensitive field' role. Please refer this "),o(6,"a",3),r(7,"Article"),a(),r(8," for more information"),a()(),o(9,"div",4)(10,"div",5)(11,"div",6)(12,"mat-form-field",7)(13,"mat-label")(14,"span",8),r(15,"Product"),a()(),o(16,"mat-select",9),c("ngModelChange",function(n){return i.onProductsChange(n)}),P(17,oe,2,2,"mat-option",10,y),a()()(),o(19,"div",6)(20,"mat-form-field",7)(21,"mat-label")(22,"span",8),r(23,"Contact"),a()(),o(24,"mat-select",11),c("ngModelChange",function(n){return i.onContactsChange(n)}),P(25,ae,2,2,"mat-option",10,y),a()()()()()()),e&2){let t,n;m(16),p("ngModel",i.products()),m(),w((t=i.options())==null?null:t.Product),m(7),p("ngModel",i.contacts()),m(),w((n=i.options())==null?null:n.Customer)}},dependencies:[K,q,H,J,z,G,k,v,b],encapsulation:2})};function re(s,l){if(s&1){let e=I();o(0,"mainpanel-cmp",0)(1,"actions")(2,"button",1),c("click",function(){u(e);let t=d();return f(t.onSubmit("Setup/Configuration/SubmitSensitiveFieldConfigurationV2"))}),r(3," Save "),a()(),o(4,"content")(5,"div",2)(6,"ul",3)(7,"li",4)(8,"button",5),r(9," Objects "),a()(),o(10,"li",4)(11,"button",6),r(12," Masking "),a()()(),o(13,"div",7)(14,"div",8)(15,"masking-options",9),E("productsChange",function(t){u(e);let n=d();return S(n.data.Form.Product,t)||(n.data.Form.Product=t),f(t)})("contactsChange",function(t){u(e);let n=d();return S(n.data.Form.Customer,t)||(n.data.Form.Customer=t),f(t)}),a()(),o(16,"div",10)(17,"masking-config",11),E("stringPrefixMaskChange",function(t){u(e);let n=d();return S(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength=t),f(t)})("stringSuffixMaskChange",function(t){u(e);let n=d();return S(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength=t),f(t)}),a()()()()()()}if(s&2){let e=d();p("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),m(15),p("options",e.data.Options),T("products",e.data.Form.Product)("contacts",e.data.Form.Customer),m(2),T("stringPrefixMask",e.data.Form.Masking.StringPrefixMaskVisibleCharacterLength)("stringSuffixMask",e.data.Form.Masking.StringSuffixMaskVisibleCharacterLength)}}var ie=class s extends ${constructor(e,i,t,n){super(e,i,"Setup/ConfigurationLoader/SensitiveFieldConfigurationV2",t);this.httpService=i;this.activatedRoute=t;this.toaster=n}onSubmitSuccess(e){e?.MessageWarning?this.toaster.warning(e.MessageWarning,V.Warning):this.toaster.success("Config has been updated succesfully!",V.Success)}static \u0275fac=function(i){return new(i||s)(h(X),h(B),h(W),h(L))};static \u0275cmp=M({type:s,selectors:[["app-sensitive-field"]],features:[D],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button","role","button",1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5","bg-light-white"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","masking-options-tab","data-bs-toggle","tab","data-bs-target","#masking-options","role","tab","aria-controls","masking-options","aria-selected","true",1,"nav-link","active"],["id","masking-tab","data-bs-toggle","tab","data-bs-target","#masking","role","tab","aria-controls","masking","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content","border-top-0","bg-white"],["id","masking-options","aria-labelledby","masking-options-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7","show","active"],[3,"productsChange","contactsChange","options","products","contacts"],["id","masking","aria-labelledby","masking-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7"],[3,"stringPrefixMaskChange","stringSuffixMaskChange","stringPrefixMask","stringSuffixMask"]],template:function(i,t){i&1&&N(0,re,18,8,"mainpanel-cmp",0),i&2&&O(t.formData?0:-1)},dependencies:[Z,Y,x,_],encapsulation:2})};export{ie as a};
1
+ import{a as $}from"./chunk-F652VZDD.js";import{a as J,b as K}from"./chunk-MVUVDYGQ.js";import{a as G}from"./chunk-WNZKCNMC.js";import{e as Y,f as Z}from"./chunk-PKS7H624.js";import{a as Q,c as U}from"./chunk-KKLNFVVN.js";import{b as X}from"./chunk-XNJ2P2ZO.js";import{h as H,m as q,q as z}from"./chunk-BA3BDB5Y.js";import{b as R,c as j}from"./chunk-C4WJKF7R.js";import{a as V}from"./chunk-2FWFPV5I.js";import{F as k,c as A,h as v,o as b}from"./chunk-RNLSEEMX.js";import{Ab as P,Bb as w,Cb as p,Db as o,Eb as a,Mb as I,Ob as c,Pc as g,Qb as d,Wd as W,Xa as m,Ya as C,be as L,db as h,dc as r,ec as F,ee as B,hb as M,ic as T,jc as S,kc as E,lb as D,ta as u,ua as f,vb as N,xb as O,yb as y}from"./chunk-JYZTRN6N.js";var x=class s{stringPrefixMask=g();stringSuffixMask=g();stringPrefixMaskChange=new C;stringSuffixMaskChange=new C;onStringPrefixMaskChange(l){this.stringPrefixMaskChange.emit(l)}onStringSuffixMaskChange(l){this.stringSuffixMaskChange.emit(l)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-config"]],inputs:{stringPrefixMask:[1,"stringPrefixMask"],stringSuffixMask:[1,"stringSuffixMask"]},outputs:{stringPrefixMaskChange:"stringPrefixMaskChange",stringSuffixMaskChange:"stringSuffixMaskChange"},decls:18,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the beginning of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Prefix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the end of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Suffix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Visible Masking Settings"),a(),o(4,"i",2),r(5," Configure how many characters at the beginning and end of sensitive fields remain visible. "),a()(),o(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"input",7),c("ngModelChange",function(n){return i.onStringPrefixMaskChange(n)}),a(),o(11,"label"),r(12,"Max Visible Prefix"),a()()(),o(13,"div",5)(14,"div",8)(15,"input",9),c("ngModelChange",function(n){return i.onStringSuffixMaskChange(n)}),a(),o(16,"label"),r(17,"Max Visible Suffix"),a()()()()()()),e&2&&(m(10),p("ngModel",i.stringPrefixMask()),m(5),p("ngModel",i.stringSuffixMask()))},dependencies:[k,A,v,b,Q,U,j,R],encapsulation:2})};function oe(s,l){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=l.$implicit;p("value",e),m(),F(e)}}function ae(s,l){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=l.$implicit;p("value",e),m(),F(e)}}var _=class s{options=g();contacts=g([]);products=g([]);contactsChange=new C;productsChange=new C;onContactsChange(l){this.contactsChange.emit(l)}onProductsChange(l){this.productsChange.emit(l)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-options"]],inputs:{options:[1,"options"],contacts:[1,"contacts"],products:[1,"products"]},outputs:{contactsChange:"contactsChange",productsChange:"productsChange"},decls:27,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],["href","https://support.dealpos.com/en/articles/8278008-sensitive-field-roles-configuration-for-contacts","target","_blank"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["appearance","outline",1,"w-100"],[1,"fs-4"],["placeholder","Product","multiple","",3,"ngModelChange","ngModel"],[3,"value"],["placeholder","Contact","multiple","",3,"ngModelChange","ngModel"]],template:function(e,i){if(e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Sensitive Field"),a(),o(4,"i",2),r(5,"When you mark a property as sensitive, the property value cannot be viewed to users without 'sensitive field' role. Please refer this "),o(6,"a",3),r(7,"Article"),a(),r(8," for more information"),a()(),o(9,"div",4)(10,"div",5)(11,"div",6)(12,"mat-form-field",7)(13,"mat-label")(14,"span",8),r(15,"Product"),a()(),o(16,"mat-select",9),c("ngModelChange",function(n){return i.onProductsChange(n)}),P(17,oe,2,2,"mat-option",10,y),a()()(),o(19,"div",6)(20,"mat-form-field",7)(21,"mat-label")(22,"span",8),r(23,"Contact"),a()(),o(24,"mat-select",11),c("ngModelChange",function(n){return i.onContactsChange(n)}),P(25,ae,2,2,"mat-option",10,y),a()()()()()()),e&2){let t,n;m(16),p("ngModel",i.products()),m(),w((t=i.options())==null?null:t.Product),m(7),p("ngModel",i.contacts()),m(),w((n=i.options())==null?null:n.Customer)}},dependencies:[K,q,H,J,z,G,k,v,b],encapsulation:2})};function re(s,l){if(s&1){let e=I();o(0,"mainpanel-cmp",0)(1,"actions")(2,"button",1),c("click",function(){u(e);let t=d();return f(t.onSubmit("Setup/Configuration/SubmitSensitiveFieldConfigurationV2"))}),r(3," Save "),a()(),o(4,"content")(5,"div",2)(6,"ul",3)(7,"li",4)(8,"button",5),r(9," Objects "),a()(),o(10,"li",4)(11,"button",6),r(12," Masking "),a()()(),o(13,"div",7)(14,"div",8)(15,"masking-options",9),E("productsChange",function(t){u(e);let n=d();return S(n.data.Form.Product,t)||(n.data.Form.Product=t),f(t)})("contactsChange",function(t){u(e);let n=d();return S(n.data.Form.Customer,t)||(n.data.Form.Customer=t),f(t)}),a()(),o(16,"div",10)(17,"masking-config",11),E("stringPrefixMaskChange",function(t){u(e);let n=d();return S(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength=t),f(t)})("stringSuffixMaskChange",function(t){u(e);let n=d();return S(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength=t),f(t)}),a()()()()()()}if(s&2){let e=d();p("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),m(15),p("options",e.data.Options),T("products",e.data.Form.Product)("contacts",e.data.Form.Customer),m(2),T("stringPrefixMask",e.data.Form.Masking.StringPrefixMaskVisibleCharacterLength)("stringSuffixMask",e.data.Form.Masking.StringSuffixMaskVisibleCharacterLength)}}var ie=class s extends ${constructor(e,i,t,n){super(e,i,"Setup/ConfigurationLoader/SensitiveFieldConfigurationV2",t);this.httpService=i;this.activatedRoute=t;this.toaster=n}onSubmitSuccess(e){e?.MessageWarning?this.toaster.warning(e.MessageWarning,V.Warning):this.toaster.success("Config has been updated succesfully!",V.Success)}static \u0275fac=function(i){return new(i||s)(h(X),h(B),h(W),h(L))};static \u0275cmp=M({type:s,selectors:[["app-sensitive-field"]],features:[D],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button","role","button",1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5","bg-light-white"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","masking-options-tab","data-bs-toggle","tab","data-bs-target","#masking-options","role","tab","aria-controls","masking-options","aria-selected","true",1,"nav-link","active"],["id","masking-tab","data-bs-toggle","tab","data-bs-target","#masking","role","tab","aria-controls","masking","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content","border-top-0","bg-white"],["id","masking-options","aria-labelledby","masking-options-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7","show","active"],[3,"productsChange","contactsChange","options","products","contacts"],["id","masking","aria-labelledby","masking-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7"],[3,"stringPrefixMaskChange","stringSuffixMaskChange","stringPrefixMask","stringSuffixMask"]],template:function(i,t){i&1&&N(0,re,18,8,"mainpanel-cmp",0),i&2&&O(t.formData?0:-1)},dependencies:[Z,Y,x,_],encapsulation:2})};export{ie as a};
@@ -1,2 +1,2 @@
1
- import{O as b}from"./chunk-T25N3EEG.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-P3RYBCCQ.js";import{be as d,ee as h,la as n,pa as c}from"./chunk-JYZTRN6N.js";import{k as l}from"./chunk-SNAKHGZS.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
1
+ import{O as b}from"./chunk-T25N3EEG.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-FSBKLNRT.js";import{be as d,ee as h,la as n,pa as c}from"./chunk-JYZTRN6N.js";import{k as l}from"./chunk-SNAKHGZS.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
2
2
  `,"WhatsApp not installed")},2e3)}copyToClipboard(t){return new Promise((o,r)=>this.copyToClipBoard.copy(t).then(()=>{this.toastr.info("Message copied to clipboard. If WhatsApp doesn't show the message, please paste it manually.","Receipt Ready",{timeOut:8e3}),o("Copied to clipboard")}).catch(e=>{console.log(e),this.toastr.warning("Could not copy message to clipboard","Clipboard Error",{timeOut:8e3}),r(e)}))}sendReceiptToWhatsapp(t,o,r,e){return l(this,null,function*(){try{let i=this.createWhatsappReceipt(o,r,e);try{yield this.copyToClipboard(i)}finally{this.redirectToWhatsapp(t,i)}}catch(i){console.warn(i),this.toastr.error("Failed to send receipt")}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac})};export{y as a};
@@ -1,4 +1,4 @@
1
- import{a as et}from"./chunk-XACC6EMJ.js";import{a as it,b as ye}from"./chunk-Q2A4MYK3.js";import{b as nt,c as ve}from"./chunk-JYJW5KAE.js";import{a as tt}from"./chunk-TGEQUV6Z.js";import{d as be}from"./chunk-CS6HBROS.js";import{b as Ue,c as Ye,d as Ie,e as Je,k as fe,l as ge}from"./chunk-L76WVZW6.js";import{$ as xe,C as Ze,D as pe,G as qe,K as Ge,M as He,S as _e,V as b,_ as he,fa as Qe,g as de,la as je,m as ze,oa as We,pa as z,r as Re,w as $,x as N,xa as Xe}from"./chunk-O5SLP4JK.js";import{$d as ue,Ca as S,Cb as a,Db as x,Eb as I,Fb as f,Hc as se,Ia as Ee,Id as me,Ja as Pe,Jb as V,Jd as le,Kb as B,Kc as Oe,Lc as Ae,Ld as K,Mb as F,Ob as L,Od as D,Pc as Ke,Qa as Y,Qb as r,Sa as Se,Tb as G,Ub as H,Vb as C,Wb as T,Xa as m,Xc as w,Ya as g,Yc as E,Zd as Ne,_b as Q,bc as U,cb as ke,cc as l,db as k,dc as ne,ed as De,fc as ie,fd as re,hb as J,ib as Ve,id as ae,jd as $e,ka as we,la as Me,lb as ee,ma as Le,na as W,nb as _,pa as P,rd as ce,sb as te,sc as oe,sd as A,ta as d,tb as h,tc as O,ua as p,uc as Be,va as X,vc as Fe}from"./chunk-JYZTRN6N.js";import{a as Z,b as q}from"./chunk-SNAKHGZS.js";var ot=`
1
+ import{a as et}from"./chunk-XACC6EMJ.js";import{a as it,b as ye}from"./chunk-Q2A4MYK3.js";import{b as nt,c as ve}from"./chunk-3FYNWZYY.js";import{a as tt}from"./chunk-TGEQUV6Z.js";import{d as be}from"./chunk-CS6HBROS.js";import{b as Ue,c as Ye,d as Ie,e as Je,k as fe,l as ge}from"./chunk-L76WVZW6.js";import{$ as xe,C as Ze,D as pe,G as qe,K as Ge,M as He,S as _e,V as b,_ as he,fa as Qe,g as de,la as je,m as ze,oa as We,pa as z,r as Re,w as $,x as N,xa as Xe}from"./chunk-O5SLP4JK.js";import{$d as ue,Ca as S,Cb as a,Db as x,Eb as I,Fb as f,Hc as se,Ia as Ee,Id as me,Ja as Pe,Jb as V,Jd as le,Kb as B,Kc as Oe,Lc as Ae,Ld as K,Mb as F,Ob as L,Od as D,Pc as Ke,Qa as Y,Qb as r,Sa as Se,Tb as G,Ub as H,Vb as C,Wb as T,Xa as m,Xc as w,Ya as g,Yc as E,Zd as Ne,_b as Q,bc as U,cb as ke,cc as l,db as k,dc as ne,ed as De,fc as ie,fd as re,hb as J,ib as Ve,id as ae,jd as $e,ka as we,la as Me,lb as ee,ma as Le,na as W,nb as _,pa as P,rd as ce,sb as te,sc as oe,sd as A,ta as d,tb as h,tc as O,ua as p,uc as Be,va as X,vc as Fe}from"./chunk-JYZTRN6N.js";import{a as Z,b as q}from"./chunk-SNAKHGZS.js";var ot=`
2
2
  .p-contextmenu {
3
3
  background: dt('contextmenu.background');
4
4
  color: dt('contextmenu.color');
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-CS6HBROS.js";import{c as ve,j as Se,k as C,l as _e}from"./chunk-L76WVZW6.js";import{X as xe,Y as ge,oa as Ce,pa as F,xa as ye}from"./chunk-O5SLP4JK.js";import{a as me,g as ke}from"./chunk-RNLSEEMX.js";import{a as be,c as fe}from"./chunk-77V3KNIS.js";import{a as H}from"./chunk-USJ6ILEE.js";import{$d as he,Ca as Y,Cb as c,Db as m,Eb as k,Fb as M,Ia as h,Ib as E,Jb as A,Kb as O,Kc as ae,Mb as W,Ob as ee,Pc as j,Qb as u,Tb as R,Ub as te,Vb as B,Wb as w,Xa as a,Xc as g,Ya as _,Yc as se,Yd as ue,Zd as pe,bc as ne,cc as l,cd as D,db as I,dc as T,fc as ie,fd as le,hb as d,ib as K,jd as de,ka as P,la as $,lb as b,ma as q,mb as X,na as G,nb as x,pa as y,rd as N,sc as oe,ta as v,tb as z,tc as ce,ua as S,uc as V,va as p,vb as Z,vc as re,xb as J,ya as U}from"./chunk-JYZTRN6N.js";var Ne=e=>({"pe-none":e}),Fe=()=>["/menu/Profile/Main/My_Subscription"],Le=e=>({"text-decoration-none":e}),ze=e=>({"text-capitalize":e});function Ae(e,o){if(e&1&&(m(0,"div",1)(1,"h5",2),T(2),m(3,"a",3)(4,"u",4)(5,"span",4),T(6,"please"),k(),T(7," process your payment! "),k()()()()),e&2){let t=u();l("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),a(2),ie(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),a(),c("ngClass",V(7,Ne,t.isMySubscriptionMenu))("routerLink",ce(9,Fe)),a(),c("ngClass",V(10,Le,t.isMySubscriptionMenu)),a(),c("ngClass",V(12,ze,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var Ie=class e{constructor(o,t,i){this.document=o;this.router=t;this.authService=i}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=be;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(o){return H.IsNotEmpty(o)}overrideCssStickyHeader(){if(H.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let o=`.sticky-top-thead th {
1
+ import{a as L}from"./chunk-CS6HBROS.js";import{c as ve,j as Se,k as C,l as _e}from"./chunk-L76WVZW6.js";import{X as xe,Y as ge,oa as Ce,pa as F,xa as ye}from"./chunk-O5SLP4JK.js";import{a as me,g as ke}from"./chunk-RNLSEEMX.js";import{a as be,c as fe}from"./chunk-BVZ7ACQM.js";import{a as H}from"./chunk-USJ6ILEE.js";import{$d as he,Ca as Y,Cb as c,Db as m,Eb as k,Fb as M,Ia as h,Ib as E,Jb as A,Kb as O,Kc as ae,Mb as W,Ob as ee,Pc as j,Qb as u,Tb as R,Ub as te,Vb as B,Wb as w,Xa as a,Xc as g,Ya as _,Yc as se,Yd as ue,Zd as pe,bc as ne,cc as l,cd as D,db as I,dc as T,fc as ie,fd as le,hb as d,ib as K,jd as de,ka as P,la as $,lb as b,ma as q,mb as X,na as G,nb as x,pa as y,rd as N,sc as oe,ta as v,tb as z,tc as ce,ua as S,uc as V,va as p,vb as Z,vc as re,xb as J,ya as U}from"./chunk-JYZTRN6N.js";var Ne=e=>({"pe-none":e}),Fe=()=>["/menu/Profile/Main/My_Subscription"],Le=e=>({"text-decoration-none":e}),ze=e=>({"text-capitalize":e});function Ae(e,o){if(e&1&&(m(0,"div",1)(1,"h5",2),T(2),m(3,"a",3)(4,"u",4)(5,"span",4),T(6,"please"),k(),T(7," process your payment! "),k()()()()),e&2){let t=u();l("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),a(2),ie(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),a(),c("ngClass",V(7,Ne,t.isMySubscriptionMenu))("routerLink",ce(9,Fe)),a(),c("ngClass",V(10,Le,t.isMySubscriptionMenu)),a(),c("ngClass",V(12,ze,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var Ie=class e{constructor(o,t,i){this.document=o;this.router=t;this.authService=i}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=be;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(o){return H.IsNotEmpty(o)}overrideCssStickyHeader(){if(H.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let o=`.sticky-top-thead th {
2
2
  top: 100px !important;
3
3
  z-index: 1020;
4
4
  }`;this.htmlBodyElement=this.document.getElementsByTagName("body")[0],this.htmlStyleElement=this.document.createElement("style"),this.htmlStyleElement.appendChild(this.document.createTextNode(o)),this.htmlBodyElement.appendChild(this.htmlStyleElement)}}initSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus(),this.subscriptionStatus=[{status:1,class:"alert-warning",message:"Your subscription is overdue. To avoid suspension, "},{status:2,class:"alert-danger",message:"Your subscription is partially suspended."},{status:3,class:"alert-danger",message:"Your subscription is suspended."}],this.subscriptionState=this.subscriptionStatus.filter(o=>o.status==this.currentSubStatus)[0]}ngOnDestroy(){this.htmlBodyElement&&this.htmlBodyElement.removeChild(this.htmlStyleElement)}static \u0275fac=function(t){return new(t||e)(I(U),I(ue),I(fe))};static \u0275cmp=d({type:e,selectors:[["subscription-alert"]],decls:1,vars:1,consts:[["role","alert",3,"class"],["role","alert"],[1,"fw-normal"],[1,"alert-link",3,"ngClass","routerLink"],[3,"ngClass"]],template:function(t,i){t&1&&Z(0,Ae,8,14,"div",0),t&2&&J((i.subscriptionState==null?null:i.subscriptionState.status)==i.currentSubStatus&&i.isNotEmpty(i.currentSubStatus)?0:-1)},dependencies:[N,D,he,pe],encapsulation:2})};var Oe=["data-p-icon","check"],Me=(()=>{class e extends L{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=d({type:e,selectors:[["","data-p-icon","check"]],features:[b],attrs:Oe,decls:1,vars:0,consts:[["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(i,n){i&1&&(p(),E(0,"path",0))},encapsulation:2})}return e})();var Re=["data-p-icon","minus"],Ee=(()=>{class e extends L{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=d({type:e,selectors:[["","data-p-icon","minus"]],features:[b],attrs:Re,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(i,n){i&1&&(p(),E(0,"path",0))},encapsulation:2})}return e})();var Be=`
@@ -1 +1 @@
1
- import{a as st,b as ft}from"./chunk-6BCNB44A.js";import{a as mt}from"./chunk-IWUWV3MS.js";import{a as _t}from"./chunk-Y3AE3TKV.js";import{a as ut}from"./chunk-DLNZDHGS.js";import"./chunk-5DQ4MJJT.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-HL3ONSX6.js";import{d as dt,e as pt}from"./chunk-QPOOLLKY.js";import"./chunk-CSFFF2YO.js";import"./chunk-3RK6DDJD.js";import"./chunk-WNZKCNMC.js";import"./chunk-LOD3JYZW.js";import"./chunk-3KSZCJ6T.js";import"./chunk-6GLKD66N.js";import"./chunk-CBSYYTXQ.js";import{d as rt,e as lt}from"./chunk-GN3HVOCN.js";import"./chunk-G4IW5GPY.js";import{a as X}from"./chunk-A56Z62HU.js";import{f as ct}from"./chunk-M326IFGL.js";import{b as Z}from"./chunk-T2H2XAEJ.js";import"./chunk-SXAXSC44.js";import"./chunk-7LCG4V47.js";import"./chunk-QFON23YX.js";import"./chunk-FIUZN6JU.js";import{a as et}from"./chunk-4QM23MMO.js";import{e as ot,f as at}from"./chunk-GSAGOZJT.js";import"./chunk-JEL3OND6.js";import"./chunk-IDQUQBKL.js";import"./chunk-VX5HH3BW.js";import"./chunk-VYQEM4T2.js";import"./chunk-UTAQ3FRE.js";import"./chunk-M43HNBJQ.js";import"./chunk-KKLNFVVN.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import"./chunk-TV76G36W.js";import{b as tt}from"./chunk-EZRYO7BE.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import"./chunk-BA3BDB5Y.js";import{b as J,c as U}from"./chunk-C4WJKF7R.js";import{N as nt,g as it}from"./chunk-T25N3EEG.js";import"./chunk-7TBS7SPQ.js";import"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import{g as Y}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import{F as z}from"./chunk-RNLSEEMX.js";import"./chunk-77V3KNIS.js";import"./chunk-DQYDWBIK.js";import{d as Q}from"./chunk-USJ6ILEE.js";import"./chunk-P3RYBCCQ.js";import{Ab as N,Bb as j,Bc as d,Cb as s,Cc as f,Db as o,Dc as x,Eb as n,Ed as R,Fb as w,Hc as q,Mb as P,Ob as h,Qb as c,Xa as i,Zd as H,db as T,dc as r,ec as D,ee as K,fc as u,fd as W,hb as O,ic as g,jc as I,kc as S,lb as V,nb as E,od as A,rd as G,ta as v,tb as k,tc as b,ua as y,uc as B,vb as p,xb as m,yb as M}from"./chunk-JYZTRN6N.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","Key"),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 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,"Bought"))," ")}}function Qt(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 Jt(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,Kt,4,6,"td",33),p(6,Qt,4,6,"td",34),p(7,Jt,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(K),T(et),T(R),T(mt),T(Q),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,J,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
1
+ import{a as st,b as ft}from"./chunk-TEV65D26.js";import{a as mt}from"./chunk-IWUWV3MS.js";import{a as _t}from"./chunk-5MWGLO24.js";import{a as ut}from"./chunk-DLNZDHGS.js";import"./chunk-5DQ4MJJT.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-HL3ONSX6.js";import{d as dt,e as pt}from"./chunk-QPOOLLKY.js";import"./chunk-CSFFF2YO.js";import"./chunk-3RK6DDJD.js";import"./chunk-WNZKCNMC.js";import"./chunk-LOD3JYZW.js";import"./chunk-3KSZCJ6T.js";import"./chunk-6GLKD66N.js";import"./chunk-CBSYYTXQ.js";import{d as rt,e as lt}from"./chunk-GN3HVOCN.js";import"./chunk-G4IW5GPY.js";import{a as X}from"./chunk-BWXXYBLG.js";import{f as ct}from"./chunk-FFNEDDOO.js";import{b as Z}from"./chunk-T2H2XAEJ.js";import"./chunk-JNORDOWT.js";import"./chunk-G5VELV3S.js";import"./chunk-QFON23YX.js";import"./chunk-FIUZN6JU.js";import{a as et}from"./chunk-4QM23MMO.js";import{e as ot,f as at}from"./chunk-PKS7H624.js";import"./chunk-JEL3OND6.js";import"./chunk-IDQUQBKL.js";import"./chunk-VX5HH3BW.js";import"./chunk-VYQEM4T2.js";import"./chunk-UTAQ3FRE.js";import"./chunk-M43HNBJQ.js";import"./chunk-KKLNFVVN.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import"./chunk-4U2TXFUV.js";import{b as tt}from"./chunk-XNJ2P2ZO.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import"./chunk-BA3BDB5Y.js";import{b as J,c as U}from"./chunk-C4WJKF7R.js";import{N as nt,g as it}from"./chunk-T25N3EEG.js";import"./chunk-7TBS7SPQ.js";import"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import{g as Y}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import{F as z}from"./chunk-RNLSEEMX.js";import"./chunk-BVZ7ACQM.js";import"./chunk-7KAETFNH.js";import{d as Q}from"./chunk-USJ6ILEE.js";import"./chunk-FSBKLNRT.js";import{Ab as N,Bb as j,Bc as d,Cb as s,Cc as f,Db as o,Dc as x,Eb as n,Ed as R,Fb as w,Hc as q,Mb as P,Ob as h,Qb as c,Xa as i,Zd as H,db as T,dc as r,ec as D,ee as K,fc as u,fd as W,hb as O,ic as g,jc as I,kc as S,lb as V,nb as E,od as A,rd as G,ta as v,tb as k,tc as b,ua as y,uc as B,vb as p,xb as m,yb as M}from"./chunk-JYZTRN6N.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","Key"),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 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,"Bought"))," ")}}function Qt(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 Jt(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,Kt,4,6,"td",33),p(6,Qt,4,6,"td",34),p(7,Jt,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(K),T(et),T(R),T(mt),T(Q),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,J,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
@@ -1 +1 @@
1
- import{a as Qe}from"./chunk-46GHEHUK.js";import{a as Ae,f as Le}from"./chunk-7FC2PJIW.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-JR5LAUIS.js";import"./chunk-KYAKLZR7.js";import{b as Ge}from"./chunk-P3SYBLK4.js";import"./chunk-QIJEAKQK.js";import"./chunk-QEOGHVXA.js";import{e as Ne}from"./chunk-4HCSE44G.js";import"./chunk-KHR4NBM3.js";import"./chunk-CZIC4DAI.js";import"./chunk-H7XFYY6V.js";import"./chunk-XACC6EMJ.js";import"./chunk-Q2A4MYK3.js";import{b as be}from"./chunk-CSFFF2YO.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-WNZKCNMC.js";import"./chunk-3KSZCJ6T.js";import{d as he}from"./chunk-6GLKD66N.js";import"./chunk-CBSYYTXQ.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-GSAGOZJT.js";import"./chunk-JYJW5KAE.js";import"./chunk-JEL3OND6.js";import"./chunk-IDQUQBKL.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import{c as Oe,d as De}from"./chunk-TV76G36W.js";import{a as ve,b as Pe}from"./chunk-EZRYO7BE.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import{u as Me,v as Te,w as Ee}from"./chunk-BA3BDB5Y.js";import"./chunk-C4WJKF7R.js";import{O as q}from"./chunk-T25N3EEG.js";import{e as we,f as Ie,g as ye}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-O5SLP4JK.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-RNLSEEMX.js";import"./chunk-77V3KNIS.js";import"./chunk-DQYDWBIK.js";import"./chunk-USJ6ILEE.js";import{a as ue}from"./chunk-P3RYBCCQ.js";import{Ab as ie,Bb as ne,Bc as g,Ca as k,Cb as c,Cc as C,Db as n,Dc as me,E as Y,Eb as o,Fb as b,I as J,Jb as T,Kb as E,Mb as S,Ob as f,Oc as H,Pc as A,Qb as s,Rb as oe,Sa as Z,Sb as Q,Ub as U,Vb as V,Wb as F,Xa as a,Y as z,_b as N,aa as X,ac as re,cd as se,db as G,dc as l,ec as d,ee as Ce,fa as $,fc as v,hb as I,ic as P,jc as O,k as K,kc as D,kd as de,lb as ee,nb as y,od as ce,pa as M,rd as L,ta as u,tc as le,ua as _,uc as pe,vb as h,wc as ae,xb as x,yb as te}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};
1
+ import{a as Qe}from"./chunk-46GHEHUK.js";import{a as Ae,f as Le}from"./chunk-7WXQYKCT.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-JR5LAUIS.js";import"./chunk-KYAKLZR7.js";import{b as Ge}from"./chunk-P3SYBLK4.js";import"./chunk-QIJEAKQK.js";import"./chunk-QEOGHVXA.js";import{e as Ne}from"./chunk-4HCSE44G.js";import"./chunk-KHR4NBM3.js";import"./chunk-L2V3KTC6.js";import"./chunk-H7XFYY6V.js";import"./chunk-XACC6EMJ.js";import"./chunk-Q2A4MYK3.js";import{b as be}from"./chunk-CSFFF2YO.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-WNZKCNMC.js";import"./chunk-3KSZCJ6T.js";import{d as he}from"./chunk-6GLKD66N.js";import"./chunk-CBSYYTXQ.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-PKS7H624.js";import"./chunk-3FYNWZYY.js";import"./chunk-JEL3OND6.js";import"./chunk-IDQUQBKL.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import{c as Oe,d as De}from"./chunk-4U2TXFUV.js";import{a as ve,b as Pe}from"./chunk-XNJ2P2ZO.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import{u as Me,v as Te,w as Ee}from"./chunk-BA3BDB5Y.js";import"./chunk-C4WJKF7R.js";import{O as q}from"./chunk-T25N3EEG.js";import{e as we,f as Ie,g as ye}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-O5SLP4JK.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-RNLSEEMX.js";import"./chunk-BVZ7ACQM.js";import"./chunk-7KAETFNH.js";import"./chunk-USJ6ILEE.js";import{a as ue}from"./chunk-FSBKLNRT.js";import{Ab as ie,Bb as ne,Bc as g,Ca as k,Cb as c,Cc as C,Db as n,Dc as me,E as Y,Eb as o,Fb as b,I as J,Jb as T,Kb as E,Mb as S,Ob as f,Oc as H,Pc as A,Qb as s,Rb as oe,Sa as Z,Sb as Q,Ub as U,Vb as V,Wb as F,Xa as a,Y as z,_b as N,aa as X,ac as re,cd as se,db as G,dc as l,ec as d,ee as Ce,fa as $,fc as v,hb as I,ic as P,jc as O,k as K,kc as D,kd as de,lb as ee,nb as y,od as ce,pa as M,rd as L,ta as u,tc as le,ua as _,uc as pe,vb as h,wc as ae,xb as x,yb as te}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};