dealpos 25.31.2 → 25.31.4

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 (72) hide show
  1. package/browser/{chunk-XHBIIXPS.js → chunk-2DUED7ZR.js} +1 -1
  2. package/browser/{chunk-W5PF5BAF.js → chunk-2EVNVVFK.js} +1 -1
  3. package/browser/{chunk-ZESJJFN2.js → chunk-2T7IINRT.js} +1 -1
  4. package/browser/{chunk-6EI3EXE7.js → chunk-2ZGK5566.js} +1 -1
  5. package/browser/{chunk-TU4O6KBQ.js → chunk-32OZVFJK.js} +1 -1
  6. package/browser/{chunk-UHGOF24M.js → chunk-3G5ELBPD.js} +1 -1
  7. package/browser/{chunk-SJHBFLM7.js → chunk-466WTRXG.js} +1 -1
  8. package/browser/{chunk-HIUH7JJU.js → chunk-46H7MV5K.js} +1 -1
  9. package/browser/{chunk-L27WHOBJ.js → chunk-4P46Z6BK.js} +1 -1
  10. package/browser/{chunk-RGM2KZ5L.js → chunk-4UQJISWF.js} +1 -1
  11. package/browser/chunk-4XHFFY73.js +1 -0
  12. package/browser/{chunk-OBZMOT6W.js → chunk-6EQJIS3K.js} +1 -1
  13. package/browser/{chunk-74ZM5NHT.js → chunk-7O4KILVO.js} +1 -1
  14. package/browser/{chunk-YU32SBPB.js → chunk-7PKREZ2F.js} +1 -1
  15. package/browser/{chunk-J6RZLLDH.js → chunk-A2WJJXY7.js} +1 -1
  16. package/browser/{chunk-MLQCCNEW.js → chunk-ASTXFBCH.js} +2 -2
  17. package/browser/{chunk-J4GCFDIV.js → chunk-ATPD7KTM.js} +1 -1
  18. package/browser/{chunk-IPTLWEIL.js → chunk-B3SK6KY7.js} +1 -1
  19. package/browser/{chunk-ZSUZVVVK.js → chunk-BJ7PWFZL.js} +1 -1
  20. package/browser/{chunk-356IV4ZE.js → chunk-BK5ZN3WX.js} +1 -1
  21. package/browser/{chunk-VIYE2OFI.js → chunk-BKVMGGS5.js} +1 -1
  22. package/browser/{chunk-UD4WWZOI.js → chunk-CDA6RYZQ.js} +1 -1
  23. package/browser/{chunk-AHKKBRLR.js → chunk-CMJ47WH5.js} +1 -1
  24. package/browser/{chunk-Y5HNNIJE.js → chunk-CN4GZXKR.js} +1 -1
  25. package/browser/{chunk-4F5WEZVF.js → chunk-CW5S3DQO.js} +1 -1
  26. package/browser/{chunk-HR5WLTC4.js → chunk-D3M4Y45V.js} +1 -1
  27. package/browser/{chunk-DMSBV63C.js → chunk-DAVZ5ZHF.js} +1 -1
  28. package/browser/{chunk-PXKTG2K3.js → chunk-EPD7WB57.js} +1 -1
  29. package/browser/{chunk-6BSPRF7M.js → chunk-GFZOMKOU.js} +1 -1
  30. package/browser/{chunk-2BIGSZO5.js → chunk-GIUQ2MII.js} +1 -1
  31. package/browser/{chunk-S2MC4OUN.js → chunk-GWKGRN77.js} +1 -1
  32. package/browser/{chunk-B7DKFLLG.js → chunk-K7YL5PGK.js} +1 -1
  33. package/browser/{chunk-MGZYE4DB.js → chunk-K7ZF26GE.js} +1 -1
  34. package/browser/{chunk-LOHRG6CW.js → chunk-KAFG3VKC.js} +1 -1
  35. package/browser/{chunk-RVEF5C4M.js → chunk-KMN3C6MP.js} +1 -1
  36. package/browser/{chunk-4PC6PQ7Q.js → chunk-KWFATZFJ.js} +1 -1
  37. package/browser/{chunk-K4YULPNU.js → chunk-L2CVC562.js} +2 -2
  38. package/browser/{chunk-AWUM3KMS.js → chunk-LIPAZGM2.js} +1 -1
  39. package/browser/{chunk-4TP7S3U3.js → chunk-LV35QVNA.js} +1 -1
  40. package/browser/{chunk-CY4FO26Z.js → chunk-MGZTCXBX.js} +1 -1
  41. package/browser/{chunk-6HUVTRYH.js → chunk-NIZ2TPWB.js} +1 -1
  42. package/browser/{chunk-XETIOXLN.js → chunk-NXTRSCQX.js} +1 -1
  43. package/browser/{chunk-4GNV76N3.js → chunk-NZ7ZSG7T.js} +1 -1
  44. package/browser/{chunk-6IFNMT72.js → chunk-OKIY24GE.js} +1 -1
  45. package/browser/{chunk-DX2NQ3TK.js → chunk-OMIMFRRI.js} +1 -1
  46. package/browser/{chunk-N27F227W.js → chunk-OTNH2BIJ.js} +1 -1
  47. package/browser/{chunk-NARPOKGG.js → chunk-P6VK2PBY.js} +1 -1
  48. package/browser/{chunk-6K77FOTH.js → chunk-PCE2GBLC.js} +1 -1
  49. package/browser/{chunk-LWQAPXWM.js → chunk-PDZHVC4S.js} +1 -1
  50. package/browser/{chunk-4KJRE3GP.js → chunk-PIJ2427T.js} +1 -1
  51. package/browser/{chunk-SDGA5WRP.js → chunk-PQEPUK2L.js} +1 -1
  52. package/browser/{chunk-5WBNHRSF.js → chunk-PQMUNABI.js} +1 -1
  53. package/browser/{chunk-YUROCGY4.js → chunk-QVGY4BMQ.js} +1 -1
  54. package/browser/{chunk-EWLYV6PD.js → chunk-RVIZKQK2.js} +2 -2
  55. package/browser/{chunk-Q2ITLIW2.js → chunk-TBK74DIQ.js} +1 -1
  56. package/browser/{chunk-OPOZFMCV.js → chunk-TMIMCOHS.js} +1 -1
  57. package/browser/{chunk-A2QB6KDW.js → chunk-TW4WEQON.js} +2 -2
  58. package/browser/{chunk-SMHJ3JIG.js → chunk-TZWHX2KG.js} +2 -2
  59. package/browser/{chunk-2VRY7O77.js → chunk-UIHT537E.js} +1 -1
  60. package/browser/{chunk-JALOTTYL.js → chunk-URR2AQGO.js} +1 -1
  61. package/browser/{chunk-SGTPMFH6.js → chunk-VI33QAIU.js} +1 -1
  62. package/browser/{chunk-MAFIFJSJ.js → chunk-VYR4I7QG.js} +1 -1
  63. package/browser/{chunk-NRY2MTXW.js → chunk-W2TWTKY6.js} +1 -1
  64. package/browser/{chunk-JK75ENMS.js → chunk-WYL36OXL.js} +1 -1
  65. package/browser/{chunk-NCR5B5Y4.js → chunk-XESOCXQ6.js} +2 -2
  66. package/browser/{chunk-ZAJCD6I2.js → chunk-XOQX24GP.js} +1 -1
  67. package/browser/{chunk-7MB4HURG.js → chunk-YANTEHGF.js} +1 -1
  68. package/browser/{chunk-5233FXFY.js → chunk-YBMMLF6J.js} +1 -1
  69. package/browser/index.html +2 -2
  70. package/browser/{main-2NK4AXEX.js → main-UTJ7MSD7.js} +2 -2
  71. package/package.json +1 -1
  72. package/browser/chunk-ZOSMCW2A.js +0 -1
@@ -1 +1 @@
1
- import{a as de}from"./chunk-HR5WLTC4.js";import{h as me,i as se}from"./chunk-6IFNMT72.js";import"./chunk-4KJRE3GP.js";import{b as le}from"./chunk-5233FXFY.js";import"./chunk-YQGBGJ5U.js";import"./chunk-XUP2FY5D.js";import{C as ae,D as ne,E as re,u as te,v as ie,w as oe}from"./chunk-5UTBAGIS.js";import"./chunk-JLOQTYOI.js";import"./chunk-YJVLRBSS.js";import"./chunk-B4243VJD.js";import"./chunk-7COMDF6M.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-NEEN2JO2.js";import{C as X,D as Z,c as G,h as z,o as J,y as Q}from"./chunk-LNLGRZBB.js";import"./chunk-DMSBV63C.js";import"./chunk-MAFIFJSJ.js";import{a as W}from"./chunk-MP62IGYR.js";import"./chunk-J6RZLLDH.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-EDB2BAIG.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-D3M4Y45V.js";import{h as me,i as se}from"./chunk-OKIY24GE.js";import"./chunk-PIJ2427T.js";import{b as le}from"./chunk-YBMMLF6J.js";import"./chunk-YQGBGJ5U.js";import"./chunk-XUP2FY5D.js";import{C as ae,D as ne,E as re,u as te,v as ie,w as oe}from"./chunk-5UTBAGIS.js";import"./chunk-JLOQTYOI.js";import"./chunk-YJVLRBSS.js";import"./chunk-B4243VJD.js";import"./chunk-7COMDF6M.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-NEEN2JO2.js";import{C as X,D as Z,c as G,h as z,o as J,y as Q}from"./chunk-LNLGRZBB.js";import"./chunk-DAVZ5ZHF.js";import"./chunk-VYR4I7QG.js";import{a as W}from"./chunk-MP62IGYR.js";import"./chunk-A2WJJXY7.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-EDB2BAIG.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};