marketplacepos 2.8.9 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{369.4ff6937738161ea5.js → 369.13b6a7572b11e531.js} +1 -1
- package/Marketplace/379.611029ed9b632dca.js +1 -0
- package/Marketplace/512.0859940c411070fd.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main.3d462cd8c82f950d.js → main.1f87a22d98c0bc91.js} +1 -1
- package/Marketplace/{runtime.babf913cef153dda.js → runtime.15299ec4274348bd.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/379.fd2e5a0bd36c9b00.js +0 -1
- package/Marketplace/512.9a911e4f7d403fab.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(Y,x,a)=>{a.r(x),a.d(x,{LoginModule:()=>p});var _=a(6895),s=a(4006),t=a(4650),c=a(284),b=a(1318);class m{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}m.\u0275fac=function(e){return new(e||m)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},m.\u0275cmp=t.Xpm({type:m,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,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code))}});var v=a(1889),w=a(8703),Z=a(7185);class l{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}l.\u0275fac=function(e){return new(e||l)},l.\u0275prov=t.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"});var M=a(501),C=a(4954);const O=["subdomainEl"];function y(n,e){if(1&n){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.subdomain=r)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.domain=r)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&n){const o=t.oxw();t.xp6(12),t.Q6J("ngModel",o.subdomain),t.xp6(2),t.Q6J("ngModel",o.domain)}}function A(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function T(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,A,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(13);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}const P=function(n,e){return{"fa-eye":n,"fa-eye-slash":e}};function k(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(o);const r=t.oxw(2);return t.KtG(r.hideShowPassword())}),t.qZA()}if(2&n){const o=t.oxw(2);t.Q6J("ngClass",t.WLB(1,P,"eye-off"==o.passwordIcon,"eye"==o.passwordIcon))}}function U(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function S(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,U,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(19);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}function q(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.username=r)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,T,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.password=r)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,k,1,4,"i",49),t.YNc(23,S,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.onLoginByGoogle(r))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&n){const o=t.MAs(13),i=t.MAs(19),r=t.oxw();t.xp6(8),t.AsE(" (",r.subdomain,"",r.domain,") "),t.xp6(4),t.Q6J("ngModel",r.username),t.xp6(4),t.Q6J("ngIf",o.invalid&&(o.dirty||o.touched)),t.xp6(2),t.Q6J("type",r.passwordType)("ngModel",r.password),t.xp6(4),t.Q6J("ngIf",""!=r.password&&"edge"!=r.browser),t.xp6(1),t.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),t.xp6(2),t.Q6J("href","https://"+r.subdomain+r.domain+"/ForgotPassword",t.LSH)}}class u{constructor(e,o,i,r,d,I){this._router=e,this.elementRef=o,this.toastr=i,this.checkBrowser=r,this.authService=d,this.ngxPermission=I,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){const e=JSON.parse(localStorage.getItem("Authorization"));this.username=e?.username,this.subdomain=e?.Host?.split(".dealpos")[0];const o=e?.Host?.split(".dealpos")[1];this.domain=".co.id"==o?".dealpos.co.id":".net"==o?".dealpos.net":".dealpos.com",this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){v.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(o=>{this.onSuccessLogin(o)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([w.G.dashboardView]).then(o=>{this._router.navigate(o?["menu/dashboard"]:e.Channel.length<1?["menu/channel"]:["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}u.\u0275fac=function(e){return new(e||u)(t.Y36(c.F0),t.Y36(t.SBq),t.Y36(Z._W),t.Y36(l),t.Y36(M.e),t.Y36(C.YI))},u.\u0275cmp=t.Xpm({type:u,selectors:[["app-login"]],viewQuery:function(e,o){if(1&e&&t.Gf(O,5),2&e){let i;t.iGM(i=t.CRH())&&(o.subdomainEl=i.first)}},decls:30,vars:8,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,y,24,2,"ng-container",7),t.YNc(10,q,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.8.9"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.8.9"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(5),t.Q6J("width",500)("height",273),t.xp6(4),t.Q6J("ngIf","FORM_DOMAIN"==o.loginState)("ngIfElse",i),t.xp6(7),t.Q6J("width",130)("height",73),t.xp6(10),t.Q6J("width",130)("height",73)}},dependencies:[_.mk,_.O5,s._Y,s.YN,s.Kr,s.Fj,s.EJ,s.JJ,s.JL,s.Q7,s.On,s.F,_.Zd],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});class h{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}h.\u0275fac=function(e){return new(e||h)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},h.\u0275cmp=t.Xpm({type:h,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,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});class f{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}f.\u0275fac=function(e){return new(e||f)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},f.\u0275cmp=t.Xpm({type:f,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,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return o.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code),t.xp6(4),t.Oqu(o.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});const L=[{path:"",component:u,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:h,data:{title:"Success"}},{path:"tiktok",component:f,data:{title:"Success"}},{path:"lazada",component:m,data:{title:"Success"}}];class g{}g.\u0275fac=function(e){return new(e||g)},g.\u0275mod=t.oAB({type:g}),g.\u0275inj=t.cJS({imports:[c.Bz.forChild(L),c.Bz]});var z=a(8796);class p{}p.\u0275fac=function(e){return new(e||p)},p.\u0275mod=t.oAB({type:p}),p.\u0275inj=t.cJS({imports:[_.ez,s.u5,g,z.A0,C.VI]})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(Y,x,a)=>{a.r(x),a.d(x,{LoginModule:()=>p});var _=a(6895),s=a(4006),t=a(4650),c=a(284),b=a(1318);class m{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}m.\u0275fac=function(e){return new(e||m)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},m.\u0275cmp=t.Xpm({type:m,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,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code))}});var v=a(1889),w=a(8703),Z=a(7185);class l{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}l.\u0275fac=function(e){return new(e||l)},l.\u0275prov=t.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"});var M=a(501),C=a(4954);const O=["subdomainEl"];function y(n,e){if(1&n){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.subdomain=r)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.domain=r)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&n){const o=t.oxw();t.xp6(12),t.Q6J("ngModel",o.subdomain),t.xp6(2),t.Q6J("ngModel",o.domain)}}function A(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function T(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,A,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(13);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}const P=function(n,e){return{"fa-eye":n,"fa-eye-slash":e}};function k(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(o);const r=t.oxw(2);return t.KtG(r.hideShowPassword())}),t.qZA()}if(2&n){const o=t.oxw(2);t.Q6J("ngClass",t.WLB(1,P,"eye-off"==o.passwordIcon,"eye"==o.passwordIcon))}}function U(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function S(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,U,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(19);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}function q(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.username=r)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,T,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.password=r)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,k,1,4,"i",49),t.YNc(23,S,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.onLoginByGoogle(r))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&n){const o=t.MAs(13),i=t.MAs(19),r=t.oxw();t.xp6(8),t.AsE(" (",r.subdomain,"",r.domain,") "),t.xp6(4),t.Q6J("ngModel",r.username),t.xp6(4),t.Q6J("ngIf",o.invalid&&(o.dirty||o.touched)),t.xp6(2),t.Q6J("type",r.passwordType)("ngModel",r.password),t.xp6(4),t.Q6J("ngIf",""!=r.password&&"edge"!=r.browser),t.xp6(1),t.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),t.xp6(2),t.Q6J("href","https://"+r.subdomain+r.domain+"/ForgotPassword",t.LSH)}}class u{constructor(e,o,i,r,d,I){this._router=e,this.elementRef=o,this.toastr=i,this.checkBrowser=r,this.authService=d,this.ngxPermission=I,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){const e=JSON.parse(localStorage.getItem("Authorization"));this.username=e?.username,this.subdomain=e?.Host?.split(".dealpos")[0];const o=e?.Host?.split(".dealpos")[1];this.domain=".co.id"==o?".dealpos.co.id":".net"==o?".dealpos.net":".dealpos.com",this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){v.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(o=>{this.onSuccessLogin(o)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([w.G.dashboardView]).then(o=>{this._router.navigate(o?["menu/dashboard"]:e.Channel.length<1?["menu/channel"]:["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}u.\u0275fac=function(e){return new(e||u)(t.Y36(c.F0),t.Y36(t.SBq),t.Y36(Z._W),t.Y36(l),t.Y36(M.e),t.Y36(C.YI))},u.\u0275cmp=t.Xpm({type:u,selectors:[["app-login"]],viewQuery:function(e,o){if(1&e&&t.Gf(O,5),2&e){let i;t.iGM(i=t.CRH())&&(o.subdomainEl=i.first)}},decls:30,vars:8,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,y,24,2,"ng-container",7),t.YNc(10,q,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.8.6"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.8.6"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(5),t.Q6J("width",500)("height",273),t.xp6(4),t.Q6J("ngIf","FORM_DOMAIN"==o.loginState)("ngIfElse",i),t.xp6(7),t.Q6J("width",130)("height",73),t.xp6(10),t.Q6J("width",130)("height",73)}},dependencies:[_.mk,_.O5,s._Y,s.YN,s.Kr,s.Fj,s.EJ,s.JJ,s.JL,s.Q7,s.On,s.F,_.Zd],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});class h{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}h.\u0275fac=function(e){return new(e||h)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},h.\u0275cmp=t.Xpm({type:h,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,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});class f{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}f.\u0275fac=function(e){return new(e||f)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},f.\u0275cmp=t.Xpm({type:f,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,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return o.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code),t.xp6(4),t.Oqu(o.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});const L=[{path:"",component:u,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:h,data:{title:"Success"}},{path:"tiktok",component:f,data:{title:"Success"}},{path:"lazada",component:m,data:{title:"Success"}}];class g{}g.\u0275fac=function(e){return new(e||g)},g.\u0275mod=t.oAB({type:g}),g.\u0275inj=t.cJS({imports:[c.Bz.forChild(L),c.Bz]});var z=a(8796);class p{}p.\u0275fac=function(e){return new(e||p)},p.\u0275mod=t.oAB({type:p}),p.\u0275inj=t.cJS({imports:[_.ez,s.u5,g,z.A0,C.VI]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[379],{2379:(X,$,d)=>{d.r($),d.d($,{OrdersModule:()=>q});var u=d(6895),f=d(284),U=d(8703),e=d(4650),B=d(2937);class Z{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:[U.G.downloadOrder]}]}ngOnInit(){}}Z.\u0275fac=function(n){return new(n||Z)},Z.\u0275cmp=e.Xpm({type:Z,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(n,t){1&n&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&n&&(e.xp6(3),e.Q6J("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[B.e,f.lC]});var m=d(1889),l=d(4782),s=d(8505),r=d(9694),p=d(9568),g=d(2428),_=d(5412),h=d(4006),K=d(6709);class k{constructor(n){this.dialogRef=n,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}}k.\u0275fac=function(n){return new(n||k)(e.Y36(_.so))},k.\u0275cmp=e.Xpm({type:k,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],["mat-dialog-title","",1,"text-center","mb-8","fw-bold"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModel","ngModelChange"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center","mt-6"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0)(1,"h2",1),e._uU(2,"Cetak label pesanan"),e.qZA(),e.TgZ(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),e._uU(7,"Kamu akan mencetak label yang berisi detail pesanan"),e.qZA(),e.TgZ(8,"div",5)(9,"mat-checkbox",6),e.NdJ("ngModelChange",function(o){return t.tandaiSudahDicetak=o}),e.qZA(),e.TgZ(10,"span",7),e._uU(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),e.qZA()()()()(),e.TgZ(12,"mat-dialog-actions",8)(13,"button",9),e.NdJ("click",function(){return t.onCancel()}),e._uU(14,"Cancel"),e.qZA(),e.TgZ(15,"button",10),e.NdJ("click",function(){return t.onPrint()}),e._uU(16,"Cetak Pesanan"),e.qZA()()()),2&n&&(e.xp6(9),e.Q6J("ngModel",t.tandaiSudahDicetak))},dependencies:[h.JJ,h.On,K.oG,_.uh,_.xY,_.H8]});var V=d(4004),ee=d(9300),te=d(3900),S=d(1318),j=d(7185);class I{constructor(){}convertToCSV(n,t){let i;if("string"==typeof n)i=n;else{var o="object"==typeof n?n:JSON.parse(n);i=this.transformToCSVStringFormat(o)}this.downloadCSV(i,t)}transformToCSVStringFormat(n){if(!n||!n.length)return;const i=Object.keys(n[0]);return n.map(c=>i.map(O=>{let v=null==c[O]?"":c[O];return v=v instanceof Date?v.toLocaleString():v.toString().replace(/"/g,'""'),v.search(/("|,|\n)/g)>=0&&(v=`"${v}"`),v}).join(",")).join("\n")}downloadCSV(n,t){var i=new Blob([n],{type:"text/csv;charset=utf8;"}),o=document.createElement("a");o.setAttribute("href",window.URL.createObjectURL(i)),o.setAttribute("download",t),document.body.appendChild(o),o.click(),document.body.removeChild(o)}}I.\u0275fac=function(n){return new(n||I)},I.\u0275prov=e.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"});class x{constructor(n,t,i,o){this.http=n,this.dialog=t,this.toastr=i,this.exportService=o}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(n){return this.http.post("/api/orders/GetNewOrder",n).pipe((0,V.U)(t=>t.Data))}getTotalNewOrders(n){return this.http.post("/api/orders/GetCountNewOrder",{ListChannelID:n}).pipe((0,V.U)(i=>i.Count))}printShippingLabelTokopedia(n){const t={OrderNumber:n,Printed:!0};this.dialog.open(k).afterClosed().pipe((0,ee.h)(i=>void 0!==i),(0,te.w)(i=>(t.Printed=i,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(i=>{const o=window.open("about:blank","_blank");o.document.write(i),o.document.close()})}printShippingLabelTiktok(n,t){this.http.post("api/v1/Shippinglabel/Tiktok",{ShopID:t,OrderNumber:n}).subscribe(o=>{null!=o.data?window.open(o.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(n,t){this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",{ShopID:t,OrderNumber:n}).subscribe(o=>{var c=Uint8Array.from(atob(o),v=>v.charCodeAt(0)),O=new Blob([c],{type:"octet/stream"});m.g.openDownloadFile(O,`${n}.pdf`)})}printShippingLabelLazada(n,t){this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",{ShopID:t,OrderNumber:n}).subscribe(o=>{null!=o.result.data?window.open(o.result.data.pdf_url,"_blank"):this.toastr.error(o.message,"Cannot Print")})}exportOrders(n,t){return this.http.post("api/Orders/ExportOrder",n).pipe((0,s.b)(i=>{this.exportService.convertToCSV(i,t)}))}}x.\u0275fac=function(n){return new(n||x)(e.LFG(S.O),e.LFG(_.uw),e.LFG(j._W),e.LFG(I))},x.\u0275prov=e.Yz7({token:x,factory:x.\u0275fac});class y{constructor(n,t){this.http=n,this.toastr=t}acceptTokopediaOrders(n){return this.http.post("/api/Orders/AcceptOrderTokopedia",n).pipe((0,s.b)(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(n){const t=n.filter(o=>0==o.Status),i=n.filter(o=>1==o.Status);if(0==t.length&&i.length>0){let o=`<ol>${this.generateSuccessMessage(i)}</ol>`;this.toastr.success(o,"Success",{enableHtml:!0})}else if(t.length>0&&i.length>0){let o=`<ol>\n ${this.generateSuccessMessage(i)}\n ${this.generateErrorMessage(t)}\n </ol>`;this.toastr.warning(o,"Warning",{enableHtml:!0})}else{let o=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastr.error(o,"Error",{enableHtml:!0})}}generateSuccessMessage(n){let t="";return n.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> was successfully Accept</li>`}),t}generateErrorMessage(n){let t="";return n.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> ${i.Message}</li>`}),t}}y.\u0275fac=function(n){return new(n||y)(e.LFG(S.O),e.LFG(j._W))},y.\u0275prov=e.Yz7({token:y,factory:y.\u0275fac});var w=d(7481),T=d(8796),A=d(2594);class b{constructor(){}set typeId(n){this.channelLogo=m.g.getChannelLogoByTypeId(n),this.initChannelName(n)}initChannelName(n){switch(n){case r.x.Tokopedia:this.channelName="Tokopedia";break;case r.x.Tiktok:this.channelName="Tiktok";break;case r.x.WooCommerce:this.channelName="WooCommerce";break;case r.x.ShopeeV2:this.channelName="Shopee";break;case r.x.Lazada:this.channelName="Lazada";break;case r.x.KalCare:this.channelName="Kalcare"}}}b.\u0275fac=function(n){return new(n||b)},b.\u0275cmp=e.Xpm({type:b,selectors:[["app-channel-logo"]],inputs:{typeId:"typeId"},decls:4,vars:2,consts:[[1,"d-flex","align-items-center"],[2,"width","20px",3,"src"],[1,"ms-3","fw-normal"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"span",2),e._uU(3),e.qZA()()),2&n&&(e.xp6(1),e.Q6J("src",t.channelLogo,e.LSH),e.xp6(2),e.Oqu(t.channelName))}});var N=d(9640);function ne(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().ngIf,c=e.oxw();return e.KtG(c.onAcceptOrder(o))}),e._UZ(2,"i",12),e._uU(3," Accept "),e.qZA(),e.BQk()}}function ae(a,n){if(1&a&&(e.ynx(0),e.YNc(1,ne,4,0,"ng-container",1),e.BQk()),2&a){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.isTokopediaAvailable&&t.isTokopediaSelected)}}function ie(a,n){if(1&a&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&a){const t=n.item;e.xp6(1),e.Q6J("src",t.img,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}function oe(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"th",25)(2,"input",26),e.NdJ("ngModelChange",function(o){e.CHM(t);const c=e.oxw(3);return e.KtG(c.isCheckAll=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw(2).ngIf,c=e.oxw();return e.KtG(c.onSelectAllOrderData(o))}),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw(3);e.xp6(2),e.Q6J("ngModel",t.isCheckAll)}}function re(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"input",26),e.NdJ("ngModelChange",function(o){e.CHM(t);const c=e.oxw(2).$implicit;return e.KtG(c.selected=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw(4).ngIf,c=e.oxw();return e.KtG(c.onSelectOrderData(o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngModel",t.selected)}}function le(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"td"),e.YNc(2,re,2,1,"ng-container",1),e.qZA(),e.BQk()),2&a){const t=e.oxw().$implicit,i=e.oxw(3);e.xp6(2),e.Q6J("ngIf",t.Type==i.tokopediaType)}}function se(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.Number)}}function pe(a,n){if(1&a&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw(3);e.Q6J("href",i.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function ce(a,n){if(1&a&&(e.TgZ(0,"tr"),e.YNc(1,le,3,1,"ng-container",1),e.TgZ(2,"td"),e._uU(3),e.qZA(),e.TgZ(4,"td"),e.YNc(5,se,3,1,"ng-container",15),e.YNc(6,pe,2,2,"ng-template",null,27,e.W1O),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"date"),e.qZA(),e.TgZ(13,"td"),e._UZ(14,"app-channel-logo",28),e.qZA()()),2&a){const t=n.$implicit,i=e.MAs(7),o=e.oxw(3);e.xp6(1),e.Q6J("ngIf",o.isTokopediaAvailable),e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",t.ID==o.guidEmpty)("ngIfElse",i),e.xp6(4),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.xi3(12,7,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.Type)}}function de(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",16)(2,"table",17)(3,"thead",18)(4,"tr",19),e.YNc(5,oe,3,1,"ng-container",1),e.TgZ(6,"th",20),e._uU(7,"Outlet"),e.qZA(),e.TgZ(8,"th",21),e._uU(9,"Order number"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Customer"),e.qZA(),e.TgZ(12,"th",22),e._uU(13,"Created On"),e.qZA(),e.TgZ(14,"th",22),e._uU(15,"Channel"),e.qZA()()(),e.TgZ(16,"tbody"),e.YNc(17,ce,15,10,"tr",23),e.qZA()(),e.TgZ(18,"app-mat-paginator-no-count",24),e.NdJ("total",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.getPaginatonTotal())})("next",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onNextPage())})("previous",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onPreviousPage())}),e.ALo(19,"async"),e.ALo(20,"async"),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();let o;e.xp6(5),e.Q6J("ngIf",i.isTokopediaAvailable&&t),e.xp6(12),e.Q6J("ngForOf",t),e.xp6(1),e.Q6J("filter",i.filter)("totaldata",null==(o=e.lcZ(19,5,i.newOrdersData$))?null:o.length)("paginationTotal",e.lcZ(20,7,i.paginationTotal$))}}function ue(a,n){if(1&a&&(e.ynx(0),e.YNc(1,de,21,9,"ng-container",15),e.BQk()),2&a){const t=n.ngIf;e.oxw();const i=e.MAs(26);e.xp6(1),e.Q6J("ngIf",(null==t?null:t.length)>0)("ngIfElse",i)}}function ge(a,n){1&a&&(e.TgZ(0,"div",30),e._UZ(1,"app-empty-state"),e.qZA())}class L{constructor(n,t,i,o,c){this.localDataService=n,this.channelService=t,this.orderService=i,this.toastr=o,this.acceptOrderService=c,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=m.g.GuidEMpty,this.tokopediaType=r.x.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.getNewOrders()})}getNewOrders(){this.newOrdersData$=this.orderService.getNewOrders({PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).pipe((0,l.d)(),(0,s.b)(t=>{t.filter(o=>o.Type==r.x.Tokopedia)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID).pipe((0,l.d)())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(n){this.isTokopediaSelected=!1,n.filter(i=>i.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(n){n=n.map(t=>(t.Type==r.x.Tokopedia&&(t.selected=this.isCheckAll),t)),this.onSelectOrderData(n)}onAcceptOrder(n){let t=this.getSelectedTokopediaOrders(n);this.acceptOrderService.acceptTokopediaOrders(t).subscribe(i=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(n){return n.filter(i=>i.selected).map(i=>i.Number)}}function he(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"number"),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.ALo(8,"number"),e.qZA()()),2&a){const t=n.$implicit;e.xp6(2),e.Oqu(t.Code),e.xp6(2),e.Oqu(e.lcZ(5,3,t.Quantity)),e.xp6(3),e.Oqu(e.lcZ(8,5,t.Price))}}function _e(a,n){if(1&a&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),e._uU(5,"Outlet Info"),e.qZA()(),e.TgZ(6,"div",4)(7,"div",9),e._uU(8," Outlet : "),e.qZA(),e.TgZ(9,"div",9),e._uU(10),e.qZA()(),e.TgZ(11,"div",4)(12,"div",9),e._uU(13," Date : "),e.qZA(),e.TgZ(14,"div",9),e._uU(15),e.ALo(16,"date"),e.qZA()(),e.TgZ(17,"div",4)(18,"div",9),e._uU(19," Status : "),e.qZA(),e.TgZ(20,"div",9),e._uU(21),e.qZA()(),e.TgZ(22,"div",4)(23,"div",9),e._uU(24," Tax Type : "),e.qZA(),e.TgZ(25,"div",9),e._uU(26),e.qZA()(),e.TgZ(27,"div",4)(28,"div",9),e._uU(29," Due Date : "),e.qZA(),e.TgZ(30,"div",9),e._uU(31),e.ALo(32,"date"),e.qZA()()(),e.TgZ(33,"div",6)(34,"div",7)(35,"h3",8),e._uU(36,"Customer Info"),e.qZA()(),e.TgZ(37,"div",4)(38,"div",9),e._uU(39," Name : "),e.qZA(),e.TgZ(40,"div",9),e._uU(41),e.qZA()(),e.TgZ(42,"div",4)(43,"div",9),e._uU(44," Email : "),e.qZA(),e.TgZ(45,"div",9),e._uU(46),e.qZA()(),e.TgZ(47,"div",4)(48,"div",9),e._uU(49," Mobile : "),e.qZA(),e.TgZ(50,"div",9),e._uU(51),e.qZA()()()(),e.TgZ(52,"div",10)(53,"h3",11),e._uU(54,"Products Sold"),e.qZA(),e.TgZ(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),e._uU(60,"Code"),e.qZA(),e.TgZ(61,"th"),e._uU(62,"Quantity"),e.qZA(),e.TgZ(63,"th"),e._uU(64,"Price"),e.qZA()()(),e.TgZ(65,"tbody"),e.YNc(66,he,9,7,"tr",16),e.qZA()()()()()),2&a){const t=e.oxw();e.xp6(10),e.hij(" ",t.model.Outlet," "),e.xp6(5),e.hij(" ",e.xi3(16,9,t.model.Date,"dd MMM yyyy")," "),e.xp6(6),e.hij(" ",t.model.Delivery," "),e.xp6(5),e.hij(" ",t.model.TaxType," "),e.xp6(5),e.hij(" ",e.xi3(32,12,t.model.DueDate,"dd MMM yyyy")," "),e.xp6(10),e.hij(" ",t.model.Customer.Name," "),e.xp6(5),e.hij(" ",t.model.Customer.Email," "),e.xp6(5),e.hij(" ",t.model.Customer.Mobile," "),e.xp6(15),e.Q6J("ngForOf",t.model.Variants)}}L.\u0275fac=function(n){return new(n||L)(e.Y36(p.T),e.Y36(g.T),e.Y36(x),e.Y36(j._W),e.Y36(y))},L.\u0275cmp=e.Xpm({type:L,selectors:[["app-new-order"]],decls:27,vars:13,consts:[["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"hideSearchBox","onSubmit"],[4,"ngIf"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["EMPTY_STATE",""],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[2,"width","5px"],["type","checkbox",3,"ngModel","ngModelChange"],["NOT_EMPTY",""],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return t.getNewOrders()}),e.TgZ(1,"actions"),e.YNc(2,ae,2,1,"ng-container",1),e.ALo(3,"async"),e.qZA(),e.TgZ(4,"filters")(5,"div",2)(6,"div")(7,"h6"),e._uU(8,"Channel"),e.qZA(),e.TgZ(9,"ng-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(10,ie,3,2,"ng-template",4),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Number"),e.qZA(),e.TgZ(14,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(15,"div")(16,"h6"),e._uU(17,"Page Size"),e.qZA(),e.TgZ(18,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(19,"content")(20,"div",7)(21,"div",8)(22,"div",9),e.YNc(23,ue,2,2,"ng-container",1),e.ALo(24,"async"),e.YNc(25,ge,2,0,"ng-template",null,10,e.W1O),e.qZA()()()()()),2&n&&(e.Q6J("hideSearchBox",!0),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,9,t.newOrdersData$)),e.xp6(7),e.Q6J("clearable",!0)("multiple",!0)("items",t.channels)("ngModel",t.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(5),e.Q6J("ngIf",e.lcZ(24,11,t.newOrdersData$)))},dependencies:[u.sg,u.O5,h.Fj,h.wV,h.Wl,h.JJ,h.On,w.p,T.w9,T.ir,A.n,b,N.s,u.Ov,u.uU]});const me=function(){return["/menu/Order"]};class J{constructor(n,t){this.http=n,this.url=t,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){this.http.post("/api/orders/GetInvoiceDetail",{Number:this.number,Outlet:this.outlet}).subscribe(t=>{this.model=t})}}function fe(a,n){if(1&a&&(e.TgZ(0,"span",11),e._UZ(1,"img",12),e.qZA(),e._uU(2)),2&a){const t=n.item;e.xp6(1),e.Q6J("src",t.img,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}J.\u0275fac=function(n){return new(n||J)(e.Y36(S.O),e.Y36(f.gz))},J.\u0275cmp=e.Xpm({type:J,selectors:[["app-detail-order"]],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2),e.YNc(6,_e,67,15,"div",3),e.qZA()()()),2&n&&(e.Q6J("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("routerLink",e.DdM(5,me)),e.xp6(4),e.Q6J("ngIf",t.model))},dependencies:[u.sg,u.O5,w.p,f.rH,u.JJ,u.uU]});const Te=function(){return["/menu/Order/detail"]},Ce=function(a,n){return{Number:a,Outlet:n}};function Ze(a,n){if(1&a&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Te))("queryParams",e.WLB(4,Ce,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function xe(a,n){if(1&a&&(e.TgZ(0,"a",30),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw(2);e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function be(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"a",31),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,c=e.oxw(2);return e.KtG(c.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",32),e.qZA()}}function ve(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Ze,2,7,"a",24),e.YNc(5,xe,2,2,"a",25),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",26),e.qZA(),e.TgZ(16,"td",27),e.YNc(17,be,2,0,"a",28),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==i.channelType.ShopeeV2||t.TypeID==i.channelType.Tokopedia||t.TypeID==i.channelType.Tiktok||t.TypeID==i.channelType.Lazada)}}function Se(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",13)(2,"table",14)(3,"thead",15)(4,"tr",16)(5,"th",17),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",18),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",19),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",20),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",20),e._uU(16,"Channel"),e.qZA(),e._UZ(17,"th",21),e.qZA()(),e.TgZ(18,"tbody"),e.YNc(19,ve,18,13,"tr",22),e.qZA()(),e.TgZ(20,"app-mat-paginator-no-count",23),e.NdJ("total",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.StoreRowsCountAPIResult())})("next",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.NextPage())})("previous",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.PreviousPage())}),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(19),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal)}}function we(a,n){1&a&&(e.TgZ(0,"div",33),e._UZ(1,"app-empty-state"),e.qZA())}class Q{constructor(n,t,i,o,c){this.http=n,this.localDataService=t,this.dialog=i,this.orderService=o,this.channelService=c,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.checkboxState=!1,this.channelType=r.x}ngOnInit(){this.Load()}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}hasGuidEmpty(n){return n==m.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetReadyToShip",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}onPrintShippingLabel(n,t,i){switch(i){case r.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case r.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case r.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t);break;case r.x.Lazada:this.orderService.printShippingLabelLazada(n,t)}}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function De(a,n){if(1&a&&(e.TgZ(0,"span",11),e._UZ(1,"img",12),e.qZA(),e._uU(2)),2&a){const t=n.item;e.xp6(1),e.Q6J("src",t.img,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}Q.\u0275fac=function(n){return new(n||Q)(e.Y36(S.O),e.Y36(p.T),e.Y36(_.uw),e.Y36(x),e.Y36(g.T))},Q.\u0275cmp=e.Xpm({type:Q,selectors:[["app-ready-to-ship"]],decls:23,vars:8,consts:[["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container","",1,""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],[2,"width","130px"],[2,"width","60px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(7,fe,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(16,"content")(17,"div",6)(18,"div",7)(19,"div",8),e.YNc(20,Se,21,4,"ng-container",9),e.YNc(21,we,2,0,"ng-template",null,10,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(22);e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",t.channels)("ngModel",t.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(5),e.Q6J("ngIf",t.data&&t.data.length>0)("ngIfElse",i)}},dependencies:[u.sg,u.O5,h.Fj,h.wV,h.JJ,h.On,w.p,f.rH,T.w9,T.ir,A.n,b,N.s,u.JJ,u.uU]});const ye=function(){return["/menu/Order/detail"]},Ae=function(a,n){return{Number:a,Outlet:n}};function Ne(a,n){if(1&a&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ye))("queryParams",e.WLB(4,Ae,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function Pe(a,n){if(1&a&&(e.TgZ(0,"a",30),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw(2);e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Oe(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"a",31),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,c=e.oxw(2);return e.KtG(c.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",32),e.qZA()}}function Ie(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Ne,2,7,"a",24),e.YNc(5,Pe,2,2,"a",25),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",26),e.qZA(),e.TgZ(16,"td",27),e.YNc(17,Oe,2,0,"a",28),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==i.channelType.ShopeeV2||t.TypeID==i.channelType.Tokopedia||t.TypeID==i.channelType.Tiktok||t.TypeID==i.channelType.Lazada)}}function Me(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",13)(2,"table",14)(3,"thead",15)(4,"tr",16)(5,"th",17),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",18),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",19),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",20),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",20),e._uU(16,"Channel"),e.qZA(),e._UZ(17,"th",21),e.qZA()(),e.TgZ(18,"tbody"),e.YNc(19,Ie,18,13,"tr",22),e.qZA()(),e.TgZ(20,"app-mat-paginator-no-count",23),e.NdJ("total",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.StoreRowsCountAPIResult())})("next",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.NextPage())})("previous",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.PreviousPage())}),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(19),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal)}}function qe(a,n){1&a&&(e.TgZ(0,"div",33),e._UZ(1,"app-empty-state"),e.qZA())}class E{constructor(n,t,i,o){this.http=n,this.localDataService=t,this.orderService=i,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.channelType=r.x}ngOnInit(){this.Load()}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(n){return n==m.g.GuidEMpty}Get(n){this.http.post("api/orders/GetShipped",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onPrintShippingLabel(n,t,i){switch(i){case r.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case r.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case r.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t);break;case r.x.Lazada:this.orderService.printShippingLabelLazada(n,t)}}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}E.\u0275fac=function(n){return new(n||E)(e.Y36(S.O),e.Y36(p.T),e.Y36(x),e.Y36(g.T))},E.\u0275cmp=e.Xpm({type:E,selectors:[["app-shipped"]],decls:23,vars:8,consts:[["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],[2,"width","130px"],[2,"width","60px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(7,De,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(16,"content")(17,"div",6)(18,"div",7)(19,"div",8),e.YNc(20,Me,21,4,"ng-container",9),e.YNc(21,qe,2,0,"ng-template",null,10,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(22);e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",t.channels)("ngModel",t.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(5),e.Q6J("ngIf",t.data&&t.data.length>0)("ngIfElse",i)}},dependencies:[u.sg,u.O5,h.Fj,h.wV,h.JJ,h.On,w.p,f.rH,T.w9,T.ir,A.n,b,N.s,u.JJ,u.uU]});var Ue=d(501);function ke(a,n){if(1&a&&(e.TgZ(0,"span",11),e._UZ(1,"img",12),e.qZA(),e._uU(2)),2&a){const t=n.item;e.xp6(1),e.Q6J("src",t.img,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}const Le=function(){return["/menu/Order/detail"]},Je=function(a,n){return{Number:a,Outlet:n}};function Qe(a,n){if(1&a&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Le))("queryParams",e.WLB(4,Je,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function Ee(a,n){if(1&a&&(e.TgZ(0,"a",30),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw(2);e.Q6J("href",i.customerInfoUrl+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Ye(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"a",31),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,c=e.oxw(2);return e.KtG(c.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",32),e.qZA()}}function Ge(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Qe,2,7,"a",24),e.YNc(5,Ee,2,2,"a",25),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",26),e.qZA(),e.TgZ(16,"td",27),e.YNc(17,Ye,2,0,"a",28),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==i.channelType.ShopeeV2||t.TypeID==i.channelType.Tokopedia||t.TypeID==i.channelType.Tiktok)}}function Fe(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",13)(2,"table",14)(3,"thead",15)(4,"tr",16)(5,"th",17),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",18),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",19),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",20),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",20),e._uU(16,"Channel"),e.qZA(),e._UZ(17,"th",21),e.qZA()(),e.TgZ(18,"tbody"),e.YNc(19,Ge,18,13,"tr",22),e.qZA()(),e.TgZ(20,"app-mat-paginator-no-count",23),e.NdJ("total",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.StoreRowsCountAPIResult())})("next",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.NextPage())})("previous",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.PreviousPage())}),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(19),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal)}}function He(a,n){1&a&&(e.TgZ(0,"div",33),e._UZ(1,"app-empty-state"),e.qZA())}class Y{constructor(n,t,i,o){this.http=n,this.orderService=t,this.authService=i,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.channelType=r.x}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==m.g.GuidEMpty}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetDelivered ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onPrintShippingLabel(n,t,i){switch(i){case r.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case r.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case r.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t)}}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function Re(a,n){if(1&a&&(e.TgZ(0,"span",11),e._UZ(1,"img",12),e.qZA(),e._uU(2)),2&a){const t=n.item;e.xp6(1),e.Q6J("src",t.img,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}Y.\u0275fac=function(n){return new(n||Y)(e.Y36(S.O),e.Y36(x),e.Y36(Ue.e),e.Y36(g.T))},Y.\u0275cmp=e.Xpm({type:Y,selectors:[["app-delivered"]],decls:23,vars:9,consts:[["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"hideSearchBox","onSubmit"],["container","",1,""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],[2,"width","130px"],[2,"width","60px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(7,ke,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(16,"content")(17,"div",6)(18,"div",7)(19,"div",8),e.YNc(20,Fe,21,4,"ng-container",9),e.YNc(21,He,2,0,"ng-template",null,10,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(22);e.Q6J("hideSearchBox",!0),e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",t.channels)("ngModel",t.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(5),e.Q6J("ngIf",t.data&&t.data.length>0)("ngIfElse",i)}},dependencies:[u.sg,u.O5,h.Fj,h.wV,h.JJ,h.On,w.p,f.rH,T.w9,T.ir,A.n,b,N.s,u.JJ,u.uU]});const ze=function(){return["/menu/Order/detail"]},$e=function(a,n){return{Number:a,Outlet:n}};function Be(a,n){if(1&a&&(e.TgZ(0,"a",27),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ze))("queryParams",e.WLB(4,$e,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function je(a,n){if(1&a&&(e.TgZ(0,"a",28),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw(2);e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Ke(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Be,2,7,"a",24),e.YNc(5,je,2,2,"a",25),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA(),e.TgZ(16,"td"),e._UZ(17,"app-channel-logo",26),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Oqu(t.State),e.xp6(2),e.Q6J("typeId",t.TypeID)}}function Ve(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",13)(2,"table",14)(3,"thead",15)(4,"tr",16)(5,"th",17),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",18),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",19),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",20),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",21),e._uU(16,"Status"),e.qZA(),e.TgZ(17,"th",20),e._uU(18,"Channel"),e.qZA()()(),e.TgZ(19,"tbody"),e.YNc(20,Ke,18,13,"tr",22),e.qZA()(),e.TgZ(21,"app-mat-paginator-no-count",23),e.NdJ("total",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.StoreRowsCountAPIResult())})("next",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.NextPage())})("previous",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.PreviousPage())}),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(20),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal)}}function We(a,n){1&a&&(e.TgZ(0,"div",29),e._UZ(1,"app-empty-state"),e.qZA())}class G{constructor(n,t,i){this.http=n,this.localDataService=t,this.channelService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==m.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetAll ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter=n,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function Xe(a,n){if(1&a&&(e.TgZ(0,"span",11),e._UZ(1,"img",12),e.qZA(),e._uU(2)),2&a){const t=n.item;e.xp6(1),e.Q6J("src",t.img,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}G.\u0275fac=function(n){return new(n||G)(e.Y36(S.O),e.Y36(p.T),e.Y36(g.T))},G.\u0275cmp=e.Xpm({type:G,selectors:[["app-all-order"]],decls:23,vars:8,consts:[["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],[2,"width","130px"],[2,"width","135px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(7,Re,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(16,"content")(17,"div",6)(18,"div",7)(19,"div",8),e.YNc(20,Ve,22,4,"ng-container",9),e.YNc(21,We,2,0,"ng-template",null,10,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(22);e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",t.channels)("ngModel",t.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(5),e.Q6J("ngIf",t.data&&t.data.length>0)("ngIfElse",i)}},dependencies:[u.sg,u.O5,h.Fj,h.wV,h.JJ,h.On,w.p,f.rH,T.w9,T.ir,A.n,b,N.s,u.JJ,u.uU]});const et=function(){return["/menu/Order/detail"]},tt=function(a,n){return{Number:a,Outlet:n}};function nt(a,n){if(1&a&&(e.TgZ(0,"a",26),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,et))("queryParams",e.WLB(4,tt,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function at(a,n){if(1&a&&(e.TgZ(0,"a",27),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw(2);e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function it(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,nt,2,7,"a",23),e.YNc(5,at,2,2,"a",24),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",25),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID)}}function ot(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",13)(2,"table",14)(3,"thead",15)(4,"tr",16)(5,"th",17),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",18),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",19),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",20),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",20),e._uU(16,"Channel"),e.qZA()()(),e.TgZ(17,"tbody"),e.YNc(18,it,16,12,"tr",21),e.qZA()(),e.TgZ(19,"app-mat-paginator-no-count",22),e.NdJ("total",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.StoreRowsCountAPIResult())})("next",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.NextPage())})("previous",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.PreviousPage())}),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(18),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal)}}function rt(a,n){1&a&&(e.TgZ(0,"div",28),e._UZ(1,"app-empty-state"),e.qZA())}class F{constructor(n,t,i){this.http=n,this.localDataService=t,this.channelService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==m.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetCancelled ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}}F.\u0275fac=function(n){return new(n||F)(e.Y36(S.O),e.Y36(p.T),e.Y36(g.T))},F.\u0275cmp=e.Xpm({type:F,selectors:[["app-cancelled"]],decls:23,vars:8,consts:[["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container","",1,""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(7,Xe,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(16,"content")(17,"div",6)(18,"div",7)(19,"div",8),e.YNc(20,ot,20,4,"ng-container",9),e.YNc(21,rt,2,0,"ng-template",null,10,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(22);e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",t.channels)("ngModel",t.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(5),e.Q6J("ngIf",t.data&&t.data.length>0)("ngIfElse",i)}},dependencies:[u.sg,u.O5,h.Fj,h.wV,h.JJ,h.On,w.p,f.rH,T.w9,T.ir,A.n,b,N.s,u.JJ,u.uU]});var lt=d(2138),P=(()=>{return(a=P||(P={}))[a.DoNothing=0]="DoNothing",a[a.New=1]="New",a[a.Update=2]="Update",P;var a})(),st=d(6082),H=d(9602),R=d(8425),W=d(266);function pt(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",28)(2,"button",29),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(11);return e.KtG(o.previous())}),e._uU(3," Back "),e.qZA(),e.TgZ(4,"button",30),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),c=e.MAs(11);return e.KtG(o.onNext(c))}),e._uU(5," Next "),e.qZA(),e.TgZ(6,"button",31),e._UZ(7,"b",32),e.qZA(),e.TgZ(8,"ul",33)(9,"li",34)(10,"a",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.exportOrders())}),e._uU(11," Export "),e.qZA()()()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(4),e.Q6J("disabled",t.checkDisabledNextFilter())}}function ct(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),c=e.MAs(11);return e.KtG(o.onNext(c))}),e._uU(1," Next "),e.qZA()}if(2&a){const t=e.oxw();e.Q6J("disabled",t.checkDisabledNextFilter())}}function dt(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),c=e.MAs(11);return e.KtG(o.onNew(c))}),e._UZ(1,"i",38),e._uU(2," New "),e.qZA()}}function ut(a,n){1&a&&e._uU(0,"Filter")}function gt(a,n){if(1&a&&(e.TgZ(0,"ng-option",39),e._UZ(1,"img",40),e._uU(2),e.qZA()),2&a){const t=n.$implicit;e.Q6J("value",t.ID),e.xp6(1),e.s9C("src",t.Img,e.LSH),e.xp6(1),e.hij("",t.Name," ")}}function ht(a,n){1&a&&e._uU(0,"Preview")}function _t(a,n){if(1&a&&(e.TgZ(0,"th",58),e._uU(1),e.qZA()),2&a){const t=e.oxw(2);e.xp6(1),e.Oqu(0==t.getTypeID()?"Last Status Update":"Created Date")}}function mt(a,n){if(1&a&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"date"),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.Date,"dd MMM yyyy HH:mm:ss"),"")}}function ft(a,n){if(1&a&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",t.ActionString," ")}}function Tt(a,n){if(1&a&&(e.TgZ(0,"li"),e._uU(1),e.qZA()),2&a){const t=n.$implicit;e.xp6(1),e.hij("",t," ")}}function Ct(a,n){if(1&a&&(e.TgZ(0,"ul",63),e.YNc(1,Tt,2,1,"li",59),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",t.ActionString)}}function Zt(a,n){if(1&a&&(e.TgZ(0,"span",64),e._UZ(1,"i",65),e.qZA()),2&a){const t=e.oxw().$implicit;e.hYB("title","Delivery : ",t.DeliveryState," \nPayment : ",t.PaymentState,"")}}const xt=function(a,n){return{"over-due-today":a,"over-due":n}};function bt(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.YNc(5,mt,3,4,"td",1),e.TgZ(6,"td")(7,"span"),e._uU(8),e.qZA(),e._uU(9),e.qZA(),e.TgZ(10,"td",60)(11,"span"),e._uU(12),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"td"),e.YNc(15,ft,2,1,"span",1),e.YNc(16,Ct,2,1,"ul",61),e.qZA(),e.TgZ(17,"td"),e.YNc(18,Zt,2,2,"span",62),e.qZA()()),2&a){const t=n.$implicit,i=n.index,o=e.oxw(3);e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Oqu(t.Number),e.xp6(1),e.Q6J("ngIf",o.getTypeID()!=o.channelType.ShopeeV2),e.xp6(3),e.hij("",t.ChannelStatus," - "),e.xp6(1),e.Oqu(t.ChannelStatusDescription),e.xp6(1),e.Q6J("ngClass",e.WLB(12,xt,(null==t?null:t.Action)==o.actionPreviewOrder.Update,(null==t?null:t.Action)==o.actionPreviewOrder.New))("matTooltip",91==t.POSStatus||"Conflict"==t.POSStatusDescription?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),e.xp6(2),e.hij("",t.POSStatus," - "),e.xp6(1),e.hij("",t.POSStatusDescription," "),e.xp6(2),e.Q6J("ngIf",1==t.ActionString.length),e.xp6(1),e.Q6J("ngIf",t.ActionString.length>1),e.xp6(2),e.Q6J("ngIf",99!=t.ChannelStatus&&99!=t.POSStatus)}}function vt(a,n){if(1&a&&(e.ynx(0),e.YNc(1,bt,19,15,"tr",59),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.displayedPreviewData)}}function St(a,n){1&a&&(e.TgZ(0,"tr",66)(1,"td",67)(2,"div",68),e._UZ(3,"i",69),e.qZA(),e.TgZ(4,"h4",70),e._uU(5,"There is no order to processed"),e.qZA()()())}function wt(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",41)(1,"div",42)(2,"div",43)(3,"ul",44)(4,"li",45)(5,"button",46),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.ALL))}),e._uU(6),e.qZA()(),e.TgZ(7,"li",45)(8,"button",47),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.SYNC))}),e._uU(9),e.qZA()(),e.TgZ(10,"li",45)(11,"button",48),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.WRONG))}),e._uU(12),e.qZA()(),e.TgZ(13,"li",45)(14,"button",49),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.UNSYNC))}),e._uU(15),e.qZA()()()(),e.TgZ(16,"table",50)(17,"thead",51)(18,"tr"),e._UZ(19,"th",52),e.TgZ(20,"th",53),e._uU(21,"Number"),e.qZA(),e.YNc(22,_t,2,1,"th",54),e.TgZ(23,"th",55),e._uU(24,"Channel Status"),e.qZA(),e.TgZ(25,"th",55),e._uU(26,"POS Status"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Action"),e.qZA(),e._UZ(29,"th",52),e.qZA()(),e.TgZ(30,"tbody"),e.YNc(31,vt,2,1,"ng-container",56),e.YNc(32,St,6,0,"ng-template",null,57,e.W1O),e.qZA()()()()}if(2&a){const t=e.MAs(33),i=e.oxw();e.xp6(5),e.Q6J("ngClass","all"==i.pillStatus?"btn-secondary text-white":"btn-outline-dark"),e.xp6(1),e.hij("All (",i.allData,")"),e.xp6(2),e.Q6J("ngClass","sync"==i.pillStatus?"btn-success":"btn-outline-success"),e.xp6(1),e.hij("Existing (",i.syncData,")"),e.xp6(2),e.Q6J("ngClass","wrong"==i.pillStatus?"btn-warning text-white":"btn-outline-warning"),e.xp6(1),e.hij("Wrong Status (",i.wrongData,")"),e.xp6(2),e.Q6J("ngClass","unsync"==i.pillStatus?"btn-danger":"btn-outline-danger"),e.xp6(1),e.hij("Missing (",i.unsyncData,")"),e.xp6(7),e.Q6J("ngIf",i.getTypeID()!=i.channelType.ShopeeV2),e.xp6(9),e.Q6J("ngIf",i.displayedPreviewData.length>0)("ngIfElse",t)}}function Dt(a,n){1&a&&e._uU(0,"Finish")}const yt=function(a){return{"over-due":a}};function At(a,n){if(1&a&&(e.TgZ(0,"tr",73)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA()()),2&a){const t=n.$implicit,i=n.index;e.Q6J("ngClass",e.VKq(5,yt,t.Exception)),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Status),e.xp6(2),e.Oqu(t.Exception)}}function Nt(a,n){if(1&a&&(e.ynx(0),e.YNc(1,At,9,7,"tr",72),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.downloadData)}}function Pt(a,n){1&a&&(e.TgZ(0,"tr",66)(1,"td",67)(2,"div",68),e._UZ(3,"i",69),e.qZA(),e.TgZ(4,"h4",70),e._uU(5,"There is no order to processed"),e.qZA()()())}function Ot(a,n){if(1&a&&(e.TgZ(0,"div",41)(1,"div",42)(2,"table",50)(3,"thead",51)(4,"tr"),e._UZ(5,"th",52),e.TgZ(6,"th"),e._uU(7,"Order Number"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Status"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Exception"),e.qZA()()(),e.TgZ(12,"tbody"),e.YNc(13,Nt,2,1,"ng-container",56),e.YNc(14,Pt,6,0,"ng-template",null,71,e.W1O),e.qZA()()()()),2&a){const t=e.MAs(15),i=e.oxw();e.xp6(13),e.Q6J("ngIf",(null==i.downloadData?null:i.downloadData.length)>0)("ngIfElse",t)}}function It(a,n){1&a&&e._UZ(0,"i",74)}function Mt(a,n){1&a&&e._UZ(0,"i",75)}function qt(a,n){1&a&&e._UZ(0,"i",76)}var C=(()=>{return(a=C||(C={})).ALL="all",a.SYNC="sync",a.WRONG="wrong",a.UNSYNC="unsync",C;var a})();class z{constructor(n,t,i,o,c,O){this.http=n,this.toastr=t,this.datePipe=i,this.url=o,this.productService=c,this.orderService=O,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=r.x,this.previewStatus=C,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=P}ngOnInit(){this.initPageLoader(),this.url.queryParams.subscribe(n=>{this.channelID=n.ChannelID,this.startDate=new Date(n.Date),this.endDate=new Date(n.Date)})}initPageLoader(){this.productService.loader().subscribe(n=>{this.channelOptions=n.Options.Channel})}onDownload(n){this.http.post("/api/Orders/Download",{ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData}).subscribe(i=>{this.downloadData=i.Body,this.onStepperNext(n)})}onPreview(n){this.validateDatePreview()&&this.http.post("/api/Orders/Preview",{ID:this.channelID,From:this.startDate,To:this.endDate}).subscribe(i=>{0!=i.length?(this.previewData=i,this.groupingPreviewData(),this.filterPreviewData(C.ALL),this.initLengthStatusData(),this.onStepperNext(n)):this.toastrEmptyPreview()})}toastrEmptyPreview(){this.toastr.info("There is no orders from "+this.datePipe.transform(this.startDate,"dd MMM yyyy")+" to "+this.datePipe.transform(this.endDate,"dd MMM yyyy")+" !","No Orders!")}validateDatePreview(){let n=!0;return m.g.getDaysDiff(this.startDate,this.endDate)>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),n=!1),n}setPageTitle(n){this.pageTitle=`\n ${n} (${this.getDateTitle()})\n `}getDateTitle(){const n=m.g.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),t=this.datePipe.transform(this.startDate,n);return`${null==n?"":t+"-"} ${this.datePipe.transform(this.endDate,"dd MMM yyyy")}`}onNew(n){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",n.reset()}groupingPreviewData(){let n=this.filterDataByStatus(C.UNSYNC),t=this.filterDataByStatus(C.WRONG);this.downloadedPreviewData=[...n,...t]}filterDataByStatus(n){let t=[];switch(n){case C.ALL:t=this.previewData;break;case C.SYNC:t=this.previewData.filter(i=>i.Action==P.DoNothing);break;case C.WRONG:t=this.previewData.filter(i=>i.Action==P.Update);break;case C.UNSYNC:t=this.previewData.filter(i=>i.Action==P.New)}return t}filterPreviewData(n){this.pillStatus=n,this.displayedPreviewData=this.filterDataByStatus(n)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(C.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(C.SYNC).length,this.unsyncData=this.filterDataByStatus(C.UNSYNC).length}getTypeID(){var n=this.channelOptions.find(t=>t.ID==this.channelID)?.TypeID;return n??0}onStepperChange(n){this.currentState=n.selectedStep.state}onStepperNext(n){n.selected.completed=!0,n.next()}onNext(n){switch(this.currentState){case"filter":this.onPreview(n);break;case"preview":this.onDownload(n)}}stepChange(n){switch(n?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let t=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${t?.Name}`);break;case"finish":this.setPageTitle("Download")}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let n=!m.g.isValidDate(this.startDate)||!m.g.isValidDate(this.endDate),t=m.g.IsEmpty(this.channelID);return n||t}exportOrders(){let n={ID:this.channelID,From:this.startDate,To:this.endDate};const t=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(n,t).subscribe()}}z.\u0275fac=function(n){return new(n||z)(e.Y36(S.O),e.Y36(j._W),e.Y36(u.uU),e.Y36(f.gz),e.Y36(st.M),e.Y36(x))},z.\u0275cmp=e.Xpm({type:z,selectors:[["app-download"]],features:[e._Bn([{provide:lt.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:47,vars:20,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2","type","button",3,"disabled","click",4,"ngIf"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2",3,"click",4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["labelPosition","bottom","linear","",1,"w-100","stepper-download",3,"ngClass","selectionChange"],["stepper",""],["state","filter",3,"editable","completed"],["matStepLabel",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body",3,"clearable","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-1rem"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],["state","preview",3,"editable","completed"],["class","row pt-2",4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","border-end-0",3,"disabled","click"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"min-width","85px !important"],[1,"dropdown-item"],[3,"click"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"disabled","click"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"nav","nav-pills"],[1,"nav-item","mx-3"],[1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["EMPTY",""],["width","15%"],[4,"ngFor","ngForOf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],["EMPTY_DOWNLOAD",""],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-file"],[1,"fa-sharp","fa-solid","fa-flag"]],template:function(n,t){if(1&n){const i=e.EpF();e.TgZ(0,"mainpanel",0)(1,"actions"),e.YNc(2,pt,12,1,"ng-container",1),e.YNc(3,ct,2,1,"button",2),e.YNc(4,dt,3,0,"button",3),e.qZA(),e.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,9),e.NdJ("selectionChange",function(c){return t.stepChange(c)})("selectionChange",function(c){return t.onStepperChange(c)}),e.TgZ(12,"mat-step",10),e.YNc(13,ut,1,0,"ng-template",11),e.TgZ(14,"div",12)(15,"div",6)(16,"div",5)(17,"div",13)(18,"h5"),e._uU(19,"Select a Channel"),e.qZA(),e.TgZ(20,"p",14),e._uU(21,"Select Channel want to download order"),e.qZA()(),e.TgZ(22,"div",13)(23,"ng-select",15),e.NdJ("ngModelChange",function(c){return t.channelID=c}),e.YNc(24,gt,3,3,"ng-option",16),e.qZA()()(),e.TgZ(25,"div",17)(26,"div",13)(27,"h5"),e._uU(28,"Date Range"),e.qZA(),e.TgZ(29,"p",14),e._uU(30,"Select transaction date of the channel you want to download (Max 2 Weeks)"),e.qZA()(),e.TgZ(31,"div",13)(32,"div",6)(33,"mat-date-range-input",18)(34,"input",19),e.NdJ("ngModelChange",function(c){return t.startDate=c})("click",function(){e.CHM(i);const c=e.MAs(37);return e.KtG(c.open())}),e.qZA(),e.TgZ(35,"input",20),e.NdJ("ngModelChange",function(c){return t.endDate=c})("click",function(){e.CHM(i);const c=e.MAs(37);return e.KtG(c.open())}),e.qZA()(),e._UZ(36,"mat-date-range-picker",null,21),e.qZA()()()()()(),e.TgZ(38,"mat-step",22),e.YNc(39,ht,1,0,"ng-template",11),e.YNc(40,wt,34,11,"div",23),e.qZA(),e.TgZ(41,"mat-step",24),e.YNc(42,Dt,1,0,"ng-template",11),e.YNc(43,Ot,16,2,"div",23),e.qZA(),e.YNc(44,It,1,0,"ng-template",25),e.YNc(45,Mt,1,0,"ng-template",26),e.YNc(46,qt,1,0,"ng-template",27),e.qZA()()()()()()()}if(2&n){const i=e.MAs(11),o=e.MAs(37);e.Q6J("headerTitle",t.pageTitle)("description",t.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf","preview"==t.currentState),e.xp6(1),e.Q6J("ngIf","filter"==t.currentState),e.xp6(1),e.Q6J("ngIf","finish"==t.currentState),e.xp6(6),e.s9C("ngClass","last-edited-step-"+i.selectedIndex),e.xp6(2),e.Q6J("editable","finish"!=t.currentState)("completed",!1),e.xp6(11),e.Q6J("clearable",!1)("ngModel",t.channelID),e.xp6(1),e.Q6J("ngForOf",t.channelOptions),e.xp6(9),e.Q6J("rangePicker",o),e.xp6(1),e.Q6J("ngModel",t.startDate),e.xp6(1),e.Q6J("ngModel",t.endDate),e.xp6(3),e.Q6J("editable","finish"!=t.currentState)("completed",!1),e.xp6(2),e.Q6J("ngIf","preview"==t.currentState),e.xp6(3),e.Q6J("ngIf","finish"==t.currentState)}},dependencies:[u.mk,u.sg,u.O5,h.Fj,h.JJ,h.On,w.p,T.w9,T.jq,H.wx,H.zY,H.By,H._g,R.C0,R.VY,R.Vq,R.z9,W.gM,u.uU],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container mat-step-header>div.mat-step-label{padding-top:8px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}"]});var D=d(8063);const Ut=[{path:"",component:Z,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:L,canActivate:[D.a],data:{title:"New Order"}},{path:"detail",component:J,canActivate:[D.a],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Q,canActivate:[D.a],data:{title:"Ready To Ship"}},{path:"Shipped",component:E,canActivate:[D.a],data:{title:"Shipped"}},{path:"Delivered",component:Y,canActivate:[D.a],data:{title:"Delivered"}},{path:"All",component:G,canActivate:[D.a],data:{title:"All Order"}},{path:"Cancelled",component:F,canActivate:[D.a],data:{title:"Cancelled"}},{path:"Download",component:z,canActivate:[D.a],data:{title:"Download"}}]}];class M{}M.\u0275fac=function(n){return new(n||M)},M.\u0275mod=e.oAB({type:M}),M.\u0275inj=e.cJS({imports:[u.ez,f.Bz.forChild(Ut)]});var kt=d(8739),Lt=d(3238),Jt=d(1108),Qt=d(4385);class q{}q.\u0275fac=function(n){return new(n||q)},q.\u0275mod=e.oAB({type:q}),q.\u0275inj=e.cJS({providers:[x,y],imports:[u.ez,h.u5,M,B.Z,w.R,kt.TU,f.Bz,T.A0,H.FA,Lt.XK,A.n,R.T5,W.AV,Jt.f,K.p9,_.Is,Qt.LD,N.s]})},6082:(X,$,d)=>{d.d($,{M:()=>Z});var u=d(8505),f=d(1889),U=d(4650),e=d(1318),B=d(7185);class Z{constructor(l,s){this.httpService=l,this.toastrService=s}loader(l=f.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:l})}LoadInPOS(l=f.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:l})}filterChannelByTypeId(l,s){return l.filter(r=>-1!==s.findIndex(p=>r.TypeID==p))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(l){return this.httpService.post("/api/product/TotalProductLive",{ID:l})}clearCacheChannel(l){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:l})}uploadSingleProduct(l,s){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:s,Products:l})}uploadMultipleProduct(l,s){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:s,Products:l})}scanSingle(l,s){return this.httpService.post("/api/product/ScanSingle",{ID:l,SKU:s})}scanNotInChannel(l){return this.httpService.post("/api/product/ScanNotinChannel",{ID:l})}findAllSoldInChannel(l){return this.httpService.post("/api/product/GetSoldInChannel",l)}scanAll(l,s,r,p=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:l,ScanFull:s,UpdatedProduct:r,Async:p})}scanCompareToPos(l){return this.httpService.post("/api/product/CompareMarketplaceToPOS",l)}getVariantCodesProduct(l){return l.Variants.map(r=>r.Code)}downloadMultipleProduct(l){let s=l.map(r=>({ChannelItemID:r.ChannelItemID,ChannelID:r.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",s).pipe((0,u.b)(r=>{this.toastrService.success(`${r.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(l){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:l.ChannelItemID,ChannelID:l.ChannelID}).pipe((0,u.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(l=[]){let s=[];return l.forEach(r=>{r.Variants.forEach(p=>{s=[...s,p.Code]})}),s}filterUnselectedChannel(l,s){let p,r=[];if(l.forEach(g=>{r=[...r,...g.Channel]}),r&&0!=r.length){let g=[];p=s.filter(_=>(g=r.filter(h=>h.ChannelID==_.ID),g.length!==l.length))}else p=s;return p}findChannelById(l,s){return s.find(r=>r.ID==l)}sortChannel(l=[]){return l.sort((s,r)=>s.TypeID<r.TypeID?1:s.TypeID===r.TypeID?0:-1)}hasSelection(l=[]){return this.selectedProduct(l).length>0}selectedProduct(l=[]){return l.filter(s=>s.selected)}hasSelectionVariant(l){return this.selectedVariantProduct(l).length>0}selectedVariantProduct(l){let s=[];return l.forEach(r=>{s=[...s,...null!=r.Variants?r.Variants.filter(p=>p.selected):""]}),s}getChannelProduct(l){const s=l.Variants;let r=[];for(let p of s)if(null!=p.Channel)for(let g of p.Channel)0==r.filter(_=>_.ChannelID==g.ChannelID).length&&r.push(g);return this.sortChannel(r)}successToastrScanAllProduct(l,s,r){if(r){const p=l?.NotInPOS?.Product?l?.NotInPOS?.Product:0,g=l?.InChannel?.Product?l?.InChannel?.Product:0;this.toastrService.success(`\n ${p+g} found in ${s.Name} </br>\n (${g} In POS + ${p} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${l.InChannel?l.InChannel.Product:0} product updates in ${s.Name} </br> \n since ${l.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(l,s){let r;return l.map(p=>(p.Channel=this.getChannelProduct(p),r=this.filterUnselectedChannel([p],s),p.hasScan=r.length>0,p))}checkProductHasUploadBtn(l,s){let r;return l.map(p=>(p.Channel=this.getChannelProduct(p),r=this.filterUnselectedChannel([p],s),p.hasUpload=r.length>0,p))}showToastrUploadMultiple(l=[]){let s=[],r=[];if(l.forEach(p=>{"string"==typeof p?.Response?r=[...r,`<li>${p.Response}</li>`]:(p?.Response?.Success.forEach(g=>{s=[...s,`<li>Product ${g} was <b>successfully</b> uploaded to ${p.Name}</li>`]}),p?.Response.Fail.forEach(g=>{r=[...r,`<li>${g}</li>`]}))}),r.length>0&&s.length>0){const p=[...s,...r];this.toastrService.warning(this.concatMessage(p),"Warning!",{enableHtml:!0})}else s.length>0&&0==r.length?this.toastrService.success(this.concatMessage(s),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(r),"Error",{enableHtml:!0})}concatMessage(l=[]){let s="";return l.forEach(r=>{s+=r}),`<ol>${s}</ol>`}showToastrSuccessUploadSingle(l,s){let r=l.filter(_=>0==_.Status),p=l.filter(_=>1==_.Status),g=this.generateToastrMessage(r,p,s);this.toastrService.success(g.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(l,s){let r=l?.error?.Message.filter(_=>0==_.Status),p=l?.error?.Message.filter(_=>1==_.Status),g=this.generateToastrMessage(r,p,s);"WARNING"==g.status?this.toastrService.warning(g.message,"Warning!",{enableHtml:!0}):this.toastrService.error(g.message,`Error - ${l.status}`,{enableHtml:!0})}generateToastrMessage(l,s,r){let g,p="";return 0==l.length&&s.length>0?(g="SUCCESS",p=this.createSuccessResponse(s,r)):l.length>0&&0==s.length?(g="ERROR",p=this.createErrResponse(l,r)):(g="WARNING",p=`${this.createSuccessResponse(s,r)} ${this.createErrResponse(l,r)}`),p=`<ol>${p}</ol>`,{status:g,message:p}}createErrResponse(l,s){let r="";return l.forEach((p,g)=>{r+=`<li><b>${p.Response}</b> for ${s.Name} in ${p.Name}</li>`}),r}createSuccessResponse(l,s){let r="";return l.forEach((p,g)=>{r+=`<li>Product ${s.Name} was <b>successfully</b> uploaded to ${p.Name}</li>`}),r}getHostName(){if(f.g.IsEmpty(this.hostName)){const l=localStorage.getItem("Authorization");this.hostName=JSON.parse(l)?.Host}return this.hostName}}Z.\u0275fac=function(l){return new(l||Z)(U.LFG(e.O),U.LFG(B._W))},Z.\u0275prov=U.Yz7({token:Z,factory:Z.\u0275fac,providedIn:"root"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[512],{5512:(P,C,c)=>{c.r(C),c.d(C,{LogisticModule:()=>a});var d=c(6895),f=c(284),h=c(1889),L=c(4782),T=c(8505),t=c(4650),x=c(1318),Z=c(7185),u=c(4006),v=c(7481),m=c(8796),S=c(1948),_=c(266);function U(n,e){if(1&n&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&n){const i=e.item;t.xp6(1),t.Q6J("src",i.logo,t.LSH),t.xp6(1),t.hij(" ",i.Name," ")}}function M(n,e){if(1&n){const i=t.EpF();t.ynx(0),t.TgZ(1,"input",22),t.NdJ("ngModelChange",function(s){t.CHM(i);const l=t.oxw(2).index,r=t.oxw();return t.KtG(r.productSkuCodes[l].ProductSKU=s)}),t.qZA(),t.BQk()}if(2&n){const i=t.oxw(2).index,o=t.oxw();t.xp6(1),t.Q6J("ngModel",o.productSkuCodes[i].ProductSKU)}}function y(n,e){if(1&n){const i=t.EpF();t.TgZ(0,"ng-select",23),t.NdJ("ngModelChange",function(s){t.CHM(i);const l=t.oxw(2).index,r=t.oxw();return t.KtG(r.logisticServiceCodes[l].ProductSKU=s)})("ngModelChange",function(s){t.CHM(i);const l=t.oxw(2).index,r=t.oxw();return t.KtG(r.onSelectLogisticType(s,l))}),t.qZA()}if(2&n){const i=t.oxw().ngIf,o=t.oxw().index,s=t.oxw();t.Q6J("ngModel",s.logisticServiceCodes[o].ProductSKU)("items",i)}}function O(n,e){if(1&n&&(t.ynx(0),t.YNc(1,M,2,1,"ng-container",20),t.YNc(2,y,1,2,"ng-template",null,21,t.W1O),t.BQk()),2&n){const i=t.MAs(3),o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!o.logisticServiceType)("ngIfElse",i)}}function N(n,e){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t.YNc(8,O,4,2,"ng-container",19),t.ALo(9,"async"),t.qZA()()),2&n){const i=e.$implicit,o=t.oxw();t.xp6(2),t.Oqu(i.Name),t.xp6(2),t.Oqu(i.Service),t.xp6(2),t.Oqu(i.TypeString),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,4,o.logisticOptions$))}}class p{constructor(e,i){this.http=e,this.toastr=i,this.filter={ChannelID:""},this.logisticServiceType=!0,this.logisticServiceOptions=[],this.initLoader()}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe((0,L.d)(1),(0,T.b)(e=>{this.logisticServiceOptions=e,this.setLogisticServiceCodes(),this.setProductSkuCodes()}))}Validate(){for(let e of this.logisticServices)void 0===this.datasource.find(o=>o.ProductSKU==e.ProductSKU&&o.Name==e.Name)&&(e.IsChange=!0);return Promise.resolve(this.logisticServices)}submitLogistics(){this.Validate().then(e=>{this.setProductSku(),this.mappingLogisticType(),this.http.post("/api/Logistic/Submit",this.logisticServices).subscribe(i=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.getLogisticService()})})}mappingLogisticType(){this.logisticServices=this.logisticServices.map(e=>(e.Type=this.logisticServiceType,e))}setProductSku(){let e;e=this.updateLogisticServiceData(this.logisticServiceType?this.logisticServiceCodes:this.productSkuCodes),this.logisticServices=structuredClone(e)}updateLogisticServiceData(e){let i;return e.map((s,l)=>(i=this.datasource.find(r=>r.ProductSKU==s.ProductSKU&&r.Name==s.Name&&r.Service==s.Service),null==s.ProductSKU?this.datasource[l]:i||s))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(e=>{this.channelOptions=h.g.assignChannelLogo(e.Options.Channel),this.filter=e.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}getLogisticService(){this.datasource=[],this.http.post("/api/Logistic/Get",this.filter).subscribe(e=>{let i=this.channelOptions.find(o=>o.ID==this.filter.ChannelID);this.channelName=i?i.Name:null,this.logisticServices=e,this.datasource=structuredClone(e),this.productSkuCodes=structuredClone(e),this.logisticServiceCodes=structuredClone(e),this.setProductSkuCodes(),this.logisticServiceType=!0})}setProductSkuCodes(){let e;this.productSkuCodes=this.productSkuCodes.map(i=>(e=this.logisticServiceOptions.find(o=>o.Code==i.ProductSKU),h.g.IsNotEmpty(e)&&(i.ProductSKU=null),i))}setLogisticServiceCodes(){let e;this.logisticServiceCodes=this.logisticServices.map(i=>(e=this.logisticServiceOptions.find(o=>o.Code==i.ProductSKU),h.g.IsEmpty(e)&&(i.ProductSKU=null),i))}onSelectLogisticType(e,i){null==e&&(this.logisticServices[i].ProductSKU="")}}p.\u0275fac=function(e){return new(e||p)(t.Y36(x.O),t.Y36(Z._W))},p.\u0275cmp=t.Xpm({type:p,selectors:[["app-logistic"]],decls:37,vars:9,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"headerTitle","hideSearchDropdown","onSubmit"],["container",""],[1,"mb-3","fw-normal"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[3,"ngModel","ngModelChange"],["matTooltip","Select logistics service option from POS",1,"me-5",3,"value"],["matTooltip","Input Product SKU",3,"value"],["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"],["alt","",2,"width","18px",3,"src"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["LOGISTIC_NAME",""],["type","text","placeholder","Product SKU",1,"form-control","w-75",3,"ngModel","ngModelChange"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModel","items","ngModelChange"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return i.getLogisticService()}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h5",2),t._uU(5,"Select a Channel"),t.qZA(),t.TgZ(6,"ng-select",3),t.NdJ("ngModelChange",function(s){return i.filter.ChannelID=s}),t.YNc(7,U,3,2,"ng-template",4),t.qZA()(),t.TgZ(8,"div")(9,"h5",2),t._uU(10,"Type"),t.qZA(),t.TgZ(11,"mat-radio-group",5),t.NdJ("ngModelChange",function(s){return i.logisticServiceType=s}),t.TgZ(12,"mat-radio-button",6),t._uU(13," Logistics "),t.qZA(),t.TgZ(14,"mat-radio-button",7),t._uU(15," SKU "),t.qZA()()()()(),t.TgZ(16,"actions")(17,"a",8),t.NdJ("click",function(){return i.submitLogistics()}),t._uU(18,"Submit"),t.qZA()(),t.TgZ(19,"content")(20,"div",9)(21,"div",10)(22,"div",11)(23,"div",12)(24,"table",13)(25,"thead",14)(26,"tr",15)(27,"th"),t._uU(28,"Logistic"),t.qZA(),t.TgZ(29,"th"),t._uU(30,"Service"),t.qZA(),t.TgZ(31,"th"),t._uU(32,"Type"),t.qZA(),t.TgZ(33,"th"),t._uU(34,"Logistic Service"),t.qZA()()(),t.TgZ(35,"tbody"),t.YNc(36,N,10,6,"tr",16),t.qZA()()()()()()()()),2&e&&(t.Q6J("headerTitle","Logistic Courier - "+i.channelName)("hideSearchDropdown",!1),t.xp6(6),t.Q6J("clearable",!0)("items",i.channelOptions)("ngModel",i.filter.ChannelID),t.xp6(5),t.Q6J("ngModel",i.logisticServiceType),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1),t.xp6(22),t.Q6J("ngForOf",i.logisticServices))},dependencies:[d.sg,d.O5,u.Fj,u.JJ,u.On,v.p,m.w9,m.ir,S.VQ,S.U0,_.gM,d.Ov]});const b=[{path:"",component:p}];class g{}g.\u0275fac=function(e){return new(e||g)},g.\u0275mod=t.oAB({type:g}),g.\u0275inj=t.cJS({imports:[d.ez,f.Bz.forChild(b)]});var A=c(455);class a{}a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[d.ez,f.Bz,g,u.u5,v.R,m.A0,A.rP,S.Fk,_.AV]})}}]);
|
package/Marketplace/index.html
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
<script>
|
|
15
15
|
(function () { var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', w.intercomSettings); } else { var d = document; var i = function () { i.c(arguments); }; i.q = []; i.c = function (args) { i.q.push(args); }; w.Intercom = i; var l = function () { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/xv1oomgl'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); }; if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })();
|
|
16
16
|
</script>
|
|
17
|
-
<style>@charset "UTF-8";:root{--bs-blue:#337ab7;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#c9302c;--bs-orange:#f6a828;--bs-yellow:#ffc107;--bs-green:#89b03e;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#ffffff;--bs-gray:#cccccc;--bs-gray-dark:#343a40;--bs-gray-100:#dddddd;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#cccccc;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#4d4d4d;--bs-primary:#337ab7;--bs-success:#89b03e;--bs-secondary:#cccccc;--bs-dark:#4d4d4d;--bs-light:#dddddd;--bs-light-gray:rgba(203, 203, 210, .15);--bs-light-blue:#dfeffc;--bs-danger:#c9302c;--bs-warning:#f6a828;--bs-primary-rgb:51, 122, 183;--bs-success-rgb:137, 176, 62;--bs-secondary-rgb:204, 204, 204;--bs-dark-rgb:77, 77, 77;--bs-light-rgb:221, 221, 221;--bs-light-gray-rgb:203, 203, 210;--bs-light-blue-rgb:223, 239, 252;--bs-danger-rgb:201, 48, 44;--bs-warning-rgb:246, 168, 40;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:51, 51, 51;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:Roboto, sans-serif;--bs-body-font-size:.75rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#333333;--bs-body-bg:#ffffff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0976b4;--bs-link-hover-color:#075e90;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media (max-width: 991px){body{position:relative}}html,body{height:100%}@media print{html,body{height:auto}body{color:#000!important}}body{overflow:visible!important}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@2.
|
|
17
|
+
<style>@charset "UTF-8";:root{--bs-blue:#337ab7;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#c9302c;--bs-orange:#f6a828;--bs-yellow:#ffc107;--bs-green:#89b03e;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#ffffff;--bs-gray:#cccccc;--bs-gray-dark:#343a40;--bs-gray-100:#dddddd;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#cccccc;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#4d4d4d;--bs-primary:#337ab7;--bs-success:#89b03e;--bs-secondary:#cccccc;--bs-dark:#4d4d4d;--bs-light:#dddddd;--bs-light-gray:rgba(203, 203, 210, .15);--bs-light-blue:#dfeffc;--bs-danger:#c9302c;--bs-warning:#f6a828;--bs-primary-rgb:51, 122, 183;--bs-success-rgb:137, 176, 62;--bs-secondary-rgb:204, 204, 204;--bs-dark-rgb:77, 77, 77;--bs-light-rgb:221, 221, 221;--bs-light-gray-rgb:203, 203, 210;--bs-light-blue-rgb:223, 239, 252;--bs-danger-rgb:201, 48, 44;--bs-warning-rgb:246, 168, 40;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:51, 51, 51;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:Roboto, sans-serif;--bs-body-font-size:.75rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#333333;--bs-body-bg:#ffffff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0976b4;--bs-link-hover-color:#075e90;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media (max-width: 991px){body{position:relative}}html,body{height:100%}@media print{html,body{height:auto}body{color:#000!important}}body{overflow:visible!important}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.1/Marketplace/styles.97105d62c44869cb.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.1/Marketplace/styles.97105d62c44869cb.css"></noscript></head>
|
|
18
18
|
<body>
|
|
19
19
|
<app-root></app-root>
|
|
20
|
-
<script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.
|
|
20
|
+
<script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.1/Marketplace/runtime.15299ec4274348bd.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.1/Marketplace/polyfills.bee3c4d96e890990.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.1/Marketplace/scripts.b7cebc1258dbcca8.js" defer></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.1/Marketplace/main.1f87a22d98c0bc91.js" type="module"></script>
|
|
21
21
|
|
|
22
22
|
</body></html>
|