dealpos 25.50.0 → 25.50.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-WXYXGYFH.js → chunk-2KS45FOG.js} +1 -1
- package/browser/{chunk-PV4YHZX5.js → chunk-2YCKWFSX.js} +1 -1
- package/browser/{chunk-GRLVYPPM.js → chunk-3CI72KQ3.js} +1 -1
- package/browser/{chunk-S65MPEJS.js → chunk-3FIHANXM.js} +1 -1
- package/browser/{chunk-XSZJISVJ.js → chunk-3IAS5WE6.js} +1 -1
- package/browser/{chunk-5SIEW7SH.js → chunk-4VHFIFH3.js} +1 -1
- package/browser/{chunk-COL56R4A.js → chunk-4WGA2OTP.js} +1 -1
- package/browser/{chunk-OZ3MKU4C.js → chunk-4XR5RPFW.js} +1 -1
- package/browser/{chunk-A6Z5ZHVO.js → chunk-522M5UUJ.js} +1 -1
- package/browser/{chunk-FMKY4THI.js → chunk-5I57WLXV.js} +1 -1
- package/browser/{chunk-SOW7VMSU.js → chunk-5JPSSGYG.js} +1 -1
- package/browser/{chunk-RE6SQEP6.js → chunk-5TRWYRN5.js} +1 -1
- package/browser/{chunk-FSOHJLXB.js → chunk-6K2PABLT.js} +1 -1
- package/browser/{chunk-SK6Y77W4.js → chunk-72M34LBD.js} +1 -1
- package/browser/{chunk-YLEKN2EU.js → chunk-76NP7MDH.js} +1 -1
- package/browser/{chunk-GDQGP7DV.js → chunk-7KRURW6N.js} +1 -1
- package/browser/{chunk-CB6QEEJX.js → chunk-7T4IG74V.js} +1 -1
- package/browser/{chunk-LIX7XJ55.js → chunk-7YINKSK5.js} +1 -1
- package/browser/{chunk-2KI73XNT.js → chunk-A6LKXUGJ.js} +1 -1
- package/browser/{chunk-2ITJBRJU.js → chunk-ABAK5BOR.js} +1 -1
- package/browser/{chunk-BQ7QT5RB.js → chunk-CAHMSC7J.js} +1 -1
- package/browser/{chunk-YBUERVXV.js → chunk-CMZCCWKE.js} +1 -1
- package/browser/{chunk-KUF3JPB2.js → chunk-CN2J3E2G.js} +1 -1
- package/browser/{chunk-PIAQ4TBN.js → chunk-D3NB2D5J.js} +1 -1
- package/browser/{chunk-CZHWPDAM.js → chunk-DVEFT7GI.js} +1 -1
- package/browser/{chunk-TTCSYFRX.js → chunk-DXZJ5B2W.js} +1 -1
- package/browser/{chunk-HFZ437GH.js → chunk-E7I3NPA7.js} +1 -1
- package/browser/{chunk-JCLYKROE.js → chunk-E7RGLETU.js} +1 -1
- package/browser/{chunk-BLEJLNEO.js → chunk-EKL4DD7N.js} +1 -1
- package/browser/{chunk-DYBRYTEM.js → chunk-EQ5MSD2S.js} +1 -1
- package/browser/{chunk-2ENLMKGR.js → chunk-EXV4D73Z.js} +1 -1
- package/browser/{chunk-7MJWZXSK.js → chunk-F7YYCFKH.js} +2 -2
- package/browser/chunk-FCDFHL3X.js +1 -0
- package/browser/{chunk-LIXEWT4U.js → chunk-FR2QCVXS.js} +1 -1
- package/browser/{chunk-ISN5K6K2.js → chunk-FYZR4T4Z.js} +1 -1
- package/browser/{chunk-3ZWJMFYL.js → chunk-GDASNIZL.js} +1 -1
- package/browser/{chunk-G3DZI5XK.js → chunk-GJCPLFMU.js} +1 -1
- package/browser/{chunk-KZBVWICA.js → chunk-GUN3GLFK.js} +1 -1
- package/browser/{chunk-ISQHQTAS.js → chunk-I5PFTS7W.js} +1 -1
- package/browser/{chunk-QWB3USYP.js → chunk-IB5IYQYR.js} +2 -2
- package/browser/{chunk-HFOJZ3B5.js → chunk-IRGMPCNS.js} +1 -1
- package/browser/{chunk-YUILNWDI.js → chunk-IX6SAYD6.js} +1 -1
- package/browser/{chunk-HFDJ5XSI.js → chunk-J4JATC4H.js} +1 -1
- package/browser/{chunk-CCJ6SHBL.js → chunk-JIYQX2TI.js} +1 -1
- package/browser/{chunk-SBTTKQ4L.js → chunk-KJ6Y5C2X.js} +1 -1
- package/browser/{chunk-PVBS6SYW.js → chunk-L2E3ETBG.js} +1 -1
- package/browser/{chunk-Q3DS2RLM.js → chunk-LJCEFLIZ.js} +1 -1
- package/browser/{chunk-G5JGQBAG.js → chunk-LKBQF2DU.js} +1 -1
- package/browser/{chunk-MFJH22SW.js → chunk-LNFN2XQO.js} +1 -1
- package/browser/{chunk-XFAV2VZL.js → chunk-MNQNS2XG.js} +1 -1
- package/browser/{chunk-IPPIH4F4.js → chunk-MW6VWMF2.js} +1 -1
- package/browser/{chunk-2FJNMKCN.js → chunk-N5HYVJLW.js} +1 -1
- package/browser/{chunk-BZ3GMUQ7.js → chunk-NRXQVTHC.js} +2 -2
- package/browser/{chunk-UZN4OKOJ.js → chunk-NX6SWHK4.js} +2 -2
- package/browser/{chunk-X2GHGFH2.js → chunk-O7AYJCX3.js} +1 -1
- package/browser/{chunk-QZRMHLML.js → chunk-OPACCKVN.js} +1 -1
- package/browser/{chunk-FV4MYFQI.js → chunk-OXGGKWTO.js} +1 -1
- package/browser/{chunk-Y7KCHRMM.js → chunk-PCAJ3T4Y.js} +1 -1
- package/browser/{chunk-4KYROBKJ.js → chunk-PE5RSFD4.js} +1 -1
- package/browser/{chunk-GESNWWTD.js → chunk-PG76XRHN.js} +1 -1
- package/browser/{chunk-T7PBUS2H.js → chunk-Q3HXBKNL.js} +1 -1
- package/browser/{chunk-PXIMA665.js → chunk-QM5JUHAR.js} +3 -3
- package/browser/{chunk-O3ENARQZ.js → chunk-QO5SWGKB.js} +1 -1
- package/browser/{chunk-T3ZHKT2K.js → chunk-R66UUSM7.js} +1 -1
- package/browser/{chunk-7L5VMLEF.js → chunk-R7X75CAN.js} +1 -1
- package/browser/{chunk-CXWICNFP.js → chunk-RJFWUHOP.js} +1 -1
- package/browser/{chunk-M2HEFQUY.js → chunk-S2XP3WT2.js} +1 -1
- package/browser/{chunk-A5CTHLE4.js → chunk-SXFDWJS4.js} +1 -1
- package/browser/{chunk-GBSRXCWH.js → chunk-TFJ6RC7Q.js} +1 -1
- package/browser/{chunk-PLR55YR2.js → chunk-TM4BVRKQ.js} +1 -1
- package/browser/{chunk-F765TCAS.js → chunk-TSYTV425.js} +1 -1
- package/browser/{chunk-4MQZXTMM.js → chunk-TXFCAVU2.js} +1 -1
- package/browser/chunk-UXISTLRF.js +1 -0
- package/browser/{chunk-S4D5UGSM.js → chunk-VD3VXMZE.js} +1 -1
- package/browser/{chunk-BFNGPKGX.js → chunk-VL552ANV.js} +1 -1
- package/browser/{chunk-3CUT73ZP.js → chunk-VLALB254.js} +1 -1
- package/browser/chunk-WMLA5VC3.js +4 -0
- package/browser/{chunk-Y5DX5U5Q.js → chunk-YAZTTW7K.js} +1 -1
- package/browser/{chunk-4YZVDERU.js → chunk-YDSGRKII.js} +1 -1
- package/browser/{chunk-3AZAILT2.js → chunk-Z6DKCJUZ.js} +1 -1
- package/browser/{chunk-2SZZVWQD.js → chunk-ZNKZYBB6.js} +2 -2
- package/browser/{chunk-MZSJCSUV.js → chunk-ZUH63VNR.js} +2 -2
- package/browser/{chunk-B7BVEOOI.js → chunk-ZVJGTPQY.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-4PHVOJ3C.js → main-OHWGY2LM.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-EAEOJMTA.js +0 -4
- package/browser/chunk-PHYDJ3P5.js +0 -1
- package/browser/chunk-PMDFKXZY.js +0 -1
|
@@ -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-
|
|
1
|
+
import{O as b}from"./chunk-TEGIL5RZ.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-WMLA5VC3.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 ce,b as de,c as _e,d as se,e as ge,f as ue}from"./chunk-DYBRYTEM.js";import"./chunk-PHH2AA3W.js";import"./chunk-Y7KCHRMM.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import{a as te}from"./chunk-363IDTE3.js";import{a as ee}from"./chunk-QZZ2NRA3.js";import"./chunk-FAED643P.js";import{e as me}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 re,e as le}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{c as pe}from"./chunk-B7BVEOOI.js";import{b as $}from"./chunk-VXPORXGI.js";import{a as Y}from"./chunk-T3ZHKT2K.js";import"./chunk-HFOJZ3B5.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as ie}from"./chunk-J6M7UWVR.js";import{e as oe,f as ae}from"./chunk-BFNGPKGX.js";import"./chunk-G3DZI5XK.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-OZ3MKU4C.js";import{b as ne}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as U,c as X}from"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Z}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as G,c as k,h as Q,o as j,q}from"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-EAEOJMTA.js";import{s as z}from"./chunk-LGOSIAUC.js";import{Ab as E,Fb as p,Fc as _,Gb as o,Gc as s,Hb as i,Hc as D,Ib as f,Jd as W,Lc as O,Pb as I,Qd as A,Sb as h,Sd as N,Ub as m,Xa as a,eb as C,hc as l,ib as B,ic as M,jc as g,jd as L,mb as F,mc as v,nc as S,ob as x,oc as b,sc as V,sd as R,ta as u,ua as y,vd as H,xc as T,yb as P,yc as w}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ce=()=>({"min-width":"50rem","font-family":"Roboto, sans-serif"}),xe=()=>["/menu/Products/Catalog/Products"],ye=t=>({CategoryID:t}),ve=()=>["/menu/Inventory/Quantity/Valuation"];function Se(t,c){if(t&1){let e=I();o(0,"button",10),h("click",function(){u(e);let n=m(2);return y(n.openExportModal())}),f(1,"i",11),l(2," Export "),i()}}function be(t,c){if(t&1){let e=I();o(0,"div",12)(1,"h6"),l(2,"Outlet"),i(),o(3,"outlet-selector",13),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.ListIDs,n)||(d.pageData.Filter.ListIDs=n),y(n)}),i(),o(4,"h6"),l(5,"Quantity From - To"),i(),o(6,"div",14)(7,"input",15),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityFrom,n)||(d.pageData.Filter.QuantityFrom=n),y(n)}),i(),o(8,"span",16),l(9,"-"),i(),o(10,"input",17),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityTo,n)||(d.pageData.Filter.QuantityTo=n),y(n)}),i()(),o(11,"h6"),l(12,"Discontinued"),i(),o(13,"radio-options",18),b("modelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.Discontinued,n)||(d.pageData.Filter.Discontinued=n),y(n)}),i()()}if(t&2){let e=m(2);a(3),p("multiple",!0)("accessType",2),v("ngModel",e.pageData.Filter.ListIDs),a(4),v("ngModel",e.pageData.Filter.QuantityFrom),a(3),v("ngModel",e.pageData.Filter.QuantityTo),a(3),v("model",e.pageData.Filter.Discontinued),p("options",e.pageData.Options.Discontinued)}}function Ie(t,c){t&1&&(o(0,"th",27),l(1," Cost "),f(2,"p-treeTableSortIcon",28),i())}function Te(t,c){t&1&&(o(0,"th",29),l(1," Price "),f(2,"p-treeTableSortIcon",30),i())}function De(t,c){t&1&&(o(0,"th",31),l(1," % "),f(2,"p-treeTableSortIcon",32),i())}function he(t,c){if(t&1&&(o(0,"tr",19)(1,"th",20),l(2," Category "),f(3,"p-treeTableSortIcon",21),i(),o(4,"th",22),l(5," On Hand "),f(6,"p-treeTableSortIcon",23),i(),x(7,Ie,3,0,"th",24)(8,Te,3,0,"th",25)(9,De,3,0,"th",26),i()),t&2){let e=m(2);a(7),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function we(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedCost)," ")}}function Be(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedPrice)," ")}}function Fe(t,c){if(t&1&&(o(0,"td")(1,"span",38),_(2,"number"),l(3),_(4,"number"),i()()),t&2){let e=m().rowData;a(),p("matTooltip",D(2,2,e.DisplayedPercentage,"1.0-5")+"%"),a(2),g(" ",D(4,5,e.DisplayedPercentage,"1.0-0"),"% ")}}function Pe(t,c){if(t&1&&(o(0,"tr",33)(1,"td"),f(2,"p-treeTableToggler",34),o(3,"a",35),l(4),i()(),o(5,"td")(6,"a",36),_(7,"number"),_(8,"number"),_(9,"number"),l(10),_(11,"quantityFraction"),i()(),x(12,we,3,3,"td",37)(13,Be,3,3,"td",37)(14,Fe,5,8,"td",37),i()),t&2){let e=c.$implicit,r=c.rowData,n=m(2);p("ttRow",e),a(2),p("rowNode",e),a(),p("routerLink",T(21,xe))("queryParams",w(22,ye,r.ID)),a(),M(r.Name),a(2),p("matTooltip",V(r.OnHandIndirect&&r.OnHand?"Direct ("+s(7,13,r.OnHand)+") Indirect ("+s(8,15,r.OnHandIndirect)+")":r.OnHandIndirect?"Indirect ("+s(9,17,r.OnHandIndirect)+")":""))("routerLink",T(24,ve))("queryParams",w(25,ye,r.ID)),a(4),g("",s(11,19,r.DisplayedOnHand)," "),a(2),p("ngIf",n.roleService.product.Cost),a(),p("ngIf",n.roleService.product.Price),a(),p("ngIf",n.roleService.product.Cost&&n.roleService.product.Price)}}function Ee(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalCost)," ")}}function Me(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPrice)," ")}}function Ve(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"number"),i()),t&2){let e=m(3);a(),g(" ",D(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPercentage,"1.0-0"),"% ")}}function Oe(t,c){if(t&1&&(o(0,"tr",39)(1,"td",40),l(2,"Total:"),i(),o(3,"td",40),l(4),_(5,"quantityFraction"),i(),x(6,Ee,3,3,"td",41)(7,Me,3,3,"td",41)(8,Ve,3,4,"td",41),i()),t&2){let e=m(2);a(4),g(" ",s(5,4,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalOnHand)," "),a(2),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function Le(t,c){if(t&1){let e=I();o(0,"mainpanel-cmp",2),h("onSubmit",function(){u(e);let n=m();return y(n.searchFromPageOne())}),b("filterChange",function(n){u(e);let d=m();return S(d.pageData.Filter,n)||(d.pageData.Filter=n),y(n)}),o(1,"actions"),P(2,Se,3,0,"button",3),i(),o(3,"div",4),x(4,be,14,7,"ng-template",null,0,O),i(),o(6,"content")(7,"div",5)(8,"p-treeTable",6),x(9,he,10,3,"ng-template",7)(10,Pe,15,27,"ng-template",8)(11,Oe,9,6,"ng-template",9),i()()()()}if(t&2){let e=m();p("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),v("filter",e.pageData.Filter),a(2),E(e.roleService.global.Export?2:-1),a(6),p("value",e.data.data)("scrollable",!0)("scrollable",!0)("tableStyle",T(9,Ce))}}var fe=class t extends Y{constructor(e,r,n,d,Re,He){super(e,r,"Inventory/GetByCategory","InventoryLoader/GetByCategory");this.httpService=r;this.csvConverter=n;this.pageTitle=d;this.roleService=Re;this.dialog=He}openExportModal(){this.dialog.open($,{data:{title:"Inventory By Category",exportTypes:[{ID:"inventoryexport/GetExportInventoryByCategory",Value:"Default",FileName:"Inventory By Category"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}static \u0275fac=function(r){return new(r||t)(C(ne),C(z),C(ie),C(W),C(J),C(Z))};static \u0275cmp=B({type:t,selectors:[["app-inventory-by-category"]],features:[F],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter"],[1,"btn","btn-outline-secondary","me-3"],["filters",""],[1,"container-fluid","mt-3"],[3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["pTemplate","footer"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","multiple","accessType","ngModel"],[1,"d-flex","align-items-center"],["type","number","placeholder","From",1,"form-control",3,"ngModelChange","ngModel"],[1,"mx-3"],["type","number","placeholder","To",1,"form-control",3,"ngModelChange","ngModel"],[3,"modelChange","model","options"],[1,"custom-header"],["ttSortableColumn","Name",1,"text-uppercase"],["field","Name"],["ttSortableColumn","DisplayedOnHand",1,"text-uppercase"],["field","DisplayedOnHand"],["class","text-uppercase","ttSortableColumn","DisplayedCost",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPrice",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPercentage",4,"ngIf"],["ttSortableColumn","DisplayedCost",1,"text-uppercase"],["field","DisplayedCost"],["ttSortableColumn","DisplayedPrice",1,"text-uppercase"],["field","DisplayedPrice"],["ttSortableColumn","DisplayedPercentage",1,"text-uppercase"],["field","DisplayedPercentage"],[3,"ttRow"],[3,"rowNode"],["target","_blank",3,"routerLink","queryParams"],["matTooltipPosition","above",3,"routerLink","queryParams","matTooltip"],[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"],[1,"table-footer"],[1,"text-end"],["class","text-end",4,"ngIf"]],template:function(r,n){r&1&&x(0,Le,12,10,"mainpanel-cmp",1),r&2&&p("ngIf",n.data)},dependencies:[H,L,ae,oe,N,A,ue,ce,K,ge,de,_e,se,pe,me,le,re,G,k,q,Q,j,X,U,R,ee,te],styles:[".p-treetable-scrollable-header-box{padding-right:0!important} .p-treetable .p-treetable-thead>tr>th:not(:first-child){text-align:right!important} .p-treetable .p-treetable-tbody>tr>td:not(:first-child){text-align:right!important} .p-treetable-scrollable-footer-box{padding-right:0!important} .table-header-styles, .p-treetable-tfoot td, .p-treetable-thead th{background:#f6f6f6!important;color:#3b3b3b!important;text-transform:uppercase!important;font-weight:700!important;line-height:25px!important;font-size:12px!important;font-family:Roboto,sans-serif!important} .p-component.p-iconwrapper>svg{height:11px!important} .p-treetable .p-treetable-tbody>tr>td{border-bottom-width:1px;border-color:#dee2e6}"]})};export{fe as InventoryByCategoryComponent};
|
|
1
|
+
import{a as ce,b as de,c as _e,d as se,e as ge,f as ue}from"./chunk-EQ5MSD2S.js";import"./chunk-PHH2AA3W.js";import"./chunk-PCAJ3T4Y.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import{a as te}from"./chunk-363IDTE3.js";import{a as ee}from"./chunk-QZZ2NRA3.js";import"./chunk-FAED643P.js";import{e as me}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 re,e as le}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{c as pe}from"./chunk-ZVJGTPQY.js";import{b as $}from"./chunk-VXPORXGI.js";import{a as Y}from"./chunk-R66UUSM7.js";import"./chunk-IRGMPCNS.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as ie}from"./chunk-J6M7UWVR.js";import{e as oe,f as ae}from"./chunk-VL552ANV.js";import"./chunk-GJCPLFMU.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-4XR5RPFW.js";import{b as ne}from"./chunk-E7RGLETU.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as U,c as X}from"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Z}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as G,c as k,h as Q,o as j,q}from"./chunk-DWZ5JTI2.js";import"./chunk-GUN3GLFK.js";import"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-WMLA5VC3.js";import{s as z}from"./chunk-LGOSIAUC.js";import{Ab as E,Fb as p,Fc as _,Gb as o,Gc as s,Hb as i,Hc as D,Ib as f,Jd as W,Lc as O,Pb as I,Qd as A,Sb as h,Sd as N,Ub as m,Xa as a,eb as C,hc as l,ib as B,ic as M,jc as g,jd as L,mb as F,mc as v,nc as S,ob as x,oc as b,sc as V,sd as R,ta as u,ua as y,vd as H,xc as T,yb as P,yc as w}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ce=()=>({"min-width":"50rem","font-family":"Roboto, sans-serif"}),xe=()=>["/menu/Products/Catalog/Products"],ye=t=>({CategoryID:t}),ve=()=>["/menu/Inventory/Quantity/Valuation"];function Se(t,c){if(t&1){let e=I();o(0,"button",10),h("click",function(){u(e);let n=m(2);return y(n.openExportModal())}),f(1,"i",11),l(2," Export "),i()}}function be(t,c){if(t&1){let e=I();o(0,"div",12)(1,"h6"),l(2,"Outlet"),i(),o(3,"outlet-selector",13),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.ListIDs,n)||(d.pageData.Filter.ListIDs=n),y(n)}),i(),o(4,"h6"),l(5,"Quantity From - To"),i(),o(6,"div",14)(7,"input",15),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityFrom,n)||(d.pageData.Filter.QuantityFrom=n),y(n)}),i(),o(8,"span",16),l(9,"-"),i(),o(10,"input",17),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityTo,n)||(d.pageData.Filter.QuantityTo=n),y(n)}),i()(),o(11,"h6"),l(12,"Discontinued"),i(),o(13,"radio-options",18),b("modelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.Discontinued,n)||(d.pageData.Filter.Discontinued=n),y(n)}),i()()}if(t&2){let e=m(2);a(3),p("multiple",!0)("accessType",2),v("ngModel",e.pageData.Filter.ListIDs),a(4),v("ngModel",e.pageData.Filter.QuantityFrom),a(3),v("ngModel",e.pageData.Filter.QuantityTo),a(3),v("model",e.pageData.Filter.Discontinued),p("options",e.pageData.Options.Discontinued)}}function Ie(t,c){t&1&&(o(0,"th",27),l(1," Cost "),f(2,"p-treeTableSortIcon",28),i())}function Te(t,c){t&1&&(o(0,"th",29),l(1," Price "),f(2,"p-treeTableSortIcon",30),i())}function De(t,c){t&1&&(o(0,"th",31),l(1," % "),f(2,"p-treeTableSortIcon",32),i())}function he(t,c){if(t&1&&(o(0,"tr",19)(1,"th",20),l(2," Category "),f(3,"p-treeTableSortIcon",21),i(),o(4,"th",22),l(5," On Hand "),f(6,"p-treeTableSortIcon",23),i(),x(7,Ie,3,0,"th",24)(8,Te,3,0,"th",25)(9,De,3,0,"th",26),i()),t&2){let e=m(2);a(7),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function we(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedCost)," ")}}function Be(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedPrice)," ")}}function Fe(t,c){if(t&1&&(o(0,"td")(1,"span",38),_(2,"number"),l(3),_(4,"number"),i()()),t&2){let e=m().rowData;a(),p("matTooltip",D(2,2,e.DisplayedPercentage,"1.0-5")+"%"),a(2),g(" ",D(4,5,e.DisplayedPercentage,"1.0-0"),"% ")}}function Pe(t,c){if(t&1&&(o(0,"tr",33)(1,"td"),f(2,"p-treeTableToggler",34),o(3,"a",35),l(4),i()(),o(5,"td")(6,"a",36),_(7,"number"),_(8,"number"),_(9,"number"),l(10),_(11,"quantityFraction"),i()(),x(12,we,3,3,"td",37)(13,Be,3,3,"td",37)(14,Fe,5,8,"td",37),i()),t&2){let e=c.$implicit,r=c.rowData,n=m(2);p("ttRow",e),a(2),p("rowNode",e),a(),p("routerLink",T(21,xe))("queryParams",w(22,ye,r.ID)),a(),M(r.Name),a(2),p("matTooltip",V(r.OnHandIndirect&&r.OnHand?"Direct ("+s(7,13,r.OnHand)+") Indirect ("+s(8,15,r.OnHandIndirect)+")":r.OnHandIndirect?"Indirect ("+s(9,17,r.OnHandIndirect)+")":""))("routerLink",T(24,ve))("queryParams",w(25,ye,r.ID)),a(4),g("",s(11,19,r.DisplayedOnHand)," "),a(2),p("ngIf",n.roleService.product.Cost),a(),p("ngIf",n.roleService.product.Price),a(),p("ngIf",n.roleService.product.Cost&&n.roleService.product.Price)}}function Ee(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalCost)," ")}}function Me(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPrice)," ")}}function Ve(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"number"),i()),t&2){let e=m(3);a(),g(" ",D(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPercentage,"1.0-0"),"% ")}}function Oe(t,c){if(t&1&&(o(0,"tr",39)(1,"td",40),l(2,"Total:"),i(),o(3,"td",40),l(4),_(5,"quantityFraction"),i(),x(6,Ee,3,3,"td",41)(7,Me,3,3,"td",41)(8,Ve,3,4,"td",41),i()),t&2){let e=m(2);a(4),g(" ",s(5,4,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalOnHand)," "),a(2),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function Le(t,c){if(t&1){let e=I();o(0,"mainpanel-cmp",2),h("onSubmit",function(){u(e);let n=m();return y(n.searchFromPageOne())}),b("filterChange",function(n){u(e);let d=m();return S(d.pageData.Filter,n)||(d.pageData.Filter=n),y(n)}),o(1,"actions"),P(2,Se,3,0,"button",3),i(),o(3,"div",4),x(4,be,14,7,"ng-template",null,0,O),i(),o(6,"content")(7,"div",5)(8,"p-treeTable",6),x(9,he,10,3,"ng-template",7)(10,Pe,15,27,"ng-template",8)(11,Oe,9,6,"ng-template",9),i()()()()}if(t&2){let e=m();p("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),v("filter",e.pageData.Filter),a(2),E(e.roleService.global.Export?2:-1),a(6),p("value",e.data.data)("scrollable",!0)("scrollable",!0)("tableStyle",T(9,Ce))}}var fe=class t extends Y{constructor(e,r,n,d,Re,He){super(e,r,"Inventory/GetByCategory","InventoryLoader/GetByCategory");this.httpService=r;this.csvConverter=n;this.pageTitle=d;this.roleService=Re;this.dialog=He}openExportModal(){this.dialog.open($,{data:{title:"Inventory By Category",exportTypes:[{ID:"inventoryexport/GetExportInventoryByCategory",Value:"Default",FileName:"Inventory By Category"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}static \u0275fac=function(r){return new(r||t)(C(ne),C(z),C(ie),C(W),C(J),C(Z))};static \u0275cmp=B({type:t,selectors:[["app-inventory-by-category"]],features:[F],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter"],[1,"btn","btn-outline-secondary","me-3"],["filters",""],[1,"container-fluid","mt-3"],[3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["pTemplate","footer"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","multiple","accessType","ngModel"],[1,"d-flex","align-items-center"],["type","number","placeholder","From",1,"form-control",3,"ngModelChange","ngModel"],[1,"mx-3"],["type","number","placeholder","To",1,"form-control",3,"ngModelChange","ngModel"],[3,"modelChange","model","options"],[1,"custom-header"],["ttSortableColumn","Name",1,"text-uppercase"],["field","Name"],["ttSortableColumn","DisplayedOnHand",1,"text-uppercase"],["field","DisplayedOnHand"],["class","text-uppercase","ttSortableColumn","DisplayedCost",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPrice",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPercentage",4,"ngIf"],["ttSortableColumn","DisplayedCost",1,"text-uppercase"],["field","DisplayedCost"],["ttSortableColumn","DisplayedPrice",1,"text-uppercase"],["field","DisplayedPrice"],["ttSortableColumn","DisplayedPercentage",1,"text-uppercase"],["field","DisplayedPercentage"],[3,"ttRow"],[3,"rowNode"],["target","_blank",3,"routerLink","queryParams"],["matTooltipPosition","above",3,"routerLink","queryParams","matTooltip"],[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"],[1,"table-footer"],[1,"text-end"],["class","text-end",4,"ngIf"]],template:function(r,n){r&1&&x(0,Le,12,10,"mainpanel-cmp",1),r&2&&p("ngIf",n.data)},dependencies:[H,L,ae,oe,N,A,ue,ce,K,ge,de,_e,se,pe,me,le,re,G,k,q,Q,j,X,U,R,ee,te],styles:[".p-treetable-scrollable-header-box{padding-right:0!important} .p-treetable .p-treetable-thead>tr>th:not(:first-child){text-align:right!important} .p-treetable .p-treetable-tbody>tr>td:not(:first-child){text-align:right!important} .p-treetable-scrollable-footer-box{padding-right:0!important} .table-header-styles, .p-treetable-tfoot td, .p-treetable-thead th{background:#f6f6f6!important;color:#3b3b3b!important;text-transform:uppercase!important;font-weight:700!important;line-height:25px!important;font-size:12px!important;font-family:Roboto,sans-serif!important} .p-component.p-iconwrapper>svg{height:11px!important} .p-treetable .p-treetable-tbody>tr>td{border-bottom-width:1px;border-color:#dee2e6}"]})};export{fe as InventoryByCategoryComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
1
|
+
import{a as g}from"./chunk-R66UUSM7.js";import{Ca as l,Pc as h,e as c}from"./chunk-IEVGW2RT.js";var p=class extends g{constructor(t,e,s,i,n,a,o,r){super(t,e,s,i,n,a,o);this.httpService=e;this.toastrService=n;this.route=a;this.cdr=r;r&&h(()=>{this.infiniteListSignal(),this.cdr.markForCheck()})}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal=0;_infiniteList$=new c([]);infiniteListSignal=l([]);get infiniteList(){return this._infiniteList$.value}set infiniteList(t){this._infiniteList$.next(t),this.infiniteListSignal.set(t)}originalData=[];StoreRowsCountAPIResult(t,e=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(s=>{this.listTotal=s.Count,this.pageData.HideStoreApiCount=!0,e&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData()),this.cdr&&this.cdr.markForCheck()})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let e=Array.isArray(t.Data?.hits),s=Array.isArray(t.Data?.[0]?.Variants),i=[...this.infiniteList];if(this.extendData){let a=i.at(-1),o=t.Data.find(r=>r.ID===a?.ID);if(s&&a)if(o){let r=t.Data.filter(u=>u.ID!==a?.ID);a.Variants=a.Variants.concat(o.Variants||[]),i=i.concat(r)}else i=i.concat(t.Data);else i=i.concat(e?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else i=e?t.Data.hits:t.Data,this.assignAggregate(t);this.infiniteList=i,this.originalData=[...i];let n=e?t.Data.hits.length:t.Data.length;this.nextPageDisabled=n<this.pageData.Filter.RowCount,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t),this.cdr?.markForCheck?.()}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Qe}from"./chunk-IFIH2CE2.js";import{a as Ae,f as Le}from"./chunk-2ITJBRJU.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-BYTV42NJ.js";import"./chunk-DC3TCY6D.js";import{c as Ge}from"./chunk-2VE2WNSA.js";import"./chunk-4OEDK7YE.js";import"./chunk-GWKBJZYT.js";import{e as Ne}from"./chunk-B5IABJO5.js";import"./chunk-PHH2AA3W.js";import"./chunk-Y7KCHRMM.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import"./chunk-FAED643P.js";import{b as be}from"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-M3DKYPGC.js";import"./chunk-VM4K4MNV.js";import{d as he}from"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-BFNGPKGX.js";import"./chunk-G3DZI5XK.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import{c as Oe,d as De}from"./chunk-OZ3MKU4C.js";import{a as ve,b as Pe}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as Me,v as Te,w as Ee}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as q}from"./chunk-TEGIL5RZ.js";import{e as we,f as Ie,g as ye}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-SLX34TWD.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-EAEOJMTA.js";import{s as Ce}from"./chunk-LGOSIAUC.js";import{Ab as x,Ac as ae,Bb as te,Ca as k,Db as ie,E as Y,Eb as ne,Fb as c,Fc as g,Gb as n,Gc as C,Hb as o,Hc as me,I as J,Ib as b,Mb as T,Nb as E,Pb as S,Sa as Z,Sb as f,Sc as H,Tc as A,Ub as s,Vb as oe,Wb as Q,Xa as a,Y as z,Yb as U,Zb as V,_b as F,aa as X,cc as N,eb as G,ec as re,fa as $,gd as se,hc as l,ib as I,ic as d,jc as v,k as K,mb as ee,mc as P,nc as O,ob as y,oc as D,od as de,pa as M,sd as ce,ta as u,ua as _,vd as L,xc as le,yb as h,yc as pe}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};
|
|
1
|
+
import{a as Qe}from"./chunk-IFIH2CE2.js";import{a as Ae,f as Le}from"./chunk-ABAK5BOR.js";import{b as Re,c as Be,d as We,e as je,f as ze,g as $e}from"./chunk-BYTV42NJ.js";import"./chunk-DC3TCY6D.js";import{c as Ge}from"./chunk-2VE2WNSA.js";import"./chunk-4OEDK7YE.js";import"./chunk-GWKBJZYT.js";import{e as Ne}from"./chunk-B5IABJO5.js";import"./chunk-PHH2AA3W.js";import"./chunk-PCAJ3T4Y.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import"./chunk-FAED643P.js";import{b as be}from"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-M3DKYPGC.js";import"./chunk-VM4K4MNV.js";import{d as he}from"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{b as ke,c as Ue,e as Ve,f as Fe}from"./chunk-VL552ANV.js";import"./chunk-GJCPLFMU.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import{c as Oe,d as De}from"./chunk-4XR5RPFW.js";import{a as ve,b as Pe}from"./chunk-E7RGLETU.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{u as Me,v as Te,w as Ee}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as q}from"./chunk-TEGIL5RZ.js";import{e as we,f as Ie,g as ye}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as Se}from"./chunk-SLX34TWD.js";import{F as R,G as ge,h as _e,o as fe}from"./chunk-DWZ5JTI2.js";import"./chunk-GUN3GLFK.js";import"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-WMLA5VC3.js";import{s as Ce}from"./chunk-LGOSIAUC.js";import{Ab as x,Ac as ae,Bb as te,Ca as k,Db as ie,E as Y,Eb as ne,Fb as c,Fc as g,Gb as n,Gc as C,Hb as o,Hc as me,I as J,Ib as b,Mb as T,Nb as E,Pb as S,Sa as Z,Sb as f,Sc as H,Tc as A,Ub as s,Vb as oe,Wb as Q,Xa as a,Y as z,Yb as U,Zb as V,_b as F,aa as X,cc as N,eb as G,ec as re,fa as $,gd as se,hc as l,ib as I,ic as d,jc as v,k as K,mb as ee,mc as P,nc as O,ob as y,oc as D,od as de,pa as M,sd as ce,ta as u,ua as _,vd as L,xc as le,yb as h,yc as pe}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Je=["stepperRef"],Xe=[[["preview"]],[["complete"]]],Ze=["preview","complete"];function et(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function it(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function nt(t,r){t&1&&(b(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function ot(t,r){if(t&1){let e=S();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=s(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=s(2);a(2),c("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),c("href",e.articleLink(),Z)}}function rt(t,r){if(t&1&&h(0,ot,9,3,"div",9),t&2){s();let e=N(1);x(e.selectedIndex===0?0:-1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function at(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function mt(t,r){t&1&&(b(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function st(t,r){t&1&&Q(0)}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function ut(t,r){if(t&1&&l(0),t&2){let e=r.index;d(e+1)}}function _t(t,r){t&1&&(b(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function ft(t,r){t&1&&Q(0,1)}var B=class t{sampleUrl=A();articleLink=A();_onDropFile=H({alias:"onDropFile"});disabledEdit=A(!1);_onStateChange=H({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&U(Je,5),e&2){let i;V(i=F())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Ze,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=S();oe(Xe),n(0,"mat-stepper",1,0),f("selectionChange",function(w){return u(i),_(p.onStepChange(w))}),n(2,"mat-step",2),y(3,et,1,1,"ng-template",3)(4,tt,1,1,"ng-template",4)(5,it,1,1,"ng-template",5)(6,nt,3,0,"ng-template",6)(7,rt,1,1,"ng-template",7),o(),n(8,"mat-step",2),y(9,lt,1,1,"ng-template",3)(10,pt,1,1,"ng-template",4)(11,at,1,1,"ng-template",5)(12,mt,3,0,"ng-template",6)(13,st,1,0,"ng-template",7),o(),n(14,"mat-step",2),y(15,dt,1,1,"ng-template",3)(16,ct,1,1,"ng-template",4)(17,ut,1,1,"ng-template",5)(18,_t,3,0,"ng-template",6)(19,ft,1,0,"ng-template",7),o()()}e&2&&(c("linear",!0),a(2),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!p.disabledEdit()),a(6),c("completed",!1)("editable",!1))},dependencies:[he,R,ge,xe,be,Ge,Ne,$e,je,Re,ze,Be,We],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var W=class t{configModal=new Me;dialogRef=M(we);data=M(Ie);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),b(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(c("config",p.configModal),a(12),d(C(13,4,p.data==null?null:p.data.new)),a(7),d(C(20,6,p.data==null?null:p.data.update)),a(7),d(C(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[L,Ee,Te,ce],encapsulation:2})};var Ct=["importStepper"],St=()=>({"min-width":"50rem"}),ht=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),xt=t=>({"mb-1":t});function bt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onPreviousStep())}),l(1," Back "),o()}}function vt(t,r){if(t&1){let e=S();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=s();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=s();c("ngClass",ae(6,ht,i.currentState()===1,i.currentState()!==1,!((e=C(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=C(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=S();n(0,"button",14),f("click",function(){u(e);let i=s();return _(i.onReset())}),l(1," New "),o()}}function It(t,r){if(t&1){let e=S();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=s();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=s();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=s();a(12),c("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function yt(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=s().$implicit;c("ngClass",pe(3,xt,p<i.Issues.length-1)),a(2),v(" ",e.Issue,". "),a(2),v("",e.Solution," ")}}function Mt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,yt,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),d(e.Name),a(2),d(e.Code),a(),re("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),v(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(n(0,"div",37)(1,"span"),l(2),o(),l(3,", "),n(4,"span"),l(5),o(),n(6,"span"),l(7),o(),n(8,"span"),l(9,"succesfully imported"),o()()),t&2){let e=r;a(2),v("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),v("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),v("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Et(t,r){if(t&1&&(n(0,"div",13),b(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),h(4,Tt,10,3,"div",37),g(5,"async"),o()),t&2){let e,p=s();a(4),x((e=C(5,1,p.importPreview$))?4:-1,e)}}var Ke=class t extends ve{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=k(null);importPreview$;sampleImportFileUrl=ue.files.csv.outlet_import;articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=k(0);confirmImport$;importPreview=k(null);dialog=M(ye);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(q.previewImportOutlet,e).pipe($(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),z(1))}onImport(){this.confirmImport$=this.dialog.open(W,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(Y(e=>e==!0),X(()=>this.httpService.post(q.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),$(e=>{this.importStepper.nextStep()}),J(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],K)),z(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Pe),G(Ce))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&U(Ct,5),p&2){let m;V(m=F())&&(i.importStepper=m.first)}},features:[ee],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=S();n(0,"mainpanel-cmp",2),T(1,3),h(2,bt,2,0,"button",4),h(3,vt,4,10,"button",5),h(4,wt,2,0,"button",4),E(),T(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(j){return u(m),_(i.onDropFile(j))})("onStateChange",function(j){return u(m),_(i.onStateChange(j))}),T(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),y(12,It,33,5,"ng-template",10)(13,Mt,10,9,"ng-template",11),o(),E(),T(14,12),h(15,Et,6,3,"div",13),g(16,"async"),E(),o(),E(),o()}if(p&2){let m,w;c("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),x(i.currentState()==1?2:-1),a(),x(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),x(i.currentState()===2?4:-1),a(2),c("sampleUrl",i.sampleImportFileUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),c("value",me(11,15,(w=C(10,13,i.importPreview$))==null?null:w.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",le(20,St)),a(6),x(C(16,18,i.confirmImport$)?15:-1)}},dependencies:[L,se,B,Fe,Ve,Le,Ae,Se,De,Oe,R,_e,fe,Ue,ke,de,Qe],encapsulation:2})};export{Ke as OutletImportComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-QO5SWGKB.js";import"./chunk-3CI72KQ3.js";import"./chunk-AQW4VS3Y.js";import"./chunk-4W3WYXI2.js";import"./chunk-TFJ6RC7Q.js";import"./chunk-ZVJGTPQY.js";import"./chunk-VXPORXGI.js";import"./chunk-R66UUSM7.js";import"./chunk-IRGMPCNS.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import"./chunk-J6M7UWVR.js";import"./chunk-VL552ANV.js";import"./chunk-GJCPLFMU.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-4XR5RPFW.js";import"./chunk-E7RGLETU.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-GUN3GLFK.js";import"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-WMLA5VC3.js";import"./chunk-LGOSIAUC.js";import"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";export{a as CompositeInventoryComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Z}from"./chunk-
|
|
1
|
+
import{c as Z}from"./chunk-GUN3GLFK.js";import"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import{a as D}from"./chunk-WUV22SZ4.js";import"./chunk-WMLA5VC3.js";import{s as j}from"./chunk-LGOSIAUC.js";import{$ as _,Ab as u,Fc as k,Gc as A,Jb as o,Kb as e,Lb as f,N as b,Pb as w,Pd as G,Qb as M,Tb as S,Ub as x,Xa as l,Y as p,Za as O,aa as m,c as s,eb as c,fa as C,fc as L,hc as a,ib as P,ic as h,n as v,od as I,ta as E,ua as y,vd as R,yb as g}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function N(r,n){r&1&&(o(0,"div",13)(1,"span",20),a(2,"Latitude and Longitude is empty, please allow your browser location permission!"),e(),o(3,"a",21),a(4,"Click here to learn how to manually activate the location permission"),e()())}function T(r,n){if(r&1){let t=w();o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),a(4,"Geo Fencing"),e(),o(5,"p",4),a(6,"You are about to sign-in from this location"),e(),o(7,"div",5)(8,"div",6)(9,"div",7)(10,"span",8),a(11,"LAT"),e(),o(12,"span",9),a(13),e()(),o(14,"div",7)(15,"span",10),a(16,"LONG"),e(),o(17,"span",11),a(18),e()()(),o(19,"button",12),S("click",function(){E(t);let d=x();return y(d.proceed())}),a(20,"Proceed"),e()(),g(21,N,5,0,"div",13),e(),o(22,"div",14),f(23,"img",15),e()(),o(24,"div",16)(25,"div",17)(26,"div")(27,"span"),a(28,"powered by :"),e(),f(29,"a",18)(30,"img",19),e()()()()}if(r&2){let t=n,i=x();l(2),L(t.latitude&&t.longitude?i.centerGeoPanelStyle:""),l(11),h(t.latitude),l(5),h(t.longitude),l(),M("disabled",!(t.latitude&&t.longitude)),l(2),u(t.latitude&&t.longitude?-1:21)}}var z=class r{constructor(n,t,i,d){this.ngZone=n;this.auth=t;this.http=i;this.router=d}centerGeoPanelStyle="display: flex; flex-direction: column; justify-content: center;";latLong$;ngOnInit(){this.checkOnRefreshPage(),document.body.classList.add("login-body");let n=v(navigator.permissions.query({name:"geolocation"})).pipe(m(t=>new s(i=>{i.next(t.state),t.onchange=()=>this.ngZone.run(()=>i.next(t.state))})),p(1));this.latLong$=n.pipe(m(()=>new s(t=>{navigator.geolocation.getCurrentPosition(i=>this.ngZone.run(()=>{t.next({latitude:i.coords.latitude.toString(),longitude:i.coords.longitude.toString()}),t.complete()}),()=>this.ngZone.run(()=>{t.next({latitude:"",longitude:""}),t.complete()}),{enableHighAccuracy:!0,maximumAge:0,timeout:8e3})})),_({latitude:"",longitude:""}),p(1))}ngOnDestroy(){document.body.classList.remove("login-body")}checkOnRefreshPage(){D.IsEmpty(this.auth.loginResponse)&&this.router.navigate(["/"])}proceed(){this.latLong$.pipe(m(n=>this.http.post("/api/Authentication/LoginGeoRestriction",{UserID:this.auth.loginResponse.UserID,Latitude:n.latitude,Longitude:n.longitude})),C(n=>this.auth.saveLoginConfigToStorage(n)),m(()=>this.router.navigate([this.auth.getRedirectUrl()])),b(1)).subscribe()}static \u0275fac=function(t){return new(t||r)(c(O),c(Z),c(j),c(G))};static \u0275cmp=P({type:r,selectors:[["POS-auth-geolocation"]],decls:2,vars:3,consts:[[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-last","form-pane"],[1,"text-start"],[1,"text-start","mb-7"],[1,"d-flex","flex-column","flex-md-row",2,"column-gap","10px"],[1,"latlong-container","d-flex","flex-grow-1"],[1,"flex-grow-1","text-start","d-flex"],[1,"lat-label","fw-bold"],[1,"ps-5","lat-value","flex-grow-1","d-flex","align-items-center"],[1,"long-label","fw-bold"],[1,"ps-5","long-value","flex-grow-1","d-flex","align-items-center"],[1,"btn","btn-success","mt-5","mx-auto","mx-md-0","mt-md-0","w-25","w-md-100",3,"click","disabled"],[1,"text-start","mt-7"],[1,"col-md-5","order-md-last","order-first","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane","py-6"],["src","https://cdn.dealpos.xyz/web-image/geolocation-map.png",1,"border-0","w-100"],[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"],[1,"text-danger"],["href","https://support.dealpos.com/en/articles/7963864-enable-location-services-for-several-browser","target","_blank",1,"d-block"]],template:function(t,i){if(t&1&&(g(0,T,31,6,"div",0),k(1,"async")),t&2){let d;u((d=A(1,1,i.latLong$))?0:-1,d)}},dependencies:[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:2rem}@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}.latlong-container[_ngcontent-%COMP%]{background:#fff;border:1px solid #000000;border-radius:5px}.latlong-container[_ngcontent-%COMP%] .lat-label[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{display:inline-block;padding:12px;border-right:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{border-left:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .lat-value[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-value[_ngcontent-%COMP%]{background:#d9d9d94d}"]})};export{z as AuthGeolocationComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Mt,d as kt}from"./chunk-S7FOJJP2.js";import{c as Et,j as It,k as F,l as St}from"./chunk-FU2ZGMX4.js";import{a as P}from"./chunk-2FWFPV5I.js";import{oa as Tt,pa as k,xa as Ot}from"./chunk-SLX34TWD.js";import{F as bt,G as vt,a as ft,c as _t,h as ht,i as wt,k as Ct,o as xt,p as yt}from"./chunk-DWZ5JTI2.js";import{a as mt}from"./chunk-
|
|
1
|
+
import{a as Mt,d as kt}from"./chunk-S7FOJJP2.js";import{c as Et,j as It,k as F,l as St}from"./chunk-FU2ZGMX4.js";import{a as P}from"./chunk-2FWFPV5I.js";import{oa as Tt,pa as k,xa as Ot}from"./chunk-SLX34TWD.js";import{F as bt,G as vt,a as ft,c as _t,h as ht,i as wt,k as Ct,o as xt,p as yt}from"./chunk-DWZ5JTI2.js";import{a as mt}from"./chunk-WMLA5VC3.js";import{p as gt,s as Pt}from"./chunk-LGOSIAUC.js";import{$c as L,Ab as _,Ac as it,Fb as m,Gb as o,Hb as s,Ia as A,Ib as M,Mb as I,Nb as S,Ob as Z,Oc as ot,Pb as h,Pc as rt,Pd as ct,Sb as g,Tc as j,Ub as r,Uc as at,Xa as l,Xb as N,Ya as T,Zb as D,_b as B,ac as J,bc as X,eb as Q,gc as x,gd as st,hc as c,ib as O,ic as tt,id as pt,jb as K,jc as et,jd as lt,ka as W,la as z,ma as U,mb as Y,mc as y,na as q,nb as $,nc as b,nd as dt,ob as E,oc as v,pa as w,ta as d,tc as H,ua as u,vd as ut,wb as G,wc as nt,yb as f,zc as R}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ft=`
|
|
2
2
|
.p-inputotp {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as L}from"./chunk-R2GUMKAU.js";import{c as ve,j as Se,k as C,l as _e}from"./chunk-FU2ZGMX4.js";import{X as xe,Y as ge,oa as Ce,pa as F,xa as ye}from"./chunk-SLX34TWD.js";import{a as me,g as ke}from"./chunk-DWZ5JTI2.js";import{a as be,c as fe}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-R2GUMKAU.js";import{c as ve,j as Se,k as C,l as _e}from"./chunk-FU2ZGMX4.js";import{X as xe,Y as ge,oa as Ce,pa as F,xa as ye}from"./chunk-SLX34TWD.js";import{a as me,g as ke}from"./chunk-DWZ5JTI2.js";import{a as be,c as fe}from"./chunk-GUN3GLFK.js";import{a as H}from"./chunk-WUV22SZ4.js";import{$c as g,Ab as J,Ca as Y,Fb as c,Gb as m,Hb as k,Ia as h,Ib as M,Lb as E,Mb as A,Nb as O,Oc as ae,Pb as W,Pd as ue,Qd as pe,Sb as ee,Sd as he,Tc as j,Ub as u,Xa as a,Xb as R,Ya as _,Yb as te,Zb as B,_b as w,ad as se,eb as I,fc as ne,gc as l,gd as D,hc as T,ib as d,jb as K,jc as ie,jd as le,ka as P,la as $,ma as q,mb as b,na as G,nb as X,nd as de,ob as x,pa as y,ta as v,ua as S,va as p,vd as N,wb as z,wc as oe,xc as ce,ya as U,yb as Z,yc as V,zc as re}from"./chunk-IEVGW2RT.js";var Ne=e=>({"pe-none":e}),Fe=()=>["/menu/Profile/Main/My_Subscription"],Le=e=>({"text-decoration-none":e}),ze=e=>({"text-capitalize":e});function Ae(e,o){if(e&1&&(m(0,"div",1)(1,"h5",2),T(2),m(3,"a",3)(4,"u",4)(5,"span",4),T(6,"please"),k(),T(7," process your payment! "),k()()()()),e&2){let t=u();l("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),a(2),ie(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),a(),c("ngClass",V(7,Ne,t.isMySubscriptionMenu))("routerLink",ce(9,Fe)),a(),c("ngClass",V(10,Le,t.isMySubscriptionMenu)),a(),c("ngClass",V(12,ze,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var Ie=class e{constructor(o,t,i){this.document=o;this.router=t;this.authService=i}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=be;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(o){return H.IsNotEmpty(o)}overrideCssStickyHeader(){if(H.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let o=`.sticky-top-thead th {
|
|
2
2
|
top: 100px !important;
|
|
3
3
|
z-index: 1020;
|
|
4
4
|
}`;this.htmlBodyElement=this.document.getElementsByTagName("body")[0],this.htmlStyleElement=this.document.createElement("style"),this.htmlStyleElement.appendChild(this.document.createTextNode(o)),this.htmlBodyElement.appendChild(this.htmlStyleElement)}}initSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus(),this.subscriptionStatus=[{status:1,class:"alert-warning",message:"Your subscription is overdue. To avoid suspension, "},{status:2,class:"alert-danger",message:"Your subscription is partially suspended."},{status:3,class:"alert-danger",message:"Your subscription is suspended."}],this.subscriptionState=this.subscriptionStatus.filter(o=>o.status==this.currentSubStatus)[0]}ngOnDestroy(){this.htmlBodyElement&&this.htmlBodyElement.removeChild(this.htmlStyleElement)}static \u0275fac=function(t){return new(t||e)(I(U),I(ue),I(fe))};static \u0275cmp=d({type:e,selectors:[["subscription-alert"]],decls:1,vars:1,consts:[["role","alert",3,"class"],["role","alert"],[1,"fw-normal"],[1,"alert-link",3,"ngClass","routerLink"],[3,"ngClass"]],template:function(t,i){t&1&&Z(0,Ae,8,14,"div",0),t&2&&J((i.subscriptionState==null?null:i.subscriptionState.status)==i.currentSubStatus&&i.isNotEmpty(i.currentSubStatus)?0:-1)},dependencies:[N,D,he,pe],encapsulation:2})};var Oe=["data-p-icon","check"],Me=(()=>{class e extends L{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=d({type:e,selectors:[["","data-p-icon","check"]],features:[b],attrs:Oe,decls:1,vars:0,consts:[["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(i,n){i&1&&(p(),E(0,"path",0))},encapsulation:2})}return e})();var Re=["data-p-icon","minus"],Ee=(()=>{class e extends L{static \u0275fac=(()=>{let t;return function(n){return(t||(t=h(e)))(n||e)}})();static \u0275cmp=d({type:e,selectors:[["","data-p-icon","minus"]],features:[b],attrs:Re,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(i,n){i&1&&(p(),E(0,"path",0))},encapsulation:2})}return e})();var Be=`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ce}from"./chunk-VVYRPW2Y.js";import{a as ge}from"./chunk-JXXYVM7W.js";import"./chunk-ZMJLTU5O.js";import"./chunk-BYXBJQAS.js";import{a as te}from"./chunk-QZZ2NRA3.js";import{d as ue,e as _e}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 pe,e as me}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as se,b as ce}from"./chunk-4W3WYXI2.js";import{c as de}from"./chunk-
|
|
1
|
+
import{a as Ce}from"./chunk-VVYRPW2Y.js";import{a as ge}from"./chunk-JXXYVM7W.js";import"./chunk-ZMJLTU5O.js";import"./chunk-BYXBJQAS.js";import{a as te}from"./chunk-QZZ2NRA3.js";import{d as ue,e as _e}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 pe,e as me}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as se,b as ce}from"./chunk-4W3WYXI2.js";import{c as de}from"./chunk-ZVJGTPQY.js";import{b as ee}from"./chunk-VXPORXGI.js";import{a as Z}from"./chunk-R66UUSM7.js";import"./chunk-IRGMPCNS.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as ae,f as le}from"./chunk-VL552ANV.js";import"./chunk-GJCPLFMU.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.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-4XR5RPFW.js";import{b as ie}from"./chunk-E7RGLETU.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{F as oe,G as re}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{O as ne}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as $}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 Q,c as z,h as K,o as J}from"./chunk-DWZ5JTI2.js";import"./chunk-GUN3GLFK.js";import"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import{b as Y}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-WMLA5VC3.js";import{s as X}from"./chunk-LGOSIAUC.js";import{Ab as g,Bb as b,Ca as H,Db as O,Eb as L,Fb as u,Fc as f,Gb as t,Gc as I,Hb as i,Hc as w,Ib as N,Lc as U,Pb as P,Qd as q,Sb as h,Sd as G,Ub as d,Xa as a,eb as M,gc as k,hc as l,ib as T,ic as S,jc as D,jd as B,mb as V,mc as C,nc as x,ob as E,oc as y,pa as F,qd as R,sd as A,ta as s,ua as c,vd as j,xc as W,yb as _,yc as v}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var xe=o=>({ID:o}),fe=()=>["/menu/Contacts/Contact/Customers/Info"],Pe=o=>({"text-danger":o});function Se(o,m){if(o&1){let e=P();t(0,"button",15),h("click",function(){s(e);let n=d();return c(n.openExportModal())}),N(1,"i",16),l(2," Export "),i()}}function De(o,m){if(o&1){let e=P();t(0,"h6"),l(1,"User"),i(),t(2,"autocompleteV2",27),y("ngModelChange",function(n){s(e);let p=d(2);return x(p.pageData.Filter.UserID,n)||(p.pageData.Filter.UserID=n),c(n)}),i()}if(o&2){let e=d(2);a(2),C("ngModel",e.pageData.Filter.UserID)}}function he(o,m){if(o&1){let e=P();t(0,"div",17)(1,"h6"),l(2,"Outlets"),i(),t(3,"outlet-selector",18),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.ListOutletID,n)||(p.pageData.Filter.ListOutletID=n),c(n)}),i(),t(4,"h6"),l(5,"Customer"),i(),t(6,"autocompleteV2",19),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.CustomerID,n)||(p.pageData.Filter.CustomerID=n),c(n)}),i(),t(7,"h6"),l(8,"From - To"),i(),t(9,"div",20)(10,"div",21)(11,"datepicker",22),y("dateChange",function(n){s(e);let p=d();return x(p.pageData.Filter.From,n)||(p.pageData.Filter.From=n),c(n)}),i()(),t(12,"div",23)(13,"datepicker",24),y("dateChange",function(n){s(e);let p=d();return x(p.pageData.Filter.To,n)||(p.pageData.Filter.To=n),c(n)}),i()()(),t(14,"h6"),l(15,"Printed"),i(),t(16,"radio-options",25),y("modelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.Printed,n)||(p.pageData.Filter.Printed=n),c(n)}),i(),_(17,De,3,1),t(18,"h6"),l(19,"Page Size"),i(),t(20,"div")(21,"input",26),y("ngModelChange",function(n){s(e);let p=d();return x(p.pageData.Filter.RowCount,n)||(p.pageData.Filter.RowCount=n),c(n)}),i()()()}if(o&2){let e=d();a(3),C("ngModel",e.pageData.Filter.ListOutletID),u("multiple",!0),a(3),C("ngModel",e.pageData.Filter.CustomerID),a(5),u("isFloatingLabel",!1),C("date",e.pageData.Filter.From),a(2),u("isFloatingLabel",!1),C("date",e.pageData.Filter.To),a(3),C("model",e.pageData.Filter.Printed),u("options",e.pageData.Options.PrintedOptions),a(),g(e.pageData.Filter.Printed!==0?17:-1),a(4),C("ngModel",e.pageData.Filter.RowCount)}}function we(o,m){o&1&&(t(0,"th",10),l(1,"Print By"),i())}function ve(o,m){o&1&&(t(0,"th",8),l(1,"Print Date"),i())}function Fe(o,m){o&1&&(t(0,"th",11),l(1,"Time"),i())}function Me(o,m){if(o&1&&(t(0,"td"),l(1),i()),o&2){let e=d().$implicit;a(),S(e.CreatorName)}}function Ee(o,m){if(o&1&&(t(0,"td"),l(1),f(2,"date"),i()),o&2){let e=d().$implicit;a(),D(" ",e.Created==="0001-01-01T00:00:00"?"":w(2,1,e.Created,"dd MMM yyyy")," ")}}function Ie(o,m){if(o&1&&(t(0,"td"),l(1),f(2,"date"),i()),o&2){let e=d().$implicit;a(),D(" ",e.Created==="0001-01-01T00:00:00"?"":w(2,1,e.Created,"HH:mm")," ")}}function He(o,m){if(o&1&&(t(0,"td",32),l(1),f(2,"amountFraction"),i()),o&2){let e=d().$implicit;k(v(5,Pe,e.InvoiceAmount<0)),a(),D(" ",I(2,3,e.InvoiceAmount)," ")}}function Te(o,m){if(o&1){let e=P();t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"a",28),l(5),i()(),t(6,"td")(7,"a",29),l(8),i()(),t(9,"td"),l(10),f(11,"date"),i(),t(12,"td"),l(13),f(14,"date"),i(),_(15,Me,2,1,"td"),_(16,Ee,3,4,"td"),_(17,Ie,3,4,"td"),E(18,He,3,7,"td",30),t(19,"td",31),h("click",function(){let n=s(e).$implicit,p=d();return c(p.onInvoiceCountClick(n))}),l(20),f(21,"number"),i()()}if(o&2){let e=m.$implicit,r=d();a(2),S(e.EntityName),a(2),u("queryParams",v(21,xe,e.InvoiceID)),a(),S(e.Number),a(2),u("routerLink",W(23,fe))("queryParams",v(24,xe,e.CustomerID)),a(),D(" ",e.CustomerName," "),a(2),S(w(11,13,e.InvoiceDate,"dd MMM yyyy")),a(3),S(w(14,16,e.InvoiceDueDate,"dd MMM")),a(2),g(r.isNotUnprintedOnly()?15:-1),a(),g(r.isNotUnprintedOnly()?16:-1),a(),g(r.isNotUnprintedOnly()?17:-1),a(),u("ngIf",r.roleService.sell.PriceVisible),a(2),D(" ",I(21,19,e.Count)," ")}}var ye=class o extends Z{roleService=F(Y);dialog=F($);isNotUnprintedOnly=H(!0);constructor(m,e){super(m,e,"invoice/GetPrintHistoryList","invoiceLoader/GetPrintHistoryList")}openExportModal(){this.pageData.Filter.Export=!0,this.dialog.open(ee,{data:{title:"Print History",exportTypes:[{ID:"invoice/GetPrintHistoryList",Value:"Default",FileName:"Print History"}],filterExport:this.pageData.Filter,pagination:!0}}).afterClosed().subscribe(()=>{this.pageData.Filter.Export=!1})}onSubmit(){let m=this.pageData.Filter.Printed!==0;this.isNotUnprintedOnly.set(m),this.getListData()}onInvoiceCountClick(m){let e=`${ne.InvoicePrintHistory}/${m.InvoiceID}`;this.httpService.get(e).subscribe(r=>{this.dialog.open(Ce,{data:r?.Data})})}static \u0275fac=function(e){return new(e||o)(M(ie),M(X))};static \u0275cmp=T({type:o,selectors:[["app-print-history"]],features:[V],decls:32,vars:10,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-5"],["matSort","",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","130px"],[2,"width","150px"],[2,"width","100px"],[2,"width","90px"],[2,"width","80px"],[2,"width","30px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","30px"],[3,"jumpToPage","previousPage","nextPage","total","totalAllData","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[3,"ngModelChange","ngModel","multiple"],["name","Key","requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Search Customer",1,"w-100","ac-filter",3,"ngModelChange","ngModel"],[1,"row"],[1,"col-6","pe-2"],["placeholder","From","appearance","outline",3,"dateChange","isFloatingLabel","date"],[1,"col-6","ps-2"],["placeholder","To","appearance","outline",3,"dateChange","isFloatingLabel","date"],[3,"modelChange","model","options"],["type","text","placeholder","Page Size","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["requestUrl","/API/AC/GetUserSuggestion",1,"w-100","ac-filter",3,"ngModelChange","ngModel"],["routerLink","/menu/Orders/Orders/Customer_Invoice/Info",1,"link-primary","cursor-pointer",3,"queryParams"],[1,"link-primary","cursor-pointer",3,"routerLink","queryParams"],["class","text-end",3,"class",4,"ngIf"],[1,"cursor-pointer","text-end","link-primary",3,"click"],[1,"text-end"]],template:function(e,r){if(e&1){let n=P();t(0,"mainpanel-cmp",1),h("onSubmit",function(){return s(n),c(r.onSubmit())}),t(1,"actions"),_(2,Se,3,0,"button",2),i(),t(3,"filters"),E(4,he,22,11,"ng-template",null,0,U),i(),t(6,"content")(7,"div",3)(8,"table",4)(9,"thead",5)(10,"tr")(11,"th",6),l(12,"Outlet"),i(),t(13,"th",7),l(14,"Number"),i(),t(15,"th"),l(16,"Customer"),i(),t(17,"th",8),l(18,"Date"),i(),t(19,"th",9),l(20,"Due"),i(),_(21,we,2,0,"th",10),_(22,ve,2,0,"th",8),_(23,Fe,2,0,"th",11),t(24,"th",12),l(25,"Amount"),i(),t(26,"th",13),l(27,"Count"),i()()(),t(28,"tbody"),O(29,Te,22,26,"tr",null,b),i()(),t(31,"POS-complex-pagination",14),h("jumpToPage",function(){return s(n),c(r.getListData())})("previousPage",function(){return s(n),c(r.getListData())})("nextPage",function(){return s(n),c(r.getListData())}),i()()()()}e&2&&(u("pageData",r.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),a(2),g(r.roleService.global.Export?2:-1),a(19),g(r.isNotUnprintedOnly()?21:-1),a(),g(r.isNotUnprintedOnly()?22:-1),a(),g(r.isNotUnprintedOnly()?23:-1),a(6),L(r.data==null?null:r.data.Data),a(2),u("total",r.data==null||r.data.Data==null?null:r.data.Data.length)("totalAllData",r.data==null?null:r.data.ListTotal)("pageData",r.pageData))},dependencies:[j,B,le,ae,de,Q,z,K,J,_e,ue,ce,se,ge,G,q,re,oe,me,pe,A,R,te],encapsulation:2})};export{ye as PrintHistoryComponent};
|
|
@@ -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-
|
|
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-TFJ6RC7Q.js";import{c as it}from"./chunk-ZVJGTPQY.js";import{b as Q}from"./chunk-VXPORXGI.js";import{a as q}from"./chunk-R66UUSM7.js";import"./chunk-IRGMPCNS.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as Y,f as Z}from"./chunk-VL552ANV.js";import"./chunk-GJCPLFMU.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-4XR5RPFW.js";import{b as K}from"./chunk-E7RGLETU.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-GUN3GLFK.js";import"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import{b as H}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-WMLA5VC3.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 +1 @@
|
|
|
1
|
-
import{c as u}from"./chunk-
|
|
1
|
+
import{c as u}from"./chunk-GUN3GLFK.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 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-E7RGLETU.js";import{K as o}from"./chunk-IEVGW2RT.js";var s=class extends a{constructor(t,e,r,n){super(t);this.httpService=e;this.formDataAPI=r;this.route=n;let p=this.route.snapshot.queryParams;this.menuData$.pipe(o(()=>this.httpService.post(`/api/${this.formDataAPI}`,p))).subscribe(i=>{this.data=i,this.postBindForm(i)})}data={};get formData(){return this.data.Form}set formData(t){this.data.Form=t}get options(){return this.data.Options?this.data.Options:{}}get Roles(){return this.data.Roles?this.data.Roles:{}}postBindForm(t){}onSubmit(t,e=!1){this.preSubmitForm(),this.httpService.post(`/api/${t}`,this.formData).subscribe({next:r=>{this.onSubmitSuccess(r)},error:r=>{this.onSubmitError(r)}})}compare(t,e,r){return(t<e?-1:1)*(r?1:-1)}preSubmitForm(){}onSubmitSuccess(t){}onSubmitError(t){}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as u}from"./chunk-
|
|
1
|
+
import{f as u}from"./chunk-VL552ANV.js";import"./chunk-4XR5RPFW.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-GUN3GLFK.js";import"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-WMLA5VC3.js";import"./chunk-LGOSIAUC.js";import{Gb as o,Hb as m,Ib as p,Sd as d,hc as c,ib as f,jb as i,ma as n,vd as l}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var a=class t{menuData={H:"Not Found"};constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=f({type:t,selectors:[["POS-not-found-page"]],standalone:!1,decls:12,vars:0,consts:[[1,"container-fluid","mt-12"],[1,"row"],[1,"col-1"],[1,"col-6","d-flex","align-items-center","justify-content-center","pe-0"],[1,"ms-12"],[1,"mb-0","fw-normal",2,"margin-top","20px","font-size","55px"],[1,"fs-4"],[1,"col-5","ps-0"],["src","https://cdn.dealpos.xyz/web-image/MicrosoftTeams-image.jpg","alt","",2,"width","50%"]],template:function(e,y){e&1&&(o(0,"content")(1,"div",0)(2,"div",1),p(3,"div",2),o(4,"div",3)(5,"div",4)(6,"h1",5),c(7," Page Not Found "),m(),o(8,"p",6),c(9,"The page you are trying to access cannot be found"),m()()(),o(10,"div",7),p(11,"img",8),m()()()())},encapsulation:2})};var M=[{path:"",component:a}],r=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[d.forChild(M),d]})};var N=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[l,r,u]})};export{N as NotFoundModule};
|