dealpos 25.32.1 → 25.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/browser/{chunk-WMOWM6XW.js → chunk-25QFQDV7.js} +1 -1
  2. package/browser/{chunk-KBE7CFXH.js → chunk-2PTTCVFQ.js} +1 -1
  3. package/browser/{chunk-RJVF37GS.js → chunk-3H43P5YA.js} +1 -1
  4. package/browser/{chunk-MW5P4LM5.js → chunk-3M2BUDUB.js} +1 -1
  5. package/browser/{chunk-ZSBJ4BDP.js → chunk-3SRUJJ6G.js} +1 -1
  6. package/browser/{chunk-6ZHV4H72.js → chunk-47TF4O2L.js} +1 -1
  7. package/browser/{chunk-DWBSJPMC.js → chunk-5GH2UM6Y.js} +1 -1
  8. package/browser/{chunk-TUL555Y3.js → chunk-5KFKRR6I.js} +1 -1
  9. package/browser/{chunk-3BKJB4EB.js → chunk-5XRERMVQ.js} +1 -1
  10. package/browser/{chunk-DDVWUPV6.js → chunk-6DCFTPUD.js} +1 -1
  11. package/browser/{chunk-WP4PM74K.js → chunk-6DO5AW57.js} +1 -1
  12. package/browser/{chunk-4O6KU55Y.js → chunk-6KABYQ7Y.js} +2 -2
  13. package/browser/{chunk-LB5S2KZX.js → chunk-6THPJHMQ.js} +1 -1
  14. package/browser/{chunk-KFV3U2MG.js → chunk-6ZKXKIPB.js} +1 -1
  15. package/browser/{chunk-RDARJWEZ.js → chunk-7P2INFVM.js} +1 -1
  16. package/browser/{chunk-5MDQYEMB.js → chunk-7UEXOSTA.js} +1 -1
  17. package/browser/{chunk-BL367NTS.js → chunk-ADUMDXZG.js} +1 -1
  18. package/browser/{chunk-RTJEAKQW.js → chunk-AIJM455Q.js} +1 -1
  19. package/browser/{chunk-PGQ4D2W6.js → chunk-AVIHEFZ3.js} +1 -1
  20. package/browser/{chunk-A7WBJIJP.js → chunk-C7SBDH6E.js} +1 -1
  21. package/browser/{chunk-6S6Q7SED.js → chunk-CU7IWKXB.js} +1 -1
  22. package/browser/{chunk-UFHFKY4U.js → chunk-DGM743IJ.js} +1 -1
  23. package/browser/{chunk-JCJZ6B6B.js → chunk-F2V3ZAGL.js} +1 -1
  24. package/browser/{chunk-4D6P6ZN5.js → chunk-F4Y6BS2M.js} +1 -1
  25. package/browser/{chunk-DZG3LGZ3.js → chunk-GDXXQ6LD.js} +1 -1
  26. package/browser/{chunk-LWWP5RGP.js → chunk-GX3N6CKR.js} +1 -1
  27. package/browser/{chunk-GPYDY4KE.js → chunk-H42QJQ56.js} +1 -1
  28. package/browser/{chunk-XDPWF5CB.js → chunk-HCGM3SVB.js} +1 -1
  29. package/browser/{chunk-GFYZWIV4.js → chunk-HDG7HN7O.js} +1 -1
  30. package/browser/{chunk-RVN4YQAX.js → chunk-HIFPWLFR.js} +1 -1
  31. package/browser/{chunk-SL4VOAHY.js → chunk-K6KQDJU7.js} +2 -2
  32. package/browser/chunk-KMVCVCCD.js +1 -0
  33. package/browser/{chunk-CZ7F77ZP.js → chunk-KR3JCXDQ.js} +1 -1
  34. package/browser/{chunk-HT7MBQYU.js → chunk-KWLJQH42.js} +1 -1
  35. package/browser/{chunk-N66KZGXZ.js → chunk-L7235LXI.js} +1 -1
  36. package/browser/{chunk-B7VLDW2D.js → chunk-LTIAN3DJ.js} +1 -1
  37. package/browser/{chunk-JY4TU5LB.js → chunk-MLEZTHWZ.js} +1 -1
  38. package/browser/{chunk-QUWHJ3A2.js → chunk-MMCM7B5Z.js} +2 -2
  39. package/browser/{chunk-I33SFWJL.js → chunk-MZDT5S4Y.js} +1 -1
  40. package/browser/{chunk-MA64N42O.js → chunk-NT3GFLD4.js} +1 -1
  41. package/browser/{chunk-DJA3CX47.js → chunk-O36QNAMF.js} +1 -1
  42. package/browser/{chunk-MBSLDPJK.js → chunk-OAJ5KECL.js} +1 -1
  43. package/browser/{chunk-WFX2XCFO.js → chunk-OI47XFJO.js} +1 -1
  44. package/browser/{chunk-UZGPU4VW.js → chunk-PYX4Z6HP.js} +1 -1
  45. package/browser/{chunk-KU2S24JO.js → chunk-Q6DGG2JP.js} +1 -1
  46. package/browser/{chunk-3IE46WQL.js → chunk-QB74573V.js} +2 -2
  47. package/browser/{chunk-RSSYP5IL.js → chunk-QLTG2D75.js} +1 -1
  48. package/browser/{chunk-PFK4WL2H.js → chunk-QSFZXQNP.js} +1 -1
  49. package/browser/{chunk-OM6SJITM.js → chunk-QZC2AATI.js} +1 -1
  50. package/browser/{chunk-PKRNN3GZ.js → chunk-R3SYCIJT.js} +1 -1
  51. package/browser/{chunk-42NI5Y2B.js → chunk-R5GVVUMP.js} +1 -1
  52. package/browser/{chunk-JDMYDBXN.js → chunk-RACFHMSM.js} +1 -1
  53. package/browser/{chunk-ZNWP7UK2.js → chunk-S2GLPFVJ.js} +1 -1
  54. package/browser/{chunk-F6ZI74HP.js → chunk-SPYVACLB.js} +1 -1
  55. package/browser/{chunk-6VQ2WO2R.js → chunk-SVPBMCHF.js} +1 -1
  56. package/browser/{chunk-3HGB2KX7.js → chunk-TKRCAX4C.js} +1 -1
  57. package/browser/{chunk-BAW2PCX4.js → chunk-TNKIGPBP.js} +1 -1
  58. package/browser/{chunk-EAPNMYHA.js → chunk-TYEOX5VV.js} +1 -1
  59. package/browser/{chunk-K25WE32L.js → chunk-U6GZZKLZ.js} +1 -1
  60. package/browser/{chunk-RAKPTR5Z.js → chunk-UIL2X6EZ.js} +1 -1
  61. package/browser/chunk-UILC7AVT.js +125 -0
  62. package/browser/{chunk-GLZMFXE6.js → chunk-W5XUYOZS.js} +2 -2
  63. package/browser/{chunk-ERJFDQFX.js → chunk-WGKL5OIB.js} +1 -1
  64. package/browser/{chunk-GGEENO4M.js → chunk-WPFM3ZGY.js} +1 -1
  65. package/browser/{chunk-VVYAL6Y7.js → chunk-XBEEV2NG.js} +1 -1
  66. package/browser/{chunk-APVQGR37.js → chunk-XV2R2LYT.js} +1 -1
  67. package/browser/{chunk-WYO3ICL4.js → chunk-XVW4JKBX.js} +1 -1
  68. package/browser/{chunk-LQKZB5PG.js → chunk-ZZ33EHCQ.js} +1 -1
  69. package/browser/index.html +2 -2
  70. package/browser/{main-Q6EK5PKL.js → main-KYIE53MH.js} +2 -2
  71. package/package.json +1 -1
  72. package/browser/chunk-IHY7TFGQ.js +0 -125
  73. package/browser/chunk-SG2RKHTW.js +0 -1
@@ -1 +1 @@
1
- import{a as de}from"./chunk-I33SFWJL.js";import{h as me,i as se}from"./chunk-GGEENO4M.js";import"./chunk-6S6Q7SED.js";import{b as le}from"./chunk-APVQGR37.js";import"./chunk-GDLTEIKV.js";import"./chunk-PNVRIGOW.js";import{C as ae,D as ne,E as re,u as te,v as ie,w as oe}from"./chunk-KMVWE6IR.js";import"./chunk-4IJDCXOA.js";import"./chunk-QMH4FATM.js";import"./chunk-SRELAFRM.js";import"./chunk-O4T67QQ3.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-WUSKRV4R.js";import{C as X,D as Z,c as G,h as z,o as J,y as Q}from"./chunk-J577JGRK.js";import"./chunk-RDARJWEZ.js";import"./chunk-JDMYDBXN.js";import{a as W}from"./chunk-EQ6536VC.js";import"./chunk-LQKZB5PG.js";import{$a as m,Db as F,E as A,Ib as o,Jb as a,Kb as w,Lb as T,Ma as Y,Mb as g,Md as H,Ob as y,Qb as _,Rb as u,Td as q,Uc as U,Wc as j,Wd as $,Xc as v,db as f,dc as O,ec as r,ed as K,fc as R,gc as x,hd as h,jc as E,kb as b,kc as M,lc as P,ob as L,pc as D,qb as S,va as d,vb as c,wa as p,xc as k,yc as B}from"./chunk-ONCTFURX.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-MZDT5S4Y.js";import{h as me,i as se}from"./chunk-WPFM3ZGY.js";import"./chunk-CU7IWKXB.js";import{b as le}from"./chunk-XV2R2LYT.js";import"./chunk-GDLTEIKV.js";import"./chunk-PNVRIGOW.js";import{C as ae,D as ne,E as re,u as te,v as ie,w as oe}from"./chunk-KMVWE6IR.js";import"./chunk-4IJDCXOA.js";import"./chunk-QMH4FATM.js";import"./chunk-SRELAFRM.js";import"./chunk-O4T67QQ3.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-WUSKRV4R.js";import{C as X,D as Z,c as G,h as z,o as J,y as Q}from"./chunk-J577JGRK.js";import"./chunk-7P2INFVM.js";import"./chunk-RACFHMSM.js";import{a as W}from"./chunk-EQ6536VC.js";import"./chunk-ZZ33EHCQ.js";import{$a as m,Db as F,E as A,Ib as o,Jb as a,Kb as w,Lb as T,Ma as Y,Mb as g,Md as H,Ob as y,Qb as _,Rb as u,Td as q,Uc as U,Wc as j,Wd as $,Xc as v,db as f,dc as O,ec as r,ed as K,fc as R,gc as x,hd as h,jc as E,kb as b,kc as M,lc as P,ob as L,pc as D,qb as S,va as d,vb as c,wa as p,xc as k,yc as B}from"./chunk-ONCTFURX.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};