marketplacepos 3.6.3 → 3.6.4
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-GQBV5OAK.js → chunk-2TNMBZG6.js} +1 -1
- package/Marketplace/{chunk-6G6GKWWY.js → chunk-4EAH4CVW.js} +1 -1
- package/Marketplace/{chunk-4OJVE2Q5.js → chunk-4JJEXEXD.js} +1 -1
- package/Marketplace/{chunk-NXCMFVSB.js → chunk-4XO4E2OI.js} +1 -1
- package/Marketplace/{chunk-WKRAISAM.js → chunk-5437ABT5.js} +1 -1
- package/Marketplace/{chunk-PP4ELWXY.js → chunk-5W3D75EL.js} +1 -1
- package/Marketplace/{chunk-QEO6A33I.js → chunk-6CMIQC4Z.js} +1 -1
- package/Marketplace/{chunk-JTTK3RAC.js → chunk-6JF7QYRS.js} +1 -1
- package/Marketplace/{chunk-WUPPCYDC.js → chunk-7IYEHG7N.js} +1 -1
- package/Marketplace/{chunk-L5RZ2NWC.js → chunk-7W5OCB74.js} +1 -1
- package/Marketplace/{chunk-7NGXKP3O.js → chunk-ART3IBLH.js} +1 -1
- package/Marketplace/{chunk-JKVEO7GJ.js → chunk-AUQYI2EA.js} +1 -1
- package/Marketplace/{chunk-O3ASI5PY.js → chunk-AYVVAF2D.js} +1 -1
- package/Marketplace/{chunk-JDFOZTNQ.js → chunk-BVNI7M43.js} +1 -1
- package/Marketplace/{chunk-QUZBZ5K4.js → chunk-BWTDHNZV.js} +1 -1
- package/Marketplace/{chunk-WZRJRVH6.js → chunk-C2A52LSM.js} +1 -1
- package/Marketplace/{chunk-MAVB5XKB.js → chunk-C6EE6UMS.js} +1 -1
- package/Marketplace/{chunk-VUAKZHTF.js → chunk-CC7AXJ62.js} +1 -1
- package/Marketplace/{chunk-HHAAJG6G.js → chunk-CSPU7H6P.js} +1 -1
- package/Marketplace/{chunk-XXLBTCRU.js → chunk-D5NWJJ3K.js} +1 -1
- package/Marketplace/{chunk-7KBKCIN6.js → chunk-EX7JS5XV.js} +1 -1
- package/Marketplace/{chunk-23JYSN6Q.js → chunk-EZPFNEBG.js} +1 -1
- package/Marketplace/{chunk-HUTPG746.js → chunk-FOXV7BI2.js} +1 -1
- package/Marketplace/{chunk-EHWPM4BE.js → chunk-G7VXQRNU.js} +1 -1
- package/Marketplace/{chunk-QNIEXALL.js → chunk-GGUUOJBM.js} +2 -2
- package/Marketplace/{chunk-7U5UAWCO.js → chunk-GOLQA2OV.js} +1 -1
- package/Marketplace/{chunk-NTY552OQ.js → chunk-HCXIXQ3P.js} +1 -1
- package/Marketplace/{chunk-7KXBD73I.js → chunk-IYJYQNSW.js} +1 -1
- package/Marketplace/{chunk-LYFRN35D.js → chunk-J6FCA2GC.js} +1 -1
- package/Marketplace/{chunk-VPP6ZKI2.js → chunk-JTPNWUC5.js} +1 -1
- package/Marketplace/{chunk-FCTD55SB.js → chunk-LRJDQQMW.js} +1 -1
- package/Marketplace/{chunk-UREGZMHY.js → chunk-M7SI7KCP.js} +1 -1
- package/Marketplace/{chunk-JW6NHBN5.js → chunk-MWEX4KT3.js} +1 -1
- package/Marketplace/{chunk-TQSDPBUE.js → chunk-N4KAWMLG.js} +1 -1
- package/Marketplace/{chunk-KJXEV3CR.js → chunk-N5JT3L3P.js} +1 -1
- package/Marketplace/{chunk-W6QK3KI2.js → chunk-NP4NUU26.js} +1 -1
- package/Marketplace/{chunk-YMMBFSTV.js → chunk-O4JO5HBG.js} +1 -1
- package/Marketplace/{chunk-NJI6OAOU.js → chunk-PJ55JADV.js} +1 -1
- package/Marketplace/{chunk-TIWU4GET.js → chunk-PJIKFDGL.js} +1 -1
- package/Marketplace/{chunk-LX6C545M.js → chunk-PO44ILHG.js} +1 -1
- package/Marketplace/{chunk-PSWRS2QZ.js → chunk-Q2GGNFJX.js} +1 -1
- package/Marketplace/{chunk-WOXH3LCZ.js → chunk-TGTYAI7P.js} +1 -1
- package/Marketplace/{chunk-IYRCZVA4.js → chunk-THMRV5XU.js} +1 -1
- package/Marketplace/{chunk-2PUWLP55.js → chunk-TKFPKCG2.js} +1 -1
- package/Marketplace/{chunk-AU4SOVII.js → chunk-TM72OVCB.js} +1 -1
- package/Marketplace/{chunk-PTRHHOMT.js → chunk-U7J6Y2ZR.js} +1 -1
- package/Marketplace/{chunk-KRHP6DRW.js → chunk-UGPHFJAX.js} +1 -1
- package/Marketplace/{chunk-J6AJBBZ3.js → chunk-UIXUUR3M.js} +1 -1
- package/Marketplace/{chunk-7KE42BE5.js → chunk-ULL6P5FP.js} +1 -1
- package/Marketplace/{chunk-E22FOFQL.js → chunk-URMIO2PO.js} +1 -1
- package/Marketplace/{chunk-WRAMXNGJ.js → chunk-WAQZNQJA.js} +1 -1
- package/Marketplace/{chunk-ZQL3IYZ4.js → chunk-WDFNDY2L.js} +1 -1
- package/Marketplace/{chunk-C7F32KU3.js → chunk-WEPTPOTB.js} +1 -1
- package/Marketplace/{chunk-QP3S52F6.js → chunk-WRPFY7PU.js} +1 -1
- package/Marketplace/chunk-XB6JTMTF.js +1 -0
- package/Marketplace/{chunk-UU26ASVF.js → chunk-XGU6OKNN.js} +1 -1
- package/Marketplace/chunk-XKSSZDF5.js +1 -0
- package/Marketplace/{chunk-FSLQ5TRN.js → chunk-XLVT5MIX.js} +1 -1
- package/Marketplace/{chunk-A3QB35Z5.js → chunk-XRYND57F.js} +1 -1
- package/Marketplace/{chunk-NG6JQWVZ.js → chunk-YDJHEKKE.js} +1 -1
- package/Marketplace/{chunk-ZVHCE4K4.js → chunk-YSP6AH3T.js} +1 -1
- package/Marketplace/{chunk-2CW5UYLD.js → chunk-YW4ETQW2.js} +1 -1
- package/Marketplace/{chunk-QO6GWCX7.js → chunk-YZSU7OTN.js} +1 -1
- package/Marketplace/{chunk-5PZ6BLED.js → chunk-ZO24DBCC.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-3ZACSMQZ.js → main-C2ZAIPC7.js} +1 -1
- package/Marketplace/{styles-DE7M2S4O.css → styles-5ZLA5BQS.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-G7267XOM.js +0 -1
- package/Marketplace/chunk-P7QKTYYT.js +0 -1
- /package/Marketplace/{chunk-4EVRTQJX.js → chunk-72YRW3ZC.js} +0 -0
- /package/Marketplace/{chunk-5TEZF6KQ.js → chunk-F5TBMY3G.js} +0 -0
- /package/Marketplace/{chunk-SINQ7SXI.js → chunk-NDVNSHV5.js} +0 -0
- /package/Marketplace/{chunk-RHYO2A6O.js → chunk-TRPWLPXX.js} +0 -0
- /package/Marketplace/{chunk-KTBPHH7N.js → chunk-UTOILVIA.js} +0 -0
- /package/Marketplace/{polyfills-AGGI3U6M.js → polyfills-HPRX66LM.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ht,c as H,d as Qt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-JTTK3RAC.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-KTBPHH7N.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-VUAKZHTF.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-JKVEO7GJ.js";import{d as Jt,e as zt,f as Ht,g as Zt,k as qt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-NXCMFVSB.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-QUZBZ5K4.js";import{a as Z,b as _t}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-WOXH3LCZ.js";import{a as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-FCTD55SB.js";import{b as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-6G6GKWWY.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-KRHP6DRW.js";import{a as Yt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-W6QK3KI2.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-NJI6OAOU.js";import{a as V}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 j}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 Rt,b as Bt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-MAVB5XKB.js";import{b as A,e as R}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 Kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-2CW5UYLD.js";import{a as $t,b as jt,c as Gt}from"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{a as et,c as J,d as Vt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-O3ASI5PY.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-23JYSN6Q.js";import{t as ut,u as Lt,v as k,w as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-WZRJRVH6.js";import{T as Ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-LYFRN35D.js";import{b as Et,c as X,h as B,k as $,u as kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-UREGZMHY.js";import{b as tt,c as g}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-5TEZF6KQ.js";import{$a as C,B as b,Cb as F,Db as N,Eb as Ot,Fa as c,Ga as P,Gc as pt,Hc as Nt,Jc as mt,Lb as W,Lc as Tt,Oa as d,T as K,Ua as S,V as lt,X as yt,Za as a,Zb as T,_a as l,_b as E,aa as wt,ab as I,bb as y,bc as st,c as bt,cc as Ft,db as x,ea as M,ec as dt,fa as Mt,fc as Dt,hb as _,ja as u,jb as p,ka as h,ob as L,pb as m,q as It,qb as ct,rb as v,vb as q,wb as nt,za as O}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 ce=()=>["/menu/products/download/by-url"],Xt=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,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-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),d("Tabs",i.productTabs),c(7),d("routerLink",q(2,ce)))},dependencies:[Rt,Nt,mt]});let o=r;return o})();function se(o,r){if(o&1){let n=x();a(0,"button",15),_("click",function(){u(n);let e=p();return h(e.onOpenScanDialog())}),C(1,"i",16),m(2," Scan Channel "),l()}}function de(o,r){if(o&1){let n=x();a(0,"button",17),_("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(1,"i",16),m(2),l()}if(o&2){let n=p(),t;c(2),v(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function pe(o,r){if(o&1){let n=x();a(0,"button",18),_("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(1,"i",19),m(2),l()}if(o&2){let n=p(),t;c(2),v(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function me(o,r){if(o&1){let n=x();a(0,"div",20)(1,"app-product-card",21),_("onUpload",function(){let i=u(n).$implicit,s=p();return h(s.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let s=u(n).$implicit;return h(s.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(1),d("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function ue(o,r){o&1&&(I(0),a(1,"div",22),C(2,"app-empty-state"),l(),y())}function he(o,r){if(o&1){let n=x();I(0),a(1,"div",23)(2,"div",24)(3,"app-custom-paginator",25),_("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())}),l()()(),y()}if(o&2){let n=p();c(3),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var ee=(()=>{let r=class r{constructor(t,e,i,s){this.http=t,this.toastr=e,this.dialog=i,this.productService=s,this.searchFilter=new z,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.channelOptions=t.Options.Channel,this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}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{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(ht,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(b(i=>i!=="CANCEL"),K(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(b(s=>s!=="CANCEL"),K(s=>this.productService.uploadSingleProduct([t],s))).subscribe({next:s=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[tt.Tokopedia,tt.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.searchFilter.ChannelID=s.ChannelID,this.searchFilter.ScanFull=s.ScanFull,this.searchFilter.UpdatedProduct=s.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(s)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(P(R),P(A),P(j),P(V))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:26,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,i){if(e&1){let s=x();a(0,"mainpanel",0),_("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,se,3,0,"button",1)(3,de,3,1,"button",2)(4,pe,3,1,"button",3),l(),a(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),m(10,"Category "),l(),a(11,"ng-select",6),_("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(12,"div")(13,"h6"),m(14,"Release"),l(),a(15,"mat-date-range-input",7)(16,"input",8),_("ngModelChange",function(w){return i.startDate=w})("click",function(){u(s);let w=L(19);return h(w.open())}),l(),a(17,"input",9),_("ngModelChange",function(w){return i.endDate=w})("click",function(){u(s);let w=L(19);return h(w.open())}),l()(),C(18,"mat-date-range-picker",null,10),l()()()(),a(20,"content")(21,"div",11)(22,"div",12),S(23,me,2,10,"div",13)(24,ue,3,0,"ng-container",14),l(),S(25,he,4,4,"ng-container",14),l()()()}if(e&2){let s=L(19);d("headerTitle","In POS ("+i.rowCount+")"),c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(4),d("rangePicker",s),c(1),d("ngModel",i.startDate),c(1),d("ngModel",i.endDate),c(6),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",i.products.length>0)}},dependencies:[T,E,X,B,$,k,J,G,Z,U,Ht,Jt,zt,Zt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]});let o=r;return o})();function _e(o,r){if(o&1){let n=x();a(0,"button",13),_("click",function(){u(n);let e=p();return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ge(o,r){if(o&1){let n=x();a(0,"button",15),_("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(1,"i",14),m(2),l()}if(o&2){let n=p();c(2),v(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Ce(o,r){if(o&1){let n=x();a(0,"button",16),_("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(1,"i",17),m(2),l()}if(o&2){let n=p();c(2),v(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function fe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}function Se(o,r){if(o&1){let n=x();a(0,"div")(1,"h6"),m(2,"Item ID"),l(),a(3,"input",20),_("ngModelChange",function(e){u(n);let i=p();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=p();c(3),d("ngModel",n.searchFilter.Item_id)}}function xe(o,r){if(o&1){let n=x();a(0,"div",21)(1,"app-product-card",22),_("onUpload",function(){let i=u(n).$implicit,s=p();return h(s.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let s=u(n).$implicit;return h(s.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(1),d("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Pe(o,r){o&1&&(I(0),a(1,"div",23),C(2,"app-empty-state"),l(),y())}function ve(o,r){if(o&1){let n=x();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),_("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var ne=(()=>{let r=class r{constructor(t,e,i,s,f){this.http=t,this.dialog=e,this.toastr=i,this.productService=s,this.activateRouter=f,this.searchFilter=new z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,e.Filter.ChannelID!=g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(ht,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(b(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(g.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanProducts(s)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(b(s=>s!=="CANCEL"),K(s=>this.productService.uploadSingleProduct([t],s))).subscribe({next:s=>{this.getProducts()}})}onScanMultipleProduct(){let t=this.productService.filterChannelByTypeId(this.channelOptions,[tt.Tokopedia,tt.Tiktok]);this.searchFilter.ChannelID=g.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:t,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.searchFilter.ChannelID=s.ChannelID,this.searchFilter.ScanFull=s.ScanFull,this.searchFilter.UpdatedProduct=s.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanProducts(w)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(b(i=>i!=="CANCEL"),K(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(A),P(V),P(pt))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:20,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,_e,3,0,"button",1)(3,ge,3,1,"button",2)(4,Ce,3,1,"button",3),l(),a(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),m(10,"Channel"),l(),a(11,"ng-select",6),_("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(12,fe,3,2,"ng-template",7),l()(),S(13,Se,4,1,"div",8),l()()(),a(14,"content")(15,"div",9)(16,"div",10),S(17,xe,2,10,"div",11)(18,Pe,3,0,"ng-container",8),l(),S(19,ve,3,4,"div",12),l()()()),e&2&&(d("headerTitle","Sold in Channel"),c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),d("ngIf",i.searchFilter.ListChannelID!=null),c(4),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",i.products==null?null:i.products.length))},dependencies:[T,E,X,B,$,k,J,et,G,Z,U],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function Ie(o,r){if(o&1){let n=x();a(0,"button",10),_("click",function(){u(n);let e=p(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=p(2);c(2),v(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function ye(o,r){if(o&1){let n=x();I(0),a(1,"td",27)(2,"input",28),_("ngModelChange",function(e){u(n);let i=p(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=p(3).ngIf,i=p(3);return h(i.onSelectProduct(e))}),l()(),y()}if(o&2){let n=p(2).$implicit;c(1),d("rowSpan",n==null?null:n.Variants.length),c(1),d("ngModel",n.selected)}}function we(o,r){if(o&1){let n=x();I(0),a(1,"img",34),_("click",function(e){u(n);let i=p(3).$implicit,s=p(4);return h(s.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),y()}if(o&2){let n=p(3).$implicit;c(1),d("src",n==null?null:n.ImageUrl,O)}}function Me(o,r){o&1&&C(0,"img",35)}function Oe(o,r){if(o&1&&(I(0),a(1,"td",27)(2,"div",29),S(3,we,2,1,"ng-container",7)(4,Me,1,0,"ng-template",null,30,W),l()(),a(6,"td",31)(7,"h4",32)(8,"span",33),m(9),l()()(),y()),o&2){let n=L(5),t=p(2).$implicit;c(1),d("rowSpan",t==null?null:t.Variants.length),c(2),d("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),d("rowSpan",t==null?null:t.Variants.length),c(2),d("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),v(" ",t==null?null:t.Name," ")}}function Fe(o,r){if(o&1&&(a(0,"div")(1,"a",23),C(2,"img",36),l()()),o&2){let n=r.$implicit;c(1),d("href",n.URL,O),c(1),d("src",n.Img,O)("matTooltip",n.Name)}}function De(o,r){if(o&1&&(a(0,"div"),C(1,"img",36),l()),o&2){let n=r.$implicit;c(1),d("src",n.Img,O)("matTooltip",n.Name)}}function Ne(o,r){if(o&1&&(a(0,"tr"),S(1,ye,3,2,"ng-container",20)(2,Oe,10,6,"ng-container",20),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",22)(9,"a",23),C(10,"i",24),l()()(),a(11,"td",25)(12,"div",26),S(13,Fe,3,3,"div",21),l()(),a(14,"td",25)(15,"div",26),S(16,De,2,2,"div",21),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(1),d("ngIf",t==0),c(1),d("ngIf",t==0),c(2),v(" ",n.Name," "),c(3),v(" ",n.Code," "),c(2),d("href","https://"+e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),d("ngForOf",n==null?null:n.Available),c(3),d("ngForOf",n==null?null:n.NotAvailable)}}function Te(o,r){if(o&1&&(I(0),S(1,Ne,17,7,"tr",21),y()),o&2){let n=r.$implicit;c(1),d("ngForOf",n.Variants)}}function Ee(o,r){if(o&1&&(a(0,"tbody"),S(1,Te,2,1,"ng-container",21),l()),o&2){let n=r.ngIf;c(1),d("ngForOf",n)}}function ke(o,r){if(o&1&&(I(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Ee,2,1,"tbody",20),F(17,"async"),l()(),y()),o&2){let n=p(2);c(16),d("ngIf",N(17,1,n.data$))}}function Ve(o,r){o&1&&(a(0,"div",37),C(1,"app-empty-state"),l())}function Ue(o,r){if(o&1){let n=x();a(0,"span",45),_("click",function(){u(n);let e=p(3);return h(e.getRowCount())}),a(1,"i",46),m(2,"?"),l()()}}function Le(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),ct(N(2,1,n==null?null:n.Count))}}function Ae(o,r){if(o&1){let n=x();a(0,"a",47),_("click",function(){u(n);let e=p(3);return h(e.onNextPage())}),C(1,"i",48),m(2," Next"),l()}}function Re(o,r){if(o&1){let n=x();a(0,"a",49),_("click",function(){u(n);let e=p(3);return h(e.onLastPage())}),C(1,"i",50),m(2," Last"),l()}}function Be(o,r){if(o&1&&(a(0,"div",38)(1,"div",39)(2,"div",40),m(3),F(4,"number"),S(5,Ue,3,0,"span",41)(6,Le,3,3,"span",20),F(7,"async"),m(8),l()(),a(9,"div",42),S(10,Ae,3,0,"a",43)(11,Re,3,0,"a",44),l()()),o&2){let n=r.ngIf,t=p(2);c(3),v(" Showing 1 - ",N(4,6,n==null?null:n.length)," of "),c(2),d("ngIf",t.paginationService.hideCount),c(1),d("ngIf",!t.paginationService.hideCount&&N(7,8,t.rowCount$)),c(2),v(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),d("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),d("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function $e(o,r){if(o&1){let n=x();a(0,"mainpanel",1),_("onSubmit",function(e){u(n);let i=p();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Ie,3,1,"button",2),a(3,"button",3),_("click",function(){let i=u(n).ngIf,s=p();return h(s.openScanDialog(i))}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,ke,18,3,"ng-container",7),F(10,"async"),S(11,Ve,2,0,"ng-template",null,8,W),l(),S(13,Be,12,10,"div",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=p(),e;d("hideSearchDropdown",!0),c(2),d("ngIf",t.hasSelectionProduct),c(7),d("ngIf",((e=N(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),d("ngIf",N(14,7,t.data$))}}var ie=(()=>{let r=class r{constructor(t,e,i,s,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=s,this.paginationService=f,this.biggerPictureService=w,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[]}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){let t=localStorage.getItem("Authorization");this.hostName=JSON.parse(t)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(yt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(It(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=g.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(t){let e=this.productService.findChannelById(this.filterSearch.ChannelID,t.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(i=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(i,e,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(t){let e=JSON.parse(JSON.stringify(this.filterSearch));e.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:t.Options.Channel},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.filterSearch.ChannelID=s.ChannelID,this.filterSearch.ScanFull=s.ScanFull,this.filterSearch.UpdatedProduct=s.UpdatedProduct,this.filterSearch.Async=s.Async,this.scanAllProduct(t)})}getChannelLogoById(t){return g.getChannelLogoByTypeId(t)}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(b(e=>e!=="CANCEL"),K(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,s)=>s.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(A),P(V),P(Yt),P(Kt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],["class","d-flex justify-content-between mt-5",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[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"],[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(e,i){e&1&&(S(0,$e,15,9,"mainpanel",0),F(1,"async")),e&2&&d("ngIf",N(1,1,i.loader$))},dependencies:[T,E,Et,B,$,k,ut,U,st,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();function je(o,r){if(o&1){let n=x();a(0,"button",14),_("click",function(){u(n);let e=p();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ge(o,r){if(o&1){let n=x();I(0),a(1,"button",16),_("click",function(){u(n);let e=p();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),y()}if(o&2){let n=p(),t;c(3),v(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Ke(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}var Je=o=>[o],ze=()=>[];function He(o,r){if(o&1){let n=x();a(0,"div",20)(1,"app-product-card",21),_("onCheckBoxChange",function(e){let s=u(n).index,f=p();return h(f.onSelectProduct(e,s))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,s=p();return h(s.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),d("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?nt(10,Je,n==null?null:n.Channel):q(12,ze))("showCheckBox",!0)("scanButton",!0)}}function Ze(o,r){o&1&&(I(0),a(1,"div",22),C(2,"app-empty-state"),l(),y())}function qe(o,r){if(o&1){let n=x();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),_("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var oe=(()=>{let r=class r{constructor(t,e,i,s,f){this.http=t,this.dialog=e,this.productService=i,this.toastrService=s,this.activateRouter=f,this.searchFilter=new z,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(t=>(t.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(e=>e.ID==t.ChannelID))),t)).map(t=>(t.Channel.Url=t.Url,t))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?g.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=g.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(g.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=g.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(g.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(Qt,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(V),P(A),P(pt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:32,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,je,3,0,"button",1)(3,Ge,4,1,"ng-container",2),l(),a(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),m(9,"Channel"),l(),a(10,"ng-select",5),_("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(11,Ke,3,2,"ng-template",6),l()(),a(12,"div")(13,"h6"),m(14,"SKU Assigned"),l(),a(15,"mat-radio-group",7),_("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(16,"mat-radio-button",8),m(17," All "),l(),a(18,"mat-radio-button",8),m(19," Yes "),l(),a(20,"mat-radio-button",8),m(21," No "),l()()(),a(22,"div")(23,"h6"),m(24,"Item ID"),l(),a(25,"input",9),_("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()()()(),a(26,"content")(27,"div",10)(28,"div",11),S(29,He,2,13,"div",12)(30,Ze,3,0,"ng-container",2),l(),S(31,qe,3,4,"div",13),l()()()),e&2&&(c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),d("ngModel",i.searchFilter.HaveSku),c(1),d("value",0),c(2),d("value",1),c(2),d("value",2),c(5),d("ngModel",i.searchFilter.Item_id),c(4),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[T,E,X,B,$,k,J,et,$t,jt,G,Z,U],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function Ye(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}function Qe(o,r){if(o&1&&(a(0,"div",10),C(1,"app-duplicate-product-card",11),l()),o&2){let n=r.$implicit,t=r.index;c(1),d("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function We(o,r){o&1&&(I(0),a(1,"div",12),C(2,"app-empty-state"),l(),y())}function Xe(o,r){if(o&1){let n=x();I(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),_("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())})("total",function(){u(n);let e=p();return h(e.getRowCount())}),l()()(),y()}if(o&2){let n=p();c(3),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var re=(()=>{let r=class r{constructor(t,e){this.httpService=t,this.productService=e,this.searchFilter=new z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.channelOptions=t.Options.Channel,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=g.GuidEMpty}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(P(R),P(V))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"multiple","clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Channel"),l(),a(6,"ng-select",2),_("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,Ye,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,Qe,2,6,"div",6)(12,We,3,0,"ng-container",7),l(),S(13,Xe,4,4,"ng-container",7),l()()()),e&2&&(c(6),d("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),d("ngForOf",i.products),c(1),d("ngIf",(i.products==null?null:i.products.length)==0),c(1),d("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[T,E,B,$,k,J,et,_t,G,U]});let o=r;return o})();function tn(o,r){if(o&1&&(I(0),m(1),y()),o&2){let n=p().$implicit;c(1),v(" ",n.Count," ")}}function en(o,r){if(o&1){let n=x();a(0,"span",26),_("click",function(){u(n);let e=p().$implicit,i=p(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var nn=()=>["/menu/products/status/sold-in-channel"],ae=o=>({ID:o}),on=()=>["/menu/products/status/not-in-pos"];function rn(o,r){if(o&1){let n=x();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,tn,2,1,"ng-container",4)(7,en,2,0,"ng-template",null,19,W),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),_("click",function(){let i=u(n).$implicit,s=p(2);return h(s.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),_("click",function(){let i=u(n).$implicit,s=p(2);return h(s.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=p(2);c(2),d("src",e.getChannelLogo(n.TypeID),O),c(2),ct(n.Name),c(2),d("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),d("routerLink",q(18,nn))("queryParams",nt(19,ae,n.ID)),c(1),v(" ",N(12,11,n.SoldInChannel)," "),c(3),d("routerLink",q(21,on))("queryParams",nt(22,ae,n.ID)),c(1),v(" ",N(16,13,n.NotInPOS)," "),c(3),v("",n.LastSync?Ot(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function an(o,r){if(o&1&&(I(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,rn,28,24,"tr",15),F(18,"async"),l()()(),y()),o&2){let n=p(),t;c(17),d("ngForOf",(t=N(18,1,n.channels$))==null?null:t.Data)}}function ln(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var le=(()=>{let r=class r{constructor(t,e,i){this.productService=t,this.toastr=e,this.dialog=i,this.destroy$=new bt}ngOnInit(){this.setObsProductStatistic(),this.initPageLoader()}initPageLoader(){this.productService.loader().pipe(lt(this.destroy$)).subscribe(t=>{this.channelOptions=t?.Options?.Channel})}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(lt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(b(e=>g.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(b(s=>s)).subscribe(s=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(s,i,!e.UpdatedProduct),this.initPageLoader(),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(lt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.initPageLoader(),this.setObsProductStatistic()})}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(P(V),P(A),P(j))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,an,19,3,"ng-container",4),F(6,"async"),S(7,ln,2,0,"ng-template",null,5,W),l()()()()()),e&2){let s=L(8),f;d("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),d("ngIf",((f=N(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",s)}},dependencies:[T,E,k,ut,mt,U,st,dt,Ft]});let o=r;return o})();var cn=[{component:Xt,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:ee,canActivate:[Y],data:{title:"Products in POS"}},{path:"sold-in-channel",component:ne,canActivate:[Y],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ie,canActivate:[Y],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:oe,canActivate:[Y],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:re,canActivate:[Y],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:le,canActivate:[Y],data:{title:"Channel Statistic"}}]}],xi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Mt({type:r}),r.\u0275inj=wt({imports:[Dt,kt,At,Lt,Vt,Wt,Gt,Bt,_t,G,Z,Tt.forChild(cn),qt,Ut]});let o=r;return o})();export{xi as StatusModule};
|
|
1
|
+
import{a as ht,c as H,d as Qt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-6JF7QYRS.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-UTOILVIA.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-CC7AXJ62.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-AUQYI2EA.js";import{d as Jt,e as zt,f as Ht,g as Zt,k as qt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-4XO4E2OI.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-BWTDHNZV.js";import{a as Z,b as _t}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-TGTYAI7P.js";import{a as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-LRJDQQMW.js";import{b as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-4EAH4CVW.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-UGPHFJAX.js";import{a as Yt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-NP4NUU26.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJ55JADV.js";import{a as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-MWEX4KT3.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-YSP6AH3T.js";import{c as j}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-WEPTPOTB.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-5W3D75EL.js";import{a as Rt,b as Bt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-C6EE6UMS.js";import{b as A,e as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-FOXV7BI2.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-Q2GGNFJX.js";import{a as Kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-YW4ETQW2.js";import{a as $t,b as jt,c as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-WDFNDY2L.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PO44ILHG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-YDJHEKKE.js";import{a as et,c as J,d as Vt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-AYVVAF2D.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-EZPFNEBG.js";import{t as ut,u as Lt,v as k,w as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-C2A52LSM.js";import{T as Ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-J6FCA2GC.js";import{b as Et,c as X,h as B,k as $,u as kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-M7SI7KCP.js";import{b as tt,c as g}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-F5TBMY3G.js";import{$a as C,B as b,Cb as F,Db as N,Eb as Ot,Fa as c,Ga as P,Gc as pt,Hc as Nt,Jc as mt,Lb as W,Lc as Tt,Oa as d,T as K,Ua as S,V as lt,X as yt,Za as a,Zb as T,_a as l,_b as E,aa as wt,ab as I,bb as y,bc as st,c as bt,cc as Ft,db as x,ea as M,ec as dt,fa as Mt,fc as Dt,hb as _,ja as u,jb as p,ka as h,ob as L,pb as m,q as It,qb as ct,rb as v,vb as q,wb as nt,za as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJIKFDGL.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-72YRW3ZC.js";var ce=()=>["/menu/products/download/by-url"],Xt=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,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-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),d("Tabs",i.productTabs),c(7),d("routerLink",q(2,ce)))},dependencies:[Rt,Nt,mt]});let o=r;return o})();function se(o,r){if(o&1){let n=x();a(0,"button",15),_("click",function(){u(n);let e=p();return h(e.onOpenScanDialog())}),C(1,"i",16),m(2," Scan Channel "),l()}}function de(o,r){if(o&1){let n=x();a(0,"button",17),_("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(1,"i",16),m(2),l()}if(o&2){let n=p(),t;c(2),v(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function pe(o,r){if(o&1){let n=x();a(0,"button",18),_("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(1,"i",19),m(2),l()}if(o&2){let n=p(),t;c(2),v(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function me(o,r){if(o&1){let n=x();a(0,"div",20)(1,"app-product-card",21),_("onUpload",function(){let i=u(n).$implicit,s=p();return h(s.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let s=u(n).$implicit;return h(s.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(1),d("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function ue(o,r){o&1&&(I(0),a(1,"div",22),C(2,"app-empty-state"),l(),y())}function he(o,r){if(o&1){let n=x();I(0),a(1,"div",23)(2,"div",24)(3,"app-custom-paginator",25),_("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())}),l()()(),y()}if(o&2){let n=p();c(3),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var ee=(()=>{let r=class r{constructor(t,e,i,s){this.http=t,this.toastr=e,this.dialog=i,this.productService=s,this.searchFilter=new z,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.channelOptions=t.Options.Channel,this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}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{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(ht,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(b(i=>i!=="CANCEL"),K(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(b(s=>s!=="CANCEL"),K(s=>this.productService.uploadSingleProduct([t],s))).subscribe({next:s=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[tt.Tokopedia,tt.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.searchFilter.ChannelID=s.ChannelID,this.searchFilter.ScanFull=s.ScanFull,this.searchFilter.UpdatedProduct=s.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(s)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(P(R),P(A),P(j),P(V))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:26,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,i){if(e&1){let s=x();a(0,"mainpanel",0),_("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,se,3,0,"button",1)(3,de,3,1,"button",2)(4,pe,3,1,"button",3),l(),a(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),m(10,"Category "),l(),a(11,"ng-select",6),_("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(12,"div")(13,"h6"),m(14,"Release"),l(),a(15,"mat-date-range-input",7)(16,"input",8),_("ngModelChange",function(w){return i.startDate=w})("click",function(){u(s);let w=L(19);return h(w.open())}),l(),a(17,"input",9),_("ngModelChange",function(w){return i.endDate=w})("click",function(){u(s);let w=L(19);return h(w.open())}),l()(),C(18,"mat-date-range-picker",null,10),l()()()(),a(20,"content")(21,"div",11)(22,"div",12),S(23,me,2,10,"div",13)(24,ue,3,0,"ng-container",14),l(),S(25,he,4,4,"ng-container",14),l()()()}if(e&2){let s=L(19);d("headerTitle","In POS ("+i.rowCount+")"),c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(4),d("rangePicker",s),c(1),d("ngModel",i.startDate),c(1),d("ngModel",i.endDate),c(6),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",i.products.length>0)}},dependencies:[T,E,X,B,$,k,J,G,Z,U,Ht,Jt,zt,Zt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]});let o=r;return o})();function _e(o,r){if(o&1){let n=x();a(0,"button",13),_("click",function(){u(n);let e=p();return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ge(o,r){if(o&1){let n=x();a(0,"button",15),_("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(1,"i",14),m(2),l()}if(o&2){let n=p();c(2),v(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Ce(o,r){if(o&1){let n=x();a(0,"button",16),_("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(1,"i",17),m(2),l()}if(o&2){let n=p();c(2),v(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function fe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}function Se(o,r){if(o&1){let n=x();a(0,"div")(1,"h6"),m(2,"Item ID"),l(),a(3,"input",20),_("ngModelChange",function(e){u(n);let i=p();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=p();c(3),d("ngModel",n.searchFilter.Item_id)}}function xe(o,r){if(o&1){let n=x();a(0,"div",21)(1,"app-product-card",22),_("onUpload",function(){let i=u(n).$implicit,s=p();return h(s.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let s=u(n).$implicit;return h(s.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(1),d("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Pe(o,r){o&1&&(I(0),a(1,"div",23),C(2,"app-empty-state"),l(),y())}function ve(o,r){if(o&1){let n=x();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),_("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var ne=(()=>{let r=class r{constructor(t,e,i,s,f){this.http=t,this.dialog=e,this.toastr=i,this.productService=s,this.activateRouter=f,this.searchFilter=new z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,e.Filter.ChannelID!=g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(ht,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(b(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(g.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanProducts(s)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(b(s=>s!=="CANCEL"),K(s=>this.productService.uploadSingleProduct([t],s))).subscribe({next:s=>{this.getProducts()}})}onScanMultipleProduct(){let t=this.productService.filterChannelByTypeId(this.channelOptions,[tt.Tokopedia,tt.Tiktok]);this.searchFilter.ChannelID=g.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:t,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.searchFilter.ChannelID=s.ChannelID,this.searchFilter.ScanFull=s.ScanFull,this.searchFilter.UpdatedProduct=s.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanProducts(w)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(b(i=>i!=="CANCEL"),K(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(A),P(V),P(pt))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:20,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,_e,3,0,"button",1)(3,ge,3,1,"button",2)(4,Ce,3,1,"button",3),l(),a(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),m(10,"Channel"),l(),a(11,"ng-select",6),_("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(12,fe,3,2,"ng-template",7),l()(),S(13,Se,4,1,"div",8),l()()(),a(14,"content")(15,"div",9)(16,"div",10),S(17,xe,2,10,"div",11)(18,Pe,3,0,"ng-container",8),l(),S(19,ve,3,4,"div",12),l()()()),e&2&&(d("headerTitle","Sold in Channel"),c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),d("ngIf",i.searchFilter.ListChannelID!=null),c(4),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",i.products==null?null:i.products.length))},dependencies:[T,E,X,B,$,k,J,et,G,Z,U],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function Ie(o,r){if(o&1){let n=x();a(0,"button",10),_("click",function(){u(n);let e=p(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=p(2);c(2),v(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function ye(o,r){if(o&1){let n=x();I(0),a(1,"td",27)(2,"input",28),_("ngModelChange",function(e){u(n);let i=p(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=p(3).ngIf,i=p(3);return h(i.onSelectProduct(e))}),l()(),y()}if(o&2){let n=p(2).$implicit;c(1),d("rowSpan",n==null?null:n.Variants.length),c(1),d("ngModel",n.selected)}}function we(o,r){if(o&1){let n=x();I(0),a(1,"img",34),_("click",function(e){u(n);let i=p(3).$implicit,s=p(4);return h(s.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),y()}if(o&2){let n=p(3).$implicit;c(1),d("src",n==null?null:n.ImageUrl,O)}}function Me(o,r){o&1&&C(0,"img",35)}function Oe(o,r){if(o&1&&(I(0),a(1,"td",27)(2,"div",29),S(3,we,2,1,"ng-container",7)(4,Me,1,0,"ng-template",null,30,W),l()(),a(6,"td",31)(7,"h4",32)(8,"span",33),m(9),l()()(),y()),o&2){let n=L(5),t=p(2).$implicit;c(1),d("rowSpan",t==null?null:t.Variants.length),c(2),d("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),d("rowSpan",t==null?null:t.Variants.length),c(2),d("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),v(" ",t==null?null:t.Name," ")}}function Fe(o,r){if(o&1&&(a(0,"div")(1,"a",23),C(2,"img",36),l()()),o&2){let n=r.$implicit;c(1),d("href",n.URL,O),c(1),d("src",n.Img,O)("matTooltip",n.Name)}}function De(o,r){if(o&1&&(a(0,"div"),C(1,"img",36),l()),o&2){let n=r.$implicit;c(1),d("src",n.Img,O)("matTooltip",n.Name)}}function Ne(o,r){if(o&1&&(a(0,"tr"),S(1,ye,3,2,"ng-container",20)(2,Oe,10,6,"ng-container",20),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",22)(9,"a",23),C(10,"i",24),l()()(),a(11,"td",25)(12,"div",26),S(13,Fe,3,3,"div",21),l()(),a(14,"td",25)(15,"div",26),S(16,De,2,2,"div",21),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(1),d("ngIf",t==0),c(1),d("ngIf",t==0),c(2),v(" ",n.Name," "),c(3),v(" ",n.Code," "),c(2),d("href","https://"+e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),d("ngForOf",n==null?null:n.Available),c(3),d("ngForOf",n==null?null:n.NotAvailable)}}function Te(o,r){if(o&1&&(I(0),S(1,Ne,17,7,"tr",21),y()),o&2){let n=r.$implicit;c(1),d("ngForOf",n.Variants)}}function Ee(o,r){if(o&1&&(a(0,"tbody"),S(1,Te,2,1,"ng-container",21),l()),o&2){let n=r.ngIf;c(1),d("ngForOf",n)}}function ke(o,r){if(o&1&&(I(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Ee,2,1,"tbody",20),F(17,"async"),l()(),y()),o&2){let n=p(2);c(16),d("ngIf",N(17,1,n.data$))}}function Ve(o,r){o&1&&(a(0,"div",37),C(1,"app-empty-state"),l())}function Ue(o,r){if(o&1){let n=x();a(0,"span",45),_("click",function(){u(n);let e=p(3);return h(e.getRowCount())}),a(1,"i",46),m(2,"?"),l()()}}function Le(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),ct(N(2,1,n==null?null:n.Count))}}function Ae(o,r){if(o&1){let n=x();a(0,"a",47),_("click",function(){u(n);let e=p(3);return h(e.onNextPage())}),C(1,"i",48),m(2," Next"),l()}}function Re(o,r){if(o&1){let n=x();a(0,"a",49),_("click",function(){u(n);let e=p(3);return h(e.onLastPage())}),C(1,"i",50),m(2," Last"),l()}}function Be(o,r){if(o&1&&(a(0,"div",38)(1,"div",39)(2,"div",40),m(3),F(4,"number"),S(5,Ue,3,0,"span",41)(6,Le,3,3,"span",20),F(7,"async"),m(8),l()(),a(9,"div",42),S(10,Ae,3,0,"a",43)(11,Re,3,0,"a",44),l()()),o&2){let n=r.ngIf,t=p(2);c(3),v(" Showing 1 - ",N(4,6,n==null?null:n.length)," of "),c(2),d("ngIf",t.paginationService.hideCount),c(1),d("ngIf",!t.paginationService.hideCount&&N(7,8,t.rowCount$)),c(2),v(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),d("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),d("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function $e(o,r){if(o&1){let n=x();a(0,"mainpanel",1),_("onSubmit",function(e){u(n);let i=p();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Ie,3,1,"button",2),a(3,"button",3),_("click",function(){let i=u(n).ngIf,s=p();return h(s.openScanDialog(i))}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,ke,18,3,"ng-container",7),F(10,"async"),S(11,Ve,2,0,"ng-template",null,8,W),l(),S(13,Be,12,10,"div",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=p(),e;d("hideSearchDropdown",!0),c(2),d("ngIf",t.hasSelectionProduct),c(7),d("ngIf",((e=N(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),d("ngIf",N(14,7,t.data$))}}var ie=(()=>{let r=class r{constructor(t,e,i,s,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=s,this.paginationService=f,this.biggerPictureService=w,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[]}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){let t=localStorage.getItem("Authorization");this.hostName=JSON.parse(t)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(yt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(It(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=g.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(t){let e=this.productService.findChannelById(this.filterSearch.ChannelID,t.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(i=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(i,e,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(t){let e=JSON.parse(JSON.stringify(this.filterSearch));e.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:t.Options.Channel},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.filterSearch.ChannelID=s.ChannelID,this.filterSearch.ScanFull=s.ScanFull,this.filterSearch.UpdatedProduct=s.UpdatedProduct,this.filterSearch.Async=s.Async,this.scanAllProduct(t)})}getChannelLogoById(t){return g.getChannelLogoByTypeId(t)}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(b(e=>e!=="CANCEL"),K(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,s)=>s.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(A),P(V),P(Yt),P(Kt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],["class","d-flex justify-content-between mt-5",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[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"],[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(e,i){e&1&&(S(0,$e,15,9,"mainpanel",0),F(1,"async")),e&2&&d("ngIf",N(1,1,i.loader$))},dependencies:[T,E,Et,B,$,k,ut,U,st,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();function je(o,r){if(o&1){let n=x();a(0,"button",14),_("click",function(){u(n);let e=p();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ge(o,r){if(o&1){let n=x();I(0),a(1,"button",16),_("click",function(){u(n);let e=p();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),y()}if(o&2){let n=p(),t;c(3),v(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Ke(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}var Je=o=>[o],ze=()=>[];function He(o,r){if(o&1){let n=x();a(0,"div",20)(1,"app-product-card",21),_("onCheckBoxChange",function(e){let s=u(n).index,f=p();return h(f.onSelectProduct(e,s))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,s=p();return h(s.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),d("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?nt(10,Je,n==null?null:n.Channel):q(12,ze))("showCheckBox",!0)("scanButton",!0)}}function Ze(o,r){o&1&&(I(0),a(1,"div",22),C(2,"app-empty-state"),l(),y())}function qe(o,r){if(o&1){let n=x();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),_("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var oe=(()=>{let r=class r{constructor(t,e,i,s,f){this.http=t,this.dialog=e,this.productService=i,this.toastrService=s,this.activateRouter=f,this.searchFilter=new z,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(t=>(t.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(e=>e.ID==t.ChannelID))),t)).map(t=>(t.Channel.Url=t.Url,t))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?g.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=g.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(g.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=g.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(g.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(Qt,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(V),P(A),P(pt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:32,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,je,3,0,"button",1)(3,Ge,4,1,"ng-container",2),l(),a(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),m(9,"Channel"),l(),a(10,"ng-select",5),_("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(11,Ke,3,2,"ng-template",6),l()(),a(12,"div")(13,"h6"),m(14,"SKU Assigned"),l(),a(15,"mat-radio-group",7),_("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(16,"mat-radio-button",8),m(17," All "),l(),a(18,"mat-radio-button",8),m(19," Yes "),l(),a(20,"mat-radio-button",8),m(21," No "),l()()(),a(22,"div")(23,"h6"),m(24,"Item ID"),l(),a(25,"input",9),_("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()()()(),a(26,"content")(27,"div",10)(28,"div",11),S(29,He,2,13,"div",12)(30,Ze,3,0,"ng-container",2),l(),S(31,qe,3,4,"div",13),l()()()),e&2&&(c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),d("ngModel",i.searchFilter.HaveSku),c(1),d("value",0),c(2),d("value",1),c(2),d("value",2),c(5),d("ngModel",i.searchFilter.Item_id),c(4),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[T,E,X,B,$,k,J,et,$t,jt,G,Z,U],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function Ye(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}function Qe(o,r){if(o&1&&(a(0,"div",10),C(1,"app-duplicate-product-card",11),l()),o&2){let n=r.$implicit,t=r.index;c(1),d("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function We(o,r){o&1&&(I(0),a(1,"div",12),C(2,"app-empty-state"),l(),y())}function Xe(o,r){if(o&1){let n=x();I(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),_("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())})("total",function(){u(n);let e=p();return h(e.getRowCount())}),l()()(),y()}if(o&2){let n=p();c(3),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var re=(()=>{let r=class r{constructor(t,e){this.httpService=t,this.productService=e,this.searchFilter=new z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.channelOptions=t.Options.Channel,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=g.GuidEMpty}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(P(R),P(V))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"multiple","clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Channel"),l(),a(6,"ng-select",2),_("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,Ye,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,Qe,2,6,"div",6)(12,We,3,0,"ng-container",7),l(),S(13,Xe,4,4,"ng-container",7),l()()()),e&2&&(c(6),d("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),d("ngForOf",i.products),c(1),d("ngIf",(i.products==null?null:i.products.length)==0),c(1),d("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[T,E,B,$,k,J,et,_t,G,U]});let o=r;return o})();function tn(o,r){if(o&1&&(I(0),m(1),y()),o&2){let n=p().$implicit;c(1),v(" ",n.Count," ")}}function en(o,r){if(o&1){let n=x();a(0,"span",26),_("click",function(){u(n);let e=p().$implicit,i=p(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var nn=()=>["/menu/products/status/sold-in-channel"],ae=o=>({ID:o}),on=()=>["/menu/products/status/not-in-pos"];function rn(o,r){if(o&1){let n=x();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,tn,2,1,"ng-container",4)(7,en,2,0,"ng-template",null,19,W),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),_("click",function(){let i=u(n).$implicit,s=p(2);return h(s.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),_("click",function(){let i=u(n).$implicit,s=p(2);return h(s.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=p(2);c(2),d("src",e.getChannelLogo(n.TypeID),O),c(2),ct(n.Name),c(2),d("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),d("routerLink",q(18,nn))("queryParams",nt(19,ae,n.ID)),c(1),v(" ",N(12,11,n.SoldInChannel)," "),c(3),d("routerLink",q(21,on))("queryParams",nt(22,ae,n.ID)),c(1),v(" ",N(16,13,n.NotInPOS)," "),c(3),v("",n.LastSync?Ot(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function an(o,r){if(o&1&&(I(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,rn,28,24,"tr",15),F(18,"async"),l()()(),y()),o&2){let n=p(),t;c(17),d("ngForOf",(t=N(18,1,n.channels$))==null?null:t.Data)}}function ln(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var le=(()=>{let r=class r{constructor(t,e,i){this.productService=t,this.toastr=e,this.dialog=i,this.destroy$=new bt}ngOnInit(){this.setObsProductStatistic(),this.initPageLoader()}initPageLoader(){this.productService.loader().pipe(lt(this.destroy$)).subscribe(t=>{this.channelOptions=t?.Options?.Channel})}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(lt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(b(e=>g.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(b(s=>s)).subscribe(s=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(s,i,!e.UpdatedProduct),this.initPageLoader(),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(lt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.initPageLoader(),this.setObsProductStatistic()})}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(P(V),P(A),P(j))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,an,19,3,"ng-container",4),F(6,"async"),S(7,ln,2,0,"ng-template",null,5,W),l()()()()()),e&2){let s=L(8),f;d("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),d("ngIf",((f=N(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",s)}},dependencies:[T,E,k,ut,mt,U,st,dt,Ft]});let o=r;return o})();var cn=[{component:Xt,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:ee,canActivate:[Y],data:{title:"Products in POS"}},{path:"sold-in-channel",component:ne,canActivate:[Y],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ie,canActivate:[Y],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:oe,canActivate:[Y],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:re,canActivate:[Y],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:le,canActivate:[Y],data:{title:"Channel Statistic"}}]}],xi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Mt({type:r}),r.\u0275inj=wt({imports:[Dt,kt,At,Lt,Vt,Wt,Gt,Bt,_t,G,Z,Tt.forChild(cn),qt,Ut]});let o=r;return o})();export{xi as StatusModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as q,b as f,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-ZVHCE4K4.js";import{a as h,b as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-C7F32KU3.js";import{b as P,e as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-HUTPG746.js";import{c as M,h as v,k as S,r as j,t as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-UREGZMHY.js";import{c as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-5TEZF6KQ.js";import{$a as k,Fa as s,Ga as g,Oa as d,Ua as y,Xb as W,Za as t,Zb as A,_a as i,_b as N,ea as C,hb as c,jb as x,ob as b,pb as m,qb as T,vb as L,wb as U,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";function G(a,n){if(a&1&&(t(0,"tr")(1,"td")(2,"a",11),k(3,"img",12),t(4,"span"),m(5),i()()(),t(6,"td"),m(7),i(),t(8,"td"),m(9),i()()),a&2){let u=n.$implicit;s(2),d("href","/menu/channel/marketplace/view?ID="+u.Key.ID,I),s(1),d("src",u.Logo,I),s(2),T(u.Key.Name),s(2),T(u.Value.Out),s(2),T(u.Value.Tg)}}var oe=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.generateChannelName(),this.channels=this.setChannelLogo(o.channels)}ngOnInit(){this.modalConfig=new f,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=q.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.hideClose=!0}setChannelLogo(l){return l.map(o=>(o.Logo=F.getChannelLogoByTypeId(o.Key.TypeID),o))}generateChannelName(){this.channelNames="";let l=this.data.channels;l.forEach((o,e)=>{this.channelNames+=`${o.Key} ${e!=l.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-channel-warning"]],decls:24,vars:2,consts:[[3,"config","onCancel","onClose"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),t(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),m(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),i(),t(6,"h5",5),m(7,"Your duplicate Channels are"),i(),t(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),m(12,"Channel"),i(),t(13,"th"),m(14,"Outlet"),i(),t(15,"th"),m(16,"Tag"),i()()(),t(17,"tbody"),y(18,G,10,5,"tr",8),i()(),t(19,"p",9),m(20," Please refer to this "),t(21,"a",10),m(22,"article"),i(),m(23," for more information "),i()()()()()),o&2&&(d("config",e.modalConfig),s(18),d("ngForOf",e.channels))},dependencies:[A,_]});let a=n;return a})();var me=(()=>{let n=class n{constructor(l,o,e){this.dialogRef=l,this.httpService=o,this.toastr=e,this.modalConfig=new f,this.modalConfig.title="Write Off Reason"}onSubmit(){let l={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",l).subscribe(o=>{this.toastr.success(o.Message,"Success"),this.dialogRef.close(l)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(V),g(P))},n.\u0275cmp=C({type:n,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.reason=p}),i(),t(5,"label",5),m(6,"Reason"),i()()()()),o&2&&(d("dynamicValidated",e.reason)("config",e.modalConfig),s(3),d("ngModel",e.reason))},dependencies:[M,v,S,_],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let a=n;return a})();function $(a,n){a&1&&(t(0,"p"),m(1," URL is required "),i())}function H(a,n){if(a&1&&(t(0,"div",13),y(1,$,2,0,"p",14),i()),a&2){x();let u=b(10);s(1),d("ngIf",u.errors.required)}}function Y(a,n){a&1&&(t(0,"p"),m(1," Email is required "),i())}function B(a,n){a&1&&(t(0,"p"),m(1," Email is not valid "),i())}function J(a,n){if(a&1&&(t(0,"div",13),y(1,Y,2,0,"p",14)(2,B,2,0,"p",14),i()),a&2){x();let u=b(16);s(1),d("ngIf",u.errors.required),s(1),d("ngIf",u.errors.pattern)}}var Q=a=>({invalid:a}),X=()=>({updateOn:"blur"}),pe=(()=>{let n=class n{constructor(l){this.dialogRef=l}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h))},n.\u0275cmp=C({type:n,selectors:[["app-contact-support"]],decls:18,vars:11,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModel","ngModelChange"],["url","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","data-toggle","tooltip","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModel","ngModelOptions","ngModelChange"],["email","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(o,e){if(o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"label",3),m(4,"Tokopedia URL"),i(),t(5,"div",4)(6,"div",5)(7,"span",6),m(8,"https://tokopedia.com/"),i()(),t(9,"input",7,8),c("ngModelChange",function(p){return e.data.URL=p}),i()(),y(11,H,2,1,"div",9),t(12,"label",10),m(13,"Requester's Email"),i(),t(14,"div",4)(15,"input",11,12),c("ngModelChange",function(p){return e.data.Email=p}),i()(),y(17,J,3,2,"div",9),i()()()),o&2){let r=b(10),p=b(16);d("dynamicValidated",!r.invalid&&!p.invalid)("config",e.modalConfig),s(7),d("ngClass",U(8,Q,r.invalid&&(r.dirty||r.touched))),s(2),d("ngModel",e.data.URL),s(2),d("ngIf",r.invalid&&(r.dirty||r.touched)),s(4),d("ngModel",e.data.Email)("ngModelOptions",L(10,X)),s(2),d("ngIf",p.invalid&&(p.dirty||p.touched))}},dependencies:[W,N,M,v,j,K,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let a=n;return a})();var ue=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.ShopID=p}),i(),t(5,"label",5),m(6,"Shop ID"),i()()()()),o&2&&(d("dynamicValidated",e.data.ShopID)("config",e.modalConfig),s(3),d("ngModel",e.data.ShopID))},dependencies:[M,v,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let a=n;return a})();var Me=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.modalConfig=new f}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-woocommerce"]],decls:17,vars:5,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","URL","data-toggle","tooltip","title","URL",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","title","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","title","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerSecret"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.URL=p}),i(),t(5,"label",5),m(6,"URL"),i()(),t(7,"div",2)(8,"input",6,4),c("ngModelChange",function(p){return e.data.ConsumerKey=p}),i(),t(10,"label",7),m(11,"Consumer Key"),i()(),t(12,"div",2)(13,"input",8,4),c("ngModelChange",function(p){return e.data.ConsumerSecret=p}),i(),t(15,"label",9),m(16,"Consumer Secret"),i()()()()),o&2&&(d("dynamicValidated",e.data.ConsumerKey&&e.data.URL&&e.data.ConsumerSecret)("config",e.modalConfig),s(3),d("ngModel",e.data.URL),s(5),d("ngModel",e.data.ConsumerKey),s(5),d("ngModel",e.data.ConsumerSecret))},dependencies:[M,v,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let a=n;return a})();export{oe as a,me as b,pe as c,ue as d,Me as e};
|
|
1
|
+
import{a as q,b as f,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-YSP6AH3T.js";import{a as h,b as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-WEPTPOTB.js";import{b as P,e as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-FOXV7BI2.js";import{c as M,h as v,k as S,r as j,t as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-M7SI7KCP.js";import{c as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-F5TBMY3G.js";import{$a as k,Fa as s,Ga as g,Oa as d,Ua as y,Xb as W,Za as t,Zb as A,_a as i,_b as N,ea as C,hb as c,jb as x,ob as b,pb as m,qb as T,vb as L,wb as U,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJIKFDGL.js";function G(a,n){if(a&1&&(t(0,"tr")(1,"td")(2,"a",11),k(3,"img",12),t(4,"span"),m(5),i()()(),t(6,"td"),m(7),i(),t(8,"td"),m(9),i()()),a&2){let u=n.$implicit;s(2),d("href","/menu/channel/marketplace/view?ID="+u.Key.ID,I),s(1),d("src",u.Logo,I),s(2),T(u.Key.Name),s(2),T(u.Value.Out),s(2),T(u.Value.Tg)}}var oe=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.generateChannelName(),this.channels=this.setChannelLogo(o.channels)}ngOnInit(){this.modalConfig=new f,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=q.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.hideClose=!0}setChannelLogo(l){return l.map(o=>(o.Logo=F.getChannelLogoByTypeId(o.Key.TypeID),o))}generateChannelName(){this.channelNames="";let l=this.data.channels;l.forEach((o,e)=>{this.channelNames+=`${o.Key} ${e!=l.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-channel-warning"]],decls:24,vars:2,consts:[[3,"config","onCancel","onClose"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),t(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),m(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),i(),t(6,"h5",5),m(7,"Your duplicate Channels are"),i(),t(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),m(12,"Channel"),i(),t(13,"th"),m(14,"Outlet"),i(),t(15,"th"),m(16,"Tag"),i()()(),t(17,"tbody"),y(18,G,10,5,"tr",8),i()(),t(19,"p",9),m(20," Please refer to this "),t(21,"a",10),m(22,"article"),i(),m(23," for more information "),i()()()()()),o&2&&(d("config",e.modalConfig),s(18),d("ngForOf",e.channels))},dependencies:[A,_]});let a=n;return a})();var me=(()=>{let n=class n{constructor(l,o,e){this.dialogRef=l,this.httpService=o,this.toastr=e,this.modalConfig=new f,this.modalConfig.title="Write Off Reason"}onSubmit(){let l={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",l).subscribe(o=>{this.toastr.success(o.Message,"Success"),this.dialogRef.close(l)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(V),g(P))},n.\u0275cmp=C({type:n,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.reason=p}),i(),t(5,"label",5),m(6,"Reason"),i()()()()),o&2&&(d("dynamicValidated",e.reason)("config",e.modalConfig),s(3),d("ngModel",e.reason))},dependencies:[M,v,S,_],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let a=n;return a})();function $(a,n){a&1&&(t(0,"p"),m(1," URL is required "),i())}function H(a,n){if(a&1&&(t(0,"div",13),y(1,$,2,0,"p",14),i()),a&2){x();let u=b(10);s(1),d("ngIf",u.errors.required)}}function Y(a,n){a&1&&(t(0,"p"),m(1," Email is required "),i())}function B(a,n){a&1&&(t(0,"p"),m(1," Email is not valid "),i())}function J(a,n){if(a&1&&(t(0,"div",13),y(1,Y,2,0,"p",14)(2,B,2,0,"p",14),i()),a&2){x();let u=b(16);s(1),d("ngIf",u.errors.required),s(1),d("ngIf",u.errors.pattern)}}var Q=a=>({invalid:a}),X=()=>({updateOn:"blur"}),pe=(()=>{let n=class n{constructor(l){this.dialogRef=l}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h))},n.\u0275cmp=C({type:n,selectors:[["app-contact-support"]],decls:18,vars:11,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModel","ngModelChange"],["url","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","data-toggle","tooltip","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModel","ngModelOptions","ngModelChange"],["email","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(o,e){if(o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"label",3),m(4,"Tokopedia URL"),i(),t(5,"div",4)(6,"div",5)(7,"span",6),m(8,"https://tokopedia.com/"),i()(),t(9,"input",7,8),c("ngModelChange",function(p){return e.data.URL=p}),i()(),y(11,H,2,1,"div",9),t(12,"label",10),m(13,"Requester's Email"),i(),t(14,"div",4)(15,"input",11,12),c("ngModelChange",function(p){return e.data.Email=p}),i()(),y(17,J,3,2,"div",9),i()()()),o&2){let r=b(10),p=b(16);d("dynamicValidated",!r.invalid&&!p.invalid)("config",e.modalConfig),s(7),d("ngClass",U(8,Q,r.invalid&&(r.dirty||r.touched))),s(2),d("ngModel",e.data.URL),s(2),d("ngIf",r.invalid&&(r.dirty||r.touched)),s(4),d("ngModel",e.data.Email)("ngModelOptions",L(10,X)),s(2),d("ngIf",p.invalid&&(p.dirty||p.touched))}},dependencies:[W,N,M,v,j,K,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let a=n;return a})();var ue=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.ShopID=p}),i(),t(5,"label",5),m(6,"Shop ID"),i()()()()),o&2&&(d("dynamicValidated",e.data.ShopID)("config",e.modalConfig),s(3),d("ngModel",e.data.ShopID))},dependencies:[M,v,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let a=n;return a})();var Me=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.modalConfig=new f}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-woocommerce"]],decls:17,vars:5,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","URL","data-toggle","tooltip","title","URL",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","title","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","title","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerSecret"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.URL=p}),i(),t(5,"label",5),m(6,"URL"),i()(),t(7,"div",2)(8,"input",6,4),c("ngModelChange",function(p){return e.data.ConsumerKey=p}),i(),t(10,"label",7),m(11,"Consumer Key"),i()(),t(12,"div",2)(13,"input",8,4),c("ngModelChange",function(p){return e.data.ConsumerSecret=p}),i(),t(15,"label",9),m(16,"Consumer Secret"),i()()()()),o&2&&(d("dynamicValidated",e.data.ConsumerKey&&e.data.URL&&e.data.ConsumerSecret)("config",e.modalConfig),s(3),d("ngModel",e.data.URL),s(5),d("ngModel",e.data.ConsumerKey),s(5),d("ngModel",e.data.ConsumerSecret))},dependencies:[M,v,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let a=n;return a})();export{oe as a,me as b,pe as c,ue as d,Me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.
|
|
1
|
+
import{a as h}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-BWTDHNZV.js";import{b as i}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-F5TBMY3G.js";import{$ as s,ca as n,q as o}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJIKFDGL.js";var g=(()=>{let a=class a{constructor(t){this.db=t,this.DATABASE="Categories"}saveCategoriesByChannelType(t,e){let c=this.getKey(e);return this.db.add(this.DATABASE,t,c).pipe(o(p=>t))}getCategoriesByChannelType(t){let e=this.getKey(t);return this.db.getByKey(this.DATABASE,e)}getKey(t){let e="";switch(t){case i.Lazada:e="Lazada";break;case i.Tokopedia:e="Tokopedia";break}return e}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let t=localStorage.getItem("Authorization");return this.hostName=JSON.parse(t)?.Host,this.hostName}};a.\u0275fac=function(e){return new(e||a)(n(h))},a.\u0275prov=s({token:a,factory:a.\u0275fac,providedIn:"root"});let r=a;return r})();export{g as a};
|