marketplacepos 2.7.4 → 2.7.5
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/360.35d9782330672e00.js +1 -0
- package/Marketplace/369.19d90a301af16090.js +1 -0
- package/Marketplace/397.bd20bd794e4994a8.js +1 -0
- package/Marketplace/587.69b186b4d297a852.js +1 -0
- package/Marketplace/643.7de8ebbdb10aeed8.js +1 -0
- package/Marketplace/833.552ef7db8cfcde45.js +1 -0
- package/Marketplace/{863.490933ee2cce9279.js → 863.67b36200543c45b1.js} +1 -1
- package/Marketplace/877.460b82caffdbeb26.js +1 -0
- package/Marketplace/993.f25cf4b5757f3e91.js +1 -0
- package/Marketplace/common.1ae3037cc1f5de4e.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main.26e031734fa543d6.js → main.3c2864f277c98596.js} +1 -1
- package/Marketplace/runtime.2751fd0e9a5e9d78.js +1 -0
- package/package.json +1 -1
- package/Marketplace/174.df8669b6311f928d.js +0 -1
- package/Marketplace/360.d6aa15ddc2dfdd69.js +0 -1
- package/Marketplace/369.ca96e7763e20bf72.js +0 -1
- package/Marketplace/397.defbf293e15c7185.js +0 -1
- package/Marketplace/587.2e5583c1fa20a173.js +0 -1
- package/Marketplace/628.145c54d491d3a429.js +0 -1
- package/Marketplace/643.3295801f0b4936a8.js +0 -1
- package/Marketplace/833.b0b60f1bcc7f56c1.js +0 -1
- package/Marketplace/common.8f5889e94b19f645.js +0 -1
- package/Marketplace/runtime.1fd3a054bc12a0de.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[863],{7398:(ot,Z,l)=>{l.d(Z,{Z:()=>x,e:()=>f});var p=l(6895),t=l(266),y=l(284),h=l(4650);function Q(_,u){if(1&_&&(h.TgZ(0,"li",2)(1,"a",3),h._uU(2),h.qZA()()),2&_){const r=u.$implicit;h.xp6(1),h.s9C("routerLink",r.Url),h.Q6J("title",r.Description?r.Description:""),h.xp6(1),h.hij(" ",r.Title," ")}}class f{}f.\u0275fac=function(u){return new(u||f)},f.\u0275cmp=h.Xpm({type:f,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(u,r){1&u&&(h.TgZ(0,"ul",0),h.YNc(1,Q,3,3,"li",1),h.qZA()),2&u&&(h.xp6(1),h.Q6J("ngForOf",r.Tabs))},dependencies:[p.sg,y.rH,y.Od]});class x{}x.\u0275fac=function(u){return new(u||x)},x.\u0275mod=h.oAB({type:x}),x.\u0275inj=h.cJS({imports:[p.ez,y.Bz,t.AV]})},9863:(ot,Z,l)=>{l.r(Z),l.d(Z,{StatusModule:()=>E});var p=l(6895),t=l(4650),y=l(7398),h=l(284);const Q=function(){return["/menu/products/download/by-url"]};class f{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 Listed SKU",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"}]}ngOnInit(){}}f.\u0275fac=function(e){return new(e||f)},f.\u0275cmp=t.Xpm({type:f,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,n){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()(),t.TgZ(4,"div")(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7)(10,"a",8),t._uU(11,"Download Product By Url"),t.qZA()()()()()(),t._UZ(12,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",n.productTabs),t.xp6(7),t.Q6J("routerLink",t.DdM(2,Q)))},dependencies:[y.e,h.lC,h.rH]});var x=l(1290),_=l(8231),u=l(5412),r=l(3154),g=l(9694),S=(()=>{return(i=S||(S={})).Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",S;var i})(),R=l(6779),N=l(266),Y=l(6401);function tt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&i){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==n?null:n.Model,""),t.xp6(2),t.hij(" ",null==n?null:n.Code,"")}}function W(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function nt(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}const T=function(i){return{"is-disabled":i}};function I(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,W,2,2,"td",14),t.YNc(2,nt,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",19)(16,"a",20),t._UZ(17,"i",21),t.TgZ(18,"span",22),t._uU(19,"Edit"),t.qZA()()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",a.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>55?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",n.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,12,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,14,n.Inventory)),t.xp6(3),t.Q6J("href",a.getHyperlinkSellerCenter(n),t.LSH)("ngClass",t.VKq(16,T,n.TypeID==a.channelType.KalCare))("matTooltip",n.TypeID!=a.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function d(i,e){if(1&i&&t.YNc(0,I,20,18,"tr",8),2&i){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function C(i,e){if(1&i&&(t.ynx(0),t.YNc(1,tt,9,2,"ng-container",9),t.YNc(2,d,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&i){const n=e.$implicit,o=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",o)}}class P{constructor(e,n){this.data=e,this.dialogRef=n,this.channelType=g.x,this.variants=e.variants,this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new R.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case g.x.ShopeeV2:n=`${S.Shoope}/portal/product/${e.ChannelItemID}`;break;case g.x.Tiktok:n=`${S.Tiktok}/product/edit/${e.ChannelItemID}`;break;case g.x.Tokopedia:n=`${S.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case g.x.WooCommerce:n=`${S.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case g.x.Lazada:n=`${S.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`}return n}}P.\u0275fac=function(e){return new(e||P)(t.Y36(u.WI),t.Y36(u.so))},P.\u0275cmp=t.Xpm({type:P,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),t._uU(6," VARIANT "),t.TgZ(7,"sup"),t._UZ(8,"i",5),t.qZA()(),t.TgZ(9,"th",4),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",4),t._uU(12," PRODUCT "),t.TgZ(13,"sup"),t._UZ(14,"i",6),t.qZA()(),t.TgZ(15,"th",4),t._uU(16,"PRICE"),t.qZA(),t.TgZ(17,"th",7),t._uU(18,"INVENTORY"),t.qZA(),t._UZ(19,"th",4),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,C,4,2,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(21),t.Q6J("ngForOf",n.variants))},dependencies:[p.mk,p.sg,p.O5,N.gM,Y.M,p.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});var m=l(9300),O=l(7579),F=l(2722),A=l(3900),v=l(9646),U=l(9568),D=l(1318);class k{constructor(e,n){this.LocalData=e,this.httpService=n}getCategoriesByTypeId(e,n){return this.LocalData.getCategoriesByChannelType(e).pipe((0,A.w)(o=>null!=o?(0,v.of)(o):this._getCategoriesByTypeID(e,n)))}_getCategoriesByTypeID(e,n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:e,ID:n}).pipe((0,A.w)(a=>this.LocalData.saveCategoriesByChannelType(a,e)))}}k.\u0275fac=function(e){return new(e||k)(t.LFG(U.T),t.LFG(D.O))},k.\u0275prov=t.Yz7({token:k,factory:k.\u0275fac,providedIn:"root"});var J=l(6082),B=l(7185),b=l(4006),at=l(8158);function lt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"ng-select-infinite",16),t.NdJ("selectedChange",function(a){t.CHM(n);const c=t.oxw().index,s=t.oxw();return t.KtG(s.onSelectCategory(a,c))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("items",n.Categories)("clearable",!1)}}function rt(i,e){if(1&i&&(t.TgZ(0,"div",17),t._UZ(1,"input",18),t.qZA()),2&i){const n=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Q6J("placeholder",o.getChannelCategory(n.TypeID))}}function ct(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",9)(3,"input",10),t.NdJ("ngModelChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.Selected=a)})("ngModelChange",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",11),t._UZ(6,"img",12),t.TgZ(7,"span",13),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,lt,2,2,"ng-container",14),t.YNc(11,rt,2,1,"ng-template",null,15,t.W1O),t.qZA()(),t.BQk()}if(2&i){const n=e.$implicit,o=t.MAs(12);t.xp6(3),t.Q6J("ngModel",n.Selected),t.xp6(3),t.Q6J("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",n.Categories.length>0)("ngIfElse",o)}}class M{constructor(e,n,o,a,c){this.data=e,this.channelService=n,this.productService=o,this.dialogRef=a,this.toastrService=c,this.channelOptions=[],this.uploadResponse=[],this.channelType=g.x,this.enableBtnOk=!1,this.destroy$=new O.x,this.uploadResponse=[],this.channels=this.data.channels,this.products=this.data.products,this.isMultipleProduct=e.multipleProduct}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new R.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(n=>{this.channelService.getCategoriesByTypeId(n.channelType,n.channelId).pipe((0,F.R)(this.destroy$)).subscribe(o=>{this.setCategoriesChannelOption(n.channelType,o)})})}setCategoriesChannelOption(e,n){this.channelOptions=this.channelOptions.map(o=>(o.TypeID==e&&(o.Categories=n),o))}initChannelOptions(){this.channelOptions=this.channels.map(e=>({Name:e.Name,Img:e.Img,ID:e.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(e.TypeID),TypeID:e.TypeID,Categories:[]}))}initDefaultChannelCategoryId(e){let n=0;return e===g.x.Lazada&&(n=6509),n}filterChannelTypeId(){return this.data.channels.map(n=>({channelType:n.TypeID,channelId:n.ID})).filter((n,o,a)=>a.findIndex(c=>n.channelType==c.channelType)==o).filter(n=>n.channelType==g.x.Tokopedia)}onSelectCategory(e,n){this.channelOptions[n].CategoryID=e,this.channelOptions[n].Selected=!0,this.onSelectChannel()}onSelectAllChannel(e){this.channelOptions=this.channelOptions.map(n=>(n.Selected=e,n)),this.enableBtnOk=e}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(e=>e.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const e=this.channelOptions.filter(n=>n.Selected).map(n=>({CategoryID:n.CategoryID,ChannelID:n.ID}));this.submitToServer(e)}validateSelectedCategory(){return-1==this.channelOptions.filter(n=>n.Selected).filter(n=>n.TypeID==g.x.Tokopedia).findIndex(n=>0==n.CategoryID)}submitToServer(e){this.isMultipleProduct?this.uploadMultipleProduct(e):this.uploadSingleProduct(e)}uploadMultipleProduct(e){this.productService.uploadMultipleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),console.log(n),this.productService.showToastrUploadMultiple(n.Message)},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastrUploadMultiple(n.error?.Message)}})}uploadSingleProduct(e){this.productService.uploadSingleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),this.productService.showToastrSuccessUploadSingle(n,this.data.products[0])},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastErrorUploadSingle(n,this.data.products[0])}})}getChannelCategory(e){let n;switch(e){case g.x.ShopeeV2:n="Perlengkapan Rumah Lainnya";break;case g.x.Tiktok:n="Perlengkapan Rumah - Dekorasi Rumah - Poster & Produck Cetak";break;case g.x.WooCommerce:n="New Product";break;case g.x.Lazada:n="Fashion Accessories / Women Accessories / Others";break;default:n="Unavailable Category"}return n}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}M.\u0275fac=function(e){return new(e||M)(t.Y36(u.WI),t.Y36(k),t.Y36(J.M),t.Y36(u.so),t.Y36(B._W))},M.\u0275cmp=t.Xpm({type:M,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["bindValue","Key","bindLabel","Value","width","100%","parent","body","position","top","placeholder","Select Category",3,"items","clearable","selectedChange"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above","matTooltipClass","custom-width-tooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return n.onSave()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(a){return n.onSelectAllChannel(a.target.checked)}),t.qZA()(),t.TgZ(7,"th",5)(8,"span",6),t._uU(9,"CHANNEL"),t.qZA()(),t.TgZ(10,"th",7)(11,"span",6),t._uU(12,"CATEGORY"),t.qZA()()()(),t.TgZ(13,"tbody"),t.YNc(14,ct,13,5,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",n.enableBtnOk)("config",n.modalConfig),t.xp6(14),t.Q6J("ngForOf",n.channelOptions))},dependencies:[p.sg,p.O5,b.Wl,b.JJ,b.On,N.gM,Y.M,at.R],styles:["input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}\n"],encapsulation:2});var L=l(7481),V=l(6732),X=l(6956);function st(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",8),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",9),t._uU(2," Scan Channel "),t.qZA()}}function dt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",9),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Scan (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",11),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",12),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Upload (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",13)(1,"app-product-card",14),t.NdJ("onUpload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onUploadToMultipleChannel(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanSingleProduct(c))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onOpenDialogVariant(c))})("onCheckBoxChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n?null:n.Variants.length)>1?(null==n?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<o.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function ut(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",15)(2,"div"),t._UZ(3,"i",16),t.qZA(),t.TgZ(4,"h4",17),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",18),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",19),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function gt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",20)(2,"div",21)(3,"app-custom-paginator",22),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}class ${constructor(e,n,o,a){this.http=e,this.toastr=n,this.dialog=o,this.productService=a,this.searchFilter=new x.k,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.loader().subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",{PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text}).subscribe(n=>{this.products=n.Data,this.rowCount=null==n.Total?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{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 n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(e){this.dialog.open(P,{data:{title:this.products[e].Name,variants:this.products[e].Variants},width:"800px"})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe(a=>{this.getProducts()})}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.dialog.open(_.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let c=this.productService.selectedProduct(this.products),s=this.productService.getVariantCodesProducts(c);this.scanSingleProduct(s)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(a)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}}$.\u0275fac=function(e){return new(e||$)(t.Y36(D.O),t.Y36(B._W),t.Y36(u.uw),t.Y36(J.M))},$.\u0275cmp=t.Xpm({type:$,selectors:[["app-in-pos"]],decls:11,vars:7,consts:[["hideSearchDropdown","true","hideSearchDropdown","false","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,"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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,st,3,0,"button",1),t.YNc(3,dt,3,1,"button",2),t.YNc(4,pt,3,1,"button",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,ht,2,10,"div",6),t.YNc(9,ut,10,0,"ng-container",7),t.qZA(),t.YNc(10,gt,4,4,"ng-container",7),t.qZA()()()),2&e&&(t.Q6J("headerTitle","In POS ("+n.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",n.products.length>0))},dependencies:[p.sg,p.O5,L.p,V.y,X.Y],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}"]});var w=l(8796);function mt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function _t(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Ct(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",17),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ft(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function xt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(a){t.CHM(n);const c=t.oxw();return t.KtG(c.searchFilter.Item_id=a)}),t.qZA()()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function Pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onUploadToMultipleChannel(c))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onOpenVariantDetail(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanSingleProduct(c))})("onCheckBoxChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",null==n?null:n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n||null==n.Variants?null:n.Variants.length)>1?(null==n||null==n.Variants?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",null==n?null:n.hasScan)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function bt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",23)(2,"div"),t._UZ(3,"i",24),t.qZA(),t.TgZ(4,"h4",25),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",26),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",27),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function St(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",28)(1,"div",29)(2,"app-custom-paginator",30),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}class q{constructor(e,n,o,a,c){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.activateRouter=c,this.searchFilter=new x.k,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=r.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,n.Filter.ChannelID!=r.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel({ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id}).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(e){this.dialog.open(P,{data:{variants:this.products[e].Variants,title:this.products[e].Name},width:"800px"})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe((0,m.h)(n=>n)).subscribe(n=>{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(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(r.g.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanProducts(a)})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe({next:a=>{this.getProducts()}})}onScanMultipleProduct(){let e=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.searchFilter.ChannelID=r.g.GuidEMpty;let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let c=this.productService.selectedProduct(this.products),s=this.productService.getVariantCodesProducts(c);this.scanProducts(s)})}scanProducts(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${o?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${o?.Name} `,"Error"),this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=r.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}q.\u0275fac=function(e){return new(e||q)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(h.gz))},q.\u0275cmp=t.Xpm({type:q,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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,mt,3,0,"button",1),t.YNc(3,_t,3,1,"button",2),t.YNc(4,Ct,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(a){return n.searchFilter.ListChannelID=a})("clear",function(){return n.onClearFilterChannel()}),t.YNc(12,ft,3,2,"ng-template",7),t.qZA()(),t.YNc(13,xt,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,Pt,2,10,"div",11),t.YNc(18,bt,10,0,"ng-container",8),t.qZA(),t.YNc(19,St,3,4,"div",12),t.qZA()()()),2&e&&(t.Q6J("headerTitle","Sold in Channel"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=n.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",null==n.products?null:n.products.length))},dependencies:[p.sg,p.O5,b.Fj,b.JJ,b.On,L.p,w.w9,w.ir,V.y,X.Y],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}"]});var K=l(8063),vt=l(8505),yt=l(4004),Tt=l(9425),It=l(1739);function Mt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",29),t.NdJ("click",function(a){t.CHM(n);const c=t.oxw(3).$implicit,s=t.oxw(4);return t.KtG(s.onZoomImage(a,null==c?null:c.ImageUrl))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Ot(i,e){1&i&&t._UZ(0,"img",30)}function wt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"td",23)(2,"div",24),t.YNc(3,Mt,2,1,"ng-container",6),t.YNc(4,Ot,1,0,"ng-template",null,25,t.W1O),t.qZA()(),t.TgZ(6,"td",26)(7,"h4",27)(8,"span",28),t._uU(9),t.qZA()()(),t.BQk()),2&i){const n=t.MAs(5),o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==o||null==o.Name?null:o.Name.length)>50?null==o?null:o.Name:""),t.xp6(1),t.hij(" ",null==o?null:o.Name," ")}}function Zt(i,e){if(1&i&&(t.TgZ(0,"div")(1,"a",19),t._UZ(2,"img",31),t.qZA()()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH),t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Nt(i,e){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"img",31),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Ft(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,wt,10,6,"ng-container",16),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"span"),t._uU(6),t.qZA(),t.TgZ(7,"span",18)(8,"a",19),t._UZ(9,"i",20),t.qZA()()(),t.TgZ(10,"td",21)(11,"div",22),t.YNc(12,Zt,3,3,"div",17),t.qZA()(),t.TgZ(13,"td",21)(14,"div",22),t.YNc(15,Nt,2,2,"div",17),t.qZA()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(5);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(3),t.hij(" ",n.Code," "),t.xp6(2),t.Q6J("href","https://"+a.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),t.LSH),t.xp6(4),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function At(i,e){if(1&i&&(t.ynx(0),t.YNc(1,Ft,16,6,"tr",17),t.BQk()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function Ut(i,e){if(1&i&&(t.TgZ(0,"tbody"),t.YNc(1,At,2,1,"ng-container",17),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function Dt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"div",9)(2,"table",10)(3,"thead",11)(4,"tr")(5,"th",12),t._uU(6,"Product"),t.qZA(),t.TgZ(7,"th",13),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th",13),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",14),t._uU(12,"Available In"),t.qZA(),t.TgZ(13,"th",15),t._uU(14,"Not Available In"),t.qZA()()(),t.YNc(15,Ut,2,1,"tbody",16),t.ALo(16,"async"),t.qZA()(),t.BQk()),2&i){const n=t.oxw(2);t.xp6(15),t.Q6J("ngIf",t.lcZ(16,1,n.data$))}}function kt(i,e){1&i&&(t.TgZ(0,"div",32)(1,"div"),t._UZ(2,"i",33),t.qZA(),t.TgZ(3,"h4",34),t._uU(4,"No product found"),t.qZA(),t.TgZ(5,"h6",35),t._uU(6,"Once you have a product"),t.qZA(),t.TgZ(7,"h6",36),t._uU(8,"you`ll see them here"),t.qZA()())}function Jt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"span",44),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.getRowCount())}),t.TgZ(1,"i",45),t._uU(2,"?"),t.qZA()()}}function Lt(i,e){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Et(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",46),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onNextPage())}),t._UZ(1,"i",47),t._uU(2," Next"),t.qZA()}}function Qt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onLastPage())}),t._UZ(1,"i",49),t._uU(2," Last"),t.qZA()}}function Rt(i,e){if(1&i&&(t.TgZ(0,"div",37)(1,"div",38)(2,"div",39),t._uU(3),t.ALo(4,"number"),t.YNc(5,Jt,3,0,"span",40),t.YNc(6,Lt,3,3,"span",16),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",41),t.YNc(10,Et,3,0,"a",42),t.YNc(11,Qt,3,0,"a",43),t.qZA()()),2&i){const n=e.ngIf,o=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==n?null:n.length)," of "),t.xp6(2),t.Q6J("ngIf",o.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!o.paginationService.hideCount&&t.lcZ(7,8,o.rowCount$)),t.xp6(2),t.hij(" records ~ ",o.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage)}}function Yt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(a){t.CHM(n);const c=t.oxw();return t.KtG(c.searchProduct(a))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const c=t.CHM(n).ngIf,s=t.oxw();return t.KtG(s.openScanDialog(c))}),t._UZ(3,"i",3),t._uU(4," Scan Channel "),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,Dt,17,3,"ng-container",6),t.ALo(9,"async"),t.YNc(10,kt,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(12,Rt,12,10,"div",8),t.ALo(13,"async"),t.qZA()()()}if(2&i){const n=t.MAs(11),o=t.oxw();t.Q6J("hideSearchDropdown",!0),t.xp6(8),t.Q6J("ngIf",t.lcZ(9,4,o.data$).length>0)("ngIfElse",n),t.xp6(4),t.Q6J("ngIf",t.lcZ(13,6,o.data$))}}class G{constructor(e,n,o,a,c,s){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.paginationService=c,this.biggerPictureService=s,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,vt.b)(e=>{this.filterSearch=e.Filter,this.paginationService.resetToFirstPage(e.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,yt.U)(e=>e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n))))}assignLogoChannel(e){return e.map(n=>(n.Img=r.g.getChannelLogoByTypeId(n.TypeID),n))}searchProduct(e){this.filterSearch.text=e,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(e){let n=this.productService.findChannelById(this.filterSearch.ChannelID,e.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(o=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(o,n,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(e){let n=JSON.parse(JSON.stringify(this.filterSearch));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:e.Options.Channel},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.filterSearch.ChannelID=a.ChannelID,this.filterSearch.ScanFull=a.ScanFull,this.filterSearch.UpdatedProduct=a.UpdatedProduct,this.filterSearch.Async=a.Async,this.scanAllProduct(e)})}getChannelLogoById(e){return r.g.getChannelLogoByTypeId(e)}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:e=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,e.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}}function Bt(i,e){if(1&i&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&i){const n=e.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}G.\u0275fac=function(e){return new(e||G)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(Tt.b),t.Y36(It.k))},G.\u0275cmp=t.Xpm({type:G,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"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded",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,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["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"],[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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[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,n){1&e&&(t.YNc(0,Yt,14,8,"mainpanel",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,n.loader$))},dependencies:[p.sg,p.O5,L.p,N.gM,p.Ov,p.JJ],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%}"]});class H{constructor(e,n){this.data=e,this.dialogRef=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new R.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}H.\u0275fac=function(e){return new(e||H)(t.Y36(u.WI),t.Y36(u.so))},H.\u0275cmp=t.Xpm({type:H,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),t._uU(6,"Variant"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"SKU"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,Bt,5,2,"tr",4),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(10),t.Q6J("ngForOf",n.data.variants))},dependencies:[p.sg,Y.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});var et=l(1948);function Vt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.openScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function $t(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",16),t._uU(3),t.qZA(),t.BQk()}if(2&i){const n=t.oxw();let o;t.xp6(3),t.hij(" Download (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function qt(i,e){if(1&i&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const Kt=function(i){return[i]},Gt=function(){return[]};function Ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",19)(1,"app-product-card",20),t.NdJ("onCheckBoxChange",function(a){const s=t.CHM(n).index,an=t.oxw();return t.KtG(an.onSelectProduct(a,s))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onShowVariantDetail(c))})("onDownload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onDownloadProduct(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanChannel(c))}),t.qZA()()}if(2&i){const n=e.$implicit;t.xp6(1),t.Q6J("showRedirectIcon",!1)("title",null==n?null:n.Name)("image",null==n?null:n.Image)("imageForZoom",null==n?null:n.Image)("code",null==n?null:n.SKU)("description",(null==n||null==n.Variant?null:n.Variant.length)>0?(null==n||null==n.Variant?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=n&&n.Channel?t.VKq(10,Kt,null==n?null:n.Channel):t.DdM(12,Gt))("showCheckBox",!0)("scanButton",!0)}}function jt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",21)(2,"div"),t._UZ(3,"i",22),t.qZA(),t.TgZ(4,"h4",23),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",24),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",25),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function zt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}class j{constructor(e,n,o,a,c){this.http=e,this.dialog=n,this.productService=o,this.toastrService=a,this.activateRouter=c,this.searchFilter=new x.k,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",{ChannelID:this.searchFilter.ChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,HaveSku:this.searchFilter.HaveSku}).subscribe(n=>{this.products=n.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(e=>(e.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(n=>n.ID==e.ChannelID))),e)).map(e=>(e.Channel.Url=e.Url,e))}setSkuProduct(){this.products=this.products.map(e=>(e.SKU=0==e?.Variant?.length?r.g.IsNotEmpty(e?.ChannelItemSKU)?e?.ChannelItemSKU:"SKU not assigned":e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}onScanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{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(r.g.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=r.g.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;n="ALL"==e?this.products:this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(r.g.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(H,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}j.\u0275fac=function(e){return new(e||j)(t.Y36(D.O),t.Y36(u.uw),t.Y36(J.M),t.Y36(B._W),t.Y36(h.gz))},j.\u0275cmp=t.Xpm({type:j,selectors:[["app-not-in-pos"]],decls:28,vars:12,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"],[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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"actions"),t.YNc(2,Vt,3,0,"button",1),t.YNc(3,$t,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearChannelFilter()}),t.YNc(11,qt,3,2,"ng-template",6),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"SKU Assigned"),t.qZA(),t.TgZ(15,"mat-radio-group",7),t.NdJ("ngModelChange",function(a){return n.searchFilter.HaveSku=a}),t.TgZ(16,"mat-radio-button",8),t._uU(17," All "),t.qZA(),t.TgZ(18,"mat-radio-button",8),t._uU(19," Yes "),t.qZA(),t.TgZ(20,"mat-radio-button",8),t._uU(21," No "),t.qZA()()()()()(),t.TgZ(22,"content")(23,"div",9)(24,"div",10),t.YNc(25,Ht,2,13,"div",11),t.YNc(26,jt,10,0,"ng-container",2),t.qZA(),t.YNc(27,zt,3,4,"div",12),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",n.searchFilter.HaveSku),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(5),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[p.sg,p.O5,b.JJ,b.On,L.p,w.w9,w.ir,et.VQ,et.U0,V.y,X.Y],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}"]});var it=l(5631);function Wt(i,e){if(1&i&&(t.TgZ(0,"span",8),t._UZ(1,"img",9),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Xt(i,e){if(1&i&&(t.TgZ(0,"div",10),t._UZ(1,"app-duplicate-product-card",11),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function tn(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",12)(2,"div"),t._UZ(3,"i",13),t.qZA(),t.TgZ(4,"h4",14),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",15),t._uU(7,"Once you have a duplicate product"),t.qZA(),t.TgZ(8,"h6",16),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function nn(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",17)(2,"div",18)(3,"app-custom-paginator",19),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())})("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}class z{constructor(e,n){this.httpService=e,this.productService=n,this.searchFilter=new x.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.channelOptions=e.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ChannelID:this.searchFilter.ChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}}z.\u0275fac=function(e){return new(e||z)(t.Y36(D.O),t.Y36(J.M))},z.\u0275cmp=t.Xpm({type:z,selectors:[["app-duplicate-sku"]],decls:14,vars:6,consts:[["headerTitle","Multiple Listed SKU","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,"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","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearFilter()}),t.YNc(7,Wt,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,Xt,2,5,"div",6),t.YNc(12,tn,10,0,"ng-container",7),t.qZA(),t.YNc(13,nn,4,4,"ng-container",7),t.qZA()()()),2&e&&(t.xp6(6),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==(null==n.products?null:n.products.length)),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[p.sg,p.O5,b.JJ,b.On,L.p,w.w9,w.ir,it._,V.y]});var en=l(8739);const on=[{component:f,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:$,canActivate:[K.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:q,canActivate:[K.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:G,canActivate:[K.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:j,canActivate:[K.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:z,canActivate:[K.a],data:{title:"Duplicate Sku in Channel"}}]}];class E{}E.\u0275fac=function(e){return new(e||E)},E.\u0275mod=t.oAB({type:E}),E.\u0275inj=t.cJS({imports:[p.ez,b.u5,L.R,N.AV,w.A0,en.TU,et.Fk,y.Z,it._,V.y,X.Y,h.Bz.forChild(on)]})},9425:(ot,Z,l)=>{l.d(Z,{b:()=>T});var p=l(1135),t=l(7579),y=l(2722),h=l(9300),Q=l(4351),f=l(4004),x=l(4482),_=l(5403),u=l(8421),r=l(4671),g=l(5032),S=l(3269),N=l(5026),Y=l(8505),tt=l(4782),W=l(4650),nt=l(1318);class T{constructor(d){this.http=d,this.pagination$=new p.X(null),this.destroy$=new t.x,this.data$=this.paginationFunction()}onNextPage(d){d.PageNumber+=1,this.pagination$.next(d)}setPageNumberFooter(d){this.footerPageNumber=d.PageNumber}setPaginationButtonState(d,C){this.disableNextButton=0==C||!(C<d.RowCount*d.PageNumber)}resetToFirstPage(d){d.PageNumber=1,this.pagination$.next(d),this.hideCount=!0,this.goToLastPage=!1}getAllData(d,C){d.RowCount=C,this.pagination$.next(d),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new p.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,y.R)(this.destroy$),(0,h.h)(d=>null!=d),(0,Q.b)(d=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(d)).pipe((0,f.U)(C=>C.Data))),function R(...I){const d=(0,S.jO)(I);return(0,x.e)((C,P)=>{const m=I.length,O=new Array(m);let F=I.map(()=>!1),A=!1;for(let v=0;v<m;v++)(0,u.Xf)(I[v]).subscribe((0,_.x)(P,U=>{O[v]=U,!A&&!F[v]&&(F[v]=!0,(A=F.every(r.y))&&(F=null))},g.Z));C.subscribe((0,_.x)(P,v=>{if(A){const U=[v,...O];P.next(d?d(...U):U)}}))})}(this.pagination$),(0,N.R)((d,C)=>{const[P,m]=d,[O]=C;return 1==m.PageNumber?[O,m]:[P.concat(O),m]}),(0,Y.b)(([d,C])=>{this.setPageNumberFooter(C),this.setPaginationButtonState(C,d.length)}),(0,f.U)(([d])=>d),(0,tt.d)())}}T.\u0275fac=function(d){return new(d||T)(W.LFG(nt.O))},T.\u0275prov=W.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[863],{7398:(ot,Z,l)=>{l.d(Z,{Z:()=>x,e:()=>f});var p=l(6895),t=l(266),T=l(284),h=l(4650);function Q(_,u){if(1&_&&(h.TgZ(0,"li",2)(1,"a",3),h._uU(2),h.qZA()()),2&_){const r=u.$implicit;h.xp6(1),h.s9C("routerLink",r.Url),h.Q6J("title",r.Description?r.Description:""),h.xp6(1),h.hij(" ",r.Title," ")}}class f{}f.\u0275fac=function(u){return new(u||f)},f.\u0275cmp=h.Xpm({type:f,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(u,r){1&u&&(h.TgZ(0,"ul",0),h.YNc(1,Q,3,3,"li",1),h.qZA()),2&u&&(h.xp6(1),h.Q6J("ngForOf",r.Tabs))},dependencies:[p.sg,T.rH,T.Od]});class x{}x.\u0275fac=function(u){return new(u||x)},x.\u0275mod=h.oAB({type:x}),x.\u0275inj=h.cJS({imports:[p.ez,T.Bz,t.AV]})},9863:(ot,Z,l)=>{l.r(Z),l.d(Z,{StatusModule:()=>E});var p=l(6895),t=l(4650),T=l(7398),h=l(284);const Q=function(){return["/menu/products/download/by-url"]};class f{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 Listed SKU",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"}]}ngOnInit(){}}f.\u0275fac=function(e){return new(e||f)},f.\u0275cmp=t.Xpm({type:f,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,n){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()(),t.TgZ(4,"div")(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7)(10,"a",8),t._uU(11,"Download Product By Url"),t.qZA()()()()()(),t._UZ(12,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",n.productTabs),t.xp6(7),t.Q6J("routerLink",t.DdM(2,Q)))},dependencies:[T.e,h.lC,h.rH]});var x=l(1290),_=l(8231),u=l(5412),r=l(3154),g=l(9694),S=(()=>{return(i=S||(S={})).Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",S;var i})(),Y=l(6779),N=l(266),R=l(6401);function tt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&i){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==n?null:n.Model,""),t.xp6(2),t.hij(" ",null==n?null:n.Code,"")}}function W(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function nt(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}const y=function(i){return{"is-disabled":i}};function I(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,W,2,2,"td",14),t.YNc(2,nt,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",19)(16,"a",20),t._UZ(17,"i",21),t.TgZ(18,"span",22),t._uU(19,"Edit"),t.qZA()()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",a.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>55?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",n.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,12,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,14,n.Inventory)),t.xp6(3),t.Q6J("href",a.getHyperlinkSellerCenter(n),t.LSH)("ngClass",t.VKq(16,y,n.TypeID==a.channelType.KalCare))("matTooltip",n.TypeID!=a.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function d(i,e){if(1&i&&t.YNc(0,I,20,18,"tr",8),2&i){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function C(i,e){if(1&i&&(t.ynx(0),t.YNc(1,tt,9,2,"ng-container",9),t.YNc(2,d,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&i){const n=e.$implicit,o=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",o)}}class P{constructor(e,n){this.data=e,this.dialogRef=n,this.channelType=g.x,this.variants=e.variants,this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Y.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case g.x.ShopeeV2:n=`${S.Shoope}/portal/product/${e.ChannelItemID}`;break;case g.x.Tiktok:n=`${S.Tiktok}/product/edit/${e.ChannelItemID}`;break;case g.x.Tokopedia:n=`${S.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case g.x.WooCommerce:n=`${S.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case g.x.Lazada:n=`${S.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`}return n}}P.\u0275fac=function(e){return new(e||P)(t.Y36(u.WI),t.Y36(u.so))},P.\u0275cmp=t.Xpm({type:P,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),t._uU(6," VARIANT "),t.TgZ(7,"sup"),t._UZ(8,"i",5),t.qZA()(),t.TgZ(9,"th",4),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",4),t._uU(12," PRODUCT "),t.TgZ(13,"sup"),t._UZ(14,"i",6),t.qZA()(),t.TgZ(15,"th",4),t._uU(16,"PRICE"),t.qZA(),t.TgZ(17,"th",7),t._uU(18,"INVENTORY"),t.qZA(),t._UZ(19,"th",4),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,C,4,2,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(21),t.Q6J("ngForOf",n.variants))},dependencies:[p.mk,p.sg,p.O5,N.gM,R.M,p.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});var m=l(9300),O=l(7579),F=l(2722),A=l(3900),v=l(9646),U=l(9568),D=l(1318);class k{constructor(e,n){this.LocalData=e,this.httpService=n}getCategoriesByTypeId(e,n){return this.LocalData.getCategoriesByChannelType(e).pipe((0,A.w)(o=>null!=o?(0,v.of)(o):this._getCategoriesByTypeID(e,n)))}_getCategoriesByTypeID(e,n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:e,ID:n}).pipe((0,A.w)(a=>this.LocalData.saveCategoriesByChannelType(a,e)))}}k.\u0275fac=function(e){return new(e||k)(t.LFG(U.T),t.LFG(D.O))},k.\u0275prov=t.Yz7({token:k,factory:k.\u0275fac,providedIn:"root"});var J=l(6082),B=l(7185),b=l(4006),at=l(8158);function lt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"ng-select-infinite",16),t.NdJ("selectedChange",function(a){t.CHM(n);const c=t.oxw().index,s=t.oxw();return t.KtG(s.onSelectCategory(a,c))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("items",n.Categories)("clearable",!1)}}function rt(i,e){if(1&i&&(t.TgZ(0,"div",17),t._UZ(1,"input",18),t.qZA()),2&i){const n=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Q6J("placeholder",o.getChannelCategory(n.TypeID))}}function ct(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",9)(3,"input",10),t.NdJ("ngModelChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.Selected=a)})("ngModelChange",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",11),t._UZ(6,"img",12),t.TgZ(7,"span",13),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,lt,2,2,"ng-container",14),t.YNc(11,rt,2,1,"ng-template",null,15,t.W1O),t.qZA()(),t.BQk()}if(2&i){const n=e.$implicit,o=t.MAs(12);t.xp6(3),t.Q6J("ngModel",n.Selected),t.xp6(3),t.Q6J("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",n.Categories.length>0)("ngIfElse",o)}}class M{constructor(e,n,o,a,c){this.data=e,this.channelService=n,this.productService=o,this.dialogRef=a,this.toastrService=c,this.channelOptions=[],this.uploadResponse=[],this.channelType=g.x,this.enableBtnOk=!1,this.destroy$=new O.x,this.uploadResponse=[],this.channels=this.data.channels,this.products=this.data.products,this.isMultipleProduct=e.multipleProduct}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new Y.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(n=>{this.channelService.getCategoriesByTypeId(n.channelType,n.channelId).pipe((0,F.R)(this.destroy$)).subscribe(o=>{this.setCategoriesChannelOption(n.channelType,o)})})}setCategoriesChannelOption(e,n){this.channelOptions=this.channelOptions.map(o=>(o.TypeID==e&&(o.Categories=n),o))}initChannelOptions(){this.channelOptions=this.channels.map(e=>({Name:e.Name,Img:e.Img,ID:e.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(e.TypeID),TypeID:e.TypeID,Categories:[]}))}initDefaultChannelCategoryId(e){let n=0;return e===g.x.Lazada&&(n=6509),n}filterChannelTypeId(){return this.data.channels.map(n=>({channelType:n.TypeID,channelId:n.ID})).filter((n,o,a)=>a.findIndex(c=>n.channelType==c.channelType)==o).filter(n=>n.channelType==g.x.Tokopedia)}onSelectCategory(e,n){this.channelOptions[n].CategoryID=e,this.channelOptions[n].Selected=!0,this.onSelectChannel()}onSelectAllChannel(e){this.channelOptions=this.channelOptions.map(n=>(n.Selected=e,n)),this.enableBtnOk=e}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(e=>e.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const e=this.channelOptions.filter(n=>n.Selected).map(n=>({CategoryID:n.CategoryID,ChannelID:n.ID}));this.submitToServer(e)}validateSelectedCategory(){return-1==this.channelOptions.filter(n=>n.Selected).filter(n=>n.TypeID==g.x.Tokopedia).findIndex(n=>0==n.CategoryID)}submitToServer(e){this.isMultipleProduct?this.uploadMultipleProduct(e):this.uploadSingleProduct(e)}uploadMultipleProduct(e){this.productService.uploadMultipleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),console.log(n),this.productService.showToastrUploadMultiple(n.Message)},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastrUploadMultiple(n.error?.Message)}})}uploadSingleProduct(e){this.productService.uploadSingleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),this.productService.showToastrSuccessUploadSingle(n,this.data.products[0])},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastErrorUploadSingle(n,this.data.products[0])}})}getChannelCategory(e){let n;switch(e){case g.x.ShopeeV2:n="Perlengkapan Rumah Lainnya";break;case g.x.Tiktok:n="Perlengkapan Rumah - Dekorasi Rumah - Poster & Produck Cetak";break;case g.x.WooCommerce:n="New Product";break;case g.x.Lazada:n="Fashion Accessories / Women Accessories / Others";break;default:n="Unavailable Category"}return n}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}M.\u0275fac=function(e){return new(e||M)(t.Y36(u.WI),t.Y36(k),t.Y36(J.M),t.Y36(u.so),t.Y36(B._W))},M.\u0275cmp=t.Xpm({type:M,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["bindValue","Key","bindLabel","Value","width","100%","parent","body","position","top","placeholder","Select Category",3,"items","clearable","selectedChange"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above","matTooltipClass","custom-width-tooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return n.onSave()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(a){return n.onSelectAllChannel(a.target.checked)}),t.qZA()(),t.TgZ(7,"th",5)(8,"span",6),t._uU(9,"CHANNEL"),t.qZA()(),t.TgZ(10,"th",7)(11,"span",6),t._uU(12,"CATEGORY"),t.qZA()()()(),t.TgZ(13,"tbody"),t.YNc(14,ct,13,5,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",n.enableBtnOk)("config",n.modalConfig),t.xp6(14),t.Q6J("ngForOf",n.channelOptions))},dependencies:[p.sg,p.O5,b.Wl,b.JJ,b.On,N.gM,R.M,at.R],styles:["input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}\n"],encapsulation:2});var L=l(7481),V=l(6732),X=l(6956);function st(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",8),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",9),t._uU(2," Scan Channel "),t.qZA()}}function dt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",9),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Scan (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",11),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",12),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Upload (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",13)(1,"app-product-card",14),t.NdJ("onUpload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onUploadToMultipleChannel(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanSingleProduct(c))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onOpenDialogVariant(c))})("onCheckBoxChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n?null:n.Variants.length)>1?(null==n?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<o.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function ut(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",15)(2,"div"),t._UZ(3,"i",16),t.qZA(),t.TgZ(4,"h4",17),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",18),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",19),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function gt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",20)(2,"div",21)(3,"app-custom-paginator",22),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}class q{constructor(e,n,o,a){this.http=e,this.toastr=n,this.dialog=o,this.productService=a,this.searchFilter=new x.k,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.loader().subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",{PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text}).subscribe(n=>{this.products=n.Data,this.rowCount=null==n.Total?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{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 n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(e){this.dialog.open(P,{data:{title:this.products[e].Name,variants:this.products[e].Variants},width:"800px"})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe(a=>{this.getProducts()})}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.dialog.open(_.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let c=this.productService.selectedProduct(this.products),s=this.productService.getVariantCodesProducts(c);this.scanSingleProduct(s)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(a)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}}q.\u0275fac=function(e){return new(e||q)(t.Y36(D.O),t.Y36(B._W),t.Y36(u.uw),t.Y36(J.M))},q.\u0275cmp=t.Xpm({type:q,selectors:[["app-in-pos"]],decls:11,vars:7,consts:[["hideSearchDropdown","true","hideSearchDropdown","false","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,"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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,st,3,0,"button",1),t.YNc(3,dt,3,1,"button",2),t.YNc(4,pt,3,1,"button",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,ht,2,10,"div",6),t.YNc(9,ut,10,0,"ng-container",7),t.qZA(),t.YNc(10,gt,4,4,"ng-container",7),t.qZA()()()),2&e&&(t.Q6J("headerTitle","In POS ("+n.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",n.products.length>0))},dependencies:[p.sg,p.O5,L.p,V.y,X.Y],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}"]});var w=l(8796);function mt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function _t(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Ct(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",17),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ft(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function xt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(a){t.CHM(n);const c=t.oxw();return t.KtG(c.searchFilter.Item_id=a)}),t.qZA()()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function Pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onUploadToMultipleChannel(c))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onOpenVariantDetail(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanSingleProduct(c))})("onCheckBoxChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",null==n?null:n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n||null==n.Variants?null:n.Variants.length)>1?(null==n||null==n.Variants?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",null==n?null:n.hasScan)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function bt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",23)(2,"div"),t._UZ(3,"i",24),t.qZA(),t.TgZ(4,"h4",25),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",26),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",27),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function St(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",28)(1,"div",29)(2,"app-custom-paginator",30),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}class ${constructor(e,n,o,a,c){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.activateRouter=c,this.searchFilter=new x.k,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=r.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,n.Filter.ChannelID!=r.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel({ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id}).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(e){this.dialog.open(P,{data:{variants:this.products[e].Variants,title:this.products[e].Name},width:"800px"})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe((0,m.h)(n=>n)).subscribe(n=>{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(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(r.g.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanProducts(a)})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe({next:a=>{this.getProducts()}})}onScanMultipleProduct(){let e=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.searchFilter.ChannelID=r.g.GuidEMpty;let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let c=this.productService.selectedProduct(this.products),s=this.productService.getVariantCodesProducts(c);this.scanProducts(s)})}scanProducts(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${o?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${o?.Name} `,"Error"),this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=r.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}$.\u0275fac=function(e){return new(e||$)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(h.gz))},$.\u0275cmp=t.Xpm({type:$,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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,mt,3,0,"button",1),t.YNc(3,_t,3,1,"button",2),t.YNc(4,Ct,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(a){return n.searchFilter.ListChannelID=a})("clear",function(){return n.onClearFilterChannel()}),t.YNc(12,ft,3,2,"ng-template",7),t.qZA()(),t.YNc(13,xt,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,Pt,2,10,"div",11),t.YNc(18,bt,10,0,"ng-container",8),t.qZA(),t.YNc(19,St,3,4,"div",12),t.qZA()()()),2&e&&(t.Q6J("headerTitle","Sold in Channel"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=n.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",null==n.products?null:n.products.length))},dependencies:[p.sg,p.O5,b.Fj,b.JJ,b.On,L.p,w.w9,w.ir,V.y,X.Y],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}"]});var K=l(8063),vt=l(8505),Tt=l(4004),yt=l(9425),It=l(1739);function Mt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",29),t.NdJ("click",function(a){t.CHM(n);const c=t.oxw(3).$implicit,s=t.oxw(4);return t.KtG(s.onZoomImage(a,null==c?null:c.ImageUrl))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Ot(i,e){1&i&&t._UZ(0,"img",30)}function wt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"td",23)(2,"div",24),t.YNc(3,Mt,2,1,"ng-container",6),t.YNc(4,Ot,1,0,"ng-template",null,25,t.W1O),t.qZA()(),t.TgZ(6,"td",26)(7,"h4",27)(8,"span",28),t._uU(9),t.qZA()()(),t.BQk()),2&i){const n=t.MAs(5),o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==o||null==o.Name?null:o.Name.length)>50?null==o?null:o.Name:""),t.xp6(1),t.hij(" ",null==o?null:o.Name," ")}}function Zt(i,e){if(1&i&&(t.TgZ(0,"div")(1,"a",19),t._UZ(2,"img",31),t.qZA()()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH),t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Nt(i,e){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"img",31),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Ft(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,wt,10,6,"ng-container",16),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"span"),t._uU(6),t.qZA(),t.TgZ(7,"span",18)(8,"a",19),t._UZ(9,"i",20),t.qZA()()(),t.TgZ(10,"td",21)(11,"div",22),t.YNc(12,Zt,3,3,"div",17),t.qZA()(),t.TgZ(13,"td",21)(14,"div",22),t.YNc(15,Nt,2,2,"div",17),t.qZA()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(5);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(3),t.hij(" ",n.Code," "),t.xp6(2),t.Q6J("href","https://"+a.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),t.LSH),t.xp6(4),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function At(i,e){if(1&i&&(t.ynx(0),t.YNc(1,Ft,16,6,"tr",17),t.BQk()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function Ut(i,e){if(1&i&&(t.TgZ(0,"tbody"),t.YNc(1,At,2,1,"ng-container",17),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function Dt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"div",9)(2,"table",10)(3,"thead",11)(4,"tr")(5,"th",12),t._uU(6,"Product"),t.qZA(),t.TgZ(7,"th",13),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th",13),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",14),t._uU(12,"Available In"),t.qZA(),t.TgZ(13,"th",15),t._uU(14,"Not Available In"),t.qZA()()(),t.YNc(15,Ut,2,1,"tbody",16),t.ALo(16,"async"),t.qZA()(),t.BQk()),2&i){const n=t.oxw(2);t.xp6(15),t.Q6J("ngIf",t.lcZ(16,1,n.data$))}}function kt(i,e){1&i&&(t.TgZ(0,"div",32)(1,"div"),t._UZ(2,"i",33),t.qZA(),t.TgZ(3,"h4",34),t._uU(4,"No product found"),t.qZA(),t.TgZ(5,"h6",35),t._uU(6,"Once you have a product"),t.qZA(),t.TgZ(7,"h6",36),t._uU(8,"you`ll see them here"),t.qZA()())}function Jt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"span",44),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.getRowCount())}),t.TgZ(1,"i",45),t._uU(2,"?"),t.qZA()()}}function Lt(i,e){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Et(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",46),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onNextPage())}),t._UZ(1,"i",47),t._uU(2," Next"),t.qZA()}}function Qt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onLastPage())}),t._UZ(1,"i",49),t._uU(2," Last"),t.qZA()}}function Yt(i,e){if(1&i&&(t.TgZ(0,"div",37)(1,"div",38)(2,"div",39),t._uU(3),t.ALo(4,"number"),t.YNc(5,Jt,3,0,"span",40),t.YNc(6,Lt,3,3,"span",16),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",41),t.YNc(10,Et,3,0,"a",42),t.YNc(11,Qt,3,0,"a",43),t.qZA()()),2&i){const n=e.ngIf,o=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==n?null:n.length)," of "),t.xp6(2),t.Q6J("ngIf",o.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!o.paginationService.hideCount&&t.lcZ(7,8,o.rowCount$)),t.xp6(2),t.hij(" records ~ ",o.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage)}}function Rt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(a){t.CHM(n);const c=t.oxw();return t.KtG(c.searchProduct(a))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const c=t.CHM(n).ngIf,s=t.oxw();return t.KtG(s.openScanDialog(c))}),t._UZ(3,"i",3),t._uU(4," Scan Channel "),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,Dt,17,3,"ng-container",6),t.ALo(9,"async"),t.YNc(10,kt,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(12,Yt,12,10,"div",8),t.ALo(13,"async"),t.qZA()()()}if(2&i){const n=t.MAs(11),o=t.oxw();t.Q6J("hideSearchDropdown",!0),t.xp6(8),t.Q6J("ngIf",t.lcZ(9,4,o.data$).length>0)("ngIfElse",n),t.xp6(4),t.Q6J("ngIf",t.lcZ(13,6,o.data$))}}class G{constructor(e,n,o,a,c,s){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.paginationService=c,this.biggerPictureService=s,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,vt.b)(e=>{this.filterSearch=e.Filter,this.paginationService.resetToFirstPage(e.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,Tt.U)(e=>e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n))))}assignLogoChannel(e){return e.map(n=>(n.Img=r.g.getChannelLogoByTypeId(n.TypeID),n))}searchProduct(e){this.filterSearch.text=e,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(e){let n=this.productService.findChannelById(this.filterSearch.ChannelID,e.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(o=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(o,n,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(e){let n=JSON.parse(JSON.stringify(this.filterSearch));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:e.Options.Channel},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.filterSearch.ChannelID=a.ChannelID,this.filterSearch.ScanFull=a.ScanFull,this.filterSearch.UpdatedProduct=a.UpdatedProduct,this.filterSearch.Async=a.Async,this.scanAllProduct(e)})}getChannelLogoById(e){return r.g.getChannelLogoByTypeId(e)}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:e=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,e.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}}function Bt(i,e){if(1&i&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&i){const n=e.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}G.\u0275fac=function(e){return new(e||G)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(yt.b),t.Y36(It.k))},G.\u0275cmp=t.Xpm({type:G,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"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded",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,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["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"],[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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[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,n){1&e&&(t.YNc(0,Rt,14,8,"mainpanel",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,n.loader$))},dependencies:[p.sg,p.O5,L.p,N.gM,p.Ov,p.JJ],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%}"]});class H{constructor(e,n){this.data=e,this.dialogRef=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Y.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}H.\u0275fac=function(e){return new(e||H)(t.Y36(u.WI),t.Y36(u.so))},H.\u0275cmp=t.Xpm({type:H,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),t._uU(6,"Variant"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"SKU"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,Bt,5,2,"tr",4),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(10),t.Q6J("ngForOf",n.data.variants))},dependencies:[p.sg,R.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});var et=l(1948);function Vt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.openScanDialog())}),t._UZ(1,"i",15),t._uU(2," Scan Channel "),t.qZA()}}function qt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",17),t._uU(3),t.qZA(),t.BQk()}if(2&i){const n=t.oxw();let o;t.xp6(3),t.hij(" Download (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function $t(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const Kt=function(i){return[i]},Gt=function(){return[]};function Ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onCheckBoxChange",function(a){const s=t.CHM(n).index,an=t.oxw();return t.KtG(an.onSelectProduct(a,s))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onShowVariantDetail(c))})("onDownload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onDownloadProduct(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanChannel(c))}),t.qZA()()}if(2&i){const n=e.$implicit;t.xp6(1),t.Q6J("showRedirectIcon",!1)("title",null==n?null:n.Name)("image",null==n?null:n.Image)("imageForZoom",null==n?null:n.Image)("code",null==n?null:n.SKU)("description",(null==n||null==n.Variant?null:n.Variant.length)>0?(null==n||null==n.Variant?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=n&&n.Channel?t.VKq(10,Kt,null==n?null:n.Channel):t.DdM(12,Gt))("showCheckBox",!0)("scanButton",!0)}}function jt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",22)(2,"div"),t._UZ(3,"i",23),t.qZA(),t.TgZ(4,"h4",24),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",25),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",26),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function zt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",27)(1,"div",28)(2,"app-custom-paginator",29),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}class j{constructor(e,n,o,a,c){this.http=e,this.dialog=n,this.productService=o,this.toastrService=a,this.activateRouter=c,this.searchFilter=new x.k,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(e=>(e.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(n=>n.ID==e.ChannelID))),e)).map(e=>(e.Channel.Url=e.Url,e))}setSkuProduct(){this.products=this.products.map(e=>(e.SKU=0==e?.Variant?.length?r.g.IsNotEmpty(e?.ChannelItemSKU)?e?.ChannelItemSKU:"SKU not assigned":e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}onScanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{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(r.g.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=r.g.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;n="ALL"==e?this.products:this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(r.g.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(H,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}j.\u0275fac=function(e){return new(e||j)(t.Y36(D.O),t.Y36(u.uw),t.Y36(J.M),t.Y36(B._W),t.Y36(h.gz))},j.\u0275cmp=t.Xpm({type:j,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,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"actions"),t.YNc(2,Vt,3,0,"button",1),t.YNc(3,qt,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearChannelFilter()}),t.YNc(11,$t,3,2,"ng-template",6),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"SKU Assigned"),t.qZA(),t.TgZ(15,"mat-radio-group",7),t.NdJ("ngModelChange",function(a){return n.searchFilter.HaveSku=a}),t.TgZ(16,"mat-radio-button",8),t._uU(17," All "),t.qZA(),t.TgZ(18,"mat-radio-button",8),t._uU(19," Yes "),t.qZA(),t.TgZ(20,"mat-radio-button",8),t._uU(21," No "),t.qZA()()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Item ID"),t.qZA(),t.TgZ(25,"input",9),t.NdJ("ngModelChange",function(a){return n.searchFilter.Item_id=a}),t.qZA()()()()(),t.TgZ(26,"content")(27,"div",10)(28,"div",11),t.YNc(29,Ht,2,13,"div",12),t.YNc(30,jt,10,0,"ng-container",2),t.qZA(),t.YNc(31,zt,3,4,"div",13),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",n.searchFilter.HaveSku),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(5),t.Q6J("ngModel",n.searchFilter.Item_id),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[p.sg,p.O5,b.Fj,b.JJ,b.On,L.p,w.w9,w.ir,et.VQ,et.U0,V.y,X.Y],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}"]});var it=l(5631);function Wt(i,e){if(1&i&&(t.TgZ(0,"span",8),t._UZ(1,"img",9),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Xt(i,e){if(1&i&&(t.TgZ(0,"div",10),t._UZ(1,"app-duplicate-product-card",11),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function tn(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",12)(2,"div"),t._UZ(3,"i",13),t.qZA(),t.TgZ(4,"h4",14),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",15),t._uU(7,"Once you have a duplicate product"),t.qZA(),t.TgZ(8,"h6",16),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function nn(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",17)(2,"div",18)(3,"app-custom-paginator",19),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())})("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}class z{constructor(e,n){this.httpService=e,this.productService=n,this.searchFilter=new x.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.channelOptions=e.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ChannelID:this.searchFilter.ChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}}z.\u0275fac=function(e){return new(e||z)(t.Y36(D.O),t.Y36(J.M))},z.\u0275cmp=t.Xpm({type:z,selectors:[["app-duplicate-sku"]],decls:14,vars:6,consts:[["headerTitle","Multiple Listed SKU","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,"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","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearFilter()}),t.YNc(7,Wt,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,Xt,2,5,"div",6),t.YNc(12,tn,10,0,"ng-container",7),t.qZA(),t.YNc(13,nn,4,4,"ng-container",7),t.qZA()()()),2&e&&(t.xp6(6),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==(null==n.products?null:n.products.length)),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[p.sg,p.O5,b.JJ,b.On,L.p,w.w9,w.ir,it._,V.y]});var en=l(8739);const on=[{component:f,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:q,canActivate:[K.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:$,canActivate:[K.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:G,canActivate:[K.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:j,canActivate:[K.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:z,canActivate:[K.a],data:{title:"Duplicate Sku in Channel"}}]}];class E{}E.\u0275fac=function(e){return new(e||E)},E.\u0275mod=t.oAB({type:E}),E.\u0275inj=t.cJS({imports:[p.ez,b.u5,L.R,N.AV,w.A0,en.TU,et.Fk,T.Z,it._,V.y,X.Y,h.Bz.forChild(on)]})},9425:(ot,Z,l)=>{l.d(Z,{b:()=>y});var p=l(1135),t=l(7579),T=l(2722),h=l(9300),Q=l(4351),f=l(4004),x=l(4482),_=l(5403),u=l(8421),r=l(4671),g=l(5032),S=l(3269),N=l(5026),R=l(8505),tt=l(4782),W=l(4650),nt=l(1318);class y{constructor(d){this.http=d,this.pagination$=new p.X(null),this.destroy$=new t.x,this.data$=this.paginationFunction()}onNextPage(d){d.PageNumber+=1,this.pagination$.next(d)}setPageNumberFooter(d){this.footerPageNumber=d.PageNumber}setPaginationButtonState(d,C){this.disableNextButton=0==C||!(C<d.RowCount*d.PageNumber)}resetToFirstPage(d){d.PageNumber=1,this.pagination$.next(d),this.hideCount=!0,this.goToLastPage=!1}getAllData(d,C){d.RowCount=C,this.pagination$.next(d),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new p.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,T.R)(this.destroy$),(0,h.h)(d=>null!=d),(0,Q.b)(d=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(d)).pipe((0,f.U)(C=>C.Data))),function Y(...I){const d=(0,S.jO)(I);return(0,x.e)((C,P)=>{const m=I.length,O=new Array(m);let F=I.map(()=>!1),A=!1;for(let v=0;v<m;v++)(0,u.Xf)(I[v]).subscribe((0,_.x)(P,U=>{O[v]=U,!A&&!F[v]&&(F[v]=!0,(A=F.every(r.y))&&(F=null))},g.Z));C.subscribe((0,_.x)(P,v=>{if(A){const U=[v,...O];P.next(d?d(...U):U)}}))})}(this.pagination$),(0,N.R)((d,C)=>{const[P,m]=d,[O]=C;return 1==m.PageNumber?[O,m]:[P.concat(O),m]}),(0,R.b)(([d,C])=>{this.setPageNumberFooter(C),this.setPaginationButtonState(C,d.length)}),(0,f.U)(([d])=>d),(0,tt.d)())}}y.\u0275fac=function(d){return new(d||y)(W.LFG(nt.O))},y.\u0275prov=W.Yz7({token:y,factory:y.\u0275fac,providedIn:"root"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[877],{5877:(re,N,s)=>{s.r(N),s.d(N,{LogsModule:()=>C});var r=s(6895),e=s(4650),d=s(284),S=s(7398);class f{constructor(){this.ObjectlogTabs=[{Title:"Sync Orders",Url:"/menu/log/order"},{Title:"Inventory Log ",Url:"/menu/log/inventory"},{Title:"Marketplace Webhook ",Url:"/menu/log/rawlog"},{Title:"Application Exception ",Url:"/menu/log/exception"},{Title:"Order Logs ",Url:"/menu/log/order-log"}]}ngOnInit(){}}f.\u0275fac=function(n){return new(n||f)},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,t){1&n&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&n&&(e.xp6(3),e.Q6J("Tabs",t.ObjectlogTabs))},dependencies:[d.lC,S.e]});var u=s(8063),c=s(1318);class p{constructor(){}get Data(){return this._Data}set Data(n){this._Data=n}Fill(n){return this._Data.find(t=>t._id==n)}}p.\u0275fac=function(n){return new(n||p)},p.\u0275prov=e.Yz7({token:p,factory:p.\u0275fac,providedIn:"root"});var l=s(4006),g=s(7481),_=s(8739),Z=s(8796),v=s(5585);const I=function(){return["/menu/log/order/detail"]},w=function(i){return{ID:i}},R=function(i,n){return{"bg-warning":i,"bg-success":n}};function D(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td")(2,"a",17),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td")(12,"span",18),e._uU(13),e.qZA()()()),2&i){const t=n.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(11,I))("queryParams",e.VKq(12,w,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,8,t.Created,"dd MMM yyyy HH:mm:ss")," "),e.xp6(3),e.Oqu(t.MarketTypeString),e.xp6(2),e.Oqu(t.POSActionTypeString),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Q6J("ngClass",e.WLB(14,R,200!==t.ResponseCode,200===t.ResponseCode)),e.xp6(1),e.Oqu(t.ResponseCode)}}class b{constructor(n,t,o){this.http=n,this._RawLogService=t,this.route=o,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""}}ngOnInit(){this.route.queryParams.subscribe(n=>{this.responseCode=n.responseCode,null!=this.responseCode?this.Load(n):this.Load()})}Load(n={}){this.http.post("/api/OrdersLoader/Get",n).subscribe(t=>{this.filter=t.Filter,this.Channel=t.Options.Channel,this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(n){this.filter.Number=n,this.http.post("/api/Orders/Get",this.filter).subscribe(t=>{this._RawLogService.Data=t.hits,this.Result=Array();for(let o of t.hits)this.Result.push({ID:o._id,Created:o._source["@timestamp_received"],shopId:o._source.shopId,MarketTypeString:o._source.log.type,POSActionTypeString:o._source.message,Number:o._source.log.number,ResponseCode:o._source.log.responseCode});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}}b.\u0275fac=function(n){return new(n||b)(e.Y36(c.O),e.Y36(p),e.Y36(d.gz))},b.\u0275cmp=e.Xpm({type:b,selectors:[["app-order"]],decls:49,vars:17,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","name","StatusCode",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[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-1","rounded","response-desc",3,"ngClass"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return t.Number=a})("onSubmit",function(a){return t.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Action"),e.qZA(),e.TgZ(10,"ng-select",3),e.NdJ("ngModelChange",function(a){return t.filter.ActionType=a}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"From/To"),e.qZA(),e.TgZ(14,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(15,"datepicker",5),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Response Code"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.StatusCode=a}),e.qZA()(),e.TgZ(20,"div")(21,"h6"),e._uU(22,"Page Number"),e.qZA(),e.TgZ(23,"input",7),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(24,"div")(25,"h6"),e._uU(26,"Page Size"),e.qZA(),e.TgZ(27,"input",8),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(28,"content")(29,"div",9)(30,"div",10)(31,"div",11)(32,"div",12)(33,"table",13)(34,"thead")(35,"tr",14)(36,"th"),e._uU(37,"Date"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Channel"),e.qZA(),e.TgZ(40,"th"),e._uU(41,"Actions"),e.qZA(),e.TgZ(42,"th"),e._uU(43,"Number"),e.qZA(),e.TgZ(44,"th"),e._uU(45,"Code"),e.qZA()()(),e.TgZ(46,"tbody"),e.YNc(47,D,14,17,"tr",15),e.qZA()(),e.TgZ(48,"mat-paginator",16),e.NdJ("page",function(a){return t.changePage(a)}),e.qZA()()()()()()()),2&n&&(e.Q6J("headerTitle","Order Log")("text",t.Number),e.xp6(6),e.Q6J("clearable",!0)("items",t.Channel)("ngModel",t.filter.ChannelID),e.xp6(4),e.Q6J("clearable",!0)("items",t.ActionTypeList)("ngModel",t.filter.ActionType),e.xp6(4),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.StatusCode),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1))},dependencies:[r.mk,r.sg,l.Fj,l.wV,l.JJ,l.On,d.rH,g.p,_.NW,Z.w9,v.Q,r.uU]});const x=function(){return["/menu/log/inventory/detail"]},J=function(i){return{ID:i}};function P(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td")(2,"a",15),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()()),2&i){const t=n.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(10,x))("queryParams",e.VKq(11,J,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,7,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.channelName),e.xp6(2),e.Oqu(t.Sku),e.xp6(2),e.Oqu(t.Stock),e.xp6(2),e.Oqu(t.ResponseCode)}}class y{constructor(n,t){this.http=n,this._RawLogService=t,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load()}ngOnInit(){}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(n){null!=n&&(this.filter.Sku=n),this.http.post("api/Inventory/GetLog",this.filter).subscribe(t=>{this._RawLogService.Data=t.hits,this.Result=Array();for(let o of t.hits)this.Result.push({ID:o._source.log.id,Created:o._source["@timestamp_received"],channelName:o._source.log.channelName,Sku:o._source.log.sku,Stock:o._source.log.stock,ResponseCode:o._source.log.responseCode});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount,this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}}y.\u0275fac=function(n){return new(n||y)(e.Y36(c.O),e.Y36(p))},y.\u0275cmp=e.Xpm({type:y,selectors:[["app-inventory-log"]],decls:41,vars:13,consts:[["searchBoxPlaceHolder","Enter SKU...",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt=3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return t.filter.Sku=a})("onSubmit",function(a){return t.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content")(21,"div",7)(22,"div",8)(23,"div",9)(24,"div",10)(25,"table",11)(26,"thead")(27,"tr",12)(28,"th"),e._uU(29,"Created"),e.qZA(),e.TgZ(30,"th"),e._uU(31,"Channel"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"SKU"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Stock"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Response code"),e.qZA()()(),e.TgZ(38,"tbody"),e.YNc(39,P,13,13,"tr",13),e.qZA()(),e.TgZ(40,"mat-paginator",14),e.NdJ("page",function(a){return t.changePage(a)}),e.qZA()()()()()()()),2&n&&(e.Q6J("headerTitle","Inventory Log")("text",t.filter.Sku),e.xp6(6),e.Q6J("clearable",!0)("items",t.Channel)("ngModel",t.filter.ChannelID),e.xp6(4),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1))},dependencies:[r.sg,l.Fj,l.wV,l.JJ,l.On,d.rH,g.p,_.NW,Z.w9,v.Q,r.uU]});const k=function(){return["/menu/log/order/detail"]},F=function(i){return{ID:i}};function Q(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td")(2,"a",16),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&i){const t=n.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(9,k))("queryParams",e.VKq(10,F,t.id)),e.xp6(1),e.hij(" ",e.xi3(4,6,t.Created,"dd MMM yyyy HH:mm:ss")," "),e.xp6(3),e.Oqu(t.type),e.xp6(2),e.Oqu(t.number),e.xp6(2),e.Oqu(t.message)}}function z(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"div",8)(1,"div",9)(2,"div",10)(3,"table",11)(4,"thead",12)(5,"tr")(6,"th",13),e._uU(7,"Date"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Type"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Number"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Message"),e.qZA()()(),e.TgZ(14,"tbody"),e.YNc(15,Q,11,12,"tr",14),e.qZA()(),e.TgZ(16,"mat-paginator",15),e.NdJ("page",function(a){e.CHM(t);const h=e.oxw();return e.KtG(h.changePage(a))}),e.qZA()()()()}if(2&i){const t=e.oxw();e.xp6(15),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}class A{constructor(n,t){this.http=n,this._RawLogService=t,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}]}ngOnInit(){this.Load()}Load(n={}){this.http.post("/api/OrdersLoader/Get",n).subscribe(t=>{this.filter=t.Filter,this.Channel=t.Options.Channel,this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(n){this.filter.Number=n,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(t=>{this._RawLogService.Data=t.hits,this.Result=Array();for(let o of t.hits)this.Result.push({id:o._id,message:o._source.message,responseCode:o._source.log.responseCode,processTypeString:o._source.log.processType,type:o._source.log.type,number:o._source.log.number,Created:o._source["@timestamp_received"]});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}}A.\u0275fac=function(n){return new(n||A)(e.Y36(c.O),e.Y36(p))},A.\u0275cmp=e.Xpm({type:A,selectors:[["app-raw-log"]],decls:22,vars:10,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return t.filter.Number=a})("onSubmit",function(a){return t.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content"),e.YNc(21,z,17,4,"div",7),e.qZA()()),2&n&&(e.Q6J("headerTitle","Marketplace Webhook")("text",t.filter.Number),e.xp6(6),e.Q6J("clearable",!0)("items",t.Channel)("ngModel",t.filter.ChannelID),e.xp6(4),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(2),e.Q6J("ngIf",t.Result.length>0))},dependencies:[r.sg,r.O5,l.Fj,l.wV,l.JJ,l.On,d.rH,g.p,_.NW,Z.w9,v.Q,r.uU]});class Y{constructor(n,t){this._document=t;const o=this._textarea=this._document.createElement("textarea"),a=o.style;a.position="fixed",a.top=a.opacity="0",a.left="-999em",o.setAttribute("aria-hidden","true"),o.value=n,o.readOnly=!0,this._document.body.appendChild(o)}copy(){const n=this._textarea;let t=!1;try{if(n){const o=this._document.activeElement;n.select(),n.setSelectionRange(0,n.value.length),t=this._document.execCommand("copy"),o&&o.focus()}}catch{}return t}destroy(){const n=this._textarea;n&&(n.remove(),this._textarea=void 0)}}let G=(()=>{class i{constructor(t){this._document=t}copy(t){const o=this.beginCopy(t),a=o.copy();return o.destroy(),a}beginCopy(t){return new Y(t,this._document)}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(r.K0))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const H=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let B=(()=>{class i{constructor(t,o,a){this._clipboard=t,this._ngZone=o,this.text="",this.attempts=1,this.copied=new e.vpe,this._pending=new Set,a&&null!=a.attempts&&(this.attempts=a.attempts)}copy(t=this.attempts){if(t>1){let o=t;const a=this._clipboard.beginCopy(this.text);this._pending.add(a);const h=()=>{const m=a.copy();m||!--o||this._destroyed?(this._currentTimeout=null,this._pending.delete(a),a.destroy(),this.copied.emit(m)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(h,1))};h()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(t=>t.destroy()),this._pending.clear(),this._destroyed=!0}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(G),e.Y36(e.R0b),e.Y36(H,8))},i.\u0275dir=e.lG2({type:i,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(t,o){1&t&&e.NdJ("click",function(){return o.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),i})(),E=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({}),i})();function j(i,n){1&i&&e._UZ(0,"img",21)}function K(i,n){1&i&&e._UZ(0,"img",22)}function V(i,n){if(1&i&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",10)(16,"div",9)(17,"label"),e._uU(18,"Market Place Type"),e.qZA(),e.YNc(19,j,1,0,"img",11),e.YNc(20,K,1,0,"img",12),e.TgZ(21,"a",13)(22,"span",14),e._uU(23),e.qZA(),e._UZ(24,"br"),e.TgZ(25,"small",15),e._uU(26),e.qZA()()()(),e.TgZ(27,"div",10)(28,"div",9)(29,"label"),e._uU(30,"Number"),e.qZA(),e.TgZ(31,"div")(32,"span"),e._uU(33),e.qZA()()()(),e.TgZ(34,"div",8)(35,"div",9)(36,"label"),e._uU(37,"Process Type"),e.qZA(),e.TgZ(38,"div")(39,"span"),e._uU(40),e.qZA()()()(),e.TgZ(41,"div",4)(42,"div",9)(43,"label"),e._uU(44,"Authorization Header"),e.qZA(),e.TgZ(45,"div")(46,"span"),e._uU(47),e.qZA()()()(),e.TgZ(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),e._uU(53,"Request"),e.qZA()(),e.TgZ(54,"div",19)(55,"button",20),e._uU(56,"Copy to clipboard"),e.qZA()()(),e.TgZ(57,"div",7),e._uU(58),e.qZA()()()()()()()),2&i){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,11,t.data.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(6),e.Q6J("ngIf",1==t.data.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.data.TypeID),e.xp6(1),e.s9C("href",t.data.ShopLink,e.LSH),e.xp6(2),e.Oqu(t.data.ShopName),e.xp6(3),e.Oqu(t.data.ShopLink),e.xp6(7),e.Oqu(t.data._source.log.number),e.xp6(7),e.Oqu(t.data._source.log.processType),e.xp6(7),e.Oqu(t.data._source.log.authorizationHeader),e.xp6(8),e.Q6J("cdkCopyToClipboard",t.data._source.log.request),e.xp6(3),e.hij(" ",t.data._source.log.request," ")}}class q{constructor(n,t,o){this.route=n,this.http=t,this._RawLogService=o,this.route.queryParams.subscribe(a=>{let h=JSON.parse(localStorage.getItem("channel"));if(this.ID=a.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],h.length>0){const m=h.find(ie=>ie.ShopID==this.data._source.shopId);m?(this.data.TypeID=m.TypeID,this.data.ShopName=m.Name,this.data.ShopLink=m.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}}function X(i,n){if(1&i&&(e.TgZ(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",6)(16,"div",12)(17,"label"),e._uU(18,"SKU"),e.qZA(),e.TgZ(19,"div")(20,"span"),e._uU(21),e.qZA()()()(),e.TgZ(22,"div",6)(23,"div",12)(24,"label"),e._uU(25,"Channel"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",6)(30,"div",12)(31,"label"),e._uU(32,"Response Code"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()()()()()()),2&i){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,4,t.data.Created,"dd MMM yyyy")),e.xp6(8),e.Oqu(t.data.Sku),e.xp6(7),e.Oqu(t.data.ChannelName),e.xp6(7),e.Oqu(t.data.ResponseCode)}}q.\u0275fac=function(n){return new(n||q)(e.Y36(d.gz),e.Y36(c.O),e.Y36(p))},q.\u0275cmp=e.Xpm({type:q,selectors:[["app-raw-detail"]],decls:5,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-2"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-2"],[1,"info-label-group"],[1,"col-sm-4"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["target","_blank",3,"href"],[1,"fw-bold"],[1,"text-dark"],[1,"col-sm-12","mt-2"],[1,"card-header","d-lg-flex"],[1,"me-auto"],[1,"d-sm-block","mt-2"],[3,"cdkCopyToClipboard"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",1,"me-2"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",1,"me-2"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),e.YNc(4,V,59,14,"div",3),e.qZA()()()()),2&n&&(e.Q6J("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("ngIf",t.data))},dependencies:[r.O5,g.p,B,r.uU]});class O{constructor(n,t,o){this.route=n,this.http=t,this._RawLogService=o,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(a=>{this.ID=a.ID,this.Load()})}ngOnInit(){}Load(){this.http.post("/api/Inventory/GetInventoryLogDeatil",{ID:this.ID}).subscribe(t=>{this.data.Created=t.hits[0]._source["@timestamp_received"],this.data.Sku=t.hits[0]._source.log.sku,this.data.ChannelName=t.hits[0]._source.log.channelName,this.data.ResponseCode=t.hits[0]._source.log.responseCode,this.request=JSON.parse(t.hits[0]._source.log.request),this.response=t.hits[0]._source.log.response})}}function W(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"a",15),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.Retry())}),e._uU(1,"Retry"),e.qZA()}}O.\u0275fac=function(n){return new(n||O)(e.Y36(d.gz),e.Y36(c.O),e.Y36(p))},O.\u0275cmp=e.Xpm({type:O,selectors:[["app-inventory-detail"]],decls:30,vars:9,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3),e.YNc(7,X,36,7,"div",4),e.qZA(),e.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),e._uU(13,"Request"),e.qZA()(),e.TgZ(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),e._uU(18),e.ALo(19,"json"),e.qZA()()()()()(),e.TgZ(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),e._uU(24,"Response"),e.qZA()(),e.TgZ(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),e._uU(29),e.qZA()()()()()()()()()()),2&n&&(e.Q6J("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(7),e.Q6J("ngIf",t.data),e.xp6(11),e.Oqu(e.lcZ(19,7,t.request)),e.xp6(11),e.Oqu(t.response))},dependencies:[r.O5,d.rH,g.p,r.Ts,r.uU]});class L{constructor(n,t){this.route=n,this.http=t,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(o=>{this.ID=o.ID,this.Load()})}ngOnInit(){}Retry(){this.http.post("/api/Orders/Retry",{Number:this.Number,ShopID:this.shopId}).subscribe(t=>{alert(JSON.stringify(t))})}Load(){this.http.post("/api/Orders/GetDetail",{ID:this.ID}).subscribe(t=>{for(let o of t.hits)this.Number=o._source.log.number,this.MarketTypeString=o._source.log.type,this.ResponseCode=o._source.log.responseCode,this.POSActionTypeString=o._source.message,this.ProcessDuration=0,this.Created=o._source["@timestamp_received"],this.request=JSON.parse(o._source.log.request),this.response=JSON.parse(o._source.log.response),this.shopId=o._source.shopId})}}function $(i,n){1&i&&e._UZ(0,"img",12)}function ee(i,n){1&i&&e._UZ(0,"img",13)}function te(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e.YNc(2,$,1,0,"img",9),e.YNc(3,ee,1,0,"img",10),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"div",11),e._uU(10),e.qZA(),e.TgZ(11,"div"),e._uU(12),e.qZA()()()),2&i){const t=n.$implicit;e.xp6(2),e.Q6J("ngIf",1==t.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.TypeID),e.xp6(2),e.Oqu(t.Date),e.xp6(2),e.Oqu(t.Number),e.xp6(3),e.Oqu(t.message),e.xp6(2),e.Oqu(t.stackTrace)}}L.\u0275fac=function(n){return new(n||L)(e.Y36(d.gz),e.Y36(c.O))},L.\u0275cmp=e.Xpm({type:L,selectors:[["app-orderdetail"]],decls:82,vars:20,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),e._uU(11,"General"),e.qZA()(),e.TgZ(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),e._uU(17,"Date"),e.qZA(),e.TgZ(18,"div")(19,"span"),e._uU(20),e.ALo(21,"date"),e.qZA()()()(),e.TgZ(22,"div",9)(23,"div",10)(24,"label"),e._uU(25,"Number"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",9)(30,"div",10)(31,"label"),e._uU(32,"Type"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()(),e.TgZ(36,"div",9)(37,"div",10)(38,"label"),e._uU(39,"Response Code"),e.qZA(),e.TgZ(40,"div")(41,"span"),e._uU(42),e.qZA()()()(),e.TgZ(43,"div",9)(44,"div",10)(45,"label"),e._uU(46,"ShopID"),e.qZA(),e.TgZ(47,"div")(48,"span"),e._uU(49),e.qZA()()()(),e.TgZ(50,"div",9)(51,"div",10)(52,"label"),e._uU(53,"Action"),e.qZA(),e.TgZ(54,"div")(55,"span"),e._uU(56),e.qZA()()()()()()()()(),e.TgZ(57,"div",11)(58,"div",9)(59,"div",5)(60,"div",6)(61,"h5"),e._uU(62,"Request"),e.qZA()(),e.TgZ(63,"div",7)(64,"div",4)(65,"div",12)(66,"pre"),e._uU(67),e.ALo(68,"json"),e.qZA()()(),e.TgZ(69,"actions",13),e.YNc(70,W,2,0,"a",14),e.qZA()()()(),e.TgZ(71,"div",9)(72,"div",5)(73,"div",6)(74,"h5"),e._uU(75,"Response"),e.qZA()(),e.TgZ(76,"div",7)(77,"div",4)(78,"div",12)(79,"pre"),e._uU(80),e.ALo(81,"json"),e.qZA()()()()()()()()()()),2&n&&(e.Q6J("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Oqu(e.xi3(21,13,t.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(t.Number),e.xp6(7),e.Oqu(t.MarketTypeString),e.xp6(7),e.Oqu(t.ResponseCode),e.xp6(7),e.Oqu(t.shopId),e.xp6(7),e.Oqu(t.POSActionTypeString),e.xp6(11),e.Oqu(e.lcZ(68,16,t.request)),e.xp6(3),e.Q6J("ngIf","200"!=t.ResponseCode&&"201"!=t.ResponseCode),e.xp6(10),e.Oqu(e.lcZ(81,18,t.response)))},dependencies:[r.O5,d.rH,g.p,r.Ts,r.uU]});class U{constructor(n){this.http=n,this.Result=Array(),this.filter={RowCount:50,PageNumber:1},this.Load()}ngOnInit(){}Load(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(n=>{this.Result=Array();for(let t of n.hits)this.Result.push({TypeID:"Shopee"==t._source.error.type?0:1,Number:t._source.error.number,Date:t._source["@timestamp_received"],stackTrace:t._source.error.stackTrace,message:t._source.message});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Load()}}U.\u0275fac=function(n){return new(n||U)(e.Y36(c.O))},U.\u0275cmp=e.Xpm({type:U,selectors:[["app-exception-log"]],decls:21,vars:5,consts:[["searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true",3,"headerTitle"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],[1,"fw-bold"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e._UZ(1,"filters"),e.TgZ(2,"content")(3,"div",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead")(9,"tr",6)(10,"th"),e._uU(11,"Channel"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Date"),e.qZA(),e.TgZ(14,"th"),e._uU(15,"Number"),e.qZA(),e.TgZ(16,"th"),e._uU(17,"Exception"),e.qZA()()(),e.TgZ(18,"tbody"),e.YNc(19,te,13,6,"tr",7),e.qZA()(),e.TgZ(20,"mat-paginator",8),e.NdJ("page",function(a){return t.changePage(a)}),e.qZA()()()()()()()),2&n&&(e.Q6J("headerTitle","Exception Log"),e.xp6(19),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1))},dependencies:[r.sg,r.O5,g.p,_.NW]});var ne=s(3154);function oe(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._UZ(4,"img",15),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.ALo(7,"date"),e.ALo(8,"date"),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.ALo(15,"date"),e.qZA()()),2&i){const t=n.$implicit,o=e.oxw();e.xp6(2),e.Oqu(t.ChannelName),e.xp6(2),e.Q6J("src",o.getChannelLogo(t.TypeID),e.LSH),e.xp6(2),e.AsE("",e.xi3(7,7,t.Daterange_from,"dd MMM yyyy")," - ",e.xi3(8,10,t.Daterange_to,"dd MMM yyyy"),""),e.xp6(4),e.Oqu(t.ResponseCountOrder),e.xp6(2),e.Oqu(t.UserLogin),e.xp6(2),e.hij("",e.xi3(15,13,t.Created,"dd MMM yyyy")," ")}}class M{constructor(n){this.http=n,this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load()}ngOnInit(){}Load(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.Get()})}Get(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(n=>{this.Result=n.Data,this.paginationTotal=n.Total,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}getChannelLogo(n){return ne.g.getChannelLogoByTypeId(n)}}M.\u0275fac=function(n){return new(n||M)(e.Y36(c.O))},M.\u0275cmp=e.Xpm({type:M,selectors:[["app-manual-order-log"]],decls:43,vars:13,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter SKU...",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[1,"img-logo",3,"src"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return t.filter.Sku=a})("onSubmit",function(){return t.Get()}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content")(21,"div",7)(22,"div",8)(23,"div",9)(24,"div",10)(25,"table",11)(26,"thead")(27,"tr",12)(28,"th"),e._uU(29,"Channel"),e.qZA(),e.TgZ(30,"th"),e._uU(31,"Type"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"Download Date Range"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Count Order"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"User Login"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Created"),e.qZA()()(),e.TgZ(40,"tbody"),e.YNc(41,oe,16,16,"tr",13),e.qZA()(),e.TgZ(42,"mat-paginator",14),e.NdJ("page",function(a){return t.changePage(a)}),e.qZA()()()()()()()),2&n&&(e.Q6J("headerTitle","Order Log")("text",t.filter.Sku),e.xp6(6),e.Q6J("clearable",!0)("items",t.Channel)("ngModel",t.filter.ChannelID),e.xp6(4),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(22),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1))},dependencies:[r.sg,l.Fj,l.wV,l.JJ,l.On,g.p,_.NW,Z.w9,v.Q,r.uU]});const ae=[{path:"",component:f,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:b,canActivate:[u.a],data:{title:"Orders Log"}},{path:"inventory",component:y,canActivate:[u.a],data:{title:"Inventory Log"}},{path:"rawlog",component:A,canActivate:[u.a],data:{title:"Raw Log"}},{path:"rawlog/detail",component:q,canActivate:[u.a],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:O,canActivate:[u.a],data:{title:"Inventory Details"}},{path:"order/detail",component:L,canActivate:[u.a],data:{title:"Order Details"}},{path:"exception",component:U,canActivate:[u.a],data:{title:"Exception Log"}},{path:"order-log",component:M,canActivate:[u.a],data:{title:"order Log"}}]}];class T{}T.\u0275fac=function(n){return new(n||T)},T.\u0275mod=e.oAB({type:T}),T.\u0275inj=e.cJS({imports:[r.ez,d.Bz.forChild(ae)]});class C{}C.\u0275fac=function(n){return new(n||C)},C.\u0275mod=e.oAB({type:C}),C.\u0275inj=e.cJS({imports:[r.ez,l.u5,l.UX,T,d.Bz,g.R,E,_.TU,Z.A0,S.Z,v.Q]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[993],{7993:($,S,a)=>{a.r(S),a.d(S,{OrderModule:()=>f});var l=a(6895),e=a(4650),O=a(7398),F=a(284);const A=function(){return["/menu/report/product-statistic/channel"]};class u{constructor(){this.reportTabs=[{Title:"1 - New Order",Url:"/menu/report/order/sync-order"},{Title:"2 - Ready to Ship",Url:"/menu/report/order/invoice"},{Title:"3 - Shipped",Url:"/menu/report/order/delivery"},{Title:"4 - Completed",Url:"/menu/report/order/payment"},{Title:"All",Url:"/menu/report/order/all"}]}}u.\u0275fac=function(t){return new(t||u)},u.\u0275cmp=e.Xpm({type:u,selectors:[["app-order"]],decls:18,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"],[1,"dropdown","dropstart","me-4"],["role","button","data-bs-toggle","dropdown","id","dropdownMenuButton1","aria-expanded","false",1,"text-dark"],[1,"fas","fa-bars","fa-lg"],["aria-labelledby","dropdownMenuButton1",1,"dropdown-menu","report"],[1,"dropdown-header","text-dark","fw-normal",2,"font-size",".875rem !important"],[1,"dropdown-divider"],[1,"dropdown-item",3,"routerLink"],[1,"fa-regular","fa-file","me-2"]],template:function(t,r){1&t&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA(),e.TgZ(4,"div",3)(5,"a",4),e._UZ(6,"i",5),e.qZA(),e.TgZ(7,"ul",6)(8,"li")(9,"h5",7),e._uU(10,"Product Report"),e.qZA()(),e.TgZ(11,"li"),e._UZ(12,"hr",8),e.qZA(),e.TgZ(13,"li")(14,"a",9),e._UZ(15,"i",10),e._uU(16,"Product Statistic"),e.qZA()()()()()(),e._UZ(17,"router-outlet")),2&t&&(e.xp6(3),e.Q6J("Tabs",r.reportTabs),e.xp6(11),e.Q6J("routerLink",e.DdM(2,A)))},dependencies:[O.e,F.lC,F.rH],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});var s=a(3154);class g{}var P=a(1318);class d{constructor(t){this.http=t}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(t){return new Promise((r,i)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(t)).subscribe(o=>{r(o)})})}GetSyncInvoice(t){return new Promise((r,i)=>{this.http.post("/api/Report/Invoice",JSON.stringify(t)).subscribe(o=>{r(o)})})}GetSyncDelivery(t){return new Promise((r,i)=>{this.http.post("/api/Report/Delivery",JSON.stringify(t)).subscribe(o=>{r(o)})})}GetSyncPayment(t){return new Promise((r,i)=>{this.http.post("/api/Report/Payment",JSON.stringify(t)).subscribe(o=>{r(o)})})}getAllReport(t){return this.http.post("/api/Report/all",JSON.stringify(t))}}d.\u0275fac=function(t){return new(t||d)(e.LFG(P.O))},d.\u0275prov=e.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"});var h=a(7481),m=a(5585),p=(()=>{return(n=p||(p={}))[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",p;var n})();function b(n,t){if(1&n&&(e.TgZ(0,"th",9)(1,"div",10)(2,"h4"),e._uU(3),e.qZA(),e.TgZ(4,"small",11),e._uU(5),e.qZA()()()),2&n){const r=t.$implicit,i=e.oxw();e.xp6(3),e.Oqu(r),e.xp6(1),e.Tol(i.getTextBgColor(r)),e.xp6(1),e.Oqu(i.getHeaderStatusDesc(r))}}const D=function(){return["/menu/log/order"]},x=function(n,t,r,i,o){return{responseCode:n,From:t,to:r,actionType:i,ChannelID:o}};function w(n,t){if(1&n&&(e.TgZ(0,"td",14)(1,"a",15),e._uU(2),e.qZA()()),2&n){const r=t.$implicit,i=e.oxw().$implicit,o=e.oxw();e.xp6(1),e.Q6J("routerLink",e.DdM(3,D))("queryParams",e.qbA(4,x,r.Key,o.fromQueryParam,o.toQueryParam,o.type,i.ChannelID)),e.xp6(1),e.hij(" ",r.Value," ")}}function J(n,t){if(1&n&&(e.TgZ(0,"tr")(1,"td")(2,"a",12),e._UZ(3,"img",13),e.qZA()(),e.TgZ(4,"td")(5,"div")(6,"a",12),e._uU(7),e.qZA()(),e.TgZ(8,"div"),e._uU(9),e.qZA()(),e.YNc(10,w,3,10,"td",8),e.qZA()),2&n){const r=t.$implicit,i=e.oxw();e.xp6(2),e.s9C("href",r.Url,e.LSH),e.xp6(1),e.Q6J("src",i.getChannelLogo(r.Type),e.LSH),e.xp6(3),e.s9C("href",r.Url,e.LSH),e.xp6(1),e.Oqu(r.Name),e.xp6(2),e.Oqu(r.Url),e.xp6(1),e.Q6J("ngForOf",r.list)}}function N(n,t){if(1&n&&(e.TgZ(0,"td",14)(1,"div",16),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const r=t.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,r.total))}}class c{constructor(){this.headerStatus=p,this.listCalculationStatusCode=[]}set from(t){t&&(this.fromQueryParam=new Date(t).toJSON().toString())}set to(t){t&&(this.toQueryParam=new Date(t).toJSON().toString())}ngOnChanges(t){t.result&&this.calculateStatusCode()}getHeaderStatusDesc(t){let r=null;switch(t){case p.BAD_REQUEST:r="BAD REQUEST";break;case p.CONFLICT:r="CONFLICT";break;case p.INTERNAL_SERVER_ERROR:r="INTERNAL SERVER ERROR";break;case p.NOT_FOUND:r="NOT FOUND";break;default:r="OK"}return r}getTextBgColor(t){let r=null;switch(t){case p.OK:r="bg-success";break;case p.INTERNAL_SERVER_ERROR:r="bg-danger";break;default:r="bg-warning"}return r}getChannelLogo(t){return s.g.getChannelLogoByTypeId(t)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let t,r;this.concatStatusCode().forEach(i=>{t=this.listCalculationStatusCode.findIndex(o=>o.status==i.Key),r=-1!==t,r?this.listCalculationStatusCode[t].total+=i.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:i.Key,total:i.Value}]})}}concatStatusCode(){return this.result.map(t=>t.list).reduce((t,r)=>[...t,...r])}}function R(n,t){if(1&n&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&n){const r=e.oxw();e.xp6(2),e.Q6J("result",r.result)("header",r.header)("from",r.filter.From)("to",r.filter.To)("type",0)}}c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=e.Xpm({type:c,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[e.TTD],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(t,r){1&t&&(e.TgZ(0,"table",0)(1,"thead",1)(2,"tr"),e._UZ(3,"th",2),e.TgZ(4,"th",3),e._uU(5,"Channel"),e.qZA(),e.YNc(6,b,6,4,"th",4),e.qZA()(),e.TgZ(7,"tbody"),e.YNc(8,J,11,6,"tr",5),e.qZA(),e.TgZ(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),e._uU(13,"Total"),e.qZA()(),e.YNc(14,N,4,3,"td",8),e.qZA()()()),2&t&&(e.xp6(6),e.Q6J("ngForOf",r.header),e.xp6(2),e.Q6J("ngForOf",r.result),e.xp6(6),e.Q6J("ngForOf",r.listCalculationStatusCode))},dependencies:[l.sg,F.rH,l.JJ],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});class T{constructor(t,r){this.http=t,this.datePipe=r,this.filter=new g,this.pageTitle="New Order";let i=new Date;this.maxDate=i,this.minDate=s.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=s.g.formatTitleFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,t),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${null==t?"":r+"-"} ${i})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}T.\u0275fac=function(t){return new(t||T)(e.Y36(d),e.Y36(l.uU))},T.\u0275cmp=e.Xpm({type:T,selectors:[["app-sales-order"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,r){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return r.getChannelLogs()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(o){return r.filter.From=o}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(o){return r.filter.To=o}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,R,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",r.pageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",r.filter.From),e.xp6(1),e.Q6J("date",r.filter.To),e.xp6(3),e.Q6J("ngIf",r.result))},dependencies:[l.O5,h.p,m.Q,c]});var y=a(8063);function L(n,t){if(1&n&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&n){const r=e.oxw();e.xp6(2),e.Q6J("result",r.result)("header",r.header)("from",r.filter.From)("to",r.filter.To)("type",1)}}class C{constructor(t,r){this.http=t,this.datePipe=r,this.filter=new g,this.PageTitle="Ready to Ship";let i=new Date;this.maxDate=i,this.minDate=s.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=s.g.formatTitleFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,t),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${null==t?"":r+"-"} ${i})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}function Q(n,t){if(1&n&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&n){const r=e.oxw();e.xp6(2),e.Q6J("result",r.result)("header",r.header)("from",r.filter.From)("to",r.filter.To)("type",3)}}C.\u0275fac=function(t){return new(t||C)(e.Y36(d),e.Y36(l.uU))},C.\u0275cmp=e.Xpm({type:C,selectors:[["app-invoice"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,r){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return r.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(o){return r.filter.From=o}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(o){return r.filter.To=o}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,L,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",r.PageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",r.filter.From),e.xp6(1),e.Q6J("date",r.filter.To),e.xp6(3),e.Q6J("ngIf",r.result))},dependencies:[l.O5,h.p,m.Q,c]});class _{constructor(t,r){this.http=t,this.datePipe=r,this.filter=new g;let i=new Date;this.maxDate=i,this.minDate=s.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=s.g.formatTitleFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,t),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${null==t?"":r+"-"} ${i})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}function U(n,t){if(1&n&&(e.TgZ(0,"div",7)(1,"div",8),e._UZ(2,"app-table-report",9),e.qZA()()),2&n){const r=e.oxw();e.xp6(2),e.Q6J("result",r.result)("header",r.header)("from",r.filter.From)("to",r.filter.To)("type",4)}}_.\u0275fac=function(t){return new(t||_)(e.Y36(d),e.Y36(l.uU))},_.\u0275cmp=e.Xpm({type:_,selectors:[["app-delivery"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,r){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return r.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(o){return r.filter.From=o}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(o){return r.filter.To=o}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,Q,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",r.PageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",r.filter.From),e.xp6(1),e.Q6J("date",r.filter.To),e.xp6(3),e.Q6J("ngIf",r.result))},dependencies:[l.O5,h.p,m.Q,c]});class v{constructor(t,r){this.http=t,this.datePipe=r,this.filter=new g,this.PageTitle="Completed";let i=new Date;this.minDate=s.g.addDays(i,6),this.filter.From=i,this.filter.To=i,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){const t=s.g.formatTitleFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,t),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${null==t?"":r+"-"} ${i})`}initPageLoader(){this.http.GetLoader().subscribe(t=>{this.filter=t,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(t=>{this.header=t.Header,this.result=t.Body})}onFilter(){this.getChannelLogs()}}v.\u0275fac=function(t){return new(t||v)(e.Y36(d),e.Y36(l.uU))},v.\u0275cmp=e.Xpm({type:v,selectors:[["app-payment"]],decls:11,vars:5,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,r){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return r.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6"),e._uU(5,"From/To"),e.qZA(),e.TgZ(6,"datepicker",3),e.NdJ("dateChange",function(o){return r.filter.From=o}),e.qZA(),e.TgZ(7,"datepicker",4),e.NdJ("dateChange",function(o){return r.filter.To=o}),e.qZA()()()(),e.TgZ(8,"content")(9,"div",5),e.YNc(10,U,3,5,"div",6),e.qZA()()()),2&t&&(e.Q6J("headerTitle",r.PageTitle)("hideSearchBox",!0),e.xp6(6),e.Q6J("date",r.filter.From),e.xp6(1),e.Q6J("date",r.filter.To),e.xp6(3),e.Q6J("ngIf",r.result))},dependencies:[l.O5,h.p,m.Q,c]});var I=a(4006),q=a(5171),k=a(8505),E=a(4782);function B(n,t){1&n&&e.GkF(0)}function M(n,t){if(1&n&&(e.TgZ(0,"div",8)(1,"div",9),e._UZ(2,"app-table-report",10),e.qZA()()),2&n){const r=t.ngIf,i=e.oxw();e.xp6(2),e.Q6J("result",r.Body)("header",r.Header)("from",null==i.filter?null:i.filter.From)("to",null==i.filter?null:i.filter.To)("type",3)}}class Z{constructor(t,r){this.reportOrderService=t,this.datePipe=r,this.filter=new g}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let t=new Date;this.minDate=s.g.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}updatePageTitle(){const t=s.g.formatTitleFromDate(this.filter.From,this.filter.To),r=this.datePipe.transform(this.filter.From,t),i=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${null==t?"":r+"-"} ${i})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe((0,k.b)(t=>{this.filter=t,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe((0,E.d)())}onFilter(){this.updatePageTitle(),this.initData()}}Z.\u0275fac=function(t){return new(t||Z)(e.Y36(d),e.Y36(l.uU))},Z.\u0275cmp=e.Xpm({type:Z,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"headerTitle","hideSearchBox","onSubmit"],["container","",2,"width","250px"],[1,"filterDate"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,r){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return r.onFilter()}),e.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"div")(5,"h6"),e._uU(6,"From/To"),e.qZA(),e.TgZ(7,"datepicker",3),e.NdJ("dateChange",function(o){return r.filter.From=o}),e.qZA(),e.TgZ(8,"datepicker",4),e.NdJ("dateChange",function(o){return r.filter.To=o}),e.qZA()()()()(),e.TgZ(9,"content")(10,"div",5),e.YNc(11,B,1,0,"ng-container",6),e.ALo(12,"async"),e.YNc(13,M,3,5,"div",7),e.ALo(14,"async"),e.qZA()()()),2&t&&(e.Q6J("headerTitle",r.pageTitle)("hideSearchBox",!0),e.xp6(7),e.Q6J("date",r.filter.From),e.xp6(1),e.Q6J("date",r.filter.To),e.xp6(3),e.Q6J("ngIf",e.lcZ(12,6,r.pageLoader$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(14,8,r.reportData$)))},dependencies:[l.O5,h.p,m.Q,c,l.Ov]});const Y=[{path:"",component:u,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:T,canActivate:[y.a],data:{title:"Sync Order"}},{path:"invoice",component:C,canActivate:[y.a],data:{title:"Sync Invoice"}},{path:"delivery",component:_,canActivate:[y.a],data:{title:"Sync Delivery"}},{path:"payment",component:v,canActivate:[y.a],data:{title:"Sync Payment"}},{path:"all",component:Z,canActivate:[y.a],data:{title:"All Report"}}]}];class f{}f.\u0275fac=function(t){return new(t||f)},f.\u0275mod=e.oAB({type:f}),f.\u0275inj=e.cJS({imports:[l.ez,O.Z,I.u5,h.R,q.P,m.Q,F.Bz.forChild(Y)]})}}]);
|