marketplacepos 5.27.0 → 5.30.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.
Files changed (37) hide show
  1. package/Marketplace/{chunk-AOBGCH4T.js → chunk-2QZHXMW7.js} +1 -1
  2. package/Marketplace/{chunk-ZASKXRZO.js → chunk-6CZNSZHY.js} +1 -1
  3. package/Marketplace/{chunk-TMLN53D4.js → chunk-6HCYY3MB.js} +1 -1
  4. package/Marketplace/{chunk-2CTM3NU6.js → chunk-72DNVSRZ.js} +1 -1
  5. package/Marketplace/{chunk-3X6WYIZH.js → chunk-C34UZZ2Z.js} +1 -1
  6. package/Marketplace/{chunk-O2VYLVWY.js → chunk-CQDJKP6M.js} +1 -1
  7. package/Marketplace/{chunk-L2DBJKC2.js → chunk-GDF2EJQJ.js} +1 -1
  8. package/Marketplace/{chunk-DAGO5YDD.js → chunk-GWLKQHCE.js} +1 -1
  9. package/Marketplace/{chunk-KI2CZLVL.js → chunk-H55NKEAI.js} +1 -1
  10. package/Marketplace/{chunk-SAM36DJ5.js → chunk-IOAFNXIL.js} +1 -1
  11. package/Marketplace/{chunk-SSTTF3FQ.js → chunk-KEEQMGZY.js} +1 -1
  12. package/Marketplace/{chunk-LUSDZAH6.js → chunk-KKOQDUQE.js} +1 -1
  13. package/Marketplace/{chunk-KLDZNZ5W.js → chunk-KLH4UKSN.js} +1 -1
  14. package/Marketplace/{chunk-6DPEMYNN.js → chunk-KV5BTGHC.js} +1 -1
  15. package/Marketplace/{chunk-RHDOT4EP.js → chunk-LCI6K3VT.js} +1 -1
  16. package/Marketplace/{chunk-F2DG2ON6.js → chunk-LVBW3RA4.js} +2 -2
  17. package/Marketplace/{chunk-FBH4NQ2Z.js → chunk-NFDUCHYG.js} +1 -1
  18. package/Marketplace/{chunk-GWQEULN7.js → chunk-Q5XEFS4T.js} +1 -1
  19. package/Marketplace/{chunk-3LZZZODB.js → chunk-QAZOA5GX.js} +1 -1
  20. package/Marketplace/{chunk-277CLJYZ.js → chunk-QJMMLMRF.js} +1 -1
  21. package/Marketplace/{chunk-WDRTJ2IL.js → chunk-QOZFJ6NW.js} +1 -1
  22. package/Marketplace/{chunk-J4PVPKPU.js → chunk-RAU34TVA.js} +1 -1
  23. package/Marketplace/{chunk-PGJ2WYXK.js → chunk-RD7TNSQ6.js} +1 -1
  24. package/Marketplace/{chunk-BCYGIHIC.js → chunk-RO462W6B.js} +1 -1
  25. package/Marketplace/chunk-SXY2JDLQ.js +2 -0
  26. package/Marketplace/{chunk-HRKPRVXA.js → chunk-T3WVEP7H.js} +1 -1
  27. package/Marketplace/{chunk-6ZC7AHDI.js → chunk-URIFQ2VU.js} +1 -1
  28. package/Marketplace/{chunk-4IWDZPGG.js → chunk-URW6TGF7.js} +1 -1
  29. package/Marketplace/{chunk-SFXIE6YZ.js → chunk-XBFHE2UM.js} +1 -1
  30. package/Marketplace/{chunk-D5FEJFQG.js → chunk-XTWEPS73.js} +1 -1
  31. package/Marketplace/{chunk-BRKFLVFY.js → chunk-YABCFRJB.js} +1 -1
  32. package/Marketplace/{chunk-6HXQVXUV.js → chunk-YUNZRPV3.js} +1 -1
  33. package/Marketplace/{chunk-Q26PFOHP.js → chunk-ZMWENHWA.js} +1 -1
  34. package/Marketplace/index.html +2 -2
  35. package/Marketplace/{main-ZPMXQTRD.js → main-4V665DCJ.js} +1 -1
  36. package/package.json +1 -1
  37. package/Marketplace/chunk-FBLDXZW5.js +0 -2
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"marketplacepos","version":"5.27.0"}
1
+ {"name":"marketplacepos","version":"5.30.1"}
@@ -1,2 +0,0 @@
1
- import{a as De}from"./chunk-NNQLRLNB.js";import"./chunk-O4CRP4WO.js";import{a as L}from"./chunk-ZASKXRZO.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Pe,b as Ve,c as G}from"./chunk-DLNXH2FE.js";import"./chunk-BVIRHZTZ.js";import{b as Me}from"./chunk-DDHEMRO7.js";import{a as Ee}from"./chunk-N6IHFFFZ.js";import{a as Te,b as Fe}from"./chunk-PD4CUVAW.js";import"./chunk-IJYSJN63.js";import"./chunk-X5Q6FPWS.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import"./chunk-GCKSYCMI.js";import{a as we}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as be}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{e as ge}from"./chunk-CCXKODFV.js";import{j as Ce}from"./chunk-6ZC7AHDI.js";import{b as de,e as ue}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Se,l as ye,m as ve,n as Ie}from"./chunk-BO4PPSB5.js";import{t as fe,u as xe}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as re,c as se,h as pe,m as ce,o as me,y as _e}from"./chunk-BSN7ZAXG.js";import{c as I,f as he}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as h,Bd as ae,Cd as le,Da as _,Ea as d,Eb as u,G as Y,Gb as m,Gc as C,Hc as y,Ic as N,Jc as z,Nb as v,Ob as U,Qb as $,Rb as j,Sb as a,Tb as r,Ub as f,Vb as V,Wb as D,Yb as S,Z as A,bc as l,ea as W,ec as q,gb as P,jb as s,kb as w,mc as Q,nc as c,oc as k,pa as K,pc as M,rc as b,sc as T,sd as ee,ta as Z,tc as F,uc as X,ud as te,vc as J,vd as ne,xb as O,xc as R,yd as ie,zd as oe}from"./chunk-PQDPS2ID.js";import{a as B}from"./chunk-GNOSNGXM.js";var Ne=o=>({"text-decoration-line-through":o}),Le=o=>({"ms-10":o}),Be=o=>({"bg-gradient-warning":o});function Ae(o,p){if(o&1){let e=S();a(0,"button",38),h("click",function(){_(e);let t=l().ngIf,i=l(2);return d(i.onScanInventory(t))}),f(1,"i",39),c(2,"Refresh "),r()}}function We(o,p){if(o&1){let e=S();a(0,"div",36)(1,"button",40),h("click",function(){_(e);let t=l().ngIf,i=l(2);return d(i.updateStock(t))}),f(2,"i",41),c(3," Update "),r(),f(4,"button",42),a(5,"ul",43)(6,"a",44),h("click",function(){_(e);let t=l(3);return d(t.openExportDialog())}),f(7,"i",45),a(8,"span"),c(9,"Export"),r()()()()}}function Oe(o,p){if(o&1){let e=S();a(0,"button",46),h("click",function(){_(e);let t=l(3);return d(t.openExportDialog())}),f(1,"i",45),a(2,"span"),c(3,"Export"),r()()}}function Ue(o,p){if(o&1&&(a(0,"div"),u(1,Ae,3,0,"button",35)(2,We,10,0,"div",36)(3,Oe,4,0,"button",37),r()),o&2){let e=p.ngIf,n=l(2);s(),m("ngIf",n.productService.hasSelectionVariant(e)),s(),v(n.productService.hasSelectionVariant(e)?2:3)}}function $e(o,p){o&1&&(a(0,"div",47)(1,"span"),c(2," showing only different stock, please press next to populate more data "),r()())}function je(o,p){if(o&1){let e=S();a(0,"th")(1,"input",48),F("ngModelChange",function(t){_(e);let i=l(2);return T(i.checkboxState,t)||(i.checkboxState=t),d(t)}),h("ngModelChange",function(){let t=_(e).ngIf,i=l(2);return d(i.onCheckboxStateChange(t))}),r()()}if(o&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function Qe(o,p){o&1&&(a(0,"th",32),c(1," Reserved "),r())}function ze(o,p){}function Ge(o,p){if(o&1){let e=S();a(0,"input",67),F("ngModelChange",function(t){_(e);let i=l(3).$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),h("ngModelChange",function(){_(e);let t=l(3).$implicit,i=l(2);return d(i.onCheckboxStateProduct(t))}),r()}if(o&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function He(o,p){if(o&1){let e=S();a(0,"img",68),h("click",function(t){_(e);let i=l(3).$implicit,g=l(2);return d(g.onZoomImage(t,i==null?null:i.ImageUrl))}),r()}if(o&2){let e=l(3).$implicit;q("src",e==null?null:e.ThumbnailUrl,P)}}function Ye(o,p){o&1&&f(0,"img",64)}function Ke(o,p){if(o&1&&(f(0,"br"),a(1,"div",69),f(2,"i",70),a(3,"small"),c(4),r()()),o&2){let e=l(3).$implicit;s(4),M("(",e==null?null:e.Category,")")}}function Ze(o,p){if(o&1&&(a(0,"td",60)(1,"div",14),u(2,Ge,1,1,"input",61),a(3,"div",62),u(4,He,1,1,"img",63)(5,Ye,1,0,"img",64),r()()(),a(6,"td",65)(7,"span",66),c(8),r(),u(9,Ke,5,1),r()),o&2){let e=l(2).$implicit,n=l(2);m("rowSpan",e==null?null:e.Variants.length),s(2),v(e.Variants.length>1?2:-1),s(),m("ngClass",R(7,Le,e.Variants.length<=1)),s(),v(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),v(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function qe(o,p){if(o&1){let e=S();a(0,"input",48),F("ngModelChange",function(t){_(e);let i=l(2).$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),r()}if(o&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function Xe(o,p){if(o&1&&u(0,qe,1,1,"input",54),o&2){let e=l().$implicit;v((e==null?null:e.Inventory)<=1e5?0:-1)}}function Je(o,p){if(o&1){let e=S();a(0,"input",48),F("ngModelChange",function(t){_(e);let i=l().$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),r()}if(o&2){let e=l().$implicit;b("ngModel",e.selected)}}function et(o,p){o&1&&(a(0,"div",71),c(1," Not Found "),r())}function tt(o,p){if(o&1&&(a(0,"div")(1,"span",72),c(2),C(3,"number"),r(),c(4," => "),a(5,"span",73),c(6),C(7,"number"),r()()),o&2){let e=l().$implicit;s(2),M(" ",y(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(y(7,4,e==null?null:e.Inventory))}}function nt(o,p){if(o&1&&(c(0),C(1,"number")),o&2){let e=l().$implicit;M(" ",y(1,1,e==null?null:e.Inventory)," ")}}function it(o,p){if(o&1&&(V(0),a(1,"div",74)(2,"a",75),f(3,"i",76),r()(),D()),o&2){let e=l().$implicit,n=l(3);s(2),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),P)}}function ot(o,p){if(o&1){let e=S();a(0,"span",81),h("click",function(){let t=_(e).ngIf,i=l(2).$implicit,g=l().$implicit,x=l(2);return d(x.openTableDialog(g,i,t))}),c(1),C(2,"number"),r()}if(o&2){let e=l(2).$implicit;s(),M(" ",y(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function at(o,p){if(o&1){let e=S();a(0,"td",77)(1,"div",55)(2,"div"),u(3,ot,3,3,"span",78),C(4,"async"),r(),a(5,"div",74)(6,"a",75),f(7,"i",76),r()(),a(8,"div",74)(9,"span",79),h("click",function(){_(e);let t=l().$implicit,i=l(3);return d(i.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))}),f(10,"i",80),r()()()()}if(o&2){let e=l().$implicit,n=l(3);m("ngClass",R(5,Be,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",y(4,3,n.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,P)}}function lt(o,p){if(o&1&&(V(0),a(1,"span",82),c(2),C(3,"number"),r(),D()),o&2){let e=l(2).$implicit;s(2),M(" (",y(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function rt(o,p){o&1&&c(0," - ")}function st(o,p){if(o&1&&(V(0),a(1,"td",51),u(2,lt,4,3,"ng-container",59)(3,rt,1,0,"ng-template",null,1,z),r(),D()),o&2){let e=Q(4),n=l().$implicit;s(2),m("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",e)}}function pt(o,p){o&1&&(V(0),c(1," - "),D())}function ct(o,p){if(o&1&&(a(0,"span",83),C(1,"date"),c(2),C(3,"date"),r()),o&2){let e=l().$implicit;m("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),M(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(o,p){if(o&1&&(a(0,"tr"),u(1,Ze,10,9),a(2,"td",50),c(3),r(),a(4,"td",51)(5,"span",52),c(6),r()(),a(7,"td",53),u(8,Xe,1,1)(9,Je,1,1,"input",54),r(),a(10,"td")(11,"div",55),u(12,et,2,0,"div",56)(13,tt,8,6,"div")(14,nt,2,3)(15,it,4,1,"ng-container",5),r()(),u(16,at,11,7,"td",57)(17,st,5,2,"ng-container",5),a(18,"td",58),u(19,pt,2,0,"ng-container",59)(20,ct,4,8,"ng-template",null,0,z),r()()),o&2){let e=p.$implicit,n=p.index,t=Q(21),i=l(3);s(),v(n==0?1:-1),s(2),k(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",R(14,Ne,e.Discontinued)),s(),k(e==null?null:e.Code),s(2),v((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),m("ngIf",(e==null?null:e.I)==null),s(),v((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),v((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",t)}}function _t(o,p){if(o&1&&(a(0,"tbody"),$(1,ze,0,0,null,null,U),u(3,mt,22,16,"tr",49),r()),o&2){let e=p.$implicit;s(),j(e.Variants),s(2),m("ngForOf",e.Variants)}}function dt(o,p){if(o&1){let e=S();a(0,"mainpanel",3),h("onSubmit",function(t){_(e);let i=l();return d(i.onSearch(t))}),a(1,"actions")(2,"div",4),u(3,Ue,4,2,"div",5),C(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),h("onChannelChange",function(t){_(e);let i=l();return d(i.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),r(),a(13,"input",10),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),d(t)}),r()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),r(),a(17,"input",12),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),d(t)}),r()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.QuantityFrom,t)||(i.searchFilter.QuantityFrom=t),d(t)}),r(),c(23," - "),a(24,"input",16),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.QuantityTo,t)||(i.searchFilter.QuantityTo=t),d(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),u(29,$e,3,0,"div",20),a(30,"table",21)(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),f(35,"br"),a(36,"mat-slide-toggle",24),h("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,d(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),c(40,"Variant"),r(),a(41,"th",26),c(42,"SKU"),r(),u(43,je,2,1,"th",5),C(44,"async"),a(45,"th",27),c(46,"POS"),r(),a(47,"th",28)(48,"div",29),h("click",function(){_(e);let t=l();return d(t.openModalFilter())}),f(49,"img",30),a(50,"span",31),c(51),C(52,"stringLimit"),r()()(),u(53,Qe,2,0,"th",32),a(54,"th",33),c(55,"Last Sync"),r()()(),$(56,_t,4,1,"tbody",null,U),C(58,"async"),r(),a(59,"infinite-paginator",34),C(60,"async"),h("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(o&2){let e,n,t,i=l();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",y(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),b("ngModel",i.searchFilter.PageNumber),s(4),b("ngModel",i.searchFilter.RowCount),s(5),b("ngModel",i.searchFilter.QuantityFrom),s(2),b("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngIf",y(44,23,i.products$)),s(5),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(n=i.channelIdentity())==null?null:n.img,P),s(2),M(" ",N(52,25,(t=i.channelIdentity())==null?null:t.label,13)," "),s(2),v(i.isShowReservedColumn?53:-1),s(3),j(y(58,28,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",y(60,30,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var qt=(()=>{let p=class p{constructor(n,t,i,g,x,E,ke,Re){this.http=n,this.toastr=t,this.dialog=i,this.productService=g,this.authService=x,this.biggerPictureService=E,this.inventoryService=ke,this.mainPanelService=Re,this.infinitePagination=K(G),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=I.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=I.GuidEMpty,this.selectedChannel=O(null),this.channelIdentity=O({img:null,label:null}),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.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(W(n=>{this.checkShowReservedColumn(n)}),A())}checkShowReservedColumn(n){let t=0,i;n.forEach(g=>{i=g.Variants.find(x=>I.IsNotEmpty(x?.Channel[0]?.InventoryReserved)),i&&(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(A(1),W(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID,LocationID:n.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),I.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());I.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=I.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=I.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
2
- Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(n){this.searchFilter.text=n,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let t=this.productService.selectedVariantProduct(n);if(t.length>0){let i=this.searchFilter.LocationID,g=t.map(E=>B({ID:E.ID,Code:E.Code,Inventory:E.Inventory},I.IsNotEmpty(i)&&{LocationID:i})),x={ListChannelID:[this.searchFilter.ChannelID],List:g};this.http.post("/api/Inventory/UpdateChannel",x).subscribe(E=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(E)})}}handlingUpdateStock(n){if(n[0]?.Response){let t=n[0]?.Response?.Fail_list,i=n[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",i,t)}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,t,i,g){let x={ChannelItemID:n,ChannelVariationID:t,ChannelID:i,VariantID:g};this.http.post("/api/Inventory/RefreshInventoryChannel",x).subscribe(E=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.Inventory>=0&&(t.selected=n.selected),t))}onCheckboxStateChange(n){n=n.map(t=>(t.Variants=t.Variants.map(i=>(i.selected=this.checkboxState,i)),t))}openTableDialog(n,t,i){this.dialog.open(Pe,{data:{Name:n.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(Y(x=>I.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x)})}updateItemAfterDialog(n){let t=this.searchFilter.LocationID,i=B({ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku},I.IsNotEmpty(t)&&{LocationID:t});this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(g=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([g])})}onScanInventory(n){let t=this.productService.selectedVariantProduct(n);this.inventoryService.refreshInventory(t).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Me,{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=H.DIFFERENCE:this.searchFilter.filterModel=H.ALL,this.initReloadData()}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}};p.\u0275fac=function(t){return new(t||p)(w(ue),w(de),w(Se),w(we),w(Ce),w(be),w(L),w(ye))},p.\u0275cmp=Z({type:p,selectors:[["app-single-channel-comparison"]],standalone:!0,features:[X([G,L]),J],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","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[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-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["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,i){t&1&&(u(0,dt,61,32,"mainpanel",2),C(1,"async")),t&2&&m("ngIf",y(1,1,i.loader$))},dependencies:[le,ee,te,ne,ie,ae,oe,Ie,ve,ge,_e,se,me,re,pe,ce,Ee,Ve,he,Fe,Te,xe,fe,De],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 o=p;return o})();export{qt as SingleChannelComparisonComponent};