dealpos 25.49.4 → 25.49.5

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 (88) hide show
  1. package/browser/{chunk-WZWXE6GT.js → chunk-234VD4PN.js} +1 -1
  2. package/browser/{chunk-CLO7U3RB.js → chunk-2M6MJMM7.js} +1 -1
  3. package/browser/{chunk-UJ63ZNAO.js → chunk-3SIDOYEU.js} +1 -1
  4. package/browser/{chunk-XTU3LHA6.js → chunk-3ZZJHIUG.js} +1 -1
  5. package/browser/{chunk-KWFL5YOV.js → chunk-55DB5BOP.js} +1 -1
  6. package/browser/{chunk-7V2CY4DW.js → chunk-5QMBTXFS.js} +1 -1
  7. package/browser/{chunk-LX26RD3F.js → chunk-5YHDDJI4.js} +1 -1
  8. package/browser/{chunk-ASHEF37H.js → chunk-63B7VXCP.js} +1 -1
  9. package/browser/{chunk-IFKUMLMD.js → chunk-6ESMI6WH.js} +1 -1
  10. package/browser/{chunk-WP2FVSCM.js → chunk-6G74X2UP.js} +1 -1
  11. package/browser/chunk-6UC76HYF.js +4 -0
  12. package/browser/{chunk-34X4ZZD5.js → chunk-72YVHXTD.js} +1 -1
  13. package/browser/{chunk-TLLI6Z5X.js → chunk-7MMDSCS7.js} +1 -1
  14. package/browser/{chunk-5DNDULL7.js → chunk-7PVAZYM4.js} +1 -1
  15. package/browser/{chunk-GNIF2YD2.js → chunk-7SAEXKAX.js} +1 -1
  16. package/browser/{chunk-3RQ35Y7Q.js → chunk-A4Y2ZLGW.js} +1 -1
  17. package/browser/{chunk-RULBTV6L.js → chunk-AGJ3GOR7.js} +1 -1
  18. package/browser/{chunk-3Y2TKGP4.js → chunk-BCGIIVLI.js} +1 -1
  19. package/browser/{chunk-C777CYT4.js → chunk-BEIHC6NO.js} +1 -1
  20. package/browser/{chunk-52ONOTHS.js → chunk-BGT22RIZ.js} +1 -1
  21. package/browser/{chunk-FQVYXDHS.js → chunk-CEVAKZDN.js} +2 -2
  22. package/browser/{chunk-IQ5KAZ7I.js → chunk-CIJROL7R.js} +1 -1
  23. package/browser/{chunk-3PJCCDIY.js → chunk-CLWGVNBY.js} +2 -2
  24. package/browser/{chunk-3YFVIHNY.js → chunk-CNHLZU3Z.js} +2 -2
  25. package/browser/chunk-D3KDSFJU.js +1 -0
  26. package/browser/{chunk-WYRHUSXS.js → chunk-D3QY3EBZ.js} +1 -1
  27. package/browser/{chunk-ZEI66KM2.js → chunk-DG6Y623Z.js} +1 -1
  28. package/browser/{chunk-6LSNTX2C.js → chunk-DHKZDGY6.js} +1 -1
  29. package/browser/{chunk-TBBZ7RAN.js → chunk-DYI547BZ.js} +1 -1
  30. package/browser/{chunk-RGO36X34.js → chunk-EV422BEJ.js} +1 -1
  31. package/browser/{chunk-APHRANVH.js → chunk-FBHH3WPM.js} +1 -1
  32. package/browser/{chunk-YTXYAEFO.js → chunk-FBN34CVL.js} +1 -1
  33. package/browser/{chunk-FTZZHFXM.js → chunk-FHL5KFJX.js} +1 -1
  34. package/browser/{chunk-INWLOCX3.js → chunk-FQNL3TLZ.js} +1 -1
  35. package/browser/{chunk-JZFX4FNK.js → chunk-FXPNLU4X.js} +1 -1
  36. package/browser/{chunk-Y4XWHUVX.js → chunk-G5NXVDID.js} +1 -1
  37. package/browser/{chunk-XBRNDXDZ.js → chunk-G6PEAZWA.js} +1 -1
  38. package/browser/{chunk-QOCGWG6L.js → chunk-GIPUEMTC.js} +1 -1
  39. package/browser/{chunk-OWK34F6X.js → chunk-GLOUVXOJ.js} +1 -1
  40. package/browser/{chunk-NTCQH6TH.js → chunk-H6UWRJHQ.js} +1 -1
  41. package/browser/{chunk-WFSJDUCV.js → chunk-IDZHSRCH.js} +2 -2
  42. package/browser/{chunk-D2OMTDKS.js → chunk-IK4DEQSO.js} +1 -1
  43. package/browser/{chunk-H4U5GDQZ.js → chunk-IRQYLVRP.js} +1 -1
  44. package/browser/{chunk-V3KYBOFM.js → chunk-LC7GFFEX.js} +1 -1
  45. package/browser/{chunk-XFJYJSZU.js → chunk-LJJMNCST.js} +1 -1
  46. package/browser/{chunk-GT5IX3D6.js → chunk-LSC2CYCL.js} +1 -1
  47. package/browser/{chunk-P2R2O6GD.js → chunk-MFNPIWGR.js} +2 -2
  48. package/browser/{chunk-BSV3Y4MG.js → chunk-MOXEW4DH.js} +1 -1
  49. package/browser/{chunk-KJ5BS7KR.js → chunk-MVJSAD2O.js} +1 -1
  50. package/browser/{chunk-HCMW3RC5.js → chunk-N5IOOG55.js} +1 -1
  51. package/browser/{chunk-TAVEJBKL.js → chunk-NENPGICH.js} +1 -1
  52. package/browser/{chunk-FD7ICK7T.js → chunk-NKQHQCUV.js} +1 -1
  53. package/browser/{chunk-SY463GX6.js → chunk-NPQFE4EO.js} +1 -1
  54. package/browser/{chunk-R2Y4JAXW.js → chunk-OOKDKXRB.js} +1 -1
  55. package/browser/{chunk-N7M4OSQZ.js → chunk-OUOI5WK2.js} +1 -1
  56. package/browser/{chunk-OYEU5L3I.js → chunk-OZLXHOG4.js} +1 -1
  57. package/browser/{chunk-46D5QBZT.js → chunk-P6DRDJVZ.js} +1 -1
  58. package/browser/{chunk-OETRAGYY.js → chunk-P75DFAMB.js} +1 -1
  59. package/browser/{chunk-QE5OFO56.js → chunk-PFF34SZG.js} +1 -1
  60. package/browser/{chunk-F3YWM4BJ.js → chunk-PXFCSUBN.js} +1 -1
  61. package/browser/{chunk-BVMFVFGN.js → chunk-Q3FMCFAP.js} +1 -1
  62. package/browser/{chunk-V45WTUQ2.js → chunk-QHP7VC2R.js} +1 -1
  63. package/browser/{chunk-K3V25WUQ.js → chunk-QLMHWHUW.js} +1 -1
  64. package/browser/{chunk-ROVDZJVT.js → chunk-R546P6WC.js} +1 -1
  65. package/browser/{chunk-QVI22QDX.js → chunk-RJNG3PZF.js} +1 -1
  66. package/browser/{chunk-N6JQHXKN.js → chunk-RXPEUS2G.js} +1 -1
  67. package/browser/{chunk-QS32TZGB.js → chunk-SMDHPNT7.js} +1 -1
  68. package/browser/{chunk-SFXDXOSB.js → chunk-SRAJGU6Y.js} +1 -1
  69. package/browser/{chunk-LI6G74I7.js → chunk-T6SZ4L7O.js} +1 -1
  70. package/browser/{chunk-7V6NCJRQ.js → chunk-TXPKRCHR.js} +1 -1
  71. package/browser/{chunk-YZY45SFB.js → chunk-U57PBUPN.js} +1 -1
  72. package/browser/{chunk-HOZ6XJ4Z.js → chunk-UNZLSKV5.js} +1 -1
  73. package/browser/{chunk-KJF3M7DY.js → chunk-V3FPQMVB.js} +1 -1
  74. package/browser/{chunk-6H5XBM35.js → chunk-VFQES62Q.js} +1 -1
  75. package/browser/{chunk-ADQOH7YA.js → chunk-WVMPGK5K.js} +1 -1
  76. package/browser/{chunk-XOQUXJ6S.js → chunk-WW4UBOYF.js} +1 -1
  77. package/browser/{chunk-NZBKYR7R.js → chunk-WXEEGAH5.js} +1 -1
  78. package/browser/{chunk-NFODKKJI.js → chunk-Y67EVUWI.js} +2 -2
  79. package/browser/{chunk-743523SK.js → chunk-Y7D34HYN.js} +1 -1
  80. package/browser/{chunk-XWXXETJY.js → chunk-Y7KMZ7BT.js} +1 -1
  81. package/browser/{chunk-LNZY3GKF.js → chunk-YVO66RJF.js} +1 -1
  82. package/browser/{chunk-T4E5A3KH.js → chunk-YZCJFJZL.js} +2 -2
  83. package/browser/{chunk-OXMLRZZ4.js → chunk-Z3UTJURO.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-DAVMX2B6.js → main-FS6A5G45.js} +2 -2
  86. package/package.json +1 -1
  87. package/browser/chunk-CD6ZWSFG.js +0 -1
  88. package/browser/chunk-SO3RL6QR.js +0 -4
@@ -1,2 +1,2 @@
1
- import{O as b}from"./chunk-TEGIL5RZ.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-SO3RL6QR.js";import{p as d,s as h}from"./chunk-LGOSIAUC.js";import{la as n,pa as c}from"./chunk-IEVGW2RT.js";import{k as l}from"./chunk-SNAKHGZS.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
1
+ import{O as b}from"./chunk-TEGIL5RZ.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-6UC76HYF.js";import{p as d,s as h}from"./chunk-LGOSIAUC.js";import{la as n,pa as c}from"./chunk-IEVGW2RT.js";import{k as l}from"./chunk-SNAKHGZS.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
2
2
  `,"WhatsApp not installed")},2e3)}copyToClipboard(t){return new Promise((o,r)=>this.copyToClipBoard.copy(t).then(()=>{this.toastr.info("Message copied to clipboard. If WhatsApp doesn't show the message, please paste it manually.","Receipt Ready",{timeOut:8e3}),o("Copied to clipboard")}).catch(e=>{console.log(e),this.toastr.warning("Could not copy message to clipboard","Clipboard Error",{timeOut:8e3}),r(e)}))}sendReceiptToWhatsapp(t,o,r,e){return l(this,null,function*(){try{let i=this.createWhatsappReceipt(o,r,e);try{yield this.copyToClipboard(i)}finally{this.redirectToWhatsapp(t,i)}}catch(i){console.warn(i),this.toastr.error("Failed to send receipt")}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac})};export{y as a};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-363IDTE3.js";import{d as $,e as tt}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as k,b as G,c as A}from"./chunk-AQW4VS3Y.js";import{a as ot,b as nt}from"./chunk-4W3WYXI2.js";import{f as et}from"./chunk-BVMFVFGN.js";import{c as it}from"./chunk-SFXDXOSB.js";import{b as Q}from"./chunk-VXPORXGI.js";import{a as q}from"./chunk-R2Y4JAXW.js";import"./chunk-NTCQH6TH.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as Y,f as Z}from"./chunk-LNZY3GKF.js";import"./chunk-7V2CY4DW.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-QE5OFO56.js";import{b as K}from"./chunk-KJF3M7DY.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{N as X,g as U}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as J}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as W,h as B,o as R}from"./chunk-DWZ5JTI2.js";import"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import{b as H}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{s as j}from"./chunk-LGOSIAUC.js";import{Ab as h,Bb as O,Db as T,Eb as V,Fb as s,Fc as y,Gb as i,Gc as L,Hb as o,Hc as F,Ib as v,Lc as N,Pb as _,Sb as S,Ub as m,Xa as p,eb as u,hc as l,ib as b,ic as w,jc as P,mb as I,mc as C,nc as x,ob as M,oc as f,ta as c,ua as d,yb as D}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function rt(r,g){if(r&1){let t=_();i(0,"button",5),S("click",function(){c(t);let e=m();return d(e.openExportModal())}),v(1,"i",6),l(2," Export "),o()}}function lt(r,g){if(r&1){let t=_();i(0,"h6"),l(1,"Outlet"),o(),i(2,"outlet-selector",7),f("ngModelChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Outlet,e)||(a.pageData.Filter.Outlet=e),d(e)}),o(),i(3,"h6"),l(4,"Category"),o(),i(5,"POS-product-category-select",8),f("selectedCategoryIDChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Category,e)||(a.pageData.Filter.Category=e),d(e)}),o(),i(6,"h6"),l(7,"Discontinued"),o(),i(8,"radio-options",9),f("modelChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Discontinued,e)||(a.pageData.Filter.Discontinued=e),d(e)}),o()}if(r&2){let t=m();p(2),s("accessType",2),C("ngModel",t.pageData.Filter.Outlet),p(3),C("selectedCategoryID",t.pageData.Filter.Category),s("showClear",!0),p(3),s("options",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.Discontinued),C("model",t.pageData.Filter.Discontinued)}}function pt(r,g){if(r&1&&(i(0,"tr")(1,"td"),l(2),o(),i(3,"td"),l(4),o(),i(5,"td",19),l(6),y(7,"quantityFraction"),o()()),r&2){let t=g.$implicit;p(2),w(t.EntityName),p(2),w(t.Name),p(2),P(" ",L(7,3,t.Inventory)," ")}}function mt(r,g){if(r&1){let t=_();i(0,"div",4)(1,"div",10)(2,"table",11),S("matSortChange",function(e){c(t);let a=m();return d(a.onSortData(e))}),i(3,"thead",12)(4,"tr",13)(5,"th",14),l(6,"Outlet"),o(),i(7,"th",15),l(8,"Storage Location"),o(),i(9,"th",16),l(10," On Hand "),o()()(),i(11,"tbody"),T(12,pt,8,5,"tr",null,O),o(),i(14,"tfoot")(15,"tr",17),v(16,"td",18),i(17,"td",18),l(18,"Total :"),o(),i(19,"td",19),l(20),y(21,"sum"),y(22,"quantityFraction"),o()()()(),i(23,"POS-complex-pagination",20),S("jumpToPage",function(){c(t);let e=m();return d(e.getListData())})("previousPage",function(){c(t);let e=m();return d(e.getListData())})("nextPage",function(){c(t);let e=m();return d(e.getListData())}),o()()()}if(r&2){let t=m();p(12),V(t.data.Data),p(8),P(" ",L(22,6,F(21,3,t.data.Data,"Inventory"))," "),p(3),s("total",t.data.Data==null?null:t.data.Data.length)("pageData",t.pageData)}}var at=class r extends q{constructor(t,n,e,a){super(t,n,"Inventory/GetProductStorageLocation","InventoryLoader/InventoryReport");this.httpService=n;this.dialog=e;this.roleService=a}datasource;postInit(t){this.datasource=JSON.parse(JSON.stringify(t.Data))}openExportModal(){this.dialog.open(Q,{data:{title:"Storage Location",exportTypes:[{ID:"Inventory/GetProductStorageLocation",Value:"Default",FileName:"Storage Location"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountProductStorageLocation",pagination:!0}})}onSortData(t){let n=this.data.Data?.slice();if(!t.active||t.direction===""){this.data.Data=this.datasource;return}let e=t.direction==="asc";this.data.Data=n.sort((a,E)=>this.compare(a[t.active],E[t.active],e))}static \u0275fac=function(n){return new(n||r)(u(K),u(j),u(J),u(H))};static \u0275cmp=b({type:r,selectors:[["app-storage-location"]],features:[I],decls:9,vars:5,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"d-flex"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["placeholder","Choose an outlet","appendTo","body",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","Discontinued",3,"modelChange","options","model"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","EntityName",2,"width","450px"],["mat-sort-header","Brand"],["mat-sort-header","Inventory","arrowPosition","before",1,"text-end",2,"padding-right","100px","width","190px"],[1,"table-footer","fw-bold"],[1,"empty-column"],[1,"text-end",2,"padding-right","100px"],["api","inventory/GetCountProductStorageLocation",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(n,e){if(n&1){let a=_();i(0,"mainpanel-cmp",1),S("onSubmit",function(){return c(a),d(e.searchFromPageOne())}),i(1,"actions")(2,"div",2),D(3,rt,3,0,"button",3),o()(),i(4,"filters"),M(5,lt,9,6,"ng-template",null,0,N),o(),i(7,"content"),D(8,mt,24,8,"div",4),o()()}n&2&&(s("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),p(3),h(e.roleService.global.Export?3:-1),p(5),h(e.data?8:-1))},dependencies:[Z,Y,X,tt,$,et,it,W,B,R,nt,ot,A,k,G,z,U],encapsulation:2})};export{at as StorageLocationComponent};
1
+ import{a as z}from"./chunk-363IDTE3.js";import{d as $,e as tt}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as k,b as G,c as A}from"./chunk-AQW4VS3Y.js";import{a as ot,b as nt}from"./chunk-4W3WYXI2.js";import{f as et}from"./chunk-Q3FMCFAP.js";import{c as it}from"./chunk-SRAJGU6Y.js";import{b as Q}from"./chunk-VXPORXGI.js";import{a as q}from"./chunk-OOKDKXRB.js";import"./chunk-H6UWRJHQ.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as Y,f as Z}from"./chunk-YVO66RJF.js";import"./chunk-5QMBTXFS.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-PFF34SZG.js";import{b as K}from"./chunk-V3FPQMVB.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{N as X,g as U}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as J}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as W,h as B,o as R}from"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import{b as H}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{s as j}from"./chunk-LGOSIAUC.js";import{Ab as h,Bb as O,Db as T,Eb as V,Fb as s,Fc as y,Gb as i,Gc as L,Hb as o,Hc as F,Ib as v,Lc as N,Pb as _,Sb as S,Ub as m,Xa as p,eb as u,hc as l,ib as b,ic as w,jc as P,mb as I,mc as C,nc as x,ob as M,oc as f,ta as c,ua as d,yb as D}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function rt(r,g){if(r&1){let t=_();i(0,"button",5),S("click",function(){c(t);let e=m();return d(e.openExportModal())}),v(1,"i",6),l(2," Export "),o()}}function lt(r,g){if(r&1){let t=_();i(0,"h6"),l(1,"Outlet"),o(),i(2,"outlet-selector",7),f("ngModelChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Outlet,e)||(a.pageData.Filter.Outlet=e),d(e)}),o(),i(3,"h6"),l(4,"Category"),o(),i(5,"POS-product-category-select",8),f("selectedCategoryIDChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Category,e)||(a.pageData.Filter.Category=e),d(e)}),o(),i(6,"h6"),l(7,"Discontinued"),o(),i(8,"radio-options",9),f("modelChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Discontinued,e)||(a.pageData.Filter.Discontinued=e),d(e)}),o()}if(r&2){let t=m();p(2),s("accessType",2),C("ngModel",t.pageData.Filter.Outlet),p(3),C("selectedCategoryID",t.pageData.Filter.Category),s("showClear",!0),p(3),s("options",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.Discontinued),C("model",t.pageData.Filter.Discontinued)}}function pt(r,g){if(r&1&&(i(0,"tr")(1,"td"),l(2),o(),i(3,"td"),l(4),o(),i(5,"td",19),l(6),y(7,"quantityFraction"),o()()),r&2){let t=g.$implicit;p(2),w(t.EntityName),p(2),w(t.Name),p(2),P(" ",L(7,3,t.Inventory)," ")}}function mt(r,g){if(r&1){let t=_();i(0,"div",4)(1,"div",10)(2,"table",11),S("matSortChange",function(e){c(t);let a=m();return d(a.onSortData(e))}),i(3,"thead",12)(4,"tr",13)(5,"th",14),l(6,"Outlet"),o(),i(7,"th",15),l(8,"Storage Location"),o(),i(9,"th",16),l(10," On Hand "),o()()(),i(11,"tbody"),T(12,pt,8,5,"tr",null,O),o(),i(14,"tfoot")(15,"tr",17),v(16,"td",18),i(17,"td",18),l(18,"Total :"),o(),i(19,"td",19),l(20),y(21,"sum"),y(22,"quantityFraction"),o()()()(),i(23,"POS-complex-pagination",20),S("jumpToPage",function(){c(t);let e=m();return d(e.getListData())})("previousPage",function(){c(t);let e=m();return d(e.getListData())})("nextPage",function(){c(t);let e=m();return d(e.getListData())}),o()()()}if(r&2){let t=m();p(12),V(t.data.Data),p(8),P(" ",L(22,6,F(21,3,t.data.Data,"Inventory"))," "),p(3),s("total",t.data.Data==null?null:t.data.Data.length)("pageData",t.pageData)}}var at=class r extends q{constructor(t,n,e,a){super(t,n,"Inventory/GetProductStorageLocation","InventoryLoader/InventoryReport");this.httpService=n;this.dialog=e;this.roleService=a}datasource;postInit(t){this.datasource=JSON.parse(JSON.stringify(t.Data))}openExportModal(){this.dialog.open(Q,{data:{title:"Storage Location",exportTypes:[{ID:"Inventory/GetProductStorageLocation",Value:"Default",FileName:"Storage Location"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountProductStorageLocation",pagination:!0}})}onSortData(t){let n=this.data.Data?.slice();if(!t.active||t.direction===""){this.data.Data=this.datasource;return}let e=t.direction==="asc";this.data.Data=n.sort((a,E)=>this.compare(a[t.active],E[t.active],e))}static \u0275fac=function(n){return new(n||r)(u(K),u(j),u(J),u(H))};static \u0275cmp=b({type:r,selectors:[["app-storage-location"]],features:[I],decls:9,vars:5,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"d-flex"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["placeholder","Choose an outlet","appendTo","body",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","Discontinued",3,"modelChange","options","model"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","EntityName",2,"width","450px"],["mat-sort-header","Brand"],["mat-sort-header","Inventory","arrowPosition","before",1,"text-end",2,"padding-right","100px","width","190px"],[1,"table-footer","fw-bold"],[1,"empty-column"],[1,"text-end",2,"padding-right","100px"],["api","inventory/GetCountProductStorageLocation",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(n,e){if(n&1){let a=_();i(0,"mainpanel-cmp",1),S("onSubmit",function(){return c(a),d(e.searchFromPageOne())}),i(1,"actions")(2,"div",2),D(3,rt,3,0,"button",3),o()(),i(4,"filters"),M(5,lt,9,6,"ng-template",null,0,N),o(),i(7,"content"),D(8,mt,24,8,"div",4),o()()}n&2&&(s("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),p(3),h(e.roleService.global.Export?3:-1),p(5),h(e.data?8:-1))},dependencies:[Z,Y,X,tt,$,et,it,W,B,R,nt,ot,A,k,G,z,U],encapsulation:2})};export{at as StorageLocationComponent};
@@ -1,4 +1,4 @@
1
- import{a as Ye}from"./chunk-IPKXGQTW.js";import{a as Ct,b as vn}from"./chunk-Z6X5UYRZ.js";import{a as Ne}from"./chunk-C2NCV7VC.js";import{a as _n}from"./chunk-RESN2GAB.js";import{a as gn}from"./chunk-KVMBRL53.js";import{a as bn}from"./chunk-XWXXETJY.js";import{a as dn}from"./chunk-GTPQNPNO.js";import{a as ee,b as te}from"./chunk-TSH564VU.js";import{c as fn}from"./chunk-2VE2WNSA.js";import{a as X}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{a as pn}from"./chunk-GWKBJZYT.js";import{b as Xt,c as en,d as tn,e as nn}from"./chunk-O2VVATBW.js";import{e as sn,f as un}from"./chunk-LNZY3GKF.js";import{a as cn}from"./chunk-LGINK7BD.js";import{a as vt,b as mn}from"./chunk-SIDUUVNA.js";import"./chunk-QE5OFO56.js";import{b as an}from"./chunk-KJF3M7DY.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{C as Ke}from"./chunk-26YFRPR2.js";import{b as Z,c as J}from"./chunk-JBS5UYZC.js";import{G as Qe,N as fe,O as rn,o as ln}from"./chunk-TEGIL5RZ.js";import{g as on}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import{b as Zt,c as Ve,d as Fe,k as H,l as de}from"./chunk-FU2ZGMX4.js";import{a as we}from"./chunk-2FWFPV5I.js";import{G as bt,J as Re,X as gt,j as ft,m as Kt,oa as Jt,pa as _t,w as Yt,x as Wt,xa as ke,y as Oe}from"./chunk-SLX34TWD.js";import{F as Qt}from"./chunk-DWZ5JTI2.js";import"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import{b as O}from"./chunk-WFQIMZGL.js";import{a as Ae}from"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{p as $t,s as $e}from"./chunk-LGOSIAUC.js";import{$b as Ft,$c as ve,Ab as f,Ac as Me,Bb as Ie,Ca as ge,Cb as kt,Db as ue,Eb as pe,Fb as s,Fc as h,Gb as i,Gc as T,Hb as a,Hc as G,Ia as Q,Ib as u,Ja as Dt,Jd as qt,Lc as P,Nd as zt,Ob as D,Oc as B,Pb as q,Pc as qe,Pd as Gt,Qb as Vt,Qd as U,Sa as Mt,Sb as N,Sd as j,Tc as _,Ub as m,Vb as Ee,Vc as Ht,Wb as Pe,Xa as l,Xb as je,Xc as ze,Y as It,Ya as Ue,Yb as De,Zb as oe,_b as ae,aa as mt,ad as Ut,bc as Nt,cc as I,eb as re,ec as Bt,fa as Et,gc as z,gd as Y,hc as p,ib as C,ic as x,jb as wt,jc as k,ka as Be,kc as At,la as xe,ma as Pt,mb as se,mc as Ot,na as Te,nb as Se,nc as Rt,nd as A,ob as v,oc as Lt,od as jt,pa as g,qd as me,sd as W,t as ct,ta as V,ua as F,va as dt,vd as y,wb as _e,wc as ce,wd as Ge,xc as E,yb as d,yc as M,zc as K}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as xt,b as Tt,k as St}from"./chunk-SNAKHGZS.js";var Cn=`
1
+ import{a as Ye}from"./chunk-IPKXGQTW.js";import{a as Ct,b as vn}from"./chunk-Z6X5UYRZ.js";import{a as Ne}from"./chunk-C2NCV7VC.js";import{a as _n}from"./chunk-RESN2GAB.js";import{a as gn}from"./chunk-KVMBRL53.js";import{a as bn}from"./chunk-Y7KMZ7BT.js";import{a as dn}from"./chunk-GTPQNPNO.js";import{a as ee,b as te}from"./chunk-TSH564VU.js";import{c as fn}from"./chunk-2VE2WNSA.js";import{a as X}from"./chunk-ESDXMFGP.js";import"./chunk-BYXBJQAS.js";import{a as pn}from"./chunk-GWKBJZYT.js";import{b as Xt,c as en,d as tn,e as nn}from"./chunk-O2VVATBW.js";import{e as sn,f as un}from"./chunk-YVO66RJF.js";import{a as cn}from"./chunk-LGINK7BD.js";import{a as vt,b as mn}from"./chunk-SIDUUVNA.js";import"./chunk-PFF34SZG.js";import{b as an}from"./chunk-V3FPQMVB.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{C as Ke}from"./chunk-26YFRPR2.js";import{b as Z,c as J}from"./chunk-JBS5UYZC.js";import{G as Qe,N as fe,O as rn,o as ln}from"./chunk-TEGIL5RZ.js";import{g as on}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import{b as Zt,c as Ve,d as Fe,k as H,l as de}from"./chunk-FU2ZGMX4.js";import{a as we}from"./chunk-2FWFPV5I.js";import{G as bt,J as Re,X as gt,j as ft,m as Kt,oa as Jt,pa as _t,w as Yt,x as Wt,xa as ke,y as Oe}from"./chunk-SLX34TWD.js";import{F as Qt}from"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import{b as O}from"./chunk-WFQIMZGL.js";import{a as Ae}from"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{p as $t,s as $e}from"./chunk-LGOSIAUC.js";import{$b as Ft,$c as ve,Ab as f,Ac as Me,Bb as Ie,Ca as ge,Cb as kt,Db as ue,Eb as pe,Fb as s,Fc as h,Gb as i,Gc as T,Hb as a,Hc as G,Ia as Q,Ib as u,Ja as Dt,Jd as qt,Lc as P,Nd as zt,Ob as D,Oc as B,Pb as q,Pc as qe,Pd as Gt,Qb as Vt,Qd as U,Sa as Mt,Sb as N,Sd as j,Tc as _,Ub as m,Vb as Ee,Vc as Ht,Wb as Pe,Xa as l,Xb as je,Xc as ze,Y as It,Ya as Ue,Yb as De,Zb as oe,_b as ae,aa as mt,ad as Ut,bc as Nt,cc as I,eb as re,ec as Bt,fa as Et,gc as z,gd as Y,hc as p,ib as C,ic as x,jb as wt,jc as k,ka as Be,kc as At,la as xe,ma as Pt,mb as se,mc as Ot,na as Te,nb as Se,nc as Rt,nd as A,ob as v,oc as Lt,od as jt,pa as g,qd as me,sd as W,t as ct,ta as V,ua as F,va as dt,vd as y,wb as _e,wc as ce,wd as Ge,xc as E,yb as d,yc as M,zc as K}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as xt,b as Tt,k as St}from"./chunk-SNAKHGZS.js";var Cn=`
2
2
  .p-tabs {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{e as v,f as y}from"./chunk-LNZY3GKF.js";import"./chunk-QE5OFO56.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import"./chunk-LGOSIAUC.js";import{Fb as h,Gb as o,Hb as i,Ib as g,Pd as M,Sd as u,Xa as c,eb as l,hc as n,ib as f,ic as x,jb as m,ma as a,vd as z}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var s=class e{constructor(r){this.router=r;this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(l(M))};static \u0275cmp=f({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,d){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),n(7,"You are not authorized"),i(),o(8,"p"),n(9," This page require "),o(10,"span",5),n(11),i(),n(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(h("pageData",d.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),c(11),x(d.role))},dependencies:[v],encapsulation:2})};var U=[{path:"Main/Unauthorized",component:s},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],p=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[u.forChild(U),u]})};var S=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[z,p,y]})};export{S as UnauthorizedModule};
1
+ import{e as v,f as y}from"./chunk-YVO66RJF.js";import"./chunk-PFF34SZG.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import"./chunk-LGOSIAUC.js";import{Fb as h,Gb as o,Hb as i,Ib as g,Pd as M,Sd as u,Xa as c,eb as l,hc as n,ib as f,ic as x,jb as m,ma as a,vd as z}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var s=class e{constructor(r){this.router=r;this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(l(M))};static \u0275cmp=f({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,d){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),n(7,"You are not authorized"),i(),o(8,"p"),n(9," This page require "),o(10,"span",5),n(11),i(),n(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(h("pageData",d.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),c(11),x(d.role))},dependencies:[v],encapsulation:2})};var U=[{path:"Main/Unauthorized",component:s},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],p=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[u.forChild(U),u]})};var S=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[z,p,y]})};export{S as UnauthorizedModule};
@@ -1 +1 @@
1
- import{c as f}from"./chunk-743523SK.js";import{a as m}from"./chunk-SO3RL6QR.js";import{p as v,s as u}from"./chunk-LGOSIAUC.js";import{Cd as h,Gd as l,I as c,k as n,la as s,oa as e}from"./chunk-IEVGW2RT.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
1
+ import{c as f}from"./chunk-Y7D34HYN.js";import{a as m}from"./chunk-6UC76HYF.js";import{p as v,s as u}from"./chunk-LGOSIAUC.js";import{Cd as h,Gd as l,I as c,k as n,la as s,oa as e}from"./chunk-IEVGW2RT.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
@@ -1 +1 @@
1
- import{a as L}from"./chunk-FTZZHFXM.js";import{C as N,F as j,G as D,c as P,h as A,i as V,k as I,o as R,p as U}from"./chunk-DWZ5JTI2.js";import{c as k}from"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as m}from"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{p as E}from"./chunk-LGOSIAUC.js";import{Gb as i,Hb as n,Ib as u,Pb as y,Pd as M,Sb as h,Xa as b,Yb as _,Zb as S,_b as x,d as f,da as v,eb as d,hc as s,ib as C,mc as w,nc as O,oc as T,ta as l,ua as p}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var F=["totpCode"],z=class g{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){m.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),m.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return m.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return m.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||g)(d(L),d(M),d(k),d(E))};static \u0275cmp=C({type:g,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&_(F,5),t&2){let r;S(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","https://cdn.dealpos.xyz/web-image/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","https://cdn.dealpos.app/public/logo/dealpos_130.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=y();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),h("submit",function(){return l(r),p(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),p(a)}),h("keypress",function(a){return l(r),p(o.numberOnly(a))})("ngModelChange",function(a){return l(r),p(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[D,U,P,A,V,N,j,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{z as AuthTotpComponent};
1
+ import{a as L}from"./chunk-FHL5KFJX.js";import{C as N,F as j,G as D,c as P,h as A,i as V,k as I,o as R,p as U}from"./chunk-DWZ5JTI2.js";import{c as k}from"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as m}from"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{p as E}from"./chunk-LGOSIAUC.js";import{Gb as i,Hb as n,Ib as u,Pb as y,Pd as M,Sb as h,Xa as b,Yb as _,Zb as S,_b as x,d as f,da as v,eb as d,hc as s,ib as C,mc as w,nc as O,oc as T,ta as l,ua as p}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var F=["totpCode"],z=class g{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){m.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),m.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return m.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return m.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||g)(d(L),d(M),d(k),d(E))};static \u0275cmp=C({type:g,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&_(F,5),t&2){let r;S(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","https://cdn.dealpos.xyz/web-image/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","https://cdn.dealpos.app/public/logo/dealpos_130.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=y();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),h("submit",function(){return l(r),p(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),p(a)}),h("keypress",function(a){return l(r),p(o.numberOnly(a))})("ngModelChange",function(a){return l(r),p(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[D,U,P,A,V,N,j,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{z as AuthTotpComponent};
@@ -1 +1 @@
1
- import{a as st,b as ft}from"./chunk-CD6ZWSFG.js";import"./chunk-ZKOARDC2.js";import{a as mt}from"./chunk-BQUL7SGN.js";import{a as _t}from"./chunk-ROVDZJVT.js";import{a as ut}from"./chunk-ZMJLTU5O.js";import"./chunk-PRVQ3NAP.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-363IDTE3.js";import{d as dt,e as pt}from"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{d as rt,e as lt}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as X}from"./chunk-3Y2TKGP4.js";import{f as ct}from"./chunk-BVMFVFGN.js";import{b as Z}from"./chunk-VXPORXGI.js";import"./chunk-R2Y4JAXW.js";import"./chunk-NTCQH6TH.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as et}from"./chunk-J6M7UWVR.js";import{e as ot,f as at}from"./chunk-LNZY3GKF.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-QE5OFO56.js";import{b as tt}from"./chunk-KJF3M7DY.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as K,c as U}from"./chunk-JBS5UYZC.js";import{N as nt,g as it}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Y}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as z}from"./chunk-DWZ5JTI2.js";import"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{s as Q}from"./chunk-LGOSIAUC.js";import{Ab as m,Bb as M,Db as N,Eb as j,Fb as s,Fc as d,Gb as o,Gc as f,Hb as n,Hc as x,Ib as w,Jd as R,Lc as q,Pb as P,Qd as H,Sb as h,Ub as c,Xa as i,eb as T,hc as r,ib as O,ic as D,jc as u,jd as W,mb as V,mc as g,nc as I,ob as E,oc as S,sd as A,ta as v,ua as y,vd as G,wb as k,xc as b,yb as p,yc as B}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["/menu/Outlets/Master/Outlets/Info"],Ct=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){v(e);let a=c();return y(a.openExportModal())}),w(1,"i",12),r(2," Export "),n()}}function gt(t,l){if(t&1){let e=P();o(0,"div",13)(1,"h6"),r(2,"Outlet Group"),n(),o(3,"POS-outlet-group-tree-select",14),S("selectedOutletGroupIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.OutletGroupID,a)||(C.pageData.Filter.OutletGroupID=a),y(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.CategoryID,a)||(C.pageData.Filter.CategoryID=a),y(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){v(e);let C=c();return I(C.pageData.Filter.ListProductID,a)||(C.pageData.Filter.ListProductID=a),y(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.From,a)||(C.pageData.Filter.From=a),y(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.To,a)||(C.pageData.Filter.To=a),y(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){v(e);let C=c();return I(C.pageData.Filter.InventoryType,a)||(C.pageData.Filter.InventoryType=a),y(a)}),n()()}if(t&2){let e=c();i(3),s("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),s("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),s("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),s("isFloatingLabel",!1),g("date",e.pageData.Filter.From),s("hidelClearBtn",!0),i(2),s("isFloatingLabel",!1),g("date",e.pageData.Filter.To),s("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),s("options",e.pageData.Options.InventoryTypes)}}function It(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function Dt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function bt(t,l){t&1&&(o(0,"th",9)(1,"span",28),r(2," Now "),n()())}function Bt(t,l){t&1&&(o(0,"th",9)(1,"span",29),r(2," % "),n()())}function Lt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),u(" ",e.ProductCode," ")}}function Ot(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Start),i(),u(" ",f(2,2,e.Start)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Bought)," ")}}function kt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Sold)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredIn)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredOut)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Adjustment),i(),u(" ",e.Adjustment<0?e.Adjustment*-1:f(2,2,e.Adjustment)," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.End),i(),u(" ",e.End," ")}}function Wt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Now),i(),u(" ",e.Now," ")}}function At(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.SellTransferInRate)," ")}}function Gt(t,l){if(t&1&&(o(0,"tr")(1,"td")(2,"a",30),r(3),n()(),o(4,"td")(5,"a",30),r(6),n()(),p(7,Lt,2,1,"td",31),p(8,Ot,3,4,"td",32),p(9,Vt,3,3,"td",33),p(10,kt,3,3,"td",34),p(11,Mt,3,3,"td",33),p(12,Nt,3,3,"td",34),p(13,jt,3,4,"td",32),p(14,qt,2,2,"td",32),p(15,Wt,2,2,"td",32),p(16,At,3,3,"td",31),n()),t&2){let e=l.$implicit,_=c(2);i(2),s("routerLink",b(16,vt))("queryParams",B(17,Ct,e.OutletID)),i(),u(" ",e.OutletName," "),i(2),s("routerLink",b(19,yt))("queryParams",B(20,Ct,e.ProductID)),i(),D(e.ProductName),i(),m(_.column.code.selected?7:-1),i(),m(_.column.start.selected?8:-1),i(),m(_.column.bought.selected?9:-1),i(),m(_.column.sold.selected?10:-1),i(),m(_.column.transferredIn.selected?11:-1),i(),m(_.column.transferredOut.selected?12:-1),i(),m(_.column.adjust.selected?13:-1),i(),m(_.column.end.selected?14:-1),i(),m(_.column.now.selected?15:-1),i(),m(_.column.percent.selected?16:-1)}}function Rt(t,l){if(t&1&&N(0,Gt,17,22,"tr",null,M),t&2){let e=c();j(e.infiniteList)}}function Ht(t,l){t&1&&(o(0,"tr")(1,"td",35),w(2,"app-empty-state"),n()())}function zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Start"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Start"))," ")}}function Qt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Bought"))," ")}}function Jt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Sold"))," ")}}function Kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredIn"))," ")}}function Ut(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredOut"))," ")}}function Xt(t,l){if(t&1&&(o(0,"td",38),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Adjustment"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Adjustment"))," ")}}function Yt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"End"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"End"))," ")}}function Zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Now"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Now"))," ")}}function $t(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),p(4,zt,6,12,"td",32),p(5,Qt,4,6,"td",33),p(6,Jt,4,6,"td",34),p(7,Kt,4,6,"td",33),p(8,Ut,4,6,"td",34),p(9,Xt,6,12,"td",38),p(10,Yt,6,12,"td",32),p(11,Zt,6,12,"td",32),n()()),t&2){let e=c();i(2),k("colspan",e.column.code.selected?3:2),i(2),m(e.column.start.selected?4:-1),i(),m(e.column.bought.selected?5:-1),i(),m(e.column.sold.selected?6:-1),i(),m(e.column.transferredIn.selected?7:-1),i(),m(e.column.transferredOut.selected?8:-1),i(),m(e.column.adjust.selected?9:-1),i(),m(e.column.end.selected?10:-1),i(),m(e.column.now.selected?11:-1)}}function te(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){v(e);let a=c(2);return y(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function ee(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),D(f(2,1,e.listTotal))}}function ie(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),E(5,te,3,0,"span",41)(6,ee,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){v(e);let a=c();return y(a.NextPage(!0))}),w(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),u(" Showing 1 - ",f(4,4,e.infiniteList.length)," of "),i(2),s("ngIf",!e.pageData.HideStoreApiCount),i(),s("ngIf",e.pageData.HideStoreApiCount),i(),u(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var xt=class t extends X{constructor(e,_,a,C,L,F,ne){super(e,_,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=_;this.csvConverter=a;this.pageTitle=C;this.converter=L;this.roleService=F;this.matDialog=ne;this.pageTitle.setTitle(this.menuData.T)}column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(_){return new(_||t)(T(tt),T(Q),T(et),T(R),T(mt),T(J),T(Y))};static \u0275cmp=O({type:t,selectors:[["POS-product-inventory-traffic"]],features:[V],decls:31,vars:19,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(_,a){if(_&1){let C=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return v(C),y(a.searchFromPageOne())}),S("filterChange",function(F){return v(C),I(a.pageData.Filter,F)||(a.pageData.Filter=F),y(F)}),o(1,"actions"),E(2,Tt,3,0,"button",2),n(),o(3,"filters"),E(4,gt,17,20,"ng-template",null,0,q),n(),o(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),o(14,"th"),r(15,"Product"),n(),p(16,It,2,0,"th",8),p(17,St,3,0,"th",9),p(18,Pt,3,0,"th",9),p(19,ht,3,0,"th",9),p(20,Ft,3,0,"th",9),p(21,Et,3,0,"th",9),p(22,wt,3,0,"th",9),p(23,Dt,3,0,"th",9),p(24,bt,3,0,"th",9),p(25,Bt,3,0,"th",9),n()(),o(26,"tbody"),p(27,Rt,2,0)(28,Ht,3,0,"tr"),n(),p(29,$t,12,9,"tfoot"),n()(),p(30,ie,11,6,"div",10),n()()()}_&2&&(s("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),s("column",a.column),i(2),s("ngIf",a.roleService.global.Export),i(14),m(a.column.code.selected?16:-1),i(),m(a.column.start.selected?17:-1),i(),m(a.column.bought.selected?18:-1),i(),m(a.column.sold.selected?19:-1),i(),m(a.column.transferredIn.selected?20:-1),i(),m(a.column.transferredOut.selected?21:-1),i(),m(a.column.adjust.selected?22:-1),i(),m(a.column.end.selected?23:-1),i(),m(a.column.now.selected?24:-1),i(),m(a.column.percent.selected?25:-1),i(2),m(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),m(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),m(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[at,ot,G,W,z,_t,ct,st,nt,H,pt,dt,lt,rt,ut,ft,U,K,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
1
+ import{a as st,b as ft}from"./chunk-D3KDSFJU.js";import"./chunk-ZKOARDC2.js";import{a as mt}from"./chunk-BQUL7SGN.js";import{a as _t}from"./chunk-R546P6WC.js";import{a as ut}from"./chunk-ZMJLTU5O.js";import"./chunk-PRVQ3NAP.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-363IDTE3.js";import{d as dt,e as pt}from"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{d as rt,e as lt}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as X}from"./chunk-BCGIIVLI.js";import{f as ct}from"./chunk-Q3FMCFAP.js";import{b as Z}from"./chunk-VXPORXGI.js";import"./chunk-OOKDKXRB.js";import"./chunk-H6UWRJHQ.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as et}from"./chunk-J6M7UWVR.js";import{e as ot,f as at}from"./chunk-YVO66RJF.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-PFF34SZG.js";import{b as tt}from"./chunk-V3FPQMVB.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as K,c as U}from"./chunk-JBS5UYZC.js";import{N as nt,g as it}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Y}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as z}from"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{s as Q}from"./chunk-LGOSIAUC.js";import{Ab as m,Bb as M,Db as N,Eb as j,Fb as s,Fc as d,Gb as o,Gc as f,Hb as n,Hc as x,Ib as w,Jd as R,Lc as q,Pb as P,Qd as H,Sb as h,Ub as c,Xa as i,eb as T,hc as r,ib as O,ic as D,jc as u,jd as W,mb as V,mc as g,nc as I,ob as E,oc as S,sd as A,ta as v,ua as y,vd as G,wb as k,xc as b,yb as p,yc as B}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["/menu/Outlets/Master/Outlets/Info"],Ct=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){v(e);let a=c();return y(a.openExportModal())}),w(1,"i",12),r(2," Export "),n()}}function gt(t,l){if(t&1){let e=P();o(0,"div",13)(1,"h6"),r(2,"Outlet Group"),n(),o(3,"POS-outlet-group-tree-select",14),S("selectedOutletGroupIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.OutletGroupID,a)||(C.pageData.Filter.OutletGroupID=a),y(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.CategoryID,a)||(C.pageData.Filter.CategoryID=a),y(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){v(e);let C=c();return I(C.pageData.Filter.ListProductID,a)||(C.pageData.Filter.ListProductID=a),y(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.From,a)||(C.pageData.Filter.From=a),y(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.To,a)||(C.pageData.Filter.To=a),y(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){v(e);let C=c();return I(C.pageData.Filter.InventoryType,a)||(C.pageData.Filter.InventoryType=a),y(a)}),n()()}if(t&2){let e=c();i(3),s("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),s("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),s("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),s("isFloatingLabel",!1),g("date",e.pageData.Filter.From),s("hidelClearBtn",!0),i(2),s("isFloatingLabel",!1),g("date",e.pageData.Filter.To),s("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),s("options",e.pageData.Options.InventoryTypes)}}function It(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function Dt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function bt(t,l){t&1&&(o(0,"th",9)(1,"span",28),r(2," Now "),n()())}function Bt(t,l){t&1&&(o(0,"th",9)(1,"span",29),r(2," % "),n()())}function Lt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),u(" ",e.ProductCode," ")}}function Ot(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Start),i(),u(" ",f(2,2,e.Start)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Bought)," ")}}function kt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Sold)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredIn)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredOut)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Adjustment),i(),u(" ",e.Adjustment<0?e.Adjustment*-1:f(2,2,e.Adjustment)," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.End),i(),u(" ",e.End," ")}}function Wt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Now),i(),u(" ",e.Now," ")}}function At(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.SellTransferInRate)," ")}}function Gt(t,l){if(t&1&&(o(0,"tr")(1,"td")(2,"a",30),r(3),n()(),o(4,"td")(5,"a",30),r(6),n()(),p(7,Lt,2,1,"td",31),p(8,Ot,3,4,"td",32),p(9,Vt,3,3,"td",33),p(10,kt,3,3,"td",34),p(11,Mt,3,3,"td",33),p(12,Nt,3,3,"td",34),p(13,jt,3,4,"td",32),p(14,qt,2,2,"td",32),p(15,Wt,2,2,"td",32),p(16,At,3,3,"td",31),n()),t&2){let e=l.$implicit,_=c(2);i(2),s("routerLink",b(16,vt))("queryParams",B(17,Ct,e.OutletID)),i(),u(" ",e.OutletName," "),i(2),s("routerLink",b(19,yt))("queryParams",B(20,Ct,e.ProductID)),i(),D(e.ProductName),i(),m(_.column.code.selected?7:-1),i(),m(_.column.start.selected?8:-1),i(),m(_.column.bought.selected?9:-1),i(),m(_.column.sold.selected?10:-1),i(),m(_.column.transferredIn.selected?11:-1),i(),m(_.column.transferredOut.selected?12:-1),i(),m(_.column.adjust.selected?13:-1),i(),m(_.column.end.selected?14:-1),i(),m(_.column.now.selected?15:-1),i(),m(_.column.percent.selected?16:-1)}}function Rt(t,l){if(t&1&&N(0,Gt,17,22,"tr",null,M),t&2){let e=c();j(e.infiniteList)}}function Ht(t,l){t&1&&(o(0,"tr")(1,"td",35),w(2,"app-empty-state"),n()())}function zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Start"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Start"))," ")}}function Qt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Bought"))," ")}}function Jt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Sold"))," ")}}function Kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredIn"))," ")}}function Ut(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredOut"))," ")}}function Xt(t,l){if(t&1&&(o(0,"td",38),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Adjustment"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Adjustment"))," ")}}function Yt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"End"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"End"))," ")}}function Zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Now"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Now"))," ")}}function $t(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),p(4,zt,6,12,"td",32),p(5,Qt,4,6,"td",33),p(6,Jt,4,6,"td",34),p(7,Kt,4,6,"td",33),p(8,Ut,4,6,"td",34),p(9,Xt,6,12,"td",38),p(10,Yt,6,12,"td",32),p(11,Zt,6,12,"td",32),n()()),t&2){let e=c();i(2),k("colspan",e.column.code.selected?3:2),i(2),m(e.column.start.selected?4:-1),i(),m(e.column.bought.selected?5:-1),i(),m(e.column.sold.selected?6:-1),i(),m(e.column.transferredIn.selected?7:-1),i(),m(e.column.transferredOut.selected?8:-1),i(),m(e.column.adjust.selected?9:-1),i(),m(e.column.end.selected?10:-1),i(),m(e.column.now.selected?11:-1)}}function te(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){v(e);let a=c(2);return y(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function ee(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),D(f(2,1,e.listTotal))}}function ie(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),E(5,te,3,0,"span",41)(6,ee,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){v(e);let a=c();return y(a.NextPage(!0))}),w(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),u(" Showing 1 - ",f(4,4,e.infiniteList.length)," of "),i(2),s("ngIf",!e.pageData.HideStoreApiCount),i(),s("ngIf",e.pageData.HideStoreApiCount),i(),u(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var xt=class t extends X{constructor(e,_,a,C,L,F,ne){super(e,_,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=_;this.csvConverter=a;this.pageTitle=C;this.converter=L;this.roleService=F;this.matDialog=ne;this.pageTitle.setTitle(this.menuData.T)}column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(_){return new(_||t)(T(tt),T(Q),T(et),T(R),T(mt),T(J),T(Y))};static \u0275cmp=O({type:t,selectors:[["POS-product-inventory-traffic"]],features:[V],decls:31,vars:19,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(_,a){if(_&1){let C=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return v(C),y(a.searchFromPageOne())}),S("filterChange",function(F){return v(C),I(a.pageData.Filter,F)||(a.pageData.Filter=F),y(F)}),o(1,"actions"),E(2,Tt,3,0,"button",2),n(),o(3,"filters"),E(4,gt,17,20,"ng-template",null,0,q),n(),o(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),o(14,"th"),r(15,"Product"),n(),p(16,It,2,0,"th",8),p(17,St,3,0,"th",9),p(18,Pt,3,0,"th",9),p(19,ht,3,0,"th",9),p(20,Ft,3,0,"th",9),p(21,Et,3,0,"th",9),p(22,wt,3,0,"th",9),p(23,Dt,3,0,"th",9),p(24,bt,3,0,"th",9),p(25,Bt,3,0,"th",9),n()(),o(26,"tbody"),p(27,Rt,2,0)(28,Ht,3,0,"tr"),n(),p(29,$t,12,9,"tfoot"),n()(),p(30,ie,11,6,"div",10),n()()()}_&2&&(s("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),s("column",a.column),i(2),s("ngIf",a.roleService.global.Export),i(14),m(a.column.code.selected?16:-1),i(),m(a.column.start.selected?17:-1),i(),m(a.column.bought.selected?18:-1),i(),m(a.column.sold.selected?19:-1),i(),m(a.column.transferredIn.selected?20:-1),i(),m(a.column.transferredOut.selected?21:-1),i(),m(a.column.adjust.selected?22:-1),i(),m(a.column.end.selected?23:-1),i(),m(a.column.now.selected?24:-1),i(),m(a.column.percent.selected?25:-1),i(2),m(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),m(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),m(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[at,ot,G,W,z,_t,ct,st,nt,H,pt,dt,lt,rt,ut,ft,U,K,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
@@ -1 +1 @@
1
- import{a as de}from"./chunk-XWXXETJY.js";import{e as le,f as se}from"./chunk-LNZY3GKF.js";import"./chunk-QE5OFO56.js";import{b as re}from"./chunk-KJF3M7DY.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as oe,v as ae,w as ne}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import{e as ee,f as te,g as ie}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import{a as $}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{A as J,E as Q,F as X,c as q,h as G,o as z}from"./chunk-DWZ5JTI2.js";import"./chunk-743523SK.js";import"./chunk-46D5QBZT.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as H}from"./chunk-WUV22SZ4.js";import"./chunk-SO3RL6QR.js";import{p as W,s as Z}from"./chunk-LGOSIAUC.js";import{Ab as S,Ca as E,Cb as A,Db as Y,E as P,Eb as L,Fb as _,Fc as k,Gb as o,Gc as F,Hb as a,Ib as g,Nd as K,Pb as w,Sb as f,Ub as p,Xa as d,cc as h,eb as C,gd as B,hc as r,ib as b,ic as N,jc as I,mb as V,mc as O,nc as R,oc as x,sd as U,ta as m,ua as c,vd as j,yb as T,yc as y}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var D=(s=>(s.TRANSACTIONS="TRANSACTIONS",s.PRODUCTS="PRODUCTS",s.CONTACTS="CONTACTS",s.LOYALTY_POINTS="LOYALTY_POINTS",s.RECYCLE_BIN="RECYCLE_BIN",s.INVENTORY="INVENTORY",s))(D||{});function Ce(n,l){if(n&1&&(o(0,"div",3)(1,"div",4)(2,"div",16),g(3,"i",17),o(4,"span"),r(5),a()()()()),n&2){let i=p();d(5),I(" ",i.selectedClearData.message," ")}}function fe(n,l){n&1&&(o(0,"small",8),r(1," *Subdomain is required "),a())}function _e(n,l){n&1&&(o(0,"small",8),r(1," *Password is required "),a())}function Te(n,l){n&1&&g(0,"i",14)}function Se(n,l){n&1&&g(0,"i",15)}var v=class n{constructor(l,i,t){this.data=l;this.dialogRef=i;this.fb=t;this.modalConfig.title=this.modalTitle[this.data.type],this.subdomain="",this.subdomainPlaceholder=l.subDomain}clearData=[{type:"TRANSACTIONS",api:"Setup/Data/ClearTransaction",message:"Your Invoice, Bill, Adjustment, TransferOrder will be deleted"},{type:"PRODUCTS",api:"Setup/Data/ClearProduct",message:"Your Category, Product and Variant will be deleted"},{type:"LOYALTY_POINTS",api:"Setup/Data/ClearLoyaltyPoint"},{type:"RECYCLE_BIN",api:"Setup/Data/ClearRecycleBin"},{type:"INVENTORY",api:"Setup/Data/ClearInventory",message:"Your Product Inventory will be set to 0"},{type:"CONTACTS",api:"Setup/Data/ClearContact",message:"Your Customer, Supplier and Sales Person will be deleted"}];selectedClearData;modalConfig=new oe;modalTitle={TRANSACTIONS:"Clear Transactions",PRODUCTS:"Clear Products",LOYALTY_POINTS:"Clear Loyalty Points",RECYCLE_BIN:"Clear Recycle Bin",CONTACTS:"Clear Contacts",INVENTORY:"Clear Inventory"};subdomain;subdomainPlaceholder;password;form;passwordVisibility=E(!1);ngOnInit(){this.initSelectedClearData(),this.form=this.fb.group({subdomain:[""],password:[""]})}initSelectedClearData(){this.selectedClearData=this.clearData.find(l=>l.type===this.data.type)}onSubmit(){let l={password:this.password,subdomain:this.subdomain,apiUrl:this.selectedClearData.api};this.dialogRef.close(l)}static \u0275fac=function(i){return new(i||n)(C(te),C(ee),C(Q))};static \u0275cmp=b({type:n,selectors:[["app-confirmation-modal"]],decls:24,vars:10,consts:[["subdomainCtrl","ngModel"],["passwordCtrl","ngModel"],[3,"onOk","onClose","onCancel","config","dynamicValidated"],[1,"row"],[1,"col-12"],[1,"form-floating-outline","mt-5"],["type","text","id","subdomain","placeholder","Subdomain","name","subdomain","autofocus","","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"control-label","text-danger"],[1,"form-floating-outline"],["id","pass","placeholder","Password","name","password","required","",1,"form-control",3,"ngModelChange","type","ngModel"],["for","pass"],[1,"password-visibility"],["type","button",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-eye"],[1,"fa-solid","fa-eye-slash"],[1,"alert","alert-warning","cursor","w-100"],[1,"fa-solid","fa-circle-exclamation","me-2"]],template:function(i,t){if(i&1){let e=w();o(0,"modal-material",2),f("onOk",function(){return m(e),c(t.onSubmit())})("onClose",function(){return m(e),c(t.dialogRef.close())})("onCancel",function(){return m(e),c(t.dialogRef.close())}),o(1,"content"),T(2,Ce,6,1,"div",3),o(3,"div",3)(4,"div",4)(5,"strong"),r(6),a(),o(7,"div",5)(8,"input",6,0),x("ngModelChange",function(s){return m(e),R(t.subdomain,s)||(t.subdomain=s),c(s)}),a(),o(10,"label",7),r(11,"Subdomain"),a(),T(12,fe,2,0,"small",8),a()(),o(13,"div",4)(14,"div",9)(15,"input",10,1),x("ngModelChange",function(s){return m(e),R(t.password,s)||(t.password=s),c(s)}),a(),o(17,"label",11),r(18,"Password"),a(),T(19,_e,2,0,"small",8),o(20,"div",12)(21,"button",13),f("click",function(){return m(e),c(t.passwordVisibility.set(!t.passwordVisibility()))}),T(22,Te,1,0,"i",14)(23,Se,1,0,"i",15),a()()()()()()()}if(i&2){let e=h(9),u=h(16);_("config",t.modalConfig)("dynamicValidated",t.password&&t.subdomain),d(2),S(t.selectedClearData.message?2:-1),d(4),I("Enter the following subdomain to confirm: ",t.subdomainPlaceholder),d(2),O("ngModel",t.subdomain),d(4),S(e.invalid&&(e.dirty||e.touched)?12:-1),d(3),_("type",t.passwordVisibility()?"text":"password"),O("ngModel",t.password),d(4),S(u.invalid&&(u.dirty||u.touched)?19:-1),d(3),S(t.passwordVisibility()?22:23)}},dependencies:[ne,ae,X,q,G,J,z],styles:[".password-visibility[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);cursor:pointer;font-size:1.5rem}"]})};var M=n=>({"border border-0":n});function be(n,l){if(n&1&&(o(0,"tr",21)(1,"td",21),r(2),a(),o(3,"td",22),r(4),k(5,"number"),a()()),n&2){let i=l.$implicit,t=l.$index,e=p(2);_("ngClass",y(7,M,t==e.data.Data.length-1)),d(),_("ngClass",y(9,M,t==e.data.Data.length-1)),d(),N(i.Key),d(),_("ngClass",y(11,M,t==e.data.Data.length-1)),d(),N(F(5,5,i.Value))}}function ge(n,l){if(n&1){let i=w();o(0,"mainpanel-cmp",0)(1,"actions")(2,"div",1)(3,"div",2)(4,"button",3),r(5," Format Data "),a(),o(6,"ul",4)(7,"li")(8,"a",5),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.TRANSACTIONS))}),r(9," 1. Clear Transactions "),a()(),o(10,"li")(11,"a",6),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.INVENTORY))}),r(12," 2. Clear Inventory "),a()(),o(13,"li")(14,"a",7),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.PRODUCTS))}),r(15," 3. Clear Products "),a()(),o(16,"li")(17,"a",8),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.CONTACTS))}),r(18," 4. Clear Contacts "),a()(),o(19,"li")(20,"a",9),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.LOYALTY_POINTS))}),r(21," 5. Clear Loyalty Point "),a()(),o(22,"li")(23,"a",10),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.RECYCLE_BIN))}),r(24," 6. Clear Recycle Bin "),a()()()()()(),o(25,"content")(26,"div",11)(27,"div",12)(28,"div",13)(29,"h5"),r(30,"Database Records"),a(),o(31,"i"),r(32,"Current data count"),a()(),o(33,"div",14)(34,"div",15)(35,"div",16)(36,"table",17)(37,"thead",18)(38,"tr",19)(39,"th"),r(40,"Table"),a(),o(41,"th",20),r(42,"Rows"),a()()(),o(43,"tbody"),Y(44,be,6,13,"tr",21,A),a()()()()()()()()()}if(n&2){let i=p();_("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),d(44),L(i.data.Data)}}var me=class n extends de{constructor(i,t,e,u,s){super(i,t,"Setup/DataLoader/clearformatdata",e);this.httpService=t;this.activatedRoute=e;this.toaster=u;this.dialog=s}clearDataType=D;onClearRecord(i){this.dialog.open(v,{data:{type:i,subDomain:this.data.SubDomain}}).afterClosed().pipe(P(t=>H.IsNotEmpty(t))).subscribe(t=>{this.formData={Subdomain:t.subdomain,Password:t.password},this.onSubmit(t.apiUrl),i=="PRODUCTS"?this.data.Data.find(e=>e.Key=="Product").Value=0:i=="CONTACTS"?this.data.Data.find(e=>e.Key=="Customer").Value=0:i=="INVENTORY"?this.data.Data.find(e=>e.Key=="ItemTransfer").Value=0:i=="LOYALTY_POINTS"?this.data.Data.find(e=>e.Key=="JournalHeader").Value=0:i=="RECYCLE_BIN"?this.data.Data.find(e=>e.Key=="Recycle Bin").Value=0:i=="TRANSACTIONS"&&(this.data.Data.find(e=>e.Key=="SalesOrder").Value=0)})}onSubmitSuccess(i){this.toaster.success(i.Message,$.Success)}static \u0275fac=function(t){return new(t||n)(C(re),C(Z),C(K),C(W),C(ie))};static \u0275cmp=b({type:n,selectors:[["POS-format-data"]],features:[V],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex"],[1,"dropdown"],["type","button","data-bs-toggle","dropdown","aria-expanded","false","confirm-message","Are you sure you want to clear the record?",1,"btn","btn-outline-secondary","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end"],["role","button","matTooltipPosition","above","matTooltip","Clear Transaction",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Inventory",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Products",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Contacts",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Loyalty Point",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Recycle Bin",1,"dropdown-item",3,"click"],[1,"container","pt-3"],[1,"row","border-bottom","mt-10","ms-2"],[1,"col-sm-2"],[1,"col-sm-10"],[1,"row"],[1,"col-md-12"],["id","tableGrid",1,"table",2,"width","250px"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-end"],[3,"ngClass"],[1,"text-end",3,"ngClass"]],template:function(t,e){t&1&&T(0,ge,46,3,"mainpanel-cmp",0),t&2&&S(e.formData?0:-1)},dependencies:[j,B,se,le,U],encapsulation:2})};export{me as FormatDataComponent};
1
+ import{a as de}from"./chunk-Y7KMZ7BT.js";import{e as le,f as se}from"./chunk-YVO66RJF.js";import"./chunk-PFF34SZG.js";import{b as re}from"./chunk-V3FPQMVB.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as oe,v as ae,w as ne}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import{e as ee,f as te,g as ie}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import{a as $}from"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{A as J,E as Q,F as X,c as q,h as G,o as z}from"./chunk-DWZ5JTI2.js";import"./chunk-Y7D34HYN.js";import"./chunk-P6DRDJVZ.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as H}from"./chunk-WUV22SZ4.js";import"./chunk-6UC76HYF.js";import{p as W,s as Z}from"./chunk-LGOSIAUC.js";import{Ab as S,Ca as E,Cb as A,Db as Y,E as P,Eb as L,Fb as _,Fc as k,Gb as o,Gc as F,Hb as a,Ib as g,Nd as K,Pb as w,Sb as f,Ub as p,Xa as d,cc as h,eb as C,gd as B,hc as r,ib as b,ic as N,jc as I,mb as V,mc as O,nc as R,oc as x,sd as U,ta as m,ua as c,vd as j,yb as T,yc as y}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var D=(s=>(s.TRANSACTIONS="TRANSACTIONS",s.PRODUCTS="PRODUCTS",s.CONTACTS="CONTACTS",s.LOYALTY_POINTS="LOYALTY_POINTS",s.RECYCLE_BIN="RECYCLE_BIN",s.INVENTORY="INVENTORY",s))(D||{});function Ce(n,l){if(n&1&&(o(0,"div",3)(1,"div",4)(2,"div",16),g(3,"i",17),o(4,"span"),r(5),a()()()()),n&2){let i=p();d(5),I(" ",i.selectedClearData.message," ")}}function fe(n,l){n&1&&(o(0,"small",8),r(1," *Subdomain is required "),a())}function _e(n,l){n&1&&(o(0,"small",8),r(1," *Password is required "),a())}function Te(n,l){n&1&&g(0,"i",14)}function Se(n,l){n&1&&g(0,"i",15)}var v=class n{constructor(l,i,t){this.data=l;this.dialogRef=i;this.fb=t;this.modalConfig.title=this.modalTitle[this.data.type],this.subdomain="",this.subdomainPlaceholder=l.subDomain}clearData=[{type:"TRANSACTIONS",api:"Setup/Data/ClearTransaction",message:"Your Invoice, Bill, Adjustment, TransferOrder will be deleted"},{type:"PRODUCTS",api:"Setup/Data/ClearProduct",message:"Your Category, Product and Variant will be deleted"},{type:"LOYALTY_POINTS",api:"Setup/Data/ClearLoyaltyPoint"},{type:"RECYCLE_BIN",api:"Setup/Data/ClearRecycleBin"},{type:"INVENTORY",api:"Setup/Data/ClearInventory",message:"Your Product Inventory will be set to 0"},{type:"CONTACTS",api:"Setup/Data/ClearContact",message:"Your Customer, Supplier and Sales Person will be deleted"}];selectedClearData;modalConfig=new oe;modalTitle={TRANSACTIONS:"Clear Transactions",PRODUCTS:"Clear Products",LOYALTY_POINTS:"Clear Loyalty Points",RECYCLE_BIN:"Clear Recycle Bin",CONTACTS:"Clear Contacts",INVENTORY:"Clear Inventory"};subdomain;subdomainPlaceholder;password;form;passwordVisibility=E(!1);ngOnInit(){this.initSelectedClearData(),this.form=this.fb.group({subdomain:[""],password:[""]})}initSelectedClearData(){this.selectedClearData=this.clearData.find(l=>l.type===this.data.type)}onSubmit(){let l={password:this.password,subdomain:this.subdomain,apiUrl:this.selectedClearData.api};this.dialogRef.close(l)}static \u0275fac=function(i){return new(i||n)(C(te),C(ee),C(Q))};static \u0275cmp=b({type:n,selectors:[["app-confirmation-modal"]],decls:24,vars:10,consts:[["subdomainCtrl","ngModel"],["passwordCtrl","ngModel"],[3,"onOk","onClose","onCancel","config","dynamicValidated"],[1,"row"],[1,"col-12"],[1,"form-floating-outline","mt-5"],["type","text","id","subdomain","placeholder","Subdomain","name","subdomain","autofocus","","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"control-label","text-danger"],[1,"form-floating-outline"],["id","pass","placeholder","Password","name","password","required","",1,"form-control",3,"ngModelChange","type","ngModel"],["for","pass"],[1,"password-visibility"],["type","button",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-eye"],[1,"fa-solid","fa-eye-slash"],[1,"alert","alert-warning","cursor","w-100"],[1,"fa-solid","fa-circle-exclamation","me-2"]],template:function(i,t){if(i&1){let e=w();o(0,"modal-material",2),f("onOk",function(){return m(e),c(t.onSubmit())})("onClose",function(){return m(e),c(t.dialogRef.close())})("onCancel",function(){return m(e),c(t.dialogRef.close())}),o(1,"content"),T(2,Ce,6,1,"div",3),o(3,"div",3)(4,"div",4)(5,"strong"),r(6),a(),o(7,"div",5)(8,"input",6,0),x("ngModelChange",function(s){return m(e),R(t.subdomain,s)||(t.subdomain=s),c(s)}),a(),o(10,"label",7),r(11,"Subdomain"),a(),T(12,fe,2,0,"small",8),a()(),o(13,"div",4)(14,"div",9)(15,"input",10,1),x("ngModelChange",function(s){return m(e),R(t.password,s)||(t.password=s),c(s)}),a(),o(17,"label",11),r(18,"Password"),a(),T(19,_e,2,0,"small",8),o(20,"div",12)(21,"button",13),f("click",function(){return m(e),c(t.passwordVisibility.set(!t.passwordVisibility()))}),T(22,Te,1,0,"i",14)(23,Se,1,0,"i",15),a()()()()()()()}if(i&2){let e=h(9),u=h(16);_("config",t.modalConfig)("dynamicValidated",t.password&&t.subdomain),d(2),S(t.selectedClearData.message?2:-1),d(4),I("Enter the following subdomain to confirm: ",t.subdomainPlaceholder),d(2),O("ngModel",t.subdomain),d(4),S(e.invalid&&(e.dirty||e.touched)?12:-1),d(3),_("type",t.passwordVisibility()?"text":"password"),O("ngModel",t.password),d(4),S(u.invalid&&(u.dirty||u.touched)?19:-1),d(3),S(t.passwordVisibility()?22:23)}},dependencies:[ne,ae,X,q,G,J,z],styles:[".password-visibility[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);cursor:pointer;font-size:1.5rem}"]})};var M=n=>({"border border-0":n});function be(n,l){if(n&1&&(o(0,"tr",21)(1,"td",21),r(2),a(),o(3,"td",22),r(4),k(5,"number"),a()()),n&2){let i=l.$implicit,t=l.$index,e=p(2);_("ngClass",y(7,M,t==e.data.Data.length-1)),d(),_("ngClass",y(9,M,t==e.data.Data.length-1)),d(),N(i.Key),d(),_("ngClass",y(11,M,t==e.data.Data.length-1)),d(),N(F(5,5,i.Value))}}function ge(n,l){if(n&1){let i=w();o(0,"mainpanel-cmp",0)(1,"actions")(2,"div",1)(3,"div",2)(4,"button",3),r(5," Format Data "),a(),o(6,"ul",4)(7,"li")(8,"a",5),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.TRANSACTIONS))}),r(9," 1. Clear Transactions "),a()(),o(10,"li")(11,"a",6),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.INVENTORY))}),r(12," 2. Clear Inventory "),a()(),o(13,"li")(14,"a",7),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.PRODUCTS))}),r(15," 3. Clear Products "),a()(),o(16,"li")(17,"a",8),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.CONTACTS))}),r(18," 4. Clear Contacts "),a()(),o(19,"li")(20,"a",9),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.LOYALTY_POINTS))}),r(21," 5. Clear Loyalty Point "),a()(),o(22,"li")(23,"a",10),f("click",function(){m(i);let e=p();return c(e.onClearRecord(e.clearDataType.RECYCLE_BIN))}),r(24," 6. Clear Recycle Bin "),a()()()()()(),o(25,"content")(26,"div",11)(27,"div",12)(28,"div",13)(29,"h5"),r(30,"Database Records"),a(),o(31,"i"),r(32,"Current data count"),a()(),o(33,"div",14)(34,"div",15)(35,"div",16)(36,"table",17)(37,"thead",18)(38,"tr",19)(39,"th"),r(40,"Table"),a(),o(41,"th",20),r(42,"Rows"),a()()(),o(43,"tbody"),Y(44,be,6,13,"tr",21,A),a()()()()()()()()()}if(n&2){let i=p();_("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),d(44),L(i.data.Data)}}var me=class n extends de{constructor(i,t,e,u,s){super(i,t,"Setup/DataLoader/clearformatdata",e);this.httpService=t;this.activatedRoute=e;this.toaster=u;this.dialog=s}clearDataType=D;onClearRecord(i){this.dialog.open(v,{data:{type:i,subDomain:this.data.SubDomain}}).afterClosed().pipe(P(t=>H.IsNotEmpty(t))).subscribe(t=>{this.formData={Subdomain:t.subdomain,Password:t.password},this.onSubmit(t.apiUrl),i=="PRODUCTS"?this.data.Data.find(e=>e.Key=="Product").Value=0:i=="CONTACTS"?this.data.Data.find(e=>e.Key=="Customer").Value=0:i=="INVENTORY"?this.data.Data.find(e=>e.Key=="ItemTransfer").Value=0:i=="LOYALTY_POINTS"?this.data.Data.find(e=>e.Key=="JournalHeader").Value=0:i=="RECYCLE_BIN"?this.data.Data.find(e=>e.Key=="Recycle Bin").Value=0:i=="TRANSACTIONS"&&(this.data.Data.find(e=>e.Key=="SalesOrder").Value=0)})}onSubmitSuccess(i){this.toaster.success(i.Message,$.Success)}static \u0275fac=function(t){return new(t||n)(C(re),C(Z),C(K),C(W),C(ie))};static \u0275cmp=b({type:n,selectors:[["POS-format-data"]],features:[V],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex"],[1,"dropdown"],["type","button","data-bs-toggle","dropdown","aria-expanded","false","confirm-message","Are you sure you want to clear the record?",1,"btn","btn-outline-secondary","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end"],["role","button","matTooltipPosition","above","matTooltip","Clear Transaction",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Inventory",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Products",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Contacts",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Loyalty Point",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Recycle Bin",1,"dropdown-item",3,"click"],[1,"container","pt-3"],[1,"row","border-bottom","mt-10","ms-2"],[1,"col-sm-2"],[1,"col-sm-10"],[1,"row"],[1,"col-md-12"],["id","tableGrid",1,"table",2,"width","250px"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-end"],[3,"ngClass"],[1,"text-end",3,"ngClass"]],template:function(t,e){t&1&&T(0,ge,46,3,"mainpanel-cmp",0),t&2&&S(e.formData?0:-1)},dependencies:[j,B,se,le,U],encapsulation:2})};export{me as FormatDataComponent};
@@ -1 +1 @@
1
- import{c as u}from"./chunk-743523SK.js";import{b as s}from"./chunk-WFQIMZGL.js";import{Pd as a,pa as e}from"./chunk-IEVGW2RT.js";var g=(t,c)=>{let r=e(a),i=e(u);if(i.isTokenExpired())return i.returnUrl=c.url,r.navigate(["/"]),!1;let d=e(s),o=t.data?.roles;if(o){let n=t.data?.unauthorizedRedirect;if(!o.some(l=>d.isUserHasRole(l)))return n?r.navigate([n]):r.navigate(["menu/Unauthorized/Main/Unauthorized"]),!1}return!0};export{g as a};
1
+ import{c as u}from"./chunk-Y7D34HYN.js";import{b as s}from"./chunk-WFQIMZGL.js";import{Pd as a,pa as e}from"./chunk-IEVGW2RT.js";var g=(t,c)=>{let r=e(a),i=e(u);if(i.isTokenExpired())return i.returnUrl=c.url,r.navigate(["/"]),!1;let d=e(s),o=t.data?.roles;if(o){let n=t.data?.unauthorizedRedirect;if(!o.some(l=>d.isUserHasRole(l)))return n?r.navigate([n]):r.navigate(["menu/Unauthorized/Main/Unauthorized"]),!1}return!0};export{g as a};