marketplacepos 3.6.2 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-TPFTT632.js → chunk-23JYSN6Q.js} +1 -1
- package/Marketplace/{chunk-ZRTKOAYD.js → chunk-2CW5UYLD.js} +1 -1
- package/Marketplace/{chunk-DZKSVYPR.js → chunk-2PUWLP55.js} +1 -1
- package/Marketplace/{chunk-YBEJ6DSM.js → chunk-4OJVE2Q5.js} +1 -1
- package/Marketplace/{chunk-46GC4FG7.js → chunk-5PZ6BLED.js} +1 -1
- package/Marketplace/{chunk-SB5XTLLY.js → chunk-6G6GKWWY.js} +1 -1
- package/Marketplace/{chunk-FH2STK2T.js → chunk-7KBKCIN6.js} +1 -1
- package/Marketplace/{chunk-BW5REXI6.js → chunk-7KE42BE5.js} +1 -1
- package/Marketplace/{chunk-FO3KSKQ6.js → chunk-7KXBD73I.js} +1 -1
- package/Marketplace/{chunk-TG2NAWXW.js → chunk-7NGXKP3O.js} +1 -1
- package/Marketplace/{chunk-BVGNNSM2.js → chunk-7U5UAWCO.js} +1 -1
- package/Marketplace/{chunk-7JWQMOH7.js → chunk-A3QB35Z5.js} +1 -1
- package/Marketplace/{chunk-RISSBTN2.js → chunk-AU4SOVII.js} +1 -1
- package/Marketplace/{chunk-PFXGXQHO.js → chunk-C7F32KU3.js} +1 -1
- package/Marketplace/{chunk-ZJYHLYQC.js → chunk-E22FOFQL.js} +1 -1
- package/Marketplace/{chunk-I3M6GHUE.js → chunk-EHWPM4BE.js} +1 -1
- package/Marketplace/{chunk-YO44EPAG.js → chunk-FCTD55SB.js} +1 -1
- package/Marketplace/{chunk-5LHF6NCK.js → chunk-FSLQ5TRN.js} +1 -1
- package/Marketplace/chunk-G7267XOM.js +1 -0
- package/Marketplace/{chunk-GMNZLOVM.js → chunk-GQBV5OAK.js} +1 -1
- package/Marketplace/{chunk-4YRDQUI3.js → chunk-HHAAJG6G.js} +1 -1
- package/Marketplace/{chunk-HUDF4XGA.js → chunk-HUTPG746.js} +1 -1
- package/Marketplace/{chunk-QZ6GD3DK.js → chunk-IYRCZVA4.js} +1 -1
- package/Marketplace/{chunk-XJMXZWZW.js → chunk-J6AJBBZ3.js} +1 -1
- package/Marketplace/{chunk-DQRS5DAE.js → chunk-JDFOZTNQ.js} +1 -1
- package/Marketplace/{chunk-BATYANE3.js → chunk-JKVEO7GJ.js} +1 -1
- package/Marketplace/{chunk-ERRFLL6T.js → chunk-JTTK3RAC.js} +1 -1
- package/Marketplace/{chunk-Z4L57D42.js → chunk-JW6NHBN5.js} +1 -1
- package/Marketplace/{chunk-XAU4KWDG.js → chunk-KJXEV3CR.js} +1 -1
- package/Marketplace/{chunk-LXDCPBTR.js → chunk-KRHP6DRW.js} +1 -1
- package/Marketplace/{chunk-PXAUQQ7Y.js → chunk-L5RZ2NWC.js} +1 -1
- package/Marketplace/{chunk-KM23UFSR.js → chunk-LX6C545M.js} +1 -1
- package/Marketplace/{chunk-45NXB6RE.js → chunk-LYFRN35D.js} +1 -1
- package/Marketplace/{chunk-RNPQSH4X.js → chunk-MAVB5XKB.js} +1 -1
- package/Marketplace/{chunk-2GCJVDVN.js → chunk-NG6JQWVZ.js} +1 -1
- package/Marketplace/{chunk-6M2Q3GGB.js → chunk-NJI6OAOU.js} +1 -1
- package/Marketplace/{chunk-ZLHGVQE6.js → chunk-NTY552OQ.js} +1 -1
- package/Marketplace/{chunk-EOM22W74.js → chunk-NXCMFVSB.js} +1 -1
- package/Marketplace/{chunk-TAD43MYD.js → chunk-O3ASI5PY.js} +1 -1
- package/Marketplace/chunk-P7QKTYYT.js +1 -0
- package/Marketplace/{chunk-HXRWGEJ5.js → chunk-PP4ELWXY.js} +1 -1
- package/Marketplace/{chunk-RWYXA653.js → chunk-PSWRS2QZ.js} +1 -1
- package/Marketplace/{chunk-CBOPSK2G.js → chunk-PTRHHOMT.js} +1 -1
- package/Marketplace/{chunk-QYZDV3KB.js → chunk-QEO6A33I.js} +1 -1
- package/Marketplace/{chunk-NZQHBWBK.js → chunk-QNIEXALL.js} +2 -2
- package/Marketplace/{chunk-JSCR55UZ.js → chunk-QO6GWCX7.js} +2 -2
- package/Marketplace/{chunk-F45ZZTMU.js → chunk-QP3S52F6.js} +1 -1
- package/Marketplace/{chunk-BVMOK3VE.js → chunk-QUZBZ5K4.js} +1 -1
- package/Marketplace/{chunk-ZHLG7GCJ.js → chunk-TIWU4GET.js} +1 -1
- package/Marketplace/{chunk-7EYB3DHT.js → chunk-TQSDPBUE.js} +1 -1
- package/Marketplace/{chunk-BREDWZJ7.js → chunk-UREGZMHY.js} +1 -1
- package/Marketplace/{chunk-J2UWP2SN.js → chunk-UU26ASVF.js} +1 -1
- package/Marketplace/{chunk-EAYXHDLW.js → chunk-VPP6ZKI2.js} +1 -1
- package/Marketplace/{chunk-XDJYCAPB.js → chunk-VUAKZHTF.js} +1 -1
- package/Marketplace/{chunk-GF526R3A.js → chunk-W6QK3KI2.js} +1 -1
- package/Marketplace/{chunk-RQYJJ3EK.js → chunk-WKRAISAM.js} +1 -1
- package/Marketplace/{chunk-L3TBTXVF.js → chunk-WOXH3LCZ.js} +1 -1
- package/Marketplace/{chunk-7V6UQDFG.js → chunk-WRAMXNGJ.js} +1 -1
- package/Marketplace/{chunk-DKGYGZK7.js → chunk-WUPPCYDC.js} +1 -1
- package/Marketplace/{chunk-V7X66MWE.js → chunk-WZRJRVH6.js} +1 -1
- package/Marketplace/{chunk-66UC4STB.js → chunk-XXLBTCRU.js} +1 -1
- package/Marketplace/{chunk-A4X2AUOC.js → chunk-YMMBFSTV.js} +1 -1
- package/Marketplace/{chunk-BYPWQ2HT.js → chunk-ZQL3IYZ4.js} +1 -1
- package/Marketplace/{chunk-UV6KK4W6.js → chunk-ZVHCE4K4.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-JR4ZU2LJ.js → main-3ZACSMQZ.js} +1 -1
- package/Marketplace/{styles-DXZCV23O.css → styles-DE7M2S4O.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2KGUHH44.js +0 -1
- package/Marketplace/chunk-MO3YBEXE.js +0 -1
- /package/Marketplace/{chunk-72VLH7XK.js → chunk-4EVRTQJX.js} +0 -0
- /package/Marketplace/{chunk-YD4CXLB4.js → chunk-5TEZF6KQ.js} +0 -0
- /package/Marketplace/{chunk-NXHCLVII.js → chunk-KTBPHH7N.js} +0 -0
- /package/Marketplace/{chunk-OUASU5FP.js → chunk-RHYO2A6O.js} +0 -0
- /package/Marketplace/{chunk-GCXKRLIU.js → chunk-SINQ7SXI.js} +0 -0
- /package/Marketplace/{polyfills-ON52FDZY.js → polyfills-AGGI3U6M.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$a as m,Fa as a,Oa as s,Za as i,_a as c,ea as o,pb as p,ub as d,za as r}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.
|
|
1
|
+
import{$a as m,Fa as a,Oa as s,Za as i,_a as c,ea as o,pb as p,ub as d,za as r}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";var y=(()=>{let t=class t{constructor(){this.emptyStateImg="https://res.cloudinary.com/pos/image/upload/v1683772105/icons/marketplace_icons/emptyrecord.svg"}ngOnInit(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o({type:t,selectors:[["app-empty-state"]],standalone:!0,features:[d],decls:4,vars:1,consts:[["alt","",2,"width","225px",3,"src"],[1,"text-center","fs-2","text-secondary","mt-4"]],template:function(e,f){e&1&&(i(0,"div"),m(1,"img",0),i(2,"div",1),p(3," No records found "),c()()),e&2&&(a(1),s("src",f.emptyStateImg,r))}});let n=t;return n})();export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as $}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.
|
|
1
|
+
import{e as $}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-HUTPG746.js";import{c as d}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-5TEZF6KQ.js";import{$ as b,B as h,F as p,O as c,Q as l,V as g,X as m,Y as f,c as u,ca as P,d as n,q as s}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";var j=(()=>{let i=class i{constructor(t){this.http=t,this.pagination$=new n(null),this.destroy$=new u,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,e){e==0?this.disableNextButton=!0:this.disableNextButton=!(e<t.RowCount*t.PageNumber)}reloadPagination(t){d.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,e){t.RowCount=e,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new n(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(g(this.destroy$),h(t=>t!=null),p(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(s(e=>e.Data))),f(this.pagination$),c((t,e)=>{let[N,o]=t,[r]=e;return o.PageNumber==1?[r,o]:[N.concat(r),o]}),m(([t,e])=>{this.setPageNumberFooter(e),this.setPaginationButtonState(e,t.length)}),s(([t])=>t),l())}};i.\u0275fac=function(e){return new(e||i)(P($))},i.\u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"});let a=i;return a})();export{j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.
|
|
1
|
+
import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-7KBKCIN6.js";import{c as z,d as j,e as q,f as G,g as H,h as J,i as K,j as Q,k as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-NXCMFVSB.js";import{a as L,c as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-KRHP6DRW.js";import{c as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-PP4ELWXY.js";import{b as P,g as V,h as x}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-NG6JQWVZ.js";import{Q as R,R as F,S as I,T as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-LYFRN35D.js";import{u as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-UREGZMHY.js";import{$a as w,Fa as o,Ja as h,Oa as r,Ra as M,Ua as k,Za as p,_a as m,_b as S,ab as v,bb as Y,db as _,ea as D,fc as b,hb as c,ja as u,jb as y,ka as f,ob as g,pb as C,tb as E,ub as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";function Z(l,a){if(l&1){let X=_();v(0),p(1,"mat-date-range-picker-actions")(2,"button",8),C(3,"Cancel"),m(),p(4,"button",9),c("click",function(){u(X);let e=y();return f(e.onSelectDate())}),C(5,"Search"),m()(),Y()}}var $={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},he=(()=>{let a=class a{constructor(){this.disabled=!1,this.widthClass="w-100",this.showButtonConfirm=!1,this.dateChange=new h}fromDateChange(t){let e=t?.toDate();this.from=e}toDateChange(t){if(t){let e=t.toDate();this.to=e,this.showButtonConfirm||this.emitDateChange()}}onOpenDatepicker(){console.log("open");let t=document.getElementById("dropdown-filter");if(t){var e=new bootstrap.Dropdown(t);e&&(e._config.autoClose="inside")}}onCloseDatepicker(){console.log("close");let t=document.getElementById("dropdown-filter");if(t){var e=new bootstrap.Dropdown(t);e&&(e._config.autoClose="outside")}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["app-datepicker-range"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",minDate:"minDate",widthClass:"widthClass",showButtonConfirm:"showButtonConfirm",from:"from",to:"to"},outputs:{dateChange:"dateChange"},standalone:!0,features:[E([{provide:F,useClass:W,deps:[R]},{provide:I,useValue:$}]),T],decls:8,vars:8,consts:[["appearance","outline",1,"date-range"],["id","dates",3,"min","rangePicker"],["matStartDate","","placeholder","Start date",3,"value","dateChange","click"],["matEndDate","","placeholder","End date",3,"value","dateChange","click"],["matPrefix","",3,"for"],[3,"opened","closed"],["picker",""],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(e,n){if(e&1){let d=_();p(0,"mat-form-field",0)(1,"mat-date-range-input",1)(2,"input",2),c("dateChange",function(i){return n.fromDateChange(i.value)})("click",function(){u(d);let i=g(6);return f(i.open())}),m(),p(3,"input",3),c("dateChange",function(i){return n.toDateChange(i.value)})("click",function(){u(d);let i=g(6);return f(i.open())}),m()(),w(4,"mat-datepicker-toggle",4),p(5,"mat-date-range-picker",5,6),c("opened",function(){return n.onOpenDatepicker()})("closed",function(){return n.onCloseDatepicker()}),k(7,Z,6,0,"ng-container",7),m()()}if(e&2){let d=g(6);M(n.widthClass),o(1),r("min",n.minDate)("rangePicker",d),o(1),r("value",n.from),o(1),r("value",n.to),o(1),r("for",d),o(3),r("ngIf",n.showButtonConfirm)}},dependencies:[b,S,B,U,z,G,j,q,H,Q,K,J,x,V,P,N,A,O,L],styles:["mat-form-field.date-range.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{padding-top:12px!important;padding-bottom:12px!important;min-height:45px!important;font-size:14px!important}"]});let l=a;return l})();export{he as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-ZRTKOAYD.js";import{t as N,u as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-V7X66MWE.js";import{u as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-BREDWZJ7.js";import{c as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-YD4CXLB4.js";import{$a as m,Fa as i,Ga as T,Ja as w,Lb as I,Na as Z,Oa as c,Ua as s,Xb as O,Za as a,Zb as U,_a as l,_b as B,ab as x,bb as v,db as C,ea as k,fc as D,hb as f,ic as $,ja as _,jb as p,ka as h,mb as j,ob as P,pb as g,qb as b,rb as S,sb as L,ub as M,wb as y,za as u}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-ZHLG7GCJ.js";function q(e,o){if(e&1){let t=C();x(0),a(1,"img",19),f("click",function(n){_(t);let d=p();return h(d.openBiggerPicture(n))}),l(),v()}if(e&2){let t=p();i(1),c("src",t.image,u)}}function G(e,o){e&1&&m(0,"img",20)}function Q(e,o){if(e&1&&(x(0),a(1,"span",24)(2,"a",25),m(3,"i",26),l()(),v()),e&2){let t=p(2);i(2),c("href",t.redirectUrl,u)}}function X(e,o){if(e&1&&(a(0,"div",21),m(1,"i",22),a(2,"span"),g(3),l(),s(4,Q,4,1,"ng-container",23),l()),e&2){let t=p();i(3),b(t.code),i(1),c("ngIf",t.code!=="SKU not assigned"&&t.showRedirectIcon)}}function Y(e,o){if(e&1){let t=C();a(0,"div",27),f("click",function(){_(t);let n=p();return h(n.onEventDesc())}),m(1,"i",28),a(2,"span"),g(3),l()()}if(e&2){let t=p();i(3),b(t.description)}}function ee(e,o){if(e&1){let t=C();a(0,"div",29)(1,"input",30),f("change",function(n){_(t);let d=p();return h(d.onCheck(n.target.checked))}),l()()}}function te(e,o){if(e&1){let t=C();a(0,"button",31),f("click",function(){_(t);let n=p();return h(n.onDownload())}),m(1,"i",32),g(2," Download "),l()}}function ne(e,o){if(e&1){let t=C();a(0,"button",31),f("click",function(){_(t);let n=p();return h(n.onUpload())}),m(1,"i",33),g(2," Upload "),l()}}function ie(e,o){if(e&1){let t=C();a(0,"button",34),f("click",function(){_(t);let n=p();return h(n.onScan())}),m(1,"i",35),g(2," Scan "),l()}}var oe=e=>({"me-3":e});function re(e,o){if(e&1&&(x(0),a(1,"a",37),m(2,"img",38),l(),v()),e&2){let t=o.$implicit,r=o.index,n=p(2);i(1),j("href",t.Url,u),i(1),c("ngClass",y(4,oe,r!=n.channels.length-1))("src",n.getChannelLogo(t),u)("matTooltip",t.Title?t.Title:t.Name)}}function ae(e,o){if(e&1&&(x(0),s(1,re,3,6,"ng-container",36),v()),e&2){let t=p();i(1),c("ngForOf",t.channels)}}var ce=e=>({"border-bottom pb-2":e});function le(e,o){if(e&1&&(a(0,"li")(1,"div",42)(2,"div",43)(3,"a",37),m(4,"img",44),a(5,"span",45),g(6),l()()()()()),e&2){let t=o.$implicit,r=o.index,n=p(2);i(2),c("ngClass",y(4,ce,r!=n.channels.length-1)),i(1),c("href",t.Url,u),i(1),c("src",n.getChannelLogo(t),u),i(2),b(t.Title)}}function de(e,o){if(e&1&&(a(0,"div",39)(1,"button",40),g(2),l(),a(3,"ul",41),s(4,le,7,6,"li",36),l()()),e&2){let t=p();i(2),S(" ",t.channels.length," CHANNELS "),i(2),c("ngForOf",t.channels)}}var Se=(()=>{let o=class o{constructor(r){this.biggerPictureService=r,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.onUploadEvent=new w,this.onScanEvent=new w,this.checkBoxChange=new w,this.onDescEvent=new w,this.onDownloadEvent=new w}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let r=localStorage.getItem("Authorization"),n=JSON.parse(r)?.Host;this.redirectUrl=`https://${n}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(r){this.checkBoxChange.emit(r)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}getChannelLogo(r){return V.getChannelLogoByTypeId(r.TypeID)}openBiggerPicture(r){this.biggerPictureService.openBiggerPicture(r,this.imageForZoom)}};o.\u0275fac=function(n){return new(n||o)(T(R))},o.\u0275cmp=k({type:o,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload"},standalone:!0,features:[M],decls:26,vars:11,consts:[[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],["class","text-end gx-0",4,"ngIf"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],["class","fs-6 btn btn-light btn-sm",3,"click",4,"ngIf"],["DROPDOWN",""],[1,"rounded","imgUpload","float-left",3,"src","click"],["src","https://res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fas","fa-external-link-alt"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["aria-hidden","true",1,"fa","fa-upload"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fa","fa-spinner"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(n,d){if(n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),s(6,q,2,1,"ng-container",6)(7,G,1,0,"ng-template",null,7,I),l()()(),a(9,"div",8)(10,"h4",9),f("click",function(){return d.onEventDesc()}),g(11),l(),s(12,X,5,2,"div",10)(13,Y,4,1,"div",11),l(),a(14,"div",12)(15,"div",13),s(16,ee,2,0,"div",14),l()()()(),a(17,"div",15)(18,"div"),s(19,te,3,0,"button",16)(20,ne,3,0,"button",16)(21,ie,3,0,"button",17),l(),a(22,"div"),s(23,ae,2,1,"ng-container",6)(24,de,5,2,"ng-template",null,18,I),l()()()),n&2){let E=P(8),A=P(25);i(6),c("ngIf",d.image)("ngIfElse",E),i(5),S(" ",d.title," "),i(1),c("ngIf",d.code),i(1),c("ngIf",d.description),i(3),c("ngIf",d.showCheckBox),i(3),c("ngIf",d.downloadButton),i(1),c("ngIf",d.uploadButton),i(1),c("ngIf",d.scanButton),i(2),c("ngIf",d.channels.length<4)("ngIfElse",A)}},dependencies:[D,O,U,B,F,z,N],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]});let e=o;return e})();function pe(e,o){if(e&1){let t=C();x(0),a(1,"img",14),f("click",function(n){_(t);let d=p();return h(d.onZoomImage(n))}),l(),v()}if(e&2){let t=p();i(1),c("ngSrc",t.image)("fill",!0)}}function me(e,o){e&1&&m(0,"img",15),e&2&&c("fill",!0)}function se(e,o){if(e&1&&(a(0,"div",16),m(1,"i",17),a(2,"span"),g(3),l()()),e&2){let t=p();i(3),b(t.code)}}var ge=e=>({"border-bottom":e});function ue(e,o){if(e&1&&(x(0),a(1,"div",27)(2,"div",28),g(3),l(),a(4,"div")(5,"a",29),m(6,"i",30),l()()(),v()),e&2){let t=o.$implicit,r=o.index,n=p().$implicit;i(1),c("ngClass",y(4,ge,r!==(n==null?null:n.Variants.length)-1)),i(2),L(" ",t.ProductName," - ",t.Name," "),i(2),c("href",t.URL,u)}}var fe=e=>({"border-bottom-0":e});function _e(e,o){if(e&1&&(a(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),m(4,"img",22),a(5,"span",23),g(6),l()()()(),a(7,"div",24)(8,"div",25),s(9,ue,7,6,"ng-container",26),l()()()),e&2){let t=o.$implicit,r=o.index,n=p();c("ngClass",y(10,fe,n.channels.length-1==r)),i(1),c("id","heading"+r+n.code+n.id),i(1),Z("data-bs-target","#collapse"+r+n.code+n.id)("aria-controls","#collapse"+r+n.code+n.id),i(2),c("src",n.getChannelLogo(t.TypeID),u),i(1),c("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t.ChannelName:""),i(1),b(t.ChannelName),i(1),c("id","collapse"+r+n.code+n.id),Z("aria-labelledby","heading"+r+n.code+n.id),i(2),c("ngForOf",t.Variants)}}var Oe=(()=>{let o=class o{constructor(r){this.biggerPictureService=r}getChannelLogo(r){return V.getChannelLogoByTypeId(r)}onZoomImage(r){this.biggerPictureService.openBiggerPicture(r,this.imageForZoom)}};o.\u0275fac=function(n){return new(n||o)(T(R))},o.\u0275cmp=k({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",id:"id"},standalone:!0,features:[M],decls:16,vars:5,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill","click"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa","fa-external-link-alt"]],template:function(n,d){if(n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),s(6,pe,2,2,"ng-container",6)(7,me,1,1,"ng-template",null,7,I),l()()(),a(9,"div",8)(10,"h4",9),g(11),l(),s(12,se,4,1,"div",10),l()()(),a(13,"div",11)(14,"div",12),s(15,_e,10,12,"div",13),l()()()),n&2){let E=P(8);i(6),c("ngIf",d.image)("ngIfElse",E),i(5),S(" ",d.title," "),i(1),c("ngIf",d.code),i(3),c("ngForOf",d.channels)}},dependencies:[D,O,U,B,F,z,N,$],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();export{Se as a,Oe as b};
|
|
1
|
+
import{a as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-2CW5UYLD.js";import{t as N,u as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-WZRJRVH6.js";import{u as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-UREGZMHY.js";import{c as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-5TEZF6KQ.js";import{$a as m,Fa as i,Ga as T,Ja as w,Lb as I,Na as Z,Oa as c,Ua as s,Xb as O,Za as a,Zb as U,_a as l,_b as B,ab as x,bb as v,db as C,ea as k,fc as D,hb as f,ic as $,ja as _,jb as p,ka as h,mb as j,ob as P,pb as g,qb as b,rb as S,sb as L,ub as M,wb as y,za as u}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";function q(e,o){if(e&1){let t=C();x(0),a(1,"img",19),f("click",function(n){_(t);let d=p();return h(d.openBiggerPicture(n))}),l(),v()}if(e&2){let t=p();i(1),c("src",t.image,u)}}function G(e,o){e&1&&m(0,"img",20)}function Q(e,o){if(e&1&&(x(0),a(1,"span",24)(2,"a",25),m(3,"i",26),l()(),v()),e&2){let t=p(2);i(2),c("href",t.redirectUrl,u)}}function X(e,o){if(e&1&&(a(0,"div",21),m(1,"i",22),a(2,"span"),g(3),l(),s(4,Q,4,1,"ng-container",23),l()),e&2){let t=p();i(3),b(t.code),i(1),c("ngIf",t.code!=="SKU not assigned"&&t.showRedirectIcon)}}function Y(e,o){if(e&1){let t=C();a(0,"div",27),f("click",function(){_(t);let n=p();return h(n.onEventDesc())}),m(1,"i",28),a(2,"span"),g(3),l()()}if(e&2){let t=p();i(3),b(t.description)}}function ee(e,o){if(e&1){let t=C();a(0,"div",29)(1,"input",30),f("change",function(n){_(t);let d=p();return h(d.onCheck(n.target.checked))}),l()()}}function te(e,o){if(e&1){let t=C();a(0,"button",31),f("click",function(){_(t);let n=p();return h(n.onDownload())}),m(1,"i",32),g(2," Download "),l()}}function ne(e,o){if(e&1){let t=C();a(0,"button",31),f("click",function(){_(t);let n=p();return h(n.onUpload())}),m(1,"i",33),g(2," Upload "),l()}}function ie(e,o){if(e&1){let t=C();a(0,"button",34),f("click",function(){_(t);let n=p();return h(n.onScan())}),m(1,"i",35),g(2," Scan "),l()}}var oe=e=>({"me-3":e});function re(e,o){if(e&1&&(x(0),a(1,"a",37),m(2,"img",38),l(),v()),e&2){let t=o.$implicit,r=o.index,n=p(2);i(1),j("href",t.Url,u),i(1),c("ngClass",y(4,oe,r!=n.channels.length-1))("src",n.getChannelLogo(t),u)("matTooltip",t.Title?t.Title:t.Name)}}function ae(e,o){if(e&1&&(x(0),s(1,re,3,6,"ng-container",36),v()),e&2){let t=p();i(1),c("ngForOf",t.channels)}}var ce=e=>({"border-bottom pb-2":e});function le(e,o){if(e&1&&(a(0,"li")(1,"div",42)(2,"div",43)(3,"a",37),m(4,"img",44),a(5,"span",45),g(6),l()()()()()),e&2){let t=o.$implicit,r=o.index,n=p(2);i(2),c("ngClass",y(4,ce,r!=n.channels.length-1)),i(1),c("href",t.Url,u),i(1),c("src",n.getChannelLogo(t),u),i(2),b(t.Title)}}function de(e,o){if(e&1&&(a(0,"div",39)(1,"button",40),g(2),l(),a(3,"ul",41),s(4,le,7,6,"li",36),l()()),e&2){let t=p();i(2),S(" ",t.channels.length," CHANNELS "),i(2),c("ngForOf",t.channels)}}var Se=(()=>{let o=class o{constructor(r){this.biggerPictureService=r,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.onUploadEvent=new w,this.onScanEvent=new w,this.checkBoxChange=new w,this.onDescEvent=new w,this.onDownloadEvent=new w}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let r=localStorage.getItem("Authorization"),n=JSON.parse(r)?.Host;this.redirectUrl=`https://${n}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(r){this.checkBoxChange.emit(r)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}getChannelLogo(r){return V.getChannelLogoByTypeId(r.TypeID)}openBiggerPicture(r){this.biggerPictureService.openBiggerPicture(r,this.imageForZoom)}};o.\u0275fac=function(n){return new(n||o)(T(R))},o.\u0275cmp=k({type:o,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload"},standalone:!0,features:[M],decls:26,vars:11,consts:[[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],["class","text-end gx-0",4,"ngIf"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],["class","fs-6 btn btn-light btn-sm",3,"click",4,"ngIf"],["DROPDOWN",""],[1,"rounded","imgUpload","float-left",3,"src","click"],["src","https://res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fas","fa-external-link-alt"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["aria-hidden","true",1,"fa","fa-upload"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fa","fa-spinner"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(n,d){if(n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),s(6,q,2,1,"ng-container",6)(7,G,1,0,"ng-template",null,7,I),l()()(),a(9,"div",8)(10,"h4",9),f("click",function(){return d.onEventDesc()}),g(11),l(),s(12,X,5,2,"div",10)(13,Y,4,1,"div",11),l(),a(14,"div",12)(15,"div",13),s(16,ee,2,0,"div",14),l()()()(),a(17,"div",15)(18,"div"),s(19,te,3,0,"button",16)(20,ne,3,0,"button",16)(21,ie,3,0,"button",17),l(),a(22,"div"),s(23,ae,2,1,"ng-container",6)(24,de,5,2,"ng-template",null,18,I),l()()()),n&2){let E=P(8),A=P(25);i(6),c("ngIf",d.image)("ngIfElse",E),i(5),S(" ",d.title," "),i(1),c("ngIf",d.code),i(1),c("ngIf",d.description),i(3),c("ngIf",d.showCheckBox),i(3),c("ngIf",d.downloadButton),i(1),c("ngIf",d.uploadButton),i(1),c("ngIf",d.scanButton),i(2),c("ngIf",d.channels.length<4)("ngIfElse",A)}},dependencies:[D,O,U,B,F,z,N],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]});let e=o;return e})();function pe(e,o){if(e&1){let t=C();x(0),a(1,"img",14),f("click",function(n){_(t);let d=p();return h(d.onZoomImage(n))}),l(),v()}if(e&2){let t=p();i(1),c("ngSrc",t.image)("fill",!0)}}function me(e,o){e&1&&m(0,"img",15),e&2&&c("fill",!0)}function se(e,o){if(e&1&&(a(0,"div",16),m(1,"i",17),a(2,"span"),g(3),l()()),e&2){let t=p();i(3),b(t.code)}}var ge=e=>({"border-bottom":e});function ue(e,o){if(e&1&&(x(0),a(1,"div",27)(2,"div",28),g(3),l(),a(4,"div")(5,"a",29),m(6,"i",30),l()()(),v()),e&2){let t=o.$implicit,r=o.index,n=p().$implicit;i(1),c("ngClass",y(4,ge,r!==(n==null?null:n.Variants.length)-1)),i(2),L(" ",t.ProductName," - ",t.Name," "),i(2),c("href",t.URL,u)}}var fe=e=>({"border-bottom-0":e});function _e(e,o){if(e&1&&(a(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),m(4,"img",22),a(5,"span",23),g(6),l()()()(),a(7,"div",24)(8,"div",25),s(9,ue,7,6,"ng-container",26),l()()()),e&2){let t=o.$implicit,r=o.index,n=p();c("ngClass",y(10,fe,n.channels.length-1==r)),i(1),c("id","heading"+r+n.code+n.id),i(1),Z("data-bs-target","#collapse"+r+n.code+n.id)("aria-controls","#collapse"+r+n.code+n.id),i(2),c("src",n.getChannelLogo(t.TypeID),u),i(1),c("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t.ChannelName:""),i(1),b(t.ChannelName),i(1),c("id","collapse"+r+n.code+n.id),Z("aria-labelledby","heading"+r+n.code+n.id),i(2),c("ngForOf",t.Variants)}}var Oe=(()=>{let o=class o{constructor(r){this.biggerPictureService=r}getChannelLogo(r){return V.getChannelLogoByTypeId(r)}onZoomImage(r){this.biggerPictureService.openBiggerPicture(r,this.imageForZoom)}};o.\u0275fac=function(n){return new(n||o)(T(R))},o.\u0275cmp=k({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",id:"id"},standalone:!0,features:[M],decls:16,vars:5,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill","click"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa","fa-external-link-alt"]],template:function(n,d){if(n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),s(6,pe,2,2,"ng-container",6)(7,me,1,1,"ng-template",null,7,I),l()()(),a(9,"div",8)(10,"h4",9),g(11),l(),s(12,se,4,1,"div",10),l()()(),a(13,"div",11)(14,"div",12),s(15,_e,10,12,"div",13),l()()()),n&2){let E=P(8);i(6),c("ngIf",d.image)("ngIfElse",E),i(5),S(" ",d.title," "),i(1),c("ngIf",d.code),i(3),c("ngForOf",d.channels)}},dependencies:[D,O,U,B,F,z,N,$],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();export{Se as a,Oe as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as E,b as Ie,c as ne,d as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-ZLHGVQE6.js";import{a as ye,b as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-I3M6GHUE.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-QZ6GD3DK.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-OUASU5FP.js";import{a as be,b as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-BW5REXI6.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-GCXKRLIU.js";import{a as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-GF526R3A.js";import{a as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-6M2Q3GGB.js";import{a as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-Z4L57D42.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-UV6KK4W6.js";import{c as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-PFXGXQHO.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-HXRWGEJ5.js";import{a as xe,b as Se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-RNPQSH4X.js";import{b as z,e as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-HUDF4XGA.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-RWYXA653.js";import{a as ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-ZRTKOAYD.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-BYPWQ2HT.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-KM23UFSR.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-2GCJVDVN.js";import{d as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-TAD43MYD.js";import{a as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-TPFTT632.js";import{t as Z,u as Ce,v as q,w as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-V7X66MWE.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-45NXB6RE.js";import{b as he,c as G,h as K,k as J,m as Y,u as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-BREDWZJ7.js";import{c as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-YD4CXLB4.js";import{$a as S,B as P,Cb as f,Db as x,Eb as re,Fa as s,Ga as y,Hc as _e,Lb as R,Lc as H,Oa as c,Ua as g,X as k,Xb as pe,Za as r,Zb as me,_a as l,_b as $,aa as B,ab as T,bb as M,bc as L,cc as de,db as v,ea as F,ec as U,fa as O,fc as j,hb as u,ja as _,jb as p,ka as h,mb as ce,ob as A,pb as m,q as se,qb as V,rb as I,wb as oe,za as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-ZHLG7GCJ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.2/Marketplace/chunk-72VLH7XK.js";var Me=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=F({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,a){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),l()()(),S(4,"router-outlet")),n&2&&(s(3),c("Tabs",a.inventoryTabs))},dependencies:[_e,xe]});let i=o;return i})();function Le(i,o){if(i&1){let e=v();r(0,"button",22),u("click",function(){_(e);let n=p(3);return h(n.openScanDialog())}),S(1,"i",23),m(2," Scan Channel "),l()}}function Ue(i,o){if(i&1){let e=v();r(0,"button",24),u("click",function(){_(e);let n=p().ngIf,a=p(2);return h(a.onUpdateItems(n))}),S(1,"i",25),m(2," Update "),l()}}function je(i,o){if(i&1&&(r(0,"actions")(1,"div",3)(2,"div"),g(3,Le,3,0,"button",20)(4,Ue,3,0,"button",21),l()()()),i&2){let e=o.ngIf,t=p(2);s(3),c("ngIf",!t.productService.hasSelectionVariant(e)),s(1),c("ngIf",t.productService.hasSelectionVariant(e))}}function ze(i,o){if(i&1){let e=v();r(0,"app-table",26),u("onToggle",function(n){_(e);let a=p(2);return h(a.onShowDifferenceStock(n))})("onSubmit",function(n){let d=_(e).ngIf,C=p(2);return h(C.updateStockByVariant(n,d))}),l()}if(i&2){let e=o.ngIf,t=p(2);c("data",e)("channel",t.channelOptions)("showProductToggle",!0)("filter",t.searchFilter)}}function Qe(i,o){if(i&1){let e=v();r(0,"span",27),u("click",function(){_(e);let n=p(2);return h(n.getRowCount())}),r(1,"i",28),m(2,"?"),l()()}}function He(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=o.ngIf;s(1),V(x(2,1,e))}}function Ge(i,o){if(i&1){let e=v();r(0,"a",29),u("click",function(){_(e);let n=p(2);return h(n.nextPage())}),S(1,"i",30),m(2," Next"),l()}}function Ke(i,o){if(i&1){let e=v();r(0,"a",31),u("click",function(){_(e);let n=p(2);return h(n.getAllData())}),S(1,"i",32),m(2," Last"),l()}}function Je(i,o){if(i&1){let e=v();r(0,"mainpanel",1),u("onSubmit",function(n){_(e);let a=p();return h(a.onSearch(n))}),g(1,je,5,2,"actions",2),f(2,"async"),r(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"label",5),m(8,"PageNumber"),l(),r(9,"input",6),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.PageNumber=n)}),l()(),r(10,"div")(11,"label",7),m(12,"Page Size"),l(),r(13,"input",8),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.RowCount=n)}),l()()()()(),r(14,"content")(15,"div",9)(16,"div",10)(17,"div",11),g(18,ze,1,4,"app-table",12),f(19,"async"),T(20),r(21,"div",13)(22,"div",14)(23,"div",15),m(24),f(25,"number"),f(26,"async"),g(27,Qe,3,0,"span",16)(28,He,3,3,"span",2),f(29,"async"),m(30),l()(),r(31,"div",17),g(32,Ge,3,0,"a",18)(33,Ke,3,0,"a",19),l()(),M(),l()()()()()}if(i&2){let e=p(),t;c("pageData",e.pageData)("hideSearchBox",!1)("textButton","Search"),s(1),c("ngIf",x(2,13,e.paginationService.data$)),s(8),c("ngModel",e.searchFilter.PageNumber),s(4),c("ngModel",e.searchFilter.RowCount),s(5),c("ngIf",x(19,15,e.paginationService.data$)),s(6),I(" Showing 1 - ",x(25,17,(t=x(26,19,e.paginationService.data$))==null?null:t.length)," of "),s(3),c("ngIf",e.paginationService.hideCount),s(1),c("ngIf",x(29,21,!e.paginationService.hideCount&&e.allDataCount$)),s(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),s(2),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}var De=(()=>{let o=class o{constructor(t,n,a,d,C){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=d,this.productService=C,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,filterModel:E.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,n){let a=this.productService.selectedVariantProduct(t);if(a.length>0){let C=a.map(w=>({ID:w.ID,Code:w.Code,Inventory:w.Inventory}));var d=n.filter(w=>w.selected).map(w=>w.ID);let D={ListChannelID:d,List:C};this.http.post("/api/Inventory/UpdateChannel",D).subscribe(w=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+D.List.length+" variants in "+D.ListChannelID.length+" channels","Success")})}}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(X,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(P(a=>b.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=b.GuidEMpty})}updateStockByVariant(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(d=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=E.DIFFERENCE:this.searchFilter.filterModel=E.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let n=this.productService.selectedVariantProduct(t);this.dialog.open(ye,{data:{selectedItems:n,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(P(a=>b.IsNotEmpty(a))).subscribe(a=>{this.updateStock(t,a)})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,t)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(Q),y(z),y(W),y(te),y(ee))},o.\u0275cmp=F({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit"],[4,"ngIf"],[1,"d-flex"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(g(0,Je,34,23,"mainpanel",0),f(1,"async")),n&2&&c("ngIf",x(1,1,a.loader$))},dependencies:[$,G,Y,K,J,q,ne,Z,L,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();function Ye(i,o){if(i&1){let e=v();r(0,"button",36),u("click",function(){_(e);let n=p(2).ngIf,a=p();return h(a.openScanDialog(n))}),S(1,"i",37),m(2," Scan Channel "),l()}}function Ze(i,o){if(i&1){let e=v();r(0,"button",38),u("click",function(){_(e);let n=p().ngIf,a=p(2);return h(a.updateStock(n))}),S(1,"i",39),m(2," Update"),l()}}function qe(i,o){if(i&1&&(r(0,"div"),g(1,Ye,3,0,"button",34)(2,Ze,3,0,"button",35),l()),i&2){let e=o.ngIf,t=p(2);s(1),c("ngIf",!t.productService.hasSelectionVariant(e)),s(1),c("ngIf",t.productService.hasSelectionVariant(e))}}function We(i,o){i&1&&(r(0,"div",40)(1,"span"),m(2," showing only different stock, please press next to populate more data "),l()())}function Xe(i,o){if(i&1){let e=v();r(0,"th")(1,"input",41),u("ngModelChange",function(n){_(e);let a=p(2);return h(a.checkboxState=n)})("ngModelChange",function(){let a=_(e).ngIf,d=p(2);return h(d.onCheckboxStateChange(a))}),l()()}if(i&2){let e=p(2);s(1),c("ngModel",e.checkboxState)}}function et(i,o){i&1&&(T(0),r(1,"th",42),m(2," Reserved "),l(),M())}function tt(i,o){if(i&1){let e=v();r(0,"input",68),u("ngModelChange",function(n){_(e);let a=p(3).$implicit;return h(a.selected=n)})("ngModelChange",function(){_(e);let n=p(3).$implicit,a=p(2);return h(a.onCheckboxStateProduct(n))}),l()}if(i&2){let e=p(3).$implicit;c("ngModel",e.selected)}}function nt(i,o){if(i&1){let e=v();r(0,"img",69),u("click",function(n){_(e);let a=p(3).$implicit,d=p(2);return h(d.onZoomImage(n,a==null?null:a.ImageUrl))}),l()}if(i&2){let e=p(3).$implicit;ce("src",e==null?null:e.ThumbnailUrl,N)}}function it(i,o){i&1&&S(0,"img",70)}function at(i,o){if(i&1&&(T(0),r(1,"td",59)(2,"div",60),g(3,tt,1,1,"input",61)(4,nt,1,1,"img",62)(5,it,1,0,"ng-template",null,63,R),l()(),r(7,"td",64)(8,"span",65),m(9),l(),S(10,"br"),r(11,"div",66),S(12,"i",67),r(13,"small"),m(14),l()()(),M()),i&2){let e=A(6),t=p().$implicit,n=p().$implicit;s(1),c("rowSpan",n==null?null:n.Variants.length),s(2),c("ngIf",(t==null?null:t.Inventory)>=0||n.Variants.length>1),s(1),c("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",e),s(3),c("rowSpan",n==null?null:n.Variants.length),s(2),V(n==null?null:n.Name),s(5),I("(",n==null?null:n.Category,")")}}function ot(i,o){if(i&1){let e=v();T(0),r(1,"input",41),u("ngModelChange",function(n){_(e);let a=p(2).$implicit;return h(a.selected=n)}),l(),M()}if(i&2){let e=p(2).$implicit;s(1),c("ngModel",e.selected)}}function rt(i,o){if(i&1&&(T(0),g(1,ot,2,1,"ng-container",3),M()),i&2){let e=p().$implicit;s(1),c("ngIf",(e==null?null:e.Inventory)<=1e5)}}function lt(i,o){if(i&1){let e=v();r(0,"input",41),u("ngModelChange",function(n){_(e);let a=p(2).$implicit;return h(a.selected=n)}),l()}if(i&2){let e=p(2).$implicit;c("ngModel",e.selected)}}function st(i,o){if(i&1&&g(0,lt,1,1,"input",71),i&2){let e=p().$implicit;c("ngIf",(e==null?null:e.Inventory)>=0)}}function ct(i,o){if(i&1&&(r(0,"span")(1,"span",72),m(2),f(3,"number"),l(),m(4," => "),r(5,"span",73),m(6),f(7,"number"),l()()),i&2){let e=p().$implicit;s(2),I(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(x(7,4,e==null?null:e.Inventory))}}function pt(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=p().$implicit;s(1),I(" ",x(2,1,e==null?null:e.Inventory)," ")}}var mt=i=>({"bg-gradient-warning":i});function dt(i,o){if(i&1){let e=v();r(0,"td",74)(1,"span",75),u("click",function(){_(e);let n=p().$implicit,a=p(),d=a.$implicit,C=a.ngForOf,D=p(2);return h(D.openTableDialog(d,n,C))}),m(2),f(3,"number"),l()()}if(i&2){let e=p().$implicit;c("ngClass",oe(4,mt,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(2),I(" ",x(3,2,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function _t(i,o){if(i&1&&(T(0),r(1,"span",77),m(2),f(3,"number"),l(),M()),i&2){let e=p(2).$implicit;s(2),I(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function ht(i,o){i&1&&m(0," - ")}function ut(i,o){if(i&1&&(T(0),r(1,"td",53),g(2,_t,4,3,"ng-container",51)(3,ht,1,0,"ng-template",null,76,R),l(),M()),i&2){let e=A(4),t=p().$implicit;s(2),c("ngIf",t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved)("ngIfElse",e)}}function gt(i,o){i&1&&(T(0),m(1," - "),M())}function Ct(i,o){if(i&1&&(r(0,"span",78),f(1,"date"),m(2),f(3,"date"),l()),i&2){let e=p().$implicit;c("matTooltip",re(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",re(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}var ft=i=>({"text-decoration-line-through":i});function xt(i,o){if(i&1){let e=v();r(0,"tr"),g(1,at,15,7,"ng-container",3),r(2,"td",43),m(3),l(),r(4,"td",44)(5,"div",45)(6,"span",46),m(7),l(),r(8,"span",47)(9,"a",48),S(10,"i",49),l()()()(),r(11,"td",50),g(12,rt,2,1,"ng-container",51)(13,st,1,1,"ng-template",null,52,R),l(),r(15,"td",53),g(16,ct,8,6,"span",3)(17,pt,3,3,"span",3),l(),g(18,dt,4,6,"td",54)(19,ut,5,2,"ng-container",3),r(20,"td",26),g(21,gt,2,0,"ng-container",51)(22,Ct,4,8,"ng-template",null,55,R),l(),r(24,"td")(25,"div",12)(26,"div",56)(27,"a",48),S(28,"i",49),l(),m(29," \xA0\xA0 "),r(30,"span",57),u("click",function(){let a=_(e).$implicit,d=p(3);return h(d.refreshInventory(a==null||a.Channel[0]==null?null:a.Channel[0].ChannelItemID,a==null||a.Channel[0]==null?null:a.Channel[0].ChannelVariationID,a==null||a.Channel[0]==null?null:a.Channel[0].ChannelID,a==null?null:a.ID))}),S(31,"i",58),l()()()()()}if(i&2){let e=o.$implicit,t=o.index,n=A(14),a=A(23),d=p(3);s(1),c("ngIf",t==0),s(2),V(e==null?null:e.Model),s(1),c("matTooltip",e.isDiscontinued?d.discontinuedVariantMsg:""),s(2),c("ngClass",oe(15,ft,e.isDiscontinued)),s(1),V(e==null?null:e.Code),s(2),c("href","https://"+d.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N),s(3),c("ngIf",(e==null?null:e.Channel[0].TypeID)==1)("ngIfElse",n),s(4),c("ngIf",(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)),s(1),c("ngIf",(e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)),s(1),c("ngIf",e==null?null:e.Channel),s(1),c("ngIf",d.isShowReservedColumn),s(2),c("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==d.minDate)("ngIfElse",a),s(6),c("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,N)}}function St(i,o){if(i&1&&(r(0,"tbody"),g(1,xt,32,17,"tr",28),l()),i&2){let e=o.$implicit;s(1),c("ngForOf",e.Variants)}}function vt(i,o){if(i&1){let e=v();r(0,"span",79),u("click",function(){_(e);let n=p(2);return h(n.getRowCount())}),r(1,"i",80),m(2,"?"),l()()}}function yt(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=o.ngIf;s(1),V(x(2,1,e==null?null:e.Total))}}function It(i,o){if(i&1){let e=v();r(0,"a",84),u("click",function(){_(e);let n=p(3);return h(n.onNextPage())}),S(1,"i",85),m(2," Next"),l()}}function bt(i,o){if(i&1){let e=v();r(0,"a",86),u("click",function(){_(e);let n=p(3);return h(n.onLastPage())}),S(1,"i",87),m(2," Last"),l()}}function wt(i,o){if(i&1&&(r(0,"div",81),g(1,It,3,0,"a",82)(2,bt,3,0,"a",83),l()),i&2){let e=p(2);s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function Tt(i,o){if(i&1){let e=v();r(0,"mainpanel",1),u("onSubmit",function(n){_(e);let a=p();return h(a.onSearch(n))}),r(1,"actions")(2,"div",2),g(3,qe,3,2,"div",3),f(4,"async"),l()(),r(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),m(10,"PageNumber"),l(),r(11,"input",6),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.PageNumber=n)}),l()(),r(12,"div")(13,"label",7),m(14,"Page Size"),l(),r(15,"input",8),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.RowCount=n)}),l()(),r(16,"div")(17,"h6"),m(18,"Quantity From - To"),l(),r(19,"input",9),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.QuantityFrom=n)}),l(),m(20," - "),r(21,"input",10),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.QuantityTo=n)}),l()()()()(),r(22,"content")(23,"div",11)(24,"div",12)(25,"div",13),g(26,We,3,0,"div",14),r(27,"table",15)(28,"thead",16)(29,"tr")(30,"th",17),m(31,"Product "),S(32,"br"),r(33,"mat-slide-toggle",18),u("toggleChange",function(){_(e);let n=p();return n.showDifferenceStock=!n.showDifferenceStock,h(n.onShowDifferenceStock())}),r(34,"small",19),m(35,"FILTER DIFFERENT INVENTORY"),l()()(),r(36,"th",20),m(37,"Variant"),l(),r(38,"th",21),m(39,"SKU"),l(),g(40,Xe,2,1,"th",3),f(41,"async"),r(42,"th",22),m(43,"POS"),l(),r(44,"th",23)(45,"div",24),u("click",function(){_(e);let n=p();return h(n.onChangeChannel())}),S(46,"img",25),m(47),l()(),g(48,et,3,0,"ng-container",3),r(49,"th",26),m(50,"Last Sync"),l(),S(51,"th",27),l()(),g(52,St,2,1,"tbody",28),f(53,"async"),l(),r(54,"div",29)(55,"div",30)(56,"div",31),m(57),f(58,"number"),f(59,"async"),g(60,vt,3,0,"span",32)(61,yt,3,3,"span",3),f(62,"async"),m(63),l()(),g(64,wt,3,2,"div",33),f(65,"async"),l()()()()()()}if(i&2){let e=p(),t,n;c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),c("ngIf",x(4,20,e.paginationService.data$)),s(8),c("ngModel",e.searchFilter.PageNumber),s(4),c("ngModel",e.searchFilter.RowCount),s(4),c("ngModel",e.searchFilter.QuantityFrom),s(2),c("ngModel",e.searchFilter.QuantityTo),s(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),c("ngIf",x(41,22,e.paginationService.data$)),s(5),c("matTooltip","Change "+(e.selectedChannel==null?null:e.selectedChannel.Name)),s(1),c("src",e.selectedChannel.logo,N),s(1),I(" ",e.selectedChannel!=null&&e.selectedChannel.Name?e.selectedChannel==null?null:e.selectedChannel.Name:"Choose Channel ..."," "),s(1),c("ngIf",e.isShowReservedColumn),s(4),c("ngForOf",x(53,24,e.products$)),s(5),I(" Showing 1 - ",x(58,26,(t=x(59,28,e.paginationService.data$))==null?null:t.length)," of "),s(3),c("ngIf",e.paginationService.hideCount),s(1),c("ngIf",x(62,30,!e.paginationService.hideCount&&e.rowCount$)),s(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),s(1),c("ngIf",((n=x(65,32,e.paginationService.data$))==null?null:n.length)>0)}}var Ve=(()=>{let o=class o{constructor(t,n,a,d,C,D,w){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=d,this.productService=C,this.biggerPictureService=D,this.inventoryService=w,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=b.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.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}]},this.hostName=C.getHostName()}ngOnInit(){this.initPageLoader(),this.products$=this.paginationService.data$.pipe(se(t=>(t=t.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.isDiscontinued=n.Discontinued=="Yes",a))),n)),t)),k(t=>{this.checkShowReservedColumn(t)}))}checkShowReservedColumn(t){let n=0,a;t.forEach(d=>{a=d.Variants.find(C=>b.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(k(t=>{if(this.channelOptions=t.Options.Channel,this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),!t.Filter.IsMarketplaceAppActive){let n=`Automatic inventory sync disabled.
|
|
1
|
+
import{a as E,b as Ie,c as ne,d as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-NTY552OQ.js";import{a as ye,b as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-EHWPM4BE.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-IYRCZVA4.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-RHYO2A6O.js";import{a as be,b as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-7KE42BE5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-SINQ7SXI.js";import{a as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-W6QK3KI2.js";import{a as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-NJI6OAOU.js";import{a as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-JW6NHBN5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-ZVHCE4K4.js";import{c as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-C7F32KU3.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-PP4ELWXY.js";import{a as xe,b as Se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-MAVB5XKB.js";import{b as z,e as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-HUTPG746.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-PSWRS2QZ.js";import{a as ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-2CW5UYLD.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-ZQL3IYZ4.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-LX6C545M.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-NG6JQWVZ.js";import{d as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-O3ASI5PY.js";import{a as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-23JYSN6Q.js";import{t as Z,u as Ce,v as q,w as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-WZRJRVH6.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-LYFRN35D.js";import{b as he,c as G,h as K,k as J,m as Y,u as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-UREGZMHY.js";import{c as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-5TEZF6KQ.js";import{$a as S,B as P,Cb as f,Db as x,Eb as re,Fa as s,Ga as y,Hc as _e,Lb as R,Lc as H,Oa as c,Ua as g,X as k,Xb as pe,Za as r,Zb as me,_a as l,_b as $,aa as B,ab as T,bb as M,bc as L,cc as de,db as v,ea as F,ec as U,fa as O,fc as j,hb as u,ja as _,jb as p,ka as h,mb as ce,ob as A,pb as m,q as se,qb as V,rb as I,wb as oe,za as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-4EVRTQJX.js";var Me=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=F({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,a){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),l()()(),S(4,"router-outlet")),n&2&&(s(3),c("Tabs",a.inventoryTabs))},dependencies:[_e,xe]});let i=o;return i})();function Le(i,o){if(i&1){let e=v();r(0,"button",22),u("click",function(){_(e);let n=p(3);return h(n.openScanDialog())}),S(1,"i",23),m(2," Scan Channel "),l()}}function Ue(i,o){if(i&1){let e=v();r(0,"button",24),u("click",function(){_(e);let n=p().ngIf,a=p(2);return h(a.onUpdateItems(n))}),S(1,"i",25),m(2," Update "),l()}}function je(i,o){if(i&1&&(r(0,"actions")(1,"div",3)(2,"div"),g(3,Le,3,0,"button",20)(4,Ue,3,0,"button",21),l()()()),i&2){let e=o.ngIf,t=p(2);s(3),c("ngIf",!t.productService.hasSelectionVariant(e)),s(1),c("ngIf",t.productService.hasSelectionVariant(e))}}function ze(i,o){if(i&1){let e=v();r(0,"app-table",26),u("onToggle",function(n){_(e);let a=p(2);return h(a.onShowDifferenceStock(n))})("onSubmit",function(n){let d=_(e).ngIf,C=p(2);return h(C.updateStockByVariant(n,d))}),l()}if(i&2){let e=o.ngIf,t=p(2);c("data",e)("channel",t.channelOptions)("showProductToggle",!0)("filter",t.searchFilter)}}function Qe(i,o){if(i&1){let e=v();r(0,"span",27),u("click",function(){_(e);let n=p(2);return h(n.getRowCount())}),r(1,"i",28),m(2,"?"),l()()}}function He(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=o.ngIf;s(1),V(x(2,1,e))}}function Ge(i,o){if(i&1){let e=v();r(0,"a",29),u("click",function(){_(e);let n=p(2);return h(n.nextPage())}),S(1,"i",30),m(2," Next"),l()}}function Ke(i,o){if(i&1){let e=v();r(0,"a",31),u("click",function(){_(e);let n=p(2);return h(n.getAllData())}),S(1,"i",32),m(2," Last"),l()}}function Je(i,o){if(i&1){let e=v();r(0,"mainpanel",1),u("onSubmit",function(n){_(e);let a=p();return h(a.onSearch(n))}),g(1,je,5,2,"actions",2),f(2,"async"),r(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"label",5),m(8,"PageNumber"),l(),r(9,"input",6),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.PageNumber=n)}),l()(),r(10,"div")(11,"label",7),m(12,"Page Size"),l(),r(13,"input",8),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.RowCount=n)}),l()()()()(),r(14,"content")(15,"div",9)(16,"div",10)(17,"div",11),g(18,ze,1,4,"app-table",12),f(19,"async"),T(20),r(21,"div",13)(22,"div",14)(23,"div",15),m(24),f(25,"number"),f(26,"async"),g(27,Qe,3,0,"span",16)(28,He,3,3,"span",2),f(29,"async"),m(30),l()(),r(31,"div",17),g(32,Ge,3,0,"a",18)(33,Ke,3,0,"a",19),l()(),M(),l()()()()()}if(i&2){let e=p(),t;c("pageData",e.pageData)("hideSearchBox",!1)("textButton","Search"),s(1),c("ngIf",x(2,13,e.paginationService.data$)),s(8),c("ngModel",e.searchFilter.PageNumber),s(4),c("ngModel",e.searchFilter.RowCount),s(5),c("ngIf",x(19,15,e.paginationService.data$)),s(6),I(" Showing 1 - ",x(25,17,(t=x(26,19,e.paginationService.data$))==null?null:t.length)," of "),s(3),c("ngIf",e.paginationService.hideCount),s(1),c("ngIf",x(29,21,!e.paginationService.hideCount&&e.allDataCount$)),s(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),s(2),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}var De=(()=>{let o=class o{constructor(t,n,a,d,C){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=d,this.productService=C,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,filterModel:E.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,n){let a=this.productService.selectedVariantProduct(t);if(a.length>0){let C=a.map(w=>({ID:w.ID,Code:w.Code,Inventory:w.Inventory}));var d=n.filter(w=>w.selected).map(w=>w.ID);let D={ListChannelID:d,List:C};this.http.post("/api/Inventory/UpdateChannel",D).subscribe(w=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+D.List.length+" variants in "+D.ListChannelID.length+" channels","Success")})}}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(X,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(P(a=>b.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=b.GuidEMpty})}updateStockByVariant(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(d=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=E.DIFFERENCE:this.searchFilter.filterModel=E.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let n=this.productService.selectedVariantProduct(t);this.dialog.open(ye,{data:{selectedItems:n,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(P(a=>b.IsNotEmpty(a))).subscribe(a=>{this.updateStock(t,a)})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,t)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(Q),y(z),y(W),y(te),y(ee))},o.\u0275cmp=F({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit"],[4,"ngIf"],[1,"d-flex"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(g(0,Je,34,23,"mainpanel",0),f(1,"async")),n&2&&c("ngIf",x(1,1,a.loader$))},dependencies:[$,G,Y,K,J,q,ne,Z,L,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();function Ye(i,o){if(i&1){let e=v();r(0,"button",36),u("click",function(){_(e);let n=p(2).ngIf,a=p();return h(a.openScanDialog(n))}),S(1,"i",37),m(2," Scan Channel "),l()}}function Ze(i,o){if(i&1){let e=v();r(0,"button",38),u("click",function(){_(e);let n=p().ngIf,a=p(2);return h(a.updateStock(n))}),S(1,"i",39),m(2," Update"),l()}}function qe(i,o){if(i&1&&(r(0,"div"),g(1,Ye,3,0,"button",34)(2,Ze,3,0,"button",35),l()),i&2){let e=o.ngIf,t=p(2);s(1),c("ngIf",!t.productService.hasSelectionVariant(e)),s(1),c("ngIf",t.productService.hasSelectionVariant(e))}}function We(i,o){i&1&&(r(0,"div",40)(1,"span"),m(2," showing only different stock, please press next to populate more data "),l()())}function Xe(i,o){if(i&1){let e=v();r(0,"th")(1,"input",41),u("ngModelChange",function(n){_(e);let a=p(2);return h(a.checkboxState=n)})("ngModelChange",function(){let a=_(e).ngIf,d=p(2);return h(d.onCheckboxStateChange(a))}),l()()}if(i&2){let e=p(2);s(1),c("ngModel",e.checkboxState)}}function et(i,o){i&1&&(T(0),r(1,"th",42),m(2," Reserved "),l(),M())}function tt(i,o){if(i&1){let e=v();r(0,"input",68),u("ngModelChange",function(n){_(e);let a=p(3).$implicit;return h(a.selected=n)})("ngModelChange",function(){_(e);let n=p(3).$implicit,a=p(2);return h(a.onCheckboxStateProduct(n))}),l()}if(i&2){let e=p(3).$implicit;c("ngModel",e.selected)}}function nt(i,o){if(i&1){let e=v();r(0,"img",69),u("click",function(n){_(e);let a=p(3).$implicit,d=p(2);return h(d.onZoomImage(n,a==null?null:a.ImageUrl))}),l()}if(i&2){let e=p(3).$implicit;ce("src",e==null?null:e.ThumbnailUrl,N)}}function it(i,o){i&1&&S(0,"img",70)}function at(i,o){if(i&1&&(T(0),r(1,"td",59)(2,"div",60),g(3,tt,1,1,"input",61)(4,nt,1,1,"img",62)(5,it,1,0,"ng-template",null,63,R),l()(),r(7,"td",64)(8,"span",65),m(9),l(),S(10,"br"),r(11,"div",66),S(12,"i",67),r(13,"small"),m(14),l()()(),M()),i&2){let e=A(6),t=p().$implicit,n=p().$implicit;s(1),c("rowSpan",n==null?null:n.Variants.length),s(2),c("ngIf",(t==null?null:t.Inventory)>=0||n.Variants.length>1),s(1),c("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",e),s(3),c("rowSpan",n==null?null:n.Variants.length),s(2),V(n==null?null:n.Name),s(5),I("(",n==null?null:n.Category,")")}}function ot(i,o){if(i&1){let e=v();T(0),r(1,"input",41),u("ngModelChange",function(n){_(e);let a=p(2).$implicit;return h(a.selected=n)}),l(),M()}if(i&2){let e=p(2).$implicit;s(1),c("ngModel",e.selected)}}function rt(i,o){if(i&1&&(T(0),g(1,ot,2,1,"ng-container",3),M()),i&2){let e=p().$implicit;s(1),c("ngIf",(e==null?null:e.Inventory)<=1e5)}}function lt(i,o){if(i&1){let e=v();r(0,"input",41),u("ngModelChange",function(n){_(e);let a=p(2).$implicit;return h(a.selected=n)}),l()}if(i&2){let e=p(2).$implicit;c("ngModel",e.selected)}}function st(i,o){if(i&1&&g(0,lt,1,1,"input",71),i&2){let e=p().$implicit;c("ngIf",(e==null?null:e.Inventory)>=0)}}function ct(i,o){if(i&1&&(r(0,"span")(1,"span",72),m(2),f(3,"number"),l(),m(4," => "),r(5,"span",73),m(6),f(7,"number"),l()()),i&2){let e=p().$implicit;s(2),I(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(x(7,4,e==null?null:e.Inventory))}}function pt(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=p().$implicit;s(1),I(" ",x(2,1,e==null?null:e.Inventory)," ")}}var mt=i=>({"bg-gradient-warning":i});function dt(i,o){if(i&1){let e=v();r(0,"td",74)(1,"span",75),u("click",function(){_(e);let n=p().$implicit,a=p(),d=a.$implicit,C=a.ngForOf,D=p(2);return h(D.openTableDialog(d,n,C))}),m(2),f(3,"number"),l()()}if(i&2){let e=p().$implicit;c("ngClass",oe(4,mt,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(2),I(" ",x(3,2,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function _t(i,o){if(i&1&&(T(0),r(1,"span",77),m(2),f(3,"number"),l(),M()),i&2){let e=p(2).$implicit;s(2),I(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function ht(i,o){i&1&&m(0," - ")}function ut(i,o){if(i&1&&(T(0),r(1,"td",53),g(2,_t,4,3,"ng-container",51)(3,ht,1,0,"ng-template",null,76,R),l(),M()),i&2){let e=A(4),t=p().$implicit;s(2),c("ngIf",t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved)("ngIfElse",e)}}function gt(i,o){i&1&&(T(0),m(1," - "),M())}function Ct(i,o){if(i&1&&(r(0,"span",78),f(1,"date"),m(2),f(3,"date"),l()),i&2){let e=p().$implicit;c("matTooltip",re(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",re(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}var ft=i=>({"text-decoration-line-through":i});function xt(i,o){if(i&1){let e=v();r(0,"tr"),g(1,at,15,7,"ng-container",3),r(2,"td",43),m(3),l(),r(4,"td",44)(5,"div",45)(6,"span",46),m(7),l(),r(8,"span",47)(9,"a",48),S(10,"i",49),l()()()(),r(11,"td",50),g(12,rt,2,1,"ng-container",51)(13,st,1,1,"ng-template",null,52,R),l(),r(15,"td",53),g(16,ct,8,6,"span",3)(17,pt,3,3,"span",3),l(),g(18,dt,4,6,"td",54)(19,ut,5,2,"ng-container",3),r(20,"td",26),g(21,gt,2,0,"ng-container",51)(22,Ct,4,8,"ng-template",null,55,R),l(),r(24,"td")(25,"div",12)(26,"div",56)(27,"a",48),S(28,"i",49),l(),m(29," \xA0\xA0 "),r(30,"span",57),u("click",function(){let a=_(e).$implicit,d=p(3);return h(d.refreshInventory(a==null||a.Channel[0]==null?null:a.Channel[0].ChannelItemID,a==null||a.Channel[0]==null?null:a.Channel[0].ChannelVariationID,a==null||a.Channel[0]==null?null:a.Channel[0].ChannelID,a==null?null:a.ID))}),S(31,"i",58),l()()()()()}if(i&2){let e=o.$implicit,t=o.index,n=A(14),a=A(23),d=p(3);s(1),c("ngIf",t==0),s(2),V(e==null?null:e.Model),s(1),c("matTooltip",e.isDiscontinued?d.discontinuedVariantMsg:""),s(2),c("ngClass",oe(15,ft,e.isDiscontinued)),s(1),V(e==null?null:e.Code),s(2),c("href","https://"+d.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N),s(3),c("ngIf",(e==null?null:e.Channel[0].TypeID)==1)("ngIfElse",n),s(4),c("ngIf",(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)),s(1),c("ngIf",(e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)),s(1),c("ngIf",e==null?null:e.Channel),s(1),c("ngIf",d.isShowReservedColumn),s(2),c("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==d.minDate)("ngIfElse",a),s(6),c("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,N)}}function St(i,o){if(i&1&&(r(0,"tbody"),g(1,xt,32,17,"tr",28),l()),i&2){let e=o.$implicit;s(1),c("ngForOf",e.Variants)}}function vt(i,o){if(i&1){let e=v();r(0,"span",79),u("click",function(){_(e);let n=p(2);return h(n.getRowCount())}),r(1,"i",80),m(2,"?"),l()()}}function yt(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=o.ngIf;s(1),V(x(2,1,e==null?null:e.Total))}}function It(i,o){if(i&1){let e=v();r(0,"a",84),u("click",function(){_(e);let n=p(3);return h(n.onNextPage())}),S(1,"i",85),m(2," Next"),l()}}function bt(i,o){if(i&1){let e=v();r(0,"a",86),u("click",function(){_(e);let n=p(3);return h(n.onLastPage())}),S(1,"i",87),m(2," Last"),l()}}function wt(i,o){if(i&1&&(r(0,"div",81),g(1,It,3,0,"a",82)(2,bt,3,0,"a",83),l()),i&2){let e=p(2);s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function Tt(i,o){if(i&1){let e=v();r(0,"mainpanel",1),u("onSubmit",function(n){_(e);let a=p();return h(a.onSearch(n))}),r(1,"actions")(2,"div",2),g(3,qe,3,2,"div",3),f(4,"async"),l()(),r(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),m(10,"PageNumber"),l(),r(11,"input",6),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.PageNumber=n)}),l()(),r(12,"div")(13,"label",7),m(14,"Page Size"),l(),r(15,"input",8),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.RowCount=n)}),l()(),r(16,"div")(17,"h6"),m(18,"Quantity From - To"),l(),r(19,"input",9),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.QuantityFrom=n)}),l(),m(20," - "),r(21,"input",10),u("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.QuantityTo=n)}),l()()()()(),r(22,"content")(23,"div",11)(24,"div",12)(25,"div",13),g(26,We,3,0,"div",14),r(27,"table",15)(28,"thead",16)(29,"tr")(30,"th",17),m(31,"Product "),S(32,"br"),r(33,"mat-slide-toggle",18),u("toggleChange",function(){_(e);let n=p();return n.showDifferenceStock=!n.showDifferenceStock,h(n.onShowDifferenceStock())}),r(34,"small",19),m(35,"FILTER DIFFERENT INVENTORY"),l()()(),r(36,"th",20),m(37,"Variant"),l(),r(38,"th",21),m(39,"SKU"),l(),g(40,Xe,2,1,"th",3),f(41,"async"),r(42,"th",22),m(43,"POS"),l(),r(44,"th",23)(45,"div",24),u("click",function(){_(e);let n=p();return h(n.onChangeChannel())}),S(46,"img",25),m(47),l()(),g(48,et,3,0,"ng-container",3),r(49,"th",26),m(50,"Last Sync"),l(),S(51,"th",27),l()(),g(52,St,2,1,"tbody",28),f(53,"async"),l(),r(54,"div",29)(55,"div",30)(56,"div",31),m(57),f(58,"number"),f(59,"async"),g(60,vt,3,0,"span",32)(61,yt,3,3,"span",3),f(62,"async"),m(63),l()(),g(64,wt,3,2,"div",33),f(65,"async"),l()()()()()()}if(i&2){let e=p(),t,n;c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),c("ngIf",x(4,20,e.paginationService.data$)),s(8),c("ngModel",e.searchFilter.PageNumber),s(4),c("ngModel",e.searchFilter.RowCount),s(4),c("ngModel",e.searchFilter.QuantityFrom),s(2),c("ngModel",e.searchFilter.QuantityTo),s(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),c("ngIf",x(41,22,e.paginationService.data$)),s(5),c("matTooltip","Change "+(e.selectedChannel==null?null:e.selectedChannel.Name)),s(1),c("src",e.selectedChannel.logo,N),s(1),I(" ",e.selectedChannel!=null&&e.selectedChannel.Name?e.selectedChannel==null?null:e.selectedChannel.Name:"Choose Channel ..."," "),s(1),c("ngIf",e.isShowReservedColumn),s(4),c("ngForOf",x(53,24,e.products$)),s(5),I(" Showing 1 - ",x(58,26,(t=x(59,28,e.paginationService.data$))==null?null:t.length)," of "),s(3),c("ngIf",e.paginationService.hideCount),s(1),c("ngIf",x(62,30,!e.paginationService.hideCount&&e.rowCount$)),s(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),s(1),c("ngIf",((n=x(65,32,e.paginationService.data$))==null?null:n.length)>0)}}var Ve=(()=>{let o=class o{constructor(t,n,a,d,C,D,w){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=d,this.productService=C,this.biggerPictureService=D,this.inventoryService=w,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=b.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.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}]},this.hostName=C.getHostName()}ngOnInit(){this.initPageLoader(),this.products$=this.paginationService.data$.pipe(se(t=>(t=t.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.isDiscontinued=n.Discontinued=="Yes",a))),n)),t)),k(t=>{this.checkShowReservedColumn(t)}))}checkShowReservedColumn(t){let n=0,a;t.forEach(d=>{a=d.Variants.find(C=>b.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(k(t=>{if(this.channelOptions=t.Options.Channel,this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),!t.Filter.IsMarketplaceAppActive){let n=`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`;this.toastr.warning(n,"Warning")}}))}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(t=>t.ID==this.searchFilter.ChannelID),this.selectedChannel&&(this.selectedChannel.logo=b.getChannelLogoByTypeId(this.selectedChannel.TypeID))}onChangeChannel(){this.dialog.open(Te,{data:{channelOptions:this.channelOptions,selectedChannel:this.selectedChannel}}).afterClosed().pipe(P(t=>b.IsNotEmpty(t))).subscribe(t=>{this.selectedChannel=t,this.onFilterChannel(t.ID)})}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}onFilterChannel(t){this.searchFilter.ChannelID=t,this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let a=n.map(C=>({ID:C.ID,Code:C.Code,Inventory:C.Inventory})),d={ListChannelID:[this.searchFilter.ChannelID],List:a};this.http.post("/api/Inventory/UpdateChannel",d).subscribe(C=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(C)})}}handlingUpdateStock(t){if(t[0]?.StatusProduct){let n=t[0].StatusProduct.Fail_list,a=t[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",a,n)}else this.toastr.error(t[0]?.Exception,"Error")}openScanDialog(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=b.GuidEMpty,this.dialog.open(X,{data:{filter:n,channelOptions:t.Options.Channel},width:"600px"}).afterClosed().pipe(P(d=>b.IsNotEmpty(d))).subscribe(d=>{this.searchFilter.ChannelID=d.ChannelID,this.searchFilter.ScanFull=d.ScanFull,this.searchFilter.UpdatedProduct=d.UpdatedProduct,this.searchFilter.Async=d.Async,this.scannALl(t)})}scannALl(t){let n=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(a=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.searchFilter.ScanFull=!1,this.initPageLoader(),this.toastr.success("Successfully scanned from "+n?.Name,"Success"))})}refreshInventory(t,n,a,d){let C={ChannelItemID:t,ChannelVariationID:n,ChannelID:a,VariantID:d};this.http.post("/api/Inventory/RefreshInventoryChannel",C).subscribe(D=>{this.toastr.success("Successfully updated","Success"),this.paginationService.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(t){t.Variants=t.Variants.map(n=>(n.Inventory>=0&&(n.selected=t.selected),n))}onCheckboxStateChange(t){t=t.map(n=>(n.Variants=n.Variants.map(a=>(a.selected=this.checkboxState,a)),n))}openTableDialog(t,n,a){this.dialog.open(Ie,{data:{Name:t.Name,Variant:n,ChannelID:n?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:t.ChannelItemID}}).afterClosed().pipe(P(C=>b.IsNotEmpty(C))).subscribe(C=>{this.updateItemAfterDialog(C,a)})}updateItemAfterDialog(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku},d=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(C=>{this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+d?.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=E.DIFFERENCE:this.searchFilter.filterModel=E.ALL,this.paginationService.reloadPagination(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,t)}onLastPage(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1};this.http.post(`${this.rowCountApi}`,t).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n.Total)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(Q),y(z),y(W),y(te),y(ee),y(ve),y(ie))},o.\u0275cmp=F({type:o,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],["type","number","name","QuantityFrom",1,"w-25","me-2",3,"ngModel","ngModelChange"],["type","number","name","QuantityTo",1,"w-25","ms-2",3,"ngModel","ngModelChange"],[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"],[1,"fw-bold"],["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","100px"],["matTooltipPosition","above",1,"d-inline-block","text-truncate","mt-3","cursor-pointer",2,"max-width","114px",3,"matTooltip","click"],[2,"width","16px",3,"src"],[1,"text-center"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-start"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["OTHER_CHANNEL",""],[1,"text-end"],["class","text-end",3,"ngClass",4,"ngIf"],["SYNCDATE",""],[1,"col-12","ps-0","d-flex","justify-content-between"],["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"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["EMPTY_RESERVED",""],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(g(0,Tt,66,34,"mainpanel",0),f(1,"async")),n&2&&c("ngIf",x(1,1,a.loader$))},dependencies:[pe,me,$,G,Y,he,K,J,be,q,Z,L,U,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 i=o;return i})();var Mt=[{path:"",component:Me,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:De,canActivate:[le],data:{title:"Inventory Comparison"}},{path:"bychannel",component:Ve,canActivate:[le],data:{title:"Inventory Comparison"}}]}],Pe=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=O({type:o}),o.\u0275inj=B({imports:[j,H.forChild(Mt)]});let i=o;return i})();var xn=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=O({type:o}),o.\u0275inj=B({providers:[ie],imports:[j,Pe,H,Se,ue,ge,we,fe,ne,Ce]});let i=o;return i})();export{xn as InventoryModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ee,b as ne,c as ie,d as oe,e as re,f as ae}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.
|
|
1
|
+
import{a as ee,b as ne,c as ie,d as oe,e as re,f as ae}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-GQBV5OAK.js";import{b as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-AU4SOVII.js";import{c as q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-QNIEXALL.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-PTRHHOMT.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-YMMBFSTV.js";import{a as Y,b as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-MAVB5XKB.js";import{e as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-HUTPG746.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-PSWRS2QZ.js";import{a as J}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-23JYSN6Q.js";import{v as Q,w as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-WZRJRVH6.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-LYFRN35D.js";import{c as W,h as z,k as G,u as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-UREGZMHY.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-5TEZF6KQ.js";import{$ as T,$a as d,$b as P,Fa as l,Ga as E,Hc as H,Ja as O,Jc as j,Lc as $,Oa as p,Ua as c,Za as o,Zb as w,_a as a,_b as R,aa as N,ab as u,bb as f,ca as U,db as y,ea as h,fa as k,fc as A,hb as _,ja as S,jb as g,ka as v,ob as C,pb as m,qb as F,rb as L,tb as B,wb as b,ya as M}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-4EVRTQJX.js";var de=e=>[e];function ue(e,t){if(e&1&&(u(0),o(1,"a",9),m(2),a(),f()),e&2){let s=t.$implicit;l(1),p("routerLink",b(2,de,s.url)),l(1),L(" ",s.title,"")}}var pe=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=h({type:t,selectors:[["app-download"]],decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(i,r){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),d(3,"nav-tab",2),a()(),o(4,"div")(5,"div",3)(6,"a",4),d(7,"i",5),a(),o(8,"div",6)(9,"div",7),c(10,ue,3,4,"ng-container",8),a()()()()(),d(11,"router-outlet")),i&2&&(l(3),p("Tabs",r.tabs),l(7),p("ngForOf",r.moreMenu))},dependencies:[w,Y,H,j]});let e=t;return e})();var I=(()=>{let t=class t{constructor(n){this.httpService=n}download(n){let i="/api/Product/downloadurl";return this.httpService.post(i,n)}};t.\u0275fac=function(i){return new(i||t)(U(V))},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function ge(e,t){if(e&1&&(o(0,"th"),m(1),a()),e&2){let s=t.$implicit;l(1),F(s.column)}}function _e(e,t){if(e&1&&(u(0),o(1,"td"),d(2,"span",6),a(),f()),e&2){let s=t.$implicit,n=g().$implicit;l(2),p("innerHTML",n[s.prop],M)}}var he=e=>({"background-color":e});function Se(e,t){if(e&1&&(o(0,"tr",5),c(1,_e,3,1,"ng-container",3),a()),e&2){let s=t.$implicit,n=g();p("ngStyle",b(2,he,s.Status>200?"#F4D6D5":"#DEE9C9")),l(1),p("ngForOf",n.configs)}}var se=(()=>{let t=class t{constructor(){this.eventClose=new O}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=h({type:t,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(i,r){i&1&&(o(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),c(4,ge,2,1,"th",3),a()(),o(5,"tbody"),c(6,Se,2,4,"tr",4),a()()()),i&2&&(l(4),p("ngForOf",r.configs),l(2),p("ngForOf",r.data))},dependencies:[w,P]});let e=t;return e})();function ye(e,t){if(e&1){let s=y();u(0),o(1,"button",23),_("click",function(){S(s);let i=g(),r=C(11);return v(i.onNewStepperState(r))}),d(2,"i",24),m(3," New "),a(),f()}}function Ce(e,t){if(e&1){let s=y();u(0),o(1,"button",23),_("click",function(){S(s),g();let i=C(11);return v(i.previous())}),m(2," Back "),a(),f()}}function be(e,t){if(e&1){let s=y();u(0),o(1,"button",25),_("click",function(){S(s);let i=g(),r=C(11);return v(i.onStepperNext(r))}),m(2," Next "),a(),f()}}function we(e,t){if(e&1){let s=y();u(0),o(1,"button",26),_("click",function(){S(s);let i=g(),r=C(11);return v(i.onSubmit(r))}),m(2,"Download"),a(),f()}if(e&2){let s=g();l(1),p("disabled",!s.urls)}}function xe(e,t){e&1&&m(0,"Instruction")}function Ie(e,t){e&1&&m(0,"Download")}function De(e,t){e&1&&m(0,"Finish")}function Ee(e,t){e&1&&d(0,"i",27)}function Te(e,t){e&1&&d(0,"i",28)}function Ne(e,t){e&1&&d(0,"i",29)}var me=(()=>{let t=class t{constructor(n,i){this.downloadService=n,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
2
|
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let i=this.urls.split(/\r?\n/);this.downloadService.download(i).subscribe(r=>{this.downloadResponses=r,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
|
|
3
3
|
${n?.Name}
|
|
4
4
|
</a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(i){return new(i||t)(E(I),E(q))},t.\u0275cmp=h({type:t,selectors:[["app-by-url"]],features:[B([{provide:ee,useValue:{displayDefaultIndicatorType:!1}}])],decls:41,vars:15,consts:[["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["labelPosition","bottom","linear","",1,"stepper-downloadByUrl",3,"selectedIndex","selectionChange"],["stepper",""],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],["state","DOWNLOAD",3,"editable","completed"],["name","url","cols","30","rows","25",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["state","FINISH"],["status","error",3,"data","configs"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled","click"],[1,"fa-solid","fa-info"],[1,"fa-solid","fa-download"],[1,"fa-sharp","fa-solid","fa-flag"]],template:function(i,r){i&1&&(o(0,"mainpanel",0)(1,"actions"),c(2,ye,4,0,"ng-container",1)(3,Ce,3,0,"ng-container",1)(4,be,3,0,"ng-container",1)(5,we,3,1,"ng-container",1),a(),o(6,"content")(7,"div",2)(8,"div",3)(9,"div",4)(10,"mat-stepper",5,6),_("selectionChange",function(D){return r.onStepperChange(D)}),o(12,"mat-step",7),c(13,xe,1,0,"ng-template",8),o(14,"div",9)(15,"div",10)(16,"div",11)(17,"h4",12),m(18,"Note"),a()(),o(19,"div",13)(20,"ol",14)(21,"li"),m(22," Use this form to Download Products from Tokopedia using product URL "),a(),o(23,"li"),m(24," Copy Product URL from "),o(25,"a",15),m(26,"https://seller.tokopedia.com/ "),a(),m(27," and paste in this form "),a(),o(28,"li"),m(29," Use New Line when you want to input several product URLs "),a()()()()()(),o(30,"mat-step",16),c(31,Ie,1,0,"ng-template",8),o(32,"div",9)(33,"textarea",17),_("ngModelChange",function(D){return r.urls=D}),a()()(),o(34,"mat-step",18),c(35,De,1,0,"ng-template",8),o(36,"div",9),d(37,"app-response-api-list",19),a()(),c(38,Ee,1,0,"ng-template",20)(39,Te,1,0,"ng-template",21)(40,Ne,1,0,"ng-template",22),a()()()()()()),i&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngIf",r.stepperState=="FINISH"),l(1),p("ngIf",r.stepperState=="DOWNLOAD"),l(1),p("ngIf",r.stepperState=="GUIDE"),l(1),p("ngIf",r.stepperState=="DOWNLOAD"),l(5),p("selectedIndex",1),l(2),p("editable",r.stepperState!="FINISH")("completed",!0),l(18),p("editable",r.stepperState!="FINISH")("completed",!1),l(3),p("placeholder",r.urlPlaceholder)("ngModel",r.urls),l(4),p("data",r.downloadResponses)("configs",r.configs))},dependencies:[R,W,z,G,Q,oe,ne,re,ie,se],styles:[`.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container mat-step-header>div.mat-step-label{padding-top:8px}
|