marketplacepos 3.13.4 → 3.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/Marketplace/{chunk-6BYODQW7.js → chunk-44JSD7TR.js} +1 -1
  2. package/Marketplace/{chunk-R7NUZJ6Z.js → chunk-4A2BQXM5.js} +1 -1
  3. package/Marketplace/{chunk-HH5OTDOQ.js → chunk-4XJJVBCX.js} +1 -1
  4. package/Marketplace/{chunk-3IYAATQI.js → chunk-BGN73QQI.js} +1 -1
  5. package/Marketplace/{chunk-EEAB43LH.js → chunk-BTKJJ5MP.js} +1 -1
  6. package/Marketplace/{chunk-O44GD7BQ.js → chunk-D4HBNVTL.js} +1 -1
  7. package/Marketplace/{chunk-NZ5YWVLF.js → chunk-E3E6TUYP.js} +1 -1
  8. package/Marketplace/{chunk-74C3CXV4.js → chunk-GEQYSMX6.js} +1 -1
  9. package/Marketplace/chunk-GVS44OWQ.js +1 -0
  10. package/Marketplace/{chunk-NSKF7OXH.js → chunk-HFUGRK45.js} +1 -1
  11. package/Marketplace/{chunk-DUHXHNDB.js → chunk-IYN33JGO.js} +1 -1
  12. package/Marketplace/{chunk-E2QD6KYS.js → chunk-KQ5DOU4A.js} +1 -1
  13. package/Marketplace/chunk-L34D7YAZ.js +1 -0
  14. package/Marketplace/{chunk-JCWZSFSB.js → chunk-LJDPILCP.js} +1 -1
  15. package/Marketplace/{chunk-YJSTLOLP.js → chunk-N3VBGSQH.js} +1 -1
  16. package/Marketplace/chunk-O5GGWOBM.js +1 -0
  17. package/Marketplace/chunk-OAKENGDC.js +1 -0
  18. package/Marketplace/{chunk-A2TGQ4MU.js → chunk-Q64RKYUS.js} +1 -1
  19. package/Marketplace/{chunk-ON2NN4QX.js → chunk-RPO7IHUU.js} +1 -1
  20. package/Marketplace/{chunk-56OKLP66.js → chunk-T6XF6UXO.js} +1 -1
  21. package/Marketplace/{chunk-2V6KLDRW.js → chunk-UYN5TJJ7.js} +1 -1
  22. package/Marketplace/{chunk-QW3M4EZ2.js → chunk-V2UYOAT2.js} +1 -1
  23. package/Marketplace/{chunk-MIZ2DGVO.js → chunk-XLSYUMRS.js} +1 -1
  24. package/Marketplace/{chunk-TSN4V54G.js → chunk-YDGPF5OU.js} +1 -1
  25. package/Marketplace/{chunk-U3LBIFGI.js → chunk-YUYOQ6ZT.js} +1 -1
  26. package/Marketplace/index.html +2 -2
  27. package/Marketplace/{main-CKEU3YNI.js → main-TYOAJ6YV.js} +1 -1
  28. package/package.json +1 -1
  29. package/Marketplace/chunk-3E32TXFL.js +0 -1
  30. package/Marketplace/chunk-7V7R7T2V.js +0 -1
  31. package/Marketplace/chunk-KEW3SGQJ.js +0 -1
  32. package/Marketplace/chunk-LYF2MCUF.js +0 -1
@@ -1 +1 @@
1
- import{e as _e}from"./chunk-S5GA4AVB.js";import{a as ue}from"./chunk-662E5VTA.js";import{b as fe,g as be}from"./chunk-MIZ2DGVO.js";import{b as te,e as y}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{c as ne,h as ie,i as oe,j as re,k as ae,l as se,o as de,p as ce,q as le,r as pe,u as me}from"./chunk-B3LBEB32.js";import{a as M,c as ge,d as he,f as xe}from"./chunk-QPRFFPO5.js";import{$ as R,$a as m,Cb as W,Cc as ee,Db as q,Eb as H,Ha as w,Hb as P,Ia as c,Ib as a,Ja as p,Jb as C,Kb as B,Lb as Y,Mb as I,Nb as L,Ob as T,Q as F,Tb as G,Za as f,Zb as Q,_b as K,aa as A,ac as $,db as U,ed as S,ga as x,gd as v,ha as N,jd as j,lb as i,mb as r,nb as l,oa as b,ob as k,pa as _,pb as E,rb as z,sc as J,ub as u,uc as D,vc as X,wb as g,yc as Z}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var ve=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var we=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),m("href",d.href,w),c(),m("src",d.imgSrc,w),c(),m("href",d.href,w),c(),C(d.title),c(2),C(d.description)}}var Me=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),m("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),m("src",d.img,w)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),m("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),m("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),m("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),m("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),m("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),m("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),m("ngIf",e.browser!="edge"),c(),m("ngIf",n.invalid&&(n.dirty||n.touched))}}var Oe=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY}],this.version=fe.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.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([ue.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(p(v),p(te),p(we),p(be),p(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),m("newsList",K(6,5,s.news$)),c(3),m("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),m("href",s.changelogUrl,w),c(),B("version ",s.version,"")}},dependencies:[J,D,X,se,ce,le,ne,de,ie,oe,pe,ae,re,Me,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var He=[{path:"",component:Oe,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Pe,data:{title:"Success"}},{path:"tiktok",component:ye,data:{title:"Success"}},{path:"lazada",component:ve,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
1
+ import{e as _e}from"./chunk-S5GA4AVB.js";import{a as ue}from"./chunk-662E5VTA.js";import{b as fe,g as be}from"./chunk-XLSYUMRS.js";import{b as te,e as y}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{c as ne,h as ie,i as oe,j as re,k as ae,l as se,o as de,p as ce,q as le,r as pe,u as me}from"./chunk-B3LBEB32.js";import{a as M,c as ge,d as he,f as xe}from"./chunk-QPRFFPO5.js";import{$ as R,$a as m,Cb as W,Cc as ee,Db as q,Eb as H,Ha as w,Hb as P,Ia as c,Ib as a,Ja as p,Jb as C,Kb as B,Lb as Y,Mb as I,Nb as L,Ob as T,Q as F,Tb as G,Za as f,Zb as Q,_b as K,aa as A,ac as $,db as U,ed as S,ga as x,gd as v,ha as N,jd as j,lb as i,mb as r,nb as l,oa as b,ob as k,pa as _,pb as E,rb as z,sc as J,ub as u,uc as D,vc as X,wb as g,yc as Z}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var ve=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var we=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),m("href",d.href,w),c(),m("src",d.imgSrc,w),c(),m("href",d.href,w),c(),C(d.title),c(2),C(d.description)}}var Me=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),m("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),m("src",d.img,w)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),m("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),m("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),m("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),m("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),m("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),m("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),m("ngIf",e.browser!="edge"),c(),m("ngIf",n.invalid&&(n.dirty||n.touched))}}var Oe=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY}],this.version=fe.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.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([ue.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(p(v),p(te),p(we),p(be),p(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),m("newsList",K(6,5,s.news$)),c(3),m("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),m("href",s.changelogUrl,w),c(),B("version ",s.version,"")}},dependencies:[J,D,X,se,ce,le,ne,de,ie,oe,pe,ae,re,Me,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var He=[{path:"",component:Oe,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Pe,data:{title:"Success"}},{path:"tiktok",component:ye,data:{title:"Success"}},{path:"lazada",component:ve,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
@@ -1 +1 @@
1
- import{c as ot}from"./chunk-2LGY3VGP.js";import{a as Q,b as X,d as Y,e as Z}from"./chunk-S5GA4AVB.js";import{b as rt}from"./chunk-JTJLVSTV.js";import{g as J}from"./chunk-MIZ2DGVO.js";import{b as H,e as A}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{l as it,m as nt}from"./chunk-4R22UO7N.js";import{t as tt,u as et}from"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{h as z,k as G,u as $}from"./chunk-B3LBEB32.js";import{b as v,c as q}from"./chunk-QPRFFPO5.js";import{$a as m,Cc as S,Ha as P,Ia as c,Ib as l,Ja as h,Jb as u,Kb as j,Mb as y,Nb as L,Ob as M,Q as T,X as x,Za as g,Zb as V,_b as W,aa as p,ga as E,ha as d,jd as C,lb as r,mb as a,nb as D,oa as O,ob as U,pa as w,pb as F,q as I,rb as K,ub as _,uc as k,vc as R,wb as f,yc as B}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";function ct(n,e){if(n&1&&(r(0,"span",13),D(1,"img",14),a(),r(2,"span"),l(3),a()),n&2){let s=e.item;c(),m("src",s.Img,P)("alt",s.Name),c(2),j(" ",s.Name," ")}}function mt(n,e){if(n&1){let s=K();U(0),r(1,"ng-select",16),M("ngModelChange",function(i){O(s);let o=f().$implicit;return L(o.ProductSKU,i)||(o.ProductSKU=i),w(i)}),a(),F()}if(n&2){let s=e.ngIf,t=f().$implicit;c(),y("ngModel",t.ProductSKU),m("items",s)}}function pt(n,e){if(n&1&&(r(0,"tr")(1,"td"),l(2),a(),r(3,"td"),l(4),a(),r(5,"td"),l(6),a(),r(7,"td"),g(8,mt,2,2,"ng-container",15),V(9,"async"),a()()),n&2){let s=e.$implicit,t=f();c(2),u(s.Name),c(2),u(s.Service),c(2),u(s.TypeString),c(2),m("ngIf",W(9,4,t.logisticOptions$))}}var st=(()=>{let e=class e{constructor(t,i,o){this.http=t,this.toastr=i,this.authService=o,this.filter={ChannelID:""},this.logisticServiceOptions=[],this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[v.WooCommerce,v.Lazada,v.Shopify];this.channelOptions=this.channelOptions.map(i=>(t.forEach(o=>{i.TypeID===o&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(T(1),x(t=>{this.logisticServiceOptions=t}))}Validate(){for(let t of this.logisticServices)this.datasource.find(o=>o.ProductSKU==t.ProductSKU&&o.Name==t.Name)===void 0&&(t.IsChange=!0);return Promise.resolve(this.logisticServices)}submitLogistics(){this.Validate().then(t=>{this.http.post("/api/Logistic/Submit",this.logisticServices).subscribe(i=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.getLogisticService()})})}getLogisticService(){this.datasource=[],this.http.post("/api/Logistic/Get",this.filter).pipe(I(t=>t.map(i=>(i.ProductSKU=q.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i)))).subscribe(t=>{this.iniTitle(),this.logisticServices=t,this.datasource=structuredClone(t)})}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}};e.\u0275fac=function(i){return new(i||e)(h(A),h(H),h(J))},e.\u0275cmp=E({type:e,selectors:[["app-logistic"]],decls:28,vars:6,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,o){i&1&&(r(0,"mainpanel",0),_("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",1),l(4,"Select a Channel"),a(),r(5,"ng-select",2),M("ngModelChange",function(b){return L(o.filter.ChannelID,b)||(o.filter.ChannelID=b),b}),g(6,ct,4,3,"ng-template",3),a()()(),r(7,"actions")(8,"a",4),_("click",function(){return o.submitLogistics()}),l(9,"Submit"),a()(),r(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr",11)(18,"th"),l(19,"Logistic"),a(),r(20,"th"),l(21,"Service"),a(),r(22,"th"),l(23,"Type"),a(),r(24,"th"),l(25,"Logistic Service"),a()()(),r(26,"tbody"),g(27,pt,10,6,"tr",12),a()()()()()()()()),i&2&&(m("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),c(5),m("clearable",!1)("items",o.channelOptions),y("ngModel",o.filter.ChannelID),c(22),m("ngForOf",o.logisticServices))},dependencies:[k,R,z,G,it,Y,Q,X,tt,B]});let n=e;return n})();var dt=[{path:"",component:st}],lt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C.forChild(dt)]});let n=e;return n})();var kt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C,lt,$,nt,Z,rt,ot,et]});let n=e;return n})();export{kt as LogisticModule};
1
+ import{c as ot}from"./chunk-2LGY3VGP.js";import{a as Q,b as X,d as Y,e as Z}from"./chunk-S5GA4AVB.js";import{b as rt}from"./chunk-JTJLVSTV.js";import{g as J}from"./chunk-XLSYUMRS.js";import{b as H,e as A}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{l as it,m as nt}from"./chunk-4R22UO7N.js";import{t as tt,u as et}from"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{h as z,k as G,u as $}from"./chunk-B3LBEB32.js";import{b as v,c as q}from"./chunk-QPRFFPO5.js";import{$a as m,Cc as S,Ha as P,Ia as c,Ib as l,Ja as h,Jb as u,Kb as j,Mb as y,Nb as L,Ob as M,Q as T,X as x,Za as g,Zb as V,_b as W,aa as p,ga as E,ha as d,jd as C,lb as r,mb as a,nb as D,oa as O,ob as U,pa as w,pb as F,q as I,rb as K,ub as _,uc as k,vc as R,wb as f,yc as B}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";function ct(n,e){if(n&1&&(r(0,"span",13),D(1,"img",14),a(),r(2,"span"),l(3),a()),n&2){let s=e.item;c(),m("src",s.Img,P)("alt",s.Name),c(2),j(" ",s.Name," ")}}function mt(n,e){if(n&1){let s=K();U(0),r(1,"ng-select",16),M("ngModelChange",function(i){O(s);let o=f().$implicit;return L(o.ProductSKU,i)||(o.ProductSKU=i),w(i)}),a(),F()}if(n&2){let s=e.ngIf,t=f().$implicit;c(),y("ngModel",t.ProductSKU),m("items",s)}}function pt(n,e){if(n&1&&(r(0,"tr")(1,"td"),l(2),a(),r(3,"td"),l(4),a(),r(5,"td"),l(6),a(),r(7,"td"),g(8,mt,2,2,"ng-container",15),V(9,"async"),a()()),n&2){let s=e.$implicit,t=f();c(2),u(s.Name),c(2),u(s.Service),c(2),u(s.TypeString),c(2),m("ngIf",W(9,4,t.logisticOptions$))}}var st=(()=>{let e=class e{constructor(t,i,o){this.http=t,this.toastr=i,this.authService=o,this.filter={ChannelID:""},this.logisticServiceOptions=[],this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[v.WooCommerce,v.Lazada,v.Shopify];this.channelOptions=this.channelOptions.map(i=>(t.forEach(o=>{i.TypeID===o&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(T(1),x(t=>{this.logisticServiceOptions=t}))}Validate(){for(let t of this.logisticServices)this.datasource.find(o=>o.ProductSKU==t.ProductSKU&&o.Name==t.Name)===void 0&&(t.IsChange=!0);return Promise.resolve(this.logisticServices)}submitLogistics(){this.Validate().then(t=>{this.http.post("/api/Logistic/Submit",this.logisticServices).subscribe(i=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.getLogisticService()})})}getLogisticService(){this.datasource=[],this.http.post("/api/Logistic/Get",this.filter).pipe(I(t=>t.map(i=>(i.ProductSKU=q.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i)))).subscribe(t=>{this.iniTitle(),this.logisticServices=t,this.datasource=structuredClone(t)})}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}};e.\u0275fac=function(i){return new(i||e)(h(A),h(H),h(J))},e.\u0275cmp=E({type:e,selectors:[["app-logistic"]],decls:28,vars:6,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,o){i&1&&(r(0,"mainpanel",0),_("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",1),l(4,"Select a Channel"),a(),r(5,"ng-select",2),M("ngModelChange",function(b){return L(o.filter.ChannelID,b)||(o.filter.ChannelID=b),b}),g(6,ct,4,3,"ng-template",3),a()()(),r(7,"actions")(8,"a",4),_("click",function(){return o.submitLogistics()}),l(9,"Submit"),a()(),r(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr",11)(18,"th"),l(19,"Logistic"),a(),r(20,"th"),l(21,"Service"),a(),r(22,"th"),l(23,"Type"),a(),r(24,"th"),l(25,"Logistic Service"),a()()(),r(26,"tbody"),g(27,pt,10,6,"tr",12),a()()()()()()()()),i&2&&(m("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),c(5),m("clearable",!1)("items",o.channelOptions),y("ngModel",o.filter.ChannelID),c(22),m("ngForOf",o.logisticServices))},dependencies:[k,R,z,G,it,Y,Q,X,tt,B]});let n=e;return n})();var dt=[{path:"",component:st}],lt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C.forChild(dt)]});let n=e;return n})();var kt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C,lt,$,nt,Z,rt,ot,et]});let n=e;return n})();export{kt as LogisticModule};
@@ -1 +1 @@
1
- import{a as _}from"./chunk-K7EHVRIN.js";import"./chunk-R7MYFLXJ.js";import"./chunk-6U6JR5K6.js";import{a as de,b as ce}from"./chunk-PIIJRFHM.js";import"./chunk-RZ7FKABW.js";import{a as R}from"./chunk-NSKF7OXH.js";import"./chunk-IPYNDMGQ.js";import"./chunk-KWFES5F7.js";import"./chunk-MIZ2DGVO.js";import{e as oe}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{l as D,m as pe}from"./chunk-4R22UO7N.js";import"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{u as se}from"./chunk-B3LBEB32.js";import{c as f}from"./chunk-QPRFFPO5.js";import{$ as J,$a as p,Bc as re,Cc as ne,Ha as G,Ia as m,Ib as c,Ja as h,Jb as N,Kb as Z,Mb as u,Nb as y,Ob as g,Q as V,Rb as $,Wb as ee,X as H,Za as v,Zb as A,_b as j,aa as Q,ca as K,db as X,fd as ae,ga as S,ha as z,hd as le,jd as me,lb as o,mb as a,na as q,nb as C,qb as Y,ub as b,uc as te,vc as P,wb as T,yc as ie,zb as U,zc as w}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var fe=(()=>{let r=class r{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),i&2&&(m(3),p("Tabs",t.reportTabs))},dependencies:[de,ae],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let n=r;return n})();var F=class{};var I=(()=>{let r=class r{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(d=>{i(d)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}};r.\u0275fac=function(i){return new(i||r)(K(oe))},r.\u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var L=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(L||{});var _e=()=>["/menu/log/order"],Fe=(n,r,s,e,i)=>({responseCode:n,From:r,to:s,actionType:e,ChannelID:i});function be(n,r){if(n&1&&(o(0,"th",9)(1,"div",10)(2,"h4"),c(3),a(),o(4,"small",11),c(5),a()()()),n&2){let s=r.$implicit,e=T();m(3),N(s),m(),X(e.getTextBgColor(s)),m(),N(e.getHeaderStatusDesc(s))}}function Pe(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let s=r.$implicit,e=T().$implicit,i=T();m(),p("routerLink",$(3,_e))("queryParams",ee(4,Fe,s.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),m(),Z(" ",s.Value," ")}}function we(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),C(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),v(10,Pe,3,10,"td",8),a()),n&2){let s=r.$implicit,e=T();m(2),U("href",s.Url,G),m(),p("src",e.getChannelLogo(s.Type),G),m(3),U("href",s.Url,G),m(),N(s.Name),m(2),N(s.Url),m(),p("ngForOf",s.list)}}function De(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let s=r.$implicit;m(2),N(j(3,1,s.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=L,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}ngOnChanges(e){e.result&&this.calculateStatusCode()}getHeaderStatusDesc(e){let i=null;switch(e){case L.BAD_REQUEST:i="BAD REQUEST";break;case L.CONFLICT:i="CONFLICT";break;case L.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case L.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case L.OK:i="bg-success";break;case L.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let e,i;this.concatStatusCode().forEach(t=>{e=this.listCalculationStatusCode.findIndex(d=>d.status==t.Key),i=e!==-1,i?this.listCalculationStatusCode[e].total+=t.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:t.Key,total:t.Value}]})}}concatStatusCode(){return this.result.map(e=>e.list).reduce((e,i)=>[...e,...i])}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[q],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(o(0,"table",0)(1,"thead",1)(2,"tr"),C(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),v(6,be,6,4,"th",4),a()(),o(7,"tbody"),v(8,we,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),v(14,De,4,3,"td",8),a()()()),i&2&&(m(6),p("ngForOf",t.header),m(2),p("ngForOf",t.result),m(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,le,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ie(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",0)}}var he=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ie,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var ue=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ee,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",3)}}var ye=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F;let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"label",2),c(4,"From/To"),a(),o(5,"div",3)(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",5),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",6),v(11,Oe,3,5,"div",7),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",4)}}var ge=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Completed";let t=new Date;this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Le,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Re(n,r){n&1&&Y(0)}function Me(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=r.ngIf,e=T();m(2),p("result",s.Body)("header",s.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var ve=(()=>{let r=class r{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new F}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=f.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(H(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(V())}onFilter(){this.updatePageTitle(),this.initData()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Re,1,0,"ng-container",6),A(12,"async"),v(13,Me,3,4,"div",7),A(14,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",j(12,6,t.pageLoader$)),m(2),p("ngIf",j(14,8,t.reportData$)))},dependencies:[P,D,_,E,ie]});let n=r;return n})();function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Ce=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,ke,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Te=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,xe,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();var Ne=[{path:"",component:fe,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:he,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Ce,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ue,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:ye,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:ge,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Te,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:ve,canActivate:[R],data:{title:"All Report"}}]}],Et=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,se,pe,_,me.forChild(Ne)]});let n=r;return n})();export{Et as OrderModule};
1
+ import{a as _}from"./chunk-K7EHVRIN.js";import"./chunk-R7MYFLXJ.js";import"./chunk-6U6JR5K6.js";import{a as de,b as ce}from"./chunk-PIIJRFHM.js";import"./chunk-RZ7FKABW.js";import{a as R}from"./chunk-HFUGRK45.js";import"./chunk-IPYNDMGQ.js";import"./chunk-KWFES5F7.js";import"./chunk-XLSYUMRS.js";import{e as oe}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{l as D,m as pe}from"./chunk-4R22UO7N.js";import"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{u as se}from"./chunk-B3LBEB32.js";import{c as f}from"./chunk-QPRFFPO5.js";import{$ as J,$a as p,Bc as re,Cc as ne,Ha as G,Ia as m,Ib as c,Ja as h,Jb as N,Kb as Z,Mb as u,Nb as y,Ob as g,Q as V,Rb as $,Wb as ee,X as H,Za as v,Zb as A,_b as j,aa as Q,ca as K,db as X,fd as ae,ga as S,ha as z,hd as le,jd as me,lb as o,mb as a,na as q,nb as C,qb as Y,ub as b,uc as te,vc as P,wb as T,yc as ie,zb as U,zc as w}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var fe=(()=>{let r=class r{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),i&2&&(m(3),p("Tabs",t.reportTabs))},dependencies:[de,ae],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let n=r;return n})();var F=class{};var I=(()=>{let r=class r{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(d=>{i(d)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}};r.\u0275fac=function(i){return new(i||r)(K(oe))},r.\u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var L=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(L||{});var _e=()=>["/menu/log/order"],Fe=(n,r,s,e,i)=>({responseCode:n,From:r,to:s,actionType:e,ChannelID:i});function be(n,r){if(n&1&&(o(0,"th",9)(1,"div",10)(2,"h4"),c(3),a(),o(4,"small",11),c(5),a()()()),n&2){let s=r.$implicit,e=T();m(3),N(s),m(),X(e.getTextBgColor(s)),m(),N(e.getHeaderStatusDesc(s))}}function Pe(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let s=r.$implicit,e=T().$implicit,i=T();m(),p("routerLink",$(3,_e))("queryParams",ee(4,Fe,s.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),m(),Z(" ",s.Value," ")}}function we(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),C(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),v(10,Pe,3,10,"td",8),a()),n&2){let s=r.$implicit,e=T();m(2),U("href",s.Url,G),m(),p("src",e.getChannelLogo(s.Type),G),m(3),U("href",s.Url,G),m(),N(s.Name),m(2),N(s.Url),m(),p("ngForOf",s.list)}}function De(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let s=r.$implicit;m(2),N(j(3,1,s.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=L,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}ngOnChanges(e){e.result&&this.calculateStatusCode()}getHeaderStatusDesc(e){let i=null;switch(e){case L.BAD_REQUEST:i="BAD REQUEST";break;case L.CONFLICT:i="CONFLICT";break;case L.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case L.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case L.OK:i="bg-success";break;case L.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let e,i;this.concatStatusCode().forEach(t=>{e=this.listCalculationStatusCode.findIndex(d=>d.status==t.Key),i=e!==-1,i?this.listCalculationStatusCode[e].total+=t.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:t.Key,total:t.Value}]})}}concatStatusCode(){return this.result.map(e=>e.list).reduce((e,i)=>[...e,...i])}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[q],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(o(0,"table",0)(1,"thead",1)(2,"tr"),C(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),v(6,be,6,4,"th",4),a()(),o(7,"tbody"),v(8,we,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),v(14,De,4,3,"td",8),a()()()),i&2&&(m(6),p("ngForOf",t.header),m(2),p("ngForOf",t.result),m(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,le,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ie(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",0)}}var he=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ie,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var ue=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ee,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",3)}}var ye=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F;let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"label",2),c(4,"From/To"),a(),o(5,"div",3)(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",5),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",6),v(11,Oe,3,5,"div",7),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",4)}}var ge=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Completed";let t=new Date;this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Le,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Re(n,r){n&1&&Y(0)}function Me(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=r.ngIf,e=T();m(2),p("result",s.Body)("header",s.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var ve=(()=>{let r=class r{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new F}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=f.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(H(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(V())}onFilter(){this.updatePageTitle(),this.initData()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Re,1,0,"ng-container",6),A(12,"async"),v(13,Me,3,4,"div",7),A(14,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",j(12,6,t.pageLoader$)),m(2),p("ngIf",j(14,8,t.reportData$)))},dependencies:[P,D,_,E,ie]});let n=r;return n})();function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Ce=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,ke,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Te=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,xe,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();var Ne=[{path:"",component:fe,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:he,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Ce,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ue,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:ye,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:ge,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Te,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:ve,canActivate:[R],data:{title:"All Report"}}]}],Et=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,se,pe,_,me.forChild(Ne)]});let n=r;return n})();export{Et as OrderModule};
@@ -1,4 +1,4 @@
1
- import{a as Se}from"./chunk-K7EHVRIN.js";import{a as ke,b as Me,c as Ji,d as Oe,e as Xi}from"./chunk-F63GNFZE.js";import{a as Pe}from"./chunk-FZ7LVL4C.js";import{a as nn}from"./chunk-MLGEX4PW.js";import{a as dn}from"./chunk-V6L3NRY3.js";import{f as on,g as ln,h as sn,i as cn,j as pn}from"./chunk-R7MYFLXJ.js";import"./chunk-6U6JR5K6.js";import{a as un,b as hn,c as _n,d as fn,e as gn,f as Cn,g as yn}from"./chunk-VQUUMT5F.js";import"./chunk-D7X76LHU.js";import{a as en,b as tn}from"./chunk-PIIJRFHM.js";import{a as ve}from"./chunk-V4UFHWKE.js";import{b as mn}from"./chunk-QZKWUCMY.js";import{b as an}from"./chunk-MSVZKMTY.js";import"./chunk-RZ7FKABW.js";import{a as Ie,b as De,c as Ui,d as ye,e as Yi}from"./chunk-S5GA4AVB.js";import{a as qe}from"./chunk-NSKF7OXH.js";import{a as vn,b as Sn}from"./chunk-YG3KQ63T.js";import{a as Wi}from"./chunk-662E5VTA.js";import{a as rn}from"./chunk-5WXM6HSA.js";import"./chunk-JTJLVSTV.js";import"./chunk-IPYNDMGQ.js";import"./chunk-KWFES5F7.js";import{f as Be,g as Ce}from"./chunk-MIZ2DGVO.js";import{b as it,e as X}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{b as Ki,d as nt,e as qi,f as $i,g as Zi,l as se,m as Qi}from"./chunk-4R22UO7N.js";import{t as Gi,u as ji}from"./chunk-MVPTQRFO.js";import{P as zi}from"./chunk-EKCNJX26.js";import{a as Bi,b as Kt,c as ge,h as ne,k as ae,m as Ee,u as qt}from"./chunk-B3LBEB32.js";import{b as W,c as U}from"./chunk-QPRFFPO5.js";import{$ as Ve,$a as m,$b as ie,Ab as Pi,B as Ti,Bb as Rt,Bc as fe,Ca as Nt,Cb as Ht,Cc as He,Db as ot,Dc as zt,Eb as lt,Ha as K,Hb as z,Ia as s,Ib as d,Ja as w,Jb as S,Kb as O,La as ki,Lb as Li,Mb as P,Nb as L,Oa as Vt,Ob as N,Pa as At,Pb as Bt,Q as vt,Qb as G,Rb as _e,Sb as oe,Sc as Fi,T as Ei,Tb as te,Tc as St,Ua as pi,Wa as he,Wb as Ni,Wc as st,X as mt,Xb as Vi,Xc as Ri,Ya as Ge,Za as g,Zb as H,Zc as bt,_ as Ii,_a as R,_b as j,aa as de,ab as Mi,ac as le,bb as Ft,c as si,ca as xe,da as Lt,db as Q,ed as Gt,fd as Hi,ga as V,ha as me,hd as Te,ia as Je,ic as Ai,jc as F,jd as jt,kc as Re,lb as o,mb as l,na as Di,nb as C,oa as _,ob as I,pa as f,pb as D,q as pe,qa as re,qb as je,qc as et,ra as ci,rb as M,sa as ue,sc as tt,ub as b,uc as J,vc as $,w as xi,wb as p,wc as Wt,xb as Xe,xc as Ut,ya as ze,yb as Ke,yc as Yt,za as ee,zb as Oi,zc as Z}from"./chunk-C3YE27TZ.js";import{a as Qe,b as wi}from"./chunk-GNOSNGXM.js";var bn=(()=>{let r=class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[Wi.downloadOrder]}]}ngOnInit(){}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=V({type:r,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(i,n){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()()(),C(4,"router-outlet")),i&2&&(s(3),m("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[en,Hi]});let a=r;return a})();var wn=(()=>{let r=class r{constructor(){}convertToCSV(t,i){let n;if(typeof t=="string")n=t;else{var c=typeof t=="object"?t:JSON.parse(t);n=this.transformToCSVStringFormat(c)}this.downloadCSV(n,i)}transformToCSVStringFormat(t){if(!t||!t.length)return;let i=",",n=Object.keys(t[0]);return t.map(h=>n.map(u=>{let v=h[u]===null||h[u]===void 0?"":h[u];return v=v instanceof Date?v.toLocaleString():v.toString().replace(/"/g,'""'),v.search(/("|,|\n)/g)>=0&&(v=`"${v}"`),v}).join(i)).join(`
1
+ import{a as Se}from"./chunk-K7EHVRIN.js";import{a as ke,b as Me,c as Ji,d as Oe,e as Xi}from"./chunk-F63GNFZE.js";import{a as Pe}from"./chunk-FZ7LVL4C.js";import{a as nn}from"./chunk-MLGEX4PW.js";import{a as dn}from"./chunk-V6L3NRY3.js";import{f as on,g as ln,h as sn,i as cn,j as pn}from"./chunk-R7MYFLXJ.js";import"./chunk-6U6JR5K6.js";import{a as un,b as hn,c as _n,d as fn,e as gn,f as Cn,g as yn}from"./chunk-VQUUMT5F.js";import"./chunk-D7X76LHU.js";import{a as en,b as tn}from"./chunk-PIIJRFHM.js";import{a as ve}from"./chunk-V4UFHWKE.js";import{b as mn}from"./chunk-QZKWUCMY.js";import{b as an}from"./chunk-MSVZKMTY.js";import"./chunk-RZ7FKABW.js";import{a as Ie,b as De,c as Ui,d as ye,e as Yi}from"./chunk-S5GA4AVB.js";import{a as qe}from"./chunk-HFUGRK45.js";import{a as vn,b as Sn}from"./chunk-YG3KQ63T.js";import{a as Wi}from"./chunk-662E5VTA.js";import{a as rn}from"./chunk-5WXM6HSA.js";import"./chunk-JTJLVSTV.js";import"./chunk-IPYNDMGQ.js";import"./chunk-KWFES5F7.js";import{f as Be,g as Ce}from"./chunk-XLSYUMRS.js";import{b as it,e as X}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{b as Ki,d as nt,e as qi,f as $i,g as Zi,l as se,m as Qi}from"./chunk-4R22UO7N.js";import{t as Gi,u as ji}from"./chunk-MVPTQRFO.js";import{P as zi}from"./chunk-EKCNJX26.js";import{a as Bi,b as Kt,c as ge,h as ne,k as ae,m as Ee,u as qt}from"./chunk-B3LBEB32.js";import{b as W,c as U}from"./chunk-QPRFFPO5.js";import{$ as Ve,$a as m,$b as ie,Ab as Pi,B as Ti,Bb as Rt,Bc as fe,Ca as Nt,Cb as Ht,Cc as He,Db as ot,Dc as zt,Eb as lt,Ha as K,Hb as z,Ia as s,Ib as d,Ja as w,Jb as S,Kb as O,La as ki,Lb as Li,Mb as P,Nb as L,Oa as Vt,Ob as N,Pa as At,Pb as Bt,Q as vt,Qb as G,Rb as _e,Sb as oe,Sc as Fi,T as Ei,Tb as te,Tc as St,Ua as pi,Wa as he,Wb as Ni,Wc as st,X as mt,Xb as Vi,Xc as Ri,Ya as Ge,Za as g,Zb as H,Zc as bt,_ as Ii,_a as R,_b as j,aa as de,ab as Mi,ac as le,bb as Ft,c as si,ca as xe,da as Lt,db as Q,ed as Gt,fd as Hi,ga as V,ha as me,hd as Te,ia as Je,ic as Ai,jc as F,jd as jt,kc as Re,lb as o,mb as l,na as Di,nb as C,oa as _,ob as I,pa as f,pb as D,q as pe,qa as re,qb as je,qc as et,ra as ci,rb as M,sa as ue,sc as tt,ub as b,uc as J,vc as $,w as xi,wb as p,wc as Wt,xb as Xe,xc as Ut,ya as ze,yb as Ke,yc as Yt,za as ee,zb as Oi,zc as Z}from"./chunk-C3YE27TZ.js";import{a as Qe,b as wi}from"./chunk-GNOSNGXM.js";var bn=(()=>{let r=class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[Wi.downloadOrder]}]}ngOnInit(){}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=V({type:r,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(i,n){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()()(),C(4,"router-outlet")),i&2&&(s(3),m("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[en,Hi]});let a=r;return a})();var wn=(()=>{let r=class r{constructor(){}convertToCSV(t,i){let n;if(typeof t=="string")n=t;else{var c=typeof t=="object"?t:JSON.parse(t);n=this.transformToCSVStringFormat(c)}this.downloadCSV(n,i)}transformToCSVStringFormat(t){if(!t||!t.length)return;let i=",",n=Object.keys(t[0]);return t.map(h=>n.map(u=>{let v=h[u]===null||h[u]===void 0?"":h[u];return v=v instanceof Date?v.toLocaleString():v.toString().replace(/"/g,'""'),v.search(/("|,|\n)/g)>=0&&(v=`"${v}"`),v}).join(i)).join(`
2
2
  `)}downloadCSV(t,i){var n=new Blob([t],{type:"text/csv;charset=utf8;"}),c=document.createElement("a");c.setAttribute("href",window.URL.createObjectURL(n)),c.setAttribute("download",i),document.body.appendChild(c),c.click(),document.body.removeChild(c)}};r.\u0275fac=function(i){return new(i||r)},r.\u0275prov=Ve({token:r,factory:r.\u0275fac,providedIn:"root"});let a=r;return a})();var ut=(()=>{let r=class r{constructor(t,i,n,c){this.http=t,this.dialog=i,this.toastr=n,this.exportService=c}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(t){return this.http.post("/api/orders/GetNewOrder",t).pipe(pe(i=>i.Data))}getTotalNewOrders(t,i,n){let c={ListChannelID:t,From:i,To:n};return this.http.post("/api/orders/GetCountNewOrder",c).pipe(pe(h=>h.Count))}exportOrders(t,i){return this.http.post("api/Orders/ExportOrder",t).pipe(mt(n=>{this.exportService.convertToCSV(n,i)}))}};r.\u0275fac=function(i){return new(i||r)(xe(X),xe(nt),xe(it),xe(wn))},r.\u0275prov=Ve({token:r,factory:r.\u0275fac});let a=r;return a})();var Zt=(()=>{let r=class r{constructor(t,i){this.http=t,this.toastr=i}acceptTokopediaOrders(t){return this.http.post("/api/Orders/AcceptOrderTokopedia",t).pipe(mt(i=>{this.tokopediaAcceptOrderHandler(i)}))}tokopediaAcceptOrderHandler(t){let i=t.filter(c=>c.Status==!1),n=t.filter(c=>c.Status==!0);if(i.length==0&&n.length>0){let c=`<ol>${this.generateSuccessMessage(n)}</ol>`;this.toastr.success(c,"Success",{enableHtml:!0})}else if(i.length>0&&n.length>0){let c=`<ol>
3
3
  ${this.generateSuccessMessage(n)}
4
4
  ${this.generateErrorMessage(i)}
@@ -1 +1 @@
1
- import{a as b}from"./chunk-V4UFHWKE.js";import{a as h,b as P}from"./chunk-HXDXTE2F.js";import{a as C}from"./chunk-YZ42FKNJ.js";import{c as M}from"./chunk-2LGY3VGP.js";import{b as O}from"./chunk-QZKWUCMY.js";import"./chunk-MSVZKMTY.js";import"./chunk-RZ7FKABW.js";import{e as s}from"./chunk-S5GA4AVB.js";import{a as p}from"./chunk-NSKF7OXH.js";import"./chunk-RMD2ZXUN.js";import"./chunk-KWFES5F7.js";import"./chunk-MIZ2DGVO.js";import"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{m as u}from"./chunk-4R22UO7N.js";import{u as f}from"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{u as g}from"./chunk-B3LBEB32.js";import"./chunk-QPRFFPO5.js";import{Cc as i,aa as e,fd as l,ga as d,ha as r,jd as m,nb as c}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var _=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=d({type:t,selectors:[["app-products"]],decls:1,vars:0,template:function(n,v){n&1&&c(0,"router-outlet")},dependencies:[l],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=t;return o})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-7V7R7T2V.js").then(o=>o.StatusModule),canActivate:[p]},{path:"download",loadChildren:()=>import("./chunk-QW3M4EZ2.js").then(o=>o.DownloadModule),canActivate:[p]}]}],w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,m.forChild(y)]});let o=t;return o})();var W=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,m,w,f,u,s,O,C,M,h,P,b]});let o=t;return o})();export{W as ProductModule};
1
+ import{a as b}from"./chunk-V4UFHWKE.js";import{a as h,b as P}from"./chunk-HXDXTE2F.js";import{a as C}from"./chunk-YZ42FKNJ.js";import{c as M}from"./chunk-2LGY3VGP.js";import{b as O}from"./chunk-QZKWUCMY.js";import"./chunk-MSVZKMTY.js";import"./chunk-RZ7FKABW.js";import{e as s}from"./chunk-S5GA4AVB.js";import{a as p}from"./chunk-HFUGRK45.js";import"./chunk-RMD2ZXUN.js";import"./chunk-KWFES5F7.js";import"./chunk-XLSYUMRS.js";import"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{m as u}from"./chunk-4R22UO7N.js";import{u as f}from"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{u as g}from"./chunk-B3LBEB32.js";import"./chunk-QPRFFPO5.js";import{Cc as i,aa as e,fd as l,ga as d,ha as r,jd as m,nb as c}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var _=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=d({type:t,selectors:[["app-products"]],decls:1,vars:0,template:function(n,v){n&1&&c(0,"router-outlet")},dependencies:[l],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=t;return o})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-OAKENGDC.js").then(o=>o.StatusModule),canActivate:[p]},{path:"download",loadChildren:()=>import("./chunk-V2UYOAT2.js").then(o=>o.DownloadModule),canActivate:[p]}]}],w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,m.forChild(y)]});let o=t;return o})();var W=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,m,w,f,u,s,O,C,M,h,P,b]});let o=t;return o})();export{W as ProductModule};
@@ -1 +1 @@
1
- import{b as u}from"./chunk-PIIJRFHM.js";import{a as f}from"./chunk-NSKF7OXH.js";import"./chunk-MIZ2DGVO.js";import"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{m as l}from"./chunk-4R22UO7N.js";import"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{u as d}from"./chunk-B3LBEB32.js";import"./chunk-QPRFFPO5.js";import{Cc as n,aa as r,fd as c,ga as s,ha as i,jd as m,nb as a}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-HH5OTDOQ.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
1
+ import{b as u}from"./chunk-PIIJRFHM.js";import{a as f}from"./chunk-HFUGRK45.js";import"./chunk-XLSYUMRS.js";import"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{m as l}from"./chunk-4R22UO7N.js";import"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{u as d}from"./chunk-B3LBEB32.js";import"./chunk-QPRFFPO5.js";import{Cc as n,aa as r,fd as c,ga as s,ha as i,jd as m,nb as a}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-4XJJVBCX.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-2YXHLXID.js";import{a as Ce,b as he,d as fe,e as xe}from"./chunk-S5GA4AVB.js";import{a as $}from"./chunk-BSBYMQ7J.js";import{a as Ve,b as j,c as De}from"./chunk-LYF2MCUF.js";import"./chunk-662E5VTA.js";import{a as Te,c as Ee}from"./chunk-5WXM6HSA.js";import{a as Me,b as Fe}from"./chunk-JTJLVSTV.js";import"./chunk-IPYNDMGQ.js";import{a as Pe}from"./chunk-RMD2ZXUN.js";import"./chunk-KWFES5F7.js";import{g as ge}from"./chunk-MIZ2DGVO.js";import{b as le,e as re}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{d as ye,k as Ie,l as we,m as be}from"./chunk-4R22UO7N.js";import{t as Se,u as ve}from"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{b as se,c as pe,h as ce,k as me,m as _e,u as de}from"./chunk-B3LBEB32.js";import{c as D,f as ue}from"./chunk-QPRFFPO5.js";import{$a as m,$b as N,B as z,Bc as ae,Cc as oe,Ha as M,Hb as O,Ia as s,Ib as c,Ja as T,Jb as V,Kb as P,Lb as Z,Mb as I,Nb as w,Ob as b,Pb as X,Q as G,Qb as q,Sb as k,X as B,Za as u,Zb as C,_b as f,ac as U,da as H,ga as Y,gb as v,hb as L,jb as A,kb as W,lb as o,mb as l,nb as x,oa as _,ob as F,pa as d,pb as E,rb as y,sc as J,ub as S,uc as ee,vc as ne,wb as r,yc as te,zb as K,zc as ie}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var Re=t=>({"text-decoration-line-through":t}),Be=t=>({"ms-10":t}),Le=t=>({"bg-gradient-warning":t});function Ae(t,p){if(t&1){let e=y();o(0,"button",37),S("click",function(){_(e);let n=r().ngIf,a=r(2);return d(a.updateStock(n))}),x(1,"i",38),c(2," Update "),l()}}function We(t,p){if(t&1&&(o(0,"div"),u(1,Ae,3,0,"button",36),l()),t&2){let e=p.ngIf,i=r(2);s(),m("ngIf",i.productService.hasSelectionVariant(e))}}function Oe(t,p){if(t&1&&(o(0,"span",39),x(1,"img",40),l(),c(2)),t&2){let e=p.item;s(),m("src",e==null?null:e.Img,M),s(),P(" ",e.Name," ")}}function Ue(t,p){t&1&&(o(0,"div",41)(1,"span"),c(2," showing only different stock, please press next to populate more data "),l()())}function $e(t,p){if(t&1){let e=y();o(0,"th")(1,"input",42),b("ngModelChange",function(n){_(e);let a=r(2);return w(a.checkboxState,n)||(a.checkboxState=n),d(n)}),S("ngModelChange",function(){let n=_(e).ngIf,a=r(2);return d(a.onCheckboxStateChange(n))}),l()()}if(t&2){let e=r(2);s(),I("ngModel",e.checkboxState)}}function je(t,p){t&1&&(o(0,"th",33),c(1," Reserved "),l())}function Qe(t,p){}function ze(t,p){if(t&1){let e=y();o(0,"input",61),b("ngModelChange",function(n){_(e);let a=r(3).$implicit;return w(a.selected,n)||(a.selected=n),d(n)}),S("ngModelChange",function(){_(e);let n=r(3).$implicit,a=r(2);return d(a.onCheckboxStateProduct(n))}),l()}if(t&2){let e=r(3).$implicit;I("ngModel",e.selected)}}function Ge(t,p){if(t&1){let e=y();o(0,"img",62),S("click",function(n){_(e);let a=r(3).$implicit,h=r(2);return d(h.onZoomImage(n,a==null?null:a.ImageUrl))}),l()}if(t&2){let e=r(3).$implicit;K("src",e==null?null:e.ThumbnailUrl,M)}}function He(t,p){t&1&&x(0,"img",58)}function Ye(t,p){if(t&1&&(x(0,"br"),o(1,"div",63),x(2,"i",64),o(3,"small"),c(4),l()()),t&2){let e=r(3).$implicit;s(4),P("(",e==null?null:e.Category,")")}}function Ke(t,p){if(t&1&&(o(0,"td",54)(1,"div",15),u(2,ze,1,1,"input",55),o(3,"div",56),u(4,Ge,1,1,"img",57)(5,He,1,0,"img",58),l()()(),o(6,"td",59)(7,"span",60),c(8),l(),u(9,Ye,5,1),l()),t&2){let e=r(2).$implicit,i=r(2);m("rowSpan",e==null?null:e.Variants.length),s(2),v(e.Variants.length>1?2:-1),s(),m("ngClass",k(7,Be,e.Variants.length<=1)),s(),v(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),V(e==null?null:e.Name),s(),v(e.CategoryID!==null&&e.CategoryID!=i.guidEmpty?9:-1)}}function Ze(t,p){if(t&1){let e=y();o(0,"input",42),b("ngModelChange",function(n){_(e);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),d(n)}),l()}if(t&2){let e=r(2).$implicit;I("ngModel",e.selected)}}function Xe(t,p){if(t&1&&u(0,Ze,1,1,"input",48),t&2){let e=r().$implicit;v((e==null?null:e.Inventory)<=1e5?0:-1)}}function qe(t,p){if(t&1){let e=y();o(0,"input",42),b("ngModelChange",function(n){_(e);let a=r().$implicit;return w(a.selected,n)||(a.selected=n),d(n)}),l()}if(t&2){let e=r().$implicit;I("ngModel",e.selected)}}function Je(t,p){t&1&&(o(0,"div",65),c(1," Not Found "),l())}function en(t,p){if(t&1&&(o(0,"div")(1,"span",66),c(2),C(3,"number"),l(),c(4," => "),o(5,"span",67),c(6),C(7,"number"),l()()),t&2){let e=r().$implicit;s(2),P(" ",f(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(f(7,4,e==null?null:e.Inventory))}}function nn(t,p){if(t&1&&(c(0),C(1,"number")),t&2){let e=r().$implicit;P(" ",f(1,1,e==null?null:e.Inventory)," ")}}function tn(t,p){if(t&1&&(F(0),o(1,"div",68)(2,"a",69),x(3,"i",70),l()(),E()),t&2){let e=r().$implicit,i=r(3);s(2),m("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),M)}}function an(t,p){if(t&1){let e=y();o(0,"span",75),S("click",function(){let n=_(e).ngIf,a=r(2).$implicit,h=r().$implicit,g=r(2);return d(g.openTableDialog(h,a,n))}),c(1),C(2,"number"),l()}if(t&2){let e=r(2).$implicit;s(),P(" ",f(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function on(t,p){if(t&1){let e=y();o(0,"td",71)(1,"div",49)(2,"div"),u(3,an,3,3,"span",72),C(4,"async"),l(),o(5,"div",68)(6,"a",69),x(7,"i",70),l()(),o(8,"div",68)(9,"span",73),S("click",function(){_(e);let n=r().$implicit,a=r(3);return d(a.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),x(10,"i",74),l()()()()}if(t&2){let e=r().$implicit,i=r(3);m("ngClass",k(5,Le,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",f(4,3,i.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,M)}}function ln(t,p){if(t&1&&(F(0),o(1,"span",76),c(2),C(3,"number"),l(),E()),t&2){let e=r(2).$implicit;s(2),P(" (",f(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function rn(t,p){t&1&&c(0," - ")}function sn(t,p){if(t&1&&(F(0),o(1,"td",45),u(2,ln,4,3,"ng-container",53)(3,rn,1,0,"ng-template",null,1,U),l(),E()),t&2){let e=O(4),i=r().$implicit;s(2),m("ngIf",i==null||i.Channel[0]==null?null:i.Channel[0].InventoryReserved)("ngIfElse",e)}}function pn(t,p){t&1&&(F(0),c(1," - "),E())}function cn(t,p){if(t&1&&(o(0,"span",77),C(1,"date"),c(2),C(3,"date"),l()),t&2){let e=r().$implicit;m("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),P(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mn(t,p){if(t&1&&(o(0,"tr"),u(1,Ke,10,9),o(2,"td",44),c(3),l(),o(4,"td",45)(5,"span",46),c(6),l()(),o(7,"td",47),u(8,Xe,1,1)(9,qe,1,1,"input",48),l(),o(10,"td")(11,"div",49),u(12,Je,2,0,"div",50)(13,en,8,6,"div")(14,nn,2,3)(15,tn,4,1,"ng-container",5),l()(),u(16,on,11,7,"td",51)(17,sn,5,2,"ng-container",5),o(18,"td",52),u(19,pn,2,0,"ng-container",53)(20,cn,4,8,"ng-template",null,0,U),l()()),t&2){let e=p.$implicit,i=p.index,n=O(21),a=r(3);s(),v(i==0?1:-1),s(2),V(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?a.discontinuedVariantMsg:"")("ngClass",k(14,Re,e.Discontinued)),s(),V(e==null?null:e.Code),s(2),v((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),m("ngIf",(e==null?null:e.I)==null),s(),v((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),v((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",a.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==a.minDate)("ngIfElse",n)}}function _n(t,p){if(t&1&&(o(0,"tbody"),A(1,Qe,0,0,null,null,L),u(3,mn,22,16,"tr",43),l()),t&2){let e=p.$implicit;s(),W(e.Variants),s(2),m("ngForOf",e.Variants)}}function dn(t,p){if(t&1){let e=y();o(0,"mainpanel",3),S("onSubmit",function(n){_(e);let a=r();return d(a.onSearch(n))}),o(1,"actions")(2,"div",4),u(3,We,2,1,"div",5),C(4,"async"),l()(),o(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),l(),o(9,"ng-select",7),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),d(n)}),u(10,Oe,3,2,"ng-template",8),l()(),o(11,"div",9)(12,"label",10),c(13,"PageNumber"),l(),o(14,"input",11),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),d(n)}),l()(),o(15,"div",9)(16,"label",12),c(17,"Page Size"),l(),o(18,"input",13),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),d(n)}),l()(),o(19,"div",9)(20,"label",14),c(21,"Quantity From - To"),l(),o(22,"div",15)(23,"input",16),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.QuantityFrom,n)||(a.searchFilter.QuantityFrom=n),d(n)}),l(),c(24," - "),o(25,"input",17),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.QuantityTo,n)||(a.searchFilter.QuantityTo=n),d(n)}),l()()()(),o(26,"content")(27,"div",18)(28,"div",19)(29,"div",20),u(30,Ue,3,0,"div",21),o(31,"table",22)(32,"thead",23)(33,"tr")(34,"th",24),c(35," Product "),x(36,"br"),o(37,"mat-slide-toggle",25),S("toggleChange",function(){_(e);let n=r();return n.showDifferenceStock=!n.showDifferenceStock,d(n.onShowDifferenceStock())}),o(38,"small",14),c(39,"FILTER DIFFERENT INVENTORY"),l()()(),o(40,"th",26),c(41,"Variant"),l(),o(42,"th",27),c(43,"SKU"),l(),u(44,$e,2,1,"th",5),C(45,"async"),o(46,"th",28),c(47,"POS"),l(),o(48,"th",29)(49,"div",30),S("click",function(){_(e);let n=r();return d(n.openModalFilter())}),x(50,"img",31),o(51,"span",32),c(52),C(53,"stringLimit"),l()()(),u(54,je,2,0,"th",33),o(55,"th",34),c(56,"Last Sync"),l()()(),A(57,_n,4,1,"tbody",null,L),C(59,"async"),l(),o(60,"infinite-paginator",35),C(61,"async"),S("onNextPage",function(){_(e);let n=r();return d(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(e);let n=r();return d(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(e);let n=r();return d(n.infinitePagination.getRowCount(n.searchFilter))}),l()()()()()()}if(t&2){let e=r();m("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),m("ngIf",f(4,24,e.products$)),s(6),m("clearable",!1)("items",e.channelOptions),I("ngModel",e.searchFilter.ChannelID),s(5),I("ngModel",e.searchFilter.PageNumber),s(4),I("ngModel",e.searchFilter.RowCount),s(5),I("ngModel",e.searchFilter.QuantityFrom),s(2),I("ngModel",e.searchFilter.QuantityTo),s(5),m("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),m("ngIf",f(45,26,e.products$)),s(5),m("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),s(),m("src",e.selectedChannel==null?null:e.selectedChannel.Img,M),s(2),Z(" ",N(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),s(2),v(e.isShowReservedColumn?54:-1),s(3),W(f(59,31,e.products$)),s(3),m("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",f(61,33,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var Hn=(()=>{let p=class p{constructor(i,n,a,h,g,Q,ke,Ne){this.http=i,this.toastr=n,this.dialog=a,this.productService=h,this.authService=g,this.biggerPictureService=Q,this.inventoryService=ke,this.mainPanelService=Ne,this.infinitePagination=H(j),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=D.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=D.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(B(i=>{this.checkShowReservedColumn(i)}),G())}checkShowReservedColumn(i){let n=0,a;i.forEach(h=>{a=h.Variants.find(g=>D.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),a&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(i=>{this.searchFilter={RowCount:i.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:i.Filter.ChannelID},this.initSelectedChannel(),this.infinitePagination.reloadPagination(this.searchFilter),this.showToastrMarketplaceInactive(!i.Filter.IsMarketplaceAppActive)}))}showToastrMarketplaceInactive(i){i&&this.toastr.warning(`Automatic inventory sync disabled.
1
+ import{a as R}from"./chunk-2YXHLXID.js";import{a as Ce,b as he,d as fe,e as xe}from"./chunk-S5GA4AVB.js";import{a as $}from"./chunk-BSBYMQ7J.js";import{a as Ve,b as j,c as De}from"./chunk-L34D7YAZ.js";import"./chunk-662E5VTA.js";import{a as Te,c as Ee}from"./chunk-5WXM6HSA.js";import{a as Me,b as Fe}from"./chunk-JTJLVSTV.js";import"./chunk-IPYNDMGQ.js";import{a as Pe}from"./chunk-RMD2ZXUN.js";import"./chunk-KWFES5F7.js";import{g as ge}from"./chunk-XLSYUMRS.js";import{b as le,e as re}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{d as ye,k as Ie,l as we,m as be}from"./chunk-4R22UO7N.js";import{t as Se,u as ve}from"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{b as se,c as pe,h as ce,k as me,m as _e,u as de}from"./chunk-B3LBEB32.js";import{c as D,f as ue}from"./chunk-QPRFFPO5.js";import{$a as m,$b as N,B as z,Bc as ae,Cc as oe,Ha as M,Hb as O,Ia as s,Ib as c,Ja as T,Jb as V,Kb as P,Lb as Z,Mb as I,Nb as w,Ob as b,Pb as X,Q as G,Qb as q,Sb as k,X as B,Za as u,Zb as C,_b as f,ac as U,da as H,ga as Y,gb as v,hb as L,jb as A,kb as W,lb as o,mb as l,nb as x,oa as _,ob as F,pa as d,pb as E,rb as y,sc as J,ub as S,uc as ee,vc as ne,wb as r,yc as te,zb as K,zc as ie}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";var Re=t=>({"text-decoration-line-through":t}),Be=t=>({"ms-10":t}),Le=t=>({"bg-gradient-warning":t});function Ae(t,p){if(t&1){let e=y();o(0,"button",37),S("click",function(){_(e);let n=r().ngIf,a=r(2);return d(a.updateStock(n))}),x(1,"i",38),c(2," Update "),l()}}function We(t,p){if(t&1&&(o(0,"div"),u(1,Ae,3,0,"button",36),l()),t&2){let e=p.ngIf,i=r(2);s(),m("ngIf",i.productService.hasSelectionVariant(e))}}function Oe(t,p){if(t&1&&(o(0,"span",39),x(1,"img",40),l(),c(2)),t&2){let e=p.item;s(),m("src",e==null?null:e.Img,M),s(),P(" ",e.Name," ")}}function Ue(t,p){t&1&&(o(0,"div",41)(1,"span"),c(2," showing only different stock, please press next to populate more data "),l()())}function $e(t,p){if(t&1){let e=y();o(0,"th")(1,"input",42),b("ngModelChange",function(n){_(e);let a=r(2);return w(a.checkboxState,n)||(a.checkboxState=n),d(n)}),S("ngModelChange",function(){let n=_(e).ngIf,a=r(2);return d(a.onCheckboxStateChange(n))}),l()()}if(t&2){let e=r(2);s(),I("ngModel",e.checkboxState)}}function je(t,p){t&1&&(o(0,"th",33),c(1," Reserved "),l())}function Qe(t,p){}function ze(t,p){if(t&1){let e=y();o(0,"input",61),b("ngModelChange",function(n){_(e);let a=r(3).$implicit;return w(a.selected,n)||(a.selected=n),d(n)}),S("ngModelChange",function(){_(e);let n=r(3).$implicit,a=r(2);return d(a.onCheckboxStateProduct(n))}),l()}if(t&2){let e=r(3).$implicit;I("ngModel",e.selected)}}function Ge(t,p){if(t&1){let e=y();o(0,"img",62),S("click",function(n){_(e);let a=r(3).$implicit,h=r(2);return d(h.onZoomImage(n,a==null?null:a.ImageUrl))}),l()}if(t&2){let e=r(3).$implicit;K("src",e==null?null:e.ThumbnailUrl,M)}}function He(t,p){t&1&&x(0,"img",58)}function Ye(t,p){if(t&1&&(x(0,"br"),o(1,"div",63),x(2,"i",64),o(3,"small"),c(4),l()()),t&2){let e=r(3).$implicit;s(4),P("(",e==null?null:e.Category,")")}}function Ke(t,p){if(t&1&&(o(0,"td",54)(1,"div",15),u(2,ze,1,1,"input",55),o(3,"div",56),u(4,Ge,1,1,"img",57)(5,He,1,0,"img",58),l()()(),o(6,"td",59)(7,"span",60),c(8),l(),u(9,Ye,5,1),l()),t&2){let e=r(2).$implicit,i=r(2);m("rowSpan",e==null?null:e.Variants.length),s(2),v(e.Variants.length>1?2:-1),s(),m("ngClass",k(7,Be,e.Variants.length<=1)),s(),v(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),V(e==null?null:e.Name),s(),v(e.CategoryID!==null&&e.CategoryID!=i.guidEmpty?9:-1)}}function Ze(t,p){if(t&1){let e=y();o(0,"input",42),b("ngModelChange",function(n){_(e);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),d(n)}),l()}if(t&2){let e=r(2).$implicit;I("ngModel",e.selected)}}function Xe(t,p){if(t&1&&u(0,Ze,1,1,"input",48),t&2){let e=r().$implicit;v((e==null?null:e.Inventory)<=1e5?0:-1)}}function qe(t,p){if(t&1){let e=y();o(0,"input",42),b("ngModelChange",function(n){_(e);let a=r().$implicit;return w(a.selected,n)||(a.selected=n),d(n)}),l()}if(t&2){let e=r().$implicit;I("ngModel",e.selected)}}function Je(t,p){t&1&&(o(0,"div",65),c(1," Not Found "),l())}function en(t,p){if(t&1&&(o(0,"div")(1,"span",66),c(2),C(3,"number"),l(),c(4," => "),o(5,"span",67),c(6),C(7,"number"),l()()),t&2){let e=r().$implicit;s(2),P(" ",f(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(f(7,4,e==null?null:e.Inventory))}}function nn(t,p){if(t&1&&(c(0),C(1,"number")),t&2){let e=r().$implicit;P(" ",f(1,1,e==null?null:e.Inventory)," ")}}function tn(t,p){if(t&1&&(F(0),o(1,"div",68)(2,"a",69),x(3,"i",70),l()(),E()),t&2){let e=r().$implicit,i=r(3);s(2),m("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),M)}}function an(t,p){if(t&1){let e=y();o(0,"span",75),S("click",function(){let n=_(e).ngIf,a=r(2).$implicit,h=r().$implicit,g=r(2);return d(g.openTableDialog(h,a,n))}),c(1),C(2,"number"),l()}if(t&2){let e=r(2).$implicit;s(),P(" ",f(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function on(t,p){if(t&1){let e=y();o(0,"td",71)(1,"div",49)(2,"div"),u(3,an,3,3,"span",72),C(4,"async"),l(),o(5,"div",68)(6,"a",69),x(7,"i",70),l()(),o(8,"div",68)(9,"span",73),S("click",function(){_(e);let n=r().$implicit,a=r(3);return d(a.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),x(10,"i",74),l()()()()}if(t&2){let e=r().$implicit,i=r(3);m("ngClass",k(5,Le,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",f(4,3,i.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,M)}}function ln(t,p){if(t&1&&(F(0),o(1,"span",76),c(2),C(3,"number"),l(),E()),t&2){let e=r(2).$implicit;s(2),P(" (",f(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function rn(t,p){t&1&&c(0," - ")}function sn(t,p){if(t&1&&(F(0),o(1,"td",45),u(2,ln,4,3,"ng-container",53)(3,rn,1,0,"ng-template",null,1,U),l(),E()),t&2){let e=O(4),i=r().$implicit;s(2),m("ngIf",i==null||i.Channel[0]==null?null:i.Channel[0].InventoryReserved)("ngIfElse",e)}}function pn(t,p){t&1&&(F(0),c(1," - "),E())}function cn(t,p){if(t&1&&(o(0,"span",77),C(1,"date"),c(2),C(3,"date"),l()),t&2){let e=r().$implicit;m("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),P(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mn(t,p){if(t&1&&(o(0,"tr"),u(1,Ke,10,9),o(2,"td",44),c(3),l(),o(4,"td",45)(5,"span",46),c(6),l()(),o(7,"td",47),u(8,Xe,1,1)(9,qe,1,1,"input",48),l(),o(10,"td")(11,"div",49),u(12,Je,2,0,"div",50)(13,en,8,6,"div")(14,nn,2,3)(15,tn,4,1,"ng-container",5),l()(),u(16,on,11,7,"td",51)(17,sn,5,2,"ng-container",5),o(18,"td",52),u(19,pn,2,0,"ng-container",53)(20,cn,4,8,"ng-template",null,0,U),l()()),t&2){let e=p.$implicit,i=p.index,n=O(21),a=r(3);s(),v(i==0?1:-1),s(2),V(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?a.discontinuedVariantMsg:"")("ngClass",k(14,Re,e.Discontinued)),s(),V(e==null?null:e.Code),s(2),v((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),m("ngIf",(e==null?null:e.I)==null),s(),v((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),v((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",a.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==a.minDate)("ngIfElse",n)}}function _n(t,p){if(t&1&&(o(0,"tbody"),A(1,Qe,0,0,null,null,L),u(3,mn,22,16,"tr",43),l()),t&2){let e=p.$implicit;s(),W(e.Variants),s(2),m("ngForOf",e.Variants)}}function dn(t,p){if(t&1){let e=y();o(0,"mainpanel",3),S("onSubmit",function(n){_(e);let a=r();return d(a.onSearch(n))}),o(1,"actions")(2,"div",4),u(3,We,2,1,"div",5),C(4,"async"),l()(),o(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),l(),o(9,"ng-select",7),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),d(n)}),u(10,Oe,3,2,"ng-template",8),l()(),o(11,"div",9)(12,"label",10),c(13,"PageNumber"),l(),o(14,"input",11),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),d(n)}),l()(),o(15,"div",9)(16,"label",12),c(17,"Page Size"),l(),o(18,"input",13),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),d(n)}),l()(),o(19,"div",9)(20,"label",14),c(21,"Quantity From - To"),l(),o(22,"div",15)(23,"input",16),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.QuantityFrom,n)||(a.searchFilter.QuantityFrom=n),d(n)}),l(),c(24," - "),o(25,"input",17),b("ngModelChange",function(n){_(e);let a=r();return w(a.searchFilter.QuantityTo,n)||(a.searchFilter.QuantityTo=n),d(n)}),l()()()(),o(26,"content")(27,"div",18)(28,"div",19)(29,"div",20),u(30,Ue,3,0,"div",21),o(31,"table",22)(32,"thead",23)(33,"tr")(34,"th",24),c(35," Product "),x(36,"br"),o(37,"mat-slide-toggle",25),S("toggleChange",function(){_(e);let n=r();return n.showDifferenceStock=!n.showDifferenceStock,d(n.onShowDifferenceStock())}),o(38,"small",14),c(39,"FILTER DIFFERENT INVENTORY"),l()()(),o(40,"th",26),c(41,"Variant"),l(),o(42,"th",27),c(43,"SKU"),l(),u(44,$e,2,1,"th",5),C(45,"async"),o(46,"th",28),c(47,"POS"),l(),o(48,"th",29)(49,"div",30),S("click",function(){_(e);let n=r();return d(n.openModalFilter())}),x(50,"img",31),o(51,"span",32),c(52),C(53,"stringLimit"),l()()(),u(54,je,2,0,"th",33),o(55,"th",34),c(56,"Last Sync"),l()()(),A(57,_n,4,1,"tbody",null,L),C(59,"async"),l(),o(60,"infinite-paginator",35),C(61,"async"),S("onNextPage",function(){_(e);let n=r();return d(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(e);let n=r();return d(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(e);let n=r();return d(n.infinitePagination.getRowCount(n.searchFilter))}),l()()()()()()}if(t&2){let e=r();m("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),m("ngIf",f(4,24,e.products$)),s(6),m("clearable",!1)("items",e.channelOptions),I("ngModel",e.searchFilter.ChannelID),s(5),I("ngModel",e.searchFilter.PageNumber),s(4),I("ngModel",e.searchFilter.RowCount),s(5),I("ngModel",e.searchFilter.QuantityFrom),s(2),I("ngModel",e.searchFilter.QuantityTo),s(5),m("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),m("ngIf",f(45,26,e.products$)),s(5),m("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),s(),m("src",e.selectedChannel==null?null:e.selectedChannel.Img,M),s(2),Z(" ",N(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),s(2),v(e.isShowReservedColumn?54:-1),s(3),W(f(59,31,e.products$)),s(3),m("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",f(61,33,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var Hn=(()=>{let p=class p{constructor(i,n,a,h,g,Q,ke,Ne){this.http=i,this.toastr=n,this.dialog=a,this.productService=h,this.authService=g,this.biggerPictureService=Q,this.inventoryService=ke,this.mainPanelService=Ne,this.infinitePagination=H(j),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=D.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=D.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(B(i=>{this.checkShowReservedColumn(i)}),G())}checkShowReservedColumn(i){let n=0,a;i.forEach(h=>{a=h.Variants.find(g=>D.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),a&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(i=>{this.searchFilter={RowCount:i.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:i.Filter.ChannelID},this.initSelectedChannel(),this.infinitePagination.reloadPagination(this.searchFilter),this.showToastrMarketplaceInactive(!i.Filter.IsMarketplaceAppActive)}))}showToastrMarketplaceInactive(i){i&&this.toastr.warning(`Automatic inventory sync disabled.
2
2
  Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(i=>i.ID==this.searchFilter.ChannelID)}onSearch(i){this.searchFilter.text=i,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(i){let n=this.productService.selectedVariantProduct(i);if(n.length>0){let a=n.map(g=>({ID:g.ID,Code:g.Code,Inventory:g.Inventory})),h={ListChannelID:[this.searchFilter.ChannelID],List:a};this.http.post("/api/Inventory/UpdateChannel",h).subscribe(g=>{this.searchFilter.PageNumber=1,this.infinitePagination.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(g)})}}handlingUpdateStock(i){if(i[0]?.StatusProduct){let n=i[0].StatusProduct.Fail_list,a=i[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",a,n)}else this.toastr.error(i[0]?.Exception,"Error")}refreshInventory(i,n,a,h){let g={ChannelItemID:i,ChannelVariationID:n,ChannelID:a,VariantID:h};this.http.post("/api/Inventory/RefreshInventoryChannel",g).subscribe(Q=>{this.toastr.success("Successfully updated","Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(i){i.Variants=i.Variants.map(n=>(n.Inventory>=0&&(n.selected=i.selected),n))}onCheckboxStateChange(i){i=i.map(n=>(n.Variants=n.Variants.map(a=>(a.selected=this.checkboxState,a)),n))}openTableDialog(i,n,a){this.dialog.open(Ve,{data:{Name:i.Name,Variant:n,ChannelID:n?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:i.ChannelItemID}}).afterClosed().pipe(z(g=>D.IsNotEmpty(g))).subscribe(g=>{this.updateItemAfterDialog(g,a)})}updateItemAfterDialog(i,n){let a={ID:i.ChannelID,ChannelItemID:i.ChannelItemID,ChannelVariantID:i.ChannelVariationID,NewQuantity:parseFloat(i.Inventory),VariantID:i.ID,SKU:i.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{this.searchFilter.PageNumber=1,this.infinitePagination.reloadPagination(this.searchFilter),this.handlingUpdateStock([h])})}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=$.DIFFERENCE:this.searchFilter.filterModel=$.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}onZoomImage(i,n){this.biggerPictureService.openBiggerPicture(i,n)}};p.\u0275fac=function(n){return new(n||p)(T(re),T(le),T(ye),T(Te),T(ge),T(Pe),T(R),T(Ie))},p.\u0275cmp=Y({type:p,selectors:[["app-single-channel-comparison"]],standalone:!0,features:[X([j,R]),q],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","ng-select",1,"fw-bold"],["id","ng-select","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"me-2"],[2,"width","18px",3,"src"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[4,"ngFor","ngForOf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(n,a){n&1&&(u(0,dn,62,35,"mainpanel",2),C(1,"async")),n&2&&m("ngIf",f(1,1,a.loader$))},dependencies:[oe,J,ee,ne,te,ae,ie,be,we,xe,fe,Ce,he,de,pe,_e,se,ce,me,Ee,De,ue,Fe,Me,ve,Se],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let t=p;return t})();export{Hn as SingleChannelComparisonComponent};
@@ -1 +1 @@
1
- import{a as te}from"./chunk-YJSTLOLP.js";import{a as ee}from"./chunk-VOWLO2M7.js";import{a as I}from"./chunk-BSBYMQ7J.js";import{b as N,c as ne}from"./chunk-LYF2MCUF.js";import"./chunk-YG3KQ63T.js";import"./chunk-662E5VTA.js";import{a as Z}from"./chunk-5WXM6HSA.js";import"./chunk-JTJLVSTV.js";import"./chunk-IPYNDMGQ.js";import"./chunk-RMD2ZXUN.js";import"./chunk-KWFES5F7.js";import{g as $}from"./chunk-MIZ2DGVO.js";import{b as j,e as G}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{d as q,l as X,m as Y}from"./chunk-4R22UO7N.js";import"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{c as W,h as z,k as H,m as K,u as Q}from"./chunk-B3LBEB32.js";import{c as J}from"./chunk-QPRFFPO5.js";import{$a as d,B as V,Cc as U,Ia as u,Ib as y,Ja as h,Mb as b,Nb as P,Ob as M,Pb as R,Qb as O,X as D,Za as _,Zb as f,_b as S,da as F,ga as T,lb as l,mb as p,nb as E,oa as s,ob as L,pa as c,pb as B,rb as v,ub as C,vc as k,wb as o,yc as A}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";function ie(a,r){if(a&1){let n=v();l(0,"button",14),C("click",function(){s(n);let t=o().ngIf,i=o(2);return c(i.onUpdateItems(t))}),E(1,"i",15),y(2," Update "),p()}}function ae(a,r){if(a&1&&(l(0,"actions")(1,"div",12),_(2,ie,3,0,"button",13),p()()),a&2){let n=r.ngIf,e=o(2);u(2),d("ngIf",e.productService.hasSelectionVariant(n))}}function oe(a,r){if(a&1){let n=v();L(0),l(1,"app-table",16),C("onToggle",function(t){s(n);let i=o(2);return c(i.onShowDifferenceStock(t))})("onSubmit",function(t){s(n);let i=o(2);return c(i.updateStockByVariant(t))}),p(),B()}if(a&2){let n=r.ngIf,e=o(2);u(),d("data",n)("channel",e.channelOptions)("showProductToggle",!0)("filter",e.searchFilter)}}function re(a,r){if(a&1){let n=v();l(0,"mainpanel",1),C("onSubmit",function(t){s(n);let i=o();return c(i.onSearch(t))}),_(1,ae,3,1,"actions",2),f(2,"async"),l(3,"filters")(4,"div")(5,"label",3),y(6,"PageNumber"),p(),l(7,"input",4),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),c(t)}),p()(),l(8,"div",5)(9,"label",6),y(10,"Page Size"),p(),l(11,"input",7),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),c(t)}),p()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),_(16,oe,2,4,"ng-container",2),f(17,"async"),l(18,"infinite-paginator",11),f(19,"async"),C("onNextPage",function(){s(n);let t=o();return c(t.paginationService.onNextPage(t.searchFilter))})("onLastPage",function(){s(n);let t=o();return c(t.paginationService.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(n);let t=o();return c(t.paginationService.getRowCount(t.searchFilter))}),p()()()()()()}if(a&2){let n=o();d("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),u(),d("ngIf",S(2,13,n.paginationService.data$)),u(6),b("ngModel",n.searchFilter.PageNumber),u(4),b("ngModel",n.searchFilter.RowCount),u(5),d("ngIf",S(17,15,n.paginationService.data$)),u(2),d("totalData",n.paginationService.totalData())("hideCount",n.paginationService.hideCount())("rowCount",S(19,17,n.paginationService.totalRowCount$))("pageNumber",n.paginationService.pageNumber())("disableNextButton",n.paginationService.disableNextButton())("goToLastPage",n.paginationService.isLastPage())}}var Ve=(()=>{let r=class r{constructor(e,t,i,g,x){this.http=e,this.toastr=t,this.dialog=i,this.productService=g,this.authService=x,this.paginationService=F(N),this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(D(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:I.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,t){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let x=i.map(m=>({ID:m.ID,Code:m.Code,Inventory:m.Inventory}));var g=t.filter(m=>m.selected).map(m=>m.ID);let w={ListChannelID:g,List:x};this.http.post("/api/Inventory/UpdateChannel",w).subscribe(m=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+w.List.length+" variants in "+w.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter);let g=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+g.Name+" to "+t.NewQuantity,"Success")})}onShowDifferenceStock(e){e?this.searchFilter.filterModel=I.DIFFERENCE:this.searchFilter.filterModel=I.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let t=this.productService.selectedVariantProduct(e);this.dialog.open(ee,{data:{selectedItems:t,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(V(i=>J.IsNotEmpty(i))).subscribe(i=>{this.updateStock(e,i)})}};r.\u0275fac=function(t){return new(t||r)(h(G),h(j),h(q),h(Z),h($))},r.\u0275cmp=T({type:r,selectors:[["app-multi-channel-comparison"]],standalone:!0,features:[R([N]),O],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","filter"]],template:function(t,i){t&1&&(_(0,re,20,19,"mainpanel",0),f(1,"async")),t&2&&d("ngIf",S(1,1,i.loader$))},dependencies:[U,k,A,Y,X,te,Q,W,K,z,H,ne],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=r;return a})();export{Ve as MultiChannelComparison};
1
+ import{a as te}from"./chunk-N3VBGSQH.js";import{a as ee}from"./chunk-VOWLO2M7.js";import{a as I}from"./chunk-BSBYMQ7J.js";import{b as N,c as ne}from"./chunk-L34D7YAZ.js";import"./chunk-YG3KQ63T.js";import"./chunk-662E5VTA.js";import{a as Z}from"./chunk-5WXM6HSA.js";import"./chunk-JTJLVSTV.js";import"./chunk-IPYNDMGQ.js";import"./chunk-RMD2ZXUN.js";import"./chunk-KWFES5F7.js";import{g as $}from"./chunk-XLSYUMRS.js";import{b as j,e as G}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{d as q,l as X,m as Y}from"./chunk-4R22UO7N.js";import"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{c as W,h as z,k as H,m as K,u as Q}from"./chunk-B3LBEB32.js";import{c as J}from"./chunk-QPRFFPO5.js";import{$a as d,B as V,Cc as U,Ia as u,Ib as y,Ja as h,Mb as b,Nb as P,Ob as M,Pb as R,Qb as O,X as D,Za as _,Zb as f,_b as S,da as F,ga as T,lb as l,mb as p,nb as E,oa as s,ob as L,pa as c,pb as B,rb as v,ub as C,vc as k,wb as o,yc as A}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";function ie(a,r){if(a&1){let n=v();l(0,"button",14),C("click",function(){s(n);let t=o().ngIf,i=o(2);return c(i.onUpdateItems(t))}),E(1,"i",15),y(2," Update "),p()}}function ae(a,r){if(a&1&&(l(0,"actions")(1,"div",12),_(2,ie,3,0,"button",13),p()()),a&2){let n=r.ngIf,e=o(2);u(2),d("ngIf",e.productService.hasSelectionVariant(n))}}function oe(a,r){if(a&1){let n=v();L(0),l(1,"app-table",16),C("onToggle",function(t){s(n);let i=o(2);return c(i.onShowDifferenceStock(t))})("onSubmit",function(t){s(n);let i=o(2);return c(i.updateStockByVariant(t))}),p(),B()}if(a&2){let n=r.ngIf,e=o(2);u(),d("data",n)("channel",e.channelOptions)("showProductToggle",!0)("filter",e.searchFilter)}}function re(a,r){if(a&1){let n=v();l(0,"mainpanel",1),C("onSubmit",function(t){s(n);let i=o();return c(i.onSearch(t))}),_(1,ae,3,1,"actions",2),f(2,"async"),l(3,"filters")(4,"div")(5,"label",3),y(6,"PageNumber"),p(),l(7,"input",4),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),c(t)}),p()(),l(8,"div",5)(9,"label",6),y(10,"Page Size"),p(),l(11,"input",7),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),c(t)}),p()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),_(16,oe,2,4,"ng-container",2),f(17,"async"),l(18,"infinite-paginator",11),f(19,"async"),C("onNextPage",function(){s(n);let t=o();return c(t.paginationService.onNextPage(t.searchFilter))})("onLastPage",function(){s(n);let t=o();return c(t.paginationService.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(n);let t=o();return c(t.paginationService.getRowCount(t.searchFilter))}),p()()()()()()}if(a&2){let n=o();d("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),u(),d("ngIf",S(2,13,n.paginationService.data$)),u(6),b("ngModel",n.searchFilter.PageNumber),u(4),b("ngModel",n.searchFilter.RowCount),u(5),d("ngIf",S(17,15,n.paginationService.data$)),u(2),d("totalData",n.paginationService.totalData())("hideCount",n.paginationService.hideCount())("rowCount",S(19,17,n.paginationService.totalRowCount$))("pageNumber",n.paginationService.pageNumber())("disableNextButton",n.paginationService.disableNextButton())("goToLastPage",n.paginationService.isLastPage())}}var Ve=(()=>{let r=class r{constructor(e,t,i,g,x){this.http=e,this.toastr=t,this.dialog=i,this.productService=g,this.authService=x,this.paginationService=F(N),this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(D(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:I.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,t){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let x=i.map(m=>({ID:m.ID,Code:m.Code,Inventory:m.Inventory}));var g=t.filter(m=>m.selected).map(m=>m.ID);let w={ListChannelID:g,List:x};this.http.post("/api/Inventory/UpdateChannel",w).subscribe(m=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+w.List.length+" variants in "+w.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter);let g=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+g.Name+" to "+t.NewQuantity,"Success")})}onShowDifferenceStock(e){e?this.searchFilter.filterModel=I.DIFFERENCE:this.searchFilter.filterModel=I.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let t=this.productService.selectedVariantProduct(e);this.dialog.open(ee,{data:{selectedItems:t,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(V(i=>J.IsNotEmpty(i))).subscribe(i=>{this.updateStock(e,i)})}};r.\u0275fac=function(t){return new(t||r)(h(G),h(j),h(q),h(Z),h($))},r.\u0275cmp=T({type:r,selectors:[["app-multi-channel-comparison"]],standalone:!0,features:[R([N]),O],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","filter"]],template:function(t,i){t&1&&(_(0,re,20,19,"mainpanel",0),f(1,"async")),t&2&&d("ngIf",S(1,1,i.loader$))},dependencies:[U,k,A,Y,X,te,Q,W,K,z,H,ne],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=r;return a})();export{Ve as MultiChannelComparison};