marketplacepos 26.37.0 → 26.37.2
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-MXFDTBOJ.js → chunk-24FYU3TX.js} +2 -2
- package/Marketplace/{chunk-VZGQDRXW.js → chunk-27CJ5DPN.js} +1 -1
- package/Marketplace/{chunk-EWP64AG2.js → chunk-2C5BYOWD.js} +1 -1
- package/Marketplace/{chunk-5656ZXVY.js → chunk-2GV7UXQB.js} +1 -1
- package/Marketplace/{chunk-GPO6Z5PZ.js → chunk-2L65AIHF.js} +1 -1
- package/Marketplace/{chunk-NUJVAI3L.js → chunk-2VSICAZL.js} +1 -1
- package/Marketplace/{chunk-CQNHKIVJ.js → chunk-2YXL2CC3.js} +1 -1
- package/Marketplace/{chunk-DWCMSH5K.js → chunk-3AA6PBPU.js} +1 -1
- package/Marketplace/{chunk-JZD3TLKH.js → chunk-3LECFMPC.js} +1 -1
- package/Marketplace/{chunk-TPJIIJ6Y.js → chunk-3SFUSVHW.js} +1 -1
- package/Marketplace/{chunk-X7ZFFAS4.js → chunk-4QEZT4CJ.js} +1 -1
- package/Marketplace/{chunk-VNZHYZEZ.js → chunk-55T3BDIL.js} +1 -1
- package/Marketplace/{chunk-S4AU3QN6.js → chunk-5FSRV5IZ.js} +1 -1
- package/Marketplace/{chunk-RY3SF657.js → chunk-5SSQVIW3.js} +1 -1
- package/Marketplace/{chunk-IA2ORSCA.js → chunk-5WFO2XFA.js} +1 -1
- package/Marketplace/{chunk-QOQXRWHN.js → chunk-6UDESNLL.js} +1 -1
- package/Marketplace/{chunk-VUTHZB7U.js → chunk-6UG6XRHE.js} +1 -1
- package/Marketplace/{chunk-SJ66HWK4.js → chunk-6WJLMDPU.js} +1 -1
- package/Marketplace/{chunk-5AZKP5ON.js → chunk-7AWV3DQQ.js} +1 -1
- package/Marketplace/{chunk-AWZ7I4MY.js → chunk-7E7IEGEM.js} +1 -1
- package/Marketplace/{chunk-X4PAF72T.js → chunk-7OC6LSH2.js} +1 -1
- package/Marketplace/{chunk-DJ5YOQ3W.js → chunk-7PDBGWPD.js} +1 -1
- package/Marketplace/{chunk-SUHX3P2M.js → chunk-A6XWGFYA.js} +1 -1
- package/Marketplace/{chunk-SJ3NWZZI.js → chunk-CAUGDIZO.js} +1 -1
- package/Marketplace/{chunk-YCC3D4BD.js → chunk-CRGZJQVV.js} +1 -1
- package/Marketplace/{chunk-BY43P42L.js → chunk-CUBACJYK.js} +1 -1
- package/Marketplace/{chunk-3R576OF7.js → chunk-CX5N32SN.js} +1 -1
- package/Marketplace/{chunk-RCNIE32A.js → chunk-D32PNWNN.js} +1 -1
- package/Marketplace/{chunk-OI2Y5L3U.js → chunk-DUBOZZ6G.js} +1 -1
- package/Marketplace/{chunk-VZVDWWYR.js → chunk-FXQMHASO.js} +1 -1
- package/Marketplace/{chunk-U3WYZT3P.js → chunk-HQXFP4HC.js} +1 -1
- package/Marketplace/{chunk-CPXE5NI4.js → chunk-ILULW3SJ.js} +1 -1
- package/Marketplace/{chunk-22KFQP7K.js → chunk-J367RCWD.js} +1 -1
- package/Marketplace/{chunk-YWIC7FBL.js → chunk-JWD3DYEO.js} +1 -1
- package/Marketplace/{chunk-7Q6GBOH4.js → chunk-LNY3G5YR.js} +1 -1
- package/Marketplace/{chunk-VRQRDXFE.js → chunk-MQOPBJVN.js} +1 -1
- package/Marketplace/{chunk-EULAD32X.js → chunk-MRRJQFJT.js} +1 -1
- package/Marketplace/{chunk-CBPLP5KM.js → chunk-NLXTNMXE.js} +1 -1
- package/Marketplace/{chunk-7NFSKL7V.js → chunk-NRGCBMHR.js} +1 -1
- package/Marketplace/{chunk-OOTYGIOA.js → chunk-PBFZIGOR.js} +1 -1
- package/Marketplace/{chunk-CYMSG4SQ.js → chunk-PRHUXFZK.js} +1 -1
- package/Marketplace/{chunk-YHBCGYMD.js → chunk-QJZ6UJ4J.js} +1 -1
- package/Marketplace/{chunk-RMWYDIOE.js → chunk-R73X6IHC.js} +1 -1
- package/Marketplace/{chunk-T5ZVWNMI.js → chunk-RSPHCKF7.js} +1 -1
- package/Marketplace/{chunk-HDOHDT72.js → chunk-SP4ZR3OK.js} +1 -1
- package/Marketplace/{chunk-SZ756U54.js → chunk-SPCKVS4G.js} +1 -1
- package/Marketplace/{chunk-3AHDGSDZ.js → chunk-TMGK27X5.js} +1 -1
- package/Marketplace/{chunk-E4JMBCRY.js → chunk-TRB4ZCSN.js} +1 -1
- package/Marketplace/{chunk-DET2B64Z.js → chunk-U3F77R4P.js} +1 -1
- package/Marketplace/{chunk-UL5MOBE4.js → chunk-VRNCJCJV.js} +1 -1
- package/Marketplace/{chunk-A2FHUABF.js → chunk-VXZ4CGP3.js} +1 -1
- package/Marketplace/{chunk-IHVJG5CF.js → chunk-XEYOOZEA.js} +1 -1
- package/Marketplace/{chunk-T3ZIOJO3.js → chunk-XMKI4MB7.js} +1 -1
- package/Marketplace/{chunk-7OJV2RV3.js → chunk-XQRK5ZMB.js} +1 -1
- package/Marketplace/{chunk-BMWI7ADT.js → chunk-YDY5HFZB.js} +1 -1
- package/Marketplace/{chunk-57OX7QKF.js → chunk-YFLATI32.js} +4 -4
- package/Marketplace/{chunk-T6S52NDP.js → chunk-YIPB2GKR.js} +1 -1
- package/Marketplace/{chunk-7AYF5FIG.js → chunk-YJUIVUMV.js} +1 -1
- package/Marketplace/{chunk-JVESOQ6Y.js → chunk-YNIK7GUD.js} +1 -1
- package/Marketplace/{chunk-PXDO6BPF.js → chunk-ZXG7JMIB.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-E7DSG4SE.js → main-ITLEX22R.js} +2 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as be}from"./chunk-CPPEDF2S.js";import"./chunk-4VNQYYVV.js";import{a as m}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-4J3MK6EF.js").then(e=>e.routes),canActivate:[m],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-5QF7B22N.js").then(e=>e.routes),canActivate:[m,g,be],data:{title:"Dashboard",roles:[a.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-S4AU3QN6.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Products",roles:[a.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-SUHX3P2M.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Inventory",roles:[a.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-U3WYZT3P.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Price",roles:[a.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-CBPLP5KM.js").then(e=>e.routes),canActivate:[m],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-IHVJG5CF.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Report",roles:[a.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-AWZ7I4MY.js").then(e=>e.LogisticComponent)},canActivate:[m,g],data:{title:"Logistic",roles:[a.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-7OJV2RV3.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Marketplace",roles:[a.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-5AZKP5ON.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Orders",roles:[a.DevView]}},{path:"users",loadChildren:()=>import("./chunk-G2YFPSZK.js").then(e=>e.userRoutes),canActivate:[m,g],data:{title:"Users",roles:[a.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-VNZHYZEZ.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-CPPEDF2S.js";import"./chunk-4VNQYYVV.js";import{a as m}from"./chunk-ZXG7JMIB.js";import{c as _e}from"./chunk-H7BH5V5K.js";import"./chunk-KLVAH3GT.js";import{b as he}from"./chunk-XMKI4MB7.js";import"./chunk-BGFEVOPZ.js";import{a as ge}from"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import{a as fe}from"./chunk-6GXJ4SD6.js";import"./chunk-GMRSDMCF.js";import"./chunk-FQLH72J4.js";import"./chunk-HD5RAZOS.js";import"./chunk-J7VARP7L.js";import{b as ue}from"./chunk-NCHJULNE.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-KZWEUXCA.js";import{a}from"./chunk-ZSUWHVKX.js";import{b as q,h as pe}from"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import"./chunk-HZRIS4FA.js";import{a as de,b as me,c as ce}from"./chunk-Q5PH4VIQ.js";import"./chunk-NNVT5X6O.js";import"./chunk-NZPISKQV.js";import"./chunk-UC7FUQNJ.js";import{c as oe,d as re,e as se,f as le,g as A}from"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{B as K,F as Q,r as J,z as Z}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{$b as H,Bd as w,Cb as S,Dc as M,Fc as E,Gc as p,Ha as N,Hc as y,Ic as C,Vb as _,Wb as $,Xb as v,Zb as j,_b as G,ac as u,bc as o,ca as f,cb as U,cc as l,cd as T,dc as h,dd as D,eb as s,ga as r,ob as V,pc as z,q as R,rc as c,sa as B,wa as L,wb as x,xb as b,yb as F}from"./chunk-YU6N3IVV.js";import{h as k}from"./chunk-QWWW7GFA.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-4J3MK6EF.js").then(e=>e.routes),canActivate:[m],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-5QF7B22N.js").then(e=>e.routes),canActivate:[m,g,be],data:{title:"Dashboard",roles:[a.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-5FSRV5IZ.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Products",roles:[a.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-A6XWGFYA.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Inventory",roles:[a.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-HQXFP4HC.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Price",roles:[a.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-NLXTNMXE.js").then(e=>e.routes),canActivate:[m],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-XEYOOZEA.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Report",roles:[a.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-7E7IEGEM.js").then(e=>e.LogisticComponent)},canActivate:[m,g],data:{title:"Logistic",roles:[a.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-XQRK5ZMB.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Marketplace",roles:[a.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-7AWV3DQQ.js").then(e=>e.routes),canActivate:[m,g],data:{title:"Orders",roles:[a.DevView]}},{path:"users",loadChildren:()=>import("./chunk-G2YFPSZK.js").then(e=>e.userRoutes),canActivate:[m,g],data:{title:"Users",roles:[a.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-55T3BDIL.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 re}from"./chunk-
|
|
1
|
+
import{a as re}from"./chunk-U3F77R4P.js";import{a as E}from"./chunk-5XFVP3GT.js";import{a as ne}from"./chunk-RIX56SWS.js";import{a as ie}from"./chunk-4IMPHM2L.js";import{a as te}from"./chunk-VXZ4CGP3.js";import"./chunk-OQVWI5RR.js";import"./chunk-6EZURWCE.js";import"./chunk-IUP257JK.js";import"./chunk-G7EFF2OH.js";import{a as ee}from"./chunk-WFQ6MTNV.js";import{a as $}from"./chunk-FBZA4TL3.js";import"./chunk-GRBY6A25.js";import"./chunk-XJ647P3Z.js";import"./chunk-NVFPEIBK.js";import"./chunk-2WNLMFBJ.js";import"./chunk-HHIYV6SY.js";import"./chunk-KOBEFS2S.js";import"./chunk-3E64KI3Y.js";import"./chunk-6IBSQ4O6.js";import"./chunk-BGFEVOPZ.js";import"./chunk-Q3STYUEA.js";import"./chunk-DIWXDN75.js";import"./chunk-MZNVUECO.js";import{b as Z}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import{a as Y}from"./chunk-6GXJ4SD6.js";import"./chunk-FI7KHIPS.js";import"./chunk-2767EOG5.js";import"./chunk-6UFKTBFI.js";import"./chunk-EYRMOG2V.js";import"./chunk-H5YNAWK2.js";import"./chunk-F7U7V7F4.js";import"./chunk-QUDI2RQN.js";import"./chunk-Y3LPTD5V.js";import"./chunk-G6DXF6MT.js";import"./chunk-XU7ZLD5O.js";import"./chunk-GMRSDMCF.js";import"./chunk-TFHB3OE5.js";import"./chunk-XE7FN7WV.js";import"./chunk-FQLH72J4.js";import"./chunk-HD5RAZOS.js";import"./chunk-KOOWEFV6.js";import"./chunk-J7VARP7L.js";import"./chunk-U5LGPDSJ.js";import{b as X}from"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import"./chunk-HZRIS4FA.js";import"./chunk-Q5PH4VIQ.js";import"./chunk-NNVT5X6O.js";import{c as G,h as J,m as K,o as Q,z as U}from"./chunk-NZPISKQV.js";import"./chunk-UC7FUQNJ.js";import"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{B as j,D as q,z as R}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{$b as B,Gc as l,Hc as h,Kc as c,Lc as u,Mc as C,Nc as I,Oc as k,Pc as A,R as V,Tc as z,Vb as W,Xb as F,Yb as N,_b as L,ac as g,bc as e,cc as t,cd as w,dc as _,dd as x,eb as a,ed as H,ga as P,kc as b,na as p,oa as s,pc as v,rc as y,wb as D,za as O}from"./chunk-YU6N3IVV.js";import{a as M,b as T}from"./chunk-QWWW7GFA.js";function ae(d,S){if(d&1&&(e(0,"tr")(1,"td"),l(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),l(6),t(),e(7,"td"),l(8),w(9,"number"),t(),e(10,"td"),l(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),d&2){let r=S.$implicit;a(2),h(r.Outlet),a(2),g("order",r),a(2),h(r.Customer),a(2),h(x(9,6,r.Amount)),a(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),a(3),g("typeId",r==null?null:r.TypeID)}}function le(d,S){if(d&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),t(),e(6,"th",21),l(7,"Order number"),t(),e(8,"th"),l(9,"Customer"),t(),e(10,"th",22),l(11,"Amount"),t(),e(12,"th",23),l(13," Created On "),t(),e(14,"th",24),l(15,"Channel"),t()()(),e(16,"tbody"),L(17,ae,15,11,"tr",null,N),t()(),e(19,"app-custom-paginator",25),v("next",function(){p(r);let i=y();return s(i.initCancelledOrders())})("previous",function(){p(r);let i=y();return s(i.initCancelledOrders())}),t()()}if(d&2){let r=y(),o=A(0);a(17),B(o),a(2),g("filter",r.filter())("totaldata",o==null?null:o.length)("paginationTotal",o==null?null:o.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function oe(d,S){d&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Te=(()=>{class d{constructor(){this.orderService=P(E),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:r=>{this.initFromDate(r)},error:r=>{console.error("Error fetching default date:",r),this.initFromDate(null)}})}initFromDate(r){this.filter.update(o=>T(M({},o),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(V(1))}static{this.\u0275fac=function(o){return new(o||d)}}static{this.\u0275cmp=D({type:d,selectors:[["app-cancelled"]],features:[z([E])],decls:34,vars:11,consts:[["headerTitle","Cancelled","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(o,i){if(o&1){let m=b();I(0),w(1,"async"),e(2,"mainpanel",0),v("onSubmit",function(){return p(m),s(i.initCancelledOrders())}),C("textChange",function(n){return p(m),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),l(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),t(),e(12,"app-channel-options-v2",4),C("ngModelChange",function(n){return p(m),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),l(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(m),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(m),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),l(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(m),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),l(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(m),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),W(32,le,20,5,"div",15)(33,oe,2,0,"div",16),t()()()()()}if(o&2){let m=k(x(1,8,i.cancelledOrders$));a(2),c("text",i.filter().Number),a(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),a(5),c("date",i.filter().From),a(2),c("date",i.filter().To),a(4),c("ngModel",i.filter().PageNumber),a(4),c("ngModel",i.filter().PageSize),a(5),F((m==null?null:m.length)>0?32:33)}},dependencies:[Z,$,ee,U,G,Q,J,K,ne,Y,X,re,ie,te,R,j,q],encapsulation:2,changeDetection:0})}}return d})();export{Te as CancelledComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as w}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import{b as N}from"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import{h as M}from"./chunk-
|
|
1
|
+
import{b as w}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import{b as N}from"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import{h as M}from"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import"./chunk-HZRIS4FA.js";import"./chunk-Q5PH4VIQ.js";import"./chunk-NNVT5X6O.js";import"./chunk-NZPISKQV.js";import{e as C}from"./chunk-UC7FUQNJ.js";import{b as T}from"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{B as b,C as y}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{Gc as r,Hc as l,Vb as f,Xb as E,ac as s,ba as h,bc as i,cc as n,cd as c,dc as D,dd as u,eb as o,ed as g,ga as p,kd as I,q as m,wb as S,za as x}from"./chunk-YU6N3IVV.js";import"./chunk-QWWW7GFA.js";var O=(()=>{class a{constructor(){this.httpService=p(C)}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(m(d=>d?.hits[0]?._source))}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=h({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();function k(a,j){if(a&1&&(i(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),n()(),i(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),c(16,"date"),n()()()(),i(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()(),i(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),n(),i(42,"div")(43,"span"),r(44),n()()()()()()()()(),i(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),n()(),i(51,"div",6)(52,"pre"),r(53),c(54,"json"),n()()()(),i(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),r(59,"Stack Trace"),n()(),i(60,"div",6),D(61,"pre",12),n()(),i(62,"div",13)(63,"div",5)(64,"h5"),r(65,"Exception Message"),n()(),i(66,"div",6)(67,"pre"),r(68),c(69,"json"),n()()()()()()),a&2){let e=j;o(15),l(g(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),l(e==null||e.error==null?null:e.error.number),o(7),l(e==null?null:e.channelName),o(7),l(e==null?null:e.shopId),o(7),l(e==null?null:e.message),o(9),l(u(54,11,e==null||e.error==null?null:e.error.request)),o(8),s("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),l(u(69,13,e==null||e.error==null?null:e.error.response))}}var W=(()=>{class a{constructor(){this.activatedRoute=p(T),this.exceptionService=p(O),this.authService=p(M),this.channelOptions=x(this.authService.getChannels()),this.exceptionDetail=N(this.exceptionService.getExceptionDetail(this.activatedRoute.snapshot.queryParams?.ID).pipe(m(e=>{let t=e;return{"@timestamp":t["@timestamp"]||t["@timestamp_received"],error:{number:t?.error?.number,stackTrace:t?.error?.stackTrace,request:this.parseJsonSafe(t?.error?.request),response:this.parseJsonSafe(t?.error?.response)},channelName:t?.channelId!=null?this.channelOptions().find(d=>d.ID===t?.channelId)?.Name:t?.shopId,shopId:t?.shopId,message:t?.message}})),{initialValue:null}),this.headerTitle=I(()=>{let e=this.exceptionDetail();return e?.error?.number?"Order #"+e.error.number:"Order"})}parseJsonSafe(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=S({type:a,selectors:[["app-exception-detail"]],decls:3,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(t,d){if(t&1&&(i(0,"mainpanel",0)(1,"content"),f(2,k,70,15,"div",1),n()()),t&2){let v;s("headerTitle",d.headerTitle())("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),E((v=d.exceptionDetail())?2:-1,v)}},dependencies:[w,y,b],encapsulation:2,changeDetection:0})}}return a})();export{W as ExceptionDetailComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as te}from"./chunk-VOQ5S4Z6.js";import{a as ee}from"./chunk-RIX56SWS.js";import"./chunk-YLDUJ4GY.js";import"./chunk-KLVAH3GT.js";import{a as Z}from"./chunk-FBZA4TL3.js";import"./chunk-BGFEVOPZ.js";import{a as W,b as X,d as Y}from"./chunk-EAPRH7EP.js";import{b as Q}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import"./chunk-FI7KHIPS.js";import"./chunk-2767EOG5.js";import"./chunk-6UFKTBFI.js";import"./chunk-EYRMOG2V.js";import"./chunk-H5YNAWK2.js";import"./chunk-F7U7V7F4.js";import"./chunk-QUDI2RQN.js";import"./chunk-Y3LPTD5V.js";import"./chunk-G6DXF6MT.js";import"./chunk-XU7ZLD5O.js";import"./chunk-GMRSDMCF.js";import"./chunk-TFHB3OE5.js";import"./chunk-XE7FN7WV.js";import"./chunk-FQLH72J4.js";import"./chunk-HD5RAZOS.js";import"./chunk-J7VARP7L.js";import{c as E}from"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import{h as j}from"./chunk-
|
|
1
|
+
import{a as te}from"./chunk-VOQ5S4Z6.js";import{a as ee}from"./chunk-RIX56SWS.js";import"./chunk-YLDUJ4GY.js";import"./chunk-KLVAH3GT.js";import{a as Z}from"./chunk-FBZA4TL3.js";import"./chunk-BGFEVOPZ.js";import{a as W,b as X,d as Y}from"./chunk-EAPRH7EP.js";import{b as Q}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import"./chunk-FI7KHIPS.js";import"./chunk-2767EOG5.js";import"./chunk-6UFKTBFI.js";import"./chunk-EYRMOG2V.js";import"./chunk-H5YNAWK2.js";import"./chunk-F7U7V7F4.js";import"./chunk-QUDI2RQN.js";import"./chunk-Y3LPTD5V.js";import"./chunk-G6DXF6MT.js";import"./chunk-XU7ZLD5O.js";import"./chunk-GMRSDMCF.js";import"./chunk-TFHB3OE5.js";import"./chunk-XE7FN7WV.js";import"./chunk-FQLH72J4.js";import"./chunk-HD5RAZOS.js";import"./chunk-J7VARP7L.js";import{c as E}from"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import{h as j}from"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import"./chunk-HZRIS4FA.js";import"./chunk-Q5PH4VIQ.js";import"./chunk-NNVT5X6O.js";import{c as G,h as J,m as U,o as $,z as K}from"./chunk-NZPISKQV.js";import{e as B}from"./chunk-UC7FUQNJ.js";import{e as H}from"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{B as q}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{$b as P,Ca as y,Cb as I,Da as D,Gc as l,Hc as R,Ic as _,Uc as O,Vb as C,Vc as z,X as T,Xb as x,Zb as w,_b as F,ac as d,bc as n,cb as S,cc as i,cd as V,dc as b,eb as r,ed as A,ga as v,kc as k,na as N,oa as M,pc as c,rc as h,wb as L,za as g}from"./chunk-YU6N3IVV.js";import{a as u,b as f}from"./chunk-QWWW7GFA.js";var ne=()=>["/menu/log/exception/detail"],ie=o=>({ID:o});function oe(o,s){if(o&1&&(n(0,"span",17),b(1,"img",18),i(),l(2)),o&2){let e=s.item;r(),d("src",e.Img,S)("alt",e.Name),r(),_(" ",e.Name," ")}}function ae(o,s){if(o&1&&b(0,"img",23),o&2){let e=h().$implicit;d("src",e.Logo,S)}}function re(o,s){if(o&1&&(n(0,"tr")(1,"td"),C(2,ae,1,1,"img",23),l(3),i(),n(4,"td")(5,"a",24),l(6),i()(),n(7,"td"),l(8),V(9,"date"),i(),n(10,"td")(11,"div"),l(12),i()()()),o&2){let e=s.$implicit;r(2),x(e.Logo?2:-1),r(),_(" ",e.ChannelName," "),r(2),d("routerLink",O(10,ne))("queryParams",z(11,ie,e.id)),r(),_(" ",e.number??"N/A"," "),r(2),_(" ",A(9,7,e.date,"dd-MM-yyyy hh:mm:ss")," "),r(4),R(e.response)}}function le(o,s){if(o&1){let e=k();n(0,"mat-paginator",25),c("page",function(t){N(e);let m=h(2);return M(m.onPaginationChange(t))}),i()}if(o&2){let e=h(2);d("length",e.pageTotal())("pageSize",e.pageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function me(o,s){if(o&1&&(n(0,"div",15)(1,"table",19)(2,"thead")(3,"tr",20)(4,"th",21),l(5,"Channel Name"),i(),n(6,"th",21),l(7,"Number"),i(),n(8,"th",21),l(9,"Date"),i(),n(10,"th"),l(11,"Exception"),i()()(),n(12,"tbody"),F(13,re,13,13,"tr",null,w),i()(),C(15,le,1,3,"mat-paginator",22),i()),o&2){let e,a=h();r(13),P(a.exceptions()),r(2),x(((e=a.exceptions())==null?null:e.length)>0?15:-1)}}function pe(o,s){o&1&&(n(0,"div",16),b(1,"app-empty-state"),i())}var De=(()=>{class o{constructor(){this.http=v(B),this.authService=v(j),this.exceptions=g([]),this.pageTotal=g(0),this.pageSize=g(0),this.filter=g({RowCount:50,PageNumber:1,Number:null,From:null,To:null,ChannelID:null}),this.channelOptions=g(this.authService.getChannels()),this.loaderResource=E({params:()=>0,stream:()=>this.http.post("/api/OrdersLoader/Get",{})}),this.reloadToken=g(0),this.resource=E({params:()=>this.reloadToken(),stream:()=>this.http.post("/api/Orders/GetExceptionList",this.filter()).pipe(T(e=>{this.exceptions.set(e.hits.map(a=>{let t=a._source||{};return{id:a._id,ChannelName:t.channelId!=null?this.channelOptions().find(m=>m.ID===t.channelId)?.Name:t.shopId,Logo:t.channelId!=null?this.channelOptions().find(m=>m.ID===t.channelId)?.Img:null,number:t.error?.number,date:t["@timestamp_received"]||t["@timestamp"]||null,stackTrace:t.error?.stackTrace,response:t.error?.response,message:t.message,requestJSON:t.error?.requestJSON}})),this.pageTotal.set(e.total?.value),this.pageSize.set(this.filter().RowCount>this.pageTotal()?this.pageTotal():this.filter()?.RowCount)}))}),y(()=>{let e=this.loaderResource.value();e&&(this.filter.update(a=>u(u({},a),e.Filter)),D(()=>this.getData()))})}getData(e){this.filter.update(a=>f(u({},a),{Number:e})),this.reloadToken.update(a=>a+1)}onPaginationChange(e){this.filter.update(a=>f(u({},a),{PageNumber:e.pageIndex+1})),this.getData()}updateFilter(e,a){this.filter.update(t=>f(u({},t),{[e]:a}))}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275cmp=L({type:o,selectors:[["app-exception-log"]],decls:28,vars:8,consts:[["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...",3,"onSubmit"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","10%"],[3,"length","pageSize","pageIndex"],["alt","Logo",2,"width","18px",3,"src"],[3,"routerLink","queryParams"],[3,"page","length","pageSize","pageIndex"]],template:function(a,t){a&1&&(n(0,"mainpanel",0),c("onSubmit",function(p){return t.getData(p)}),n(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),i(),n(5,"ng-select",2),c("ngModelChange",function(p){return t.updateFilter("ChannelID",p)}),I(6,oe,3,3,"ng-template",3),i()(),n(7,"div",4)(8,"label",5),l(9,"From/To"),i(),n(10,"div",6)(11,"datepicker",7),c("dateChange",function(p){return t.updateFilter("From",p)}),i()(),n(12,"div")(13,"datepicker",8),c("dateChange",function(p){return t.updateFilter("To",p)}),i()()(),n(14,"div",4)(15,"label",9),l(16,"Page Number"),i(),n(17,"input",10),c("ngModelChange",function(p){return t.updateFilter("PageNumber",p)}),i()(),n(18,"div",4)(19,"label",9),l(20,"Page Size"),i(),n(21,"input",11),c("ngModelChange",function(p){return t.updateFilter("RowCount",p)}),i()()(),n(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),C(26,me,16,1,"div",15)(27,pe,2,0,"div",16),i()()()()()),a&2&&(r(5),d("clearable",!0)("items",t.channelOptions())("ngModel",t.filter().ChannelID),r(6),d("date",t.filter().From),r(2),d("date",t.filter().To),r(4),d("ngModel",t.filter().PageNumber),r(4),d("ngModel",t.filter().RowCount),r(5),x(t.exceptions().length>0?26:27))},dependencies:[Q,Y,K,G,$,J,U,W,X,ee,H,te,Z,q],encapsulation:2,changeDetection:0})}}return o})();export{De as ExceptionLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as q}from"./chunk-4IMPHM2L.js";import{a as z}from"./chunk-
|
|
1
|
+
import{a as q}from"./chunk-4IMPHM2L.js";import{a as z}from"./chunk-VXZ4CGP3.js";import"./chunk-OQVWI5RR.js";import"./chunk-6EZURWCE.js";import"./chunk-IUP257JK.js";import"./chunk-G7EFF2OH.js";import{a as j}from"./chunk-WFQ6MTNV.js";import{a as Z}from"./chunk-PTEWNZIV.js";import"./chunk-GRBY6A25.js";import"./chunk-XJ647P3Z.js";import"./chunk-NVFPEIBK.js";import"./chunk-2WNLMFBJ.js";import"./chunk-HHIYV6SY.js";import"./chunk-KOBEFS2S.js";import"./chunk-3E64KI3Y.js";import"./chunk-6IBSQ4O6.js";import"./chunk-BGFEVOPZ.js";import"./chunk-Q3STYUEA.js";import"./chunk-DIWXDN75.js";import"./chunk-MZNVUECO.js";import{b as H}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import"./chunk-KOOWEFV6.js";import"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import{a as y}from"./chunk-HZRIS4FA.js";import"./chunk-Q5PH4VIQ.js";import"./chunk-NNVT5X6O.js";import{h as W,m as $,z as G}from"./chunk-NZPISKQV.js";import{e as R}from"./chunk-UC7FUQNJ.js";import{e as F,g as O}from"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{D as N,z as A}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{$b as L,Gc as a,Hc as g,Kc as K,Lc as T,Mc as P,Nc as B,R as D,Vb as k,Xb as U,Yb as I,_b as E,ac as d,bc as e,cb as b,cc as t,cd as w,dc as c,dd as v,eb as l,ga as f,kc as x,na as m,oa as u,pc as S,rc as _,wb as M,za as V}from"./chunk-YU6N3IVV.js";import"./chunk-QWWW7GFA.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 z}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-VXZ4CGP3.js";import"./chunk-OQVWI5RR.js";import"./chunk-6EZURWCE.js";import"./chunk-IUP257JK.js";import"./chunk-G7EFF2OH.js";import"./chunk-GRBY6A25.js";import"./chunk-XJ647P3Z.js";import"./chunk-NVFPEIBK.js";import"./chunk-2WNLMFBJ.js";import"./chunk-HHIYV6SY.js";import"./chunk-KOBEFS2S.js";import"./chunk-3E64KI3Y.js";import"./chunk-6IBSQ4O6.js";import"./chunk-BGFEVOPZ.js";import"./chunk-Q3STYUEA.js";import"./chunk-DIWXDN75.js";import"./chunk-MZNVUECO.js";import{b as j}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import"./chunk-KOOWEFV6.js";import{a as I}from"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import{a as T}from"./chunk-HZRIS4FA.js";import"./chunk-Q5PH4VIQ.js";import"./chunk-NNVT5X6O.js";import{c as A,h as V,m as k,z as R}from"./chunk-NZPISKQV.js";import{e as N}from"./chunk-UC7FUQNJ.js";import"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{C as L}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{Gc as i,Hc as O,Nc as S,Oc as y,Pc as f,Vb as b,Xb as v,ac as s,bc as e,cc as t,cd as P,dc as x,dd as D,eb as l,ga as u,kc as M,na as m,oa as p,pc as g,rc as E,ta as C,wb as _,za as h}from"./chunk-YU6N3IVV.js";import"./chunk-QWWW7GFA.js";function F(o,B){if(o&1&&(e(0,"pre",21),i(1),P(2,"json"),t()),o&2){E();let n=f(25);l(),O(D(2,1,n))}}function H(o,B){o&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ne=(()=>{class o{constructor(){this.httpService=u(N),this.destroyRef=u(C),this.escrowLogData=h(null),this.selectedChannel=h(null),this.orderNumber=h(null)}initEscrowLog(){this.httpService.post(T.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(I(this.destroyRef)).subscribe(n=>this.escrowLogData.set(n))}copyToClipboard(n){if(!n)return;let d=typeof n=="string"?n:JSON.stringify(n,null,2);navigator.clipboard.writeText(d),alert("Copied to clipboard!")}static{this.\u0275fac=function(d){return new(d||o)}}static{this.\u0275cmp=_({type:o,selectors:[["app-escrow-api"]],decls:39,vars:7,consts:[["headerTitle","Origin Escrow 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"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","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","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(d,r){if(d&1){let a=M();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return m(a),p(r.initEscrowLog())}),x(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),g("ngModelChange",function(c){return m(a),p(r.selectedChannel.set(c))}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),g("ngModelChange",function(c){return m(a),p(r.orderNumber.set(c))}),t()()()()(),S(25),e(26,"div",13)(27,"div",14)(28,"div",15)(29,"div",16)(30,"h5"),i(31,"Response"),t(),e(32,"button",17),g("click",function(){m(a);let c=f(25);return p(r.copyToClipboard(c))}),i(33," Copy "),t()(),e(34,"div",18)(35,"div",19)(36,"div",20),b(37,F,3,3,"pre",21)(38,H,2,0,"p",22),t()()()()()()()()()}if(d&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),s("ngModel",r.selectedChannel()),l(8),s("ngModel",r.orderNumber()),l();let a=y(r.escrowLogData());l(7),s("disabled",!a),l(5),v(a?37:38)}},dependencies:[R,A,V,k,j,z,L],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}@media(max-width:767.98px){.container-fluid[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}.row[_ngcontent-%COMP%]{flex-direction:column!important;margin-left:0!important;margin-right:0!important}.col-7[_ngcontent-%COMP%], .col-12[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;padding-left:0!important;padding-right:0!important}.d-flex[_ngcontent-%COMP%]{flex-direction:column!important;align-items:stretch!important;gap:1rem}.w-75[_ngcontent-%COMP%], .w-100[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important}.card[_ngcontent-%COMP%]{margin-top:1rem!important}.card-header[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;gap:.5rem}.btn[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}input.form-control[_ngcontent-%COMP%]{width:100%;min-width:0}pre#escrowLogText[_ngcontent-%COMP%]{font-size:.95rem;word-break:break-all;white-space:pre-wrap}}@media(max-width:400px){.card-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:1rem}pre#escrowLogText[_ngcontent-%COMP%]{font-size:.85rem}}"],changeDetection:0})}}return o})();export{ne as EscrowApiComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y,b as T}from"./chunk-
|
|
1
|
+
import{a as y,b as T}from"./chunk-XMKI4MB7.js";import{h as P}from"./chunk-7PDBGWPD.js";import{a as i}from"./chunk-HZRIS4FA.js";import{c as l}from"./chunk-NNVT5X6O.js";import{b as I,e as C}from"./chunk-UC7FUQNJ.js";import{E as h,X as o,ba as g,fa as d,ga as f,m as c,q as m}from"./chunk-YU6N3IVV.js";var H=(()=>{class u{constructor(e,t,n){this.httpService=e,this.toastrService=t,this.notificationService=n,this.authService=f(P),this.scanChannelToastr=f(y)}loader(e=l.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=l.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,t){return e.filter(n=>t.findIndex(r=>n.TypeID==r)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){let t={ID:e};return this.httpService.post("/api/product/TotalProductLive",t)}getTotalProductV2(e,t){let n={ID:e,ProductType:t};return this.httpService.post(i.TotalProductV2,n)}clearCacheChannel(e){let t={ID:e};return this.httpService.post("/api/Channel/ClearCacheChannel",t)}detachProduct(e){return this.httpService.post("/api/product/Detach",e)}uploadSingleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(o(r=>{this.showToastrSuccessUploadSingle(r,e[0])}),h(r=>(this.showToastErrorUploadSingle(r,e[0]),c(()=>new Error(r)))))}uploadMultipleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r.Message)}),h(r=>(this.showToastrUploadMultiple(r.error?.Message),c(()=>new Error(r)))))}uploadNotInChannel(e,t){let n={Products:e,Channel:t};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r)}),h(r=>(this.showToastrUploadMultiple(r.error?.Message),c(()=>new Error(r)))))}scanSingle(e,t){let n={ID:e,SKU:t};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(e){let t={ID:e};return this.httpService.post("/api/product/ScanNotinChannel",t)}findAllSoldInChannel(e){return this.httpService.post(i.GetSoldInChannel,e)}getSoldInChannelDetail(e,t){let n={ID:e,ListChannelID:t};return this.httpService.post(`${i.GetSoldInChannelDetail}`,n).pipe(m(r=>r?.Variants))}scanAll(e,t,n,r=!1){let a={ID:e,ScanFull:t,UpdatedProduct:n,Async:r};return this.httpService.post("/api/product/ScanOptimized",a)}scanAsyncProductV2(e,t,n,r,a,s){let p={ID:e,ProductType:t,TimeRange:n,Async:!0,LastSyncUpdate:r,Update_time_from:a,Update_time_to:s};return this.httpService.post(i.ScanAsyncProductV2,p).pipe(o(S=>{this.notificationService.subscribeToJobGroup(S.JobID)}))}scanSyncProductV2(e,t,n,r,a){let s={ID:e,ProductType:t,TimeRange:n,Async:!1,Update_time_from:r,Update_time_to:a};return this.httpService.post(i.ScanSyncProductV2,s)}scanProductV2(e){let t=this.authService.getChannels(),n=this.findChannelById(e.ID,t);return e.Async?this.scanAsyncProductV2(e.ID,e.ProductType,e.TimeRange,e.LastSyncUpdate,e.Update_time_from,e.Update_time_to).pipe(o(r=>{this.scanChannelToastr.showToast({text:"Scan Job Started",detail:`JobID: ${r.JobID}`,severity:"info",data:{channelName:n.Name,channelTypeId:n.TypeID,jobId:r.JobID}})}),h(r=>(this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:this.extractScanErrorMessage(r),severity:"error",data:{channelName:n?.Name,channelTypeId:n?.TypeID,jobId:null}}),c(()=>r)))):this.scanSyncProductV2(e.ID,e.ProductType,e.TimeRange,e.Update_time_from,e.Update_time_to).pipe(m(r=>r?.Message),o(r=>{this.successToastrScanAllProduct(r,n,!e.TimeRange)}),h(r=>(this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:this.extractScanErrorMessage(r),severity:"error",data:{channelName:n?.Name,channelTypeId:n?.TypeID,jobId:null}}),c(()=>r))))}extractScanErrorMessage(e){let t=e?.error?.Message;return typeof t=="string"&&t!==""?t:typeof e?.error?.message=="string"&&e.error.message!==""?e.error.message:e?.status?`Failed with status ${e.status}`:"An unknown error has occured!"}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return(e.Variants||[]).map(r=>r.Code)}downloadMultipleProduct(e){let t=e.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",t).pipe(o(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){let t={ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",t).pipe(o(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let t=[];return e.forEach(n=>{n.Variants.forEach(r=>{t=[...t,r.Code]})}),t}filterUnselectedChannel(e,t){let n=[];e.forEach(a=>{n=[...n,...a.Channel]});let r;if(!n||n.length==0)r=t;else{let a=[];r=t.filter(s=>(a=n.filter(p=>p.ChannelID==s.ID),a.length!==e.length))}return r}findChannelById(e,t){return t.find(n=>n.ID==e)}sortChannel(e=[]){return e.sort((t,n)=>t.TypeID<n.TypeID?1:t.TypeID===n.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(t=>t.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let t=[];return e.forEach(n=>{t=[...t,...n.Variants!=null?n.Variants.filter(r=>r.selected):""]}),t}getChannelProduct(e){let t=e.Channels||[],n=[];for(let r of t)n.filter(a=>a.ChannelID==r.ChannelID).length==0&&n.push(r);return this.sortChannel(n)}successToastrScanAllProduct(e,t,n){let r=typeof e.InChannel=="number"?e.InChannel:e?.InChannel?.Product?e?.InChannel?.Product:0,a=typeof e?.NotInPOS=="number"?e?.NotInPOS:e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,s=l.IsNotEmpty(e.LastUpdate)?l.convertToReadableDate(e.LastUpdate):null;n?this.toastrService.success(`
|
|
2
2
|
${a+r} product updates in ${t?.Name} </br>
|
|
3
3
|
(${r} In Channel + ${a} Not In Pos)
|
|
4
4
|
${l.IsNotEmpty(s)?"</br>since "+s:""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as oe,b as le,c as pe}from"./chunk-T4HUNIQP.js";import{a as me}from"./chunk-
|
|
1
|
+
import{a as oe,b as le,c as pe}from"./chunk-T4HUNIQP.js";import{a as me}from"./chunk-U3F77R4P.js";import{a as T}from"./chunk-5XFVP3GT.js";import{a as de}from"./chunk-RIX56SWS.js";import{a as ae}from"./chunk-VXZ4CGP3.js";import"./chunk-OQVWI5RR.js";import"./chunk-6EZURWCE.js";import"./chunk-IUP257JK.js";import"./chunk-G7EFF2OH.js";import{a as re}from"./chunk-WFQ6MTNV.js";import"./chunk-PTEWNZIV.js";import{a as ne}from"./chunk-FBZA4TL3.js";import"./chunk-GRBY6A25.js";import"./chunk-XJ647P3Z.js";import"./chunk-NVFPEIBK.js";import"./chunk-2WNLMFBJ.js";import"./chunk-HHIYV6SY.js";import"./chunk-KOBEFS2S.js";import"./chunk-3E64KI3Y.js";import"./chunk-6IBSQ4O6.js";import"./chunk-BGFEVOPZ.js";import"./chunk-Q3STYUEA.js";import"./chunk-DIWXDN75.js";import"./chunk-MZNVUECO.js";import{b as ie}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import"./chunk-VSXPCIHS.js";import{a as te}from"./chunk-6GXJ4SD6.js";import"./chunk-FI7KHIPS.js";import"./chunk-2767EOG5.js";import"./chunk-6UFKTBFI.js";import"./chunk-EYRMOG2V.js";import"./chunk-H5YNAWK2.js";import"./chunk-F7U7V7F4.js";import"./chunk-QUDI2RQN.js";import"./chunk-Y3LPTD5V.js";import"./chunk-G6DXF6MT.js";import"./chunk-XU7ZLD5O.js";import"./chunk-GMRSDMCF.js";import"./chunk-TFHB3OE5.js";import"./chunk-XE7FN7WV.js";import"./chunk-FQLH72J4.js";import"./chunk-HD5RAZOS.js";import"./chunk-KOOWEFV6.js";import"./chunk-J7VARP7L.js";import"./chunk-U5LGPDSJ.js";import{b as ee}from"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import"./chunk-HZRIS4FA.js";import"./chunk-Q5PH4VIQ.js";import"./chunk-NNVT5X6O.js";import{c as Q,h as X,m as Y,o as Z,z as $}from"./chunk-NZPISKQV.js";import"./chunk-UC7FUQNJ.js";import"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{B as J,D as K,z as G}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{$b as B,Fc as k,Gc as l,Hc as v,Ic as w,Kc as g,Lc as _,Mc as f,Nc as z,Oc as A,Pc as R,Tc as H,Uc as j,Vb as y,Vc as U,Xb as b,Yb as W,_b as I,ac as u,bc as t,cb as F,cc as i,cd as x,dc as c,dd as V,eb as o,ed as q,ga as N,kc as E,na as d,oa as m,pc as M,rc as h,wb as D,za as O}from"./chunk-YU6N3IVV.js";import{a as P,b as L}from"./chunk-QWWW7GFA.js";var se=()=>[],ce=r=>({"td-cell-hover":r});function ue(r,S){if(r&1&&c(0,"variants-dropdown",31),r&2){let e=h().$implicit;u("variants",e==null?null:e.Variants)}}function he(r,S){if(r&1&&c(0,"variant-with-image",32),r&2){let e=h().$implicit;u("variant",e==null?null:e.Variants[0])}}function ge(r,S){if(r&1&&(t(0,"span"),l(1),i()),r&2){let e=h().$implicit;o(),w("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function _e(r,S){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),c(3,"img",25),x(4,"channelImage"),t(5,"div",26)(6,"div"),l(7),i(),t(8,"small",27)(9,"span"),l(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),c(14,"order-link",29),i(),t(15,"small"),l(16),x(17,"date"),i(),c(18,"br"),t(19,"small"),c(20,"i",30),l(21),i()()(),t(22,"td"),y(23,ue,1,1,"variants-dropdown",31)(24,he,1,1,"variant-with-image",32),i(),t(25,"td",33),l(26),x(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),l(32),i(),y(33,ge,2,1,"span"),i(),t(34,"small"),l(35),i()()()()),r&2){let e=S.$implicit;o(3),u("src",V(4,14,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(4),v(e.Outlet),o(3),v(e.ChannelName),o(4),u("order",e),o(2),w(" ",q(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(5),w(" ",e.Customer," "),o(),k(U(21,ce,(e.Variants==null?null:e.Variants.length)>1)),o(),b((e.Variants==null?null:e.Variants.length)>1?23:24),o(3),v(V(27,19,e.Amount)),o(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),o(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function fe(r,S){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",20),l(7,"Number"),i(),t(8,"th"),l(9,"Items"),i(),t(10,"th",21),l(11,"Amount"),i(),t(12,"th",22),l(13,"Shipping"),i()()(),t(14,"tbody"),I(15,_e,36,23,"tr",null,W),i()(),t(17,"app-custom-paginator",23),M("next",function(){d(e);let n=h();return m(n.initShippedOrders())})("previous",function(){d(e);let n=h();return m(n.initShippedOrders())}),i()()}if(r&2){let e=h(),p=R(0);o(15),B(p),o(2),u("filter",e.filter())("totaldata",p==null?null:p.length)}}function Se(r,S){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var ze=(()=>{class r{constructor(){this.orderService=N(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:void 0})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(p=>L(P({},p),{From:e})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275cmp=D({type:r,selectors:[["app-shipped"]],features:[H([T])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,n){if(p&1){let s=E();z(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return d(s),m(n.initShippedOrders())}),f("textChange",function(a){return d(s),_(n.filter().Number,a)||(n.filter().Number=a),m(a)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),i(),t(12,"app-channel-options-v2",4),f("ngModelChange",function(a){return d(s),_(n.filter().ListChannelID,a)||(n.filter().ListChannelID=a),m(a)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(a){return d(s),_(n.filter().From,a)||(n.filter().From=a),m(a)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(a){return d(s),_(n.filter().To,a)||(n.filter().To=a),m(a)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(a){return d(s),_(n.filter().PageNumber,a)||(n.filter().PageNumber=a),m(a)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(a){return d(s),_(n.filter().PageSize,a)||(n.filter().PageSize=a),m(a)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,fe,18,2,"div",15)(33,Se,2,0,"div",16),i()()()()()}if(p&2){let s=A(V(1,8,n.shippedOrders$)||j(11,se));o(2),g("text",n.filter().Number),o(10),u("multiple",!0),g("ngModel",n.filter().ListChannelID),o(5),g("date",n.filter().From),o(2),g("date",n.filter().To),o(4),g("ngModel",n.filter().PageNumber),o(4),g("ngModel",n.filter().PageSize),o(5),b(s.length>0?32:33)}},dependencies:[ie,ne,re,$,Q,Z,X,Y,le,pe,de,te,ee,me,ae,oe,G,J,K],encapsulation:2,changeDetection:0})}}return r})();export{ze as ShippedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Te}from"./chunk-LAIE4H5H.js";import{a as D}from"./chunk-ISMIPSYN.js";import{a as be,b as we,c as Fe,d as B,e as L}from"./chunk-ADWNBIKB.js";import{a as ye}from"./chunk-APUXEKJE.js";import{a as Pe,b as ve}from"./chunk-7USVXREC.js";import{a as fe}from"./chunk-A2FHUABF.js";import"./chunk-OQVWI5RR.js";import"./chunk-6EZURWCE.js";import"./chunk-IUP257JK.js";import"./chunk-G7EFF2OH.js";import{c as xe,d as Se}from"./chunk-G527C47T.js";import"./chunk-NGMAPAHA.js";import{a as ue}from"./chunk-PTEWNZIV.js";import"./chunk-H7BH5V5K.js";import"./chunk-KLVAH3GT.js";import"./chunk-M2CRAQZF.js";import{a as ge}from"./chunk-CQNHKIVJ.js";import"./chunk-GRBY6A25.js";import"./chunk-XJ647P3Z.js";import"./chunk-NVFPEIBK.js";import"./chunk-2WNLMFBJ.js";import"./chunk-HHIYV6SY.js";import"./chunk-KOBEFS2S.js";import"./chunk-3E64KI3Y.js";import"./chunk-6IBSQ4O6.js";import"./chunk-T3ZIOJO3.js";import"./chunk-BGFEVOPZ.js";import"./chunk-Q3STYUEA.js";import"./chunk-DIWXDN75.js";import"./chunk-MZNVUECO.js";import{e as he}from"./chunk-EAPRH7EP.js";import{a as me,b as Ce}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import{c as pe}from"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import"./chunk-F7U7V7F4.js";import"./chunk-QUDI2RQN.js";import"./chunk-Y3LPTD5V.js";import"./chunk-G6DXF6MT.js";import"./chunk-XU7ZLD5O.js";import"./chunk-GMRSDMCF.js";import"./chunk-TFHB3OE5.js";import"./chunk-FQLH72J4.js";import"./chunk-HD5RAZOS.js";import"./chunk-KOOWEFV6.js";import"./chunk-J7VARP7L.js";import"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-DJ5YOQ3W.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import"./chunk-HZRIS4FA.js";import{b as ne,c as ie}from"./chunk-Q5PH4VIQ.js";import{c as Y}from"./chunk-NNVT5X6O.js";import{b as re,c as le,h as ce,m as se,o as de,z as _e}from"./chunk-NZPISKQV.js";import{b as ee,e as te}from"./chunk-UC7FUQNJ.js";import"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{D as I,K as X,z as Q}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{$b as N,B as q,Cb as T,Dc as k,Gc as m,Hc as O,Ic as w,Kc as R,Lc as $,Mc as U,Qc as j,R as G,Tc as J,Vb as g,Vc as V,X as K,Xb as u,Yb as M,_b as E,ac as p,bc as a,cb as F,cc as l,cd as v,dc as P,dd as b,eb as c,ed as Z,ga as x,kc as S,na as d,oa as _,pc as C,rc as r,wb as W,za as f}from"./chunk-YU6N3IVV.js";import{a as z,b as H}from"./chunk-QWWW7GFA.js";var A=i=>[i];function Ve(i,s){if(i&1){let e=S();a(0,"button",13),C("click",function(){d(e);let t=r(),n=r(2);return _(n.updateStock(t))}),P(1,"i",14),m(2," Update "),l()}}function Ie(i,s){if(i&1){let e=S();a(0,"div",8),g(1,Ve,3,0,"button",10),a(2,"button",11),C("click",function(){d(e);let t=r(2);return _(t.openExportDialog())}),P(3,"i",12),a(4,"span"),m(5,"Export"),l()()()}if(i&2){let e=r(2);c(),u(e.productService.hasSelectionVariant(s)?1:-1)}}function De(i,s){if(i&1){let e=S();a(0,"th")(1,"input",28),C("change",function(t){d(e);let n=r(),h=r(2);return _(h.onSelectAllSKU(t.target.checked,n))}),l()()}}function Me(i,s){if(i&1){let e=S();a(0,"input",45),U("ngModelChange",function(t){d(e);let n=r(4).$implicit;return $(n.selected,t)||(n.selected=t),_(t)}),C("ngModelChange",function(){d(e);let t=r(4).$implicit,n=r(3);return _(n.onCheckboxStateProduct(t))}),l()}if(i&2){let e=r(4).$implicit;R("ngModel",e.selected)}}function Ee(i,s){if(i&1&&T(0,Me,1,1,"ng-template",22),i&2){let e=r(6);p("ngxPermissionsOnly",V(1,A,e.rolePriceEdit))}}function Ne(i,s){if(i&1){let e=S();a(0,"img",46),C("click",function(t){d(e);let n=r(3).$implicit,h=r(3);return _(h.onZoomImage(t,n==null?null:n.ImageUrl))}),l()}if(i&2){let e=r(3).$implicit;p("src",j(e.ThumbnailUrl),F)}}function ke(i,s){i&1&&P(0,"img",41)}function Oe(i,s){if(i&1&&(a(0,"small",44),m(1),l()),i&2){let e=r(3).$implicit;c(),w("(",e.Category,")")}}function Re(i,s){if(i&1&&(a(0,"td",39)(1,"div",31),g(2,Ee,1,3,null,22),a(3,"div"),g(4,Ne,1,2,"img",40)(5,ke,1,0,"img",41),l()()(),a(6,"td",42)(7,"span",43),m(8),l(),g(9,Oe,2,1,"small",44),l()),i&2){let e=r(2).$implicit;p("rowSpan",e.Variants.length),c(2),u((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),u(e.ThumbnailUrl?4:5),c(2),p("rowSpan",e.Variants.length),c(2),O(e.Name),c(),u(e.Category?9:-1)}}function $e(i,s){if(i&1){let e=S();a(0,"input",49),U("ngModelChange",function(t){d(e);let n=r(2).$implicit;return $(n.selected,t)||(n.selected=t),_(t)}),l()}if(i&2){let e=r(2).$implicit;R("ngModel",e.selected)}}function Ue(i,s){if(i&1&&(a(0,"td",47),g(1,$e,1,1,"input",48),l()),i&2){let e=r().$implicit;c(),u(e.UnitPrice>=0?1:-1)}}function Be(i,s){i&1&&(a(0,"div",32),m(1," Not Found "),l())}function Le(i,s){if(i&1&&(a(0,"div"),m(1),v(2,"number"),l()),i&2){let e=r().$implicit;c(),w(" ",b(2,1,e.UnitPrice)," ")}}function Ae(i,s){if(i&1&&(a(0,"div",33)(1,"a",35),P(2,"i",50),l()()),i&2){let e=r().$implicit,o=r(4);c(),p("href",o.hostName()+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F)}}function ze(i,s){if(i&1){let e=S();a(0,"div",51),C("click",function(){d(e);let t=r().$implicit,n=r().$implicit,h=r(2),y=r();return _(y.openTableDialog(t,n,h))}),m(1),v(2,"number"),l()}if(i&2){let e=r().$implicit;c(),w(" ",b(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function He(i,s){if(i&1){let e=S();a(0,"tr",29),g(1,Re,10,6),a(2,"td",20),m(3),l(),a(4,"td",23)(5,"span",30),m(6),l()(),T(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),g(10,Be,2,0,"div",32),g(11,Le,3,3,"div"),g(12,Ae,3,1,"div",33),l()(),a(13,"td",23)(14,"div",31),g(15,ze,3,3,"div",34),a(16,"div",33)(17,"a",35),P(18,"i",36),l()(),a(19,"div",33)(20,"div",37),C("click",function(){let t=d(e).$implicit,n=r(4);return _(n.refreshPrice(t))}),P(21,"i",38),l()()()()()}if(i&2){let e=s.$implicit,o=s.$index,t=r(4);c(),u(o==0?1:-1),c(2),O(e.Model),c(2),k("text-decoration-line-through",e.Discontinued),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),c(),w(" ",e.Code," "),c(),p("ngxPermissionsOnly",V(14,A,t.rolePriceEdit)),c(3),u((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),k("bg-gradient-warning",e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price)),c(2),u(e.Channel.length>0?15:-1),c(2),p("href",e.Channel[0]==null?null:e.Channel[0].Url,F)}}function qe(i,s){if(i&1&&E(0,He,22,16,"tr",29,M),i&2){let e=s.$implicit;N(e.Variants)}}function Ge(i,s){if(i&1){let e=S();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),m(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),C("ngModelChange",function(t){d(e);let n=r(2);return _(n.toggleDifferentInventory.set(t))})("toggleChange",function(){d(e);let t=r(2);return _(t.onToggleDifferentInventory())}),a(9,"small",6),m(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),m(12,"Variant"),l(),a(13,"th",21),m(14,"SKU"),l(),T(15,De,2,0,"ng-template",22),a(16,"th",23),m(17,"POS"),l(),a(18,"th",23)(19,"div",24),C("click",function(){d(e);let t=r(2);return _(t.openModalFilter())}),P(20,"img",25),a(21,"span",26),m(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),E(25,qe,2,0,null,null,M),l()(),a(27,"infinite-paginator",27),v(28,"async"),C("onNextPage",function(){d(e);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter()))})("onLastPage",function(){d(e);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter()))})("onGetRowCount",function(){d(e);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter()))}),l()()()}if(i&2){let e,o,t,n=r(2);c(8),p("ngModel",n.toggleDifferentInventory()),c(7),p("ngxPermissionsOnly",V(16,A,n.rolePriceEdit)),c(4),p("matTooltip",((e=n.selectedChannel())==null||e.Name==null?null:e.Name.length)>=20?(e=n.selectedChannel())==null?null:e.Name:""),c(),p("src",(o=n.selectedChannel())==null?null:o.Img,F),c(2),w(" ",Z(23,11,(t=n.selectedChannel())==null?null:t.Name,20)," "),c(3),N(s),c(2),p("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",b(28,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function Ke(i,s){if(i&1){let e=S();a(0,"mainpanel",1),C("textChange",function(t){d(e);let n=r();return _(n.updateFilter("text",t))})("onSubmit",function(){d(e);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),m(4,"Channel"),l(),a(5,"app-channel-options-v2",4),C("ngModelChange",function(t){d(e);let n=r();return _(n.updateFilter("ChannelID",t))}),l()(),a(6,"div",2)(7,"filter-query-type",5),C("numberFilterComparatorChange",function(t){d(e);let n=r();return _(n.updateFilter("NumberFilterComparator",t))})("searchTypeChange",function(t){d(e);let n=r();return _(n.updateFilter("SearchType",t))}),l()(),a(8,"div",2)(9,"label",6),m(10,"Page Number"),l(),a(11,"input",7),C("ngModelChange",function(t){d(e);let n=r();return _(n.updateFilter("PageNumber",t))}),l()(),a(12,"div")(13,"label",6),m(14,"Page Size"),l(),a(15,"input",7),C("ngModelChange",function(t){d(e);let n=r();return _(n.updateFilter("RowCount",t))}),l()()(),a(16,"actions"),g(17,Ie,6,1,"div",8),v(18,"async"),l(),a(19,"content"),g(20,Ge,29,18,"div",9),v(21,"async"),l()()}if(i&2){let e,o,t=s,n=r();p("headerTitle",n.pageTitle())("text",n.searchFilter().text)("searchBoxPlaceHolder",n.searchPlaceholder()),c(5),p("ngModel",n.searchFilter().ChannelID),c(2),p("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions)("numberFilterComparator",n.searchFilter().NumberFilterComparator)("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions)("searchType",n.searchFilter().SearchType),c(4),p("ngModel",n.searchFilter().PageNumber),c(4),p("ngModel",n.searchFilter().RowCount),c(2),u((e=b(18,12,n.data$))?17:-1,e),c(3),u((o=b(21,14,n.data$))?20:-1,o)}}var Vt=(()=>{class i{constructor(){this.http=x(te),this.toastr=x(ee),this.dialog=x(pe),this.productService=x(ge),this.biggerPictureService=x(ue),this.authService=x(oe),this.mainPanelService=x(me),this.decimalPipe=x(I),this.placeholderService=x(xe),this.infinitePagination=x(B),this.updateResHandling=x(L),this.pageTitle=f("Price Single Channel Comparison"),this.toggleDifferentInventory=f(!1),this.loaderEndpoint=f("PriceLoader/Load"),this.dataEndpoint=f("Price/GetSingleChannelComparison"),this.rowCountApi=f("Inventory/GetInventoryByChannelRowCount"),this.searchFilter=f({}),this.hostName=f(""),this.rolePriceEdit=ae.PriceUpdate,this.channelOptions=f([]),this.selectedChannel=f(null),this.discontinuedVariantMsg=f("This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel."),this.searchPlaceholder=f("Search ...");let e=this.authService;this.hostName.set(this.authService.getDomain()),this.data$=this.infinitePagination.data$.pipe(G(1)),this.channelOptions.set(e.getChannels())}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint(),this.infinitePagination.fethRowCountEndpoint=this.rowCountApi(),this.loader$=this.http.post(`/API/${this.loaderEndpoint()}`).pipe(K(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(o=>(o.filterModel=D.ALL,o)),this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory()?this.searchFilter.update(e=>(e.filterModel=D.ALL,e)):this.searchFilter.update(e=>(e.filterModel=D.DIFFERENCE,e)),this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.selected=e.selected,o))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(h=>({ID:h.ID,ChannelID:h.Channel[0].ChannelID,Code:h.Code,Price:h.UnitPrice})),n={ListChannelID:[this.searchFilter().ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",n).subscribe(h=>{this.onSearch(),this.handlingUpdateStock(h.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let o=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,o,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let o={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",o).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(e,o,t){let n=JSON.parse(JSON.stringify(e));this.dialog.open(be,{data:{Name:o.Name,Variant:n,ChannelID:n?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:n?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(q(y=>Y.IsNotEmpty(y))).subscribe(y=>{this.updateItemAfterDialog(y,e)})}updateItemAfterDialog(e,o){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(n=>{let h=this.productService.findChannelById(t.ID,this.channelOptions()),y=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${h.Name} to ${y}`,"Success"),this.infinitePagination.reloadPagination(this.searchFilter())})}initSelectedChannel(){this.selectedChannel.set(this.channelOptions().find(e=>e.ID==this.searchFilter().ChannelID))}onSelectAllSKU(e,o){o=o.map(t=>(t.Variants=t.Variants.map(n=>(n.selected=e,n)),t))}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}openExportDialog(){this.dialog.open(ye,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountApi(),exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}updateFilter(e,o){this.searchFilter.update(t=>H(z({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=W({type:i,selectors:[["app-price-single-channel"]],features:[J([B,Te,X("https://resc.cloudinary.com/"),I,L])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(o,t){if(o&1&&(g(0,Ke,22,16,"mainpanel",0),v(1,"async")),o&2){let n;u((n=b(1,1,t.loader$))?0:-1,n)}},dependencies:[Ce,_e,le,de,re,ce,se,Fe,ie,ne,ve,Pe,fe,he,Se,we,Q,I],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Vt as PriceSingleChannelComponent};
|
|
1
|
+
import{a as Te}from"./chunk-LAIE4H5H.js";import{a as D}from"./chunk-ISMIPSYN.js";import{a as be,b as we,c as Fe,d as B,e as L}from"./chunk-ADWNBIKB.js";import{a as ye}from"./chunk-APUXEKJE.js";import{a as Pe,b as ve}from"./chunk-7USVXREC.js";import{a as fe}from"./chunk-VXZ4CGP3.js";import"./chunk-OQVWI5RR.js";import"./chunk-6EZURWCE.js";import"./chunk-IUP257JK.js";import"./chunk-G7EFF2OH.js";import{c as xe,d as Se}from"./chunk-G527C47T.js";import"./chunk-NGMAPAHA.js";import{a as ue}from"./chunk-PTEWNZIV.js";import"./chunk-H7BH5V5K.js";import"./chunk-KLVAH3GT.js";import"./chunk-M2CRAQZF.js";import{a as ge}from"./chunk-2YXL2CC3.js";import"./chunk-GRBY6A25.js";import"./chunk-XJ647P3Z.js";import"./chunk-NVFPEIBK.js";import"./chunk-2WNLMFBJ.js";import"./chunk-HHIYV6SY.js";import"./chunk-KOBEFS2S.js";import"./chunk-3E64KI3Y.js";import"./chunk-6IBSQ4O6.js";import"./chunk-XMKI4MB7.js";import"./chunk-BGFEVOPZ.js";import"./chunk-Q3STYUEA.js";import"./chunk-DIWXDN75.js";import"./chunk-MZNVUECO.js";import{e as he}from"./chunk-EAPRH7EP.js";import{a as me,b as Ce}from"./chunk-ZOV7OQE6.js";import"./chunk-HDNULDU2.js";import{c as pe}from"./chunk-VSXPCIHS.js";import"./chunk-6GXJ4SD6.js";import"./chunk-F7U7V7F4.js";import"./chunk-QUDI2RQN.js";import"./chunk-Y3LPTD5V.js";import"./chunk-G6DXF6MT.js";import"./chunk-XU7ZLD5O.js";import"./chunk-GMRSDMCF.js";import"./chunk-TFHB3OE5.js";import"./chunk-FQLH72J4.js";import"./chunk-HD5RAZOS.js";import"./chunk-KOOWEFV6.js";import"./chunk-J7VARP7L.js";import"./chunk-U5LGPDSJ.js";import"./chunk-NCHJULNE.js";import"./chunk-KZWEUXCA.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-7PDBGWPD.js";import"./chunk-O2GBNE2A.js";import"./chunk-QXRG5XYP.js";import"./chunk-HZRIS4FA.js";import{b as ne,c as ie}from"./chunk-Q5PH4VIQ.js";import{c as Y}from"./chunk-NNVT5X6O.js";import{b as re,c as le,h as ce,m as se,o as de,z as _e}from"./chunk-NZPISKQV.js";import{b as ee,e as te}from"./chunk-UC7FUQNJ.js";import"./chunk-67URAZUP.js";import"./chunk-MXZNUKSS.js";import{D as I,K as X,z as Q}from"./chunk-OOGQ5PSL.js";import"./chunk-ASFPLYOZ.js";import{$b as N,B as q,Cb as T,Dc as k,Gc as m,Hc as O,Ic as w,Kc as R,Lc as $,Mc as U,Qc as j,R as G,Tc as J,Vb as g,Vc as V,X as K,Xb as u,Yb as M,_b as E,ac as p,bc as a,cb as F,cc as l,cd as v,dc as P,dd as b,eb as c,ed as Z,ga as x,kc as S,na as d,oa as _,pc as C,rc as r,wb as W,za as f}from"./chunk-YU6N3IVV.js";import{a as z,b as H}from"./chunk-QWWW7GFA.js";var A=i=>[i];function Ve(i,s){if(i&1){let e=S();a(0,"button",13),C("click",function(){d(e);let t=r(),n=r(2);return _(n.updateStock(t))}),P(1,"i",14),m(2," Update "),l()}}function Ie(i,s){if(i&1){let e=S();a(0,"div",8),g(1,Ve,3,0,"button",10),a(2,"button",11),C("click",function(){d(e);let t=r(2);return _(t.openExportDialog())}),P(3,"i",12),a(4,"span"),m(5,"Export"),l()()()}if(i&2){let e=r(2);c(),u(e.productService.hasSelectionVariant(s)?1:-1)}}function De(i,s){if(i&1){let e=S();a(0,"th")(1,"input",28),C("change",function(t){d(e);let n=r(),h=r(2);return _(h.onSelectAllSKU(t.target.checked,n))}),l()()}}function Me(i,s){if(i&1){let e=S();a(0,"input",45),U("ngModelChange",function(t){d(e);let n=r(4).$implicit;return $(n.selected,t)||(n.selected=t),_(t)}),C("ngModelChange",function(){d(e);let t=r(4).$implicit,n=r(3);return _(n.onCheckboxStateProduct(t))}),l()}if(i&2){let e=r(4).$implicit;R("ngModel",e.selected)}}function Ee(i,s){if(i&1&&T(0,Me,1,1,"ng-template",22),i&2){let e=r(6);p("ngxPermissionsOnly",V(1,A,e.rolePriceEdit))}}function Ne(i,s){if(i&1){let e=S();a(0,"img",46),C("click",function(t){d(e);let n=r(3).$implicit,h=r(3);return _(h.onZoomImage(t,n==null?null:n.ImageUrl))}),l()}if(i&2){let e=r(3).$implicit;p("src",j(e.ThumbnailUrl),F)}}function ke(i,s){i&1&&P(0,"img",41)}function Oe(i,s){if(i&1&&(a(0,"small",44),m(1),l()),i&2){let e=r(3).$implicit;c(),w("(",e.Category,")")}}function Re(i,s){if(i&1&&(a(0,"td",39)(1,"div",31),g(2,Ee,1,3,null,22),a(3,"div"),g(4,Ne,1,2,"img",40)(5,ke,1,0,"img",41),l()()(),a(6,"td",42)(7,"span",43),m(8),l(),g(9,Oe,2,1,"small",44),l()),i&2){let e=r(2).$implicit;p("rowSpan",e.Variants.length),c(2),u((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),u(e.ThumbnailUrl?4:5),c(2),p("rowSpan",e.Variants.length),c(2),O(e.Name),c(),u(e.Category?9:-1)}}function $e(i,s){if(i&1){let e=S();a(0,"input",49),U("ngModelChange",function(t){d(e);let n=r(2).$implicit;return $(n.selected,t)||(n.selected=t),_(t)}),l()}if(i&2){let e=r(2).$implicit;R("ngModel",e.selected)}}function Ue(i,s){if(i&1&&(a(0,"td",47),g(1,$e,1,1,"input",48),l()),i&2){let e=r().$implicit;c(),u(e.UnitPrice>=0?1:-1)}}function Be(i,s){i&1&&(a(0,"div",32),m(1," Not Found "),l())}function Le(i,s){if(i&1&&(a(0,"div"),m(1),v(2,"number"),l()),i&2){let e=r().$implicit;c(),w(" ",b(2,1,e.UnitPrice)," ")}}function Ae(i,s){if(i&1&&(a(0,"div",33)(1,"a",35),P(2,"i",50),l()()),i&2){let e=r().$implicit,o=r(4);c(),p("href",o.hostName()+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F)}}function ze(i,s){if(i&1){let e=S();a(0,"div",51),C("click",function(){d(e);let t=r().$implicit,n=r().$implicit,h=r(2),y=r();return _(y.openTableDialog(t,n,h))}),m(1),v(2,"number"),l()}if(i&2){let e=r().$implicit;c(),w(" ",b(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function He(i,s){if(i&1){let e=S();a(0,"tr",29),g(1,Re,10,6),a(2,"td",20),m(3),l(),a(4,"td",23)(5,"span",30),m(6),l()(),T(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),g(10,Be,2,0,"div",32),g(11,Le,3,3,"div"),g(12,Ae,3,1,"div",33),l()(),a(13,"td",23)(14,"div",31),g(15,ze,3,3,"div",34),a(16,"div",33)(17,"a",35),P(18,"i",36),l()(),a(19,"div",33)(20,"div",37),C("click",function(){let t=d(e).$implicit,n=r(4);return _(n.refreshPrice(t))}),P(21,"i",38),l()()()()()}if(i&2){let e=s.$implicit,o=s.$index,t=r(4);c(),u(o==0?1:-1),c(2),O(e.Model),c(2),k("text-decoration-line-through",e.Discontinued),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),c(),w(" ",e.Code," "),c(),p("ngxPermissionsOnly",V(14,A,t.rolePriceEdit)),c(3),u((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),k("bg-gradient-warning",e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price)),c(2),u(e.Channel.length>0?15:-1),c(2),p("href",e.Channel[0]==null?null:e.Channel[0].Url,F)}}function qe(i,s){if(i&1&&E(0,He,22,16,"tr",29,M),i&2){let e=s.$implicit;N(e.Variants)}}function Ge(i,s){if(i&1){let e=S();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),m(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),C("ngModelChange",function(t){d(e);let n=r(2);return _(n.toggleDifferentInventory.set(t))})("toggleChange",function(){d(e);let t=r(2);return _(t.onToggleDifferentInventory())}),a(9,"small",6),m(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),m(12,"Variant"),l(),a(13,"th",21),m(14,"SKU"),l(),T(15,De,2,0,"ng-template",22),a(16,"th",23),m(17,"POS"),l(),a(18,"th",23)(19,"div",24),C("click",function(){d(e);let t=r(2);return _(t.openModalFilter())}),P(20,"img",25),a(21,"span",26),m(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),E(25,qe,2,0,null,null,M),l()(),a(27,"infinite-paginator",27),v(28,"async"),C("onNextPage",function(){d(e);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter()))})("onLastPage",function(){d(e);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter()))})("onGetRowCount",function(){d(e);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter()))}),l()()()}if(i&2){let e,o,t,n=r(2);c(8),p("ngModel",n.toggleDifferentInventory()),c(7),p("ngxPermissionsOnly",V(16,A,n.rolePriceEdit)),c(4),p("matTooltip",((e=n.selectedChannel())==null||e.Name==null?null:e.Name.length)>=20?(e=n.selectedChannel())==null?null:e.Name:""),c(),p("src",(o=n.selectedChannel())==null?null:o.Img,F),c(2),w(" ",Z(23,11,(t=n.selectedChannel())==null?null:t.Name,20)," "),c(3),N(s),c(2),p("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",b(28,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function Ke(i,s){if(i&1){let e=S();a(0,"mainpanel",1),C("textChange",function(t){d(e);let n=r();return _(n.updateFilter("text",t))})("onSubmit",function(){d(e);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),m(4,"Channel"),l(),a(5,"app-channel-options-v2",4),C("ngModelChange",function(t){d(e);let n=r();return _(n.updateFilter("ChannelID",t))}),l()(),a(6,"div",2)(7,"filter-query-type",5),C("numberFilterComparatorChange",function(t){d(e);let n=r();return _(n.updateFilter("NumberFilterComparator",t))})("searchTypeChange",function(t){d(e);let n=r();return _(n.updateFilter("SearchType",t))}),l()(),a(8,"div",2)(9,"label",6),m(10,"Page Number"),l(),a(11,"input",7),C("ngModelChange",function(t){d(e);let n=r();return _(n.updateFilter("PageNumber",t))}),l()(),a(12,"div")(13,"label",6),m(14,"Page Size"),l(),a(15,"input",7),C("ngModelChange",function(t){d(e);let n=r();return _(n.updateFilter("RowCount",t))}),l()()(),a(16,"actions"),g(17,Ie,6,1,"div",8),v(18,"async"),l(),a(19,"content"),g(20,Ge,29,18,"div",9),v(21,"async"),l()()}if(i&2){let e,o,t=s,n=r();p("headerTitle",n.pageTitle())("text",n.searchFilter().text)("searchBoxPlaceHolder",n.searchPlaceholder()),c(5),p("ngModel",n.searchFilter().ChannelID),c(2),p("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions)("numberFilterComparator",n.searchFilter().NumberFilterComparator)("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions)("searchType",n.searchFilter().SearchType),c(4),p("ngModel",n.searchFilter().PageNumber),c(4),p("ngModel",n.searchFilter().RowCount),c(2),u((e=b(18,12,n.data$))?17:-1,e),c(3),u((o=b(21,14,n.data$))?20:-1,o)}}var Vt=(()=>{class i{constructor(){this.http=x(te),this.toastr=x(ee),this.dialog=x(pe),this.productService=x(ge),this.biggerPictureService=x(ue),this.authService=x(oe),this.mainPanelService=x(me),this.decimalPipe=x(I),this.placeholderService=x(xe),this.infinitePagination=x(B),this.updateResHandling=x(L),this.pageTitle=f("Price Single Channel Comparison"),this.toggleDifferentInventory=f(!1),this.loaderEndpoint=f("PriceLoader/Load"),this.dataEndpoint=f("Price/GetSingleChannelComparison"),this.rowCountApi=f("Inventory/GetInventoryByChannelRowCount"),this.searchFilter=f({}),this.hostName=f(""),this.rolePriceEdit=ae.PriceUpdate,this.channelOptions=f([]),this.selectedChannel=f(null),this.discontinuedVariantMsg=f("This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel."),this.searchPlaceholder=f("Search ...");let e=this.authService;this.hostName.set(this.authService.getDomain()),this.data$=this.infinitePagination.data$.pipe(G(1)),this.channelOptions.set(e.getChannels())}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint(),this.infinitePagination.fethRowCountEndpoint=this.rowCountApi(),this.loader$=this.http.post(`/API/${this.loaderEndpoint()}`).pipe(K(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(o=>(o.filterModel=D.ALL,o)),this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory()?this.searchFilter.update(e=>(e.filterModel=D.ALL,e)):this.searchFilter.update(e=>(e.filterModel=D.DIFFERENCE,e)),this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.selected=e.selected,o))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(h=>({ID:h.ID,ChannelID:h.Channel[0].ChannelID,Code:h.Code,Price:h.UnitPrice})),n={ListChannelID:[this.searchFilter().ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",n).subscribe(h=>{this.onSearch(),this.handlingUpdateStock(h.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let o=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,o,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let o={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",o).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(e,o,t){let n=JSON.parse(JSON.stringify(e));this.dialog.open(be,{data:{Name:o.Name,Variant:n,ChannelID:n?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:n?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(q(y=>Y.IsNotEmpty(y))).subscribe(y=>{this.updateItemAfterDialog(y,e)})}updateItemAfterDialog(e,o){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(n=>{let h=this.productService.findChannelById(t.ID,this.channelOptions()),y=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${h.Name} to ${y}`,"Success"),this.infinitePagination.reloadPagination(this.searchFilter())})}initSelectedChannel(){this.selectedChannel.set(this.channelOptions().find(e=>e.ID==this.searchFilter().ChannelID))}onSelectAllSKU(e,o){o=o.map(t=>(t.Variants=t.Variants.map(n=>(n.selected=e,n)),t))}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}openExportDialog(){this.dialog.open(ye,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountApi(),exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}updateFilter(e,o){this.searchFilter.update(t=>H(z({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=W({type:i,selectors:[["app-price-single-channel"]],features:[J([B,Te,X("https://resc.cloudinary.com/"),I,L])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(o,t){if(o&1&&(g(0,Ke,22,16,"mainpanel",0),v(1,"async")),o&2){let n;u((n=b(1,1,t.loader$))?0:-1,n)}},dependencies:[Ce,_e,le,de,re,ce,se,Fe,ie,ne,ve,Pe,fe,he,Se,we,Q,I],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Vt as PriceSingleChannelComponent};
|