marketplacepos 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-WYMCYQCR.js → chunk-2GOE5RBJ.js} +1 -1
- package/Marketplace/{chunk-GMALFTAY.js → chunk-2QO2D23V.js} +1 -1
- package/Marketplace/{chunk-WBI4ZM2X.js → chunk-2Y47HNW5.js} +1 -1
- package/Marketplace/{chunk-LKSBRXCX.js → chunk-32YQ5ZBK.js} +1 -1
- package/Marketplace/{chunk-GFW452UY.js → chunk-353KSOKY.js} +1 -1
- package/Marketplace/{chunk-DBEZLCZM.js → chunk-3MUYDBXT.js} +1 -1
- package/Marketplace/{chunk-YQEEQRFM.js → chunk-55NPYZ64.js} +1 -1
- package/Marketplace/{chunk-QK2PM3OO.js → chunk-5PV4AXUR.js} +1 -1
- package/Marketplace/{chunk-QKVTZKIC.js → chunk-5UESNVF7.js} +1 -1
- package/Marketplace/{chunk-2KQ4WEPD.js → chunk-5YX57TZJ.js} +1 -1
- package/Marketplace/{chunk-2OB3TW2H.js → chunk-6FFJWFMY.js} +1 -1
- package/Marketplace/{chunk-G5D7W2T3.js → chunk-7AS2YI3I.js} +1 -1
- package/Marketplace/{chunk-VRSV5O5R.js → chunk-AN4U7FVT.js} +1 -1
- package/Marketplace/{chunk-MRWTB7OG.js → chunk-B6ZV4WVU.js} +1 -1
- package/Marketplace/{chunk-4O5EV6W4.js → chunk-BBX2DZWF.js} +1 -1
- package/Marketplace/{chunk-MA4ZKUP6.js → chunk-BLRV33OB.js} +2 -2
- package/Marketplace/{chunk-XWIBRKIY.js → chunk-BTKP3PJH.js} +1 -1
- package/Marketplace/{chunk-YWVMHX45.js → chunk-CA4NYL7C.js} +1 -1
- package/Marketplace/{chunk-TT7NBZMD.js → chunk-CFL3VDAM.js} +1 -1
- package/Marketplace/{chunk-3ICHEZSE.js → chunk-DE2BZXNA.js} +1 -1
- package/Marketplace/{chunk-TQ6UUVH3.js → chunk-DE6KXPBU.js} +1 -1
- package/Marketplace/{chunk-BYDOIRDD.js → chunk-FDGOGKXD.js} +1 -1
- package/Marketplace/{chunk-7RCRNZNI.js → chunk-FDYGWNMG.js} +1 -1
- package/Marketplace/{chunk-SWQXA73A.js → chunk-FR67IIWG.js} +1 -1
- package/Marketplace/{chunk-67YIEWYV.js → chunk-G6DYB24N.js} +1 -1
- package/Marketplace/{chunk-T6XRWLCZ.js → chunk-GUKAWOAK.js} +1 -1
- package/Marketplace/{chunk-VIJ5HUKS.js → chunk-HDWZXE6G.js} +1 -1
- package/Marketplace/{chunk-I4V2RPID.js → chunk-HQTUUTDT.js} +1 -1
- package/Marketplace/{chunk-H7KLY4IB.js → chunk-HTODD7RF.js} +1 -1
- package/Marketplace/{chunk-SKA4KCAB.js → chunk-I2FTGSXA.js} +1 -1
- package/Marketplace/{chunk-O3V3GTIM.js → chunk-IGSHV4S3.js} +1 -1
- package/Marketplace/{chunk-MORUNYG3.js → chunk-IJ3WNDAP.js} +1 -1
- package/Marketplace/{chunk-YQXKX6O7.js → chunk-J55273WG.js} +1 -1
- package/Marketplace/{chunk-IJIIMLQ7.js → chunk-JI67LAJB.js} +1 -1
- package/Marketplace/{chunk-PJQTGT4K.js → chunk-JJXHYCB6.js} +1 -1
- package/Marketplace/{chunk-RFTG6MKX.js → chunk-JRZ4OAAZ.js} +1 -1
- package/Marketplace/{chunk-VTFOZMLI.js → chunk-JT76ON64.js} +1 -1
- package/Marketplace/{chunk-B4RPQGTA.js → chunk-KKQWPACG.js} +1 -1
- package/Marketplace/{chunk-KX7WACSK.js → chunk-LICL6LNZ.js} +1 -1
- package/Marketplace/{chunk-FWCMOK42.js → chunk-LWR5YJ24.js} +1 -1
- package/Marketplace/chunk-LZR6F2JE.js +1 -0
- package/Marketplace/{chunk-TMUAQXEK.js → chunk-MB6PCQRT.js} +1 -1
- package/Marketplace/{chunk-3TM7EKQZ.js → chunk-MYMGFQII.js} +1 -1
- package/Marketplace/{chunk-Q7FH7Z7R.js → chunk-NNYMQPRT.js} +1 -1
- package/Marketplace/{chunk-AIZ2SLGZ.js → chunk-NV3T3OZB.js} +1 -1
- package/Marketplace/{chunk-UNZLFKB2.js → chunk-OGJ6YVG4.js} +1 -1
- package/Marketplace/{chunk-45IJGKR3.js → chunk-OI7LGMDP.js} +1 -1
- package/Marketplace/{chunk-S65ISV4X.js → chunk-Q4Y764AE.js} +1 -1
- package/Marketplace/{chunk-TBY7FO23.js → chunk-QJKKB3RG.js} +1 -1
- package/Marketplace/{chunk-ECB4VT3U.js → chunk-QSO3ASFL.js} +1 -1
- package/Marketplace/{chunk-HWOBJ4Z3.js → chunk-QV22VQ5Q.js} +1 -1
- package/Marketplace/{chunk-BELWZRNY.js → chunk-R3VPTXDH.js} +1 -1
- package/Marketplace/{chunk-Z2ABDS6L.js → chunk-RHM4GQMX.js} +1 -1
- package/Marketplace/{chunk-5DVM7TJ7.js → chunk-RS52HOKA.js} +1 -1
- package/Marketplace/{chunk-NZBQKND7.js → chunk-S7ANPM6L.js} +1 -1
- package/Marketplace/{chunk-GIFWICGN.js → chunk-TEEFXPWJ.js} +1 -1
- package/Marketplace/{chunk-7Y73MGEU.js → chunk-TIXJK5ZY.js} +1 -1
- package/Marketplace/{chunk-PQGHN52M.js → chunk-UUMW24BF.js} +1 -1
- package/Marketplace/chunk-VMRMDMBE.js +1 -0
- package/Marketplace/{chunk-5DS4AFTV.js → chunk-XDPBTCKN.js} +1 -1
- package/Marketplace/{chunk-TJRQ2WWD.js → chunk-XQTL4ELH.js} +1 -1
- package/Marketplace/{chunk-GD6CRVOV.js → chunk-YHWXRXON.js} +1 -1
- package/Marketplace/{chunk-TNVZKPJP.js → chunk-YIB32JAF.js} +1 -1
- package/Marketplace/{chunk-5JZJC54P.js → chunk-YZHBBFDR.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-B2AQI7UJ.js → main-KZQ55EQA.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-CS64SQAA.js +0 -1
- package/Marketplace/chunk-ISBEY2N5.js +0 -1
- /package/Marketplace/{chunk-LJ6J4EIT.js → chunk-2XMJ7C47.js} +0 -0
- /package/Marketplace/{chunk-CWG6UUW5.js → chunk-GAMNBDJD.js} +0 -0
- /package/Marketplace/{chunk-7DXQ5BDE.js → chunk-IFHFFP4S.js} +0 -0
- /package/Marketplace/{chunk-N76YHCQ6.js → chunk-J3NU4TSW.js} +0 -0
- /package/Marketplace/{chunk-KEKROO5B.js → chunk-TZ6CWMER.js} +0 -0
- /package/Marketplace/{polyfills-KQQO3SZT.js → polyfills-OSLX3UYW.js} +0 -0
- /package/Marketplace/{styles-WZSIIWL7.css → styles-LDNPEPLO.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ht,c as H,d as Qt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-G5D7W2T3.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-7DXQ5BDE.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-TNVZKPJP.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-GFW452UY.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.4.0/Marketplace/chunk-TBY7FO23.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-UNZLFKB2.js";import{a as Z,b as _t}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-T6XRWLCZ.js";import{a as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-PJQTGT4K.js";import{b as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-NZBQKND7.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-Z2ABDS6L.js";import{a as Yt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-3TM7EKQZ.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-ECB4VT3U.js";import{a as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-AIZ2SLGZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-TT7NBZMD.js";import{c as j}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-HWOBJ4Z3.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-BELWZRNY.js";import{a as Rt,b as Bt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-45IJGKR3.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-3ICHEZSE.js";import{b as A,e as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-4O5EV6W4.js";import{a as Kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-MORUNYG3.js";import{a as $t,b as jt,c as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-VIJ5HUKS.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-67YIEWYV.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-2OB3TW2H.js";import{a as et,c as J,d as Vt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-YQEEQRFM.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-GMALFTAY.js";import{t as ut,u as Lt,v as k,w as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-5JZJC54P.js";import{T as Ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-LKSBRXCX.js";import{b as Et,c as X,h as B,k as $,u as kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-PQGHN52M.js";import{b as tt,c as g}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-CWG6UUW5.js";import{$ as wt,$a as I,$b as st,Ab as F,B as b,Bb as N,Cb as Ot,Ea as c,Ec as pt,Fa as P,Fc as Nt,Hc as mt,Jb as W,Jc as Tt,Na as d,S as K,Ta as S,U as lt,W as yt,Xb as T,Ya as a,Yb as E,Za as l,_a as C,ab as y,ac as Ft,c as bt,cb as x,cc as dt,da as M,dc as Dt,ea as Mt,gb as _,ia as u,ib as p,ja as h,nb as L,ob as m,pb as ct,q as It,qb as v,ub as q,vb as nt,ya as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-FWCMOK42.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-N76YHCQ6.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}}).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}}).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.4.1/Marketplace/chunk-7AS2YI3I.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-IFHFFP4S.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YIB32JAF.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-353KSOKY.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.4.1/Marketplace/chunk-QJKKB3RG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-OGJ6YVG4.js";import{a as Z,b as _t}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GUKAWOAK.js";import{a as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-JJXHYCB6.js";import{b as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-S7ANPM6L.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-RHM4GQMX.js";import{a as Yt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-MYMGFQII.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QSO3ASFL.js";import{a as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-NV3T3OZB.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-CFL3VDAM.js";import{c as j}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QV22VQ5Q.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-R3VPTXDH.js";import{a as Rt,b as Bt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-OI7LGMDP.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-DE2BZXNA.js";import{b as A,e as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{a as Kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-IJ3WNDAP.js";import{a as $t,b as jt,c as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-HDWZXE6G.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-G6DYB24N.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-6FFJWFMY.js";import{a as et,c as J,d as Vt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-55NPYZ64.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-2QO2D23V.js";import{t as ut,u as Lt,v as k,w as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import{T as Ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import{b as Et,c as X,h as B,k as $,u as kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{b as tt,c as g}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GAMNBDJD.js";import{$ as wt,$a as I,$b as st,Ab as F,B as b,Bb as N,Cb as Ot,Ea as c,Ec as pt,Fa as P,Fc as Nt,Hc as mt,Jb as W,Jc as Tt,Na as d,S as K,Ta as S,U as lt,W as yt,Xb as T,Ya as a,Yb as E,Za as l,_a as C,ab as y,ac as Ft,c as bt,cb as x,cc as dt,da as M,dc as Dt,ea as Mt,gb as _,ia as u,ib as p,ja as h,nb as L,ob as m,pb as ct,q as It,qb as v,ub as q,vb as nt,ya as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.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}}).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}}).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{b as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.
|
|
1
|
+
import{b as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-Q4Y764AE.js";import{a as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-FR67IIWG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QJKKB3RG.js";import{a as $,b as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-S7ANPM6L.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-RHM4GQMX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-R3VPTXDH.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-G6DYB24N.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-6FFJWFMY.js";import{v as D,w}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{$b as E,Ab as u,Bb as g,Cb as _,Ea as o,Fa as C,Hc as k,Jc as B,Na as m,P as h,Qa as I,Ta as L,Xb as M,Ya as n,Za as i,ac as A,cc as T,da as S,dc as R,gb as c,ob as s,q as v,qb as y,tb as P,ub as b,vb as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.js";var q=()=>["/menu/log/inventory-async/detail"],x=r=>({ID:r});function z(r,a){if(r&1&&(n(0,"tr")(1,"td")(2,"a",12),s(3),u(4,"date"),i()(),n(5,"td"),s(6),u(7,"number"),i(),n(8,"td")(9,"span",13),s(10),i()()()),r&2){let e=a.$implicit;o(2),m("routerLink",b(13,q))("queryParams",F(14,x,e._id)),o(1),y(" ",_(4,7,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),o(3),y(" ",_(7,10,e.DurationInSecond,"1.1-1")," s "),o(3),I((e==null||e._source==null||e._source.log==null?null:e._source.log.respCode)===200||(e==null||e._source==null||e._source.log==null?null:e._source.log.respCode)===202?"bg-success":"bg-warning"),o(1),y(" ",e==null||e._source==null||e._source.log==null?null:e._source.log.respCode," ")}}var te=(()=>{let a=class a{constructor(l){this.inventoryAsyncServiceLog=l,this.filters={PageNumber:1,RowCount:100,From:null,To:null}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let l=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe(h(1));this.inventoryLog$=l.pipe(v(p=>p?.hits)),this.totalPagination$=l.pipe(v(p=>p?.total.value))}onPaginationChange(l){this.filters.PageNumber=l.pageIndex+1,this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}};a.\u0275fac=function(p){return new(p||a)(C(H))},a.\u0275cmp=S({type:a,selectors:[["app-inventory-async-log"]],standalone:!0,features:[P],decls:29,vars:15,consts:[["headerTitle","Async Inventory",3,"hideSearchBox","onSubmit"],["container",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(p,t){p&1&&(n(0,"mainpanel",0),c("onSubmit",function(){return t.onSubmitFilter()}),n(1,"filters")(2,"div",1)(3,"div")(4,"h6"),s(5,"From/To"),i(),n(6,"datepicker",2),c("dateChange",function(d){return t.filters.From=d}),i(),n(7,"datepicker",3),c("dateChange",function(d){return t.filters.To=d}),i()()()(),n(8,"content")(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"table",8)(14,"thead")(15,"tr",9)(16,"th"),s(17,"Created"),i(),n(18,"th"),s(19,"Duration"),i(),n(20,"th"),s(21,"Response code"),i()()(),n(22,"tbody"),L(23,z,11,16,"tr",10),u(24,"async"),i()(),n(25,"mat-paginator",11),c("page",function(d){return t.onPaginationChange(d)}),u(26,"async"),u(27,"async"),u(28,"async"),i()()()()()()()),p&2&&(m("hideSearchBox",!0),o(6),m("date",t.filters.From),o(1),m("date",t.filters.To),o(16),m("ngForOf",g(24,7,t.inventoryLog$)),o(2),m("length",g(26,9,t.totalPagination$))("pageSize",t.filters.RowCount>g(27,11,t.totalPagination$)?g(28,13,t.totalPagination$):t.filters.RowCount)("pageIndex",(t.filters==null?null:t.filters.PageNumber)==0?0:(t.filters==null?null:t.filters.PageNumber)-1))},dependencies:[R,M,E,T,A,w,D,N,$,O,B,k]});let r=a;return r})();export{te as InventoryAsyncLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as h,e as c}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.
|
|
1
|
+
import{b as h,e as c}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{c as l}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GAMNBDJD.js";import{W as a,_ as p,ba as i,q as s}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";var g=(()=>{let r=class r{constructor(t,e){this.httpService=t,this.toastr=e}getChannel(t){return this.httpService.post("/api/Channel/GetChannel",t)}getChannelLoader(){return this.httpService.get("/api/ChannelLoader/GetChannelLoader")}testShopID(t){return this.httpService.post("/api/Channel/TestShopID",t).pipe(a(e=>{this.showTostrSuccessTestShopID(e)}))}updateChannelIndex(t){return this.httpService.post("/api/Channel/UpdateChannelIndex",t)}deleteChannel(t){return this.httpService.post("/api/Channel/DeleteChannel",t)}mapChannelImage(t){return t.map(e=>(e.img=l.getChannelLogoByTypeId(e.TypeID),e))}showTostrSuccessTestShopID(t){let e="";for(var o in t)e+=o+" : "+t[o]+"<br/>";this.toastr.success(e,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(t){return this.httpService.post("/api/Channel/GetRegistersByOutletOrder",{Outlet:t})}getChannelRowCount(t){return this.httpService.post("/api/Channel/GetCountChannel",t).pipe(s(e=>e.Count))}};r.\u0275fac=function(e){return new(e||r)(i(c),i(h))},r.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.
|
|
1
|
+
import{e as p}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{_ as c,ba as a,q as n}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";var f=(()=>{let t=class t{constructor(r){this.httpService=r}getInventoryAsyncLog(r){return this.httpService.post("api/Inventory/GetAsyncLog",r).pipe(n(e=>(e.hits=e.hits.map(i=>(i.DurationInSecond=parseInt(i._source?.Duration)/1e3,i)),e)))}getInventoryAsyncLogDetail(r){return this.httpService.post("api/Inventory/GetAsyncLogDetail",{ID:r})}};t.\u0275fac=function(e){return new(e||t)(a(p))},t.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as Ue,e as $e,h as Ze}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-2OB3TW2H.js";import{b as Le,e as Ve,f as We,p as Z,q as T,r as E,s as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-5JZJC54P.js";import{$ as Ye,B as Fe,F as Pe,J,K as je,M as Ke,N as Ne,O as qe,U as He,Y as Ge,Z as Qe,_ as ze,a as b,aa as Xe,b as Te,ba as ee,g as U,r as Ee,s as $,u as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-LKSBRXCX.js";import{e as Ie,g as xe,j as Ae,n as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-PQGHN52M.js";import{$ as ne,A as O,Aa as he,B as L,Ea as u,Fa as l,Fb as f,Gb as I,Ha as pe,Hb as x,I as V,Ia as w,Ib as y,J as ae,Ja as me,Ka as ue,Ma as S,Na as q,Pa as _e,R as W,Ra as ge,S as B,Ta as k,U as m,Ua as H,Vb as Oe,Ya as h,Za as _,_a as fe,aa as M,c as C,ca as re,cb as ye,da as se,dc as Me,ea as oe,gb as v,ha as le,ia as j,ib as g,ja as K,jb as ve,ka as N,kb as G,la as ce,na as de,nb as be,ob as Q,pb as z,q as P,qc as Y,rc as X,sb as Ce,uc as A,v as ie,vc as we,xc as D,yc as Se,zc as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-FWCMOK42.js";var ut=["trigger"],_t=["panel"];function gt(n,r){if(n&1&&(h(0,"span",9),Q(1),_()),n&2){let s=g();u(1),z(s.placeholder)}}function ft(n,r){n&1&&G(0)}function yt(n,r){if(n&1&&(h(0,"span",11),Q(1),_()),n&2){let s=g(2);u(1),z(s.triggerValue)}}function vt(n,r){if(n&1&&(h(0,"span",10),k(1,ft,1,0)(2,yt,2,1),_()),n&2){let s=g();u(1),H(1,s.customTrigger?1:2)}}function bt(n,r){if(n&1){let s=ye();N(),ce(),h(0,"div",12,13),v("@transformPanel.done",function(t){j(s);let i=g();return K(i._panelDoneAnimatingStream.next(t.toState))})("keydown",function(t){j(s);let i=g();return K(i._handleKeydown(t))}),G(2,1),_()}if(n&2){let s=g();ge("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",s._getPanelTheme(),""),q("ngClass",s.panelClass)("@transformPanel","showing"),S("id",s.id+"-panel")("aria-multiselectable",s.multiple)("aria-label",s.ariaLabel||null)("aria-labelledby",s._getPanelAriaLabelledby())}}var Ct=[[["mat-select-trigger"]],"*"],Ot=["mat-select-trigger","*"],Mt={transformPanelWrap:Y("transformPanelWrap",[D("* => void",ke("@transformPanel",[Se()],{optional:!0}))]),transformPanel:Y("transformPanel",[we("void",A({opacity:0,transform:"scale(1, 0.8)"})),D("void => showing",X("120ms cubic-bezier(0, 0, 0.2, 1)",A({opacity:1,transform:"scale(1, 1)"}))),D("* => void",X("100ms linear",A({opacity:0})))])};var at=0,nt=new M("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let n=re(Z);return()=>n.scrollStrategies.reposition()}});function wt(n){return()=>n.scrollStrategies.reposition()}var St=new M("MAT_SELECT_CONFIG"),kt={provide:nt,deps:[Z],useFactory:wt},It=new M("MatSelectTrigger"),te=class{constructor(r,s){this.source=r,this.value=s}},xt=Ke(Ne(je(qe(class{constructor(n,r,s,e,t){this._elementRef=n,this._defaultErrorStateMatcher=r,this._parentForm=s,this._parentFormGroup=e,this.ngControl=t,this.stateChanges=new C}})))),pi=(()=>{let r=class r extends xt{_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,a=Ye(e,this.options,this.optionGroups),o=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=Xe(o.offsetTop,o.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new te(this,e)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=b(e),this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Ie.required)??!1}set required(e){this._required=b(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=b(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=b(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=Te(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,t,i,a,o,p,c,rt,st,ot,lt,ct,dt,R){super(o,a,c,rt,ot),this._viewportRuler=e,this._changeDetectorRef=t,this._ngZone=i,this._dir=p,this._parentFormField=st,this._liveAnnouncer=dt,this._defaultOptions=R,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(d,F)=>d===F,this._uid=`mat-select-${at++}`,this._triggerAriaLabelledBy=null,this._destroy=new C,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${at++}`,this._panelDoneAnimatingStream=new C,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this.optionSelectionChanges=ie(()=>{let d=this.options;return d?d.changes.pipe(W(d),B(()=>O(...d.map(F=>F.onSelectionChange)))):this._ngZone.onStable.pipe(V(1),B(()=>this.optionSelectionChanges))}),this.openedChange=new w,this._openedStream=this.openedChange.pipe(L(d=>d),P(()=>{})),this._closedStream=this.openedChange.pipe(L(d=>!d),P(()=>{})),this.selectionChange=new w,this.valueChange=new w,this._trackedModal=null,this._skipPredicate=d=>this.panelOpen?!1:d.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),R?.typeaheadDebounceInterval!=null&&(this._typeaheadDebounceInterval=R.typeaheadDebounceInterval),this._scrollStrategyFactory=ct,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(lt)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Le(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ae(),m(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(m(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(m(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(W(null),m(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._canOpen()&&(this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck()),this.stateChanges.next()}_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&$(this._trackedModal,"aria-owns",t),Ee(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;$(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched()),this.stateChanges.next()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,a=t===13||t===32,o=this._keyManager;if(!o.isTyping()&&a&&!U(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let p=this.selected;o.onKeydown(e);let c=this.selected;c&&p!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,o=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!o&&(i===13||i===32)&&t.activeItem&&!U(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!o&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let p=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(p?c.select():c.deselect())})}else{let p=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==p&&t.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(V(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return!1;try{return i.value!=null&&this._compareWith(i.value,e)}catch{return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof T?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Re(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=O(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(m(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),O(...this.options.map(t=>t._stateChanges)).pipe(m(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let i=this._selectionModel.isSelected(e);e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};r.\u0275fac=function(t){return new(t||r)(l(Ve),l(pe),l(me),l(He),l(he),l(Pe,8),l(Ae,8),l(De,8),l($e,8),l(xe,10),de("tabindex"),l(nt),l(Fe),l(St,8))},r.\u0275cmp=se({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&(x(a,It,5),x(a,ze,5),x(a,Qe,5)),t&2){let o;f(o=y())&&(i.customTrigger=o.first),f(o=y())&&(i.options=o),f(o=y())&&(i.optionGroups=o)}},viewQuery:function(t,i){if(t&1&&(I(ut,5),I(_t,5),I(E,5)),t&2){let a;f(a=y())&&(i.trigger=a.first),f(a=y())&&(i.panel=a.first),f(a=y())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox","ngSkipHydration","",1,"mat-mdc-select"],hostVars:19,hostBindings:function(t,i){t&1&&v("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(S("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),_e("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Ce([{provide:Ue,useExisting:r},{provide:Ge,useExisting:r}]),ue,le],ngContentSelectors:Ot,decls:11,vars:8,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,i){if(t&1&&(ve(Ct),h(0,"div",0,1),v("click",function(){return i.toggle()}),h(3,"div",2),k(4,gt,2,1,"span",3)(5,vt,3,1),_(),h(6,"div",4)(7,"div",5),N(),h(8,"svg",6),fe(9,"path",7),_()()()(),k(10,bt,3,9,"ng-template",8),v("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),t&2){let a=be(1);u(3),S("id",i._valueId),u(1),H(4,i.empty?4:5),u(6),q("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[Oe,E,T],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Mt.transformPanel]},changeDetection:0});let n=r;return n})();var mi=(()=>{let r=class r{};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=oe({type:r}),r.\u0275inj=ne({providers:[kt],imports:[Me,Be,ee,J,We,Ze,ee,J]});let n=r;return n})();export{pi as a,mi as b};
|
|
1
|
+
import{d as Ue,e as $e,h as Ze}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-6FFJWFMY.js";import{b as Le,e as Ve,f as We,p as Z,q as T,r as E,s as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import{$ as Ye,B as Fe,F as Pe,J,K as je,M as Ke,N as Ne,O as qe,U as He,Y as Ge,Z as Qe,_ as ze,a as b,aa as Xe,b as Te,ba as ee,g as U,r as Ee,s as $,u as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import{e as Ie,g as xe,j as Ae,n as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{$ as ne,A as O,Aa as he,B as L,Ea as u,Fa as l,Fb as f,Gb as I,Ha as pe,Hb as x,I as V,Ia as w,Ib as y,J as ae,Ja as me,Ka as ue,Ma as S,Na as q,Pa as _e,R as W,Ra as ge,S as B,Ta as k,U as m,Ua as H,Vb as Oe,Ya as h,Za as _,_a as fe,aa as M,c as C,ca as re,cb as ye,da as se,dc as Me,ea as oe,gb as v,ha as le,ia as j,ib as g,ja as K,jb as ve,ka as N,kb as G,la as ce,na as de,nb as be,ob as Q,pb as z,q as P,qc as Y,rc as X,sb as Ce,uc as A,v as ie,vc as we,xc as D,yc as Se,zc as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";var ut=["trigger"],_t=["panel"];function gt(n,r){if(n&1&&(h(0,"span",9),Q(1),_()),n&2){let s=g();u(1),z(s.placeholder)}}function ft(n,r){n&1&&G(0)}function yt(n,r){if(n&1&&(h(0,"span",11),Q(1),_()),n&2){let s=g(2);u(1),z(s.triggerValue)}}function vt(n,r){if(n&1&&(h(0,"span",10),k(1,ft,1,0)(2,yt,2,1),_()),n&2){let s=g();u(1),H(1,s.customTrigger?1:2)}}function bt(n,r){if(n&1){let s=ye();N(),ce(),h(0,"div",12,13),v("@transformPanel.done",function(t){j(s);let i=g();return K(i._panelDoneAnimatingStream.next(t.toState))})("keydown",function(t){j(s);let i=g();return K(i._handleKeydown(t))}),G(2,1),_()}if(n&2){let s=g();ge("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",s._getPanelTheme(),""),q("ngClass",s.panelClass)("@transformPanel","showing"),S("id",s.id+"-panel")("aria-multiselectable",s.multiple)("aria-label",s.ariaLabel||null)("aria-labelledby",s._getPanelAriaLabelledby())}}var Ct=[[["mat-select-trigger"]],"*"],Ot=["mat-select-trigger","*"],Mt={transformPanelWrap:Y("transformPanelWrap",[D("* => void",ke("@transformPanel",[Se()],{optional:!0}))]),transformPanel:Y("transformPanel",[we("void",A({opacity:0,transform:"scale(1, 0.8)"})),D("void => showing",X("120ms cubic-bezier(0, 0, 0.2, 1)",A({opacity:1,transform:"scale(1, 1)"}))),D("* => void",X("100ms linear",A({opacity:0})))])};var at=0,nt=new M("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let n=re(Z);return()=>n.scrollStrategies.reposition()}});function wt(n){return()=>n.scrollStrategies.reposition()}var St=new M("MAT_SELECT_CONFIG"),kt={provide:nt,deps:[Z],useFactory:wt},It=new M("MatSelectTrigger"),te=class{constructor(r,s){this.source=r,this.value=s}},xt=Ke(Ne(je(qe(class{constructor(n,r,s,e,t){this._elementRef=n,this._defaultErrorStateMatcher=r,this._parentForm=s,this._parentFormGroup=e,this.ngControl=t,this.stateChanges=new C}})))),pi=(()=>{let r=class r extends xt{_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,a=Ye(e,this.options,this.optionGroups),o=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=Xe(o.offsetTop,o.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new te(this,e)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=b(e),this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Ie.required)??!1}set required(e){this._required=b(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=b(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=b(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=Te(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,t,i,a,o,p,c,rt,st,ot,lt,ct,dt,R){super(o,a,c,rt,ot),this._viewportRuler=e,this._changeDetectorRef=t,this._ngZone=i,this._dir=p,this._parentFormField=st,this._liveAnnouncer=dt,this._defaultOptions=R,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(d,F)=>d===F,this._uid=`mat-select-${at++}`,this._triggerAriaLabelledBy=null,this._destroy=new C,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${at++}`,this._panelDoneAnimatingStream=new C,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this.optionSelectionChanges=ie(()=>{let d=this.options;return d?d.changes.pipe(W(d),B(()=>O(...d.map(F=>F.onSelectionChange)))):this._ngZone.onStable.pipe(V(1),B(()=>this.optionSelectionChanges))}),this.openedChange=new w,this._openedStream=this.openedChange.pipe(L(d=>d),P(()=>{})),this._closedStream=this.openedChange.pipe(L(d=>!d),P(()=>{})),this.selectionChange=new w,this.valueChange=new w,this._trackedModal=null,this._skipPredicate=d=>this.panelOpen?!1:d.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),R?.typeaheadDebounceInterval!=null&&(this._typeaheadDebounceInterval=R.typeaheadDebounceInterval),this._scrollStrategyFactory=ct,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(lt)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Le(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ae(),m(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(m(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(m(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(W(null),m(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._canOpen()&&(this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck()),this.stateChanges.next()}_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&$(this._trackedModal,"aria-owns",t),Ee(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;$(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched()),this.stateChanges.next()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,a=t===13||t===32,o=this._keyManager;if(!o.isTyping()&&a&&!U(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let p=this.selected;o.onKeydown(e);let c=this.selected;c&&p!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,o=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!o&&(i===13||i===32)&&t.activeItem&&!U(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!o&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let p=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(p?c.select():c.deselect())})}else{let p=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==p&&t.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(V(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return!1;try{return i.value!=null&&this._compareWith(i.value,e)}catch{return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof T?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Re(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=O(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(m(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),O(...this.options.map(t=>t._stateChanges)).pipe(m(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let i=this._selectionModel.isSelected(e);e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};r.\u0275fac=function(t){return new(t||r)(l(Ve),l(pe),l(me),l(He),l(he),l(Pe,8),l(Ae,8),l(De,8),l($e,8),l(xe,10),de("tabindex"),l(nt),l(Fe),l(St,8))},r.\u0275cmp=se({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&(x(a,It,5),x(a,ze,5),x(a,Qe,5)),t&2){let o;f(o=y())&&(i.customTrigger=o.first),f(o=y())&&(i.options=o),f(o=y())&&(i.optionGroups=o)}},viewQuery:function(t,i){if(t&1&&(I(ut,5),I(_t,5),I(E,5)),t&2){let a;f(a=y())&&(i.trigger=a.first),f(a=y())&&(i.panel=a.first),f(a=y())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox","ngSkipHydration","",1,"mat-mdc-select"],hostVars:19,hostBindings:function(t,i){t&1&&v("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(S("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),_e("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Ce([{provide:Ue,useExisting:r},{provide:Ge,useExisting:r}]),ue,le],ngContentSelectors:Ot,decls:11,vars:8,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,i){if(t&1&&(ve(Ct),h(0,"div",0,1),v("click",function(){return i.toggle()}),h(3,"div",2),k(4,gt,2,1,"span",3)(5,vt,3,1),_(),h(6,"div",4)(7,"div",5),N(),h(8,"svg",6),fe(9,"path",7),_()()()(),k(10,bt,3,9,"ng-template",8),v("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),t&2){let a=be(1);u(3),S("id",i._valueId),u(1),H(4,i.empty?4:5),u(6),q("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[Oe,E,T],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Mt.transformPanel]},changeDetection:0});let n=r;return n})();var mi=(()=>{let r=class r{};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=oe({type:r}),r.\u0275inj=ne({providers:[kt],imports:[Me,Be,ee,J,We,Ze,ee,J]});let n=r;return n})();export{pi as a,mi as b};
|