marketplacepos 5.37.2 → 5.37.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/Marketplace/{chunk-ZCGHEDGV.js → chunk-2GZHR5B6.js} +1 -1
  2. package/Marketplace/{chunk-UI3RKKVM.js → chunk-2UTIQYD5.js} +1 -1
  3. package/Marketplace/{chunk-F6Y7LJ64.js → chunk-37E3M43E.js} +1 -1
  4. package/Marketplace/{chunk-XJIHUZS4.js → chunk-4LFDWANC.js} +1 -1
  5. package/Marketplace/{chunk-MV2W43TI.js → chunk-4RQOSK5F.js} +1 -1
  6. package/Marketplace/{chunk-S4D2PHBV.js → chunk-5CFZVTQ4.js} +1 -1
  7. package/Marketplace/{chunk-QP6X3QVC.js → chunk-5H7VJWTS.js} +1 -1
  8. package/Marketplace/{chunk-MNMVQQPT.js → chunk-5JXFTD66.js} +1 -1
  9. package/Marketplace/{chunk-2H7UKR4Z.js → chunk-5Z2DV3KI.js} +1 -1
  10. package/Marketplace/{chunk-C4ESA6DM.js → chunk-6TWOK2UE.js} +1 -1
  11. package/Marketplace/{chunk-KEFQSTJD.js → chunk-6XMCVQHO.js} +1 -1
  12. package/Marketplace/{chunk-TR23CMVW.js → chunk-CP2JRSBP.js} +1 -1
  13. package/Marketplace/{chunk-77ESDFMO.js → chunk-CPWY5NNP.js} +2 -2
  14. package/Marketplace/{chunk-HETMK7WT.js → chunk-DLJM5DIT.js} +1 -1
  15. package/Marketplace/{chunk-BTPFPDPR.js → chunk-F7MJGS4G.js} +1 -1
  16. package/Marketplace/{chunk-4EWARO65.js → chunk-GRIDVGCK.js} +1 -1
  17. package/Marketplace/{chunk-K7LGJFCY.js → chunk-I7QHQH2B.js} +2 -2
  18. package/Marketplace/{chunk-GG2SCXTS.js → chunk-IIUO6LMB.js} +1 -1
  19. package/Marketplace/{chunk-JGKNWNHJ.js → chunk-KDWRJAZ3.js} +1 -1
  20. package/Marketplace/{chunk-CAGSG3DY.js → chunk-M4L72LVB.js} +1 -1
  21. package/Marketplace/{chunk-AVSGKP57.js → chunk-NDI26IPP.js} +1 -1
  22. package/Marketplace/{chunk-3YRPTVAF.js → chunk-NE4TB7EL.js} +1 -1
  23. package/Marketplace/{chunk-KC2FFVLF.js → chunk-NTEU4OOR.js} +1 -1
  24. package/Marketplace/{chunk-KSJLJ53O.js → chunk-PCRUNEHK.js} +1 -1
  25. package/Marketplace/{chunk-CIKNTHCR.js → chunk-PRTTKQS3.js} +1 -1
  26. package/Marketplace/{chunk-ZHKZ3QZP.js → chunk-Q7GZOMHZ.js} +1 -1
  27. package/Marketplace/{chunk-S45YFO7W.js → chunk-QPNKMUHW.js} +1 -1
  28. package/Marketplace/{chunk-JJFRUJBP.js → chunk-RRUJDNMA.js} +1 -1
  29. package/Marketplace/{chunk-D7G7GVNH.js → chunk-TAOZITLN.js} +1 -1
  30. package/Marketplace/{chunk-R4FFSLZS.js → chunk-TRGSTYXO.js} +1 -1
  31. package/Marketplace/{chunk-64V4L3IJ.js → chunk-UKPQ245L.js} +1 -1
  32. package/Marketplace/{chunk-TNQMLUO7.js → chunk-XRKIKLQG.js} +1 -1
  33. package/Marketplace/index.html +2 -2
  34. package/Marketplace/{main-TSXSJ6BP.js → main-WT7IQ6WY.js} +1 -1
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- import{a as Le}from"./chunk-7M4RYU7S.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Re,b as $e,c as Ue,d as Q}from"./chunk-EQD3IUMF.js";import{a as Ce}from"./chunk-BVIRHZTZ.js";import{a as Be}from"./chunk-PF4F4EAR.js";import{a as De}from"./chunk-7KG3DC5J.js";import{b as ke}from"./chunk-OBN6RKRH.js";import"./chunk-5Z63CRGG.js";import"./chunk-RNWWVG3M.js";import"./chunk-UOAYF4SW.js";import{a as Ve}from"./chunk-EXFL3GUX.js";import"./chunk-BSATGCWC.js";import"./chunk-6A4PYMCJ.js";import"./chunk-3RK6DDJD.js";import{a as Ee,b as Te,c as Oe}from"./chunk-K5CKXDIJ.js";import"./chunk-SD7UKXTX.js";import"./chunk-TY4H2W6F.js";import{a as Ne}from"./chunk-VYKDVKG3.js";import"./chunk-SDUUFQUI.js";import"./chunk-HPS3WVU5.js";import"./chunk-R5IDWUP6.js";import"./chunk-4RAOUTR2.js";import{a as Se,b as ve,d as ye,e as Ie}from"./chunk-TTAS23MO.js";import"./chunk-HA5WIDED.js";import"./chunk-AFMNWVBL.js";import"./chunk-EQ2ZKEVE.js";import{j as z}from"./chunk-CIKNTHCR.js";import{b as fe,e as xe}from"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-ORPJLSXE.js";import{d as we,l as Me,m as Fe}from"./chunk-XOT2SZPE.js";import{r as G,s as K}from"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{a as ge,b as he,h as V,m as N,y as k}from"./chunk-AI4XRCAL.js";import{c as j,e as Pe,f as be}from"./chunk-W6T7TOHE.js";import{d as pe,f as W,g as de,j as _e,m as ue,n as D}from"./chunk-B6POIFQM.js";import{Dc as q,Eb as T,Ec as p,Fc as ce,G as J,Gc as f,Ic as w,Jc as M,Ka as oe,Kb as _,Kc as F,Mc as A,Na as Z,Oc as O,Pc as se,Qa as ae,Wb as s,Xc as v,Yc as E,Z as X,Zb as re,Zc as me,_c as Y,bc as U,cc as B,ea as ie,ec as L,fc as R,gc as o,hc as a,ic as x,jc as y,kc as I,mc as P,ob as b,pa as $,qb as r,rc as g,sc as m,v as ne,vc as le,wb as S,ya as h,za as C}from"./chunk-EIQCOZF5.js";import{a as ee,b as te}from"./chunk-K2H6WANG.js";var Xe=(n,c)=>({color:n,"font-weight":c});function Ze(n,c){if(n&1&&(o(0,"mat-radio-button",2),p(1),a()),n&2){let e=c.$implicit,i=c.index,t=m();re(se(7,Xe,t.model==e.Key&&t.activeBold?"#0976b4":"",t.model==e.Key&&t.activeBold?"700":"")),s("disabled",t.exception==e.Value)("matTooltip",t.title.length>0?t.title[i]:"")("value",e.Key)("name",t.name),r(),f("",e.Value," ")}}var je=(()=>{class n{constructor(){this.disabled=!1,this.modelChange=new oe,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(e){this.modelChange.emit(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(i,t){i&1&&(o(0,"mat-radio-group",0),g("ngModelChange",function(d){return t.change(d)}),_(1,Ze,2,10,"mat-radio-button",1),a()),i&2&&(s("disabled",t.disabled)("ngModel",t.model),r(),s("ngForOf",t.options))},dependencies:[D,W,Oe,Ee,Te,k,V,N,K,G],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px}html[_ngcontent-%COMP%]{--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]})}}return n})();function qe(n,c){if(n&1&&(o(0,"span",3),x(1,"img",4),a(),o(2,"span"),p(3),a()),n&2){let e=c.item;r(),s("src",e==null?null:e.Img,b),r(2),f(" ",e.Name," ")}}function Ye(n,c){if(n&1){let e=P();o(0,"span",6),g("click",function(){h(e);let t=m(),l=t.item,d=t.clear;return C(d(l))}),p(1,"x"),a()}}function Qe(n,c){if(n&1&&(o(0,"span",3),x(1,"img",4),a(),o(2,"span"),p(3),a(),_(4,Ye,2,0,"span",5)),n&2){let e=c.item,i=m();r(),s("src",e==null?null:e.Img,b),r(2),f(" ",e.Name," "),r(),U(i.clearable()?4:-1)}}var ze=(()=>{class n{constructor(){this.authService=$(z),this.multiple=Z(!1),this.clearable=Z(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[A([{provide:ge,multi:!0,useExisting:n}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,t){i&1&&(o(0,"ng-select",0),F("ngModelChange",function(d){return M(t.selectedChannels,d)||(t.selectedChannels=d),d}),g("ngModelChange",function(d){return t.onChannelChange(d)}),_(1,qe,4,2,"ng-template",1)(2,Qe,5,3,"ng-template",2),a()),i&2&&(s("clearable",t.clearable())("items",t.options),w("ngModel",t.selectedChannels),s("multiple",t.multiple()))},dependencies:[D,Ie,ye,Se,ve,k,V,N],encapsulation:2})}}return n})();var Ge=n=>[n],et=n=>({"text-decoration-line-through":n}),tt=n=>({"border-bottom":n}),nt=n=>({"bg-gradient-warning":n});function it(n,c){if(n&1){let e=P();y(0),o(1,"div")(2,"label",21),p(3,"Channel"),a(),o(4,"channel-select-options",22),F("ngModelChange",function(t){h(e);let l=m();return M(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),C(t)}),a()(),o(5,"div",23)(6,"label",24),p(7,"Filter by"),a(),o(8,"lib-radio-options",25),F("modelChange",function(t){h(e);let l=m();return M(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),C(t)}),a()(),I()}if(n&2){let e=m();r(4),s("multiple",!0),w("ngModel",e.searchFilter.ListChannelID),r(4),w("model",e.searchFilter.filterModel),s("options",e.filterTypeOptions)}}function ot(n,c){if(n&1){let e=P();o(0,"button",27),g("click",function(){h(e);let t=m().ngIf,l=m();return C(l.onUpdateItems(t))}),x(1,"i",28),p(2," Update "),a()}}function at(n,c){if(n&1&&(y(0),o(1,"div",4),_(2,ot,3,0,"button",26),a(),I()),n&2){let e=c.ngIf,i=m();r(2),s("ngIf",i.productService.hasSelectionVariant(e))}}function rt(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),x(2,"img",30),o(3,"div",31),p(4),v(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,b),r(2),f(" ",me(5,3,e.Name,20)," ")}}function lt(n,c){if(n&1){let e=P();o(0,"th")(1,"input",32),F("ngModelChange",function(t){h(e);let l=m();return M(l.checkboxState,t)||(l.checkboxState=t),C(t)}),g("ngModelChange",function(){h(e);let t=m();return C(t.onSelectAllData())}),a()()}if(n&2){let e=m();r(),w("ngModel",e.checkboxState)}}function ct(n,c){n&1&&(o(0,"th",33)(1,"span"),p(2,"Expected"),a(),o(3,"span",34),p(4,"(POS)"),a()(),o(5,"th",33),p(6,"Channel"),a())}function st(n,c){if(n&1){let e=P();o(0,"img",47),g("click",function(t){h(e);let l=m(3).$implicit,d=m(2);return C(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=m(3).$implicit;le("src",e==null?null:e.ImageUrl,b)}}function mt(n,c){n&1&&x(0,"img",48)}function pt(n,c){if(n&1&&(o(0,"small",46),p(1),a()),n&2){let e=m(3).$implicit;r(),f("(",e==null?null:e.Category,")")}}function dt(n,c){if(n&1&&(y(0),o(1,"td",42),_(2,st,1,1,"img",43)(3,mt,1,0,"ng-template",null,0,Y),a(),o(5,"td",44)(6,"h5",45),p(7),a(),_(8,pt,2,1,"small",46),a(),I()),n&2){let e=q(4),i=m().$index,t=m().$implicit,l=m().ngIf;r(),s("rowSpan",t==null?null:t.Variants.length)("ngClass",O(7,tt,i+1==l.length)),r(),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),s("rowSpan",t==null?null:t.Variants.length),r(2),ce(t==null?null:t.Name),r(),U(t!=null&&t.Category?8:-1)}}function _t(n,c){if(n&1){let e=P();o(0,"td",49)(1,"input",32),F("ngModelChange",function(t){h(e);let l=m().$implicit;return M(l.selected,t)||(l.selected=t),C(t)}),a()()}if(n&2){let e=m().$implicit;r(),w("ngModel",e.selected)}}function ut(n,c){if(n&1){let e=P();y(0),o(1,"td",51),p(2),v(3,"number"),a(),o(4,"td",52),g("click",function(){let t=h(e).$implicit,l=m(2).$implicit,d=m().$implicit,u=m(2);return C(u.openTableDialog(l,d,t))}),o(5,"div",53)(6,"div",54),p(7),v(8,"number"),a(),o(9,"a",55),g("click",function(t){return h(e),C(t==null?null:t.stopPropagation())}),x(10,"i",40),a()()(),I()}if(n&2){let e=c.$implicit;r(2),f(" ",E(3,4,e.PriceExpected)," "),r(2),s("ngClass",O(8,nt,e.Price!=e.PriceExpected)),r(3),f(" ",E(8,6,e.Price)," "),r(2),s("href",e.Url,b)}}function gt(n,c){n&1&&(o(0,"td",56),p(1," X "),a(),o(2,"td",56),p(3," X "),a())}function ht(n,c){if(n&1&&(y(0),_(1,ut,11,10,"ng-container",50)(2,gt,4,0,"ng-template",null,1,Y),I()),n&2){let e=c.$implicit,i=q(3),t=m().$implicit,l=m(3);r(),s("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function Ct(n,c){if(n&1&&(o(0,"tr"),_(1,dt,9,9,"ng-container",3),o(2,"td",35),p(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),p(7),a(),o(8,"div",31)(9,"a",39),x(10,"i",40),a()()()(),_(11,_t,2,1,"ng-template",19)(12,ht,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=m(3);r(),s("ngIf",i==0),r(2),f(" ",e==null?null:e.Model," "),r(),s("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),s("ngClass",O(8,et,e.Discontinued)),r(),f(" ",e==null?null:e.Code," "),r(2),s("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),b),r(2),s("ngxPermissionsOnly",O(10,Ge,t.rolePriceEdit)),r(),s("ngForOf",t.channels())}}function ft(n,c){if(n&1&&(o(0,"tbody"),L(1,Ct,13,12,"tr",null,B),a()),n&2){let e=c.$implicit;r(),R(e.Variants)}}function xt(n,c){if(n&1&&(y(0),L(1,ft,3,0,"tbody",null,B),I()),n&2){let e=c.ngIf;r(),R(e)}}var gn=(()=>{class n{constructor(e,i,t,l,d,u,Ke){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=u,this.paginationService=Ke,this.infinitePagination=$(Q),this.searchFilter=new De,this.checkboxState=!1,this.rolePriceEdit=Ce.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=ae([]),this.filterTypeOptions=[{Key:H.ALL,Value:"All"},{Key:H.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];j.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(X(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(ie(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=H.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),X(1))}onSelectAllData(){this.data$=this.data$.pipe(ne(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=te(ee({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(u=>u.ID),d={ListChannelID:this.channelOptions.filter(u=>u.selected).map(u=>u.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:u=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:u=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(Le,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(J(t=>j.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t){let l=JSON.parse(JSON.stringify(e));this.dialog.open(Re,{data:{Name:i.Name,Variant:l,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(J(u=>j.IsNotEmpty(u))).subscribe(u=>{this.updateProductPrice(u,t)})}updateProductPrice(e,i){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(ke,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(S(xe),S(fe),S(we),S(Ve),S(z),S(Ne),S(Be))}}static{this.\u0275cmp=T({type:n,selectors:[["app-custom-channel-price"]],features:[A([Q])],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){i&1&&(o(0,"mainpanel",2),g("onSubmit",function(d){return t.onFilter(d)}),o(1,"filters"),_(2,it,9,4,"ng-container",3),v(3,"async"),a(),o(4,"actions")(5,"div",4),_(6,at,3,1,"ng-container",3),v(7,"async"),o(8,"button",5),g("click",function(){return t.openExportDialog()}),x(9,"i",6),o(10,"span"),p(11,"Export"),a()()()(),o(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),x(20,"th",14),L(21,rt,6,6,"th",15,B),a(),o(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),a()(),o(27,"th",17),p(28,"Variant"),a(),o(29,"th",18),p(30,"SKU"),a(),_(31,lt,2,1,"ng-template",19),L(32,ct,7,0,null,null,B),a()(),_(34,xt,3,0,"ng-container",3),v(35,"async"),a(),o(36,"infinite-paginator",20),v(37,"async"),g("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),a()()()()()()()),i&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),s("ngIf",E(3,13,t.loader$)),r(4),s("ngIf",E(7,15,t.data$)),r(15),R(t.channels()),r(10),s("ngxPermissionsOnly",O(21,Ge,t.rolePriceEdit)),r(),R(t.channels()),r(2),s("ngIf",E(35,17,t.data$)),r(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",E(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[D,pe,W,de,_e,ue,Fe,Me,k,he,V,N,Ue,je,K,G,$e,be,Pe,ze],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{gn as CustomChannelPriceComponent};
1
+ import{a as Le}from"./chunk-7M4RYU7S.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Re,b as $e,c as Ue,d as Q}from"./chunk-EQD3IUMF.js";import{a as Ce}from"./chunk-BVIRHZTZ.js";import{a as Be}from"./chunk-PF4F4EAR.js";import{a as De}from"./chunk-7KG3DC5J.js";import{b as ke}from"./chunk-OBN6RKRH.js";import"./chunk-5Z63CRGG.js";import"./chunk-RNWWVG3M.js";import"./chunk-UOAYF4SW.js";import{a as Ve}from"./chunk-EXFL3GUX.js";import"./chunk-BSATGCWC.js";import"./chunk-6A4PYMCJ.js";import"./chunk-3RK6DDJD.js";import{a as Ee,b as Te,c as Oe}from"./chunk-K5CKXDIJ.js";import"./chunk-SD7UKXTX.js";import"./chunk-TY4H2W6F.js";import{a as Ne}from"./chunk-VYKDVKG3.js";import"./chunk-SDUUFQUI.js";import"./chunk-HPS3WVU5.js";import"./chunk-R5IDWUP6.js";import"./chunk-4RAOUTR2.js";import{a as Se,b as ve,d as ye,e as Ie}from"./chunk-TTAS23MO.js";import"./chunk-HA5WIDED.js";import"./chunk-AFMNWVBL.js";import"./chunk-EQ2ZKEVE.js";import{j as z}from"./chunk-PRTTKQS3.js";import{b as fe,e as xe}from"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-ORPJLSXE.js";import{d as we,l as Me,m as Fe}from"./chunk-XOT2SZPE.js";import{r as G,s as K}from"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{a as ge,b as he,h as V,m as N,y as k}from"./chunk-AI4XRCAL.js";import{c as j,e as Pe,f as be}from"./chunk-W6T7TOHE.js";import{d as pe,f as W,g as de,j as _e,m as ue,n as D}from"./chunk-B6POIFQM.js";import{Dc as q,Eb as T,Ec as p,Fc as ce,G as J,Gc as f,Ic as w,Jc as M,Ka as oe,Kb as _,Kc as F,Mc as A,Na as Z,Oc as O,Pc as se,Qa as ae,Wb as s,Xc as v,Yc as E,Z as X,Zb as re,Zc as me,_c as Y,bc as U,cc as B,ea as ie,ec as L,fc as R,gc as o,hc as a,ic as x,jc as y,kc as I,mc as P,ob as b,pa as $,qb as r,rc as g,sc as m,v as ne,vc as le,wb as S,ya as h,za as C}from"./chunk-EIQCOZF5.js";import{a as ee,b as te}from"./chunk-K2H6WANG.js";var Xe=(n,c)=>({color:n,"font-weight":c});function Ze(n,c){if(n&1&&(o(0,"mat-radio-button",2),p(1),a()),n&2){let e=c.$implicit,i=c.index,t=m();re(se(7,Xe,t.model==e.Key&&t.activeBold?"#0976b4":"",t.model==e.Key&&t.activeBold?"700":"")),s("disabled",t.exception==e.Value)("matTooltip",t.title.length>0?t.title[i]:"")("value",e.Key)("name",t.name),r(),f("",e.Value," ")}}var je=(()=>{class n{constructor(){this.disabled=!1,this.modelChange=new oe,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(e){this.modelChange.emit(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(i,t){i&1&&(o(0,"mat-radio-group",0),g("ngModelChange",function(d){return t.change(d)}),_(1,Ze,2,10,"mat-radio-button",1),a()),i&2&&(s("disabled",t.disabled)("ngModel",t.model),r(),s("ngForOf",t.options))},dependencies:[D,W,Oe,Ee,Te,k,V,N,K,G],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px}html[_ngcontent-%COMP%]{--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]})}}return n})();function qe(n,c){if(n&1&&(o(0,"span",3),x(1,"img",4),a(),o(2,"span"),p(3),a()),n&2){let e=c.item;r(),s("src",e==null?null:e.Img,b),r(2),f(" ",e.Name," ")}}function Ye(n,c){if(n&1){let e=P();o(0,"span",6),g("click",function(){h(e);let t=m(),l=t.item,d=t.clear;return C(d(l))}),p(1,"x"),a()}}function Qe(n,c){if(n&1&&(o(0,"span",3),x(1,"img",4),a(),o(2,"span"),p(3),a(),_(4,Ye,2,0,"span",5)),n&2){let e=c.item,i=m();r(),s("src",e==null?null:e.Img,b),r(2),f(" ",e.Name," "),r(),U(i.clearable()?4:-1)}}var ze=(()=>{class n{constructor(){this.authService=$(z),this.multiple=Z(!1),this.clearable=Z(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[A([{provide:ge,multi:!0,useExisting:n}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,t){i&1&&(o(0,"ng-select",0),F("ngModelChange",function(d){return M(t.selectedChannels,d)||(t.selectedChannels=d),d}),g("ngModelChange",function(d){return t.onChannelChange(d)}),_(1,qe,4,2,"ng-template",1)(2,Qe,5,3,"ng-template",2),a()),i&2&&(s("clearable",t.clearable())("items",t.options),w("ngModel",t.selectedChannels),s("multiple",t.multiple()))},dependencies:[D,Ie,ye,Se,ve,k,V,N],encapsulation:2})}}return n})();var Ge=n=>[n],et=n=>({"text-decoration-line-through":n}),tt=n=>({"border-bottom":n}),nt=n=>({"bg-gradient-warning":n});function it(n,c){if(n&1){let e=P();y(0),o(1,"div")(2,"label",21),p(3,"Channel"),a(),o(4,"channel-select-options",22),F("ngModelChange",function(t){h(e);let l=m();return M(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),C(t)}),a()(),o(5,"div",23)(6,"label",24),p(7,"Filter by"),a(),o(8,"lib-radio-options",25),F("modelChange",function(t){h(e);let l=m();return M(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),C(t)}),a()(),I()}if(n&2){let e=m();r(4),s("multiple",!0),w("ngModel",e.searchFilter.ListChannelID),r(4),w("model",e.searchFilter.filterModel),s("options",e.filterTypeOptions)}}function ot(n,c){if(n&1){let e=P();o(0,"button",27),g("click",function(){h(e);let t=m().ngIf,l=m();return C(l.onUpdateItems(t))}),x(1,"i",28),p(2," Update "),a()}}function at(n,c){if(n&1&&(y(0),o(1,"div",4),_(2,ot,3,0,"button",26),a(),I()),n&2){let e=c.ngIf,i=m();r(2),s("ngIf",i.productService.hasSelectionVariant(e))}}function rt(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),x(2,"img",30),o(3,"div",31),p(4),v(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,b),r(2),f(" ",me(5,3,e.Name,20)," ")}}function lt(n,c){if(n&1){let e=P();o(0,"th")(1,"input",32),F("ngModelChange",function(t){h(e);let l=m();return M(l.checkboxState,t)||(l.checkboxState=t),C(t)}),g("ngModelChange",function(){h(e);let t=m();return C(t.onSelectAllData())}),a()()}if(n&2){let e=m();r(),w("ngModel",e.checkboxState)}}function ct(n,c){n&1&&(o(0,"th",33)(1,"span"),p(2,"Expected"),a(),o(3,"span",34),p(4,"(POS)"),a()(),o(5,"th",33),p(6,"Channel"),a())}function st(n,c){if(n&1){let e=P();o(0,"img",47),g("click",function(t){h(e);let l=m(3).$implicit,d=m(2);return C(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=m(3).$implicit;le("src",e==null?null:e.ImageUrl,b)}}function mt(n,c){n&1&&x(0,"img",48)}function pt(n,c){if(n&1&&(o(0,"small",46),p(1),a()),n&2){let e=m(3).$implicit;r(),f("(",e==null?null:e.Category,")")}}function dt(n,c){if(n&1&&(y(0),o(1,"td",42),_(2,st,1,1,"img",43)(3,mt,1,0,"ng-template",null,0,Y),a(),o(5,"td",44)(6,"h5",45),p(7),a(),_(8,pt,2,1,"small",46),a(),I()),n&2){let e=q(4),i=m().$index,t=m().$implicit,l=m().ngIf;r(),s("rowSpan",t==null?null:t.Variants.length)("ngClass",O(7,tt,i+1==l.length)),r(),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),s("rowSpan",t==null?null:t.Variants.length),r(2),ce(t==null?null:t.Name),r(),U(t!=null&&t.Category?8:-1)}}function _t(n,c){if(n&1){let e=P();o(0,"td",49)(1,"input",32),F("ngModelChange",function(t){h(e);let l=m().$implicit;return M(l.selected,t)||(l.selected=t),C(t)}),a()()}if(n&2){let e=m().$implicit;r(),w("ngModel",e.selected)}}function ut(n,c){if(n&1){let e=P();y(0),o(1,"td",51),p(2),v(3,"number"),a(),o(4,"td",52),g("click",function(){let t=h(e).$implicit,l=m(2).$implicit,d=m().$implicit,u=m(2);return C(u.openTableDialog(l,d,t))}),o(5,"div",53)(6,"div",54),p(7),v(8,"number"),a(),o(9,"a",55),g("click",function(t){return h(e),C(t==null?null:t.stopPropagation())}),x(10,"i",40),a()()(),I()}if(n&2){let e=c.$implicit;r(2),f(" ",E(3,4,e.PriceExpected)," "),r(2),s("ngClass",O(8,nt,e.Price!=e.PriceExpected)),r(3),f(" ",E(8,6,e.Price)," "),r(2),s("href",e.Url,b)}}function gt(n,c){n&1&&(o(0,"td",56),p(1," X "),a(),o(2,"td",56),p(3," X "),a())}function ht(n,c){if(n&1&&(y(0),_(1,ut,11,10,"ng-container",50)(2,gt,4,0,"ng-template",null,1,Y),I()),n&2){let e=c.$implicit,i=q(3),t=m().$implicit,l=m(3);r(),s("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function Ct(n,c){if(n&1&&(o(0,"tr"),_(1,dt,9,9,"ng-container",3),o(2,"td",35),p(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),p(7),a(),o(8,"div",31)(9,"a",39),x(10,"i",40),a()()()(),_(11,_t,2,1,"ng-template",19)(12,ht,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=m(3);r(),s("ngIf",i==0),r(2),f(" ",e==null?null:e.Model," "),r(),s("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),s("ngClass",O(8,et,e.Discontinued)),r(),f(" ",e==null?null:e.Code," "),r(2),s("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),b),r(2),s("ngxPermissionsOnly",O(10,Ge,t.rolePriceEdit)),r(),s("ngForOf",t.channels())}}function ft(n,c){if(n&1&&(o(0,"tbody"),L(1,Ct,13,12,"tr",null,B),a()),n&2){let e=c.$implicit;r(),R(e.Variants)}}function xt(n,c){if(n&1&&(y(0),L(1,ft,3,0,"tbody",null,B),I()),n&2){let e=c.ngIf;r(),R(e)}}var gn=(()=>{class n{constructor(e,i,t,l,d,u,Ke){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=u,this.paginationService=Ke,this.infinitePagination=$(Q),this.searchFilter=new De,this.checkboxState=!1,this.rolePriceEdit=Ce.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=ae([]),this.filterTypeOptions=[{Key:H.ALL,Value:"All"},{Key:H.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];j.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(X(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(ie(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=H.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),X(1))}onSelectAllData(){this.data$=this.data$.pipe(ne(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=te(ee({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(u=>u.ID),d={ListChannelID:this.channelOptions.filter(u=>u.selected).map(u=>u.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:u=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:u=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(Le,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(J(t=>j.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t){let l=JSON.parse(JSON.stringify(e));this.dialog.open(Re,{data:{Name:i.Name,Variant:l,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(J(u=>j.IsNotEmpty(u))).subscribe(u=>{this.updateProductPrice(u,t)})}updateProductPrice(e,i){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(ke,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(S(xe),S(fe),S(we),S(Ve),S(z),S(Ne),S(Be))}}static{this.\u0275cmp=T({type:n,selectors:[["app-custom-channel-price"]],features:[A([Q])],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){i&1&&(o(0,"mainpanel",2),g("onSubmit",function(d){return t.onFilter(d)}),o(1,"filters"),_(2,it,9,4,"ng-container",3),v(3,"async"),a(),o(4,"actions")(5,"div",4),_(6,at,3,1,"ng-container",3),v(7,"async"),o(8,"button",5),g("click",function(){return t.openExportDialog()}),x(9,"i",6),o(10,"span"),p(11,"Export"),a()()()(),o(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),x(20,"th",14),L(21,rt,6,6,"th",15,B),a(),o(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),a()(),o(27,"th",17),p(28,"Variant"),a(),o(29,"th",18),p(30,"SKU"),a(),_(31,lt,2,1,"ng-template",19),L(32,ct,7,0,null,null,B),a()(),_(34,xt,3,0,"ng-container",3),v(35,"async"),a(),o(36,"infinite-paginator",20),v(37,"async"),g("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),a()()()()()()()),i&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),s("ngIf",E(3,13,t.loader$)),r(4),s("ngIf",E(7,15,t.data$)),r(15),R(t.channels()),r(10),s("ngxPermissionsOnly",O(21,Ge,t.rolePriceEdit)),r(),R(t.channels()),r(2),s("ngIf",E(35,17,t.data$)),r(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",E(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[D,pe,W,de,_e,ue,Fe,Me,k,he,V,N,Ue,je,K,G,$e,be,Pe,ze],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{gn as CustomChannelPriceComponent};
@@ -1 +1 @@
1
- import{b as c}from"./chunk-ARIW575T.js";import{a as l}from"./chunk-MV2W43TI.js";import"./chunk-CIKNTHCR.js";import"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{m as u}from"./chunk-XOT2SZPE.js";import"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{y as s}from"./chunk-AI4XRCAL.js";import"./chunk-W6T7TOHE.js";import{F as a,J as n,n as i}from"./chunk-B6POIFQM.js";import{Eb as p,Fb as r,ic as d,ka as e}from"./chunk-EIQCOZF5.js";import"./chunk-K2H6WANG.js";var M=(()=>{class t{constructor(){}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=p({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(o,C){o&1&&d(0,"router-outlet")},dependencies:[a],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]})}}return t})();var R=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-KEFQSTJD.js").then(t=>t.OrderModule),canActivate:[l]}]}],h=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,n.forChild(R)]})}}return t})();var S=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,c,h,s,u,n]})}}return t})();export{S as ReportModule};
1
+ import{b as c}from"./chunk-ARIW575T.js";import{a as l}from"./chunk-4RQOSK5F.js";import"./chunk-PRTTKQS3.js";import"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{m as u}from"./chunk-XOT2SZPE.js";import"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{y as s}from"./chunk-AI4XRCAL.js";import"./chunk-W6T7TOHE.js";import{F as a,J as n,n as i}from"./chunk-B6POIFQM.js";import{Eb as p,Fb as r,ic as d,ka as e}from"./chunk-EIQCOZF5.js";import"./chunk-K2H6WANG.js";var M=(()=>{class t{constructor(){}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=p({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(o,C){o&1&&d(0,"router-outlet")},dependencies:[a],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]})}}return t})();var R=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-6XMCVQHO.js").then(t=>t.OrderModule),canActivate:[l]}]}],h=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,n.forChild(R)]})}}return t})();var S=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,c,h,s,u,n]})}}return t})();export{S as ReportModule};
@@ -1,4 +1,4 @@
1
- import{a as Ke,b as G,c as He}from"./chunk-WHFC7TE4.js";import"./chunk-WBVTRQFG.js";import{a as $e,b as ze,c as Ye,e as Ge,f as Ue,g as je}from"./chunk-VAPIXIJ3.js";import"./chunk-3NMGN7IE.js";import"./chunk-B5JAZPVU.js";import"./chunk-OS53H77X.js";import{i as We,j as Re,k as Le,l as Be,m as Ae}from"./chunk-VOISFPEM.js";import{a as Ne}from"./chunk-EXFL3GUX.js";import"./chunk-6A4PYMCJ.js";import{a as Fe,b as Oe,c as ke}from"./chunk-K5CKXDIJ.js";import"./chunk-SD7UKXTX.js";import"./chunk-VKJAFLQ6.js";import"./chunk-SDUUFQUI.js";import"./chunk-HPS3WVU5.js";import"./chunk-4RAOUTR2.js";import{c as Te,d as be,e as Ee}from"./chunk-TTAS23MO.js";import"./chunk-HA5WIDED.js";import"./chunk-AFMNWVBL.js";import"./chunk-EQ2ZKEVE.js";import{h as Z,j as ee}from"./chunk-CIKNTHCR.js";import{b as xe,e as De}from"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-ORPJLSXE.js";import{l as Me,m as Ve}from"./chunk-XOT2SZPE.js";import{r as Pe,s as Ie}from"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{c as Se,h as Ce,m as ve,y as ye}from"./chunk-AI4XRCAL.js";import{b as X,c as x}from"./chunk-W6T7TOHE.js";import{H as we,J as ge,d as R,f as L,g as B,j as J,k as q,n as F}from"./chunk-B6POIFQM.js";import{Ac as ue,Dc as T,Eb as M,Ec as l,Fc as V,Gc as C,Ic as E,Jc as P,Ka as j,Kb as w,Kc as I,Mc as K,Na as O,Oc as he,Pc as fe,Qa as _,Wb as d,Xc as W,Yc as Y,Z as $,Zc as _e,_c as H,aa as oe,bc as b,ea as z,gc as a,hc as r,ic as S,ja as le,jc as k,kc as N,m as ae,mc as y,ob as pe,od as Q,pa as v,qb as o,rc as g,sc as u,v as U,vc as se,wc as de,ya as m,yc as me,za as c,zc as ce}from"./chunk-EIQCOZF5.js";import{a as ne,b as re}from"./chunk-K2H6WANG.js";var Xe=t=>({"over-due":t});function Ze(t,s){if(t&1&&(a(0,"tr",8)(1,"td"),l(2),r(),a(3,"td"),l(4),r(),a(5,"td"),l(6),r(),a(7,"td"),l(8),r()()),t&2){let e=s.$implicit,n=s.index;d("ngClass",he(5,Xe,e.Exception)),o(2),V(n+1),o(2),V(e.Number),o(2),V(e.Status),o(2),V(e.Exception)}}function et(t,s){if(t&1&&(k(0),w(1,Ze,9,7,"tr",7),N()),t&2){let e,n=u();o(),d("ngForOf",(e=n.downloadResult())==null?null:e.Body)}}function tt(t,s){t&1&&(a(0,"tr",9)(1,"td",10)(2,"div",11),S(3,"i",12),r(),a(4,"h4",13),l(5," There is no order to processed "),r()()())}var Qe=(()=>{class t{constructor(){this.downloadResult=O()}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(a(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),S(5,"th",5),a(6,"th"),l(7,"Order Number"),r(),a(8,"th"),l(9,"Status"),r(),a(10,"th"),l(11,"Exception"),r()()(),a(12,"tbody"),w(13,et,2,1,"ng-container",6)(14,tt,6,0,"ng-template",null,0,H),r()()()()),n&2){let p,h=T(15);o(13),d("ngIf",((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0)("ngIfElse",h)}},dependencies:[F,R,L,B],encapsulation:2})}}return t})();var A=(()=>{class t{constructor(){this.httpService=v(De),this.toastr=v(xe),this.datePipe=v(q)}gerChannelDetailById(e){return this.httpService.post(Z.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(Z.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(Z.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(z(n=>{n.Data?.length===0&&this.toastrEmptyPreview(e)})):ae}toastrEmptyPreview(e){let n=this.datePipe.transform(e.From,"dd MMM yyyy"),i=this.datePipe.transform(e.To,"dd MMM yyyy"),p=e.TimeFrom?e.TimeFrom:"",h=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${h}!`,"No Orders!")}validateDatePreview(e){let n=!0;return e.downloadType==!0?x.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(e,n){let i=x.formatTitleFromDate(new Date(e),new Date(n)),p=this.datePipe.transform(e,i),h=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${h}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac})}}return t})();function it(t,s){if(t&1&&(a(0,"ng-option",13),S(1,"img",14),l(2),r()),t&2){let e=s.$implicit;d("value",e.ID),o(),d("src",e==null?null:e.Img,pe),o(),C("",e.Name," ")}}function nt(t,s){if(t&1){let e=y();a(0,"div",8)(1,"div",4)(2,"h5"),l(3,"Type"),r(),a(4,"p",5),l(5,"Select Type want to download"),r()(),a(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),I("ngModelChange",function(i){m(e);let p=u();return P(p.downloadType,i)||(p.downloadType=i),c(i)}),g("ngModelChange",function(){m(e);let i=u();return c(i.onDownloadTypeChange())}),a(10,"mat-radio-button",17),l(11," Orders "),r(),a(12,"mat-radio-button",18),l(13," Disbursement "),r()()()(),a(14,"div",19)(15,"div",20),S(16,"i",21),r(),a(17,"p",22),l(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),r()()()()}if(t&2){let e=u();o(9),E("ngModel",e.downloadType),o(),d("value",!1),o(2),d("value",!0)}}function rt(t,s){t&1&&(a(0,"p",5),l(1," Select Disbursement date "),a(2,"span",23),l(3,"(payment date / order complete date)"),r(),l(4," of the channel you want to download (Max 1 Week). "),r())}function at(t,s){t&1&&(a(0,"p",5),l(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),r())}function ot(t,s){if(t&1){let e=y();a(0,"div",12)(1,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.startTime,i)||(p.startTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onStartTimeChange())}),r(),a(2,"span",25),l(3,"-"),r(),a(4,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.endTime,i)||(p.endTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onEndTimeChange())}),r()()}if(t&2){let e=u();o(),E("time",e.startTime),o(3),E("time",e.endTime)}}var Je=(()=>{class t{constructor(){this.reset=O(!1),this.authService=v(ee),this.downloadService=v(A),this.downloadType=_(!1),this.selectedChannelId=_(null),this.channelOptions=_(this.authService.getChannels()),this.channelType=X,this.selectedChannel=_(null),this.showTimePicker=_(!1),this.startDate=_(null),this.endDate=_(null),this.startTime=_("00:00"),this.endTime=_("23:59"),this.filterData=new j,Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(U(e=>e?.Model),$(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},features:[K([A])],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=y();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),l(5,"Select a Channel"),r(),a(6,"p",5),l(7,"Select Channel want to download order"),r()(),a(8,"div",4)(9,"ng-select",6),I("ngModelChange",function(f){return m(p),P(i.selectedChannelId,f)||(i.selectedChannelId=f),c(f)}),g("ngModelChange",function(){return m(p),c(i.onSelectChannel())}),w(10,it,3,3,"ng-option",7),r()()(),w(11,nt,19,3,"div",8),W(12,"async"),a(13,"div",8)(14,"div",4)(15,"h5"),l(16,"Date Range"),r(),w(17,rt,5,0,"p",5)(18,at,2,0,"p",5),r(),a(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),I("ngModelChange",function(f){return m(p),P(i.startDate,f)||(i.startDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())}),r(),a(23,"input",11),I("ngModelChange",function(f){return m(p),P(i.endDate,f)||(i.endDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())})("ngModelChange",function(){return m(p),c(i.onFilterDateChange())}),r()(),S(24,"mat-date-range-picker",null,0),r(),w(26,ot,5,2,"div",12),r()()()()}if(n&2){let p,h,f=T(25);o(9),d("clearable",!1),E("ngModel",i.selectedChannelId),o(),d("ngForOf",i.channelOptions()),o(),b((p=Y(12,9,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?11:-1),o(6),b(i.downloadType()&&((h=i.selectedChannel())==null?null:h.TypeID)==i.channelType.Tokopedia?17:18),o(4),d("rangePicker",f),o(),E("ngModel",i.startDate),o(),E("ngModel",i.endDate),o(3),b(i.showTimePicker()?26:-1)}},dependencies:[F,L,J,Ee,be,Te,ke,Fe,Oe,ye,Se,Ce,ve,He,Be,We,Ae,Re,Le],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]})}}return t})();var D=function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t}(D||{});var lt=(t,s)=>({"over-due-today":t,"over-due":s});function pt(t,s){if(t&1&&(a(0,"th",21),l(1),r()),t&2){let e=u();o(),C(" ",e.selectedChannel()?"Created Date":"Last Status Update"," ")}}function st(t,s){if(t&1&&(a(0,"td"),l(1),W(2,"date"),r()),t&2){let e=u().$implicit;o(),C(" ",_e(2,1,e.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function dt(t,s){if(t&1&&(a(0,"span"),l(1),r()),t&2){let e=u().$implicit;o(),C(" ",e.ActionString," ")}}function mt(t,s){if(t&1&&(a(0,"li"),l(1),r()),t&2){let e=s.$implicit;o(),C(" ",e," ")}}function ct(t,s){if(t&1&&(a(0,"ul",27),w(1,mt,2,1,"li",22),r()),t&2){let e=u().$implicit;o(),d("ngForOf",e.ActionString)}}function ut(t,s){if(t&1&&(a(0,"span",28),S(1,"i",29),r()),t&2){let e=u().$implicit;de("title","Delivery : ",e.DeliveryState,`
1
+ import{a as Ke,b as G,c as He}from"./chunk-WHFC7TE4.js";import"./chunk-WBVTRQFG.js";import{a as $e,b as ze,c as Ye,e as Ge,f as Ue,g as je}from"./chunk-VAPIXIJ3.js";import"./chunk-3NMGN7IE.js";import"./chunk-B5JAZPVU.js";import"./chunk-OS53H77X.js";import{i as We,j as Re,k as Le,l as Be,m as Ae}from"./chunk-VOISFPEM.js";import{a as Ne}from"./chunk-EXFL3GUX.js";import"./chunk-6A4PYMCJ.js";import{a as Fe,b as Oe,c as ke}from"./chunk-K5CKXDIJ.js";import"./chunk-SD7UKXTX.js";import"./chunk-VKJAFLQ6.js";import"./chunk-SDUUFQUI.js";import"./chunk-HPS3WVU5.js";import"./chunk-4RAOUTR2.js";import{c as Te,d as be,e as Ee}from"./chunk-TTAS23MO.js";import"./chunk-HA5WIDED.js";import"./chunk-AFMNWVBL.js";import"./chunk-EQ2ZKEVE.js";import{h as Z,j as ee}from"./chunk-PRTTKQS3.js";import{b as xe,e as De}from"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-ORPJLSXE.js";import{l as Me,m as Ve}from"./chunk-XOT2SZPE.js";import{r as Pe,s as Ie}from"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{c as Se,h as Ce,m as ve,y as ye}from"./chunk-AI4XRCAL.js";import{b as X,c as x}from"./chunk-W6T7TOHE.js";import{H as we,J as ge,d as R,f as L,g as B,j as J,k as q,n as F}from"./chunk-B6POIFQM.js";import{Ac as ue,Dc as T,Eb as M,Ec as l,Fc as V,Gc as C,Ic as E,Jc as P,Ka as j,Kb as w,Kc as I,Mc as K,Na as O,Oc as he,Pc as fe,Qa as _,Wb as d,Xc as W,Yc as Y,Z as $,Zc as _e,_c as H,aa as oe,bc as b,ea as z,gc as a,hc as r,ic as S,ja as le,jc as k,kc as N,m as ae,mc as y,ob as pe,od as Q,pa as v,qb as o,rc as g,sc as u,v as U,vc as se,wc as de,ya as m,yc as me,za as c,zc as ce}from"./chunk-EIQCOZF5.js";import{a as ne,b as re}from"./chunk-K2H6WANG.js";var Xe=t=>({"over-due":t});function Ze(t,s){if(t&1&&(a(0,"tr",8)(1,"td"),l(2),r(),a(3,"td"),l(4),r(),a(5,"td"),l(6),r(),a(7,"td"),l(8),r()()),t&2){let e=s.$implicit,n=s.index;d("ngClass",he(5,Xe,e.Exception)),o(2),V(n+1),o(2),V(e.Number),o(2),V(e.Status),o(2),V(e.Exception)}}function et(t,s){if(t&1&&(k(0),w(1,Ze,9,7,"tr",7),N()),t&2){let e,n=u();o(),d("ngForOf",(e=n.downloadResult())==null?null:e.Body)}}function tt(t,s){t&1&&(a(0,"tr",9)(1,"td",10)(2,"div",11),S(3,"i",12),r(),a(4,"h4",13),l(5," There is no order to processed "),r()()())}var Qe=(()=>{class t{constructor(){this.downloadResult=O()}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(a(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),S(5,"th",5),a(6,"th"),l(7,"Order Number"),r(),a(8,"th"),l(9,"Status"),r(),a(10,"th"),l(11,"Exception"),r()()(),a(12,"tbody"),w(13,et,2,1,"ng-container",6)(14,tt,6,0,"ng-template",null,0,H),r()()()()),n&2){let p,h=T(15);o(13),d("ngIf",((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0)("ngIfElse",h)}},dependencies:[F,R,L,B],encapsulation:2})}}return t})();var A=(()=>{class t{constructor(){this.httpService=v(De),this.toastr=v(xe),this.datePipe=v(q)}gerChannelDetailById(e){return this.httpService.post(Z.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(Z.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(Z.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(z(n=>{n.Data?.length===0&&this.toastrEmptyPreview(e)})):ae}toastrEmptyPreview(e){let n=this.datePipe.transform(e.From,"dd MMM yyyy"),i=this.datePipe.transform(e.To,"dd MMM yyyy"),p=e.TimeFrom?e.TimeFrom:"",h=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${h}!`,"No Orders!")}validateDatePreview(e){let n=!0;return e.downloadType==!0?x.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(e,n){let i=x.formatTitleFromDate(new Date(e),new Date(n)),p=this.datePipe.transform(e,i),h=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${h}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac})}}return t})();function it(t,s){if(t&1&&(a(0,"ng-option",13),S(1,"img",14),l(2),r()),t&2){let e=s.$implicit;d("value",e.ID),o(),d("src",e==null?null:e.Img,pe),o(),C("",e.Name," ")}}function nt(t,s){if(t&1){let e=y();a(0,"div",8)(1,"div",4)(2,"h5"),l(3,"Type"),r(),a(4,"p",5),l(5,"Select Type want to download"),r()(),a(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),I("ngModelChange",function(i){m(e);let p=u();return P(p.downloadType,i)||(p.downloadType=i),c(i)}),g("ngModelChange",function(){m(e);let i=u();return c(i.onDownloadTypeChange())}),a(10,"mat-radio-button",17),l(11," Orders "),r(),a(12,"mat-radio-button",18),l(13," Disbursement "),r()()()(),a(14,"div",19)(15,"div",20),S(16,"i",21),r(),a(17,"p",22),l(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),r()()()()}if(t&2){let e=u();o(9),E("ngModel",e.downloadType),o(),d("value",!1),o(2),d("value",!0)}}function rt(t,s){t&1&&(a(0,"p",5),l(1," Select Disbursement date "),a(2,"span",23),l(3,"(payment date / order complete date)"),r(),l(4," of the channel you want to download (Max 1 Week). "),r())}function at(t,s){t&1&&(a(0,"p",5),l(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),r())}function ot(t,s){if(t&1){let e=y();a(0,"div",12)(1,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.startTime,i)||(p.startTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onStartTimeChange())}),r(),a(2,"span",25),l(3,"-"),r(),a(4,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.endTime,i)||(p.endTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onEndTimeChange())}),r()()}if(t&2){let e=u();o(),E("time",e.startTime),o(3),E("time",e.endTime)}}var Je=(()=>{class t{constructor(){this.reset=O(!1),this.authService=v(ee),this.downloadService=v(A),this.downloadType=_(!1),this.selectedChannelId=_(null),this.channelOptions=_(this.authService.getChannels()),this.channelType=X,this.selectedChannel=_(null),this.showTimePicker=_(!1),this.startDate=_(null),this.endDate=_(null),this.startTime=_("00:00"),this.endTime=_("23:59"),this.filterData=new j,Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(U(e=>e?.Model),$(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},features:[K([A])],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=y();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),l(5,"Select a Channel"),r(),a(6,"p",5),l(7,"Select Channel want to download order"),r()(),a(8,"div",4)(9,"ng-select",6),I("ngModelChange",function(f){return m(p),P(i.selectedChannelId,f)||(i.selectedChannelId=f),c(f)}),g("ngModelChange",function(){return m(p),c(i.onSelectChannel())}),w(10,it,3,3,"ng-option",7),r()()(),w(11,nt,19,3,"div",8),W(12,"async"),a(13,"div",8)(14,"div",4)(15,"h5"),l(16,"Date Range"),r(),w(17,rt,5,0,"p",5)(18,at,2,0,"p",5),r(),a(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),I("ngModelChange",function(f){return m(p),P(i.startDate,f)||(i.startDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())}),r(),a(23,"input",11),I("ngModelChange",function(f){return m(p),P(i.endDate,f)||(i.endDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())})("ngModelChange",function(){return m(p),c(i.onFilterDateChange())}),r()(),S(24,"mat-date-range-picker",null,0),r(),w(26,ot,5,2,"div",12),r()()()()}if(n&2){let p,h,f=T(25);o(9),d("clearable",!1),E("ngModel",i.selectedChannelId),o(),d("ngForOf",i.channelOptions()),o(),b((p=Y(12,9,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?11:-1),o(6),b(i.downloadType()&&((h=i.selectedChannel())==null?null:h.TypeID)==i.channelType.Tokopedia?17:18),o(4),d("rangePicker",f),o(),E("ngModel",i.startDate),o(),E("ngModel",i.endDate),o(3),b(i.showTimePicker()?26:-1)}},dependencies:[F,L,J,Ee,be,Te,ke,Fe,Oe,ye,Se,Ce,ve,He,Be,We,Ae,Re,Le],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]})}}return t})();var D=function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t}(D||{});var lt=(t,s)=>({"over-due-today":t,"over-due":s});function pt(t,s){if(t&1&&(a(0,"th",21),l(1),r()),t&2){let e=u();o(),C(" ",e.selectedChannel()?"Created Date":"Last Status Update"," ")}}function st(t,s){if(t&1&&(a(0,"td"),l(1),W(2,"date"),r()),t&2){let e=u().$implicit;o(),C(" ",_e(2,1,e.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function dt(t,s){if(t&1&&(a(0,"span"),l(1),r()),t&2){let e=u().$implicit;o(),C(" ",e.ActionString," ")}}function mt(t,s){if(t&1&&(a(0,"li"),l(1),r()),t&2){let e=s.$implicit;o(),C(" ",e," ")}}function ct(t,s){if(t&1&&(a(0,"ul",27),w(1,mt,2,1,"li",22),r()),t&2){let e=u().$implicit;o(),d("ngForOf",e.ActionString)}}function ut(t,s){if(t&1&&(a(0,"span",28),S(1,"i",29),r()),t&2){let e=u().$implicit;de("title","Delivery : ",e.DeliveryState,`
2
2
  Payment : `,e.PaymentState,"")}}function ht(t,s){if(t&1&&(a(0,"tr")(1,"td"),l(2),r(),a(3,"td"),l(4),r(),w(5,st,3,4,"td",23),a(6,"td")(7,"span"),l(8),r(),l(9),r(),a(10,"td",24)(11,"span"),l(12),r(),l(13),r(),a(14,"td"),w(15,dt,2,1,"span",23)(16,ct,2,1,"ul",25),r(),a(17,"td"),w(18,ut,2,3,"span",26),r()()),t&2){let e,n=s.$implicit,i=s.index,p=u(2);o(2),V(i+1),o(2),V(n.Number),o(),d("ngIf",((e=p.selectedChannel())==null?null:e.TypeID)!=p.channelType.Shopee&&((e=p.selectedChannel())==null?null:e.TypeID)!==p.channelType.Tiktok),o(3),C("",n.ChannelStatus," - "),o(),C("",n.ChannelStatusDescription," "),o(),d("ngClass",fe(12,lt,(n==null?null:n.Action)==p.actionPreviewOrder.Update,(n==null?null:n.Action)==p.actionPreviewOrder.New))("matTooltip",n.POSStatus==91||n.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),o(2),C("",n.POSStatus," - "),o(),C("",n.POSStatusDescription," "),o(2),d("ngIf",n.ActionString.length==1),o(),d("ngIf",n.ActionString.length>1),o(2),d("ngIf",n.ChannelStatus!=99&&n.POSStatus!=99)}}function ft(t,s){if(t&1&&(k(0),w(1,ht,19,15,"tr",22),N()),t&2){let e=u();o(),d("ngForOf",e.displayPreviewData())}}function _t(t,s){t&1&&(a(0,"tr",30)(1,"td",31)(2,"div",32),S(3,"i",33),r(),a(4,"h4",34),l(5," There is no order to processed "),r()()())}var qe=(()=>{class t{constructor(){this.orderPreview=O(),this.selectedChannel=O(),this.channelType=X,this.allData=_(0),this.syncData=_(0),this.wrongData=_(0),this.unsyncData=_(0),this.pillStatus=_(D.ALL),this.actionPreviewOrder=G,this.previewStatus=D,this.displayPreviewData=_([]),this.exportOrders=new j,Q(()=>{this.orderPreview()&&(this.filterPreviewData(D.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(e){this.pillStatus.update(()=>e),this.displayPreviewData.update(()=>this.filterDataByStatus(e))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(D.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(D.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(D.UNSYNC).length)}filterDataByStatus(e){let n=[];switch(e){case D.ALL:n=this.orderPreview();break;case D.SYNC:n=this.orderPreview().filter(i=>i.Action==G.DoNothing);break;case D.WRONG:n=this.orderPreview().filter(i=>i.Action==G.Update);break;case D.UNSYNC:n=this.orderPreview().filter(i=>i.Action==G.New);break}return n}onExportOrders(){this.exportOrders.emit()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:41,vars:11,consts:[["EMPTY",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1){let p=y();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div")(5,"ul",5)(6,"li",6)(7,"button",7),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.ALL))}),l(8),r()(),a(9,"li",8)(10,"button",9),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.SYNC))}),l(11),r()(),a(12,"li",8)(13,"button",10),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.WRONG))}),l(14),r()(),a(15,"li",8)(16,"button",11),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.UNSYNC))}),l(17),r()()()(),a(18,"div")(19,"button",12),g("click",function(){return m(p),c(i.onExportOrders())}),S(20,"i",13),a(21,"span"),l(22,"Export"),r()()()()(),a(23,"table",14)(24,"thead",15)(25,"tr"),S(26,"th",16),a(27,"th",17),l(28,"Number"),r(),w(29,pt,2,1,"th",18),a(30,"th",19),l(31,"Channel Status"),r(),a(32,"th",19),l(33,"POS Status"),r(),a(34,"th"),l(35,"Action"),r(),S(36,"th",16),r()(),a(37,"tbody"),w(38,ft,2,1,"ng-container",20)(39,_t,6,0,"ng-template",null,0,H),r()()()()}if(n&2){let p,h,f=T(40);o(7),d("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),o(),C(" All (",i.allData(),") "),o(2),d("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),o(),C(" Existing (",i.syncData(),") "),o(2),d("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),o(),C(" Wrong Status (",i.wrongData(),") "),o(2),d("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),o(),C(" Missing (",i.unsyncData(),") "),o(12),d("ngIf",((p=i.selectedChannel())==null?null:p.TypeID)!=i.channelType.Shopee&&((p=i.selectedChannel())==null?null:p.TypeID)!==i.channelType.Tiktok),o(9),d("ngIf",((h=i.displayPreviewData())==null?null:h.length)>0)("ngIfElse",f)}},dependencies:[F,R,L,B,q,Ie,Pe],encapsulation:2})}}return t})();var wt=["stepper"];function gt(t,s){t&1&&(a(0,"a",2),l(1," Download V1 "),r())}function St(t,s){if(t&1){let e=y();a(0,"div",3)(1,"button",20),g("click",function(){m(e);let i=u();return c(i.onStepperBack())}),l(2," Back "),r(),a(3,"button",21),g("click",function(){m(e);let i=u();return c(i.onNextStep())}),l(4," Next "),r()()}if(t&2){let e=u();o(3),d("disabled",e.disabledNextFilter())}}function Ct(t,s){if(t&1){let e=y();a(0,"button",22),g("click",function(){m(e);let i=u();return c(i.onNextStep())}),l(1," Next "),r()}if(t&2){let e=u();d("disabled",e.disabledNextFilter())}}function vt(t,s){if(t&1){let e=y();a(0,"button",23),g("click",function(){m(e);let i=u();return c(i.onNewDownload())}),S(1,"i",24),l(2," New "),r()}}function yt(t,s){t&1&&(S(0,"i",25),a(1,"span"),l(2,"Filter"),r())}function xt(t,s){t&1&&(S(0,"i",26),a(1,"span"),l(2,"Preview"),r())}function Dt(t,s){if(t&1){let e=y();k(0),a(1,"preview-step",27),g("onExportOrders",function(){m(e);let i=u();return c(i.onExportOrders())}),r(),N()}if(t&2){let e=s.ngIf;o(),d("orderPreview",e)}}function Tt(t,s){t&1&&(S(0,"i",28),a(1,"span"),l(2,"Finish"),r())}function bt(t,s){if(t&1&&(k(0),S(1,"complete-step",29),N()),t&2){let e=s.ngIf;o(),d("downloadResult",e)}}function Et(t,s){t&1&&(a(0,"h6"),l(1,"1"),r())}function Pt(t,s){t&1&&(a(0,"h6"),l(1,"2"),r())}function It(t,s){t&1&&(a(0,"h6"),l(1,"3"),r())}var $i=(()=>{class t{constructor(){this.downloadService=v(A),this.orderService=v(Ke),this.productService=v(Ne),this.authService=v(ee),this.stepperSelectedIndex=_(0),this.disabledNextFilter=_(!0),this.isResetFilter=_(!1),this.pageTitle=_("Download to POS"),this.cacheKey=_(x.GuidEMpty)}onFilterChange(e){this.filter=e,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>x.IsEmpty(this.filter?.channelId)||!x.isValidDate(this.filter.startDate)||!x.isValidDate(this.filter.endDate))}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let e=this.productService.findChannelById(this.filter.channelId,this.authService.getChannels());this.setPageTitle(`Preview ${e?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let e={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};x.IsNotEmpty(this.filter.startTime)&&(e=re(ne({},e),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(e).pipe(z(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),U(n=>n.Data),$(1))}onExportOrders(){let e={ID:this.filter.channelId,From:this.filter.startDate?JSON.stringify(this.filter.startDate):null,To:this.filter.endDate?JSON.stringify(this.filter.endDate):null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(e,n).subscribe()}onDownload(){let e={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(oe(n=>(e.ListPreview=n,this.downloadService.getDownloadOrder(e))),z(()=>{this.onStepperNext()}),$(1))}setPageTitle(e){this.pageTitle.update(()=>`
3
3
  ${e} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
4
4
  `)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!0),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&me(wt,5),n&2){let p;ce(p=ue())&&(i.stepper=p.first)}},features:[K([A,{provide:$e,useValue:{displayDefaultIndicatorType:!1}}])],decls:27,vars:21,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],["routerLink","/menu/Order/Download/V1",1,"btn","btn-outline-secondary","btn-fill","me-3"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","reset"],["state","preview",3,"editable","completed"],[4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview"],[1,"fa-solid","fa-flag","me-3"],[3,"downloadResult"]],template:function(n,i){if(n&1){let p=y();a(0,"mainpanel",1)(1,"actions"),w(2,gt,2,0,"a",2)(3,St,5,1,"div",3)(4,Ct,2,1,"button",4)(5,vt,3,0,"button",5),r(),a(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"mat-stepper",10,0),I("selectedIndexChange",function(f){return m(p),P(i.stepperSelectedIndex,f)||(i.stepperSelectedIndex=f),c(f)}),a(13,"mat-step",11),w(14,yt,3,0,"ng-template",12),a(15,"filter-step",13),g("onFilterChange",function(f){return m(p),c(i.onFilterChange(f))}),r()(),a(16,"mat-step",14),w(17,xt,3,0,"ng-template",12)(18,Dt,2,1,"ng-container",15),W(19,"async"),r(),a(20,"mat-step",16),w(21,Tt,3,0,"ng-template",12)(22,bt,2,1,"ng-container",15),W(23,"async"),r(),w(24,Et,2,0,"ng-template",17)(25,Pt,2,0,"ng-template",18)(26,It,2,0,"ng-template",19),r()()()()()()()}if(n&2){let p=T(12);d("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),o(2),b(i.stepperSelectedIndex()==0?2:-1),o(),b(i.stepperSelectedIndex()==1?3:-1),o(),b(i.stepperSelectedIndex()==0?4:-1),o(),b(i.stepperSelectedIndex()==2?5:-1),o(6),se("ngClass","last-edited-step-"+p.selectedIndex),E("selectedIndex",i.stepperSelectedIndex),o(2),d("completed",!1)("editable",i.stepperSelectedIndex()!=2),o(2),d("reset",i.isResetFilter()),o(),d("editable",i.stepperSelectedIndex()!=2)("completed",!1),o(2),d("ngIf",Y(19,17,i.orderPreview$)),o(4),d("ngIf",Y(23,19,i.downloadPreview$))}},dependencies:[F,R,B,J,Qe,Je,qe,je,Ge,ze,Ue,Ye,Ve,Me,ge,we],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
@@ -1 +1 @@
1
- import{a as E}from"./chunk-WNAVUGZ4.js";import{a as T}from"./chunk-EXFL3GUX.js";import{h as D,j as w}from"./chunk-CIKNTHCR.js";import{b as j,e as s}from"./chunk-JSPVOV7M.js";import{b as i,c as m}from"./chunk-W6T7TOHE.js";import{G as C}from"./chunk-B6POIFQM.js";import{B as A,G as U,J as u,Qa as I,g as k,ja as p,pa as a,q as d,v as b}from"./chunk-EIQCOZF5.js";var F=(()=>{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=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var x=(()=>{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=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{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)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({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/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=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var v=class{};var R=(()=>{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=p({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/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var O=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(D.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Vt=(()=>{class r{constructor(){this.authService=a(w),this.productService=a(T),this.shoppeUploadService=a(F),this.tiktokUploadService=a(x),this.lazadaUploadService=a(H),this.tokopediaUploadService=a(R),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(O),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(C),this.httpService=a(s),this._selectedProduct=new k(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(U(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 I(t.map(o=>{let c=new g;return c.id=o.ID,c.name=o.Name,c.type=o.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||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);A(e).pipe(b(o=>{let c=[];return o.forEach(f=>{c=[...c,...f]}),c})).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=[],c=[],f=[],S=[],y=[],P=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:c.push(l);break;case i.Tokopedia:f.push(l);break;case i.WooCommerce:S.push(l);break;case i.Shopify:y.push(l);break;case i.Plugo:P.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:y},{type:i.Plugo,data:P}].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(c));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(P));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let c=new v;c.ChannelID=o.id,c.ChannelType=o.type,c.Products=this._selectedProduct.getValue(),o.type==i.Shopify?delete c.CategoryID:c.CategoryID=o.categoryId,o.type==i.WooCommerce||o.type==i.Shopify?c.Attribute=o.attributes[0]:c.Attributes=this.formatAttributes(o.type,o.attributes),e.push(c)}),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.Tokopedia:o=e;break;case i.Shopify:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{F as a,x as b,H as c,z as d,Vt as e};
1
+ import{a as E}from"./chunk-WNAVUGZ4.js";import{a as T}from"./chunk-EXFL3GUX.js";import{h as D,j as w}from"./chunk-PRTTKQS3.js";import{b as j,e as s}from"./chunk-JSPVOV7M.js";import{b as i,c as m}from"./chunk-W6T7TOHE.js";import{G as C}from"./chunk-B6POIFQM.js";import{B as A,G as U,J as u,Qa as I,g as k,ja as p,pa as a,q as d,v as b}from"./chunk-EIQCOZF5.js";var F=(()=>{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=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var x=(()=>{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=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{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)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({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/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=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var v=class{};var R=(()=>{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=p({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/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var O=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(D.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Vt=(()=>{class r{constructor(){this.authService=a(w),this.productService=a(T),this.shoppeUploadService=a(F),this.tiktokUploadService=a(x),this.lazadaUploadService=a(H),this.tokopediaUploadService=a(R),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(O),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(C),this.httpService=a(s),this._selectedProduct=new k(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(U(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 I(t.map(o=>{let c=new g;return c.id=o.ID,c.name=o.Name,c.type=o.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||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);A(e).pipe(b(o=>{let c=[];return o.forEach(f=>{c=[...c,...f]}),c})).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=[],c=[],f=[],S=[],y=[],P=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:c.push(l);break;case i.Tokopedia:f.push(l);break;case i.WooCommerce:S.push(l);break;case i.Shopify:y.push(l);break;case i.Plugo:P.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:y},{type:i.Plugo,data:P}].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(c));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(P));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let c=new v;c.ChannelID=o.id,c.ChannelType=o.type,c.Products=this._selectedProduct.getValue(),o.type==i.Shopify?delete c.CategoryID:c.CategoryID=o.categoryId,o.type==i.WooCommerce||o.type==i.Shopify?c.Attribute=o.attributes[0]:c.Attributes=this.formatAttributes(o.type,o.attributes),e.push(c)}),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.Tokopedia:o=e;break;case i.Shopify:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{F as a,x as b,H as c,z as d,Vt as e};
@@ -1 +1 @@
1
- import{h as r,i as C}from"./chunk-CIKNTHCR.js";import{b as l,e as S}from"./chunk-JSPVOV7M.js";import{b as a,c as u}from"./chunk-W6T7TOHE.js";import{aa as p,ea as h,ja as c,oa as o,v as s}from"./chunk-EIQCOZF5.js";var y=(()=>{class i{constructor(e,t,n){this.httpService=e,this.toastr=t,this.tokenService=n}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(p(t=>this.tokenService.refreshToken().pipe(s(n=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(h(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=u.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var n in e)t+=n+" : "+e[n]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(s(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(h(n=>{window.open(n.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case a.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case a.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case a.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}static{this.\u0275fac=function(t){return new(t||i)(o(S),o(l),o(C))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{y as a};
1
+ import{h as r,i as C}from"./chunk-PRTTKQS3.js";import{b as l,e as S}from"./chunk-JSPVOV7M.js";import{b as a,c as u}from"./chunk-W6T7TOHE.js";import{aa as p,ea as h,ja as c,oa as o,v as s}from"./chunk-EIQCOZF5.js";var y=(()=>{class i{constructor(e,t,n){this.httpService=e,this.toastr=t,this.tokenService=n}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(p(t=>this.tokenService.refreshToken().pipe(s(n=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(h(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=u.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var n in e)t+=n+" : "+e[n]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(s(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(h(n=>{window.open(n.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case a.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case a.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case a.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}static{this.\u0275fac=function(t){return new(t||i)(o(S),o(l),o(C))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{y as a};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-52GRE6TF.js";import"./chunk-77IUCPIQ.js";import{a as K}from"./chunk-6HVHZ3HN.js";import{a as Oe,b as ke}from"./chunk-ARIW575T.js";import"./chunk-OVYL7SOO.js";import"./chunk-T7KM2WP6.js";import"./chunk-VOISFPEM.js";import"./chunk-BSATGCWC.js";import"./chunk-6A4PYMCJ.js";import"./chunk-3RK6DDJD.js";import{a as Z,b as Ve}from"./chunk-WYOXUN3H.js";import"./chunk-23MIIDCT.js";import"./chunk-SD7UKXTX.js";import{a as W}from"./chunk-MV2W43TI.js";import"./chunk-E24BKGBJ.js";import"./chunk-VKJAFLQ6.js";import"./chunk-TY4H2W6F.js";import"./chunk-SDUUFQUI.js";import"./chunk-HPS3WVU5.js";import"./chunk-R5IDWUP6.js";import"./chunk-4RAOUTR2.js";import{a as de,b as pe,d as me,e as Re}from"./chunk-TTAS23MO.js";import"./chunk-HA5WIDED.js";import"./chunk-AFMNWVBL.js";import"./chunk-EQ2ZKEVE.js";import{j as se}from"./chunk-CIKNTHCR.js";import{e as D}from"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-ORPJLSXE.js";import{l as M,m as Le}from"./chunk-XOT2SZPE.js";import{r as Ne,s as Pe}from"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{c as oe,h as re,m as ae,o as le,t as Ie,u as Te,y as De,z as Me}from"./chunk-AI4XRCAL.js";import{c as V}from"./chunk-W6T7TOHE.js";import{E as B,F as Ee,H as P,J as he,d as ue,f as Y,g as I,j as we,k as T,l as F,n as ge}from"./chunk-B6POIFQM.js";import{Dc as z,Eb as x,Ec as r,Fb as ne,Fc as d,Gc as k,Ic as y,Jc as C,Kb as f,Kc as S,Nc as U,Oc as A,Wb as p,Xc as _,Yc as L,Z as Ce,Zc as E,_b as xe,_c as J,ea as Se,gc as i,hc as n,ic as N,ja as ce,jc as j,ka as ie,kc as q,mc as R,oa as be,ob as H,qb as l,rc as w,sc as v,v as ye,wb as h,ya as c,za as u}from"./chunk-EIQCOZF5.js";import"./chunk-K2H6WANG.js";var We=(()=>{class o{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"}]}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-logs"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),N(3,"nav-tab",2),n()()(),N(4,"router-outlet")),a&2&&(l(3),p("Tabs",t.ObjectlogTabs))},dependencies:[Ee,Oe],encapsulation:2})}}return o})();var X=(()=>{class o{constructor(){}get Data(){return this._Data}set Data(e){this._Data=e}Fill(e){return this._Data.find(a=>a._id==e)}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var et=()=>["/menu/log/order/detail-user"],tt=o=>({ID:o}),it=o=>({"bg-warning":o});function nt(o,g){if(o&1&&(i(0,"span",22),N(1,"img",23),n(),r(2)),o&2){let e=g.item;l(),p("src",e.Img,H)("alt",e.Name),l(),k(" ",e.Name," ")}}function ot(o,g){o&1&&(i(0,"th",27)(1,"span",33),r(2," Response Body Warning "),n()())}function rt(o,g){o&1&&(i(0,"th")(1,"span",33),r(2," Number Override "),n()())}function at(o,g){if(o&1&&(i(0,"td",27)(1,"span",36),r(2),n()()),o&2){let e=v().$implicit;l(),p("ngClass",A(2,it,e.responseBodyWarning!=null)),l(),d(e.responseBodyWarning)}}function lt(o,g){if(o&1&&(i(0,"td"),r(1),n()),o&2){let e=v().$implicit;l(),k(" ",e.ResponseBodyWarningReference," ")}}function st(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",34),r(3),_(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td",27)(12,"span",35),r(13),n()(),f(14,at,3,4,"td",29)(15,lt,2,1,"td",30),n()),o&2){let e=g.$implicit,a=v(2);l(2),p("routerLink",U(14,et))("queryParams",A(15,tt,e.ID)),l(),k(" ",E(4,11,e.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),d(e.MarketTypeString),l(2),d(e.POSActionTypeString),l(2),d(e.Number),l(2),xe(e.ResponseCode===200||e.ResponseCode===202?"bg-success":"bg-warning"),l(),k(" ",e.ResponseCode," "),l(),p("ngIf",a.responseBodyWarningVisible),l(),p("ngIf",a.responseBodyWarningVisible)}}function dt(o,g){if(o&1){let e=R();j(0),i(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),r(6,"Date"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"Actions"),n(),i(11,"th"),r(12,"Number"),n(),i(13,"th",27)(14,"span",28),r(15," Response Code "),n()(),f(16,ot,3,0,"th",29)(17,rt,3,0,"th",30),n()(),i(18,"tbody"),f(19,st,16,17,"tr",31),n()(),i(20,"mat-paginator",32),w("page",function(t){c(e);let m=v();return u(m.changePage(t))}),n()(),q()}if(o&2){let e=v();l(16),p("ngIf",e.responseBodyWarningVisible),l(),p("ngIf",e.responseBodyWarningVisible),l(2),p("ngForOf",e.Result),l(),p("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function pt(o,g){o&1&&(i(0,"div",37),N(1,"app-empty-state"),n())}var qe=(()=>{class o{constructor(e,a,t,m){this.http=e,this._RawLogService=a,this.route=t,this.authService=m,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(e=>{this.responseCode=e.responseCode,this.responseCode!=null?this.Load(e):this.Load()})}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(e){this.filter.Number=e,this.http.post("/api/Orders/Get",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let t of a.hits){t._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let m={ID:t._id,Created:t._source["@timestamp_received"],shopId:t._source.shopId,MarketTypeString:t._source.log.type,POSActionTypeString:t._source.message,Number:t._source.log.number,ResponseCode:t._source.log.responseCode,responseBodyWarning:t._source.log.responseBodyWarning,ResponseBodyWarningReference:t._source.log.ResponseBodyWarningReference};this.Result.push(m)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(D),h(X),h(B),h(se))}}static{this.\u0275cmp=x({type:o,selectors:[["app-order"]],standalone:!1,decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=R();i(0,"mainpanel",1),S("textChange",function(s){return c(m),C(t.Number,s)||(t.Number=s),u(s)}),w("onSubmit",function(s){return c(m),u(t.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),S("ngModelChange",function(s){return c(m),C(t.filter.ChannelID,s)||(t.filter.ChannelID=s),u(s)}),f(6,nt,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",2),r(9,"Action"),n(),i(10,"ng-select",6),S("ngModelChange",function(s){return c(m),C(t.filter.ActionType,s)||(t.filter.ActionType=s),u(s)}),n()(),i(11,"div",5)(12,"label",7),r(13,"From/To"),n(),i(14,"div",8)(15,"datepicker",9),S("dateChange",function(s){return c(m),C(t.filter.From,s)||(t.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",10),S("dateChange",function(s){return c(m),C(t.filter.To,s)||(t.filter.To=s),u(s)}),n()()(),i(18,"div",5)(19,"label",11),r(20,"Response Code"),n(),i(21,"input",12),S("ngModelChange",function(s){return c(m),C(t.filter.StatusCode,s)||(t.filter.StatusCode=s),u(s)}),n()(),i(22,"div",5)(23,"label",11),r(24,"Response Body Warning"),n(),i(25,"input",13),S("ngModelChange",function(s){return c(m),C(t.filter.responseBodyWarning,s)||(t.filter.responseBodyWarning=s),u(s)}),n(),i(26,"datalist",14),N(27,"option",15),n()(),i(28,"div",5)(29,"label",11),r(30,"Page Number"),n(),i(31,"input",16),S("ngModelChange",function(s){return c(m),C(t.filter.PageNumber,s)||(t.filter.PageNumber=s),u(s)}),n()(),i(32,"div",5)(33,"label",11),r(34,"Page Size"),n(),i(35,"input",17),S("ngModelChange",function(s){return c(m),C(t.filter.RowCount,s)||(t.filter.RowCount=s),u(s)}),n()()(),i(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),f(40,dt,21,6,"ng-container",21)(41,pt,2,0,"ng-template",null,0,J),n()()()()()}if(a&2){let m=z(42);y("text",t.Number),l(5),p("clearable",!0)("items",t.channelOptions),y("ngModel",t.filter.ChannelID),l(5),p("clearable",!0)("items",t.ActionTypeList),y("ngModel",t.filter.ActionType),l(5),y("date",t.filter.From),l(2),y("date",t.filter.To),l(4),y("ngModel",t.filter.StatusCode),l(4),y("ngModel",t.filter.responseBodyWarning),l(6),y("ngModel",t.filter.PageNumber),l(4),y("ngModel",t.filter.RowCount),l(5),p("ngIf",(t.Result==null?null:t.Result.length)>0)("ngIfElse",m)}},dependencies:[ue,Y,I,Ie,Te,oe,le,re,ae,P,M,Z,me,de,pe,Q,K,Ne,T],encapsulation:2})}}return o})();var mt=o=>({"bg-gradient-warning":o}),ct=()=>["/menu/log/inventory/sync-inventory/detail"],ut=o=>({ID:o});function gt(o,g){if(o&1&&(i(0,"span",19),N(1,"img",20),n(),r(2)),o&2){let e=g.item;l(),p("src",e.Img,H)("alt",e.Name),l(),k(" ",e.Name," ")}}function ht(o,g){if(o&1&&(i(0,"tr",26)(1,"td")(2,"a",27),r(3),_(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td"),r(12),n()()),o&2){let e=g.$implicit;p("ngClass",A(11,mt,e.ResponseCode==400)),l(2),p("routerLink",U(13,ct))("queryParams",A(14,ut,e.ID)),l(),k(" ",E(4,8,e.Created,"dd MMM yyyy HH:mm")," "),l(3),d(e.channelName),l(2),d(e.Sku),l(2),d(e.Stock),l(2),d(e.ResponseCode)}}function ft(o,g){if(o&1){let e=R();j(0),i(1,"div",21)(2,"table",22)(3,"thead")(4,"tr",23)(5,"th"),r(6,"Created"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"SKU"),n(),i(11,"th"),r(12,"Stock"),n(),i(13,"th"),r(14,"Response code"),n()()(),i(15,"tbody"),f(16,ht,13,16,"tr",24),n()(),i(17,"mat-paginator",25),w("page",function(t){c(e);let m=v();return u(m.changePage(t))}),n()(),q()}if(o&2){let e=v();l(16),p("ngForOf",e.Result),l(),p("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function vt(o,g){o&1&&(i(0,"div",28),N(1,"app-empty-state"),n())}var Ge=(()=>{class o{constructor(e,a,t){this.http=e,this._RawLogService=a,this.authService=t,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(e=>{this.filter=e.Filter,this.ActionTypeList=e.Options.ActionTypeList,this.Get()})}Get(e){e!=null&&(this.filter.Sku=e),this.http.post("api/Inventory/GetLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let t of a.hits){let m={ID:t._source.log.id,Created:t._source["@timestamp_received"],channelName:t._source.log.channelName,Sku:t._source.log.sku,Stock:t._source.log.stock,ResponseCode:t._source.log.responseCode};this.Result.push(m)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(D),h(X),h(se))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-log"]],standalone:!1,decls:33,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Inventory Sync","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=R();i(0,"mainpanel",1),S("textChange",function(s){return c(m),C(t.filter.Sku,s)||(t.filter.Sku=s),u(s)}),w("onSubmit",function(s){return c(m),u(t.Get(s))}),i(1,"actions")(2,"a",2),r(3," Order Inventory Sync Job "),n()(),i(4,"filters")(5,"div",3)(6,"div")(7,"label",4),r(8,"Channel"),n(),i(9,"ng-select",5),S("ngModelChange",function(s){return c(m),C(t.filter.ChannelID,s)||(t.filter.ChannelID=s),u(s)}),f(10,gt,3,3,"ng-template",6),n()(),i(11,"div",7)(12,"label",8),r(13,"From/To"),n(),i(14,"div",9)(15,"datepicker",10),S("dateChange",function(s){return c(m),C(t.filter.From,s)||(t.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",11),S("dateChange",function(s){return c(m),C(t.filter.To,s)||(t.filter.To=s),u(s)}),n()()(),i(18,"div",7)(19,"label",12),r(20,"Page Number"),n(),i(21,"input",13),S("ngModelChange",function(s){return c(m),C(t.filter.PageNumber,s)||(t.filter.PageNumber=s),u(s)}),n()(),i(22,"div",7)(23,"label",12),r(24,"Page Size"),n(),i(25,"input",14),S("ngModelChange",function(s){return c(m),C(t.filter.RowCount,s)||(t.filter.RowCount=s),u(s)}),n()()()(),i(26,"content")(27,"div",15)(28,"div",16)(29,"div",17),f(30,ft,18,4,"ng-container",18)(31,vt,2,0,"ng-template",null,0,J),n()()()()()}if(a&2){let m=z(32);y("text",t.filter.Sku),l(9),p("clearable",!0)("items",t.channelOptions),y("ngModel",t.filter.ChannelID),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(4),y("ngModel",t.filter.PageNumber),l(4),y("ngModel",t.filter.RowCount),l(5),p("ngIf",(t.Result==null?null:t.Result.length)>0)("ngIfElse",m)}},dependencies:[ue,Y,I,oe,le,re,ae,P,M,Z,me,de,pe,Q,K,T],encapsulation:2})}}return o})();var _t=()=>["/menu/log/rawlog/detail"],yt=o=>({ID:o});function Ct(o,g){if(o&1&&(i(0,"span",17),N(1,"img",18),n(),r(2)),o&2){let e=g.item;l(),p("src",e.Img,H)("alt",e.Name),l(),k(" ",e.Name," ")}}function St(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",25),r(3),_(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n()()),o&2){let e=g.$implicit;l(2),p("routerLink",U(9,_t))("queryParams",A(10,yt,e.id)),l(),k(" ",E(4,6,e.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),d(e.type),l(2),d(e.number),l(2),d(e.message)}}function bt(o,g){if(o&1){let e=R();j(0),i(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),r(6,"Date"),n(),i(7,"th"),r(8,"Type"),n(),i(9,"th"),r(10,"Number"),n(),i(11,"th"),r(12,"Message"),n()()(),i(13,"tbody"),f(14,St,11,12,"tr",23),n()(),i(15,"mat-paginator",24),w("page",function(t){c(e);let m=v();return u(m.changePage(t))}),n()(),q()}if(o&2){let e=v();l(14),p("ngForOf",e.Result),l(),p("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function xt(o,g){o&1&&(i(0,"div",26),N(1,"app-empty-state"),n())}var He=(()=>{class o{constructor(e,a,t){this.http=e,this._RawLogService=a,this.authService=t,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(e){this.filter.Number=e,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let t of a.hits){let m={id:t._id,message:t._source.message,responseCode:t._source.log.responseCode,processTypeString:t._source.log.processType,type:t._source.log.type,number:t._source.log.number,Created:t._source["@timestamp_received"]};this.Result.push(m)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(D),h(X),h(se))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-log"]],standalone:!1,decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=R();i(0,"mainpanel",1),S("textChange",function(s){return c(m),C(t.filter.Number,s)||(t.filter.Number=s),u(s)}),w("onSubmit",function(s){return c(m),u(t.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),S("ngModelChange",function(s){return c(m),C(t.filter.ChannelID,s)||(t.filter.ChannelID=s),u(s)}),f(6,Ct,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",6),r(9,"From/To"),n(),i(10,"div",7)(11,"datepicker",8),S("dateChange",function(s){return c(m),C(t.filter.From,s)||(t.filter.From=s),u(s)}),n()(),i(12,"div")(13,"datepicker",9),S("dateChange",function(s){return c(m),C(t.filter.To,s)||(t.filter.To=s),u(s)}),n()()(),i(14,"div",5)(15,"label",10),r(16,"Page Number"),n(),i(17,"input",11),S("ngModelChange",function(s){return c(m),C(t.filter.PageNumber,s)||(t.filter.PageNumber=s),u(s)}),n()(),i(18,"div",5)(19,"label",10),r(20,"Page Size"),n(),i(21,"input",12),S("ngModelChange",function(s){return c(m),C(t.filter.RowCount,s)||(t.filter.RowCount=s),u(s)}),n()()(),i(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),f(26,bt,16,4,"ng-container",16)(27,xt,2,0,"ng-template",null,0,J),n()()()()()}if(a&2){let m=z(28);y("text",t.filter.Number),l(5),p("clearable",!0)("items",t.channelOptions),y("ngModel",t.filter.ChannelID),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(4),y("ngModel",t.filter.PageNumber),l(4),y("ngModel",t.filter.RowCount),l(5),p("ngIf",(t.Result==null?null:t.Result.length)>0)("ngIfElse",m)}},dependencies:[Y,I,oe,le,re,ae,P,M,Z,me,de,pe,Q,K,T],encapsulation:2})}}return o})();function wt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let e=v();l(6),d(e.ProcessedCode)}}function Et(o,g){if(o&1){let e=R();i(0,"a",16),w("click",function(){c(e);let t=v();return u(t.Retry())}),r(1,"Retry"),n()}}var ze=(()=>{class o{constructor(e,a){this.route=e,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(t=>{this.ID=t.ID,this.Load()})}Retry(){var e={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",e).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var e={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",e).subscribe(a=>{for(let t of a.hits)this.Number=t._source.log.number,this.MarketTypeString=t._source.log.type,this.ResponseCode=t._source.log.responseCode,this.POSActionTypeString=t._source.message,this.ProcessDuration=0,this.Created=t._source["@timestamp_received"],this.request=V.IsNotEmpty(t._source?.log?.request)?JSON.parse(t._source.log?.request):"",this.response=V.IsNotEmpty(t._source?.log?.response)?JSON.parse(t._source.log?.response):"",this.shopId=t._source.shopId,this.ProcessedCode=t._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-detail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),_(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,wt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),_(69,"json"),n()()(),i(70,"actions",14),f(71,Et,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),_(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),d(E(21,14,t.Created,"dd MMM yyyy HH:mm:ss")),l(8),d(t.Number),l(7),d(t.MarketTypeString),l(7),d(t.ResponseCode),l(7),d(t.shopId),l(),p("ngIf",t.ProcessedCode!=null),l(7),d(t.POSActionTypeString),l(11),d(L(69,17,t.request)),l(3),p("ngIf",t.ResponseCode!="200"&&t.ResponseCode!="201"),l(10),d(L(82,19,t.response)))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();function It(o,g){if(o&1&&(i(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),r(4,"General"),n()(),i(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),r(10,"Date"),n(),i(11,"div")(12,"span"),r(13),_(14,"date"),n()()()(),i(15,"div",6)(16,"div",12)(17,"label"),r(18,"SKU"),n(),i(19,"div")(20,"span"),r(21),n()()()(),i(22,"div",6)(23,"div",12)(24,"label"),r(25,"Channel"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",6)(30,"div",12)(31,"label"),r(32,"Response Code"),n(),i(33,"div")(34,"span"),r(35),n()()()()()()()()),o&2){let e=v();l(13),d(E(14,4,e.data.Created,"dd MMM yyyy")),l(8),d(e.data.Sku),l(7),d(e.data.ChannelName),l(7),d(e.data.ResponseCode)}}var Ue=(()=>{class o{constructor(e,a,t){this.route=e,this.http=a,this._RawLogService=t,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(m=>{this.ID=m.ID,this.Load()})}ngOnInit(){}Load(){var e={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",e).subscribe(a=>{this.data.Created=a.hits[0]._source["@timestamp_received"],this.data.Sku=a.hits[0]._source.log.sku,this.data.ChannelName=a.hits[0]._source.log.channelName,this.data.ResponseCode=a.hits[0]._source.log.responseCode,this.request=V.IsNotEmpty(a.hits[0]?._source.log?.request)?JSON.parse(a.hits[0]?._source?.log?.request):"",this.response=a.hits[0]._source.log.response})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D),h(X))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-detail"]],standalone:!1,decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3),f(7,It,36,7,"div",4),n(),i(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),r(13,"Request"),n()(),i(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),r(18),_(19,"json"),n()()()()()(),i(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),r(24,"Response"),n()(),i(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),r(29),n()()()()()()()()()()),a&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(7),p("ngIf",t.data),l(11),d(L(19,5,t.request)),l(11),d(t.response))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();function Tt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let e=v();l(6),d(e.ProcessedCode)}}function Dt(o,g){if(o&1){let e=R();i(0,"a",16),w("click",function(){c(e);let t=v();return u(t.Retry())}),r(1,"Retry"),n()}}var Je=(()=>{class o{constructor(e,a){this.route=e,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(t=>{this.ID=t.ID,this.Load()})}Retry(){var e={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",e).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var e={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",e).subscribe(a=>{for(let t of a.hits)this.Number=t._source.log.number,this.MarketTypeString=t._source.log.type,this.ResponseCode=t._source.log.responseCode,this.POSActionTypeString=t._source.message,this.ProcessDuration=0,this.Created=t._source["@timestamp_received"],this.request=V.IsNotEmpty(t._source?.log?.request)?JSON.parse(t._source.log?.request):"",this.response=V.IsNotEmpty(t._source?.log?.response)?JSON.parse(t._source.log?.response):"",this.shopId=t._source.shopId,this.ProcessedCode=t._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),_(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,Tt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),_(69,"json"),n()()(),i(70,"actions",14),f(71,Dt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),_(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),d(E(21,14,t.Created,"dd MMM yyyy HH:mm:ss")),l(8),d(t.Number),l(7),d(t.MarketTypeString),l(7),d(t.ResponseCode),l(7),d(t.shopId),l(),p("ngIf",t.ProcessedCode!=null),l(7),d(t.POSActionTypeString),l(11),d(L(69,17,t.request)),l(3),p("ngIf",t.ResponseCode!="200"&&t.ResponseCode!="201"),l(10),d(L(82,19,t.response)))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();var Mt=()=>["/menu/log/exception/detail"],Rt=o=>({ID:o});function Nt(o,g){if(o&1&&(i(0,"tr")(1,"td",12),N(2,"img",13),n(),i(3,"td"),r(4),_(5,"date"),n(),i(6,"td")(7,"a",14),r(8),n()(),i(9,"td")(10,"div",15),r(11),n(),i(12,"div"),r(13),n()()()),o&2){let e=g.$implicit;l(2),p("src",e.logo,H),l(2),d(E(5,7,e.date,"dd-MM-yyyy hh:mm:ss")),l(3),p("routerLink",U(10,Mt))("queryParams",A(11,Rt,e.id)),l(),k(" ",e.number," "),l(3),d(e.message),l(2),d(e.stackTrace)}}function Pt(o,g){if(o&1){let e=R();j(0),i(1,"mat-paginator",16),w("page",function(t){c(e);let m=v(2);return u(m.onPaginationChange(t))}),n(),q()}if(o&2){let e=v(2);l(),p("length",e.pageTotal)("pageSize",e.pageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function Lt(o,g){if(o&1&&(j(0),i(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),r(6,"Channel"),n(),i(7,"th",9),r(8,"Date"),n(),i(9,"th"),r(10,"Number"),n(),i(11,"th"),r(12,"Exception"),n()()(),i(13,"tbody"),f(14,Nt,14,13,"tr",10),n()(),f(15,Pt,2,3,"ng-container",11),n(),q()),o&2){let e=v();l(14),p("ngForOf",e.exceptions),l(),p("ngIf",(e.exceptions==null?null:e.exceptions.length)>0)}}function Ot(o,g){o&1&&(i(0,"div",17),N(1,"app-empty-state"),n())}var Ye=(()=>{class o{constructor(e){this.http=e,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(e=>{this.exceptions=e.hits.map(a=>({id:a._id,logo:V.getChannelLogoByName(a._source.error?.Type),number:a._source.error.number,date:a._source["@timestamp_received"],stackTrace:a._source.error.stackTrace,message:a._source.message,requestJSON:a._source?.error?.requestJSON})),this.pageTotal=e.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getData()}static{this.\u0275fac=function(a){return new(a||o)(h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-log"]],standalone:!1,decls:8,vars:2,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","140px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-center"],[2,"width","25px",3,"src"],[3,"routerLink","queryParams"],[1,"fw-bold"],[3,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1&&(i(0,"mainpanel",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4),f(5,Lt,16,2,"ng-container",5)(6,Ot,2,0,"ng-template",null,0,J),n()()()()()),a&2){let m=z(7);l(5),p("ngIf",t.exceptions.length>0)("ngIfElse",m)}},dependencies:[Y,I,P,M,Z,K,T],encapsulation:2})}}return o})();var Ke=(()=>{class o{constructor(e){this.httpService=e}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(ye(t=>t?.hits[0]?._source))}static{this.\u0275fac=function(a){return new(a||o)(be(D))}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function Vt(o,g){if(o&1&&(i(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),r(6,"General"),n()(),i(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),_(16,"date"),n()()()(),i(17,"div",9)(18,"div",10)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",9)(25,"div",10)(26,"label"),r(27,"Type"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",9)(32,"div",10)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()()()()()()(),i(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),r(43,"Request"),n()(),i(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),r(48),_(49,"json"),n()()()()()(),i(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),r(54,"Exception"),n()(),i(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),r(59),n(),i(60,"pre"),r(61),n()()()()()()()()),o&2){let e=g.ngIf;l(15),d(E(16,7,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),l(8),d(e==null||e.error==null?null:e.error.number),l(7),d(e==null||e.error==null?null:e.error.Type),l(7),d(e==null?null:e.shopId),l(11),d(L(49,10,e==null||e.error==null?null:e.error.requestJSON)),l(11),d(e==null?null:e.message),l(2),d(e==null||e.error==null?null:e.error.stackTrace)}}var Ze=(()=>{class o{constructor(e,a){this.activatedRoute=e,this.exceptionService=a,this.invoiceNumber=""}ngOnInit(){let e=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(e?.ID)}getExceptionDetail(e){this.exceptionDetail$=this.exceptionService.getExceptionDetail(e).pipe(Se(a=>{this.invoiceNumber=a?.error?.number}),Ce(1))}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(Ke))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-detail"]],standalone:!1,decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"],[1,"fw-bold"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"content"),f(2,Vt,62,12,"div",1),_(3,"async"),n()()),a&2&&(p("headerTitle","Order #"+t.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngIf",L(3,4,t.exceptionDetail$)))},dependencies:[I,M,we,F,T],encapsulation:2})}}return o})();function Wt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let e=v();l(6),d(e.ProcessedCode)}}function Bt(o,g){if(o&1){let e=R();i(0,"a",16),w("click",function(){c(e);let t=v();return u(t.Retry())}),r(1,"Retry"),n()}}var Qe=(()=>{class o{constructor(e,a){this.route=e,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(t=>{this.ID=t.ID,this.Load()})}Retry(){var e={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",e).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var e={ID:this.ID};this.http.post("/api/Orders/GetDetailSyncOrder",e).subscribe(a=>{for(let t of a.hits)this.Number=t._source.log.number,this.MarketTypeString=t._source.log.type,this.ResponseCode=t._source.log.responseCode,this.POSActionTypeString=t._source.message,this.ProcessDuration=0,this.Created=t._source["@timestamp_received"],this.request=V.IsNotEmpty(t._source?.log?.request)?JSON.parse(t._source.log?.request):"",this.response=V.IsNotEmpty(t._source?.log?.response)?JSON.parse(t._source.log?.response):"",this.shopId=t._source.shopId,this.ProcessedCode=t._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail-user"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),_(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,Wt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),_(69,"json"),n()()(),i(70,"actions",14),f(71,Bt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),_(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),d(E(21,14,t.Created,"dd MMM yyyy HH:mm:ss")),l(8),d(t.Number),l(7),d(t.MarketTypeString),l(7),d(t.ResponseCode),l(7),d(t.shopId),l(),p("ngIf",t.ProcessedCode!=null),l(7),d(t.POSActionTypeString),l(11),d(L(69,17,t.request)),l(3),p("ngIf",t.ResponseCode!="200"&&t.ResponseCode!="201"),l(10),d(L(82,19,t.response)))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();var At=[{path:"",component:We,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:qe,canActivate:[W],data:{title:"Order Log"}},{path:"inventory/sync-inventory",component:Ge,canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"rawlog",component:He,canActivate:[W],data:{title:"Raw Log"}},{path:"rawlog/detail",component:ze,canActivate:[W],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",component:Ue,canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",component:Je,canActivate:[W],data:{title:"Order Details"}},{path:"order/detail-user",component:Qe,canActivate:[W],data:{title:"Order User Details"}},{path:"exception",component:Ye,canActivate:[W],data:{title:"Exception Log"}},{path:"exception/detail",component:Ze,canActivate:[W],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-I6PVQBH3.js").then(o=>o.InventoryAsyncLogComponent),canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-XR4JKTPA.js").then(o=>o.InventoryAsyncDetailComponent),canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-CAGSG3DY.js").then(o=>o.ChannelLogComponent)},canActivate:[W],data:{title:"Authorization Log"}}]}],Xe=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=ne({type:o})}static{this.\u0275inj=ie({imports:[ge,he.forChild(At)]})}}return o})();var $e=(()=>{class o{static \u0275fac=function(a){return new(a||o)};static \u0275mod=ne({type:o});static \u0275inj=ie({})}return o})();var en=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=ne({type:o})}static{this.\u0275inj=ie({imports:[ge,De,Me,Xe,he,Le,$e,Ve,Re,ke,Q,Pe]})}}return o})();export{en as LogsModule};
1
+ import{a as Q}from"./chunk-52GRE6TF.js";import"./chunk-77IUCPIQ.js";import{a as K}from"./chunk-6HVHZ3HN.js";import{a as Oe,b as ke}from"./chunk-ARIW575T.js";import"./chunk-OVYL7SOO.js";import"./chunk-T7KM2WP6.js";import"./chunk-VOISFPEM.js";import"./chunk-BSATGCWC.js";import"./chunk-6A4PYMCJ.js";import"./chunk-3RK6DDJD.js";import{a as Z,b as Ve}from"./chunk-WYOXUN3H.js";import"./chunk-23MIIDCT.js";import"./chunk-SD7UKXTX.js";import{a as W}from"./chunk-4RQOSK5F.js";import"./chunk-E24BKGBJ.js";import"./chunk-VKJAFLQ6.js";import"./chunk-TY4H2W6F.js";import"./chunk-SDUUFQUI.js";import"./chunk-HPS3WVU5.js";import"./chunk-R5IDWUP6.js";import"./chunk-4RAOUTR2.js";import{a as de,b as pe,d as me,e as Re}from"./chunk-TTAS23MO.js";import"./chunk-HA5WIDED.js";import"./chunk-AFMNWVBL.js";import"./chunk-EQ2ZKEVE.js";import{j as se}from"./chunk-PRTTKQS3.js";import{e as D}from"./chunk-JSPVOV7M.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-ORPJLSXE.js";import{l as M,m as Le}from"./chunk-XOT2SZPE.js";import{r as Ne,s as Pe}from"./chunk-AKJ4I7KF.js";import"./chunk-2NECQ3RY.js";import{c as oe,h as re,m as ae,o as le,t as Ie,u as Te,y as De,z as Me}from"./chunk-AI4XRCAL.js";import{c as V}from"./chunk-W6T7TOHE.js";import{E as B,F as Ee,H as P,J as he,d as ue,f as Y,g as I,j as we,k as T,l as F,n as ge}from"./chunk-B6POIFQM.js";import{Dc as z,Eb as x,Ec as r,Fb as ne,Fc as d,Gc as k,Ic as y,Jc as C,Kb as f,Kc as S,Nc as U,Oc as A,Wb as p,Xc as _,Yc as L,Z as Ce,Zc as E,_b as xe,_c as J,ea as Se,gc as i,hc as n,ic as N,ja as ce,jc as j,ka as ie,kc as q,mc as R,oa as be,ob as H,qb as l,rc as w,sc as v,v as ye,wb as h,ya as c,za as u}from"./chunk-EIQCOZF5.js";import"./chunk-K2H6WANG.js";var We=(()=>{class o{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"}]}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-logs"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),N(3,"nav-tab",2),n()()(),N(4,"router-outlet")),a&2&&(l(3),p("Tabs",t.ObjectlogTabs))},dependencies:[Ee,Oe],encapsulation:2})}}return o})();var X=(()=>{class o{constructor(){}get Data(){return this._Data}set Data(e){this._Data=e}Fill(e){return this._Data.find(a=>a._id==e)}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var et=()=>["/menu/log/order/detail-user"],tt=o=>({ID:o}),it=o=>({"bg-warning":o});function nt(o,g){if(o&1&&(i(0,"span",22),N(1,"img",23),n(),r(2)),o&2){let e=g.item;l(),p("src",e.Img,H)("alt",e.Name),l(),k(" ",e.Name," ")}}function ot(o,g){o&1&&(i(0,"th",27)(1,"span",33),r(2," Response Body Warning "),n()())}function rt(o,g){o&1&&(i(0,"th")(1,"span",33),r(2," Number Override "),n()())}function at(o,g){if(o&1&&(i(0,"td",27)(1,"span",36),r(2),n()()),o&2){let e=v().$implicit;l(),p("ngClass",A(2,it,e.responseBodyWarning!=null)),l(),d(e.responseBodyWarning)}}function lt(o,g){if(o&1&&(i(0,"td"),r(1),n()),o&2){let e=v().$implicit;l(),k(" ",e.ResponseBodyWarningReference," ")}}function st(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",34),r(3),_(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td",27)(12,"span",35),r(13),n()(),f(14,at,3,4,"td",29)(15,lt,2,1,"td",30),n()),o&2){let e=g.$implicit,a=v(2);l(2),p("routerLink",U(14,et))("queryParams",A(15,tt,e.ID)),l(),k(" ",E(4,11,e.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),d(e.MarketTypeString),l(2),d(e.POSActionTypeString),l(2),d(e.Number),l(2),xe(e.ResponseCode===200||e.ResponseCode===202?"bg-success":"bg-warning"),l(),k(" ",e.ResponseCode," "),l(),p("ngIf",a.responseBodyWarningVisible),l(),p("ngIf",a.responseBodyWarningVisible)}}function dt(o,g){if(o&1){let e=R();j(0),i(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),r(6,"Date"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"Actions"),n(),i(11,"th"),r(12,"Number"),n(),i(13,"th",27)(14,"span",28),r(15," Response Code "),n()(),f(16,ot,3,0,"th",29)(17,rt,3,0,"th",30),n()(),i(18,"tbody"),f(19,st,16,17,"tr",31),n()(),i(20,"mat-paginator",32),w("page",function(t){c(e);let m=v();return u(m.changePage(t))}),n()(),q()}if(o&2){let e=v();l(16),p("ngIf",e.responseBodyWarningVisible),l(),p("ngIf",e.responseBodyWarningVisible),l(2),p("ngForOf",e.Result),l(),p("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function pt(o,g){o&1&&(i(0,"div",37),N(1,"app-empty-state"),n())}var qe=(()=>{class o{constructor(e,a,t,m){this.http=e,this._RawLogService=a,this.route=t,this.authService=m,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(e=>{this.responseCode=e.responseCode,this.responseCode!=null?this.Load(e):this.Load()})}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(e){this.filter.Number=e,this.http.post("/api/Orders/Get",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let t of a.hits){t._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let m={ID:t._id,Created:t._source["@timestamp_received"],shopId:t._source.shopId,MarketTypeString:t._source.log.type,POSActionTypeString:t._source.message,Number:t._source.log.number,ResponseCode:t._source.log.responseCode,responseBodyWarning:t._source.log.responseBodyWarning,ResponseBodyWarningReference:t._source.log.ResponseBodyWarningReference};this.Result.push(m)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(D),h(X),h(B),h(se))}}static{this.\u0275cmp=x({type:o,selectors:[["app-order"]],standalone:!1,decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=R();i(0,"mainpanel",1),S("textChange",function(s){return c(m),C(t.Number,s)||(t.Number=s),u(s)}),w("onSubmit",function(s){return c(m),u(t.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),S("ngModelChange",function(s){return c(m),C(t.filter.ChannelID,s)||(t.filter.ChannelID=s),u(s)}),f(6,nt,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",2),r(9,"Action"),n(),i(10,"ng-select",6),S("ngModelChange",function(s){return c(m),C(t.filter.ActionType,s)||(t.filter.ActionType=s),u(s)}),n()(),i(11,"div",5)(12,"label",7),r(13,"From/To"),n(),i(14,"div",8)(15,"datepicker",9),S("dateChange",function(s){return c(m),C(t.filter.From,s)||(t.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",10),S("dateChange",function(s){return c(m),C(t.filter.To,s)||(t.filter.To=s),u(s)}),n()()(),i(18,"div",5)(19,"label",11),r(20,"Response Code"),n(),i(21,"input",12),S("ngModelChange",function(s){return c(m),C(t.filter.StatusCode,s)||(t.filter.StatusCode=s),u(s)}),n()(),i(22,"div",5)(23,"label",11),r(24,"Response Body Warning"),n(),i(25,"input",13),S("ngModelChange",function(s){return c(m),C(t.filter.responseBodyWarning,s)||(t.filter.responseBodyWarning=s),u(s)}),n(),i(26,"datalist",14),N(27,"option",15),n()(),i(28,"div",5)(29,"label",11),r(30,"Page Number"),n(),i(31,"input",16),S("ngModelChange",function(s){return c(m),C(t.filter.PageNumber,s)||(t.filter.PageNumber=s),u(s)}),n()(),i(32,"div",5)(33,"label",11),r(34,"Page Size"),n(),i(35,"input",17),S("ngModelChange",function(s){return c(m),C(t.filter.RowCount,s)||(t.filter.RowCount=s),u(s)}),n()()(),i(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),f(40,dt,21,6,"ng-container",21)(41,pt,2,0,"ng-template",null,0,J),n()()()()()}if(a&2){let m=z(42);y("text",t.Number),l(5),p("clearable",!0)("items",t.channelOptions),y("ngModel",t.filter.ChannelID),l(5),p("clearable",!0)("items",t.ActionTypeList),y("ngModel",t.filter.ActionType),l(5),y("date",t.filter.From),l(2),y("date",t.filter.To),l(4),y("ngModel",t.filter.StatusCode),l(4),y("ngModel",t.filter.responseBodyWarning),l(6),y("ngModel",t.filter.PageNumber),l(4),y("ngModel",t.filter.RowCount),l(5),p("ngIf",(t.Result==null?null:t.Result.length)>0)("ngIfElse",m)}},dependencies:[ue,Y,I,Ie,Te,oe,le,re,ae,P,M,Z,me,de,pe,Q,K,Ne,T],encapsulation:2})}}return o})();var mt=o=>({"bg-gradient-warning":o}),ct=()=>["/menu/log/inventory/sync-inventory/detail"],ut=o=>({ID:o});function gt(o,g){if(o&1&&(i(0,"span",19),N(1,"img",20),n(),r(2)),o&2){let e=g.item;l(),p("src",e.Img,H)("alt",e.Name),l(),k(" ",e.Name," ")}}function ht(o,g){if(o&1&&(i(0,"tr",26)(1,"td")(2,"a",27),r(3),_(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td"),r(12),n()()),o&2){let e=g.$implicit;p("ngClass",A(11,mt,e.ResponseCode==400)),l(2),p("routerLink",U(13,ct))("queryParams",A(14,ut,e.ID)),l(),k(" ",E(4,8,e.Created,"dd MMM yyyy HH:mm")," "),l(3),d(e.channelName),l(2),d(e.Sku),l(2),d(e.Stock),l(2),d(e.ResponseCode)}}function ft(o,g){if(o&1){let e=R();j(0),i(1,"div",21)(2,"table",22)(3,"thead")(4,"tr",23)(5,"th"),r(6,"Created"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"SKU"),n(),i(11,"th"),r(12,"Stock"),n(),i(13,"th"),r(14,"Response code"),n()()(),i(15,"tbody"),f(16,ht,13,16,"tr",24),n()(),i(17,"mat-paginator",25),w("page",function(t){c(e);let m=v();return u(m.changePage(t))}),n()(),q()}if(o&2){let e=v();l(16),p("ngForOf",e.Result),l(),p("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function vt(o,g){o&1&&(i(0,"div",28),N(1,"app-empty-state"),n())}var Ge=(()=>{class o{constructor(e,a,t){this.http=e,this._RawLogService=a,this.authService=t,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(e=>{this.filter=e.Filter,this.ActionTypeList=e.Options.ActionTypeList,this.Get()})}Get(e){e!=null&&(this.filter.Sku=e),this.http.post("api/Inventory/GetLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let t of a.hits){let m={ID:t._source.log.id,Created:t._source["@timestamp_received"],channelName:t._source.log.channelName,Sku:t._source.log.sku,Stock:t._source.log.stock,ResponseCode:t._source.log.responseCode};this.Result.push(m)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(D),h(X),h(se))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-log"]],standalone:!1,decls:33,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Inventory Sync","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=R();i(0,"mainpanel",1),S("textChange",function(s){return c(m),C(t.filter.Sku,s)||(t.filter.Sku=s),u(s)}),w("onSubmit",function(s){return c(m),u(t.Get(s))}),i(1,"actions")(2,"a",2),r(3," Order Inventory Sync Job "),n()(),i(4,"filters")(5,"div",3)(6,"div")(7,"label",4),r(8,"Channel"),n(),i(9,"ng-select",5),S("ngModelChange",function(s){return c(m),C(t.filter.ChannelID,s)||(t.filter.ChannelID=s),u(s)}),f(10,gt,3,3,"ng-template",6),n()(),i(11,"div",7)(12,"label",8),r(13,"From/To"),n(),i(14,"div",9)(15,"datepicker",10),S("dateChange",function(s){return c(m),C(t.filter.From,s)||(t.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",11),S("dateChange",function(s){return c(m),C(t.filter.To,s)||(t.filter.To=s),u(s)}),n()()(),i(18,"div",7)(19,"label",12),r(20,"Page Number"),n(),i(21,"input",13),S("ngModelChange",function(s){return c(m),C(t.filter.PageNumber,s)||(t.filter.PageNumber=s),u(s)}),n()(),i(22,"div",7)(23,"label",12),r(24,"Page Size"),n(),i(25,"input",14),S("ngModelChange",function(s){return c(m),C(t.filter.RowCount,s)||(t.filter.RowCount=s),u(s)}),n()()()(),i(26,"content")(27,"div",15)(28,"div",16)(29,"div",17),f(30,ft,18,4,"ng-container",18)(31,vt,2,0,"ng-template",null,0,J),n()()()()()}if(a&2){let m=z(32);y("text",t.filter.Sku),l(9),p("clearable",!0)("items",t.channelOptions),y("ngModel",t.filter.ChannelID),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(4),y("ngModel",t.filter.PageNumber),l(4),y("ngModel",t.filter.RowCount),l(5),p("ngIf",(t.Result==null?null:t.Result.length)>0)("ngIfElse",m)}},dependencies:[ue,Y,I,oe,le,re,ae,P,M,Z,me,de,pe,Q,K,T],encapsulation:2})}}return o})();var _t=()=>["/menu/log/rawlog/detail"],yt=o=>({ID:o});function Ct(o,g){if(o&1&&(i(0,"span",17),N(1,"img",18),n(),r(2)),o&2){let e=g.item;l(),p("src",e.Img,H)("alt",e.Name),l(),k(" ",e.Name," ")}}function St(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",25),r(3),_(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n()()),o&2){let e=g.$implicit;l(2),p("routerLink",U(9,_t))("queryParams",A(10,yt,e.id)),l(),k(" ",E(4,6,e.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),d(e.type),l(2),d(e.number),l(2),d(e.message)}}function bt(o,g){if(o&1){let e=R();j(0),i(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),r(6,"Date"),n(),i(7,"th"),r(8,"Type"),n(),i(9,"th"),r(10,"Number"),n(),i(11,"th"),r(12,"Message"),n()()(),i(13,"tbody"),f(14,St,11,12,"tr",23),n()(),i(15,"mat-paginator",24),w("page",function(t){c(e);let m=v();return u(m.changePage(t))}),n()(),q()}if(o&2){let e=v();l(14),p("ngForOf",e.Result),l(),p("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function xt(o,g){o&1&&(i(0,"div",26),N(1,"app-empty-state"),n())}var He=(()=>{class o{constructor(e,a,t){this.http=e,this._RawLogService=a,this.authService=t,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(e){this.filter.Number=e,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let t of a.hits){let m={id:t._id,message:t._source.message,responseCode:t._source.log.responseCode,processTypeString:t._source.log.processType,type:t._source.log.type,number:t._source.log.number,Created:t._source["@timestamp_received"]};this.Result.push(m)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(D),h(X),h(se))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-log"]],standalone:!1,decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=R();i(0,"mainpanel",1),S("textChange",function(s){return c(m),C(t.filter.Number,s)||(t.filter.Number=s),u(s)}),w("onSubmit",function(s){return c(m),u(t.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),S("ngModelChange",function(s){return c(m),C(t.filter.ChannelID,s)||(t.filter.ChannelID=s),u(s)}),f(6,Ct,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",6),r(9,"From/To"),n(),i(10,"div",7)(11,"datepicker",8),S("dateChange",function(s){return c(m),C(t.filter.From,s)||(t.filter.From=s),u(s)}),n()(),i(12,"div")(13,"datepicker",9),S("dateChange",function(s){return c(m),C(t.filter.To,s)||(t.filter.To=s),u(s)}),n()()(),i(14,"div",5)(15,"label",10),r(16,"Page Number"),n(),i(17,"input",11),S("ngModelChange",function(s){return c(m),C(t.filter.PageNumber,s)||(t.filter.PageNumber=s),u(s)}),n()(),i(18,"div",5)(19,"label",10),r(20,"Page Size"),n(),i(21,"input",12),S("ngModelChange",function(s){return c(m),C(t.filter.RowCount,s)||(t.filter.RowCount=s),u(s)}),n()()(),i(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),f(26,bt,16,4,"ng-container",16)(27,xt,2,0,"ng-template",null,0,J),n()()()()()}if(a&2){let m=z(28);y("text",t.filter.Number),l(5),p("clearable",!0)("items",t.channelOptions),y("ngModel",t.filter.ChannelID),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(4),y("ngModel",t.filter.PageNumber),l(4),y("ngModel",t.filter.RowCount),l(5),p("ngIf",(t.Result==null?null:t.Result.length)>0)("ngIfElse",m)}},dependencies:[Y,I,oe,le,re,ae,P,M,Z,me,de,pe,Q,K,T],encapsulation:2})}}return o})();function wt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let e=v();l(6),d(e.ProcessedCode)}}function Et(o,g){if(o&1){let e=R();i(0,"a",16),w("click",function(){c(e);let t=v();return u(t.Retry())}),r(1,"Retry"),n()}}var ze=(()=>{class o{constructor(e,a){this.route=e,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(t=>{this.ID=t.ID,this.Load()})}Retry(){var e={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",e).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var e={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",e).subscribe(a=>{for(let t of a.hits)this.Number=t._source.log.number,this.MarketTypeString=t._source.log.type,this.ResponseCode=t._source.log.responseCode,this.POSActionTypeString=t._source.message,this.ProcessDuration=0,this.Created=t._source["@timestamp_received"],this.request=V.IsNotEmpty(t._source?.log?.request)?JSON.parse(t._source.log?.request):"",this.response=V.IsNotEmpty(t._source?.log?.response)?JSON.parse(t._source.log?.response):"",this.shopId=t._source.shopId,this.ProcessedCode=t._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-detail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),_(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,wt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),_(69,"json"),n()()(),i(70,"actions",14),f(71,Et,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),_(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),d(E(21,14,t.Created,"dd MMM yyyy HH:mm:ss")),l(8),d(t.Number),l(7),d(t.MarketTypeString),l(7),d(t.ResponseCode),l(7),d(t.shopId),l(),p("ngIf",t.ProcessedCode!=null),l(7),d(t.POSActionTypeString),l(11),d(L(69,17,t.request)),l(3),p("ngIf",t.ResponseCode!="200"&&t.ResponseCode!="201"),l(10),d(L(82,19,t.response)))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();function It(o,g){if(o&1&&(i(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),r(4,"General"),n()(),i(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),r(10,"Date"),n(),i(11,"div")(12,"span"),r(13),_(14,"date"),n()()()(),i(15,"div",6)(16,"div",12)(17,"label"),r(18,"SKU"),n(),i(19,"div")(20,"span"),r(21),n()()()(),i(22,"div",6)(23,"div",12)(24,"label"),r(25,"Channel"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",6)(30,"div",12)(31,"label"),r(32,"Response Code"),n(),i(33,"div")(34,"span"),r(35),n()()()()()()()()),o&2){let e=v();l(13),d(E(14,4,e.data.Created,"dd MMM yyyy")),l(8),d(e.data.Sku),l(7),d(e.data.ChannelName),l(7),d(e.data.ResponseCode)}}var Ue=(()=>{class o{constructor(e,a,t){this.route=e,this.http=a,this._RawLogService=t,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(m=>{this.ID=m.ID,this.Load()})}ngOnInit(){}Load(){var e={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",e).subscribe(a=>{this.data.Created=a.hits[0]._source["@timestamp_received"],this.data.Sku=a.hits[0]._source.log.sku,this.data.ChannelName=a.hits[0]._source.log.channelName,this.data.ResponseCode=a.hits[0]._source.log.responseCode,this.request=V.IsNotEmpty(a.hits[0]?._source.log?.request)?JSON.parse(a.hits[0]?._source?.log?.request):"",this.response=a.hits[0]._source.log.response})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D),h(X))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-detail"]],standalone:!1,decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3),f(7,It,36,7,"div",4),n(),i(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),r(13,"Request"),n()(),i(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),r(18),_(19,"json"),n()()()()()(),i(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),r(24,"Response"),n()(),i(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),r(29),n()()()()()()()()()()),a&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(7),p("ngIf",t.data),l(11),d(L(19,5,t.request)),l(11),d(t.response))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();function Tt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let e=v();l(6),d(e.ProcessedCode)}}function Dt(o,g){if(o&1){let e=R();i(0,"a",16),w("click",function(){c(e);let t=v();return u(t.Retry())}),r(1,"Retry"),n()}}var Je=(()=>{class o{constructor(e,a){this.route=e,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(t=>{this.ID=t.ID,this.Load()})}Retry(){var e={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",e).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var e={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",e).subscribe(a=>{for(let t of a.hits)this.Number=t._source.log.number,this.MarketTypeString=t._source.log.type,this.ResponseCode=t._source.log.responseCode,this.POSActionTypeString=t._source.message,this.ProcessDuration=0,this.Created=t._source["@timestamp_received"],this.request=V.IsNotEmpty(t._source?.log?.request)?JSON.parse(t._source.log?.request):"",this.response=V.IsNotEmpty(t._source?.log?.response)?JSON.parse(t._source.log?.response):"",this.shopId=t._source.shopId,this.ProcessedCode=t._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),_(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,Tt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),_(69,"json"),n()()(),i(70,"actions",14),f(71,Dt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),_(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),d(E(21,14,t.Created,"dd MMM yyyy HH:mm:ss")),l(8),d(t.Number),l(7),d(t.MarketTypeString),l(7),d(t.ResponseCode),l(7),d(t.shopId),l(),p("ngIf",t.ProcessedCode!=null),l(7),d(t.POSActionTypeString),l(11),d(L(69,17,t.request)),l(3),p("ngIf",t.ResponseCode!="200"&&t.ResponseCode!="201"),l(10),d(L(82,19,t.response)))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();var Mt=()=>["/menu/log/exception/detail"],Rt=o=>({ID:o});function Nt(o,g){if(o&1&&(i(0,"tr")(1,"td",12),N(2,"img",13),n(),i(3,"td"),r(4),_(5,"date"),n(),i(6,"td")(7,"a",14),r(8),n()(),i(9,"td")(10,"div",15),r(11),n(),i(12,"div"),r(13),n()()()),o&2){let e=g.$implicit;l(2),p("src",e.logo,H),l(2),d(E(5,7,e.date,"dd-MM-yyyy hh:mm:ss")),l(3),p("routerLink",U(10,Mt))("queryParams",A(11,Rt,e.id)),l(),k(" ",e.number," "),l(3),d(e.message),l(2),d(e.stackTrace)}}function Pt(o,g){if(o&1){let e=R();j(0),i(1,"mat-paginator",16),w("page",function(t){c(e);let m=v(2);return u(m.onPaginationChange(t))}),n(),q()}if(o&2){let e=v(2);l(),p("length",e.pageTotal)("pageSize",e.pageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function Lt(o,g){if(o&1&&(j(0),i(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),r(6,"Channel"),n(),i(7,"th",9),r(8,"Date"),n(),i(9,"th"),r(10,"Number"),n(),i(11,"th"),r(12,"Exception"),n()()(),i(13,"tbody"),f(14,Nt,14,13,"tr",10),n()(),f(15,Pt,2,3,"ng-container",11),n(),q()),o&2){let e=v();l(14),p("ngForOf",e.exceptions),l(),p("ngIf",(e.exceptions==null?null:e.exceptions.length)>0)}}function Ot(o,g){o&1&&(i(0,"div",17),N(1,"app-empty-state"),n())}var Ye=(()=>{class o{constructor(e){this.http=e,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(e=>{this.exceptions=e.hits.map(a=>({id:a._id,logo:V.getChannelLogoByName(a._source.error?.Type),number:a._source.error.number,date:a._source["@timestamp_received"],stackTrace:a._source.error.stackTrace,message:a._source.message,requestJSON:a._source?.error?.requestJSON})),this.pageTotal=e.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getData()}static{this.\u0275fac=function(a){return new(a||o)(h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-log"]],standalone:!1,decls:8,vars:2,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","140px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-center"],[2,"width","25px",3,"src"],[3,"routerLink","queryParams"],[1,"fw-bold"],[3,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1&&(i(0,"mainpanel",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4),f(5,Lt,16,2,"ng-container",5)(6,Ot,2,0,"ng-template",null,0,J),n()()()()()),a&2){let m=z(7);l(5),p("ngIf",t.exceptions.length>0)("ngIfElse",m)}},dependencies:[Y,I,P,M,Z,K,T],encapsulation:2})}}return o})();var Ke=(()=>{class o{constructor(e){this.httpService=e}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(ye(t=>t?.hits[0]?._source))}static{this.\u0275fac=function(a){return new(a||o)(be(D))}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function Vt(o,g){if(o&1&&(i(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),r(6,"General"),n()(),i(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),_(16,"date"),n()()()(),i(17,"div",9)(18,"div",10)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",9)(25,"div",10)(26,"label"),r(27,"Type"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",9)(32,"div",10)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()()()()()()(),i(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),r(43,"Request"),n()(),i(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),r(48),_(49,"json"),n()()()()()(),i(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),r(54,"Exception"),n()(),i(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),r(59),n(),i(60,"pre"),r(61),n()()()()()()()()),o&2){let e=g.ngIf;l(15),d(E(16,7,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),l(8),d(e==null||e.error==null?null:e.error.number),l(7),d(e==null||e.error==null?null:e.error.Type),l(7),d(e==null?null:e.shopId),l(11),d(L(49,10,e==null||e.error==null?null:e.error.requestJSON)),l(11),d(e==null?null:e.message),l(2),d(e==null||e.error==null?null:e.error.stackTrace)}}var Ze=(()=>{class o{constructor(e,a){this.activatedRoute=e,this.exceptionService=a,this.invoiceNumber=""}ngOnInit(){let e=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(e?.ID)}getExceptionDetail(e){this.exceptionDetail$=this.exceptionService.getExceptionDetail(e).pipe(Se(a=>{this.invoiceNumber=a?.error?.number}),Ce(1))}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(Ke))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-detail"]],standalone:!1,decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"],[1,"fw-bold"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"content"),f(2,Vt,62,12,"div",1),_(3,"async"),n()()),a&2&&(p("headerTitle","Order #"+t.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngIf",L(3,4,t.exceptionDetail$)))},dependencies:[I,M,we,F,T],encapsulation:2})}}return o})();function Wt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let e=v();l(6),d(e.ProcessedCode)}}function Bt(o,g){if(o&1){let e=R();i(0,"a",16),w("click",function(){c(e);let t=v();return u(t.Retry())}),r(1,"Retry"),n()}}var Qe=(()=>{class o{constructor(e,a){this.route=e,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(t=>{this.ID=t.ID,this.Load()})}Retry(){var e={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",e).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var e={ID:this.ID};this.http.post("/api/Orders/GetDetailSyncOrder",e).subscribe(a=>{for(let t of a.hits)this.Number=t._source.log.number,this.MarketTypeString=t._source.log.type,this.ResponseCode=t._source.log.responseCode,this.POSActionTypeString=t._source.message,this.ProcessDuration=0,this.Created=t._source["@timestamp_received"],this.request=V.IsNotEmpty(t._source?.log?.request)?JSON.parse(t._source.log?.request):"",this.response=V.IsNotEmpty(t._source?.log?.response)?JSON.parse(t._source.log?.response):"",this.shopId=t._source.shopId,this.ProcessedCode=t._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(B),h(D))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail-user"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),_(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,Wt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),_(69,"json"),n()()(),i(70,"actions",14),f(71,Bt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),_(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),d(E(21,14,t.Created,"dd MMM yyyy HH:mm:ss")),l(8),d(t.Number),l(7),d(t.MarketTypeString),l(7),d(t.ResponseCode),l(7),d(t.shopId),l(),p("ngIf",t.ProcessedCode!=null),l(7),d(t.POSActionTypeString),l(11),d(L(69,17,t.request)),l(3),p("ngIf",t.ResponseCode!="200"&&t.ResponseCode!="201"),l(10),d(L(82,19,t.response)))},dependencies:[I,P,M,F,T],encapsulation:2})}}return o})();var At=[{path:"",component:We,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:qe,canActivate:[W],data:{title:"Order Log"}},{path:"inventory/sync-inventory",component:Ge,canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"rawlog",component:He,canActivate:[W],data:{title:"Raw Log"}},{path:"rawlog/detail",component:ze,canActivate:[W],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",component:Ue,canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",component:Je,canActivate:[W],data:{title:"Order Details"}},{path:"order/detail-user",component:Qe,canActivate:[W],data:{title:"Order User Details"}},{path:"exception",component:Ye,canActivate:[W],data:{title:"Exception Log"}},{path:"exception/detail",component:Ze,canActivate:[W],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-I6PVQBH3.js").then(o=>o.InventoryAsyncLogComponent),canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-XR4JKTPA.js").then(o=>o.InventoryAsyncDetailComponent),canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-M4L72LVB.js").then(o=>o.ChannelLogComponent)},canActivate:[W],data:{title:"Authorization Log"}}]}],Xe=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=ne({type:o})}static{this.\u0275inj=ie({imports:[ge,he.forChild(At)]})}}return o})();var $e=(()=>{class o{static \u0275fac=function(a){return new(a||o)};static \u0275mod=ne({type:o});static \u0275inj=ie({})}return o})();var en=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=ne({type:o})}static{this.\u0275inj=ie({imports:[ge,De,Me,Xe,he,Le,$e,Ve,Re,ke,Q,Pe]})}}return o})();export{en as LogsModule};