marketplacepos 26.22.2 → 26.24.0
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-WHR2OWNK.js → chunk-27NTUGCX.js} +2 -2
- package/Marketplace/{chunk-PCYBIBY2.js → chunk-2DXZLTKJ.js} +1 -1
- package/Marketplace/{chunk-IHYU4MYG.js → chunk-2EWRBNZ3.js} +1 -1
- package/Marketplace/{chunk-JXTOHV3U.js → chunk-3GTUQUIQ.js} +1 -1
- package/Marketplace/{chunk-X6EJH5QJ.js → chunk-3I6KNVGM.js} +1 -1
- package/Marketplace/{chunk-B72J742I.js → chunk-3UMIBUTI.js} +1 -1
- package/Marketplace/{chunk-HLXMHLKA.js → chunk-57KM76KQ.js} +1 -1
- package/Marketplace/{chunk-56LJVP66.js → chunk-5CFGYX3G.js} +1 -1
- package/Marketplace/{chunk-KUKJOHU7.js → chunk-5PZK3DVD.js} +1 -1
- package/Marketplace/{chunk-FDTKJPLI.js → chunk-5XPG2TEC.js} +1 -1
- package/Marketplace/{chunk-D42XSNML.js → chunk-6SHNN2OQ.js} +1 -1
- package/Marketplace/{chunk-62RU3NV6.js → chunk-6ZGQ74WE.js} +1 -1
- package/Marketplace/{chunk-244VLQKF.js → chunk-6ZIP2KDD.js} +1 -1
- package/Marketplace/{chunk-PE33HSHT.js → chunk-75DIA5AS.js} +1 -1
- package/Marketplace/{chunk-VBIOPCEU.js → chunk-7DIXPGX5.js} +1 -1
- package/Marketplace/{chunk-LOUVI6SK.js → chunk-7XS6GJHF.js} +1 -1
- package/Marketplace/{chunk-PATNTVKG.js → chunk-A3DBC337.js} +1 -1
- package/Marketplace/{chunk-SDVLGBHM.js → chunk-ASZVIH36.js} +1 -1
- package/Marketplace/{chunk-CBRWXNNC.js → chunk-BEG4YNPB.js} +1 -1
- package/Marketplace/{chunk-B5LFTMZP.js → chunk-BHN4WKV2.js} +1 -1
- package/Marketplace/{chunk-AYZA4YXT.js → chunk-BIL3KGHW.js} +1 -1
- package/Marketplace/{chunk-DEOUMTGT.js → chunk-BS2AB4H5.js} +1 -1
- package/Marketplace/{chunk-23HWD4JE.js → chunk-CAHUJGUB.js} +1 -1
- package/Marketplace/{chunk-DRTTOWOD.js → chunk-CYFPDFQ5.js} +1 -1
- package/Marketplace/{chunk-UAAZUK72.js → chunk-DGTZWK7G.js} +1 -1
- package/Marketplace/{chunk-IZTJXF4A.js → chunk-DPV3QTI2.js} +1 -1
- package/Marketplace/{chunk-TSU25RH4.js → chunk-DTUV6C3E.js} +1 -1
- package/Marketplace/{chunk-VBGWPF63.js → chunk-DXXUX2HM.js} +1 -1
- package/Marketplace/{chunk-D3DNUDW5.js → chunk-EDDVRXQY.js} +1 -1
- package/Marketplace/{chunk-SCITEEZO.js → chunk-EMTE2N6D.js} +1 -1
- package/Marketplace/{chunk-L7G6YLH5.js → chunk-ERVD3AJ3.js} +1 -1
- package/Marketplace/{chunk-VX4XXFQ3.js → chunk-EYBMRBII.js} +1 -1
- package/Marketplace/{chunk-OKV4JO3H.js → chunk-F3FRYUZS.js} +1 -1
- package/Marketplace/{chunk-4PIQA6ZR.js → chunk-FMBMH35C.js} +1 -1
- package/Marketplace/{chunk-LPXYN5WE.js → chunk-FMEWOBGO.js} +1 -1
- package/Marketplace/{chunk-7PDIPKGZ.js → chunk-FWG35EGN.js} +1 -1
- package/Marketplace/{chunk-4ZN3KFH3.js → chunk-G3YBC4DU.js} +1 -1
- package/Marketplace/{chunk-Q7UN5YVX.js → chunk-GGVVGPU6.js} +1 -1
- package/Marketplace/{chunk-HT44Y6CW.js → chunk-GKZSGOME.js} +1 -1
- package/Marketplace/{chunk-I7YLXAUU.js → chunk-H4AOTZZN.js} +1 -1
- package/Marketplace/{chunk-LP7TJKZM.js → chunk-H4YR34LY.js} +1 -1
- package/Marketplace/chunk-HDI4BETR.js +2 -0
- package/Marketplace/{chunk-O4XVR5MY.js → chunk-HLQ25PK3.js} +1 -1
- package/Marketplace/{chunk-MBDMLATW.js → chunk-HVASCYZS.js} +1 -1
- package/Marketplace/{chunk-C35CVP56.js → chunk-I2HFXCVH.js} +1 -1
- package/Marketplace/{chunk-VZMV27MV.js → chunk-IG5VW7WU.js} +1 -1
- package/Marketplace/{chunk-YE6Y3WRI.js → chunk-IN55YNFU.js} +1 -1
- package/Marketplace/{chunk-T6CJ6PPU.js → chunk-INHYFWZ3.js} +1 -1
- package/Marketplace/{chunk-J24BC42H.js → chunk-ISGFMQ7A.js} +1 -1
- package/Marketplace/{chunk-R3JA6PGW.js → chunk-IVS4ACZ6.js} +1 -1
- package/Marketplace/{chunk-TWTCFWHB.js → chunk-J7QHIFQL.js} +1 -1
- package/Marketplace/{chunk-TIEUYSXG.js → chunk-JJCZ4WDS.js} +1 -1
- package/Marketplace/{chunk-I3MUX5O7.js → chunk-JRNLBK4B.js} +1 -1
- package/Marketplace/{chunk-QFPDAQEF.js → chunk-JY3L2FZE.js} +1 -1
- package/Marketplace/{chunk-LYB6WC66.js → chunk-JZY7PXZT.js} +1 -1
- package/Marketplace/{chunk-CAEGYKR3.js → chunk-KBBE5ZPF.js} +1 -1
- package/Marketplace/{chunk-VZN4OY5Z.js → chunk-KHSQSZSN.js} +1 -1
- package/Marketplace/{chunk-BGNYU4YD.js → chunk-KQKLXUZB.js} +1 -1
- package/Marketplace/{chunk-3YUDY74I.js → chunk-L6SSS2JS.js} +1 -1
- package/Marketplace/{chunk-AC5VHQLG.js → chunk-L76FTIQ4.js} +1 -1
- package/Marketplace/{chunk-6XR4ABWU.js → chunk-LKNAC4U7.js} +1 -1
- package/Marketplace/{chunk-K37MPW7V.js → chunk-LUSLXF3J.js} +1 -1
- package/Marketplace/{chunk-7RHXH7N6.js → chunk-LYPM34W2.js} +1 -1
- package/Marketplace/{chunk-CXGF2BT5.js → chunk-MVOOS53M.js} +1 -1
- package/Marketplace/{chunk-6KYFNR5Q.js → chunk-NPFR6BSP.js} +1 -1
- package/Marketplace/{chunk-RVBKC5OL.js → chunk-OFHBYAMX.js} +1 -1
- package/Marketplace/{chunk-GXX5DMWY.js → chunk-ORGDXT65.js} +1 -1
- package/Marketplace/{chunk-YDFYFUR3.js → chunk-OY4EG46X.js} +1 -1
- package/Marketplace/{chunk-VZICRLRA.js → chunk-P43VNIXV.js} +1 -1
- package/Marketplace/{chunk-YN2RMQNA.js → chunk-PBWPVDQX.js} +1 -1
- package/Marketplace/{chunk-JHO4CEDK.js → chunk-PNER6GWE.js} +1 -1
- package/Marketplace/{chunk-F2BWTKMG.js → chunk-QBPQQ2NI.js} +1 -1
- package/Marketplace/{chunk-GZ5PWFSY.js → chunk-QFN474OQ.js} +1 -1
- package/Marketplace/{chunk-2YQUTPTY.js → chunk-RIKJIWHE.js} +1 -1
- package/Marketplace/{chunk-EEQS7NYO.js → chunk-SCKCPJHS.js} +1 -1
- package/Marketplace/{chunk-QCYVPHJM.js → chunk-SSS2VUAO.js} +1 -1
- package/Marketplace/{chunk-PVCLADY2.js → chunk-STM4OKL7.js} +1 -1
- package/Marketplace/{chunk-WVBU7AQM.js → chunk-T7KMDF6W.js} +1 -1
- package/Marketplace/{chunk-5QZ2S4KG.js → chunk-UEBFE2SW.js} +1 -1
- package/Marketplace/{chunk-XDJI2WX5.js → chunk-UUVNKP6B.js} +1 -1
- package/Marketplace/{chunk-LM6HVLKP.js → chunk-VBG2ARTP.js} +1 -1
- package/Marketplace/chunk-WAQWG4MF.js +2 -0
- package/Marketplace/{chunk-LLQUSFIS.js → chunk-WFV4FQKZ.js} +1 -1
- package/Marketplace/{chunk-SS25UDWI.js → chunk-WIW4EZLV.js} +1 -1
- package/Marketplace/{chunk-S2WR2TK3.js → chunk-WKMGANYF.js} +1 -1
- package/Marketplace/{chunk-SIXBTRFW.js → chunk-XJB4OKPQ.js} +1 -1
- package/Marketplace/{chunk-NDOVDHNA.js → chunk-Y7VFQ376.js} +1 -1
- package/Marketplace/{chunk-JNJAWXGM.js → chunk-YKM4TJGG.js} +1 -1
- package/Marketplace/{chunk-RTT2DSFI.js → chunk-YTMT3Z6F.js} +1 -1
- package/Marketplace/{chunk-TB75CUCY.js → chunk-ZZWSK4OS.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-6DORO3HC.js → main-7KPPPX7P.js} +2 -2
- package/package.json +1 -1
- package/Marketplace/chunk-FWOQR2PC.js +0 -2
- package/Marketplace/chunk-URNP457I.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as be}from"./chunk-
|
|
2
|
-
`],encapsulation:2,changeDetection:0})}return e})(),Ce=(()=>{class e{_ngZone=r(L);_elementRef=r(N);_ariaDescriber=r(ie);_renderer=r(V);_animationsDisabled=ae();_idGenerator=r(te);get color(){return this._color}set color(t){this._setColor(t),this._color=t}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(t){this._updateRenderedContent(t)}_content;get description(){return this._description}set description(t){this._updateDescription(t)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=r(Y);_document=r(B);constructor(){let t=r(W);t.load(we),t.load(X)}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 t=this._renderer.createElement("span"),i="mat-badge-active";return t.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),t.setAttribute("aria-hidden","true"),t.classList.add(ve),this._animationsDisabled&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(i)})}):t.classList.add(i),t}_updateRenderedContent(t){let i=`${t??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):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(t){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),t&&i.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${ve}`);for(let i of Array.from(t))i!==this._badgeElement&&i.remove()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=F({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,n){i&2&&M("mat-badge-overlap",n.overlap)("mat-badge-above",n.isAbove())("mat-badge-below",!n.isAbove())("mat-badge-before",!n.isAfter())("mat-badge-after",n.isAfter())("mat-badge-small",n.size==="small")("mat-badge-medium",n.size==="medium")("mat-badge-large",n.size==="large")("mat-badge-hidden",n.hidden||!n.content)("mat-badge-disabled",n.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",w],disabled:[2,"matBadgeDisabled","disabled",w],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",w]}})}return e})(),xe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=b({type:e});static \u0275inj=f({imports:[ee,ne]})}return e})();function Oe(e,d){if(e&1&&(o(0,"p",21),p(1),l()),e&2){let t=c(3).$implicit;s(),C(" ",t.Title," ")}}function ke(e,d){if(e&1&&(o(0,"p"),p(1),l()),e&2){let t=c(3).$implicit;s(),y(t.Title)}}function Se(e,d){if(e&1&&(o(0,"a",18),h(1,"i"),_(2,Oe,2,1,"p",21)(3,ke,2,1,"p"),l()),e&2){let t=c(2).$implicit;u("href",t.Url,U),s(),E(t.Icon),s(),v(t.Badge?2:3)}}function ze(e,d){if(e&1&&S(0,Se,4,4,"a",20),e&2){let t=c().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Ee(e,d){if(e&1&&(o(0,"p",21),p(1),l()),e&2){let t=c(4).$implicit;s(),C(" ",t.Title," ")}}function Te(e,d){if(e&1&&(o(0,"p"),p(1),l()),e&2){let t=c(4).$implicit;s(),y(t.Title)}}function De(e,d){if(e&1&&(_(0,Ee,2,1,"p",21),T(1,"async"),$(2,Te,2,1,"p")),e&2){let t=c(4);v(D(1,1,t.notifications$)!=0?0:2)}}function Ae(e,d){if(e&1&&(o(0,"p"),p(1),l()),e&2){let t=c(3).$implicit;s(),y(t.Title)}}function Ie(e,d){if(e&1&&(o(0,"a",19),h(1,"i"),_(2,De,3,3)(3,Ae,2,1,"p"),l()),e&2){let t=c(2).$implicit,i=c();u("matTooltip",i.isCollapseSidebar?t.Title:"")("routerLink",t.Url),s(),E(t.Icon),s(),v(t.Badge?2:3)}}function Re(e,d){if(e&1&&S(0,Ie,4,5,"a",22),e&2){let t=c().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Be(e,d){if(e&1&&(o(0,"li",16),_(1,ze,1,1,"a",18)(2,Re,1,1,"a",19),l()),e&2){let t=d.$implicit;s(),v(t.ExternalLink?1:2)}}var Me=(()=>{class e{constructor(){this.toggleSidebarService=r(ge),this.notificationService=r(he),this.decodeTokenService=r(q),this.authService=r(pe),this.Menu={};let t=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=t.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new P().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(R(t=>t.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(t){if(t){let i,n=t.split(" ");return n.length==1?i=n[0].substring(0,2):i=n.shift().charAt(0)+n.pop().charAt(0),i}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,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(i,n){i&1&&(o(0,"div",0),T(1,"async"),o(2,"div",1)(3,"button",2),z("click",function(){return n.onCallapseSidebar()}),h(4,"i",3),l(),o(5,"div",4)(6,"div",5)(7,"a",6),p(8),l(),o(9,"div",7)(10,"div",8),p(11),l(),h(12,"div",9),o(13,"a",10),h(14,"i",11),p(15,"\xA0 "),o(16,"span"),p(17,"My Profile"),l()(),o(18,"a",12),z("click",function(){return n.onLogout()}),h(19,"i",13),p(20,"\xA0 "),o(21,"span"),p(22," Log Out"),l()()()()(),o(23,"div",14)(24,"ul",15),G(25,Be,3,1,"li",16,j),l()()(),o(27,"div",17),h(28,"router-outlet"),l()()),i&2&&(M("nav-open",D(1,6,n.toggleState$)),s(2),u("ngClass",n.isCollapseSidebar?"collapses":""),s(2),u("ngClass",n.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),s(4),C(" ",n.storeName," "),s(3),C(" ",n.token==null?null:n.token.LID," "),s(14),H(n.Menu))},dependencies:[J,oe,se,le,ue,Ce,me,Z],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}}"]})}}return e})();var g=(e,d)=>k(null,null,function*(){let t=r(de),i=r(re),n=e.data?.roles||[],O=e.data?.redirectUrl||"/";return n.length===0||(yield Le(t,n))?!0:(i.navigate([O]),!1)});function Le(e,d){return k(this,null,function*(){let t=d.map(n=>e.hasPermission(n));return(yield Promise.all(t)).some(n=>n)})}var Ne=[{path:"",component:Me,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-DRTTOWOD.js").then(e=>e.routes),canActivate:[m],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-5YFF6ZKM.js").then(e=>e.routes),canActivate:[m,g,be],data:{title:"Dashboard",roles:[a.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-VBGWPF63.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Products",roles:[a.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-YDFYFUR3.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Inventory",roles:[a.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-GXX5DMWY.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Price",roles:[a.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-MBDMLATW.js").then(e=>e.routes),canActivate:[m],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-CBRWXNNC.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Report",roles:[a.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-VZN4OY5Z.js").then(e=>e.LogisticComponent)},canActivate:[m,g],data:{title:"Logistic",roles:[a.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-TSU25RH4.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Marketplace",roles:[a.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-C35CVP56.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Orders",roles:[a.DevView]}},{path:"users",loadChildren:()=>import("./chunk-3YUDY74I.js").then(e=>e.userRoutes),canActivate:[m,g],data:{title:"Users",roles:[a.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-LLQUSFIS.js").then(e=>e.routes),canActivate:[m],data:{title:"Json API"}}]}],ye=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=f({imports:[A.forChild(Ne),A]})}}return e})();var At=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=f({providers:[K],imports:[Q,ye,fe,xe,ce.forChild(),_e]})}}return e})();export{At as MenuModule};
|
|
1
|
+
import{a as be}from"./chunk-FMBMH35C.js";import"./chunk-4VNQYYVV.js";import{a as m}from"./chunk-GKZSGOME.js";import{c as _e}from"./chunk-K6KO37S2.js";import"./chunk-DBO3A6IW.js";import{b as he}from"./chunk-BHN4WKV2.js";import"./chunk-ACIMXBIC.js";import{a as ge}from"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import{a as fe}from"./chunk-MWUZF6ZW.js";import"./chunk-DGB7L5EQ.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2PONPJQD.js";import{b as ue}from"./chunk-BQCLUDBO.js";import{B as ie,D as ne,H as ae,l as W,m as X,q as Y,u as ee,v as te}from"./chunk-TM7PL3CC.js";import{a}from"./chunk-ZSUWHVKX.js";import{b as q,h as pe}from"./chunk-EYBMRBII.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import"./chunk-5XPG2TEC.js";import{a as de,b as me,c as ce}from"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import"./chunk-M5YUVUTR.js";import{c as oe,d as re,e as se,f as le,g as A}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as K,F as Q,r as J,z as Z}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Da as L,Eb as x,Fb as b,Gb as F,Hd as w,Kb as S,Lc as M,Nc as E,Oc as p,Pa as N,Pc as y,Qc as C,bc as _,cc as $,dc as v,fc as j,gc as G,hc as H,ic as u,ja as f,jc as o,kb as U,kc as l,kd as T,lc as h,ld as D,mb as s,na as r,t as R,wb as V,xc as z,za as B,zc as c}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{i as k}from"./chunk-66YHNWRR.js";var P=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[a.DashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[a.ProductView]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[a.InventoryView]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[a.PriceView]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/order",Roles:[a.OrderView]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[a.ChannelView]},{Icon:"fa-solid fa-user",Title:"Users",Url:"/menu/users",Roles:[a.UserView]},{Icon:"fas fa-clipboard-list",Title:"Sync Logs",Url:"/menu/sync-log",Roles:[a.Report]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[a.LogisticView]},{Icon:"fas fa-file-alt",Title:"Developer",Url:"/menu/log",Roles:[a.DevView]},{Icon:"fa-solid fa-file-brackets-curly",Title:"JSON Api",Url:"/menu/json-api",Roles:[a.JsonApiView]}]}get getMenu(){return this.menus}};var ve="mat-badge-content",we=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275cmp=x({type:e,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,n){},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})(),Ce=(()=>{class e{_ngZone=r(L);_elementRef=r(N);_ariaDescriber=r(ie);_renderer=r(V);_animationsDisabled=ae();_idGenerator=r(te);get color(){return this._color}set color(t){this._setColor(t),this._color=t}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(t){this._updateRenderedContent(t)}_content;get description(){return this._description}set description(t){this._updateDescription(t)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=r(Y);_document=r(B);constructor(){let t=r(W);t.load(we),t.load(X)}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 t=this._renderer.createElement("span"),i="mat-badge-active";return t.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),t.setAttribute("aria-hidden","true"),t.classList.add(ve),this._animationsDisabled&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(i)})}):t.classList.add(i),t}_updateRenderedContent(t){let i=`${t??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):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(t){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),t&&i.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${ve}`);for(let i of Array.from(t))i!==this._badgeElement&&i.remove()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=F({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,n){i&2&&M("mat-badge-overlap",n.overlap)("mat-badge-above",n.isAbove())("mat-badge-below",!n.isAbove())("mat-badge-before",!n.isAfter())("mat-badge-after",n.isAfter())("mat-badge-small",n.size==="small")("mat-badge-medium",n.size==="medium")("mat-badge-large",n.size==="large")("mat-badge-hidden",n.hidden||!n.content)("mat-badge-disabled",n.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",w],disabled:[2,"matBadgeDisabled","disabled",w],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",w]}})}return e})(),xe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=b({type:e});static \u0275inj=f({imports:[ee,ne]})}return e})();function Oe(e,d){if(e&1&&(o(0,"p",21),p(1),l()),e&2){let t=c(3).$implicit;s(),C(" ",t.Title," ")}}function ke(e,d){if(e&1&&(o(0,"p"),p(1),l()),e&2){let t=c(3).$implicit;s(),y(t.Title)}}function Se(e,d){if(e&1&&(o(0,"a",18),h(1,"i"),_(2,Oe,2,1,"p",21)(3,ke,2,1,"p"),l()),e&2){let t=c(2).$implicit;u("href",t.Url,U),s(),E(t.Icon),s(),v(t.Badge?2:3)}}function ze(e,d){if(e&1&&S(0,Se,4,4,"a",20),e&2){let t=c().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Ee(e,d){if(e&1&&(o(0,"p",21),p(1),l()),e&2){let t=c(4).$implicit;s(),C(" ",t.Title," ")}}function Te(e,d){if(e&1&&(o(0,"p"),p(1),l()),e&2){let t=c(4).$implicit;s(),y(t.Title)}}function De(e,d){if(e&1&&(_(0,Ee,2,1,"p",21),T(1,"async"),$(2,Te,2,1,"p")),e&2){let t=c(4);v(D(1,1,t.notifications$)!=0?0:2)}}function Ae(e,d){if(e&1&&(o(0,"p"),p(1),l()),e&2){let t=c(3).$implicit;s(),y(t.Title)}}function Ie(e,d){if(e&1&&(o(0,"a",19),h(1,"i"),_(2,De,3,3)(3,Ae,2,1,"p"),l()),e&2){let t=c(2).$implicit,i=c();u("matTooltip",i.isCollapseSidebar?t.Title:"")("routerLink",t.Url),s(),E(t.Icon),s(),v(t.Badge?2:3)}}function Re(e,d){if(e&1&&S(0,Ie,4,5,"a",22),e&2){let t=c().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Be(e,d){if(e&1&&(o(0,"li",16),_(1,ze,1,1,"a",18)(2,Re,1,1,"a",19),l()),e&2){let t=d.$implicit;s(),v(t.ExternalLink?1:2)}}var Me=(()=>{class e{constructor(){this.toggleSidebarService=r(ge),this.notificationService=r(he),this.decodeTokenService=r(q),this.authService=r(pe),this.Menu={};let t=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=t.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new P().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(R(t=>t.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(t){if(t){let i,n=t.split(" ");return n.length==1?i=n[0].substring(0,2):i=n.shift().charAt(0)+n.pop().charAt(0),i}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,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(i,n){i&1&&(o(0,"div",0),T(1,"async"),o(2,"div",1)(3,"button",2),z("click",function(){return n.onCallapseSidebar()}),h(4,"i",3),l(),o(5,"div",4)(6,"div",5)(7,"a",6),p(8),l(),o(9,"div",7)(10,"div",8),p(11),l(),h(12,"div",9),o(13,"a",10),h(14,"i",11),p(15,"\xA0 "),o(16,"span"),p(17,"My Profile"),l()(),o(18,"a",12),z("click",function(){return n.onLogout()}),h(19,"i",13),p(20,"\xA0 "),o(21,"span"),p(22," Log Out"),l()()()()(),o(23,"div",14)(24,"ul",15),G(25,Be,3,1,"li",16,j),l()()(),o(27,"div",17),h(28,"router-outlet"),l()()),i&2&&(M("nav-open",D(1,6,n.toggleState$)),s(2),u("ngClass",n.isCollapseSidebar?"collapses":""),s(2),u("ngClass",n.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),s(4),C(" ",n.storeName," "),s(3),C(" ",n.token==null?null:n.token.LID," "),s(14),H(n.Menu))},dependencies:[J,oe,se,le,ue,Ce,me,Z],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}}"]})}}return e})();var g=(e,d)=>k(null,null,function*(){let t=r(de),i=r(re),n=e.data?.roles||[],O=e.data?.redirectUrl||"/";return n.length===0||(yield Le(t,n))?!0:(i.navigate([O]),!1)});function Le(e,d){return k(this,null,function*(){let t=d.map(n=>e.hasPermission(n));return(yield Promise.all(t)).some(n=>n)})}var Ne=[{path:"",component:Me,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-CYFPDFQ5.js").then(e=>e.routes),canActivate:[m],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-5YFF6ZKM.js").then(e=>e.routes),canActivate:[m,g,be],data:{title:"Dashboard",roles:[a.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-DXXUX2HM.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Products",roles:[a.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-OY4EG46X.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Inventory",roles:[a.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-ORGDXT65.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Price",roles:[a.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-HVASCYZS.js").then(e=>e.routes),canActivate:[m],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-BEG4YNPB.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Report",roles:[a.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-KHSQSZSN.js").then(e=>e.LogisticComponent)},canActivate:[m,g],data:{title:"Logistic",roles:[a.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-DTUV6C3E.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Marketplace",roles:[a.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-I2HFXCVH.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Orders",roles:[a.DevView]}},{path:"users",loadChildren:()=>import("./chunk-L6SSS2JS.js").then(e=>e.userRoutes),canActivate:[m,g],data:{title:"Users",roles:[a.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-WFV4FQKZ.js").then(e=>e.routes),canActivate:[m],data:{title:"Json API"}}]}],ye=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=f({imports:[A.forChild(Ne),A]})}}return e})();var At=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=f({providers:[K],imports:[Q,ye,fe,xe,ce.forChild(),_e]})}}return e})();export{At as MenuModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j}from"./chunk-
|
|
1
|
+
import{a as j}from"./chunk-SSS2VUAO.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as O}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-EYBMRBII.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as T}from"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as R,c as L,h as N,m as U,p as K}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{e as D}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{C as B,z as I}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as P,Ga as g,Oc as l,Pc as A,V as b,Vc as V,Wc as E,Xc as x,bc as _,dc as f,ic as s,jc as i,kc as t,kd as S,lc as k,ld as M,mb as d,na as w,sc as v,ua as c,va as p,xc as m,zc as h}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function F(n,y){if(n&1){let e=v();i(0,"input",30),m("ngModelChange",function(o){c(e);let r=h();return p(r.sku.set(o))}),t()}if(n&2){let e=h();s("ngModel",e.sku())}}function H(n,y){if(n&1){let e=v();i(0,"input",31),m("ngModelChange",function(o){c(e);let r=h();return p(r.itemId.set(o))}),t()}if(n&2){let e=h();s("ngModel",e.itemId())}}function J(n,y){if(n&1&&(i(0,"pre",28),l(1),S(2,"json"),t()),n&2){h();let e=x(35);d(),A(M(2,1,e))}}function $(n,y){n&1&&(i(0,"p",29),l(1," Your data will be shown here once it's available "),t())}var re=(()=>{class n{constructor(){this.httpService=w(D),this.selectedChannel=g(null),this.sku=g(null),this.itemId=g(null),this.searchBy=g("sku")}initProductLog(){let e={ChannelID:this.selectedChannel()};this.searchBy()==="sku"?e.SKU=this.sku():e.ItemID=this.itemId(),this.productLog$=this.httpService.post(T.GetProductApiLog,e).pipe(b(1))}copyToClipboard(e){if(!e)return;let a=typeof e=="string"?e:JSON.stringify(e,null,2);navigator.clipboard.writeText(a),alert("Copied to clipboard!")}static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(a,o){if(a&1){let r=v();i(0,"mainpanel",0)(1,"actions")(2,"button",1),m("click",function(){return c(r),p(o.initProductLog())}),k(3,"i",2),l(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),l(12,"Channel"),t(),i(13,"p",8),l(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),m("ngModelChange",function(u){return c(r),p(o.selectedChannel.set(u))}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),l(20,"Product Code / SKU"),t(),i(21,"p",8),l(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(27,"label",15),l(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(31,"label",17),l(32,"Search by ItemID"),t()()(),_(33,F,1,1,"input",18),_(34,H,1,1,"input",19),t()()()(),V(35),S(36,"async"),i(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),l(42,"Response"),t(),i(43,"button",24),m("click",function(){c(r);let u=x(35);return p(o.copyToClipboard(u))}),l(44," Copy "),t()(),i(45,"div",25)(46,"div",26)(47,"div",27),_(48,J,3,3,"pre",28)(49,$,2,0,"p",29),t()()()()()()()()()}if(a&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),s("ngModel",o.selectedChannel()),d(10),s("ngModel",o.searchBy())("value","sku"),d(4),s("ngModel",o.searchBy())("value","itemid"),d(3),f(o.searchBy()==="sku"?33:-1),d(),f(o.searchBy()==="itemid"?34:-1),d();let r=E(M(36,11,o.productLog$));d(8),s("disabled",!r),d(5),f(r?48:49)}},dependencies:[R,L,K,N,U,O,j,I,B],encapsulation:2,changeDetection:0})}}return n})();export{re as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-BIL3KGHW.js").then(t=>t.LoginComponent)},data:{title:"Dealpos x Marketplace"}},{path:"shopee",loadComponent(){return import("./chunk-IR2SK4HW.js").then(t=>t.ShopeeAuthorizedComponent)},data:{title:"Success"}},{path:"tiktok",loadComponent(){return import("./chunk-XYZ53LBF.js").then(t=>t.TiktokComponent)},data:{title:"Success"}},{path:"lazada",loadComponent(){return import("./chunk-I7CNRYKA.js").then(t=>t.LazadaComponent)},data:{title:"Success"}},{path:"shopify",loadComponent(){return import("./chunk-VRASOOOY.js").then(t=>t.ShopifyAuthorizedComponent)},data:{title:"Success"}}];export{o as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-5CH6HZVM.js";import{a as l}from"./chunk-BKR7YPEW.js";import{a as d}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-5CH6HZVM.js";import{a as l}from"./chunk-BKR7YPEW.js";import{a as d}from"./chunk-5XPG2TEC.js";import{c as u}from"./chunk-NNVT5X6O.js";import{e as D}from"./chunk-M5YUVUTR.js";import{B as m}from"./chunk-MLQKT6FW.js";import{ia as p,na as i,t as c}from"./chunk-KCXC4XYC.js";var N=(()=>{class o{constructor(){this.httpService=i(D),this.datePipe=i(m)}getNotificationDetail(t){return this.httpService.post(d.GetJobScanDetail,{ID:t}).pipe(c(r=>{let e=r.Data,a=r.detail;return e.DurationInSecond=e.Duration?e.Duration/1e3:0,e.ParsedStatus=e.StatusProduct?JSON.parse(e.StatusProduct):[],e.ParsedPerfLog=e.PerfLog?e.PerfLog.startsWith("[")?JSON.parse(e.PerfLog):[]:[],e.ProcessLabel=this.generateLabel(e),e.ProcessDescription=this.generateDescription(e),e.EndTime=this.createEndTime(e),e.Channel=u.getChannelName(e.TypeID),e.MillisecondToDisplay=this.convertMilisecondsToReadableFormat(e.Duration||0),e.ParsedException=e.Exception,e.detail=r.detail,e}))}convertMilisecondsToReadableFormat(t){let r=Math.floor(t/1e3),e=Math.floor(r/60),a=r%60,n="";return e!=0&&(n=n.concat(`${e} minutes `)),a!=0&&(n=n.concat(`${a} seconds`)),n}getNotificationList(t){return this.httpService.post(d.GetJobScanList,t).pipe(c(r=>{let e=r.Data;return e=e.map(a=>(a.Img=u.getChannelLogoByTypeId(a.TypeID),a.DurationInSecond=a.Duration?a.Duration/1e3:0,a.ProcessLabel="Asynchronous Scan",a.ProcessDescription=this.generateDescription(a),a.ProductTypeDesc=this.generateProductTypeDesc(a),a.ScanTypeDesc=this.generateLabel(a),a)),{Data:e,Count:r.Count}}))}generateProductTypeDesc(t){let r="All";switch(t.ScanTypeID){case l.Active:r="Active";break;case l.Sellable:r="Sellable";break}return r}generateLabel(t){let r=null;switch(t.TimeRange!==null?t.TimeRange:t.UpdatedProduct){case s.Updated:r="Scan Updated Products";break;case s.Custom:let a=new Date(t.Update_time_from),n=new Date(t.Update_time_to),h=this.datePipe.transform(a,"dd/MM/yyyy HH:mm"),g=this.datePipe.transform(n,"dd/MM/yyyy HH:mm");r=`Scan Custom Range (${h} - ${g})`;break;case s.All:r="Scan All Products";break}return`${r}`}generateDescription(t){return`${t.OriginGetCount} found in ${t.ChannelName} ( ${t.SkuFoundCount} Sold In Channel + ${t.SkuNotFoundCount} Not In POS)`}createMessageCopyText(t){let r=[];return t.ParsedStatus&&t.ParsedStatus.forEach(e=>{r.push({[e.Key]:e.Value})}),r=[...r,{OriginalGetCount:t.OriginGetCount},{SkuFoundCount:t.SkuFoundCount},{SkuNotFoundCount:t.SkuNotFoundCount}],JSON.stringify(r)}createEndTime(t){let r=new Date(t.Created);return new Date(r.getTime()+(t.Duration||0))}static{this.\u0275fac=function(r){return new(r||o)}}static{this.\u0275prov=p({token:o,factory:o.\u0275fac})}}return o})();var y=(function(o){return o[o.InProgress=0]="InProgress",o[o.Completed=1]="Completed",o[o.Failed=2]="Failed",o})(y||{});export{N as a,y as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ge}from"./chunk-JSFPYH26.js";import{a as I}from"./chunk-WVBU7AQM.js";import{b as Ae,c as ne}from"./chunk-BDUUVK5L.js";import{a as Ve,b as Fe}from"./chunk-L2ENNT5V.js";import{a as Ie}from"./chunk-RVHJIVQ5.js";import{b as Ne}from"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{d as Ee,e as Le}from"./chunk-TRTDBHQI.js";import{b as ke}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as ee,b as $,c as Pe,g as Oe,i as z,j as te}from"./chunk-M65GNQVQ.js";import{a as Te}from"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import{b as De}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{a as J}from"./chunk-ZSUWHVKX.js";import{a as _e}from"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import{a as ye,b as be,c as Se}from"./chunk-I4MUFYEG.js";import{c as ve}from"./chunk-NNVT5X6O.js";import{A as X,b as Ue,h as K,m as Q}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import{b as Z}from"./chunk-M5YUVUTR.js";import{e as we,g as Me}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as fe,F as xe,t as he,u as Ce,z as Y}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as H,E as pe,Eb as T,Ga as x,Jb as de,Kb as P,Lc as ue,Mc as oe,Oc as p,Pc as E,Qc as L,Sc as y,Tc as b,Uc as S,V,Vc as R,Wc as B,Xc as h,aa as ie,ad as re,bc as w,bd as ae,dc as M,ec as F,gc as A,hc as G,ic as m,jc as r,kb as q,kc as a,kd as N,lc as U,ld as W,mb as s,md as ge,na as f,o as me,pc as O,qc as k,sc as v,sd as D,t as j,ua as d,va as u,xc as C,zc as l}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as le,b as ce}from"./chunk-66YHNWRR.js";var se=(function(n){return n.ERROR="https://resc.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",n.UNAUTHORIZED="https://resc.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",n.EMPTY_LIST="https://resc.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",n.REMOVE="https://resc.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",n})(se||{});var Be=()=>({display:"d-flex"});function qe(n,c){if(n&1&&(r(0,"div",6),U(1,"img",9),r(2,"p",10),p(3," All users already migrated. "),a()()),n&2){let e=l();s(),m("src",e.emptyStateIcon,q)}}function He(n,c){if(n&1){let e=v();r(0,"div",14)(1,"p-checkBox",15),S("ngModelChange",function(t){let o=d(e).$implicit;return b(o.selected,t)||(o.selected=t),u(t)}),C("ngModelChange",function(){d(e);let t=l(2),o=h(0);return u(t.onUserCheckChange(o))}),a(),r(2,"label",16),p(3),a()()}if(n&2){let e=c.$implicit;s(),oe(re(7,Be)),m("binary",!0)("id",e.ID),y("ngModel",e.selected),s(),m("for",e.ID),s(),L(" ",e.Name," ")}}function Ye(n,c){if(n&1){let e=v();r(0,"div",11)(1,"p-checkBox",12),S("ngModelChange",function(t){d(e);let o=l();return b(o.isCheckAll,t)||(o.isCheckAll=t),u(t)}),C("ngModelChange",function(t){d(e);let o=l(),g=h(0);return u(o.onCheckAllChange(t,g))}),a(),r(2,"label",13),p(3," Check All "),a()(),A(4,He,4,8,"div",14,F)}if(n&2){let e=l(),i=h(0);s(),oe(re(4,Be)),m("binary",!0),y("ngModel",e.isCheckAll),s(3),G(i)}}var We=(()=>{class n extends Ie{constructor(){super(),this.dialogRef=f(ee),this.data=f($),this.userService=f(I),this.dialogData=f($),this.toastr=f(Z),this.userGroups=D(()=>this.dialogData.userGroups||[]),this.availableUsers=D(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(i=>e.set(i.ID,i)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(j(e=>e.Data),j(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),j(e=>e.map(t=>(t.selected=!0,t))),V(1)),this.isCheckAll=x(!0),this.selectedGroup=x(null),this.emptyStateIcon=se.EMPTY_LIST,this.config=new z,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let i=e.every(t=>t.selected);this.isCheckAll.set(i)}onCheckAllChange(e,i){this.isCheckAll.set(e),i.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let i=e.filter(o=>o.selected);if(i.length===0){this.toastr.error("Please select at least one user","Error");return}if(ve.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:i.map(o=>o.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-migrate-dialog"]],features:[H([I]),de],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(i,t){if(i&1){let o=v();R(0),N(1,"async"),r(2,"modal-material",0),C("onClose",function(){return d(o),u(t.onClose())})("onCancel",function(){return d(o),u(t.onClose())})("onOk",function(){d(o);let _=h(0);return u(t.onSubmit(_))}),r(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),p(7,"Users from POS"),a(),r(8,"div",5),w(9,qe,4,1,"div",6)(10,Ye,6,5),a()(),r(11,"div",7)(12,"h5",4),p(13,"Assign Group"),a(),r(14,"p-select",8),C("click",function(){return d(o),u(t.onClickSelect())}),S("ngModelChange",function(_){return d(o),b(t.selectedGroup,_)||(t.selectedGroup=_),u(_)}),a()()()()()}if(i&2){let o=B(W(1,5,t.migrateLoader$));s(2),m("config",t.config),s(7),M((o==null?null:o.length)===0?9:10),s(5),m("options",t.userGroups())("filter",!0),y("ngModel",t.selectedGroup)}},dependencies:[te,X,K,Q,Ve,Ne,Y],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"],changeDetection:0})}}return n})();function Ze(n,c){if(n&1&&(r(0,"tr",6)(1,"td",7)(2,"div",8),U(3,"img",9),r(4,"div",10),p(5),a()()()()),n&2){let e=c.$implicit,i=l();s(3),m("src",i.getChannelLogo(e),q),s(2),E((e==null?null:e.Name)||"-")}}function Je(n,c){n&1&&(r(0,"tr")(1,"td",11),p(2,"No channels found"),a()())}var $e=(()=>{class n{constructor(){this.data=f($),this.dialogRef=f(ee),this.modalConfig=x(new z),this.channels=x([]),this.filterText=x(""),this.filteredChannels=D(()=>{let e=this.filterText().toLowerCase().trim();return e?this.channels().filter(i=>(i?.Name||"").toString().toLowerCase().indexOf(e)!==-1):this.channels()}),this.channels.set(this.data?.channels||[])}ngOnInit(){let e=new z;e.title=`All Channels List - [${this.data?.userName||"User"}]`,e.bodyScrollable=!0,e.hideFooter=!0,e.customWidth="80vw",e.noPadding=!0,this.modalConfig.set(e),this.channels.set(this.data?.channels||[])}close(){this.dialogRef.close()}getChannelLogo(e){return e?.Logo||"/assets/images/default-channel-logo.png"}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-user-channels-dialog"]],decls:7,vars:3,consts:[[3,"onClose","onCancel","config"],["content",""],[1,"channels-table-wrap"],[1,"table","mb-0","w-100"],["class","channel-row",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"channel-row"],[1,"channel-col"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo","me-2",3,"src"],[1,"channel-name"],[1,"text-center","py-4"]],template:function(i,t){i&1&&(r(0,"modal-material",0),C("onClose",function(){return t.close()})("onCancel",function(){return t.close()}),r(1,"div",1)(2,"div",2)(3,"table",3)(4,"tbody"),P(5,Ze,6,2,"tr",4)(6,Je,3,0,"tr",5),a()()()()()),i&2&&(m("config",t.modalConfig()),s(5),m("ngForOf",t.filteredChannels()),s(),m("ngIf",t.filteredChannels().length===0))},dependencies:[xe,he,Ce,Oe,te,ne],styles:["[_nghost-%COMP%] .mat-dialog-container{max-width:95vw!important;width:auto!important}[_nghost-%COMP%] .modal-material{width:90vw!important;max-width:600px!important;min-width:500px!important}[_nghost-%COMP%] .modal-content{max-width:none!important;width:100%!important}@media(max-width:1200px){[_nghost-%COMP%] .modal-material{width:95vw!important;min-width:500px!important}}@media(max-width:768px){[_nghost-%COMP%] .modal-material{width:98vw!important;min-width:320px!important}}.channels-table-wrap[_ngcontent-%COMP%]{padding:0;min-height:300px;width:100%;overflow-x:auto}.channels-thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:transparent;color:#6c757d;font-weight:600;padding:12px 20px}.channel-logo[_ngcontent-%COMP%]{width:22px;height:22px;object-fit:contain}.channel-name[_ngcontent-%COMP%]{max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.channel-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 20px}.channels-table-wrap[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{margin-bottom:0;width:100%;min-width:500px;table-layout:auto}"]})}}return n})();var ze=n=>({ID:n});function Ke(n,c){if(n&1){let e=v();r(0,"button",15),C("click",function(){d(e);let t=l(2),o=h(0);return u(t.onDeleteUser(o==null?null:o.Filter))}),U(1,"i",16),p(2),a()}if(n&2){let e,i=l(2);s(2),L(" Delete (",(e=i.selectedUsers())==null?null:e.length,") ")}}function Qe(n,c){if(n&1&&(O(0),w(1,Ke,3,1,"button",14),k()),n&2){let e,i=l();s(),M(((e=i.selectedUsers())==null?null:e.length)>0?1:-1)}}function Xe(n,c){if(n&1){let e=v();O(0),r(1,"button",17),C("click",function(){d(e);let t=l(),o=h(0),g=h(2);return u(t.onMigrateUser(o==null||o.Options==null?null:o.Options.Groups,g==null?null:g.Data))}),p(2," Migrate "),a(),k()}}function et(n,c){n&1&&(O(0),r(1,"a",18),p(2," Invite "),a(),k())}function tt(n,c){if(n&1){let e=v();O(0),r(1,"th",19)(2,"div",20)(3,"input",21),C("change",function(t){d(e);let o=l(),g=h(2);return u(o.onCheckAllUser(t.target.checked,g==null?null:g.Data))}),a()()(),k()}}function nt(n,c){if(n&1){let e=v();r(0,"div",20)(1,"input",25),S("ngModelChange",function(t){d(e);let o=l(2).$implicit;return b(o.checked,t)||(o.checked=t),u(t)}),C("ngModelChange",function(){d(e);let t=l(3),o=h(2);return u(t.onSelectUser(o==null?null:o.Data))}),a()()}if(n&2){let e=l(2).$implicit;s(),y("ngModel",e.checked)}}function it(n,c){if(n&1&&(O(0),r(1,"td"),w(2,nt,2,1,"div",20),a(),k()),n&2){let e,i=l().$implicit,t=l();s(2),M(i.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function ot(n,c){if(n&1&&(r(0,"a",22),p(1),a()),n&2){let e=l().$implicit,i=l();m("queryParams",ae(3,ze,e.UserID))("matTooltip",i.isGuid(e.Name)?"This user is either Suspended or Deleted in the DealPOS. You can also remove it from Omnichannel":""),s(),L(" ",e.Name," ")}}function rt(n,c){if(n&1&&(r(0,"span"),p(1),a()),n&2){let e=l().$implicit;s(),E(e.Name)}}function at(n,c){if(n&1&&(r(0,"a",23),p(1),a()),n&2){let e=l().$implicit;m("queryParams",ae(2,ze,e.GroupID)),s(),L(" ",e.GroupName," ")}}function st(n,c){if(n&1&&(r(0,"span"),p(1),a()),n&2){let e=l().$implicit;s(),E(e.GroupName)}}function lt(n,c){if(n&1&&U(0,"p-chip",26),n&2){let e=c.$implicit;m("label",e.Name)("image",e.Logo)("alt",e.Name)}}function ct(n,c){if(n&1){let e=v();r(0,"p-chip",28),C("click",function(){d(e);let t=l(2).$implicit,o=l();return u(o.openUserChannelsDialog(t.Channels,t.Name))}),a()}if(n&2){let e=l(2).$implicit;m("label","+ "+(e.Channels.length-5)+" channels")}}function mt(n,c){if(n&1&&(A(0,lt,1,3,"p-chip",26,F),w(2,ct,1,1,"p-chip",27)),n&2){let e=l().$implicit;G(e.Channels.slice(0,5)),s(2),M(e.Channels.length>5?2:-1)}}function pt(n,c){n&1&&(r(0,"span"),p(1,"All Channels"),a())}function dt(n,c){if(n&1&&(r(0,"tr"),P(1,it,3,1,"ng-container",3),r(2,"td"),w(3,ot,2,5,"a",22)(4,rt,2,1,"span"),a(),r(5,"td"),w(6,at,2,4,"a",23)(7,st,2,1,"span"),a(),r(8,"td")(9,"span"),p(10),N(11,"date"),a()(),r(12,"td")(13,"div",24),w(14,mt,3,1)(15,pt,2,0,"span"),a()()()),n&2){let e=c.$implicit,i=l();ue("guid-highlight",i.isGuid(e.Name)),s(),m("ngxPermissionsOnly",i.userDeleteRole),s(2),M(i.hasUserEditRole()?3:4),s(3),M(i.hasUserEditRole()?6:7),s(4),E(e.LastLogin&&e.LastLogin!=="0001-01-01T00:00:00"?ge(11,7,e.LastLogin,"dd MMM yyyy HH:mm:ss"):"-"),s(4),M((e.Channels==null?null:e.Channels.length)>0?14:15)}}function ut(n,c){if(n&1){let e=v();r(0,"app-mat-paginator-no-count",29),C("next",function(){d(e);let t=l(),o=h(0);return u(t.onNextPage(o==null?null:o.Filter))})("previous",function(){d(e);let t=l(),o=h(0);return u(t.onPrevPage(o==null?null:o.Filter))}),a()}if(n&2){l();let e=h(0),i=h(2);m("filter",e==null?null:e.Filter)("totaldata",i==null||i.Data==null?null:i.Data.length)("paginationTotal",i==null?null:i.Count)("hasClicked",!0)("alwaysShowNextButton",!0)}}var _n=(()=>{class n{isGuid(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(e)}constructor(){this.usersService=f(I),this.permissionService=f(ye),this.toastService=f(Z),this.dialog=f(Pe),this.userInviteOptions=x([]),this.searchText=x(null),this.selectedGroup=x(null),this.userLoader$=this.usersService.getLoader().pipe(ie(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),V(1)),this.users$=me({Count:0,Data:[]}),this.userAddRole=J.UserInvite,this.userDeleteRole=J.UserDelete,this.hasUserEditRole=x(!1),this.selectedUsers=x([]),this.currentLoginUser=D(()=>{let e=localStorage.getItem(_e.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(J.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let i=ce(le({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(i).pipe(ie(t=>this.filterUserInvtiteOptions(t.Data)),V(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(i=>i.filter(t=>e.findIndex(o=>o.UserID===t.ID)===-1))}onCheckAllUser(e,i){i.forEach(o=>{o.Name!==this.currentLoginUser()?.username&&(o.checked=e)});let t=i.filter(o=>o.checked);this.selectedUsers.set(t)}onSelectUser(e){let i=e.filter(t=>t.checked);this.selectedUsers.set(i)}onDeleteUser(e={PageNumber:1,PageSize:10}){let i=this.selectedUsers().map(o=>o.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(i).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,i){this.dialog.open(We,{data:{userGroups:e,availableUsers:i}}).afterClosed().pipe(pe(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}openUserChannelsDialog(e,i){this.dialog.open($e,{data:{channels:e,userName:i}})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-users"]],features:[H([I])],decls:35,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","25%"],[2,"width","15%"],[3,"guid-highlight"],[3,"filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams","matTooltip"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3","user-chip",3,"label","image","alt"],[1,"me-3","mb-3","user-chip","count-chip",2,"cursor","pointer",3,"label"],[1,"me-3","mb-3","user-chip","count-chip",2,"cursor","pointer",3,"click","label"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(i,t){if(i&1){let o=v();R(0),N(1,"async"),R(2),N(3,"async"),r(4,"mainpanel",0),S("textChange",function(_){return d(o),b(t.searchText,_)||(t.searchText=_),u(_)}),C("onSubmit",function(){d(o);let _=h(0);return u(t.initUsers(_==null?null:_.Filter))}),r(5,"filters")(6,"div")(7,"label",1),p(8,"Group"),a(),r(9,"ng-select",2),S("ngModelChange",function(_){return d(o),b(t.selectedGroup,_)||(t.selectedGroup=_),u(_)}),a()()(),r(10,"actions"),P(11,Qe,2,1,"ng-container",3)(12,Xe,3,0,"ng-container",3)(13,et,3,0,"ng-container",3),a(),r(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),P(21,tt,4,0,"ng-container",3),r(22,"th",9),p(23,"Login ID"),a(),r(24,"th",10),p(25,"Group"),a(),r(26,"th",10),p(27,"Last Login"),a(),r(28,"th"),p(29,"Channel"),a()()(),r(30,"tbody"),A(31,dt,16,10,"tr",11,F),a()(),w(33,ut,1,5,"app-mat-paginator-no-count",12),a()()()()(),r(34,"invite-group",13),C("onSuccessUpdateUser",function(){d(o);let _=h(0);return u(t.onSuccessUpdateUser(_==null?null:_.Filter))}),a()}if(i&2){let o=B(W(1,11,t.userLoader$));s(2);let g=B(W(3,14,t.users$));s(2),y("text",t.searchText),s(5),m("clearable",!0)("items",o==null||o.Options==null?null:o.Options.Groups),y("ngModel",t.selectedGroup),s(2),m("ngxPermissionsOnly",t.userDeleteRole),s(),m("ngxPermissionsOnly",t.userAddRole),s(),m("ngxPermissionsOnly",t.userAddRole),s(8),m("ngxPermissionsOnly",t.userDeleteRole),s(10),G(g==null?null:g.Data),s(2),M(o?33:-1),s(),m("groups",o==null||o.Options==null?null:o.Options.Groups)("users",t.userInviteOptions())}},dependencies:[ke,Me,we,Ge,Se,be,Te,De,Le,Ee,X,Ue,K,Q,Fe,ne,Ae,Y,fe],styles:[".guid-highlight[_ngcontent-%COMP%]{background-color:#fff3cd!important}.user-chip[_ngcontent-%COMP%]{--p-chip-image-width: 1.2rem;--p-chip-image-height: 1.2rem;--p-chip-padding-x: 1rem;--p-chip-padding-y: .5rem;--p-chip-border-radius: .5rem;--p-chip-font-size: 1.2rem}.user-chip.count-chip[_ngcontent-%COMP%]{--p-chip-background: var(--p-gray-100);--p-chip-color: var(--p-gray-600)}[_nghost-%COMP%] .user-chip img, [_nghost-%COMP%] .user-chip .p-chip-image{width:1.2rem!important;height:1.2rem!important;object-fit:contain!important;display:inline-block!important}[_nghost-%COMP%] .user-chip{vertical-align:middle}"],changeDetection:0})}}return n})();export{_n as UsersComponent};
|
|
1
|
+
import{a as Ge}from"./chunk-JSFPYH26.js";import{a as I}from"./chunk-T7KMDF6W.js";import{b as Ae,c as ne}from"./chunk-BDUUVK5L.js";import{a as Ve,b as Fe}from"./chunk-L2ENNT5V.js";import{a as Ie}from"./chunk-RVHJIVQ5.js";import{b as Ne}from"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{d as Ee,e as Le}from"./chunk-TRTDBHQI.js";import{b as ke}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as ee,b as $,c as Pe,g as Oe,i as z,j as te}from"./chunk-M65GNQVQ.js";import{a as Te}from"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import{b as De}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{a as J}from"./chunk-ZSUWHVKX.js";import{a as _e}from"./chunk-QXRG5XYP.js";import"./chunk-5XPG2TEC.js";import{a as ye,b as be,c as Se}from"./chunk-I4MUFYEG.js";import{c as ve}from"./chunk-NNVT5X6O.js";import{A as X,b as Ue,h as K,m as Q}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import{b as Z}from"./chunk-M5YUVUTR.js";import{e as we,g as Me}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as fe,F as xe,t as he,u as Ce,z as Y}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as H,E as pe,Eb as T,Ga as x,Jb as de,Kb as P,Lc as ue,Mc as oe,Oc as p,Pc as E,Qc as L,Sc as y,Tc as b,Uc as S,V,Vc as R,Wc as B,Xc as h,aa as ie,ad as re,bc as w,bd as ae,dc as M,ec as F,gc as A,hc as G,ic as m,jc as r,kb as q,kc as a,kd as N,lc as U,ld as W,mb as s,md as ge,na as f,o as me,pc as O,qc as k,sc as v,sd as D,t as j,ua as d,va as u,xc as C,zc as l}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as le,b as ce}from"./chunk-66YHNWRR.js";var se=(function(n){return n.ERROR="https://resc.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",n.UNAUTHORIZED="https://resc.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",n.EMPTY_LIST="https://resc.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",n.REMOVE="https://resc.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",n})(se||{});var Be=()=>({display:"d-flex"});function qe(n,c){if(n&1&&(r(0,"div",6),U(1,"img",9),r(2,"p",10),p(3," All users already migrated. "),a()()),n&2){let e=l();s(),m("src",e.emptyStateIcon,q)}}function He(n,c){if(n&1){let e=v();r(0,"div",14)(1,"p-checkBox",15),S("ngModelChange",function(t){let o=d(e).$implicit;return b(o.selected,t)||(o.selected=t),u(t)}),C("ngModelChange",function(){d(e);let t=l(2),o=h(0);return u(t.onUserCheckChange(o))}),a(),r(2,"label",16),p(3),a()()}if(n&2){let e=c.$implicit;s(),oe(re(7,Be)),m("binary",!0)("id",e.ID),y("ngModel",e.selected),s(),m("for",e.ID),s(),L(" ",e.Name," ")}}function Ye(n,c){if(n&1){let e=v();r(0,"div",11)(1,"p-checkBox",12),S("ngModelChange",function(t){d(e);let o=l();return b(o.isCheckAll,t)||(o.isCheckAll=t),u(t)}),C("ngModelChange",function(t){d(e);let o=l(),g=h(0);return u(o.onCheckAllChange(t,g))}),a(),r(2,"label",13),p(3," Check All "),a()(),A(4,He,4,8,"div",14,F)}if(n&2){let e=l(),i=h(0);s(),oe(re(4,Be)),m("binary",!0),y("ngModel",e.isCheckAll),s(3),G(i)}}var We=(()=>{class n extends Ie{constructor(){super(),this.dialogRef=f(ee),this.data=f($),this.userService=f(I),this.dialogData=f($),this.toastr=f(Z),this.userGroups=D(()=>this.dialogData.userGroups||[]),this.availableUsers=D(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(i=>e.set(i.ID,i)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(j(e=>e.Data),j(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),j(e=>e.map(t=>(t.selected=!0,t))),V(1)),this.isCheckAll=x(!0),this.selectedGroup=x(null),this.emptyStateIcon=se.EMPTY_LIST,this.config=new z,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let i=e.every(t=>t.selected);this.isCheckAll.set(i)}onCheckAllChange(e,i){this.isCheckAll.set(e),i.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let i=e.filter(o=>o.selected);if(i.length===0){this.toastr.error("Please select at least one user","Error");return}if(ve.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:i.map(o=>o.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-migrate-dialog"]],features:[H([I]),de],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(i,t){if(i&1){let o=v();R(0),N(1,"async"),r(2,"modal-material",0),C("onClose",function(){return d(o),u(t.onClose())})("onCancel",function(){return d(o),u(t.onClose())})("onOk",function(){d(o);let _=h(0);return u(t.onSubmit(_))}),r(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),p(7,"Users from POS"),a(),r(8,"div",5),w(9,qe,4,1,"div",6)(10,Ye,6,5),a()(),r(11,"div",7)(12,"h5",4),p(13,"Assign Group"),a(),r(14,"p-select",8),C("click",function(){return d(o),u(t.onClickSelect())}),S("ngModelChange",function(_){return d(o),b(t.selectedGroup,_)||(t.selectedGroup=_),u(_)}),a()()()()()}if(i&2){let o=B(W(1,5,t.migrateLoader$));s(2),m("config",t.config),s(7),M((o==null?null:o.length)===0?9:10),s(5),m("options",t.userGroups())("filter",!0),y("ngModel",t.selectedGroup)}},dependencies:[te,X,K,Q,Ve,Ne,Y],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"],changeDetection:0})}}return n})();function Ze(n,c){if(n&1&&(r(0,"tr",6)(1,"td",7)(2,"div",8),U(3,"img",9),r(4,"div",10),p(5),a()()()()),n&2){let e=c.$implicit,i=l();s(3),m("src",i.getChannelLogo(e),q),s(2),E((e==null?null:e.Name)||"-")}}function Je(n,c){n&1&&(r(0,"tr")(1,"td",11),p(2,"No channels found"),a()())}var $e=(()=>{class n{constructor(){this.data=f($),this.dialogRef=f(ee),this.modalConfig=x(new z),this.channels=x([]),this.filterText=x(""),this.filteredChannels=D(()=>{let e=this.filterText().toLowerCase().trim();return e?this.channels().filter(i=>(i?.Name||"").toString().toLowerCase().indexOf(e)!==-1):this.channels()}),this.channels.set(this.data?.channels||[])}ngOnInit(){let e=new z;e.title=`All Channels List - [${this.data?.userName||"User"}]`,e.bodyScrollable=!0,e.hideFooter=!0,e.customWidth="80vw",e.noPadding=!0,this.modalConfig.set(e),this.channels.set(this.data?.channels||[])}close(){this.dialogRef.close()}getChannelLogo(e){return e?.Logo||"/assets/images/default-channel-logo.png"}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-user-channels-dialog"]],decls:7,vars:3,consts:[[3,"onClose","onCancel","config"],["content",""],[1,"channels-table-wrap"],[1,"table","mb-0","w-100"],["class","channel-row",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"channel-row"],[1,"channel-col"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo","me-2",3,"src"],[1,"channel-name"],[1,"text-center","py-4"]],template:function(i,t){i&1&&(r(0,"modal-material",0),C("onClose",function(){return t.close()})("onCancel",function(){return t.close()}),r(1,"div",1)(2,"div",2)(3,"table",3)(4,"tbody"),P(5,Ze,6,2,"tr",4)(6,Je,3,0,"tr",5),a()()()()()),i&2&&(m("config",t.modalConfig()),s(5),m("ngForOf",t.filteredChannels()),s(),m("ngIf",t.filteredChannels().length===0))},dependencies:[xe,he,Ce,Oe,te,ne],styles:["[_nghost-%COMP%] .mat-dialog-container{max-width:95vw!important;width:auto!important}[_nghost-%COMP%] .modal-material{width:90vw!important;max-width:600px!important;min-width:500px!important}[_nghost-%COMP%] .modal-content{max-width:none!important;width:100%!important}@media(max-width:1200px){[_nghost-%COMP%] .modal-material{width:95vw!important;min-width:500px!important}}@media(max-width:768px){[_nghost-%COMP%] .modal-material{width:98vw!important;min-width:320px!important}}.channels-table-wrap[_ngcontent-%COMP%]{padding:0;min-height:300px;width:100%;overflow-x:auto}.channels-thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:transparent;color:#6c757d;font-weight:600;padding:12px 20px}.channel-logo[_ngcontent-%COMP%]{width:22px;height:22px;object-fit:contain}.channel-name[_ngcontent-%COMP%]{max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.channel-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 20px}.channels-table-wrap[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{margin-bottom:0;width:100%;min-width:500px;table-layout:auto}"]})}}return n})();var ze=n=>({ID:n});function Ke(n,c){if(n&1){let e=v();r(0,"button",15),C("click",function(){d(e);let t=l(2),o=h(0);return u(t.onDeleteUser(o==null?null:o.Filter))}),U(1,"i",16),p(2),a()}if(n&2){let e,i=l(2);s(2),L(" Delete (",(e=i.selectedUsers())==null?null:e.length,") ")}}function Qe(n,c){if(n&1&&(O(0),w(1,Ke,3,1,"button",14),k()),n&2){let e,i=l();s(),M(((e=i.selectedUsers())==null?null:e.length)>0?1:-1)}}function Xe(n,c){if(n&1){let e=v();O(0),r(1,"button",17),C("click",function(){d(e);let t=l(),o=h(0),g=h(2);return u(t.onMigrateUser(o==null||o.Options==null?null:o.Options.Groups,g==null?null:g.Data))}),p(2," Migrate "),a(),k()}}function et(n,c){n&1&&(O(0),r(1,"a",18),p(2," Invite "),a(),k())}function tt(n,c){if(n&1){let e=v();O(0),r(1,"th",19)(2,"div",20)(3,"input",21),C("change",function(t){d(e);let o=l(),g=h(2);return u(o.onCheckAllUser(t.target.checked,g==null?null:g.Data))}),a()()(),k()}}function nt(n,c){if(n&1){let e=v();r(0,"div",20)(1,"input",25),S("ngModelChange",function(t){d(e);let o=l(2).$implicit;return b(o.checked,t)||(o.checked=t),u(t)}),C("ngModelChange",function(){d(e);let t=l(3),o=h(2);return u(t.onSelectUser(o==null?null:o.Data))}),a()()}if(n&2){let e=l(2).$implicit;s(),y("ngModel",e.checked)}}function it(n,c){if(n&1&&(O(0),r(1,"td"),w(2,nt,2,1,"div",20),a(),k()),n&2){let e,i=l().$implicit,t=l();s(2),M(i.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function ot(n,c){if(n&1&&(r(0,"a",22),p(1),a()),n&2){let e=l().$implicit,i=l();m("queryParams",ae(3,ze,e.UserID))("matTooltip",i.isGuid(e.Name)?"This user is either Suspended or Deleted in the DealPOS. You can also remove it from Omnichannel":""),s(),L(" ",e.Name," ")}}function rt(n,c){if(n&1&&(r(0,"span"),p(1),a()),n&2){let e=l().$implicit;s(),E(e.Name)}}function at(n,c){if(n&1&&(r(0,"a",23),p(1),a()),n&2){let e=l().$implicit;m("queryParams",ae(2,ze,e.GroupID)),s(),L(" ",e.GroupName," ")}}function st(n,c){if(n&1&&(r(0,"span"),p(1),a()),n&2){let e=l().$implicit;s(),E(e.GroupName)}}function lt(n,c){if(n&1&&U(0,"p-chip",26),n&2){let e=c.$implicit;m("label",e.Name)("image",e.Logo)("alt",e.Name)}}function ct(n,c){if(n&1){let e=v();r(0,"p-chip",28),C("click",function(){d(e);let t=l(2).$implicit,o=l();return u(o.openUserChannelsDialog(t.Channels,t.Name))}),a()}if(n&2){let e=l(2).$implicit;m("label","+ "+(e.Channels.length-5)+" channels")}}function mt(n,c){if(n&1&&(A(0,lt,1,3,"p-chip",26,F),w(2,ct,1,1,"p-chip",27)),n&2){let e=l().$implicit;G(e.Channels.slice(0,5)),s(2),M(e.Channels.length>5?2:-1)}}function pt(n,c){n&1&&(r(0,"span"),p(1,"All Channels"),a())}function dt(n,c){if(n&1&&(r(0,"tr"),P(1,it,3,1,"ng-container",3),r(2,"td"),w(3,ot,2,5,"a",22)(4,rt,2,1,"span"),a(),r(5,"td"),w(6,at,2,4,"a",23)(7,st,2,1,"span"),a(),r(8,"td")(9,"span"),p(10),N(11,"date"),a()(),r(12,"td")(13,"div",24),w(14,mt,3,1)(15,pt,2,0,"span"),a()()()),n&2){let e=c.$implicit,i=l();ue("guid-highlight",i.isGuid(e.Name)),s(),m("ngxPermissionsOnly",i.userDeleteRole),s(2),M(i.hasUserEditRole()?3:4),s(3),M(i.hasUserEditRole()?6:7),s(4),E(e.LastLogin&&e.LastLogin!=="0001-01-01T00:00:00"?ge(11,7,e.LastLogin,"dd MMM yyyy HH:mm:ss"):"-"),s(4),M((e.Channels==null?null:e.Channels.length)>0?14:15)}}function ut(n,c){if(n&1){let e=v();r(0,"app-mat-paginator-no-count",29),C("next",function(){d(e);let t=l(),o=h(0);return u(t.onNextPage(o==null?null:o.Filter))})("previous",function(){d(e);let t=l(),o=h(0);return u(t.onPrevPage(o==null?null:o.Filter))}),a()}if(n&2){l();let e=h(0),i=h(2);m("filter",e==null?null:e.Filter)("totaldata",i==null||i.Data==null?null:i.Data.length)("paginationTotal",i==null?null:i.Count)("hasClicked",!0)("alwaysShowNextButton",!0)}}var _n=(()=>{class n{isGuid(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(e)}constructor(){this.usersService=f(I),this.permissionService=f(ye),this.toastService=f(Z),this.dialog=f(Pe),this.userInviteOptions=x([]),this.searchText=x(null),this.selectedGroup=x(null),this.userLoader$=this.usersService.getLoader().pipe(ie(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),V(1)),this.users$=me({Count:0,Data:[]}),this.userAddRole=J.UserInvite,this.userDeleteRole=J.UserDelete,this.hasUserEditRole=x(!1),this.selectedUsers=x([]),this.currentLoginUser=D(()=>{let e=localStorage.getItem(_e.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(J.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let i=ce(le({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(i).pipe(ie(t=>this.filterUserInvtiteOptions(t.Data)),V(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(i=>i.filter(t=>e.findIndex(o=>o.UserID===t.ID)===-1))}onCheckAllUser(e,i){i.forEach(o=>{o.Name!==this.currentLoginUser()?.username&&(o.checked=e)});let t=i.filter(o=>o.checked);this.selectedUsers.set(t)}onSelectUser(e){let i=e.filter(t=>t.checked);this.selectedUsers.set(i)}onDeleteUser(e={PageNumber:1,PageSize:10}){let i=this.selectedUsers().map(o=>o.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(i).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,i){this.dialog.open(We,{data:{userGroups:e,availableUsers:i}}).afterClosed().pipe(pe(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}openUserChannelsDialog(e,i){this.dialog.open($e,{data:{channels:e,userName:i}})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-users"]],features:[H([I])],decls:35,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","25%"],[2,"width","15%"],[3,"guid-highlight"],[3,"filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams","matTooltip"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3","user-chip",3,"label","image","alt"],[1,"me-3","mb-3","user-chip","count-chip",2,"cursor","pointer",3,"label"],[1,"me-3","mb-3","user-chip","count-chip",2,"cursor","pointer",3,"click","label"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(i,t){if(i&1){let o=v();R(0),N(1,"async"),R(2),N(3,"async"),r(4,"mainpanel",0),S("textChange",function(_){return d(o),b(t.searchText,_)||(t.searchText=_),u(_)}),C("onSubmit",function(){d(o);let _=h(0);return u(t.initUsers(_==null?null:_.Filter))}),r(5,"filters")(6,"div")(7,"label",1),p(8,"Group"),a(),r(9,"ng-select",2),S("ngModelChange",function(_){return d(o),b(t.selectedGroup,_)||(t.selectedGroup=_),u(_)}),a()()(),r(10,"actions"),P(11,Qe,2,1,"ng-container",3)(12,Xe,3,0,"ng-container",3)(13,et,3,0,"ng-container",3),a(),r(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),P(21,tt,4,0,"ng-container",3),r(22,"th",9),p(23,"Login ID"),a(),r(24,"th",10),p(25,"Group"),a(),r(26,"th",10),p(27,"Last Login"),a(),r(28,"th"),p(29,"Channel"),a()()(),r(30,"tbody"),A(31,dt,16,10,"tr",11,F),a()(),w(33,ut,1,5,"app-mat-paginator-no-count",12),a()()()()(),r(34,"invite-group",13),C("onSuccessUpdateUser",function(){d(o);let _=h(0);return u(t.onSuccessUpdateUser(_==null?null:_.Filter))}),a()}if(i&2){let o=B(W(1,11,t.userLoader$));s(2);let g=B(W(3,14,t.users$));s(2),y("text",t.searchText),s(5),m("clearable",!0)("items",o==null||o.Options==null?null:o.Options.Groups),y("ngModel",t.selectedGroup),s(2),m("ngxPermissionsOnly",t.userDeleteRole),s(),m("ngxPermissionsOnly",t.userAddRole),s(),m("ngxPermissionsOnly",t.userAddRole),s(8),m("ngxPermissionsOnly",t.userDeleteRole),s(10),G(g==null?null:g.Data),s(2),M(o?33:-1),s(),m("groups",o==null||o.Options==null?null:o.Options.Groups)("users",t.userInviteOptions())}},dependencies:[ke,Me,we,Ge,Se,be,Te,De,Le,Ee,X,Ue,K,Q,Fe,ne,Ae,Y,fe],styles:[".guid-highlight[_ngcontent-%COMP%]{background-color:#fff3cd!important}.user-chip[_ngcontent-%COMP%]{--p-chip-image-width: 1.2rem;--p-chip-image-height: 1.2rem;--p-chip-padding-x: 1rem;--p-chip-padding-y: .5rem;--p-chip-border-radius: .5rem;--p-chip-font-size: 1.2rem}.user-chip.count-chip[_ngcontent-%COMP%]{--p-chip-background: var(--p-gray-100);--p-chip-color: var(--p-gray-600)}[_nghost-%COMP%] .user-chip img, [_nghost-%COMP%] .user-chip .p-chip-image{width:1.2rem!important;height:1.2rem!important;object-fit:contain!important;display:inline-block!important}[_nghost-%COMP%] .user-chip{vertical-align:middle}"],changeDetection:0})}}return n})();export{_n as UsersComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as q}from"./chunk-WDIDEDCE.js";import{a as z}from"./chunk-
|
|
1
|
+
import{a as q}from"./chunk-WDIDEDCE.js";import{a as z}from"./chunk-SSS2VUAO.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as j}from"./chunk-ZA4X34GE.js";import{a as Z}from"./chunk-IFFI5CMD.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as H}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-EYBMRBII.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as y}from"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as G,h as W,m as $}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{e as R}from"./chunk-M5YUVUTR.js";import{e as F,g as O}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{D as N,z as A}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as M,Ga as V,Oc as a,Pc as g,Sc as K,Tc as T,Uc as P,V as D,Vc as B,bc as k,dc as U,ec as I,gc as E,hc as L,ic as d,jc as e,kb as b,kc as t,kd as w,lc as c,ld as v,mb as l,na as f,sc as x,ua as m,va as u,xc as S,zc as _}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function J(o,h){if(o&1){let i=x();e(0,"img",21),S("click",function(r){m(i);let n=_().$implicit,s=_();return u(s.onZoomImage(r,n==null?null:n.ImageUrl))}),t()}if(o&2){let i=_().$implicit;d("src",i==null?null:i.ThumbnailUrl,b)}}function Q(o,h){o&1&&c(0,"img",17)}function X(o,h){if(o&1&&(e(0,"tr")(1,"td")(2,"div",15),k(3,J,1,1,"img",16)(4,Q,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),w(16,"number"),t()()),o&2){let i=h.$implicit;l(3),U(i.ImageUrl?3:4),l(3),g(i.Name),l(2),g(i.SKU),l(3),d("typeId",i.TypeID),l(2),g(i.ChannelName),l(2),g(v(16,6,i.Count))}}var he=(()=>{class o{constructor(){this.httpService=f(R),this.biggerPictureService=f(Z),this.filter=V({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=y.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(y.GetMultiListingSKU,this.filter()).pipe(D(1))}onZoomImage(i,p){this.biggerPictureService.openBiggerPicture(i,p)}static{this.\u0275fac=function(p){return new(p||o)}}static{this.\u0275cmp=M({type:o,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(p,r){if(p&1){let n=x();B(0),w(1,"async"),e(2,"mainpanel",0),S("onSubmit",function(){return m(n),u(r.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),P("ngModelChange",function(C){return m(n),T(r.filter().ListChannelID,C)||(r.filter().ListChannelID=C),u(C)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),E(30,X,17,8,"tr",null,I),t()(),e(32,"app-custom-paginator",14),S("next",function(){return m(n),u(r.initMultipleListingSKU())})("previous",function(){return m(n),u(r.initMultipleListingSKU())}),t()()()()()()}if(p&2){let n=v(1,6,r.multipleListingSKU$);l(2),d("hideSearchBox",!0),l(10),d("multiple",!0),K("ngModel",r.filter().ListChannelID),l(18),L(n==null?null:n.Data),l(2),d("filter",r.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",r.rowCountApi)}},dependencies:[H,j,O,F,q,z,G,W,$,A,N],encapsulation:2,changeDetection:0})}}return o})();export{he as DuplicateSkuV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ae}from"./chunk-A2K3CDHY.js";import{b as Te}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as R,b as oe,c as ke,i as M,j as O}from"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-DGB7L5EQ.js";import"./chunk-ISRTMJUH.js";import"./chunk-2PONPJQD.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{a as w}from"./chunk-FDTKJPLI.js";import{b as C,c as K}from"./chunk-NNVT5X6O.js";import{A as W,B as te,c as D,e as I,h as E,i as Q,j as x,l as G,m as J,n as X,r as $,s as ee,w as Me,y as ve}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import{b as ye,e as _e}from"./chunk-M5YUVUTR.js";import{d as be,e as Se}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Ac as he,Bc as ge,Ca as pe,E as N,Eb as S,Ga as P,Jc as j,Lc as T,Ma as de,Nc as H,Oc as l,Qc as B,Y as z,bc as u,cd as fe,dc as c,ic as m,id as Ce,jc as n,kb as me,kc as i,lc as v,mb as p,mc as F,na as f,nc as Z,oc as se,sc as L,t as re,tc as ue,ua as _,va as b,wd as q,xc as g,yc as ce,zc as k}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as le,b as ae}from"./chunk-66YHNWRR.js";function Re(t,s){t&1&&(n(0,"small"),l(1," URL is required "),i())}function Oe(t,s){if(t&1&&(n(0,"div",10),u(1,Re,2,0,"small"),i()),t&2){k();let o=j(10);p(),c(o.errors.required?1:-1)}}function Pe(t,s){t&1&&(n(0,"small"),l(1," Email is required "),i())}function Ie(t,s){t&1&&(n(0,"small"),l(1," Email is not valid "),i())}function Ve(t,s){if(t&1&&(n(0,"div",10),u(1,Pe,2,0,"small"),u(2,Ie,2,0,"small"),i()),t&2){k();let o=j(16);p(),c(o.errors.required?1:-1),p(),c(o.errors.pattern?2:-1)}}var we=(()=>{class t{constructor(){this.dialogRef=f(R),this.formData=P({URL:"",Email:""})}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M,this.modalConfig.title="Fill data for Customer Support"}onSubmit(o){o!="Enter"&&this.dialogRef.close(this.formData())}onClose(){this.dialogRef.close()}updateFormData(o,a){this.formData.update(e=>ae(le({},e),{[o]:a}))}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-contact-support"]],decls:18,vars:8,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],[1,"text-danger"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"]],template:function(a,e){if(a&1){let r=L();n(0,"modal-material",2),g("onClose",function(){return _(r),b(e.onClose())})("onCancel",function(){return _(r),b(e.onClose())})("onOk",function(h){return _(r),b(e.onSubmit(h))}),n(1,"div",3)(2,"div",4)(3,"label",5),l(4,"Tokopedia URL"),i(),n(5,"div",6)(6,"div",7)(7,"span",8),l(8,"https://tokopedia.com/"),i()(),n(9,"input",9,0),g("ngModelChange",function(h){return _(r),b(e.updateFormData("URL",h))}),i()(),u(11,Oe,2,1,"div",10),n(12,"label",11),l(13,"Requester's Email"),i(),n(14,"div",6)(15,"input",12,1),g("ngModelChange",function(h){return _(r),b(e.updateFormData("Email",h))}),i()(),u(17,Ve,3,2,"div",10),i()()()}if(a&2){let r=j(10),d=j(16);m("dynamicValidated",!r.invalid&&!d.invalid)("config",e.modalConfig),p(7),T("invalid",r.invalid&&(r.dirty||r.touched)),p(2),m("ngModel",e.formData().URL),p(2),c(r.invalid&&(r.dirty||r.touched)?11:-1),p(4),m("ngModel",e.formData().Email),p(2),c(d.invalid&&(d.dirty||d.touched)?17:-1)}},dependencies:[O,W,D,E,Me,ve,J],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"],changeDetection:0})}}return t})();var De=(()=>{class t{constructor(){this.dialogRef=f(R),this.data=f(oe),this.shopID=P("")}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(a,e){if(a&1){let r=L();n(0,"modal-material",1),g("onClose",function(){return _(r),b(e.onClose())})("onCancel",function(){return _(r),b(e.onClose())})("onOk",function(){return _(r),b(e.onSubmit())}),n(1,"div",2)(2,"div",3)(3,"input",4,0),g("ngModelChange",function(h){return _(r),b(e.shopID.set(h))}),i(),n(5,"label",5),l(6,"Shop ID"),i()()()()}a&2&&(m("dynamicValidated",e.shopID())("config",e.modalConfig),p(3),m("ngModel",e.shopID()))},dependencies:[O,W,D,E,J],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"],changeDetection:0})}}return t})();var Ue=(t,s)=>({"is-invalid":t,"input-shopify rounded-start":s});function Ne(t,s){t&1&&(n(0,"label",3),l(1,"Shopify URL"),i())}function ze(t,s){t&1&&(n(0,"label",3),l(1,"URL"),i())}function Fe(t,s){t&1&&(n(0,"span",6),l(1,"myshopify.com"),i())}function Le(t,s){if(t&1&&(n(0,"div"),l(1),i()),t&2){let o=k(2);p(),B("",o.data==null?null:o.data.title," url is required")}}function Ke(t,s){if(t&1&&(n(0,"div",7),u(1,Le,2,1,"div"),i()),t&2){let o,a=k();p(),c(!(a.formGroup==null||(o=a.formGroup.get("URL"))==null)&&o.getError("required")?1:-1)}}function We(t,s){t&1&&l(0," API Key ")}function Ze(t,s){t&1&&l(0," Consumer Key ")}function je(t,s){t&1&&(l(0," ("),n(1,"a",10),l(2,"help center article"),i(),l(3,") "))}function qe(t,s){t&1&&(n(0,"div",7),l(1,"API Key is required"),i())}function Ye(t,s){t&1&&l(0," Admin API Access Token ")}function He(t,s){t&1&&l(0," Consumer Secret ")}function Be(t,s){t&1&&(n(0,"div",7),l(1,"Consumer Secret is required"),i())}var ie=(()=>{class t{constructor(){this.dialogRef=f(R),this.data=f(oe),this.modalConfig=new M,this.urlCtrl=new G(null),this.channelType=C}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let o=[I.required];this.formGroup=new x({URL:new G(null,o),ConsumerKey:new G(null,[I.required]),ConsumerSecret:new G(null,[I.required])})}initModalConfig(){this.modalConfig=new M,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let o=this.formGroup?.get("URL")?.getError("pattern"),a=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||o&&a&&e){let d=this.formGroup.value;d=this.trimShopifyUrl(d),this.dialogRef.close(d)}}trimShopifyUrl(o){if(this.data?.channelType==this.channelType.Shopify){let a=o.URL?.trim()||"";a=a.replace(/^https?:\/\//,""),a.includes(".myshopify.com")||(a=`${a}.myshopify.com`),o.URL=a}return o}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-modal-register-channel"]],decls:23,vars:25,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded","rounded-end-0",3,"placeholder"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(a,e){if(a&1&&(n(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),n(1,"div",1)(2,"form",2),u(3,Ne,2,0,"label",3),n(4,"div",4),u(5,ze,2,0,"label",3),v(6,"input",5),u(7,Fe,2,0,"span",6),u(8,Ke,2,1,"div",7),i(),n(9,"div",4)(10,"label",3)(11,"span"),u(12,We,1,0)(13,Ze,1,0),i(),u(14,je,4,0),i(),v(15,"input",8),u(16,qe,2,0,"div",7),i(),n(17,"div",4)(18,"label",3),u(19,Ye,1,0)(20,He,1,0),i(),v(21,"input",9),u(22,Be,2,0,"div",7),i()()()()),a&2){let r,d,h,y,V,U;m("config",e.modalConfig),p(2),m("formGroup",e.formGroup),p(),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),p(),T("input-group",(e.data==null?null:e.data.channelType)==e.channelType.Shopify),p(),c((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),p(),H(fe(22,Ue,(e.formGroup==null||(r=e.formGroup.get("URL"))==null?null:r.invalid)&&((e.formGroup==null||(r=e.formGroup.get("URL"))==null?null:r.dirty)||(e.formGroup==null||(r=e.formGroup.get("URL"))==null?null:r.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),m("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/"),p(),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),p(),c(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?8:-1),p(4),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),p(2),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),p(),T("is-invalid",(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.touched))),m("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]"),p(),c(!(e.formGroup==null||(y=e.formGroup.get("ConsumerKey"))==null)&&y.getError("required")&&(!(e.formGroup==null||(y=e.formGroup.get("ConsumerKey"))==null)&&y.dirty||!(e.formGroup==null||(y=e.formGroup.get("ConsumerKey"))==null)&&y.touched)?16:-1),p(3),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),p(2),T("is-invalid",(e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null?null:V.invalid)&&((e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null?null:V.dirty)||(e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null?null:V.touched))),m("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************"),p(),c(!(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null)&&U.getError("required")&&(!(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null)&&U.dirty||!(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null)&&U.touched)?22:-1)}},dependencies:[O,W,X,D,E,Q,te,ee,$],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"],changeDetection:0})}}return t})();function Qe(t,s){t&1&&(n(0,"div",6),l(1,"Api Key is required"),i())}function xe(t,s){t&1&&(n(0,"div",6),l(1,"Vendor ID is required"),i())}var Ee=(()=>{class t{constructor(){this.dialogRef=f(R),this.config=new M,this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config=new M,this.config.title="Register Plugo",this.config.okText="SAVE"}initFormGroup(){this.formGroup=new x({ApiKey:new G(null,[I.required]),VendorID:new G(null,[I.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let o=this.formGroup.value;this.dialogRef.close(o)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-modal-register-plugo"]],decls:13,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control"],["for","VendorID"]],template:function(a,e){if(a&1&&(n(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onOk()}),n(1,"div",1)(2,"form",2)(3,"div",3),v(4,"input",4),n(5,"label",5),l(6,"Api Key"),i(),u(7,Qe,2,0,"div",6),i(),n(8,"div",3),v(9,"input",7),n(10,"label",8),l(11,"Vendor ID"),i(),u(12,xe,2,0,"div",6),i()()()()),a&2){let r,d,h,y;m("config",e.config),p(2),m("formGroup",e.formGroup),p(2),T("is-invalid",(e.formGroup==null||(r=e.formGroup.get("ApiKey"))==null?null:r.invalid)&&((e.formGroup==null||(r=e.formGroup.get("ApiKey"))==null?null:r.dirty)||(e.formGroup==null||(r=e.formGroup.get("ApiKey"))==null?null:r.touched))),p(3),c(!(e.formGroup==null||(d=e.formGroup.get("ApiKey"))==null)&&d.getError("required")&&(!(e.formGroup==null||(d=e.formGroup.get("ApiKey"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("ApiKey"))==null)&&d.touched)?7:-1),p(2),T("is-invalid",(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.touched))),p(3),c(!(e.formGroup==null||(y=e.formGroup.get("VendorID"))==null)&&y.getError("required")&&(!(e.formGroup==null||(y=e.formGroup.get("VendorID"))==null)&&y.dirty||!(e.formGroup==null||(y=e.formGroup.get("VendorID"))==null)&&y.touched)?12:-1)}},dependencies:[O,te,X,D,E,Q,ee,$],encapsulation:2,changeDetection:0})}}return t})();var A=(function(t){return t.SHOPEE="https://resc.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",t.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",t.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izU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8V+DWjynSVkQw6MyYDhqEvHuZgw1ydDJBhWMJwgWMCs9XQksGG0NDvgyawrAYTituVQfCHQkY7rZkCb826VVuLDD5kqdqobiHYAodJ6clGBo0SceBDRzU85hpk0NFh9jwkk4blejIKphFf5xmYAQdBzRS8C7XaKAOHINOuYiUwMoJCoezAQTcwRWj0vjoZhZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",t.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",t.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",t.TIKTOK="https://resc.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",t.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",t.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",t})(A||{});var Je=["*"],Xe=(t,s,o,a,e,r,d,h)=>({"btn-shopee":t,"btn-lazada":s,"btn-tiktok":o,"btn-woocommerce":a,"btn-tokopedia":e,"btn-shopify":r,"btn-kalcare":d,"btn-plugo":h});function $e(t,s){t&1&&(F(0,"div",1)(1,"span"),l(2,"BETA"),Z()())}var Ge=(()=>{class t{constructor(){this.disabled=q(!1),this.type=q(void 0),this.isBeta=q(!1),this.authorize=new pe,this.channelType=C,this.buttonName=q("Authorize Account")}ngOnChanges(o){o.type&&(this.initChannelImage(),this.channelType.Shopee)}initChannelImage(){switch(this.type()){case C.Tokopedia:this.image=A.TOKOPEDIA;break;case C.WooCommerce:this.image=A.WOOCOMMERCE;break;case C.Shopee:this.image=A.SHOPEE;break;case C.Tiktok:this.image=A.TIKTOK;break;case C.Lazada:this.image=A.LAZADA;break;case C.Shopify:this.image=A.SHOPIFY;break;case C.Plugo:this.image=A.PLUGO;break}}onAuthorize(){this.authorize.emit()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-channel-widget"]],inputs:{disabled:[1,"disabled"],type:[1,"type"],isBeta:[1,"isBeta"],buttonName:[1,"buttonName"]},outputs:{authorize:"onAuthorize"},features:[de],ngContentSelectors:Je,decls:10,vars:14,consts:[[1,"card","h-100","ribbon-box"],[1,"ribbon","ribbon-top-right"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click"]],template:function(a,e){a&1&&(he(),F(0,"div",0),u(1,$e,3,0,"div",1),F(2,"div",2),se(3,"img",3),Z(),F(4,"div",4)(5,"div"),ge(6),Z()(),F(7,"div",5)(8,"a",6),ce("click",function(){return e.onAuthorize()}),l(9),Z()()()),a&2&&(p(),c(e.isBeta()?1:-1),p(2),ue("src",e.image,me),p(5),H(Ce(5,Xe,e.type()==e.channelType.Shopee,e.type()==e.channelType.Lazada,e.type()==e.channelType.Tiktok,e.type()==e.channelType.WooCommerce,e.type()==e.channelType.Tokopedia,e.type()==e.channelType.Shopify,e.type()==e.channelType.KalCare,e.type()==e.channelType.Plugo)),p(),B(" ",e.buttonName()," "))},styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}'],changeDetection:0})}}return t})();function et(t,s){if(t&1){let o=L();n(0,"div",3)(1,"div",6)(2,"app-channel-widget",9),g("onAuthorize",function(){_(o);let e=k();return b(e.openPlugoDialog())}),n(3,"p"),l(4,"Authorize DEALPOS to manage your Plugo Store."),i(),n(5,"p"),l(6," Configure Plugo x DealPOS integration by visiting this "),n(7,"a",14),l(8," article. "),i()()()()()}if(t&2){let o=k();p(2),m("type",o.channelType.Plugo)}}var ro=(()=>{class t{constructor(){this.http=f(_e),this.router=f(be),this.dialog=f(ke),this.toastr=f(ye),this.disabled=P(!1),this.newFeatureVisible=P(!1),this.channelType=C}shopeeAuthorize(){this.http.post(w.ShopeeV2_URL).subscribe(o=>{window.open(o.Url,"_blank")})}tiktokAuthorize(){this.http.post(w.Tiktok_URL).subscribe(o=>{window.open(o.Url,"_blank")})}lazadaAuthorize(){this.http.post(w.Lazada_URL).subscribe(o=>{window.open(o.Url,"_blank")})}openTokopediaDialog(){this.dialog.open(De,{data:{title:"Tokopedia"},width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddTokopedia,{ShopID:o}))).subscribe(o=>{this.onSuccessAddChannel()})}openShopifyDialog(){this.dialog.open(ie,{data:{title:"Shopify",channelType:C.Shopify},width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddShopify,o))).subscribe(o=>{window.open(o.Url,"_blank")})}openWooCommerceDialog(){this.dialog.open(ie,{data:{title:"WooCommerce",channelType:C.WooCommerce},width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddWoocommerce,o))).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ee,{width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddPlugo,o))).subscribe(()=>{this.onSuccessAddChannel()})}contactSupport(){this.dialog.open(we,{width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>{let a={URL:o.URL,Email:o.Email};return this.http.post("/api/ChannelAuthorization/Tokopedia_Intercom",a).pipe(re(()=>o))})).subscribe(o=>{this.toastr.success("Your request has been received, we will be in touch at "+o.Email,"Thank you!")})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}onToggleNewVersion(o){this.newFeatureVisible.set(o)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-marketplace-add"]],decls:56,vars:10,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Authorization is Closed",3,"type","disabled"],["type","button","href","https://seller-id.tokopedia.com/university/essay?knowledge_id=1189016095426305&default_language=id-ID&identity=1",1,"button","text-primary","fw-bold"],["buttonName","Register",3,"onAuthorize","type"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"p-5","text-start"],[3,"change"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"]],template:function(a,e){a&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Cancel"),i()(),n(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),g("onAuthorize",function(){return e.shopeeAuthorize()}),n(9,"p"),l(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),i(),n(11,"p"),l(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),i()()(),n(13,"div",6)(14,"app-channel-widget",7)(15,"p"),l(16," Starting from middle of Quarter 1 2025, Seller can no longer create or authorize their shop to Third Party Service without having a merge to their Tiktok Seller Account. "),i(),v(17,"br"),n(18,"p"),l(19," Please visit "),n(20,"a",8),l(21,"This Article From Tiktok x Tokopedia"),i(),l(22," to complete the merge process. After that seller can authorize their shop to DEALPOS only via Tiktok x Tokopedia Options. "),i()()(),n(23,"div",4)(24,"app-channel-widget",5),g("onAuthorize",function(){return e.tiktokAuthorize()}),n(25,"p"),l(26," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),i(),n(27,"p"),l(28," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),i()()()(),n(29,"div",3)(30,"div",6)(31,"app-channel-widget",9),g("onAuthorize",function(){return e.openWooCommerceDialog()}),n(32,"p"),l(33,"Authorize DEALPOS to manage your Personal Website."),i(),n(34,"p"),l(35," Configure woocommerce integration by visiting "),n(36,"a",10),l(37,"this article."),i()()()(),n(38,"div",6)(39,"app-channel-widget",5),g("onAuthorize",function(){return e.lazadaAuthorize()}),n(40,"p"),l(41," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),i(),n(42,"p"),l(43," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),i()()(),n(44,"div",4)(45,"app-channel-widget",9),g("onAuthorize",function(){return e.openShopifyDialog()}),n(46,"p"),l(47,"Authorize DEALPOS to manage your Personal Website."),i(),n(48,"p"),l(49," Configure Shopify integration by visiting "),n(50,"a",11),l(51,"this article."),i()()()()(),u(52,et,9,1,"div",3),i(),n(53,"div",12)(54,"mat-slide-toggle",13),g("change",function(d){return e.onToggleNewVersion(d.checked)}),l(55,"Show Beta Channel Integration "),i()()()()),a&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),p(8),m("type",e.channelType.Shopee),p(6),m("type",e.channelType.Tokopedia)("disabled",e.disabled()),p(10),m("type",e.channelType.Tiktok),p(7),m("type",e.channelType.WooCommerce),p(8),m("type",e.channelType.Lazada),p(6),m("type",e.channelType.Shopify),p(7),c(e.newFeatureVisible()?52:-1))},dependencies:[Te,Se,Ge,Ae],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"],changeDetection:0})}}return t})();export{ro as MarketplaceAddComponent};
|
|
1
|
+
import{a as Ae}from"./chunk-A2K3CDHY.js";import{b as Te}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as R,b as oe,c as ke,i as M,j as O}from"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-DGB7L5EQ.js";import"./chunk-ISRTMJUH.js";import"./chunk-2PONPJQD.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{a as w}from"./chunk-5XPG2TEC.js";import{b as C,c as K}from"./chunk-NNVT5X6O.js";import{A as W,B as te,c as D,e as I,h as E,i as Q,j as x,l as G,m as J,n as X,r as $,s as ee,w as Me,y as ve}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import{b as ye,e as _e}from"./chunk-M5YUVUTR.js";import{d as be,e as Se}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Ac as he,Bc as ge,Ca as pe,E as N,Eb as S,Ga as P,Jc as j,Lc as T,Ma as de,Nc as H,Oc as l,Qc as B,Y as z,bc as u,cd as fe,dc as c,ic as m,id as Ce,jc as n,kb as me,kc as i,lc as v,mb as p,mc as F,na as f,nc as Z,oc as se,sc as L,t as re,tc as ue,ua as _,va as b,wd as q,xc as g,yc as ce,zc as k}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as le,b as ae}from"./chunk-66YHNWRR.js";function Re(t,s){t&1&&(n(0,"small"),l(1," URL is required "),i())}function Oe(t,s){if(t&1&&(n(0,"div",10),u(1,Re,2,0,"small"),i()),t&2){k();let o=j(10);p(),c(o.errors.required?1:-1)}}function Pe(t,s){t&1&&(n(0,"small"),l(1," Email is required "),i())}function Ie(t,s){t&1&&(n(0,"small"),l(1," Email is not valid "),i())}function Ve(t,s){if(t&1&&(n(0,"div",10),u(1,Pe,2,0,"small"),u(2,Ie,2,0,"small"),i()),t&2){k();let o=j(16);p(),c(o.errors.required?1:-1),p(),c(o.errors.pattern?2:-1)}}var we=(()=>{class t{constructor(){this.dialogRef=f(R),this.formData=P({URL:"",Email:""})}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M,this.modalConfig.title="Fill data for Customer Support"}onSubmit(o){o!="Enter"&&this.dialogRef.close(this.formData())}onClose(){this.dialogRef.close()}updateFormData(o,a){this.formData.update(e=>ae(le({},e),{[o]:a}))}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-contact-support"]],decls:18,vars:8,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],[1,"text-danger"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"]],template:function(a,e){if(a&1){let r=L();n(0,"modal-material",2),g("onClose",function(){return _(r),b(e.onClose())})("onCancel",function(){return _(r),b(e.onClose())})("onOk",function(h){return _(r),b(e.onSubmit(h))}),n(1,"div",3)(2,"div",4)(3,"label",5),l(4,"Tokopedia URL"),i(),n(5,"div",6)(6,"div",7)(7,"span",8),l(8,"https://tokopedia.com/"),i()(),n(9,"input",9,0),g("ngModelChange",function(h){return _(r),b(e.updateFormData("URL",h))}),i()(),u(11,Oe,2,1,"div",10),n(12,"label",11),l(13,"Requester's Email"),i(),n(14,"div",6)(15,"input",12,1),g("ngModelChange",function(h){return _(r),b(e.updateFormData("Email",h))}),i()(),u(17,Ve,3,2,"div",10),i()()()}if(a&2){let r=j(10),d=j(16);m("dynamicValidated",!r.invalid&&!d.invalid)("config",e.modalConfig),p(7),T("invalid",r.invalid&&(r.dirty||r.touched)),p(2),m("ngModel",e.formData().URL),p(2),c(r.invalid&&(r.dirty||r.touched)?11:-1),p(4),m("ngModel",e.formData().Email),p(2),c(d.invalid&&(d.dirty||d.touched)?17:-1)}},dependencies:[O,W,D,E,Me,ve,J],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"],changeDetection:0})}}return t})();var De=(()=>{class t{constructor(){this.dialogRef=f(R),this.data=f(oe),this.shopID=P("")}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new M,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(a,e){if(a&1){let r=L();n(0,"modal-material",1),g("onClose",function(){return _(r),b(e.onClose())})("onCancel",function(){return _(r),b(e.onClose())})("onOk",function(){return _(r),b(e.onSubmit())}),n(1,"div",2)(2,"div",3)(3,"input",4,0),g("ngModelChange",function(h){return _(r),b(e.shopID.set(h))}),i(),n(5,"label",5),l(6,"Shop ID"),i()()()()}a&2&&(m("dynamicValidated",e.shopID())("config",e.modalConfig),p(3),m("ngModel",e.shopID()))},dependencies:[O,W,D,E,J],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"],changeDetection:0})}}return t})();var Ue=(t,s)=>({"is-invalid":t,"input-shopify rounded-start":s});function Ne(t,s){t&1&&(n(0,"label",3),l(1,"Shopify URL"),i())}function ze(t,s){t&1&&(n(0,"label",3),l(1,"URL"),i())}function Fe(t,s){t&1&&(n(0,"span",6),l(1,"myshopify.com"),i())}function Le(t,s){if(t&1&&(n(0,"div"),l(1),i()),t&2){let o=k(2);p(),B("",o.data==null?null:o.data.title," url is required")}}function Ke(t,s){if(t&1&&(n(0,"div",7),u(1,Le,2,1,"div"),i()),t&2){let o,a=k();p(),c(!(a.formGroup==null||(o=a.formGroup.get("URL"))==null)&&o.getError("required")?1:-1)}}function We(t,s){t&1&&l(0," API Key ")}function Ze(t,s){t&1&&l(0," Consumer Key ")}function je(t,s){t&1&&(l(0," ("),n(1,"a",10),l(2,"help center article"),i(),l(3,") "))}function qe(t,s){t&1&&(n(0,"div",7),l(1,"API Key is required"),i())}function Ye(t,s){t&1&&l(0," Admin API Access Token ")}function He(t,s){t&1&&l(0," Consumer Secret ")}function Be(t,s){t&1&&(n(0,"div",7),l(1,"Consumer Secret is required"),i())}var ie=(()=>{class t{constructor(){this.dialogRef=f(R),this.data=f(oe),this.modalConfig=new M,this.urlCtrl=new G(null),this.channelType=C}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let o=[I.required];this.formGroup=new x({URL:new G(null,o),ConsumerKey:new G(null,[I.required]),ConsumerSecret:new G(null,[I.required])})}initModalConfig(){this.modalConfig=new M,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let o=this.formGroup?.get("URL")?.getError("pattern"),a=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||o&&a&&e){let d=this.formGroup.value;d=this.trimShopifyUrl(d),this.dialogRef.close(d)}}trimShopifyUrl(o){if(this.data?.channelType==this.channelType.Shopify){let a=o.URL?.trim()||"";a=a.replace(/^https?:\/\//,""),a.includes(".myshopify.com")||(a=`${a}.myshopify.com`),o.URL=a}return o}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-modal-register-channel"]],decls:23,vars:25,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded","rounded-end-0",3,"placeholder"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(a,e){if(a&1&&(n(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),n(1,"div",1)(2,"form",2),u(3,Ne,2,0,"label",3),n(4,"div",4),u(5,ze,2,0,"label",3),v(6,"input",5),u(7,Fe,2,0,"span",6),u(8,Ke,2,1,"div",7),i(),n(9,"div",4)(10,"label",3)(11,"span"),u(12,We,1,0)(13,Ze,1,0),i(),u(14,je,4,0),i(),v(15,"input",8),u(16,qe,2,0,"div",7),i(),n(17,"div",4)(18,"label",3),u(19,Ye,1,0)(20,He,1,0),i(),v(21,"input",9),u(22,Be,2,0,"div",7),i()()()()),a&2){let r,d,h,y,V,U;m("config",e.modalConfig),p(2),m("formGroup",e.formGroup),p(),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),p(),T("input-group",(e.data==null?null:e.data.channelType)==e.channelType.Shopify),p(),c((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),p(),H(fe(22,Ue,(e.formGroup==null||(r=e.formGroup.get("URL"))==null?null:r.invalid)&&((e.formGroup==null||(r=e.formGroup.get("URL"))==null?null:r.dirty)||(e.formGroup==null||(r=e.formGroup.get("URL"))==null?null:r.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),m("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/"),p(),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),p(),c(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?8:-1),p(4),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),p(2),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),p(),T("is-invalid",(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.touched))),m("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]"),p(),c(!(e.formGroup==null||(y=e.formGroup.get("ConsumerKey"))==null)&&y.getError("required")&&(!(e.formGroup==null||(y=e.formGroup.get("ConsumerKey"))==null)&&y.dirty||!(e.formGroup==null||(y=e.formGroup.get("ConsumerKey"))==null)&&y.touched)?16:-1),p(3),c((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),p(2),T("is-invalid",(e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null?null:V.invalid)&&((e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null?null:V.dirty)||(e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null?null:V.touched))),m("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************"),p(),c(!(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null)&&U.getError("required")&&(!(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null)&&U.dirty||!(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null)&&U.touched)?22:-1)}},dependencies:[O,W,X,D,E,Q,te,ee,$],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"],changeDetection:0})}}return t})();function Qe(t,s){t&1&&(n(0,"div",6),l(1,"Api Key is required"),i())}function xe(t,s){t&1&&(n(0,"div",6),l(1,"Vendor ID is required"),i())}var Ee=(()=>{class t{constructor(){this.dialogRef=f(R),this.config=new M,this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config=new M,this.config.title="Register Plugo",this.config.okText="SAVE"}initFormGroup(){this.formGroup=new x({ApiKey:new G(null,[I.required]),VendorID:new G(null,[I.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let o=this.formGroup.value;this.dialogRef.close(o)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-modal-register-plugo"]],decls:13,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control"],["for","VendorID"]],template:function(a,e){if(a&1&&(n(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onOk()}),n(1,"div",1)(2,"form",2)(3,"div",3),v(4,"input",4),n(5,"label",5),l(6,"Api Key"),i(),u(7,Qe,2,0,"div",6),i(),n(8,"div",3),v(9,"input",7),n(10,"label",8),l(11,"Vendor ID"),i(),u(12,xe,2,0,"div",6),i()()()()),a&2){let r,d,h,y;m("config",e.config),p(2),m("formGroup",e.formGroup),p(2),T("is-invalid",(e.formGroup==null||(r=e.formGroup.get("ApiKey"))==null?null:r.invalid)&&((e.formGroup==null||(r=e.formGroup.get("ApiKey"))==null?null:r.dirty)||(e.formGroup==null||(r=e.formGroup.get("ApiKey"))==null?null:r.touched))),p(3),c(!(e.formGroup==null||(d=e.formGroup.get("ApiKey"))==null)&&d.getError("required")&&(!(e.formGroup==null||(d=e.formGroup.get("ApiKey"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("ApiKey"))==null)&&d.touched)?7:-1),p(2),T("is-invalid",(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.touched))),p(3),c(!(e.formGroup==null||(y=e.formGroup.get("VendorID"))==null)&&y.getError("required")&&(!(e.formGroup==null||(y=e.formGroup.get("VendorID"))==null)&&y.dirty||!(e.formGroup==null||(y=e.formGroup.get("VendorID"))==null)&&y.touched)?12:-1)}},dependencies:[O,te,X,D,E,Q,ee,$],encapsulation:2,changeDetection:0})}}return t})();var A=(function(t){return t.SHOPEE="https://resc.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",t.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",t.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et0nVvqFFWlzQAUTV8rmlbmUeLr6IARhVkELW6AAAVU0lEQVR4nO1dj3/aOJYnONTGdkqbBKgLh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Z5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",t.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",t.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",t.TIKTOK="https://resc.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",t.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",t.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",t})(A||{});var Je=["*"],Xe=(t,s,o,a,e,r,d,h)=>({"btn-shopee":t,"btn-lazada":s,"btn-tiktok":o,"btn-woocommerce":a,"btn-tokopedia":e,"btn-shopify":r,"btn-kalcare":d,"btn-plugo":h});function $e(t,s){t&1&&(F(0,"div",1)(1,"span"),l(2,"BETA"),Z()())}var Ge=(()=>{class t{constructor(){this.disabled=q(!1),this.type=q(void 0),this.isBeta=q(!1),this.authorize=new pe,this.channelType=C,this.buttonName=q("Authorize Account")}ngOnChanges(o){o.type&&(this.initChannelImage(),this.channelType.Shopee)}initChannelImage(){switch(this.type()){case C.Tokopedia:this.image=A.TOKOPEDIA;break;case C.WooCommerce:this.image=A.WOOCOMMERCE;break;case C.Shopee:this.image=A.SHOPEE;break;case C.Tiktok:this.image=A.TIKTOK;break;case C.Lazada:this.image=A.LAZADA;break;case C.Shopify:this.image=A.SHOPIFY;break;case C.Plugo:this.image=A.PLUGO;break}}onAuthorize(){this.authorize.emit()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-channel-widget"]],inputs:{disabled:[1,"disabled"],type:[1,"type"],isBeta:[1,"isBeta"],buttonName:[1,"buttonName"]},outputs:{authorize:"onAuthorize"},features:[de],ngContentSelectors:Je,decls:10,vars:14,consts:[[1,"card","h-100","ribbon-box"],[1,"ribbon","ribbon-top-right"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click"]],template:function(a,e){a&1&&(he(),F(0,"div",0),u(1,$e,3,0,"div",1),F(2,"div",2),se(3,"img",3),Z(),F(4,"div",4)(5,"div"),ge(6),Z()(),F(7,"div",5)(8,"a",6),ce("click",function(){return e.onAuthorize()}),l(9),Z()()()),a&2&&(p(),c(e.isBeta()?1:-1),p(2),ue("src",e.image,me),p(5),H(Ce(5,Xe,e.type()==e.channelType.Shopee,e.type()==e.channelType.Lazada,e.type()==e.channelType.Tiktok,e.type()==e.channelType.WooCommerce,e.type()==e.channelType.Tokopedia,e.type()==e.channelType.Shopify,e.type()==e.channelType.KalCare,e.type()==e.channelType.Plugo)),p(),B(" ",e.buttonName()," "))},styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}'],changeDetection:0})}}return t})();function et(t,s){if(t&1){let o=L();n(0,"div",3)(1,"div",6)(2,"app-channel-widget",9),g("onAuthorize",function(){_(o);let e=k();return b(e.openPlugoDialog())}),n(3,"p"),l(4,"Authorize DEALPOS to manage your Plugo Store."),i(),n(5,"p"),l(6," Configure Plugo x DealPOS integration by visiting this "),n(7,"a",14),l(8," article. "),i()()()()()}if(t&2){let o=k();p(2),m("type",o.channelType.Plugo)}}var ro=(()=>{class t{constructor(){this.http=f(_e),this.router=f(be),this.dialog=f(ke),this.toastr=f(ye),this.disabled=P(!1),this.newFeatureVisible=P(!1),this.channelType=C}shopeeAuthorize(){this.http.post(w.ShopeeV2_URL).subscribe(o=>{window.open(o.Url,"_blank")})}tiktokAuthorize(){this.http.post(w.Tiktok_URL).subscribe(o=>{window.open(o.Url,"_blank")})}lazadaAuthorize(){this.http.post(w.Lazada_URL).subscribe(o=>{window.open(o.Url,"_blank")})}openTokopediaDialog(){this.dialog.open(De,{data:{title:"Tokopedia"},width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddTokopedia,{ShopID:o}))).subscribe(o=>{this.onSuccessAddChannel()})}openShopifyDialog(){this.dialog.open(ie,{data:{title:"Shopify",channelType:C.Shopify},width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddShopify,o))).subscribe(o=>{window.open(o.Url,"_blank")})}openWooCommerceDialog(){this.dialog.open(ie,{data:{title:"WooCommerce",channelType:C.WooCommerce},width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddWoocommerce,o))).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ee,{width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>this.http.post(w.AddPlugo,o))).subscribe(()=>{this.onSuccessAddChannel()})}contactSupport(){this.dialog.open(we,{width:"30%"}).afterClosed().pipe(N(o=>K.IsNotEmpty(o)),z(o=>{let a={URL:o.URL,Email:o.Email};return this.http.post("/api/ChannelAuthorization/Tokopedia_Intercom",a).pipe(re(()=>o))})).subscribe(o=>{this.toastr.success("Your request has been received, we will be in touch at "+o.Email,"Thank you!")})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}onToggleNewVersion(o){this.newFeatureVisible.set(o)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-marketplace-add"]],decls:56,vars:10,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Authorization is Closed",3,"type","disabled"],["type","button","href","https://seller-id.tokopedia.com/university/essay?knowledge_id=1189016095426305&default_language=id-ID&identity=1",1,"button","text-primary","fw-bold"],["buttonName","Register",3,"onAuthorize","type"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"p-5","text-start"],[3,"change"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"]],template:function(a,e){a&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Cancel"),i()(),n(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),g("onAuthorize",function(){return e.shopeeAuthorize()}),n(9,"p"),l(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),i(),n(11,"p"),l(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),i()()(),n(13,"div",6)(14,"app-channel-widget",7)(15,"p"),l(16," Starting from middle of Quarter 1 2025, Seller can no longer create or authorize their shop to Third Party Service without having a merge to their Tiktok Seller Account. "),i(),v(17,"br"),n(18,"p"),l(19," Please visit "),n(20,"a",8),l(21,"This Article From Tiktok x Tokopedia"),i(),l(22," to complete the merge process. After that seller can authorize their shop to DEALPOS only via Tiktok x Tokopedia Options. "),i()()(),n(23,"div",4)(24,"app-channel-widget",5),g("onAuthorize",function(){return e.tiktokAuthorize()}),n(25,"p"),l(26," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),i(),n(27,"p"),l(28," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),i()()()(),n(29,"div",3)(30,"div",6)(31,"app-channel-widget",9),g("onAuthorize",function(){return e.openWooCommerceDialog()}),n(32,"p"),l(33,"Authorize DEALPOS to manage your Personal Website."),i(),n(34,"p"),l(35," Configure woocommerce integration by visiting "),n(36,"a",10),l(37,"this article."),i()()()(),n(38,"div",6)(39,"app-channel-widget",5),g("onAuthorize",function(){return e.lazadaAuthorize()}),n(40,"p"),l(41," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),i(),n(42,"p"),l(43," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),i()()(),n(44,"div",4)(45,"app-channel-widget",9),g("onAuthorize",function(){return e.openShopifyDialog()}),n(46,"p"),l(47,"Authorize DEALPOS to manage your Personal Website."),i(),n(48,"p"),l(49," Configure Shopify integration by visiting "),n(50,"a",11),l(51,"this article."),i()()()()(),u(52,et,9,1,"div",3),i(),n(53,"div",12)(54,"mat-slide-toggle",13),g("change",function(d){return e.onToggleNewVersion(d.checked)}),l(55,"Show Beta Channel Integration "),i()()()()),a&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),p(8),m("type",e.channelType.Shopee),p(6),m("type",e.channelType.Tokopedia)("disabled",e.disabled()),p(10),m("type",e.channelType.Tiktok),p(7),m("type",e.channelType.WooCommerce),p(8),m("type",e.channelType.Lazada),p(6),m("type",e.channelType.Shopify),p(7),c(e.newFeatureVisible()?52:-1))},dependencies:[Te,Se,Ge,Ae],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"],changeDetection:0})}}return t})();export{ro as MarketplaceAddComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z,b as A,c as u}from"./chunk-
|
|
1
|
+
import{a as z,b as A,c as u}from"./chunk-JZY7PXZT.js";import"./chunk-4VNQYYVV.js";import{b as W}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import{b as V}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{a as J}from"./chunk-ZSUWHVKX.js";import"./chunk-5XPG2TEC.js";import{b as Y,c as j}from"./chunk-I4MUFYEG.js";import"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import{b as H}from"./chunk-M5YUVUTR.js";import{e as U}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{D as $}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as L,Ga as D,Kb as N,Oc as n,Pc as a,Qc as R,ad as w,bc as f,bd as M,dc as b,fc as _,gc as S,hc as h,ic as p,jc as e,kc as t,kd as B,lc as F,ld as G,mb as r,na as v,xc as x,zc as d}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var q=i=>[i],K=()=>["/menu/channel/pos/edit"];function Q(i,s){i&1&&(e(0,"a",16),F(1,"i",17),n(2," Edit"),t()),i&2&&p("routerLink",w(1,K))}function X(i,s){if(i&1&&(e(0,"span",18),n(1),t()),i&2){let l=d().$implicit;p("matTooltip",l.desc),r(),a(l.label)}}function Z(i,s){if(i&1&&f(0,X,2,2,"span",18),i&2){let l,m=s.$implicit,o=d();b(((l=o.form())==null?null:l.POSInventoryLog)==m.value?0:-1)}}function ee(i,s){if(i&1&&(e(0,"span",18),n(1),t()),i&2){let l=d().$implicit;p("matTooltip",l.desc),r(),a(l.label)}}function te(i,s){if(i&1&&f(0,ee,2,2,"span",18),i&2){let l,m=s.$implicit,o=d();b(((l=o.form())==null?null:l.ChannelInventoryLog)==m.value?0:-1)}}var he=(()=>{class i{constructor(){this.toastr=v(H),this.posService=v(z),this.form=D(new A),this.roleSetupEdit=J.ChannelEdit,this.inventoryLogTypeOptions=[{value:u.NONE,label:"None",desc:"Not record any log from transaction"},{value:u.ERROR,label:"Error",desc:"Only record error log from transaction"},{value:u.FULL,label:"Full",desc:"Record all log from transaction"}],this.initPageLoader()}initPageLoader(){this.posService.getLoader().subscribe(l=>{this.form.set(l.Form)})}onRefreshToken(){this.posService.refreshToken(this.form()).subscribe(l=>{this.toastr.success("Token has been refreshed!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}onTestChannel(){this.posService.testChannel(this.form()).subscribe(l=>{this.toastr.success("Test was successful!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}static{this.\u0275fac=function(m){return new(m||i)}}static{this.\u0275cmp=L({type:i,selectors:[["app-pos"]],decls:97,vars:17,consts:[["headerTitle","POS",3,"hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-success","btn-lg","text-success","me-2",3,"click"],[3,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],["matTooltipPosition","above",1,"info-label-group","w-100"],["matTooltipPosition","above",1,"info-label-group","w-100","d-flex","justify-content-between"],[1,"btn","btn-outline-success","ms-2","btn-sm",3,"click"],[1,"info-label-group"],["matTooltipPosition","above","matTooltip","Omni Inventory Webhook group by JOB ID",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Omni Inventory Webhook group by Channel ID",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Number of days to look back for orders",1,"info-label-group"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],["matTooltipPosition","above",3,"matTooltip"]],template:function(m,o){if(m&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),x("click",function(){return o.onRefreshToken()}),n(3,"Refresh Token"),t(),N(4,Q,3,2,"ng-template",2),t(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h4"),n(12,"Credentials"),t()(),e(13,"div",8)(14,"div",9)(15,"label"),n(16,"Host"),t(),e(17,"div")(18,"span"),n(19),t()()(),e(20,"div",9)(21,"label"),n(22,"Username "),e(23,"small"),n(24,"(deprecated)"),t()(),e(25,"div")(26,"span"),n(27),t()()(),e(28,"div",9)(29,"label"),n(30,"Client ID Guid "),t(),e(31,"div")(32,"span"),n(33),t()()(),e(34,"div",10)(35,"label"),n(36,"Client Secret Guid"),t(),e(37,"div")(38,"span"),n(39),t()(),e(40,"button",11),x("click",function(){return o.onTestChannel()}),n(41," Validate "),t()(),e(42,"div",9)(43,"label"),n(44,"Notification Email"),t(),e(45,"div")(46,"span"),n(47),t()()()()()(),e(48,"div",5)(49,"div",6)(50,"div",7)(51,"h4"),n(52,"Configuration"),t()(),e(53,"div",8)(54,"div",12)(55,"label"),n(56,"Composite Inventory"),t(),e(57,"div")(58,"span"),n(59),t()()(),e(60,"div",12)(61,"label"),n(62,"Include Parent"),t(),e(63,"div")(64,"span"),n(65),t()()(),e(66,"div",12)(67,"label"),n(68,"Include Child"),t(),e(69,"div")(70,"span"),n(71),t()()(),e(72,"div",12)(73,"label"),n(74,"Identify Order Channel by"),t(),e(75,"div")(76,"span"),n(77),t()()(),e(78,"div",13)(79,"label"),n(80,"Order Inventory Log (Job ID) Mode"),t(),e(81,"div"),S(82,Z,1,1,null,null,_),t()(),e(84,"div",14)(85,"label"),n(86,"Channel Inventory Log Mode"),t(),e(87,"div"),S(88,te,1,1,null,null,_),t()(),e(90,"div",15)(91,"label"),n(92,"Order From Default Days"),t(),e(93,"div")(94,"span"),n(95),B(96,"number"),t()()()()()()()()()()),m&2){let c,y,C,g,E,T,I,P,O,k;p("hideSearchBox",!0)("hideSearchDropdown",!0),r(4),p("ngxPermissionsOnly",M(15,q,o.roleSetupEdit)),r(15),a((c=o.form())==null?null:c.Host),r(8),a((y=o.form())==null?null:y.Username),r(6),a((C=o.form())==null?null:C.ClientIDGuid),r(6),a((g=o.form())==null?null:g.ClientSecretGuid),r(8),a((E=o.form())==null?null:E.NotificationEmail),r(12),a((T=o.form())!=null&&T.CompositeVisible?"Yes":"No"),r(6),a((I=o.form())!=null&&I.IncludeChildrenInventory?"Yes":"No"),r(6),a((P=o.form())!=null&&P.IncludeParentInventory?"Yes":"No"),r(6),R(" ",((O=o.form())==null?null:O.InvoiceType)==0?"Outlet":"Tag"),r(5),h(o.inventoryLogTypeOptions),r(6),h(o.inventoryLogTypeOptions),r(7),a(G(96,13,(k=o.form())==null?null:k.OrderFromDefaultDays))}},dependencies:[W,j,Y,U,V,$],encapsulation:2,changeDetection:0})}}return i})();export{he as PosComponent};
|