marketplacepos 3.8.1 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/Marketplace/chunk-242B7NP7.js +1 -0
  2. package/Marketplace/{chunk-NAEMHFU6.js → chunk-2EXATU5W.js} +1 -1
  3. package/Marketplace/{chunk-IMFH7WFG.js → chunk-2RONT4ST.js} +1 -1
  4. package/Marketplace/{chunk-DA4UBQ6T.js → chunk-33CWJ4LL.js} +1 -1
  5. package/Marketplace/{chunk-TFQCZI34.js → chunk-35WGWVLZ.js} +1 -1
  6. package/Marketplace/{chunk-RETKAPTF.js → chunk-44VMN3LV.js} +1 -1
  7. package/Marketplace/{chunk-TQJIZCCP.js → chunk-4FBGGOCN.js} +1 -1
  8. package/Marketplace/{chunk-37QRXNHL.js → chunk-5GBKSKSY.js} +1 -1
  9. package/Marketplace/{chunk-UB2SO5FH.js → chunk-5NH2BLO5.js} +1 -1
  10. package/Marketplace/{chunk-DISN7YDU.js → chunk-75VMU2GA.js} +1 -1
  11. package/Marketplace/{chunk-P3GTIWZT.js → chunk-ADSWNZ5B.js} +1 -1
  12. package/Marketplace/{chunk-T5BHBKLP.js → chunk-AKBY3A4E.js} +1 -1
  13. package/Marketplace/{chunk-MDECGROU.js → chunk-AQGSSXCJ.js} +1 -1
  14. package/Marketplace/{chunk-5EQJKUPD.js → chunk-BCURYD2D.js} +1 -1
  15. package/Marketplace/chunk-BYZW3Q7Z.js +1 -0
  16. package/Marketplace/chunk-CJK6K43P.js +3 -0
  17. package/Marketplace/{chunk-FFZY3C5Q.js → chunk-CSJBBZMG.js} +1 -1
  18. package/Marketplace/{chunk-U336COQ5.js → chunk-DEGJCR2Z.js} +1 -1
  19. package/Marketplace/{chunk-IA6YCGYR.js → chunk-DGKT6EFF.js} +1 -1
  20. package/Marketplace/{chunk-HH5CKVSU.js → chunk-EOR5H3VP.js} +1 -1
  21. package/Marketplace/{chunk-LXMF6A2D.js → chunk-FTWI4HTY.js} +1 -1
  22. package/Marketplace/{chunk-I7UUENK4.js → chunk-FYVBP3LO.js} +1 -1
  23. package/Marketplace/{chunk-M6SO3PD2.js → chunk-G3VCDOJM.js} +1 -1
  24. package/Marketplace/{chunk-IIXU6UZQ.js → chunk-GKMSZ2G7.js} +6 -6
  25. package/Marketplace/{chunk-5HJWNYX2.js → chunk-HOODXV6Z.js} +1 -1
  26. package/Marketplace/{chunk-TRMRA2MY.js → chunk-HZTIGL5T.js} +1 -1
  27. package/Marketplace/{chunk-3CFISFVI.js → chunk-IENWM2A5.js} +1 -1
  28. package/Marketplace/chunk-JY3HATTW.js +1 -0
  29. package/Marketplace/{chunk-W5BJD34C.js → chunk-K7E34VEK.js} +1 -1
  30. package/Marketplace/{chunk-O6WZ6SUS.js → chunk-MG2WR2OS.js} +1 -1
  31. package/Marketplace/{chunk-ED3LJCLH.js → chunk-MJM3RACS.js} +1 -1
  32. package/Marketplace/{chunk-C3LZQQ2D.js → chunk-NQS7TKBY.js} +1 -1
  33. package/Marketplace/{chunk-JRTDTE2Z.js → chunk-Q43HKL4Q.js} +1 -1
  34. package/Marketplace/{chunk-H6IROSVR.js → chunk-QJH4BQDJ.js} +1 -1
  35. package/Marketplace/{chunk-6LMNYPNT.js → chunk-R2NBLNHA.js} +1 -1
  36. package/Marketplace/{chunk-J3AHKZD5.js → chunk-R7CUNMNY.js} +1 -1
  37. package/Marketplace/{chunk-Q5EKVVUZ.js → chunk-RYPHPZWT.js} +1 -1
  38. package/Marketplace/{chunk-TEB6F5W6.js → chunk-SNJ4OGJW.js} +1 -1
  39. package/Marketplace/{chunk-OJP7J7ON.js → chunk-SO2S2COF.js} +1 -1
  40. package/Marketplace/{chunk-OAX5I6ZB.js → chunk-SXD4OV3G.js} +1 -1
  41. package/Marketplace/{chunk-GMIGJPIF.js → chunk-T7BSDAUU.js} +1 -1
  42. package/Marketplace/chunk-U3GEUIZR.js +1 -0
  43. package/Marketplace/{chunk-T4M4P3QI.js → chunk-UNI733XB.js} +1 -1
  44. package/Marketplace/chunk-UYDOMEII.js +1 -0
  45. package/Marketplace/{chunk-C3XJB2JJ.js → chunk-W5E3H6LH.js} +1 -1
  46. package/Marketplace/{chunk-GVR2JR3Z.js → chunk-W5IN44LK.js} +1 -1
  47. package/Marketplace/{chunk-ZXRHR2NQ.js → chunk-WR2GMD7A.js} +1 -1
  48. package/Marketplace/{chunk-SJ3TP2AK.js → chunk-WUIO7HNY.js} +1 -1
  49. package/Marketplace/chunk-WZWRGFQY.js +4 -0
  50. package/Marketplace/{chunk-6YZZZAHL.js → chunk-XRKZNTAE.js} +1 -1
  51. package/Marketplace/{chunk-H5BMBQQ6.js → chunk-XSBTIDS7.js} +1 -1
  52. package/Marketplace/{chunk-KPZGE2YJ.js → chunk-XZDVZ3WD.js} +1 -1
  53. package/Marketplace/{chunk-BLY7RMYL.js → chunk-YK55AQOC.js} +11 -11
  54. package/Marketplace/{chunk-JEONMBRZ.js → chunk-YV53UBI3.js} +1 -1
  55. package/Marketplace/{chunk-MH7ZUEIW.js → chunk-YW7MMS6Z.js} +1 -1
  56. package/Marketplace/{chunk-XD4V3MKL.js → chunk-ZAQ35KU7.js} +1 -1
  57. package/Marketplace/{chunk-GFLP65ZM.js → chunk-ZK7LR7BI.js} +1 -1
  58. package/Marketplace/{chunk-TXN7HSZL.js → chunk-ZZFDS2BU.js} +1 -1
  59. package/Marketplace/{chunk-UWAF7UOR.js → chunk-ZZXYDJJA.js} +1 -1
  60. package/Marketplace/index.html +2 -2
  61. package/Marketplace/main-SUISKQCV.js +1 -0
  62. package/Marketplace/{styles-K52VRSH2.css → styles-L7HOYSDT.css} +1 -1
  63. package/package.json +1 -1
  64. package/Marketplace/chunk-3VXVMITG.js +0 -1
  65. package/Marketplace/chunk-AQVFFZIT.js +0 -1
  66. package/Marketplace/chunk-FNZOYSSM.js +0 -3
  67. package/Marketplace/chunk-KXMB7BVK.js +0 -4
  68. package/Marketplace/chunk-S6E5SFEQ.js +0 -1
  69. package/Marketplace/chunk-ULM27N62.js +0 -1
  70. package/Marketplace/chunk-VXKUJFSM.js +0 -1
  71. package/Marketplace/chunk-WGLA6FHB.js +0 -1
  72. package/Marketplace/main-VM6NHMT4.js +0 -1
  73. /package/Marketplace/{chunk-EHDGK4UJ.js → chunk-AM4E6RGO.js} +0 -0
  74. /package/Marketplace/{chunk-LRHOML7T.js → chunk-BRJ6NXFU.js} +0 -0
  75. /package/Marketplace/{chunk-FQD2FXYM.js → chunk-HLEHNAF6.js} +0 -0
  76. /package/Marketplace/{chunk-TF4LXD6S.js → chunk-Q2ZROLBG.js} +0 -0
  77. /package/Marketplace/{polyfills-DNJOXZ3O.js → polyfills-WDSAOFCW.js} +0 -0
@@ -0,0 +1 @@
1
+ import{a as pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-AM4E6RGO.js";import{a as me,f as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WZWRGFQY.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WUIO7HNY.js";import{b as X,e as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-EOR5H3VP.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-QJH4BQDJ.js";import{a as ge,c as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-ADSWNZ5B.js";import{d as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-RYPHPZWT.js";import{c as Z,h as ee,i as te,j as ne,k as ie,l as oe,o as re,p as ae,q as se,r as ce,u as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-SO2S2COF.js";import{a as w,c as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-Q2ZROLBG.js";import{$ as j,$a as l,$b as Q,Db as q,Eb as H,Fa as d,Ga as m,Hc as S,Ib as $,Jb as Y,Jc as v,Lb as B,Mb as G,Mc as N,Oa as p,Q as D,Ra as V,Ua as f,Yb as W,Za as i,_a as r,_b as A,aa as I,ab as k,bb as E,cc as K,db as T,ea as x,fa as L,gc as J,hb as g,ja as b,jb as u,ka as _,ob as P,pb as a,qb as C,rb as F,sb as R,xb as U,za as M}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-GKMSZ2G7.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-HLEHNAF6.js";var be=(()=>{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)(m(S),m(y),m(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),g("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(d(16),C(s.code))}});let o=t;return o})();var _e=(()=>{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=j({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function ke(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 c=t.$implicit;d(2),p("href",c.href,M),d(1),p("src",c.imgSrc,M),d(1),p("href",c.href,M),d(1),C(c.title),d(2),C(c.description)}}var Ce=(()=>{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,ke,8,5,"swiper-slide",1),r()),e&2&&(d(1),p("ngForOf",s.newsList))},dependencies:[A],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ie=["subdomainEl"];function Le(o,t){if(o&1&&(k(0),i(1,"div",33),l(2,"img",34),r(),E()),o&2){let c=t.$implicit;d(2),p("src",c.img,M)("title",c.title)("alt",c.title)}}function Te(o,t){if(o&1){let c=T();k(0),i(1,"div",14)(2,"h3",15),a(3," DealPOS Omnichannel "),r(),i(4,"small"),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",16)(7,"div",17)(8,"div",18)(9,"div",19)(10,"span"),l(11,"i",20),r()(),i(12,"input",21,22),g("ngModelChange",function(e){b(c);let s=u();return _(s.subdomain=e)}),r(),i(14,"div")(15,"select",23),g("ngModelChange",function(e){b(c);let s=u();return _(s.domain=e)}),i(16,"option",24),a(17,".dealpos.co.id"),r(),i(18,"option",25),a(19,".dealpos.net"),r(),i(20,"option",26),a(21,".dealpos.com"),r(),i(22,"option",27),a(23,".dealpos.app"),r()()()(),i(24,"div",28)(25,"button",29),g("click",function(){b(c);let e=u();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",30)(28,"div",31),f(29,Le,3,3,"ng-container",32),r()()()(),E()}if(o&2){let c=u();d(12),p("ngModel",c.subdomain),d(3),p("ngModel",c.domain),d(14),p("ngForOf",c.channels)}}function Ae(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ne(o,t){if(o&1&&(k(0),i(1,"div",56),l(2,"div",57),i(3,"div",58),f(4,Ae,2,0,"p",45),r()(),E()),o&2){u();let c=P(14);d(4),p("ngIf",c.errors.required)}}function ze(o,t){if(o&1){let c=T();i(0,"i",61),g("click",function(){b(c);let e=u(3);return _(e.hideShowPassword())}),r()}if(o&2){let c=u(3);V("fa "+c.passwordIcon)}}function De(o,t){if(o&1&&(i(0,"span",59),f(1,ze,1,2,"i",60),r()),o&2){let c=u(2);d(1),p("ngIf",c.password)}}function je(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",56),l(2,"div",57),i(3,"div",58),f(4,je,2,0,"p",45),r()(),E()),o&2){u();let c=P(21);d(4),p("ngIf",c.errors.required)}}var Fe=(o,t)=>({"rounded-end":o,"border-end-0":t});function Re(o,t){if(o&1){let c=T();i(0,"div",35)(1,"h3",36),a(2,"Sign in"),r(),i(3,"h3",37),a(4," to "),i(5,"h6",38),a(6),r(),i(7,"i",39),g("click",function(){b(c);let e=u();return _(e.onEditDomain())}),r()()(),i(8,"form",40)(9,"div",41)(10,"div",19)(11,"span"),l(12,"i",42),r()(),i(13,"input",43,44),g("ngModelChange",function(e){b(c);let s=u();return _(s.username=e)}),r()(),f(15,Ne,5,1,"ng-container",45),i(16,"div",18)(17,"div",19)(18,"span"),l(19,"i",46),r()(),i(20,"input",47,48),g("ngModelChange",function(e){b(c);let s=u();return _(s.password=e)}),r(),f(22,De,2,1,"span",49),r(),f(23,Ve,5,1,"ng-container",45),i(24,"div",50)(25,"button",51),g("click",function(){b(c);let e=u();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",52),l(28,"hr"),i(29,"span",53),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",54),g("click",function(e){b(c);let s=u();return _(s.onLoginByGoogle(e))}),l(34,"i",55),a(35," Sign In with Google "),r()()()}if(o&2){let c=P(14),n=P(21),e=u();d(6),R(" (",e.subdomain,"",e.domain,") "),d(7),p("ngModel",e.username),d(2),p("ngIf",c.invalid&&(c.dirty||c.touched)),d(5),p("type",e.passwordType)("ngClass",U(9,Fe,e.browser=="edge",e.browser!="edge"))("ngModel",e.password),d(2),p("ngIf",e.browser!="edge"),d(1),p("ngIf",n.invalid&&(n.dirty||n.touched))}}var ve=(()=>{let t=class t{constructor(n,e,s,h,Pe){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=Pe,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:w.SHOOPE},{title:"Tokopedia",img:w.TOKOPEDIA},{title:"Tiktok",img:w.TIKTOK},{title:"Woocommerce",img:w.WOOCOMMERCE},{title:"Lazada",img:w.LAZADA},{title:"Shopify",img:w.SHOPIFY}],this.version=me.version,this.news$=h.getNews().pipe(D(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(le.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([pe.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)(m(v),m(X),m(_e),m(fe),m(ge))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&Y(Ie,5),e&2){let h;$(h=B())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[[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"],["USERNAME_PASSWORD",""],[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"],[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,"ngModel","ngModelChange"],["subdomainEl",""],["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,"ngModel","ngModelChange"],["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,"ngModel","ngModelChange"],["usernameCtrl","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,"type","ngClass","ngModel","ngModelChange"],["passwordCtrl","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",0)(1,"div",1)(2,"div",2)(3,"h3",3),a(4,"New Features"),r(),l(5,"POS-news-swiper",4),q(6,"async"),r(),i(7,"div",5),f(8,Te,30,3,"ng-container",6)(9,Re,36,12,"ng-template",null,7,G),r()(),i(11,"div",8)(12,"span",9),a(13,"powered by :"),r(),l(14,"a",10),r(),i(15,"div",11)(16,"a",12),a(17),l(18,"i",13),r()()()),e&2){let h=P(10);d(5),p("newsList",H(6,5,s.news$)),d(3),p("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),d(8),p("href",s.changelogUrl,M),d(1),F("version ",s.version,"")}},dependencies:[W,A,Q,oe,ae,se,Z,re,ee,te,ce,ie,ne,Ce,K],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 Me=(()=>{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},e="/api/ChannelAdd/ShopeeV2";this.http.post(e,n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(S),m(y),m(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),g("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(d(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 we=(()=>{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)(m(S),m(y),m(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),g("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(d(16),C(s.code),d(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 Ue=[{path:"",component:ve,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Me,data:{title:"Success"}},{path:"tiktok",component:we,data:{title:"Success"}},{path:"lazada",component:be,data:{title:"Success"}}],Oe=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=L({type:t}),t.\u0275inj=I({imports:[N.forChild(Ue),N]});let o=t;return o})();var wt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=L({type:t}),t.\u0275inj=I({imports:[J,de,Oe,he,ue]});let o=t;return o})();export{wt as LoginModule};
@@ -1 +1 @@
1
- import{b as P,c as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-P3GTIWZT.js";import{r as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-ZXRHR2NQ.js";import{Fa as n,Jc as E,Kc as M,Lb as C,Lc as N,Oa as o,Ua as a,Za as s,Zb as b,_a as m,_b as y,aa as v,ab as p,bb as c,ea as g,fa as x,fc as I,jb as l,mb as f,ob as T,pb as u,rb as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-IIXU6UZQ.js";function D(e,t){if(e&1&&(p(0),s(1,"a",6),u(2),m(),c()),e&2){let i=l().$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function F(e,t){if(e&1&&(s(0,"li",4),a(1,D,3,3,"ng-container",5),m()),e&2){let i=t.$implicit;n(1),o("ngxPermissionsOnly",i.Permissions)}}function L(e,t){if(e&1&&(p(0),a(1,F,2,1,"li",3),c()),e&2){let i=l();n(1),o("ngForOf",i.Tabs)}}function R(e,t){if(e&1&&(s(0,"li",4)(1,"a",6),u(2),m()()),e&2){let i=t.$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function w(e,t){if(e&1&&a(0,R,3,3,"li",3),e&2){let i=l();o("ngForOf",i.Tabs)}}var H=(()=>{let t=class t{constructor(){this.usePermissions=!1}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=g({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs",usePermissions:"usePermissions"},decls:4,vars:2,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],[4,"ngIf","ngIfElse"],["NOT_USE_PERMISSIONS",""],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[4,"ngxPermissionsOnly"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(r,O){if(r&1&&(s(0,"ul",0),a(1,L,2,1,"ng-container",1)(2,w,1,1,"ng-template",null,2,C),m()),r&2){let h=T(3);n(1),o("ngIf",O.usePermissions)("ngIfElse",h)}},dependencies:[b,y,E,M,P]});let e=t;return e})(),J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=x({type:t}),t.\u0275inj=v({imports:[I,N,k,S.forChild()]});let e=t;return e})();export{H as a,J as b};
1
+ import{b as P,c as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-ADSWNZ5B.js";import{r as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WR2GMD7A.js";import{$b as y,Fa as n,Kc as E,Lc as M,Mb as C,Mc as N,Oa as o,Ua as a,Za as s,_a as m,_b as b,aa as v,ab as p,bb as c,ea as g,fa as x,gc as I,jb as l,mb as f,ob as T,pb as u,rb as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-GKMSZ2G7.js";function D(e,t){if(e&1&&(p(0),s(1,"a",6),u(2),m(),c()),e&2){let i=l().$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function F(e,t){if(e&1&&(s(0,"li",4),a(1,D,3,3,"ng-container",5),m()),e&2){let i=t.$implicit;n(1),o("ngxPermissionsOnly",i.Permissions)}}function L(e,t){if(e&1&&(p(0),a(1,F,2,1,"li",3),c()),e&2){let i=l();n(1),o("ngForOf",i.Tabs)}}function R(e,t){if(e&1&&(s(0,"li",4)(1,"a",6),u(2),m()()),e&2){let i=t.$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function w(e,t){if(e&1&&a(0,R,3,3,"li",3),e&2){let i=l();o("ngForOf",i.Tabs)}}var H=(()=>{let t=class t{constructor(){this.usePermissions=!1}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=g({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs",usePermissions:"usePermissions"},decls:4,vars:2,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],[4,"ngIf","ngIfElse"],["NOT_USE_PERMISSIONS",""],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[4,"ngxPermissionsOnly"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(r,O){if(r&1&&(s(0,"ul",0),a(1,L,2,1,"ng-container",1)(2,w,1,1,"ng-template",null,2,C),m()),r&2){let h=T(3);n(1),o("ngIf",O.usePermissions)("ngIfElse",h)}},dependencies:[b,y,E,M,P]});let e=t;return e})(),J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=x({type:t}),t.\u0275inj=v({imports:[I,N,k,S.forChild()]});let e=t;return e})();export{H as a,J as b};
@@ -1 +1 @@
1
- import{a as P}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-TXN7HSZL.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-HH5CKVSU.js";import{B as C,C as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-ZXRHR2NQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-C3XJB2JJ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-OJP7J7ON.js";import{Cb as s,Db as m,Eb as v,Fa as a,Ga as c,Gc as M,Jc as L,Lc as A,Oa as u,Q as f,Ua as g,Za as t,_a as i,_b as x,bc as E,cc as _,dc as D,ea as h,ec as R,fc as b,pb as n,q as y,qb as p,rb as S,ub as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-IIXU6UZQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-FQD2FXYM.js";function j(d,l){if(d&1&&(t(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"h5"),n(6,"General"),i()(),t(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11)(11,"label"),n(12,"Created"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",10)(18,"div",11)(19,"label"),n(20,"Duration"),i(),t(21,"div")(22,"span"),n(23),s(24,"number"),i()()()(),t(25,"div",10)(26,"div",11)(27,"label"),n(28,"Response Code"),i(),t(29,"div")(30,"span"),n(31),i()()()()()()()()(),t(32,"div",4)(33,"div",10)(34,"div",6)(35,"div",7)(36,"h5"),n(37,"Request"),i()(),t(38,"div",8)(39,"div",12)(40,"div",13)(41,"pre"),n(42),s(43,"json"),i()()()()()(),t(44,"div",10)(45,"div",6)(46,"div",7)(47,"h5"),n(48,"Response"),i()(),t(49,"div",8)(50,"div",14)(51,"div",13)(52,"pre"),n(53),s(54,"json"),i()()()()()()()()),d&2){let e=l.ngIf;a(15),p(v(16,5,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),a(8),S("",v(24,8,e==null?null:e.DurationInSecond,"1.1-1")," s"),a(8),p(e==null||e._source==null||e._source.log==null?null:e._source.log.respCode),a(11),p(m(43,11,e==null||e._source==null||e._source.log==null?null:e._source.log.req)),a(11),p(m(54,13,e==null||e._source==null||e._source.log==null?null:e._source.log.res))}}var J=(()=>{let l=class l{constructor(r,o){this.inventoryAsyncServiceLog=r,this.activatedRoute=o}ngOnInit(){let r=this.activatedRoute.snapshot.queryParams;this.initInventoryLog(r?.ID)}initInventoryLog(r){this.inventoryLog$=this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(r).pipe(y(o=>(o.hits[0].DurationInSecond=parseInt(o.hits[0]._source?.Duration)/1e3,o?.hits[0])),f(1))}};l.\u0275fac=function(o){return new(o||l)(c(P),c(M))},l.\u0275cmp=h({type:l,selectors:[["app-inventory-async-detail"]],standalone:!0,features:[I],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory-async",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(o,w){o&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content"),g(5,j,55,15,"div",2),s(6,"async"),i()()),o&2&&(u("headerTitle","Sync Inventory Async")("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),u("ngIf",m(6,4,w.inventoryLog$)))},dependencies:[b,x,E,D,R,_,B,C,A,L]});let d=l;return d})();export{J as InventoryAsyncDetailComponent};
1
+ import{a as P}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-ZZFDS2BU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-EOR5H3VP.js";import{B as C,C as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WR2GMD7A.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-W5E3H6LH.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-SO2S2COF.js";import{$b as x,Db as s,Eb as m,Fa as a,Fb as v,Ga as c,Hc as M,Kc as L,Mc as A,Oa as u,Q as f,Ua as g,Za as t,_a as i,cc as E,dc as _,ea as h,ec as D,fc as R,gc as b,pb as n,q as y,qb as p,rb as S,ub as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-GKMSZ2G7.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-HLEHNAF6.js";function j(d,l){if(d&1&&(t(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"h5"),n(6,"General"),i()(),t(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11)(11,"label"),n(12,"Created"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",10)(18,"div",11)(19,"label"),n(20,"Duration"),i(),t(21,"div")(22,"span"),n(23),s(24,"number"),i()()()(),t(25,"div",10)(26,"div",11)(27,"label"),n(28,"Response Code"),i(),t(29,"div")(30,"span"),n(31),i()()()()()()()()(),t(32,"div",4)(33,"div",10)(34,"div",6)(35,"div",7)(36,"h5"),n(37,"Request"),i()(),t(38,"div",8)(39,"div",12)(40,"div",13)(41,"pre"),n(42),s(43,"json"),i()()()()()(),t(44,"div",10)(45,"div",6)(46,"div",7)(47,"h5"),n(48,"Response"),i()(),t(49,"div",8)(50,"div",14)(51,"div",13)(52,"pre"),n(53),s(54,"json"),i()()()()()()()()),d&2){let e=l.ngIf;a(15),p(v(16,5,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),a(8),S("",v(24,8,e==null?null:e.DurationInSecond,"1.1-1")," s"),a(8),p(e==null||e._source==null||e._source.log==null?null:e._source.log.respCode),a(11),p(m(43,11,e==null||e._source==null||e._source.log==null?null:e._source.log.req)),a(11),p(m(54,13,e==null||e._source==null||e._source.log==null?null:e._source.log.res))}}var J=(()=>{let l=class l{constructor(r,o){this.inventoryAsyncServiceLog=r,this.activatedRoute=o}ngOnInit(){let r=this.activatedRoute.snapshot.queryParams;this.initInventoryLog(r?.ID)}initInventoryLog(r){this.inventoryLog$=this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(r).pipe(y(o=>(o.hits[0].DurationInSecond=parseInt(o.hits[0]._source?.Duration)/1e3,o?.hits[0])),f(1))}};l.\u0275fac=function(o){return new(o||l)(c(P),c(M))},l.\u0275cmp=h({type:l,selectors:[["app-inventory-async-detail"]],standalone:!0,features:[I],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory-async",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(o,w){o&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content"),g(5,j,55,15,"div",2),s(6,"async"),i()()),o&2&&(u("headerTitle","Sync Inventory Async")("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),u("ngIf",m(6,4,w.inventoryLog$)))},dependencies:[b,x,E,D,R,_,B,C,A,L]});let d=l;return d})();export{J as InventoryAsyncDetailComponent};
@@ -1 +1 @@
1
- import{a as j,b as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-T5BHBKLP.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-GVR2JR3Z.js";import{g as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-C3LZQQ2D.js";import{A as B,q as A,s as V,t as R,z as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-ZXRHR2NQ.js";import{_ as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-C3XJB2JJ.js";import{h as N,k as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-OJP7J7ON.js";import{b as d,c as h}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-TF4LXD6S.js";import{$a as D,Cb as O,Eb as w,Fa as n,Ga as _,Ic as x,Oa as o,Ua as v,Za as l,Zb as E,_a as s,_b as P,cc as U,db as y,ea as b,hb as u,ja as C,jb as c,ka as g,pb as p,qb as M,rb as T,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-IIXU6UZQ.js";function W(r,m){if(r&1&&(l(0,"mat-option",9)(1,"div",10),D(2,"img",11),l(3,"span"),p(4),s()()()),r&2){let t=m.$implicit;o("value",t.ID)("disabled",t.disabled),n(1),o("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),n(1),o("src",t.Img,I),n(2),M(t.Name)}}function J(r,m){if(r&1){let t=y();l(0,"div",12)(1,"label",13),p(2,"Scan Type"),s(),l(3,"mat-radio-group",14),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.ScanFull=a)}),l(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),s(),l(6,"mat-radio-button",16),p(7," Active "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.ScanFull),n(1),o("value",!0),n(2),o("value",!1)}}function K(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2),O(3,"date"),s(),l(4,"mat-radio-group",18),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.UpdatedProduct=a)}),l(5,"mat-radio-button",19),p(6," Scan All Products "),s(),l(7,"mat-radio-button",20),p(8),s()()()}if(r&2){let t=c();n(2),T(" Last Scan: ",w(3,6,t.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),n(2),o("ngModel",t.filter.UpdatedProduct),n(1),o("value",!1),n(2),o("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),n(1),T(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function $(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2," Scan Option "),s(),l(3,"mat-radio-group",21),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.Async=a)}),l(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),s(),l(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.Async),n(1),o("value",!0),n(2),o("value",!1)}}var pe=(()=>{let m=class m{constructor(i,a,e){this.dialogRef=i,this.data=a,this.router=e,this.channelType=d,this.disabledChannelOption=!1,this.filter={ChannelID:h.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=h.IsNotEmpty(a.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=h.IsEmpty(a.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new L,this.modalConfig.title="Scan Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(i=>(i.disabled=!0,(i.TypeID==d.Tiktok||i.TypeID==d.Tokopedia||i.TypeID==d.Lazada||i.TypeID==d.WooCommerce)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let a=this.filterChannelById(i);this.selectedChannel=a,this.filter.Async=!0,this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&h.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==d.ShopeeV2||this.selectedChannel.TypeID==d.Tiktok||this.selectedChannel.TypeID==d.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=d.WooCommerce&&this.selectedChannel?.TypeID!=d.KalCare&&this.selectedChannel?.TypeID!=d.None&&h.IsNotEmpty(this.selectedChannel?.LastSync)&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(i){let a;return this.channelOptions&&(a=this.channelOptions.find(e=>e.ID==i)),a}submit(){this.selectedChannel.TypeID==d.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):(this.beforeSubmit(),this.dialogRef.close(this.filter))}beforeSubmit(){this.filter.UpdatedProduct&&(this.filter.Async=!1)}isNotEmpty(i){return h.IsNotEmpty(i)}onClose(){this.dialogRef.close()}};m.\u0275fac=function(a){return new(a||m)(_(V),_(R),_(x))},m.\u0275cmp=b({type:m,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"disabled","ngModel","ngModelChange"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"mt-8"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(a,e){a&1&&(l(0,"modal-material",0),u("onOk",function(){return e.submit()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),l(1,"div",1)(2,"div",2)(3,"label",3),p(4,"Select a Channel"),s(),l(5,"mat-form-field",4)(6,"mat-select",5),u("ngModelChange",function(S){return e.filter.ChannelID=S})("ngModelChange",function(S){return e.onSelectChannel(S)}),v(7,W,5,5,"mat-option",6),s()(),v(8,J,8,3,"div",7)(9,K,9,9,"div",8)(10,$,8,3,"div",8),s()()()),a&2&&(o("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),n(6),o("disabled",e.disabledChannelOption)("ngModel",e.filter.ChannelID),n(1),o("ngForOf",e.channelOptions),n(1),o("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),n(1),o("ngIf",e.hasScanUpdate),n(1),o("ngIf",!(e.filter!=null&&e.filter.UpdatedProduct)&&!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[E,P,N,F,j,G,H,z,k,A,B,U],encapsulation:2});let r=m;return r})();export{pe as a};
1
+ import{a as j,b as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-AKBY3A4E.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-W5IN44LK.js";import{g as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-NQS7TKBY.js";import{A as B,q as A,s as V,t as R,z as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WR2GMD7A.js";import{_ as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-W5E3H6LH.js";import{h as N,k as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-SO2S2COF.js";import{b as d,c as h}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-Q2ZROLBG.js";import{$a as D,$b as P,Db as O,Fa as n,Fb as w,Ga as _,Jc as x,Oa as o,Ua as v,Za as l,_a as s,_b as E,db as y,dc as U,ea as b,hb as u,ja as C,jb as c,ka as g,pb as p,qb as M,rb as T,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-GKMSZ2G7.js";function W(r,m){if(r&1&&(l(0,"mat-option",9)(1,"div",10),D(2,"img",11),l(3,"span"),p(4),s()()()),r&2){let t=m.$implicit;o("value",t.ID)("disabled",t.disabled),n(1),o("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),n(1),o("src",t.Img,I),n(2),M(t.Name)}}function J(r,m){if(r&1){let t=y();l(0,"div",12)(1,"label",13),p(2,"Scan Type"),s(),l(3,"mat-radio-group",14),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.ScanFull=a)}),l(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),s(),l(6,"mat-radio-button",16),p(7," Active "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.ScanFull),n(1),o("value",!0),n(2),o("value",!1)}}function K(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2),O(3,"date"),s(),l(4,"mat-radio-group",18),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.UpdatedProduct=a)}),l(5,"mat-radio-button",19),p(6," Scan All Products "),s(),l(7,"mat-radio-button",20),p(8),s()()()}if(r&2){let t=c();n(2),T(" Last Scan: ",w(3,6,t.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),n(2),o("ngModel",t.filter.UpdatedProduct),n(1),o("value",!1),n(2),o("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),n(1),T(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function $(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2," Scan Option "),s(),l(3,"mat-radio-group",21),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.Async=a)}),l(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),s(),l(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.Async),n(1),o("value",!0),n(2),o("value",!1)}}var pe=(()=>{let m=class m{constructor(i,a,e){this.dialogRef=i,this.data=a,this.router=e,this.channelType=d,this.disabledChannelOption=!1,this.filter={ChannelID:h.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=h.IsNotEmpty(a.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=h.IsEmpty(a.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new L,this.modalConfig.title="Scan Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(i=>(i.disabled=!0,(i.TypeID==d.Tiktok||i.TypeID==d.Tokopedia||i.TypeID==d.Lazada||i.TypeID==d.WooCommerce)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let a=this.filterChannelById(i);this.selectedChannel=a,this.filter.Async=!0,this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&h.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==d.ShopeeV2||this.selectedChannel.TypeID==d.Tiktok||this.selectedChannel.TypeID==d.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=d.WooCommerce&&this.selectedChannel?.TypeID!=d.KalCare&&this.selectedChannel?.TypeID!=d.None&&h.IsNotEmpty(this.selectedChannel?.LastSync)&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(i){let a;return this.channelOptions&&(a=this.channelOptions.find(e=>e.ID==i)),a}submit(){this.selectedChannel.TypeID==d.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):(this.beforeSubmit(),this.dialogRef.close(this.filter))}beforeSubmit(){this.filter.UpdatedProduct&&(this.filter.Async=!1)}isNotEmpty(i){return h.IsNotEmpty(i)}onClose(){this.dialogRef.close()}};m.\u0275fac=function(a){return new(a||m)(_(V),_(R),_(x))},m.\u0275cmp=b({type:m,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"disabled","ngModel","ngModelChange"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"mt-8"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(a,e){a&1&&(l(0,"modal-material",0),u("onOk",function(){return e.submit()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),l(1,"div",1)(2,"div",2)(3,"label",3),p(4,"Select a Channel"),s(),l(5,"mat-form-field",4)(6,"mat-select",5),u("ngModelChange",function(S){return e.filter.ChannelID=S})("ngModelChange",function(S){return e.onSelectChannel(S)}),v(7,W,5,5,"mat-option",6),s()(),v(8,J,8,3,"div",7)(9,K,9,9,"div",8)(10,$,8,3,"div",8),s()()()),a&2&&(o("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),n(6),o("disabled",e.disabledChannelOption)("ngModel",e.filter.ChannelID),n(1),o("ngForOf",e.channelOptions),n(1),o("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),n(1),o("ngIf",e.hasScanUpdate),n(1),o("ngIf",!(e.filter!=null&&e.filter.UpdatedProduct)&&!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[E,P,N,F,j,G,H,z,k,A,B,U],encapsulation:2});let r=m;return r})();export{pe as a};
@@ -1 +1 @@
1
- import{$a as f,Cb as c,Db as u,Fa as a,Ja as r,Oa as s,Ua as C,Za as o,_a as l,_b as T,db as P,ea as b,ec as w,fc as y,hb as d,ja as v,jb as h,ka as _,pb as m,qb as k,sb as N,ub as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-IIXU6UZQ.js";function I(t,i){if(t&1){let g=P();o(0,"span",10),d("click",function(){v(g);let n=h();return n.getTotal(),_(n.hasClicked=!0)}),o(1,"i",11),m(2,"?"),l()()}}function M(t,i){if(t&1&&(o(0,"span"),m(1),c(2,"number"),l()),t&2){let g=h();a(1),k(u(2,1,g.paginationTotal))}}var O=(()=>{let i=class i{constructor(){this.get=new r,this.change=new r,this.next=new r,this.previous=new r,this.total=new r,this.hasClicked=!1}changePage(p){this.filter.PageNumber=p.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=b({type:i,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[S],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"disabled","click"],[1,"fas","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"disabled","click"],[1,"fas","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(n,e){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),c(4,"number"),c(5,"number"),C(6,I,3,0,"span",3)(7,M,3,3,"span",4),l()(),o(8,"div",5)(9,"button",6),d("click",function(){return e.PreviousPage()}),f(10,"i",7),l(),o(11,"button",8),d("click",function(){return e.NextPage()}),f(12,"i",9),l()()()),n&2&&(a(3),N(" Showing ",u(4,6,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",u(5,8,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),a(3),s("ngIf",!e.hasClicked),a(1),s("ngIf",e.hasClicked),a(2),s("disabled",e.filter.PageNumber==1),a(2),s("disabled",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[y,T,w]});let t=i;return t})();export{O as a};
1
+ import{$a as f,$b as T,Db as c,Eb as u,Fa as a,Ja as r,Oa as s,Ua as C,Za as o,_a as l,db as P,ea as b,fc as w,gc as y,hb as d,ja as v,jb as h,ka as _,pb as m,qb as k,sb as N,ub as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-GKMSZ2G7.js";function I(t,i){if(t&1){let g=P();o(0,"span",10),d("click",function(){v(g);let n=h();return n.getTotal(),_(n.hasClicked=!0)}),o(1,"i",11),m(2,"?"),l()()}}function M(t,i){if(t&1&&(o(0,"span"),m(1),c(2,"number"),l()),t&2){let g=h();a(1),k(u(2,1,g.paginationTotal))}}var O=(()=>{let i=class i{constructor(){this.get=new r,this.change=new r,this.next=new r,this.previous=new r,this.total=new r,this.hasClicked=!1}changePage(p){this.filter.PageNumber=p.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=b({type:i,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[S],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"disabled","click"],[1,"fas","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"disabled","click"],[1,"fas","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(n,e){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),c(4,"number"),c(5,"number"),C(6,I,3,0,"span",3)(7,M,3,3,"span",4),l()(),o(8,"div",5)(9,"button",6),d("click",function(){return e.PreviousPage()}),f(10,"i",7),l(),o(11,"button",8),d("click",function(){return e.NextPage()}),f(12,"i",9),l()()()),n&2&&(a(3),N(" Showing ",u(4,6,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",u(5,8,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),a(3),s("ngIf",!e.hasClicked),a(1),s("ngIf",e.hasClicked),a(2),s("disabled",e.filter.PageNumber==1),a(2),s("disabled",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[y,T,w]});let t=i;return t})();export{O as a};
@@ -1 +1 @@
1
- import{$a as m,Fa as a,Oa as s,Za as i,_a as c,ea as o,pb as p,ub as d,za as r}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-IIXU6UZQ.js";var y=(()=>{let t=class t{constructor(){this.emptyStateImg="https://res.cloudinary.com/pos/image/upload/v1683772105/icons/marketplace_icons/emptyrecord.svg"}ngOnInit(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o({type:t,selectors:[["app-empty-state"]],standalone:!0,features:[d],decls:4,vars:1,consts:[["alt","",2,"width","225px",3,"src"],[1,"text-center","fs-2","text-secondary","mt-4"]],template:function(e,f){e&1&&(i(0,"div"),m(1,"img",0),i(2,"div",1),p(3," No records found "),c()()),e&2&&(a(1),s("src",f.emptyStateImg,r))}});let n=t;return n})();export{y as a};
1
+ import{$a as m,Fa as a,Oa as s,Za as i,_a as c,ea as o,pb as p,ub as d,za as r}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-GKMSZ2G7.js";var y=(()=>{let t=class t{constructor(){this.emptyStateImg="https://res.cloudinary.com/pos/image/upload/v1683772105/icons/marketplace_icons/emptyrecord.svg"}ngOnInit(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o({type:t,selectors:[["app-empty-state"]],standalone:!0,features:[d],decls:4,vars:1,consts:[["alt","",2,"width","225px",3,"src"],[1,"text-center","fs-2","text-secondary","mt-4"]],template:function(e,f){e&1&&(i(0,"div"),m(1,"img",0),i(2,"div",1),p(3," No records found "),c()()),e&2&&(a(1),s("src",f.emptyStateImg,r))}});let n=t;return n})();export{y as a};
@@ -1 +1 @@
1
- import{a as _t,c as q,d as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-MDECGROU.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-LRHOML7T.js";import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-RETKAPTF.js";import{d as Zt,e as qt,f as Yt,g as Qt,k as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-OAX5I6ZB.js";import{a as Y,b as gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-MH7ZUEIW.js";import{a as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-TRMRA2MY.js";import{b as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-TEB6F5W6.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-5EQJKUPD.js";import{a as Xt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-I7UUENK4.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-DA4UBQ6T.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-U336COQ5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-JEONMBRZ.js";import{a as jt,b as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-NAEMHFU6.js";import{e as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-KXMB7BVK.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-SJ3TP2AK.js";import{b as R,e as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-HH5CKVSU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-H6IROSVR.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-P3GTIWZT.js";import{a as Ht}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-GMIGJPIF.js";import{a as Kt,b as Jt,c as zt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-T5BHBKLP.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-GVR2JR3Z.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-C3LZQQ2D.js";import{a as nt,c as H,d as Lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-Q5EKVVUZ.js";import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-GFLP65ZM.js";import{B as V,C as $t,q as ht,r as Bt,u as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-ZXRHR2NQ.js";import{T as Rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-C3XJB2JJ.js";import{b as Ut,c as et,h as $,k as j,u as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-OJP7J7ON.js";import{b as z,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-TF4LXD6S.js";import{$a as C,B as y,Cb as F,Db as T,Eb as Tt,Fa as c,Ga as x,Gc as mt,Hc as kt,Jc as ut,Lb as tt,Lc as Vt,Oa as s,T as J,Ua as S,V as Pt,X as Ot,Za as a,Zb as N,_a as l,_b as E,aa as Ft,ab as v,bb as b,bc as pt,c as wt,cc as Nt,db as P,ea as M,ec as dt,fa as Dt,fc as Et,hb as g,ja as u,jb as d,ka as h,ob as L,pb as m,q as Mt,qb as st,rb as I,vb as Q,wb as it,za as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-IIXU6UZQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.8.1/Marketplace/chunk-FQD2FXYM.js";var de=()=>["/menu/products/download/by-url"],ne=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,de)))},dependencies:[jt,kt,ut]});let o=r;return o})();function me(o,r){if(o&1){let n=P();a(0,"button",13),g("click",function(){u(n);let e=d(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ue(o,r){if(o&1&&(v(0),S(1,me,3,0,"button",12),b()),o&2){let n=d();c(1),s("ngIf",!n.productService.hasSelection(n.products))}}function he(o,r){if(o&1){let n=P();v(0),a(1,"button",15),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function _e(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ge(o,r){if(o&1){let n=P();a(0,"div",18)(1,"app-product-card",19),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),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)}}function Ce(o,r){o&1&&(v(0),a(1,"div",20),C(2,"app-empty-state"),l(),b())}function fe(o,r){if(o&1){let n=P();v(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var oe=(()=>{let r=class r{constructor(t,e,i,p,f){this.http=t,this.toastr=e,this.dialog=i,this.productService=p,this.authService=f,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,[z.Tokopedia,z.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=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_t,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(p)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(x(B),x(R),x(G),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["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,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,i){if(e&1){let p=P();a(0,"mainpanel",0),g("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,ue,2,1,"ng-container",1)(3,he,4,1,"ng-container",1)(4,_e,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Category"),l(),a(9,"ng-select",3),g("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(10,"div",4)(11,"mat-date-range-input",5)(12,"input",6),g("ngModelChange",function(w){return i.startDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l(),a(13,"input",7),g("ngModelChange",function(w){return i.endDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,8),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,ge,2,10,"div",11)(20,Ce,3,0,"ng-container",1),l(),S(21,fe,4,4,"ng-container",1),l()()()}if(e&2){let p=L(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",p),c(1),s("ngModel",i.startDate),c(1),s("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products.length>0)}},dependencies:[N,E,et,$,j,V,H,K,Y,A,Yt,Zt,qt,Qt],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 Se(o,r){if(o&1){let n=P();v(0),a(1,"button",10),g("click",function(){u(n);let e=d();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),b()}}function xe(o,r){if(o&1){let n=P();v(0),a(1,"button",12),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pe(o,r){if(o&1){let n=P();v(0),a(1,"button",13),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ve(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function be(o,r){if(o&1){let n=P();a(0,"div",17)(1,"label",2),m(2,"Item ID"),l(),a(3,"input",18),g("ngModelChange",function(e){u(n);let i=d();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=d();c(3),s("ngModel",n.searchFilter.Item_id)}}function Ie(o,r){if(o&1){let n=P();a(0,"div",19)(1,"app-product-card",20),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),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)}}function ye(o,r){o&1&&(v(0),a(1,"div",21),C(2,"app-empty-state"),l(),b())}function we(o,r){if(o&1){let n=P();a(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var re=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.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,[z.Tokopedia,z.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(_t,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanProducts(p)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let p=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(p);this.scanProducts(f)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.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=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(mt),x(k))},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,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-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"],["alt","",2,"width","18px",3,"src"],[1,"mt-5"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,Se,4,0,"ng-container",1)(3,xe,4,1,"ng-container",1)(4,Pe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(10,ve,3,2,"ng-template",4),l()(),S(11,be,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ie,2,10,"div",8)(16,ye,3,0,"ng-container",1),l(),S(17,we,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(1),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(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,E,et,$,j,V,H,nt,K,Y,A],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 Oe(o,r){if(o&1){let n=P();a(0,"button",10),g("click",function(){u(n);let e=d(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=d(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Fe(o,r){if(o&1){let n=P();v(0),a(1,"td",26)(2,"input",27),g("ngModelChange",function(e){u(n);let i=d(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=d(3).ngIf,i=d(3);return h(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=d(2).$implicit;c(1),s("rowSpan",n==null?null:n.Variants.length),c(1),s("ngModel",n.selected)}}function De(o,r){if(o&1){let n=P();v(0),a(1,"img",33),g("click",function(e){u(n);let i=d(3).$implicit,p=d(4);return h(p.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=d(3).$implicit;c(1),s("src",n==null?null:n.ImageUrl,O)}}function Te(o,r){o&1&&C(0,"img",34)}function Ne(o,r){if(o&1&&(v(0),a(1,"td",26)(2,"div",28),S(3,De,2,1,"ng-container",7)(4,Te,1,0,"ng-template",null,29,tt),l()(),a(6,"td",30)(7,"h4",31)(8,"span",32),m(9),l()()(),b()),o&2){let n=L(5),t=d(2).$implicit;c(1),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(1),I(" ",t==null?null:t.Name," ")}}function Ee(o,r){if(o&1&&(a(0,"div")(1,"a",22),C(2,"img",35),l()()),o&2){let n=r.$implicit;c(1),s("href",n.URL,O),c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function ke(o,r){if(o&1&&(a(0,"div"),C(1,"img",35),l()),o&2){let n=r.$implicit;c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ve(o,r){if(o&1&&(a(0,"tr"),S(1,Fe,3,2,"ng-container",9)(2,Ne,10,6,"ng-container",9),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",21)(9,"a",22),C(10,"i",23),l()()(),a(11,"td",24)(12,"div",25),S(13,Ee,3,3,"div",20),l()(),a(14,"td",24)(15,"div",25),S(16,ke,2,2,"div",20),l()()()),o&2){let n=r.$implicit,t=r.index,e=d(5);c(1),s("ngIf",t==0),c(1),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ue(o,r){if(o&1&&(v(0),S(1,Ve,17,7,"tr",20),b()),o&2){let n=r.$implicit;c(1),s("ngForOf",n.Variants)}}function Ae(o,r){if(o&1&&(a(0,"tbody"),S(1,Ue,2,1,"ng-container",20),l()),o&2){let n=r.ngIf;c(1),s("ngForOf",n)}}function Le(o,r){if(o&1&&(v(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Ae,2,1,"tbody",9),F(17,"async"),l()(),b()),o&2){let n=d(2);c(16),s("ngIf",T(17,1,n.data$))}}function Re(o,r){o&1&&(a(0,"div",36),C(1,"app-empty-state"),l())}function Be(o,r){if(o&1){let n=P();a(0,"span",44),g("click",function(){u(n);let e=d(4);return h(e.getRowCount())}),a(1,"i",45),m(2,"?"),l()()}}function $e(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),st(T(2,1,n==null?null:n.Count))}}function je(o,r){if(o&1){let n=P();a(0,"a",46),g("click",function(){u(n);let e=d(4);return h(e.onNextPage())}),C(1,"i",47),m(2," Next"),l()}}function Ge(o,r){if(o&1){let n=P();a(0,"a",48),g("click",function(){u(n);let e=d(4);return h(e.onLastPage())}),C(1,"i",49),m(2," Last"),l()}}function Ke(o,r){if(o&1&&(v(0),a(1,"div",37)(2,"div",38)(3,"div",39),m(4),F(5,"number"),S(6,Be,3,0,"span",40)(7,$e,3,3,"span",9),F(8,"async"),m(9),l()(),a(10,"div",41),S(11,je,3,0,"a",42)(12,Ge,3,0,"a",43),l()(),b()),o&2){let n=d().ngIf,t=d(2);c(4),I(" Showing 1 - ",T(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(1),s("ngIf",!t.paginationService.hideCount&&T(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Je(o,r){if(o&1&&(v(0),S(1,Ke,13,10,"ng-container",9),b()),o&2){let n=r.ngIf;c(1),s("ngIf",(n==null?null:n.length)>0)}}function ze(o,r){if(o&1){let n=P();a(0,"mainpanel",1),g("onSubmit",function(e){u(n);let i=d();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Oe,3,1,"button",2),a(3,"button",3),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,Le,18,3,"ng-container",7),F(10,"async"),S(11,Re,2,0,"ng-template",null,8,tt),l(),S(13,Je,2,1,"ng-container",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=d(),e;s("hideSearchDropdown",!0),c(2),s("ngIf",t.hasSelectionProduct),c(7),s("ngIf",((e=T(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),s("ngIf",T(14,7,t.data$))}}var ae=(()=>{let r=class r{constructor(t,e,i,p,f,w,yt){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.paginationService=f,this.biggerPictureService=w,this.authService=yt,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=yt.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(Ot(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Mt(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=_.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=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),J(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,p)=>p.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(Xt),x(Ht),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],[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-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(S(0,ze,15,9,"mainpanel",0),F(1,"async")),e&2&&s("ngIf",T(1,1,i.loader$))},dependencies:[N,E,Ut,$,j,V,ht,A,pt,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();function He(o,r){if(o&1){let n=P();a(0,"button",14),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ze(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function qe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}var Ye=o=>[o],Qe=()=>[];function We(o,r){if(o&1){let n=P();a(0,"div",20)(1,"app-product-card",21),g("onCheckBoxChange",function(e){let p=u(n).index,f=d();return h(f.onSelectProduct(e,p))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,p=d();return h(p.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),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?it(10,Ye,n==null?null:n.Channel):Q(12,Qe))("showCheckBox",!0)("scanButton",!0)}}function Xe(o,r){o&1&&(v(0),a(1,"div",22),C(2,"app-empty-state"),l(),b())}function tn(o,r){if(o&1){let n=P();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var le=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=p,this.activateRouter=f,this.authService=w,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(_.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?_.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=_.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(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_.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(te,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(U),x(R),x(mt),x(k))},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"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"mt-5"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,He,3,0,"button",1)(3,Ze,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),g("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(9,qe,3,2,"ng-template",5),l()(),a(10,"div",6)(11,"label",3),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",7),g("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(14,"mat-radio-button",8),m(15," All "),l(),a(16,"mat-radio-button",8),m(17," Yes "),l(),a(18,"mat-radio-button",8),m(19," No "),l()()(),a(20,"div",6)(21,"label",3),m(22,"Item ID"),l(),a(23,"input",9),g("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()(),a(24,"content")(25,"div",10)(26,"div",11),S(27,We,2,13,"div",12)(28,Xe,3,0,"ng-container",2),l(),S(29,tn,3,4,"div",13),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),s("ngModel",i.searchFilter.HaveSku),c(1),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),s("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,et,$,j,V,H,nt,Kt,Jt,K,Y,A],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 en(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function nn(o,r){if(o&1&&(a(0,"div",10),C(1,"app-duplicate-product-card",11),l()),o&2){let n=r.$implicit,t=r.index;c(1),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function on(o,r){o&1&&(v(0),a(1,"div",12),C(2,"app-empty-state"),l(),b())}function rn(o,r){if(o&1){let n=P();v(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())})("total",function(){u(n);let e=d();return h(e.getRowCount())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var ce=(()=>{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=_.GuidEMpty}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(x(B),x(U),x(k))},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",""],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"multiple","clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Channel"),l(),a(6,"ng-select",2),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,en,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,nn,2,6,"div",6)(12,on,3,0,"ng-container",7),l(),S(13,rn,4,4,"ng-container",7),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(1),s("ngIf",(i.products==null?null:i.products.length)==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,$,j,V,H,nt,gt,K,A]});let o=r;return o})();function an(o,r){if(o&1&&(v(0),m(1),b()),o&2){let n=d().$implicit;c(1),I(" ",n.Count," ")}}function ln(o,r){if(o&1){let n=P();a(0,"span",26),g("click",function(){u(n);let e=d().$implicit,i=d(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var cn=()=>["/menu/products/status/sold-in-channel"],se=o=>({ID:o}),sn=()=>["/menu/products/status/not-in-pos"];function pn(o,r){if(o&1){let n=P();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,an,2,1,"ng-container",4)(7,ln,2,0,"ng-template",null,19,tt),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=d(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),st(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,cn))("queryParams",it(19,se,n.ID)),c(1),I(" ",T(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,sn))("queryParams",it(22,se,n.ID)),c(1),I(" ",T(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?Tt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function dn(o,r){if(o&1&&(v(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,pn,28,24,"tr",15),F(18,"async"),l()()(),b()),o&2){let n=d(),t;c(17),s("ngForOf",(t=T(18,1,n.channels$))==null?null:t.Data)}}function mn(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var pe=(()=>{let r=class r{constructor(t,e,i,p){this.productService=t,this.toastr=e,this.dialog=i,this.authService=p,this.destroy$=new wt,this.channelOptions=p.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Pt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>_.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(p=>p)).subscribe(p=>{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(p,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(Pt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(U),x(R),x(G),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,dn,19,3,"ng-container",4),F(6,"async"),S(7,mn,2,0,"ng-template",null,5,tt),l()()()()()),e&2){let p=L(8),f;s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((f=T(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",p)}},dependencies:[N,E,V,ht,ut,A,pt,dt,Nt]});let o=r;return o})();var un=[{component:ne,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:oe,canActivate:[W],data:{title:"Products in POS"}},{path:"sold-in-channel",component:re,canActivate:[W],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ae,canActivate:[W],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:le,canActivate:[W],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ce,canActivate:[W],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:pe,canActivate:[W],data:{title:"Channel Statistic"}}]}],yi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Dt({type:r}),r.\u0275inj=Ft({imports:[Et,At,$t,Bt,Lt,ee,zt,Gt,gt,K,Y,Vt.forChild(un),Wt,Rt]});let o=r;return o})();export{yi as StatusModule};
1
+ import{a as _t,c as q,d as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-AQGSSXCJ.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-BRJ6NXFU.js";import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-44VMN3LV.js";import{d as Zt,e as qt,f as Yt,g as Qt,k as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-SXD4OV3G.js";import{a as Y,b as gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-YW7MMS6Z.js";import{a as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-HZTIGL5T.js";import{b as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-SNJ4OGJW.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-BCURYD2D.js";import{a as Xt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-FYVBP3LO.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-33CWJ4LL.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-DEGJCR2Z.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-YV53UBI3.js";import{a as jt,b as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-2EXATU5W.js";import{f as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WZWRGFQY.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WUIO7HNY.js";import{b as R,e as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-EOR5H3VP.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-QJH4BQDJ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-ADSWNZ5B.js";import{a as Ht}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-T7BSDAUU.js";import{a as Kt,b as Jt,c as zt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-AKBY3A4E.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-W5IN44LK.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-NQS7TKBY.js";import{a as nt,c as H,d as Lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-RYPHPZWT.js";import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-ZK7LR7BI.js";import{B as V,C as $t,q as ht,r as Bt,u as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-WR2GMD7A.js";import{T as Rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-W5E3H6LH.js";import{b as Ut,c as et,h as $,k as j,u as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-SO2S2COF.js";import{b as z,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-Q2ZROLBG.js";import{$a as C,$b as E,B as y,Db as F,Eb as T,Fa as c,Fb as Tt,Ga as x,Hc as mt,Ic as kt,Kc as ut,Mb as tt,Mc as Vt,Oa as s,T as J,Ua as S,V as Pt,X as Ot,Za as a,_a as l,_b as N,aa as Ft,ab as v,bb as b,c as wt,cc as pt,db as P,dc as Nt,ea as M,fa as Dt,fc as dt,gc as Et,hb as g,ja as u,jb as d,ka as h,ob as L,pb as m,q as Mt,qb as st,rb as I,vb as Q,wb as it,za as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-GKMSZ2G7.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.1/Marketplace/chunk-HLEHNAF6.js";var de=()=>["/menu/products/download/by-url"],ne=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,de)))},dependencies:[jt,kt,ut]});let o=r;return o})();function me(o,r){if(o&1){let n=P();a(0,"button",13),g("click",function(){u(n);let e=d(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ue(o,r){if(o&1&&(v(0),S(1,me,3,0,"button",12),b()),o&2){let n=d();c(1),s("ngIf",!n.productService.hasSelection(n.products))}}function he(o,r){if(o&1){let n=P();v(0),a(1,"button",15),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function _e(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ge(o,r){if(o&1){let n=P();a(0,"div",18)(1,"app-product-card",19),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),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)}}function Ce(o,r){o&1&&(v(0),a(1,"div",20),C(2,"app-empty-state"),l(),b())}function fe(o,r){if(o&1){let n=P();v(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var oe=(()=>{let r=class r{constructor(t,e,i,p,f){this.http=t,this.toastr=e,this.dialog=i,this.productService=p,this.authService=f,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,[z.Tokopedia,z.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=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_t,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(p)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(x(B),x(R),x(G),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["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,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,i){if(e&1){let p=P();a(0,"mainpanel",0),g("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,ue,2,1,"ng-container",1)(3,he,4,1,"ng-container",1)(4,_e,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Category"),l(),a(9,"ng-select",3),g("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(10,"div",4)(11,"mat-date-range-input",5)(12,"input",6),g("ngModelChange",function(w){return i.startDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l(),a(13,"input",7),g("ngModelChange",function(w){return i.endDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,8),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,ge,2,10,"div",11)(20,Ce,3,0,"ng-container",1),l(),S(21,fe,4,4,"ng-container",1),l()()()}if(e&2){let p=L(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",p),c(1),s("ngModel",i.startDate),c(1),s("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products.length>0)}},dependencies:[N,E,et,$,j,V,H,K,Y,A,Yt,Zt,qt,Qt],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 Se(o,r){if(o&1){let n=P();v(0),a(1,"button",10),g("click",function(){u(n);let e=d();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),b()}}function xe(o,r){if(o&1){let n=P();v(0),a(1,"button",12),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pe(o,r){if(o&1){let n=P();v(0),a(1,"button",13),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ve(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function be(o,r){if(o&1){let n=P();a(0,"div",17)(1,"label",2),m(2,"Item ID"),l(),a(3,"input",18),g("ngModelChange",function(e){u(n);let i=d();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=d();c(3),s("ngModel",n.searchFilter.Item_id)}}function Ie(o,r){if(o&1){let n=P();a(0,"div",19)(1,"app-product-card",20),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),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)}}function ye(o,r){o&1&&(v(0),a(1,"div",21),C(2,"app-empty-state"),l(),b())}function we(o,r){if(o&1){let n=P();a(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var re=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.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,[z.Tokopedia,z.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(_t,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanProducts(p)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let p=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(p);this.scanProducts(f)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.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=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(mt),x(k))},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,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-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"],["alt","",2,"width","18px",3,"src"],[1,"mt-5"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,Se,4,0,"ng-container",1)(3,xe,4,1,"ng-container",1)(4,Pe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(10,ve,3,2,"ng-template",4),l()(),S(11,be,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ie,2,10,"div",8)(16,ye,3,0,"ng-container",1),l(),S(17,we,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(1),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(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,E,et,$,j,V,H,nt,K,Y,A],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 Oe(o,r){if(o&1){let n=P();a(0,"button",10),g("click",function(){u(n);let e=d(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=d(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Fe(o,r){if(o&1){let n=P();v(0),a(1,"td",26)(2,"input",27),g("ngModelChange",function(e){u(n);let i=d(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=d(3).ngIf,i=d(3);return h(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=d(2).$implicit;c(1),s("rowSpan",n==null?null:n.Variants.length),c(1),s("ngModel",n.selected)}}function De(o,r){if(o&1){let n=P();v(0),a(1,"img",33),g("click",function(e){u(n);let i=d(3).$implicit,p=d(4);return h(p.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=d(3).$implicit;c(1),s("src",n==null?null:n.ImageUrl,O)}}function Te(o,r){o&1&&C(0,"img",34)}function Ne(o,r){if(o&1&&(v(0),a(1,"td",26)(2,"div",28),S(3,De,2,1,"ng-container",7)(4,Te,1,0,"ng-template",null,29,tt),l()(),a(6,"td",30)(7,"h4",31)(8,"span",32),m(9),l()()(),b()),o&2){let n=L(5),t=d(2).$implicit;c(1),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(1),I(" ",t==null?null:t.Name," ")}}function Ee(o,r){if(o&1&&(a(0,"div")(1,"a",22),C(2,"img",35),l()()),o&2){let n=r.$implicit;c(1),s("href",n.URL,O),c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function ke(o,r){if(o&1&&(a(0,"div"),C(1,"img",35),l()),o&2){let n=r.$implicit;c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ve(o,r){if(o&1&&(a(0,"tr"),S(1,Fe,3,2,"ng-container",9)(2,Ne,10,6,"ng-container",9),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",21)(9,"a",22),C(10,"i",23),l()()(),a(11,"td",24)(12,"div",25),S(13,Ee,3,3,"div",20),l()(),a(14,"td",24)(15,"div",25),S(16,ke,2,2,"div",20),l()()()),o&2){let n=r.$implicit,t=r.index,e=d(5);c(1),s("ngIf",t==0),c(1),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ue(o,r){if(o&1&&(v(0),S(1,Ve,17,7,"tr",20),b()),o&2){let n=r.$implicit;c(1),s("ngForOf",n.Variants)}}function Ae(o,r){if(o&1&&(a(0,"tbody"),S(1,Ue,2,1,"ng-container",20),l()),o&2){let n=r.ngIf;c(1),s("ngForOf",n)}}function Le(o,r){if(o&1&&(v(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Ae,2,1,"tbody",9),F(17,"async"),l()(),b()),o&2){let n=d(2);c(16),s("ngIf",T(17,1,n.data$))}}function Re(o,r){o&1&&(a(0,"div",36),C(1,"app-empty-state"),l())}function Be(o,r){if(o&1){let n=P();a(0,"span",44),g("click",function(){u(n);let e=d(4);return h(e.getRowCount())}),a(1,"i",45),m(2,"?"),l()()}}function $e(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),st(T(2,1,n==null?null:n.Count))}}function je(o,r){if(o&1){let n=P();a(0,"a",46),g("click",function(){u(n);let e=d(4);return h(e.onNextPage())}),C(1,"i",47),m(2," Next"),l()}}function Ge(o,r){if(o&1){let n=P();a(0,"a",48),g("click",function(){u(n);let e=d(4);return h(e.onLastPage())}),C(1,"i",49),m(2," Last"),l()}}function Ke(o,r){if(o&1&&(v(0),a(1,"div",37)(2,"div",38)(3,"div",39),m(4),F(5,"number"),S(6,Be,3,0,"span",40)(7,$e,3,3,"span",9),F(8,"async"),m(9),l()(),a(10,"div",41),S(11,je,3,0,"a",42)(12,Ge,3,0,"a",43),l()(),b()),o&2){let n=d().ngIf,t=d(2);c(4),I(" Showing 1 - ",T(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(1),s("ngIf",!t.paginationService.hideCount&&T(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Je(o,r){if(o&1&&(v(0),S(1,Ke,13,10,"ng-container",9),b()),o&2){let n=r.ngIf;c(1),s("ngIf",(n==null?null:n.length)>0)}}function ze(o,r){if(o&1){let n=P();a(0,"mainpanel",1),g("onSubmit",function(e){u(n);let i=d();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Oe,3,1,"button",2),a(3,"button",3),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,Le,18,3,"ng-container",7),F(10,"async"),S(11,Re,2,0,"ng-template",null,8,tt),l(),S(13,Je,2,1,"ng-container",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=d(),e;s("hideSearchDropdown",!0),c(2),s("ngIf",t.hasSelectionProduct),c(7),s("ngIf",((e=T(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),s("ngIf",T(14,7,t.data$))}}var ae=(()=>{let r=class r{constructor(t,e,i,p,f,w,yt){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.paginationService=f,this.biggerPictureService=w,this.authService=yt,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=yt.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(Ot(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Mt(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=_.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=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),J(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,p)=>p.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(Xt),x(Ht),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],[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-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(S(0,ze,15,9,"mainpanel",0),F(1,"async")),e&2&&s("ngIf",T(1,1,i.loader$))},dependencies:[N,E,Ut,$,j,V,ht,A,pt,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();function He(o,r){if(o&1){let n=P();a(0,"button",14),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ze(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function qe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}var Ye=o=>[o],Qe=()=>[];function We(o,r){if(o&1){let n=P();a(0,"div",20)(1,"app-product-card",21),g("onCheckBoxChange",function(e){let p=u(n).index,f=d();return h(f.onSelectProduct(e,p))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,p=d();return h(p.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),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?it(10,Ye,n==null?null:n.Channel):Q(12,Qe))("showCheckBox",!0)("scanButton",!0)}}function Xe(o,r){o&1&&(v(0),a(1,"div",22),C(2,"app-empty-state"),l(),b())}function tn(o,r){if(o&1){let n=P();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var le=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=p,this.activateRouter=f,this.authService=w,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(_.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?_.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=_.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(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_.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(te,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(U),x(R),x(mt),x(k))},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"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"mt-5"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,He,3,0,"button",1)(3,Ze,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),g("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(9,qe,3,2,"ng-template",5),l()(),a(10,"div",6)(11,"label",3),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",7),g("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(14,"mat-radio-button",8),m(15," All "),l(),a(16,"mat-radio-button",8),m(17," Yes "),l(),a(18,"mat-radio-button",8),m(19," No "),l()()(),a(20,"div",6)(21,"label",3),m(22,"Item ID"),l(),a(23,"input",9),g("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()(),a(24,"content")(25,"div",10)(26,"div",11),S(27,We,2,13,"div",12)(28,Xe,3,0,"ng-container",2),l(),S(29,tn,3,4,"div",13),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),s("ngModel",i.searchFilter.HaveSku),c(1),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),s("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,et,$,j,V,H,nt,Kt,Jt,K,Y,A],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 en(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function nn(o,r){if(o&1&&(a(0,"div",10),C(1,"app-duplicate-product-card",11),l()),o&2){let n=r.$implicit,t=r.index;c(1),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function on(o,r){o&1&&(v(0),a(1,"div",12),C(2,"app-empty-state"),l(),b())}function rn(o,r){if(o&1){let n=P();v(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())})("total",function(){u(n);let e=d();return h(e.getRowCount())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var ce=(()=>{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=_.GuidEMpty}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(x(B),x(U),x(k))},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",""],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"multiple","clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Channel"),l(),a(6,"ng-select",2),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,en,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,nn,2,6,"div",6)(12,on,3,0,"ng-container",7),l(),S(13,rn,4,4,"ng-container",7),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(1),s("ngIf",(i.products==null?null:i.products.length)==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,$,j,V,H,nt,gt,K,A]});let o=r;return o})();function an(o,r){if(o&1&&(v(0),m(1),b()),o&2){let n=d().$implicit;c(1),I(" ",n.Count," ")}}function ln(o,r){if(o&1){let n=P();a(0,"span",26),g("click",function(){u(n);let e=d().$implicit,i=d(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var cn=()=>["/menu/products/status/sold-in-channel"],se=o=>({ID:o}),sn=()=>["/menu/products/status/not-in-pos"];function pn(o,r){if(o&1){let n=P();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,an,2,1,"ng-container",4)(7,ln,2,0,"ng-template",null,19,tt),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=d(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),st(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,cn))("queryParams",it(19,se,n.ID)),c(1),I(" ",T(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,sn))("queryParams",it(22,se,n.ID)),c(1),I(" ",T(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?Tt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function dn(o,r){if(o&1&&(v(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,pn,28,24,"tr",15),F(18,"async"),l()()(),b()),o&2){let n=d(),t;c(17),s("ngForOf",(t=T(18,1,n.channels$))==null?null:t.Data)}}function mn(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var pe=(()=>{let r=class r{constructor(t,e,i,p){this.productService=t,this.toastr=e,this.dialog=i,this.authService=p,this.destroy$=new wt,this.channelOptions=p.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Pt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>_.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(p=>p)).subscribe(p=>{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(p,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(Pt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(U),x(R),x(G),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,dn,19,3,"ng-container",4),F(6,"async"),S(7,mn,2,0,"ng-template",null,5,tt),l()()()()()),e&2){let p=L(8),f;s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((f=T(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",p)}},dependencies:[N,E,V,ht,ut,A,pt,dt,Nt]});let o=r;return o})();var un=[{component:ne,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:oe,canActivate:[W],data:{title:"Products in POS"}},{path:"sold-in-channel",component:re,canActivate:[W],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ae,canActivate:[W],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:le,canActivate:[W],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ce,canActivate:[W],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:pe,canActivate:[W],data:{title:"Channel Statistic"}}]}],yi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Dt({type:r}),r.\u0275inj=Ft({imports:[Et,At,$t,Bt,Lt,ee,zt,Gt,gt,K,Y,Vt.forChild(un),Wt,Rt]});let o=r;return o})();export{yi as StatusModule};