marketplacepos 6.40.1 → 6.40.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-ST74B6N2.js → chunk-2EBT5M4I.js} +1 -1
- package/Marketplace/{chunk-LZ7NGGBW.js → chunk-2YIHYSPU.js} +1 -1
- package/Marketplace/{chunk-DJQFF7RJ.js → chunk-37G3PDXN.js} +1 -1
- package/Marketplace/{chunk-Y52GLIDI.js → chunk-4DQBPYFS.js} +1 -1
- package/Marketplace/{chunk-2JSYYNHH.js → chunk-4QV2PDMF.js} +1 -1
- package/Marketplace/{chunk-3IAFMBGY.js → chunk-4WT2Y6TT.js} +1 -1
- package/Marketplace/{chunk-B4TPYRRY.js → chunk-52PEZEAZ.js} +1 -1
- package/Marketplace/{chunk-Q2ODP5Y2.js → chunk-546FKO4L.js} +1 -1
- package/Marketplace/{chunk-7JPBGT7Z.js → chunk-6B7FZZSK.js} +1 -1
- package/Marketplace/{chunk-SR7MI45Q.js → chunk-6BLHGE4W.js} +1 -1
- package/Marketplace/{chunk-AJJTCPZJ.js → chunk-6NML7F6L.js} +1 -1
- package/Marketplace/{chunk-YEC6DKDK.js → chunk-755EU56E.js} +1 -1
- package/Marketplace/{chunk-Y5JNEUQX.js → chunk-7WMEMBD2.js} +1 -1
- package/Marketplace/{chunk-YB5PUU2Z.js → chunk-7X3KALOK.js} +1 -1
- package/Marketplace/{chunk-Y5KEIPY2.js → chunk-A4TBJ6UZ.js} +1 -1
- package/Marketplace/{chunk-N57LJ3CG.js → chunk-AKL56CT3.js} +1 -1
- package/Marketplace/{chunk-NGSIXF65.js → chunk-AZLIWO5Y.js} +2 -2
- package/Marketplace/{chunk-GGFEYH65.js → chunk-BJSFGAT5.js} +1 -1
- package/Marketplace/{chunk-IJ7SVRC3.js → chunk-C5O6VJ2D.js} +1 -1
- package/Marketplace/{chunk-7GOA5GNE.js → chunk-CRBJDNL7.js} +1 -1
- package/Marketplace/{chunk-SXKVYFRK.js → chunk-CXQB3FE2.js} +1 -1
- package/Marketplace/{chunk-DZIQM7VR.js → chunk-DO2G52AO.js} +1 -1
- package/Marketplace/{chunk-V6ROI46O.js → chunk-DVEXD44H.js} +1 -1
- package/Marketplace/{chunk-76YVQFBA.js → chunk-E53SRMQZ.js} +1 -1
- package/Marketplace/{chunk-L3PLFUAB.js → chunk-EHVBVNXC.js} +1 -1
- package/Marketplace/{chunk-TG2PSAOI.js → chunk-FKVH6CLY.js} +1 -1
- package/Marketplace/{chunk-NE5VJBNJ.js → chunk-GSRXREXU.js} +1 -1
- package/Marketplace/{chunk-K3KVYSDG.js → chunk-GSYHZ24Q.js} +1 -1
- package/Marketplace/{chunk-SADO6CAU.js → chunk-H43OTNIB.js} +1 -1
- package/Marketplace/{chunk-ZCQPKCH4.js → chunk-IT4SNYQK.js} +1 -1
- package/Marketplace/{chunk-RWR666EP.js → chunk-JEFVOPGN.js} +1 -1
- package/Marketplace/{chunk-NECHNTIS.js → chunk-JOU7HLA4.js} +1 -1
- package/Marketplace/{chunk-TL4MS2C5.js → chunk-K3MEX6GQ.js} +1 -1
- package/Marketplace/{chunk-QQ5N2LK7.js → chunk-K6PWLV74.js} +1 -1
- package/Marketplace/{chunk-FS6377YV.js → chunk-L3MO3ZCZ.js} +1 -1
- package/Marketplace/{chunk-T53H24J7.js → chunk-LUWEYZ6D.js} +1 -1
- package/Marketplace/{chunk-PKAP7AZS.js → chunk-MZU7P2T5.js} +1 -1
- package/Marketplace/{chunk-ST2BFBBW.js → chunk-NDDUXXJF.js} +1 -1
- package/Marketplace/{chunk-FVXM7DZ2.js → chunk-NP3B3XBB.js} +1 -1
- package/Marketplace/{chunk-FLNLTCHD.js → chunk-NXS7JQPY.js} +1 -1
- package/Marketplace/{chunk-EADUENUS.js → chunk-OCGSMJT2.js} +1 -1
- package/Marketplace/{chunk-32Y5LAWS.js → chunk-OTMZGSFO.js} +1 -1
- package/Marketplace/{chunk-KDISQWQO.js → chunk-OX2QJCC3.js} +1 -1
- package/Marketplace/{chunk-4D7BODYG.js → chunk-P4PGUHI5.js} +1 -1
- package/Marketplace/{chunk-SXJZW3SH.js → chunk-PB3JMCII.js} +1 -1
- package/Marketplace/{chunk-FDUEC236.js → chunk-QQFM2BFS.js} +1 -1
- package/Marketplace/{chunk-UUSFQ4OT.js → chunk-RCFVKK5D.js} +1 -1
- package/Marketplace/{chunk-QR6TYGWX.js → chunk-RSR5AZTI.js} +1 -1
- package/Marketplace/{chunk-DP66PIBI.js → chunk-SDVM2OGI.js} +1 -1
- package/Marketplace/{chunk-343PUTHM.js → chunk-SF34YBS7.js} +1 -1
- package/Marketplace/{chunk-GIB64HNW.js → chunk-TFDDAGWF.js} +1 -1
- package/Marketplace/{chunk-JVSIERQB.js → chunk-TR7UPFQS.js} +1 -1
- package/Marketplace/{chunk-U7ABSTXN.js → chunk-TU34BDDQ.js} +1 -1
- package/Marketplace/{chunk-F7O6BSMX.js → chunk-VH4YX2BF.js} +1 -1
- package/Marketplace/chunk-VPDQWGTE.js +5 -0
- package/Marketplace/{chunk-VGT5KJNR.js → chunk-WTTWRCNO.js} +1 -1
- package/Marketplace/{chunk-IZFKQROH.js → chunk-WVJMN3F2.js} +1 -1
- package/Marketplace/{chunk-IPAUU34Q.js → chunk-X3C5DFLO.js} +1 -1
- package/Marketplace/{chunk-MJQUEAHG.js → chunk-XK4J4PVA.js} +1 -1
- package/Marketplace/{chunk-N6HH3IFN.js → chunk-YHCPLYK6.js} +1 -1
- package/Marketplace/{chunk-CIF6BD7C.js → chunk-YU2EK4WR.js} +1 -1
- package/Marketplace/{chunk-O642OHG2.js → chunk-ZSG2EXIR.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-PPPEA3EP.js → main-NQGKSBMZ.js} +2 -2
- package/package.json +1 -1
- package/Marketplace/chunk-ITIDZXEL.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j}from"./chunk-
|
|
1
|
+
import{a as j}from"./chunk-ZSG2EXIR.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as O}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import{a as K}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as B}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as T,h as L,m as N,p as R,z as U}from"./chunk-7HUEGPJN.js";import{e as I}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as E}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as h,Ic as l,Jc as P,Pc as k,Qc as D,Rc as S,Xb as _,Zb as f,cc as s,dc as i,ec as t,ed as V,fc as w,fd as A,gb as a,ha as x,mc as v,oa as c,pa as p,rc as m,tc as g,ua as M,yb as b}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function F(n,y){if(n&1){let e=v();i(0,"input",30),m("ngModelChange",function(o){c(e);let r=g();return p(r.sku.set(o))}),t()}if(n&2){let e=g();s("ngModel",e.sku())}}function H(n,y){if(n&1){let e=v();i(0,"input",31),m("ngModelChange",function(o){c(e);let r=g();return p(r.itemId.set(o))}),t()}if(n&2){let e=g();s("ngModel",e.itemId())}}function J(n,y){if(n&1&&(i(0,"pre",28),l(1),V(2,"json"),t()),n&2){g();let e=S(35);a(),P(A(2,1,e))}}function G(n,y){n&1&&(i(0,"p",29),l(1," Your data will be shown here once it's available "),t())}var re=(()=>{class n{constructor(){this.httpService=x(I),this.destroyRef=x(M),this.productLogData=h(null),this.selectedChannel=h(null),this.sku=h(null),this.itemId=h(null),this.searchBy=h("sku")}initProductLog(){let e={ChannelID:this.selectedChannel()};this.searchBy()==="sku"?e.SKU=this.sku():e.ItemID=this.itemId(),this.httpService.post(B.GetProductApiLog,e).pipe(K(this.destroyRef)).subscribe(d=>this.productLogData.set(d))}copyToClipboard(e){if(!e)return;let d=typeof e=="string"?e:JSON.stringify(e,null,2);navigator.clipboard.writeText(d),alert("Copied to clipboard!")}static{this.\u0275fac=function(d){return new(d||n)}}static{this.\u0275cmp=b({type:n,selectors:[["app-product-api"]],decls:49,vars:12,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(d,o){if(d&1){let r=v();i(0,"mainpanel",0)(1,"actions")(2,"button",1),m("click",function(){return c(r),p(o.initProductLog())}),w(3,"i",2),l(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),l(12,"Channel"),t(),i(13,"p",8),l(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),m("ngModelChange",function(u){return c(r),p(o.selectedChannel.set(u))}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),l(20,"Product Code / SKU"),t(),i(21,"p",8),l(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(27,"label",15),l(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(31,"label",17),l(32,"Search by ItemID"),t()()(),_(33,F,1,1,"input",18),_(34,H,1,1,"input",19),t()()()(),k(35),i(36,"div",20)(37,"div",21)(38,"div",22)(39,"div",23)(40,"h5"),l(41,"Response"),t(),i(42,"button",24),m("click",function(){c(r);let u=S(35);return p(o.copyToClipboard(u))}),l(43," Copy "),t()(),i(44,"div",25)(45,"div",26)(46,"div",27),_(47,J,3,3,"pre",28)(48,G,2,0,"p",29),t()()()()()()()()()}if(d&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),s("ngModel",o.selectedChannel()),a(10),s("ngModel",o.searchBy())("value","sku"),a(4),s("ngModel",o.searchBy())("value","itemid"),a(3),f(o.searchBy()==="sku"?33:-1),a(),f(o.searchBy()==="itemid"?34:-1),a();let r=D(o.productLogData());a(7),s("disabled",!r),a(5),f(r?47:48)}},dependencies:[U,T,R,L,N,O,j,E],encapsulation:2,changeDetection:0})}}return n})();export{re as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-QWWW7GFA.js";var o=[{path:"",loadComponent(){return import("./chunk-5L5EFIUV.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-QWWW7GFA.js";var o=[{path:"",loadComponent(){return import("./chunk-5L5EFIUV.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-JOU7HLA4.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-7WMEMBD2.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-CRBJDNL7.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-SDVM2OGI.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-OTMZGSFO.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-OCGSMJT2.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-JEFVOPGN.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-52PEZEAZ.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-JIASJY4B.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue,b as fe}from"./chunk-FS6377YV.js";import{a as _e}from"./chunk-ZZ3M52QJ.js";import{a as x}from"./chunk-ISMIPSYN.js";import{c as Ce,d as V,e as T}from"./chunk-SA4KQTJY.js";import"./chunk-4O2VD4QF.js";import"./chunk-BYK4XSP4.js";import"./chunk-G346YBOK.js";import"./chunk-SJBVLNCR.js";import"./chunk-32F5EUMW.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{c as me}from"./chunk-NH7UFKXO.js";import{a as ge}from"./chunk-6YRYXHZS.js";import"./chunk-VYXSV6K4.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as he}from"./chunk-YB5PUU2Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-Y5KEIPY2.js";import"./chunk-BGFEVOPZ.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as ce,e as pe}from"./chunk-474G6BPL.js";import{a as se,b as de}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{c as le}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import{a as O,b as F}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as te}from"./chunk-ZSUWHVKX.js";import{f as w}from"./chunk-IJ7SVRC3.js";import"./chunk-U7ABSTXN.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as N}from"./chunk-63X2BBS4.js";import{b as Z,c as ee}from"./chunk-MDHMVGYC.js";import{c as v}from"./chunk-NNVT5X6O.js";import{c as ne,h as ie,m as oe,o as re,z as ae}from"./chunk-7HUEGPJN.js";import{b as X,e as Y}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as q}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as P,C as R,Da as B,Eb as H,Ic as C,S as L,Vc as j,Xb as b,Xc as K,Zb as y,ca as U,cc as g,dc as l,ec as d,ed as J,fc as z,fd as Q,gb as m,ha as c,jc as G,kc as $,mc as I,md as W,oa as p,pa as h,rc as u,tc as f,ua as k,yb as A}from"./chunk-5VYDZBNH.js";import{a as _,b as S}from"./chunk-QWWW7GFA.js";var E=(()=>{class a{constructor(){this.authService=c(w),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(e,o){let t=Object.assign([],this.channelOptions),i=[],r;return e.forEach(n=>{r=t.find(s=>s.ID==n?.parent?.id),r&&(r=S(_({},r),{Name:`${n?.parent?.label} - ${n?.label}`,LocationID:n?.id}),i.push(r))}),o.forEach(n=>{r=t.find(s=>s.ID==n.id),r&&i.push(r)}),i}generateFilterLocation(e,o){let t=[],i=[],r=[];return e.length>0?(t=e.map(n=>n.id),i=e.filter(n=>v.IsNotEmpty(n?.parent?.id)).map(n=>n?.parent?.id).filter((n,s,D)=>D.indexOf(n)===s)):(t=[],i=[]),r=o.map(n=>n.id),r=r.concat(i).filter((n,s,D)=>D.indexOf(n)===s),{locationIds:t,channelIds:r}}static{this.\u0275fac=function(o){return new(o||a)}}static{this.\u0275prov=U({token:a,factory:a.\u0275fac})}}return a})();var Pe=a=>[a];function ve(a,M){if(a&1){let e=I();l(0,"button",17),u("click",function(){p(e);let t=f(2),i=f();return h(i.onUpdateItems(t))}),z(1,"i",18),C(2," Update "),d()}}function Me(a,M){if(a&1&&(G(0),b(1,ve,3,0,"button",16),$()),a&2){let e=f(),o=f();m(),y(o.productService.hasSelectionVariant(e)?1:-1)}}function be(a,M){if(a&1&&(l(0,"actions")(1,"div",14),H(2,Me,2,1,"ng-container",15),d()()),a&2){let e=f();m(2),g("ngxPermissionsOnly",K(1,Pe,e.inventoryUpdateRole))}}function ye(a,M){if(a&1){let e=I();l(0,"app-table",19),u("onToggle",function(t){p(e);let i=f();return h(i.onShowDifferenceStock(t))})("onSubmit",function(t){p(e);let i=f();return h(i.updateStockByVariant(t))}),d()}if(a&2){let e=f();g("data",M)("channel",e.channels())("showProductToggle",!0)("hiddenIPOSInventory",e.hiddenIPOSInventory())}}var ct=(()=>{class a{constructor(){this.http=c(Y),this.toastr=c(X),this.dialog=c(le),this.productService=c(he),this.authService=c(w),this.mainPanelService=c(se),this.placeholderService=c(me),this.destroyRef=c(k),this.paginationService=c(V),this.multiChannelService=c(E),this.updateResHandling=c(T),this.hiddenIPOSInventory=W(()=>this.paginationService.hiddenPOSInventory()),this.channelOptions=this.authService.getChannels(),this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.searchFilter=P({PageNumber:1,RowCount:100}),this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(L(1)),this.loaderData=F(this.loader$,{initialValue:null}),this.data=F(this.paginationService.data$,{initialValue:[]}),this.selectedLocations=P([]),this.selectedChannels=P([]),this.channels=P([]),this.inventoryUpdateRole=te.InventoryUpdate,this.searchPlaceholder=P("Search ..."),this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,B(()=>{let e=this.loaderData();if(!e)return;let o={PageNumber:e.Filter.PageNumber,filterModel:x.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory,SearchType:e.Filter.SearchType,NumberFilterComparator:e.Filter.NumberFilterComparator};this.searchFilter.set(o),this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(o.SearchType,o.NumberFilterComparator)),this.mainPanelService.openModalFilter()})}onChannelChange(e=[]){let o=e.filter(i=>v.isValidGUID(i.id)==!1),t=e.filter(i=>v.isValidGUID(i.id));this.selectedLocations.set(o),this.selectedChannels.set(t)}onSearch(e){let o=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(o);let t=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.update(i=>S(_({},i),{ListChannelID:t.channelIds,ListLocationID:t.locationIds,text:e})),this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter())}initSearchPlaceholder(){let e=this.searchFilter();this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(e.SearchType,e.NumberFilterComparator))}updateStock(e,o){if(e.length>0){let t=[];e.forEach(n=>{n.Channel?.forEach(s=>{t.push({ChannelItemID:s?.ChannelItemID,ChannelVariationID:s?.ChannelVariationID,Inventory:n.Inventory,LocationID:s?.LocationID})})});let r={ListChannelID:o.filter(n=>n.selected).map(n=>n.ID),List:t};this.http.post(N.UpdateInventoryChannel,r).pipe(O(this.destroyRef)).subscribe(n=>{this.paginationService.reloadPagination(this.searchFilter());for(let s=0;s<n?.length;s++)this.handlingUpdateStock(n[s])})}}updateStockByVariant(e){let o=e.InventoryMultiwarehouse[0]?.LocationID,t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:e.Inventory,VariantID:e.ID,SKU:e?.Sku,LocationID:o};this.http.post(N.UpdateUpdateQuantityByItem,t).pipe(O(this.destroyRef)).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter()),this.handlingUpdateStock(i)})}handlingUpdateStock(e){if(e){let o=e?.Response?.Fail_list,t=e?.Response?.Success_list;this.updateResHandling.responseHandling(t,o,"Stock")}else this.toastr.error(e?.Exception,"Error")}onShowDifferenceStock(e){this.searchFilter.update(o=>S(_({},o),{filterModel:e?x.DIFFERENCE:x.ALL})),this.paginationService.reloadPagination(this.searchFilter())}onUpdateItems(e){let o=this.productService.selectedVariantProduct(e),t=this.channelOptions.filter(i=>this.channels()?.find(r=>r.ID===i.ID));this.dialog.open(ue,{data:{selectedItems:o,channels:JSON.parse(JSON.stringify(t))},width:"400px"}).afterClosed().pipe(R(i=>v.IsNotEmpty(i)),O(this.destroyRef)).subscribe(i=>{this.updateStock(o,i)})}updateSearchFilter(e,o){this.searchFilter.update(t=>S(_({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||a)}}static{this.\u0275cmp=A({type:a,selectors:[["app-multi-channel-comparison"]],features:[j([V,E,T])],decls:31,vars:20,consts:[["headerTitle","Inventory Comparison","textButton","Search","filterDialogWidth","625px",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"dialog-filter","grid-filter"],[1,"filter-item","full"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"filter-item"],["appendTo","body","bindLabel","Value","bindValue","Key",3,"ngModelChange","items","clearable","ngModel"],[3,"ngModelChange","options","ngModel"],["type","number","id","PageNumber","placeholder","Page Number","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","input-filter",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(o,t){if(o&1){let i=I();l(0,"mainpanel",0),u("onSubmit",function(n){return p(i),h(t.onSearch(n))}),b(1,be,3,3,"actions"),l(2,"filters")(3,"div",1)(4,"div",2)(5,"h6"),C(6,"Channel"),d(),l(7,"multiwarehouse-tree-select",3),u("onChannelChange",function(n){return p(i),h(t.onChannelChange(n))}),d()(),l(8,"div",4)(9,"h6"),C(10,"Number Filter Comparator"),d(),l(11,"ng-select",5),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("NumberFilterComparator",n))}),d()(),l(12,"div",4)(13,"h6"),C(14,"Search Type"),d(),l(15,"radio-options",6),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("SearchType",n))}),d()(),l(16,"div",4)(17,"h6"),C(18,"Page Number"),d(),l(19,"input",7),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("PageNumber",+n))}),d()(),l(20,"div",4)(21,"h6"),C(22,"Page Size"),d(),l(23,"input",8),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("RowCount",+n))}),d()()()(),l(24,"content")(25,"div",9)(26,"div",10)(27,"div",11),b(28,ye,1,4,"app-table",12),l(29,"infinite-paginator",13),J(30,"async"),u("onNextPage",function(){return p(i),h(t.paginationService.onNextPage(t.searchFilter()))})("onLastPage",function(){return p(i),h(t.paginationService.onLastPage(t.searchFilter()))})("onGetRowCount",function(){return p(i),h(t.paginationService.getRowCount(t.searchFilter()))}),d()()()()()()}if(o&2){let i,r;g("hideSearchBox",!1)("searchBoxPlaceHolder",t.searchPlaceholder()),m(),y((i=t.data())?1:-1,i);let n=t.loaderData();m(6),g("multiple",!0),m(4),g("items",n==null||n.Options==null?null:n.Options.SearchComparatorTypeOptions)("clearable",!1)("ngModel",t.searchFilter().NumberFilterComparator),m(4),g("options",n==null||n.Options==null?null:n.Options.SearchSKUOnlyOrSKUNameOptions)("ngModel",t.searchFilter().SearchType),m(4),g("ngModel",t.searchFilter().PageNumber),m(4),g("ngModel",t.searchFilter().RowCount),m(5),y((r=t.data())?28:-1,r),m(),g("totalData",t.paginationService.totalData())("hideCount",t.paginationService.hideCount())("rowCount",Q(30,18,t.paginationService.totalRowCount$))("pageNumber",t.paginationService.pageNumber())("disableNextButton",t.paginationService.disableNextButton())("goToLastPage",t.paginationService.isLastPage())}},dependencies:[de,fe,ae,ne,re,ie,oe,Ce,_e,ee,Z,pe,ce,ge,q],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}.dialog-filter.grid-filter[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;width:100%}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin-bottom:6px}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item.full[_ngcontent-%COMP%]{grid-column:1/-1}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] radio-options[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0!important;width:100%!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] input.input-filter[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] input.form-control[_ngcontent-%COMP%]{height:40px;min-height:40px;border:1px solid #ccc;border-radius:4px;font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] input.input-filter[_ngcontent-%COMP%]:focus, .dialog-filter.grid-filter[_ngcontent-%COMP%] input.form-control[_ngcontent-%COMP%]:focus{border:1px solid #86b7fe;box-shadow:none;outline:0}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-select-container{height:40px!important;min-height:40px!important;align-items:center;border:1px solid #ccc!important;border-radius:4px!important;font-size:.875rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border-color:#86b7fe!important;box-shadow:none!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-value-container{padding-left:.75rem;padding-right:.75rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-value, .dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-placeholder{font-size:.875rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select{display:block}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-float-label{padding:0;display:block}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-treeselect{display:flex;align-items:center;box-sizing:border-box;width:100%!important;height:40px!important;min-height:40px!important;padding:0 .75rem!important;border:1px solid #ccc!important;border-radius:4px!important;font-size:.875rem!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-treeselect:not(.p-disabled).p-focus{border-color:#86b7fe!important;box-shadow:none!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-treeselect-label-container{display:flex;align-items:center;flex:1 1 auto;min-height:0;overflow:hidden;padding:0}"],changeDetection:0})}}return a})();export{ct as MultiChannelComparison};
|
|
1
|
+
import{a as ue,b as fe}from"./chunk-L3MO3ZCZ.js";import{a as _e}from"./chunk-ZZ3M52QJ.js";import{a as x}from"./chunk-ISMIPSYN.js";import{c as Ce,d as V,e as T}from"./chunk-SA4KQTJY.js";import"./chunk-4O2VD4QF.js";import"./chunk-BYK4XSP4.js";import"./chunk-G346YBOK.js";import"./chunk-SJBVLNCR.js";import"./chunk-32F5EUMW.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{c as me}from"./chunk-NH7UFKXO.js";import{a as ge}from"./chunk-6YRYXHZS.js";import"./chunk-VYXSV6K4.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as he}from"./chunk-7X3KALOK.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-A4TBJ6UZ.js";import"./chunk-BGFEVOPZ.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as ce,e as pe}from"./chunk-474G6BPL.js";import{a as se,b as de}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{c as le}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import{a as O,b as F}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as te}from"./chunk-ZSUWHVKX.js";import{f as w}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as N}from"./chunk-63X2BBS4.js";import{b as Z,c as ee}from"./chunk-MDHMVGYC.js";import{c as v}from"./chunk-NNVT5X6O.js";import{c as ne,h as ie,m as oe,o as re,z as ae}from"./chunk-7HUEGPJN.js";import{b as X,e as Y}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as q}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as P,C as R,Da as B,Eb as H,Ic as C,S as L,Vc as j,Xb as b,Xc as K,Zb as y,ca as U,cc as g,dc as l,ec as d,ed as J,fc as z,fd as Q,gb as m,ha as c,jc as G,kc as $,mc as I,md as W,oa as p,pa as h,rc as u,tc as f,ua as k,yb as A}from"./chunk-5VYDZBNH.js";import{a as _,b as S}from"./chunk-QWWW7GFA.js";var E=(()=>{class a{constructor(){this.authService=c(w),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(e,o){let t=Object.assign([],this.channelOptions),i=[],r;return e.forEach(n=>{r=t.find(s=>s.ID==n?.parent?.id),r&&(r=S(_({},r),{Name:`${n?.parent?.label} - ${n?.label}`,LocationID:n?.id}),i.push(r))}),o.forEach(n=>{r=t.find(s=>s.ID==n.id),r&&i.push(r)}),i}generateFilterLocation(e,o){let t=[],i=[],r=[];return e.length>0?(t=e.map(n=>n.id),i=e.filter(n=>v.IsNotEmpty(n?.parent?.id)).map(n=>n?.parent?.id).filter((n,s,D)=>D.indexOf(n)===s)):(t=[],i=[]),r=o.map(n=>n.id),r=r.concat(i).filter((n,s,D)=>D.indexOf(n)===s),{locationIds:t,channelIds:r}}static{this.\u0275fac=function(o){return new(o||a)}}static{this.\u0275prov=U({token:a,factory:a.\u0275fac})}}return a})();var Pe=a=>[a];function ve(a,M){if(a&1){let e=I();l(0,"button",17),u("click",function(){p(e);let t=f(2),i=f();return h(i.onUpdateItems(t))}),z(1,"i",18),C(2," Update "),d()}}function Me(a,M){if(a&1&&(G(0),b(1,ve,3,0,"button",16),$()),a&2){let e=f(),o=f();m(),y(o.productService.hasSelectionVariant(e)?1:-1)}}function be(a,M){if(a&1&&(l(0,"actions")(1,"div",14),H(2,Me,2,1,"ng-container",15),d()()),a&2){let e=f();m(2),g("ngxPermissionsOnly",K(1,Pe,e.inventoryUpdateRole))}}function ye(a,M){if(a&1){let e=I();l(0,"app-table",19),u("onToggle",function(t){p(e);let i=f();return h(i.onShowDifferenceStock(t))})("onSubmit",function(t){p(e);let i=f();return h(i.updateStockByVariant(t))}),d()}if(a&2){let e=f();g("data",M)("channel",e.channels())("showProductToggle",!0)("hiddenIPOSInventory",e.hiddenIPOSInventory())}}var ct=(()=>{class a{constructor(){this.http=c(Y),this.toastr=c(X),this.dialog=c(le),this.productService=c(he),this.authService=c(w),this.mainPanelService=c(se),this.placeholderService=c(me),this.destroyRef=c(k),this.paginationService=c(V),this.multiChannelService=c(E),this.updateResHandling=c(T),this.hiddenIPOSInventory=W(()=>this.paginationService.hiddenPOSInventory()),this.channelOptions=this.authService.getChannels(),this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.searchFilter=P({PageNumber:1,RowCount:100}),this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(L(1)),this.loaderData=F(this.loader$,{initialValue:null}),this.data=F(this.paginationService.data$,{initialValue:[]}),this.selectedLocations=P([]),this.selectedChannels=P([]),this.channels=P([]),this.inventoryUpdateRole=te.InventoryUpdate,this.searchPlaceholder=P("Search ..."),this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,B(()=>{let e=this.loaderData();if(!e)return;let o={PageNumber:e.Filter.PageNumber,filterModel:x.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory,SearchType:e.Filter.SearchType,NumberFilterComparator:e.Filter.NumberFilterComparator};this.searchFilter.set(o),this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(o.SearchType,o.NumberFilterComparator)),this.mainPanelService.openModalFilter()})}onChannelChange(e=[]){let o=e.filter(i=>v.isValidGUID(i.id)==!1),t=e.filter(i=>v.isValidGUID(i.id));this.selectedLocations.set(o),this.selectedChannels.set(t)}onSearch(e){let o=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(o);let t=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.update(i=>S(_({},i),{ListChannelID:t.channelIds,ListLocationID:t.locationIds,text:e})),this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter())}initSearchPlaceholder(){let e=this.searchFilter();this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(e.SearchType,e.NumberFilterComparator))}updateStock(e,o){if(e.length>0){let t=[];e.forEach(n=>{n.Channel?.forEach(s=>{t.push({ChannelItemID:s?.ChannelItemID,ChannelVariationID:s?.ChannelVariationID,Inventory:n.Inventory,LocationID:s?.LocationID})})});let r={ListChannelID:o.filter(n=>n.selected).map(n=>n.ID),List:t};this.http.post(N.UpdateInventoryChannel,r).pipe(O(this.destroyRef)).subscribe(n=>{this.paginationService.reloadPagination(this.searchFilter());for(let s=0;s<n?.length;s++)this.handlingUpdateStock(n[s])})}}updateStockByVariant(e){let o=e.InventoryMultiwarehouse[0]?.LocationID,t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:e.Inventory,VariantID:e.ID,SKU:e?.Sku,LocationID:o};this.http.post(N.UpdateUpdateQuantityByItem,t).pipe(O(this.destroyRef)).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter()),this.handlingUpdateStock(i)})}handlingUpdateStock(e){if(e){let o=e?.Response?.Fail_list,t=e?.Response?.Success_list;this.updateResHandling.responseHandling(t,o,"Stock")}else this.toastr.error(e?.Exception,"Error")}onShowDifferenceStock(e){this.searchFilter.update(o=>S(_({},o),{filterModel:e?x.DIFFERENCE:x.ALL})),this.paginationService.reloadPagination(this.searchFilter())}onUpdateItems(e){let o=this.productService.selectedVariantProduct(e),t=this.channelOptions.filter(i=>this.channels()?.find(r=>r.ID===i.ID));this.dialog.open(ue,{data:{selectedItems:o,channels:JSON.parse(JSON.stringify(t))},width:"400px"}).afterClosed().pipe(R(i=>v.IsNotEmpty(i)),O(this.destroyRef)).subscribe(i=>{this.updateStock(o,i)})}updateSearchFilter(e,o){this.searchFilter.update(t=>S(_({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||a)}}static{this.\u0275cmp=A({type:a,selectors:[["app-multi-channel-comparison"]],features:[j([V,E,T])],decls:31,vars:20,consts:[["headerTitle","Inventory Comparison","textButton","Search","filterDialogWidth","625px",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"dialog-filter","grid-filter"],[1,"filter-item","full"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"filter-item"],["appendTo","body","bindLabel","Value","bindValue","Key",3,"ngModelChange","items","clearable","ngModel"],[3,"ngModelChange","options","ngModel"],["type","number","id","PageNumber","placeholder","Page Number","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","input-filter",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(o,t){if(o&1){let i=I();l(0,"mainpanel",0),u("onSubmit",function(n){return p(i),h(t.onSearch(n))}),b(1,be,3,3,"actions"),l(2,"filters")(3,"div",1)(4,"div",2)(5,"h6"),C(6,"Channel"),d(),l(7,"multiwarehouse-tree-select",3),u("onChannelChange",function(n){return p(i),h(t.onChannelChange(n))}),d()(),l(8,"div",4)(9,"h6"),C(10,"Number Filter Comparator"),d(),l(11,"ng-select",5),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("NumberFilterComparator",n))}),d()(),l(12,"div",4)(13,"h6"),C(14,"Search Type"),d(),l(15,"radio-options",6),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("SearchType",n))}),d()(),l(16,"div",4)(17,"h6"),C(18,"Page Number"),d(),l(19,"input",7),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("PageNumber",+n))}),d()(),l(20,"div",4)(21,"h6"),C(22,"Page Size"),d(),l(23,"input",8),u("ngModelChange",function(n){return p(i),h(t.updateSearchFilter("RowCount",+n))}),d()()()(),l(24,"content")(25,"div",9)(26,"div",10)(27,"div",11),b(28,ye,1,4,"app-table",12),l(29,"infinite-paginator",13),J(30,"async"),u("onNextPage",function(){return p(i),h(t.paginationService.onNextPage(t.searchFilter()))})("onLastPage",function(){return p(i),h(t.paginationService.onLastPage(t.searchFilter()))})("onGetRowCount",function(){return p(i),h(t.paginationService.getRowCount(t.searchFilter()))}),d()()()()()()}if(o&2){let i,r;g("hideSearchBox",!1)("searchBoxPlaceHolder",t.searchPlaceholder()),m(),y((i=t.data())?1:-1,i);let n=t.loaderData();m(6),g("multiple",!0),m(4),g("items",n==null||n.Options==null?null:n.Options.SearchComparatorTypeOptions)("clearable",!1)("ngModel",t.searchFilter().NumberFilterComparator),m(4),g("options",n==null||n.Options==null?null:n.Options.SearchSKUOnlyOrSKUNameOptions)("ngModel",t.searchFilter().SearchType),m(4),g("ngModel",t.searchFilter().PageNumber),m(4),g("ngModel",t.searchFilter().RowCount),m(5),y((r=t.data())?28:-1,r),m(),g("totalData",t.paginationService.totalData())("hideCount",t.paginationService.hideCount())("rowCount",Q(30,18,t.paginationService.totalRowCount$))("pageNumber",t.paginationService.pageNumber())("disableNextButton",t.paginationService.disableNextButton())("goToLastPage",t.paginationService.isLastPage())}},dependencies:[de,fe,ae,ne,re,ie,oe,Ce,_e,ee,Z,pe,ce,ge,q],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}.dialog-filter.grid-filter[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;width:100%}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin-bottom:6px}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item.full[_ngcontent-%COMP%]{grid-column:1/-1}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] radio-options[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0!important;width:100%!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] input.input-filter[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] input.form-control[_ngcontent-%COMP%]{height:40px;min-height:40px;border:1px solid #ccc;border-radius:4px;font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] input.input-filter[_ngcontent-%COMP%]:focus, .dialog-filter.grid-filter[_ngcontent-%COMP%] input.form-control[_ngcontent-%COMP%]:focus{border:1px solid #86b7fe;box-shadow:none;outline:0}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-select-container{height:40px!important;min-height:40px!important;align-items:center;border:1px solid #ccc!important;border-radius:4px!important;font-size:.875rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border-color:#86b7fe!important;box-shadow:none!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-value-container{padding-left:.75rem;padding-right:.75rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-value, .dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-placeholder{font-size:.875rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select{display:block}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-float-label{padding:0;display:block}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-treeselect{display:flex;align-items:center;box-sizing:border-box;width:100%!important;height:40px!important;min-height:40px!important;padding:0 .75rem!important;border:1px solid #ccc!important;border-radius:4px!important;font-size:.875rem!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-treeselect:not(.p-disabled).p-focus{border-color:#86b7fe!important;box-shadow:none!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select .p-treeselect-label-container{display:flex;align-items:center;flex:1 1 auto;min-height:0;overflow:hidden;padding:0}"],changeDetection:0})}}return a})();export{ct as MultiChannelComparison};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as tn}from"./chunk-G346YBOK.js";import{c as en,d as nn}from"./chunk-DEBF436Y.js";import"./chunk-RZM45AEI.js";import"./chunk-H276HPOG.js";import"./chunk-SJBVLNCR.js";import{a as Xe}from"./chunk-A46ZW26C.js";import{a as L}from"./chunk-5CH6HZVM.js";import{a as je,b as We}from"./chunk-5WAEN7KH.js";import"./chunk-QK2JCSM3.js";import{e as Ze}from"./chunk-
|
|
1
|
+
import{b as tn}from"./chunk-G346YBOK.js";import{c as en,d as nn}from"./chunk-DEBF436Y.js";import"./chunk-RZM45AEI.js";import"./chunk-H276HPOG.js";import"./chunk-SJBVLNCR.js";import{a as Xe}from"./chunk-A46ZW26C.js";import{a as L}from"./chunk-5CH6HZVM.js";import{a as je,b as We}from"./chunk-5WAEN7KH.js";import"./chunk-QK2JCSM3.js";import{e as Ze}from"./chunk-6NML7F6L.js";import"./chunk-QNSVLW6H.js";import{a as Qe}from"./chunk-ZSG2EXIR.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import{a as Ee}from"./chunk-FBOJCUGO.js";import{a as $e}from"./chunk-STIM35MJ.js";import{a as Ge}from"./chunk-7KG3DC5J.js";import{a as Je}from"./chunk-PGDBJOSL.js";import{c as Ke}from"./chunk-NH7UFKXO.js";import{a as Ye}from"./chunk-6YRYXHZS.js";import"./chunk-VYXSV6K4.js";import{a as yt}from"./chunk-HV46UVNS.js";import{a as De}from"./chunk-REDMZUTI.js";import{a as Be,b as Re}from"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as qe}from"./chunk-EYHQ2ZKL.js";import{a as vt}from"./chunk-7X3KALOK.js";import{a as ze}from"./chunk-VGVK74K7.js";import{b as Ne,c as Le}from"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import{e as Ve,g as Fe,h as Ae}from"./chunk-HBAHB3P5.js";import{a as Oe}from"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import{a as St}from"./chunk-TZFPNLRF.js";import{a as at}from"./chunk-BKR7YPEW.js";import{a as fe}from"./chunk-A4TBJ6UZ.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import{g as xt}from"./chunk-AWU3GJLO.js";import{b as K,c as Ie,d as Et,e as ot}from"./chunk-KRIYDIQQ.js";import{d as Pe,e as ke}from"./chunk-474G6BPL.js";import{b as Me}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{a as be,b as xe,c as Se,h as ye,i as ve,j as Te}from"./chunk-TFTF5VH3.js";import{a as Ce}from"./chunk-CBPURQKN.js";import"./chunk-P6EVJYEB.js";import{f as Ue}from"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import{b as He}from"./chunk-GDOAWQKS.js";import{a as ae}from"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import{Aa as ge,T as Ot,V as ue,na as it,ra as he,sa as Vt}from"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import{a as we}from"./chunk-KFJBIBDQ.js";import{b as bt}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as gt}from"./chunk-ZSUWHVKX.js";import{f as me}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as pe}from"./chunk-63X2BBS4.js";import{b as ce,c as de}from"./chunk-MDHMVGYC.js";import{b as I,c as b}from"./chunk-NNVT5X6O.js";import{c as _e,h as _t,m as ft,z as Ct}from"./chunk-7HUEGPJN.js";import{b as re,e as se}from"./chunk-ZE4OOGMT.js";import{b as le,d as ht}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as ie,D as oe,F as Dt,r as Yt,t as Xt,u as te,y as ee,z as ne}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as y,C as B,Cb as Zt,Da as Ut,Db as F,Dd as ut,Eb as V,Ec as $t,Ed as nt,Ga as H,Gc as pt,Hc as P,Ic as m,Jc as A,Kc as D,Mc as Y,Nc as X,Oc as tt,Pc as qt,Qc as Jt,Rb as M,Rc as R,S as Nt,V as st,Vc as U,Wc as Kt,Xb as f,Xc as $,Yb as Gt,Yc as Qt,Zb as C,ac as Mt,bc as It,ca as Lt,cb as Ht,cc as u,db as Q,dc as o,ec as s,ed as q,fa as Bt,fb as zt,fc as _,fd as J,gb as r,gc as z,ha as w,hc as j,ic as Z,id as et,jc as G,kc as W,lc as Pt,mc as x,md as N,nc as lt,oa as d,pa as p,qa as O,r as At,rb as jt,rc as g,rd as kt,sd as mt,tc as c,wa as wt,wc as Wt,xa as Rt,yb as k,yc as ct,zc as dt}from"./chunk-5VYDZBNH.js";import{a as S,b as T}from"./chunk-QWWW7GFA.js";var un=["data-p-icon","exclamation-triangle"],on=(()=>{class i extends St{pathId;onInit(){this.pathId="url(#"+K()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=H(i)))(e||i)}})();static \u0275cmp=k({type:i,selectors:[["","data-p-icon","exclamation-triangle"]],features:[F],attrs:un,decls:7,vars:2,consts:[["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,e){n&1&&(O(),z(0,"g"),Z(1,"path",0)(2,"path",1)(3,"path",2),j(),z(4,"defs")(5,"clipPath",3),Z(6,"rect",4),j()()),n&2&&(M("clip-path",e.pathId),r(5),lt("id",e.pathId))},encapsulation:2})}return i})();var hn=["data-p-icon","info-circle"],an=(()=>{class i extends St{pathId;onInit(){this.pathId="url(#"+K()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=H(i)))(e||i)}})();static \u0275cmp=k({type:i,selectors:[["","data-p-icon","info-circle"]],features:[F],attrs:hn,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,e){n&1&&(O(),z(0,"g"),Z(1,"path",0),j(),z(2,"defs")(3,"clipPath",1),Z(4,"rect",2),j()()),n&2&&(M("clip-path",e.pathId),r(3),lt("id",e.pathId))},encapsulation:2})}return i})();var rn=`
|
|
2
2
|
.p-toast {
|
|
3
3
|
width: dt('toast.width');
|
|
4
4
|
white-space: pre-line;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ut}from"./chunk-
|
|
1
|
+
import{a as ut}from"./chunk-ZSG2EXIR.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{a as mt}from"./chunk-7KG3DC5J.js";import{a as dt}from"./chunk-PGDBJOSL.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import{b as ct}from"./chunk-A4TBJ6UZ.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{e as pt}from"./chunk-474G6BPL.js";import{b as st}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{c as et}from"./chunk-NNVT5X6O.js";import{h as at,m as rt,z as lt}from"./chunk-7HUEGPJN.js";import{e as it}from"./chunk-ZE4OOGMT.js";import{e as nt,g as ot}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as Z,D as tt,z as Y}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as H,Aa as R,Hc as W,Ic as r,Jc as S,Kc as D,Mc as j,Nc as q,Oc as A,Pc as U,Qc as G,Rc as I,S as v,Sc as J,W as F,Wc as K,Xb as h,Xc as Q,Yc as X,Zb as g,ac as O,bc as z,cb as $,cc as f,d as V,db as B,dc as o,ec as a,ed as p,fc as b,fd as _,gb as l,gd as M,ha as N,mc as w,oa as m,pa as d,r as C,rc as T,tc as s,yb as k}from"./chunk-5VYDZBNH.js";import{a as L,b as P}from"./chunk-QWWW7GFA.js";var ft=(i,c)=>({"bg-gradient-danger":i,"bg-gradient-warning":c}),_t=()=>["/menu/products/status/notification/detail"],Ct=i=>({ID:i});function ht(i,c){if(i&1&&(r(0),p(1,"number"),o(2,"span"),r(3,"s"),a()),i&2){let t=s().$implicit;D(" ",M(1,1,t.DurationInSecond,"1.1-1")," ")}}function gt(i,c){i&1&&r(0," - ")}function St(i,c){if(i&1&&(o(0,"tr")(1,"td")(2,"a",12),b(3,"img",13),o(4,"span"),r(5),a()()(),o(6,"td")(7,"b"),r(8),a(),b(9,"div",14),a(),o(10,"td"),h(11,ht,4,4)(12,gt,1,0),a(),o(13,"td"),r(14),a(),o(15,"td"),r(16),p(17,"date"),a()()),i&2){let t=c.$implicit;W(X(15,ft,t.Status==1,t.Status==0)),l(2),f("routerLink",K(18,_t))("queryParams",Q(19,Ct,t.ID)),l(),f("src",J(t.Img),B),l(2),S(t.Name),l(3),S(t.Label),l(),f("innerHTML",t.Message,$),l(2),g(t.DurationInSecond?11:12),l(3),S(t.StatusLabel),l(2),D(" ",M(17,12,t.Created,"dd MMM yyyy HH:mm")," ")}}function xt(i,c){if(i&1){let t=w();o(0,"div",5)(1,"div",15)(2,"app-custom-paginator",16),p(3,"async"),p(4,"async"),T("total",function(){m(t);let n=s(2);return d(n.getRowCount())})("next",function(){m(t);let n=s(2);return d(n.getNotifications())})("previous",function(){m(t);let n=s(2);return d(n.getNotifications())}),a()()()}if(i&2){let t=s(),e=s(),n=I(8);l(2),f("filter",n)("totaldata",t==null?null:t.length)("paginationTotal",_(3,4,e.rowCount$))("hasClicked",_(4,6,e.rowCount$))}}function yt(i,c){i&1&&h(0,xt,5,8,"div",5),i&2&&g(c.length>0?0:-1)}var zt=(()=>{class i{constructor(){this.http=N(it),this.notificationService=N(ct),this.filter=R(new mt),this.destroy$=new V}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(F(this.destroy$)).subscribe(t=>{t.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(t=>{this.filter.set(t.Filter),this.filter.update(e=>P(L({},e),{PageSize:t.Filter.RowCount})),this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let t=this.filter(),e={ChannelID:t.ChannelID,RowCount:t.PageSize,PageNumber:t.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(C(n=>n.Data),C(n=>(n=this.setChannelLogoToNotifications(n),n=this.setTimeToSecond(n),n)),v(1))}setTimeToSecond(t){return t=t.map(e=>(e.DurationInSecond=parseInt(e.Duration)/1e3,e)),t}setChannelLogoToNotifications(t){return t=t.map(e=>(e.Img=et.getChannelLogoByTypeId(e.TypeID),e)),t}getRowCount(){let e={ChannelID:this.filter().ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(C(n=>n.Count),v(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-notification"]],decls:34,vars:7,consts:[["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],[3,"ngModelChange","ngModel"],[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"],[3,"class"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,n){if(e&1){let u=w();o(0,"mainpanel",0),T("onSubmit",function(){return m(u),d(n.onFilter())}),o(1,"actions")(2,"a",1),r(3," Scan History "),a()(),o(4,"filters")(5,"div")(6,"h6",2),r(7,"Channel"),a(),U(8),o(9,"app-channel-options-v2",3),A("ngModelChange",function(y){m(u);let E=I(8);return q(E.ChannelID,y)||(E.ChannelID=y),d(y)}),a()()(),o(10,"content")(11,"div",4)(12,"div",5)(13,"div",6)(14,"div",7)(15,"table",8)(16,"thead",9)(17,"tr",10)(18,"th"),r(19,"Channel"),a(),o(20,"th"),r(21,"Process"),a(),o(22,"th"),r(23,"Duration"),a(),o(24,"th"),r(25,"Status"),a(),o(26,"th"),r(27,"Created"),a()()(),o(28,"tbody"),O(29,St,18,21,"tr",11,H),p(31,"async"),a()()()()(),h(32,yt,1,1),p(33,"async"),a()()()}if(e&2){let u;l(8);let x=G(n.filter());l(),j("ngModel",x.ChannelID),l(20),z(_(31,3,n.notifications$)),l(3),g((u=_(33,5,n.notifications$))?32:-1,u)}},dependencies:[lt,at,rt,st,dt,pt,ot,nt,ut,Y,Z,tt],encapsulation:2,changeDetection:0})}}return i})();export{zt as NotificationComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as It}from"./chunk-CMZFAK2O.js";import"./chunk-32F5EUMW.js";import{e as vt}from"./chunk-AJJTCPZJ.js";import"./chunk-QNSVLW6H.js";import{c as Ft}from"./chunk-NH7UFKXO.js";import{a as Tt}from"./chunk-6YRYXHZS.js";import{a as Nt}from"./chunk-VYXSV6K4.js";import{a as St}from"./chunk-HV46UVNS.js";import"./chunk-REDMZUTI.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as wt}from"./chunk-EYHQ2ZKL.js";import{a as Pt}from"./chunk-YB5PUU2Z.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BKR7YPEW.js";import"./chunk-Y5KEIPY2.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as bt,e as yt}from"./chunk-474G6BPL.js";import{b as xt}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{c as ft}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as gt}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as Z}from"./chunk-ZSUWHVKX.js";import{f as ht}from"./chunk-IJ7SVRC3.js";import"./chunk-U7ABSTXN.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as J}from"./chunk-63X2BBS4.js";import{b as _t,c as ut}from"./chunk-MDHMVGYC.js";import{c as w}from"./chunk-NNVT5X6O.js";import{b as Ct,h as G,m as z,z as H}from"./chunk-7HUEGPJN.js";import{b as pt,e as W}from"./chunk-ZE4OOGMT.js";import{d as mt}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{D as dt,z as st}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as T,Aa as x,C as V,Eb as B,G as tt,Ic as d,Jc as ct,Kc as v,Mc as R,Nc as U,Oc as q,Q as et,S as nt,W as it,Xb as m,Xc as j,Y as A,Yb as lt,Z as ot,Zb as _,ac as I,bc as M,ca as at,cc as p,d as X,db as N,dc as o,e as K,ec as r,ed as S,fc as f,fd as P,ga as rt,gb as a,ha as g,jc as $,kc as L,mc as y,oa as u,pa as h,r as F,rc as C,rd as Q,sd as O,tc as s,yb as k}from"./chunk-5VYDZBNH.js";import{a as E,b as D}from"./chunk-QWWW7GFA.js";var Ot=(()=>{class n{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new K(null),this.destroy$=new X,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,i){i==0?this.disableNextButton=!0:this.disableNextButton=!(i<t.RowCount*t.PageNumber)}reloadPagination(t){w.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,i){t.RowCount=i,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new K(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(it(this.destroy$),V(t=>t!=null),tt(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(F(i=>i.Data))),ot(this.pagination$),et((t,i)=>{let[e,l]=t,[b]=i;return l.PageNumber==1?[b,l]:[e.concat(b),l]}),A(([t,i])=>{this.setPageNumberFooter(i),this.setPaginationButtonState(i,t.length)}),F(([t])=>t),nt())}static{this.\u0275fac=function(i){return new(i||n)(rt(W))}}static{this.\u0275prov=at({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Et=(()=>{class n{constructor(){this.searchType=O(),this.searchTypeChange=Q(),this.searchTypeOptions=O([]),this.numberFilterComparator=O(),this.numberFilterComparatorChange=Q(),this.numberFilterComparatorOptions=O([])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=k({type:n,selectors:[["filter-query-type"]],inputs:{searchType:[1,"searchType"],searchTypeOptions:[1,"searchTypeOptions"],numberFilterComparator:[1,"numberFilterComparator"],numberFilterComparatorOptions:[1,"numberFilterComparatorOptions"]},outputs:{searchTypeChange:"searchTypeChange",numberFilterComparatorChange:"numberFilterComparatorChange"},decls:9,vars:5,consts:[[1,"mb-5"],[1,"fw-bold","mb-2"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel","clearable"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","ngModel"]],template:function(i,e){i&1&&(o(0,"div",0)(1,"label",1),d(2,"Number Filter Comparator"),r(),o(3,"ng-select",2),C("ngModelChange",function(b){return e.numberFilterComparatorChange.emit(b)}),r()(),o(4,"div")(5,"label",1),d(6,"Search Type"),r(),o(7,"div",3)(8,"radio-options",4),C("ngModelChange",function(b){return e.searchTypeChange.emit(b)}),r()()()),i&2&&(a(3),p("items",e.numberFilterComparatorOptions())("ngModel",e.numberFilterComparator())("clearable",!1),a(5),p("options",e.searchTypeOptions())("ngModel",e.searchType()))},dependencies:[Tt,yt,bt,H,G,z],encapsulation:2,changeDetection:0})}}return n})();var Y=n=>[n];function Vt(n,c){if(n&1){let t=y();o(0,"button",11),C("click",function(){u(t);let e=s(3);return h(e.uploadMultipleProduct())}),f(1,"i",12),d(2),r()}if(n&2){let t,i=s(3);a(2),v(" upload (",(t=i.selectedProducts())==null?null:t.length,") ")}}function At(n,c){if(n&1&&($(0),m(1,Vt,3,1,"button",10),L()),n&2){let t=s(2);a(),_(t.hasSelectionProduct()?1:-1)}}function kt(n,c){n&1&&($(0),f(1,"th",19),L())}function Bt(n,c){if(n&1){let t=y();o(0,"td",25)(1,"input",26),q("ngModelChange",function(e){u(t);let l=s(3).$implicit;return U(l.selected,e)||(l.selected=e),h(e)}),C("ngModelChange",function(){u(t);let e=s(4),l=s(3);return h(l.onSelectProduct(e))}),r()()}if(n&2){let t=s(3).$implicit;p("rowSpan",t==null?null:t.Variants.length),a(),R("ngModel",t.selected)}}function $t(n,c){if(n&1&&($(0),m(1,Bt,2,2,"td",25),L()),n&2){let t=s().$index;a(),_(t==0?1:-1)}}function Lt(n,c){if(n&1){let t=y();o(0,"img",33),C("click",function(e){u(t);let l=s(3).$implicit,b=s(4);return h(b.onZoomImage(e,l==null?null:l.ImageUrl))}),r()}if(n&2){let t=s(3).$implicit;p("src",t==null?null:t.ImageUrl,N)}}function Rt(n,c){n&1&&f(0,"img",29)}function Ut(n,c){if(n&1&&(o(0,"td",25)(1,"div",27),m(2,Lt,1,1,"img",28)(3,Rt,1,0,"img",29),r()(),o(4,"td",30)(5,"h4",31)(6,"span",32),d(7),r()()()),n&2){let t=s(2).$implicit;p("rowSpan",t==null?null:t.Variants.length),a(2),_(t!=null&&t.ImageUrl?2:3),a(2),p("rowSpan",t==null?null:t.Variants.length),a(2),p("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),a(),v(" ",t==null?null:t.Name," ")}}function jt(n,c){if(n&1&&(o(0,"div")(1,"a",21),f(2,"img",34),r()()),n&2){let t=c.$implicit;a(),p("href",t.URL,N),a(),p("src",t.Img,N)("matTooltip",t.Name)}}function Wt(n,c){if(n&1&&(o(0,"div"),f(1,"img",34),r()),n&2){let t=c.$implicit;a(),p("src",t.Img,N)("matTooltip",t.Name)}}function Gt(n,c){if(n&1&&(o(0,"tr"),B(1,$t,2,1,"ng-container",2),m(2,Ut,8,5),o(3,"td"),d(4),r(),o(5,"td")(6,"span"),d(7),r(),o(8,"span",20)(9,"a",21),f(10,"i",22),r()()(),o(11,"td",23)(12,"div",24),I(13,jt,3,3,"div",null,T),r()(),o(15,"td",23)(16,"div",24),I(17,Wt,2,2,"div",null,T),r()()()),n&2){let t=c.$implicit,i=c.$index,e=s(5);a(),p("ngxPermissionsOnly",j(5,Y,e.uploadProductRole)),a(),_(i==0?2:-1),a(2),v(" ",t.Name," "),a(3),v(" ",t.Code," "),a(2),p("href",e.hostName()+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),N),a(4),M(t==null?null:t.Available),a(4),M(t==null?null:t.NotAvailable)}}function zt(n,c){if(n&1&&I(0,Gt,19,7,"tr",null,T),n&2){let t=c.$implicit;M(t.Variants)}}function Ht(n,c){n&1&&(o(0,"tbody"),I(1,zt,2,0,null,null,T),r()),n&2&&(a(),M(c))}function Kt(n,c){if(n&1&&(o(0,"div",8)(1,"table",13)(2,"thead",14)(3,"tr"),B(4,kt,2,0,"ng-container",2),o(5,"th",15),d(6," Product "),r(),o(7,"th",16),d(8,"Variant"),r(),o(9,"th",16),d(10,"SKU"),r(),o(11,"th",17),d(12,"Available In"),r(),o(13,"th",18),d(14,"Not Available In"),r()()(),m(15,Ht,3,0,"tbody"),S(16,"async"),r()()),n&2){let t,i=s(2);a(4),p("ngxPermissionsOnly",j(4,Y,i.uploadProductRole)),a(11),_((t=P(16,2,i.data$))?15:-1,t)}}function qt(n,c){n&1&&(o(0,"div",9),f(1,"app-empty-state"),r())}function Qt(n,c){if(n&1){let t=y();o(0,"span",42),C("click",function(){u(t);let e=s(4);return h(e.getRowCount())}),o(1,"i",43),d(2,"?"),r()()}}function Jt(n,c){if(n&1&&(o(0,"span"),d(1),S(2,"number"),r()),n&2){let t=c;a(),ct(P(2,1,t==null?null:t.Count))}}function Zt(n,c){if(n&1){let t=y();o(0,"a",44),C("click",function(){u(t);let e=s(4);return h(e.onNextPage())}),f(1,"i",45),d(2," Next"),r()}}function Yt(n,c){if(n&1){let t=y();o(0,"a",46),C("click",function(){u(t);let e=s(4);return h(e.onLastPage())}),f(1,"i",47),d(2," Last"),r()}}function Xt(n,c){if(n&1&&(o(0,"div",35)(1,"div",36)(2,"div",37),d(3),S(4,"number"),m(5,Qt,3,0,"span",38),m(6,Jt,3,3,"span"),S(7,"async"),d(8),r()(),o(9,"div",39),m(10,Zt,3,0,"a",40),m(11,Yt,3,0,"a",41),r()()),n&2){let t,i=s(),e=s(2);a(3),v(" Showing 1 - ",P(4,6,i==null?null:i.length)," of "),a(2),_(e.paginationService.hideCount?5:-1),a(),_((t=!e.paginationService.hideCount&&P(7,8,e.rowCount$))?6:-1,t),a(2),v(" records ~ ",e.paginationService.footerPageNumber," Page "),a(2),_(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?10:-1),a(),_(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?11:-1)}}function te(n,c){if(n&1&&m(0,Xt,12,10,"div",35),n&2){let t=c;_((t==null?null:t.length)>0?0:-1)}}function ee(n,c){if(n&1){let t=y();o(0,"mainpanel",1),C("onSubmit",function(e){u(t);let l=s();return h(l.searchProduct(e))}),o(1,"actions"),B(2,At,2,1,"ng-container",2),o(3,"button",3),C("click",function(){u(t);let e=s();return h(e.openExportDialog())}),f(4,"i",4),o(5,"span"),d(6,"Export"),r()()(),o(7,"filters")(8,"filter-query-type",5),q("numberFilterComparatorChange",function(e){u(t);let l=s();return U(l.searchFilter().NumberFilterComparator,e)||(l.searchFilter().NumberFilterComparator=e),h(e)})("searchTypeChange",function(e){u(t);let l=s();return U(l.searchFilter().SearchType,e)||(l.searchFilter().SearchType=e),h(e)}),r()(),o(9,"content")(10,"div",6)(11,"div",7),m(12,Kt,17,6,"div",8),S(13,"async"),lt(14,qt,2,0,"div",9),r(),m(15,te,1,1),S(16,"async"),r()()()}if(n&2){let t,i,e=c,l=s();p("searchBoxPlaceHolder",l.searchPlaceholder()),a(2),p("ngxPermissionsOnly",j(12,Y,l.uploadProductRole)),a(6),p("numberFilterComparatorOptions",e==null||e.Options==null?null:e.Options.SearchComparatorTypeOptions),R("numberFilterComparator",l.searchFilter().NumberFilterComparator),p("searchTypeOptions",e==null||e.Options==null?null:e.Options.SearchSKUOnlyOrSKUNameOptions),R("searchType",l.searchFilter().SearchType),a(4),_(((t=P(13,8,l.data$))==null?null:t.length)>0?12:14),a(3),_((i=P(16,10,l.data$))?15:-1,i)}}var je=(()=>{class n{constructor(){this.http=g(W),this.dialog=g(ft),this.toastr=g(pt),this.route=g(mt),this.productService=g(Pt),this.paginationService=g(Ot),this.biggerPictureService=g(Nt),this.authService=g(ht),this.uploadProductService=g(vt),this.placeholderService=g(Ft),this.loaderAPI=x("product/Load"),this.notChannelAPI=x("product/GetNotInChannelV2"),this.searchFilter=x({}),this.hostName=x(""),this.hasSelectionProduct=x(!1),this.selectedProducts=x([]),this.channelOptions=x([]),this.scanProductRole=Z.ProductScan,this.uploadProductRole=Z.ProductUpload,this.searchPlaceholder=x("Search ...");let t=this.authService;this.channelOptions.set(t.getChannels()),this.hostName.set(this.authService.getDomain())}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI(),this.loader$=this.http.post(`api/${this.loaderAPI()}`,{}).pipe(A(t=>{this.searchFilter.set(t.Filter),this.paginationService.reloadPagination(t.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){let t=this.searchFilter();this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(t.SearchType,t.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(F(t=>(t=t.map(i=>(i.Variants=i.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),i.Channel=i?.Variants[0]?.Available,i)),t)))}assignLogoChannel(t){return t=t.map(i=>(i.Img=w.getChannelLogoByTypeId(i.TypeID),i)),t}searchProduct(t){this.searchFilter.update(i=>D(E({},i),{text:t})),this.paginationService.reloadPagination(this.searchFilter()),this.initSearchPlaceholder()}scanAllProduct(){let t=this.searchFilter(),i=this.productService.findChannelById(t.ChannelID,this.channelOptions());this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).subscribe(e=>{t.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,i,!t.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter()));t.ChannelID=w.GuidEMpty,this.dialog.open(St,{data:{filter:t,channelOptions:this.channelOptions()},width:"600px"}).afterClosed().pipe(V(e=>w.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.update(l=>D(E({},l),{ChannelID:e.ChannelID,ScanFull:e.ScanFull,UpdatedProduct:e.UpdatedProduct,Async:e.Async})),this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let t=this.searchFilter(),i={text:t.text,NumberFilterComparator:t.NumberFilterComparator,SearchType:t.SearchType};this.rowCount$=this.http.post(J.GetNotInChannelRowCount,i)}onNextPage(){this.paginationService.onNextPage(this.searchFilter())}onLastPage(){let t=this.searchFilter(),i={text:t.text,NumberFilterComparator:t.NumberFilterComparator,SearchType:t.SearchType};this.http.post(J.GetNotInChannelRowCount,i).subscribe({next:e=>{this.searchFilter.update(l=>D(E({},l),{PageNumber:1})),this.paginationService.getAllData(this.searchFilter(),e.Count)}})}onZoomImage(t,i){this.biggerPictureService.openBiggerPicture(t,i)}onSelectProduct(t){this.hasSelectionProduct.set(this.productService.hasSelection(t)),this.selectedProducts.set(this.productService.selectedProduct(t))}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts()),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){let t=this.searchFilter();this.dialog.open(It,{data:{title:"Export Not In Channel",pageNumber:t.PageNumber,rowCount:t.RowCount,filterExport:t,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=k({type:n,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[1,"btn-group"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(i,e){if(i&1&&(m(0,ee,17,14,"mainpanel",0),S(1,"async")),i&2){let l;_((l=P(1,1,e.loader$))?0:-1,l)}},dependencies:[xt,ut,_t,Et,H,Ct,G,z,gt,wt,st,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media(min-width:1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}}return n})();export{je as NotInChannelComponent};
|
|
1
|
+
import{a as It}from"./chunk-CMZFAK2O.js";import"./chunk-32F5EUMW.js";import{e as vt}from"./chunk-6NML7F6L.js";import"./chunk-QNSVLW6H.js";import{c as Ft}from"./chunk-NH7UFKXO.js";import{a as Tt}from"./chunk-6YRYXHZS.js";import{a as Nt}from"./chunk-VYXSV6K4.js";import{a as St}from"./chunk-HV46UVNS.js";import"./chunk-REDMZUTI.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as wt}from"./chunk-EYHQ2ZKL.js";import{a as Pt}from"./chunk-7X3KALOK.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BKR7YPEW.js";import"./chunk-A4TBJ6UZ.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as bt,e as yt}from"./chunk-474G6BPL.js";import{b as xt}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{c as ft}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as gt}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as Z}from"./chunk-ZSUWHVKX.js";import{f as ht}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as J}from"./chunk-63X2BBS4.js";import{b as _t,c as ut}from"./chunk-MDHMVGYC.js";import{c as w}from"./chunk-NNVT5X6O.js";import{b as Ct,h as G,m as z,z as H}from"./chunk-7HUEGPJN.js";import{b as pt,e as W}from"./chunk-ZE4OOGMT.js";import{d as mt}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{D as dt,z as st}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as T,Aa as x,C as V,Eb as B,G as tt,Ic as d,Jc as ct,Kc as v,Mc as R,Nc as U,Oc as q,Q as et,S as nt,W as it,Xb as m,Xc as j,Y as A,Yb as lt,Z as ot,Zb as _,ac as I,bc as M,ca as at,cc as p,d as X,db as N,dc as o,e as K,ec as r,ed as S,fc as f,fd as P,ga as rt,gb as a,ha as g,jc as $,kc as L,mc as y,oa as u,pa as h,r as F,rc as C,rd as Q,sd as O,tc as s,yb as k}from"./chunk-5VYDZBNH.js";import{a as E,b as D}from"./chunk-QWWW7GFA.js";var Ot=(()=>{class n{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new K(null),this.destroy$=new X,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,i){i==0?this.disableNextButton=!0:this.disableNextButton=!(i<t.RowCount*t.PageNumber)}reloadPagination(t){w.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,i){t.RowCount=i,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new K(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(it(this.destroy$),V(t=>t!=null),tt(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(F(i=>i.Data))),ot(this.pagination$),et((t,i)=>{let[e,l]=t,[b]=i;return l.PageNumber==1?[b,l]:[e.concat(b),l]}),A(([t,i])=>{this.setPageNumberFooter(i),this.setPaginationButtonState(i,t.length)}),F(([t])=>t),nt())}static{this.\u0275fac=function(i){return new(i||n)(rt(W))}}static{this.\u0275prov=at({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Et=(()=>{class n{constructor(){this.searchType=O(),this.searchTypeChange=Q(),this.searchTypeOptions=O([]),this.numberFilterComparator=O(),this.numberFilterComparatorChange=Q(),this.numberFilterComparatorOptions=O([])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=k({type:n,selectors:[["filter-query-type"]],inputs:{searchType:[1,"searchType"],searchTypeOptions:[1,"searchTypeOptions"],numberFilterComparator:[1,"numberFilterComparator"],numberFilterComparatorOptions:[1,"numberFilterComparatorOptions"]},outputs:{searchTypeChange:"searchTypeChange",numberFilterComparatorChange:"numberFilterComparatorChange"},decls:9,vars:5,consts:[[1,"mb-5"],[1,"fw-bold","mb-2"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel","clearable"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","ngModel"]],template:function(i,e){i&1&&(o(0,"div",0)(1,"label",1),d(2,"Number Filter Comparator"),r(),o(3,"ng-select",2),C("ngModelChange",function(b){return e.numberFilterComparatorChange.emit(b)}),r()(),o(4,"div")(5,"label",1),d(6,"Search Type"),r(),o(7,"div",3)(8,"radio-options",4),C("ngModelChange",function(b){return e.searchTypeChange.emit(b)}),r()()()),i&2&&(a(3),p("items",e.numberFilterComparatorOptions())("ngModel",e.numberFilterComparator())("clearable",!1),a(5),p("options",e.searchTypeOptions())("ngModel",e.searchType()))},dependencies:[Tt,yt,bt,H,G,z],encapsulation:2,changeDetection:0})}}return n})();var Y=n=>[n];function Vt(n,c){if(n&1){let t=y();o(0,"button",11),C("click",function(){u(t);let e=s(3);return h(e.uploadMultipleProduct())}),f(1,"i",12),d(2),r()}if(n&2){let t,i=s(3);a(2),v(" upload (",(t=i.selectedProducts())==null?null:t.length,") ")}}function At(n,c){if(n&1&&($(0),m(1,Vt,3,1,"button",10),L()),n&2){let t=s(2);a(),_(t.hasSelectionProduct()?1:-1)}}function kt(n,c){n&1&&($(0),f(1,"th",19),L())}function Bt(n,c){if(n&1){let t=y();o(0,"td",25)(1,"input",26),q("ngModelChange",function(e){u(t);let l=s(3).$implicit;return U(l.selected,e)||(l.selected=e),h(e)}),C("ngModelChange",function(){u(t);let e=s(4),l=s(3);return h(l.onSelectProduct(e))}),r()()}if(n&2){let t=s(3).$implicit;p("rowSpan",t==null?null:t.Variants.length),a(),R("ngModel",t.selected)}}function $t(n,c){if(n&1&&($(0),m(1,Bt,2,2,"td",25),L()),n&2){let t=s().$index;a(),_(t==0?1:-1)}}function Lt(n,c){if(n&1){let t=y();o(0,"img",33),C("click",function(e){u(t);let l=s(3).$implicit,b=s(4);return h(b.onZoomImage(e,l==null?null:l.ImageUrl))}),r()}if(n&2){let t=s(3).$implicit;p("src",t==null?null:t.ImageUrl,N)}}function Rt(n,c){n&1&&f(0,"img",29)}function Ut(n,c){if(n&1&&(o(0,"td",25)(1,"div",27),m(2,Lt,1,1,"img",28)(3,Rt,1,0,"img",29),r()(),o(4,"td",30)(5,"h4",31)(6,"span",32),d(7),r()()()),n&2){let t=s(2).$implicit;p("rowSpan",t==null?null:t.Variants.length),a(2),_(t!=null&&t.ImageUrl?2:3),a(2),p("rowSpan",t==null?null:t.Variants.length),a(2),p("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),a(),v(" ",t==null?null:t.Name," ")}}function jt(n,c){if(n&1&&(o(0,"div")(1,"a",21),f(2,"img",34),r()()),n&2){let t=c.$implicit;a(),p("href",t.URL,N),a(),p("src",t.Img,N)("matTooltip",t.Name)}}function Wt(n,c){if(n&1&&(o(0,"div"),f(1,"img",34),r()),n&2){let t=c.$implicit;a(),p("src",t.Img,N)("matTooltip",t.Name)}}function Gt(n,c){if(n&1&&(o(0,"tr"),B(1,$t,2,1,"ng-container",2),m(2,Ut,8,5),o(3,"td"),d(4),r(),o(5,"td")(6,"span"),d(7),r(),o(8,"span",20)(9,"a",21),f(10,"i",22),r()()(),o(11,"td",23)(12,"div",24),I(13,jt,3,3,"div",null,T),r()(),o(15,"td",23)(16,"div",24),I(17,Wt,2,2,"div",null,T),r()()()),n&2){let t=c.$implicit,i=c.$index,e=s(5);a(),p("ngxPermissionsOnly",j(5,Y,e.uploadProductRole)),a(),_(i==0?2:-1),a(2),v(" ",t.Name," "),a(3),v(" ",t.Code," "),a(2),p("href",e.hostName()+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),N),a(4),M(t==null?null:t.Available),a(4),M(t==null?null:t.NotAvailable)}}function zt(n,c){if(n&1&&I(0,Gt,19,7,"tr",null,T),n&2){let t=c.$implicit;M(t.Variants)}}function Ht(n,c){n&1&&(o(0,"tbody"),I(1,zt,2,0,null,null,T),r()),n&2&&(a(),M(c))}function Kt(n,c){if(n&1&&(o(0,"div",8)(1,"table",13)(2,"thead",14)(3,"tr"),B(4,kt,2,0,"ng-container",2),o(5,"th",15),d(6," Product "),r(),o(7,"th",16),d(8,"Variant"),r(),o(9,"th",16),d(10,"SKU"),r(),o(11,"th",17),d(12,"Available In"),r(),o(13,"th",18),d(14,"Not Available In"),r()()(),m(15,Ht,3,0,"tbody"),S(16,"async"),r()()),n&2){let t,i=s(2);a(4),p("ngxPermissionsOnly",j(4,Y,i.uploadProductRole)),a(11),_((t=P(16,2,i.data$))?15:-1,t)}}function qt(n,c){n&1&&(o(0,"div",9),f(1,"app-empty-state"),r())}function Qt(n,c){if(n&1){let t=y();o(0,"span",42),C("click",function(){u(t);let e=s(4);return h(e.getRowCount())}),o(1,"i",43),d(2,"?"),r()()}}function Jt(n,c){if(n&1&&(o(0,"span"),d(1),S(2,"number"),r()),n&2){let t=c;a(),ct(P(2,1,t==null?null:t.Count))}}function Zt(n,c){if(n&1){let t=y();o(0,"a",44),C("click",function(){u(t);let e=s(4);return h(e.onNextPage())}),f(1,"i",45),d(2," Next"),r()}}function Yt(n,c){if(n&1){let t=y();o(0,"a",46),C("click",function(){u(t);let e=s(4);return h(e.onLastPage())}),f(1,"i",47),d(2," Last"),r()}}function Xt(n,c){if(n&1&&(o(0,"div",35)(1,"div",36)(2,"div",37),d(3),S(4,"number"),m(5,Qt,3,0,"span",38),m(6,Jt,3,3,"span"),S(7,"async"),d(8),r()(),o(9,"div",39),m(10,Zt,3,0,"a",40),m(11,Yt,3,0,"a",41),r()()),n&2){let t,i=s(),e=s(2);a(3),v(" Showing 1 - ",P(4,6,i==null?null:i.length)," of "),a(2),_(e.paginationService.hideCount?5:-1),a(),_((t=!e.paginationService.hideCount&&P(7,8,e.rowCount$))?6:-1,t),a(2),v(" records ~ ",e.paginationService.footerPageNumber," Page "),a(2),_(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?10:-1),a(),_(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?11:-1)}}function te(n,c){if(n&1&&m(0,Xt,12,10,"div",35),n&2){let t=c;_((t==null?null:t.length)>0?0:-1)}}function ee(n,c){if(n&1){let t=y();o(0,"mainpanel",1),C("onSubmit",function(e){u(t);let l=s();return h(l.searchProduct(e))}),o(1,"actions"),B(2,At,2,1,"ng-container",2),o(3,"button",3),C("click",function(){u(t);let e=s();return h(e.openExportDialog())}),f(4,"i",4),o(5,"span"),d(6,"Export"),r()()(),o(7,"filters")(8,"filter-query-type",5),q("numberFilterComparatorChange",function(e){u(t);let l=s();return U(l.searchFilter().NumberFilterComparator,e)||(l.searchFilter().NumberFilterComparator=e),h(e)})("searchTypeChange",function(e){u(t);let l=s();return U(l.searchFilter().SearchType,e)||(l.searchFilter().SearchType=e),h(e)}),r()(),o(9,"content")(10,"div",6)(11,"div",7),m(12,Kt,17,6,"div",8),S(13,"async"),lt(14,qt,2,0,"div",9),r(),m(15,te,1,1),S(16,"async"),r()()()}if(n&2){let t,i,e=c,l=s();p("searchBoxPlaceHolder",l.searchPlaceholder()),a(2),p("ngxPermissionsOnly",j(12,Y,l.uploadProductRole)),a(6),p("numberFilterComparatorOptions",e==null||e.Options==null?null:e.Options.SearchComparatorTypeOptions),R("numberFilterComparator",l.searchFilter().NumberFilterComparator),p("searchTypeOptions",e==null||e.Options==null?null:e.Options.SearchSKUOnlyOrSKUNameOptions),R("searchType",l.searchFilter().SearchType),a(4),_(((t=P(13,8,l.data$))==null?null:t.length)>0?12:14),a(3),_((i=P(16,10,l.data$))?15:-1,i)}}var je=(()=>{class n{constructor(){this.http=g(W),this.dialog=g(ft),this.toastr=g(pt),this.route=g(mt),this.productService=g(Pt),this.paginationService=g(Ot),this.biggerPictureService=g(Nt),this.authService=g(ht),this.uploadProductService=g(vt),this.placeholderService=g(Ft),this.loaderAPI=x("product/Load"),this.notChannelAPI=x("product/GetNotInChannelV2"),this.searchFilter=x({}),this.hostName=x(""),this.hasSelectionProduct=x(!1),this.selectedProducts=x([]),this.channelOptions=x([]),this.scanProductRole=Z.ProductScan,this.uploadProductRole=Z.ProductUpload,this.searchPlaceholder=x("Search ...");let t=this.authService;this.channelOptions.set(t.getChannels()),this.hostName.set(this.authService.getDomain())}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI(),this.loader$=this.http.post(`api/${this.loaderAPI()}`,{}).pipe(A(t=>{this.searchFilter.set(t.Filter),this.paginationService.reloadPagination(t.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){let t=this.searchFilter();this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(t.SearchType,t.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(F(t=>(t=t.map(i=>(i.Variants=i.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),i.Channel=i?.Variants[0]?.Available,i)),t)))}assignLogoChannel(t){return t=t.map(i=>(i.Img=w.getChannelLogoByTypeId(i.TypeID),i)),t}searchProduct(t){this.searchFilter.update(i=>D(E({},i),{text:t})),this.paginationService.reloadPagination(this.searchFilter()),this.initSearchPlaceholder()}scanAllProduct(){let t=this.searchFilter(),i=this.productService.findChannelById(t.ChannelID,this.channelOptions());this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).subscribe(e=>{t.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,i,!t.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter()));t.ChannelID=w.GuidEMpty,this.dialog.open(St,{data:{filter:t,channelOptions:this.channelOptions()},width:"600px"}).afterClosed().pipe(V(e=>w.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.update(l=>D(E({},l),{ChannelID:e.ChannelID,ScanFull:e.ScanFull,UpdatedProduct:e.UpdatedProduct,Async:e.Async})),this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let t=this.searchFilter(),i={text:t.text,NumberFilterComparator:t.NumberFilterComparator,SearchType:t.SearchType};this.rowCount$=this.http.post(J.GetNotInChannelRowCount,i)}onNextPage(){this.paginationService.onNextPage(this.searchFilter())}onLastPage(){let t=this.searchFilter(),i={text:t.text,NumberFilterComparator:t.NumberFilterComparator,SearchType:t.SearchType};this.http.post(J.GetNotInChannelRowCount,i).subscribe({next:e=>{this.searchFilter.update(l=>D(E({},l),{PageNumber:1})),this.paginationService.getAllData(this.searchFilter(),e.Count)}})}onZoomImage(t,i){this.biggerPictureService.openBiggerPicture(t,i)}onSelectProduct(t){this.hasSelectionProduct.set(this.productService.hasSelection(t)),this.selectedProducts.set(this.productService.selectedProduct(t))}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts()),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){let t=this.searchFilter();this.dialog.open(It,{data:{title:"Export Not In Channel",pageNumber:t.PageNumber,rowCount:t.RowCount,filterExport:t,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=k({type:n,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[1,"btn-group"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(i,e){if(i&1&&(m(0,ee,17,14,"mainpanel",0),S(1,"async")),i&2){let l;_((l=P(1,1,e.loader$))?0:-1,l)}},dependencies:[xt,ut,_t,Et,H,Ct,G,z,gt,wt,st,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media(min-width:1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}}return n})();export{je as NotInChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as te,b as ne}from"./chunk-RLLQHRSD.js";import{a as ee}from"./chunk-ZLMUYIKY.js";import"./chunk-QK2JCSM3.js";import{a as $}from"./chunk-
|
|
1
|
+
import{a as te,b as ne}from"./chunk-RLLQHRSD.js";import{a as ee}from"./chunk-ZLMUYIKY.js";import"./chunk-QK2JCSM3.js";import{a as $}from"./chunk-ZSG2EXIR.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-ON5KFKHE.js";import{a as Z}from"./chunk-EYHQ2ZKL.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as Y}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7RKWOSCN.js";import"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as q}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{c as H}from"./chunk-NNVT5X6O.js";import{c as G,h as J,m as K,o as Q,z as X}from"./chunk-7HUEGPJN.js";import{e as U}from"./chunk-ZE4OOGMT.js";import{e as W,g as j}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as V,D as A}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as L,Aa as _,Ic as r,Jc as u,Kc as S,Mc as N,Nc as I,Oc as F,Xb as x,Xc as k,Zb as E,ac as T,bc as P,cc as p,db as y,dc as t,ec as n,ed as v,fc as f,fd as z,gb as o,gd as B,ha as C,mc as R,md as h,oa as D,pa as O,rc as s,tc as w,yb as M}from"./chunk-5VYDZBNH.js";import{a as g,b}from"./chunk-QWWW7GFA.js";var ie=l=>({ID:l});function oe(l,c){if(l&1&&(t(0,"tr")(1,"td"),r(2),n(),t(3,"td"),f(4,"img",23),n(),t(5,"td"),r(6),n(),t(7,"td",24)(8,"a",25),r(9),v(10,"number"),n()(),t(11,"td"),r(12),n(),t(13,"td"),r(14),v(15,"date"),n()()),l&2){let e=c.$implicit;o(2),u(e._source.ChannelName),o(2),p("src",e.logo,y),o(2),u(e._source.DateRange),o(2),p("queryParams",k(12,ie,e._source.ID)),o(),S(" ",z(10,7,e._source.CountOrder)," "),o(3),u(e._source.UserLogin),o(2),S(" ",B(15,9,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function re(l,c){if(l&1){let e=R();t(0,"div",14)(1,"table",16)(2,"thead")(3,"tr",17)(4,"th",18),r(5,"Channel"),n(),t(6,"th",19),r(7,"Type"),n(),t(8,"th",20),r(9,"Download Date Range"),n(),t(10,"th",21),r(11,"Count"),n(),t(12,"th"),r(13,"User Login"),n(),t(14,"th"),r(15,"Created"),n()()(),t(16,"tbody"),T(17,oe,16,14,"tr",null,L),n()(),t(19,"mat-paginator",22),s("page",function(a){D(e);let m=w();return O(m.onPaginationChange(a))}),n()()}if(l&2){let e,i=w();o(17),P(i.downloadOrders()),o(2),p("length",i.paginationTotal())("pageSize",i.paginationPageSize())("pageIndex",((e=i.filter())==null?null:e.PageNumber)==0?0:((e=i.filter())==null?null:e.PageNumber)-1)}}function ae(l,c){l&1&&(t(0,"div",15),f(1,"app-empty-state"),n())}var Me=(()=>{class l{constructor(){this.http=C(U),this.authService=C(q),this.downloadOrdersResponse=_(null),this.downloadOrders=h(()=>{let e=this.downloadOrdersResponse();return e?e.hits.map(i=>(i.logo=H.getChannelLogoByTypeId(i._source.TypeID),i)):[]}),this.filter=_({PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""}),this.paginationTotal=h(()=>this.downloadOrdersResponse()?.total.value??0),this.paginationPageSize=h(()=>{let e=this.paginationTotal();return this.filter().RowCount>e?e:this.filter().RowCount}),this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(e=>{this.filter.set(e.Filter),this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter()).subscribe(e=>{this.downloadOrdersResponse.set(e)})}onPaginationChange(e){this.filter.update(i=>b(g({},i),{PageNumber:e.pageIndex+1})),this.getDownloadOrders()}onFilterChange(e){this.filter.update(i=>g(g({},i),e))}static{this.\u0275fac=function(i){return new(i||l)}}static{this.\u0275cmp=M({type:l,selectors:[["app-download-order-log"]],decls:27,vars:7,consts:[["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/order/log/detail",3,"queryParams"]],template:function(i,a){if(i&1&&(t(0,"mainpanel",0),s("onSubmit",function(){return a.getDownloadOrders()}),t(1,"filters")(2,"div")(3,"label",1),r(4,"Channel"),n(),t(5,"app-channel-options-v2",2),s("ngModelChange",function(d){return a.onFilterChange({ChannelID:d})}),n()(),t(6,"div",3)(7,"label",4),r(8,"From/To"),n(),t(9,"div",5)(10,"datepicker",6),s("dateChange",function(d){return a.onFilterChange({From:d})}),n()(),t(11,"div")(12,"datepicker",7),s("dateChange",function(d){return a.onFilterChange({To:d})}),n()()(),t(13,"div",3)(14,"label",8),r(15,"Page Number"),n(),t(16,"input",9),s("ngModelChange",function(d){return a.onFilterChange({PageNumber:+d})}),n()(),t(17,"div",3)(18,"label",8),r(19,"Page Size"),n(),t(20,"input",10),F("ngModelChange",function(d){return I(a.filter().RowCount,d)||(a.filter().RowCount=d),d}),n()()(),t(21,"content")(22,"div",11)(23,"div",12)(24,"div",13),x(25,re,20,3,"div",14)(26,ae,2,0,"div",15),n()()()()()),i&2){let m;p("hideSearchBox",!0),o(5),p("ngModel",a.filter().ChannelID),o(5),p("date",a.filter().From),o(2),p("date",a.filter().To),o(4),p("ngModel",a.filter().PageNumber),o(4),N("ngModel",a.filter().RowCount),o(5),E(((m=a.downloadOrders())==null?null:m.length)>0?25:26)}},dependencies:[ne,te,Y,X,G,Q,J,K,ee,j,W,Z,$,V,A],encapsulation:2,changeDetection:0})}}return l})();export{Me as DownloadOrderLogComponent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as z,b as q,c as J,d as K,e as Q,f as X}from"./chunk-UASBQJZD.js";import{b as G}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-GAI4CMX3.js";import"./chunk-NCZ46DU6.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as F}from"./chunk-
|
|
1
|
+
import{a as z,b as q,c as J,d as K,e as Q,f as X}from"./chunk-UASBQJZD.js";import{b as G}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-GAI4CMX3.js";import"./chunk-NCZ46DU6.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as F}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as H,h as $,m as W,z as j}from"./chunk-7HUEGPJN.js";import{e as A}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as E,Aa as g,Dc as w,Eb as x,Ec as P,Ic as l,Jc as R,Vc as V,Xb as y,Zb as v,ac as N,bc as T,ca as I,cb as B,cc as m,dc as o,ec as r,fc as h,gb as p,gc as C,ha as b,hc as S,ic as M,mc as _,nc as L,oa as d,pa as u,rc as f,rd as O,sd as U,tc as c,yb as D}from"./chunk-5VYDZBNH.js";import{a as k}from"./chunk-QWWW7GFA.js";var Z=(()=>{class e{constructor(){this.httpService=b(A)}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ne(e,s){if(e&1&&(C(0,"th"),l(1),S()),e&2){let t=s.$implicit;p(),R(t.column)}}function ie(e,s){if(e&1&&(C(0,"td"),M(1,"span",4),S()),e&2){let t=s.$implicit,n=c().$implicit;p(),L("innerHTML",n[t.prop],B)}}function oe(e,s){if(e&1&&(C(0,"tr"),N(1,ie,2,1,"td",null,E),S()),e&2){let t=s.$implicit,n=c();P("background-color",t.Status>200?"#F4D6D5":"#DEE9C9"),p(),T(n.configs())}}var ee=(()=>{class e{constructor(){this.configs=U([]),this.data=U([]),this.status=U(void 0),this.eventClose=O({alias:"onClose"})}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"background-color"],[3,"innerHTML"]],template:function(n,i){n&1&&(C(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),N(4,ne,2,1,"th",null,E),S()(),C(6,"tbody"),N(7,oe,3,2,"tr",3,E),S()()()),n&2&&(p(4),T(i.configs()),p(3),T(i.data()))},encapsulation:2,changeDetection:0})}}return e})();function re(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onNewStepperState(a))}),h(1,"i",18),l(2," New "),r()}}function ae(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t),c();let i=w(11);return u(i.previous())}),l(1," Back "),r()}}function le(e,s){if(e&1){let t=_();o(0,"button",19),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onStepperNext(a))}),l(1," Next "),r()}}function se(e,s){if(e&1){let t=_();o(0,"button",20),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onSubmit(a))}),l(1," Download "),r()}if(e&2){let t=c();m("disabled",!t.urls)}}function pe(e,s){e&1&&(h(0,"i",21),o(1,"span"),l(2,"Instruction"),r())}function ce(e,s){e&1&&(o(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),l(4,"Note"),r()(),o(5,"div",26)(6,"ol",27)(7,"li"),l(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),l(10," Copy Product URL from "),o(11,"a",28),l(12,"https://seller.tokopedia.com/ "),r(),l(13," and paste in this form "),r(),o(14,"li"),l(15," Use New Line when you want to input several product URLs "),r()()()()())}function me(e,s){e&1&&(h(0,"i",29),o(1,"span"),l(2,"Download"),r())}function de(e,s){if(e&1){let t=_();o(0,"div",22)(1,"textarea",30),f("ngModelChange",function(i){d(t);let a=c();return u(a.urls.set(i))}),r()()}if(e&2){let t=c();p(),m("placeholder",t.urlPlaceholder())("ngModel",t.urls())}}function ue(e,s){e&1&&(h(0,"i",31),o(1,"span"),l(2,"Finish"),r())}function _e(e,s){if(e&1&&(o(0,"div",22),h(1,"app-response-api-list",32),r()),e&2){let t=c();p(),m("data",t.downloadResponses())("configs",t.configs)}}function fe(e,s){e&1&&(o(0,"h6"),l(1,"1"),r())}function ge(e,s){e&1&&(o(0,"h6"),l(1,"2"),r())}function he(e,s){e&1&&(o(0,"h6"),l(1,"3"),r())}var Fe=(()=>{class e{constructor(){this.downloadService=b(Z),this.authService=b(F),this.urls=g(null),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=g([]),this.stepperState=g("DOWNLOAD"),this.urlPlaceholder=g(`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
2
|
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`),this.currentDomain=g(this.authService.getDomain())}onStepperChange(t){this.stepperState.set(t.selectedStep.state)}onSubmit(t){let i=(this.urls()??"").split(/\r?\n/).filter(a=>a.trim());this.downloadService.download(i).subscribe(a=>{this.downloadResponses.set(a),this.mappingLinkToProduct(),this.onStepperNext(t)})}mappingLinkToProduct(){let t=this.currentDomain(),n=this.downloadResponses().map(i=>{let a=k({},i);return a.Name=a?.Name?`<a href="${t}/menu/Products/Catalog/Products/Info?ID=${a.ID}" target="_blank">${a?.Name}</a>`:"-",a});this.downloadResponses.set(n)}onNewStepperState(t){this.downloadResponses.set([]),this.urls.set(null),this.stepperState.set("DOWNLOAD"),t.reset(),this.onStepperNext(t)}onStepperNext(t){t.selected.completed=!0,t.next()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["app-by-url"]],features:[V([{provide:z,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[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(n,i){if(n&1){let a=_();o(0,"mainpanel",1)(1,"actions"),y(2,re,3,0,"button",2),y(3,ae,2,0,"button",2),y(4,le,2,0,"button",3),y(5,se,2,1,"button",4),r(),o(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),f("selectionChange",function(te){return d(a),u(i.onStepperChange(te))}),o(12,"mat-step",9),x(13,pe,3,0,"ng-template",10)(14,ce,16,0,"ng-template",11),r(),o(15,"mat-step",12),x(16,me,3,0,"ng-template",10)(17,de,2,2,"ng-template",11),r(),o(18,"mat-step",13),x(19,ue,3,0,"ng-template",10)(20,_e,2,2,"ng-template",11),r(),x(21,fe,2,0,"ng-template",14)(22,ge,2,0,"ng-template",15)(23,he,2,0,"ng-template",16),r()()()()()()}n&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),v(i.stepperState()=="FINISH"?2:-1),p(),v(i.stepperState()=="DOWNLOAD"?3:-1),p(),v(i.stepperState()=="GUIDE"?4:-1),p(),v(i.stepperState()=="DOWNLOAD"?5:-1),p(5),m("selectedIndex",1),p(2),m("editable",i.stepperState()!="FINISH")("completed",!0),p(3),m("editable",i.stepperState()!="FINISH")("completed",!1))},dependencies:[G,X,Q,q,K,j,H,$,W,ee,J],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%}
|
|
3
3
|
`],encapsulation:2,changeDetection:0})}}return e})();export{Fe as ByUrlComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as tt}from"./chunk-HV46UVNS.js";import"./chunk-REDMZUTI.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as nt}from"./chunk-EYHQ2ZKL.js";import{a as et}from"./chunk-
|
|
1
|
+
import{a as tt}from"./chunk-HV46UVNS.js";import"./chunk-REDMZUTI.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as nt}from"./chunk-EYHQ2ZKL.js";import{a as et}from"./chunk-7X3KALOK.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BKR7YPEW.js";import"./chunk-A4TBJ6UZ.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as Z}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{c as X}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as W}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as Q}from"./chunk-ZSUWHVKX.js";import{f as K}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import{b as G,c as J}from"./chunk-MDHMVGYC.js";import{c as M}from"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import{b as H}from"./chunk-ZE4OOGMT.js";import{e as Y}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as q,D as U,z as j}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as $,Aa as I,C as y,Eb as E,Ic as c,Jc as N,Kc as C,W as v,Wc as O,Xb as w,Xc as P,Yb as L,Zb as b,ac as B,bc as A,cc as h,d as D,db as k,dc as i,ec as o,ed as u,fc as p,fd as _,gb as l,gd as z,ha as d,jc as F,kc as V,mc as f,oa as x,pa as g,rc as S,tc as s,yb as T,yd as R}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var ot=()=>["/menu/products/status/sold-in-channel"],it=n=>({ID:n}),at=()=>["/menu/products/status/not-in-pos"],rt=n=>[n];function ct(n,m){if(n&1&&c(0),n&2){let t=s().$implicit;C(" ",t.Count," ")}}function lt(n,m){if(n&1){let t=f();i(0,"span",24),S("click",function(){x(t);let a=s().$implicit,r=s(2);return g(r.getLiveProductCount(a.ID,a))}),p(1,"i",25),o()}}function st(n,m){if(n&1){let t=f();F(0),i(1,"button",26),S("click",function(){x(t);let a=s().$implicit,r=s(2);return g(r.onScanChannel(a))}),p(2,"i",27),c(3," Scan "),o(),V()}}function pt(n,m){if(n&1){let t=f();i(0,"tr")(1,"td",9),p(2,"img",15),i(3,"span",16),c(4),o()(),i(5,"td",17),w(6,ct,1,1)(7,lt,2,0,"span",18),o(),i(8,"td",17)(9,"a",19),c(10),u(11,"number"),o()(),i(12,"td",17)(13,"a",19),c(14),u(15,"number"),o()(),i(16,"td"),c(17),u(18,"date"),o(),i(19,"td")(20,"div",20),E(21,st,4,0,"ng-container",21),i(22,"button",22),S("click",function(){let a=x(t).$implicit,r=s(2);return g(r.onClearCache(a.ID))}),p(23,"i",23),c(24," Clear "),o()()()()}if(n&2){let t=m.$implicit,e=s(2);l(2),h("src",e.getChannelLogo(t.TypeID),k),l(2),N(t.Name),l(2),b(t.Count!==void 0?6:7),l(3),h("routerLink",O(18,ot))("queryParams",P(19,it,t.ID)),l(),C(" ",_(11,11,t.SoldInChannel)," "),l(3),h("routerLink",O(21,at))("queryParams",P(22,it,t.ID)),l(),C(" ",_(15,13,t.NotInPOS)," "),l(3),C(" ",t.LastSync?z(18,15,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),l(4),h("ngxPermissionsOnly",P(24,rt,e.scanProductRole))}}function mt(n,m){if(n&1&&(i(0,"div",4)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th",9),c(5,"Channel"),o(),i(6,"th",10),c(7," Live Product "),o(),i(8,"th",11),c(9," Sold In Channel "),o(),i(10,"th",12),c(11," Product Not in POS "),o(),i(12,"th",13),c(13,"Last Sync"),o(),p(14,"th",14),o()(),i(15,"tbody"),B(16,pt,25,26,"tr",null,$),u(18,"async"),o()()()),n&2){let t,e=s();l(16),A((t=_(18,0,e.channels$))==null?null:t.Data)}}function dt(n,m){n&1&&(i(0,"div",5),p(1,"app-empty-state"),o())}var Et=(()=>{class n{constructor(){this.productService=d(et),this.toastr=d(H),this.dialog=d(X),this.authService=d(K),this.cdr=d(R),this.channelOptions=I([]),this.scanProductRole=Q.ProductScan;let t=this.authService;this.destroy$=new D,this.channelOptions.set(t.getChannels())}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(v(this.destroy$)).subscribe(a=>{e.Count=a.Count})}onScanChannel(t){this.dialog.open(tt,{width:"700px",data:{channelOptions:this.channelOptions(),filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>M.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let a=this.productService.findChannelById(t,this.channelOptions());this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(r=>r)).subscribe(r=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(r,a,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(v(this.destroy$)).subscribe(a=>{this.toastr.success("Successfully cleared cache","Success"),this.channels$=null,this.setObsProductStatistic(),this.cdr.detectChanges()})}getChannelLogo(t){return M.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-channel-statistic"]],decls:8,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"channel-col"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"]],template:function(e,a){if(e&1&&(i(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),w(5,mt,19,2,"div",4),u(6,"async"),L(7,dt,2,0,"div",5),o()()()()()),e&2){let r;h("hideSearchBox",!0)("hideSearchDropdown",!0),l(5),b(((r=_(6,3,a.channels$))==null||r.Data==null?null:r.Data.length)>0?5:7)}},dependencies:[Z,W,Y,J,G,nt,j,U,q],styles:["@media(max-width:991px){.container-fluid[_ngcontent-%COMP%]{padding:0 8px}.row[_ngcontent-%COMP%]{flex-direction:column!important;margin-left:0!important;margin-right:0!important}[class*=col-][_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;flex:0 0 100%!important;margin-bottom:20px}.card[_ngcontent-%COMP%]{margin-bottom:20px;min-width:0}.card-title[_ngcontent-%COMP%]{font-size:1.2rem;margin-left:0!important;margin-top:0!important}.table-responsive[_ngcontent-%COMP%]{overflow-x:auto}table[_ngcontent-%COMP%]{font-size:13px;min-width:500px}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:6px 4px!important;word-break:break-word}.btn-sm[_ngcontent-%COMP%]{font-size:11px!important;padding:4px 8px!important}.mt-5[_ngcontent-%COMP%], .mt-6[_ngcontent-%COMP%], .my-6[_ngcontent-%COMP%], .ms-10[_ngcontent-%COMP%]{margin-top:12px!important;margin-bottom:12px!important;margin-left:0!important}th.channel-col[_ngcontent-%COMP%], td.channel-col[_ngcontent-%COMP%]{width:auto!important;min-width:100px!important;max-width:none!important;white-space:nowrap}}@media(max-width:600px){.container-fluid[_ngcontent-%COMP%]{padding:0 2px}.card-title[_ngcontent-%COMP%]{font-size:1rem}.table[_ngcontent-%COMP%]{font-size:12px}.card-body[_ngcontent-%COMP%]{padding:10px!important}.table-responsive[_ngcontent-%COMP%]{min-width:0}.btn-sm[_ngcontent-%COMP%]{min-width:60px;font-size:11px;padding:3px 6px!important}img[_ngcontent-%COMP%]{max-width:90%;height:auto}th.channel-col[_ngcontent-%COMP%], td.channel-col[_ngcontent-%COMP%]{width:auto!important;min-width:100px!important;max-width:none!important;white-space:nowrap}}"],changeDetection:0})}}return n})();export{Et as ChannelStatisticComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-ZSG2EXIR.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as j}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import{a as I}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as T}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as A,h as V,m as k,z as R}from"./chunk-7HUEGPJN.js";import{e as N}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as L}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as h,Ic as i,Jc as O,Pc as S,Qc as y,Rc as f,Xb as b,Zb as v,cc as s,dc as e,ec as t,ed as P,fc as x,fd as D,gb as l,ha as u,mc as M,oa as m,pa as p,rc as g,tc as E,ua as C,yb as _}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function F(o,B){if(o&1&&(e(0,"pre",21),i(1),P(2,"json"),t()),o&2){E();let n=f(25);l(),O(D(2,1,n))}}function H(o,B){o&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ne=(()=>{class o{constructor(){this.httpService=u(N),this.destroyRef=u(C),this.escrowLogData=h(null),this.selectedChannel=h(null),this.orderNumber=h(null)}initEscrowLog(){this.httpService.post(T.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(I(this.destroyRef)).subscribe(n=>this.escrowLogData.set(n))}copyToClipboard(n){if(!n)return;let d=typeof n=="string"?n:JSON.stringify(n,null,2);navigator.clipboard.writeText(d),alert("Copied to clipboard!")}static{this.\u0275fac=function(d){return new(d||o)}}static{this.\u0275cmp=_({type:o,selectors:[["app-escrow-api"]],decls:39,vars:7,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(d,r){if(d&1){let a=M();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return m(a),p(r.initEscrowLog())}),x(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),g("ngModelChange",function(c){return m(a),p(r.selectedChannel.set(c))}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),g("ngModelChange",function(c){return m(a),p(r.orderNumber.set(c))}),t()()()()(),S(25),e(26,"div",13)(27,"div",14)(28,"div",15)(29,"div",16)(30,"h5"),i(31,"Response"),t(),e(32,"button",17),g("click",function(){m(a);let c=f(25);return p(r.copyToClipboard(c))}),i(33," Copy "),t()(),e(34,"div",18)(35,"div",19)(36,"div",20),b(37,F,3,3,"pre",21)(38,H,2,0,"p",22),t()()()()()()()()()}if(d&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),s("ngModel",r.selectedChannel()),l(8),s("ngModel",r.orderNumber()),l();let a=y(r.escrowLogData());l(7),s("disabled",!a),l(5),v(a?37:38)}},dependencies:[R,A,V,k,j,z,L],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}@media(max-width:767.98px){.container-fluid[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}.row[_ngcontent-%COMP%]{flex-direction:column!important;margin-left:0!important;margin-right:0!important}.col-7[_ngcontent-%COMP%], .col-12[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;padding-left:0!important;padding-right:0!important}.d-flex[_ngcontent-%COMP%]{flex-direction:column!important;align-items:stretch!important;gap:1rem}.w-75[_ngcontent-%COMP%], .w-100[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important}.card[_ngcontent-%COMP%]{margin-top:1rem!important}.card-header[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;gap:.5rem}.btn[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}input.form-control[_ngcontent-%COMP%]{width:100%;min-width:0}pre#escrowLogText[_ngcontent-%COMP%]{font-size:.95rem;word-break:break-all;white-space:pre-wrap}}@media(max-width:400px){.card-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:1rem}pre#escrowLogText[_ngcontent-%COMP%]{font-size:.85rem}}"],changeDetection:0})}}return o})();export{ne as EscrowApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-QNSVLW6H.js";import{a as F}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-QNSVLW6H.js";import{a as F}from"./chunk-7X3KALOK.js";import{f as T}from"./chunk-C5O6VJ2D.js";import{a as w}from"./chunk-63X2BBS4.js";import{b as i,c as m}from"./chunk-NNVT5X6O.js";import{b as j,e as s}from"./chunk-ZE4OOGMT.js";import{d as D}from"./chunk-56N77BXA.js";import{Aa as C,C as I,F as u,ca as c,e as b,ha as a,l as d,r as A,x as U}from"./chunk-5VYDZBNH.js";var x=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({name:e.name,options:e.options}))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var R=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var S=class{};var V=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/ShopifyV2/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var N=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(w.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Mt=(()=>{class r{constructor(){this.authService=a(T),this.productService=a(F),this.shoppeUploadService=a(x),this.tiktokUploadService=a(H),this.lazadaUploadService=a(z),this.tokopediaUploadService=a(V),this.wooUploadService=a(R),this.shopifyUploadService=a(G),this.plugoUploadService=a(N),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(D),this.httpService=a(s),this._selectedProduct=new b(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(I(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return C(t.map(o=>{let p=new g;return p.id=o.ID,p.name=o.Name,p.type=o.TypeID,p.categoryId=null,p.attributes=[],p.selected=!1,p}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.ShopifyV2||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);U(e).pipe(A(o=>{let p=[];return o.filter(h=>m.IsNotEmpty(h)).forEach(h=>{p=[...p,...h]}),p})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],p=[],h=[],v=[],y=[],P=[],k=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:p.push(l);break;case i.Tokopedia:h.push(l);break;case i.WooCommerce:v.push(l);break;case i.Shopify:y.push(l);break;case i.ShopifyV2:P.push(l);break;case i.Plugo:k.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:p},{type:i.Tokopedia,data:h},{type:i.WooCommerce,data:v},{type:i.Shopify,data:y},{type:i.ShopifyV2,data:P},{type:i.Plugo,data:k}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(p));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(h));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(v));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.ShopifyV2:n.push(this.shopifyUploadService.uploadProduct(P));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(k));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let p=new S;p.ChannelID=o.id,p.ChannelType=o.type,p.Products=this._selectedProduct.getValue(),o.type==i.Shopify||o.type==i.ShopifyV2?delete p.CategoryID:p.CategoryID=o.categoryId,p=this.generateAttributeHttpRequest(o,p),e.push(p)}),e}generateAttributeHttpRequest(t,e){return t.type==i.WooCommerce||t.type==i.Shopify||t.type==i.ShopifyV2?e.Attribute=t.attributes[0]:t.type==i.Tiktok?(e.Attributes=this.formatAttributes(t.type,t.attributes),e.listing_platforms=t.listing_platforms):e.Attributes=this.formatAttributes(t.type,t.attributes),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Lazada:o=this.lazadaUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;case i.ShopifyV2:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{x as a,H as b,z as c,R as d,Mt as e};
|