dealpos 25.50.2 → 25.50.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-VD3VXMZE.js → chunk-24PYQCLS.js} +1 -1
- package/browser/{chunk-7KRURW6N.js → chunk-24QQSO3I.js} +1 -1
- package/browser/{chunk-FYZR4T4Z.js → chunk-2BFJWET6.js} +1 -1
- package/browser/{chunk-E7I3NPA7.js → chunk-2LVKRR2R.js} +1 -1
- package/browser/{chunk-ZVJGTPQY.js → chunk-2MVZ322B.js} +1 -1
- package/browser/{chunk-Z6DKCJUZ.js → chunk-2PV32D5Q.js} +1 -1
- package/browser/{chunk-TM4BVRKQ.js → chunk-3QDTSIB6.js} +1 -1
- package/browser/{chunk-ZNKZYBB6.js → chunk-42J4XDZQ.js} +2 -2
- package/browser/{chunk-ABAK5BOR.js → chunk-54E6DGPE.js} +1 -1
- package/browser/{chunk-NRXQVTHC.js → chunk-54UMDIKR.js} +2 -2
- package/browser/{chunk-FCDFHL3X.js → chunk-5D6LHDW2.js} +1 -1
- package/browser/{chunk-3CI72KQ3.js → chunk-5EDMTMQE.js} +1 -1
- package/browser/{chunk-72M34LBD.js → chunk-64YDRVDG.js} +1 -1
- package/browser/{chunk-6K2PABLT.js → chunk-65FDGBJO.js} +1 -1
- package/browser/{chunk-CAHMSC7J.js → chunk-6CVIKPGY.js} +1 -1
- package/browser/{chunk-5I57WLXV.js → chunk-6PBVX5TT.js} +1 -1
- package/browser/{chunk-F7YYCFKH.js → chunk-6QQ7TKNG.js} +2 -2
- package/browser/{chunk-4VHFIFH3.js → chunk-7AABZJ3Q.js} +1 -1
- package/browser/{chunk-RJFWUHOP.js → chunk-7CUDTVLZ.js} +1 -1
- package/browser/{chunk-S2XP3WT2.js → chunk-7GCZ5FDQ.js} +1 -1
- package/browser/{chunk-O7AYJCX3.js → chunk-7MGUJEON.js} +1 -1
- package/browser/{chunk-R7X75CAN.js → chunk-7PIO3JIN.js} +1 -1
- package/browser/{chunk-LJCEFLIZ.js → chunk-7VATOIW5.js} +1 -1
- package/browser/{chunk-QM5JUHAR.js → chunk-BESZUYFF.js} +2 -2
- package/browser/{chunk-IB5IYQYR.js → chunk-BYEJOHI5.js} +2 -2
- package/browser/{chunk-MW6VWMF2.js → chunk-C4DUGK4U.js} +1 -1
- package/browser/{chunk-A6LKXUGJ.js → chunk-C6KDEINU.js} +1 -1
- package/browser/{chunk-I5PFTS7W.js → chunk-CANKLN6H.js} +1 -1
- package/browser/{chunk-J4JATC4H.js → chunk-DC4YXLBE.js} +1 -1
- package/browser/{chunk-WMLA5VC3.js → chunk-DED7477D.js} +1 -1
- package/browser/{chunk-DVEFT7GI.js → chunk-DGANMYLB.js} +1 -1
- package/browser/{chunk-CN2J3E2G.js → chunk-DM3MYART.js} +1 -1
- package/browser/{chunk-E7RGLETU.js → chunk-DRCWIWR4.js} +1 -1
- package/browser/{chunk-OXGGKWTO.js → chunk-DYZFZ736.js} +1 -1
- package/browser/{chunk-N5HYVJLW.js → chunk-EEJ5ZZ5K.js} +1 -1
- package/browser/{chunk-IX6SAYD6.js → chunk-EGU7BITH.js} +1 -1
- package/browser/{chunk-PCAJ3T4Y.js → chunk-EO3NFUMI.js} +1 -1
- package/browser/{chunk-Q3HXBKNL.js → chunk-GMEXYYR5.js} +1 -1
- package/browser/{chunk-OPACCKVN.js → chunk-HHOJ4YQR.js} +1 -1
- package/browser/{chunk-EQ5MSD2S.js → chunk-HVYBU6TY.js} +1 -1
- package/browser/{chunk-IRGMPCNS.js → chunk-J53YFCCL.js} +1 -1
- package/browser/{chunk-5TRWYRN5.js → chunk-JE4O3B4S.js} +1 -1
- package/browser/{chunk-PE5RSFD4.js → chunk-JZ5MD4LC.js} +1 -1
- package/browser/{chunk-4WGA2OTP.js → chunk-K3S2VA3C.js} +1 -1
- package/browser/{chunk-D3NB2D5J.js → chunk-KQPUNL5V.js} +1 -1
- package/browser/{chunk-522M5UUJ.js → chunk-KZG4CPJW.js} +1 -1
- package/browser/{chunk-5JPSSGYG.js → chunk-LZ2R3WSV.js} +1 -1
- package/browser/{chunk-EKL4DD7N.js → chunk-MA257SYA.js} +1 -1
- package/browser/{chunk-2KS45FOG.js → chunk-N6UOMCS6.js} +1 -1
- package/browser/{chunk-VL552ANV.js → chunk-NNGM7TLL.js} +1 -1
- package/browser/{chunk-PG76XRHN.js → chunk-NTXNJZOI.js} +1 -1
- package/browser/{chunk-QO5SWGKB.js → chunk-NZBEEY37.js} +1 -1
- package/browser/{chunk-3FIHANXM.js → chunk-O3WVNFF3.js} +1 -1
- package/browser/{chunk-GJCPLFMU.js → chunk-O7LZALSI.js} +1 -1
- package/browser/{chunk-MNQNS2XG.js → chunk-OLM3XNOA.js} +1 -1
- package/browser/{chunk-FR2QCVXS.js → chunk-PDYPX3HL.js} +1 -1
- package/browser/{chunk-ZUH63VNR.js → chunk-PR34T5VJ.js} +2 -2
- package/browser/{chunk-GDASNIZL.js → chunk-PV6VJ5DU.js} +1 -1
- package/browser/{chunk-UXISTLRF.js → chunk-QBMO2OPJ.js} +1 -1
- package/browser/{chunk-TSYTV425.js → chunk-REVYYB46.js} +1 -1
- package/browser/{chunk-TXFCAVU2.js → chunk-S7EPVPRI.js} +1 -1
- package/browser/{chunk-76NP7MDH.js → chunk-SFXHBMXV.js} +1 -1
- package/browser/{chunk-SXFDWJS4.js → chunk-SUO6DJYC.js} +1 -1
- package/browser/{chunk-JIYQX2TI.js → chunk-SZB5MY63.js} +1 -1
- package/browser/{chunk-DXZJ5B2W.js → chunk-SZE5I2OK.js} +1 -1
- package/browser/{chunk-TFJ6RC7Q.js → chunk-T6FJJ74N.js} +1 -1
- package/browser/{chunk-4XR5RPFW.js → chunk-TBWTD5VK.js} +1 -1
- package/browser/{chunk-KJ6Y5C2X.js → chunk-TKLP46GO.js} +1 -1
- package/browser/{chunk-LNFN2XQO.js → chunk-TNPMDRZO.js} +1 -1
- package/browser/{chunk-L2E3ETBG.js → chunk-U5VPMH5B.js} +1 -1
- package/browser/{chunk-7T4IG74V.js → chunk-UKGYRZRL.js} +1 -1
- package/browser/{chunk-LKBQF2DU.js → chunk-VITAWR3T.js} +1 -1
- package/browser/{chunk-7YINKSK5.js → chunk-VOQLYG7T.js} +1 -1
- package/browser/{chunk-3IAS5WE6.js → chunk-WFFRWPW6.js} +1 -1
- package/browser/{chunk-EXV4D73Z.js → chunk-WJKZQDGG.js} +1 -1
- package/browser/{chunk-GUN3GLFK.js → chunk-WUCW3BSG.js} +1 -1
- package/browser/{chunk-YAZTTW7K.js → chunk-XOHCGYTO.js} +1 -1
- package/browser/{chunk-CMZCCWKE.js → chunk-YREC2Y5A.js} +1 -1
- package/browser/{chunk-NX6SWHK4.js → chunk-YZ4V72WH.js} +2 -2
- package/browser/{chunk-YDSGRKII.js → chunk-Z2JW3BVY.js} +1 -1
- package/browser/{chunk-R66UUSM7.js → chunk-ZE44HGGG.js} +1 -1
- package/browser/{chunk-VLALB254.js → chunk-ZHT26XL2.js} +1 -1
- package/browser/{chunk-2YCKWFSX.js → chunk-ZT6WLRQU.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-OHWGY2LM.js → main-E2WDTYZB.js} +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-3CI72KQ3.js";import{a as oe,b as ae,c as re}from"./chunk-AQW4VS3Y.js";import{a as xe,b as fe}from"./chunk-4W3WYXI2.js";import{f as ye}from"./chunk-TFJ6RC7Q.js";import{c as ve}from"./chunk-ZVJGTPQY.js";import{b as se}from"./chunk-VXPORXGI.js";import{a as _e}from"./chunk-J6M7UWVR.js";import{e as ue,f as ge}from"./chunk-VL552ANV.js";import{b as Ce}from"./chunk-E7RGLETU.js";import{b as ne,c as ie}from"./chunk-JBS5UYZC.js";import{a as me,d as pe,e as de}from"./chunk-THT6CY5E.js";import{g as ce}from"./chunk-ZTD4APMR.js";import{F as $,c as U,h as X,o as Y,q as Z}from"./chunk-DWZ5JTI2.js";import{b as te}from"./chunk-WFQIMZGL.js";import{p as J,s as ee}from"./chunk-LGOSIAUC.js";import{Ab as s,Ca as O,Cb as B,Db as N,Eb as H,Fb as g,Fc as S,Gb as o,Gc as w,Hb as a,Ib as j,Lc as G,Mb as F,Nb as M,Pb as T,Pc as R,Qd as K,Sb as V,Ub as r,Xa as i,eb as h,hc as m,ib as L,ic as D,jc as y,mb as W,mc as v,nc as x,ob as A,oc as f,pa as E,sc as k,sd as q,ta as C,ua as _,vd as z,yb as d,yc as Q}from"./chunk-IEVGW2RT.js";import{a as b,b as P}from"./chunk-SNAKHGZS.js";var he=n=>({ID:n});function De(n,p){if(n&1){let e=T();o(0,"button",16),V("click",function(){C(e);let t=r();return _(t.openExportModal())}),j(1,"i",17),m(2," Export "),a()}}function Se(n,p){if(n&1&&(o(0,"span",27),m(1),a()),n&2){let e=p.item;g("matTooltip",k(e.Value)),i(),D(e.Value)}}function we(n,p){if(n&1){let e=T();o(0,"div",18)(1,"div")(2,"h6"),m(3,"Outlet"),a(),o(4,"outlet-selector",19),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),m(7,"Category"),a(),o(8,"POS-product-category-select",20),f("selectedCategoryIDChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),m(11,"Brand"),a(),o(12,"ng-select",21),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),A(13,Se,2,3,"ng-template",22),a()(),o(14,"div")(15,"h6"),m(16,"Product Tags"),a(),o(17,"ng-select",23),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),m(20,"Quantity From - To"),a(),o(21,"div",24)(22,"input",25),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),m(23," - "),o(24,"input",26),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),g("accessType",2),v("ngModel",e.pageData.Filter.OutletID),i(4),v("selectedCategoryID",e.pageData.Filter.ProductCategoryID),g("showClear",!0),i(4),g("items",e.pageData.Options==null?null:e.pageData.Options.Brands),v("ngModel",e.pageData.Filter.ProductBrandID),i(5),g("items",e.pageData.Options==null?null:e.pageData.Options.Tags),v("ngModel",e.pageData.Filter.ProductTagID),i(5),v("ngModel",e.pageData.Filter.QtyFrom),i(2),v("ngModel",e.pageData.Filter.QtyTo)}}function Te(n,p){if(n&1&&(o(0,"th",10),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantName.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",11),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantCode.name," ")}}function be(n,p){if(n&1&&(o(0,"th",12),m(1),a()),n&2){let e=r();i(),y(" ",e.column.OnHand.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",13),m(1),a()),n&2){let e=r();i(),y(" ",e.column.DirectAllocated.name," ")}}function Fe(n,p){if(n&1&&(o(0,"th",14),m(1),a()),n&2){let e=r();i(),y(" ",e.column.IndirectAllocated.name," ")}}function Me(n,p){if(n&1&&(o(0,"th",15),m(1),a()),n&2){let e=r();i(),y(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",28),m(2),a()()),n&2){let e=r().$implicit;i(),g("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",Q(3,he,e.VariantID)),i(),y(" ",e.VariantName," ")}}function Ee(n,p){if(n&1&&(o(0,"td"),m(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Oe(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Le(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&d(0,Le,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function Be(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function Ne(n,p){if(n&1&&d(0,Be,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function He(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function je(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function ke(n,p){if(n&1&&(o(0,"tr"),d(1,Ae,3,5,"td"),d(2,Ee,2,1,"td"),d(3,Oe,3,3,"td"),d(4,We,1,1)(5,Ne,1,1),d(6,He,3,3,"td"),d(7,je,3,3,"td"),a()),n&2){let e=r();i(),s(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),s(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),s(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),s(e.totalIndirect()>0?4:5),i(2),s(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),s(e.column.Available&&e.column.Available.selected?7:-1)}}function Qe(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",29),V("jumpToPage",function(){C(e);let t=r();return _(t.getListData())})("previousPage",function(){C(e);let t=r();return _(t.getListData())})("nextPage",function(){C(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),g("total",e.data.Data.length)("pageData",e.pageData)}}var Ie=class n extends le{constructor(e,c,t,l,I){super(e,c,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=c;this.csvConverter=l;this.roleService=I;R(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);dialog=E(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let c=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",c),this.totalIndirect.set(c)}sortData(e){let c=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=c;return}this.infiniteList=c.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(se,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(c){return new(c||n)(h(Ce),h(ee),h(J),h(_e),h(te))};static \u0275cmp=L({type:n,selectors:[["pos-composite-inventory"]],features:[W],decls:22,vars:13,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["mat-sort-header","DirectAllocated",2,"width","10%"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(c,t){if(c&1){let l=T();o(0,"mainpanel-cmp",1),f("textChange",function(u){return C(l),x(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return C(l),_(t.searchFromPageOne())}),f("filterChange",function(u){return C(l),x(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),F(1,2),d(2,De,3,0,"button",3),M(),F(3,4),A(4,we,25,10,"ng-template",null,0,G),M(),F(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return C(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),d(12,Te,2,1,"th",10),d(13,Ve,2,1,"th",11),d(14,be,2,1,"th",12),d(15,Pe,2,1,"th",13),d(16,Fe,2,1,"th",14),d(17,Me,2,1,"th",15),a()(),o(18,"tbody"),N(19,ke,8,6,"tr",null,B),a()()(),d(21,Qe,2,2,"div"),a(),M(),a()}c&2&&(g("pageData",t.menuData),v("text",t.pageData.Filter.SearchText),g("isFilterOnDropdown",!1),v("filter",t.pageData.Filter),g("column",t.column),i(2),s(t.roleService.global.Export?2:-1),i(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),s(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),s(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?15:-1),i(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),s(t.column.Available&&t.column.Available.selected?17:-1),i(2),H(t.infiniteList),i(2),s(t.data?21:-1))},dependencies:[ge,ue,ve,ye,$,U,Z,X,Y,de,pe,me,ie,ne,fe,xe,z,K,re,oe,ae,q],styles:["[_nghost-%COMP%]{display:block}"]})};export{Ie as a};
|
|
1
|
+
import{a as le}from"./chunk-5EDMTMQE.js";import{a as oe,b as ae,c as re}from"./chunk-AQW4VS3Y.js";import{a as xe,b as fe}from"./chunk-4W3WYXI2.js";import{f as ye}from"./chunk-T6FJJ74N.js";import{c as ve}from"./chunk-2MVZ322B.js";import{b as se}from"./chunk-VXPORXGI.js";import{a as _e}from"./chunk-J6M7UWVR.js";import{e as ue,f as ge}from"./chunk-NNGM7TLL.js";import{b as Ce}from"./chunk-DRCWIWR4.js";import{b as ne,c as ie}from"./chunk-JBS5UYZC.js";import{a as me,d as pe,e as de}from"./chunk-THT6CY5E.js";import{g as ce}from"./chunk-ZTD4APMR.js";import{F as $,c as U,h as X,o as Y,q as Z}from"./chunk-DWZ5JTI2.js";import{b as te}from"./chunk-WFQIMZGL.js";import{p as J,s as ee}from"./chunk-LGOSIAUC.js";import{Ab as s,Ca as O,Cb as B,Db as N,Eb as H,Fb as g,Fc as S,Gb as o,Gc as w,Hb as a,Ib as j,Lc as G,Mb as F,Nb as M,Pb as T,Pc as R,Qd as K,Sb as V,Ub as r,Xa as i,eb as h,hc as m,ib as L,ic as D,jc as y,mb as W,mc as v,nc as x,ob as A,oc as f,pa as E,sc as k,sd as q,ta as C,ua as _,vd as z,yb as d,yc as Q}from"./chunk-IEVGW2RT.js";import{a as b,b as P}from"./chunk-SNAKHGZS.js";var he=n=>({ID:n});function De(n,p){if(n&1){let e=T();o(0,"button",16),V("click",function(){C(e);let t=r();return _(t.openExportModal())}),j(1,"i",17),m(2," Export "),a()}}function Se(n,p){if(n&1&&(o(0,"span",27),m(1),a()),n&2){let e=p.item;g("matTooltip",k(e.Value)),i(),D(e.Value)}}function we(n,p){if(n&1){let e=T();o(0,"div",18)(1,"div")(2,"h6"),m(3,"Outlet"),a(),o(4,"outlet-selector",19),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),m(7,"Category"),a(),o(8,"POS-product-category-select",20),f("selectedCategoryIDChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),m(11,"Brand"),a(),o(12,"ng-select",21),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),A(13,Se,2,3,"ng-template",22),a()(),o(14,"div")(15,"h6"),m(16,"Product Tags"),a(),o(17,"ng-select",23),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),m(20,"Quantity From - To"),a(),o(21,"div",24)(22,"input",25),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),m(23," - "),o(24,"input",26),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),g("accessType",2),v("ngModel",e.pageData.Filter.OutletID),i(4),v("selectedCategoryID",e.pageData.Filter.ProductCategoryID),g("showClear",!0),i(4),g("items",e.pageData.Options==null?null:e.pageData.Options.Brands),v("ngModel",e.pageData.Filter.ProductBrandID),i(5),g("items",e.pageData.Options==null?null:e.pageData.Options.Tags),v("ngModel",e.pageData.Filter.ProductTagID),i(5),v("ngModel",e.pageData.Filter.QtyFrom),i(2),v("ngModel",e.pageData.Filter.QtyTo)}}function Te(n,p){if(n&1&&(o(0,"th",10),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantName.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",11),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantCode.name," ")}}function be(n,p){if(n&1&&(o(0,"th",12),m(1),a()),n&2){let e=r();i(),y(" ",e.column.OnHand.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",13),m(1),a()),n&2){let e=r();i(),y(" ",e.column.DirectAllocated.name," ")}}function Fe(n,p){if(n&1&&(o(0,"th",14),m(1),a()),n&2){let e=r();i(),y(" ",e.column.IndirectAllocated.name," ")}}function Me(n,p){if(n&1&&(o(0,"th",15),m(1),a()),n&2){let e=r();i(),y(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",28),m(2),a()()),n&2){let e=r().$implicit;i(),g("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",Q(3,he,e.VariantID)),i(),y(" ",e.VariantName," ")}}function Ee(n,p){if(n&1&&(o(0,"td"),m(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Oe(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Le(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&d(0,Le,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function Be(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function Ne(n,p){if(n&1&&d(0,Be,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function He(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function je(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function ke(n,p){if(n&1&&(o(0,"tr"),d(1,Ae,3,5,"td"),d(2,Ee,2,1,"td"),d(3,Oe,3,3,"td"),d(4,We,1,1)(5,Ne,1,1),d(6,He,3,3,"td"),d(7,je,3,3,"td"),a()),n&2){let e=r();i(),s(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),s(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),s(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),s(e.totalIndirect()>0?4:5),i(2),s(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),s(e.column.Available&&e.column.Available.selected?7:-1)}}function Qe(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",29),V("jumpToPage",function(){C(e);let t=r();return _(t.getListData())})("previousPage",function(){C(e);let t=r();return _(t.getListData())})("nextPage",function(){C(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),g("total",e.data.Data.length)("pageData",e.pageData)}}var Ie=class n extends le{constructor(e,c,t,l,I){super(e,c,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=c;this.csvConverter=l;this.roleService=I;R(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);dialog=E(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let c=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",c),this.totalIndirect.set(c)}sortData(e){let c=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=c;return}this.infiniteList=c.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(se,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(c){return new(c||n)(h(Ce),h(ee),h(J),h(_e),h(te))};static \u0275cmp=L({type:n,selectors:[["pos-composite-inventory"]],features:[W],decls:22,vars:13,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["mat-sort-header","DirectAllocated",2,"width","10%"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(c,t){if(c&1){let l=T();o(0,"mainpanel-cmp",1),f("textChange",function(u){return C(l),x(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return C(l),_(t.searchFromPageOne())}),f("filterChange",function(u){return C(l),x(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),F(1,2),d(2,De,3,0,"button",3),M(),F(3,4),A(4,we,25,10,"ng-template",null,0,G),M(),F(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return C(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),d(12,Te,2,1,"th",10),d(13,Ve,2,1,"th",11),d(14,be,2,1,"th",12),d(15,Pe,2,1,"th",13),d(16,Fe,2,1,"th",14),d(17,Me,2,1,"th",15),a()(),o(18,"tbody"),N(19,ke,8,6,"tr",null,B),a()()(),d(21,Qe,2,2,"div"),a(),M(),a()}c&2&&(g("pageData",t.menuData),v("text",t.pageData.Filter.SearchText),g("isFilterOnDropdown",!1),v("filter",t.pageData.Filter),g("column",t.column),i(2),s(t.roleService.global.Export?2:-1),i(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),s(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),s(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?15:-1),i(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),s(t.column.Available&&t.column.Available.selected?17:-1),i(2),H(t.infiniteList),i(2),s(t.data?21:-1))},dependencies:[ge,ue,ve,ye,$,U,Z,X,Y,de,pe,me,ie,ne,fe,xe,z,K,re,oe,ae,q],styles:["[_nghost-%COMP%]{display:block}"]})};export{Ie as a};
|
|
@@ -1 +1 @@
|
|
|
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
|
+
import{a as Qe}from"./chunk-IFIH2CE2.js";import{a as Ae,f as Le}from"./chunk-54E6DGPE.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-EO3NFUMI.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-NNGM7TLL.js";import"./chunk-O7LZALSI.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-TBWTD5VK.js";import{a as ve,b as Pe}from"./chunk-DRCWIWR4.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-WUCW3BSG.js";import"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-DED7477D.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,4 +1,4 @@
|
|
|
1
|
-
import{a as ft,b as _t,c as gt,d as yt,e as vt}from"./chunk-7YUPYNWQ.js";import{a as xt}from"./chunk-2CL5FM3P.js";import{a as ht}from"./chunk-QPAUI5EG.js";import{a as mt}from"./chunk-45E6XCHN.js";import{a as bt}from"./chunk-SIDUUVNA.js";import{b as ut}from"./chunk-
|
|
1
|
+
import{a as ft,b as _t,c as gt,d as yt,e as vt}from"./chunk-7YUPYNWQ.js";import{a as xt}from"./chunk-2CL5FM3P.js";import{a as ht}from"./chunk-QPAUI5EG.js";import{a as mt}from"./chunk-45E6XCHN.js";import{a as bt}from"./chunk-SIDUUVNA.js";import{b as ut}from"./chunk-TBWTD5VK.js";import{a as dt,d as _e}from"./chunk-R2GUMKAU.js";import{a as pt,d as ct}from"./chunk-S7FOJJP2.js";import{b as ue,c as ne,d as me,g as at,h as rt,k as U,l as j}from"./chunk-FU2ZGMX4.js";import{A as Je,F as Xe,H,P as et,Q as tt,S as Ee,T as it,V as de,W,X as nt,_ as Ve,a as te,fa as ot,g as We,h as Ue,i as je,ka as lt,m as k,oa as st,p as Ce,pa as ie,qa as he,t as ce,u as Ze,w as L,x as z,xa as fe,z as Ye}from"./chunk-SLX34TWD.js";import{a as $e}from"./chunk-DWZ5JTI2.js";import{$c as h,Ab as be,Ca as K,Fb as s,Gb as f,Hb as m,Ia as R,Ib as D,Lb as He,Lc as A,Mb as I,Nb as O,Ob as w,Oc as $,Pb as E,Pc as pe,Sb as x,Tc as ee,Ub as a,Xa as p,Xb as v,Ya as C,Yb as M,Za as ae,Zb as d,_b as u,ad as V,cc as q,dc as Pe,eb as G,fc as ve,gb as De,gc as _,hc as Q,ib as Y,ic as J,id as Ge,jb as re,jc as xe,jd as Ie,ka as Be,kb as Ae,la as le,ma as se,mb as N,mc as Re,md as Oe,na as Z,nb as ze,nc as Ne,nd as we,ob as c,oc as Qe,pa as F,ta as y,ua as b,va as B,vd as Se,wb as T,wc as X,wd as qe,xc as Ke,yb as ye,yc as S,zc as Te}from"./chunk-IEVGW2RT.js";import{a as P,b as Me}from"./chunk-SNAKHGZS.js";var Tt=`
|
|
2
2
|
.p-tooltip {
|
|
3
3
|
position: absolute;
|
|
4
4
|
display: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-OPACCKVN.js";import{a as Pe}from"./chunk-T7XU5W5A.js";import{a as Oe}from"./chunk-IRGMPCNS.js";import{a as Se}from"./chunk-BT7NN7PT.js";import{b as Me,c as Ce}from"./chunk-JBS5UYZC.js";import{a as me}from"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-7P3L3ODB.js";import{F as ve,b as fe,h as he,o as ge}from"./chunk-DWZ5JTI2.js";import{a as T,c as f}from"./chunk-GUN3GLFK.js";import{a as be}from"./chunk-KJ6Y5C2X.js";import"./chunk-36GWLMZX.js";import{b as I}from"./chunk-WFQIMZGL.js";import{a as M}from"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-WMLA5VC3.js";import{p as de}from"./chunk-LGOSIAUC.js";import{$ as Y,Cb as j,Db as F,E,Eb as V,Fb as h,Fc as ne,Gb as o,Hb as s,Hc as re,Ib as u,Md as se,Od as le,Pd as b,Qd as ce,Rd as pe,Sa as W,Sb as C,Sd as G,Ub as K,Xa as p,d as q,da as D,eb as v,ec as X,gc as $,gd as oe,hc as m,ib as Q,ic as B,jb as x,jc as z,la as d,ma as y,oa as _,pa as c,tc as ee,vd as ae,wb as Z,yc as te,zc as ie}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as J}from"./chunk-SNAKHGZS.js";var r=class e{constructor(n,t){this.authService=n;this.router=t}canLoad(n,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(n){let t="/menu";n.forEach(a=>t+=`/${a.path}`);let i=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(n){this.toastrService=n;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(n){console.error(n)}}showAlert(n,t,i,l){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:n,icon:l});g.onerror=(N=>{this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})}setBody(n,t){return this.hasUrl(t)&&(n=`<a href="${t}" target="_blank" class="ps-0">${n}</a>`),n}hasUrl(n){return!!(n&&n.length!==0)}static \u0275fac=function(t){return new(t||e)(_(de))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=c(I);authService=c(f);menu=ye;filteredMenu=[];initFilteredMenu(){let n=this.menu.map(i=>J({},i)),t=n.findIndex(i=>i.T==="Reports");if(t!==-1){let i=!!this.role.report?.View,l=!!this.role.report?.Advanced,a=!!this.role.report?.Periodic;i?n[t].U="/menu/Reports":l?n[t].U="/menu/Reports/Sales_Report/Standard/Top_Customers":a?n[t].U="/menu/Reports/Sales_Report/Standard/Daily":n[t].U="/menu/Reports"}this.filteredMenu=n.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?!!this.role.report?.View||!!this.role.report?.Advanced||!!this.role.report?.Periodic:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(n){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var xe=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=c(I);authService=c(f);filteredMenu=[];initFilteredMenu(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=xe.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&n!=2&&n!=3:t.T=="My Sales"?n!=2&&n!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,n)=>({"full-container":e,"subscription-bar-visible":n}),Ne=e=>[e];function Ee(e,n){if(e&1&&(o(0,"a",11),u(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=n.$implicit;h("routerLink",t==null?null:t.U),p(),$((t==null?null:t.I)+" me-2"),p(2),B(t==null?null:t.T)}}function De(e,n){if(e&1&&(o(0,"li",33,0)(2,"a",36),u(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=n.$implicit,i=K();h("routerLinkActiveOptions",i.isActiveMatchOptions),Z("data-cy",t==null?null:t.T),p(2),h("matTooltip",i.toggleSideMenu?t==null?null:t.T:"")("routerLink",te(7,Ne,t==null?null:t.U)),p(),$(t==null?null:t.I),p(2),B(t==null?null:t.T)}}var P=class e{constructor(n,t,i,l,a,g,N,H){this.toggleSidebar=n;this.signalRClientService=t;this.notificationAlertService=i;this.router=l;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Ie=>this.isNavOpen=Ie),this.destroy$=new q,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=ue.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(n=>n instanceof se),Y(null),D(this.destroy$)).subscribe(n=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let n=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(n)&&M.isGuid(n)?this.signalRClientService.SubscribeGroup(n):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let i=JSON.parse(t),l="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(i.Icon)&&(l=i.Icon),this.notificationAlertService.showAlert(i.Body,i.Header,i.URL,l)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(n){return M.IsNotEmpty(n)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(Se),v(me),v(w),v(b),v(f),v(be),v(k),v(A))};static \u0275cmp=Q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,i){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return i.toggleMenu()}),u(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return i.onShowDropdown()}),m(7),ne(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),u(12,"div",10),F(13,Ee,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),u(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return i.chatToggleChange()}),s(),u(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return i.logout()}),u(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),u(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),u(32,"i",23),o(33,"span"),m(34,"What's New"),u(35,"i",24),s()(),o(36,"a",25),u(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),u(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),u(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,De,6,9,"li",33,j),s()()(),o(52,"div",34),u(53,"router-outlet"),s()()),t&2&&(X("nav-open",i.isNavOpen),p(),h("ngClass",i.toggleSideMenu?"collapses":""),p(2),h("ngClass",i.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),p(3),h("matTooltip",i.accountInfo==null?null:i.accountInfo.BrandName),p(),z(" ",re(8,11,i.accountInfo==null?null:i.accountInfo.BrandName,12)," "),p(4),z("",i.accountInfo==null?null:i.accountInfo.UserName," "),p(2),V(i.topMenu),p(9),h("ngModel",!i.isHideIntercomLauncher),p(9),h("href",ee("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",i.appVersion),W),p(19),V(i.leftSidebarMenu),p(2),h("ngClass",ie(14,Le,i.isFullContainer,i.isNotEmpty(i.currentSubStatus)&&i.currentSubStatus!==i.subsStatusEnum.PAID)))},dependencies:[Me,le,ce,pe,fe,he,ge,oe,Pe],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function je(e){let n=c(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let i=n.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}var O=(e,n)=>{let t=c(f),i=t.isTokenExpired(),l=c(b);return i?(t.returnUrl=je(n),l.navigate(["/"]),!1):e.path=="Dashboard"?Fe():!0};function Fe(){let e=c(b),n=c(f),t=!1,i=n.getRedirectUrl();return t=i.includes("Dashboard"),t==!1&&e.navigate([i]),t}var U=class e{paymentStorageService=c(_e);canActivate(n,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var R=class e{reportService=c(Oe);canActivate(n,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ve=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-76NP7MDH.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-PG76XRHN.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[R]},{path:"Sell",loadChildren:()=>import("./chunk-QM5JUHAR.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-DTX2BFBV.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-O7AYJCX3.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-MW6VWMF2.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-Q3HXBKNL.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-ZNKZYBB6.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-S2XP3WT2.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-FR2QCVXS.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-IB5IYQYR.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-NX6SWHK4.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-ZUH63VNR.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-EKL4DD7N.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-UXISTLRF.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-F7YYCFKH.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-NRXQVTHC.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-PE5RSFD4.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-J4JATC4H.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-L2E3ETBG.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-7KRURW6N.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-CAHMSC7J.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-CN2J3E2G.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-RJFWUHOP.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-YDSGRKII.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-LKBQF2DU.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-6K2PABLT.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],L=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Ve),G]})};var Te=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Ce,L,ve,ae]})};export{Te as MenuMasterModule};
|
|
1
|
+
import{a as _e}from"./chunk-HHOJ4YQR.js";import{a as Pe}from"./chunk-T7XU5W5A.js";import{a as Oe}from"./chunk-J53YFCCL.js";import{a as Se}from"./chunk-BT7NN7PT.js";import{b as Me,c as Ce}from"./chunk-JBS5UYZC.js";import{a as me}from"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-7P3L3ODB.js";import{F as ve,b as fe,h as he,o as ge}from"./chunk-DWZ5JTI2.js";import{a as T,c as f}from"./chunk-WUCW3BSG.js";import{a as be}from"./chunk-TKLP46GO.js";import"./chunk-36GWLMZX.js";import{b as I}from"./chunk-WFQIMZGL.js";import{a as M}from"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-DED7477D.js";import{p as de}from"./chunk-LGOSIAUC.js";import{$ as Y,Cb as j,Db as F,E,Eb as V,Fb as h,Fc as ne,Gb as o,Hb as s,Hc as re,Ib as u,Md as se,Od as le,Pd as b,Qd as ce,Rd as pe,Sa as W,Sb as C,Sd as G,Ub as K,Xa as p,d as q,da as D,eb as v,ec as X,gc as $,gd as oe,hc as m,ib as Q,ic as B,jb as x,jc as z,la as d,ma as y,oa as _,pa as c,tc as ee,vd as ae,wb as Z,yc as te,zc as ie}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as J}from"./chunk-SNAKHGZS.js";var r=class e{constructor(n,t){this.authService=n;this.router=t}canLoad(n,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(n){let t="/menu";n.forEach(a=>t+=`/${a.path}`);let i=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(n){this.toastrService=n;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(n){console.error(n)}}showAlert(n,t,i,l){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:n,icon:l});g.onerror=(N=>{this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})}setBody(n,t){return this.hasUrl(t)&&(n=`<a href="${t}" target="_blank" class="ps-0">${n}</a>`),n}hasUrl(n){return!!(n&&n.length!==0)}static \u0275fac=function(t){return new(t||e)(_(de))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=c(I);authService=c(f);menu=ye;filteredMenu=[];initFilteredMenu(){let n=this.menu.map(i=>J({},i)),t=n.findIndex(i=>i.T==="Reports");if(t!==-1){let i=!!this.role.report?.View,l=!!this.role.report?.Advanced,a=!!this.role.report?.Periodic;i?n[t].U="/menu/Reports":l?n[t].U="/menu/Reports/Sales_Report/Standard/Top_Customers":a?n[t].U="/menu/Reports/Sales_Report/Standard/Daily":n[t].U="/menu/Reports"}this.filteredMenu=n.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?!!this.role.report?.View||!!this.role.report?.Advanced||!!this.role.report?.Periodic:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(n){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var xe=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=c(I);authService=c(f);filteredMenu=[];initFilteredMenu(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=xe.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&n!=2&&n!=3:t.T=="My Sales"?n!=2&&n!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,n)=>({"full-container":e,"subscription-bar-visible":n}),Ne=e=>[e];function Ee(e,n){if(e&1&&(o(0,"a",11),u(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=n.$implicit;h("routerLink",t==null?null:t.U),p(),$((t==null?null:t.I)+" me-2"),p(2),B(t==null?null:t.T)}}function De(e,n){if(e&1&&(o(0,"li",33,0)(2,"a",36),u(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=n.$implicit,i=K();h("routerLinkActiveOptions",i.isActiveMatchOptions),Z("data-cy",t==null?null:t.T),p(2),h("matTooltip",i.toggleSideMenu?t==null?null:t.T:"")("routerLink",te(7,Ne,t==null?null:t.U)),p(),$(t==null?null:t.I),p(2),B(t==null?null:t.T)}}var P=class e{constructor(n,t,i,l,a,g,N,H){this.toggleSidebar=n;this.signalRClientService=t;this.notificationAlertService=i;this.router=l;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Ie=>this.isNavOpen=Ie),this.destroy$=new q,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=ue.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(n=>n instanceof se),Y(null),D(this.destroy$)).subscribe(n=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let n=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(n)&&M.isGuid(n)?this.signalRClientService.SubscribeGroup(n):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let i=JSON.parse(t),l="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(i.Icon)&&(l=i.Icon),this.notificationAlertService.showAlert(i.Body,i.Header,i.URL,l)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(n){return M.IsNotEmpty(n)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(Se),v(me),v(w),v(b),v(f),v(be),v(k),v(A))};static \u0275cmp=Q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,i){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return i.toggleMenu()}),u(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return i.onShowDropdown()}),m(7),ne(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),u(12,"div",10),F(13,Ee,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),u(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return i.chatToggleChange()}),s(),u(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return i.logout()}),u(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),u(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),u(32,"i",23),o(33,"span"),m(34,"What's New"),u(35,"i",24),s()(),o(36,"a",25),u(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),u(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),u(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,De,6,9,"li",33,j),s()()(),o(52,"div",34),u(53,"router-outlet"),s()()),t&2&&(X("nav-open",i.isNavOpen),p(),h("ngClass",i.toggleSideMenu?"collapses":""),p(2),h("ngClass",i.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),p(3),h("matTooltip",i.accountInfo==null?null:i.accountInfo.BrandName),p(),z(" ",re(8,11,i.accountInfo==null?null:i.accountInfo.BrandName,12)," "),p(4),z("",i.accountInfo==null?null:i.accountInfo.UserName," "),p(2),V(i.topMenu),p(9),h("ngModel",!i.isHideIntercomLauncher),p(9),h("href",ee("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",i.appVersion),W),p(19),V(i.leftSidebarMenu),p(2),h("ngClass",ie(14,Le,i.isFullContainer,i.isNotEmpty(i.currentSubStatus)&&i.currentSubStatus!==i.subsStatusEnum.PAID)))},dependencies:[Me,le,ce,pe,fe,he,ge,oe,Pe],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function je(e){let n=c(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let i=n.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}var O=(e,n)=>{let t=c(f),i=t.isTokenExpired(),l=c(b);return i?(t.returnUrl=je(n),l.navigate(["/"]),!1):e.path=="Dashboard"?Fe():!0};function Fe(){let e=c(b),n=c(f),t=!1,i=n.getRedirectUrl();return t=i.includes("Dashboard"),t==!1&&e.navigate([i]),t}var U=class e{paymentStorageService=c(_e);canActivate(n,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var R=class e{reportService=c(Oe);canActivate(n,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ve=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-SFXHBMXV.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-NTXNJZOI.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[R]},{path:"Sell",loadChildren:()=>import("./chunk-BESZUYFF.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-DTX2BFBV.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-7MGUJEON.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-C4DUGK4U.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-GMEXYYR5.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-42J4XDZQ.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-7GCZ5FDQ.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-PDYPX3HL.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-BYEJOHI5.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-YZ4V72WH.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-PR34T5VJ.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-MA257SYA.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-QBMO2OPJ.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-6QQ7TKNG.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-54UMDIKR.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-JZ5MD4LC.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-DC4YXLBE.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-U5VPMH5B.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-24QQSO3I.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-6CVIKPGY.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-DM3MYART.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-7CUDTVLZ.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-Z2JW3BVY.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-VITAWR3T.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-65FDGBJO.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],L=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Ve),G]})};var Te=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Ce,L,ve,ae]})};export{Te as MenuMasterModule};
|