marketplacepos 3.19.1 → 3.19.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-BLKYALQN.js → chunk-2ZA6UFQW.js} +1 -1
- package/Marketplace/{chunk-5HQAX7EA.js → chunk-45SYAAZ4.js} +1 -1
- package/Marketplace/{chunk-FLVJYLMP.js → chunk-7K3GXZTT.js} +1 -1
- package/Marketplace/{chunk-G2QVHX6W.js → chunk-7YTFSMJP.js} +1 -1
- package/Marketplace/{chunk-SA6XH3LZ.js → chunk-ANKBJ6LX.js} +1 -1
- package/Marketplace/{chunk-O6R5T3KF.js → chunk-CDTWKL3P.js} +1 -1
- package/Marketplace/{chunk-NHI2FPN6.js → chunk-ENK2D3NZ.js} +1 -1
- package/Marketplace/{chunk-SB2DYZXB.js → chunk-EZGXPLQL.js} +1 -1
- package/Marketplace/{chunk-MVPEM37R.js → chunk-G7LXKOFQ.js} +1 -1
- package/Marketplace/{chunk-LFL23QXM.js → chunk-KH5XAWRL.js} +1 -1
- package/Marketplace/{chunk-LPBB2OY2.js → chunk-LGATMK2R.js} +1 -1
- package/Marketplace/{chunk-GKUGDFJC.js → chunk-LOACFIKK.js} +1 -1
- package/Marketplace/{chunk-MY7ARTXO.js → chunk-N3CZPKYT.js} +1 -1
- package/Marketplace/{chunk-PDJC7ISZ.js → chunk-RVYVBC3W.js} +1 -1
- package/Marketplace/{chunk-25L5GT35.js → chunk-UEV7LKHN.js} +1 -1
- package/Marketplace/{chunk-E32WLDEK.js → chunk-UIZ56VQJ.js} +1 -1
- package/Marketplace/chunk-VJZE4EZL.js +2 -0
- package/Marketplace/{chunk-XOR54KJS.js → chunk-WHRVZ53L.js} +1 -1
- package/Marketplace/{chunk-D2WUVZXY.js → chunk-WJ7K2RPV.js} +1 -1
- package/Marketplace/{chunk-WQY67NR3.js → chunk-WLZGBUKM.js} +1 -1
- package/Marketplace/{chunk-3VPZUSG2.js → chunk-XXJWUGOI.js} +1 -1
- package/Marketplace/{chunk-KPLNKQV4.js → chunk-Y3534N3T.js} +1 -1
- package/Marketplace/{chunk-5DRMEYTQ.js → chunk-YJRFHXEU.js} +1 -1
- package/Marketplace/{chunk-XGSCK5UN.js → chunk-ZLI5KKPV.js} +1 -1
- package/Marketplace/{chunk-SAEXEG4F.js → chunk-ZQ3CAWGU.js} +1 -1
- package/Marketplace/{chunk-OWN37Y3R.js → chunk-ZSG7RVPO.js} +1 -1
- package/Marketplace/{chunk-OQJWOWTI.js → chunk-ZUFS67DO.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-F2YQJBAZ.js → main-4MSULW4F.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-CCEWQRYY.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ue}from"./chunk-XGSCK5UN.js";import"./chunk-BTXJZOGD.js";import"./chunk-S36U4I4O.js";import{a as Ke}from"./chunk-6U6JR5K6.js";import{a as E}from"./chunk-BVIRHZTZ.js";import"./chunk-3UKBESDQ.js";import"./chunk-4ULJZM2I.js";import{b as Je}from"./chunk-4QK7Y7R2.js";import{c as Ze}from"./chunk-73DE2GZF.js";import{b as Ye}from"./chunk-4YCZLOHQ.js";import{c as qe}from"./chunk-RVVTVU4B.js";import{a as f}from"./chunk-GKUGDFJC.js";import{g as Qe}from"./chunk-6NTRXLMW.js";import{a as Be,d as Re,e as $}from"./chunk-ACYUSHMS.js";import{a as Pe,b as ze,g as Le}from"./chunk-5HQAX7EA.js";import"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import{a as Ve,g as He,j as J,n as Ge}from"./chunk-3XWOT6GZ.js";import{t as We,u as F}from"./chunk-CTKEWRX4.js";import{F as je,K as Z,u as $e,x as Fe}from"./chunk-GXHE2CDH.js";import{h as Ee,m as De,y as U,z as ke}from"./chunk-O5MOPAT5.js";import{e as Ne,f as Ae}from"./chunk-X4WLRMDP.js";import{$a as d,$b as Q,Ac as Ie,B as ee,Cb as fe,Da as le,Db as ue,Dc as M,Eb as _e,H as te,Ha as se,Hb as L,Ia as r,Ib as p,Ja as g,Jb as y,K as ie,Kb as w,Oa as de,Pa as ce,Qb as B,V as ne,Vc as Te,Xc as Oe,Ya as me,Yc as we,Za as h,Zc as Y,_b as q,aa as u,ab as pe,bb as z,bc as R,c as H,da as x,db as G,ga as v,gb as ge,gc as be,ha as _,ia as ae,kc as V,la as oe,lb as l,mb as s,nb as b,oa as I,ob as N,pa as T,pb as A,pc as Ce,q as k,rb as he,rc as ve,tc as ye,ub as O,vc as Me,wb as c,wc as Se,ya as re,za as P,zc as xe}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var j=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[E.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[E.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[E.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[E.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fa-solid fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${Pe.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var rt=0,Xe="mat-badge-content",W=new Set,lt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!0,features:[B],decls:0,vars:0,template:function(n,a){},styles:[".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.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%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.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, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.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, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.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, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}"],encapsulation:2,changeDetection:0});let t=e;return t})(),et=(()=>{let e=class e{get color(){return this._color}set color(i){this._setColor(i),this._color=i}get content(){return this._content}set content(i){this._updateRenderedContent(i)}get description(){return this._description}set description(i){this._updateDescription(i)}constructor(i,n,a,m,S){this._ngZone=i,this._elementRef=n,this._ariaDescriber=a,this._renderer=m,this._animationMode=S,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=rt++,this._isInitialized=!1,this._interactivityChecker=x(Fe),this._document=x(ve);let C=x(be);if(!W.has(C)){W.add(C);let X=Ce(lt,{environmentInjector:x(oe)});C.onDestroy(()=>{W.delete(C),W.size===0&&X.destroy()})}}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",`mat-badge-content-${this._id}`),i.setAttribute("aria-hidden","true"),i.classList.add(Xe),this._animationMode==="NoopAnimations"&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Xe}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}};e.\u0275fac=function(n){return new(n||e)(g(ce),g(re),g($e),g(de),g(le,8))},e.\u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&z("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",V],disabled:[2,"matBadgeDisabled","disabled",V],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",V]},standalone:!0,features:[me]});let t=e;return t})(),tt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[je,Z,Z]});let t=e;return t})();function dt(t,e){if(t&1&&(N(0),l(1,"p",23),p(2),s(),A()),t&2){let o=c(3).$implicit;r(2),w(" ",o.Title," ")}}function ct(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function mt(t,e){if(t&1&&(l(0,"a",22),b(1,"i"),h(2,dt,3,1,"ng-container",20)(3,ct,2,1,"ng-template",null,1,R),s()),t&2){let o=L(4),i=c(2).$implicit;d("href",i.Url,se),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function pt(t,e){if(t&1&&(N(0),h(1,mt,5,5,"a",21),A()),t&2){let o=c().$implicit;r(),d("ngxPermissionsOnly",o.Roles)}}function gt(t,e){if(t&1&&(l(0,"p",23),p(1),s()),t&2){let o=c(4).$implicit;r(),w(" ",o.Title," ")}}function ht(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(4).$implicit;r(),y(o.Title)}}function ft(t,e){if(t&1&&(N(0),h(1,gt,2,1,"p",23),q(2,"async"),h(3,ht,2,1,"p"),A()),t&2){let o=c(4);r(),ge(Q(2,1,o.notifications$)!=0?1:3)}}function ut(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function _t(t,e){if(t&1&&(l(0,"a",25),b(1,"i"),h(2,ft,4,3,"ng-container",20)(3,ut,2,1,"ng-template",null,2,R),s()),t&2){let o=L(4),i=c(2).$implicit,n=c();d("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function bt(t,e){if(t&1&&h(0,_t,5,6,"a",24),t&2){let o=c().$implicit;d("ngxPermissionsOnly",o.Roles)}}function Ct(t,e){if(t&1&&(l(0,"li",19),h(1,pt,2,1,"ng-container",20)(2,bt,1,1,"ng-template",null,0,R),s()),t&2){let o=e.$implicit,i=L(3);r(),d("ngIf",o.ExternalLink)("ngIfElse",i)}}var it=(()=>{let e=class e{constructor(i,n,a,m){this.toggleSidebarService=i,this.notificationService=n,this.decodeTokenService=a,this.authService=m,this.Menu={},this.isCollapseSidebar=!1,this.token=a.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new j().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(k(i=>i.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(i){if(i){let n,a=i.split(" ");return a.length==1?n=a[0].substring(0,2):n=a.shift().charAt(0)+a.pop().charAt(0),n}}};e.\u0275fac=function(n){return new(n||e)(g(Ve),g(Ue),g(ze),g(Le))},e.\u0275cmp=v({type:e,selectors:[["app-menu"]],decls:23,vars:9,consts:[["DEFAULT_ROUTE",""],["NO_BADGE",""],["WITHOUT_BADGE",""],[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"],[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",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(n,a){n&1&&(l(0,"div",3),q(1,"async"),l(2,"div",4)(3,"button",5),O("click",function(){return a.onCallapseSidebar()}),b(4,"i",6),s(),l(5,"div",7)(6,"div",8)(7,"a",9),p(8),s(),l(9,"div",10)(10,"div",11),p(11),s(),b(12,"div",12),l(13,"a",13),O("click",function(){return a.onLogout()}),b(14,"i",14),p(15,"\xA0 "),l(16,"span"),p(17," Log Out"),s()()()()(),l(18,"div",15)(19,"ul",16),h(20,Ct,4,2,"li",17),s()()(),l(21,"div",18),b(22,"router-outlet"),s()()),n&2&&(z("nav-open",Q(1,7,a.toggleState$)),r(2),d("ngClass",a.isCollapseSidebar?"collapses":""),r(2),d("ngClass",a.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),w(" ",a.storeName," "),r(3),w(" ",a.token==null?null:a.token.LID," "),r(9),d("ngForOf",a.Menu))},dependencies:[ye,Me,Se,Te,Oe,we,We,et,Ne,xe],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let t=e;return t})();var vt=[{path:"",component:it,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-R6PEAOIJ.js").then(t=>t.DashboardModule),canActivate:[f],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("./chunk-MY7ARTXO.js").then(t=>t.ProductModule),canActivate:[f],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("./chunk-SA6XH3LZ.js").then(t=>t.InventoryRoutingModule),canActivate:[f],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("./chunk-E32WLDEK.js").then(t=>t.PriceRoutingModule),canActivate:[f],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("./chunk-3VPZUSG2.js").then(t=>t.OrdersModule),canActivate:[f],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-25L5GT35.js").then(t=>t.ReportModule),canActivate:[f],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("./chunk-LPBB2OY2.js").then(t=>t.LogisticModule),canActivate:[f],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("./chunk-5DRMEYTQ.js").then(t=>t.ChannelsModule),canActivate:[f],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("./chunk-OQJWOWTI.js").then(t=>t.LogsModule),canActivate:[f],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("./chunk-SAEXEG4F.js").then(t=>t.NotificationModule),canActivate:[f],data:{title:"Push Notification"}}]}],nt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[Y.forChild(vt),Y]});let t=e;return t})();var Mt=["selectId"];function St(t,e){if(t&1&&(l(0,"span",3),p(1),s()),t&2){let o=e.item,i=c();d("title",o[i.bindLabel]),r(),y(o[i.bindLabel])}}var at=(()=>{let e=class e{set items(i){this.ngSelectInfiniteScroll.data=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(i){this._selected=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new K,this.selectedChange=new P,this.selectedLabel=new P,this.onOpen=new P}onOpenSelect(){this.onOpen.emit()}onSelectChange(i){i?(this.selectedChange.emit(i[this.bindValue]),this.selectedLabel.emit(i[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-select-infinite"]],viewQuery:function(n,a){if(n&1&&fe(Mt,7),n&2){let m;ue(m=_e())&&(a.ngSelectElement=m.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},standalone:!0,features:[B],decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(n,a){if(n&1){let m=he();l(0,"ng-select",1,0),O("clear",function(){return I(m),T(a.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return I(m),T(a.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return I(m),T(a.onOpenSelect())})("change",function(C){return I(m),T(a.onSelectChange(C))}),h(2,St,2,2,"ng-template",2),s()}n&2&&(pe("width",a.width),d("appendTo",a.parent)("disabled",a.disabled)("virtualScroll",!0)("typeahead",a.ngSelectInfiniteScroll.input$)("items",a.ngSelectInfiniteScroll.bufferData)("bindLabel",a.bindLabel)("bindValue",a.bindValue)("placeholder",a.placeholder)("ngModel",a.selected)("clearable",a.clearable))},dependencies:[M,$,Re,Be,U,Ee,De]});let t=e;return t})(),K=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new H,this._destroy$=new H,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(te(200),ie(),k(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),ee(e=>e!==void 0),ne(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let o=-1,i;return this._data.filter(a=>(i=JSON.stringify(a).toLowerCase(),o=i.indexOf(e),o!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,o){if(Ke.IsNotEmpty(e)){let i=this._data.filter(n=>n[o].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=i.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,o=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(o)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var ot=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[M,U,He,qe,Ze,Qe,Ye,Je,F,J,at,$,ke]});let t=e;return t})();var _n=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({providers:[Ie],imports:[M,nt,Ge,F,ot,tt,Ae.forChild()]});let t=e;return t})();export{_n as MenuModule};
|
|
1
|
+
import{a as Ue}from"./chunk-ZLI5KKPV.js";import"./chunk-BTXJZOGD.js";import"./chunk-S36U4I4O.js";import{a as Ke}from"./chunk-6U6JR5K6.js";import{a as E}from"./chunk-BVIRHZTZ.js";import"./chunk-3UKBESDQ.js";import"./chunk-4ULJZM2I.js";import{b as Je}from"./chunk-4QK7Y7R2.js";import{c as Ze}from"./chunk-73DE2GZF.js";import{b as Ye}from"./chunk-4YCZLOHQ.js";import{c as qe}from"./chunk-RVVTVU4B.js";import{a as f}from"./chunk-LOACFIKK.js";import{g as Qe}from"./chunk-6NTRXLMW.js";import{a as Be,d as Re,e as $}from"./chunk-ACYUSHMS.js";import{a as Pe,b as ze,g as Le}from"./chunk-45SYAAZ4.js";import"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import{a as Ve,g as He,j as J,n as Ge}from"./chunk-3XWOT6GZ.js";import{t as We,u as F}from"./chunk-CTKEWRX4.js";import{F as je,K as Z,u as $e,x as Fe}from"./chunk-GXHE2CDH.js";import{h as Ee,m as De,y as U,z as ke}from"./chunk-O5MOPAT5.js";import{e as Ne,f as Ae}from"./chunk-X4WLRMDP.js";import{$a as d,$b as Q,Ac as Ie,B as ee,Cb as fe,Da as le,Db as ue,Dc as M,Eb as _e,H as te,Ha as se,Hb as L,Ia as r,Ib as p,Ja as g,Jb as y,K as ie,Kb as w,Oa as de,Pa as ce,Qb as B,V as ne,Vc as Te,Xc as Oe,Ya as me,Yc as we,Za as h,Zc as Y,_b as q,aa as u,ab as pe,bb as z,bc as R,c as H,da as x,db as G,ga as v,gb as ge,gc as be,ha as _,ia as ae,kc as V,la as oe,lb as l,mb as s,nb as b,oa as I,ob as N,pa as T,pb as A,pc as Ce,q as k,rb as he,rc as ve,tc as ye,ub as O,vc as Me,wb as c,wc as Se,ya as re,za as P,zc as xe}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var j=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[E.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[E.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[E.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[E.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fa-solid fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${Pe.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var rt=0,Xe="mat-badge-content",W=new Set,lt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!0,features:[B],decls:0,vars:0,template:function(n,a){},styles:[".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.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%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.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, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.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, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.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, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}"],encapsulation:2,changeDetection:0});let t=e;return t})(),et=(()=>{let e=class e{get color(){return this._color}set color(i){this._setColor(i),this._color=i}get content(){return this._content}set content(i){this._updateRenderedContent(i)}get description(){return this._description}set description(i){this._updateDescription(i)}constructor(i,n,a,m,S){this._ngZone=i,this._elementRef=n,this._ariaDescriber=a,this._renderer=m,this._animationMode=S,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=rt++,this._isInitialized=!1,this._interactivityChecker=x(Fe),this._document=x(ve);let C=x(be);if(!W.has(C)){W.add(C);let X=Ce(lt,{environmentInjector:x(oe)});C.onDestroy(()=>{W.delete(C),W.size===0&&X.destroy()})}}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",`mat-badge-content-${this._id}`),i.setAttribute("aria-hidden","true"),i.classList.add(Xe),this._animationMode==="NoopAnimations"&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Xe}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}};e.\u0275fac=function(n){return new(n||e)(g(ce),g(re),g($e),g(de),g(le,8))},e.\u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&z("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",V],disabled:[2,"matBadgeDisabled","disabled",V],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",V]},standalone:!0,features:[me]});let t=e;return t})(),tt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[je,Z,Z]});let t=e;return t})();function dt(t,e){if(t&1&&(N(0),l(1,"p",23),p(2),s(),A()),t&2){let o=c(3).$implicit;r(2),w(" ",o.Title," ")}}function ct(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function mt(t,e){if(t&1&&(l(0,"a",22),b(1,"i"),h(2,dt,3,1,"ng-container",20)(3,ct,2,1,"ng-template",null,1,R),s()),t&2){let o=L(4),i=c(2).$implicit;d("href",i.Url,se),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function pt(t,e){if(t&1&&(N(0),h(1,mt,5,5,"a",21),A()),t&2){let o=c().$implicit;r(),d("ngxPermissionsOnly",o.Roles)}}function gt(t,e){if(t&1&&(l(0,"p",23),p(1),s()),t&2){let o=c(4).$implicit;r(),w(" ",o.Title," ")}}function ht(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(4).$implicit;r(),y(o.Title)}}function ft(t,e){if(t&1&&(N(0),h(1,gt,2,1,"p",23),q(2,"async"),h(3,ht,2,1,"p"),A()),t&2){let o=c(4);r(),ge(Q(2,1,o.notifications$)!=0?1:3)}}function ut(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function _t(t,e){if(t&1&&(l(0,"a",25),b(1,"i"),h(2,ft,4,3,"ng-container",20)(3,ut,2,1,"ng-template",null,2,R),s()),t&2){let o=L(4),i=c(2).$implicit,n=c();d("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function bt(t,e){if(t&1&&h(0,_t,5,6,"a",24),t&2){let o=c().$implicit;d("ngxPermissionsOnly",o.Roles)}}function Ct(t,e){if(t&1&&(l(0,"li",19),h(1,pt,2,1,"ng-container",20)(2,bt,1,1,"ng-template",null,0,R),s()),t&2){let o=e.$implicit,i=L(3);r(),d("ngIf",o.ExternalLink)("ngIfElse",i)}}var it=(()=>{let e=class e{constructor(i,n,a,m){this.toggleSidebarService=i,this.notificationService=n,this.decodeTokenService=a,this.authService=m,this.Menu={},this.isCollapseSidebar=!1,this.token=a.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new j().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(k(i=>i.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(i){if(i){let n,a=i.split(" ");return a.length==1?n=a[0].substring(0,2):n=a.shift().charAt(0)+a.pop().charAt(0),n}}};e.\u0275fac=function(n){return new(n||e)(g(Ve),g(Ue),g(ze),g(Le))},e.\u0275cmp=v({type:e,selectors:[["app-menu"]],decls:23,vars:9,consts:[["DEFAULT_ROUTE",""],["NO_BADGE",""],["WITHOUT_BADGE",""],[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"],[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",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(n,a){n&1&&(l(0,"div",3),q(1,"async"),l(2,"div",4)(3,"button",5),O("click",function(){return a.onCallapseSidebar()}),b(4,"i",6),s(),l(5,"div",7)(6,"div",8)(7,"a",9),p(8),s(),l(9,"div",10)(10,"div",11),p(11),s(),b(12,"div",12),l(13,"a",13),O("click",function(){return a.onLogout()}),b(14,"i",14),p(15,"\xA0 "),l(16,"span"),p(17," Log Out"),s()()()()(),l(18,"div",15)(19,"ul",16),h(20,Ct,4,2,"li",17),s()()(),l(21,"div",18),b(22,"router-outlet"),s()()),n&2&&(z("nav-open",Q(1,7,a.toggleState$)),r(2),d("ngClass",a.isCollapseSidebar?"collapses":""),r(2),d("ngClass",a.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),w(" ",a.storeName," "),r(3),w(" ",a.token==null?null:a.token.LID," "),r(9),d("ngForOf",a.Menu))},dependencies:[ye,Me,Se,Te,Oe,we,We,et,Ne,xe],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let t=e;return t})();var vt=[{path:"",component:it,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-R6PEAOIJ.js").then(t=>t.DashboardModule),canActivate:[f],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("./chunk-N3CZPKYT.js").then(t=>t.ProductModule),canActivate:[f],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("./chunk-ANKBJ6LX.js").then(t=>t.InventoryRoutingModule),canActivate:[f],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("./chunk-UIZ56VQJ.js").then(t=>t.PriceRoutingModule),canActivate:[f],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("./chunk-XXJWUGOI.js").then(t=>t.OrdersModule),canActivate:[f],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-UEV7LKHN.js").then(t=>t.ReportModule),canActivate:[f],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("./chunk-LGATMK2R.js").then(t=>t.LogisticModule),canActivate:[f],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("./chunk-YJRFHXEU.js").then(t=>t.ChannelsModule),canActivate:[f],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("./chunk-ZUFS67DO.js").then(t=>t.LogsModule),canActivate:[f],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("./chunk-ZQ3CAWGU.js").then(t=>t.NotificationModule),canActivate:[f],data:{title:"Push Notification"}}]}],nt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[Y.forChild(vt),Y]});let t=e;return t})();var Mt=["selectId"];function St(t,e){if(t&1&&(l(0,"span",3),p(1),s()),t&2){let o=e.item,i=c();d("title",o[i.bindLabel]),r(),y(o[i.bindLabel])}}var at=(()=>{let e=class e{set items(i){this.ngSelectInfiniteScroll.data=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(i){this._selected=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new K,this.selectedChange=new P,this.selectedLabel=new P,this.onOpen=new P}onOpenSelect(){this.onOpen.emit()}onSelectChange(i){i?(this.selectedChange.emit(i[this.bindValue]),this.selectedLabel.emit(i[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-select-infinite"]],viewQuery:function(n,a){if(n&1&&fe(Mt,7),n&2){let m;ue(m=_e())&&(a.ngSelectElement=m.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},standalone:!0,features:[B],decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(n,a){if(n&1){let m=he();l(0,"ng-select",1,0),O("clear",function(){return I(m),T(a.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return I(m),T(a.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return I(m),T(a.onOpenSelect())})("change",function(C){return I(m),T(a.onSelectChange(C))}),h(2,St,2,2,"ng-template",2),s()}n&2&&(pe("width",a.width),d("appendTo",a.parent)("disabled",a.disabled)("virtualScroll",!0)("typeahead",a.ngSelectInfiniteScroll.input$)("items",a.ngSelectInfiniteScroll.bufferData)("bindLabel",a.bindLabel)("bindValue",a.bindValue)("placeholder",a.placeholder)("ngModel",a.selected)("clearable",a.clearable))},dependencies:[M,$,Re,Be,U,Ee,De]});let t=e;return t})(),K=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new H,this._destroy$=new H,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(te(200),ie(),k(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),ee(e=>e!==void 0),ne(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let o=-1,i;return this._data.filter(a=>(i=JSON.stringify(a).toLowerCase(),o=i.indexOf(e),o!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,o){if(Ke.IsNotEmpty(e)){let i=this._data.filter(n=>n[o].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=i.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,o=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(o)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var ot=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[M,U,He,qe,Ze,Qe,Ye,Je,F,J,at,$,ke]});let t=e;return t})();var _n=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({providers:[Ie],imports:[M,nt,Ge,F,ot,tt,Ae.forChild()]});let t=e;return t})();export{_n as MenuModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Ke}from"./chunk-NVF24LK5.js";import{a as Fe,b as ue,c as Le,d as He,e as de,f as $e,g as he,h as We,i as q,j as pe,k as E}from"./chunk-KCDL7SWP.js";import{b as le,c as z,d as Ue}from"./chunk-X4WLRMDP.js";import{$ as b,A as Pe,B as De,Ca as H,Dc as Oe,Ec as Me,Fc as Be,I as ie,N as _e,Pa as $,Q as se,T as _,U as ae,Wc as Ne,X as U,aa as F,b as g,ba as y,c as X,ca as h,cc as Re,dc as je,ea as xe,g as Ee,h as Te,ha as L,ic as ce,k as M,l as N,m as x,n as K,q as P,r as Ce}from"./chunk-HSFUKC7R.js";import{a as oe,i as I}from"./chunk-GNOSNGXM.js";var ze={production:!0,version:"3.19.
|
|
1
|
+
import{e as Ke}from"./chunk-NVF24LK5.js";import{a as Fe,b as ue,c as Le,d as He,e as de,f as $e,g as he,h as We,i as q,j as pe,k as E}from"./chunk-KCDL7SWP.js";import{b as le,c as z,d as Ue}from"./chunk-X4WLRMDP.js";import{$ as b,A as Pe,B as De,Ca as H,Dc as Oe,Ec as Me,Fc as Be,I as ie,N as _e,Pa as $,Q as se,T as _,U as ae,Wc as Ne,X as U,aa as F,b as g,ba as y,c as X,ca as h,cc as Re,dc as je,ea as xe,g as Ee,h as Te,ha as L,ic as ce,k as M,l as N,m as x,n as K,q as P,r as Ce}from"./chunk-HSFUKC7R.js";import{a as oe,i as I}from"./chunk-GNOSNGXM.js";var ze={production:!0,version:"3.19.2",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var pt="firebase",ft="10.12.1";q(pt,ft,"app");var G=new Re("ANGULARFIRE2_VERSION");var gt=(r,i)=>{let t=i?[i]:We(),e=[];return t.forEach(n=>{n.container.getProvider(r).instances.forEach(s=>{e.includes(s)||e.push(s)})}),e},V=class{constructor(){return gt(mt)}},mt="app-check";function fe(){}var Y=class{zone;delegate;constructor(i,t=Te){this.zone=i,this.delegate=t}now(){return this.delegate.now()}schedule(i,t,e){let n=this.zone,o=function(s){n.runGuarded(()=>{i.apply(this,[s])})};return this.delegate.schedule(o,t,e)}},ge=class{zone;task=null;constructor(i){this.zone=i}call(i,t){let e=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",fe,{},fe,fe)),t.pipe(U({next:e,complete:e,error:e})).subscribe(i).add(e)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},qe=(()=>{class r{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new Y(Zone.current)),this.insideAngular=t.run(()=>new Y(Zone.current,Ee)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(e){return new(e||r)(h($))};static \u0275prov=b({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();function At(){let r=globalThis.\u0275AngularFireScheduler;if(!r)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
|
|
2
2
|
provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return r}function Ve(r){return wt(At())(r)}function wt(r){return function(t){return t=t.lift(new ge(r.ngZone)),t.pipe(N(r.outsideAngular),M(r.insideAngular))}}var Ge=(()=>{let i=class i{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let n=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return n||[]}ParseToken(e){try{let o=e.split(".")[0].replace("-","+").replace("_","/"),s=JSON.parse(window.atob(o)),c=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(c));return l.header=s,l}catch{return!1}}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var bt=new Map,St={activated:!1,tokenObservers:[]},It={initialized:!1,enabled:!1};function T(r){return bt.get(r)||Object.assign({},St)}function Qe(){return It}var yt="https://content-firebaseappcheck.googleapis.com/v1";var Et="exchangeDebugToken",Je={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Ao=24*60*60*1e3;var Ae=class{constructor(i,t,e,n,o){if(this.operation=i,this.retryPolicy=t,this.getWaitDuration=e,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(i){return I(this,null,function*(){this.stop();try{this.pending=new ue,this.pending.promise.catch(t=>{}),yield Tt(this.getNextRun(i)),this.pending.resolve(),yield this.pending.promise,this.pending=new ue,this.pending.promise.catch(t=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(t){this.retryPolicy(t)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(i){if(i)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}};function Tt(r){return new Promise(i=>{setTimeout(i,r)})}var Ct={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},R=new He("appCheck","AppCheck",Ct);function et(r){if(!T(r).activated)throw R.create("use-before-activation",{appName:r.name})}function tt(e,n){return I(this,arguments,function*({url:r,body:i},t){let o={"Content-Type":"application/json"},s=t.getImmediate({optional:!0});if(s){let f=yield s.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(i),headers:o},c;try{c=yield fetch(r,a)}catch(f){throw R.create("fetch-network-error",{originalErrorMessage:f?.message})}if(c.status!==200)throw R.create("fetch-status-error",{httpStatus:c.status});let l;try{l=yield c.json()}catch(f){throw R.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=l.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw R.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:l.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function nt(r,i){let{projectId:t,appId:e,apiKey:n}=r.options;return{url:`${yt}/projects/${t}/apps/${e}:${Et}?key=${n}`,body:{debug_token:i}}}var Pt="firebase-app-check-database",Dt=1,we="firebase-app-check-store";var Q=null;function _t(){return Q||(Q=new Promise((r,i)=>{try{let t=indexedDB.open(Pt,Dt);t.onsuccess=e=>{r(e.target.result)},t.onerror=e=>{var n;i(R.create("storage-open",{originalErrorMessage:(n=e.target.error)===null||n===void 0?void 0:n.message}))},t.onupgradeneeded=e=>{let n=e.target.result;switch(e.oldVersion){case 0:n.createObjectStore(we,{keyPath:"compositeKey"})}}}catch(t){i(R.create("storage-open",{originalErrorMessage:t?.message}))}}),Q)}function xt(r,i){return Rt(jt(r),i)}function Rt(r,i){return I(this,null,function*(){let e=(yield _t()).transaction(we,"readwrite"),o=e.objectStore(we).put({compositeKey:r,value:i});return new Promise((s,a)=>{o.onsuccess=c=>{s()},e.onerror=c=>{var l;a(R.create("storage-set",{originalErrorMessage:(l=c.target.error)===null||l===void 0?void 0:l.message}))}})})}function jt(r){return`${r.options.appId}-${r.name}`}var ke=new $e("@firebase/app-check");function me(r,i){return Le()?xt(r,i).catch(t=>{ke.warn(`Failed to write token to IndexedDB. Error: ${t}`)}):Promise.resolve()}function rt(){return Qe().enabled}function ot(){return I(this,null,function*(){let r=Qe();if(r.enabled&&r.token)return r.token.promise;throw Error(`
|
|
3
3
|
Can't get debug token in production mode.
|
|
4
4
|
`)})}var Ot={error:"UNKNOWN_ERROR"};function Mt(r){return Fe.encodeString(JSON.stringify(r),!1)}function ve(r,i=!1){return I(this,null,function*(){let t=r.app;et(t);let e=T(t),n=e.token,o;if(n&&!J(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(J(c)?n=c:yield me(t,void 0))}if(!i&&n&&J(n))return{token:n.token};let s=!1;if(rt()){e.exchangeTokenPromise||(e.exchangeTokenPromise=tt(nt(t,yield ot()),r.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield me(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield T(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ke.warn(c.message):ke.error(c),o=c}let a;return n?o?J(n)?a={token:n.token,internalError:o}:a=Xe(o):(a={token:n.token},e.token=n,yield me(t,n)):a=Xe(o),s&&Lt(t,a),a})}function Bt(r){return I(this,null,function*(){let i=r.app;et(i);let{provider:t}=T(i);if(rt()){let e=yield ot(),{token:n}=yield tt(nt(i,e),r.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function Nt(r,i,t,e){let{app:n}=r,o=T(n),s={next:t,error:e,type:i};if(o.tokenObservers=[...o.tokenObservers,s],o.token&&J(o.token)){let a=o.token;Promise.resolve().then(()=>{t({token:a.token}),Ze(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>Ze(r))}function it(r,i){let t=T(r),e=t.tokenObservers.filter(n=>n.next!==i);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function Ze(r){let{app:i}=r,t=T(i),e=t.tokenRefresher;e||(e=Ft(r),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function Ft(r){let{app:i}=r;return new Ae(()=>I(this,null,function*(){let t=T(i),e;if(t.token?e=yield ve(r,!0):e=yield ve(r),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=T(i);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Je.RETRIAL_MIN_WAIT,Je.RETRIAL_MAX_WAIT)}function Lt(r,i){let t=T(r).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&i.error!=null?e.error(i.error):e.next(i)}catch{}}function J(r){return r.expireTimeMillis-Date.now()>0}function Xe(r){return{token:Mt(Ot),error:r}}var be=class{constructor(i,t){this.app=i,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:i}=T(this.app);for(let t of i)it(this.app,t.next);return Promise.resolve()}};function Ht(r,i){return new be(r,i)}function $t(r){return{getToken:i=>ve(r,i),getLimitedUseToken:()=>Bt(r),addTokenListener:i=>Nt(r,"INTERNAL",i),removeTokenListener:i=>it(r.app,i)}}var Wt="@firebase/app-check",Kt="0.8.4";var Ut="app-check",Ye="app-check-internal";function zt(){he(new de(Ut,r=>{let i=r.getProvider("app").getImmediate(),t=r.getProvider("heartbeat");return Ht(i,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,i,t)=>{r.getProvider(Ye).initialize()})),he(new de(Ye,r=>{let i=r.getProvider("app-check").getImmediate();return $t(i)},"PUBLIC").setInstantiationMode("EXPLICIT")),q(Wt,Kt)}zt();var qt=["localhost","0.0.0.0","127.0.0.1"],Do=typeof window<"u"&&qt.includes(window.location.hostname);var Gt="firebase",Jt="10.12.1";E.registerVersion(Gt,Jt,"app-compat");var Zt=["ngOnDestroy"],at=(r,i,t,e={})=>new Proxy(r,{get:(n,o)=>t.runOutsideAngular(()=>{if(r[o])return e?.spy?.get&&e.spy.get(o,r[o]),r[o];if(Zt.indexOf(o)>-1)return()=>{};let s=i.toPromise().then(a=>{let c=a?.[o];return typeof c=="function"?c.bind(a):c?.then?c.then(l=>t.run(()=>l)):t.run(()=>c)});return new Proxy(()=>{},{get:(a,c)=>s[c],apply:(a,c,l)=>s.then(d=>{let u=d?.(...l);return e?.spy?.apply&&e.spy.apply(o,l,u),u})})})});var ee=class{constructor(i){return i}},te=new y("angularfire2.app.options"),ne=new y("angularfire2.app.name");function Se(r,i,t){let e=typeof t=="string"&&t||"[DEFAULT]",n=typeof t=="object"&&t||{};n.name=n.name||e;let s=E.apps.filter(a=>a&&a.name===n.name)[0]||i.runOutsideAngular(()=>E.initializeApp(r,n));try{if(JSON.stringify(r)!==JSON.stringify(s.options)){let a=!!module.hot;Xt("error",`${s.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ee(s)}var Xt=(r,...i)=>{ce()&&typeof console<"u"&&console[r](...i)},Yt={provide:ee,useFactory:Se,deps:[te,$,[new xe,ne]]},Ho=(()=>{class r{static initializeApp(t,e){return{ngModule:r,providers:[{provide:te,useValue:t},{provide:ne,useValue:e}]}}constructor(t){E.registerVersion("angularfire",G.full,"core"),E.registerVersion("angularfire",G.full,"app-compat"),E.registerVersion("angular",je.full,t.toString())}static \u0275fac=function(e){return new(e||r)(h(H))};static \u0275mod=L({type:r});static \u0275inj=F({providers:[Yt]})}return r})();function ct(r,i,t,e,n){let[,o,s]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===r)||[];if(o)return Qt(n,s)||(st("error",`${i} was already initialized on the ${t} Firebase App with different settings.${en?" You may need to reload as Firebase is not HMR aware.":""}`),st("warn",{is:n,was:s})),o;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([r,a,n]),a}}function Qt(r,i){try{return r.toString()===i.toString()}catch{return r===i}}var en=typeof module<"u"&&!!module.hot,st=(r,...i)=>{ce()&&typeof console<"u"&&console[r](...i)};globalThis.\u0275AngularfireInstanceCache||=[];var tn=new y("angularfire2.auth.use-emulator"),nn=new y("angularfire2.auth.settings"),rn=new y("angularfire2.auth.tenant-id"),on=new y("angularfire2.auth.langugage-code"),sn=new y("angularfire2.auth.use-device-language"),an=new y("angularfire.auth.persistence"),cn=(r,i,t,e,n,o,s,a)=>ct(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let c=i.runOutsideAngular(()=>r.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,o&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,o,s,a]),Ie=(()=>{class r{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,o,s,a,c,l,d,u,p,f){let W=new X,j=K(void 0).pipe(M(s.outsideAngular),_(()=>o.runOutsideAngular(()=>import("./chunk-F4WIW6HA.js"))),P(()=>Se(t,o,e)),P(C=>cn(C,o,a,l,d,u,c,p)),se({bufferSize:1,refCount:!1}));if(Be(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=K(null);else{j.pipe(_e()).subscribe();let C=j.pipe(_(A=>A.getRedirectResult().then(D=>D,()=>null)),Ve,se({bufferSize:1,refCount:!1})),Z=j.pipe(_(A=>new g(D=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(O=>D.next(O),O=>D.error(O),()=>D.complete()))})))),re=j.pipe(_(A=>new g(D=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(O=>D.next(O),O=>D.error(O),()=>D.complete()))}))));this.authState=C.pipe(ae(Z),N(s.outsideAngular),M(s.insideAngular)),this.user=C.pipe(ae(re),N(s.outsideAngular),M(s.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):K(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):K(null))),this.credential=Pe(C,W,this.authState.pipe(De(A=>!A))).pipe(P(A=>A?.user?A:null),N(s.outsideAngular),M(s.insideAngular))}return at(this,j,o,{spy:{apply:(C,Z,re)=>{(C.startsWith("signIn")||C.startsWith("createUser"))&&re.then(A=>W.next(A))}}})}static \u0275fac=function(e){return new(e||r)(h(te),h(ne,8),h(H),h($),h(qe),h(tn,8),h(nn,8),h(rn,8),h(on,8),h(sn,8),h(an,8),h(V,8))};static \u0275prov=b({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),ti=(()=>{class r{constructor(){E.registerVersion("angularfire",G.full,"auth-compat")}static \u0275fac=function(e){return new(e||r)};static \u0275mod=L({type:r});static \u0275inj=F({providers:[Ie]})}return r})();function m(r,i,t,e){return new Promise((n,o)=>{r||o("IndexedDB not available");let s=r.open(i,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{o(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function lt(r,i,t,e,n){if(!r)return;let o=r.open(i,t);o.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,o.transaction)}),a.close()},o.onsuccess=s=>{s.target.result.close()}}function un(r,i,t){if(!r||!i||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(e=>{try{let n=i+1,o=indexedDB.open(r,n);o.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},o.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function dn(r,i){return r.objectStoreNames.contains(i)}function S(r,i,t){r||t("You need to use the openDatabase function to create a database before you query it!"),dn(r,i)||t(`objectStore does not exists: ${i}`)}function k(r,i){let t=r.transaction(i.storeName,i.dbMode);return t.onerror=i.error,t.onabort=i.abort,t}function v(r,i,t,e){return{storeName:i,dbMode:r,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(r){return r.readonly="readonly",r.readwrite="readwrite",r}(w||{}),ut=new y(null),ye=(()=>{class r{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Me(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,lt(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),m(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];lt(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=k(s,v(w.readwrite,t,d=>o.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>I(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(s=>o.error(s))})}bulkAdd(t,e){let n=new Promise((o,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=k(a,v(w.readwrite,t,o,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let j=W?l.add(u,W):l.add(u);j.onsuccess=C=>{let Z=C.target.result;p(Z)}}));o(Promise.all(d))}).catch(a=>s(a))});return x(n)}bulkDelete(t,e){let n=e.map(o=>new Promise((s,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=k(c,v(w.readwrite,t,a,s));l.objectStore(t).delete(o),l.oncomplete=()=>{this.getAll(t).pipe(ie(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return x(Promise.all(n))}getByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let c=k(o,v(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(o=>n.error(o))})}bulkGet(t,e){let n=e.map(o=>this.getByKey(t,o));return new g(o=>{Ce(n).subscribe(s=>{o.next(s),o.complete()})})}getByID(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(o=>n.error(o))})}getByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}getAll(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,c=>e.error(c));let a=k(n,v(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>I(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(o=>n.error(o))})}delete(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(ie(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(o=>n.error(o))})}deleteByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(o=>n.error(o))})}clear(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,a=>e.error(a));let o=k(n,v(w.readwrite,t,a=>e.error(a)));o.objectStore(t).clear(),o.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>I(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=o=>t.error(o),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(t,e,n,o=w.readonly){let s=new X;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>{s.error(p)});let u=k(a,v(o,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(o=>n.error(o))})}countByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).count(n);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}deleteObjectStore(t){return un(this.dbConfig.name,++this.dbConfig.version,t)}}return r.\u0275fac=function(t){return new(t||r)(h(ut),h(H))},r.\u0275prov=b({token:r,factory:r.\u0275fac}),r})(),li=(()=>{class r{static forRoot(t){return{ngModule:r,providers:[ye,{provide:ut,useValue:t}]}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=L({type:r}),r.\u0275inj=F({imports:[[Oe]]}),r})();var dt=(()=>{let i=class i{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let o=this.getKey(n);return this.db.add(this.DATABASE,e,o).pipe(P(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case le.Lazada:n="Lazada";break;case le.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};i.\u0275fac=function(n){return new(n||i)(h(ye))},i.\u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var ht=(()=>{let i=class i{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let n={Enabled:!0};e&&(n=oe(oe({},n),e)),localStorage.setItem("Intercom",JSON.stringify(n))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return z.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var Si=(()=>{let i=class i{constructor(e,n,o,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=o,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(U(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(ze.news).pipe(P(e=>e?.items?.map(n=>n?.properties)))}loginWithGoogle(e,n){e.preventDefault();let o=new pe;return o.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(o)).pipe(P(s=>s.credential),P(s=>s.idToken),_(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),U(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,o){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:o})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(z.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.Img=z.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;if(e!=null){let o=new Date(e.Token.expiredAt);return n<o?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};i.\u0275fac=function(n){return new(n||i)(h(Ke),h(Ge),h(Ie),h(Ue),h(dt),h(Ne),h(ht))},i.\u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();export{ze as a,Ge as b,Ho as c,ti as d,li as e,dt as f,Si as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as E}from"./chunk-WVKDNFEM.js";import{g as j}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-WVKDNFEM.js";import{g as j}from"./chunk-45SYAAZ4.js";import{b as S,e as n}from"./chunk-NVF24LK5.js";import{b as s,c as g}from"./chunk-X4WLRMDP.js";import{$ as l,B as I,E as u,Ua as U,Wc as w,d as P,da as c,n as d,q as A,w as C}from"./chunk-HSFUKC7R.js";var D=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/shopee/AddProduct",o).pipe(u(e=>d(null)))}generateAttribute(o){return o.map(t=>({attribute_id:t.attribute_id,attribute_value_list:t.attribute_value_list.map(e=>({value_id:e.value_id,name:e.name}))})),o}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var R=(()=>{let r=class r{constructor(){this.httpService=c(n)}getCategories(o){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tiktok/AddProduct",o).pipe(u(e=>d(null)))}generateAttribute(o){let t;return o.map(e=>(e.type=="PRODUCT_PROPERTY"?t={id:e.id,name:e.name,type:e.type,values:e.values}:t={id:e.id,name:e.values[0].id,type:e.type},t))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var H=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/lazada/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var T=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/woo/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var y=class{};var b=class{};var F=(()=>{let r=class r{constructor(){this.httpService=c(n)}getCategories(o){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tokopedia/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var x=(()=>{let r=class r{constructor(){this.toastrService=c(S)}showToastrUploadMultiple(o){let t=[],e=[],a=this.getResponseList(o);if(o.filter(p=>g.IsNotEmpty(p)).forEach(p=>{typeof p?.Response=="string"?e=[...e,a.length>1?this.setHtmlli(p.Response):this.setHtmlli(p.Response,!1)]:(p?.Response?.Success_list.forEach(f=>{t=[...t,a.length>1?this.setHtmlli(`
|
|
2
2
|
<div>
|
|
3
3
|
Product ${f.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${p.Channel}
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as N}from"./chunk-NF2ANZGK.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-3ORAGDUV.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-FMYZSZEX.js";import{a as De}from"./chunk-GP6U42SV.js";import{a as Ve,b as Te}from"./chunk-W3POM6UQ.js";import{a as be}from"./chunk-WVKDNFEM.js";import"./chunk-73DE2GZF.js";import{a as Fe}from"./chunk-3ZQBMP7R.js";import"./chunk-6NTRXLMW.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-ACYUSHMS.js";import{g as ue}from"./chunk-5HQAX7EA.js";import{b as de,e as ge}from"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import{d as Ie,l as we,m as ye,n as ve}from"./chunk-3XWOT6GZ.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-O5MOPAT5.js";import{c as me,e as he,f as Ce}from"./chunk-X4WLRMDP.js";import{$a as p,$b as T,B as A,Cc as E,Dc as ie,Gc as ae,Ha as D,Hb as J,Ia as l,Ib as d,Ja as f,Jb as B,Kb as F,Mb as I,Nb as w,Ob as y,Pb as Z,Q as $,Qb as Q,Sb as V,X as j,Za as h,_b as v,ac as X,bc as Y,da as z,ga as G,gb as S,hb as k,jb as L,kb as R,lb as o,mb as c,nb as P,oa as _,ob as q,pa as m,pb as K,rb as x,tc as ee,ub as u,wb as r,wc as te,zb as H,zc as ne}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list.length>0||e.failure_list.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={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",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{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()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[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,"container-fluid","mt-5"],[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","ngClass"],[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"],[1,"text-end",3,"ngClass"],[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"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[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","20px",3,"click","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","20px"],[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(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],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});let i=s;return i})();export{zt as PriceSingleChannelComponent};
|
|
1
|
+
import{a as N}from"./chunk-NF2ANZGK.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-3ORAGDUV.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-FMYZSZEX.js";import{a as De}from"./chunk-GP6U42SV.js";import{a as Ve,b as Te}from"./chunk-W3POM6UQ.js";import{a as be}from"./chunk-WVKDNFEM.js";import"./chunk-73DE2GZF.js";import{a as Fe}from"./chunk-3ZQBMP7R.js";import"./chunk-6NTRXLMW.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-ACYUSHMS.js";import{g as ue}from"./chunk-45SYAAZ4.js";import{b as de,e as ge}from"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import{d as Ie,l as we,m as ye,n as ve}from"./chunk-3XWOT6GZ.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-O5MOPAT5.js";import{c as me,e as he,f as Ce}from"./chunk-X4WLRMDP.js";import{$a as p,$b as T,B as A,Cc as E,Dc as ie,Gc as ae,Ha as D,Hb as J,Ia as l,Ib as d,Ja as f,Jb as B,Kb as F,Mb as I,Nb as w,Ob as y,Pb as Z,Q as $,Qb as Q,Sb as V,X as j,Za as h,_b as v,ac as X,bc as Y,da as z,ga as G,gb as S,hb as k,jb as L,kb as R,lb as o,mb as c,nb as P,oa as _,ob as q,pa as m,pb as K,rb as x,tc as ee,ub as u,wb as r,wc as te,zb as H,zc as ne}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list.length>0||e.failure_list.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={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",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{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()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[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,"container-fluid","mt-5"],[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","ngClass"],[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"],[1,"text-end",3,"ngClass"],[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"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[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","20px",3,"click","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","20px"],[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(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],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});let i=s;return i})();export{zt as PriceSingleChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk-LV34VUJQ.js";import{a as y,b}from"./chunk-K6H25CD6.js";import{a}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-LV34VUJQ.js";import{a as y,b}from"./chunk-K6H25CD6.js";import{a}from"./chunk-LOACFIKK.js";import"./chunk-45SYAAZ4.js";import"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import"./chunk-X4WLRMDP.js";import{$a as u,Dc as n,Ia as c,Pb as h,Qb as v,Vc as C,Zc as r,aa as p,ga as l,ha as s,lb as d,mb as f,nb as i}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var T=(()=>{let e=class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=l({type:e,selectors:[["app-inventory"]],standalone:!0,features:[h([M]),v],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,g){o&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),f()()(),i(4,"router-outlet")),o&2&&(c(3),u("Tabs",g.inventoryTabs))},dependencies:[n,b,y,r,C],encapsulation:2});let t=e;return t})();var F=[{path:"",component:T,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-CDTWKL3P.js").then(t=>t.MultiChannelComparison)},canActivate:[a],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-RVYVBC3W.js").then(t=>t.SingleChannelComparisonComponent)},canActivate:[a],data:{title:"Inventory Comparison"}}]}],P=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s({type:e}),e.\u0275inj=p({imports:[n,r.forChild(F)]});let t=e;return t})();export{P as InventoryRoutingModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as he}from"./chunk-2ORPFPW3.js";import"./chunk-LV34VUJQ.js";import{a as ce}from"./chunk-
|
|
1
|
+
import{a as he}from"./chunk-2ORPFPW3.js";import"./chunk-LV34VUJQ.js";import{a as ce}from"./chunk-Y3534N3T.js";import{a as se}from"./chunk-S36U4I4O.js";import{a as F}from"./chunk-XHAXYWZ7.js";import{b as pe,c as V}from"./chunk-3ORAGDUV.js";import"./chunk-BVIRHZTZ.js";import"./chunk-GP6U42SV.js";import"./chunk-W3POM6UQ.js";import"./chunk-6UK5EDKC.js";import"./chunk-NEQN5BMS.js";import"./chunk-4QK7Y7R2.js";import{a as le}from"./chunk-WVKDNFEM.js";import"./chunk-73DE2GZF.js";import"./chunk-3ZQBMP7R.js";import"./chunk-6NTRXLMW.js";import{g as M}from"./chunk-45SYAAZ4.js";import{b as te,e as ne}from"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import{d as ie,l as ae,m as oe,n as re}from"./chunk-3XWOT6GZ.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{c as q,h as X,m as Y,o as Z,y as ee}from"./chunk-O5MOPAT5.js";import{c as D}from"./chunk-X4WLRMDP.js";import{$ as j,$a as d,$b as y,B,Dc as K,Ia as h,Ib as _,Ja as m,Mb as L,Nb as T,Ob as E,Pb as z,Qb as $,Ua as w,X as k,Za as I,_b as v,da as S,ga as A,lb as c,mb as p,nb as U,oa as b,ob as G,pa as P,pb as W,qb as H,rb as N,ub as C,wb as g,wc as Q,zc as J}from"./chunk-HSFUKC7R.js";import{a as R,b as x}from"./chunk-GNOSNGXM.js";var O=(()=>{let r=class r{constructor(){this.authService=S(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(o=>{a=e.find(s=>s.ID==o?.parent?.id),a&&(a=x(R({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=e.find(s=>s.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(o=>o.id),n=t.map(o=>o.parent.id).filter((o,s,f)=>f.indexOf(o)===s)):(e=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,s,f)=>f.indexOf(o)===s),{locationIds:e,channelIds:a}}};r.\u0275fac=function(i){return new(i||r)},r.\u0275prov=j({token:r,factory:r.\u0275fac});let l=r;return l})();function ue(l,r){if(l&1){let u=N();c(0,"button",15),C("click",function(){b(u);let i=g().ngIf,e=g();return P(e.onUpdateItems(i))}),U(1,"i",16),_(2," Update "),p()}}function me(l,r){if(l&1&&(c(0,"actions")(1,"div",13),I(2,ue,3,0,"button",14),p()()),l&2){let u=r.ngIf,t=g();h(2),d("ngIf",t.productService.hasSelectionVariant(u))}}function ge(l,r){l&1&&H(0)}function Ce(l,r){if(l&1){let u=N();G(0),c(1,"app-table",17),C("onToggle",function(i){b(u);let e=g();return P(e.onShowDifferenceStock(i))})("onSubmit",function(i){b(u);let e=g();return P(e.updateStockByVariant(i))}),p(),W()}if(l&2){let u=r.ngIf,t=g();h(),d("data",u)("channel",t.channels())("showProductToggle",!0)("hiddenIPOSInventory",t.searchFilter.HiddenIPOSInventory)}}var $e=(()=>{let r=class r{constructor(t,i,e,n,a,o){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=S(V),this.multiChannelService=S(O),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=w([]),this.selectedChannels=w([]),this.channels=w([]),this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:F.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>D.isValidGUID(n.id)==!1),e=t.filter(n=>D.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(s=>{s.Channel?.forEach(f=>{n.push({ID:s.ID,Code:s.Code,Inventory:s.Inventory,LocationID:f.LocationID})})});let o={ListChannelID:i.filter(s=>s.selected).map(s=>s.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",o).subscribe(s=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=F.DIFFERENCE:this.searchFilter.filterModel=F.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(se,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"600px"}).afterClosed().pipe(B(n=>D.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}};r.\u0275fac=function(i){return new(i||r)(m(ne),m(te),m(ie),m(le),m(M),m(ae))},r.\u0275cmp=A({type:r,selectors:[["app-multi-channel-comparison"]],standalone:!0,features:[z([V,O]),$],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(c(0,"mainpanel",0),C("onSubmit",function(a){return e.onSearch(a)}),I(1,me,3,1,"actions",1),v(2,"async"),c(3,"filters"),I(4,ge,1,0,"ng-container",1),v(5,"async"),c(6,"div")(7,"label",2),_(8,"Channel"),p(),c(9,"multiwarehouse-tree-select",3),C("onChannelChange",function(a){return e.onChannelChange(a)}),p()(),c(10,"div",4)(11,"label",5),_(12,"PageNumber"),p(),c(13,"input",6),E("ngModelChange",function(a){return T(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),p()(),c(14,"div",4)(15,"label",7),_(16,"Page Size"),p(),c(17,"input",8),E("ngModelChange",function(a){return T(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),p()()(),c(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),I(22,Ce,2,4,"ng-container",1),v(23,"async"),c(24,"infinite-paginator",12),v(25,"async"),C("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),p()()()()()()),i&2&&(d("pageData",e.pageData)("hideSearchBox",!1),h(),d("ngIf",y(2,14,e.paginationService.data$)),h(3),d("ngIf",y(5,16,e.loader$)),h(5),d("multiple",!0),h(4),L("ngModel",e.searchFilter.PageNumber),h(4),L("ngModel",e.searchFilter.RowCount),h(5),d("ngIf",y(23,18,e.paginationService.data$)),h(2),d("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",y(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[K,Q,J,re,oe,ce,ee,q,Z,X,Y,pe,he],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let l=r;return l})();export{$e as MultiChannelComparison};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re}from"./chunk-4URWFKAM.js";import{b as le}from"./chunk-KRKQFGMS.js";import{a as pe,b as me}from"./chunk-VZHIFACR.js";import{a as ee,b as te,d as ne,e as ie}from"./chunk-ACYUSHMS.js";import{g as Z}from"./chunk-
|
|
1
|
+
import{a as re}from"./chunk-4URWFKAM.js";import{b as le}from"./chunk-KRKQFGMS.js";import{a as pe,b as me}from"./chunk-VZHIFACR.js";import{a as ee,b as te,d as ne,e as ie}from"./chunk-ACYUSHMS.js";import{g as Z}from"./chunk-45SYAAZ4.js";import{e as Y}from"./chunk-NVF24LK5.js";import{m as ae,n as oe}from"./chunk-3XWOT6GZ.js";import{h as G,m as K,y as Q}from"./chunk-O5MOPAT5.js";import{c as X}from"./chunk-X4WLRMDP.js";import{$ as E,$a as h,$b as d,Ac as k,Bc as H,Dc as U,Ha as v,Ia as p,Ib as s,Jb as C,Kb as b,Mb as O,Nb as q,Ob as z,Pb as A,Q as D,Qb as V,T as w,Za as u,_b as c,ac as J,d as I,da as g,ga as N,gb as B,hb as T,jb as $,kb as F,lb as a,mb as o,nb as f,oa as P,pa as R,q as M,rb as j,ub as x,wb as y,zc as W}from"./chunk-HSFUKC7R.js";import{a as S}from"./chunk-GNOSNGXM.js";var L=(()=>{let t=class t{constructor(){this.httpService=g(Y),this._pageination=new I({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(w(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=S(S({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=E({token:t,factory:t.\u0275fac});let i=t;return i})();function ce(i,t){if(i&1&&(a(0,"span",10),f(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,v)("alt",l.Name),p(),b(" ",l.Name," ")}}function de(i,t){if(i&1&&(a(0,"tr")(1,"td"),f(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td"),s(6),c(7,"json"),o(),a(8,"td"),s(9),c(10,"json"),o(),a(11,"td"),s(12),c(13,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,v),p(2),b(" ",l.ChannelName," "),p(2),C(d(7,5,l.Request)),p(3),C(d(10,7,l.Response)),p(3),C(J(13,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function he(i,t){if(i&1){let l=j();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),$(13,de,14,12,"tr",null,T),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),x("page",function(e){P(l);let r=y();return R(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=y();p(13),F((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function ge(i,t){i&1&&(a(0,"div",9),f(1,"app-empty-state"),o())}var ze=(()=>{let t=class t{constructor(){this.channelLogService=g(L),this.authService=g(Z),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(M(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=X.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),D(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=N({type:t,selectors:[["app-channel-log"]],standalone:!0,features:[A([L]),V],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),x("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),z("ngModelChange",function(_){return q(r.channelID,_)||(r.channelID=_),_}),u(7,ce,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,he,21,13,"div",8),c(13,"async"),u(14,ge,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),O("ngModel",r.channelID),p(6),B(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[U,W,H,k,oe,ae,re,me,pe,le,ie,ne,ee,te,Q,G,K]});let i=t;return i})();export{ze as a};
|