marketplacepos 3.15.1 → 3.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-K4IJAE56.js → chunk-223AMVJS.js} +1 -1
- package/Marketplace/{chunk-2NRYBLX2.js → chunk-2CPGMPV5.js} +1 -1
- package/Marketplace/{chunk-WDY3SIUY.js → chunk-2GOENWI7.js} +1 -1
- package/Marketplace/{chunk-5NDG3SUM.js → chunk-2PVAWZYH.js} +1 -1
- package/Marketplace/{chunk-WRS54BQ7.js → chunk-4LXGMBN3.js} +1 -1
- package/Marketplace/{chunk-TRGFX3AD.js → chunk-57TELWHA.js} +1 -1
- package/Marketplace/{chunk-BV6WKJBP.js → chunk-6IGT5QDR.js} +1 -1
- package/Marketplace/{chunk-RER2OLD4.js → chunk-C7BYUO26.js} +1 -1
- package/Marketplace/{chunk-PUC6ODUE.js → chunk-DB4SYYS3.js} +1 -1
- package/Marketplace/{chunk-UJL2GLHS.js → chunk-ET6CL7TB.js} +1 -1
- package/Marketplace/{chunk-IG2LDANH.js → chunk-G42WO2X3.js} +1 -1
- package/Marketplace/{chunk-OR4XOUSV.js → chunk-GXUUEWSP.js} +1 -1
- package/Marketplace/{chunk-TLKDYQBN.js → chunk-JIT24MKS.js} +1 -1
- package/Marketplace/{chunk-G7GU37FJ.js → chunk-KK7J7XX2.js} +1 -1
- package/Marketplace/{chunk-4HOIRUEO.js → chunk-KSD4RTA2.js} +1 -1
- package/Marketplace/{chunk-JQZFTRSI.js → chunk-LK6CXCMV.js} +1 -1
- package/Marketplace/{chunk-B4SCNDB5.js → chunk-LVV5SIGD.js} +1 -1
- package/Marketplace/{chunk-JSPMPN5T.js → chunk-QA6YQUG5.js} +1 -1
- package/Marketplace/{chunk-3I25MNEJ.js → chunk-T647XX4W.js} +1 -1
- package/Marketplace/{chunk-GOR2LPT5.js → chunk-TSBIT2NH.js} +1 -1
- package/Marketplace/{chunk-QITW54IW.js → chunk-TUQ2XWUY.js} +1 -1
- package/Marketplace/{chunk-W5TR3NDM.js → chunk-YDT27SVH.js} +1 -1
- package/Marketplace/{chunk-AMUX4WZH.js → chunk-YWDVKAPF.js} +1 -1
- package/Marketplace/{chunk-OCG3HG72.js → chunk-ZGBQHGAQ.js} +1 -1
- package/Marketplace/{chunk-PYCM3S43.js → chunk-ZJNEJVZC.js} +1 -1
- package/Marketplace/index.html +3 -3
- package/Marketplace/{main-XF2FUSJ6.js → main-OKDFR7QK.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe}from"./chunk-VVKIT2K2.js";import{a as ie}from"./chunk-BVIRHZTZ.js";import{a as xe}from"./chunk-GP6U42SV.js";import{a as de,b as ue}from"./chunk-O5FN3DLG.js";import{c as ge}from"./chunk-IJAO5VS5.js";import{a as se}from"./chunk-C62XLEFW.js";import{g as pe}from"./chunk-6NTRXLMW.js";import{g as le}from"./chunk-QITW54IW.js";import{d as _e,g as me}from"./chunk-UUNZHJ6W.js";import{t as ae,u as ce}from"./chunk-CTKEWRX4.js";import{b as Q,h as ee,l as te,y as ne}from"./chunk-QOA24ZLA.js";import{e as oe,f as re}from"./chunk-2AMEIUWK.js";import{$a as m,$b as R,Cc as G,Dc as J,Ha as S,Hb as b,Ia as r,Ib as p,Ja as I,Jb as k,Kb as v,Mb as O,Nb as D,Ob as N,Qb as H,Sb as T,V as L,Za as s,_b as $,ac as Z,bc as y,c as W,ga as z,gb as P,hb as E,jb as M,kb as V,lb as c,mb as _,nb as w,oa as g,ob as x,pa as d,pb as f,qb as U,rb as C,tc as q,ub as h,vc as K,wb as a,wc as X,yc as Y,za as B,zb as A}from"./chunk-HSFUKC7R.js";var j=t=>[t],Ce=t=>({"text-decoration-line-through":t}),he=t=>({"ms-10":t}),Te=t=>({"bg-gradient-warning":t});function be(t,l){if(t&1){let n=C();c(0,"mat-slide-toggle",14),h("toggleChange",function(){g(n);let e=a();return e.toggleStatus=!e.toggleStatus,d(e.onToggle())}),c(1,"small",15),p(2),_()()}if(t&2){let n=a();r(2),v(" ",n.productToggleTitle?n.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function ve(t,l){if(t&1){let n=C();c(0,"th")(1,"input",16),N("ngModelChange",function(e){g(n);let o=a();return D(o.checkboxState,e)||(o.checkboxState=e),d(e)}),h("ngModelChange",function(){g(n);let e=a();return d(e.onCheckboxStateChange())}),_()()}if(t&2){let n=a();r(),O("ngModel",n.checkboxState)}}function Se(t,l){t&1&&(c(0,"th",11),p(1,"POS"),_())}function we(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),w(4,"img",20),c(5,"div",21),p(6),$(7,"stringLimit"),_()()()(),f()),t&2){let n=l.$implicit;r(3),m("matTooltip",(n.Name==null?null:n.Name.length)>20?n.Name:""),r(),m("src",n==null?null:n.Img,S),r(2),v(" ",Z(7,3,n.Name,20)," ")}}function ye(t,l){t&1&&U(0)}function Fe(t,l){if(t&1&&(x(0),s(1,ye,1,0,"ng-container",34),f()),t&2){a();let n=b(7);r(),m("ngTemplateOutlet",n)}}function Ie(t,l){t&1&&U(0)}function Pe(t,l){if(t&1&&s(0,Ie,1,0,"ng-container",34),t&2){a(2);let n=b(7);m("ngTemplateOutlet",n)}}function Ee(t,l){if(t&1&&s(0,Pe,1,1,"ng-template",12),t&2){let n=a(4);m("ngxPermissionsOnly",T(1,j,n.rolePriceEdit))}}function Me(t,l){if(t&1){let n=C();x(0),c(1,"input",35),N("ngModelChange",function(e){g(n);let o=a(4).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),h("ngModelChange",function(){g(n);let e=a(4).$implicit,o=a();return d(o.onCheckboxStateProduct(e.ID))}),_(),f()}if(t&2){let n=a(4).$implicit;r(),O("ngModel",n.selected)}}function Ve(t,l){if(t&1&&s(0,Me,2,1,"ng-container",22),t&2){let n=a(3).$implicit;m("ngIf",(n==null||n.Variants==null?null:n.Variants.length)>1)}}function ke(t,l){if(t&1){let n=C();x(0),c(1,"img",36),h("click",function(e){g(n);let o=a(3).$implicit,u=a();return d(u.onZoomImage(e,o==null?null:o.ImageUrl))}),_(),f()}if(t&2){let n=a(3).$implicit;r(),A("src",n==null?null:n.ThumbnailUrl,S)}}function Oe(t,l){t&1&&w(0,"img",37)}function De(t,l){if(t&1&&(x(0),c(1,"td",29)(2,"div",30),s(3,Fe,2,1,"ng-container",31)(4,Ee,1,3,"ng-template",null,0,y)(6,Ve,1,1,"ng-template",null,1,y),c(8,"div",26),s(9,ke,2,1,"ng-container",31)(10,Oe,1,0,"ng-template",null,2,y),_()()(),c(12,"td",32)(13,"div"),p(14),_(),c(15,"small",33),p(16),_()(),f()),t&2){let n=b(5),i=b(11),e=a(2).$implicit,o=a();r(),m("rowSpan",e==null?null:e.Variants.length),r(2),m("ngIf",o.table=="inventory")("ngIfElse",n),r(5),m("ngClass",T(9,he,(e==null||e.Variants==null?null:e.Variants.length)<=1)),r(),m("ngIf",e==null?null:e.ThumbnailUrl)("ngIfElse",i),r(3),m("rowSpan",e==null?null:e.Variants.length),r(2),k(e==null?null:e.Name),r(2),v("(",e==null?null:e.Category,")")}}function Ne(t,l){if(t&1){let n=C();c(0,"input",16),N("ngModelChange",function(e){g(n);let o=a(2).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),_()}if(t&2){let n=a(2).$implicit;O("ngModel",n.selected)}}function $e(t,l){if(t&1&&(c(0,"td",38),s(1,Ne,1,1,"input",39),_()),t&2){let n=a().$implicit,i=a(2);r(),m("ngIf",i.printPOS(n)>=0||i.table=="price")}}function Be(t,l){if(t&1&&(c(0,"td",24),p(1),$(2,"number"),_()),t&2){let n=a().$implicit,i=a(2);r(),k(R(2,1,i.printPOS(n)))}}function Ue(t,l){if(t&1){let n=C();x(0),c(1,"td",40),h("click",function(){g(n);let e=a().$implicit,o=a().$implicit,u=a().$implicit,F=a();return d(F.openTableDialog(u.Name,o,e.ID,u.ChannelItemID))}),c(2,"div",30)(3,"div",41),p(4),$(5,"number"),_(),c(6,"a",42),h("click",function(e){return g(n),d(e==null?null:e.stopPropagation())}),w(7,"i",28),_()()(),f()}if(t&2){let n=l.$implicit,i=a(2).$implicit,e=a(2);r(),m("ngClass",T(5,Te,e.printPOS(i)!=e.printItem(n))),r(3),v(" ",R(5,3,e.printItem(n))," "),r(2),m("href",n.Url,S)}}function Re(t,l){t&1&&(c(0,"td",43)(1,"div",30)(2,"span"),p(3,"X"),_()()())}function je(t,l){if(t&1&&s(0,Ue,8,7,"ng-container",31)(1,Re,4,0,"ng-template",null,3,y),t&2){let n=l.$implicit,i=b(2),e=a().$implicit,o=a(2);m("ngIf",o.getItemFromChannel(e,n.ID))("ngIfElse",i)}}function We(t,l){if(t&1&&(c(0,"tr"),s(1,De,17,11,"ng-container",22),c(2,"td",23),p(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),p(7),_(),c(8,"div",21)(9,"a",27),w(10,"i",28),_()()()(),s(11,$e,2,1,"ng-template",12)(12,Be,3,3,"td",24),M(13,je,3,2,null,null,E),_()),t&2){let n=l.$implicit,i=l.$index,e=a(2);r(),m("ngIf",i==0),r(2),k(n==null?null:n.Model),r(2),m("matTooltip",n.Discontinued?e.discontinuedVariantMsg:""),r(),m("ngClass",T(8,Ce,n.Discontinued)),r(),v(" ",n.Code," "),r(2),m("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),S),r(2),m("ngxPermissionsOnly",T(10,j,e.rolePriceEdit)),r(),P(e.filter!=null&&e.filter.HiddenIPOSInventory?-1:12),r(),V(e.channel)}}function Le(t,l){if(t&1&&(c(0,"tbody"),M(1,We,15,12,"tr",null,E),_()),t&2){let n=l.$implicit;r(),V(n.Variants)}}var xt=(()=>{let l=class l{constructor(i,e,o){this.dialog=i,this.biggerPictureService=e,this.authService=o,this.showProductToggle=!1,this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=ie.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.onSubmit=new B,this.destroy$=new W,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(i){let e=this.data.filter(o=>o.ID==i);e.length>0&&(e=e.map(o=>(o.Variants=o.Variants.map(u=>(u.selected=o.selected,u)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(e=>(e.selected=this.checkboxState,e)),i))}getItemFromChannel(i,e){return i.Channel.find(o=>o.ChannelID==e)}printItem(i){if(this.table=="inventory")return i.Inventory;if(this.table=="price")return i.Price}openTableDialog(i,e,o,u){this.dialog.open(fe,{data:{Name:i,Variant:e,ChannelID:o,Table:this.table,ChannelItemID:u}}).afterClosed().pipe(L(this.destroy$)).subscribe(F=>{F!=null&&this.onSubmit.emit(F)})}printPOS(i){return this.table=="inventory"?i.Inventory?i.Inventory:0:this.table=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,e){this.biggerPictureService.openBiggerPicture(i,e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(e){return new(e||l)(I(_e),I(se),I(le))},l.\u0275cmp=z({type:l,selectors:[["app-table"]],inputs:{filter:"filter",data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle"},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[H],decls:18,vars:6,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(e,o){e&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),p(7,"Product"),_(),s(8,be,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),p(10,"Variant"),_(),c(11,"th",11),p(12,"SKU"),_(),s(13,ve,2,1,"ng-template",12)(14,Se,2,0,"th",11)(15,we,8,6,"ng-container",13),_()(),M(16,Le,3,0,"tbody",null,E),_()()),e&2&&(r(8),P(o.showProductToggle?8:-1),r(5),m("ngxPermissionsOnly",T(4,j,o.rolePriceEdit)),r(),P(o.filter!=null&&o.filter.HiddenIPOSInventory?-1:14),r(),m("ngForOf",o.channel),r(),V(o.data))},dependencies:[J,q,K,X,Y,G,ne,Q,ee,te,ue,de,me,pe,ge,re,oe,ce,ae,xe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=l;return t})();export{xt as a};
|
|
1
|
+
import{a as fe}from"./chunk-VVKIT2K2.js";import{a as ie}from"./chunk-BVIRHZTZ.js";import{a as xe}from"./chunk-GP6U42SV.js";import{a as de,b as ue}from"./chunk-O5FN3DLG.js";import{c as ge}from"./chunk-IJAO5VS5.js";import{a as se}from"./chunk-C62XLEFW.js";import{g as pe}from"./chunk-6NTRXLMW.js";import{g as le}from"./chunk-TUQ2XWUY.js";import{d as _e,g as me}from"./chunk-UUNZHJ6W.js";import{t as ae,u as ce}from"./chunk-CTKEWRX4.js";import{b as Q,h as ee,l as te,y as ne}from"./chunk-QOA24ZLA.js";import{e as oe,f as re}from"./chunk-2AMEIUWK.js";import{$a as m,$b as R,Cc as G,Dc as J,Ha as S,Hb as b,Ia as r,Ib as p,Ja as I,Jb as k,Kb as v,Mb as O,Nb as D,Ob as N,Qb as H,Sb as T,V as L,Za as s,_b as $,ac as Z,bc as y,c as W,ga as z,gb as P,hb as E,jb as M,kb as V,lb as c,mb as _,nb as w,oa as g,ob as x,pa as d,pb as f,qb as U,rb as C,tc as q,ub as h,vc as K,wb as a,wc as X,yc as Y,za as B,zb as A}from"./chunk-HSFUKC7R.js";var j=t=>[t],Ce=t=>({"text-decoration-line-through":t}),he=t=>({"ms-10":t}),Te=t=>({"bg-gradient-warning":t});function be(t,l){if(t&1){let n=C();c(0,"mat-slide-toggle",14),h("toggleChange",function(){g(n);let e=a();return e.toggleStatus=!e.toggleStatus,d(e.onToggle())}),c(1,"small",15),p(2),_()()}if(t&2){let n=a();r(2),v(" ",n.productToggleTitle?n.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function ve(t,l){if(t&1){let n=C();c(0,"th")(1,"input",16),N("ngModelChange",function(e){g(n);let o=a();return D(o.checkboxState,e)||(o.checkboxState=e),d(e)}),h("ngModelChange",function(){g(n);let e=a();return d(e.onCheckboxStateChange())}),_()()}if(t&2){let n=a();r(),O("ngModel",n.checkboxState)}}function Se(t,l){t&1&&(c(0,"th",11),p(1,"POS"),_())}function we(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),w(4,"img",20),c(5,"div",21),p(6),$(7,"stringLimit"),_()()()(),f()),t&2){let n=l.$implicit;r(3),m("matTooltip",(n.Name==null?null:n.Name.length)>20?n.Name:""),r(),m("src",n==null?null:n.Img,S),r(2),v(" ",Z(7,3,n.Name,20)," ")}}function ye(t,l){t&1&&U(0)}function Fe(t,l){if(t&1&&(x(0),s(1,ye,1,0,"ng-container",34),f()),t&2){a();let n=b(7);r(),m("ngTemplateOutlet",n)}}function Ie(t,l){t&1&&U(0)}function Pe(t,l){if(t&1&&s(0,Ie,1,0,"ng-container",34),t&2){a(2);let n=b(7);m("ngTemplateOutlet",n)}}function Ee(t,l){if(t&1&&s(0,Pe,1,1,"ng-template",12),t&2){let n=a(4);m("ngxPermissionsOnly",T(1,j,n.rolePriceEdit))}}function Me(t,l){if(t&1){let n=C();x(0),c(1,"input",35),N("ngModelChange",function(e){g(n);let o=a(4).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),h("ngModelChange",function(){g(n);let e=a(4).$implicit,o=a();return d(o.onCheckboxStateProduct(e.ID))}),_(),f()}if(t&2){let n=a(4).$implicit;r(),O("ngModel",n.selected)}}function Ve(t,l){if(t&1&&s(0,Me,2,1,"ng-container",22),t&2){let n=a(3).$implicit;m("ngIf",(n==null||n.Variants==null?null:n.Variants.length)>1)}}function ke(t,l){if(t&1){let n=C();x(0),c(1,"img",36),h("click",function(e){g(n);let o=a(3).$implicit,u=a();return d(u.onZoomImage(e,o==null?null:o.ImageUrl))}),_(),f()}if(t&2){let n=a(3).$implicit;r(),A("src",n==null?null:n.ThumbnailUrl,S)}}function Oe(t,l){t&1&&w(0,"img",37)}function De(t,l){if(t&1&&(x(0),c(1,"td",29)(2,"div",30),s(3,Fe,2,1,"ng-container",31)(4,Ee,1,3,"ng-template",null,0,y)(6,Ve,1,1,"ng-template",null,1,y),c(8,"div",26),s(9,ke,2,1,"ng-container",31)(10,Oe,1,0,"ng-template",null,2,y),_()()(),c(12,"td",32)(13,"div"),p(14),_(),c(15,"small",33),p(16),_()(),f()),t&2){let n=b(5),i=b(11),e=a(2).$implicit,o=a();r(),m("rowSpan",e==null?null:e.Variants.length),r(2),m("ngIf",o.table=="inventory")("ngIfElse",n),r(5),m("ngClass",T(9,he,(e==null||e.Variants==null?null:e.Variants.length)<=1)),r(),m("ngIf",e==null?null:e.ThumbnailUrl)("ngIfElse",i),r(3),m("rowSpan",e==null?null:e.Variants.length),r(2),k(e==null?null:e.Name),r(2),v("(",e==null?null:e.Category,")")}}function Ne(t,l){if(t&1){let n=C();c(0,"input",16),N("ngModelChange",function(e){g(n);let o=a(2).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),_()}if(t&2){let n=a(2).$implicit;O("ngModel",n.selected)}}function $e(t,l){if(t&1&&(c(0,"td",38),s(1,Ne,1,1,"input",39),_()),t&2){let n=a().$implicit,i=a(2);r(),m("ngIf",i.printPOS(n)>=0||i.table=="price")}}function Be(t,l){if(t&1&&(c(0,"td",24),p(1),$(2,"number"),_()),t&2){let n=a().$implicit,i=a(2);r(),k(R(2,1,i.printPOS(n)))}}function Ue(t,l){if(t&1){let n=C();x(0),c(1,"td",40),h("click",function(){g(n);let e=a().$implicit,o=a().$implicit,u=a().$implicit,F=a();return d(F.openTableDialog(u.Name,o,e.ID,u.ChannelItemID))}),c(2,"div",30)(3,"div",41),p(4),$(5,"number"),_(),c(6,"a",42),h("click",function(e){return g(n),d(e==null?null:e.stopPropagation())}),w(7,"i",28),_()()(),f()}if(t&2){let n=l.$implicit,i=a(2).$implicit,e=a(2);r(),m("ngClass",T(5,Te,e.printPOS(i)!=e.printItem(n))),r(3),v(" ",R(5,3,e.printItem(n))," "),r(2),m("href",n.Url,S)}}function Re(t,l){t&1&&(c(0,"td",43)(1,"div",30)(2,"span"),p(3,"X"),_()()())}function je(t,l){if(t&1&&s(0,Ue,8,7,"ng-container",31)(1,Re,4,0,"ng-template",null,3,y),t&2){let n=l.$implicit,i=b(2),e=a().$implicit,o=a(2);m("ngIf",o.getItemFromChannel(e,n.ID))("ngIfElse",i)}}function We(t,l){if(t&1&&(c(0,"tr"),s(1,De,17,11,"ng-container",22),c(2,"td",23),p(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),p(7),_(),c(8,"div",21)(9,"a",27),w(10,"i",28),_()()()(),s(11,$e,2,1,"ng-template",12)(12,Be,3,3,"td",24),M(13,je,3,2,null,null,E),_()),t&2){let n=l.$implicit,i=l.$index,e=a(2);r(),m("ngIf",i==0),r(2),k(n==null?null:n.Model),r(2),m("matTooltip",n.Discontinued?e.discontinuedVariantMsg:""),r(),m("ngClass",T(8,Ce,n.Discontinued)),r(),v(" ",n.Code," "),r(2),m("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),S),r(2),m("ngxPermissionsOnly",T(10,j,e.rolePriceEdit)),r(),P(e.filter!=null&&e.filter.HiddenIPOSInventory?-1:12),r(),V(e.channel)}}function Le(t,l){if(t&1&&(c(0,"tbody"),M(1,We,15,12,"tr",null,E),_()),t&2){let n=l.$implicit;r(),V(n.Variants)}}var xt=(()=>{let l=class l{constructor(i,e,o){this.dialog=i,this.biggerPictureService=e,this.authService=o,this.showProductToggle=!1,this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=ie.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.onSubmit=new B,this.destroy$=new W,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(i){let e=this.data.filter(o=>o.ID==i);e.length>0&&(e=e.map(o=>(o.Variants=o.Variants.map(u=>(u.selected=o.selected,u)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(e=>(e.selected=this.checkboxState,e)),i))}getItemFromChannel(i,e){return i.Channel.find(o=>o.ChannelID==e)}printItem(i){if(this.table=="inventory")return i.Inventory;if(this.table=="price")return i.Price}openTableDialog(i,e,o,u){this.dialog.open(fe,{data:{Name:i,Variant:e,ChannelID:o,Table:this.table,ChannelItemID:u}}).afterClosed().pipe(L(this.destroy$)).subscribe(F=>{F!=null&&this.onSubmit.emit(F)})}printPOS(i){return this.table=="inventory"?i.Inventory?i.Inventory:0:this.table=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,e){this.biggerPictureService.openBiggerPicture(i,e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(e){return new(e||l)(I(_e),I(se),I(le))},l.\u0275cmp=z({type:l,selectors:[["app-table"]],inputs:{filter:"filter",data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle"},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[H],decls:18,vars:6,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(e,o){e&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),p(7,"Product"),_(),s(8,be,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),p(10,"Variant"),_(),c(11,"th",11),p(12,"SKU"),_(),s(13,ve,2,1,"ng-template",12)(14,Se,2,0,"th",11)(15,we,8,6,"ng-container",13),_()(),M(16,Le,3,0,"tbody",null,E),_()()),e&2&&(r(8),P(o.showProductToggle?8:-1),r(5),m("ngxPermissionsOnly",T(4,j,o.rolePriceEdit)),r(),P(o.filter!=null&&o.filter.HiddenIPOSInventory?-1:14),r(),m("ngForOf",o.channel),r(),V(o.data))},dependencies:[J,q,K,X,Y,G,ne,Q,ee,te,ue,de,me,pe,ge,re,oe,ce,ae,xe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=l;return t})();export{xt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-EEOWKNSQ.js";import{g as j}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-EEOWKNSQ.js";import{g as j}from"./chunk-TUQ2XWUY.js";import{b as S,e as d}from"./chunk-AAFEUTPF.js";import{b as a,c as g}from"./chunk-2AMEIUWK.js";import{$ as l,B as C,E as u,Ua as U,Wc as w,d as P,da as c,n,q as A,w as I}from"./chunk-HSFUKC7R.js";var R=(()=>{let r=class r{constructor(){this.httpService=c(d)}getAttributes(o,t){return this.httpService.get("api/product/shopee/GetAttributes",[{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=>n(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,original_value_name:e.original_value_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 D=(()=>{let r=class r{constructor(){this.httpService=c(d)}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=>n(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(d)}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=>n(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(d)}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=>n(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(d)}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=>n(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=[],s=this.getResponseList(o);if(o.filter(p=>g.IsNotEmpty(p)).forEach(p=>{typeof p?.Response=="string"?e=[...e,s.length>1?this.setHtmlli(p.Response):this.setHtmlli(p.Response,!1)]:(p?.Response?.Success_list.forEach(f=>{t=[...t,s.length>1?this.setHtmlli(`Product ${f.Name} was <b>successfully</b> uploaded to ${p.Channel}`):this.setHtmlli(`Product ${f.Name} was <b>successfully</b> uploaded to ${p.Channel}`,!1)]}),p?.Response.Fail_list.forEach(f=>{e=[...e,s.length>1?this.setHtmlli(f.Message):this.setHtmlli(f.Message,!1)]}))}),e.length>0&&t.length>0){let p=[...t,...e];this.toastrService.warning(this.concatMessage(p),"Warning!",{enableHtml:!0})}else t.length>0&&e.length==0?this.toastrService.success(this.concatMessage(t),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(e),"Error",{enableHtml:!0})}concatMessage(o=[]){let t="";return o.forEach(e=>{t+=e}),o.length>1?`<ol>${t}</ol>`:t}getResponseList(o){let t=[];return o.filter(e=>g.IsNotEmpty(e)).forEach(e=>{typeof e.Response=="string"?t=[...t,e.Response]:(e?.Response.Success_list.forEach(s=>{t=[...t,s.Name]}),e?.Response.Fail_list.forEach(s=>{t=[...t,s.Message]}))}),t}setHtmlli(o,t=!0){return t?`<li>${o}</li>`: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 M=(()=>{let r=class r{constructor(){this.httpService=c(d)}uploadProduct(o){return this.httpService.post("api/product/shopify/AddProduct",o).pipe(u(e=>n(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 zt=(()=>{let r=class r{constructor(){this.authService=c(j),this.productService=c(E),this.shoppeUploadService=c(R),this.tiktokUploadService=c(D),this.lazadaUploadService=c(H),this.tokopediaUploadService=c(F),this.wooUploadService=c(T),this.shopifyUploadService=c(M),this.toastrHandlingService=c(x),this.toastr=c(S),this.router=c(w),this._channels=this.authService.getChannels(),this._selectedProduct=new P(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(C(o=>o&&o.length>0))}get channels(){return this._channels}getStoredProducts(){let o=localStorage.getItem("productsUpload");if(o){let t=JSON.parse(o);return t&&t.length>0?t:[]}else return[]}setSelectedProduct(o){localStorage.setItem("productsUpload",JSON.stringify(o)),this._selectedProduct.next(o)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let o=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(o,this.channels)}get channelProductUpload(){let o=this.getUnselectedChannels();return U(o.map(e=>{let s=new y;return s.id=e.ID,s.name=e.Name,s.type=e.TypeID,s.categoryId=null,s.attributes=[],s.selected=!1,s}))}onUploadProduct(o){let t=o.filter(e=>e.selected&&e.attributes.length>0&&e.type==a.Shopee||e.selected&&g.IsNotEmpty(e.categoryId)&&e.type!=a.Shopee||e.selected&&e.type==a.Shopify);if(t.length>0){let e=this.generateDataForUpload(t);this.uploadProduct(e)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(o){let t=this.generateObservableForUpload(o);I(t).pipe(A(e=>{let s=[];return e.forEach(p=>{s=[...s,...p]}),s})).subscribe({next:(e=[])=>{g.IsNotEmpty(e)&&this.toastrHandlingService.showToastrUploadMultiple(e),this.hasSuccessRes(e)&&this.onSuccessUpload()}})}hasSuccessRes(o){let t=!1;return o.forEach(e=>{e?.Response.Success_list?.length>0&&g.IsNotEmpty(e)&&(t=!0)}),t}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(o){let t=[],e=[],s=[],p=[],f=[],k=[];o.forEach(h=>{switch(h.ChannelType){case a.Shopee:e.push(h);break;case a.Tiktok:t.push(h);break;case a.Lazada:s.push(h);break;case a.Tokopedia:p.push(h);break;case a.WooCommerce:f.push(h);break;case a.Shopify:k.push(h);break}});let m=[];return[{type:a.Shopee,data:e},{type:a.Tiktok,data:t},{type:a.Lazada,data:s},{type:a.Tokopedia,data:p},{type:a.WooCommerce,data:f},{type:a.Shopify,data:k}].filter(h=>h.data.length>0).forEach(h=>{switch(h.type){case a.Shopee:m.push(this.shoppeUploadService.uploadProduct(e));break;case a.Tiktok:m.push(this.tiktokUploadService.uploadProduct(t));break;case a.Lazada:m.push(this.lazadaUploadService.uploadProduct(s));break;case a.Tokopedia:m.push(this.tokopediaUploadService.uploadProduct(p));break;case a.WooCommerce:m.push(this.wooUploadService.uploadProduct(f));break;case a.Shopify:m.push(this.shopifyUploadService.uploadProduct(k));break}}),m}generateDataForUpload(o){let t=[];return o.forEach(e=>{let s=new b;s.ChannelID=e.id,s.ChannelType=e.type,s.Products=this._selectedProduct.getValue(),e.type==a.Shopify?delete s.CategoryID:s.CategoryID=e.categoryId,e.type==a.WooCommerce||e.type==a.Shopify?s.Attribute=e.attributes[0]:s.Attributes=this.formatAttributes(e.type,e.attributes),t.push(s)}),t}formatAttributes(o,t){let e;switch(o){case a.Shopee:e=this.shoppeUploadService.generateAttribute(t);break;case a.Tiktok:e=this.tiktokUploadService.generateAttribute(t);break;case a.WooCommerce:e=this.tiktokUploadService.generateAttribute(t);break;case a.Tokopedia:e=t;break;case a.Shopify:e=t;break;default:e=[];break}return e}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();export{R as a,D as b,H as c,F as d,T as e,zt as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-
|
|
1
|
+
import{a as Z}from"./chunk-223AMVJS.js";import{a as Y}from"./chunk-572KOLLQ.js";import{b as ee,c as D}from"./chunk-VVKIT2K2.js";import"./chunk-BVIRHZTZ.js";import{b as X}from"./chunk-RXDUUYMX.js";import"./chunk-GP6U42SV.js";import"./chunk-O5FN3DLG.js";import"./chunk-VHYFEAS2.js";import{a as Q}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{g as K}from"./chunk-TUQ2XWUY.js";import{b as $,e as H}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as q,l as z,m as J}from"./chunk-UUNZHJ6W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{c as U,h as j,l as k,n as G,y as W}from"./chunk-QOA24ZLA.js";import"./chunk-2AMEIUWK.js";import{$a as P,$b as x,B as F,Cc as b,Dc as O,Ia as d,Ib as _,Ja as h,Mb as v,Nb as y,Ob as V,Pb as R,Q as T,Qb as L,X as M,Za as w,_b as C,da as N,ga as E,lb as a,mb as m,nb as I,oa as s,pa as c,rb as S,ub as g,wb as o,wc as A,zc as B}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";function te(r,l){if(r&1){let n=S();a(0,"button",15),g("click",function(){s(n);let t=o().ngIf,i=o(2);return c(i.onUpdateItems(t))}),I(1,"i",16),_(2," Update "),m()}}function ie(r,l){if(r&1&&(a(0,"div"),w(1,te,3,0,"button",14),m()),r&2){let n=l.ngIf,e=o(2);d(),P("ngIf",e.productService.hasSelectionVariant(n))}}function ne(r,l){if(r&1){let n=S();a(0,"mainpanel",1),g("onSubmit",function(t){s(n);let i=o();return c(i.onSearch(t))}),a(1,"actions")(2,"div",2),w(3,ie,2,1,"div",3),C(4,"async"),a(5,"button",4),g("click",function(){s(n);let t=o();return c(t.openExportDialog())}),I(6,"i",5),a(7,"span"),_(8,"Export"),m()()()(),a(9,"filters")(10,"div")(11,"label",6),_(12,"Page Number"),m(),a(13,"input",7),V("ngModelChange",function(t){s(n);let i=o();return y(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),c(t)}),m()(),a(14,"div",8)(15,"label",6),_(16,"Page Size"),m(),a(17,"input",7),V("ngModelChange",function(t){s(n);let i=o();return y(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),c(t)}),m()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),C(23,"async"),g("onToggle",function(t){s(n);let i=o();return c(i.onShowDifferencePrice(t))})("onSubmit",function(t){s(n);let i=o();return c(i.updatePriceByVariant(t))}),m(),a(24,"infinite-paginator",13),C(25,"async"),g("onNextPage",function(){s(n);let t=o();return c(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){s(n);let t=o();return c(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(n);let t=o();return c(t.infinitePagination.getRowCount(t.searchFilter))}),m()()()()()()}if(r&2){let n=l.ngIf,e=o();P("textButton","Search"),d(3),P("ngIf",x(4,14,e.data$)),d(10),v("ngModel",e.searchFilter.PageNumber),d(4),v("ngModel",e.searchFilter.RowCount),d(5),P("showProductToggle",!0)("data",x(23,16,e.data$))("channel",e.channelOptions)("filter",n.Filter),d(2),P("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",x(25,18,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var ve=(()=>{let l=class l{constructor(e,t,i,f,u,p){this.http=e,this.toastr=t,this.dialog=i,this.productService=f,this.authService=u,this.decimalPipe=p,this.infinitePagination=N(D),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(M(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(e){let t=this.productService.selectedVariantProduct(e);if(t.length>0){let f=t.map(p=>({ID:p.ID,Code:p.Code,Price:p.UnitPrice}));var i=this.channelOptions.filter(p=>p.selected).map(p=>p.ID);let u={ListChannelID:i,ListPrice:f};this.http.post("/api/Price/UpdateChannel",u).subscribe(p=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+u.ListPrice.length+" items in "+u.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(i=>{let f=this.productService.findChannelById(t.ID,this.channelOptions),u=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+f.Name+" to "+u,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(e){let t=this.productService.selectedVariantProduct(e);this.dialog.open(Y,{data:{selectedItems:t,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(F(i=>i!==void 0)).subscribe(i=>{this.channelOptions=i,this.updatePrice(e)})}openExportDialog(){this.dialog.open(X,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}};l.\u0275fac=function(t){return new(t||l)(h(H),h($),h(q),h(Q),h(K),h(b))},l.\u0275cmp=E({type:l,selectors:[["app-price-pos-channel"]],standalone:!0,features:[R([D,b]),L],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","filter"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(t,i){t&1&&(w(0,ne,26,20,"mainpanel",0),C(1,"async")),t&2&&P("ngIf",x(1,1,i.loader$))},dependencies:[O,A,B,W,U,G,j,k,ee,J,z,Z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let r=l;return r})();export{ve as PricePosChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as te}from"./chunk-
|
|
1
|
+
import{a as te}from"./chunk-223AMVJS.js";import{a as ee}from"./chunk-572KOLLQ.js";import{a as I}from"./chunk-XHAXYWZ7.js";import{b as ne,c as N}from"./chunk-VVKIT2K2.js";import"./chunk-BVIRHZTZ.js";import"./chunk-GP6U42SV.js";import"./chunk-O5FN3DLG.js";import"./chunk-VHYFEAS2.js";import{a as Z}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{g as $}from"./chunk-TUQ2XWUY.js";import{b as Q,e as J}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as q,l as X,m as Y}from"./chunk-UUNZHJ6W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{c as j,h as G,l as W,n as z,y as H}from"./chunk-QOA24ZLA.js";import{c as K}from"./chunk-2AMEIUWK.js";import{$a as d,$b as S,B as V,Dc as U,Ia as u,Ib as y,Ja as h,Mb as b,Nb as P,Ob as M,Pb as R,Qb as O,X as D,Za as _,_b as f,da as F,ga as T,lb as l,mb as p,nb as E,oa as s,ob as L,pa as c,pb as B,rb as v,ub as C,wb as o,wc as k,zc as A}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";function ie(a,r){if(a&1){let n=v();l(0,"button",14),C("click",function(){s(n);let t=o().ngIf,i=o(2);return c(i.onUpdateItems(t))}),E(1,"i",15),y(2," Update "),p()}}function ae(a,r){if(a&1&&(l(0,"actions")(1,"div",12),_(2,ie,3,0,"button",13),p()()),a&2){let n=r.ngIf,e=o(2);u(2),d("ngIf",e.productService.hasSelectionVariant(n))}}function oe(a,r){if(a&1){let n=v();L(0),l(1,"app-table",16),C("onToggle",function(t){s(n);let i=o(2);return c(i.onShowDifferenceStock(t))})("onSubmit",function(t){s(n);let i=o(2);return c(i.updateStockByVariant(t))}),p(),B()}if(a&2){let n=r.ngIf,e=o(2);u(),d("data",n)("channel",e.channelOptions)("showProductToggle",!0)("filter",e.searchFilter)}}function re(a,r){if(a&1){let n=v();l(0,"mainpanel",1),C("onSubmit",function(t){s(n);let i=o();return c(i.onSearch(t))}),_(1,ae,3,1,"actions",2),f(2,"async"),l(3,"filters")(4,"div")(5,"label",3),y(6,"PageNumber"),p(),l(7,"input",4),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),c(t)}),p()(),l(8,"div",5)(9,"label",6),y(10,"Page Size"),p(),l(11,"input",7),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),c(t)}),p()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),_(16,oe,2,4,"ng-container",2),f(17,"async"),l(18,"infinite-paginator",11),f(19,"async"),C("onNextPage",function(){s(n);let t=o();return c(t.paginationService.onNextPage(t.searchFilter))})("onLastPage",function(){s(n);let t=o();return c(t.paginationService.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(n);let t=o();return c(t.paginationService.getRowCount(t.searchFilter))}),p()()()()()()}if(a&2){let n=o();d("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),u(),d("ngIf",S(2,13,n.paginationService.data$)),u(6),b("ngModel",n.searchFilter.PageNumber),u(4),b("ngModel",n.searchFilter.RowCount),u(5),d("ngIf",S(17,15,n.paginationService.data$)),u(2),d("totalData",n.paginationService.totalData())("hideCount",n.paginationService.hideCount())("rowCount",S(19,17,n.paginationService.totalRowCount$))("pageNumber",n.paginationService.pageNumber())("disableNextButton",n.paginationService.disableNextButton())("goToLastPage",n.paginationService.isLastPage())}}var Ve=(()=>{let r=class r{constructor(e,t,i,g,x){this.http=e,this.toastr=t,this.dialog=i,this.productService=g,this.authService=x,this.paginationService=F(N),this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],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(D(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:I.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,t){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let x=i.map(m=>({ID:m.ID,Code:m.Code,Inventory:m.Inventory}));var g=t.filter(m=>m.selected).map(m=>m.ID);let w={ListChannelID:g,List:x};this.http.post("/api/Inventory/UpdateChannel",w).subscribe(m=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+w.List.length+" variants in "+w.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter);let g=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+g.Name+" to "+t.NewQuantity,"Success")})}onShowDifferenceStock(e){e?this.searchFilter.filterModel=I.DIFFERENCE:this.searchFilter.filterModel=I.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let t=this.productService.selectedVariantProduct(e);this.dialog.open(ee,{data:{selectedItems:t,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(V(i=>K.IsNotEmpty(i))).subscribe(i=>{this.updateStock(e,i)})}};r.\u0275fac=function(t){return new(t||r)(h(J),h(Q),h(q),h(Z),h($))},r.\u0275cmp=T({type:r,selectors:[["app-multi-channel-comparison"]],standalone:!0,features:[R([N]),O],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[4,"ngIf"],["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"],[1,"mt-5"],["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","filter"]],template:function(t,i){t&1&&(_(0,re,20,19,"mainpanel",0),f(1,"async")),t&2&&d("ngIf",S(1,1,i.loader$))},dependencies:[U,k,A,Y,X,te,H,j,z,G,W,ne],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=r;return a})();export{Ve as MultiChannelComparison};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-KGSUB5OH.js";import{b as ie}from"./chunk-XNGU3O4O.js";import{a as ee,b as te}from"./chunk-RKRJ4JOF.js";import{a as X}from"./chunk-
|
|
1
|
+
import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-KGSUB5OH.js";import{b as ie}from"./chunk-XNGU3O4O.js";import{a as ee,b as te}from"./chunk-RKRJ4JOF.js";import{a as X}from"./chunk-57TELWHA.js";import{g as Q}from"./chunk-TUQ2XWUY.js";import{e as J}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{l as Y,m as Z}from"./chunk-UUNZHJ6W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{c as G,h as z,l as K,y as q}from"./chunk-QOA24ZLA.js";import"./chunk-2AMEIUWK.js";import{$ as D,$a as s,Dc as H,Ga as k,Hb as v,Ia as p,Ib as m,Ja as I,Jb as O,Kb as B,Mb as L,Nb as F,Ob as R,Pb as P,Sb as x,Vc as W,Xc as j,Za as c,Zc as $,aa as T,ca as U,ga as C,ha as N,lb as o,mb as r,nb as d,oa as g,ob as f,pa as h,pb as _,rb as S,ub as y,vc as w,wb as u,wc as V,xc as A,za as M}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var ge=e=>[e];function he(e,t){if(e&1&&(f(0),o(1,"a",9),m(2),r(),_()),e&2){let a=t.$implicit;p(),s("routerLink",x(2,ge,a.url)),p(),B(" ",a.title,"")}}var ce=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-download"]],decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(i,l){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),d(3,"nav-tab",2),r()(),o(4,"div")(5,"div",3)(6,"a",4),d(7,"i",5),r(),o(8,"div",6)(9,"div",7),c(10,he,3,4,"ng-container",8),r()()()()(),d(11,"router-outlet")),i&2&&(p(3),s("Tabs",l.tabs),p(7),s("ngForOf",l.moreMenu))},dependencies:[w,ee,W,j]});let e=t;return e})();var E=(()=>{let t=class t{constructor(n){this.httpService=n}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(i){return new(i||t)(U(J))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ce=e=>({"background-color":e});function ye(e,t){if(e&1&&(o(0,"th"),m(1),r()),e&2){let a=t.$implicit;p(),O(a.column)}}function ve(e,t){if(e&1&&(f(0),o(1,"td"),d(2,"span",6),r(),_()),e&2){let a=t.$implicit,n=u().$implicit;p(2),s("innerHTML",n[a.prop],k)}}function xe(e,t){if(e&1&&(o(0,"tr",5),c(1,ve,3,1,"ng-container",3),r()),e&2){let a=t.$implicit,n=u();s("ngStyle",x(2,Ce,a.Status>200?"#F4D6D5":"#DEE9C9")),p(),s("ngForOf",n.configs)}}var de=(()=>{let t=class t{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(i,l){i&1&&(o(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),c(4,ye,2,1,"th",3),r()(),o(5,"tbody"),c(6,xe,2,4,"tr",4),r()()()),i&2&&(p(4),s("ngForOf",l.configs),p(2),s("ngForOf",l.data))},dependencies:[w,A]});let e=t;return e})();function be(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onNewStepperState(l))}),d(2,"i",16),m(3," New "),r(),_()}}function Ee(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a),u();let i=v(11);return h(i.previous())}),m(2," Back "),r(),_()}}function Ie(e,t){if(e&1){let a=S();f(0),o(1,"button",17),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onStepperNext(l))}),m(2," Next "),r(),_()}}function De(e,t){if(e&1){let a=S();f(0),o(1,"button",18),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onSubmit(l))}),m(2,"Download"),r(),_()}if(e&2){let a=u();p(),s("disabled",!a.urls)}}function Te(e,t){e&1&&(d(0,"i",19),o(1,"span"),m(2,"Instruction"),r())}function Ue(e,t){e&1&&(o(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),m(4,"Note"),r()(),o(5,"div",24)(6,"ol",25)(7,"li"),m(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),m(10," Copy Product URL from "),o(11,"a",26),m(12,"https://seller.tokopedia.com/ "),r(),m(13," and paste in this form "),r(),o(14,"li"),m(15," Use New Line when you want to input several product URLs "),r()()()()())}function Ne(e,t){e&1&&(d(0,"i",27),o(1,"span"),m(2,"Download"),r())}function Me(e,t){if(e&1){let a=S();o(0,"div",20)(1,"textarea",28),R("ngModelChange",function(i){g(a);let l=u();return F(l.urls,i)||(l.urls=i),h(i)}),r()()}if(e&2){let a=u();p(),s("placeholder",a.urlPlaceholder),L("ngModel",a.urls)}}function ke(e,t){e&1&&(d(0,"i",29),o(1,"span"),m(2,"Finish"),r())}function Oe(e,t){if(e&1&&(o(0,"div",20),d(1,"app-response-api-list",30),r()),e&2){let a=u();p(),s("data",a.downloadResponses)("configs",a.configs)}}function Be(e,t){e&1&&(o(0,"h6"),m(1,"1"),r())}function Le(e,t){e&1&&(o(0,"h6"),m(1,"2"),r())}function Fe(e,t){e&1&&(o(0,"h6"),m(1,"3"),r())}var ue=(()=>{let t=class t{constructor(n,i){this.downloadService=n,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
2
|
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let i=this.urls.split(/\r?\n/);this.downloadService.download(i).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
|
|
3
3
|
${n?.Name}
|
|
4
4
|
</a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(i){return new(i||t)(I(E),I(Q))},t.\u0275cmp=C({type:t,selectors:[["app-by-url"]],features:[P([{provide:ne,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(i,l){if(i&1){let fe=S();o(0,"mainpanel",1)(1,"actions"),c(2,be,4,0,"ng-container",2)(3,Ee,3,0,"ng-container",2)(4,Ie,3,0,"ng-container",2)(5,De,3,1,"ng-container",2),r(),o(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"mat-stepper",6,0),y("selectionChange",function(_e){return g(fe),h(l.onStepperChange(_e))}),o(12,"mat-step",7),c(13,Te,3,0,"ng-template",8)(14,Ue,16,0,"ng-template",9),r(),o(15,"mat-step",10),c(16,Ne,3,0,"ng-template",8)(17,Me,2,2,"ng-template",9),r(),o(18,"mat-step",11),c(19,ke,3,0,"ng-template",8)(20,Oe,2,2,"ng-template",9),r(),c(21,Be,2,0,"ng-template",12)(22,Le,2,0,"ng-template",13)(23,Fe,2,0,"ng-template",14),r()()()()()()}i&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),s("ngIf",l.stepperState=="FINISH"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(),s("ngIf",l.stepperState=="GUIDE"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(5),s("selectedIndex",1),p(2),s("editable",l.stepperState!="FINISH")("completed",!0),p(3),s("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[V,G,z,K,Y,le,oe,pe,re,ae,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as c}from"./chunk-
|
|
1
|
+
import{g as c}from"./chunk-TUQ2XWUY.js";import{b as a}from"./chunk-AAFEUTPF.js";import{$ as s,ca as o}from"./chunk-HSFUKC7R.js";var d=(()=>{let e=class e{constructor(i,t){this.toastr=i,this.authService=t}canActivate(i,t){let n=JSON.parse(window.localStorage.getItem("user")),l=new Date;if(n!=null){let p=new Date(n.Token.expiredAt);return l<p?!0:(this.onTokenExpired(),!1)}else return this.onTokenExpired(),!1}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired").onShown.subscribe(()=>this.authService.logout())}};e.\u0275fac=function(t){return new(t||e)(o(a),o(c))},e.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as rt}from"./chunk-O5FN3DLG.js";import{c as ot}from"./chunk-2L5RCILV.js";import{a as Q,b as X,d as Y,e as Z}from"./chunk-Y27IE54D.js";import{g as J}from"./chunk-
|
|
1
|
+
import{b as rt}from"./chunk-O5FN3DLG.js";import{c as ot}from"./chunk-2L5RCILV.js";import{a as Q,b as X,d as Y,e as Z}from"./chunk-Y27IE54D.js";import{g as J}from"./chunk-TUQ2XWUY.js";import{b as $,e as q}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{l as it,m as nt}from"./chunk-UUNZHJ6W.js";import{t as tt,u as et}from"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{h as H,l as A,y as z}from"./chunk-QOA24ZLA.js";import{b as v,c as G}from"./chunk-2AMEIUWK.js";import{$a as m,$b as W,Dc as S,Ha as P,Ia as c,Ib as l,Ja as h,Jb as u,Kb as j,Mb as y,Nb as L,Ob as M,Q as T,X as x,Za as g,Zc as C,_b as V,aa as p,ga as E,ha as d,lb as r,mb as a,nb as D,oa as O,ob as U,pa as w,pb as F,q as I,rb as K,ub as _,vc as k,wb as f,wc as R,zc as B}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";function ct(n,e){if(n&1&&(r(0,"span",13),D(1,"img",14),a(),r(2,"span"),l(3),a()),n&2){let s=e.item;c(),m("src",s.Img,P)("alt",s.Name),c(2),j(" ",s.Name," ")}}function mt(n,e){if(n&1){let s=K();U(0),r(1,"ng-select",16),M("ngModelChange",function(i){O(s);let o=f().$implicit;return L(o.ProductSKU,i)||(o.ProductSKU=i),w(i)}),a(),F()}if(n&2){let s=e.ngIf,t=f().$implicit;c(),y("ngModel",t.ProductSKU),m("items",s)}}function pt(n,e){if(n&1&&(r(0,"tr")(1,"td"),l(2),a(),r(3,"td"),l(4),a(),r(5,"td"),l(6),a(),r(7,"td"),g(8,mt,2,2,"ng-container",15),V(9,"async"),a()()),n&2){let s=e.$implicit,t=f();c(2),u(s.Name),c(2),u(s.Service),c(2),u(s.TypeString),c(2),m("ngIf",W(9,4,t.logisticOptions$))}}var st=(()=>{let e=class e{constructor(t,i,o){this.http=t,this.toastr=i,this.authService=o,this.filter={ChannelID:""},this.logisticServiceOptions=[],this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[v.WooCommerce,v.Lazada,v.Shopify];this.channelOptions=this.channelOptions.map(i=>(t.forEach(o=>{i.TypeID===o&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(T(1),x(t=>{this.logisticServiceOptions=t}))}Validate(){for(let t of this.logisticServices)this.datasource.find(o=>o.ProductSKU==t.ProductSKU&&o.Name==t.Name)===void 0&&(t.IsChange=!0);return Promise.resolve(this.logisticServices)}submitLogistics(){this.Validate().then(t=>{this.http.post("/api/Logistic/Submit",this.logisticServices).subscribe(i=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.getLogisticService()})})}getLogisticService(){this.datasource=[],this.http.post("/api/Logistic/Get",this.filter).pipe(I(t=>t.map(i=>(i.ProductSKU=G.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i)))).subscribe(t=>{this.iniTitle(),this.logisticServices=t,this.datasource=structuredClone(t)})}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}};e.\u0275fac=function(i){return new(i||e)(h(q),h($),h(J))},e.\u0275cmp=E({type:e,selectors:[["app-logistic"]],decls:28,vars:6,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,o){i&1&&(r(0,"mainpanel",0),_("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",1),l(4,"Select a Channel"),a(),r(5,"ng-select",2),M("ngModelChange",function(b){return L(o.filter.ChannelID,b)||(o.filter.ChannelID=b),b}),g(6,ct,4,3,"ng-template",3),a()()(),r(7,"actions")(8,"a",4),_("click",function(){return o.submitLogistics()}),l(9,"Submit"),a()(),r(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr",11)(18,"th"),l(19,"Logistic"),a(),r(20,"th"),l(21,"Service"),a(),r(22,"th"),l(23,"Type"),a(),r(24,"th"),l(25,"Logistic Service"),a()()(),r(26,"tbody"),g(27,pt,10,6,"tr",12),a()()()()()()()()),i&2&&(m("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),c(5),m("clearable",!1)("items",o.channelOptions),y("ngModel",o.filter.ChannelID),c(22),m("ngForOf",o.logisticServices))},dependencies:[k,R,H,A,it,Y,Q,X,tt,B]});let n=e;return n})();var dt=[{path:"",component:st}],lt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C.forChild(dt)]});let n=e;return n})();var kt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C,lt,z,nt,Z,rt,ot,et]});let n=e;return n})();export{kt as LogisticModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as N}from"./chunk-6NFPCNPI.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-VVKIT2K2.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-RXDUUYMX.js";import{a as De}from"./chunk-GP6U42SV.js";import{a as Ve,b as Te}from"./chunk-O5FN3DLG.js";import{a as be}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import{a as Fe}from"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{a as xe,b as fe,d as Se,e as Pe}from"./chunk-Y27IE54D.js";import{g as ue}from"./chunk-QITW54IW.js";import{b as de,e as ge}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as Ie,k as ye,l as ve,m as we}from"./chunk-UUNZHJ6W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as oe,c as re,h as le,l as ce,n as se,y as pe}from"./chunk-QOA24ZLA.js";import{c as me,e as he,f as Ce}from"./chunk-2AMEIUWK.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 x,Jb as B,Kb as F,Mb as I,Nb as y,Ob as v,Pb as Z,Q as $,Qb as Q,Sb as V,X as j,Za as h,_b as w,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 K,pa as m,pb as q,rb as f,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=f();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=f();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=f();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=f();o(0,"input",51),v("ngModelChange",function(n){_(t);let a=r(4).$implicit;return y(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 Ke(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 qe(i,s){if(i&1){let t=f();K(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(),q()}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,Ke,1,3,null,26),o(3,"div",46),h(4,qe,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=f();o(0,"input",56),v("ngModelChange",function(n){_(t);let a=r(2).$implicit;return y(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),w(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=f();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),w(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=f();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=f();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),v("ngModelChange",function(n){_(t);let a=r(2);return y(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),w(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),w(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=f();o(0,"mainpanel",2),v("textChange",function(n){_(t);let a=r();return y(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),v("ngModelChange",function(n){_(t);let a=r();return y(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),v("ngModelChange",function(n){_(t);let a=r();return y(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),v("ngModelChange",function(n){_(t);let a=r();return y(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),w(16,"async"),h(17,ot,30,18,"content",9),w(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)(x(ge),x(de),x(Ie),x(be),x(Fe),x(N),x(ue),x(ye),x(Ee),x(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,"fas","external-link-custom","fa-external-link-alt"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),w(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,we,ve,Pe,Se,xe,fe,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-6NFPCNPI.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-VVKIT2K2.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-RXDUUYMX.js";import{a as De}from"./chunk-GP6U42SV.js";import{a as Ve,b as Te}from"./chunk-O5FN3DLG.js";import{a as be}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import{a as Fe}from"./chunk-C62XLEFW.js";import"./chunk-6NTRXLMW.js";import{a as xe,b as fe,d as Se,e as Pe}from"./chunk-Y27IE54D.js";import{g as ue}from"./chunk-TUQ2XWUY.js";import{b as de,e as ge}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as Ie,k as ye,l as ve,m as we}from"./chunk-UUNZHJ6W.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{b as oe,c as re,h as le,l as ce,n as se,y as pe}from"./chunk-QOA24ZLA.js";import{c as me,e as he,f as Ce}from"./chunk-2AMEIUWK.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 x,Jb as B,Kb as F,Mb as I,Nb as y,Ob as v,Pb as Z,Q as $,Qb as Q,Sb as V,X as j,Za as h,_b as w,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 K,pa as m,pb as q,rb as f,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=f();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=f();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=f();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=f();o(0,"input",51),v("ngModelChange",function(n){_(t);let a=r(4).$implicit;return y(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 Ke(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 qe(i,s){if(i&1){let t=f();K(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(),q()}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,Ke,1,3,null,26),o(3,"div",46),h(4,qe,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=f();o(0,"input",56),v("ngModelChange",function(n){_(t);let a=r(2).$implicit;return y(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),w(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=f();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),w(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=f();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=f();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),v("ngModelChange",function(n){_(t);let a=r(2);return y(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),w(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),w(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=f();o(0,"mainpanel",2),v("textChange",function(n){_(t);let a=r();return y(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),v("ngModelChange",function(n){_(t);let a=r();return y(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),v("ngModelChange",function(n){_(t);let a=r();return y(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),v("ngModelChange",function(n){_(t);let a=r();return y(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),w(16,"async"),h(17,ot,30,18,"content",9),w(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)(x(ge),x(de),x(Ie),x(be),x(Fe),x(N),x(ue),x(ye),x(Ee),x(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,"fas","external-link-custom","fa-external-link-alt"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),w(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,we,ve,Pe,Se,xe,fe,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};
|