marketplacepos 5.48.2 → 5.48.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-H7GV5SNI.js → chunk-2XYIINPQ.js} +1 -1
- package/Marketplace/{chunk-CAZ7U2IL.js → chunk-4JRHCYVO.js} +1 -1
- package/Marketplace/{chunk-6OIMOM7S.js → chunk-4UPWMQJX.js} +1 -1
- package/Marketplace/{chunk-ADKAX3OO.js → chunk-5NFLGFHD.js} +1 -1
- package/Marketplace/{chunk-Y77WYZ6Y.js → chunk-5QQCKNH2.js} +1 -1
- package/Marketplace/{chunk-XK4RP5MQ.js → chunk-6FAJM27Z.js} +1 -1
- package/Marketplace/{chunk-ALPG22RQ.js → chunk-77NAUG5Y.js} +1 -1
- package/Marketplace/{chunk-HKHNRMPT.js → chunk-7CYONN5M.js} +1 -1
- package/Marketplace/{chunk-FRZCC6KZ.js → chunk-A62IPN6W.js} +1 -1
- package/Marketplace/{chunk-5KYN6Y7M.js → chunk-B5AYTAZQ.js} +1 -1
- package/Marketplace/{chunk-SZVL42NR.js → chunk-BNAARI67.js} +1 -1
- package/Marketplace/{chunk-KZSTYKIP.js → chunk-BTSGHYIF.js} +1 -1
- package/Marketplace/{chunk-UCEZJNIL.js → chunk-BUY4AAHK.js} +1 -1
- package/Marketplace/{chunk-CLQGGKN6.js → chunk-DCAYH4J7.js} +1 -1
- package/Marketplace/{chunk-B6F5PDL5.js → chunk-F7I7HQGQ.js} +1 -1
- package/Marketplace/chunk-F7JWZJVZ.js +1 -0
- package/Marketplace/{chunk-PLLHTY6O.js → chunk-FQQOS3AF.js} +1 -1
- package/Marketplace/{chunk-M65Z55OS.js → chunk-GFVJVBGH.js} +1 -1
- package/Marketplace/{chunk-RCBY7EIY.js → chunk-GWYT3CQM.js} +1 -1
- package/Marketplace/{chunk-AEVLZ7NS.js → chunk-HANPHNZU.js} +1 -1
- package/Marketplace/{chunk-7SB4C4PT.js → chunk-HCR33US3.js} +1 -1
- package/Marketplace/{chunk-I723PUUO.js → chunk-HF4T6G54.js} +1 -1
- package/Marketplace/{chunk-QCV5XC3U.js → chunk-HUZZJ34K.js} +2 -2
- package/Marketplace/{chunk-CBU473N2.js → chunk-IFP44BTX.js} +1 -1
- package/Marketplace/chunk-IGS6BEII.js +1 -0
- package/Marketplace/{chunk-3JYZF65T.js → chunk-KNPQ6DPC.js} +1 -1
- package/Marketplace/{chunk-UBTALPOC.js → chunk-KOQGQF2L.js} +1 -1
- package/Marketplace/{chunk-KSVJCX2D.js → chunk-M2FDHHOH.js} +1 -1
- package/Marketplace/chunk-MQRQ3LOB.js +1 -0
- package/Marketplace/{chunk-TIIGDXIJ.js → chunk-NN6DSN34.js} +2 -2
- package/Marketplace/{chunk-2IASUYTM.js → chunk-OR34CB7O.js} +1 -1
- package/Marketplace/{chunk-7DT7FQ2T.js → chunk-PHTDDNER.js} +1 -1
- package/Marketplace/{chunk-5CHTDUME.js → chunk-PL2WVYMI.js} +1 -1
- package/Marketplace/{chunk-DH5CXAEM.js → chunk-QMC2DZIB.js} +1 -1
- package/Marketplace/{chunk-PZKN5FIT.js → chunk-QQY7JGZW.js} +1 -1
- package/Marketplace/{chunk-ZUL6ZHSW.js → chunk-SZVJOKAX.js} +1 -1
- package/Marketplace/{chunk-J6BQDYXO.js → chunk-U6KJZIHD.js} +1 -1
- package/Marketplace/{chunk-GVI6GJHY.js → chunk-WFXKYFBX.js} +1 -1
- package/Marketplace/{chunk-C6JHPCLF.js → chunk-WPKFNEM6.js} +1 -1
- package/Marketplace/{chunk-FCFCTT5A.js → chunk-X2RNU4B3.js} +1 -1
- package/Marketplace/{chunk-3K2EKA5O.js → chunk-X7JNYYQS.js} +1 -1
- package/Marketplace/{chunk-MKADKY44.js → chunk-XMN2RKK3.js} +1 -1
- package/Marketplace/{chunk-IDH7MCR3.js → chunk-YF56YLYK.js} +1 -1
- package/Marketplace/chunk-YLQKFPMU.js +1 -0
- package/Marketplace/chunk-YN55P3QH.js +1 -0
- package/Marketplace/{chunk-GX6JPDQ5.js → chunk-YQWENM2M.js} +1 -1
- package/Marketplace/{chunk-LABF6W37.js → chunk-Z5D5R7AO.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-YJKBQ3LW.js → main-BI4BOJO4.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-5X2L45XK.js +0 -1
- package/Marketplace/chunk-VYQD3A3M.js +0 -1
- package/Marketplace/chunk-WRK3ZHRX.js +0 -1
- package/Marketplace/chunk-X6COQADC.js +0 -1
- package/Marketplace/chunk-XDBH7EGC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-ZSUWHVKX.js";import{e as _e}from"./chunk-6KWG6O5L.js";import{a as ge,i as be}from"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{b as he,e as S}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{a as M,c as ue}from"./chunk-JBEKD57G.js";import{A as me,c as te,h as ne,i as ie,k as oe,m as re,n as ae,t as se,u as de,v as ce,w as le}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as fe,c as xe}from"./chunk-ZETUYNFJ.js";import{D as y,F as w,I as V,c as X,i as Z,m as ee}from"./chunk-LNJUGHOX.js";import{$b as C,Bc as W,Cc as B,Dc as q,Gb as f,Hb as A,Hc as k,Lc as H,Mc as a,Nc as x,Oc as Y,Pc as G,Qc as E,Rc as L,Sc as I,Z as R,ad as Q,bc as v,dc as z,ec as N,fc as D,gc as b,hc as i,hd as K,ic as r,id as $,jc as l,lb as O,ma as U,na as T,nb as c,qc as j,td as J,vc as g,xa as u,xc as p,ya as h,zb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",1),l(3,"img",2),r()(),i(4,"a",3),a(5),r(),i(6,"p",4),a(7),r()()),o&2){let d=t.$implicit;c(2),b("href",d.href,O),c(),b("src",d.imgSrc,O),c(),b("href",d.href,O),c(),x(d.title),c(2),x(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=J([])}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=f({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},standalone:!1,decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),N(1,Le,8,5,"swiper-slide",null,z),r()),e&2&&(c(),D(s.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Te=["subdomainEl"],Ae=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(i(0,"div",33),l(1,"img",34),r()),o&2){let d=t.$implicit;c(),b("src",d.img,O)("title",d.title)("alt",d.title)}}function Ne(o,t){if(o&1){let d=j();i(0,"div",15)(1,"h3",16),a(2," DealPOS Omnichannel "),r(),i(3,"small",17),a(4," Multichannel Inventory Management Software "),r()(),i(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),l(10,"i",22),r()(),i(11,"input",23,0),I("ngModelChange",function(e){u(d);let s=p();return L(s.subdomain,e)||(s.subdomain=e),h(e)}),r(),i(13,"div")(14,"select",24),I("ngModelChange",function(e){u(d);let s=p();return L(s.domain,e)||(s.domain=e),h(e)}),i(15,"option",25),a(16,".dealpos.co.id"),r(),i(17,"option",26),a(18,".dealpos.net"),r(),i(19,"option",27),a(20,".dealpos.com"),r(),i(21,"option",28),a(22,".dealpos.app"),r()()()(),i(23,"div",29)(24,"button",30),g("click",function(){u(d);let e=p();return h(e.onNextState())}),a(25," Next "),r()(),i(26,"div",31)(27,"div",32),N(28,ze,2,3,"div",33,z),r()()()()}if(o&2){let d=p();c(11),E("ngModel",d.subdomain),c(3),E("ngModel",d.domain),c(14),D(d.channels)}}function De(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function je(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,De,2,0,"p"),r()()),o&2){p();let d=k(14);c(3),v(d.errors.required?3:-1)}}function Ve(o,t){if(o&1){let d=j();i(0,"i",57),g("click",function(){u(d);let e=p(3);return h(e.hideShowPassword())}),r()}if(o&2){let d=p(3);H("fa "+d.passwordIcon)}}function Fe(o,t){if(o&1&&(i(0,"span",47),C(1,Ve,1,2,"i",56),r()),o&2){let d=p(2);c(),v(d.password?1:-1)}}function Re(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function Ue(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,Re,2,0,"p"),r()()),o&2){p();let d=k(21);c(3),v(d.errors.required?3:-1)}}function We(o,t){if(o&1){let d=j();i(0,"div",35)(1,"h3",36),a(2,"Sign in"),r(),i(3,"h3",37),a(4," to "),i(5,"h6",38),a(6),r(),i(7,"i",39),g("click",function(){u(d);let e=p();return h(e.onEditDomain())}),r()()(),i(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),l(12,"i",42),r()(),i(13,"input",43,1),I("ngModelChange",function(e){u(d);let s=p();return L(s.username,e)||(s.username=e),h(e)}),r()(),C(15,je,4,1,"div",44),i(16,"div",20)(17,"div",21)(18,"span"),l(19,"i",45),r()(),i(20,"input",46,2),I("ngModelChange",function(e){u(d);let s=p();return L(s.password,e)||(s.password=e),h(e)}),r(),C(22,Fe,2,1,"span",47),r(),C(23,Ue,4,1,"div",44),i(24,"div",48)(25,"button",49),g("click",function(){u(d);let e=p();return h(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",50),l(28,"hr"),i(29,"span",51),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",52),g("click",function(e){u(d);let s=p();return h(s.onLoginByGoogle(e))}),l(34,"i",53),a(35," Sign In with Google "),r()()()}if(o&2){let d=k(14),n=k(21),e=p();c(6),G(" (",e.subdomain,"",e.domain,") "),c(7),E("ngModel",e.username),c(2),v(d.invalid&&(d.dirty||d.touched)?15:-1),c(5),b("type",e.passwordType)("ngClass",Q(9,Ae,e.browser=="edge",e.browser!="edge")),E("ngModel",e.password),c(2),v(e.browser!="edge"?22:-1),c(),v(n.invalid&&(n.dirty||n.touched)?23:-1)}}var we=(()=>{let t=class t{constructor(n,e,s,_,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=_,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY},{title:"Plugo",img:M.PLUGONEW}],this.version=ge.version,this.news$=_.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.DashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(w),m(he),m(Ce),m(be),m(fe))},t.\u0275cmp=f({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Te,5),e&2){let _;B(_=q())&&(s.subdomainEl=_.first)}},standalone:!1,decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(e,s){e&1&&(i(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),a(4,"New Features"),r(),l(5,"POS-news-swiper",7),K(6,"async"),r(),i(7,"div",8),C(8,Ne,30,2)(9,We,36,12),r()(),i(10,"div",9)(11,"span",10),a(12,"powered by :"),r(),l(13,"a",11),r(),i(14,"div",12)(15,"a",13),a(16),l(17,"i",14),r()()()),e&2&&(c(5),b("newsList",$(6,4,s.news$)),c(3),v(s.loginState=="FORM_DOMAIN"?8:9),c(7),b("href",s.changelogUrl,O),c(),Y("version ",s.version))},dependencies:[X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),g("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code),c(4),x(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code))},encapsulation:2});let o=t;return o})();var Be=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[V.forChild(Be),V]});let o=t;return o})();var kt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{kt as LoginModule};
|
|
1
|
+
import{a as pe}from"./chunk-ZSUWHVKX.js";import{e as _e}from"./chunk-6KWG6O5L.js";import{a as ge,i as be}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{b as he,e as S}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{a as M,c as ue}from"./chunk-JBEKD57G.js";import{A as me,c as te,h as ne,i as ie,k as oe,m as re,n as ae,t as se,u as de,v as ce,w as le}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as fe,c as xe}from"./chunk-ZETUYNFJ.js";import{D as y,F as w,I as V,c as X,i as Z,m as ee}from"./chunk-LNJUGHOX.js";import{$b as C,Bc as W,Cc as B,Dc as q,Gb as f,Hb as A,Hc as k,Lc as H,Mc as a,Nc as x,Oc as Y,Pc as G,Qc as E,Rc as L,Sc as I,Z as R,ad as Q,bc as v,dc as z,ec as N,fc as D,gc as b,hc as i,hd as K,ic as r,id as $,jc as l,lb as O,ma as U,na as T,nb as c,qc as j,td as J,vc as g,xa as u,xc as p,ya as h,zb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",1),l(3,"img",2),r()(),i(4,"a",3),a(5),r(),i(6,"p",4),a(7),r()()),o&2){let d=t.$implicit;c(2),b("href",d.href,O),c(),b("src",d.imgSrc,O),c(),b("href",d.href,O),c(),x(d.title),c(2),x(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=J([])}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=f({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},standalone:!1,decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),N(1,Le,8,5,"swiper-slide",null,z),r()),e&2&&(c(),D(s.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Te=["subdomainEl"],Ae=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(i(0,"div",33),l(1,"img",34),r()),o&2){let d=t.$implicit;c(),b("src",d.img,O)("title",d.title)("alt",d.title)}}function Ne(o,t){if(o&1){let d=j();i(0,"div",15)(1,"h3",16),a(2," DealPOS Omnichannel "),r(),i(3,"small",17),a(4," Multichannel Inventory Management Software "),r()(),i(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),l(10,"i",22),r()(),i(11,"input",23,0),I("ngModelChange",function(e){u(d);let s=p();return L(s.subdomain,e)||(s.subdomain=e),h(e)}),r(),i(13,"div")(14,"select",24),I("ngModelChange",function(e){u(d);let s=p();return L(s.domain,e)||(s.domain=e),h(e)}),i(15,"option",25),a(16,".dealpos.co.id"),r(),i(17,"option",26),a(18,".dealpos.net"),r(),i(19,"option",27),a(20,".dealpos.com"),r(),i(21,"option",28),a(22,".dealpos.app"),r()()()(),i(23,"div",29)(24,"button",30),g("click",function(){u(d);let e=p();return h(e.onNextState())}),a(25," Next "),r()(),i(26,"div",31)(27,"div",32),N(28,ze,2,3,"div",33,z),r()()()()}if(o&2){let d=p();c(11),E("ngModel",d.subdomain),c(3),E("ngModel",d.domain),c(14),D(d.channels)}}function De(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function je(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,De,2,0,"p"),r()()),o&2){p();let d=k(14);c(3),v(d.errors.required?3:-1)}}function Ve(o,t){if(o&1){let d=j();i(0,"i",57),g("click",function(){u(d);let e=p(3);return h(e.hideShowPassword())}),r()}if(o&2){let d=p(3);H("fa "+d.passwordIcon)}}function Fe(o,t){if(o&1&&(i(0,"span",47),C(1,Ve,1,2,"i",56),r()),o&2){let d=p(2);c(),v(d.password?1:-1)}}function Re(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function Ue(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,Re,2,0,"p"),r()()),o&2){p();let d=k(21);c(3),v(d.errors.required?3:-1)}}function We(o,t){if(o&1){let d=j();i(0,"div",35)(1,"h3",36),a(2,"Sign in"),r(),i(3,"h3",37),a(4," to "),i(5,"h6",38),a(6),r(),i(7,"i",39),g("click",function(){u(d);let e=p();return h(e.onEditDomain())}),r()()(),i(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),l(12,"i",42),r()(),i(13,"input",43,1),I("ngModelChange",function(e){u(d);let s=p();return L(s.username,e)||(s.username=e),h(e)}),r()(),C(15,je,4,1,"div",44),i(16,"div",20)(17,"div",21)(18,"span"),l(19,"i",45),r()(),i(20,"input",46,2),I("ngModelChange",function(e){u(d);let s=p();return L(s.password,e)||(s.password=e),h(e)}),r(),C(22,Fe,2,1,"span",47),r(),C(23,Ue,4,1,"div",44),i(24,"div",48)(25,"button",49),g("click",function(){u(d);let e=p();return h(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",50),l(28,"hr"),i(29,"span",51),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",52),g("click",function(e){u(d);let s=p();return h(s.onLoginByGoogle(e))}),l(34,"i",53),a(35," Sign In with Google "),r()()()}if(o&2){let d=k(14),n=k(21),e=p();c(6),G(" (",e.subdomain,"",e.domain,") "),c(7),E("ngModel",e.username),c(2),v(d.invalid&&(d.dirty||d.touched)?15:-1),c(5),b("type",e.passwordType)("ngClass",Q(9,Ae,e.browser=="edge",e.browser!="edge")),E("ngModel",e.password),c(2),v(e.browser!="edge"?22:-1),c(),v(n.invalid&&(n.dirty||n.touched)?23:-1)}}var we=(()=>{let t=class t{constructor(n,e,s,_,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=_,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY},{title:"Plugo",img:M.PLUGONEW}],this.version=ge.version,this.news$=_.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.DashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(w),m(he),m(Ce),m(be),m(fe))},t.\u0275cmp=f({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Te,5),e&2){let _;B(_=q())&&(s.subdomainEl=_.first)}},standalone:!1,decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(e,s){e&1&&(i(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),a(4,"New Features"),r(),l(5,"POS-news-swiper",7),K(6,"async"),r(),i(7,"div",8),C(8,Ne,30,2)(9,We,36,12),r()(),i(10,"div",9)(11,"span",10),a(12,"powered by :"),r(),l(13,"a",11),r(),i(14,"div",12)(15,"a",13),a(16),l(17,"i",14),r()()()),e&2&&(c(5),b("newsList",$(6,4,s.news$)),c(3),v(s.loginState=="FORM_DOMAIN"?8:9),c(7),b("href",s.changelogUrl,O),c(),Y("version ",s.version))},dependencies:[X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),g("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code),c(4),x(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code))},encapsulation:2});let o=t;return o})();var Be=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[V.forChild(Be),V]});let o=t;return o})();var kt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{kt as LoginModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as de,b as pe,c as se}from"./chunk-ILW6ZFFV.js";import{a as ue}from"./chunk-BTSGHYIF.js";import{a as P}from"./chunk-WFXKYFBX.js";import{a as ce}from"./chunk-S7CKRTJV.js";import{a as ae}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as me}from"./chunk-B5AYTAZQ.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as le}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as re,n as oe}from"./chunk-EDEZ3JLR.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as ie,w as ne}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as J,j as K,l as Q,m as X}from"./chunk-LNJUGHOX.js";import{$b as b,$c as q,Gb as I,Ha as W,Lc as A,Mc as a,Nc as w,Oc as x,Qc as _,Rc as h,Sc as v,Tc as R,Uc as H,Vc as j,Z as O,Zc as U,bc as V,cc as B,ec as k,fc as z,gc as f,hc as t,hd as y,ic as i,id as E,jc as C,jd as G,lb as D,nb as r,qc as M,ra as F,vc as T,xa as c,xc as g,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as L,b as N}from"./chunk-66YHNWRR.js";var Ce=o=>({"td-cell-hover":o});function fe(o,m){if(o&1&&C(0,"variants-dropdown",31),o&2){let e=g().$implicit;f("variants",e==null?null:e.Variants)}}function ge(o,m){if(o&1&&C(0,"variant-with-image",32),o&2){let e=g().$implicit;f("variant",e==null?null:e.Variants[0])}}function _e(o,m){if(o&1&&(t(0,"span"),a(1),i()),o&2){let e=g().$implicit;r(),x("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function he(o,m){if(o&1&&(t(0,"tr")(1,"td")(2,"div",24),C(3,"img",25),y(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),C(14,"order-link",29),i(),t(15,"small"),a(16),y(17,"date"),i(),C(18,"br"),t(19,"small"),C(20,"i",30),a(21),i()()(),t(22,"td"),b(23,fe,1,1,"variants-dropdown",31)(24,ge,1,1,"variant-with-image",32),i(),t(25,"td",33),a(26),y(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),a(32),i(),b(33,_e,2,1,"span"),i(),t(34,"small"),a(35),i()()()()),o&2){let e=m.$implicit;r(3),f("src",E(4,14,e==null?null:e.MarketType),D)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),r(4),w(e.Outlet),r(3),w(e.ChannelName),r(4),f("order",e),r(2),x(" ",G(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),r(5),x(" ",e.Customer," "),r(),A(q(21,Ce,(e.Variants==null?null:e.Variants.length)>1)),r(),V((e.Variants==null?null:e.Variants.length)>1?23:24),r(3),w(E(27,19,e.Amount)),r(6),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),r(),V(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),r(2),x(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function ve(o,m){if(o&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",22),a(13,"Shipping"),i()()(),t(14,"tbody"),k(15,he,36,23,"tr",null,B),i()(),t(17,"app-custom-paginator",23),T("next",function(){c(e);let p=g();return u(p.initCompletedOrders())})("previous",function(){c(e);let p=g();return u(p.initCompletedOrders())}),i()()}if(o&2){let e=g(),d=j(0);r(15),z(d),r(2),f("filter",e.filter())("totaldata",d==null?null:d.length)}}function Se(o,m){o&1&&(t(0,"div",16),C(1,"app-empty-state"),i())}var je=(()=>{let m=class m{constructor(){this.orderService=F(P),this.filter=W({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(p=>N(L({},p),{From:d})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=I({type:m,selectors:[["app-completed"]],features:[U([P])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,l){if(p&1){let s=M();R(0),y(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return c(s),u(l.initCompletedOrders())}),v("textChange",function(n){return c(s),h(l.filter().Number,n)||(l.filter().Number=n),u(n)}),t(3,"actions")(4,"a",1),C(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),v("ngModelChange",function(n){return c(s),h(l.filter().ListChannelID,n)||(l.filter().ListChannelID=n),u(n)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),v("dateChange",function(n){return c(s),h(l.filter().From,n)||(l.filter().From=n),u(n)}),i()(),t(18,"div")(19,"datepicker",8),v("dateChange",function(n){return c(s),h(l.filter().To,n)||(l.filter().To=n),u(n)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),v("ngModelChange",function(n){return c(s),h(l.filter().PageNumber,n)||(l.filter().PageNumber=n),u(n)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),v("ngModelChange",function(n){return c(s),h(l.filter().PageSize,n)||(l.filter().PageSize=n),u(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),b(32,ve,18,2,"div",15)(33,Se,2,0,"div",16),i()()()()()}if(p&2){let s=H(E(1,8,l.completedOrders$));r(2),_("text",l.filter().Number),r(10),f("multiple",!0),_("ngModel",l.filter().ListChannelID),r(5),_("date",l.filter().From),r(2),_("date",l.filter().To),r(4),_("ngModel",l.filter().PageNumber),r(4),_("ngModel",l.filter().PageSize),r(5),V((s==null?null:s.length)>0?32:33)}},dependencies:[X,oe,re,ae,le,te,Y,ee,Z,$,pe,se,ce,ne,ie,ue,me,J,Q,K,de],encapsulation:2});let o=m;return o})();export{je as CompletedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as m}from"./chunk-
|
|
1
|
+
import{h as m}from"./chunk-HF4T6G54.js";import{a as r}from"./chunk-AGBJEXIM.js";import{b as S,e as C}from"./chunk-OXWPYJNB.js";import{b as i,c as l}from"./chunk-JBEKD57G.js";import{aa as u,ea as h,ma as c,ra as s,v as p}from"./chunk-ZYJ6LAJ3.js";var b=(()=>{let n=class n{constructor(){this.httpService=s(C),this.toastr=s(S),this.tokenService=s(m)}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(u(t=>this.tokenService.refreshToken().pipe(p(o=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(h(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelType(e){let t={ChannelID:e.ID,TypeID:i.ShopifyV2};return this.httpService.post(r.UpdateChannelType,t).pipe(h(o=>{this.showTostrSuccessTestShopID(o)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=l.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var o in e)t+=o+" : "+e[o]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(p(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(h(o=>{window.open(o.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case i.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case i.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case i.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"});let a=n;return a})();export{b as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as Ft}from"./chunk-E3EBAWLJ.js";import{a as It}from"./chunk-AFIF6VRM.js";import{a as be,b as pt,c as ut,d as ye,e as ve}from"./chunk-M65Z55OS.js";import"./chunk-5X2E3W32.js";import{a as st,b as Ce,c as mt,d as ge,f as Ct,g as gt,h as Se,i as bt,o as oe}from"./chunk-ZW2TMVZP.js";import{b as vt}from"./chunk-2F4DTZCZ.js";import{a as _t}from"./chunk-36U7D4LI.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import{b as ht,d as Te}from"./chunk-FCEXPGTK.js";import{b as xt}from"./chunk-3WRXJBHF.js";import"./chunk-UH5C5HXK.js";import{a as Tt,b as St}from"./chunk-O2YF5VGD.js";import{a as yt}from"./chunk-63I3I3MX.js";import"./chunk-2IASUYTM.js";import{a as ft,b as xe}from"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import{a as he}from"./chunk-4YCSITNV.js";import{a as lt,b as dt,f as ct}from"./chunk-WHHW4IZT.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as at}from"./chunk-FHER4TFY.js";import"./chunk-6OIMOM7S.js";import{d as G,e as Y}from"./chunk-6KWG6O5L.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{b as tt,e as ie}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as Ee,c as b}from"./chunk-JBEKD57G.js";import{m as nt,n as rt}from"./chunk-EDEZ3JLR.js";import{A as te,B as $,a as Je,c as ee,e as de,h as R,i as H,l as _e,m as qe,n as j,q as W,r as ze,s as X,t as Qe,u as Ze,v as et,z as K}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as it,w as ot}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as P,m as I}from"./chunk-LNJUGHOX.js";import{$ as Ge,$b as _,Ad as Ke,Gb as S,Hb as me,Hc as pe,Ic as Me,K as Re,M as $e,Mc as C,Na as N,Nc as Z,Oc as q,Qc as He,Rc as je,Sc as We,Wc as Xe,Z as Q,Zb as Ye,Zc as k,_c as ue,bc as h,ca as le,cc as U,ea as w,ec as L,f as ce,fc as B,g as Be,gc as p,hc as c,hd as F,ic as l,id as A,jc as f,ma as D,na as se,nb as s,qc as M,ra as u,sb as V,sd as fe,td as g,v as O,vc as T,xa as v,xc as d,ya as x}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var J=(function(e){return e[e.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",e[e.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",e[e.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",e[e.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",e[e.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",e})(J||{});var ne=(function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e})(ne||{});var re=(function(e){return e[e.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",e[e.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",e[e.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",e[e.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",e[e.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",e})(re||{});var De=class extends _e{setValue(o,n){if(o instanceof Date){let i=Math.floor(o.getTime()/1e3);super.setValue(i,n)}else super.setValue(o,n)}},Ne=(()=>{let o=class o{constructor(){this.shopeeUploadService=u(be),this.formBuilder=u(K)}getAttributes(i){return this.shopeeUploadService.getAttributes(i.channelId,i.categoryId).pipe(O(t=>this.setLabelToIndonesian(t)))}setLabelToIndonesian(i=[]){let t,a;return i=i.map(r=>(t=r?.multi_lang?.find(m=>m.language=="id"),r.attribute_value_list=r?.attribute_value_list?.map(m=>(a=m?.multi_lang?.find(y=>y.language=="id"),m.name=a?.value,m)),r.name=t?.value?t?.value:r.name,r)),i}createFormGroup(i){let t=this.formBuilder.group({}),a=[];return i.forEach(r=>{if(a=[],r.mandatory&&a.push(de.required),r?.attribute_info?.format_type==ne.FORMAT_QUANTITATIVE_WITH_UNIT&&r?.attribute_info?.input_type==J.FREE_TEXT_FILED){let m=this.formBuilder.group({unit:new _e(null),value:new _e(null,a)});t.addControl(JSON.stringify(r.attribute_id),m)}else r?.attribute_info?.input_type==J.FREE_TEXT_FILED&&r?.attribute_info?.input_validation_type==re.VALIDATOR_DATE_TYPE?t.addControl(JSON.stringify(r.attribute_id),new De(null,a)):t.addControl(JSON.stringify(r.attribute_id),this.formBuilder.control(null,a))}),t}getFilteredAttributes(i,t){let a=JSON.parse(JSON.stringify(i)),r=Object.keys(t),m=a.filter(y=>r.findIndex(Pe=>parseInt(Pe)==y.attribute_id||y.mandatory)!=-1);return m=this.filterSelectedAttributes(m,t),m}filterSelectedAttributes(i,t){return i.map(r=>{switch(r.attribute_info.input_type){case J.MULTI_COMBO_BOX:b.IsNotEmpty(t[r.attribute_id])?r.attribute_value_list=r.attribute_value_list.filter(m=>t[r.attribute_id]?.findIndex(y=>y==m.value_id)!=-1):r.attribute_value_list=[];break;case J.FREE_TEXT_FILED:r.attribute_info.format_type==ne.FORMAT_QUANTITATIVE_WITH_UNIT?r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]?.value,t[r.attribute_id]?.unit):r.attribute_info.input_validation_type==re.VALIDATOR_DATE_TYPE?r.attribute_value_list=this.setSelectedDateAttr(t[r.attribute_id]):r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]);break;default:r.attribute_value_list=r.attribute_value_list.filter(m=>m.value_id==t[r.attribute_id])}return r}).filter(r=>r?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(i,t){let a=[];if(b.IsNotEmpty(i)){let r={value_id:0,original_value_name:JSON.stringify(i)};b.IsNotEmpty(t)&&(r.value_unit=t),a=[r]}return a}setSelectedDateAttr(i){let t=[];return b.IsNotEmpty(i)&&(t=[{value_id:0,original_value_name:JSON.stringify(i)}]),t}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();var Ie=(()=>{let o=class o{constructor(){this._calendarHeaderConfig=new Be({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(i){this._calendarHeaderConfig.next(i)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();var Ut=["class","component ts"];function Lt(e,o){if(e&1){let n=M();c(0,"button",2),T("click",function(){v(n);let t=d(2);return x(t.todayClicked())}),f(1,"i",3),l()}}function Bt(e,o){if(e&1){let n=M();c(0,"button",4),T("click",function(){v(n);let t=d(2);return x(t.clearClicked())}),f(1,"i",5),l()}}function Rt(e,o){if(e&1&&(_(0,Lt,2,0,"button",0),_(1,Bt,2,0,"button",1)),e&2){let n=o;h(n.hideBtnToday?-1:0),s(),h(n.hideBtnClear?-1:1)}}var At=(()=>{let o=class o{constructor(){this._datePicker=u(Se),this._calendar=u(gt),this._dateAdapter=u(Ce),this.calendarService=u(Ie),this._destroyed=new ce;let i=this._calendar,t=u(Ke);i.stateChanges.pipe(le(this._destroyed)).subscribe(a=>t.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(i){this._calendar.ngOnChanges(i)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[N],attrs:Ut,decls:3,vars:3,consts:[["mat-icon-button","","title","Today"],["mat-icon-button","","title","Clear"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,a){if(t&1&&(c(0,"mat-calendar-header"),_(1,Rt,2,2),F(2,"async"),l()),t&2){let r;s(),h((r=A(2,1,a.calendarConfig$))?1:-1,r)}},dependencies:[ht,Ct,P],encapsulation:2});let e=o;return e})(),kt=(()=>{let o=class o{};o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=me({type:o}),o.\u0275inj=se({providers:[oe],imports:[I,Te,ge,oe,he,xe]});let e=o;return e})();function $t(e,o){if(e&1&&(c(0,"mat-label",2)(1,"span"),C(2),l()()),e&2){let n=d();p("show",n.placeholder),s(2),Z(n.placeholder)}}var Gt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"dddd, D MMMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"dddd, D MMMM YYYY",monthYearA11yLabel:"MMMM YYYY"}},Pt=(()=>{let o=class o{set hidelClearBtn(i){this.calendarService.setHeaderConfig({hideBtnClear:i,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(i){let t=null;i&&(t=i.toDate(),t.setHours(0,0,0,0)),this.onChange(t),this.dateChange.emit(t)}constructor(){this.calendarService=u(Ie),this.headerComponent=At,this.data_cy=g(void 0),this.appearance=g("outline"),this.width=g(void 0),this.isFloatingLabel=g(!0),this.disabled=!1,this.readOnly=g(!1),this.minDateValidation=g(void 0),this.maxDateValidation=g(void 0),this.dateChange=fe(),this.minDate=b.MinDate,this.onChange=i=>{},this.displayToggle=!0}writeValue(i){this.date=i}registerOnChange(i){this.onChange=i}registerOnTouched(i){}setDisabledState(i){this.disabled=i}onOpenDatepicker(){let i=document.getElementById("dropdown-filter");if(i){var t=new bootstrap.Dropdown(i);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let i=document.getElementById("dropdown-filter");if(i){var t=new bootstrap.Dropdown(i);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["datepicker"]],inputs:{data_cy:[1,"data_cy"],placeholder:"placeholder",displayToggle:"displayToggle",appearance:[1,"appearance"],width:[1,"width"],isFloatingLabel:[1,"isFloatingLabel"],date:"date",disabled:"disabled",readOnly:[1,"readOnly"],minDateValidation:[1,"minDateValidation"],maxDateValidation:[1,"maxDateValidation"],hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},standalone:!1,features:[k([{provide:Ce,useClass:It,deps:[st]},{provide:mt,useValue:Gt},{provide:Je,multi:!0,useExisting:o}])],decls:7,vars:17,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","","aria-hidden","true",1,"datepicker-toggle-icon",3,"click"],[1,"fa-regular","fa-angle-down"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,a){if(t&1){let r=M();c(0,"mat-form-field",1),_(1,$t,3,2,"mat-label",2),c(2,"input",3),T("dateChange",function(y){return v(r),x(a.change(y.value))})("click",function(){v(r);let y=pe(6);return x(y.open())}),l(),c(3,"span",4),T("click",function(){v(r);let y=pe(6);return x(y.open())}),f(4,"i",5),l(),c(5,"mat-datepicker",6,0),T("opened",function(){return v(r),x(a.onOpenDatepicker())})("closed",function(){return v(r),x(a.onCloseDatepicker())}),l()()}if(t&2){let r=pe(6);Me("width",a.width()||100,"%"),p("disabled",a.disabled)("appearance",a.appearance()),s(),h(a.isFloatingLabel()&&a.placeholder?1:-1),s(),p("placeholder",Xe(a.placeholder||""))("matDatepicker",r)("min",a.minDateValidation())("max",a.maxDateValidation())("value",a.date==a.minDate?null:a.date)("disabled",a.disabled)("readonly",a.readOnly()),Ye("data-cy",a.data_cy()),s(),Me("display",a.displayToggle?"unset":"none"),s(2),p("calendarHeaderComponent",a.headerComponent)}},dependencies:[Se,bt,ct,lt,dt,ft],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:3px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}.datepicker .datepicker-toggle-icon{width:28px;height:36px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-right:6px}.datepicker .datepicker-toggle-icon i{font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:400;font-size:16px;line-height:1;color:#6b7280}
|
|
1
|
+
import{b as Ft}from"./chunk-E3EBAWLJ.js";import{a as It}from"./chunk-AFIF6VRM.js";import{a as be,b as pt,c as ut,d as ye,e as ve}from"./chunk-GFVJVBGH.js";import"./chunk-5X2E3W32.js";import{a as st,b as Ce,c as mt,d as ge,f as Ct,g as gt,h as Se,i as bt,o as oe}from"./chunk-ZW2TMVZP.js";import{b as vt}from"./chunk-2F4DTZCZ.js";import{a as _t}from"./chunk-36U7D4LI.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import{b as ht,d as Te}from"./chunk-FCEXPGTK.js";import{b as xt}from"./chunk-3WRXJBHF.js";import"./chunk-UH5C5HXK.js";import{a as Tt,b as St}from"./chunk-O2YF5VGD.js";import{a as yt}from"./chunk-63I3I3MX.js";import"./chunk-OR34CB7O.js";import{a as ft,b as xe}from"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import{a as he}from"./chunk-4YCSITNV.js";import{a as lt,b as dt,f as ct}from"./chunk-WHHW4IZT.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as at}from"./chunk-FHER4TFY.js";import"./chunk-4UPWMQJX.js";import{d as G,e as Y}from"./chunk-6KWG6O5L.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{b as tt,e as ie}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as Ee,c as b}from"./chunk-JBEKD57G.js";import{m as nt,n as rt}from"./chunk-EDEZ3JLR.js";import{A as te,B as $,a as Je,c as ee,e as de,h as R,i as H,l as _e,m as qe,n as j,q as W,r as ze,s as X,t as Qe,u as Ze,v as et,z as K}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as it,w as ot}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as P,m as I}from"./chunk-LNJUGHOX.js";import{$ as Ge,$b as _,Ad as Ke,Gb as S,Hb as me,Hc as pe,Ic as Me,K as Re,M as $e,Mc as C,Na as N,Nc as Z,Oc as q,Qc as He,Rc as je,Sc as We,Wc as Xe,Z as Q,Zb as Ye,Zc as k,_c as ue,bc as h,ca as le,cc as U,ea as w,ec as L,f as ce,fc as B,g as Be,gc as p,hc as c,hd as F,ic as l,id as A,jc as f,ma as D,na as se,nb as s,qc as M,ra as u,sb as V,sd as fe,td as g,v as O,vc as T,xa as v,xc as d,ya as x}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var J=(function(e){return e[e.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",e[e.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",e[e.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",e[e.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",e[e.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",e})(J||{});var ne=(function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e})(ne||{});var re=(function(e){return e[e.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",e[e.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",e[e.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",e[e.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",e[e.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",e})(re||{});var De=class extends _e{setValue(o,n){if(o instanceof Date){let i=Math.floor(o.getTime()/1e3);super.setValue(i,n)}else super.setValue(o,n)}},Ne=(()=>{let o=class o{constructor(){this.shopeeUploadService=u(be),this.formBuilder=u(K)}getAttributes(i){return this.shopeeUploadService.getAttributes(i.channelId,i.categoryId).pipe(O(t=>this.setLabelToIndonesian(t)))}setLabelToIndonesian(i=[]){let t,a;return i=i.map(r=>(t=r?.multi_lang?.find(m=>m.language=="id"),r.attribute_value_list=r?.attribute_value_list?.map(m=>(a=m?.multi_lang?.find(y=>y.language=="id"),m.name=a?.value,m)),r.name=t?.value?t?.value:r.name,r)),i}createFormGroup(i){let t=this.formBuilder.group({}),a=[];return i.forEach(r=>{if(a=[],r.mandatory&&a.push(de.required),r?.attribute_info?.format_type==ne.FORMAT_QUANTITATIVE_WITH_UNIT&&r?.attribute_info?.input_type==J.FREE_TEXT_FILED){let m=this.formBuilder.group({unit:new _e(null),value:new _e(null,a)});t.addControl(JSON.stringify(r.attribute_id),m)}else r?.attribute_info?.input_type==J.FREE_TEXT_FILED&&r?.attribute_info?.input_validation_type==re.VALIDATOR_DATE_TYPE?t.addControl(JSON.stringify(r.attribute_id),new De(null,a)):t.addControl(JSON.stringify(r.attribute_id),this.formBuilder.control(null,a))}),t}getFilteredAttributes(i,t){let a=JSON.parse(JSON.stringify(i)),r=Object.keys(t),m=a.filter(y=>r.findIndex(Pe=>parseInt(Pe)==y.attribute_id||y.mandatory)!=-1);return m=this.filterSelectedAttributes(m,t),m}filterSelectedAttributes(i,t){return i.map(r=>{switch(r.attribute_info.input_type){case J.MULTI_COMBO_BOX:b.IsNotEmpty(t[r.attribute_id])?r.attribute_value_list=r.attribute_value_list.filter(m=>t[r.attribute_id]?.findIndex(y=>y==m.value_id)!=-1):r.attribute_value_list=[];break;case J.FREE_TEXT_FILED:r.attribute_info.format_type==ne.FORMAT_QUANTITATIVE_WITH_UNIT?r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]?.value,t[r.attribute_id]?.unit):r.attribute_info.input_validation_type==re.VALIDATOR_DATE_TYPE?r.attribute_value_list=this.setSelectedDateAttr(t[r.attribute_id]):r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]);break;default:r.attribute_value_list=r.attribute_value_list.filter(m=>m.value_id==t[r.attribute_id])}return r}).filter(r=>r?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(i,t){let a=[];if(b.IsNotEmpty(i)){let r={value_id:0,original_value_name:JSON.stringify(i)};b.IsNotEmpty(t)&&(r.value_unit=t),a=[r]}return a}setSelectedDateAttr(i){let t=[];return b.IsNotEmpty(i)&&(t=[{value_id:0,original_value_name:JSON.stringify(i)}]),t}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();var Ie=(()=>{let o=class o{constructor(){this._calendarHeaderConfig=new Be({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(i){this._calendarHeaderConfig.next(i)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();var Ut=["class","component ts"];function Lt(e,o){if(e&1){let n=M();c(0,"button",2),T("click",function(){v(n);let t=d(2);return x(t.todayClicked())}),f(1,"i",3),l()}}function Bt(e,o){if(e&1){let n=M();c(0,"button",4),T("click",function(){v(n);let t=d(2);return x(t.clearClicked())}),f(1,"i",5),l()}}function Rt(e,o){if(e&1&&(_(0,Lt,2,0,"button",0),_(1,Bt,2,0,"button",1)),e&2){let n=o;h(n.hideBtnToday?-1:0),s(),h(n.hideBtnClear?-1:1)}}var At=(()=>{let o=class o{constructor(){this._datePicker=u(Se),this._calendar=u(gt),this._dateAdapter=u(Ce),this.calendarService=u(Ie),this._destroyed=new ce;let i=this._calendar,t=u(Ke);i.stateChanges.pipe(le(this._destroyed)).subscribe(a=>t.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(i){this._calendar.ngOnChanges(i)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[N],attrs:Ut,decls:3,vars:3,consts:[["mat-icon-button","","title","Today"],["mat-icon-button","","title","Clear"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,a){if(t&1&&(c(0,"mat-calendar-header"),_(1,Rt,2,2),F(2,"async"),l()),t&2){let r;s(),h((r=A(2,1,a.calendarConfig$))?1:-1,r)}},dependencies:[ht,Ct,P],encapsulation:2});let e=o;return e})(),kt=(()=>{let o=class o{};o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=me({type:o}),o.\u0275inj=se({providers:[oe],imports:[I,Te,ge,oe,he,xe]});let e=o;return e})();function $t(e,o){if(e&1&&(c(0,"mat-label",2)(1,"span"),C(2),l()()),e&2){let n=d();p("show",n.placeholder),s(2),Z(n.placeholder)}}var Gt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"dddd, D MMMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"dddd, D MMMM YYYY",monthYearA11yLabel:"MMMM YYYY"}},Pt=(()=>{let o=class o{set hidelClearBtn(i){this.calendarService.setHeaderConfig({hideBtnClear:i,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(i){let t=null;i&&(t=i.toDate(),t.setHours(0,0,0,0)),this.onChange(t),this.dateChange.emit(t)}constructor(){this.calendarService=u(Ie),this.headerComponent=At,this.data_cy=g(void 0),this.appearance=g("outline"),this.width=g(void 0),this.isFloatingLabel=g(!0),this.disabled=!1,this.readOnly=g(!1),this.minDateValidation=g(void 0),this.maxDateValidation=g(void 0),this.dateChange=fe(),this.minDate=b.MinDate,this.onChange=i=>{},this.displayToggle=!0}writeValue(i){this.date=i}registerOnChange(i){this.onChange=i}registerOnTouched(i){}setDisabledState(i){this.disabled=i}onOpenDatepicker(){let i=document.getElementById("dropdown-filter");if(i){var t=new bootstrap.Dropdown(i);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let i=document.getElementById("dropdown-filter");if(i){var t=new bootstrap.Dropdown(i);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["datepicker"]],inputs:{data_cy:[1,"data_cy"],placeholder:"placeholder",displayToggle:"displayToggle",appearance:[1,"appearance"],width:[1,"width"],isFloatingLabel:[1,"isFloatingLabel"],date:"date",disabled:"disabled",readOnly:[1,"readOnly"],minDateValidation:[1,"minDateValidation"],maxDateValidation:[1,"maxDateValidation"],hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},standalone:!1,features:[k([{provide:Ce,useClass:It,deps:[st]},{provide:mt,useValue:Gt},{provide:Je,multi:!0,useExisting:o}])],decls:7,vars:17,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","","aria-hidden","true",1,"datepicker-toggle-icon",3,"click"],[1,"fa-regular","fa-angle-down"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,a){if(t&1){let r=M();c(0,"mat-form-field",1),_(1,$t,3,2,"mat-label",2),c(2,"input",3),T("dateChange",function(y){return v(r),x(a.change(y.value))})("click",function(){v(r);let y=pe(6);return x(y.open())}),l(),c(3,"span",4),T("click",function(){v(r);let y=pe(6);return x(y.open())}),f(4,"i",5),l(),c(5,"mat-datepicker",6,0),T("opened",function(){return v(r),x(a.onOpenDatepicker())})("closed",function(){return v(r),x(a.onCloseDatepicker())}),l()()}if(t&2){let r=pe(6);Me("width",a.width()||100,"%"),p("disabled",a.disabled)("appearance",a.appearance()),s(),h(a.isFloatingLabel()&&a.placeholder?1:-1),s(),p("placeholder",Xe(a.placeholder||""))("matDatepicker",r)("min",a.minDateValidation())("max",a.maxDateValidation())("value",a.date==a.minDate?null:a.date)("disabled",a.disabled)("readonly",a.readOnly()),Ye("data-cy",a.data_cy()),s(),Me("display",a.displayToggle?"unset":"none"),s(2),p("calendarHeaderComponent",a.headerComponent)}},dependencies:[Se,bt,ct,lt,dt,ft],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:3px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}.datepicker .datepicker-toggle-icon{width:28px;height:36px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-right:6px}.datepicker .datepicker-toggle-icon i{font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:400;font-size:16px;line-height:1;color:#6b7280}
|
|
2
2
|
`],encapsulation:2});let e=o;return e})(),Mt=(()=>{let o=class o{};o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=me({type:o}),o.\u0275inj=se({providers:[oe],imports:[I,Te,ge,oe,he,xe,kt,vt]});let e=o;return e})();var Oe=()=>[];function Ht(e,o){e&1&&(c(0,"span",4),C(1,"*"),l())}function jt(e,o){if(e&1&&f(0,"ng-select",5),e&2){let n=d().$implicit;p("multiple",!0)("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:ue(4,Oe))("placeholder","Pilih "+(n==null?null:n.name))}}function Wt(e,o){if(e&1&&f(0,"input",7),e&2){let n=d(2).$implicit;p("formControlName",n.attribute_id)("placeholder","Isi "+(n==null?null:n.name))}}function Xt(e,o){if(e&1&&(c(0,"option",14),C(1),l()),e&2){let n=o.$implicit;p("value",n),s(),Z(n)}}function Kt(e,o){if(e&1&&(c(0,"div",9),f(1,"input",11),c(2,"select",12)(3,"option",13),C(4,"Unit"),l(),L(5,Xt,2,2,"option",14,U),l()()),e&2){let n=d(3).$implicit;p("formGroupName",n.attribute_id),s(),p("placeholder","Isi "+(n==null?null:n.name)),s(2),p("value",null),s(2),B(n==null||n.attribute_info==null?null:n.attribute_info.attribute_unit_list)}}function Jt(e,o){if(e&1&&f(0,"input",10),e&2){let n=d(3).$implicit;p("formControlName",n.attribute_id)("placeholder","Isi "+(n==null?null:n.name))}}function qt(e,o){if(e&1&&_(0,Kt,7,3,"div",9)(1,Jt,1,2,"input",10),e&2){let n=d(2).$implicit,i=d(2);h((n==null||n.attribute_info==null?null:n.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function zt(e,o){if(e&1&&f(0,"datepicker",8),e&2){let n=d(2).$implicit;p("formControlName",n.attribute_id)}}function Qt(e,o){if(e&1&&_(0,Wt,1,2,"input",7)(1,qt,2,1)(2,zt,1,1,"datepicker",8),e&2){let n,i=d().$implicit,t=d(2);h((n=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===t.validationType.VALIDATOR_STRING_TYPE?0:n===t.validationType.VALIDATOR_FLOAT_TYPE?1:n===t.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function Zt(e,o){if(e&1&&f(0,"ng-select",6),e&2){let n=d().$implicit;p("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:ue(3,Oe))("placeholder","Pilih "+(n==null?null:n.name))}}function ei(e,o){if(e&1&&f(0,"ng-select",6),e&2){let n=d().$implicit;p("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:ue(3,Oe))("placeholder","Pilih "+(n==null?null:n.name))}}function ti(e,o){if(e&1&&(c(0,"div",2)(1,"div",3),_(2,Ht,2,0,"span",4),c(3,"span"),C(4),l()(),_(5,jt,1,5,"ng-select",5)(6,Qt,3,1)(7,Zt,1,4,"ng-select",6)(8,ei,1,4,"ng-select",6),l()),e&2){let n,i=o.$implicit,t=d(2);s(2),h(i.mandatory?2:-1),s(2),q(" ",i==null?null:i.name," "),s(),h((n=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===t.inputType.MULTI_COMBO_BOX?5:n===t.inputType.FREE_TEXT_FILED?6:n===t.inputType.SINGLE_COMBO_BOX?7:8)}}function ii(e,o){if(e&1&&(c(0,"form",0)(1,"div",1),L(2,ti,9,3,"div",2,U),l()()),e&2){let n=d();p("formGroup",n.form),s(2),B(o)}}var Et=(()=>{let o=class o{constructor(){this.formCategoryService=u(Ne),this.channelType=g(void 0),this.categoryId=g(void 0),this.channelId=g(void 0),this.channelProductUpload=g(void 0),this.attributesChanges=new V,this.inputType=J,this.formatType=ne,this.validationType=re}ngOnChanges(){let i=this.categoryId(),t=this.channelId();b.IsNotEmpty(i)&&b.IsNotEmpty(t)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:i,channelId:t,channelType:this.channelType()}).pipe(w(a=>{this.form=this.formCategoryService.createFormGroup(a),this.listenToFormChange(a)}),Q(1)))}listenToFormChange(i){let t=[];this.formSubscription=this.form.valueChanges.subscribe(a=>{t=this.formCategoryService.getFilteredAttributes(i,a),this.attributesChanges.emit(t)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["shopee-attribute-form"]],inputs:{channelType:[1,"channelType"],categoryId:[1,"categoryId"],channelId:[1,"channelId"],channelProductUpload:[1,"channelProductUpload"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Ne]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","value_id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","value_id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"],[1,"attribute-datepicker",3,"formControlName"],[1,"d-flex","align-items-center",3,"formGroupName"],["type","text","autoNum","",1,"form-control",3,"formControlName","placeholder"],["formControlName","value","type","text","autoNum","",1,"form-control","me-1",2,"width","200px",3,"placeholder"],["name","unit","id","unit","formControlName","unit",1,"form-control"],["disabled","","selected","",3,"value"],[3,"value"]],template:function(t,a){if(t&1&&(_(0,ii,4,1,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,Y,G,$,j,Ze,et,ee,Qe,R,H,W,X,ze,yt,Mt,Pt,P],styles:["input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:36px;border-radius:4px} datepicker.attribute-datepicker>mat-form-field.mat-mdc-form-field>.mat-mdc-text-field-wrapper{height:36px} datepicker.attribute-datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:11px!important;padding-bottom:11px!important;height:36px;min-height:36px!important} datepicker.attribute-datepicker mat-datepicker-toggle>button.mat-mdc-icon-button.mat-mdc-button-base{--mat-icon-button-state-layer-size: 36px}"]});let e=o;return e})();var z=(function(e){return e.TIKTOK_SHOP="TIKTOK_SHOP",e.TOKOPEDIA="TOKOPEDIA",e})(z||{});var we=(()=>{let o=class o{constructor(){this.httpService=u(ie),this.formBuilder=u(K),this.uploadProductService=u(ve)}getAttributes(i,t){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:i},{key:"CategoryID",value:t}]).pipe(Re(r=>this.uploadProductService.selectedProduct$.pipe(O(m=>(r=this.mappingAttributeSalesProperty(r,m),r)))))}mappingAttributeSalesProperty(i,t){let a=0;return i.filter(r=>(r.type=="SALES_PROPERTY"&&(a+=1),a>1?(a=0,!1):!0)).map(r=>(r.type=="SALES_PROPERTY"&&(r.name="Jenis Variant",r.is_multiple_selection=!1,r.is_required=this.isProductHasMoreVariant(t),r.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),r))}isProductHasMoreVariant(i){let t=!1,a=[];return i.forEach(r=>{r.Variants&&a.push(r.Variants.length)}),t=a.some(r=>r>1),t}createFormGroup(i){let t=this.formBuilder.group({}),a=[];return i.forEach(r=>{a=[],r.is_required&&a.push(de.required),t.addControl(r.id,this.formBuilder.control(null,a))}),t.addControl("listingPlatform",this.formBuilder.control([z.TIKTOK_SHOP,z.TOKOPEDIA],[de.required])),t}getFilteredAttributes(i,t){let a=JSON.parse(JSON.stringify(i)),r=Object.keys(t),m=a.filter(y=>r.findIndex(Pe=>parseInt(Pe)==y.id)!=-1);return m=this.filterSelectedAttributes(m,t),m}filterSelectedAttributes(i,t){return i.map(r=>(b.IsNotEmpty(r.values)?r.is_multiple_selection?r.values=r.values.filter(m=>t[r.id]?.includes(m.id)):r.values=r.values.filter(m=>m.id==t[r.id]):t[r.id]&&(r.values=[{id:null,name:t[r.id]}]),r)).filter(r=>r?.values?.length>0)}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();function oi(e,o){e&1&&(c(0,"small",5),C(1," Platform is required "),l())}function ni(e,o){e&1&&(c(0,"span",5),C(1,"*"),l())}function ri(e,o){if(e&1&&f(0,"ng-select",6),e&2){let n=d().$implicit;p("multiple",!0)("formControlName",n.id)("items",n.values)("placeholder","Pilih "+(n==null?null:n.name))}}function ai(e,o){if(e&1&&f(0,"ng-select",7),e&2){let n=d().$implicit;p("formControlName",n.id)("items",n.values)("placeholder","Pilih "+(n==null?null:n.name))}}function li(e,o){if(e&1&&f(0,"input",8),e&2){let n=d().$implicit;p("formControlName",n.id)("placeholder",n==null?null:n.name)}}function di(e,o){if(e&1&&(c(0,"small",5),C(1),l()),e&2){let n=d().$implicit;s(),q(" ",n==null?null:n.name," is mandatory ")}}function ci(e,o){if(e&1&&(c(0,"div",2)(1,"div",3),_(2,ni,2,0,"span",5),c(3,"span"),C(4),l()(),_(5,ri,1,4,"ng-select",6)(6,ai,1,3,"ng-select",7)(7,li,1,2,"input",8),_(8,di,2,1,"small",5),l()),e&2){let n=o.$implicit;s(2),h(n.is_required?2:-1),s(2),q(" ",n==null?null:n.name," "),s(),h(n.is_multiple_selection?5:n.values!==null&&n.values.length>0?6:7),s(3),h(n.is_required?8:-1)}}function si(e,o){if(e&1&&(c(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),C(5," Platform Options"),l()(),f(6,"ng-select",4),_(7,oi,2,0,"small",5),l(),L(8,ci,9,4,"div",2,U),l()()),e&2){let n,i=d();p("formGroup",i.form),s(6),p("multiple",!0)("items",i.platformOptions)("clearable",!1),s(),h(!(i.form==null||(n=i.form.get("listingPlatform").errors)==null)&&n.required?7:-1),s(),B(o)}}var Dt=(()=>{let o=class o{constructor(){this.tiktokAttributeFormService=u(we),this.channelId=g(void 0),this.categoryId=g(void 0),this.platformChange=fe({alias:"onPlatformChanges"}),this.formSubscription=new ce,this.attributesChanges=new V,this.platformOptions=[{label:"TikTok Shop",value:z.TIKTOK_SHOP},{label:"Tokopedia",value:z.TOKOPEDIA}]}ngOnChanges(){let i=this.categoryId(),t=this.channelId();b.IsNotEmpty(i)&&b.IsNotEmpty(t)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(t,i).pipe(O(a=>a.filter(r=>!(r.type=="PRODUCT_PROPERTY"&&(b.IsEmpty(r.values)||r.values?.length==0)&&r.is_customizable==!1))),w(a=>{this.form=this.tiktokAttributeFormService.createFormGroup(a),this.listenToFormChange(a)}),Q(1)))}listenToFormChange(i){let t=[];this.form.valueChanges.pipe(le(this.formSubscription)).subscribe(a=>{delete a.listingPlatform,t=this.tiktokAttributeFormService.getFilteredAttributes(i,a),this.attributesChanges.emit(t)}),this.form.get("listingPlatform").valueChanges.pipe(Ge(this.form.get("listingPlatform").value),le(this.formSubscription)).subscribe(a=>{this.platformChange.emit(a)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["tiktok-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{platformChange:"onPlatformChanges",attributesChanges:"attributesChanges"},features:[k([we]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","listingPlatform","bindLabel","label","bindValue","value","placeholder","Platform Options",3,"multiple","items","clearable"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(t,a){if(t&1&&(_(0,si,10,5,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,Y,G,$,j,ee,R,H,W,X,te,P],encapsulation:2});let e=o;return e})();var Ve=(()=>{let o=class o{constructor(){this.woocommerceUploadService=u(ye)}getAttributes(i,t){return this.woocommerceUploadService.getAttributes(i,t).pipe(O(a=>a.map(r=>({key:r.name,label:r.name}))))}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();var Nt=(()=>{let o=class o{constructor(){this.wooAttributeFormService=u(Ve),this.channelId=g(),this.categoryId=g(),this.attributesChanges=new V}ngOnChanges(){b.IsNotEmpty(this.categoryId())&&b.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(i){this.attributesChanges.emit([i.key])}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Ve]),N],decls:6,vars:3,consts:[[1,"row"],[1,"col-6"],[1,"mb-1"],["bindLabel","label","bindValue","id","placeholder","Pilih Atribut",3,"change","items"]],template:function(t,a){t&1&&(c(0,"div",0)(1,"div",1)(2,"div",2),C(3,"Atribut"),l(),c(4,"ng-select",3),F(5,"async"),T("change",function(m){return a.onSelectAttribute(m)}),l()()()),t&2&&(s(4),p("items",A(5,1,a.attributes$)))},dependencies:[I,te,Y,G,$,P],encapsulation:2});let e=o;return e})();var Ue=(()=>{let o=class o{constructor(){this.httpService=u(ie),this.formBuilder=u(K)}getAttributes(i,t){return this.httpService.get("api/product/tokopedia/GetAttributes",[{key:"ID",value:i},{key:"CategoryID",value:t}]).pipe(O(r=>r))}createFormGroup(i){let t=this.formBuilder.group({});return i.forEach(a=>{t.addControl(a.variant,this.formBuilder.control(null))}),t}convertAttributes(i={}){return Object.values(i).filter(a=>a!==null).map(a=>JSON.stringify(a))}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();function mi(e,o){if(e&1&&(c(0,"div",2)(1,"div",3),C(2),l(),f(3,"ng-select",4),l()),e&2){let n=o.$implicit;s(2),q(" ",n==null?null:n.variant," "),s(),p("formControlName",n.variant)("items",n.values)("placeholder","Pilih "+(n==null?null:n.variant))}}function pi(e,o){if(e&1&&(c(0,"form",0)(1,"div",1),L(2,mi,4,4,"div",2,U),l()()),e&2){let n=d();p("formGroup",n.form),s(2),B(o)}}var Ot=(()=>{let o=class o{constructor(){this.tokpedAttrFormService=u(Ue),this.channelId=g(void 0),this.categoryId=g(void 0),this.attributesChanges=new V}ngOnInit(){}ngOnChanges(i){let t=this.categoryId(),a=this.channelId();b.IsNotEmpty(t)&&b.IsNotEmpty(a)&&(this.attributes$=this.tokpedAttrFormService.getAttributes(a,t).pipe(w(r=>{this.form=this.tokpedAttrFormService.createFormGroup(r),this.listenToFormChange()})))}listenToFormChange(){let i=[];this.formSubscription=this.form.valueChanges.subscribe(t=>{i=this.tokpedAttrFormService.convertAttributes(t),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["tokopedia-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Ue]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"]],template:function(t,a){if(t&1&&(_(0,pi,4,1,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,Y,G,$,j,R,H,W,X,P],encapsulation:2});let e=o;return e})();var Le=(()=>{let o=class o{constructor(){this.httpService=u(ie),this.formBuilder=u(K)}getAttributes(i){return this.httpService.get("api/product/shopify/GetAttributes",[{key:"ID",value:i}]).pipe(w(a=>(a.Options.StatusOptions=a.Options.Status.map(r=>({id:r,name:r})),a)))}createFormGroup(i){let t=this.formBuilder.group({});return Object.keys(i.Attribute).forEach(r=>{t.addControl(r,this.formBuilder.control(null))}),t}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();function ui(e,o){if(e&1&&(c(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3),C(4," Brand "),l(),f(5,"input",4),l(),c(6,"div",5)(7,"div",3),C(8," Product Type "),l(),f(9,"input",6),l(),c(10,"div",5)(11,"div",3),C(12," Status "),l(),f(13,"ng-select",7),l()()()),e&2){let n=d();p("formGroup",n.form),s(13),p("items",o.Options.StatusOptions)}}var wt=(()=>{let o=class o{constructor(){this.channelId=g(void 0),this.attributesChanges=new V,this.shopifyFormService=u(Le)}ngOnChanges(i){i.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId()).pipe(w(t=>{this.form=this.shopifyFormService.createFormGroup(t),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe($e(500)).subscribe(i=>{this.attributesChanges.emit([i])})}ngOnDestroy(){this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["shopify-attribute-form"]],inputs:{channelId:[1,"channelId"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Le]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","Brand","type","text","placeholder","brand",1,"form-control"],[1,"col-6"],["formControlName","ProductType","type","text","placeholder","Product Type",1,"form-control"],["formControlName","Status","bindLabel","name","bindValue","id","placeholder","Status",3,"items"]],template:function(t,a){if(t&1&&(_(0,ui,14,2,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,$,j,ee,R,H,W,X,Y,G,P],encapsulation:2});let e=o;return e})();function fi(e,o){if(e&1&&(c(0,"div",6),f(1,"app-product-card",9),l()),e&2){let n=o.$implicit;s(),p("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("imageForZoom",n==null?null:n.ImageUrl)("code",n==null||n.Variants[0]==null?null:n.Variants[0].Code)("showFooter",!1)}}function _i(e,o){if(e&1){let n=M();c(0,"mat-checkbox",21),We("ngModelChange",function(t){v(n);let a=d().$implicit;return je(a.selected,t)||(a.selected=t),x(t)}),T("ngModelChange",function(){let t=v(n),a=d(),r=a.$implicit,m=a.$index,y=d();return x(y.onSelectChannel(r,m,t))}),l()}if(e&2){let n=d().$implicit;He("ngModel",n.selected)}}function hi(e,o){if(e&1&&(c(0,"div",18),f(1,"input",22),l()),e&2){let n=d().$implicit,i=d();p("matTooltip",n.type==i.channelType.Shopify||n.type==i.channelType.ShopifyV2?"Cannot change category, please change category in admin.shopify.com":n.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function Ci(e,o){if(e&1){let n=M();c(0,"app-channel-category-select",23),T("selectedCategory",function(t){v(n);let a=d().$index,r=d();return x(r.onCategoryChange(a,t))}),l()}if(e&2){let n=d().$implicit,i=d();p("disabled",!n.selected||n.selected&&n.type==i.channelType.Lazada)("channelId",n.id)("channelType",n.type)("categoryId",n.categoryId)}}function gi(e,o){if(e&1){let n=M();c(0,"shopee-attribute-form",27),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)("channelType",n.type)}}function bi(e,o){if(e&1){let n=M();c(0,"tiktok-attribute-form",28),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))})("onPlatformChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onPlatformChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)}}function yi(e,o){if(e&1){let n=M();c(0,"wooocommerce-attribute-form",29),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)}}function vi(e,o){if(e&1){let n=M();c(0,"tokopedia-attribute-form",29),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)}}function xi(e,o){if(e&1&&(c(0,"div",20)(1,"div",24),_(2,gi,1,3,"shopee-attribute-form",25)(3,bi,1,2,"tiktok-attribute-form",26)(4,yi,1,2,"wooocommerce-attribute-form",26)(5,vi,1,2,"tokopedia-attribute-form",26),l()()),e&2){let n,i=d().$implicit,t=d();s(2),h((n=i.type)===t.channelType.Shopee?2:n===t.channelType.Tiktok?3:n===t.channelType.WooCommerce?4:n===t.channelType.Tokopedia?5:-1)}}function Ti(e,o){if(e&1){let n=M();c(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",30),T("attributesChanges",function(t){v(n);let a=d().$index,r=d();return x(r.onAttributesChange(a,t))}),l()()()}if(e&2){let n=d().$implicit;s(2),p("channelId",n.id)}}function Si(e,o){if(e&1&&(c(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),_(6,_i,1,1,"mat-checkbox",14),F(7,"async"),l(),c(8,"div"),f(9,"app-channel-logo",15),l(),c(10,"div",16)(11,"span"),C(12),l()()()(),c(13,"div",12)(14,"div",17),_(15,hi,2,1,"div",18)(16,Ci,1,4,"app-channel-category-select",19),l()()(),_(17,xi,6,1,"div",20)(18,Ti,3,1,"div",20),l()()),e&2){let n,i=o.$implicit,t=d();s(6),h((n=A(7,8,t.defaultCategories$))?6:-1,n),s(3),p("typeId",i.type)("showChannelName",!1),s(),p("matTooltip",i.name)("matTooltipShowDelay",2500),s(2),Z(i.name),s(3),h(i.type==t.channelType.Shopify||i.type==t.channelType.Plugo||i.type==t.channelType.ShopifyV2?15:16),s(2),h(i.categoryId&&t.channelType.Lazada!=i.type&&i.selected?17:(t.channelType.Shopify==i.type||i.type==t.channelType.ShopifyV2)&&i.selected?18:-1)}}var Sr=(()=>{let o=class o{constructor(){this.toastr=u(tt),this.uploadProductService=u(ve),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=Ee,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(Q(1))}onCategoryChange(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.categoryId=t,r.attributes=[]),r)))}onPlatformChange(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.listing_platforms=t),r)))}onAttributesChange(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.attributes=t),r)))}tiktokPlatformChanges(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.listing_platforms=t),r)))}onSelectChannel(i,t,a){this.channelProductUploads.update(r=>r.map((m,y)=>{if(y==t&&i.selected){let ke=this.findCategoryByChannelId(i.id,a);m.categoryId=ke?.DefaultCategoryID}return y==t&&!i.selected&&(m.categoryId=null),m}))}findCategoryByChannelId(i,t){return t.find(a=>a.ID===i)}onUploadProduct(){if(this.checkTiktokPlatform()==!1){this.toastr.error("Please select at least one platform for TikTok channel","Platform is Required");return}this.uploadProductService.onUploadProduct(this.channelProductUploads())}checkTiktokPlatform(){return this.channelProductUploads().every(t=>t.type==Ee.Tiktok&&b.IsNotEmpty(t?.categoryId)?t.listing_platforms.length>0:!0)}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["app-product-upload"]],features:[k([be,pt,ut,ye])],decls:17,vars:5,consts:[["headerTitle","Upload Product To Channel",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-upload"],[1,"container-fluid","mt-6"],[1,"ps-3","mt-8","pb-5","fw-medium"],[1,"row","mb-10","ps-3"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"ps-3","mb-8","border-bottom","pb-5","fw-medium"],[1,"row","mb-6"],[3,"productId","title","image","description","imageForZoom","code","showFooter"],[1,"col-12"],[1,"row"],[1,"col-3"],[1,"d-flex","align-items-center"],["color","primary",1,"example-margin",3,"ngModel"],[3,"typeId","showChannelName"],[2,"overflow","hidden","text-overflow","ellipsis","white-space","nowrap",3,"matTooltip","matTooltipShowDelay"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[3,"disabled","channelId","channelType","categoryId"],[1,"row","my-3"],["color","primary",1,"example-margin",3,"ngModelChange","ngModel"],["disabled","","type","text","placeholder","Category Unavailable",1,"form-control","rounded-1",2,"height","35px"],[3,"selectedCategory","disabled","channelId","channelType","categoryId"],[1,"col-12","ps-11"],[3,"categoryId","channelId","channelType"],[3,"categoryId","channelId"],[3,"attributesChanges","categoryId","channelId","channelType"],[3,"attributesChanges","onPlatformChanges","categoryId","channelId"],[3,"attributesChanges","categoryId","channelId"],[3,"attributesChanges","channelId"]],template:function(t,a){if(t&1&&(c(0,"mainpanel",0)(1,"actions")(2,"button",1),T("click",function(){return a.onUploadProduct()}),f(3,"i",2),C(4," Upload "),l()(),c(5,"content")(6,"div",3)(7,"h3",4),C(8,"Product To Upload"),l(),c(9,"div",5),L(10,fi,2,7,"div",6,U),F(12,"async"),l(),c(13,"h3",7),C(14,"Channel To Upload"),l(),L(15,Si,19,10,"div",8,U),l()()()),t&2){let r;p("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p("disabled",((r=a.channelProductUploads())==null?null:r.length)==0),s(8),B(A(12,3,a.selectedProducts$)),s(5),B(a.channelProductUploads())}},dependencies:[I,xt,rt,nt,St,Tt,at,te,R,qe,ot,it,Dt,Nt,Ot,wt,_t,Ft,Et,P],encapsulation:2});let e=o;return e})();export{Sr as ProductUploadComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re}from"./chunk-7JQEF4XX.js";import{a as pe,b as me}from"./chunk-FKGKMEDE.js";import"./chunk-ZKIO2ZQ6.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-FULVA6QB.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import{a as te,b as ne,d as ie,e as ae}from"./chunk-6KWG6O5L.js";import{i as ee}from"./chunk-
|
|
1
|
+
import{a as re}from"./chunk-7JQEF4XX.js";import{a as pe,b as me}from"./chunk-FKGKMEDE.js";import"./chunk-ZKIO2ZQ6.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-FULVA6QB.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import{a as te,b as ne,d as ie,e as ae}from"./chunk-6KWG6O5L.js";import{i as ee}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{e as Z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as Y}from"./chunk-JBEKD57G.js";import{m as oe,n as le}from"./chunk-EDEZ3JLR.js";import{A as X,h as K,m as Q}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as k,j as H,k as U,m as G}from"./chunk-LNJUGHOX.js";import{$b as R,Gb as P,Mb as B,Mc as s,Nc as f,Oc as y,Qc as z,Rc as A,Sc as V,Z as M,Zc as J,aa as D,ac as T,bc as $,cc as F,ec as j,fc as O,g as L,gc as h,hc as a,hd as c,ic as o,id as d,jc as u,jd as W,lb as S,ma as w,nb as p,qc as q,ra as g,v as I,vc as v,xa as E,xc as x,ya as N}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{let t=class t{constructor(){this.httpService=g(Z),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=_(_({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=w({token:t,factory:t.\u0275fac});let i=t;return i})();function ce(i,t){if(i&1&&(a(0,"span",10),u(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,S)("alt",l.Name),p(),y(" ",l.Name," ")}}function de(i,t){if(i&1&&(a(0,"tr")(1,"td"),u(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td")(6,"span",18),s(7),c(8,"json"),o()(),a(9,"td"),s(10),c(11,"json"),o(),a(12,"td"),s(13),c(14,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,S),p(2),y(" ",l.ChannelName," "),p(3),f(d(8,5,l.Request)),p(3),f(d(11,7,l.Response)),p(3),f(W(14,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function he(i,t){if(i&1){let l=q();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),j(13,de,15,12,"tr",null,F),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),v("page",function(e){E(l);let r=x();return N(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=x();p(13),O((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function ge(i,t){i&1&&(a(0,"div",9),u(1,"app-empty-state"),o())}var qe=(()=>{let t=class t{constructor(){this.channelLogService=g(b),this.authService=g(ee),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=Y.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=P({type:t,selectors:[["app-channel-log"]],features:[J([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),V("ngModelChange",function(C){return A(r.channelID,C)||(r.channelID=C),C}),B(7,ce,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),R(12,he,21,13,"div",8),c(13,"async"),T(14,ge,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),z("ngModel",r.channelID),p(6),$(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[G,le,oe,re,me,pe,ae,ie,te,ne,X,K,Q,k,U,H],encapsulation:2});let i=t;return i})();export{qe as ChannelLogComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Fe,b as Ie}from"./chunk-L76NLJD7.js";import{a as Ee,b as Ve,c as Ae}from"./chunk-ILW6ZFFV.js";import{a as Ne}from"./chunk-BTSGHYIF.js";import{a as j}from"./chunk-WFXKYFBX.js";import{a as De}from"./chunk-S7CKRTJV.js";import"./chunk-EYT2YJGK.js";import"./chunk-RNWHARPK.js";import{a as Le}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-6KWG6O5L.js";import{a as Pe}from"./chunk-B5AYTAZQ.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as Me}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as x}from"./chunk-AGBJEXIM.js";import{b as L,e as z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as d,c as A}from"./chunk-JBEKD57G.js";import{b as Se,d as we,f as ve,g as ye,h as xe,m as ke,n as Te}from"./chunk-EDEZ3JLR.js";import{A as R,b as ge,c as fe,h as O,m as W,o as Ce}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as _e,w as be}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as ce,j as de,l as ue,m as he}from"./chunk-LNJUGHOX.js";import{$b as k,$c as pe,Bc as te,Cc as ie,Dc as ne,G,Gb as N,Ha as B,Lc as oe,Mc as c,Nc as P,Oc as E,Qc as S,Rc as w,Sc as v,Tc as re,Uc as ae,Vc as F,Z as J,Zc as le,aa as X,bc as T,cc as Z,ec as $,fc as ee,gc as y,hc as o,hd as V,ic as r,id as I,jc as _,jd as se,lb as Y,ma as D,nb as m,od as me,qc as M,ra as C,v as K,vc as b,xa as h,xc as f,ya as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Oe=(()=>{let l=class l{constructor(){this.http=C(z),this.toastr=C(L)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var We=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[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,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[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(t,i){t&1&&(o(0,"div",0)(1,"h2",1),c(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),c(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),c(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),c(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),c(16,"Cetak Pesanan"),r()()()),t&2&&(m(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[R,O,W,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(z),this.shippingLabelService=C(Oe),this.toastrService=C(L),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(We).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),Re=>Re.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var Be=["contextMenu"],je=a=>({"td-cell-hover":a});function He(a,l){if(a&1){let n=M();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),c(3,"Download Shipping Label"),r()()}}function Ue(a,l){if(a&1){let n=M();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Qe(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function Ke(a,l){if(a&1&&(o(0,"span"),c(1),r()),a&2){let n=f().$implicit;m(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ge(a,l){if(a&1){let n=M();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Je(a,l){if(a&1){let n=M();o(0,"tr")(1,"td"),k(2,Ue,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),c(9),r(),o(10,"small",35)(11,"span"),c(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),c(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),c(23),r()()(),o(24,"td"),k(25,Qe,1,1,"variants-dropdown",39)(26,qe,1,1,"variant-with-image",40),r(),o(27,"td",41),c(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),c(35),r(),k(36,Ke,2,1,"span"),r(),o(37,"small"),c(38),r()()()(),o(39,"td",45),k(40,Ge,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),m(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),m(4),P(n.Outlet),m(3),P(n.ChannelName),m(4),y("order",n),m(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),m(5),E(" ",n.Customer," "),m(),oe(pe(23,je,(n.Variants==null?null:n.Variants.length)>1)),m(),T((n.Variants==null?null:n.Variants.length)>1?25:26),m(3),P(I(29,21,n.Amount)),m(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),m(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),m(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Xe(a,l){if(a&1){let n=M();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),c(6,"Outlet"),r(),o(7,"th",26),c(8,"Number"),r(),o(9,"th"),c(10,"Items"),r(),o(11,"th",27),c(12,"Amount"),r(),o(13,"th",28),c(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Je,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);m(17),ee(e),m(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Ye(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Yt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(L),this.fulfillmentService=C(Fe),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=me(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(Be,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=M();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,He,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),c(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),c(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),c(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),c(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),c(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Xe,20,2,"div",17)(34,Ye,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));m(2),S("text",i.filter().Number),m(2),T(i.selectedOrders().length>0?4:-1),m(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),m(5),S("date",i.filter().From),m(2),S("date",i.filter().To),m(4),S("ngModel",i.filter().PageNumber),m(4),S("ngModel",i.filter().PageSize),m(5),T((p==null?null:p.length)>0?33:34),m(2),y("items",i.contextMenuItems)}},dependencies:[he,Te,ke,Le,Me,R,fe,Ce,ge,O,W,Ve,Ae,De,be,_e,Ne,Ie,Pe,ce,ue,de,Ee],encapsulation:2});let a=l;return a})();export{Yt as AwaitingCollectionComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-E6ZWL77N.js";import"./chunk-O4EO3YBL.js";import{a as je}from"./chunk-
|
|
2
|
-
`],encapsulation:2,changeDetection:0})}return e})(),Ke=(()=>{class e{_ngZone=c(ie);_elementRef=c(ee);_ariaDescriber=c(Re);_renderer=c(ne);_animationsDisabled=Ue();_idGenerator=c(Ve);get color(){return this._color}set color(i){this._setColor(i),this._color=i}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(i){this._updateRenderedContent(i)}_content;get description(){return this._description}set description(i){this._updateDescription(i)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=c(Ae);_document=c(X);constructor(){let i=c(Be);i.load(at),i.load(Le)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),i.setAttribute("aria-hidden","true"),i.classList.add(Ze),this._animationsDisabled&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Ze}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}static \u0275fac=function(n){return new(n||e)};static \u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&E("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",z],disabled:[2,"matBadgeDisabled","disabled",z],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",z]}})}return e})(),Ye=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=b({type:e});static \u0275inj=_({imports:[Ne,W,W]})}return e})();function rt(e,t){if(e&1&&(r(0,"p",21),p(1),s()),e&2){let i=m(3).$implicit;d(),O(" ",i.Title," ")}}function lt(e,t){if(e&1&&(r(0,"p"),p(1),s()),e&2){let i=m(3).$implicit;d(),y(i.Title)}}function st(e,t){if(e&1&&(r(0,"a",18),C(1,"i"),w(2,rt,2,1,"p",21)(3,lt,2,1,"p"),s()),e&2){let i=m(2).$implicit;f("href",i.Url,te),d(),$(i.Icon),d(),T(i.Badge?2:3)}}function dt(e,t){if(e&1&&S(0,st,4,4,"a",20),e&2){let i=m().$implicit;f("ngxPermissionsOnly",i.Roles)}}function ct(e,t){if(e&1&&(r(0,"p",21),p(1),s()),e&2){let i=m(4).$implicit;d(),O(" ",i.Title," ")}}function mt(e,t){if(e&1&&(r(0,"p"),p(1),s()),e&2){let i=m(4).$implicit;d(),y(i.Title)}}function pt(e,t){if(e&1&&(w(0,ct,2,1,"p",21),j(1,"async"),oe(2,mt,2,1,"p")),e&2){let i=m(4);T(H(1,1,i.notifications$)!=0?0:2)}}function gt(e,t){if(e&1&&(r(0,"p"),p(1),s()),e&2){let i=m(3).$implicit;d(),y(i.Title)}}function ht(e,t){if(e&1&&(r(0,"a",19),C(1,"i"),w(2,pt,3,3)(3,gt,2,1,"p"),s()),e&2){let i=m(2).$implicit,n=m();f("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),d(),$(i.Icon),d(),T(i.Badge?2:3)}}function ft(e,t){if(e&1&&S(0,ht,4,5,"a",22),e&2){let i=m().$implicit;f("ngxPermissionsOnly",i.Roles)}}function ut(e,t){if(e&1&&(r(0,"li",16),w(1,dt,1,1,"a",18)(2,ft,1,1,"a",19),s()),e&2){let i=t.$implicit;d(),T(i.ExternalLink?1:2)}}var Xe=(()=>{let t=class t{constructor(){this.toggleSidebarService=c(ke),this.notificationService=c(ze),this.decodeTokenService=c(Se),this.authService=c(Oe),this.Menu={};let n=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=n.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new V().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(P(n=>n.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(n){if(n){let a,o=n.split(" ");return o.length==1?a=o[0].substring(0,2):a=o.shift().charAt(0)+o.pop().charAt(0),a}}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=v({type:t,selectors:[["app-menu"]],standalone:!1,decls:29,vars:8,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["routerLink","/menu/profile",1,"dropdown-item","h5",2,"cursor","pointer"],["aria-hidden","true",1,"fa-user","fas"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active"],[1,"main-panel"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"]],template:function(a,o){a&1&&(r(0,"div",0),j(1,"async"),r(2,"div",1)(3,"button",2),I("click",function(){return o.onCallapseSidebar()}),C(4,"i",3),s(),r(5,"div",4)(6,"div",5)(7,"a",6),p(8),s(),r(9,"div",7)(10,"div",8),p(11),s(),C(12,"div",9),r(13,"a",10),C(14,"i",11),p(15,"\xA0 "),r(16,"span"),p(17,"My Profile"),s()(),r(18,"a",12),I("click",function(){return o.onLogout()}),C(19,"i",13),p(20,"\xA0 "),r(21,"span"),p(22," Log Out"),s()()()()(),r(23,"div",14)(24,"ul",15),le(25,ut,3,1,"li",16,re),s()()(),r(27,"div",17),C(28,"router-outlet"),s()()),a&2&&(E("nav-open",H(1,6,o.toggleState$)),d(2),f("ngClass",o.isCollapseSidebar?"collapses":""),d(2),f("ngClass",o.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),d(4),O(" ",o.storeName," "),d(3),O(" ",o.token==null?null:o.token.LID," "),d(14),se(o.Menu))},dependencies:[he,_e,Ce,ve,Fe,Ke,Te,fe],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=t;return e})();var u=(e,t)=>U(null,null,function*(){let i=c(we),n=c(be),a=e.data?.roles||[],o=e.data?.redirectUrl||"/";return a.length===0||(yield _t(i,a))?!0:(n.navigate([o]),!1)});function _t(e,t){return U(this,null,function*(){let i=t.map(a=>e.hasPermission(a));return(yield Promise.all(i)).some(a=>a)})}var bt=[{path:"",component:Xe,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-BXYXVBXP.js").then(e=>e.routes),canActivate:[g],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-7GY4O2UX.js").then(e=>e.DashboardModule),canActivate:[g,u,je],data:{title:"Dashboard",roles:[l.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-IDH7MCR3.js").then(e=>e.ProductModule),canActivate:[g,u],data:{title:"Products",roles:[l.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-J6BQDYXO.js").then(e=>e.InventoryRoutingModule),canActivate:[g,u],data:{title:"Inventory",roles:[l.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-ZUL6ZHSW.js").then(e=>e.PriceRoutingModule),canActivate:[g,u],data:{title:"Price",roles:[l.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-B6F5PDL5.js").then(e=>e.routes),canActivate:[g],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-7DT7FQ2T.js").then(e=>e.ReportModule),canActivate:[g,u],data:{title:"Report",roles:[l.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadChildren:()=>import("./chunk-3K2EKA5O.js").then(e=>e.LogisticModule),canActivate:[g,u],data:{title:"Logistic",roles:[l.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-PLLHTY6O.js").then(e=>e.ChannelsModule),canActivate:[g,u],data:{title:"Marketplace",roles:[l.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-DH5CXAEM.js").then(e=>e.LogsModule),canActivate:[g,u],data:{title:"Orders",roles:[l.DevView]}},{path:"users",loadChildren:()=>import("./chunk-GURSK3ZV.js").then(e=>e.userRoutes),canActivate:[g,u],data:{title:"Users",roles:[l.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-CLQGGKN6.js").then(e=>e.routes),canActivate:[g],data:{title:"Json API"}}]}],et=(()=>{let t=class t{};t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=b({type:t}),t.\u0275inj=_({imports:[G.forChild(bt),G]});let e=t;return e})();var Ct=["selectId"];function vt(e,t){if(e&1&&(r(0,"span",3),p(1),s()),e&2){let i=t.item,n=m();f("title",i[n.bindLabel]),d(),y(i[n.bindLabel])}}var tt=(()=>{let t=class t{set items(n){this.ngSelectInfiniteScroll.data=n,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(n){this._selected=n,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new J,this.selectedChange=new k,this.selectedLabel=new k,this.onOpen=new k}onOpenSelect(){this.onOpen.emit()}onSelectChange(n){n?(this.selectedChange.emit(n[this.bindValue]),this.selectedLabel.emit(n[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=v({type:t,selectors:[["ng-select-infinite"]],viewQuery:function(a,o){if(a&1&&ce(Ct,7),a&2){let h;me(h=pe())&&(o.ngSelectElement=h.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(a,o){if(a&1){let h=de();r(0,"ng-select",1,0),I("clear",function(){return M(h),x(o.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return M(h),x(o.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return M(h),x(o.onOpenSelect())})("change",function(nt){return M(h),x(o.onSelectChange(nt))}),S(2,vt,2,2,"ng-template",2),s()}a&2&&(ge("width",o.width),f("appendTo",o.parent)("disabled",o.disabled)("virtualScroll",!0)("typeahead",o.ngSelectInfiniteScroll.input$)("items",o.ngSelectInfiniteScroll.bufferData)("bindLabel",o.bindLabel)("bindValue",o.bindValue)("placeholder",o.placeholder)("ngModel",o.selected)("clearable",o.clearable))},dependencies:[A,Pe,De,L,ye,Me],encapsulation:2});let e=t;return e})(),J=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new F,this._destroy$=new F,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(Z(200),K(),P(t=>(t&&(t=t.toLowerCase()),this.filterData(t))),Q(t=>t!==void 0),Y(this._destroy$)).subscribe(t=>{this._dataBuffer=t.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(t){let i=-1,n;return this._data.filter(o=>(n=JSON.stringify(o).toLowerCase(),i=n.indexOf(t),i!==-1||t==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(t){this._data=t||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(t,i){if(Ee.IsNotEmpty(t)){let n=this._data.filter(a=>a[i].toString().toLowerCase().indexOf(t)!==-1);this._dataBuffer=n.slice(0,this._bufferSize)}}set bufferSize(t){this._bufferSize=t}onScrollToEnd(){this.fetchMore()}fetchMore(){let t=this._dataBuffer.length,i=this._data.slice(t,this._bufferSize+t);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(i)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var it=(()=>{let t=class t{};t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=b({type:t}),t.\u0275inj=_({imports:[B,L,$e,We,Je,Ge,qe,Qe,N,q,tt,A,xe]});let e=t;return e})();var bn=(()=>{let t=class t{};t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=b({type:t}),t.\u0275inj=_({providers:[ue],imports:[B,et,He,N,it,Ye,Ie.forChild()]});let e=t;return e})();export{bn as MenuModule};
|
|
1
|
+
import"./chunk-E6ZWL77N.js";import"./chunk-O4EO3YBL.js";import{a as je}from"./chunk-5NFLGFHD.js";import"./chunk-4VNQYYVV.js";import{b as qe}from"./chunk-ZKIO2ZQ6.js";import{a as g}from"./chunk-BUY4AAHK.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-GG3MDS4C.js";import{b as Qe}from"./chunk-O2YF5VGD.js";import{b as Je}from"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import{c as We}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import{a as Ge}from"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import{a as l}from"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import{b as ze}from"./chunk-4UPWMQJX.js";import{a as De,d as Pe,e as A}from"./chunk-6KWG6O5L.js";import{a as Ee}from"./chunk-A6QXXKPR.js";import{b as Se,i as Oe}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{a as ke,h as $e,k as q,n as He}from"./chunk-EDEZ3JLR.js";import{A as L,B as xe,h as ye,m as Me}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as we,b as Te,c as Ie}from"./chunk-ZETUYNFJ.js";import{v as Fe,w as N}from"./chunk-STYL7ETF.js";import{D as Ne,E as Ve,J as Re,N as Ue,O as W,v as Be,w as Le,z as Ae}from"./chunk-XLIPGDSC.js";import{E as _e,F as be,G as Ce,H as ve,I as G,c as he,i as fe,j as ue,m as B}from"./chunk-LNJUGHOX.js";import{$b as w,Bc as ce,Ca as X,Cc as me,Dc as pe,Fd as z,G as Q,Gb as v,Hb as b,Ib as ae,Ic as ge,Jc as E,Lc as $,M as Z,Mb as S,Mc as p,Nc as y,Oc as O,Q as K,Qa as ee,ac as oe,bc as T,ca as Y,dc as re,ec as le,f as F,fc as se,gc as f,hc as r,hd as j,ic as s,id as H,jc as C,lb as te,na as _,nb as d,qc as de,ra as c,sb as k,tb as ie,v as P,vc as I,xa as M,xc as m,ya as x,yb as ne}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{i as U}from"./chunk-66YHNWRR.js";var V=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[l.DashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[l.ProductView]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[l.InventoryView]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[l.PriceView]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/order",Roles:[l.OrderView]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[l.ChannelView]},{Icon:"fa-solid fa-user",Title:"Users",Url:"/menu/users",Roles:[l.UserView]},{Icon:"fas fa-clipboard-list",Title:"Sync Logs",Url:"/menu/sync-log",Roles:[l.Report]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[l.LogisticView]},{Icon:"fas fa-file-alt",Title:"Developer",Url:"/menu/log",Roles:[l.DevView]},{Icon:"fa-solid fa-file-brackets-curly",Title:"JSON Api",Url:"/menu/json-api",Roles:[l.JsonApiView]}]}get getMenu(){return this.menus}};var Ze="mat-badge-content",at=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=v({type:e,selectors:[["ng-component"]],decls:0,vars:0,template:function(n,a){},styles:[`.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}
|
|
2
|
+
`],encapsulation:2,changeDetection:0})}return e})(),Ke=(()=>{class e{_ngZone=c(ie);_elementRef=c(ee);_ariaDescriber=c(Re);_renderer=c(ne);_animationsDisabled=Ue();_idGenerator=c(Ve);get color(){return this._color}set color(i){this._setColor(i),this._color=i}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(i){this._updateRenderedContent(i)}_content;get description(){return this._description}set description(i){this._updateDescription(i)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=c(Ae);_document=c(X);constructor(){let i=c(Be);i.load(at),i.load(Le)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),i.setAttribute("aria-hidden","true"),i.classList.add(Ze),this._animationsDisabled&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Ze}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}static \u0275fac=function(n){return new(n||e)};static \u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&E("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",z],disabled:[2,"matBadgeDisabled","disabled",z],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",z]}})}return e})(),Ye=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=b({type:e});static \u0275inj=_({imports:[Ne,W,W]})}return e})();function rt(e,t){if(e&1&&(r(0,"p",21),p(1),s()),e&2){let i=m(3).$implicit;d(),O(" ",i.Title," ")}}function lt(e,t){if(e&1&&(r(0,"p"),p(1),s()),e&2){let i=m(3).$implicit;d(),y(i.Title)}}function st(e,t){if(e&1&&(r(0,"a",18),C(1,"i"),w(2,rt,2,1,"p",21)(3,lt,2,1,"p"),s()),e&2){let i=m(2).$implicit;f("href",i.Url,te),d(),$(i.Icon),d(),T(i.Badge?2:3)}}function dt(e,t){if(e&1&&S(0,st,4,4,"a",20),e&2){let i=m().$implicit;f("ngxPermissionsOnly",i.Roles)}}function ct(e,t){if(e&1&&(r(0,"p",21),p(1),s()),e&2){let i=m(4).$implicit;d(),O(" ",i.Title," ")}}function mt(e,t){if(e&1&&(r(0,"p"),p(1),s()),e&2){let i=m(4).$implicit;d(),y(i.Title)}}function pt(e,t){if(e&1&&(w(0,ct,2,1,"p",21),j(1,"async"),oe(2,mt,2,1,"p")),e&2){let i=m(4);T(H(1,1,i.notifications$)!=0?0:2)}}function gt(e,t){if(e&1&&(r(0,"p"),p(1),s()),e&2){let i=m(3).$implicit;d(),y(i.Title)}}function ht(e,t){if(e&1&&(r(0,"a",19),C(1,"i"),w(2,pt,3,3)(3,gt,2,1,"p"),s()),e&2){let i=m(2).$implicit,n=m();f("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),d(),$(i.Icon),d(),T(i.Badge?2:3)}}function ft(e,t){if(e&1&&S(0,ht,4,5,"a",22),e&2){let i=m().$implicit;f("ngxPermissionsOnly",i.Roles)}}function ut(e,t){if(e&1&&(r(0,"li",16),w(1,dt,1,1,"a",18)(2,ft,1,1,"a",19),s()),e&2){let i=t.$implicit;d(),T(i.ExternalLink?1:2)}}var Xe=(()=>{let t=class t{constructor(){this.toggleSidebarService=c(ke),this.notificationService=c(ze),this.decodeTokenService=c(Se),this.authService=c(Oe),this.Menu={};let n=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=n.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new V().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(P(n=>n.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(n){if(n){let a,o=n.split(" ");return o.length==1?a=o[0].substring(0,2):a=o.shift().charAt(0)+o.pop().charAt(0),a}}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=v({type:t,selectors:[["app-menu"]],standalone:!1,decls:29,vars:8,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["routerLink","/menu/profile",1,"dropdown-item","h5",2,"cursor","pointer"],["aria-hidden","true",1,"fa-user","fas"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active"],[1,"main-panel"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"]],template:function(a,o){a&1&&(r(0,"div",0),j(1,"async"),r(2,"div",1)(3,"button",2),I("click",function(){return o.onCallapseSidebar()}),C(4,"i",3),s(),r(5,"div",4)(6,"div",5)(7,"a",6),p(8),s(),r(9,"div",7)(10,"div",8),p(11),s(),C(12,"div",9),r(13,"a",10),C(14,"i",11),p(15,"\xA0 "),r(16,"span"),p(17,"My Profile"),s()(),r(18,"a",12),I("click",function(){return o.onLogout()}),C(19,"i",13),p(20,"\xA0 "),r(21,"span"),p(22," Log Out"),s()()()()(),r(23,"div",14)(24,"ul",15),le(25,ut,3,1,"li",16,re),s()()(),r(27,"div",17),C(28,"router-outlet"),s()()),a&2&&(E("nav-open",H(1,6,o.toggleState$)),d(2),f("ngClass",o.isCollapseSidebar?"collapses":""),d(2),f("ngClass",o.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),d(4),O(" ",o.storeName," "),d(3),O(" ",o.token==null?null:o.token.LID," "),d(14),se(o.Menu))},dependencies:[he,_e,Ce,ve,Fe,Ke,Te,fe],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=t;return e})();var u=(e,t)=>U(null,null,function*(){let i=c(we),n=c(be),a=e.data?.roles||[],o=e.data?.redirectUrl||"/";return a.length===0||(yield _t(i,a))?!0:(n.navigate([o]),!1)});function _t(e,t){return U(this,null,function*(){let i=t.map(a=>e.hasPermission(a));return(yield Promise.all(i)).some(a=>a)})}var bt=[{path:"",component:Xe,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-BXYXVBXP.js").then(e=>e.routes),canActivate:[g],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-7GY4O2UX.js").then(e=>e.DashboardModule),canActivate:[g,u,je],data:{title:"Dashboard",roles:[l.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-YF56YLYK.js").then(e=>e.ProductModule),canActivate:[g,u],data:{title:"Products",roles:[l.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-U6KJZIHD.js").then(e=>e.InventoryRoutingModule),canActivate:[g,u],data:{title:"Inventory",roles:[l.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-SZVJOKAX.js").then(e=>e.PriceRoutingModule),canActivate:[g,u],data:{title:"Price",roles:[l.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-F7I7HQGQ.js").then(e=>e.routes),canActivate:[g],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-PHTDDNER.js").then(e=>e.ReportModule),canActivate:[g,u],data:{title:"Report",roles:[l.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadChildren:()=>import("./chunk-X7JNYYQS.js").then(e=>e.LogisticModule),canActivate:[g,u],data:{title:"Logistic",roles:[l.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-FQQOS3AF.js").then(e=>e.ChannelsModule),canActivate:[g,u],data:{title:"Marketplace",roles:[l.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-QMC2DZIB.js").then(e=>e.LogsModule),canActivate:[g,u],data:{title:"Orders",roles:[l.DevView]}},{path:"users",loadChildren:()=>import("./chunk-GURSK3ZV.js").then(e=>e.userRoutes),canActivate:[g,u],data:{title:"Users",roles:[l.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-DCAYH4J7.js").then(e=>e.routes),canActivate:[g],data:{title:"Json API"}}]}],et=(()=>{let t=class t{};t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=b({type:t}),t.\u0275inj=_({imports:[G.forChild(bt),G]});let e=t;return e})();var Ct=["selectId"];function vt(e,t){if(e&1&&(r(0,"span",3),p(1),s()),e&2){let i=t.item,n=m();f("title",i[n.bindLabel]),d(),y(i[n.bindLabel])}}var tt=(()=>{let t=class t{set items(n){this.ngSelectInfiniteScroll.data=n,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(n){this._selected=n,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new J,this.selectedChange=new k,this.selectedLabel=new k,this.onOpen=new k}onOpenSelect(){this.onOpen.emit()}onSelectChange(n){n?(this.selectedChange.emit(n[this.bindValue]),this.selectedLabel.emit(n[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=v({type:t,selectors:[["ng-select-infinite"]],viewQuery:function(a,o){if(a&1&&ce(Ct,7),a&2){let h;me(h=pe())&&(o.ngSelectElement=h.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(a,o){if(a&1){let h=de();r(0,"ng-select",1,0),I("clear",function(){return M(h),x(o.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return M(h),x(o.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return M(h),x(o.onOpenSelect())})("change",function(nt){return M(h),x(o.onSelectChange(nt))}),S(2,vt,2,2,"ng-template",2),s()}a&2&&(ge("width",o.width),f("appendTo",o.parent)("disabled",o.disabled)("virtualScroll",!0)("typeahead",o.ngSelectInfiniteScroll.input$)("items",o.ngSelectInfiniteScroll.bufferData)("bindLabel",o.bindLabel)("bindValue",o.bindValue)("placeholder",o.placeholder)("ngModel",o.selected)("clearable",o.clearable))},dependencies:[A,Pe,De,L,ye,Me],encapsulation:2});let e=t;return e})(),J=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new F,this._destroy$=new F,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(Z(200),K(),P(t=>(t&&(t=t.toLowerCase()),this.filterData(t))),Q(t=>t!==void 0),Y(this._destroy$)).subscribe(t=>{this._dataBuffer=t.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(t){let i=-1,n;return this._data.filter(o=>(n=JSON.stringify(o).toLowerCase(),i=n.indexOf(t),i!==-1||t==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(t){this._data=t||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(t,i){if(Ee.IsNotEmpty(t)){let n=this._data.filter(a=>a[i].toString().toLowerCase().indexOf(t)!==-1);this._dataBuffer=n.slice(0,this._bufferSize)}}set bufferSize(t){this._bufferSize=t}onScrollToEnd(){this.fetchMore()}fetchMore(){let t=this._dataBuffer.length,i=this._data.slice(t,this._bufferSize+t);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(i)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var it=(()=>{let t=class t{};t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=b({type:t}),t.\u0275inj=_({imports:[B,L,$e,We,Je,Ge,qe,Qe,N,q,tt,A,xe]});let e=t;return e})();var bn=(()=>{let t=class t{};t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=b({type:t}),t.\u0275inj=_({providers:[ue],imports:[B,et,He,N,it,Ye,Ie.forChild()]});let e=t;return e})();export{bn as MenuModule};
|