dealpos 25.36.2 → 25.36.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-UBFPWZKK.js → chunk-2BJ64H7R.js} +1 -1
  2. package/browser/{chunk-MIUDUL5O.js → chunk-2LKOMKF7.js} +1 -1
  3. package/browser/{chunk-6WVUJYF7.js → chunk-2P7A5QSW.js} +1 -1
  4. package/browser/{chunk-WN5WLSWK.js → chunk-2WELHORE.js} +12 -12
  5. package/browser/{chunk-HTXNZ5OH.js → chunk-36TT3WJZ.js} +2 -2
  6. package/browser/{chunk-RTD4PUTS.js → chunk-3AEZZSNR.js} +1 -1
  7. package/browser/{chunk-VCINTCFP.js → chunk-3K4NHIJV.js} +1 -1
  8. package/browser/{chunk-NFTUD5LZ.js → chunk-4KJQEYIR.js} +1 -1
  9. package/browser/{chunk-3BWRE4P6.js → chunk-4OMZQ5HK.js} +1 -1
  10. package/browser/{chunk-4WIPVW4V.js → chunk-64PRCTR2.js} +1 -1
  11. package/browser/{chunk-446SIVDN.js → chunk-6Z7ZGTB4.js} +1 -1
  12. package/browser/{chunk-SEJO3YK3.js → chunk-7F6H3VFX.js} +1 -1
  13. package/browser/{chunk-55VMNRO2.js → chunk-7FRXJGU7.js} +1 -1
  14. package/browser/{chunk-FTG6OSPJ.js → chunk-7HX2ZEHC.js} +1 -1
  15. package/browser/{chunk-WYTXXYFH.js → chunk-A3OULNF5.js} +1 -1
  16. package/browser/{chunk-KKQ3PBCF.js → chunk-A4K4RDXW.js} +1 -1
  17. package/browser/{chunk-FWSWIKNJ.js → chunk-AOAAVKWR.js} +1 -1
  18. package/browser/{chunk-7DIY4CBI.js → chunk-C7EZEQZQ.js} +1 -1
  19. package/browser/{chunk-NQEHGV4G.js → chunk-CURXE4WR.js} +1 -1
  20. package/browser/{chunk-JHNH2AF7.js → chunk-DJHIHS3W.js} +1 -1
  21. package/browser/{chunk-M5255JXQ.js → chunk-DQXE767S.js} +1 -1
  22. package/browser/{chunk-ZDEUKETL.js → chunk-EIHAMJHD.js} +1 -1
  23. package/browser/{chunk-KI3VDGWO.js → chunk-GHYJCSNA.js} +1 -1
  24. package/browser/{chunk-72CYGG3F.js → chunk-GM7AHKLZ.js} +1 -1
  25. package/browser/{chunk-RPHXTGV4.js → chunk-HID7MO2S.js} +1 -1
  26. package/browser/{chunk-445MKY7P.js → chunk-I3JXGYPZ.js} +1 -1
  27. package/browser/{chunk-236T5WSU.js → chunk-IB3KMJOZ.js} +1 -1
  28. package/browser/{chunk-K3CBCNVT.js → chunk-IBTIOJOZ.js} +1 -1
  29. package/browser/{chunk-LEGX56U6.js → chunk-IPI25TWA.js} +1 -1
  30. package/browser/{chunk-5YNQL2WY.js → chunk-ITSEL53X.js} +1 -1
  31. package/browser/{chunk-JST7PLQM.js → chunk-JM6WDW37.js} +1 -1
  32. package/browser/{chunk-NKWIQ32C.js → chunk-JYTOIAQL.js} +1 -1
  33. package/browser/{chunk-STXBDXCJ.js → chunk-KRC5LE5H.js} +1 -1
  34. package/browser/{chunk-P6XHDVFD.js → chunk-L2GLJO5X.js} +1 -1
  35. package/browser/{chunk-LET3RO6U.js → chunk-LP2Z5VKX.js} +2 -2
  36. package/browser/{chunk-HNUM6CZZ.js → chunk-LQTBKFXH.js} +1 -1
  37. package/browser/{chunk-24BK4GZ2.js → chunk-LRSTQA5B.js} +1 -1
  38. package/browser/{chunk-UGTEWCC7.js → chunk-LVK7ESIU.js} +2 -2
  39. package/browser/{chunk-TMQHZ27I.js → chunk-M5PTO2R2.js} +1 -1
  40. package/browser/{chunk-75OXW5FF.js → chunk-N4OAT3FW.js} +1 -1
  41. package/browser/{chunk-5XPT5NMN.js → chunk-N7T6HUYA.js} +1 -1
  42. package/browser/{chunk-GPNQBF7Z.js → chunk-NFBE3ZMT.js} +1 -1
  43. package/browser/{chunk-CAHMIN3M.js → chunk-NH3OND33.js} +1 -1
  44. package/browser/{chunk-YCDAVU5S.js → chunk-NQ25BYIN.js} +1 -1
  45. package/browser/{chunk-XH75PP4O.js → chunk-NR54XPL4.js} +1 -1
  46. package/browser/{chunk-GWRTBYUS.js → chunk-NRWF3XBS.js} +1 -1
  47. package/browser/chunk-OG4QEJCU.js +1 -0
  48. package/browser/{chunk-RU6ZFZ7D.js → chunk-OLSVR34W.js} +1 -1
  49. package/browser/{chunk-AQUIB7DB.js → chunk-PTXDA5BK.js} +1 -1
  50. package/browser/{chunk-VWY6NDHT.js → chunk-PY6BNBHP.js} +1 -1
  51. package/browser/{chunk-OZAJEAR6.js → chunk-Q23EKNIO.js} +1 -1
  52. package/browser/{chunk-ADO2SKYQ.js → chunk-Q7GVJZBF.js} +1 -1
  53. package/browser/{chunk-GOS6KCY4.js → chunk-QYXTSGSR.js} +1 -1
  54. package/browser/{chunk-X33IUA3S.js → chunk-R3JXU6L4.js} +1 -1
  55. package/browser/{chunk-WWHY6YW5.js → chunk-RKIIOMW3.js} +1 -1
  56. package/browser/{chunk-XLVCNQHR.js → chunk-RQLTUOIG.js} +1 -1
  57. package/browser/{chunk-ZWSIMORT.js → chunk-RWHRX53O.js} +1 -1
  58. package/browser/{chunk-RDKRZMFS.js → chunk-TFRMAVDX.js} +1 -1
  59. package/browser/{chunk-JUFO6GHQ.js → chunk-UG37H4GU.js} +1 -1
  60. package/browser/{chunk-ND4SQ7JK.js → chunk-UJUI5ETY.js} +1 -1
  61. package/browser/{chunk-IRINITYM.js → chunk-UV6PSJXI.js} +1 -1
  62. package/browser/{chunk-OONLQN47.js → chunk-VP36G4HT.js} +1 -1
  63. package/browser/{chunk-K2ZWKEBA.js → chunk-WD3MA4MA.js} +1 -1
  64. package/browser/{chunk-AZU6HW5D.js → chunk-WSJHXTI4.js} +1 -1
  65. package/browser/{chunk-4E2SGUYD.js → chunk-WW5AU5JJ.js} +1 -1
  66. package/browser/{chunk-5DXZCDDX.js → chunk-X6IMSSTG.js} +2 -2
  67. package/browser/{chunk-GX4LLL35.js → chunk-XGHFDJFY.js} +1 -1
  68. package/browser/{chunk-EDH67DEI.js → chunk-XSZLLHRW.js} +1 -1
  69. package/browser/{chunk-4NZA4IG2.js → chunk-Y545FJCR.js} +1 -1
  70. package/browser/{chunk-5PMSCBJJ.js → chunk-YJSNPROE.js} +1 -1
  71. package/browser/{chunk-GWPSMBLW.js → chunk-YKXNLBIB.js} +2 -2
  72. package/browser/{chunk-MW7RJQ7L.js → chunk-YPF7BMPI.js} +1 -1
  73. package/browser/{chunk-ATIZNVIC.js → chunk-YUGYXJ5G.js} +1 -1
  74. package/browser/{chunk-AC66NWU7.js → chunk-YVBFA7MT.js} +1 -1
  75. package/browser/{chunk-INVGSUVG.js → chunk-ZY2QH5WA.js} +1 -1
  76. package/browser/{chunk-QWHALQ42.js → chunk-ZYVROOL4.js} +1 -1
  77. package/browser/index.html +2 -2
  78. package/browser/{main-SYCMIOD6.js → main-LFZKZ6WQ.js} +2 -2
  79. package/package.json +1 -1
  80. package/browser/chunk-A7VZLQPZ.js +0 -1
@@ -1 +1 @@
1
- import{a as de}from"./chunk-MW7RJQ7L.js";import{h as me,i as se}from"./chunk-AZU6HW5D.js";import"./chunk-RU6ZFZ7D.js";import{b as le}from"./chunk-ATIZNVIC.js";import"./chunk-52EOLV7I.js";import"./chunk-5UL73W4S.js";import{u as ae,v as ne,w as re}from"./chunk-X6LIVARI.js";import"./chunk-CIBQBSM6.js";import"./chunk-5UCQBOD6.js";import{e as te,f as ie,g as oe}from"./chunk-D35OBUDE.js";import"./chunk-567HXZXC.js";import"./chunk-CGESXTHC.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-TLOTIYIE.js";import{C as X,D as Z,c as G,h as z,o as J,y as Q}from"./chunk-P7HKWFZT.js";import"./chunk-75OXW5FF.js";import"./chunk-K3CBCNVT.js";import{a as W}from"./chunk-AHCRE4GP.js";import"./chunk-STXBDXCJ.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-DZT5XHBQ.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-YPF7BMPI.js";import{h as me,i as se}from"./chunk-WSJHXTI4.js";import"./chunk-OLSVR34W.js";import{b as le}from"./chunk-YUGYXJ5G.js";import"./chunk-52EOLV7I.js";import"./chunk-5UL73W4S.js";import{u as ae,v as ne,w as re}from"./chunk-X6LIVARI.js";import"./chunk-CIBQBSM6.js";import"./chunk-5UCQBOD6.js";import{e as te,f as ie,g as oe}from"./chunk-D35OBUDE.js";import"./chunk-567HXZXC.js";import"./chunk-CGESXTHC.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-TLOTIYIE.js";import{C as X,D as Z,c as G,h as z,o as J,y as Q}from"./chunk-P7HKWFZT.js";import"./chunk-N4OAT3FW.js";import"./chunk-IBTIOJOZ.js";import{a as W}from"./chunk-AHCRE4GP.js";import"./chunk-KRC5LE5H.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-DZT5XHBQ.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 r}from"./chunk-ADO2SKYQ.js";var h=class extends r{constructor(t,i,a,e,n,s,o){super(t,i,a,e,n,s,o);this.httpService=i}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal;infiniteList;originalData;StoreRowsCountAPIResult(t,i=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(a=>{this.listTotal=a.Count,this.pageData.HideStoreApiCount=!0,i&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData())})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let i=Array.isArray(t.Data?.hits),a=Array.isArray(t.Data?.[0]?.Variants);if(this.extendData){let e=this.infiniteList?.length?this.infiniteList[this.infiniteList.length-1]:null,n=t.Data.find(s=>s.ID===e?.ID);if(a&&e)if(e.ID===n?.ID){let s=t.Data.filter(o=>o.ID!=e?.ID);this.infiniteList[this.infiniteList.length-1].Variants=this.infiniteList[this.infiniteList.length-1].Variants.concat(n.Variants),this.infiniteList=this.infiniteList.concat(s)}else this.infiniteList=this.infiniteList.concat(t.Data);else this.infiniteList=this.infiniteList.concat(i?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else this.infiniteList=i?t.Data.hits:t.Data,this.assignAggregate(t);this.nextPageDisabled=!((i?t.Data.hits.length:t.Data.length)<this.pageData.Filter.RowCount),this.originalData=[...this.infiniteList],this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t)}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{h as a};
1
+ import{a as r}from"./chunk-Q7GVJZBF.js";var h=class extends r{constructor(t,i,a,e,n,s,o){super(t,i,a,e,n,s,o);this.httpService=i}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal;infiniteList;originalData;StoreRowsCountAPIResult(t,i=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(a=>{this.listTotal=a.Count,this.pageData.HideStoreApiCount=!0,i&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData())})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let i=Array.isArray(t.Data?.hits),a=Array.isArray(t.Data?.[0]?.Variants);if(this.extendData){let e=this.infiniteList?.length?this.infiniteList[this.infiniteList.length-1]:null,n=t.Data.find(s=>s.ID===e?.ID);if(a&&e)if(e.ID===n?.ID){let s=t.Data.filter(o=>o.ID!=e?.ID);this.infiniteList[this.infiniteList.length-1].Variants=this.infiniteList[this.infiniteList.length-1].Variants.concat(n.Variants),this.infiniteList=this.infiniteList.concat(s)}else this.infiniteList=this.infiniteList.concat(t.Data);else this.infiniteList=this.infiniteList.concat(i?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else this.infiniteList=i?t.Data.hits:t.Data,this.assignAggregate(t);this.nextPageDisabled=!((i?t.Data.hits.length:t.Data.length)<this.pageData.Filter.RowCount),this.originalData=[...this.infiniteList],this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t)}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{h as a};