marketplacepos 3.16.3 → 3.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-HTD4ZOG5.js → chunk-44ILHEAX.js} +1 -1
- package/Marketplace/{chunk-UYGZ7SP4.js → chunk-5WPUUMMO.js} +1 -1
- package/Marketplace/{chunk-5MT3KUSR.js → chunk-7KOJ3DFL.js} +1 -1
- package/Marketplace/{chunk-VKPJF7Y6.js → chunk-B6YCFV4S.js} +1 -1
- package/Marketplace/{chunk-U6K6ELJH.js → chunk-BNZ3QXNI.js} +1 -1
- package/Marketplace/{chunk-N7BCDU3X.js → chunk-BWVM6BFT.js} +1 -1
- package/Marketplace/{chunk-45HUQD7V.js → chunk-CLF7PUXF.js} +1 -1
- package/Marketplace/{chunk-HMGGITJC.js → chunk-DPNIWGU4.js} +1 -1
- package/Marketplace/{chunk-3FADAJBD.js → chunk-FIKLTG2J.js} +1 -1
- package/Marketplace/{chunk-XNZXKVHI.js → chunk-FXRODXJT.js} +1 -1
- package/Marketplace/{chunk-KDEIULW7.js → chunk-HZAWDUWT.js} +1 -1
- package/Marketplace/{chunk-P74VD2YF.js → chunk-K5ONTCUO.js} +1 -1
- package/Marketplace/{chunk-OFWCX47E.js → chunk-KWJMZUFP.js} +1 -1
- package/Marketplace/{chunk-GGCXGP3I.js → chunk-MJY3XQ7R.js} +1 -1
- package/Marketplace/{chunk-6MXP6XVM.js → chunk-OSUCZSOM.js} +1 -1
- package/Marketplace/{chunk-IRQKY4CE.js → chunk-PED3UNE6.js} +1 -1
- package/Marketplace/{chunk-K76K7XC4.js → chunk-PHFMXSJW.js} +1 -1
- package/Marketplace/{chunk-ZPAK5MJ6.js → chunk-Q2SEJTHF.js} +1 -1
- package/Marketplace/{chunk-CX6LM3WN.js → chunk-QRSQP67K.js} +1 -1
- package/Marketplace/{chunk-SZEDQTEX.js → chunk-SJZYEO7J.js} +1 -1
- package/Marketplace/{chunk-KMIJYZWR.js → chunk-SUKXIUAB.js} +1 -1
- package/Marketplace/{chunk-Q3PU3YBD.js → chunk-TF2NEU67.js} +1 -1
- package/Marketplace/{chunk-MA4BUBUL.js → chunk-TS376PJ5.js} +1 -1
- package/Marketplace/{chunk-JBT2QHON.js → chunk-WIURRHOQ.js} +1 -1
- package/Marketplace/{chunk-AEA453K7.js → chunk-Z4BGJOTF.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-V54J4AKA.js → main-S6TN6MGA.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as me}from"./chunk-BVIRHZTZ.js";import{e as _e}from"./chunk-DDUQ3IZU.js";import{a as ge,g as be}from"./chunk-N7BCDU3X.js";import{b as fe,e as S}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{A as pe,c as te,h as ne,i as ie,k as oe,m as re,n as ae,t as se,u as de,v as ce,w as le}from"./chunk-VFLG2BDB.js";import{a as M,c as ue,d as he,f as xe}from"./chunk-T4MH7AFK.js";import{$ as R,$a as m,$b as K,Cb as W,Db as q,Dc as ee,Eb as H,Ha as w,Hb as P,Ia as c,Ib as a,Ja as p,Jb as C,Kb as B,Lb as Y,Mb as I,Nb as L,Ob as T,Q as F,Tb as G,Uc as y,Wc as v,Za as f,Zc as j,_b as Q,aa as A,bc as $,db as U,ga as x,ha as N,lb as i,mb as r,nb as l,oa as b,ob as k,pa as _,pb as E,rb as z,tc as J,ub as u,vc as D,wb as g,wc as X,zc as Z}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),m("href",d.href,w),c(),m("src",d.imgSrc,w),c(),m("href",d.href,w),c(),C(d.title),c(2),C(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),m("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),m("src",d.img,w)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),m("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),m("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),m("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),m("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),m("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),m("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),m("ngIf",e.browser!="edge"),c(),m("ngIf",n.invalid&&(n.dirty||n.touched))}}var we=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY}],this.version=ge.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([me.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(p(v),p(fe),p(Ce),p(be),p(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","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-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),m("newsList",K(6,5,s.news$)),c(3),m("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),m("href",s.changelogUrl,w),c(),B("version ",s.version,"")}},dependencies:[J,D,X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var He=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,pe,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
|
|
1
|
+
import{a as me}from"./chunk-BVIRHZTZ.js";import{e as _e}from"./chunk-DDUQ3IZU.js";import{a as ge,g as be}from"./chunk-BWVM6BFT.js";import{b as fe,e as S}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{A as pe,c as te,h as ne,i as ie,k as oe,m as re,n as ae,t as se,u as de,v as ce,w as le}from"./chunk-VFLG2BDB.js";import{a as M,c as ue,d as he,f as xe}from"./chunk-T4MH7AFK.js";import{$ as R,$a as m,$b as K,Cb as W,Db as q,Dc as ee,Eb as H,Ha as w,Hb as P,Ia as c,Ib as a,Ja as p,Jb as C,Kb as B,Lb as Y,Mb as I,Nb as L,Ob as T,Q as F,Tb as G,Uc as y,Wc as v,Za as f,Zc as j,_b as Q,aa as A,bc as $,db as U,ga as x,ha as N,lb as i,mb as r,nb as l,oa as b,ob as k,pa as _,pb as E,rb as z,tc as J,ub as u,vc as D,wb as g,wc as X,zc as Z}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),m("href",d.href,w),c(),m("src",d.imgSrc,w),c(),m("href",d.href,w),c(),C(d.title),c(2),C(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),m("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),m("src",d.img,w)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),m("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),m("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),m("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),m("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),m("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),m("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),m("ngIf",e.browser!="edge"),c(),m("ngIf",n.invalid&&(n.dirty||n.touched))}}var we=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY}],this.version=ge.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([me.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(p(v),p(fe),p(Ce),p(be),p(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","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-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),m("newsList",K(6,5,s.news$)),c(3),m("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),m("href",s.changelogUrl,w),c(),B("version ",s.version,"")}},dependencies:[J,D,X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(y),p(S),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[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","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var He=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,pe,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,b as Ot,c as xe}from"./chunk-XGEX66UB.js";import"./chunk-HXV4FH6L.js";import{a as Se}from"./chunk-EVDAHZS7.js";import{a as Z}from"./chunk-7KG3DC5J.js";import{a as $}from"./chunk-43L7CBSZ.js";import{b as fe}from"./chunk-YXUEYLE5.js";import"./chunk-T3POIC5F.js";import"./chunk-V6PMZ6DL.js";import{a as ie,b as oe}from"./chunk-OKB4Q376.js";import{e as at}from"./chunk-XNZXKVHI.js";import{f as ue,g as he,h as _e,i as ge,j as Ce}from"./chunk-ITTQVZJZ.js";import{a as j}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as Tt}from"./chunk-ZCPPEAJQ.js";import{a as z}from"./chunk-6JF7HXB4.js";import{b as ve}from"./chunk-AXDEQQNM.js";import{a as pe,b as de}from"./chunk-CHZBEIYE.js";import{a as re,b as ae,c as le}from"./chunk-KSTCUPYX.js";import{a as tt}from"./chunk-CX6LM3WN.js";import{a as q}from"./chunk-LIJHEC5V.js";import{a as me}from"./chunk-PW6QZKJS.js";import"./chunk-A3ZMDUMP.js";import{f as ce,g as se}from"./chunk-X54LLODL.js";import{a as rt,b as wt,d as Y,e as Yt}from"./chunk-DDUQ3IZU.js";import{g as R}from"./chunk-N7BCDU3X.js";import{b as W,e as K}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{b as Qt,c as Xt,d as J,h as Dt,i as te,j as ee,m as B,n as ne}from"./chunk-SG42JTLJ.js";import{t as yt,u as Mt}from"./chunk-BZ7SMYI7.js";import{P as Zt,X as qt}from"./chunk-DRY23ALE.js";import{A as It,b as Ht,c as ot,h as U,m as L}from"./chunk-VFLG2BDB.js";import{b as H,c as C}from"./chunk-T4MH7AFK.js";import{$a as s,$b as V,Ac as Kt,B as y,Cc as xt,Dc as vt,Ha as D,Hb as G,Ia as c,Ib as d,Ja as S,Jb as et,Kb as w,Mb as O,Nb as T,Ob as F,Qb as Gt,Rb as X,Sb as pt,T as ft,Uc as Pt,V as kt,Vc as Jt,Wc as it,X as Bt,Xc as bt,Za as x,Zc as zt,_b as E,aa as jt,ac as Wt,bc as nt,c as Lt,da as Vt,ga as M,ha as $t,lb as a,mb as l,nb as g,oa as m,ob as P,pa as u,pb as b,q as Rt,rb as v,ub as f,vc as N,wb as p,wc as A,zc as St}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Ne=()=>["/menu/products/download/by-url"],Pe=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),g(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),g(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),d(11,"Download Product By Url"),l()()()()()(),g(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",X(2,Ne)))},dependencies:[ie,Jt,bt]});let o=r;return o})();function ke(o,r){if(o&1&&(a(0,"mat-option",6)(1,"div"),g(2,"img",7),a(3,"span"),d(4),l()()()),o&2){let n=r.$implicit;s("value",n.ChannelID),c(2),s("src",n.logo,D),c(2),et(n.Title)}}var ct=(()=>{let r=class r{constructor(){this.dialogRef=Vt(Qt),this.channels=Vt(Xt)}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new te,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.find(i=>i.ChannelID===this.channelId),e={channelId:this.channelId,channelItemId:t.ChannelItemID};this.dialogRef.close(e)}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-modal-detach-product"]],standalone:!0,features:[Gt],decls:8,vars:4,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(e,i){e&1&&(a(0,"modal-material",0),f("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSave()}),a(1,"div",1)(2,"div")(3,"label",2),d(4,"Select a Channel"),l(),a(5,"mat-form-field",3)(6,"mat-select",4),F("ngModelChange",function(_){return T(i.channelId,_)||(i.channelId=_),_}),x(7,ke,5,3,"mat-option",5),l()()()()()),e&2&&(s("dynamicValidated",i.channelId)("config",i.modalConfig),c(6),O("ngModel",i.channelId),c(),s("ngForOf",i.channels))},dependencies:[vt,N,ee,se,ce,de,pe,qt,It,U,L,Mt]});let o=r;return o})();function Ve(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.onOpenScanDialog())}),g(1,"i",14),d(2," Scan Channel "),l()}}function Ae(o,r){if(o&1&&(P(0),x(1,Ve,3,0,"button",12),b()),o&2){let n=p();c(),s("ngIf",!n.productService.hasSelection(n.products))}}function Ue(o,r){if(o&1){let n=v();P(0),a(1,"button",15),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),g(2,"i",14),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Scan (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Le(o,r){if(o&1){let n=v();P(0),a(1,"button",16),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),g(2,"i",17),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Upload (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Re(o,r){if(o&1){let n=v();a(0,"div",18)(1,"app-product-card",19),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)})("onDetach",function(){let e=m(n).$implicit,i=p();return u(i.onDetachProduct(e))}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)("detachButton",(n==null||n.Channel==null?null:n.Channel.length)>0)}}function Be(o,r){o&1&&(P(0),a(1,"div",20),g(2,"app-empty-state"),l(),b())}function je(o,r){if(o&1){let n=v();P(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var we=(()=>{let r=class r{constructor(t,e,i,h,_,I,st){this.http=t,this.toastr=e,this.dialog=i,this.productService=h,this.authService=_,this.uploadProductService=I,this.route=st,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(Ot,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok]);this.dialog.open(k,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(h=>C.IsNotEmpty(h))).subscribe(h=>{this.searchFilter.ChannelID=h.ChannelID,this.searchFilter.ScanFull=h.ScanFull,this.searchFilter.UpdatedProduct=h.UpdatedProduct;let _=this.productService.selectedProduct(this.products),I=this.productService.getVariantCodesProducts(_);this.scanSingleProduct(I)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(h)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=C.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=C.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onDetachProduct(t){t.Channel=C.assignChannelLogo(t.Channel),this.dialog.open(ct,{width:"600px",data:t.Channel}).afterClosed().pipe(y(e=>C.IsNotEmpty(e)),ft(e=>this.productService.detachProduct(e.channelId,e.channelItemId))).subscribe(e=>{this.toastr.success(e.Message,Dt.Success),this.getProducts()})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(W),S(J),S(j),S(R),S(at),S(it))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let h=v();a(0,"mainpanel",1),f("onSubmit",function(I){return m(h),u(i.searchProduct(I))}),a(1,"actions"),x(2,Ae,2,1,"ng-container",2)(3,Ue,4,1,"ng-container",2)(4,Le,4,1,"ng-container",2),l(),a(5,"filters")(6,"div")(7,"label",3),d(8,"Category"),l(),a(9,"ng-select",4),f("ngModelChange",function(I){return m(h),u(i.searchFilter.Category=I)}),l()(),a(10,"div",5)(11,"mat-date-range-input",6)(12,"input",7),F("ngModelChange",function(I){return m(h),T(i.startDate,I)||(i.startDate=I),u(I)}),f("click",function(){m(h);let I=G(15);return u(I.open())}),l(),a(13,"input",8),F("ngModelChange",function(I){return m(h),T(i.endDate,I)||(i.endDate=I),u(I)}),f("click",function(){m(h);let I=G(15);return u(I.open())}),l()(),g(14,"mat-date-range-picker",null,0),l()(),a(16,"content")(17,"div",9)(18,"div",10),x(19,Re,2,11,"div",11)(20,Be,3,0,"ng-container",2),l(),x(21,je,4,4,"ng-container",2),l()()()}if(e&2){let h=G(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",h),c(),O("ngModel",i.startDate),c(),O("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products.length>0)}},dependencies:[N,A,ot,U,L,B,Y,z,q,$,_e,ue,he,ge],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function $e(o,r){if(o&1){let n=v();P(0),a(1,"button",10),f("click",function(){m(n);let e=p();return u(e.onOpenScanDialog())}),g(2,"i",11),d(3," Scan Channel "),l(),b()}}function Ge(o,r){if(o&1){let n=v();P(0),a(1,"button",12),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),g(2,"i",11),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function We(o,r){if(o&1){let n=v();P(0),a(1,"button",13),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),g(2,"i",14),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function Ke(o,r){if(o&1&&(a(0,"span",15),g(1,"img",16),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,D)("alt",n.Name),c(),w(" ",n.Name," ")}}function Je(o,r){if(o&1){let n=v();a(0,"div",17)(1,"label",18),d(2,"Item ID"),l(),a(3,"input",19),F("ngModelChange",function(e){m(n);let i=p();return T(i.searchFilter.Item_id,e)||(i.searchFilter.Item_id=e),u(e)}),l()()}if(o&2){let n=p();c(3),O("ngModel",n.searchFilter.Item_id)}}function ze(o,r){if(o&1){let n=v();a(0,"div",20)(1,"app-product-card",21),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenVariantDetail(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)})("onDetach",function(){let e=m(n).$implicit,i=p();return u(i.onDetachProduct(e))}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)("detachButton",(n==null||n.Channel==null?null:n.Channel.length)>0)}}function He(o,r){o&1&&(P(0),a(1,"div",22),g(2,"app-empty-state"),l(),b())}function Ye(o,r){if(o&1){let n=v();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var ye=(()=>{let r=class r{constructor(t,e,i,h,_,I,st,Ct){this.http=t,this.dialog=e,this.toastr=i,this.productService=h,this.activateRouter=_,this.authService=I,this.route=st,this.uploadProductService=Ct,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=C.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(C.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=C.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(Ot,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(C.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(k,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanProducts(h)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=C.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(k,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let h=this.productService.selectedProduct(this.products),_=this.productService.getVariantCodesProducts(h);this.scanProducts(_)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=C.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=C.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=C.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onDetachProduct(t){t.Channel=C.assignChannelLogo(t.Channel),this.dialog.open(ct,{width:"600px",data:t.Channel}).afterClosed().pipe(y(e=>C.IsNotEmpty(e)),ft(e=>this.productService.detachProduct(e.channelId,e.channelItemId))).subscribe(e=>{this.toastr.success(e.Message,Dt.Success),this.getProducts()})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(J),S(W),S(j),S(Pt),S(R),S(it),S(at))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",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"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return i.searchProduct(_)}),a(1,"actions"),x(2,$e,4,0,"ng-container",1)(3,Ge,4,1,"ng-container",1)(4,We,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),d(8,"Channel"),l(),a(9,"ng-select",3),f("ngModelChange",function(_){return i.searchFilter.ListChannelID=_})("clear",function(){return i.onClearFilterChannel()}),x(10,Ke,3,3,"ng-template",4),l()(),x(11,Je,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),x(15,ze,2,11,"div",8)(16,He,3,0,"ng-container",1),l(),x(17,Ye,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,A,ot,U,L,B,Y,rt,wt,z,q,$],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function qe(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.uploadMultipleProduct())}),g(1,"i",14),d(2),l()}if(o&2){let n=p(2);c(2),w(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Qe(o,r){if(o&1){let n=v();P(0),a(1,"td",29)(2,"input",30),F("ngModelChange",function(e){m(n);let i=p(2).$implicit;return T(i.selected,e)||(i.selected=e),u(e)}),f("ngModelChange",function(){m(n);let e=p(3).ngIf,i=p(3);return u(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=p(2).$implicit;c(),s("rowSpan",n==null?null:n.Variants.length),c(),O("ngModel",n.selected)}}function Xe(o,r){if(o&1){let n=v();P(0),a(1,"img",35),f("click",function(e){m(n);let i=p(3).$implicit,h=p(4);return u(h.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=p(3).$implicit;c(),s("src",n==null?null:n.ImageUrl,D)}}function tn(o,r){o&1&&g(0,"img",36)}function en(o,r){if(o&1&&(P(0),a(1,"td",29)(2,"div",31),x(3,Xe,2,1,"ng-container",11)(4,tn,1,0,"ng-template",null,1,nt),l()(),a(6,"td",32)(7,"h4",33)(8,"span",34),d(9),l()()(),b()),o&2){let n=G(5),t=p(2).$implicit;c(),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(),w(" ",t==null?null:t.Name," ")}}function nn(o,r){if(o&1&&(a(0,"div")(1,"a",25),g(2,"img",37),l()()),o&2){let n=r.$implicit;c(),s("href",n.URL,D),c(),s("src",n.Img,D)("matTooltip",n.Name)}}function on(o,r){if(o&1&&(a(0,"div"),g(1,"img",37),l()),o&2){let n=r.$implicit;c(),s("src",n.Img,D)("matTooltip",n.Name)}}function rn(o,r){if(o&1&&(a(0,"tr"),x(1,Qe,3,2,"ng-container",12)(2,en,10,6,"ng-container",12),a(3,"td"),d(4),l(),a(5,"td")(6,"span"),d(7),l(),a(8,"span",24)(9,"a",25),g(10,"i",26),l()()(),a(11,"td",27)(12,"div",28),x(13,nn,3,3,"div",23),l()(),a(14,"td",27)(15,"div",28),x(16,on,2,2,"div",23),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(),s("ngIf",t==0),c(),s("ngIf",t==0),c(2),w(" ",n.Name," "),c(3),w(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),D),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function an(o,r){if(o&1&&(P(0),x(1,rn,17,7,"tr",23),b()),o&2){let n=r.$implicit;c(),s("ngForOf",n.Variants)}}function ln(o,r){if(o&1&&(a(0,"tbody"),x(1,an,2,1,"ng-container",23),l()),o&2){let n=r.ngIf;c(),s("ngForOf",n)}}function cn(o,r){if(o&1&&(P(0),a(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr"),g(5,"th",18),a(6,"th",19),d(7,"Product"),l(),a(8,"th",20),d(9,"Variant"),l(),a(10,"th",20),d(11,"SKU"),l(),a(12,"th",21),d(13,"Available In"),l(),a(14,"th",22),d(15,"Not Available In"),l()()(),x(16,ln,2,1,"tbody",12),E(17,"async"),l()(),b()),o&2){let n=p(2);c(16),s("ngIf",V(17,1,n.data$))}}function sn(o,r){o&1&&(a(0,"div",38),g(1,"app-empty-state"),l())}function pn(o,r){if(o&1){let n=v();a(0,"span",46),f("click",function(){m(n);let e=p(4);return u(e.getRowCount())}),a(1,"i",47),d(2,"?"),l()()}}function dn(o,r){if(o&1&&(a(0,"span"),d(1),E(2,"number"),l()),o&2){let n=r.ngIf;c(),et(V(2,1,n==null?null:n.Count))}}function mn(o,r){if(o&1){let n=v();a(0,"a",48),f("click",function(){m(n);let e=p(4);return u(e.onNextPage())}),g(1,"i",49),d(2," Next"),l()}}function un(o,r){if(o&1){let n=v();a(0,"a",50),f("click",function(){m(n);let e=p(4);return u(e.onLastPage())}),g(1,"i",51),d(2," Last"),l()}}function hn(o,r){if(o&1&&(P(0),a(1,"div",39)(2,"div",40)(3,"div",41),d(4),E(5,"number"),x(6,pn,3,0,"span",42)(7,dn,3,3,"span",12),E(8,"async"),d(9),l()(),a(10,"div",43),x(11,mn,3,0,"a",44)(12,un,3,0,"a",45),l()(),b()),o&2){let n=p().ngIf,t=p(2);c(4),w(" Showing 1 - ",V(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(),s("ngIf",!t.paginationService.hideCount&&V(8,8,t.rowCount$)),c(2),w(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function _n(o,r){if(o&1&&(P(0),x(1,hn,13,10,"ng-container",12),b()),o&2){let n=r.ngIf;c(),s("ngIf",(n==null?null:n.length)>0)}}function gn(o,r){if(o&1){let n=v();a(0,"mainpanel",3),f("onSubmit",function(e){m(n);let i=p();return u(i.searchProduct(e))}),a(1,"actions"),x(2,qe,3,1,"button",4),a(3,"button",5),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),g(4,"i",6),d(5," Scan Channel "),l(),a(6,"button",7),f("click",function(){m(n);let e=p();return u(e.openExportDialog())}),g(7,"i",8),a(8,"span"),d(9,"Export"),l()()(),a(10,"content")(11,"div",9)(12,"div",10),x(13,cn,18,3,"ng-container",11),E(14,"async"),x(15,sn,2,0,"ng-template",null,0,nt),l(),x(17,_n,2,1,"ng-container",12),E(18,"async"),l()()()}if(o&2){let n,t=G(16),e=p();s("hideSearchDropdown",!0),c(2),s("ngIf",e.hasSelectionProduct),c(11),s("ngIf",((n=V(14,5,e.data$))==null?null:n.length)>0)("ngIfElse",t),c(4),s("ngIf",V(18,7,e.data$))}}var Me=(()=>{let r=class r{constructor(t,e,i,h,_,I,st,Ct,Ee){this.http=t,this.dialog=e,this.toastr=i,this.route=h,this.productService=_,this.paginationService=I,this.biggerPictureService=st,this.authService=Ct,this.uploadProductService=Ee,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=Ct.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Bt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Rt(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=C.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(fe,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};r.\u0275fac=function(e){return new(e||r)(S(K),S(J),S(W),S(it),S(j),S(Se),S(me),S(R),S(at))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["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,"onSubmit","hideSearchDropdown"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[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,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(x(0,gn,19,9,"mainpanel",2),E(1,"async")),e&2&&s("ngIf",V(1,1,i.loader$))},dependencies:[N,A,Ht,U,L,B,yt,$,St,xt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();var Cn=o=>[o],fn=()=>[];function Sn(o,r){if(o&1){let n=v();a(0,"button",15),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),g(1,"i",16),d(2," Scan Channel "),l()}}function xn(o,r){if(o&1){let n=v();P(0),a(1,"button",17),f("click",function(){m(n);let e=p();return u(e.onDownloadAllProduct("SELECTED"))}),g(2,"i",18),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function vn(o,r){if(o&1&&(a(0,"span",19),g(1,"img",20),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,D)("alt",n.Name),c(),w(" ",n.Name," ")}}function Pn(o,r){if(o&1){let n=v();a(0,"div",21)(1,"app-product-card",22),f("onCheckBoxChange",function(e){let i=m(n).index,h=p();return u(h.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=p();return u(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanChannel(e))}),l()()}if(o&2){let n=r.$implicit;c(),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?pt(10,Cn,n==null?null:n.Channel):X(12,fn))("showCheckBox",!0)("scanButton",!0)}}function bn(o,r){o&1&&(P(0),a(1,"div",23),g(2,"app-empty-state"),l(),b())}function In(o,r){if(o&1){let n=v();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var De=(()=>{let r=class r{constructor(t,e,i,h,_,I){this.http=t,this.dialog=e,this.productService=i,this.toastrService=h,this.activateRouter=_,this.authService=I,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(C.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?C.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=C.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(C.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=C.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(C.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(xe,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(J),S(j),S(W),S(Pt),S(R))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[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"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return i.onSearch(_)}),a(1,"actions"),x(2,Sn,3,0,"button",1)(3,xn,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),d(7,"Channel"),l(),a(8,"ng-select",4),F("ngModelChange",function(_){return T(i.searchFilter.ChannelID,_)||(i.searchFilter.ChannelID=_),_}),x(9,vn,3,3,"ng-template",5),l()(),a(10,"div",6)(11,"label",7),d(12,"SKU Assigned"),l(),a(13,"mat-radio-group",8),F("ngModelChange",function(_){return T(i.searchFilter.HaveSku,_)||(i.searchFilter.HaveSku=_),_}),a(14,"mat-radio-button",9),d(15," All "),l(),a(16,"mat-radio-button",9),d(17," Yes "),l(),a(18,"mat-radio-button",9),d(19," No "),l()()(),a(20,"div",6)(21,"label",7),d(22,"Item ID"),l(),a(23,"input",10),F("ngModelChange",function(_){return T(i.searchFilter.Item_id,_)||(i.searchFilter.Item_id=_),_}),l()()(),a(24,"content")(25,"div",11)(26,"div",12),x(27,Pn,2,13,"div",13)(28,bn,3,0,"ng-container",2),l(),x(29,In,3,4,"div",14),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions),O("ngModel",i.searchFilter.ChannelID),c(5),O("ngModel",i.searchFilter.HaveSku),c(),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),O("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,A,ot,U,L,B,Y,rt,re,ae,z,q,$],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function wn(o,r){if(o&1&&(a(0,"span",9),g(1,"img",10),l(),d(2)),o&2){let n=r.item,t=p();c(),s("src",t.getChannelLogo(n.TypeID),D),c(),w(" ",n.Name," ")}}function yn(o,r){if(o&1&&(a(0,"div",11),g(1,"app-duplicate-product-card",12),l()),o&2){let n=r.$implicit,t=r.index;c(),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function Mn(o,r){o&1&&(P(0),a(1,"div",13),g(2,"app-empty-state"),l(),b())}function Dn(o,r){if(o&1){let n=v();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())})("total",function(){m(n);let e=p();return u(e.getRowCount())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var Oe=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=C.GuidEMpty}getChannelLogo(t){return C.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(j),S(R))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return i.onSearch(_)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),d(5,"Channel"),l(),a(6,"ng-select",3),F("ngModelChange",function(_){return T(i.searchFilter.ListChannelID,_)||(i.searchFilter.ListChannelID=_),_}),f("clear",function(){return i.onClearFilter()}),x(7,wn,3,2,"ng-template",4),l()()()(),a(8,"content")(9,"div",5)(10,"div",6),x(11,yn,2,6,"div",7)(12,Mn,3,0,"ng-container",8),l(),x(13,Dn,4,4,"ng-container",8),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions),O("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(),s("ngIf",(i.products==null?null:i.products.length)==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,A,U,L,B,Y,rt,wt,Tt,z,$]});let o=r;return o})();var On=()=>["/menu/products/status/sold-in-channel"],Te=o=>({ID:o}),Tn=()=>["/menu/products/status/not-in-pos"];function Fn(o,r){if(o&1&&(P(0),d(1),b()),o&2){let n=p().$implicit;c(),w(" ",n.Count," ")}}function En(o,r){if(o&1){let n=v();a(0,"span",26),f("click",function(){m(n);let e=p().$implicit,i=p(2);return u(i.getLiveProductCount(e.ID,e))}),g(1,"i",27),l()}}function Nn(o,r){if(o&1){let n=v();a(0,"tr")(1,"td"),g(2,"img",17),a(3,"span",18),d(4),l()(),a(5,"td",19),x(6,Fn,2,1,"ng-container",6)(7,En,2,0,"ng-template",null,1,nt),l(),a(9,"td",19)(10,"a",20),d(11),E(12,"number"),l()(),a(13,"td",19)(14,"a",20),d(15),E(16,"number"),l()(),a(17,"td"),d(18),E(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onScanChannel(e))}),g(23,"i",23),d(24," Scan "),l(),a(25,"button",24),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onClearCache(e.ID))}),g(26,"i",25),d(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=G(8),e=p(2);c(2),s("src",e.getChannelLogo(n.TypeID),D),c(2),et(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",X(18,On))("queryParams",pt(19,Te,n.ID)),c(),w(" ",V(12,11,n.SoldInChannel)," "),c(3),s("routerLink",X(21,Tn))("queryParams",pt(22,Te,n.ID)),c(),w(" ",V(16,13,n.NotInPOS)," "),c(3),w("",n.LastSync?Wt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"Never"," ")}}function kn(o,r){if(o&1&&(P(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),d(6,"Channel"),l(),a(7,"th",11),d(8,"Live Product"),l(),a(9,"th",12),d(10,"Sold In Channel"),l(),a(11,"th",13),d(12,"Product Not in POS"),l(),a(13,"th",14),d(14,"Last Sync"),l(),g(15,"th",15),l()(),a(16,"tbody"),x(17,Nn,28,24,"tr",16),E(18,"async"),l()()(),b()),o&2){let n,t=p();c(17),s("ngForOf",(n=V(18,1,t.channels$))==null?null:n.Data)}}function Vn(o,r){o&1&&(a(0,"div",28),g(1,"app-empty-state"),l())}var Fe=(()=>{let r=class r{constructor(t,e,i,h){this.productService=t,this.toastr=e,this.dialog=i,this.authService=h,this.destroy$=new Lt,this.channelOptions=h.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(kt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(k,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>C.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(h=>h)).subscribe(h=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(h,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(kt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return C.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(S(j),S(W),S(J),S(R))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),x(5,kn,19,3,"ng-container",6),E(6,"async"),x(7,Vn,2,0,"ng-template",null,0,nt),l()()()()()),e&2){let h,_=G(8);s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((h=V(6,4,i.channels$))==null||h.Data==null?null:h.Data.length)>0)("ngIfElse",_)}},dependencies:[N,A,B,yt,bt,$,St,xt,Kt]});let o=r;return o})();var An=[{component:Pe,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:we,canActivate:[tt],data:{title:"Products in POS"}},{path:"sold-in-channel",component:ye,canActivate:[tt],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Me,canActivate:[tt],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:De,canActivate:[tt],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:Oe,canActivate:[tt],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Fe,canActivate:[tt],data:{title:"Channel Statistic"}}]}],mo=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=$t({type:r}),r.\u0275inj=jt({imports:[vt,It,ne,Mt,Yt,ve,le,oe,Tt,z,q,zt.forChild(An),Ce,Zt,ct]});let o=r;return o})();export{mo as StatusModule};
|
|
1
|
+
import{a as k,b as Ot,c as xe}from"./chunk-XGEX66UB.js";import"./chunk-HXV4FH6L.js";import{a as Se}from"./chunk-EVDAHZS7.js";import{a as Z}from"./chunk-7KG3DC5J.js";import{a as $}from"./chunk-43L7CBSZ.js";import{b as fe}from"./chunk-YXUEYLE5.js";import"./chunk-T3POIC5F.js";import"./chunk-V6PMZ6DL.js";import{a as ie,b as oe}from"./chunk-OKB4Q376.js";import{e as at}from"./chunk-FXRODXJT.js";import{f as ue,g as he,h as _e,i as ge,j as Ce}from"./chunk-ITTQVZJZ.js";import{a as j}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as Tt}from"./chunk-ZCPPEAJQ.js";import{a as z}from"./chunk-6JF7HXB4.js";import{b as ve}from"./chunk-AXDEQQNM.js";import{a as pe,b as de}from"./chunk-CHZBEIYE.js";import{a as re,b as ae,c as le}from"./chunk-KSTCUPYX.js";import{a as tt}from"./chunk-QRSQP67K.js";import{a as q}from"./chunk-LIJHEC5V.js";import{a as me}from"./chunk-PW6QZKJS.js";import"./chunk-A3ZMDUMP.js";import{f as ce,g as se}from"./chunk-X54LLODL.js";import{a as rt,b as wt,d as Y,e as Yt}from"./chunk-DDUQ3IZU.js";import{g as R}from"./chunk-BWVM6BFT.js";import{b as W,e as K}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{b as Qt,c as Xt,d as J,h as Dt,i as te,j as ee,m as B,n as ne}from"./chunk-SG42JTLJ.js";import{t as yt,u as Mt}from"./chunk-BZ7SMYI7.js";import{P as Zt,X as qt}from"./chunk-DRY23ALE.js";import{A as It,b as Ht,c as ot,h as U,m as L}from"./chunk-VFLG2BDB.js";import{b as H,c as C}from"./chunk-T4MH7AFK.js";import{$a as s,$b as V,Ac as Kt,B as y,Cc as xt,Dc as vt,Ha as D,Hb as G,Ia as c,Ib as d,Ja as S,Jb as et,Kb as w,Mb as O,Nb as T,Ob as F,Qb as Gt,Rb as X,Sb as pt,T as ft,Uc as Pt,V as kt,Vc as Jt,Wc as it,X as Bt,Xc as bt,Za as x,Zc as zt,_b as E,aa as jt,ac as Wt,bc as nt,c as Lt,da as Vt,ga as M,ha as $t,lb as a,mb as l,nb as g,oa as m,ob as P,pa as u,pb as b,q as Rt,rb as v,ub as f,vc as N,wb as p,wc as A,zc as St}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Ne=()=>["/menu/products/download/by-url"],Pe=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),g(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),g(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),d(11,"Download Product By Url"),l()()()()()(),g(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",X(2,Ne)))},dependencies:[ie,Jt,bt]});let o=r;return o})();function ke(o,r){if(o&1&&(a(0,"mat-option",6)(1,"div"),g(2,"img",7),a(3,"span"),d(4),l()()()),o&2){let n=r.$implicit;s("value",n.ChannelID),c(2),s("src",n.logo,D),c(2),et(n.Title)}}var ct=(()=>{let r=class r{constructor(){this.dialogRef=Vt(Qt),this.channels=Vt(Xt)}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new te,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.find(i=>i.ChannelID===this.channelId),e={channelId:this.channelId,channelItemId:t.ChannelItemID};this.dialogRef.close(e)}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-modal-detach-product"]],standalone:!0,features:[Gt],decls:8,vars:4,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(e,i){e&1&&(a(0,"modal-material",0),f("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSave()}),a(1,"div",1)(2,"div")(3,"label",2),d(4,"Select a Channel"),l(),a(5,"mat-form-field",3)(6,"mat-select",4),F("ngModelChange",function(_){return T(i.channelId,_)||(i.channelId=_),_}),x(7,ke,5,3,"mat-option",5),l()()()()()),e&2&&(s("dynamicValidated",i.channelId)("config",i.modalConfig),c(6),O("ngModel",i.channelId),c(),s("ngForOf",i.channels))},dependencies:[vt,N,ee,se,ce,de,pe,qt,It,U,L,Mt]});let o=r;return o})();function Ve(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.onOpenScanDialog())}),g(1,"i",14),d(2," Scan Channel "),l()}}function Ae(o,r){if(o&1&&(P(0),x(1,Ve,3,0,"button",12),b()),o&2){let n=p();c(),s("ngIf",!n.productService.hasSelection(n.products))}}function Ue(o,r){if(o&1){let n=v();P(0),a(1,"button",15),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),g(2,"i",14),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Scan (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Le(o,r){if(o&1){let n=v();P(0),a(1,"button",16),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),g(2,"i",17),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Upload (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Re(o,r){if(o&1){let n=v();a(0,"div",18)(1,"app-product-card",19),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)})("onDetach",function(){let e=m(n).$implicit,i=p();return u(i.onDetachProduct(e))}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)("detachButton",(n==null||n.Channel==null?null:n.Channel.length)>0)}}function Be(o,r){o&1&&(P(0),a(1,"div",20),g(2,"app-empty-state"),l(),b())}function je(o,r){if(o&1){let n=v();P(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var we=(()=>{let r=class r{constructor(t,e,i,h,_,I,st){this.http=t,this.toastr=e,this.dialog=i,this.productService=h,this.authService=_,this.uploadProductService=I,this.route=st,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(Ot,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok]);this.dialog.open(k,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(h=>C.IsNotEmpty(h))).subscribe(h=>{this.searchFilter.ChannelID=h.ChannelID,this.searchFilter.ScanFull=h.ScanFull,this.searchFilter.UpdatedProduct=h.UpdatedProduct;let _=this.productService.selectedProduct(this.products),I=this.productService.getVariantCodesProducts(_);this.scanSingleProduct(I)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(h)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=C.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=C.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onDetachProduct(t){t.Channel=C.assignChannelLogo(t.Channel),this.dialog.open(ct,{width:"600px",data:t.Channel}).afterClosed().pipe(y(e=>C.IsNotEmpty(e)),ft(e=>this.productService.detachProduct(e.channelId,e.channelItemId))).subscribe(e=>{this.toastr.success(e.Message,Dt.Success),this.getProducts()})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(W),S(J),S(j),S(R),S(at),S(it))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let h=v();a(0,"mainpanel",1),f("onSubmit",function(I){return m(h),u(i.searchProduct(I))}),a(1,"actions"),x(2,Ae,2,1,"ng-container",2)(3,Ue,4,1,"ng-container",2)(4,Le,4,1,"ng-container",2),l(),a(5,"filters")(6,"div")(7,"label",3),d(8,"Category"),l(),a(9,"ng-select",4),f("ngModelChange",function(I){return m(h),u(i.searchFilter.Category=I)}),l()(),a(10,"div",5)(11,"mat-date-range-input",6)(12,"input",7),F("ngModelChange",function(I){return m(h),T(i.startDate,I)||(i.startDate=I),u(I)}),f("click",function(){m(h);let I=G(15);return u(I.open())}),l(),a(13,"input",8),F("ngModelChange",function(I){return m(h),T(i.endDate,I)||(i.endDate=I),u(I)}),f("click",function(){m(h);let I=G(15);return u(I.open())}),l()(),g(14,"mat-date-range-picker",null,0),l()(),a(16,"content")(17,"div",9)(18,"div",10),x(19,Re,2,11,"div",11)(20,Be,3,0,"ng-container",2),l(),x(21,je,4,4,"ng-container",2),l()()()}if(e&2){let h=G(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",h),c(),O("ngModel",i.startDate),c(),O("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products.length>0)}},dependencies:[N,A,ot,U,L,B,Y,z,q,$,_e,ue,he,ge],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function $e(o,r){if(o&1){let n=v();P(0),a(1,"button",10),f("click",function(){m(n);let e=p();return u(e.onOpenScanDialog())}),g(2,"i",11),d(3," Scan Channel "),l(),b()}}function Ge(o,r){if(o&1){let n=v();P(0),a(1,"button",12),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),g(2,"i",11),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function We(o,r){if(o&1){let n=v();P(0),a(1,"button",13),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),g(2,"i",14),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function Ke(o,r){if(o&1&&(a(0,"span",15),g(1,"img",16),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,D)("alt",n.Name),c(),w(" ",n.Name," ")}}function Je(o,r){if(o&1){let n=v();a(0,"div",17)(1,"label",18),d(2,"Item ID"),l(),a(3,"input",19),F("ngModelChange",function(e){m(n);let i=p();return T(i.searchFilter.Item_id,e)||(i.searchFilter.Item_id=e),u(e)}),l()()}if(o&2){let n=p();c(3),O("ngModel",n.searchFilter.Item_id)}}function ze(o,r){if(o&1){let n=v();a(0,"div",20)(1,"app-product-card",21),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenVariantDetail(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)})("onDetach",function(){let e=m(n).$implicit,i=p();return u(i.onDetachProduct(e))}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)("detachButton",(n==null||n.Channel==null?null:n.Channel.length)>0)}}function He(o,r){o&1&&(P(0),a(1,"div",22),g(2,"app-empty-state"),l(),b())}function Ye(o,r){if(o&1){let n=v();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var ye=(()=>{let r=class r{constructor(t,e,i,h,_,I,st,Ct){this.http=t,this.dialog=e,this.toastr=i,this.productService=h,this.activateRouter=_,this.authService=I,this.route=st,this.uploadProductService=Ct,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=C.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(C.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=C.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(Ot,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(C.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(k,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanProducts(h)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=C.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(k,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let h=this.productService.selectedProduct(this.products),_=this.productService.getVariantCodesProducts(h);this.scanProducts(_)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=C.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=C.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=C.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onDetachProduct(t){t.Channel=C.assignChannelLogo(t.Channel),this.dialog.open(ct,{width:"600px",data:t.Channel}).afterClosed().pipe(y(e=>C.IsNotEmpty(e)),ft(e=>this.productService.detachProduct(e.channelId,e.channelItemId))).subscribe(e=>{this.toastr.success(e.Message,Dt.Success),this.getProducts()})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(J),S(W),S(j),S(Pt),S(R),S(it),S(at))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",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"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return i.searchProduct(_)}),a(1,"actions"),x(2,$e,4,0,"ng-container",1)(3,Ge,4,1,"ng-container",1)(4,We,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),d(8,"Channel"),l(),a(9,"ng-select",3),f("ngModelChange",function(_){return i.searchFilter.ListChannelID=_})("clear",function(){return i.onClearFilterChannel()}),x(10,Ke,3,3,"ng-template",4),l()(),x(11,Je,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),x(15,ze,2,11,"div",8)(16,He,3,0,"ng-container",1),l(),x(17,Ye,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,A,ot,U,L,B,Y,rt,wt,z,q,$],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function qe(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.uploadMultipleProduct())}),g(1,"i",14),d(2),l()}if(o&2){let n=p(2);c(2),w(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Qe(o,r){if(o&1){let n=v();P(0),a(1,"td",29)(2,"input",30),F("ngModelChange",function(e){m(n);let i=p(2).$implicit;return T(i.selected,e)||(i.selected=e),u(e)}),f("ngModelChange",function(){m(n);let e=p(3).ngIf,i=p(3);return u(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=p(2).$implicit;c(),s("rowSpan",n==null?null:n.Variants.length),c(),O("ngModel",n.selected)}}function Xe(o,r){if(o&1){let n=v();P(0),a(1,"img",35),f("click",function(e){m(n);let i=p(3).$implicit,h=p(4);return u(h.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=p(3).$implicit;c(),s("src",n==null?null:n.ImageUrl,D)}}function tn(o,r){o&1&&g(0,"img",36)}function en(o,r){if(o&1&&(P(0),a(1,"td",29)(2,"div",31),x(3,Xe,2,1,"ng-container",11)(4,tn,1,0,"ng-template",null,1,nt),l()(),a(6,"td",32)(7,"h4",33)(8,"span",34),d(9),l()()(),b()),o&2){let n=G(5),t=p(2).$implicit;c(),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(),w(" ",t==null?null:t.Name," ")}}function nn(o,r){if(o&1&&(a(0,"div")(1,"a",25),g(2,"img",37),l()()),o&2){let n=r.$implicit;c(),s("href",n.URL,D),c(),s("src",n.Img,D)("matTooltip",n.Name)}}function on(o,r){if(o&1&&(a(0,"div"),g(1,"img",37),l()),o&2){let n=r.$implicit;c(),s("src",n.Img,D)("matTooltip",n.Name)}}function rn(o,r){if(o&1&&(a(0,"tr"),x(1,Qe,3,2,"ng-container",12)(2,en,10,6,"ng-container",12),a(3,"td"),d(4),l(),a(5,"td")(6,"span"),d(7),l(),a(8,"span",24)(9,"a",25),g(10,"i",26),l()()(),a(11,"td",27)(12,"div",28),x(13,nn,3,3,"div",23),l()(),a(14,"td",27)(15,"div",28),x(16,on,2,2,"div",23),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(),s("ngIf",t==0),c(),s("ngIf",t==0),c(2),w(" ",n.Name," "),c(3),w(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),D),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function an(o,r){if(o&1&&(P(0),x(1,rn,17,7,"tr",23),b()),o&2){let n=r.$implicit;c(),s("ngForOf",n.Variants)}}function ln(o,r){if(o&1&&(a(0,"tbody"),x(1,an,2,1,"ng-container",23),l()),o&2){let n=r.ngIf;c(),s("ngForOf",n)}}function cn(o,r){if(o&1&&(P(0),a(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr"),g(5,"th",18),a(6,"th",19),d(7,"Product"),l(),a(8,"th",20),d(9,"Variant"),l(),a(10,"th",20),d(11,"SKU"),l(),a(12,"th",21),d(13,"Available In"),l(),a(14,"th",22),d(15,"Not Available In"),l()()(),x(16,ln,2,1,"tbody",12),E(17,"async"),l()(),b()),o&2){let n=p(2);c(16),s("ngIf",V(17,1,n.data$))}}function sn(o,r){o&1&&(a(0,"div",38),g(1,"app-empty-state"),l())}function pn(o,r){if(o&1){let n=v();a(0,"span",46),f("click",function(){m(n);let e=p(4);return u(e.getRowCount())}),a(1,"i",47),d(2,"?"),l()()}}function dn(o,r){if(o&1&&(a(0,"span"),d(1),E(2,"number"),l()),o&2){let n=r.ngIf;c(),et(V(2,1,n==null?null:n.Count))}}function mn(o,r){if(o&1){let n=v();a(0,"a",48),f("click",function(){m(n);let e=p(4);return u(e.onNextPage())}),g(1,"i",49),d(2," Next"),l()}}function un(o,r){if(o&1){let n=v();a(0,"a",50),f("click",function(){m(n);let e=p(4);return u(e.onLastPage())}),g(1,"i",51),d(2," Last"),l()}}function hn(o,r){if(o&1&&(P(0),a(1,"div",39)(2,"div",40)(3,"div",41),d(4),E(5,"number"),x(6,pn,3,0,"span",42)(7,dn,3,3,"span",12),E(8,"async"),d(9),l()(),a(10,"div",43),x(11,mn,3,0,"a",44)(12,un,3,0,"a",45),l()(),b()),o&2){let n=p().ngIf,t=p(2);c(4),w(" Showing 1 - ",V(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(),s("ngIf",!t.paginationService.hideCount&&V(8,8,t.rowCount$)),c(2),w(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function _n(o,r){if(o&1&&(P(0),x(1,hn,13,10,"ng-container",12),b()),o&2){let n=r.ngIf;c(),s("ngIf",(n==null?null:n.length)>0)}}function gn(o,r){if(o&1){let n=v();a(0,"mainpanel",3),f("onSubmit",function(e){m(n);let i=p();return u(i.searchProduct(e))}),a(1,"actions"),x(2,qe,3,1,"button",4),a(3,"button",5),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),g(4,"i",6),d(5," Scan Channel "),l(),a(6,"button",7),f("click",function(){m(n);let e=p();return u(e.openExportDialog())}),g(7,"i",8),a(8,"span"),d(9,"Export"),l()()(),a(10,"content")(11,"div",9)(12,"div",10),x(13,cn,18,3,"ng-container",11),E(14,"async"),x(15,sn,2,0,"ng-template",null,0,nt),l(),x(17,_n,2,1,"ng-container",12),E(18,"async"),l()()()}if(o&2){let n,t=G(16),e=p();s("hideSearchDropdown",!0),c(2),s("ngIf",e.hasSelectionProduct),c(11),s("ngIf",((n=V(14,5,e.data$))==null?null:n.length)>0)("ngIfElse",t),c(4),s("ngIf",V(18,7,e.data$))}}var Me=(()=>{let r=class r{constructor(t,e,i,h,_,I,st,Ct,Ee){this.http=t,this.dialog=e,this.toastr=i,this.route=h,this.productService=_,this.paginationService=I,this.biggerPictureService=st,this.authService=Ct,this.uploadProductService=Ee,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=Ct.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Bt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Rt(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=C.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(fe,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};r.\u0275fac=function(e){return new(e||r)(S(K),S(J),S(W),S(it),S(j),S(Se),S(me),S(R),S(at))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["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,"onSubmit","hideSearchDropdown"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[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,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(x(0,gn,19,9,"mainpanel",2),E(1,"async")),e&2&&s("ngIf",V(1,1,i.loader$))},dependencies:[N,A,Ht,U,L,B,yt,$,St,xt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();var Cn=o=>[o],fn=()=>[];function Sn(o,r){if(o&1){let n=v();a(0,"button",15),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),g(1,"i",16),d(2," Scan Channel "),l()}}function xn(o,r){if(o&1){let n=v();P(0),a(1,"button",17),f("click",function(){m(n);let e=p();return u(e.onDownloadAllProduct("SELECTED"))}),g(2,"i",18),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function vn(o,r){if(o&1&&(a(0,"span",19),g(1,"img",20),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,D)("alt",n.Name),c(),w(" ",n.Name," ")}}function Pn(o,r){if(o&1){let n=v();a(0,"div",21)(1,"app-product-card",22),f("onCheckBoxChange",function(e){let i=m(n).index,h=p();return u(h.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=p();return u(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanChannel(e))}),l()()}if(o&2){let n=r.$implicit;c(),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?pt(10,Cn,n==null?null:n.Channel):X(12,fn))("showCheckBox",!0)("scanButton",!0)}}function bn(o,r){o&1&&(P(0),a(1,"div",23),g(2,"app-empty-state"),l(),b())}function In(o,r){if(o&1){let n=v();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var De=(()=>{let r=class r{constructor(t,e,i,h,_,I){this.http=t,this.dialog=e,this.productService=i,this.toastrService=h,this.activateRouter=_,this.authService=I,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(C.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?C.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=C.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(C.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=C.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=C.GuidEMpty,this.dialog.open(k,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>C.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(C.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(xe,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(J),S(j),S(W),S(Pt),S(R))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[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"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return i.onSearch(_)}),a(1,"actions"),x(2,Sn,3,0,"button",1)(3,xn,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),d(7,"Channel"),l(),a(8,"ng-select",4),F("ngModelChange",function(_){return T(i.searchFilter.ChannelID,_)||(i.searchFilter.ChannelID=_),_}),x(9,vn,3,3,"ng-template",5),l()(),a(10,"div",6)(11,"label",7),d(12,"SKU Assigned"),l(),a(13,"mat-radio-group",8),F("ngModelChange",function(_){return T(i.searchFilter.HaveSku,_)||(i.searchFilter.HaveSku=_),_}),a(14,"mat-radio-button",9),d(15," All "),l(),a(16,"mat-radio-button",9),d(17," Yes "),l(),a(18,"mat-radio-button",9),d(19," No "),l()()(),a(20,"div",6)(21,"label",7),d(22,"Item ID"),l(),a(23,"input",10),F("ngModelChange",function(_){return T(i.searchFilter.Item_id,_)||(i.searchFilter.Item_id=_),_}),l()()(),a(24,"content")(25,"div",11)(26,"div",12),x(27,Pn,2,13,"div",13)(28,bn,3,0,"ng-container",2),l(),x(29,In,3,4,"div",14),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions),O("ngModel",i.searchFilter.ChannelID),c(5),O("ngModel",i.searchFilter.HaveSku),c(),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),O("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,A,ot,U,L,B,Y,rt,re,ae,z,q,$],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function wn(o,r){if(o&1&&(a(0,"span",9),g(1,"img",10),l(),d(2)),o&2){let n=r.item,t=p();c(),s("src",t.getChannelLogo(n.TypeID),D),c(),w(" ",n.Name," ")}}function yn(o,r){if(o&1&&(a(0,"div",11),g(1,"app-duplicate-product-card",12),l()),o&2){let n=r.$implicit,t=r.index;c(),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function Mn(o,r){o&1&&(P(0),a(1,"div",13),g(2,"app-empty-state"),l(),b())}function Dn(o,r){if(o&1){let n=v();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())})("total",function(){m(n);let e=p();return u(e.getRowCount())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var Oe=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=C.GuidEMpty}getChannelLogo(t){return C.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(S(K),S(j),S(R))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return i.onSearch(_)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),d(5,"Channel"),l(),a(6,"ng-select",3),F("ngModelChange",function(_){return T(i.searchFilter.ListChannelID,_)||(i.searchFilter.ListChannelID=_),_}),f("clear",function(){return i.onClearFilter()}),x(7,wn,3,2,"ng-template",4),l()()()(),a(8,"content")(9,"div",5)(10,"div",6),x(11,yn,2,6,"div",7)(12,Mn,3,0,"ng-container",8),l(),x(13,Dn,4,4,"ng-container",8),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions),O("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(),s("ngIf",(i.products==null?null:i.products.length)==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,A,U,L,B,Y,rt,wt,Tt,z,$]});let o=r;return o})();var On=()=>["/menu/products/status/sold-in-channel"],Te=o=>({ID:o}),Tn=()=>["/menu/products/status/not-in-pos"];function Fn(o,r){if(o&1&&(P(0),d(1),b()),o&2){let n=p().$implicit;c(),w(" ",n.Count," ")}}function En(o,r){if(o&1){let n=v();a(0,"span",26),f("click",function(){m(n);let e=p().$implicit,i=p(2);return u(i.getLiveProductCount(e.ID,e))}),g(1,"i",27),l()}}function Nn(o,r){if(o&1){let n=v();a(0,"tr")(1,"td"),g(2,"img",17),a(3,"span",18),d(4),l()(),a(5,"td",19),x(6,Fn,2,1,"ng-container",6)(7,En,2,0,"ng-template",null,1,nt),l(),a(9,"td",19)(10,"a",20),d(11),E(12,"number"),l()(),a(13,"td",19)(14,"a",20),d(15),E(16,"number"),l()(),a(17,"td"),d(18),E(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onScanChannel(e))}),g(23,"i",23),d(24," Scan "),l(),a(25,"button",24),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onClearCache(e.ID))}),g(26,"i",25),d(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=G(8),e=p(2);c(2),s("src",e.getChannelLogo(n.TypeID),D),c(2),et(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",X(18,On))("queryParams",pt(19,Te,n.ID)),c(),w(" ",V(12,11,n.SoldInChannel)," "),c(3),s("routerLink",X(21,Tn))("queryParams",pt(22,Te,n.ID)),c(),w(" ",V(16,13,n.NotInPOS)," "),c(3),w("",n.LastSync?Wt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"Never"," ")}}function kn(o,r){if(o&1&&(P(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),d(6,"Channel"),l(),a(7,"th",11),d(8,"Live Product"),l(),a(9,"th",12),d(10,"Sold In Channel"),l(),a(11,"th",13),d(12,"Product Not in POS"),l(),a(13,"th",14),d(14,"Last Sync"),l(),g(15,"th",15),l()(),a(16,"tbody"),x(17,Nn,28,24,"tr",16),E(18,"async"),l()()(),b()),o&2){let n,t=p();c(17),s("ngForOf",(n=V(18,1,t.channels$))==null?null:n.Data)}}function Vn(o,r){o&1&&(a(0,"div",28),g(1,"app-empty-state"),l())}var Fe=(()=>{let r=class r{constructor(t,e,i,h){this.productService=t,this.toastr=e,this.dialog=i,this.authService=h,this.destroy$=new Lt,this.channelOptions=h.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(kt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(k,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>C.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(h=>h)).subscribe(h=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(h,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(kt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return C.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(S(j),S(W),S(J),S(R))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),x(5,kn,19,3,"ng-container",6),E(6,"async"),x(7,Vn,2,0,"ng-template",null,0,nt),l()()()()()),e&2){let h,_=G(8);s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((h=V(6,4,i.channels$))==null||h.Data==null?null:h.Data.length)>0)("ngIfElse",_)}},dependencies:[N,A,B,yt,bt,$,St,xt,Kt]});let o=r;return o})();var An=[{component:Pe,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:we,canActivate:[tt],data:{title:"Products in POS"}},{path:"sold-in-channel",component:ye,canActivate:[tt],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Me,canActivate:[tt],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:De,canActivate:[tt],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:Oe,canActivate:[tt],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Fe,canActivate:[tt],data:{title:"Channel Statistic"}}]}],mo=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=$t({type:r}),r.\u0275inj=jt({imports:[vt,It,ne,Mt,Yt,ve,le,oe,Tt,z,q,zt.forChild(An),Ce,Zt,ct]});let o=r;return o})();export{mo as StatusModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u}from"./chunk-OKB4Q376.js";import{a as f}from"./chunk-
|
|
1
|
+
import{b as u}from"./chunk-OKB4Q376.js";import{a as f}from"./chunk-QRSQP67K.js";import"./chunk-BWVM6BFT.js";import"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-SG42JTLJ.js";import"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A as d}from"./chunk-VFLG2BDB.js";import"./chunk-T4MH7AFK.js";import{Dc as n,Vc as c,Zc as m,aa as r,ga as s,ha as i,nb as a}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-SUKXIUAB.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
|