dealpos 25.50.1 → 25.50.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/browser/{chunk-WC6DBADN.js → chunk-24PYQCLS.js} +1 -1
  2. package/browser/{chunk-W26SBQKL.js → chunk-24QQSO3I.js} +1 -1
  3. package/browser/{chunk-XLKF6N3S.js → chunk-2BFJWET6.js} +1 -1
  4. package/browser/{chunk-PFIN2VSA.js → chunk-2LVKRR2R.js} +1 -1
  5. package/browser/{chunk-XAT2P7QI.js → chunk-2MVZ322B.js} +1 -1
  6. package/browser/{chunk-CMKONRKZ.js → chunk-2PV32D5Q.js} +1 -1
  7. package/browser/{chunk-KAPQ56CY.js → chunk-3QDTSIB6.js} +1 -1
  8. package/browser/{chunk-R4NTCBWJ.js → chunk-42J4XDZQ.js} +2 -2
  9. package/browser/{chunk-CCWIK546.js → chunk-54E6DGPE.js} +1 -1
  10. package/browser/{chunk-7WB7XD5V.js → chunk-54UMDIKR.js} +2 -2
  11. package/browser/{chunk-NZLZ6H6Q.js → chunk-5D6LHDW2.js} +1 -1
  12. package/browser/{chunk-TY24TZEK.js → chunk-5EDMTMQE.js} +1 -1
  13. package/browser/{chunk-VOTRMLKO.js → chunk-64YDRVDG.js} +1 -1
  14. package/browser/{chunk-BKZYMEVP.js → chunk-65FDGBJO.js} +1 -1
  15. package/browser/{chunk-B534JAF4.js → chunk-6CVIKPGY.js} +1 -1
  16. package/browser/{chunk-5Y24QJWR.js → chunk-6PBVX5TT.js} +1 -1
  17. package/browser/{chunk-S3IZOS7R.js → chunk-6QQ7TKNG.js} +2 -2
  18. package/browser/{chunk-FIHBOJV4.js → chunk-7AABZJ3Q.js} +1 -1
  19. package/browser/{chunk-EUSVY4UJ.js → chunk-7CUDTVLZ.js} +1 -1
  20. package/browser/{chunk-IGDDA2RG.js → chunk-7GCZ5FDQ.js} +1 -1
  21. package/browser/{chunk-42EJHS3A.js → chunk-7MGUJEON.js} +1 -1
  22. package/browser/{chunk-DU2VBWSN.js → chunk-7PIO3JIN.js} +1 -1
  23. package/browser/{chunk-WOLF2DPX.js → chunk-7VATOIW5.js} +1 -1
  24. package/browser/{chunk-JIE2RXLX.js → chunk-BESZUYFF.js} +3 -3
  25. package/browser/{chunk-3FAXTVQI.js → chunk-BYEJOHI5.js} +2 -2
  26. package/browser/{chunk-WK7YCGTV.js → chunk-C4DUGK4U.js} +1 -1
  27. package/browser/{chunk-TNHTSFQM.js → chunk-C6KDEINU.js} +1 -1
  28. package/browser/{chunk-L5UAK2LQ.js → chunk-CANKLN6H.js} +1 -1
  29. package/browser/{chunk-VXTQ5VEM.js → chunk-DC4YXLBE.js} +1 -1
  30. package/browser/{chunk-A72QOXN4.js → chunk-DED7477D.js} +1 -1
  31. package/browser/{chunk-TWS5PR4T.js → chunk-DGANMYLB.js} +1 -1
  32. package/browser/{chunk-34U6PVY5.js → chunk-DM3MYART.js} +1 -1
  33. package/browser/{chunk-CUDCXMJN.js → chunk-DRCWIWR4.js} +1 -1
  34. package/browser/{chunk-I3SVXKZW.js → chunk-DYZFZ736.js} +1 -1
  35. package/browser/{chunk-6ACGUR3D.js → chunk-EEJ5ZZ5K.js} +1 -1
  36. package/browser/{chunk-NYZIEOHQ.js → chunk-EGU7BITH.js} +1 -1
  37. package/browser/{chunk-JVNUQR5F.js → chunk-EO3NFUMI.js} +1 -1
  38. package/browser/{chunk-E4L4PN2C.js → chunk-GMEXYYR5.js} +1 -1
  39. package/browser/{chunk-TRCRCGLM.js → chunk-HHOJ4YQR.js} +1 -1
  40. package/browser/{chunk-DMWJZNTI.js → chunk-HVYBU6TY.js} +1 -1
  41. package/browser/{chunk-OEUCWGFD.js → chunk-J53YFCCL.js} +1 -1
  42. package/browser/{chunk-JZTKA4ST.js → chunk-JE4O3B4S.js} +1 -1
  43. package/browser/{chunk-7MCT2FSH.js → chunk-JZ5MD4LC.js} +1 -1
  44. package/browser/{chunk-JAUNAK7P.js → chunk-K3S2VA3C.js} +1 -1
  45. package/browser/{chunk-BOQBXDOK.js → chunk-KQPUNL5V.js} +1 -1
  46. package/browser/{chunk-ZT57H2NK.js → chunk-KZG4CPJW.js} +1 -1
  47. package/browser/{chunk-OQI4P5JW.js → chunk-LZ2R3WSV.js} +1 -1
  48. package/browser/{chunk-C4M7VQFI.js → chunk-MA257SYA.js} +1 -1
  49. package/browser/{chunk-RRIGLMUN.js → chunk-N6UOMCS6.js} +1 -1
  50. package/browser/{chunk-7HOW5QOQ.js → chunk-NNGM7TLL.js} +1 -1
  51. package/browser/{chunk-BEXFUC6A.js → chunk-NTXNJZOI.js} +1 -1
  52. package/browser/{chunk-7NFGGAUY.js → chunk-NZBEEY37.js} +1 -1
  53. package/browser/{chunk-HNTY7S25.js → chunk-O3WVNFF3.js} +1 -1
  54. package/browser/{chunk-BNX6XXDZ.js → chunk-O7LZALSI.js} +1 -1
  55. package/browser/{chunk-XPR2GPHE.js → chunk-OLM3XNOA.js} +1 -1
  56. package/browser/{chunk-7IKZACPQ.js → chunk-PDYPX3HL.js} +1 -1
  57. package/browser/{chunk-NEP77MPC.js → chunk-PR34T5VJ.js} +2 -2
  58. package/browser/{chunk-HGD6HRSU.js → chunk-PV6VJ5DU.js} +1 -1
  59. package/browser/{chunk-33OKCUGA.js → chunk-QBMO2OPJ.js} +1 -1
  60. package/browser/{chunk-6DMG2LMI.js → chunk-REVYYB46.js} +1 -1
  61. package/browser/{chunk-REZUKRTR.js → chunk-S7EPVPRI.js} +1 -1
  62. package/browser/{chunk-SLTQIIWW.js → chunk-SFXHBMXV.js} +1 -1
  63. package/browser/{chunk-J36LAI7P.js → chunk-SUO6DJYC.js} +1 -1
  64. package/browser/{chunk-DIFPP2ZV.js → chunk-SZB5MY63.js} +1 -1
  65. package/browser/{chunk-467KNI4M.js → chunk-SZE5I2OK.js} +1 -1
  66. package/browser/{chunk-HRM7HE6Z.js → chunk-T6FJJ74N.js} +1 -1
  67. package/browser/{chunk-CI4ULOBO.js → chunk-TBWTD5VK.js} +1 -1
  68. package/browser/{chunk-UU4IU25V.js → chunk-TKLP46GO.js} +1 -1
  69. package/browser/{chunk-E2NGOMCD.js → chunk-TNPMDRZO.js} +1 -1
  70. package/browser/{chunk-ULNAGOA3.js → chunk-U5VPMH5B.js} +1 -1
  71. package/browser/{chunk-PASO7BB6.js → chunk-UKGYRZRL.js} +1 -1
  72. package/browser/{chunk-PYSTCFF2.js → chunk-VITAWR3T.js} +1 -1
  73. package/browser/{chunk-JL4CFBF2.js → chunk-VOQLYG7T.js} +1 -1
  74. package/browser/{chunk-OWS3IW26.js → chunk-WFFRWPW6.js} +1 -1
  75. package/browser/{chunk-BFTWW3SB.js → chunk-WJKZQDGG.js} +1 -1
  76. package/browser/{chunk-OZTSXG5Y.js → chunk-WUCW3BSG.js} +1 -1
  77. package/browser/{chunk-RTYMNLFW.js → chunk-XOHCGYTO.js} +1 -1
  78. package/browser/{chunk-XSNUFD7O.js → chunk-YREC2Y5A.js} +1 -1
  79. package/browser/{chunk-VIZOMY6L.js → chunk-YZ4V72WH.js} +2 -2
  80. package/browser/{chunk-2EP6XDTW.js → chunk-Z2JW3BVY.js} +1 -1
  81. package/browser/{chunk-RSDLXHSH.js → chunk-ZE44HGGG.js} +1 -1
  82. package/browser/{chunk-4I3C6CNY.js → chunk-ZHT26XL2.js} +1 -1
  83. package/browser/{chunk-R7KECBQD.js → chunk-ZT6WLRQU.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-EWD2LJE4.js → main-E2WDTYZB.js} +2 -2
  86. package/package.json +1 -1
@@ -1 +1 @@
1
- import{a as de}from"./chunk-JZTKA4ST.js";import{e as le,f as se}from"./chunk-7HOW5QOQ.js";import"./chunk-CI4ULOBO.js";import{b as re}from"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as oe,v as ae,w as ne}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import{e as ee,f as te,g as ie}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import{a as $}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{A as J,E as Q,F as X,c as q,h as G,o as z}from"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as H}from"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import{p as W,s as Z}from"./chunk-LGOSIAUC.js";import{Ab as S,Ca as E,Cb as A,Db as Y,E as P,Eb as L,Fb as _,Fc as k,Gb as o,Gc as F,Hb as a,Ib as g,Nd as K,Pb as w,Sb as f,Ub as p,Xa as d,cc as h,eb as C,gd as B,hc as r,ib as b,ic as N,jc as I,mb as V,mc as O,nc as R,oc as x,sd as U,ta as m,ua as c,vd as j,yb as T,yc as y}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var D=(s=>(s.TRANSACTIONS="TRANSACTIONS",s.PRODUCTS="PRODUCTS",s.CONTACTS="CONTACTS",s.LOYALTY_POINTS="LOYALTY_POINTS",s.RECYCLE_BIN="RECYCLE_BIN",s.INVENTORY="INVENTORY",s))(D||{});function Ce(n,l){if(n&1&&(o(0,"div",3)(1,"div",4)(2,"div",16),g(3,"i",17),o(4,"span"),r(5),a()()()()),n&2){let i=p();d(5),I(" ",i.selectedClearData.message," ")}}function fe(n,l){n&1&&(o(0,"small",8),r(1," *Subdomain is required "),a())}function _e(n,l){n&1&&(o(0,"small",8),r(1," *Password is required "),a())}function Te(n,l){n&1&&g(0,"i",14)}function Se(n,l){n&1&&g(0,"i",15)}var v=class n{constructor(l,i,t){this.data=l;this.dialogRef=i;this.fb=t;this.modalConfig.title=this.modalTitle[this.data.type],this.subdomain="",this.subdomainPlaceholder=l.subDomain}clearData=[{type:"TRANSACTIONS",api:"Setup/Data/ClearTransaction",message:"Your Invoice, Bill, Adjustment, TransferOrder will be deleted"},{type:"PRODUCTS",api:"Setup/Data/ClearProduct",message:"Your Category, Product and Variant will be deleted"},{type:"LOYALTY_POINTS",api:"Setup/Data/ClearLoyaltyPoint"},{type:"RECYCLE_BIN",api:"Setup/Data/ClearRecycleBin"},{type:"INVENTORY",api:"Setup/Data/ClearInventory",message:"Your Product Inventory will be set to 0"},{type:"CONTACTS",api:"Setup/Data/ClearContact",message:"Your Customer, Supplier and Sales Person will be deleted"}];selectedClearData;modalConfig=new oe;modalTitle={TRANSACTIONS:"Clear Transactions",PRODUCTS:"Clear Products",LOYALTY_POINTS:"Clear Loyalty Points",RECYCLE_BIN:"Clear Recycle Bin",CONTACTS:"Clear Contacts",INVENTORY:"Clear Inventory"};subdomain;subdomainPlaceholder;password;form;passwordVisibility=E(!1);ngOnInit(){this.initSelectedClearData(),this.form=this.fb.group({subdomain:[""],password:[""]})}initSelectedClearData(){this.selectedClearData=this.clearData.find(l=>l.type===this.data.type)}onSubmit(){let l={password:this.password,subdomain:this.subdomain,apiUrl:this.selectedClearData.api};this.dialogRef.close(l)}static \u0275fac=function(i){return new(i||n)(C(te),C(ee),C(Q))};static \u0275cmp=b({type:n,selectors:[["app-confirmation-modal"]],decls:24,vars:10,consts:[["subdomainCtrl","ngModel"],["passwordCtrl","ngModel"],[3,"onOk","onClose","onCancel","config","dynamicValidated"],[1,"row"],[1,"col-12"],[1,"form-floating-outline","mt-5"],["type","text","id","subdomain","placeholder","Subdomain","name","subdomain","autofocus","","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"control-label","text-danger"],[1,"form-floating-outline"],["id","pass","placeholder","Password","name","password","required","",1,"form-control",3,"ngModelChange","type","ngModel"],["for","pass"],[1,"password-visibility"],["type","button",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-eye"],[1,"fa-solid","fa-eye-slash"],[1,"alert","alert-warning","cursor","w-100"],[1,"fa-solid","fa-circle-exclamation","me-2"]],template:function(i,t){if(i&1){let e=w();o(0,"modal-material",2),f("onOk",function(){return m(e),c(t.onSubmit())})("onClose",function(){return m(e),c(t.dialogRef.close())})("onCancel",function(){return m(e),c(t.dialogRef.close())}),o(1,"content"),T(2,Ce,6,1,"div",3),o(3,"div",3)(4,"div",4)(5,"strong"),r(6),a(),o(7,"div",5)(8,"input",6,0),x("ngModelChange",function(s){return m(e),R(t.subdomain,s)||(t.subdomain=s),c(s)}),a(),o(10,"label",7),r(11,"Subdomain"),a(),T(12,fe,2,0,"small",8),a()(),o(13,"div",4)(14,"div",9)(15,"input",10,1),x("ngModelChange",function(s){return m(e),R(t.password,s)||(t.password=s),c(s)}),a(),o(17,"label",11),r(18,"Password"),a(),T(19,_e,2,0,"small",8),o(20,"div",12)(21,"button",13),f("click",function(){return m(e),c(t.passwordVisibility.set(!t.passwordVisibility()))}),T(22,Te,1,0,"i",14)(23,Se,1,0,"i",15),a()()()()()()()}if(i&2){let e=h(9),u=h(16);_("config",t.modalConfig)("dynamicValidated",t.password&&t.subdomain),d(2),S(t.selectedClearData.message?2:-1),d(4),I("Enter the following subdomain to confirm: ",t.subdomainPlaceholder),d(2),O("ngModel",t.subdomain),d(4),S(e.invalid&&(e.dirty||e.touched)?12:-1),d(3),_("type",t.passwordVisibility()?"text":"password"),O("ngModel",t.password),d(4),S(u.invalid&&(u.dirty||u.touched)?19:-1),d(3),S(t.passwordVisibility()?22:23)}},dependencies:[ne,ae,X,q,G,J,z],styles:[".password-visibility[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);cursor:pointer;font-size:1.5rem}"]})};var M=n=>({"border border-0":n});function be(n,l){if(n&1&&(o(0,"tr",21)(1,"td",21),r(2),a(),o(3,"td",22),r(4),k(5,"number"),a()()),n&2){let i=l.$implicit,t=l.$index,e=p(2);_("ngClass",y(7,M,t==e.data.Data.length-1)),d(),_("ngClass",y(9,M,t==e.data.Data.length-1)),d(),N(i.Key),d(),_("ngClass",y(11,M,t==e.data.Data.length-1)),d(),N(F(5,5,i.Value))}}function ge(n,l){if(n&1){let i=w();o(0,"mainpanel-cmp",0)(1,"actions")(2,"div",1)(3,"div",2)(4,"button",3),r(5," Format Data "),a(),o(6,"ul",4)(7,"li")(8,"a",5),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.TRANSACTIONS))}),r(9," 1. Clear Transactions "),a()(),o(10,"li")(11,"a",6),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.INVENTORY))}),r(12," 2. Clear Inventory "),a()(),o(13,"li")(14,"a",7),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.PRODUCTS))}),r(15," 3. Clear Products "),a()(),o(16,"li")(17,"a",8),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.CONTACTS))}),r(18," 4. Clear Contacts "),a()(),o(19,"li")(20,"a",9),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.LOYALTY_POINTS))}),r(21," 5. Clear Loyalty Point "),a()(),o(22,"li")(23,"a",10),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.RECYCLE_BIN))}),r(24," 6. Clear Recycle Bin "),a()()()()()(),o(25,"content")(26,"div",11)(27,"div",12)(28,"div",13)(29,"h5"),r(30,"Database Records"),a(),o(31,"i"),r(32,"Current data count"),a()(),o(33,"div",14)(34,"div",15)(35,"div",16)(36,"table",17)(37,"thead",18)(38,"tr",19)(39,"th"),r(40,"Table"),a(),o(41,"th",20),r(42,"Rows"),a()()(),o(43,"tbody"),Y(44,be,6,13,"tr",21,A),a()()()()()()()()()}if(n&2){let i=p();_("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),d(44),L(i.data.Data)}}var me=class n extends de{constructor(i,t,e,u,s){super(i,t,"Setup/DataLoader/clearformatdata",e);this.httpService=t;this.activatedRoute=e;this.toaster=u;this.dialog=s}clearDataType=D;onClearRecord(i){this.dialog.open(v,{data:{type:i,subDomain:this.data.SubDomain}}).afterClosed().pipe(P(t=>H.IsNotEmpty(t))).subscribe(t=>{this.formData={Subdomain:t.subdomain,Password:t.password},this.onSubmit(t.apiUrl),i=="PRODUCTS"?this.data.Data.find(e=>e.Key=="Product").Value=0:i=="CONTACTS"?this.data.Data.find(e=>e.Key=="Customer").Value=0:i=="INVENTORY"?this.data.Data.find(e=>e.Key=="ItemTransfer").Value=0:i=="LOYALTY_POINTS"?this.data.Data.find(e=>e.Key=="JournalHeader").Value=0:i=="RECYCLE_BIN"?this.data.Data.find(e=>e.Key=="Recycle Bin").Value=0:i=="TRANSACTIONS"&&(this.data.Data.find(e=>e.Key=="SalesOrder").Value=0)})}onSubmitSuccess(i){this.toaster.success(i.Message,$.Success)}static \u0275fac=function(t){return new(t||n)(C(re),C(Z),C(K),C(W),C(ie))};static \u0275cmp=b({type:n,selectors:[["POS-format-data"]],features:[V],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex"],[1,"dropdown"],["type","button","data-bs-toggle","dropdown","aria-expanded","false","confirm-message","Are you sure you want to clear the record?",1,"btn","btn-outline-secondary","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end"],["role","button","matTooltipPosition","above","matTooltip","Clear Transaction",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Inventory",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Products",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Contacts",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Loyalty Point",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Recycle Bin",1,"dropdown-item",3,"click"],[1,"container","pt-3"],[1,"row","border-bottom","mt-10","ms-2"],[1,"col-sm-2"],[1,"col-sm-10"],[1,"row"],[1,"col-md-12"],["id","tableGrid",1,"table",2,"width","250px"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-end"],[3,"ngClass"],[1,"text-end",3,"ngClass"]],template:function(t,e){t&1&&T(0,ge,46,3,"mainpanel-cmp",0),t&2&&S(e.formData?0:-1)},dependencies:[j,B,se,le,U],encapsulation:2})};export{me as FormatDataComponent};
1
+ import{a as de}from"./chunk-JE4O3B4S.js";import{e as le,f as se}from"./chunk-NNGM7TLL.js";import"./chunk-TBWTD5VK.js";import{b as re}from"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as oe,v as ae,w as ne}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import{e as ee,f as te,g as ie}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import{a as $}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{A as J,E as Q,F as X,c as q,h as G,o as z}from"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as H}from"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import{p as W,s as Z}from"./chunk-LGOSIAUC.js";import{Ab as S,Ca as E,Cb as A,Db as Y,E as P,Eb as L,Fb as _,Fc as k,Gb as o,Gc as F,Hb as a,Ib as g,Nd as K,Pb as w,Sb as f,Ub as p,Xa as d,cc as h,eb as C,gd as B,hc as r,ib as b,ic as N,jc as I,mb as V,mc as O,nc as R,oc as x,sd as U,ta as m,ua as c,vd as j,yb as T,yc as y}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var D=(s=>(s.TRANSACTIONS="TRANSACTIONS",s.PRODUCTS="PRODUCTS",s.CONTACTS="CONTACTS",s.LOYALTY_POINTS="LOYALTY_POINTS",s.RECYCLE_BIN="RECYCLE_BIN",s.INVENTORY="INVENTORY",s))(D||{});function Ce(n,l){if(n&1&&(o(0,"div",3)(1,"div",4)(2,"div",16),g(3,"i",17),o(4,"span"),r(5),a()()()()),n&2){let i=p();d(5),I(" ",i.selectedClearData.message," ")}}function fe(n,l){n&1&&(o(0,"small",8),r(1," *Subdomain is required "),a())}function _e(n,l){n&1&&(o(0,"small",8),r(1," *Password is required "),a())}function Te(n,l){n&1&&g(0,"i",14)}function Se(n,l){n&1&&g(0,"i",15)}var v=class n{constructor(l,i,t){this.data=l;this.dialogRef=i;this.fb=t;this.modalConfig.title=this.modalTitle[this.data.type],this.subdomain="",this.subdomainPlaceholder=l.subDomain}clearData=[{type:"TRANSACTIONS",api:"Setup/Data/ClearTransaction",message:"Your Invoice, Bill, Adjustment, TransferOrder will be deleted"},{type:"PRODUCTS",api:"Setup/Data/ClearProduct",message:"Your Category, Product and Variant will be deleted"},{type:"LOYALTY_POINTS",api:"Setup/Data/ClearLoyaltyPoint"},{type:"RECYCLE_BIN",api:"Setup/Data/ClearRecycleBin"},{type:"INVENTORY",api:"Setup/Data/ClearInventory",message:"Your Product Inventory will be set to 0"},{type:"CONTACTS",api:"Setup/Data/ClearContact",message:"Your Customer, Supplier and Sales Person will be deleted"}];selectedClearData;modalConfig=new oe;modalTitle={TRANSACTIONS:"Clear Transactions",PRODUCTS:"Clear Products",LOYALTY_POINTS:"Clear Loyalty Points",RECYCLE_BIN:"Clear Recycle Bin",CONTACTS:"Clear Contacts",INVENTORY:"Clear Inventory"};subdomain;subdomainPlaceholder;password;form;passwordVisibility=E(!1);ngOnInit(){this.initSelectedClearData(),this.form=this.fb.group({subdomain:[""],password:[""]})}initSelectedClearData(){this.selectedClearData=this.clearData.find(l=>l.type===this.data.type)}onSubmit(){let l={password:this.password,subdomain:this.subdomain,apiUrl:this.selectedClearData.api};this.dialogRef.close(l)}static \u0275fac=function(i){return new(i||n)(C(te),C(ee),C(Q))};static \u0275cmp=b({type:n,selectors:[["app-confirmation-modal"]],decls:24,vars:10,consts:[["subdomainCtrl","ngModel"],["passwordCtrl","ngModel"],[3,"onOk","onClose","onCancel","config","dynamicValidated"],[1,"row"],[1,"col-12"],[1,"form-floating-outline","mt-5"],["type","text","id","subdomain","placeholder","Subdomain","name","subdomain","autofocus","","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"control-label","text-danger"],[1,"form-floating-outline"],["id","pass","placeholder","Password","name","password","required","",1,"form-control",3,"ngModelChange","type","ngModel"],["for","pass"],[1,"password-visibility"],["type","button",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-eye"],[1,"fa-solid","fa-eye-slash"],[1,"alert","alert-warning","cursor","w-100"],[1,"fa-solid","fa-circle-exclamation","me-2"]],template:function(i,t){if(i&1){let e=w();o(0,"modal-material",2),f("onOk",function(){return m(e),c(t.onSubmit())})("onClose",function(){return m(e),c(t.dialogRef.close())})("onCancel",function(){return m(e),c(t.dialogRef.close())}),o(1,"content"),T(2,Ce,6,1,"div",3),o(3,"div",3)(4,"div",4)(5,"strong"),r(6),a(),o(7,"div",5)(8,"input",6,0),x("ngModelChange",function(s){return m(e),R(t.subdomain,s)||(t.subdomain=s),c(s)}),a(),o(10,"label",7),r(11,"Subdomain"),a(),T(12,fe,2,0,"small",8),a()(),o(13,"div",4)(14,"div",9)(15,"input",10,1),x("ngModelChange",function(s){return m(e),R(t.password,s)||(t.password=s),c(s)}),a(),o(17,"label",11),r(18,"Password"),a(),T(19,_e,2,0,"small",8),o(20,"div",12)(21,"button",13),f("click",function(){return m(e),c(t.passwordVisibility.set(!t.passwordVisibility()))}),T(22,Te,1,0,"i",14)(23,Se,1,0,"i",15),a()()()()()()()}if(i&2){let e=h(9),u=h(16);_("config",t.modalConfig)("dynamicValidated",t.password&&t.subdomain),d(2),S(t.selectedClearData.message?2:-1),d(4),I("Enter the following subdomain to confirm: ",t.subdomainPlaceholder),d(2),O("ngModel",t.subdomain),d(4),S(e.invalid&&(e.dirty||e.touched)?12:-1),d(3),_("type",t.passwordVisibility()?"text":"password"),O("ngModel",t.password),d(4),S(u.invalid&&(u.dirty||u.touched)?19:-1),d(3),S(t.passwordVisibility()?22:23)}},dependencies:[ne,ae,X,q,G,J,z],styles:[".password-visibility[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);cursor:pointer;font-size:1.5rem}"]})};var M=n=>({"border border-0":n});function be(n,l){if(n&1&&(o(0,"tr",21)(1,"td",21),r(2),a(),o(3,"td",22),r(4),k(5,"number"),a()()),n&2){let i=l.$implicit,t=l.$index,e=p(2);_("ngClass",y(7,M,t==e.data.Data.length-1)),d(),_("ngClass",y(9,M,t==e.data.Data.length-1)),d(),N(i.Key),d(),_("ngClass",y(11,M,t==e.data.Data.length-1)),d(),N(F(5,5,i.Value))}}function ge(n,l){if(n&1){let i=w();o(0,"mainpanel-cmp",0)(1,"actions")(2,"div",1)(3,"div",2)(4,"button",3),r(5," Format Data "),a(),o(6,"ul",4)(7,"li")(8,"a",5),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.TRANSACTIONS))}),r(9," 1. Clear Transactions "),a()(),o(10,"li")(11,"a",6),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.INVENTORY))}),r(12," 2. Clear Inventory "),a()(),o(13,"li")(14,"a",7),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.PRODUCTS))}),r(15," 3. Clear Products "),a()(),o(16,"li")(17,"a",8),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.CONTACTS))}),r(18," 4. Clear Contacts "),a()(),o(19,"li")(20,"a",9),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.LOYALTY_POINTS))}),r(21," 5. Clear Loyalty Point "),a()(),o(22,"li")(23,"a",10),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.RECYCLE_BIN))}),r(24," 6. Clear Recycle Bin "),a()()()()()(),o(25,"content")(26,"div",11)(27,"div",12)(28,"div",13)(29,"h5"),r(30,"Database Records"),a(),o(31,"i"),r(32,"Current data count"),a()(),o(33,"div",14)(34,"div",15)(35,"div",16)(36,"table",17)(37,"thead",18)(38,"tr",19)(39,"th"),r(40,"Table"),a(),o(41,"th",20),r(42,"Rows"),a()()(),o(43,"tbody"),Y(44,be,6,13,"tr",21,A),a()()()()()()()()()}if(n&2){let i=p();_("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),d(44),L(i.data.Data)}}var me=class n extends de{constructor(i,t,e,u,s){super(i,t,"Setup/DataLoader/clearformatdata",e);this.httpService=t;this.activatedRoute=e;this.toaster=u;this.dialog=s}clearDataType=D;onClearRecord(i){this.dialog.open(v,{data:{type:i,subDomain:this.data.SubDomain}}).afterClosed().pipe(P(t=>H.IsNotEmpty(t))).subscribe(t=>{this.formData={Subdomain:t.subdomain,Password:t.password},this.onSubmit(t.apiUrl),i=="PRODUCTS"?this.data.Data.find(e=>e.Key=="Product").Value=0:i=="CONTACTS"?this.data.Data.find(e=>e.Key=="Customer").Value=0:i=="INVENTORY"?this.data.Data.find(e=>e.Key=="ItemTransfer").Value=0:i=="LOYALTY_POINTS"?this.data.Data.find(e=>e.Key=="JournalHeader").Value=0:i=="RECYCLE_BIN"?this.data.Data.find(e=>e.Key=="Recycle Bin").Value=0:i=="TRANSACTIONS"&&(this.data.Data.find(e=>e.Key=="SalesOrder").Value=0)})}onSubmitSuccess(i){this.toaster.success(i.Message,$.Success)}static \u0275fac=function(t){return new(t||n)(C(re),C(Z),C(K),C(W),C(ie))};static \u0275cmp=b({type:n,selectors:[["POS-format-data"]],features:[V],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex"],[1,"dropdown"],["type","button","data-bs-toggle","dropdown","aria-expanded","false","confirm-message","Are you sure you want to clear the record?",1,"btn","btn-outline-secondary","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end"],["role","button","matTooltipPosition","above","matTooltip","Clear Transaction",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Inventory",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Products",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Contacts",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Loyalty Point",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Recycle Bin",1,"dropdown-item",3,"click"],[1,"container","pt-3"],[1,"row","border-bottom","mt-10","ms-2"],[1,"col-sm-2"],[1,"col-sm-10"],[1,"row"],[1,"col-md-12"],["id","tableGrid",1,"table",2,"width","250px"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-end"],[3,"ngClass"],[1,"text-end",3,"ngClass"]],template:function(t,e){t&1&&T(0,ge,46,3,"mainpanel-cmp",0),t&2&&S(e.formData?0:-1)},dependencies:[j,B,se,le,U],encapsulation:2})};export{me as FormatDataComponent};
@@ -1 +1 @@
1
- import{e as v,f as y}from"./chunk-7HOW5QOQ.js";import"./chunk-CI4ULOBO.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import"./chunk-LGOSIAUC.js";import{Fb as h,Gb as o,Hb as i,Ib as g,Pd as M,Sd as u,Xa as c,eb as l,hc as n,ib as f,ic as x,jb as m,ma as a,vd as z}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var s=class e{constructor(r){this.router=r;this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(l(M))};static \u0275cmp=f({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,d){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),n(7,"You are not authorized"),i(),o(8,"p"),n(9," This page require "),o(10,"span",5),n(11),i(),n(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(h("pageData",d.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),c(11),x(d.role))},dependencies:[v],encapsulation:2})};var U=[{path:"Main/Unauthorized",component:s},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],p=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[u.forChild(U),u]})};var S=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[z,p,y]})};export{S as UnauthorizedModule};
1
+ import{e as v,f as y}from"./chunk-NNGM7TLL.js";import"./chunk-TBWTD5VK.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import"./chunk-LGOSIAUC.js";import{Fb as h,Gb as o,Hb as i,Ib as g,Pd as M,Sd as u,Xa as c,eb as l,hc as n,ib as f,ic as x,jb as m,ma as a,vd as z}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var s=class e{constructor(r){this.router=r;this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(l(M))};static \u0275cmp=f({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,d){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),n(7,"You are not authorized"),i(),o(8,"p"),n(9," This page require "),o(10,"span",5),n(11),i(),n(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(h("pageData",d.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),c(11),x(d.role))},dependencies:[v],encapsulation:2})};var U=[{path:"Main/Unauthorized",component:s},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],p=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[u.forChild(U),u]})};var S=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[z,p,y]})};export{S as UnauthorizedModule};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-XMZLK7EB.js";import{a as ve}from"./chunk-JZTKA4ST.js";import{a as Ce}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-7HOW5QOQ.js";import"./chunk-CI4ULOBO.js";import{b as se}from"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as pe,v as me,w as ue}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as k}from"./chunk-TEGIL5RZ.js";import{e as ae,f as le,g as de}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import{b as re}from"./chunk-WFQIMZGL.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import{p as z,s as ie}from"./chunk-LGOSIAUC.js";import{Ab as u,Bb as O,Ca as V,Db as U,E as T,Eb as H,Fb as p,Gb as i,Hb as r,Ib as c,Lc as K,Nd as W,Ob as $,Oc as L,Pb as G,Sb as v,Ub as C,Xa as l,cc as j,eb as f,gd as M,hc as a,ib as y,ic as x,jc as w,mb as A,nd as B,ob as I,pa as _,t as D,ta as P,ua as E,vd as R,yb as m,yc as b,zc as q}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
1
+ import{a as ge}from"./chunk-XMZLK7EB.js";import{a as ve}from"./chunk-JE4O3B4S.js";import{a as Ce}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-NNGM7TLL.js";import"./chunk-TBWTD5VK.js";import{b as se}from"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as pe,v as me,w as ue}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as k}from"./chunk-TEGIL5RZ.js";import{e as ae,f as le,g as de}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import{b as re}from"./chunk-WFQIMZGL.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import{p as z,s as ie}from"./chunk-LGOSIAUC.js";import{Ab as u,Bb as O,Ca as V,Db as U,E as T,Eb as H,Fb as p,Gb as i,Hb as r,Ib as c,Lc as K,Nd as W,Ob as $,Oc as L,Pb as G,Sb as v,Ub as C,Xa as l,cc as j,eb as f,gd as M,hc as a,ib as y,ic as x,jc as w,mb as A,nd as B,ob as I,pa as _,t as D,ta as P,ua as E,vd as R,yb as m,yc as b,zc as q}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
@@ -1 +1 @@
1
- import{a}from"./chunk-7NFGGAUY.js";import"./chunk-TY24TZEK.js";import"./chunk-AQW4VS3Y.js";import"./chunk-4W3WYXI2.js";import"./chunk-HRM7HE6Z.js";import"./chunk-XAT2P7QI.js";import"./chunk-VXPORXGI.js";import"./chunk-RSDLXHSH.js";import"./chunk-OEUCWGFD.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import"./chunk-J6M7UWVR.js";import"./chunk-7HOW5QOQ.js";import"./chunk-BNX6XXDZ.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-CI4ULOBO.js";import"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import"./chunk-LGOSIAUC.js";import"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";export{a as CompositeInventoryComponent};
1
+ import{a}from"./chunk-NZBEEY37.js";import"./chunk-5EDMTMQE.js";import"./chunk-AQW4VS3Y.js";import"./chunk-4W3WYXI2.js";import"./chunk-T6FJJ74N.js";import"./chunk-2MVZ322B.js";import"./chunk-VXPORXGI.js";import"./chunk-ZE44HGGG.js";import"./chunk-J53YFCCL.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import"./chunk-J6M7UWVR.js";import"./chunk-NNGM7TLL.js";import"./chunk-O7LZALSI.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-TBWTD5VK.js";import"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import"./chunk-LGOSIAUC.js";import"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";export{a as CompositeInventoryComponent};
@@ -1 +1 @@
1
- import{a as ae,b as le}from"./chunk-COA4UL2V.js";import"./chunk-32QBWLTN.js";import{a as ie}from"./chunk-FPRM3L6U.js";import"./chunk-M3DKYPGC.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{e as de,f as ce}from"./chunk-7HOW5QOQ.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-CI4ULOBO.js";import{a as pe,b as me}from"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as H}from"./chunk-TEGIL5RZ.js";import{d as ue,e as se}from"./chunk-THT6CY5E.js";import{a as re}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as te,c as Y,h as Z,o as ee}from"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import{b as oe}from"./chunk-WFQIMZGL.js";import{a as h}from"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import{s as ne}from"./chunk-LGOSIAUC.js";import{Ab as C,Ca as D,Cb as T,Db as V,Eb as k,Fb as s,Fc as d,Gb as o,Gc as f,Hb as r,Hc as A,Ib as O,Lc as j,Nd as K,Pb as w,Qa as L,Qd as Q,Sb as G,Sd as X,Ub as u,Xa as l,Y as b,eb as M,fa as R,hc as p,ib as U,ic as g,mb as B,mc as P,nc as I,ob as F,oc as E,od as q,pa as v,pc as N,qd as z,ta as c,ua as _,vd as J,xc as W,yb as y,yc as $}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as x,b as S}from"./chunk-SNAKHGZS.js";var ge=()=>["/menu/Users/User/Groups/Info"],fe=i=>({ID:i});function he(i,m){if(i&1){let e=w();o(0,"div",9)(1,"h6"),p(2,"Group"),r(),o(3,"ng-select",10),E("ngModelChange",function(t){c(e);let a=u(2);return I(a.filter().GroupID,t)||(a.filter().GroupID=t),_(t)}),r(),o(4,"h6"),p(5,"Row Count"),r(),o(6,"input",11),E("ngModelChange",function(t){c(e);let a=u(2);return I(a.filter().RowCount,t)||(a.filter().RowCount=t),_(t)}),r()()}if(i&2){let e=u(2);l(3),s("items",e.options().Groups),P("ngModel",e.filter().GroupID),l(3),s("max",1e4),P("ngModel",e.filter().RowCount)}}function ye(i,m){if(i&1&&(o(0,"a",12),p(1),r()),i&2){let e=u().$implicit;s("routerLink",W(3,ge))("queryParams",$(4,fe,e._source==null||e._source.Log==null?null:e._source.Log.id)),l(),g(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function Ce(i,m){if(i&1&&(o(0,"span"),p(1),r()),i&2){let e=u().$implicit;l(),g(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function xe(i,m){if(i&1&&(o(0,"tr",7)(1,"td"),y(2,ye,2,6,"a",12),y(3,Ce,2,1,"span"),r(),o(4,"td"),p(5),d(6,"date"),r(),o(7,"td"),p(8),r(),O(9,"td",13),d(10,"newlines"),r()),i&2){let e=m.$implicit,n=u(2);l(2),C(n.role.users.Edit?2:-1),l(),C(n.role.users.Edit?-1:3),l(2),g(A(6,5,e._source["@timestamp"],"dd MMM yyyy HH:mm")),l(3),g(e._source==null||e._source.Log==null?null:e._source.Log.creator),l(),s("innerHtml",f(10,8,e._source==null||e._source.Log==null?null:e._source.Log.note),L)}}function Se(i,m){if(i&1){let e=w();o(0,"mainpanel-cmp",2),G("onSubmit",function(){c(e);let t=u();return _(t.initData())}),o(1,"filters"),F(2,he,7,4,"ng-template",null,0,j),r(),o(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr")(10,"th"),p(11,"Group"),r(),o(12,"th"),p(13,"Modified"),r(),o(14,"th"),p(15,"Modify By"),r(),o(16,"th"),p(17,"Note"),r()()(),o(18,"tbody"),V(19,xe,11,10,"tr",7,T),d(21,"async"),r()(),o(22,"div"),N(23),d(24,"async"),o(25,"mat-paginator",8),G("page",function(t){c(e);let a=u();return _(a.onPaginationChange(t))}),r()()()()()()}if(i&2){let e,n,t=u();s("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),l(19),k((e=f(21,6,t.data$))==null||e.Data==null?null:e.Data.hits);let a=(n=f(24,8,t.data$))==null||n.Data==null||n.Data.hits==null?null:n.Data.hits.length;l(6),s("length",a)("pageSize",t.filter().RowCount)("pageIndex",t.filter().PageNumber==0?0:t.filter().PageNumber-1)}}var _e=class i extends pe{constructor(e,n){super(e);this.role=n;this.menuData$.pipe(re()).subscribe();let t=this.routeSnapshot.snapshot?.queryParams?.ID;h.IsNotEmpty(t)&&(this.filter.update(a=>S(x({},a),{GroupID:t})),this.initData())}httpService=v(ne);routeSnapshot=v(K);filter=D({PageNumber:1,RowCount:20,GroupID:h.GuidEmpty});options=D({Groups:[]});loader$=this.httpService.get(H.GroupHistoryLoader).pipe(R(e=>{this.options.set(e.Options),this.initData()}),b(1));data$;initData(){let e=h.IsNotEmpty(this.filter().GroupID)?this.filter().GroupID:h.GuidEmpty;this.data$=this.httpService.get(H.GroupHistoryData,[{key:"PageNumber",value:this.filter().PageNumber},{key:"RowCount",value:this.filter().RowCount},{key:"GroupID",value:e}]).pipe(b(1))}onPaginationChange(e){this.filter.update(n=>S(x({},n),{PageNumber:e.pageIndex+1})),this.initData()}static \u0275fac=function(n){return new(n||i)(M(me),M(oe))};static \u0275cmp=U({type:i,selectors:[["app-group-update-history"]],features:[B],decls:3,vars:3,consts:[["pageFilterTemplate",""],["searchBoxPlaceholder","Search Note...",3,"pageData","isFilterOnDropdown","hideSearchBox"],["searchBoxPlaceholder","Search Note...",3,"onSubmit","pageData","isFilterOnDropdown","hideSearchBox"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"border-bottom"],[3,"page","length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group","appendTo","body",3,"ngModelChange","items","ngModel"],["type","text","autoNum","",1,"input-left","w-100","form-control","input-filter",3,"ngModelChange","max","ngModel"],[3,"routerLink","queryParams"],[3,"innerHtml"]],template:function(n,t){if(n&1&&(N(0),d(1,"async"),y(2,Se,26,10,"mainpanel-cmp",1)),n&2){let a=f(1,1,t.loader$);l(2),C(a?2:-1)}},dependencies:[J,ce,de,le,ae,X,Q,te,Y,Z,ee,se,ue,q,z,ie],encapsulation:2})};export{_e as GroupUpdateHistoryComponent};
1
+ import{a as ae,b as le}from"./chunk-COA4UL2V.js";import"./chunk-32QBWLTN.js";import{a as ie}from"./chunk-FPRM3L6U.js";import"./chunk-M3DKYPGC.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{e as de,f as ce}from"./chunk-NNGM7TLL.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-TBWTD5VK.js";import{a as pe,b as me}from"./chunk-DRCWIWR4.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as H}from"./chunk-TEGIL5RZ.js";import{d as ue,e as se}from"./chunk-THT6CY5E.js";import{a as re}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as te,c as Y,h as Z,o as ee}from"./chunk-DWZ5JTI2.js";import"./chunk-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import{b as oe}from"./chunk-WFQIMZGL.js";import{a as h}from"./chunk-WUV22SZ4.js";import"./chunk-DED7477D.js";import{s as ne}from"./chunk-LGOSIAUC.js";import{Ab as C,Ca as D,Cb as T,Db as V,Eb as k,Fb as s,Fc as d,Gb as o,Gc as f,Hb as r,Hc as A,Ib as O,Lc as j,Nd as K,Pb as w,Qa as L,Qd as Q,Sb as G,Sd as X,Ub as u,Xa as l,Y as b,eb as M,fa as R,hc as p,ib as U,ic as g,mb as B,mc as P,nc as I,ob as F,oc as E,od as q,pa as v,pc as N,qd as z,ta as c,ua as _,vd as J,xc as W,yb as y,yc as $}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as x,b as S}from"./chunk-SNAKHGZS.js";var ge=()=>["/menu/Users/User/Groups/Info"],fe=i=>({ID:i});function he(i,m){if(i&1){let e=w();o(0,"div",9)(1,"h6"),p(2,"Group"),r(),o(3,"ng-select",10),E("ngModelChange",function(t){c(e);let a=u(2);return I(a.filter().GroupID,t)||(a.filter().GroupID=t),_(t)}),r(),o(4,"h6"),p(5,"Row Count"),r(),o(6,"input",11),E("ngModelChange",function(t){c(e);let a=u(2);return I(a.filter().RowCount,t)||(a.filter().RowCount=t),_(t)}),r()()}if(i&2){let e=u(2);l(3),s("items",e.options().Groups),P("ngModel",e.filter().GroupID),l(3),s("max",1e4),P("ngModel",e.filter().RowCount)}}function ye(i,m){if(i&1&&(o(0,"a",12),p(1),r()),i&2){let e=u().$implicit;s("routerLink",W(3,ge))("queryParams",$(4,fe,e._source==null||e._source.Log==null?null:e._source.Log.id)),l(),g(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function Ce(i,m){if(i&1&&(o(0,"span"),p(1),r()),i&2){let e=u().$implicit;l(),g(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function xe(i,m){if(i&1&&(o(0,"tr",7)(1,"td"),y(2,ye,2,6,"a",12),y(3,Ce,2,1,"span"),r(),o(4,"td"),p(5),d(6,"date"),r(),o(7,"td"),p(8),r(),O(9,"td",13),d(10,"newlines"),r()),i&2){let e=m.$implicit,n=u(2);l(2),C(n.role.users.Edit?2:-1),l(),C(n.role.users.Edit?-1:3),l(2),g(A(6,5,e._source["@timestamp"],"dd MMM yyyy HH:mm")),l(3),g(e._source==null||e._source.Log==null?null:e._source.Log.creator),l(),s("innerHtml",f(10,8,e._source==null||e._source.Log==null?null:e._source.Log.note),L)}}function Se(i,m){if(i&1){let e=w();o(0,"mainpanel-cmp",2),G("onSubmit",function(){c(e);let t=u();return _(t.initData())}),o(1,"filters"),F(2,he,7,4,"ng-template",null,0,j),r(),o(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr")(10,"th"),p(11,"Group"),r(),o(12,"th"),p(13,"Modified"),r(),o(14,"th"),p(15,"Modify By"),r(),o(16,"th"),p(17,"Note"),r()()(),o(18,"tbody"),V(19,xe,11,10,"tr",7,T),d(21,"async"),r()(),o(22,"div"),N(23),d(24,"async"),o(25,"mat-paginator",8),G("page",function(t){c(e);let a=u();return _(a.onPaginationChange(t))}),r()()()()()()}if(i&2){let e,n,t=u();s("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),l(19),k((e=f(21,6,t.data$))==null||e.Data==null?null:e.Data.hits);let a=(n=f(24,8,t.data$))==null||n.Data==null||n.Data.hits==null?null:n.Data.hits.length;l(6),s("length",a)("pageSize",t.filter().RowCount)("pageIndex",t.filter().PageNumber==0?0:t.filter().PageNumber-1)}}var _e=class i extends pe{constructor(e,n){super(e);this.role=n;this.menuData$.pipe(re()).subscribe();let t=this.routeSnapshot.snapshot?.queryParams?.ID;h.IsNotEmpty(t)&&(this.filter.update(a=>S(x({},a),{GroupID:t})),this.initData())}httpService=v(ne);routeSnapshot=v(K);filter=D({PageNumber:1,RowCount:20,GroupID:h.GuidEmpty});options=D({Groups:[]});loader$=this.httpService.get(H.GroupHistoryLoader).pipe(R(e=>{this.options.set(e.Options),this.initData()}),b(1));data$;initData(){let e=h.IsNotEmpty(this.filter().GroupID)?this.filter().GroupID:h.GuidEmpty;this.data$=this.httpService.get(H.GroupHistoryData,[{key:"PageNumber",value:this.filter().PageNumber},{key:"RowCount",value:this.filter().RowCount},{key:"GroupID",value:e}]).pipe(b(1))}onPaginationChange(e){this.filter.update(n=>S(x({},n),{PageNumber:e.pageIndex+1})),this.initData()}static \u0275fac=function(n){return new(n||i)(M(me),M(oe))};static \u0275cmp=U({type:i,selectors:[["app-group-update-history"]],features:[B],decls:3,vars:3,consts:[["pageFilterTemplate",""],["searchBoxPlaceholder","Search Note...",3,"pageData","isFilterOnDropdown","hideSearchBox"],["searchBoxPlaceholder","Search Note...",3,"onSubmit","pageData","isFilterOnDropdown","hideSearchBox"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"border-bottom"],[3,"page","length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group","appendTo","body",3,"ngModelChange","items","ngModel"],["type","text","autoNum","",1,"input-left","w-100","form-control","input-filter",3,"ngModelChange","max","ngModel"],[3,"routerLink","queryParams"],[3,"innerHtml"]],template:function(n,t){if(n&1&&(N(0),d(1,"async"),y(2,Se,26,10,"mainpanel-cmp",1)),n&2){let a=f(1,1,t.loader$);l(2),C(a?2:-1)}},dependencies:[J,ce,de,le,ae,X,Q,te,Y,Z,ee,se,ue,q,z,ie],encapsulation:2})};export{_e as GroupUpdateHistoryComponent};
@@ -1 +1 @@
1
- import{a as U}from"./chunk-UU4IU25V.js";import{a as O}from"./chunk-36GWLMZX.js";import{b as R}from"./chunk-WFQIMZGL.js";import{a as f}from"./chunk-WUV22SZ4.js";import{s as h}from"./chunk-LGOSIAUC.js";import{Ma as v,Pd as C,fa as S,la as u,oa as p,pa as g,wd as N,ya as d}from"./chunk-IEVGW2RT.js";var k=(t=>(t[t.PAID=0]="PAID",t[t.OVERDUE=1]="OVERDUE",t[t.SELL_ONLY=2]="SELL_ONLY",t[t.SUSPENDED=3]="SUSPENDED",t))(k||{});var D=(()=>{let e=class e{constructor(){this.document=g(d),this.platformId=g(v),this.documentIsAccessible=N(this.platformId)}static getCookieRegExp(i){let t=i.replace(/([[\]{}()|=;+?,.*^$\\])/gi,"\\$1");return new RegExp("(?:^"+t+"|;\\s*"+t+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(i){try{return decodeURIComponent(i)}catch{return i}}check(i){return this.documentIsAccessible?(i=encodeURIComponent(i),e.getCookieRegExp(i).test(this.document.cookie)):!1}get(i){if(this.check(i)){i=encodeURIComponent(i);let n=e.getCookieRegExp(i).exec(this.document.cookie);return n?.[1]?e.safeDecodeURIComponent(n[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let i={},t=this.document;return t.cookie&&t.cookie!==""&&t.cookie.split(";").forEach(n=>{let[s,c]=n.split("=");i[e.safeDecodeURIComponent(s.replace(/^ /,""))]=e.safeDecodeURIComponent(c)}),i}set(i,t,n,s,c,l,T,b){if(!this.documentIsAccessible)return;if(typeof n=="number"||n instanceof Date||s||c||l||T){let I={expires:n,path:s,domain:c,secure:l,sameSite:T||"Lax",partitioned:b};this.set(i,t,I);return}let a=encodeURIComponent(i)+"="+encodeURIComponent(t)+";",r=n||{};if(r.expires)if(typeof r.expires=="number"){let I=new Date(new Date().getTime()+r.expires*1e3*60*60*24);a+="expires="+I.toUTCString()+";"}else a+="expires="+r.expires.toUTCString()+";";r.path&&(a+="path="+r.path+";"),r.domain&&(a+="domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${i} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(a+="secure;"),r.sameSite||(r.sameSite="Lax"),a+="sameSite="+r.sameSite+";",r.partitioned&&(a+="Partitioned;"),this.document.cookie=a}delete(i,t,n,s,c="Lax"){if(!this.documentIsAccessible)return;let l=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(i,"",{expires:l,path:t,domain:n,secure:s,sameSite:c})}deleteAll(i,t,n,s="Lax"){if(!this.documentIsAccessible)return;let c=this.getAll();for(let l in c)c.hasOwnProperty(l)&&this.delete(l,i,t,n,s)}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=u({token:e,factory:e.\u0275fac,providedIn:"root"});let m=e;return m})();var E=class m{constructor(e,o,i,t,n,s){this.httpService=e;this.cookieService=o;this.router=i;this.roleService=t;this.intercomService=n;this.fraction=s}role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(e){this._returnUrl=e}get returnUrl(){return this._returnUrl}login(e){return this.httpService.post("/api/Login/Web",e).pipe(S(o=>{this._loginResponse=o,o.Type=="geo"||o.Type=="totp"||this.saveLoginConfigToStorage(o)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let e=this.getSubscriptionStatus(),o=this.getRedirectUrlByRole();return(e==2||e==3)&&(o="/menu/Profile/Main/My_Subscription"),o}getRedirectUrlByRole(){let e,o=this.roleService;return o.dashboard.View?e="/menu/Dashboard":o.product.View?e="/menu/Products":e="/menu/Sell",e}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(e=>{localStorage.removeItem("Token"),localStorage.setItem("Token",e.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let e=localStorage.getItem("Token");if(e){let o=f.parseJwt(e),i=this.convertUnixTimesTamp(o.exp),t=new Date;if(i.getTime()-t.getTime()>0)return!1}return!0}isInRole(e){e.forEach(o=>o(this.role))}convertUnixTimesTamp(e){return new Date(e*1e3)}saveLoginConfigToStorage(e){localStorage.setItem("quantityFraction",JSON.stringify(e.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(e.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(e.UIConfig.Fraction.Amount.Minimum,e.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(e.UIConfig.Fraction.Quantity.Minimum,e.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(e?.AccountInfo)),localStorage.setItem("Token",e?.Token),localStorage.setItem("TinyMCEPlugins",e?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(e?.Intercom),localStorage.setItem("CloudinaryConfig",e?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",e?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(e?.SubscriptionStatus));let o=this.getParseToken();f.IsNotEmpty(o?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",o?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let e=localStorage.getItem("Token");return e&&!this._jwtToken&&(this._jwtToken=f.parseJwt(e)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let e=localStorage.getItem("SubscriptionStatus");return e?parseInt(e):null}static \u0275fac=function(o){return new(o||m)(p(h),p(D),p(C),p(R),p(U),p(O))};static \u0275prov=u({token:m,factory:m.\u0275fac,providedIn:"root"})};export{k as a,D as b,E as c};
1
+ import{a as U}from"./chunk-TKLP46GO.js";import{a as O}from"./chunk-36GWLMZX.js";import{b as R}from"./chunk-WFQIMZGL.js";import{a as f}from"./chunk-WUV22SZ4.js";import{s as h}from"./chunk-LGOSIAUC.js";import{Ma as v,Pd as C,fa as S,la as u,oa as p,pa as g,wd as N,ya as d}from"./chunk-IEVGW2RT.js";var k=(t=>(t[t.PAID=0]="PAID",t[t.OVERDUE=1]="OVERDUE",t[t.SELL_ONLY=2]="SELL_ONLY",t[t.SUSPENDED=3]="SUSPENDED",t))(k||{});var D=(()=>{let e=class e{constructor(){this.document=g(d),this.platformId=g(v),this.documentIsAccessible=N(this.platformId)}static getCookieRegExp(i){let t=i.replace(/([[\]{}()|=;+?,.*^$\\])/gi,"\\$1");return new RegExp("(?:^"+t+"|;\\s*"+t+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(i){try{return decodeURIComponent(i)}catch{return i}}check(i){return this.documentIsAccessible?(i=encodeURIComponent(i),e.getCookieRegExp(i).test(this.document.cookie)):!1}get(i){if(this.check(i)){i=encodeURIComponent(i);let n=e.getCookieRegExp(i).exec(this.document.cookie);return n?.[1]?e.safeDecodeURIComponent(n[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let i={},t=this.document;return t.cookie&&t.cookie!==""&&t.cookie.split(";").forEach(n=>{let[s,c]=n.split("=");i[e.safeDecodeURIComponent(s.replace(/^ /,""))]=e.safeDecodeURIComponent(c)}),i}set(i,t,n,s,c,l,T,b){if(!this.documentIsAccessible)return;if(typeof n=="number"||n instanceof Date||s||c||l||T){let I={expires:n,path:s,domain:c,secure:l,sameSite:T||"Lax",partitioned:b};this.set(i,t,I);return}let a=encodeURIComponent(i)+"="+encodeURIComponent(t)+";",r=n||{};if(r.expires)if(typeof r.expires=="number"){let I=new Date(new Date().getTime()+r.expires*1e3*60*60*24);a+="expires="+I.toUTCString()+";"}else a+="expires="+r.expires.toUTCString()+";";r.path&&(a+="path="+r.path+";"),r.domain&&(a+="domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${i} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(a+="secure;"),r.sameSite||(r.sameSite="Lax"),a+="sameSite="+r.sameSite+";",r.partitioned&&(a+="Partitioned;"),this.document.cookie=a}delete(i,t,n,s,c="Lax"){if(!this.documentIsAccessible)return;let l=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(i,"",{expires:l,path:t,domain:n,secure:s,sameSite:c})}deleteAll(i,t,n,s="Lax"){if(!this.documentIsAccessible)return;let c=this.getAll();for(let l in c)c.hasOwnProperty(l)&&this.delete(l,i,t,n,s)}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=u({token:e,factory:e.\u0275fac,providedIn:"root"});let m=e;return m})();var E=class m{constructor(e,o,i,t,n,s){this.httpService=e;this.cookieService=o;this.router=i;this.roleService=t;this.intercomService=n;this.fraction=s}role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(e){this._returnUrl=e}get returnUrl(){return this._returnUrl}login(e){return this.httpService.post("/api/Login/Web",e).pipe(S(o=>{this._loginResponse=o,o.Type=="geo"||o.Type=="totp"||this.saveLoginConfigToStorage(o)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let e=this.getSubscriptionStatus(),o=this.getRedirectUrlByRole();return(e==2||e==3)&&(o="/menu/Profile/Main/My_Subscription"),o}getRedirectUrlByRole(){let e,o=this.roleService;return o.dashboard.View?e="/menu/Dashboard":o.product.View?e="/menu/Products":e="/menu/Sell",e}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(e=>{localStorage.removeItem("Token"),localStorage.setItem("Token",e.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let e=localStorage.getItem("Token");if(e){let o=f.parseJwt(e),i=this.convertUnixTimesTamp(o.exp),t=new Date;if(i.getTime()-t.getTime()>0)return!1}return!0}isInRole(e){e.forEach(o=>o(this.role))}convertUnixTimesTamp(e){return new Date(e*1e3)}saveLoginConfigToStorage(e){localStorage.setItem("quantityFraction",JSON.stringify(e.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(e.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(e.UIConfig.Fraction.Amount.Minimum,e.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(e.UIConfig.Fraction.Quantity.Minimum,e.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(e?.AccountInfo)),localStorage.setItem("Token",e?.Token),localStorage.setItem("TinyMCEPlugins",e?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(e?.Intercom),localStorage.setItem("CloudinaryConfig",e?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",e?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(e?.SubscriptionStatus));let o=this.getParseToken();f.IsNotEmpty(o?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",o?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let e=localStorage.getItem("Token");return e&&!this._jwtToken&&(this._jwtToken=f.parseJwt(e)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let e=localStorage.getItem("SubscriptionStatus");return e?parseInt(e):null}static \u0275fac=function(o){return new(o||m)(p(h),p(D),p(C),p(R),p(U),p(O))};static \u0275prov=u({token:m,factory:m.\u0275fac,providedIn:"root"})};export{k as a,D as b,E as c};
@@ -1 +1 @@
1
- import{c as W,d as X}from"./chunk-HRM7HE6Z.js";import{a as Y,b as Z}from"./chunk-L6PKNRWO.js";import{b as Q,c as U}from"./chunk-JBS5UYZC.js";import{a as B}from"./chunk-B7AC4RMR.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as J,h as q,o as G}from"./chunk-DWZ5JTI2.js";import{a as d}from"./chunk-WUV22SZ4.js";import{s as C}from"./chunk-LGOSIAUC.js";import{Ab as V,Fb as l,Fc as k,Gb as c,Gc as F,Hb as m,Lc as N,Ob as L,Pb as j,Sb as E,Ub as n,Xa as _,Y as f,Ya as M,ca as S,cc as I,d as x,eb as b,fa as T,ga as u,hc as v,ib as $,jc as R,la as w,nd as P,o as h,oa as O,ob as a,od as z,pa as D,ta as p,ua as g,vd as A,yb as H}from"./chunk-IEVGW2RT.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(d.IsEmpty(this.selectedCategoryID)&&d.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel=this.placeholder}findSelectedCategory(t,e){if(d.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{ee as a};
1
+ import{c as W,d as X}from"./chunk-T6FJJ74N.js";import{a as Y,b as Z}from"./chunk-L6PKNRWO.js";import{b as Q,c as U}from"./chunk-JBS5UYZC.js";import{a as B}from"./chunk-B7AC4RMR.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as J,h as q,o as G}from"./chunk-DWZ5JTI2.js";import{a as d}from"./chunk-WUV22SZ4.js";import{s as C}from"./chunk-LGOSIAUC.js";import{Ab as V,Fb as l,Fc as k,Gb as c,Gc as F,Hb as m,Lc as N,Ob as L,Pb as j,Sb as E,Ub as n,Xa as _,Y as f,Ya as M,ca as S,cc as I,d as x,eb as b,fa as T,ga as u,hc as v,ib as $,jc as R,la as w,nd as P,o as h,oa as O,ob as a,od as z,pa as D,ta as p,ua as g,vd as A,yb as H}from"./chunk-IEVGW2RT.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(d.IsEmpty(this.selectedCategoryID)&&d.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel=this.placeholder}findSelectedCategory(t,e){if(d.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{ee as a};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-TY24TZEK.js";import{a as t}from"./chunk-SNAKHGZS.js";var i=class extends e{constructor(r,a,o,l,s,p,F){super(r,a,o,l,s,p,F)}preInitLoader(){this.loaderPayload=t({ListIDs:this.reportFilterService.initOutletFilter([])},this.loaderPayload)}preInitList(){this.pageData.Filter.ListIDs=this.loaderPayload.ListIDs,this.pageData.Filter.From=this.reportFilterService.initDateFromFilter(this.pageData?.Filter?.From),this.pageData.Filter.To=this.reportFilterService.initDateToFilter(this.pageData?.Filter?.To)}onFilterOutlets(){this.reportFilterService.setOutletFilter(this.pageData.Filter.ListIDs)}onFilterFromDate(){this.reportFilterService.setDateFromFilter(this.pageData?.Filter?.From)}onFilterToDate(){this.reportFilterService.setDateToFilter(this.pageData?.Filter?.To)}};export{i as a};
1
+ import{a as e}from"./chunk-5EDMTMQE.js";import{a as t}from"./chunk-SNAKHGZS.js";var i=class extends e{constructor(r,a,o,l,s,p,F){super(r,a,o,l,s,p,F)}preInitLoader(){this.loaderPayload=t({ListIDs:this.reportFilterService.initOutletFilter([])},this.loaderPayload)}preInitList(){this.pageData.Filter.ListIDs=this.loaderPayload.ListIDs,this.pageData.Filter.From=this.reportFilterService.initDateFromFilter(this.pageData?.Filter?.From),this.pageData.Filter.To=this.reportFilterService.initDateToFilter(this.pageData?.Filter?.To)}onFilterOutlets(){this.reportFilterService.setOutletFilter(this.pageData.Filter.ListIDs)}onFilterFromDate(){this.reportFilterService.setDateFromFilter(this.pageData?.Filter?.From)}onFilterToDate(){this.reportFilterService.setDateToFilter(this.pageData?.Filter?.To)}};export{i as a};