marketplacepos 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{117.6aab9cf870275665.js → 117.7936760fc208d523.js} +1 -1
- package/Marketplace/180.cc94448b2211cb4a.js +1 -0
- package/Marketplace/{397.7fd0ad9d4bf07277.js → 397.39d258c71c3fff64.js} +1 -1
- package/Marketplace/{463.20f700792417e3ee.js → 463.d5db8443b197d470.js} +1 -1
- package/Marketplace/656.1d7641755cc6e994.js +1 -0
- package/Marketplace/877.14904bfeb2339fd8.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main.60acf6953d678e06.js → main.f039f644ef145436.js} +1 -1
- package/Marketplace/{runtime.ccc8bc56f42019a7.js → runtime.812f0a7e50e882a8.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/180.dbbf0c10ee5511ad.js +0 -1
- package/Marketplace/716.8753639575454fc2.js +0 -1
- package/Marketplace/832.886dc486c5a4ff32.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[117],{4117:(D,m,s)=>{s.r(m),s.d(m,{LoginModule:()=>J});var p=s(6895),c=s(4006),t=s(4650),d=s(6806),l=s(1318);let b=(()=>{class o{constructor(e,n,i){this.route=e,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.gz),t.Y36(l.O),t.Y36(d.F0))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return n.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(n.code))}}),o})();var x=s(3154),u=s(7185);let C=(()=>{class o{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var f=s(8505),v=s(8996),h=s(4004),w=s(3900),Z=s(3942),M=s(8002),y=s(7899);let O=(()=>{class o{constructor(e,n,i,a){this.httpService=e,this.tokenDecodeService=n,this.toastrService=i,this.afAuth=a}login(e){return this.httpService.post("/api/token/Login",e).pipe((0,f.b)(n=>{this.setLocalStorage(n,e.Host,e.Username),this.validateRole()}))}loginWithGoogle(e,n){e.preventDefault();const i=new Z.Z.auth.GoogleAuthProvider;return i.setCustomParameters({prompt:"select_account"}),(0,v.D)(this.afAuth.signInWithPopup(i)).pipe((0,h.U)(a=>a.credential),(0,h.U)(a=>a.idToken),(0,w.w)(a=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:a,Host:n}))),(0,f.b)(a=>{this.setLocalStorage(a,n,null),this.validateRole()}))}setLocalStorage(e,n,i){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:i})),localStorage.setItem("Intercom",JSON.stringify(e.IntercomWidget))}validateRole(){let e="This user is lack of these following roles :",n=this.tokenDecodeService.GetRoles(),i=n.includes("Sell"),a=n.includes("SellEditor"),g=n.includes("DelC"),_=n.includes("PayC");i||(e=`${e} <br/> Sell Create`),a||(e=`${e} <br/> Sell Editor`),g||(e=`${e} <br/> Delivery Create`),_||(e=`${e} <br/> Payment Create`),(!i||!a||!g||!_)&&this.toastrService.warning(e,"Warning!",{enableHtml:!0})}logout(){this.clearLocalStorage()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;return null!=e&&(n<new Date(e.Token.expiredAt)||(this.clearLocalStorage(),!1))}clearLocalStorage(){localStorage.removeItem("Intercom"),localStorage.removeItem("Authorization"),localStorage.removeItem("user")}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(l.O),t.LFG(M.e),t.LFG(u._W),t.LFG(y.zQ))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const A=["subdomainEl"];function T(o,r){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.subdomain=i)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.domain=i)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&o){const e=t.oxw();t.xp6(12),t.Q6J("ngModel",e.subdomain),t.xp6(2),t.Q6J("ngModel",e.domain)}}function S(o,r){1&o&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function P(o,r){if(1&o&&(t.TgZ(0,"div",58),t.YNc(1,S,2,0,"p",59),t.qZA()),2&o){t.oxw();const e=t.MAs(13);t.xp6(1),t.Q6J("ngIf",e.errors.required)}}const k=function(o,r){return{"fa-eye":o,"fa-eye-slash":r}};function L(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.hideShowPassword())}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(1,k,"eye-off"==e.passwordIcon,"eye"==e.passwordIcon))}}function U(o,r){1&o&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function z(o,r){if(1&o&&(t.TgZ(0,"div",58),t.YNc(1,U,2,0,"p",59),t.qZA()),2&o){t.oxw();const e=t.MAs(19);t.xp6(1),t.Q6J("ngIf",e.errors.required)}}function I(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.username=i)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,P,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.password=i)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,L,1,4,"i",49),t.YNc(23,z,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.onLoginByGoogle(i))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&o){const e=t.MAs(13),n=t.MAs(19),i=t.oxw();t.xp6(8),t.AsE(" (",i.subdomain,"",i.domain,") "),t.xp6(4),t.Q6J("ngModel",i.username),t.xp6(4),t.Q6J("ngIf",e.invalid&&(e.dirty||e.touched)),t.xp6(2),t.Q6J("type",i.passwordType)("ngModel",i.password),t.xp6(4),t.Q6J("ngIf",""!=i.password&&"edge"!=i.browser),t.xp6(1),t.Q6J("ngIf",n.invalid&&(n.dirty||n.touched)),t.xp6(2),t.Q6J("href","https://"+i.subdomain+i.domain+"/ForgotPassword",t.LSH)}}const q=[{path:"",component:(()=>{class o{constructor(e,n,i,a,g){this._router=e,this.elementRef=n,this.toastr=i,this.checkBrowser=a,this.authService=g,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){x.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this._router.navigate(e.Channel.length<1?["menu/channel"]:["menu"])}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.F0),t.Y36(t.SBq),t.Y36(u._W),t.Y36(C),t.Y36(O))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-login"]],viewQuery:function(e,n){if(1&e&&t.Gf(A,5),2&e){let i;t.iGM(i=t.CRH())&&(n.subdomainEl=i.first)}},decls:30,vars:2,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["src","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,n){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,T,24,2,"ng-container",7),t.YNc(10,I,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.5.8"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.5.8"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(9),t.Q6J("ngIf","FORM_DOMAIN"==n.loginState)("ngIfElse",i)}},dependencies:[p.mk,p.O5,c._Y,c.YN,c.Kr,c.Fj,c.EJ,c.JJ,c.JL,c.Q7,c.On,c.F],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]}),o})(),data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:(()=>{class o{constructor(e,n,i){this.route=e,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.gz),t.Y36(l.O),t.Y36(d.F0))},o.\u0275cmp=t.Xpm({type:o,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return n.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(n.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"tiktok",component:(()=>{class o{constructor(e,n,i){this.route=e,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.gz),t.Y36(l.O),t.Y36(d.F0))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return n.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(n.code),t.xp6(4),t.Oqu(n.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"lazada",component:b,data:{title:"Success"}}];let N=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.Bz.forChild(q),d.Bz]}),o})();var Y=s(8796);let J=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[p.ez,c.u5,N,Y.A0]}),o})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[117],{4117:(D,m,s)=>{s.r(m),s.d(m,{LoginModule:()=>J});var p=s(6895),c=s(4006),t=s(4650),d=s(6806),l=s(1318);let b=(()=>{class o{constructor(e,n,i){this.route=e,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.gz),t.Y36(l.O),t.Y36(d.F0))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return n.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(n.code))}}),o})();var x=s(3154),u=s(7185);let C=(()=>{class o{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var f=s(8505),v=s(8996),h=s(4004),w=s(3900),Z=s(3942),M=s(8002),y=s(7899);let O=(()=>{class o{constructor(e,n,i,a){this.httpService=e,this.tokenDecodeService=n,this.toastrService=i,this.afAuth=a}login(e){return this.httpService.post("/api/token/Login",e).pipe((0,f.b)(n=>{this.setLocalStorage(n,e.Host,e.Username),this.validateRole()}))}loginWithGoogle(e,n){e.preventDefault();const i=new Z.Z.auth.GoogleAuthProvider;return i.setCustomParameters({prompt:"select_account"}),(0,v.D)(this.afAuth.signInWithPopup(i)).pipe((0,h.U)(a=>a.credential),(0,h.U)(a=>a.idToken),(0,w.w)(a=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:a,Host:n}))),(0,f.b)(a=>{this.setLocalStorage(a,n,null),this.validateRole()}))}setLocalStorage(e,n,i){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:i})),localStorage.setItem("Intercom",JSON.stringify(e.IntercomWidget))}validateRole(){let e="This user is lack of these following roles :",n=this.tokenDecodeService.GetRoles(),i=n.includes("Sell"),a=n.includes("SellEditor"),g=n.includes("DelC"),_=n.includes("PayC");i||(e=`${e} <br/> Sell Create`),a||(e=`${e} <br/> Sell Editor`),g||(e=`${e} <br/> Delivery Create`),_||(e=`${e} <br/> Payment Create`),(!i||!a||!g||!_)&&this.toastrService.warning(e,"Warning!",{enableHtml:!0})}logout(){this.clearLocalStorage()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;return null!=e&&(n<new Date(e.Token.expiredAt)||(this.clearLocalStorage(),!1))}clearLocalStorage(){localStorage.removeItem("Intercom"),localStorage.removeItem("Authorization"),localStorage.removeItem("user")}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(l.O),t.LFG(M.e),t.LFG(u._W),t.LFG(y.zQ))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const A=["subdomainEl"];function T(o,r){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.subdomain=i)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.domain=i)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&o){const e=t.oxw();t.xp6(12),t.Q6J("ngModel",e.subdomain),t.xp6(2),t.Q6J("ngModel",e.domain)}}function S(o,r){1&o&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function P(o,r){if(1&o&&(t.TgZ(0,"div",58),t.YNc(1,S,2,0,"p",59),t.qZA()),2&o){t.oxw();const e=t.MAs(13);t.xp6(1),t.Q6J("ngIf",e.errors.required)}}const k=function(o,r){return{"fa-eye":o,"fa-eye-slash":r}};function L(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.hideShowPassword())}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(1,k,"eye-off"==e.passwordIcon,"eye"==e.passwordIcon))}}function U(o,r){1&o&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function z(o,r){if(1&o&&(t.TgZ(0,"div",58),t.YNc(1,U,2,0,"p",59),t.qZA()),2&o){t.oxw();const e=t.MAs(19);t.xp6(1),t.Q6J("ngIf",e.errors.required)}}function I(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.username=i)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,P,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.password=i)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,L,1,4,"i",49),t.YNc(23,z,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(i){t.CHM(e);const a=t.oxw();return t.KtG(a.onLoginByGoogle(i))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&o){const e=t.MAs(13),n=t.MAs(19),i=t.oxw();t.xp6(8),t.AsE(" (",i.subdomain,"",i.domain,") "),t.xp6(4),t.Q6J("ngModel",i.username),t.xp6(4),t.Q6J("ngIf",e.invalid&&(e.dirty||e.touched)),t.xp6(2),t.Q6J("type",i.passwordType)("ngModel",i.password),t.xp6(4),t.Q6J("ngIf",""!=i.password&&"edge"!=i.browser),t.xp6(1),t.Q6J("ngIf",n.invalid&&(n.dirty||n.touched)),t.xp6(2),t.Q6J("href","https://"+i.subdomain+i.domain+"/ForgotPassword",t.LSH)}}const q=[{path:"",component:(()=>{class o{constructor(e,n,i,a,g){this._router=e,this.elementRef=n,this.toastr=i,this.checkBrowser=a,this.authService=g,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){x.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this._router.navigate(e.Channel.length<1?["menu/channel"]:["menu"])}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.F0),t.Y36(t.SBq),t.Y36(u._W),t.Y36(C),t.Y36(O))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-login"]],viewQuery:function(e,n){if(1&e&&t.Gf(A,5),2&e){let i;t.iGM(i=t.CRH())&&(n.subdomainEl=i.first)}},decls:30,vars:2,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["src","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,n){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,T,24,2,"ng-container",7),t.YNc(10,I,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.5.9"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.5.9"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(9),t.Q6J("ngIf","FORM_DOMAIN"==n.loginState)("ngIfElse",i)}},dependencies:[p.mk,p.O5,c._Y,c.YN,c.Kr,c.Fj,c.EJ,c.JJ,c.JL,c.Q7,c.On,c.F],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]}),o})(),data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:(()=>{class o{constructor(e,n,i){this.route=e,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.gz),t.Y36(l.O),t.Y36(d.F0))},o.\u0275cmp=t.Xpm({type:o,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return n.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(n.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"tiktok",component:(()=>{class o{constructor(e,n,i){this.route=e,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(d.gz),t.Y36(l.O),t.Y36(d.F0))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return n.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(n.code),t.xp6(4),t.Oqu(n.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"lazada",component:b,data:{title:"Success"}}];let N=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.Bz.forChild(q),d.Bz]}),o})();var Y=s(8796);let J=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[p.ez,c.u5,N,Y.A0]}),o})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[180],{1180:(wn,k,s)=>{s.r(k),s.d(k,{ProductModule:()=>Mn});var d=s(6895),U=s(7398),u=s(4006),v=s(6806),t=s(4650);let q=(()=>{class o{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listed SKU",Url:"/menu/products/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"}]}}return o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-products"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,e){1&n&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&n&&(t.xp6(3),t.Q6J("Tabs",e.productTabs))},dependencies:[U.e,v.lC],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}}"]}),o})();var y=s(1290),m=s(8231),h=s(5412),c=s(3154),M=s(6779),D=s(3900),B=s(9646),Y=s(9568),x=s(1318);let A=(()=>{class o{constructor(n,e){this.LocalData=n,this.httpService=e}getCategoriesByTypeId(n){return this.LocalData.getCategoriesByChannelType(n).pipe((0,D.w)(e=>null!=e?(0,B.of)(e):this._getCategoriesByTypeID(n)))}_getCategoriesByTypeID(n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:n}).pipe((0,D.w)(i=>this.LocalData.saveCategoriesByChannelType(i,n)))}}return o.\u0275fac=function(n){return new(n||o)(t.LFG(Y.T),t.LFG(x.O))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var J=s(5960),w=s(6401);function V(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"h5",5),t._uU(2,"Category"),t.qZA(),t.TgZ(3,"app-select-search",9),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onSelectCategory(i))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("appearance","outline")("batchSize",30)("data",n.options)("bindLabel","Value")("bindValue","Key")("placeholder","Select Category")}}let Q=(()=>{class o{constructor(n,e,i,l){this.data=n,this.channelCategoriesService=e,this.http=i,this.dialogRef=l,this.item=n.item,this.selectItemMissingChannel=n.selectedItemMissingChannel,this.options=[],this.optionVisible=!1}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title="Upload"}onSelectItem(n){this.selectedChannelID=n;let e=this.selectItemMissingChannel.find(i=>i.ID==n);!e||1!==e.TypeID&&7!==e.TypeID?this.optionVisible=!1:this.channelCategoriesService.getCategoriesByTypeId(e.TypeID).subscribe({next:i=>{this.options=i,this.optionVisible=!0},error:i=>{console.error(i)}})}isNotEmpty(n){return c.g.IsNotEmpty(n)}onSelectCategory(n){this.selectedCategoryID=n}onClose(){this.dialogRef.close()}onSave(){this.selectedChannelID&&(this.selectedCategoryID||!this.optionVisible)&&this.dialogRef.close({channelID:this.selectedChannelID,categoryID:this.selectedCategoryID})}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(A),t.Y36(x.O),t.Y36(h.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-uploadProductDialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"row"],[1,"col-12"],[1,"mb-3","fw-normal"],[3,"appearance","data","bindLabel","bindValue","placeholder","onSelect"],[1,"row","mt-3"],[4,"ngIf"],[3,"appearance","batchSize","data","bindLabel","bindValue","placeholder","onSelect"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return e.onSave()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),t.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"h5",5),t._uU(6,"Channel :"),t.qZA(),t.TgZ(7,"app-select-search",6),t.NdJ("onSelect",function(l){return e.onSelectItem(l)}),t.qZA()()(),t.TgZ(8,"div",7)(9,"div",4),t.YNc(10,V,4,6,"ng-container",8),t.qZA()()()()()),2&n&&(t.Q6J("dynamicValidated",e.isNotEmpty(e.selectedChannelID))("config",e.modalConfig),t.xp6(7),t.Q6J("appearance","outline")("data",e.selectItemMissingChannel)("bindLabel","Name")("bindValue","ID")("placeholder","Choose "),t.xp6(3),t.Q6J("ngIf",e.optionVisible))},dependencies:[d.O5,J.h,w.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),o})();var p=s(9694),_=(()=>{return(o=_||(_={})).Tokopedia="https://seller.tokopedia.com",o.Shoope="https://seller.shopee.co.id",o.Tiktok="https://seller-id.tiktok.com",o.WooCommerce="https://woocommerce.dealpos.app",o.Lazada="https://sellercenter.lazada.co.id",_;var o})(),C=s(266);function R(o,a){if(1&o&&(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&o){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 H(o,a){if(1&o&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&o){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function K(o,a){if(1&o&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&o){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}const G=function(o){return{"is-disabled":o}};function $(o,a){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,H,2,2,"td",14),t.YNc(2,K,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&o){const n=a.$implicit,e=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",i.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",i.getHyperlinkSellerCenter(n),t.LSH)("ngClass",t.VKq(16,G,n.TypeID==i.channelType.KalCare))("matTooltip",n.TypeID!=i.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function j(o,a){if(1&o&&t.YNc(0,$,20,18,"tr",8),2&o){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function z(o,a){if(1&o&&(t.ynx(0),t.YNc(1,R,9,2,"ng-container",9),t.YNc(2,j,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&o){const n=a.$implicit,e=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",e)}}let E=(()=>{class o{constructor(n,e){this.data=n,this.dialogRef=e,this.channelType=p.x,this.variants=n.variants,this.title=n.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}getHyperlinkSellerCenter(n){let e="javascript:void(0)";switch(n.TypeID){case p.x.ShopeeV2:e=`${_.Shoope}/portal/product/${n.ChannelItemID}`;break;case p.x.Tiktok:e=`${_.Tiktok}/product/edit/${n.ChannelItemID}`;break;case p.x.Tokopedia:e=`${_.Tokopedia}/edit-product/${n.ChannelItemID}`;break;case p.x.WooCommerce:e=`${_.WooCommerce}/wp-admin/post.php?post=${n.ChannelItemID}&action=edit`;break;case p.x.Lazada:e=`${_.Lazada}/apps/product/publish?productId=${n.ChannelItemID}`}return e}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(h.so))},o.\u0275cmp=t.Xpm({type:o,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(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return e.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,z,4,2,"ng-container",8),t.qZA()()()()),2&n&&(t.Q6J("config",e.modalConfig),t.xp6(21),t.Q6J("ngForOf",e.variants))},dependencies:[d.mk,d.sg,d.O5,C.gM,w.M,d.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0px}.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}"]}),o})();var g=s(9300),W=s(7579),X=s(2722),b=s(6082),I=s(7185);function tt(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"app-select-search",15),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw().index,r=t.oxw();return t.KtG(r.onSelectCategory(i,l))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("data",n.Categories)("batchSize",30)}}function nt(o,a){if(1&o&&(t.TgZ(0,"div",16),t._UZ(1,"input",17),t.qZA()),2&o){const n=t.oxw().$implicit,e=t.oxw();t.xp6(1),t.Q6J("placeholder",e.getChannelCategory(n.TypeID))}}function et(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",8)(3,"input",9),t.NdJ("ngModelChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.Selected=i)})("ngModelChange",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",10),t._UZ(6,"img",11),t.TgZ(7,"span",12),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,tt,2,2,"ng-container",13),t.YNc(11,nt,2,1,"ng-template",null,14,t.W1O),t.qZA()(),t.BQk()}if(2&o){const n=a.$implicit,e=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",e)}}let L=(()=>{class o{constructor(n,e,i,l,r){this.data=n,this.channelService=e,this.productService=i,this.dialogRef=l,this.toastrService=r,this.channelOptions=[],this.uploadResponse=[],this.channelType=p.x,this.enableBtnOk=!1,this.destroy$=new W.x,this.uploadResponse=[],this.channels=this.data.channels,this.products=this.data.products}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(e=>{this.channelService.getCategoriesByTypeId(e).pipe((0,X.R)(this.destroy$)).subscribe(i=>{this.setCategoriesChannelOption(e,i)})})}setCategoriesChannelOption(n,e){this.channelOptions=this.channelOptions.map(i=>(i.TypeID==n&&(i.Categories=e),i))}initChannelOptions(){this.channelOptions=this.channels.map(n=>({Name:n.Name,Img:n.Img,ID:n.ID,Selected:!1,CategoryID:0,TypeID:n.TypeID,Categories:[]}))}filterChannelTypeId(){return this.data.channels.map(e=>e.TypeID).filter((e,i,l)=>l.indexOf(e)==i).filter(e=>e==p.x.Tokopedia)}onSelectCategory(n,e){this.channelOptions[e].CategoryID=n,this.channelOptions[e].Selected=!0,this.onSelectChannel()}onSelectAllChannel(n){this.channelOptions=this.channelOptions.map(e=>(e.Selected=n,e)),this.enableBtnOk=n}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(n=>n.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const n=this.channelOptions.filter(e=>e.Selected).map(e=>({CategoryID:e.CategoryID,ChannelID:e.ID}));this.submitToServer(n)}validateSelectedCategory(){return-1==this.channelOptions.filter(e=>e.Selected).filter(e=>e.TypeID==p.x.Lazada||e.TypeID==p.x.Tokopedia).findIndex(e=>0==e.CategoryID)}submitToServer(n){this.productService.uploadToMultipleChannel(this.products,n).subscribe({next:e=>{this.dialogRef.close(e),this.productService.showToastrSuccessUploadMultiple(e,this.data.products[0])},error:e=>{this.dialogRef.close("ERROR"),this.productService.showToastErrorUploadMultiple(e,this.data.products[0])}})}getChannelCategory(n){let e;switch(n){case p.x.ShopeeV2:e="Perlengkapan Rumah Lainnya";break;case p.x.Tiktok:e="Perlengkapan Rumah - Dekorasi Rumah - Poster & Produck Cetak";break;case p.x.WooCommerce:e="New Product";break;default:e="Unavailable Category"}return e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(A),t.Y36(b.M),t.Y36(h.so),t.Y36(I._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-uploadMultiple-product"]],decls:13,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%"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo",3,"src"],[1,"ms-3"],[4,"ngIf","ngIfElse"],["EMPTY",""],["appearance","outline","bindLabel","Value","bindValue","Key","placeholder","Select Category",3,"data","batchSize","onSelect"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return e.onSave()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(l){return e.onSelectAllChannel(l.target.checked)}),t.qZA()(),t.TgZ(7,"th",5),t._uU(8," CHANNEL "),t.qZA(),t.TgZ(9,"th",6),t._uU(10,"CATEGORY"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,et,13,5,"ng-container",7),t.qZA()()()()),2&n&&(t.Q6J("dynamicValidated",e.enableBtnOk)("config",e.modalConfig),t.xp6(12),t.Q6J("ngForOf",e.channelOptions))},dependencies:[d.sg,d.O5,u.Wl,u.JJ,u.On,C.gM,J.h,w.M],styles:["input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}img.channel-logo[_ngcontent-%COMP%]{width:24px;height:24px}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}"]}),o})();var S=s(7481),Z=s(1739);function ot(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",19),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.openBiggerPicture(i))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function it(o,a){1&o&&t._UZ(0,"img",20)}function at(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",24)(2,"a",25),t._UZ(3,"i",26),t.qZA()(),t.BQk()),2&o){const n=t.oxw(2);t.xp6(2),t.Q6J("href",n.redirectUrl,t.LSH)}}function lt(o,a){if(1&o&&(t.TgZ(0,"div",21),t._UZ(1,"i",22),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.YNc(4,at,4,1,"ng-container",23),t.qZA()),2&o){const n=t.oxw();t.xp6(3),t.Oqu(n.code),t.xp6(1),t.Q6J("ngIf","SKU not assigned"!==n.code&&n.showRedirectIcon)}}function rt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",27),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onEventDesc())}),t._UZ(1,"i",28),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(3),t.Oqu(n.description)}}function ct(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",29)(1,"input",30),t.NdJ("change",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onCheck(i.target.checked))}),t.qZA()()}}function st(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownload())}),t._UZ(1,"i",32),t._uU(2," Download "),t.qZA()}}function dt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",31),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUpload())}),t._UZ(1,"i",33),t._uU(2," Upload "),t.qZA()}}function pt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",34),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScan())}),t._UZ(1,"i",35),t._uU(2," Scan "),t.qZA()}}const ut=function(o){return{"me-3":o}};function ht(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"a",37),t._UZ(2,"img",38),t.qZA(),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(1),t.s9C("href",n.Url,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(4,ut,e!=i.channels.length-1))("src",i.getChannelLogo(n),t.LSH)("matTooltip",n.Title?n.Title:n.Name)}}function gt(o,a){if(1&o&&(t.ynx(0),t.YNc(1,ht,3,6,"ng-container",36),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.channels)}}const mt=function(o){return{"border-bottom pb-2":o}};function _t(o,a){if(1&o&&(t.TgZ(0,"li")(1,"div",42)(2,"div",43)(3,"a",37),t._UZ(4,"img",44),t.TgZ(5,"span",45),t._uU(6),t.qZA()()()()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(4,mt,e!=i.channels.length-1)),t.xp6(1),t.Q6J("href",n.Url,t.LSH),t.xp6(1),t.Q6J("src",i.getChannelLogo(n),t.LSH),t.xp6(2),t.Oqu(n.Title)}}function Ct(o,a){if(1&o&&(t.TgZ(0,"div",39)(1,"button",40),t._uU(2),t.qZA(),t.TgZ(3,"ul",41),t.YNc(4,_t,7,6,"li",36),t.qZA()()),2&o){const n=t.oxw();t.xp6(2),t.hij(" ",n.channels.length," CHANNELS "),t.xp6(2),t.Q6J("ngForOf",n.channels)}}let N=(()=>{class o{constructor(n){this.biggerPictureService=n,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.onUploadEvent=new t.vpe,this.onScanEvent=new t.vpe,this.checkBoxChange=new t.vpe,this.onDescEvent=new t.vpe,this.onDownloadEvent=new t.vpe}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let n=localStorage.getItem("Authorization"),e=JSON.parse(n)?.Host;this.redirectUrl=`https://${e}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(n){this.checkBoxChange.emit(n)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n.TypeID)}openBiggerPicture(n){this.biggerPictureService.openBiggerPicture(n,this.imageForZoom)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(Z.k))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload"},decls:26,vars:11,consts:[[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],["class","text-end gx-0",4,"ngIf"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],["class","fs-6 btn btn-light btn-sm",3,"click",4,"ngIf"],["DROPDOWN",""],["alt","",1,"rounded","imgUpload","float-left",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fas","fa-external-link-alt"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["aria-hidden","true",1,"fa","fa-upload"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fa","fa-spinner"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(n,e){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,ot,2,1,"ng-container",6),t.YNc(7,it,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t.NdJ("click",function(){return e.onEventDesc()}),t._uU(11),t.qZA(),t.YNc(12,lt,5,2,"div",10),t.YNc(13,rt,4,1,"div",11),t.qZA(),t.TgZ(14,"div",12)(15,"div",13),t.YNc(16,ct,2,0,"div",14),t.qZA()()()(),t.TgZ(17,"div",15)(18,"div"),t.YNc(19,st,3,0,"button",16),t.YNc(20,dt,3,0,"button",16),t.YNc(21,pt,3,0,"button",17),t.qZA(),t.TgZ(22,"div"),t.YNc(23,gt,2,1,"ng-container",6),t.YNc(24,Ct,5,2,"ng-template",null,18,t.W1O),t.qZA()()()),2&n){const i=t.MAs(8),l=t.MAs(25);t.xp6(6),t.Q6J("ngIf",e.image)("ngIfElse",i),t.xp6(5),t.hij(" ",e.title," "),t.xp6(1),t.Q6J("ngIf",e.code),t.xp6(1),t.Q6J("ngIf",e.description),t.xp6(3),t.Q6J("ngIf",e.showCheckBox),t.xp6(3),t.Q6J("ngIf",e.downloadButton),t.xp6(1),t.Q6J("ngIf",e.uploadButton),t.xp6(1),t.Q6J("ngIf",e.scanButton),t.xp6(2),t.Q6J("ngIf",e.channels.length<4)("ngIfElse",l)}},dependencies:[d.mk,d.sg,d.O5,C.gM],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]}),o})();var O=s(6732);function ft(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",11),t._uU(2," Scan Channel "),t.qZA()}}function xt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanMultipleProduct())}),t._UZ(1,"i",11),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();let e;t.xp6(2),t.hij(" Scan Selected Product (",null==(e=n.productService.selectedProduct(n.products))?null:e.length,") ")}}function Pt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUploadMultipleProductSingleChannel())}),t._UZ(1,"i",14),t._uU(2," Upload Bulk "),t.qZA()}}function bt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",15)(1,"app-product-card",16),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenDialogVariant(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&o){const n=a.$implicit,e=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",e.productService.getChannelProduct(n))("code",e.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<e.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}let St=(()=>{class o{constructor(n,e,i,l){this.http=n,this.toastr=e,this.dialog=i,this.productService=l,this.searchFilter=new y.k,this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.loader().subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter.PageNumber=n.Filter.PageNumber,this.searchFilter.RowCount=n.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(e=>{this.products=e.Data,this.rowCount=null==e.Total?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(n){this.dialog.open(E,{data:{title:this.products[n].Name,variants:this.products[n].Variants},width:"50%"})}onUploadMultipleProductSingleChannel(){this.dialog.open(Q,{width:"350px",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,e){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,e).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}onUploadToMultipleChannel(n){let e=this.productService.getChannelProduct(n);n.Channel=e;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(L,{width:"700px",data:{title:`Upload - ${n.Name}`,channels:i,products:[n]}}).afterClosed().pipe((0,g.h)(l=>"CANCEL"!==l)).subscribe(l=>{this.getProducts()})}searchProduct(n){this.searchFilter.text=n,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[p.x.Tokopedia,p.x.Tiktok]);this.dialog.open(m.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(l=>c.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(f)})}onScanSingleProduct(n){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=c.g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=c.g.GuidEMpty}})}getVariantCode(n){let e;return n.length>1&&(e=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(e=n[0].Code),e}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(I._W),t.Y36(h.uw),t.Y36(b.M))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-in-pos"]],decls:12,vars:9,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"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"],["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"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,ft,3,0,"button",1),t.YNc(3,xt,3,1,"button",2),t.YNc(4,Pt,3,0,"button",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,bt,2,10,"div",6),t.qZA(),t.TgZ(9,"div",7)(10,"div",8)(11,"app-custom-paginator",9),t.NdJ("next",function(){return e.onNextPage()})("previous",function(){return e.onPrevPage()}),t.qZA()()()()()()),2&n&&(t.Q6J("headerTitle","In POS ("+e.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(4),t.Q6J("ngForOf",e.products),t.xp6(3),t.Q6J("filter",e.searchFilter)("totaldata",null==e.products?null:e.products.length)("paginationTotal",e.rowCount)("hasClicked",!0))},dependencies:[d.sg,d.O5,S.p,N,O.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}}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]}),o})();var P=s(8796);function vt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function It(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanSelectedProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&o){const n=t.oxw();t.xp6(2),t.hij(" Scan Selected Product (",n.productService.selectedProduct(n.products).length,") ")}}function Tt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUploadMultipleProductSingleChannel())}),t._UZ(1,"i",17),t._uU(2," Upload Bulk "),t.qZA()}}function yt(o,a){if(1&o&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&o){const n=a.item,e=t.oxw();t.xp6(1),t.Q6J("src",e.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Mt(o,a){if(1&o){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(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchFilter.Item_id=i)}),t.qZA()()}if(2&o){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function wt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenVariantDetail(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&o){const n=a.$implicit,e=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",e.productService.getChannelProduct(n))("code",e.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 Ot(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&o){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)}}let Zt=(()=>{class o{constructor(n,e,i,l,r){this.http=n,this.dialog=e,this.toastr=i,this.productService=l,this.activateRouter=r,this.searchFilter=new y.k,this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=c.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(n=>{this.initPageLoader(n.ID?n.ID:c.g.GuidEMpty)})}initPageLoader(n){this.productService.loader(n).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,e.Filter.ChannelID!=c.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){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(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(n){this.dialog.open(E,{data:{variants:this.products[n].Variants,title:this.products[n].Name},width:"50%"})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let n=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,g.h)(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct),this.initPageLoader(c.g.GuidEMpty))})}onScanSingleProduct(n){n.Channel=this.productService.getChannelProduct(n);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(m.j,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}onUploadToMultipleChannel(n){let e=this.productService.getChannelProduct(n);n.Channel=e;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(L,{width:"700px",data:{title:`Upload - ${n.Name}`,channels:i,products:[n]}}).afterClosed().pipe((0,g.h)(l=>"CANCEL"!==l)).subscribe({next:l=>{this.getProducts()}})}onScanSelectedProduct(){let n=this.productService.filterChannelByTypeId(this.channelOptions,[p.x.Tokopedia,p.x.Tiktok]);this.searchFilter.ChannelID=c.g.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(m.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,g.h)(l=>c.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(f)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=c.g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=c.g.GuidEMpty}})}getVariantCode(n){let e;return n.length>1&&(e=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(e=n[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=c.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProductSingleChannel(){this.dialog.open(Q,{width:"40%",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,e){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,e).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(h.uw),t.Y36(I._W),t.Y36(b.M),t.Y36(v.gz))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-sold-in-channel"]],decls:19,vars:10,consts:[["headerTitle","Sold in Channel","description","SKU has been mapped between dealpos and marketplace",3,"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,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,vt,3,0,"button",1),t.YNc(3,It,3,1,"button",2),t.YNc(4,Tt,3,0,"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(l){return e.searchFilter.ListChannelID=l})("clear",function(){return e.onClearFilterChannel()}),t.YNc(12,yt,3,2,"ng-template",7),t.qZA()(),t.YNc(13,Mt,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,wt,2,10,"div",11),t.qZA(),t.YNc(18,Ot,3,4,"div",12),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=e.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",e.products),t.xp6(1),t.Q6J("ngIf",null==e.products?null:e.products.length))},dependencies:[d.sg,d.O5,u.Fj,u.JJ,u.On,S.p,P.w9,P.ir,N,O.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}}"]}),o})();var Nt=s(8505),Ft=s(4004),kt=s(9425);function Ut(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",28),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw(3).$implicit,r=t.oxw(3);return t.KtG(r.onZoomImage(i,null==l?null:l.ImageUrl))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Dt(o,a){1&o&&t._UZ(0,"img",29)}function At(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"td",21)(2,"div",22),t.YNc(3,Ut,2,1,"ng-container",23),t.YNc(4,Dt,1,0,"ng-template",null,24,t.W1O),t.qZA()(),t.TgZ(6,"td",25)(7,"h4",26)(8,"span",27),t._uU(9),t.qZA()()(),t.BQk()),2&o){const n=t.MAs(5),e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==e?null:e.Variants.length),t.xp6(2),t.Q6J("ngIf",null==e?null:e.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==e?null:e.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==e||null==e.Name?null:e.Name.length)>50?null==e?null:e.Name:""),t.xp6(1),t.hij(" ",null==e?null:e.Name," ")}}function Jt(o,a){if(1&o&&(t.TgZ(0,"div")(1,"a",17),t._UZ(2,"img",30),t.qZA()()),2&o){const n=a.$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 Qt(o,a){if(1&o&&(t.TgZ(0,"div"),t._UZ(1,"img",30),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Et(o,a){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,At,10,6,"ng-container",13),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"span"),t._uU(6),t.qZA(),t.TgZ(7,"span",16)(8,"a",17),t._UZ(9,"i",18),t.qZA()()(),t.TgZ(10,"td",19)(11,"div",20),t.YNc(12,Jt,3,3,"div",15),t.qZA()(),t.TgZ(13,"td",19)(14,"div",20),t.YNc(15,Qt,2,2,"div",15),t.qZA()()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(3),t.hij(" ",n.Code," "),t.xp6(2),t.Q6J("href","https://"+i.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 Lt(o,a){if(1&o&&(t.ynx(0),t.YNc(1,Et,16,6,"tr",15),t.BQk()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function qt(o,a){if(1&o&&(t.TgZ(0,"tbody"),t.YNc(1,Lt,2,1,"ng-container",15),t.qZA()),2&o){const n=a.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function Bt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"span",38),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.getRowCount())}),t.TgZ(1,"i",39),t._uU(2,"?"),t.qZA()()}}function Yt(o,a){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const n=a.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Vt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onNextPage())}),t._UZ(1,"i",41),t._uU(2," Next"),t.qZA()}}function Rt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"a",42),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onLastPage())}),t._UZ(1,"i",43),t._uU(2," Last"),t.qZA()}}function Ht(o,a){if(1&o&&(t.TgZ(0,"div",31)(1,"div",32)(2,"div",33),t._uU(3),t.ALo(4,"number"),t.YNc(5,Bt,3,0,"span",34),t.YNc(6,Yt,3,3,"span",13),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",35),t.YNc(10,Vt,3,0,"a",36),t.YNc(11,Rt,3,0,"a",37),t.qZA()()),2&o){const n=a.ngIf,e=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",e.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!e.paginationService.hideCount&&t.lcZ(7,8,e.rowCount$)),t.xp6(2),t.hij(" records ~ ",e.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function Kt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchProduct(i))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const l=t.CHM(n).ngIf,r=t.oxw();return t.KtG(r.openScanDialog(l))}),t._UZ(3,"i",3),t._uU(4," Scan Channel "),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"div",6)(9,"table",7)(10,"thead",8)(11,"tr")(12,"th",9),t._uU(13,"Product"),t.qZA(),t.TgZ(14,"th",10),t._uU(15,"Variant"),t.qZA(),t.TgZ(16,"th",10),t._uU(17,"SKU"),t.qZA(),t.TgZ(18,"th",11),t._uU(19,"Available In"),t.qZA(),t.TgZ(20,"th",12),t._uU(21,"Not Available In"),t.qZA()()(),t.YNc(22,qt,2,1,"tbody",13),t.ALo(23,"async"),t.qZA()()(),t.YNc(24,Ht,12,10,"div",14),t.ALo(25,"async"),t.qZA()()()}if(2&o){const n=t.oxw();t.Q6J("hideSearchDropdown",!0),t.xp6(22),t.Q6J("ngIf",t.lcZ(23,3,n.data$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(25,5,n.data$))}}let Gt=(()=>{class o{constructor(n,e,i,l,r,f){this.http=n,this.dialog=e,this.toastr=i,this.productService=l,this.paginationService=r,this.biggerPictureService=f,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const n=localStorage.getItem("Authorization");this.hostName=JSON.parse(n)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,Nt.b)(n=>{this.filterSearch=n.Filter,this.paginationService.resetToFirstPage(n.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,Ft.U)(n=>n.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e))))}assignLogoChannel(n){return n.map(e=>(e.Img=c.g.getChannelLogoByTypeId(e.TypeID),e))}searchProduct(n){this.filterSearch.text=n,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(n){let e=this.productService.findChannelById(this.filterSearch.ChannelID,n.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(i=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(i,e,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(n){let e=JSON.parse(JSON.stringify(this.filterSearch));e.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:e,channelOptions:n.Options.Channel},width:"40%"}).afterClosed().pipe((0,g.h)(l=>c.g.IsNotEmpty(l))).subscribe(l=>{this.filterSearch.ChannelID=l.ChannelID,this.filterSearch.ScanFull=l.ScanFull,this.filterSearch.UpdatedProduct=l.UpdatedProduct,this.filterSearch.Async=l.Async,this.scanAllProduct(n)})}getChannelLogoById(n){return c.g.getChannelLogoByTypeId(n)}uploadProductToSingleChannel(n,e,i,l){let r=this.productService.findChannelById(e,l.Options.Channel);this.productService.uploadMultipleProduct([n],e,i).subscribe(f=>{this.paginationService.resetToFirstPage(l.Filter),this.toastr.success("Successfully uploaded "+n.Name+" to "+r.Name,"Success")})}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:n=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,n.Count)}})}onZoomImage(n,e){this.biggerPictureService.openBiggerPicture(n,e)}ngOnDestroy(){this.paginationService.destroy()}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(h.uw),t.Y36(I._W),t.Y36(b.M),t.Y36(kt.b),t.Y36(Z.k))},o.\u0275cmp=t.Xpm({type:o,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"],[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"],["class","d-flex justify-content-between mt-5",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"],[4,"ngIf","ngIfElse"],["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","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(n,e){1&n&&(t.YNc(0,Kt,26,7,"mainpanel",0),t.ALo(1,"async")),2&n&&t.Q6J("ngIf",t.lcZ(1,1,e.loader$))},dependencies:[d.sg,d.O5,C.gM,S.p,d.Ov,d.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}}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]}),o})();function $t(o,a){if(1&o&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&o){const n=a.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}let jt=(()=>{class o{constructor(n,e){this.data=n,this.dialogRef=e}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(h.WI),t.Y36(h.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(n,e){1&n&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return e.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,$t,5,2,"tr",4),t.qZA()()()()),2&n&&(t.Q6J("config",e.modalConfig),t.xp6(10),t.Q6J("ngForOf",e.data.variants))},dependencies:[d.sg,w.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),o})();var F=s(1948);function zt(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function Wt(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",15),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",16),t._uU(3),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();let e;t.xp6(3),t.hij(" Download Product (",null==(e=n.productService.selectedProduct(n.products))?null:e.length,") ")}}function Xt(o,a){if(1&o&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&o){const n=a.item,e=t.oxw();t.xp6(1),t.Q6J("src",e.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const tn=function(o){return[o]},nn=function(){return[]};function en(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",19)(1,"app-product-card",20),t.NdJ("onCheckBoxChange",function(i){const r=t.CHM(n).index,f=t.oxw();return t.KtG(f.onSelectProduct(i,r))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onShowVariantDetail(l))})("onDownload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onDownloadProduct(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanChannel(l))}),t.qZA()()}if(2&o){const n=a.$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,tn,null==n?null:n.Channel):t.DdM(12,nn))("showCheckBox",!0)("scanButton",!0)}}function on(o,a){if(1&o){const n=t.EpF();t.TgZ(0,"div",21)(1,"div",22)(2,"app-custom-paginator",23),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&o){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)}}let an=(()=>{class o{constructor(n,e,i,l,r){this.http=n,this.dialog=e,this.productService=i,this.toastrService=l,this.activateRouter=r,this.searchFilter=new y.k,this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(n=>{this.initPageLoader(n.ID?n.ID:c.g.GuidEMpty)})}initPageLoader(n){this.productService.loader(n).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",{ChannelID:this.searchFilter.ChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,HaveSku:this.searchFilter.HaveSku}).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(n=>(n.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(e=>e.ID==n.ChannelID))),n)).map(n=>(n.Channel.Url=n.Url,n))}setSkuProduct(){this.products=this.products.map(n=>(n.SKU=0==n?.Variant?.length?c.g.IsNotEmpty(n?.ChannelItemSKU)?n?.ChannelItemSKU:"SKU not assigned":n?.Variant[0]?.ChannelVariationSKU?n?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",n))}onSearch(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=c.g.GuidEMpty}onScanAll(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(c.g.GuidEMpty),this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=c.g.GuidEMpty})}openScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=c.g.GuidEMpty,this.dialog.open(m.j,{data:{filter:n,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,g.h)(i=>c.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(n){let e;e="ALL"==n?this.products:this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(n,e){this.products[e].selected=n}onDownloadProduct(n){!confirm(`Are you sure you want to Retrieve product ${n?.Name} from ${n?.Channel.Name} to POS?`)||this.productService.downloadProduct(n).subscribe({next:()=>{this.getProducts()}})}onScanChannel(n){let e=JSON.parse(JSON.stringify(n));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(c.g.GuidEMpty),this.toastrService.success(`product ${n.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${n.Name} is not existed in POS`,"Error")})}onShowVariantDetail(n){let e=this.products[n].Variant;e.length>0&&this.dialog.open(jt,{data:{title:this.products[n].Name,variants:e},width:"30%"})}getRowCount(){let n={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",n).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(h.uw),t.Y36(b.M),t.Y36(I._W),t.Y36(v.gz))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-not-in-pos"]],decls:27,vars:11,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,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,e){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.onSearch(l)}),t.TgZ(1,"actions"),t.YNc(2,zt,3,0,"button",1),t.YNc(3,Wt,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(l){return e.searchFilter.ChannelID=l})("clear",function(){return e.onClearChannelFilter()}),t.YNc(11,Xt,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(l){return e.searchFilter.HaveSku=l}),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,en,2,13,"div",11),t.qZA(),t.YNc(26,on,3,4,"div",12),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!e.productService.hasSelection(e.products)),t.xp6(1),t.Q6J("ngIf",e.productService.hasSelection(e.products)),t.xp6(7),t.Q6J("clearable",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",e.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",e.products),t.xp6(1),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0))},dependencies:[d.sg,d.O5,u.JJ,u.On,S.p,P.w9,P.ir,N,O.y,F.VQ,F.U0],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}}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]}),o})();function ln(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",14),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onZoomImage(i))}),t.qZA(),t.BQk()}if(2&o){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function rn(o,a){1&o&&t._UZ(0,"img",15)}function cn(o,a){if(1&o&&(t.TgZ(0,"div",16),t._UZ(1,"i",17),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&o){const n=t.oxw();t.xp6(3),t.Oqu(n.code)}}const sn=function(o){return{"border-bottom":o}};function dn(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"div",28)(2,"div",29),t._uU(3),t.qZA(),t.TgZ(4,"div")(5,"a",30),t._UZ(6,"i",31),t.qZA()()(),t.BQk()),2&o){const n=a.$implicit,e=a.index,i=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(3,sn,e!==(null==i?null:i.Map.length)-1)),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(2),t.Q6J("href",n.URL,t.LSH)}}const pn=function(o){return{"border-bottom-0":o}};function un(o,a){if(1&o&&(t.TgZ(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),t._UZ(4,"img",22),t.TgZ(5,"span",23),t._uU(6),t.qZA(),t.TgZ(7,"span",24)(8,"h4"),t._uU(9),t.qZA()()()()(),t.TgZ(10,"div",25)(11,"div",26),t.YNc(12,dn,7,5,"ng-container",27),t.qZA()()()),2&o){const n=a.$implicit,e=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(11,pn,i.channels.length-1==e)),t.xp6(1),t.Q6J("id","heading"+e+i.code),t.xp6(1),t.uIk("data-bs-target","#collapse"+e+i.code)("aria-controls","#collapse"+e+i.code),t.xp6(2),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>30?n.Name:""),t.xp6(1),t.Oqu(n.Name),t.xp6(3),t.hij("- ",n.Map.length," Listing"),t.xp6(1),t.Q6J("id","collapse"+e+i.code),t.uIk("aria-labelledby","heading"+e+i.code),t.xp6(2),t.Q6J("ngForOf",n.Map)}}let hn=(()=>{class o{constructor(n){this.biggerPictureService=n}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}onZoomImage(n){this.biggerPictureService.openBiggerPicture(n,this.imageForZoom)}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(Z.k))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels"},decls:16,vars:5,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"ps-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa","fa-external-link-alt"]],template:function(n,e){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,ln,2,1,"ng-container",6),t.YNc(7,rn,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t._uU(11),t.qZA(),t.YNc(12,cn,4,1,"div",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"div",12),t.YNc(15,un,13,13,"div",13),t.qZA()()()),2&n){const i=t.MAs(8);t.xp6(6),t.Q6J("ngIf",e.image)("ngIfElse",i),t.xp6(5),t.hij(" ",e.title," "),t.xp6(1),t.Q6J("ngIf",e.code),t.xp6(3),t.Q6J("ngForOf",e.channels)}},dependencies:[d.mk,d.sg,d.O5,C.gM],styles:[".productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e\")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}"]}),o})();function gn(o,a){if(1&o&&(t.TgZ(0,"span",9),t._UZ(1,"img",10),t.qZA(),t._uU(2)),2&o){const n=a.item,e=t.oxw();t.xp6(1),t.Q6J("src",e.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function mn(o,a){if(1&o&&(t.TgZ(0,"div",12),t._UZ(1,"app-duplicate-product-card",13),t.qZA()),2&o){const n=a.$implicit;t.xp6(1),t.Q6J("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function _n(o,a){if(1&o&&(t.ynx(0),t.YNc(1,mn,2,5,"div",11),t.BQk()),2&o){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.products)}}function Cn(o,a){1&o&&(t.TgZ(0,"div",14)(1,"div"),t._UZ(2,"i",15),t.qZA(),t.TgZ(3,"h4",16),t._uU(4,"No product found"),t.qZA(),t.TgZ(5,"h6",17),t._uU(6,"Once you have a duplicate product"),t.qZA(),t.TgZ(7,"h6",18),t._uU(8,"you`ll see them here"),t.qZA()())}function fn(o,a){if(1&o){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",19)(2,"div",20)(3,"app-custom-paginator",21),t.NdJ("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPrevPage())})("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())}),t.qZA()()(),t.BQk()}if(2&o){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)}}let xn=(()=>{class o{constructor(n,e){this.httpService=n,this.productService=e,this.searchFilter=new y.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.channelOptions=n.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(e=>{this.products=e.Data})}onSearch(n){this.searchFilter.text=n,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=c.g.GuidEMpty}getChannelLogo(n){return c.g.getChannelLogoByTypeId(n)}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(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}}return o.\u0275fac=function(n){return new(n||o)(t.Y36(x.O),t.Y36(b.M))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-duplicate-sku"]],decls:15,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"],[4,"ngIf","ngIfElse"],["EMPTY",""],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[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(n,e){if(1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return e.onSearch(l)}),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(l){return e.searchFilter.ChannelID=l})("clear",function(){return e.onClearFilter()}),t.YNc(7,gn,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,_n,2,1,"ng-container",6),t.YNc(12,Cn,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(14,fn,4,4,"ng-container",8),t.qZA()()()),2&n){const i=t.MAs(13);t.xp6(6),t.Q6J("clearable",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0)("ngIfElse",i),t.xp6(3),t.Q6J("ngIf",(null==e.products?null:e.products.length)>0)}},dependencies:[d.sg,d.O5,u.JJ,u.On,S.p,P.w9,P.ir,O.y,hn]}),o})();var T=s(8063);const Pn=[{path:"",component:q,children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:St,canActivate:[T.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:Zt,canActivate:[T.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Gt,canActivate:[T.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:an,canActivate:[T.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:xn,canActivate:[T.a],data:{title:"Duplicate Sku in Channel"}}]}];let bn=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,v.Bz.forChild(Pn)]}),o})();var Sn=s(8739),vn=s(2594);let In=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,u.u5,C.AV]}),o})();var Tn=s(7459);let yn=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,u.u5,C.AV]}),o})(),Mn=(()=>{class o{}return o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[d.ez,U.Z,u.u5,v.Bz,bn,C.AV,S.R,P.A0,Sn.TU,vn.K,In,Tn.W,yn,F.Fk]}),o})()}}]);
|