dealpos 25.40.2 → 25.40.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 (80) hide show
  1. package/browser/{chunk-ARPTC7FZ.js → chunk-2G7CFAEB.js} +1 -1
  2. package/browser/{chunk-7YRIEIEL.js → chunk-2IABFNTY.js} +1 -1
  3. package/browser/{chunk-RML6TDRD.js → chunk-2QEPMODF.js} +1 -1
  4. package/browser/{chunk-ZBF3KNJZ.js → chunk-35MFGEZI.js} +1 -1
  5. package/browser/{chunk-FVQ5OKEX.js → chunk-3Q7UXVEJ.js} +1 -1
  6. package/browser/{chunk-BO5RZFDE.js → chunk-436LRP6L.js} +1 -1
  7. package/browser/{chunk-2U2JYZ76.js → chunk-443ZJ45F.js} +1 -1
  8. package/browser/{chunk-VBMJL2DU.js → chunk-4BYJBTBW.js} +1 -1
  9. package/browser/{chunk-G2IRE4PI.js → chunk-4UYACZG5.js} +1 -1
  10. package/browser/{chunk-QRBKKDQD.js → chunk-5JFVPOVI.js} +1 -1
  11. package/browser/{chunk-UTUWSXWI.js → chunk-6OO64KAO.js} +1 -1
  12. package/browser/{chunk-P3P25EOJ.js → chunk-6YAD56QC.js} +1 -1
  13. package/browser/{chunk-5UKMHAPS.js → chunk-6ZW5QNJV.js} +1 -1
  14. package/browser/{chunk-MB3355JD.js → chunk-7G6TIMT4.js} +1 -1
  15. package/browser/{chunk-AWEVLUH4.js → chunk-A4EX7WBL.js} +1 -1
  16. package/browser/chunk-BAPETH6A.js +1 -0
  17. package/browser/{chunk-VDL2LTQ4.js → chunk-BCS3JDRX.js} +1 -1
  18. package/browser/{chunk-6MBVF5PK.js → chunk-BGTYUNJU.js} +1 -1
  19. package/browser/{chunk-KFPPOQTN.js → chunk-BHR44XGQ.js} +2 -2
  20. package/browser/{chunk-R37DRT32.js → chunk-BNHAQL3W.js} +1 -1
  21. package/browser/{chunk-XSODSITQ.js → chunk-C6V3DPDE.js} +1 -1
  22. package/browser/{chunk-E3OGY6ES.js → chunk-CRYG455U.js} +1 -1
  23. package/browser/{chunk-FLA5R3YT.js → chunk-DMHVB7ER.js} +1 -1
  24. package/browser/{chunk-XH6XJ3KM.js → chunk-DXDH6I6R.js} +1 -1
  25. package/browser/{chunk-JGKII6F2.js → chunk-EEHG6F3B.js} +1 -1
  26. package/browser/{chunk-DIYOL4ZX.js → chunk-EG46WMFJ.js} +1 -1
  27. package/browser/{chunk-P4TN4CJP.js → chunk-EWXPGGNY.js} +1 -1
  28. package/browser/{chunk-FDV5CP2Q.js → chunk-F5VCUVZF.js} +1 -1
  29. package/browser/{chunk-AB7FXZGQ.js → chunk-FJPAOEQH.js} +1 -1
  30. package/browser/{chunk-KUYSSX54.js → chunk-FRCN6C2S.js} +1 -1
  31. package/browser/{chunk-ELMKQ62C.js → chunk-FV3BKJGW.js} +1 -1
  32. package/browser/{chunk-XDVE4QHG.js → chunk-FYB534C2.js} +1 -1
  33. package/browser/{chunk-4LSMOT7D.js → chunk-GW3UEDTL.js} +2 -2
  34. package/browser/{chunk-IP6QBHGH.js → chunk-HSHYA63I.js} +1 -1
  35. package/browser/{chunk-J5VIKO3U.js → chunk-IJ5QIFAX.js} +1 -1
  36. package/browser/{chunk-LGCPZ7ZC.js → chunk-J53S6EAV.js} +1 -1
  37. package/browser/{chunk-UV5IDNL4.js → chunk-KBLPR3U4.js} +1 -1
  38. package/browser/{chunk-W2RTV2OX.js → chunk-KRGBGZ3Z.js} +1 -1
  39. package/browser/{chunk-ENLZCSWK.js → chunk-LAGRW3KI.js} +1 -1
  40. package/browser/{chunk-TJTZCCBT.js → chunk-MB4ENY3T.js} +1 -1
  41. package/browser/{chunk-DLVA7JPN.js → chunk-MUPMKSCT.js} +1 -1
  42. package/browser/{chunk-TBACZZO3.js → chunk-NETNSE7N.js} +1 -1
  43. package/browser/{chunk-L4YRSIVP.js → chunk-NJ26HPPY.js} +1 -1
  44. package/browser/{chunk-O3CGA22W.js → chunk-NKY2S7AY.js} +1 -1
  45. package/browser/{chunk-5JB63L7E.js → chunk-NRYV57E3.js} +1 -1
  46. package/browser/{chunk-AIWMAX5H.js → chunk-O3MFYOEB.js} +1 -1
  47. package/browser/{chunk-DCFP5QGY.js → chunk-O55KYVIP.js} +1 -1
  48. package/browser/{chunk-CSH47SQR.js → chunk-OHHX5AVS.js} +2 -2
  49. package/browser/{chunk-VAIGUQRA.js → chunk-OLAYYOYX.js} +1 -1
  50. package/browser/{chunk-RJFQ65N4.js → chunk-PYNQZXQQ.js} +2 -2
  51. package/browser/{chunk-5DNCP5FC.js → chunk-Q3RST7GR.js} +1 -1
  52. package/browser/{chunk-XI5VA4B3.js → chunk-QKJHIZWL.js} +2 -2
  53. package/browser/{chunk-XINIQJMX.js → chunk-QWRP6R5Q.js} +1 -1
  54. package/browser/{chunk-M37QLVGO.js → chunk-QZEE3BIX.js} +1 -1
  55. package/browser/{chunk-7XCJGHOF.js → chunk-RCHPMIRB.js} +1 -1
  56. package/browser/{chunk-5MB35RTV.js → chunk-RJFOMYK6.js} +1 -1
  57. package/browser/{chunk-YGN464UA.js → chunk-SB6OBWNM.js} +1 -1
  58. package/browser/{chunk-ECGRTGGV.js → chunk-SEV7H5KZ.js} +1 -1
  59. package/browser/{chunk-IK57DV5O.js → chunk-SPDYAKM4.js} +1 -1
  60. package/browser/{chunk-FPUXX3LP.js → chunk-TEXOB45T.js} +1 -1
  61. package/browser/{chunk-IVT2LRG6.js → chunk-TJIGR2WO.js} +2 -2
  62. package/browser/{chunk-ZOS6KCAU.js → chunk-UC2B2WJN.js} +1 -1
  63. package/browser/{chunk-5SSHZYTK.js → chunk-VJNM25N5.js} +1 -1
  64. package/browser/{chunk-TZSF5N2H.js → chunk-WIT6FJSI.js} +2 -2
  65. package/browser/{chunk-TZATTV7L.js → chunk-WOLVGMVY.js} +1 -1
  66. package/browser/{chunk-6UVOVZTG.js → chunk-WT2YZYZ7.js} +1 -1
  67. package/browser/{chunk-5A5UJCA3.js → chunk-X6GVGUA7.js} +1 -1
  68. package/browser/{chunk-OKMUB3IV.js → chunk-XIHCJDZO.js} +1 -1
  69. package/browser/{chunk-53QBOLTA.js → chunk-XQXVOXXG.js} +1 -1
  70. package/browser/{chunk-YYIP7MBV.js → chunk-XYZHL2RI.js} +1 -1
  71. package/browser/{chunk-NC4J2MQI.js → chunk-YFMHWW77.js} +1 -1
  72. package/browser/{chunk-TXSBSJRQ.js → chunk-YMI65UH7.js} +1 -1
  73. package/browser/{chunk-LWQPQ3JP.js → chunk-YULBQPYG.js} +1 -1
  74. package/browser/{chunk-XUZNEAQL.js → chunk-ZCF5NNRJ.js} +1 -1
  75. package/browser/{chunk-45OAODEJ.js → chunk-ZOVUG76U.js} +2 -2
  76. package/browser/{chunk-2VDAFJY7.js → chunk-ZV3KDIWY.js} +1 -1
  77. package/browser/index.html +2 -2
  78. package/browser/{main-7F6JKYCX.js → main-2ZNMWLVC.js} +2 -2
  79. package/package.json +1 -1
  80. package/browser/chunk-ZFRM7OST.js +0 -1
@@ -1 +1 @@
1
- import{a as de}from"./chunk-5MB35RTV.js";import{d as me,e as se}from"./chunk-FDV5CP2Q.js";import"./chunk-DCFP5QGY.js";import{b as le}from"./chunk-BO5RZFDE.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import{u as ae,v as ne,w as re}from"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import{e as te,f as ie,g as oe}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{A as Q,E as X,F as Z,c as G,h as z,o as J}from"./chunk-CB33ZMNF.js";import"./chunk-ZOS6KCAU.js";import"./chunk-FVQ5OKEX.js";import{a as W}from"./chunk-TKBUOGER.js";import"./chunk-KUYSSX54.js";import{$a as m,Ac as B,Db as F,E as A,Ib as o,Jb as a,Kb as w,Lb as T,Ma as Y,Mb as g,Ob as y,Od as H,Qb as _,Rb as u,Vd as q,Wc as U,Yc as j,Yd as $,Zc as v,db as f,dc as O,ec as r,fc as R,gc as x,gd as K,jc as E,jd as h,kb as b,kc as M,lc as P,ob as L,qb as S,rc as D,va as d,vb as c,wa as p,zc as k}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var I=(s=>(s.TRANSACTIONS="TRANSACTIONS",s.PRODUCTS="PRODUCTS",s.CONTACTS="CONTACTS",s.LOYALTY_POINTS="LOYALTY_POINTS",s.RECYCLE_BIN="RECYCLE_BIN",s.INVENTORY="INVENTORY",s))(I||{});function _e(n,l){if(n&1&&(T(0),o(1,"div",4)(2,"div",5)(3,"div",16),w(4,"i",17),o(5,"span"),r(6),a()()()(),g()),n&2){let i=u();m(6),x(" ",i.selectedClearData.message," ")}}function Se(n,l){n&1&&(T(0),o(1,"small",18),r(2," *Subdomain is required "),a(),g())}function Te(n,l){n&1&&(T(0),o(1,"small",18),r(2," *Password is required "),a(),g())}function ge(n,l){n&1&&w(0,"i",14)}function be(n,l){n&1&&w(0,"i",15)}var N=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 ae;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=Y(!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)(f(ie),f(te),f(X))};static \u0275cmp=b({type:n,selectors:[["app-confirmation-modal"]],decls:24,vars:10,consts:[["subdomainCtrl","ngModel"],["passwordCtrl","ngModel"],[3,"onOk","onClose","onCancel","config","dynamicValidated"],[4,"ngIf"],[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,"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"],[1,"control-label","text-danger"]],template:function(i,t){if(i&1){let e=y();o(0,"modal-material",2),_("onOk",function(){return d(e),p(t.onSubmit())})("onClose",function(){return d(e),p(t.dialogRef.close())})("onCancel",function(){return d(e),p(t.dialogRef.close())}),o(1,"content"),S(2,_e,7,1,"ng-container",3),o(3,"div",4)(4,"div",5)(5,"strong"),r(6),a(),o(7,"div",6)(8,"input",7,0),P("ngModelChange",function(s){return d(e),M(t.subdomain,s)||(t.subdomain=s),p(s)}),a(),o(10,"label",8),r(11,"Subdomain"),a(),S(12,Se,3,0,"ng-container",3),a()(),o(13,"div",5)(14,"div",9)(15,"input",10,1),P("ngModelChange",function(s){return d(e),M(t.password,s)||(t.password=s),p(s)}),a(),o(17,"label",11),r(18,"Password"),a(),S(19,Te,3,0,"ng-container",3),o(20,"div",12)(21,"button",13),_("click",function(){return d(e),p(t.passwordVisibility.set(!t.passwordVisibility()))}),S(22,ge,1,0,"i",14)(23,be,1,0,"i",15),a()()()()()()()}if(i&2){let e=O(9),C=O(16);c("config",t.modalConfig)("dynamicValidated",t.password&&t.subdomain),m(2),c("ngIf",t.selectedClearData.message),m(4),x("Enter the following subdomain to confirm: ",t.subdomainPlaceholder,""),m(2),E("ngModel",t.subdomain),m(4),c("ngIf",e.invalid&&(e.dirty||e.touched)),m(3),c("type",t.passwordVisibility()?"text":"password"),E("ngModel",t.password),m(4),c("ngIf",C.invalid&&(C.dirty||C.touched)),m(3),F(t.passwordVisibility()?22:23)}},dependencies:[h,v,re,ne,Z,G,z,Q,J],styles:[".password-visibility[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);cursor:pointer;font-size:1.5rem}"]})};var V=n=>({"border border-0":n});function we(n,l){if(n&1&&(T(0),o(1,"tr",23)(2,"td",23),r(3),a(),o(4,"td",24),r(5),k(6,"number"),a()(),g()),n&2){let i=l.$implicit,t=l.index,e=u(2);m(),c("ngClass",D(7,V,t==e.data.Data.length-1)),m(),c("ngClass",D(9,V,t==e.data.Data.length-1)),m(),R(i.Key),m(),c("ngClass",D(11,V,t==e.data.Data.length-1)),m(),R(B(6,5,i.Value))}}function ye(n,l){if(n&1){let i=y();o(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"div",3)(4,"button",4),r(5," Format Data "),a(),o(6,"ul",5)(7,"li")(8,"a",6),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.TRANSACTIONS))}),r(9," 1. Clear Transactions "),a()(),o(10,"li")(11,"a",7),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.INVENTORY))}),r(12," 2. Clear Inventory "),a()(),o(13,"li")(14,"a",8),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.PRODUCTS))}),r(15," 3. Clear Products "),a()(),o(16,"li")(17,"a",9),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.CONTACTS))}),r(18," 4. Clear Contacts "),a()(),o(19,"li")(20,"a",10),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.LOYALTY_POINTS))}),r(21," 5. Clear Loyalty Point "),a()(),o(22,"li")(23,"a",11),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.RECYCLE_BIN))}),r(24," 6. Clear Recycle Bin "),a()()()()()(),o(25,"content")(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5"),r(30,"Database Records"),a(),o(31,"i"),r(32,"Current data count"),a()(),o(33,"div",15)(34,"div",16)(35,"div",17)(36,"table",18)(37,"thead",19)(38,"tr",20)(39,"th"),r(40,"Table"),a(),o(41,"th",21),r(42,"Rows"),a()()(),o(43,"tbody"),S(44,we,7,13,"ng-container",22),a()()()()()()()()()}if(n&2){let i=u();c("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),m(44),c("ngForOf",i.data.Data)}}var pe=class n extends de{constructor(i,t,e,C,s){super(i,t,"Setup/DataLoader/clearformatdata",e);this.httpService=t;this.activatedRoute=e;this.toaster=C;this.dialog=s}clearDataType=I;onClearRecord(i){this.dialog.open(N,{data:{type:i,subDomain:this.data.SubDomain}}).afterClosed().pipe(A(t=>W.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,ee.Success)}static \u0275fac=function(t){return new(t||n)(f(le),f($),f(H),f(q),f(oe))};static \u0275cmp=b({type:n,selectors:[["POS-format-data"]],features:[L],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[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"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-end",3,"ngClass"]],template:function(t,e){t&1&&S(0,ye,45,4,"mainpanel-cmp",0),t&2&&c("ngIf",e.formData)},dependencies:[h,U,j,v,K,se,me],encapsulation:2})};export{pe as FormatDataComponent};
1
+ import{a as de}from"./chunk-RJFOMYK6.js";import{d as me,e as se}from"./chunk-F5VCUVZF.js";import"./chunk-O55KYVIP.js";import{b as le}from"./chunk-436LRP6L.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import{u as ae,v as ne,w as re}from"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import{e as te,f as ie,g as oe}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{A as Q,E as X,F as Z,c as G,h as z,o as J}from"./chunk-CB33ZMNF.js";import"./chunk-UC2B2WJN.js";import"./chunk-3Q7UXVEJ.js";import{a as W}from"./chunk-TKBUOGER.js";import"./chunk-FRCN6C2S.js";import{$a as m,Ac as B,Db as F,E as A,Ib as o,Jb as a,Kb as w,Lb as T,Ma as Y,Mb as g,Ob as y,Od as H,Qb as _,Rb as u,Vd as q,Wc as U,Yc as j,Yd as $,Zc as v,db as f,dc as O,ec as r,fc as R,gc as x,gd as K,jc as E,jd as h,kb as b,kc as M,lc as P,ob as L,qb as S,rc as D,va as d,vb as c,wa as p,zc as k}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var I=(s=>(s.TRANSACTIONS="TRANSACTIONS",s.PRODUCTS="PRODUCTS",s.CONTACTS="CONTACTS",s.LOYALTY_POINTS="LOYALTY_POINTS",s.RECYCLE_BIN="RECYCLE_BIN",s.INVENTORY="INVENTORY",s))(I||{});function _e(n,l){if(n&1&&(T(0),o(1,"div",4)(2,"div",5)(3,"div",16),w(4,"i",17),o(5,"span"),r(6),a()()()(),g()),n&2){let i=u();m(6),x(" ",i.selectedClearData.message," ")}}function Se(n,l){n&1&&(T(0),o(1,"small",18),r(2," *Subdomain is required "),a(),g())}function Te(n,l){n&1&&(T(0),o(1,"small",18),r(2," *Password is required "),a(),g())}function ge(n,l){n&1&&w(0,"i",14)}function be(n,l){n&1&&w(0,"i",15)}var N=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 ae;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=Y(!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)(f(ie),f(te),f(X))};static \u0275cmp=b({type:n,selectors:[["app-confirmation-modal"]],decls:24,vars:10,consts:[["subdomainCtrl","ngModel"],["passwordCtrl","ngModel"],[3,"onOk","onClose","onCancel","config","dynamicValidated"],[4,"ngIf"],[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,"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"],[1,"control-label","text-danger"]],template:function(i,t){if(i&1){let e=y();o(0,"modal-material",2),_("onOk",function(){return d(e),p(t.onSubmit())})("onClose",function(){return d(e),p(t.dialogRef.close())})("onCancel",function(){return d(e),p(t.dialogRef.close())}),o(1,"content"),S(2,_e,7,1,"ng-container",3),o(3,"div",4)(4,"div",5)(5,"strong"),r(6),a(),o(7,"div",6)(8,"input",7,0),P("ngModelChange",function(s){return d(e),M(t.subdomain,s)||(t.subdomain=s),p(s)}),a(),o(10,"label",8),r(11,"Subdomain"),a(),S(12,Se,3,0,"ng-container",3),a()(),o(13,"div",5)(14,"div",9)(15,"input",10,1),P("ngModelChange",function(s){return d(e),M(t.password,s)||(t.password=s),p(s)}),a(),o(17,"label",11),r(18,"Password"),a(),S(19,Te,3,0,"ng-container",3),o(20,"div",12)(21,"button",13),_("click",function(){return d(e),p(t.passwordVisibility.set(!t.passwordVisibility()))}),S(22,ge,1,0,"i",14)(23,be,1,0,"i",15),a()()()()()()()}if(i&2){let e=O(9),C=O(16);c("config",t.modalConfig)("dynamicValidated",t.password&&t.subdomain),m(2),c("ngIf",t.selectedClearData.message),m(4),x("Enter the following subdomain to confirm: ",t.subdomainPlaceholder,""),m(2),E("ngModel",t.subdomain),m(4),c("ngIf",e.invalid&&(e.dirty||e.touched)),m(3),c("type",t.passwordVisibility()?"text":"password"),E("ngModel",t.password),m(4),c("ngIf",C.invalid&&(C.dirty||C.touched)),m(3),F(t.passwordVisibility()?22:23)}},dependencies:[h,v,re,ne,Z,G,z,Q,J],styles:[".password-visibility[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);cursor:pointer;font-size:1.5rem}"]})};var V=n=>({"border border-0":n});function we(n,l){if(n&1&&(T(0),o(1,"tr",23)(2,"td",23),r(3),a(),o(4,"td",24),r(5),k(6,"number"),a()(),g()),n&2){let i=l.$implicit,t=l.index,e=u(2);m(),c("ngClass",D(7,V,t==e.data.Data.length-1)),m(),c("ngClass",D(9,V,t==e.data.Data.length-1)),m(),R(i.Key),m(),c("ngClass",D(11,V,t==e.data.Data.length-1)),m(),R(B(6,5,i.Value))}}function ye(n,l){if(n&1){let i=y();o(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"div",3)(4,"button",4),r(5," Format Data "),a(),o(6,"ul",5)(7,"li")(8,"a",6),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.TRANSACTIONS))}),r(9," 1. Clear Transactions "),a()(),o(10,"li")(11,"a",7),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.INVENTORY))}),r(12," 2. Clear Inventory "),a()(),o(13,"li")(14,"a",8),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.PRODUCTS))}),r(15," 3. Clear Products "),a()(),o(16,"li")(17,"a",9),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.CONTACTS))}),r(18," 4. Clear Contacts "),a()(),o(19,"li")(20,"a",10),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.LOYALTY_POINTS))}),r(21," 5. Clear Loyalty Point "),a()(),o(22,"li")(23,"a",11),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.RECYCLE_BIN))}),r(24," 6. Clear Recycle Bin "),a()()()()()(),o(25,"content")(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5"),r(30,"Database Records"),a(),o(31,"i"),r(32,"Current data count"),a()(),o(33,"div",15)(34,"div",16)(35,"div",17)(36,"table",18)(37,"thead",19)(38,"tr",20)(39,"th"),r(40,"Table"),a(),o(41,"th",21),r(42,"Rows"),a()()(),o(43,"tbody"),S(44,we,7,13,"ng-container",22),a()()()()()()()()()}if(n&2){let i=u();c("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),m(44),c("ngForOf",i.data.Data)}}var pe=class n extends de{constructor(i,t,e,C,s){super(i,t,"Setup/DataLoader/clearformatdata",e);this.httpService=t;this.activatedRoute=e;this.toaster=C;this.dialog=s}clearDataType=I;onClearRecord(i){this.dialog.open(N,{data:{type:i,subDomain:this.data.SubDomain}}).afterClosed().pipe(A(t=>W.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,ee.Success)}static \u0275fac=function(t){return new(t||n)(f(le),f($),f(H),f(q),f(oe))};static \u0275cmp=b({type:n,selectors:[["POS-format-data"]],features:[L],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[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"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-end",3,"ngClass"]],template:function(t,e){t&1&&S(0,ye,45,4,"mainpanel-cmp",0),t&2&&c("ngIf",e.formData)},dependencies:[h,U,j,v,K,se,me],encapsulation:2})};export{pe as FormatDataComponent};
@@ -1 +1 @@
1
- import{a as V,b as W}from"./chunk-VYFU4BSG.js";import{a as q}from"./chunk-5MB35RTV.js";import{d as J,e as B}from"./chunk-FDV5CP2Q.js";import"./chunk-DCFP5QGY.js";import{b as P}from"./chunk-BO5RZFDE.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-B4IX7BMU.js";import{b as I,c as E}from"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import"./chunk-CB33ZMNF.js";import"./chunk-ZOS6KCAU.js";import"./chunk-FVQ5OKEX.js";import"./chunk-TKBUOGER.js";import"./chunk-KUYSSX54.js";import{$a as l,Ac as D,Bc as f,Ib as o,Jb as t,Kb as c,Ob as S,Od as M,Qb as v,Rb as b,Yd as T,Zc as x,db as m,ec as p,ed as _,fc as j,fd as k,gc as L,gd as w,jd as R,kb as h,ob as C,qb as y,va as u,vb as a,wa as g,zc as d}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";function N(r,i){if(r&1){let e=S();o(0,"mainpanel-cmp",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"h3"),p(8,"General"),t()(),o(9,"div",7)(10,"div",3)(11,"div",8),c(12,"floatinglabel",9),d(13,"date"),t(),o(14,"div",8),c(15,"floatinglabel",10),d(16,"number"),t()(),o(17,"div",3)(18,"div",8),c(19,"floatinglabel",11),t()()()()()(),o(20,"div",3)(21,"div",8)(22,"div",5)(23,"div",12)(24,"div",13)(25,"h3"),p(26,"Request"),t()(),o(27,"div",14)(28,"button",15),v("click",function(){u(e);let n=b();return g(n.copyClipboard(n.jobLogsDetail==null?null:n.jobLogsDetail.log.req,"Request"))}),p(29,"Copy Request to Clipboard"),t()()(),o(30,"div",7)(31,"pre",16),p(32),d(33,"json"),t()()()(),o(34,"div",8)(35,"div",5)(36,"div",12)(37,"div",13)(38,"h3"),p(39,"Response"),t()(),o(40,"div",14)(41,"button",17),v("click",function(){u(e);let n=b();return g(n.copyClipboard(n.jobLogsDetail==null||n.jobLogsDetail.log==null?null:n.jobLogsDetail.log.res,"Response"))}),p(42,"Copy Response to Clipboard"),t()()(),o(43,"div",7)(44,"pre",18),p(45),d(46,"json"),t()()()()()()()()}if(r&2){let e=b();a("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(12),a("model",f(13,10,e.jobLogsDetail["@timestamp_received"],"dd MMM yyyy")),l(3),a("model",f(16,13,e.jobLogsDetail==null?null:e.jobLogsDetail.DurationInSecond,"1.1-1")+" s"),l(4),a("model",e.jobLogsDetail==null||e.jobLogsDetail.log==null?null:e.jobLogsDetail.log.respCode),l(9),a("matTooltip",e.copyStatus?e.msgCopyClipboard:"Copy to clipboard"),l(4),j(D(33,16,e.jobLogsDetail==null||e.jobLogsDetail.log==null?null:e.jobLogsDetail.log.req)),l(9),a("matTooltip",e.copyStatus?e.msgCopyClipboard:"Copy to clipboard"),l(4),L('"',D(46,18,e.jobLogsDetail==null?null:e.jobLogsDetail.log.res),'"')}}var F=class r extends q{jobLogsDetail;copyStatus;msgCopyClipboard;constructor(i,e,s){super(i,e,"Developer/DeveloperSpace/Webhook/JobLogDetail",s)}postBindForm(i){this.jobLogsDetail=i?.hits[0]?._source,this.jobLogsDetail&&(this.jobLogsDetail.DurationInSecond=parseInt(this.jobLogsDetail?.Duration)/1e3)}copyClipboard(i,e){this.copyStatus=!0,this.msgCopyClipboard=e+" has been coppied to clipboard!",navigator.clipboard.writeText(JSON.stringify(i)),setTimeout(()=>{this.copyStatus=!1},3e3)}static \u0275fac=function(e){return new(e||r)(m(P),m(T),m(M))};static \u0275cmp=h({type:r,selectors:[["app-webhook-job-logs-detail"]],features:[C],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["id","webhook-logs",1,"container-fluid","pt-5"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-6"],["label","Created",3,"model"],["label","Duration",3,"model"],["label","Response Code",3,"model"],[1,"card-header","d-lg-flex"],[1,"me-auto","mt-5"],[1,"d-sm-block","mt-2"],["id","btnCopyRequest","matTooltipPosition","above",1,"btn","btn-secondary","btn-sm",3,"click","matTooltip"],["id","requestValue",2,"font-size","13px"],["id","btnCopyResponse","matTooltipPosition","above",1,"btn","btn-secondary","btn-sm",3,"click","matTooltip"],["id","responseValue",2,"font-size","13px"]],template:function(e,s){e&1&&y(0,N,47,20,"mainpanel-cmp",0),e&2&&a("ngIf",s.jobLogsDetail)},dependencies:[R,x,k,w,_,B,J,W,V,E,I],encapsulation:2})};export{F as WebhookJobLogsDetailComponent};
1
+ import{a as V,b as W}from"./chunk-VYFU4BSG.js";import{a as q}from"./chunk-RJFOMYK6.js";import{d as J,e as B}from"./chunk-F5VCUVZF.js";import"./chunk-O55KYVIP.js";import{b as P}from"./chunk-436LRP6L.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-B4IX7BMU.js";import{b as I,c as E}from"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import"./chunk-CB33ZMNF.js";import"./chunk-UC2B2WJN.js";import"./chunk-3Q7UXVEJ.js";import"./chunk-TKBUOGER.js";import"./chunk-FRCN6C2S.js";import{$a as l,Ac as D,Bc as f,Ib as o,Jb as t,Kb as c,Ob as S,Od as M,Qb as v,Rb as b,Yd as T,Zc as x,db as m,ec as p,ed as _,fc as j,fd as k,gc as L,gd as w,jd as R,kb as h,ob as C,qb as y,va as u,vb as a,wa as g,zc as d}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";function N(r,i){if(r&1){let e=S();o(0,"mainpanel-cmp",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"h3"),p(8,"General"),t()(),o(9,"div",7)(10,"div",3)(11,"div",8),c(12,"floatinglabel",9),d(13,"date"),t(),o(14,"div",8),c(15,"floatinglabel",10),d(16,"number"),t()(),o(17,"div",3)(18,"div",8),c(19,"floatinglabel",11),t()()()()()(),o(20,"div",3)(21,"div",8)(22,"div",5)(23,"div",12)(24,"div",13)(25,"h3"),p(26,"Request"),t()(),o(27,"div",14)(28,"button",15),v("click",function(){u(e);let n=b();return g(n.copyClipboard(n.jobLogsDetail==null?null:n.jobLogsDetail.log.req,"Request"))}),p(29,"Copy Request to Clipboard"),t()()(),o(30,"div",7)(31,"pre",16),p(32),d(33,"json"),t()()()(),o(34,"div",8)(35,"div",5)(36,"div",12)(37,"div",13)(38,"h3"),p(39,"Response"),t()(),o(40,"div",14)(41,"button",17),v("click",function(){u(e);let n=b();return g(n.copyClipboard(n.jobLogsDetail==null||n.jobLogsDetail.log==null?null:n.jobLogsDetail.log.res,"Response"))}),p(42,"Copy Response to Clipboard"),t()()(),o(43,"div",7)(44,"pre",18),p(45),d(46,"json"),t()()()()()()()()}if(r&2){let e=b();a("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(12),a("model",f(13,10,e.jobLogsDetail["@timestamp_received"],"dd MMM yyyy")),l(3),a("model",f(16,13,e.jobLogsDetail==null?null:e.jobLogsDetail.DurationInSecond,"1.1-1")+" s"),l(4),a("model",e.jobLogsDetail==null||e.jobLogsDetail.log==null?null:e.jobLogsDetail.log.respCode),l(9),a("matTooltip",e.copyStatus?e.msgCopyClipboard:"Copy to clipboard"),l(4),j(D(33,16,e.jobLogsDetail==null||e.jobLogsDetail.log==null?null:e.jobLogsDetail.log.req)),l(9),a("matTooltip",e.copyStatus?e.msgCopyClipboard:"Copy to clipboard"),l(4),L('"',D(46,18,e.jobLogsDetail==null?null:e.jobLogsDetail.log.res),'"')}}var F=class r extends q{jobLogsDetail;copyStatus;msgCopyClipboard;constructor(i,e,s){super(i,e,"Developer/DeveloperSpace/Webhook/JobLogDetail",s)}postBindForm(i){this.jobLogsDetail=i?.hits[0]?._source,this.jobLogsDetail&&(this.jobLogsDetail.DurationInSecond=parseInt(this.jobLogsDetail?.Duration)/1e3)}copyClipboard(i,e){this.copyStatus=!0,this.msgCopyClipboard=e+" has been coppied to clipboard!",navigator.clipboard.writeText(JSON.stringify(i)),setTimeout(()=>{this.copyStatus=!1},3e3)}static \u0275fac=function(e){return new(e||r)(m(P),m(T),m(M))};static \u0275cmp=h({type:r,selectors:[["app-webhook-job-logs-detail"]],features:[C],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["id","webhook-logs",1,"container-fluid","pt-5"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-6"],["label","Created",3,"model"],["label","Duration",3,"model"],["label","Response Code",3,"model"],[1,"card-header","d-lg-flex"],[1,"me-auto","mt-5"],[1,"d-sm-block","mt-2"],["id","btnCopyRequest","matTooltipPosition","above",1,"btn","btn-secondary","btn-sm",3,"click","matTooltip"],["id","requestValue",2,"font-size","13px"],["id","btnCopyResponse","matTooltipPosition","above",1,"btn","btn-secondary","btn-sm",3,"click","matTooltip"],["id","responseValue",2,"font-size","13px"]],template:function(e,s){e&1&&y(0,N,47,20,"mainpanel-cmp",0),e&2&&a("ngIf",s.jobLogsDetail)},dependencies:[R,x,k,w,_,B,J,W,V,E,I],encapsulation:2})};export{F as WebhookJobLogsDetailComponent};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-BYNEFOC3.js";import{a as ve}from"./chunk-5MB35RTV.js";import{a as Ce}from"./chunk-KS37A3HL.js";import"./chunk-BYXBJQAS.js";import{d as ce,e as fe}from"./chunk-FDV5CP2Q.js";import"./chunk-DCFP5QGY.js";import{b as se}from"./chunk-BO5RZFDE.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import{u as pe,v as me,w as ue}from"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import{O as F}from"./chunk-A7ZWFYP4.js";import{e as ae,f as le,g as de}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{E as oe,F as te,G as ne,c as J,e as b,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-CB33ZMNF.js";import"./chunk-ZOS6KCAU.js";import"./chunk-FVQ5OKEX.js";import{a as w,d as re}from"./chunk-TKBUOGER.js";import"./chunk-KUYSSX54.js";import{$a as l,Db as C,E as N,Eb as A,Fc as q,Gb as O,Hb as U,Ib as i,Jb as r,Kb as s,Ma as V,Nb as H,Ob as x,Od as W,Pc as K,Qb as v,Rb as f,Vd as z,Wc as R,Yd as ie,Zc as L,bd as B,db as c,dc as $,ec as a,fc as G,gc as T,jd as M,kb as E,na as h,ob as D,qb as m,rc as _,sc as j,t as k,va as y,vb as p,wa as P}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var I=n=>({"is-invalid":n});function Pe(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function Ee(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function Ge(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=h(ae);config;fb=h(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[b.required]],validateCoupon:[this.data?.validateCoupon||"",[b.required]],redeemCoupon:[this.data?.redeemCoupon||"",[b.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[b.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)(c(le))};static \u0275cmp=E({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),s(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),s(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Pe,2,0,"div",16),r(),i(20,"div",17),s(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,Ee,2,0,"div",20),r(),i(25,"div",17),s(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,xe,2,0,"div",20),r(),i(30,"div",23),s(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,Ge,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",_(10,I,(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),C(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",_(12,I,(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),C(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",_(14,I,(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),C(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",_(16,I,(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),C(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[M,R,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 Re=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Me(n,d){if(n&1){let e=x();i(0,"button",10),v("click",function(){y(e);let t=f();return P(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ie(n,d){n&1&&s(0,"th",11)}function Ne(n,d){if(n&1){let e=x();i(0,"td",15)(1,"i",16),v("click",function(){y(e);let t=f().$index,u=f(2);return P(u.onDeleteProvider(t))}),r()()}}function Te(n,d){if(n&1){let e=x();i(0,"tr"),m(1,Ne,2,0,"td",12),i(2,"td")(3,"a",13),v("click",function(){let t=y(e),u=t.$implicit,g=t.$index,_e=f(2);return P(_e.onUpdateProvider(u,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",14),a(13),r()()()}if(n&2){let e=d.$implicit,o=f(2);l(),p("ngIf",o.role.developer.Edit),l(3),T(" ",e.Name," "),l(2),G(e.ValidateCoupon),l(2),G(e.RedeemCoupon),l(2),G(e.KeyUI),l(2),p("ngClass",j(7,Re,e.Enabled,!e.Enabled)),l(),T(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&O(0,Te,14,10,"tr",null,A),n&2){let e=f();U(e.listProviders())}}function Fe(n,d){n&1&&H(0)}function ke(n,d){if(n&1&&m(0,Fe,1,0,"ng-container",17),n&2){f();let e=$(25);p("ngTemplateOutlet",e)}}function Ve(n,d){n&1&&(i(0,"tr",18)(1,"td",19),s(2,"empty-state-table"),r()())}var he=class n extends ve{constructor(e,o,t,u,g){super(e,o,F.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=u;this.dialog=g}toastr=h(z);couponProviders=V([]);listProviders=K(()=>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(N(e=>w.IsNotEmpty(e)),k(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(N(t=>w.IsNotEmpty(t))).subscribe(t=>{let u={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=u,[...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(F.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(c(se),c(ie),c(W),c(re),c(de))};static \u0275cmp=E({type:n,selectors:[["app-coupon-configuration"]],features:[D],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button","class","btn btn-success",3,"click",4,"ngIf"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],["class","text-center","style","width: 10px",4,"ngIf"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center",2,"width","10px"],["class","text-center",4,"ngIf"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],[1,"text-center"],["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,Me,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,Ie,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()()()()(),m(24,Ve,3,0,"ng-template",null,0,q),r()()),o&2){let u;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),p("ngIf",t.role.developer.Edit),l(8),p("ngIf",t.role.developer.Edit),l(12),C(((u=t.listProviders())==null?null:u.length)>0?22:23)}},dependencies:[M,R,L,B,fe,ce,te,Ce],encapsulation:2})};export{he as CouponConfigurationComponent};
1
+ import{a as ge}from"./chunk-BYNEFOC3.js";import{a as ve}from"./chunk-RJFOMYK6.js";import{a as Ce}from"./chunk-KS37A3HL.js";import"./chunk-BYXBJQAS.js";import{d as ce,e as fe}from"./chunk-F5VCUVZF.js";import"./chunk-O55KYVIP.js";import{b as se}from"./chunk-436LRP6L.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import{u as pe,v as me,w as ue}from"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import{O as F}from"./chunk-A7ZWFYP4.js";import{e as ae,f as le,g as de}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{E as oe,F as te,G as ne,c as J,e as b,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-CB33ZMNF.js";import"./chunk-UC2B2WJN.js";import"./chunk-3Q7UXVEJ.js";import{a as w,d as re}from"./chunk-TKBUOGER.js";import"./chunk-FRCN6C2S.js";import{$a as l,Db as C,E as N,Eb as A,Fc as q,Gb as O,Hb as U,Ib as i,Jb as r,Kb as s,Ma as V,Nb as H,Ob as x,Od as W,Pc as K,Qb as v,Rb as f,Vd as z,Wc as R,Yd as ie,Zc as L,bd as B,db as c,dc as $,ec as a,fc as G,gc as T,jd as M,kb as E,na as h,ob as D,qb as m,rc as _,sc as j,t as k,va as y,vb as p,wa as P}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var I=n=>({"is-invalid":n});function Pe(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function Ee(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function Ge(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=h(ae);config;fb=h(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[b.required]],validateCoupon:[this.data?.validateCoupon||"",[b.required]],redeemCoupon:[this.data?.redeemCoupon||"",[b.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[b.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)(c(le))};static \u0275cmp=E({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),s(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),s(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Pe,2,0,"div",16),r(),i(20,"div",17),s(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,Ee,2,0,"div",20),r(),i(25,"div",17),s(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,xe,2,0,"div",20),r(),i(30,"div",23),s(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,Ge,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",_(10,I,(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),C(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",_(12,I,(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),C(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",_(14,I,(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),C(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",_(16,I,(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),C(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[M,R,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 Re=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Me(n,d){if(n&1){let e=x();i(0,"button",10),v("click",function(){y(e);let t=f();return P(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ie(n,d){n&1&&s(0,"th",11)}function Ne(n,d){if(n&1){let e=x();i(0,"td",15)(1,"i",16),v("click",function(){y(e);let t=f().$index,u=f(2);return P(u.onDeleteProvider(t))}),r()()}}function Te(n,d){if(n&1){let e=x();i(0,"tr"),m(1,Ne,2,0,"td",12),i(2,"td")(3,"a",13),v("click",function(){let t=y(e),u=t.$implicit,g=t.$index,_e=f(2);return P(_e.onUpdateProvider(u,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",14),a(13),r()()()}if(n&2){let e=d.$implicit,o=f(2);l(),p("ngIf",o.role.developer.Edit),l(3),T(" ",e.Name," "),l(2),G(e.ValidateCoupon),l(2),G(e.RedeemCoupon),l(2),G(e.KeyUI),l(2),p("ngClass",j(7,Re,e.Enabled,!e.Enabled)),l(),T(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&O(0,Te,14,10,"tr",null,A),n&2){let e=f();U(e.listProviders())}}function Fe(n,d){n&1&&H(0)}function ke(n,d){if(n&1&&m(0,Fe,1,0,"ng-container",17),n&2){f();let e=$(25);p("ngTemplateOutlet",e)}}function Ve(n,d){n&1&&(i(0,"tr",18)(1,"td",19),s(2,"empty-state-table"),r()())}var he=class n extends ve{constructor(e,o,t,u,g){super(e,o,F.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=u;this.dialog=g}toastr=h(z);couponProviders=V([]);listProviders=K(()=>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(N(e=>w.IsNotEmpty(e)),k(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(N(t=>w.IsNotEmpty(t))).subscribe(t=>{let u={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=u,[...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(F.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(c(se),c(ie),c(W),c(re),c(de))};static \u0275cmp=E({type:n,selectors:[["app-coupon-configuration"]],features:[D],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button","class","btn btn-success",3,"click",4,"ngIf"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],["class","text-center","style","width: 10px",4,"ngIf"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center",2,"width","10px"],["class","text-center",4,"ngIf"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],[1,"text-center"],["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,Me,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,Ie,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()()()()(),m(24,Ve,3,0,"ng-template",null,0,q),r()()),o&2){let u;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),p("ngIf",t.role.developer.Edit),l(8),p("ngIf",t.role.developer.Edit),l(12),C(((u=t.listProviders())==null?null:u.length)>0?22:23)}},dependencies:[M,R,L,B,fe,ce,te,Ce],encapsulation:2})};export{he as CouponConfigurationComponent};
@@ -1,4 +1,4 @@
1
- import{a as yt,c as xt}from"./chunk-QCBXPOJL.js";import{a as wt}from"./chunk-T2PMKO3M.js";import{a as P}from"./chunk-2FWFPV5I.js";import{la as _t,ma as S,ua as ht}from"./chunk-OE7PM4Y4.js";import{F as mt,G as gt,a as st,c as at,h as pt,i as lt,k as ut,o as ct,p as dt}from"./chunk-CB33ZMNF.js";import{a as ot}from"./chunk-KUYSSX54.js";import{$a as l,$b as D,Ab as V,Fa as T,Ib as o,Jb as a,Kb as E,Lb as _,Mb as h,Mc as X,Nb as U,Ob as w,Qb as f,Qc as $,Qd as it,Rb as r,Vd as rt,Wc as I,Yb as A,Yc as tt,Yd as ft,Zc as M,_b as N,bc as q,bd as et,cc as K,db as j,ec as m,fc as Y,gb as W,gc as G,ia as R,ja as H,jc as C,jd as nt,ka as L,kb as O,kc as b,lb as z,lc as v,na as x,ob as Q,pc as Z,qb as g,sc as B,tc as J,va as c,vb as u,wa as d,za as F}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var Ot=["input"],Et=(i,s,t)=>({$implicit:i,events:s,index:t});function It(i,s){if(i&1){let t=w();_(0),o(1,"input",2),f("input",function(n){c(t);let p=r().$implicit,y=r();return d(y.onInput(n,p-1))})("focus",function(n){c(t);let p=r(2);return d(p.onInputFocus(n))})("blur",function(n){c(t);let p=r(2);return d(p.onInputBlur(n))})("paste",function(n){c(t);let p=r(2);return d(p.onPaste(n))})("keydown",function(n){c(t);let p=r(2);return d(p.onKeyDown(n))}),a(),h()}if(i&2){let t=r().$implicit,e=r();l(),u("value",e.getModelValue(t))("maxLength",t===1?e.length:1)("type",e.inputType)("pSize",e.size)("variant",e.variant)("readonly",e.readonly)("disabled",e.disabled)("tabindex",e.tabindex)("pAutoFocus",e.getAutofocus(t))("ngClass",e.styleClass)}}function Mt(i,s){i&1&&U(0)}function St(i,s){if(i&1&&(_(0),g(1,Mt,1,0,"ng-container",3),h()),i&2){let t=r().$implicit,e=r();l(),u("ngTemplateOutlet",e.inputTemplate||e._inputTemplate)("ngTemplateOutletContext",J(2,Et,e.getToken(t-1),e.getTemplateEvents(t-1),t))}}function kt(i,s){if(i&1&&(_(0),g(1,It,2,10,"ng-container",1)(2,St,2,6,"ng-container",1),h()),i&2){let t=r();l(),u("ngIf",!t.inputTemplate&&!t._inputTemplate),l(),u("ngIf",t.inputTemplate||t._inputTemplate)}}var Ft=({dt:i})=>`
1
+ import{a as yt,c as xt}from"./chunk-QCBXPOJL.js";import{a as wt}from"./chunk-T2PMKO3M.js";import{a as P}from"./chunk-2FWFPV5I.js";import{la as _t,ma as S,ua as ht}from"./chunk-OE7PM4Y4.js";import{F as mt,G as gt,a as st,c as at,h as pt,i as lt,k as ut,o as ct,p as dt}from"./chunk-CB33ZMNF.js";import{a as ot}from"./chunk-FRCN6C2S.js";import{$a as l,$b as D,Ab as V,Fa as T,Ib as o,Jb as a,Kb as E,Lb as _,Mb as h,Mc as X,Nb as U,Ob as w,Qb as f,Qc as $,Qd as it,Rb as r,Vd as rt,Wc as I,Yb as A,Yc as tt,Yd as ft,Zc as M,_b as N,bc as q,bd as et,cc as K,db as j,ec as m,fc as Y,gb as W,gc as G,ia as R,ja as H,jc as C,jd as nt,ka as L,kb as O,kc as b,lb as z,lc as v,na as x,ob as Q,pc as Z,qb as g,sc as B,tc as J,va as c,vb as u,wa as d,za as F}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var Ot=["input"],Et=(i,s,t)=>({$implicit:i,events:s,index:t});function It(i,s){if(i&1){let t=w();_(0),o(1,"input",2),f("input",function(n){c(t);let p=r().$implicit,y=r();return d(y.onInput(n,p-1))})("focus",function(n){c(t);let p=r(2);return d(p.onInputFocus(n))})("blur",function(n){c(t);let p=r(2);return d(p.onInputBlur(n))})("paste",function(n){c(t);let p=r(2);return d(p.onPaste(n))})("keydown",function(n){c(t);let p=r(2);return d(p.onKeyDown(n))}),a(),h()}if(i&2){let t=r().$implicit,e=r();l(),u("value",e.getModelValue(t))("maxLength",t===1?e.length:1)("type",e.inputType)("pSize",e.size)("variant",e.variant)("readonly",e.readonly)("disabled",e.disabled)("tabindex",e.tabindex)("pAutoFocus",e.getAutofocus(t))("ngClass",e.styleClass)}}function Mt(i,s){i&1&&U(0)}function St(i,s){if(i&1&&(_(0),g(1,Mt,1,0,"ng-container",3),h()),i&2){let t=r().$implicit,e=r();l(),u("ngTemplateOutlet",e.inputTemplate||e._inputTemplate)("ngTemplateOutletContext",J(2,Et,e.getToken(t-1),e.getTemplateEvents(t-1),t))}}function kt(i,s){if(i&1&&(_(0),g(1,It,2,10,"ng-container",1)(2,St,2,6,"ng-container",1),h()),i&2){let t=r();l(),u("ngIf",!t.inputTemplate&&!t._inputTemplate),l(),u("ngIf",t.inputTemplate||t._inputTemplate)}}var Ft=({dt:i})=>`
2
2
  .p-inputotp {
3
3
  display: flex;
4
4
  align-items: center;
@@ -1 +1 @@
1
- import{c as F,d as H}from"./chunk-ELMKQ62C.js";import{a as N,b as P}from"./chunk-NW73SHIZ.js";import{la as E}from"./chunk-OE7PM4Y4.js";import{F as k,h as j,o as A}from"./chunk-CB33ZMNF.js";import{a as G}from"./chunk-TKBUOGER.js";import{$a as p,Ac as L,Fa as v,Ib as u,Jb as i,Qb as _,Rb as w,Y as g,Yd as s,Zc as M,ca as S,cd as x,d as f,db as a,ec as h,fa as b,gc as T,ja as I,jd as $,kb as y,na as C,o as O,qb as d,vb as m,zc as D}from"./chunk-DJOHANFC.js";var c=class l{http=C(s);onOpenTreeSelector$=new f;outletGroups$=this.onOpenTreeSelector$.pipe(S(e=>e.length?O(e):this.http.get("/API/outlet/ActiveOptions"),[]),g(1));constructor(){}loadOutletGroups(){this.onOpenTreeSelector$.next()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=I({token:l,factory:l.\u0275fac,providedIn:"root"})};function q(l,e){if(l&1&&(u(0,"div"),h(1),i()),l&2){let t=w();p(),T(" ",t.selectedOutletGroupLabel," ")}}function z(l,e){l&1&&(u(0,"label",4),h(1,"Outlet Group"),i())}var R=class l{constructor(e,t){this.http=e;this.outletGroup=t}outletGroups=[];showClear=!1;showLabel=!1;selectedOutletGroup;selectedOutletGroupID;selectedOutletGroupIDChange=new v;selectedOutletGroupLabel;isLoadOutletGroups=!1;top=0;outletGroups$;ngAfterViewInit(){let e=document.querySelector("body");this.top=e.getBoundingClientRect().top*-1}ngOnInit(){this.outletGroups.length>0&&(G.IsEmpty(this.selectedOutletGroupID)&&(this.selectedOutletGroupID=this.outletGroups[0]?.key),this.selectedOutletGroup=this.findSelectedOutletGroup(this.outletGroups,this.selectedOutletGroupID),this.generateLabelSelectedOutletGroup(this.selectedOutletGroup)),this.outletGroups$=this.outletGroup.outletGroups$.pipe(b(e=>{console.log(e),this.selectedOutletGroup=this.findSelectedOutletGroup(e,this.selectedOutletGroupID),this.generateLabelSelectedOutletGroup(this.selectedOutletGroup)}))}onSelectOutletGroup(e){this.selectedOutletGroup=e,this.generateLabelSelectedOutletGroup(this.selectedOutletGroup),this.selectedOutletGroupID=e?.key,this.selectedOutletGroupIDChange.emit(this.selectedOutletGroupID)}generateLabelSelectedOutletGroup(e){if(e){let t=[];this.selectedOutletGroupLabel="";do t=[...t,e.label],e=e.parent;while(e!==void 0);this.selectedOutletGroupLabel=t.reverse().join("/")}else this.selectedOutletGroupLabel="Select OutletGroup"}findSelectedOutletGroup(e,t){if(G.IsNotEmpty(t))for(let o of e){if(o.key===t)return o;{o.children=o.children?o.children:[],o.children=o.children.map(n=>(n.parent=o,n));let r=this.findSelectedOutletGroup(o.children,t);if(r)return r}}else return null}loadOutletGroups(){let e=document.querySelector(".p-overlay.p-component"),t=this.top+e.getBoundingClientRect().top,o=e.getAttribute("style")||"";e.setAttribute("style",`${o} top: ${t+this.top}px;`),this.outletGroup.loadOutletGroups()}onClear(){this.selectedOutletGroupID=null,this.selectedOutletGroupIDChange.emit(this.selectedOutletGroupID)}static \u0275fac=function(t){return new(t||l)(a(s),a(c))};static \u0275cmp=y({type:l,selectors:[["POS-outlet-group-tree-select"]],inputs:{outletGroups:"outletGroups",showClear:"showClear",showLabel:"showLabel",selectedOutletGroupID:"selectedOutletGroupID"},outputs:{selectedOutletGroupIDChange:"selectedOutletGroupIDChange"},decls:5,vars:6,consts:[["variant","on",1,"w-full","md:w-80"],["appendTo","body","inputId","selectOutletGroup","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectOutletGroup",3,"click","ngModelChange","onClear","options","ngModel","showClear"],["pTemplate","value"],["for","selectOutletGroup",4,"ngIf"],["for","selectOutletGroup"]],template:function(t,o){t&1&&(u(0,"p-floatlabel",0)(1,"p-treeSelect",1),D(2,"async"),_("click",function(){return o.loadOutletGroups()})("ngModelChange",function(n){return o.onSelectOutletGroup(n)})("onClear",function(){return o.onClear()}),d(3,q,2,1,"ng-template",2),i(),d(4,z,2,0,"label",3),i()),t&2&&(p(),m("options",L(2,4,o.outletGroups$))("ngModel",o.selectedOutletGroup)("showClear",o.showClear),p(3),m("ngIf",o.showLabel))},dependencies:[$,M,x,H,F,E,k,j,A,P,N],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important}"]})};export{R as a};
1
+ import{c as F,d as H}from"./chunk-FV3BKJGW.js";import{a as N,b as P}from"./chunk-NW73SHIZ.js";import{la as E}from"./chunk-OE7PM4Y4.js";import{F as k,h as j,o as A}from"./chunk-CB33ZMNF.js";import{a as G}from"./chunk-TKBUOGER.js";import{$a as p,Ac as L,Fa as v,Ib as u,Jb as i,Qb as _,Rb as w,Y as g,Yd as s,Zc as M,ca as S,cd as x,d as f,db as a,ec as h,fa as b,gc as T,ja as I,jd as $,kb as y,na as C,o as O,qb as d,vb as m,zc as D}from"./chunk-DJOHANFC.js";var c=class l{http=C(s);onOpenTreeSelector$=new f;outletGroups$=this.onOpenTreeSelector$.pipe(S(e=>e.length?O(e):this.http.get("/API/outlet/ActiveOptions"),[]),g(1));constructor(){}loadOutletGroups(){this.onOpenTreeSelector$.next()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=I({token:l,factory:l.\u0275fac,providedIn:"root"})};function q(l,e){if(l&1&&(u(0,"div"),h(1),i()),l&2){let t=w();p(),T(" ",t.selectedOutletGroupLabel," ")}}function z(l,e){l&1&&(u(0,"label",4),h(1,"Outlet Group"),i())}var R=class l{constructor(e,t){this.http=e;this.outletGroup=t}outletGroups=[];showClear=!1;showLabel=!1;selectedOutletGroup;selectedOutletGroupID;selectedOutletGroupIDChange=new v;selectedOutletGroupLabel;isLoadOutletGroups=!1;top=0;outletGroups$;ngAfterViewInit(){let e=document.querySelector("body");this.top=e.getBoundingClientRect().top*-1}ngOnInit(){this.outletGroups.length>0&&(G.IsEmpty(this.selectedOutletGroupID)&&(this.selectedOutletGroupID=this.outletGroups[0]?.key),this.selectedOutletGroup=this.findSelectedOutletGroup(this.outletGroups,this.selectedOutletGroupID),this.generateLabelSelectedOutletGroup(this.selectedOutletGroup)),this.outletGroups$=this.outletGroup.outletGroups$.pipe(b(e=>{console.log(e),this.selectedOutletGroup=this.findSelectedOutletGroup(e,this.selectedOutletGroupID),this.generateLabelSelectedOutletGroup(this.selectedOutletGroup)}))}onSelectOutletGroup(e){this.selectedOutletGroup=e,this.generateLabelSelectedOutletGroup(this.selectedOutletGroup),this.selectedOutletGroupID=e?.key,this.selectedOutletGroupIDChange.emit(this.selectedOutletGroupID)}generateLabelSelectedOutletGroup(e){if(e){let t=[];this.selectedOutletGroupLabel="";do t=[...t,e.label],e=e.parent;while(e!==void 0);this.selectedOutletGroupLabel=t.reverse().join("/")}else this.selectedOutletGroupLabel="Select OutletGroup"}findSelectedOutletGroup(e,t){if(G.IsNotEmpty(t))for(let o of e){if(o.key===t)return o;{o.children=o.children?o.children:[],o.children=o.children.map(n=>(n.parent=o,n));let r=this.findSelectedOutletGroup(o.children,t);if(r)return r}}else return null}loadOutletGroups(){let e=document.querySelector(".p-overlay.p-component"),t=this.top+e.getBoundingClientRect().top,o=e.getAttribute("style")||"";e.setAttribute("style",`${o} top: ${t+this.top}px;`),this.outletGroup.loadOutletGroups()}onClear(){this.selectedOutletGroupID=null,this.selectedOutletGroupIDChange.emit(this.selectedOutletGroupID)}static \u0275fac=function(t){return new(t||l)(a(s),a(c))};static \u0275cmp=y({type:l,selectors:[["POS-outlet-group-tree-select"]],inputs:{outletGroups:"outletGroups",showClear:"showClear",showLabel:"showLabel",selectedOutletGroupID:"selectedOutletGroupID"},outputs:{selectedOutletGroupIDChange:"selectedOutletGroupIDChange"},decls:5,vars:6,consts:[["variant","on",1,"w-full","md:w-80"],["appendTo","body","inputId","selectOutletGroup","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectOutletGroup",3,"click","ngModelChange","onClear","options","ngModel","showClear"],["pTemplate","value"],["for","selectOutletGroup",4,"ngIf"],["for","selectOutletGroup"]],template:function(t,o){t&1&&(u(0,"p-floatlabel",0)(1,"p-treeSelect",1),D(2,"async"),_("click",function(){return o.loadOutletGroups()})("ngModelChange",function(n){return o.onSelectOutletGroup(n)})("onClear",function(){return o.onClear()}),d(3,q,2,1,"ng-template",2),i(),d(4,z,2,0,"label",3),i()),t&2&&(p(),m("options",L(2,4,o.outletGroups$))("ngModel",o.selectedOutletGroup)("showClear",o.showClear),p(3),m("ngIf",o.showLabel))},dependencies:[$,M,x,H,F,E,k,j,A,P,N],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important}"]})};export{R as a};
@@ -1 +1 @@
1
- import{a as Ce}from"./chunk-5UKMHAPS.js";import{a as Me}from"./chunk-QWZ5AM3L.js";import{a as Pe}from"./chunk-O3CGA22W.js";import{a as ve}from"./chunk-7LXPGNYF.js";import{b as be,c as Se}from"./chunk-XOQ4SW2R.js";import{a as ue}from"./chunk-QTAOV4NJ.js";import"./chunk-GIKR6Y2K.js";import"./chunk-REQUYIUO.js";import{F as he,b as de,h as me,o as fe}from"./chunk-CB33ZMNF.js";import{a as T,c as h}from"./chunk-ZOS6KCAU.js";import{a as ge}from"./chunk-FVQ5OKEX.js";import{a as M,d as I}from"./chunk-TKBUOGER.js";import{a as ce}from"./chunk-KUYSSX54.js";import{$ as H,$a as c,Bc as te,E,Ib as o,Jb as s,Kb as p,Nd as oe,Pd as ae,Qb as C,Qd as b,Rb as Q,Rd as se,Sd as le,Td as B,Vb as Z,Vd as pe,Wa as J,Wc as ie,Yc as ne,d as G,da as D,db as v,ec as m,fc as V,gc as $,ja as d,jd as re,ka as y,kb as q,lb as x,ma as _,na as l,qb as j,rc as K,sc as X,ub as Y,vb as f,xb as W,zb as F,zc as ee}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var r=class e{constructor(i,t){this.authService=i;this.router=t}canLoad(i,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(i){let t="/menu";i.forEach(a=>t+=`/${a.path}`);let n=this.router.getCurrentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(h),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(i){this.toastrService=i;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(i){console.error(i)}}showAlert(i,t,n,u){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:i,icon:u});g.onerror=R=>{this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}}catch(g){console.error(g)}else this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}setBody(i,t){return this.hasUrl(t)&&(i=`<a href="${t}" target="_blank" class="ps-0">${i}</a>`),i}hasUrl(i){return!!(i&&i.length!==0)}static \u0275fac=function(t){return new(t||e)(_(pe))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var _e=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=l(I);authService=l(h);menu=_e;filteredMenu=[];initFilteredMenu(){this.filteredMenu=this.menu.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?this.role.report.View:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(i){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=l(I);authService=l(h);filteredMenu=[];initFilteredMenu(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=Oe.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&i!=2&&i!=3:t.T=="My Sales"?i!=2&&i!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,i)=>({"full-container":e,"subscription-bar-visible":i}),Ue=e=>[e];function Ne(e,i){if(e&1&&(o(0,"a",35),p(1,"i",36),o(2,"span"),m(3),s()()),e&2){let t=i.$implicit;f("routerLink",t==null?null:t.U),c(),F((t==null?null:t.I)+" me-2"),c(2),V(t==null?null:t.T)}}function Re(e,i){if(e&1&&(o(0,"li",37,0)(2,"a",38),p(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=i.$implicit,n=Q();f("routerLinkActiveOptions",n.isActiveMatchOptions),Y("data-cy",t==null?null:t.T),c(2),f("matTooltip",n.toggleSideMenu?t==null?null:t.T:"")("routerLink",K(7,Ue,t==null?null:t.U)),c(),F(t==null?null:t.I),c(2),V(t==null?null:t.T)}}var P=class e{constructor(i,t,n,u,a,g,R,z){this.toggleSidebar=i;this.signalRClientService=t;this.notificationAlertService=n;this.router=u;this.authService=a;this.intercomService=g;R.initFilteredMenu(),z.initFilteredMenu(),this.leftSidebarMenu=R.filteredMenu,this.topMenu=z.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(xe=>this.isNavOpen=xe),this.destroy$=new G,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=ce.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(i=>i instanceof oe),H(null),D(this.destroy$)).subscribe(i=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let i=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(i)&&M.isGuid(i)?this.signalRClientService.SubscribeGroup(i):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let n=JSON.parse(t),u="//res.cloudinary.com/pos/image/upload/v1657006791/icons/info-new.png";M.IsNotEmpty(n.Icon)&&(u=n.Icon),this.notificationAlertService.showAlert(n.Body,n.Header,n.URL,u)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(i){return M.IsNotEmpty(i)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(ve),v(ue),v(w),v(b),v(h),v(ge),v(k),v(A))};static \u0275cmp=q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:52,vars:19,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["class","dropdown-item h5",3,"routerLink",4,"ngFor","ngForOf"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions",4,"ngFor","ngForOf"],["id","full-container",1,"main-panel",3,"ngClass"],[1,"dropdown-item","h5",3,"routerLink"],["aria-hidden","true"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,n){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return n.toggleMenu()}),p(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return n.onShowDropdown()}),m(7),ee(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),p(12,"div",10),j(13,Ne,4,4,"a",11),o(14,"a",12)(15,"div",13)(16,"div"),p(17,"i",14),o(18,"span"),m(19,"Chat Support"),s()(),o(20,"div",15),C("click",function(a){return a.stopPropagation()}),o(21,"input",16),C("ngModelChange",function(){return n.chatToggleChange()}),s(),p(22,"label",17),s()()(),o(23,"a",18),C("click",function(){return n.logout()}),p(24,"i",19),o(25,"span"),m(26,"Log Out"),s()(),p(27,"div",20),o(28,"div",21),m(29," Links "),s(),o(30,"a",22),p(31,"i",23),o(32,"span"),m(33,"What's New"),p(34,"i",24),s()(),o(35,"a",25),p(36,"i",26),o(37,"span"),m(38,"Help Center"),s()(),o(39,"a",27),p(40,"i",28),o(41,"span"),m(42,"App Store"),s()(),o(43,"a",29),p(44,"i",30),o(45,"span"),m(46,"Company Blog"),s()()()()(),o(47,"div",31)(48,"ul",32),j(49,Re,6,9,"li",33),s()()(),o(50,"div",34),p(51,"router-outlet"),s()()),t&2&&(W("nav-open",n.isNavOpen),c(),f("ngClass",n.toggleSideMenu?"collapses":""),c(2),f("ngClass",n.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),c(3),f("matTooltip",n.accountInfo==null?null:n.accountInfo.BrandName),c(),$(" ",te(8,13,n.accountInfo==null?null:n.accountInfo.BrandName,12)," "),c(4),$("",n.accountInfo==null?null:n.accountInfo.UserName," "),c(2),f("ngForOf",n.topMenu),c(8),f("ngModel",!n.isHideIntercomLauncher),c(9),Z("href","https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",n.appVersion,"",J),c(19),f("ngForOf",n.leftSidebarMenu),c(),f("ngClass",X(16,Le,n.isFullContainer,n.isNotEmpty(n.currentSubStatus)&&n.currentSubStatus!==n.subsStatusEnum.PAID)))},dependencies:[be,ae,se,le,de,me,fe,ie,ne,Me],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function Ee(e){let i=l(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let n=i.getCurrentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}var O=(e,i)=>{let t=l(h),n=t.isTokenExpired(),u=l(b);return n?(t.returnUrl=Ee(i),u.navigate(["/"]),!1):e.path=="Dashboard"?De():!0};function De(){let e=l(b),i=l(h),t=!1,n=i.getRedirectUrl();return t=n.includes("Dashboard"),t==!1&&e.navigate([n]),t}var L=class e{paymentStorageService=l(Ce);canActivate(i,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var U=class e{reportService=l(Pe);canActivate(i,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var je=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-ARPTC7FZ.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-6UVOVZTG.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[U]},{path:"Sell",loadChildren:()=>import("./chunk-IVT2LRG6.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-OQABAMLZ.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-DIYOL4ZX.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-AB7FXZGQ.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-M37QLVGO.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-TZSF5N2H.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-5DNCP5FC.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-AWEVLUH4.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-CSH47SQR.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-4LSMOT7D.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-KFPPOQTN.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-VAIGUQRA.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-TBACZZO3.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-45OAODEJ.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-XI5VA4B3.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-LWQPQ3JP.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-P4TN4CJP.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-YYIP7MBV.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-TXSBSJRQ.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[L]},{path:"Promotion",loadChildren:()=>import("./chunk-NC4J2MQI.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-RJFQ65N4.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-XSODSITQ.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-FLA5R3YT.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-E3OGY6ES.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-MB3355JD.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],N=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[B.forChild(je),B]})};var ye=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Se,N,he,re]})};export{ye as MenuMasterModule};
1
+ import{a as Ce}from"./chunk-6ZW5QNJV.js";import{a as Me}from"./chunk-QWZ5AM3L.js";import{a as Pe}from"./chunk-NKY2S7AY.js";import{a as ve}from"./chunk-7LXPGNYF.js";import{b as be,c as Se}from"./chunk-XOQ4SW2R.js";import{a as ue}from"./chunk-QTAOV4NJ.js";import"./chunk-GIKR6Y2K.js";import"./chunk-REQUYIUO.js";import{F as he,b as de,h as me,o as fe}from"./chunk-CB33ZMNF.js";import{a as T,c as h}from"./chunk-UC2B2WJN.js";import{a as ge}from"./chunk-3Q7UXVEJ.js";import{a as M,d as I}from"./chunk-TKBUOGER.js";import{a as ce}from"./chunk-FRCN6C2S.js";import{$ as H,$a as c,Bc as te,E,Ib as o,Jb as s,Kb as p,Nd as oe,Pd as ae,Qb as C,Qd as b,Rb as Q,Rd as se,Sd as le,Td as B,Vb as Z,Vd as pe,Wa as J,Wc as ie,Yc as ne,d as G,da as D,db as v,ec as m,fc as V,gc as $,ja as d,jd as re,ka as y,kb as q,lb as x,ma as _,na as l,qb as j,rc as K,sc as X,ub as Y,vb as f,xb as W,zb as F,zc as ee}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var r=class e{constructor(i,t){this.authService=i;this.router=t}canLoad(i,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(i){let t="/menu";i.forEach(a=>t+=`/${a.path}`);let n=this.router.getCurrentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(h),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(i){this.toastrService=i;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(i){console.error(i)}}showAlert(i,t,n,u){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:i,icon:u});g.onerror=R=>{this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}}catch(g){console.error(g)}else this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}setBody(i,t){return this.hasUrl(t)&&(i=`<a href="${t}" target="_blank" class="ps-0">${i}</a>`),i}hasUrl(i){return!!(i&&i.length!==0)}static \u0275fac=function(t){return new(t||e)(_(pe))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var _e=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=l(I);authService=l(h);menu=_e;filteredMenu=[];initFilteredMenu(){this.filteredMenu=this.menu.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?this.role.report.View:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(i){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=l(I);authService=l(h);filteredMenu=[];initFilteredMenu(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=Oe.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&i!=2&&i!=3:t.T=="My Sales"?i!=2&&i!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,i)=>({"full-container":e,"subscription-bar-visible":i}),Ue=e=>[e];function Ne(e,i){if(e&1&&(o(0,"a",35),p(1,"i",36),o(2,"span"),m(3),s()()),e&2){let t=i.$implicit;f("routerLink",t==null?null:t.U),c(),F((t==null?null:t.I)+" me-2"),c(2),V(t==null?null:t.T)}}function Re(e,i){if(e&1&&(o(0,"li",37,0)(2,"a",38),p(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=i.$implicit,n=Q();f("routerLinkActiveOptions",n.isActiveMatchOptions),Y("data-cy",t==null?null:t.T),c(2),f("matTooltip",n.toggleSideMenu?t==null?null:t.T:"")("routerLink",K(7,Ue,t==null?null:t.U)),c(),F(t==null?null:t.I),c(2),V(t==null?null:t.T)}}var P=class e{constructor(i,t,n,u,a,g,R,z){this.toggleSidebar=i;this.signalRClientService=t;this.notificationAlertService=n;this.router=u;this.authService=a;this.intercomService=g;R.initFilteredMenu(),z.initFilteredMenu(),this.leftSidebarMenu=R.filteredMenu,this.topMenu=z.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(xe=>this.isNavOpen=xe),this.destroy$=new G,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=ce.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(i=>i instanceof oe),H(null),D(this.destroy$)).subscribe(i=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let i=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(i)&&M.isGuid(i)?this.signalRClientService.SubscribeGroup(i):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let n=JSON.parse(t),u="//res.cloudinary.com/pos/image/upload/v1657006791/icons/info-new.png";M.IsNotEmpty(n.Icon)&&(u=n.Icon),this.notificationAlertService.showAlert(n.Body,n.Header,n.URL,u)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(i){return M.IsNotEmpty(i)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(ve),v(ue),v(w),v(b),v(h),v(ge),v(k),v(A))};static \u0275cmp=q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:52,vars:19,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["class","dropdown-item h5",3,"routerLink",4,"ngFor","ngForOf"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions",4,"ngFor","ngForOf"],["id","full-container",1,"main-panel",3,"ngClass"],[1,"dropdown-item","h5",3,"routerLink"],["aria-hidden","true"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,n){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return n.toggleMenu()}),p(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return n.onShowDropdown()}),m(7),ee(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),p(12,"div",10),j(13,Ne,4,4,"a",11),o(14,"a",12)(15,"div",13)(16,"div"),p(17,"i",14),o(18,"span"),m(19,"Chat Support"),s()(),o(20,"div",15),C("click",function(a){return a.stopPropagation()}),o(21,"input",16),C("ngModelChange",function(){return n.chatToggleChange()}),s(),p(22,"label",17),s()()(),o(23,"a",18),C("click",function(){return n.logout()}),p(24,"i",19),o(25,"span"),m(26,"Log Out"),s()(),p(27,"div",20),o(28,"div",21),m(29," Links "),s(),o(30,"a",22),p(31,"i",23),o(32,"span"),m(33,"What's New"),p(34,"i",24),s()(),o(35,"a",25),p(36,"i",26),o(37,"span"),m(38,"Help Center"),s()(),o(39,"a",27),p(40,"i",28),o(41,"span"),m(42,"App Store"),s()(),o(43,"a",29),p(44,"i",30),o(45,"span"),m(46,"Company Blog"),s()()()()(),o(47,"div",31)(48,"ul",32),j(49,Re,6,9,"li",33),s()()(),o(50,"div",34),p(51,"router-outlet"),s()()),t&2&&(W("nav-open",n.isNavOpen),c(),f("ngClass",n.toggleSideMenu?"collapses":""),c(2),f("ngClass",n.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),c(3),f("matTooltip",n.accountInfo==null?null:n.accountInfo.BrandName),c(),$(" ",te(8,13,n.accountInfo==null?null:n.accountInfo.BrandName,12)," "),c(4),$("",n.accountInfo==null?null:n.accountInfo.UserName," "),c(2),f("ngForOf",n.topMenu),c(8),f("ngModel",!n.isHideIntercomLauncher),c(9),Z("href","https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",n.appVersion,"",J),c(19),f("ngForOf",n.leftSidebarMenu),c(),f("ngClass",X(16,Le,n.isFullContainer,n.isNotEmpty(n.currentSubStatus)&&n.currentSubStatus!==n.subsStatusEnum.PAID)))},dependencies:[be,ae,se,le,de,me,fe,ie,ne,Me],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function Ee(e){let i=l(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let n=i.getCurrentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}var O=(e,i)=>{let t=l(h),n=t.isTokenExpired(),u=l(b);return n?(t.returnUrl=Ee(i),u.navigate(["/"]),!1):e.path=="Dashboard"?De():!0};function De(){let e=l(b),i=l(h),t=!1,n=i.getRedirectUrl();return t=n.includes("Dashboard"),t==!1&&e.navigate([n]),t}var L=class e{paymentStorageService=l(Ce);canActivate(i,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var U=class e{reportService=l(Pe);canActivate(i,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var je=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-2G7CFAEB.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-WT2YZYZ7.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[U]},{path:"Sell",loadChildren:()=>import("./chunk-TJIGR2WO.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-OQABAMLZ.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-EG46WMFJ.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-FJPAOEQH.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-QZEE3BIX.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-WIT6FJSI.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-Q3RST7GR.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-A4EX7WBL.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-OHHX5AVS.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-GW3UEDTL.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-BHR44XGQ.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-OLAYYOYX.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-NETNSE7N.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-ZOVUG76U.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-QKJHIZWL.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-YULBQPYG.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-EWXPGGNY.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-XYZHL2RI.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-YMI65UH7.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[L]},{path:"Promotion",loadChildren:()=>import("./chunk-YFMHWW77.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-PYNQZXQQ.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-C6V3DPDE.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-DMHVB7ER.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-CRYG455U.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-7G6TIMT4.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],N=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[B.forChild(je),B]})};var ye=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Se,N,he,re]})};export{ye as MenuMasterModule};
@@ -1 +1 @@
1
- import{b as c}from"./chunk-ZOS6KCAU.js";import{ja as r,na as s}from"./chunk-DJOHANFC.js";var i=class{to;from;constructor(){this.to=new Date,this.from=new Date}};var n=class o{cookiesService=s(c);_cookiesName="PaymentDate";dateFilter={from:new Date,to:new Date};set(e){this.saveFilterToCookie(e),this.dateFilter=e}initFilterDate(e){let t;if(this.checkCookieExists())t=this.get();else{let a=e.From||new Date,m=e.To||new Date;t={from:a,to:m}}return e.From=t.from,e.To=t.to,e}get(){return this.checkCookieExists()?this.dateFilter=JSON.parse(this.cookiesService.get(this._cookiesName)):this.dateFilter=new i,this.dateFilter}checkCookieExists(){return this.cookiesService.check(this._cookiesName)}saveFilterToCookie(e){this.cookiesService.set(this._cookiesName,JSON.stringify(e),this.getExpiredDate(),"/")}clear(){this.cookiesService.delete(this._cookiesName,"/"),this.dateFilter=new i}getExpiredDate(){let e=new Date,a=1*60*60*1e3;return e.setTime(e.getTime()+a),e}static \u0275fac=function(t){return new(t||o)};static \u0275prov=r({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
1
+ import{b as c}from"./chunk-UC2B2WJN.js";import{ja as r,na as s}from"./chunk-DJOHANFC.js";var i=class{to;from;constructor(){this.to=new Date,this.from=new Date}};var n=class o{cookiesService=s(c);_cookiesName="PaymentDate";dateFilter={from:new Date,to:new Date};set(e){this.saveFilterToCookie(e),this.dateFilter=e}initFilterDate(e){let t;if(this.checkCookieExists())t=this.get();else{let a=e.From||new Date,m=e.To||new Date;t={from:a,to:m}}return e.From=t.from,e.To=t.to,e}get(){return this.checkCookieExists()?this.dateFilter=JSON.parse(this.cookiesService.get(this._cookiesName)):this.dateFilter=new i,this.dateFilter}checkCookieExists(){return this.cookiesService.check(this._cookiesName)}saveFilterToCookie(e){this.cookiesService.set(this._cookiesName,JSON.stringify(e),this.getExpiredDate(),"/")}clear(){this.cookiesService.delete(this._cookiesName,"/"),this.dateFilter=new i}getExpiredDate(){let e=new Date,a=1*60*60*1e3;return e.setTime(e.getTime()+a),e}static \u0275fac=function(t){return new(t||o)};static \u0275prov=r({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
@@ -1 +1 @@
1
- import{e as l}from"./chunk-FDV5CP2Q.js";import"./chunk-DCFP5QGY.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import"./chunk-CB33ZMNF.js";import"./chunk-ZOS6KCAU.js";import"./chunk-FVQ5OKEX.js";import"./chunk-TKBUOGER.js";import"./chunk-KUYSSX54.js";import{Ib as o,Jb as m,Kb as c,Td as d,ec as p,jd as f,ka as n,kb as u,lb as i}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var a=class t{menuData={H:"Not Found"};constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=u({type:t,selectors:[["POS-not-found-page"]],standalone:!1,decls:12,vars:0,consts:[[1,"container-fluid","mt-12"],[1,"row"],[1,"col-1"],[1,"col-6","d-flex","align-items-center","justify-content-center","pe-0"],[1,"ms-12"],[1,"mb-0","fw-normal",2,"margin-top","20px","font-size","55px"],[1,"fs-4"],[1,"col-5","ps-0"],["src","//res.cloudinary.com/pos/image/upload/v1652836870/POS/Images/MicrosoftTeams-image.jpg","alt","",2,"width","50%"]],template:function(e,y){e&1&&(o(0,"content")(1,"div",0)(2,"div",1),c(3,"div",2),o(4,"div",3)(5,"div",4)(6,"h1",5),p(7," Page Not Found "),m(),o(8,"p",6),p(9,"The page you are trying to access cannot be found"),m()()(),o(10,"div",7),c(11,"img",8),m()()()())},encapsulation:2})};var M=[{path:"",component:a}],r=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[d.forChild(M),d]})};var N=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[f,r,l]})};export{N as NotFoundModule};
1
+ import{e as l}from"./chunk-F5VCUVZF.js";import"./chunk-O55KYVIP.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import"./chunk-CB33ZMNF.js";import"./chunk-UC2B2WJN.js";import"./chunk-3Q7UXVEJ.js";import"./chunk-TKBUOGER.js";import"./chunk-FRCN6C2S.js";import{Ib as o,Jb as m,Kb as c,Td as d,ec as p,jd as f,ka as n,kb as u,lb as i}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var a=class t{menuData={H:"Not Found"};constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=u({type:t,selectors:[["POS-not-found-page"]],standalone:!1,decls:12,vars:0,consts:[[1,"container-fluid","mt-12"],[1,"row"],[1,"col-1"],[1,"col-6","d-flex","align-items-center","justify-content-center","pe-0"],[1,"ms-12"],[1,"mb-0","fw-normal",2,"margin-top","20px","font-size","55px"],[1,"fs-4"],[1,"col-5","ps-0"],["src","//res.cloudinary.com/pos/image/upload/v1652836870/POS/Images/MicrosoftTeams-image.jpg","alt","",2,"width","50%"]],template:function(e,y){e&1&&(o(0,"content")(1,"div",0)(2,"div",1),c(3,"div",2),o(4,"div",3)(5,"div",4)(6,"h1",5),p(7," Page Not Found "),m(),o(8,"p",6),p(9,"The page you are trying to access cannot be found"),m()()(),o(10,"div",7),c(11,"img",8),m()()()())},encapsulation:2})};var M=[{path:"",component:a}],r=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[d.forChild(M),d]})};var N=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[f,r,l]})};export{N as NotFoundModule};