marketplacepos 3.17.0 → 3.17.1
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/Marketplace/{chunk-SPZA7NHZ.js → chunk-37HEKUHD.js} +1 -1
- package/Marketplace/{chunk-I2PMBLWD.js → chunk-4HHTQAPY.js} +1 -1
- package/Marketplace/{chunk-4XEKFO4Z.js → chunk-6IOKKIXK.js} +1 -1
- package/Marketplace/{chunk-XQZPVGE3.js → chunk-7FFNLVJH.js} +1 -1
- package/Marketplace/{chunk-WX36PKIA.js → chunk-BAAOECNZ.js} +1 -1
- package/Marketplace/{chunk-HLICIEIP.js → chunk-C5IL24BE.js} +1 -1
- package/Marketplace/{chunk-34GBFRXS.js → chunk-CHSTGM5Y.js} +1 -1
- package/Marketplace/{chunk-BUEWMHNS.js → chunk-DASTO4RB.js} +1 -1
- package/Marketplace/{chunk-EY4AF4C6.js → chunk-DDRDQGEF.js} +1 -1
- package/Marketplace/{chunk-Q7CDQUQU.js → chunk-DNGIUG3E.js} +1 -1
- package/Marketplace/{chunk-3GFLGT6Y.js → chunk-FUH4AMYX.js} +1 -1
- package/Marketplace/{chunk-KQLZLMZG.js → chunk-HA3Y34OJ.js} +1 -1
- package/Marketplace/{chunk-5MPSOGAH.js → chunk-IZXSCJ3N.js} +1 -1
- package/Marketplace/{chunk-REUBZEJF.js → chunk-KN5RSYFT.js} +1 -1
- package/Marketplace/{chunk-DOBOYL5B.js → chunk-M64SKYWS.js} +1 -1
- package/Marketplace/{chunk-TADFTT3Q.js → chunk-MM4QZFVY.js} +1 -1
- package/Marketplace/{chunk-WMX63NFG.js → chunk-MOWBKS7Y.js} +1 -1
- package/Marketplace/{chunk-YOINVQGA.js → chunk-PAGHWDCT.js} +1 -1
- package/Marketplace/{chunk-RBKSYVXO.js → chunk-R5RWR7T6.js} +1 -1
- package/Marketplace/{chunk-STTZD5ZT.js → chunk-R7JZ77UO.js} +1 -1
- package/Marketplace/{chunk-OITBUSAX.js → chunk-RN744Z4D.js} +1 -1
- package/Marketplace/{chunk-6O64LIQD.js → chunk-US5WZ2ZS.js} +1 -1
- package/Marketplace/{chunk-BXT5HKGL.js → chunk-VEKQ4MF5.js} +1 -1
- package/Marketplace/{chunk-VGDHTDN4.js → chunk-WJGR76JO.js} +1 -1
- package/Marketplace/{chunk-2IN33ESY.js → chunk-ZPHWXIRT.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-KFTHIX36.js → main-CXT72QF6.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-
|
|
1
|
+
import{a as Z}from"./chunk-DDRDQGEF.js";import{a as Y}from"./chunk-P6UIWSMI.js";import{b as ee,c as D}from"./chunk-6OGERROP.js";import"./chunk-BVIRHZTZ.js";import{b as X}from"./chunk-QVCJCYVC.js";import"./chunk-GP6U42SV.js";import"./chunk-W3POM6UQ.js";import"./chunk-4QK7Y7R2.js";import{a as Q}from"./chunk-WONQYZFA.js";import"./chunk-73DE2GZF.js";import"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{g as K}from"./chunk-HA3Y34OJ.js";import{b as $,e as H}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as q,l as z,m as J}from"./chunk-5RS36M3W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{c as U,h as j,m as k,o as G,y as W}from"./chunk-O5MOPAT5.js";import"./chunk-2AMEIUWK.js";import{$a as P,$b as x,B as F,Cc as b,Dc as O,Ia as d,Ib as _,Ja as h,Mb as v,Nb as y,Ob as V,Pb as R,Q as T,Qb as L,X as M,Za as w,_b as C,da as N,ga as E,lb as a,mb as m,nb as I,oa as s,pa as c,rb as S,ub as g,wb as o,wc as A,zc as B}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";function te(r,l){if(r&1){let n=S();a(0,"button",15),g("click",function(){s(n);let t=o().ngIf,i=o(2);return c(i.onUpdateItems(t))}),I(1,"i",16),_(2," Update "),m()}}function ie(r,l){if(r&1&&(a(0,"div"),w(1,te,3,0,"button",14),m()),r&2){let n=l.ngIf,e=o(2);d(),P("ngIf",e.productService.hasSelectionVariant(n))}}function ne(r,l){if(r&1){let n=S();a(0,"mainpanel",1),g("onSubmit",function(t){s(n);let i=o();return c(i.onSearch(t))}),a(1,"actions")(2,"div",2),w(3,ie,2,1,"div",3),C(4,"async"),a(5,"button",4),g("click",function(){s(n);let t=o();return c(t.openExportDialog())}),I(6,"i",5),a(7,"span"),_(8,"Export"),m()()()(),a(9,"filters")(10,"div")(11,"label",6),_(12,"Page Number"),m(),a(13,"input",7),V("ngModelChange",function(t){s(n);let i=o();return y(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),c(t)}),m()(),a(14,"div",8)(15,"label",6),_(16,"Page Size"),m(),a(17,"input",7),V("ngModelChange",function(t){s(n);let i=o();return y(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),c(t)}),m()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),C(23,"async"),g("onToggle",function(t){s(n);let i=o();return c(i.onShowDifferencePrice(t))})("onSubmit",function(t){s(n);let i=o();return c(i.updatePriceByVariant(t))}),m(),a(24,"infinite-paginator",13),C(25,"async"),g("onNextPage",function(){s(n);let t=o();return c(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){s(n);let t=o();return c(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(n);let t=o();return c(t.infinitePagination.getRowCount(t.searchFilter))}),m()()()()()()}if(r&2){let n=l.ngIf,e=o();P("textButton","Search"),d(3),P("ngIf",x(4,14,e.data$)),d(10),v("ngModel",e.searchFilter.PageNumber),d(4),v("ngModel",e.searchFilter.RowCount),d(5),P("showProductToggle",!0)("data",x(23,16,e.data$))("channel",e.channelOptions)("filter",n.Filter),d(2),P("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",x(25,18,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var ve=(()=>{let l=class l{constructor(e,t,i,f,u,p){this.http=e,this.toastr=t,this.dialog=i,this.productService=f,this.authService=u,this.decimalPipe=p,this.infinitePagination=N(D),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(M(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(e){let t=this.productService.selectedVariantProduct(e);if(t.length>0){let f=t.map(p=>({ID:p.ID,Code:p.Code,Price:p.UnitPrice}));var i=this.channelOptions.filter(p=>p.selected).map(p=>p.ID);let u={ListChannelID:i,ListPrice:f};this.http.post("/api/Price/UpdateChannel",u).subscribe(p=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+u.ListPrice.length+" items in "+u.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(i=>{let f=this.productService.findChannelById(t.ID,this.channelOptions),u=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+f.Name+" to "+u,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(e){let t=this.productService.selectedVariantProduct(e);this.dialog.open(Y,{data:{selectedItems:t,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(F(i=>i!==void 0)).subscribe(i=>{this.channelOptions=i,this.updatePrice(e)})}openExportDialog(){this.dialog.open(X,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}};l.\u0275fac=function(t){return new(t||l)(h(H),h($),h(q),h(Q),h(K),h(b))},l.\u0275cmp=E({type:l,selectors:[["app-price-pos-channel"]],standalone:!0,features:[R([D,b]),L],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","filter"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(t,i){t&1&&(w(0,ne,26,20,"mainpanel",0),C(1,"async")),t&2&&P("ngIf",x(1,1,i.loader$))},dependencies:[O,A,B,W,U,G,j,k,ee,J,z,Z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let r=l;return r})();export{ve as PricePosChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b}from"./chunk-RKRJ4JOF.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as v,b}from"./chunk-RKRJ4JOF.js";import{a as r}from"./chunk-MOWBKS7Y.js";import"./chunk-HA3Y34OJ.js";import"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import"./chunk-2AMEIUWK.js";import{$a as u,Dc as o,Ia as s,Qb as f,Vc as h,Zc as i,aa as l,ga as m,ha as c,lb as d,mb as C,nb as a}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var T=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-price"]],standalone:!0,features:[f],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),C()()(),a(4,"router-outlet")),n&2&&(s(3),u("Tabs",g.priceTabs))},dependencies:[o,b,v,i,h],encapsulation:2});let t=e;return t})();var P=[{path:"",component:T,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-37HEKUHD.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-PAGHWDCT.js").then(t=>t.CustomChannelPriceComponent)},canActivate:[r],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-C5IL24BE.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],D=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=l({imports:[o,i.forChild(P)]});let t=e;return t})();export{D as PriceRoutingModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,b as y}from"./chunk-RKRJ4JOF.js";import{a as i}from"./chunk-
|
|
1
|
+
import{a as C,b as y}from"./chunk-RKRJ4JOF.js";import{a as i}from"./chunk-MOWBKS7Y.js";import"./chunk-HA3Y34OJ.js";import"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import"./chunk-2AMEIUWK.js";import{$a as d,Dc as o,Ia as c,Qb as h,Vc as v,Zc as r,aa as p,ga as l,ha as s,lb as u,mb as f,nb as a}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var b=(()=>{let t=class t{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=l({type:t,selectors:[["app-inventory"]],standalone:!0,features:[h],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,M){n&1&&(u(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),f()()(),a(4,"router-outlet")),n&2&&(c(3),d("Tabs",M.inventoryTabs))},dependencies:[o,y,C,r,v],encapsulation:2});let e=t;return e})();var g=[{path:"",component:b,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-RN744Z4D.js").then(e=>e.MultiChannelComparison)},canActivate:[i],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-7FFNLVJH.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[i],data:{title:"Inventory Comparison"}}]}],E=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=s({type:t}),t.\u0275inj=p({imports:[o,r.forChild(g)]});let e=t;return e})();export{E as InventoryRoutingModule};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R}from"./chunk-6NFPCNPI.js";import{a as Q}from"./chunk-XHAXYWZ7.js";import{a as Ve,b as De,c as $}from"./chunk-6OGERROP.js";import"./chunk-BVIRHZTZ.js";import{b as Ee}from"./chunk-QVCJCYVC.js";import{a as Me}from"./chunk-GP6U42SV.js";import{a as Pe,b as Fe}from"./chunk-W3POM6UQ.js";import{a as be}from"./chunk-WONQYZFA.js";import"./chunk-73DE2GZF.js";import{a as Te}from"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{a as ge,b as Ce,d as he,e as xe}from"./chunk-ACYUSHMS.js";import{g as ue}from"./chunk-KQLZLMZG.js";import{b as ce,e as _e}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as ve,k as ye,l as Ie,m as we}from"./chunk-5RS36M3W.js";import{t as fe,u as Se}from"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as ae,c as le,h as re,m as se,o as pe,y as me}from"./chunk-O5MOPAT5.js";import{c as D,f as de}from"./chunk-2AMEIUWK.js";import{$a as c,$b as S,Ac as ne,B as z,Cc as ie,Dc as oe,Ha as F,Hb as O,Ia as s,Ib as m,Ja as T,Jb as V,Kb as P,Mb as I,Nb as w,Ob as b,Pb as Z,Q as G,Qb as q,Sb as k,X as B,Za as u,_b as C,ac as N,bc as U,da as H,ga as Y,gb as y,hb as L,jb as A,kb as W,lb as a,mb as r,nb as x,oa as _,ob as M,pa as d,pb as E,rb as v,tc as X,ub as f,vc as J,wb as l,wc as ee,zb as K,zc as te}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var Re=n=>({"text-decoration-line-through":n}),Be=n=>({"ms-10":n}),Le=n=>({"bg-gradient-warning":n});function Ae(n,p){if(n&1){let e=v();a(0,"button",39),f("click",function(){_(e);let t=l().ngIf,o=l(2);return d(o.updateStock(t))}),x(1,"i",40),m(2," Update "),r()}}function We(n,p){if(n&1){let e=v();a(0,"div"),u(1,Ae,3,0,"button",36),a(2,"button",37),f("click",function(){_(e);let t=l(2);return d(t.openExportDialog())}),x(3,"i",38),a(4,"span"),m(5,"Export"),r()()()}if(n&2){let e=p.ngIf,i=l(2);s(),c("ngIf",i.productService.hasSelectionVariant(e))}}function Oe(n,p){if(n&1&&(a(0,"span",41),x(1,"img",42),r(),m(2)),n&2){let e=p.item;s(),c("src",e==null?null:e.Img,F),s(),P(" ",e.Name," ")}}function Ue(n,p){n&1&&(a(0,"div",43)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function $e(n,p){if(n&1){let e=v();a(0,"th")(1,"input",44),b("ngModelChange",function(t){_(e);let o=l(2);return w(o.checkboxState,t)||(o.checkboxState=t),d(t)}),f("ngModelChange",function(){let t=_(e).ngIf,o=l(2);return d(o.onCheckboxStateChange(t))}),r()()}if(n&2){let e=l(2);s(),I("ngModel",e.checkboxState)}}function Qe(n,p){n&1&&(a(0,"th",33),m(1," Reserved "),r())}function je(n,p){}function ze(n,p){if(n&1){let e=v();a(0,"input",63),b("ngModelChange",function(t){_(e);let o=l(3).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),f("ngModelChange",function(){_(e);let t=l(3).$implicit,o=l(2);return d(o.onCheckboxStateProduct(t))}),r()}if(n&2){let e=l(3).$implicit;I("ngModel",e.selected)}}function Ge(n,p){if(n&1){let e=v();a(0,"img",64),f("click",function(t){_(e);let o=l(3).$implicit,h=l(2);return d(h.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(n&2){let e=l(3).$implicit;K("src",e==null?null:e.ThumbnailUrl,F)}}function He(n,p){n&1&&x(0,"img",60)}function Ye(n,p){if(n&1&&(x(0,"br"),a(1,"div",65),x(2,"i",66),a(3,"small"),m(4),r()()),n&2){let e=l(3).$implicit;s(4),P("(",e==null?null:e.Category,")")}}function Ke(n,p){if(n&1&&(a(0,"td",56)(1,"div",15),u(2,ze,1,1,"input",57),a(3,"div",58),u(4,Ge,1,1,"img",59)(5,He,1,0,"img",60),r()()(),a(6,"td",61)(7,"span",62),m(8),r(),u(9,Ye,5,1),r()),n&2){let e=l(2).$implicit,i=l(2);c("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),c("ngClass",k(7,Be,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),c("rowSpan",e==null?null:e.Variants.length),s(2),V(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=i.guidEmpty?9:-1)}}function Ze(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l(2).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l(2).$implicit;I("ngModel",e.selected)}}function qe(n,p){if(n&1&&u(0,Ze,1,1,"input",50),n&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Xe(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l().$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l().$implicit;I("ngModel",e.selected)}}function Je(n,p){n&1&&(a(0,"div",67),m(1," Not Found "),r())}function et(n,p){if(n&1&&(a(0,"div")(1,"span",68),m(2),C(3,"number"),r(),m(4," => "),a(5,"span",69),m(6),C(7,"number"),r()()),n&2){let e=l().$implicit;s(2),P(" ",S(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(S(7,4,e==null?null:e.Inventory))}}function tt(n,p){if(n&1&&(m(0),C(1,"number")),n&2){let e=l().$implicit;P(" ",S(1,1,e==null?null:e.Inventory)," ")}}function nt(n,p){if(n&1&&(M(0),a(1,"div",70)(2,"a",71),x(3,"i",72),r()(),E()),n&2){let e=l().$implicit,i=l(3);s(2),c("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F)}}function it(n,p){if(n&1){let e=v();a(0,"span",77),f("click",function(){let t=_(e).ngIf,o=l(2).$implicit,h=l().$implicit,g=l(2);return d(g.openTableDialog(h,o,t))}),m(1),C(2,"number"),r()}if(n&2){let e=l(2).$implicit;s(),P(" ",S(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function ot(n,p){if(n&1){let e=v();a(0,"td",73)(1,"div",51)(2,"div"),u(3,it,3,3,"span",74),C(4,"async"),r(),a(5,"div",70)(6,"a",71),x(7,"i",72),r()(),a(8,"div",70)(9,"span",75),f("click",function(){_(e);let t=l().$implicit,o=l(3);return d(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",76),r()()()()}if(n&2){let e=l().$implicit,i=l(3);c("ngClass",k(5,Le,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),c("ngIf",S(4,3,i.products$)),s(3),c("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,F)}}function at(n,p){if(n&1&&(M(0),a(1,"span",78),m(2),C(3,"number"),r(),E()),n&2){let e=l(2).$implicit;s(2),P(" (",S(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function lt(n,p){n&1&&m(0," - ")}function rt(n,p){if(n&1&&(M(0),a(1,"td",47),u(2,at,4,3,"ng-container",55)(3,lt,1,0,"ng-template",null,1,U),r(),E()),n&2){let e=O(4),i=l().$implicit;s(2),c("ngIf",i==null||i.Channel[0]==null?null:i.Channel[0].InventoryReserved)("ngIfElse",e)}}function st(n,p){n&1&&(M(0),m(1," - "),E())}function pt(n,p){if(n&1&&(a(0,"span",79),C(1,"date"),m(2),C(3,"date"),r()),n&2){let e=l().$implicit;c("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),P(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(n,p){if(n&1&&(a(0,"tr"),u(1,Ke,10,9),a(2,"td",46),m(3),r(),a(4,"td",47)(5,"span",48),m(6),r()(),a(7,"td",49),u(8,qe,1,1)(9,Xe,1,1,"input",50),r(),a(10,"td")(11,"div",51),u(12,Je,2,0,"div",52)(13,et,8,6,"div")(14,tt,2,3)(15,nt,4,1,"ng-container",5),r()(),u(16,ot,11,7,"td",53)(17,rt,5,2,"ng-container",5),a(18,"td",54),u(19,st,2,0,"ng-container",55)(20,pt,4,8,"ng-template",null,0,U),r()()),n&2){let e=p.$implicit,i=p.index,t=O(21),o=l(3);s(),y(i==0?1:-1),s(2),V(e==null?null:e.Model),s(2),c("matTooltip",e.Discontinued?o.discontinuedVariantMsg:"")("ngClass",k(14,Re,e.Discontinued)),s(),V(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),c("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),c("ngIf",(e==null?null:e.I)!=null),s(),c("ngIf",e==null?null:e.Channel),s(),c("ngIf",o.isShowReservedColumn),s(2),c("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==o.minDate)("ngIfElse",t)}}function ct(n,p){if(n&1&&(a(0,"tbody"),A(1,je,0,0,null,null,L),u(3,mt,22,16,"tr",45),r()),n&2){let e=p.$implicit;s(),W(e.Variants),s(2),c("ngForOf",e.Variants)}}function _t(n,p){if(n&1){let e=v();a(0,"mainpanel",3),f("onSubmit",function(t){_(e);let o=l();return d(o.onSearch(t))}),a(1,"actions")(2,"div",4),u(3,We,6,1,"div",5),C(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),m(8,"Channel"),r(),a(9,"ng-select",7),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),d(t)}),u(10,Oe,3,2,"ng-template",8),r()(),a(11,"div",9)(12,"label",10),m(13,"PageNumber"),r(),a(14,"input",11),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),d(t)}),r()(),a(15,"div",9)(16,"label",12),m(17,"Page Size"),r(),a(18,"input",13),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),d(t)}),r()(),a(19,"div",9)(20,"label",14),m(21,"Quantity From - To"),r(),a(22,"div",15)(23,"input",16),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),d(t)}),r(),m(24," - "),a(25,"input",17),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),d(t)}),r()()()(),a(26,"content")(27,"div",18)(28,"div",19)(29,"div",20),u(30,Ue,3,0,"div",21),a(31,"table",22)(32,"thead",23)(33,"tr")(34,"th",24),m(35," Product "),x(36,"br"),a(37,"mat-slide-toggle",25),f("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,d(t.onShowDifferenceStock())}),a(38,"small",14),m(39,"FILTER DIFFERENT INVENTORY"),r()()(),a(40,"th",26),m(41,"Variant"),r(),a(42,"th",27),m(43,"SKU"),r(),u(44,$e,2,1,"th",5),C(45,"async"),a(46,"th",28),m(47,"POS"),r(),a(48,"th",29)(49,"div",30),f("click",function(){_(e);let t=l();return d(t.openModalFilter())}),x(50,"img",31),a(51,"span",32),m(52),C(53,"stringLimit"),r()()(),u(54,Qe,2,0,"th",33),a(55,"th",34),m(56,"Last Sync"),r()()(),A(57,ct,4,1,"tbody",null,L),C(59,"async"),r(),a(60,"infinite-paginator",35),C(61,"async"),f("onNextPage",function(){_(e);let t=l();return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return d(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(n&2){let e=l();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),c("ngIf",S(4,23,e.products$)),s(6),c("clearable",!1)("items",e.channelOptions),I("ngModel",e.searchFilter.ChannelID),s(5),I("ngModel",e.searchFilter.PageNumber),s(4),I("ngModel",e.searchFilter.RowCount),s(5),I("ngModel",e.searchFilter.QuantityFrom),s(2),I("ngModel",e.searchFilter.QuantityTo),s(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),c("ngIf",S(45,25,e.products$)),s(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),s(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,F),s(2),P(" ",N(53,27,e.selectedChannel==null?null:e.selectedChannel.Name,13)," "),s(2),y(e.isShowReservedColumn?54:-1),s(3),W(S(59,30,e.products$)),s(3),c("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",S(61,32,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var Ht=(()=>{let p=class p{constructor(i,t,o,h,g,j,ke,Ne){this.http=i,this.toastr=t,this.dialog=o,this.productService=h,this.authService=g,this.biggerPictureService=j,this.inventoryService=ke,this.mainPanelService=Ne,this.infinitePagination=H($),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=D.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=D.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(B(i=>{this.checkShowReservedColumn(i)}),G())}checkShowReservedColumn(i){let t=0,o;i.forEach(h=>{o=h.Variants.find(g=>D.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(i=>{this.searchFilter={RowCount:i.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:i.Filter.ChannelID},this.initSelectedChannel(),this.infinitePagination.reloadPagination(this.searchFilter),this.showToastrMarketplaceInactive(!i.Filter.IsMarketplaceAppActive)}))}showToastrMarketplaceInactive(i){i&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
1
|
+
import{a as R}from"./chunk-6NFPCNPI.js";import{a as Q}from"./chunk-XHAXYWZ7.js";import{a as Ve,b as De,c as $}from"./chunk-6OGERROP.js";import"./chunk-BVIRHZTZ.js";import{b as Ee}from"./chunk-QVCJCYVC.js";import{a as Me}from"./chunk-GP6U42SV.js";import{a as Pe,b as Fe}from"./chunk-W3POM6UQ.js";import{a as be}from"./chunk-WONQYZFA.js";import"./chunk-73DE2GZF.js";import{a as Te}from"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{a as ge,b as Ce,d as he,e as xe}from"./chunk-ACYUSHMS.js";import{g as ue}from"./chunk-HA3Y34OJ.js";import{b as ce,e as _e}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as ve,k as ye,l as Ie,m as we}from"./chunk-5RS36M3W.js";import{t as fe,u as Se}from"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as ae,c as le,h as re,m as se,o as pe,y as me}from"./chunk-O5MOPAT5.js";import{c as D,f as de}from"./chunk-2AMEIUWK.js";import{$a as c,$b as S,Ac as ne,B as z,Cc as ie,Dc as oe,Ha as F,Hb as O,Ia as s,Ib as m,Ja as T,Jb as V,Kb as P,Mb as I,Nb as w,Ob as b,Pb as Z,Q as G,Qb as q,Sb as k,X as B,Za as u,_b as C,ac as N,bc as U,da as H,ga as Y,gb as y,hb as L,jb as A,kb as W,lb as a,mb as r,nb as x,oa as _,ob as M,pa as d,pb as E,rb as v,tc as X,ub as f,vc as J,wb as l,wc as ee,zb as K,zc as te}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var Re=n=>({"text-decoration-line-through":n}),Be=n=>({"ms-10":n}),Le=n=>({"bg-gradient-warning":n});function Ae(n,p){if(n&1){let e=v();a(0,"button",39),f("click",function(){_(e);let t=l().ngIf,o=l(2);return d(o.updateStock(t))}),x(1,"i",40),m(2," Update "),r()}}function We(n,p){if(n&1){let e=v();a(0,"div"),u(1,Ae,3,0,"button",36),a(2,"button",37),f("click",function(){_(e);let t=l(2);return d(t.openExportDialog())}),x(3,"i",38),a(4,"span"),m(5,"Export"),r()()()}if(n&2){let e=p.ngIf,i=l(2);s(),c("ngIf",i.productService.hasSelectionVariant(e))}}function Oe(n,p){if(n&1&&(a(0,"span",41),x(1,"img",42),r(),m(2)),n&2){let e=p.item;s(),c("src",e==null?null:e.Img,F),s(),P(" ",e.Name," ")}}function Ue(n,p){n&1&&(a(0,"div",43)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function $e(n,p){if(n&1){let e=v();a(0,"th")(1,"input",44),b("ngModelChange",function(t){_(e);let o=l(2);return w(o.checkboxState,t)||(o.checkboxState=t),d(t)}),f("ngModelChange",function(){let t=_(e).ngIf,o=l(2);return d(o.onCheckboxStateChange(t))}),r()()}if(n&2){let e=l(2);s(),I("ngModel",e.checkboxState)}}function Qe(n,p){n&1&&(a(0,"th",33),m(1," Reserved "),r())}function je(n,p){}function ze(n,p){if(n&1){let e=v();a(0,"input",63),b("ngModelChange",function(t){_(e);let o=l(3).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),f("ngModelChange",function(){_(e);let t=l(3).$implicit,o=l(2);return d(o.onCheckboxStateProduct(t))}),r()}if(n&2){let e=l(3).$implicit;I("ngModel",e.selected)}}function Ge(n,p){if(n&1){let e=v();a(0,"img",64),f("click",function(t){_(e);let o=l(3).$implicit,h=l(2);return d(h.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(n&2){let e=l(3).$implicit;K("src",e==null?null:e.ThumbnailUrl,F)}}function He(n,p){n&1&&x(0,"img",60)}function Ye(n,p){if(n&1&&(x(0,"br"),a(1,"div",65),x(2,"i",66),a(3,"small"),m(4),r()()),n&2){let e=l(3).$implicit;s(4),P("(",e==null?null:e.Category,")")}}function Ke(n,p){if(n&1&&(a(0,"td",56)(1,"div",15),u(2,ze,1,1,"input",57),a(3,"div",58),u(4,Ge,1,1,"img",59)(5,He,1,0,"img",60),r()()(),a(6,"td",61)(7,"span",62),m(8),r(),u(9,Ye,5,1),r()),n&2){let e=l(2).$implicit,i=l(2);c("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),c("ngClass",k(7,Be,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),c("rowSpan",e==null?null:e.Variants.length),s(2),V(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=i.guidEmpty?9:-1)}}function Ze(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l(2).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l(2).$implicit;I("ngModel",e.selected)}}function qe(n,p){if(n&1&&u(0,Ze,1,1,"input",50),n&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Xe(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l().$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l().$implicit;I("ngModel",e.selected)}}function Je(n,p){n&1&&(a(0,"div",67),m(1," Not Found "),r())}function et(n,p){if(n&1&&(a(0,"div")(1,"span",68),m(2),C(3,"number"),r(),m(4," => "),a(5,"span",69),m(6),C(7,"number"),r()()),n&2){let e=l().$implicit;s(2),P(" ",S(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(S(7,4,e==null?null:e.Inventory))}}function tt(n,p){if(n&1&&(m(0),C(1,"number")),n&2){let e=l().$implicit;P(" ",S(1,1,e==null?null:e.Inventory)," ")}}function nt(n,p){if(n&1&&(M(0),a(1,"div",70)(2,"a",71),x(3,"i",72),r()(),E()),n&2){let e=l().$implicit,i=l(3);s(2),c("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F)}}function it(n,p){if(n&1){let e=v();a(0,"span",77),f("click",function(){let t=_(e).ngIf,o=l(2).$implicit,h=l().$implicit,g=l(2);return d(g.openTableDialog(h,o,t))}),m(1),C(2,"number"),r()}if(n&2){let e=l(2).$implicit;s(),P(" ",S(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function ot(n,p){if(n&1){let e=v();a(0,"td",73)(1,"div",51)(2,"div"),u(3,it,3,3,"span",74),C(4,"async"),r(),a(5,"div",70)(6,"a",71),x(7,"i",72),r()(),a(8,"div",70)(9,"span",75),f("click",function(){_(e);let t=l().$implicit,o=l(3);return d(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",76),r()()()()}if(n&2){let e=l().$implicit,i=l(3);c("ngClass",k(5,Le,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),c("ngIf",S(4,3,i.products$)),s(3),c("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,F)}}function at(n,p){if(n&1&&(M(0),a(1,"span",78),m(2),C(3,"number"),r(),E()),n&2){let e=l(2).$implicit;s(2),P(" (",S(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function lt(n,p){n&1&&m(0," - ")}function rt(n,p){if(n&1&&(M(0),a(1,"td",47),u(2,at,4,3,"ng-container",55)(3,lt,1,0,"ng-template",null,1,U),r(),E()),n&2){let e=O(4),i=l().$implicit;s(2),c("ngIf",i==null||i.Channel[0]==null?null:i.Channel[0].InventoryReserved)("ngIfElse",e)}}function st(n,p){n&1&&(M(0),m(1," - "),E())}function pt(n,p){if(n&1&&(a(0,"span",79),C(1,"date"),m(2),C(3,"date"),r()),n&2){let e=l().$implicit;c("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),P(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(n,p){if(n&1&&(a(0,"tr"),u(1,Ke,10,9),a(2,"td",46),m(3),r(),a(4,"td",47)(5,"span",48),m(6),r()(),a(7,"td",49),u(8,qe,1,1)(9,Xe,1,1,"input",50),r(),a(10,"td")(11,"div",51),u(12,Je,2,0,"div",52)(13,et,8,6,"div")(14,tt,2,3)(15,nt,4,1,"ng-container",5),r()(),u(16,ot,11,7,"td",53)(17,rt,5,2,"ng-container",5),a(18,"td",54),u(19,st,2,0,"ng-container",55)(20,pt,4,8,"ng-template",null,0,U),r()()),n&2){let e=p.$implicit,i=p.index,t=O(21),o=l(3);s(),y(i==0?1:-1),s(2),V(e==null?null:e.Model),s(2),c("matTooltip",e.Discontinued?o.discontinuedVariantMsg:"")("ngClass",k(14,Re,e.Discontinued)),s(),V(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),c("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),c("ngIf",(e==null?null:e.I)!=null),s(),c("ngIf",e==null?null:e.Channel),s(),c("ngIf",o.isShowReservedColumn),s(2),c("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==o.minDate)("ngIfElse",t)}}function ct(n,p){if(n&1&&(a(0,"tbody"),A(1,je,0,0,null,null,L),u(3,mt,22,16,"tr",45),r()),n&2){let e=p.$implicit;s(),W(e.Variants),s(2),c("ngForOf",e.Variants)}}function _t(n,p){if(n&1){let e=v();a(0,"mainpanel",3),f("onSubmit",function(t){_(e);let o=l();return d(o.onSearch(t))}),a(1,"actions")(2,"div",4),u(3,We,6,1,"div",5),C(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),m(8,"Channel"),r(),a(9,"ng-select",7),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),d(t)}),u(10,Oe,3,2,"ng-template",8),r()(),a(11,"div",9)(12,"label",10),m(13,"PageNumber"),r(),a(14,"input",11),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),d(t)}),r()(),a(15,"div",9)(16,"label",12),m(17,"Page Size"),r(),a(18,"input",13),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),d(t)}),r()(),a(19,"div",9)(20,"label",14),m(21,"Quantity From - To"),r(),a(22,"div",15)(23,"input",16),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),d(t)}),r(),m(24," - "),a(25,"input",17),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),d(t)}),r()()()(),a(26,"content")(27,"div",18)(28,"div",19)(29,"div",20),u(30,Ue,3,0,"div",21),a(31,"table",22)(32,"thead",23)(33,"tr")(34,"th",24),m(35," Product "),x(36,"br"),a(37,"mat-slide-toggle",25),f("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,d(t.onShowDifferenceStock())}),a(38,"small",14),m(39,"FILTER DIFFERENT INVENTORY"),r()()(),a(40,"th",26),m(41,"Variant"),r(),a(42,"th",27),m(43,"SKU"),r(),u(44,$e,2,1,"th",5),C(45,"async"),a(46,"th",28),m(47,"POS"),r(),a(48,"th",29)(49,"div",30),f("click",function(){_(e);let t=l();return d(t.openModalFilter())}),x(50,"img",31),a(51,"span",32),m(52),C(53,"stringLimit"),r()()(),u(54,Qe,2,0,"th",33),a(55,"th",34),m(56,"Last Sync"),r()()(),A(57,ct,4,1,"tbody",null,L),C(59,"async"),r(),a(60,"infinite-paginator",35),C(61,"async"),f("onNextPage",function(){_(e);let t=l();return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return d(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(n&2){let e=l();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),c("ngIf",S(4,23,e.products$)),s(6),c("clearable",!1)("items",e.channelOptions),I("ngModel",e.searchFilter.ChannelID),s(5),I("ngModel",e.searchFilter.PageNumber),s(4),I("ngModel",e.searchFilter.RowCount),s(5),I("ngModel",e.searchFilter.QuantityFrom),s(2),I("ngModel",e.searchFilter.QuantityTo),s(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),c("ngIf",S(45,25,e.products$)),s(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),s(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,F),s(2),P(" ",N(53,27,e.selectedChannel==null?null:e.selectedChannel.Name,13)," "),s(2),y(e.isShowReservedColumn?54:-1),s(3),W(S(59,30,e.products$)),s(3),c("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",S(61,32,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var Ht=(()=>{let p=class p{constructor(i,t,o,h,g,j,ke,Ne){this.http=i,this.toastr=t,this.dialog=o,this.productService=h,this.authService=g,this.biggerPictureService=j,this.inventoryService=ke,this.mainPanelService=Ne,this.infinitePagination=H($),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=D.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=D.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(B(i=>{this.checkShowReservedColumn(i)}),G())}checkShowReservedColumn(i){let t=0,o;i.forEach(h=>{o=h.Variants.find(g=>D.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(i=>{this.searchFilter={RowCount:i.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:i.Filter.ChannelID},this.initSelectedChannel(),this.infinitePagination.reloadPagination(this.searchFilter),this.showToastrMarketplaceInactive(!i.Filter.IsMarketplaceAppActive)}))}showToastrMarketplaceInactive(i){i&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(i=>i.ID==this.searchFilter.ChannelID)}onSearch(i){this.searchFilter.text=i,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(i){let t=this.productService.selectedVariantProduct(i);if(t.length>0){let o=t.map(g=>({ID:g.ID,Code:g.Code,Inventory:g.Inventory})),h={ListChannelID:[this.searchFilter.ChannelID],List:o};this.http.post("/api/Inventory/UpdateChannel",h).subscribe(g=>{this.searchFilter.PageNumber=1,this.infinitePagination.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(g)})}}handlingUpdateStock(i){if(i[0]?.StatusProduct){let t=i[0].StatusProduct.Fail_list,o=i[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",o,t)}else this.toastr.error(i[0]?.Exception,"Error")}refreshInventory(i,t,o,h){let g={ChannelItemID:i,ChannelVariationID:t,ChannelID:o,VariantID:h};this.http.post("/api/Inventory/RefreshInventoryChannel",g).subscribe(j=>{this.toastr.success("Successfully updated","Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(i){i.Variants=i.Variants.map(t=>(t.Inventory>=0&&(t.selected=i.selected),t))}onCheckboxStateChange(i){i=i.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o)),t))}openTableDialog(i,t,o){this.dialog.open(Ve,{data:{Name:i.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:i.ChannelItemID}}).afterClosed().pipe(z(g=>D.IsNotEmpty(g))).subscribe(g=>{this.updateItemAfterDialog(g,o)})}updateItemAfterDialog(i,t){let o={ID:i.ChannelID,ChannelItemID:i.ChannelItemID,ChannelVariantID:i.ChannelVariationID,NewQuantity:parseFloat(i.Inventory),VariantID:i.ID,SKU:i.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",o).subscribe(h=>{this.searchFilter.PageNumber=1,this.infinitePagination.reloadPagination(this.searchFilter),this.handlingUpdateStock([h])})}openExportDialog(){this.dialog.open(Ee,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=Q.DIFFERENCE:this.searchFilter.filterModel=Q.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}onZoomImage(i,t){this.biggerPictureService.openBiggerPicture(i,t)}};p.\u0275fac=function(t){return new(t||p)(T(_e),T(ce),T(ve),T(be),T(ue),T(Te),T(R),T(ye))},p.\u0275cmp=Y({type:p,selectors:[["app-single-channel-comparison"]],standalone:!0,features:[Z([$,R]),q],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","ng-select",1,"fw-bold"],["id","ng-select","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"me-2"],[2,"width","18px",3,"src"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[4,"ngFor","ngForOf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(t,o){t&1&&(u(0,_t,62,34,"mainpanel",2),C(1,"async")),t&2&&c("ngIf",S(1,1,o.loader$))},dependencies:[oe,X,J,ee,te,ie,ne,we,Ie,xe,he,ge,Ce,me,le,pe,ae,re,se,Me,De,de,Fe,Pe,Se,fe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let n=p;return n})();export{Ht as SingleChannelComparisonComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-6SHHVYL6.js";import{a as Ue}from"./chunk-3GFLGT6Y.js";import"./chunk-P6UIWSMI.js";import{a as Ke}from"./chunk-6U6JR5K6.js";import{a as E}from"./chunk-BVIRHZTZ.js";import"./chunk-TCYAJ4HK.js";import"./chunk-E3LCGTRI.js";import{b as Je}from"./chunk-4QK7Y7R2.js";import{c as Ze}from"./chunk-73DE2GZF.js";import{b as Ye}from"./chunk-4YCZLOHQ.js";import{c as qe}from"./chunk-RVVTVU4B.js";import{a as f}from"./chunk-WMX63NFG.js";import{g as Qe}from"./chunk-6NTRXLMW.js";import{a as Be,d as Re,e as $}from"./chunk-ACYUSHMS.js";import{a as Pe,b as ze,g as Le}from"./chunk-KQLZLMZG.js";import"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{a as Ve,g as He,j as J,m as Ge}from"./chunk-5RS36M3W.js";import{t as We,u as F}from"./chunk-CTKEWRX4.js";import{F as je,K as Z,u as $e,x as Fe}from"./chunk-GXHE2CDH.js";import{h as Ee,m as De,y as U,z as ke}from"./chunk-O5MOPAT5.js";import{e as Ne,f as Ae}from"./chunk-2AMEIUWK.js";import{$a as d,$b as Q,Ac as Ie,B as ee,Cb as fe,Da as le,Db as ue,Dc as M,Eb as _e,H as te,Ha as se,Hb as L,Ia as r,Ib as p,Ja as g,Jb as y,K as ie,Kb as w,Oa as de,Pa as ce,Qb as B,V as ne,Vc as Te,Xc as Oe,Ya as me,Yc as we,Za as h,Zc as Y,_b as q,aa as u,ab as pe,bb as z,bc as R,c as H,da as x,db as G,ga as v,gb as ge,gc as be,ha as _,ia as ae,kc as V,la as oe,lb as l,mb as s,nb as b,oa as I,ob as N,pa as T,pb as A,pc as Ce,q as k,rb as he,rc as ve,tc as ye,ub as O,vc as Me,wb as c,wc as Se,ya as re,za as P,zc as xe}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var j=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[E.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[E.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[E.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[E.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fa-solid fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${Pe.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var rt=0,Xe="mat-badge-content",W=new Set,lt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!0,features:[B],decls:0,vars:0,template:function(n,a){},styles:[".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}"],encapsulation:2,changeDetection:0});let t=e;return t})(),et=(()=>{let e=class e{get color(){return this._color}set color(i){this._setColor(i),this._color=i}get content(){return this._content}set content(i){this._updateRenderedContent(i)}get description(){return this._description}set description(i){this._updateDescription(i)}constructor(i,n,a,m,S){this._ngZone=i,this._elementRef=n,this._ariaDescriber=a,this._renderer=m,this._animationMode=S,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=rt++,this._isInitialized=!1,this._interactivityChecker=x(Fe),this._document=x(ve);let C=x(be);if(!W.has(C)){W.add(C);let X=Ce(lt,{environmentInjector:x(oe)});C.onDestroy(()=>{W.delete(C),W.size===0&&X.destroy()})}}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",`mat-badge-content-${this._id}`),i.setAttribute("aria-hidden","true"),i.classList.add(Xe),this._animationMode==="NoopAnimations"&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Xe}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}};e.\u0275fac=function(n){return new(n||e)(g(ce),g(re),g($e),g(de),g(le,8))},e.\u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&z("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",V],disabled:[2,"matBadgeDisabled","disabled",V],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",V]},standalone:!0,features:[me]});let t=e;return t})(),tt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[je,Z,Z]});let t=e;return t})();function dt(t,e){if(t&1&&(N(0),l(1,"p",23),p(2),s(),A()),t&2){let o=c(3).$implicit;r(2),w(" ",o.Title," ")}}function ct(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function mt(t,e){if(t&1&&(l(0,"a",22),b(1,"i"),h(2,dt,3,1,"ng-container",20)(3,ct,2,1,"ng-template",null,1,R),s()),t&2){let o=L(4),i=c(2).$implicit;d("href",i.Url,se),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function pt(t,e){if(t&1&&(N(0),h(1,mt,5,5,"a",21),A()),t&2){let o=c().$implicit;r(),d("ngxPermissionsOnly",o.Roles)}}function gt(t,e){if(t&1&&(l(0,"p",23),p(1),s()),t&2){let o=c(4).$implicit;r(),w(" ",o.Title," ")}}function ht(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(4).$implicit;r(),y(o.Title)}}function ft(t,e){if(t&1&&(N(0),h(1,gt,2,1,"p",23),q(2,"async"),h(3,ht,2,1,"p"),A()),t&2){let o=c(4);r(),ge(Q(2,1,o.notifications$)!=0?1:3)}}function ut(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function _t(t,e){if(t&1&&(l(0,"a",25),b(1,"i"),h(2,ft,4,3,"ng-container",20)(3,ut,2,1,"ng-template",null,2,R),s()),t&2){let o=L(4),i=c(2).$implicit,n=c();d("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function bt(t,e){if(t&1&&h(0,_t,5,6,"a",24),t&2){let o=c().$implicit;d("ngxPermissionsOnly",o.Roles)}}function Ct(t,e){if(t&1&&(l(0,"li",19),h(1,pt,2,1,"ng-container",20)(2,bt,1,1,"ng-template",null,0,R),s()),t&2){let o=e.$implicit,i=L(3);r(),d("ngIf",o.ExternalLink)("ngIfElse",i)}}var it=(()=>{let e=class e{constructor(i,n,a,m){this.toggleSidebarService=i,this.notificationService=n,this.decodeTokenService=a,this.authService=m,this.Menu={},this.isCollapseSidebar=!1,this.token=a.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new j().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(k(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let n,a=i.split(" ");return a.length==1?n=a[0].substring(0,2):n=a.shift().charAt(0)+a.pop().charAt(0),n}}};e.\u0275fac=function(n){return new(n||e)(g(Ve),g(Ue),g(ze),g(Le))},e.\u0275cmp=v({type:e,selectors:[["app-menu"]],decls:23,vars:9,consts:[["DEFAULT_ROUTE",""],["NO_BADGE",""],["WITHOUT_BADGE",""],[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(n,a){n&1&&(l(0,"div",3),q(1,"async"),l(2,"div",4)(3,"button",5),O("click",function(){return a.onCallapseSidebar()}),b(4,"i",6),s(),l(5,"div",7)(6,"div",8)(7,"a",9),p(8),s(),l(9,"div",10)(10,"div",11),p(11),s(),b(12,"div",12),l(13,"a",13),O("click",function(){return a.onLogout()}),b(14,"i",14),p(15,"\xA0 "),l(16,"span"),p(17," Log Out"),s()()()()(),l(18,"div",15)(19,"ul",16),h(20,Ct,4,2,"li",17),s()()(),l(21,"div",18),b(22,"router-outlet"),s()()),n&2&&(z("nav-open",Q(1,7,a.toggleState$)),r(2),d("ngClass",a.isCollapseSidebar?"collapses":""),r(2),d("ngClass",a.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),w(" ",a.storeName," "),r(3),w(" ",a.token==null?null:a.token.LID," "),r(9),d("ngForOf",a.Menu))},dependencies:[ye,Me,Se,Te,Oe,we,We,et,Ne,xe],styles:["@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}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let t=e;return t})();var vt=[{path:"",component:it,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-2FI33IHG.js").then(t=>t.DashboardModule),canActivate:[f],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("./chunk-6O64LIQD.js").then(t=>t.ProductModule),canActivate:[f],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("./chunk-4XEKFO4Z.js").then(t=>t.InventoryRoutingModule),canActivate:[f],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("./chunk-I2PMBLWD.js").then(t=>t.PriceRoutingModule),canActivate:[f],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("./chunk-DOBOYL5B.js").then(t=>t.OrdersModule),canActivate:[f],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-TADFTT3Q.js").then(t=>t.ReportModule),canActivate:[f],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("./chunk-5MPSOGAH.js").then(t=>t.LogisticModule),canActivate:[f],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("./chunk-34GBFRXS.js").then(t=>t.ChannelsModule),canActivate:[f],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("./chunk-RBKSYVXO.js").then(t=>t.LogsModule),canActivate:[f],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("./chunk-STTZD5ZT.js").then(t=>t.NotificationModule),canActivate:[f],data:{title:"Push Notification"}}]}],nt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[Y.forChild(vt),Y]});let t=e;return t})();var Mt=["selectId"];function St(t,e){if(t&1&&(l(0,"span",3),p(1),s()),t&2){let o=e.item,i=c();d("title",o[i.bindLabel]),r(),y(o[i.bindLabel])}}var at=(()=>{let e=class e{set items(i){this.ngSelectInfiniteScroll.data=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(i){this._selected=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new K,this.selectedChange=new P,this.selectedLabel=new P,this.onOpen=new P}onOpenSelect(){this.onOpen.emit()}onSelectChange(i){i?(this.selectedChange.emit(i[this.bindValue]),this.selectedLabel.emit(i[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-select-infinite"]],viewQuery:function(n,a){if(n&1&&fe(Mt,7),n&2){let m;ue(m=_e())&&(a.ngSelectElement=m.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},standalone:!0,features:[B],decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(n,a){if(n&1){let m=he();l(0,"ng-select",1,0),O("clear",function(){return I(m),T(a.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return I(m),T(a.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return I(m),T(a.onOpenSelect())})("change",function(C){return I(m),T(a.onSelectChange(C))}),h(2,St,2,2,"ng-template",2),s()}n&2&&(pe("width",a.width),d("appendTo",a.parent)("disabled",a.disabled)("virtualScroll",!0)("typeahead",a.ngSelectInfiniteScroll.input$)("items",a.ngSelectInfiniteScroll.bufferData)("bindLabel",a.bindLabel)("bindValue",a.bindValue)("placeholder",a.placeholder)("ngModel",a.selected)("clearable",a.clearable))},dependencies:[M,$,Re,Be,U,Ee,De]});let t=e;return t})(),K=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new H,this._destroy$=new H,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(te(200),ie(),k(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),ee(e=>e!==void 0),ne(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let o=-1,i;return this._data.filter(a=>(i=JSON.stringify(a).toLowerCase(),o=i.indexOf(e),o!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,o){if(Ke.IsNotEmpty(e)){let i=this._data.filter(n=>n[o].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=i.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,o=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(o)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var ot=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[M,U,He,qe,Ze,Qe,Ye,Je,F,J,at,$,ke]});let t=e;return t})();var _n=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({providers:[Ie],imports:[M,nt,Ge,F,ot,tt,Ae.forChild()]});let t=e;return t})();export{_n as MenuModule};
|
|
1
|
+
import"./chunk-6SHHVYL6.js";import{a as Ue}from"./chunk-FUH4AMYX.js";import"./chunk-P6UIWSMI.js";import{a as Ke}from"./chunk-6U6JR5K6.js";import{a as E}from"./chunk-BVIRHZTZ.js";import"./chunk-TCYAJ4HK.js";import"./chunk-E3LCGTRI.js";import{b as Je}from"./chunk-4QK7Y7R2.js";import{c as Ze}from"./chunk-73DE2GZF.js";import{b as Ye}from"./chunk-4YCZLOHQ.js";import{c as qe}from"./chunk-RVVTVU4B.js";import{a as f}from"./chunk-MOWBKS7Y.js";import{g as Qe}from"./chunk-6NTRXLMW.js";import{a as Be,d as Re,e as $}from"./chunk-ACYUSHMS.js";import{a as Pe,b as ze,g as Le}from"./chunk-HA3Y34OJ.js";import"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{a as Ve,g as He,j as J,m as Ge}from"./chunk-5RS36M3W.js";import{t as We,u as F}from"./chunk-CTKEWRX4.js";import{F as je,K as Z,u as $e,x as Fe}from"./chunk-GXHE2CDH.js";import{h as Ee,m as De,y as U,z as ke}from"./chunk-O5MOPAT5.js";import{e as Ne,f as Ae}from"./chunk-2AMEIUWK.js";import{$a as d,$b as Q,Ac as Ie,B as ee,Cb as fe,Da as le,Db as ue,Dc as M,Eb as _e,H as te,Ha as se,Hb as L,Ia as r,Ib as p,Ja as g,Jb as y,K as ie,Kb as w,Oa as de,Pa as ce,Qb as B,V as ne,Vc as Te,Xc as Oe,Ya as me,Yc as we,Za as h,Zc as Y,_b as q,aa as u,ab as pe,bb as z,bc as R,c as H,da as x,db as G,ga as v,gb as ge,gc as be,ha as _,ia as ae,kc as V,la as oe,lb as l,mb as s,nb as b,oa as I,ob as N,pa as T,pb as A,pc as Ce,q as k,rb as he,rc as ve,tc as ye,ub as O,vc as Me,wb as c,wc as Se,ya as re,za as P,zc as xe}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var j=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[E.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[E.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[E.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[E.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fa-solid fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${Pe.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var rt=0,Xe="mat-badge-content",W=new Set,lt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!0,features:[B],decls:0,vars:0,template:function(n,a){},styles:[".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}"],encapsulation:2,changeDetection:0});let t=e;return t})(),et=(()=>{let e=class e{get color(){return this._color}set color(i){this._setColor(i),this._color=i}get content(){return this._content}set content(i){this._updateRenderedContent(i)}get description(){return this._description}set description(i){this._updateDescription(i)}constructor(i,n,a,m,S){this._ngZone=i,this._elementRef=n,this._ariaDescriber=a,this._renderer=m,this._animationMode=S,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=rt++,this._isInitialized=!1,this._interactivityChecker=x(Fe),this._document=x(ve);let C=x(be);if(!W.has(C)){W.add(C);let X=Ce(lt,{environmentInjector:x(oe)});C.onDestroy(()=>{W.delete(C),W.size===0&&X.destroy()})}}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",`mat-badge-content-${this._id}`),i.setAttribute("aria-hidden","true"),i.classList.add(Xe),this._animationMode==="NoopAnimations"&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Xe}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}};e.\u0275fac=function(n){return new(n||e)(g(ce),g(re),g($e),g(de),g(le,8))},e.\u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&z("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",V],disabled:[2,"matBadgeDisabled","disabled",V],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",V]},standalone:!0,features:[me]});let t=e;return t})(),tt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[je,Z,Z]});let t=e;return t})();function dt(t,e){if(t&1&&(N(0),l(1,"p",23),p(2),s(),A()),t&2){let o=c(3).$implicit;r(2),w(" ",o.Title," ")}}function ct(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function mt(t,e){if(t&1&&(l(0,"a",22),b(1,"i"),h(2,dt,3,1,"ng-container",20)(3,ct,2,1,"ng-template",null,1,R),s()),t&2){let o=L(4),i=c(2).$implicit;d("href",i.Url,se),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function pt(t,e){if(t&1&&(N(0),h(1,mt,5,5,"a",21),A()),t&2){let o=c().$implicit;r(),d("ngxPermissionsOnly",o.Roles)}}function gt(t,e){if(t&1&&(l(0,"p",23),p(1),s()),t&2){let o=c(4).$implicit;r(),w(" ",o.Title," ")}}function ht(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(4).$implicit;r(),y(o.Title)}}function ft(t,e){if(t&1&&(N(0),h(1,gt,2,1,"p",23),q(2,"async"),h(3,ht,2,1,"p"),A()),t&2){let o=c(4);r(),ge(Q(2,1,o.notifications$)!=0?1:3)}}function ut(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function _t(t,e){if(t&1&&(l(0,"a",25),b(1,"i"),h(2,ft,4,3,"ng-container",20)(3,ut,2,1,"ng-template",null,2,R),s()),t&2){let o=L(4),i=c(2).$implicit,n=c();d("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function bt(t,e){if(t&1&&h(0,_t,5,6,"a",24),t&2){let o=c().$implicit;d("ngxPermissionsOnly",o.Roles)}}function Ct(t,e){if(t&1&&(l(0,"li",19),h(1,pt,2,1,"ng-container",20)(2,bt,1,1,"ng-template",null,0,R),s()),t&2){let o=e.$implicit,i=L(3);r(),d("ngIf",o.ExternalLink)("ngIfElse",i)}}var it=(()=>{let e=class e{constructor(i,n,a,m){this.toggleSidebarService=i,this.notificationService=n,this.decodeTokenService=a,this.authService=m,this.Menu={},this.isCollapseSidebar=!1,this.token=a.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new j().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(k(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let n,a=i.split(" ");return a.length==1?n=a[0].substring(0,2):n=a.shift().charAt(0)+a.pop().charAt(0),n}}};e.\u0275fac=function(n){return new(n||e)(g(Ve),g(Ue),g(ze),g(Le))},e.\u0275cmp=v({type:e,selectors:[["app-menu"]],decls:23,vars:9,consts:[["DEFAULT_ROUTE",""],["NO_BADGE",""],["WITHOUT_BADGE",""],[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(n,a){n&1&&(l(0,"div",3),q(1,"async"),l(2,"div",4)(3,"button",5),O("click",function(){return a.onCallapseSidebar()}),b(4,"i",6),s(),l(5,"div",7)(6,"div",8)(7,"a",9),p(8),s(),l(9,"div",10)(10,"div",11),p(11),s(),b(12,"div",12),l(13,"a",13),O("click",function(){return a.onLogout()}),b(14,"i",14),p(15,"\xA0 "),l(16,"span"),p(17," Log Out"),s()()()()(),l(18,"div",15)(19,"ul",16),h(20,Ct,4,2,"li",17),s()()(),l(21,"div",18),b(22,"router-outlet"),s()()),n&2&&(z("nav-open",Q(1,7,a.toggleState$)),r(2),d("ngClass",a.isCollapseSidebar?"collapses":""),r(2),d("ngClass",a.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),w(" ",a.storeName," "),r(3),w(" ",a.token==null?null:a.token.LID," "),r(9),d("ngForOf",a.Menu))},dependencies:[ye,Me,Se,Te,Oe,we,We,et,Ne,xe],styles:["@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}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let t=e;return t})();var vt=[{path:"",component:it,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-2FI33IHG.js").then(t=>t.DashboardModule),canActivate:[f],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("./chunk-US5WZ2ZS.js").then(t=>t.ProductModule),canActivate:[f],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("./chunk-6IOKKIXK.js").then(t=>t.InventoryRoutingModule),canActivate:[f],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("./chunk-4HHTQAPY.js").then(t=>t.PriceRoutingModule),canActivate:[f],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("./chunk-M64SKYWS.js").then(t=>t.OrdersModule),canActivate:[f],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-MM4QZFVY.js").then(t=>t.ReportModule),canActivate:[f],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("./chunk-IZXSCJ3N.js").then(t=>t.LogisticModule),canActivate:[f],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("./chunk-CHSTGM5Y.js").then(t=>t.ChannelsModule),canActivate:[f],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("./chunk-R5RWR7T6.js").then(t=>t.LogsModule),canActivate:[f],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("./chunk-R7JZ77UO.js").then(t=>t.NotificationModule),canActivate:[f],data:{title:"Push Notification"}}]}],nt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[Y.forChild(vt),Y]});let t=e;return t})();var Mt=["selectId"];function St(t,e){if(t&1&&(l(0,"span",3),p(1),s()),t&2){let o=e.item,i=c();d("title",o[i.bindLabel]),r(),y(o[i.bindLabel])}}var at=(()=>{let e=class e{set items(i){this.ngSelectInfiniteScroll.data=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(i){this._selected=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new K,this.selectedChange=new P,this.selectedLabel=new P,this.onOpen=new P}onOpenSelect(){this.onOpen.emit()}onSelectChange(i){i?(this.selectedChange.emit(i[this.bindValue]),this.selectedLabel.emit(i[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-select-infinite"]],viewQuery:function(n,a){if(n&1&&fe(Mt,7),n&2){let m;ue(m=_e())&&(a.ngSelectElement=m.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},standalone:!0,features:[B],decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(n,a){if(n&1){let m=he();l(0,"ng-select",1,0),O("clear",function(){return I(m),T(a.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return I(m),T(a.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return I(m),T(a.onOpenSelect())})("change",function(C){return I(m),T(a.onSelectChange(C))}),h(2,St,2,2,"ng-template",2),s()}n&2&&(pe("width",a.width),d("appendTo",a.parent)("disabled",a.disabled)("virtualScroll",!0)("typeahead",a.ngSelectInfiniteScroll.input$)("items",a.ngSelectInfiniteScroll.bufferData)("bindLabel",a.bindLabel)("bindValue",a.bindValue)("placeholder",a.placeholder)("ngModel",a.selected)("clearable",a.clearable))},dependencies:[M,$,Re,Be,U,Ee,De]});let t=e;return t})(),K=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new H,this._destroy$=new H,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(te(200),ie(),k(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),ee(e=>e!==void 0),ne(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let o=-1,i;return this._data.filter(a=>(i=JSON.stringify(a).toLowerCase(),o=i.indexOf(e),o!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,o){if(Ke.IsNotEmpty(e)){let i=this._data.filter(n=>n[o].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=i.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,o=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(o)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var ot=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[M,U,He,qe,Ze,Qe,Ye,Je,F,J,at,$,ke]});let t=e;return t})();var _n=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({providers:[Ie],imports:[M,nt,Ge,F,ot,tt,Ae.forChild()]});let t=e;return t})();export{_n as MenuModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as N}from"./chunk-6NFPCNPI.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-6OGERROP.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-QVCJCYVC.js";import{a as De}from"./chunk-GP6U42SV.js";import{a as Ve,b as Te}from"./chunk-W3POM6UQ.js";import{a as be}from"./chunk-WONQYZFA.js";import"./chunk-73DE2GZF.js";import{a as Fe}from"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-ACYUSHMS.js";import{g as ue}from"./chunk-KQLZLMZG.js";import{b as de,e as ge}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as Ie,k as we,l as ye,m as ve}from"./chunk-5RS36M3W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-O5MOPAT5.js";import{c as me,e as he,f as Ce}from"./chunk-2AMEIUWK.js";import{$a as p,$b as T,B as A,Cc as E,Dc as ie,Gc as ae,Ha as D,Hb as J,Ia as l,Ib as d,Ja as f,Jb as B,Kb as F,Mb as I,Nb as w,Ob as y,Pb as Z,Q as $,Qb as Q,Sb as V,X as j,Za as h,_b as v,ac as X,bc as Y,da as z,ga as G,gb as S,hb as k,jb as L,kb as R,lb as o,mb as c,nb as P,oa as _,ob as q,pa as m,pb as K,rb as x,tc as ee,ub as u,wb as r,wc as te,zb as H,zc as ne}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list.length>0||e.failure_list.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{zt as PriceSingleChannelComponent};
|
|
1
|
+
import{a as N}from"./chunk-6NFPCNPI.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-6OGERROP.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-QVCJCYVC.js";import{a as De}from"./chunk-GP6U42SV.js";import{a as Ve,b as Te}from"./chunk-W3POM6UQ.js";import{a as be}from"./chunk-WONQYZFA.js";import"./chunk-73DE2GZF.js";import{a as Fe}from"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-ACYUSHMS.js";import{g as ue}from"./chunk-HA3Y34OJ.js";import{b as de,e as ge}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as Ie,k as we,l as ye,m as ve}from"./chunk-5RS36M3W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-O5MOPAT5.js";import{c as me,e as he,f as Ce}from"./chunk-2AMEIUWK.js";import{$a as p,$b as T,B as A,Cc as E,Dc as ie,Gc as ae,Ha as D,Hb as J,Ia as l,Ib as d,Ja as f,Jb as B,Kb as F,Mb as I,Nb as w,Ob as y,Pb as Z,Q as $,Qb as Q,Sb as V,X as j,Za as h,_b as v,ac as X,bc as Y,da as z,ga as G,gb as S,hb as k,jb as L,kb as R,lb as o,mb as c,nb as P,oa as _,ob as q,pa as m,pb as K,rb as x,tc as ee,ub as u,wb as r,wc as te,zb as H,zc as ne}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list.length>0||e.failure_list.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{zt as PriceSingleChannelComponent};
|