marketplacepos 5.51.0 → 5.51.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-53B6D5OR.js → chunk-2JS77RTQ.js} +1 -1
- package/Marketplace/{chunk-OPCGCQMZ.js → chunk-2MC4ICGX.js} +1 -1
- package/Marketplace/{chunk-SLQ42VND.js → chunk-3OPIBKGC.js} +1 -1
- package/Marketplace/{chunk-7RIUHK6K.js → chunk-4H6YQH5Y.js} +1 -1
- package/Marketplace/{chunk-25Q56ATV.js → chunk-5EGTHBHU.js} +1 -1
- package/Marketplace/{chunk-E6W25RW5.js → chunk-5ZKD2ZJE.js} +1 -1
- package/Marketplace/{chunk-2PMJPSC4.js → chunk-6KAANNEH.js} +2 -2
- package/Marketplace/{chunk-C64L25TP.js → chunk-6ZRATZJD.js} +1 -1
- package/Marketplace/{chunk-6DGG765N.js → chunk-772J5O6W.js} +1 -1
- package/Marketplace/{chunk-YF7CCYHF.js → chunk-7RPUDPF6.js} +1 -1
- package/Marketplace/{chunk-J4RDYEJC.js → chunk-A24BFVXA.js} +1 -1
- package/Marketplace/{chunk-LOVYZLSU.js → chunk-BQFOS7WM.js} +1 -1
- package/Marketplace/{chunk-LWUMLKSO.js → chunk-CKH47T4N.js} +1 -1
- package/Marketplace/{chunk-T3CN3WQD.js → chunk-D765LK7G.js} +1 -1
- package/Marketplace/{chunk-36OIR6DM.js → chunk-E22EMCMR.js} +1 -1
- package/Marketplace/{chunk-VBVBTC2P.js → chunk-FSLUPR5I.js} +1 -1
- package/Marketplace/{chunk-364CDNZV.js → chunk-FYQFBMXR.js} +1 -1
- package/Marketplace/{chunk-ILFUI3MT.js → chunk-GJANGM3E.js} +1 -1
- package/Marketplace/{chunk-Q5IVQP3E.js → chunk-GRQA7Y7Y.js} +1 -1
- package/Marketplace/{chunk-ZMSM2NR7.js → chunk-GYCHAJYH.js} +1 -1
- package/Marketplace/{chunk-SASGSPGQ.js → chunk-HEK6DTVD.js} +1 -1
- package/Marketplace/{chunk-3Q6QZGLZ.js → chunk-HIGPOY23.js} +1 -1
- package/Marketplace/{chunk-AZEH7PMO.js → chunk-JNBROTGJ.js} +1 -1
- package/Marketplace/{chunk-GD5I7ADU.js → chunk-LI2DXLEI.js} +1 -1
- package/Marketplace/{chunk-EX4C4ZW4.js → chunk-LITY3VSE.js} +1 -1
- package/Marketplace/{chunk-A4X7F4MN.js → chunk-LPJSEQGR.js} +1 -1
- package/Marketplace/{chunk-EGJMTFNO.js → chunk-M3EGUVW7.js} +1 -1
- package/Marketplace/{chunk-HZTKN5RX.js → chunk-NJYWKADT.js} +1 -1
- package/Marketplace/{chunk-7QDKBMEA.js → chunk-NYBCG2UK.js} +1 -1
- package/Marketplace/{chunk-WH76SMZT.js → chunk-PDIHZKEM.js} +1 -1
- package/Marketplace/{chunk-AF6XAQPY.js → chunk-PG2DZ63W.js} +1 -1
- package/Marketplace/chunk-PPG26QRX.js +1 -0
- package/Marketplace/{chunk-BKCKASH3.js → chunk-PRMV4INM.js} +1 -1
- package/Marketplace/{chunk-4JCS7WPV.js → chunk-QCUYDIE3.js} +1 -1
- package/Marketplace/{chunk-HT2MSA66.js → chunk-QKXMWSIJ.js} +1 -1
- package/Marketplace/{chunk-R3BRUX7Z.js → chunk-QREYZRXT.js} +1 -1
- package/Marketplace/{chunk-EYYKWIXP.js → chunk-QVK3OFDS.js} +1 -1
- package/Marketplace/{chunk-BLOGT3TL.js → chunk-RIGKFQ2Q.js} +1 -1
- package/Marketplace/{chunk-ZXFWQ6VJ.js → chunk-RQI26KZX.js} +1 -1
- package/Marketplace/{chunk-T62YFSKW.js → chunk-SU5GJKTU.js} +1 -1
- package/Marketplace/{chunk-TLTFNFAB.js → chunk-TBDHXPBR.js} +1 -1
- package/Marketplace/{chunk-XSOP2OTT.js → chunk-TFCSRACM.js} +1 -1
- package/Marketplace/{chunk-6IZWIEUD.js → chunk-TIGXYFOW.js} +1 -1
- package/Marketplace/{chunk-4ITXH35D.js → chunk-UAQIEHEC.js} +1 -1
- package/Marketplace/{chunk-LCN52IJT.js → chunk-V7V5O62J.js} +1 -1
- package/Marketplace/{chunk-OJI34QN5.js → chunk-VR7NFJRO.js} +1 -1
- package/Marketplace/{chunk-K2CHDL7K.js → chunk-VWETHESQ.js} +1 -1
- package/Marketplace/{chunk-7E6JD2PT.js → chunk-VYYJFRP5.js} +1 -1
- package/Marketplace/{chunk-5YQUGH5Z.js → chunk-W4GP3QI7.js} +1 -1
- package/Marketplace/{chunk-IXNEMOFX.js → chunk-XR3S3ZAY.js} +1 -1
- package/Marketplace/{chunk-ZMMMNVOU.js → chunk-YEVETIZF.js} +1 -1
- package/Marketplace/{chunk-62YNPW6Q.js → chunk-YH3KWMUX.js} +1 -1
- package/Marketplace/{chunk-M5JNIPMS.js → chunk-YM4QLIHR.js} +1 -1
- package/Marketplace/{chunk-XAL6YLNQ.js → chunk-YNWLLBHM.js} +1 -1
- package/Marketplace/{chunk-BVW7WI5I.js → chunk-YTEEAEDW.js} +1 -1
- package/Marketplace/{chunk-WEJBY3OB.js → chunk-Z53UJ4A4.js} +1 -1
- package/Marketplace/{chunk-OMY5ASFA.js → chunk-ZCJEYG3D.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-SOO5LINL.js → main-TW7CIXAJ.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-5NWJOQN5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-PDIHZKEM.js";import{a as d,b as v}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as m}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as a,hc as l,ic as c,jc as p,kc as r,ob as i}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var s=(()=>{let n=class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/void-invoice"},{Title:"All",Url:"/menu/sync-log/all"}]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=a({type:n,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,y){o&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),p()()(),r(4,"router-outlet")),o&2&&(i(3),l("Tabs",y.reportTabs))},dependencies:[v,d,m],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let t=n;return t})();var O=[{path:"",component:s,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",loadComponent(){return import("./chunk-RZXE2MFY.js").then(t=>t.SalesOrderComponent)},canActivate:[e],data:{title:"Sync Order"}},{path:"convert-to-invoice",loadComponent(){return import("./chunk-PCOAEOIL.js").then(t=>t.ConvertInvoiceComponent)},canActivate:[e],data:{title:"Sync Convert to Invoice"}},{path:"invoice",loadComponent(){return import("./chunk-MHIYVGFS.js").then(t=>t.InvoiceComponent)},canActivate:[e],data:{title:"Sync Invoice"}},{path:"delivery",loadComponent(){return import("./chunk-2ZKHC4YC.js").then(t=>t.DeliveryComponent)},canActivate:[e],data:{title:"Sync Delivery"}},{path:"payment",loadComponent(){return import("./chunk-2Y3L7QOV.js").then(t=>t.PaymentComponent)},canActivate:[e],data:{title:"Sync Payment"}},{path:"void-invoice",loadComponent(){return import("./chunk-Z4RYN6X5.js").then(t=>t.VoidInvoiceComponent)},canActivate:[e],data:{title:"Sync void invoice"}},{path:"all",loadComponent(){return import("./chunk-YZQDWPFY.js").then(t=>t.AllComponent)},canActivate:[e],data:{title:"All Report"}}]}];export{O as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le,b as se}from"./chunk-R3BRUX7Z.js";import"./chunk-FH2KAM6J.js";import{a as ce}from"./chunk-A6SP65CH.js";import{c as pe,d as M,e as V}from"./chunk-C67KF7MG.js";import{a as ae}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{a as te,b as ie,c as ne,d as oe}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as $}from"./chunk-BZWZ64N5.js";import{a as re}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as ee}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Y,b as Z}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as X}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-ZSUWHVKX.js";import{h as q}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as D}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as G}from"./chunk-UPRDDI4K.js";import{A as Q,c as J,h as K,m as j,o as z}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as k,e as x}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,w as U}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as E,Hb as L,Ia as b,Nc as g,Rc as P,Sc as f,Tc as _,Uc as B,Z as O,_c as A,ac as T,cc as I,ea as R,hc as u,ic as a,id as S,jc as p,jd as y,kc as v,ob as h,ra as c,rc as N,wc as C,ya as l,yc as w,za as s}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function he(m,d){if(m&1){let F=N();a(0,"button",16),C("click",function(){l(F);let n=w(),e=w();return s(e.onUpdateItems(n))}),v(1,"i",17),g(2," Update "),p()}}function de(m,d){if(m&1&&(a(0,"div"),T(1,he,3,0,"button",15),p()),m&2){let F=w();h(),I(F.productService.hasSelectionVariant(d)?1:-1)}}var qe=(()=>{let d=class d{constructor(){this.http=c(x),this.toastr=c(k),this.dialog=c(X),this.productService=c(ee),this.authService=c(q),this.placeholderService=c(ne),this.infinitePagination=c(M),this.updateResHandling=c(V),this.mainPanelService=c(Y),this.channelOptions=b([]),this.searchFilter=b({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[],SearchType:te.NameOnly,NumberFilterComparator:ie.Contains}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(O()),this.searchPlaceholder=b("Search ...")}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(R(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1,SearchType:t.Filter.SearchType,NumberFilterComparator:t.Filter.NumberFilterComparator},this.initSearchPlaceholder(),this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onShowDifferencePrice(t){let n=1;t&&(n=3),this.searchFilter.update(e=>(e.filterModel=n,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(n=>(n.text=t,n)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels(),this.initSearchPlaceholder()}onUpdateItems(t){let n=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(le,{data:{title:"Updating Price",selectedItems:e,channels:n},width:"400px"}).afterClosed().pipe(E(r=>G.IsNotEmpty(r))).subscribe(r=>{this.channelOptions.set(r),this.updatePrice(t)})}filterSelectedChannels(){let n=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(n)}updatePrice(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let e=n.map(i=>({ID:i.ID,Code:i.Code,Price:i.UnitPrice})),o={ListChannelID:this.getSelectedChannels().map(i=>i.ID),ListPrice:e};this.http.post(D.UpdateChannelPrice,o).subscribe(i=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(i),this.resetSelectedChannels()})}}updatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(D.UpdatePriceById,n).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let n=t?.Response?.success_list,e=t?.Response?.failure_list,r=this.getSelectedChannels();n?.length>0||e?.length>0?this.updateResHandling.responseHandling(n,e,"Price",r):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(ae,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}resetSelectedChannels(){this.channelOptions.update(t=>(t.forEach(n=>{n.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=L({type:d,selectors:[["app-price-pos-channel"]],features:[A([M,W,ce,V])],decls:34,vars:28,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit","searchBoxPlaceHolder"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(n,e){if(n&1){let r=N();B(0),S(1,"async"),a(2,"mainpanel",0),C("onSubmit",function(i){return l(r),s(e.onSearch(i))}),a(3,"actions")(4,"div",1),T(5,de,2,1,"div"),S(6,"async"),a(7,"button",2),C("click",function(){return l(r),s(e.openExportDialog())}),v(8,"i",3),a(9,"span"),g(10,"Export"),p()()()(),a(11,"filters")(12,"div",4)(13,"label",5),g(14,"Channel"),p(),a(15,"app-channel-options-v2",6),_("ngModelChange",function(i){return l(r),f(e.searchFilter().ListChannelID,i)||(e.searchFilter().ListChannelID=i),s(i)}),p()(),a(16,"div",4)(17,"filter-query-type",7),_("numberFilterComparatorChange",function(i){return l(r),f(e.searchFilter().NumberFilterComparator,i)||(e.searchFilter().NumberFilterComparator=i),s(i)})("searchTypeChange",function(i){return l(r),f(e.searchFilter().SearchType,i)||(e.searchFilter().SearchType=i),s(i)}),p()(),a(18,"div",4)(19,"label",8),g(20,"Page Number"),p(),a(21,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().PageNumber,i)||(e.searchFilter().PageNumber=i),s(i)}),p()(),a(22,"div")(23,"label",8),g(24,"Page Size"),p(),a(25,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().RowCount,i)||(e.searchFilter().RowCount=i),s(i)}),p()()(),a(26,"content")(27,"div",10)(28,"div",11)(29,"div",12)(30,"app-table",13),S(31,"async"),C("onToggle",function(i){return l(r),s(e.onShowDifferencePrice(i))})("onSubmit",function(i){return l(r),s(e.updatePriceByVariant(i))}),p(),a(32,"infinite-paginator",14),S(33,"async"),C("onNextPage",function(){return l(r),s(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return l(r),s(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return l(r),s(e.infinitePagination.getRowCount(e.searchFilter()))}),p()()()()()()}if(n&2){let r,o=y(1,20,e.loader$);h(2),u("searchBoxPlaceHolder",e.searchPlaceholder()),h(3),I((r=y(6,22,e.data$))?5:-1,r),h(10),u("multiple",!0),P("ngModel",e.searchFilter().ListChannelID),h(2),u("numberFilterComparatorOptions",o==null||o.Options==null?null:o.Options.SearchComparatorTypeOptions),P("numberFilterComparator",e.searchFilter().NumberFilterComparator),u("searchTypeOptions",o==null||o.Options==null?null:o.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",e.searchFilter().SearchType),h(4),P("ngModel",e.searchFilter().PageNumber),h(4),P("ngModel",e.searchFilter().RowCount),h(5),u("showProductToggle",!0)("data",y(31,24,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),h(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",y(33,26,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}},dependencies:[H,Q,J,z,K,j,pe,Z,se,re,$,oe,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let m=d;return m})();export{qe as PricePosChannelComponent};
|
|
1
|
+
import{a as le,b as se}from"./chunk-QREYZRXT.js";import"./chunk-FH2KAM6J.js";import{a as ce}from"./chunk-A6SP65CH.js";import{c as pe,d as M,e as V}from"./chunk-C67KF7MG.js";import{a as ae}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{a as te,b as ie,c as ne,d as oe}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as $}from"./chunk-BZWZ64N5.js";import{a as re}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as ee}from"./chunk-V7V5O62J.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-PRMV4INM.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Y,b as Z}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as X}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-ZSUWHVKX.js";import{h as q}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as D}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as G}from"./chunk-UPRDDI4K.js";import{A as Q,c as J,h as K,m as j,o as z}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as k,e as x}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,w as U}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as E,Hb as L,Ia as b,Nc as g,Rc as P,Sc as f,Tc as _,Uc as B,Z as O,_c as A,ac as T,cc as I,ea as R,hc as u,ic as a,id as S,jc as p,jd as y,kc as v,ob as h,ra as c,rc as N,wc as C,ya as l,yc as w,za as s}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function he(m,d){if(m&1){let F=N();a(0,"button",16),C("click",function(){l(F);let n=w(),e=w();return s(e.onUpdateItems(n))}),v(1,"i",17),g(2," Update "),p()}}function de(m,d){if(m&1&&(a(0,"div"),T(1,he,3,0,"button",15),p()),m&2){let F=w();h(),I(F.productService.hasSelectionVariant(d)?1:-1)}}var qe=(()=>{let d=class d{constructor(){this.http=c(x),this.toastr=c(k),this.dialog=c(X),this.productService=c(ee),this.authService=c(q),this.placeholderService=c(ne),this.infinitePagination=c(M),this.updateResHandling=c(V),this.mainPanelService=c(Y),this.channelOptions=b([]),this.searchFilter=b({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[],SearchType:te.NameOnly,NumberFilterComparator:ie.Contains}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(O()),this.searchPlaceholder=b("Search ...")}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(R(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1,SearchType:t.Filter.SearchType,NumberFilterComparator:t.Filter.NumberFilterComparator},this.initSearchPlaceholder(),this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onShowDifferencePrice(t){let n=1;t&&(n=3),this.searchFilter.update(e=>(e.filterModel=n,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(n=>(n.text=t,n)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels(),this.initSearchPlaceholder()}onUpdateItems(t){let n=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(le,{data:{title:"Updating Price",selectedItems:e,channels:n},width:"400px"}).afterClosed().pipe(E(r=>G.IsNotEmpty(r))).subscribe(r=>{this.channelOptions.set(r),this.updatePrice(t)})}filterSelectedChannels(){let n=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(n)}updatePrice(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let e=n.map(i=>({ID:i.ID,Code:i.Code,Price:i.UnitPrice})),o={ListChannelID:this.getSelectedChannels().map(i=>i.ID),ListPrice:e};this.http.post(D.UpdateChannelPrice,o).subscribe(i=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(i),this.resetSelectedChannels()})}}updatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(D.UpdatePriceById,n).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let n=t?.Response?.success_list,e=t?.Response?.failure_list,r=this.getSelectedChannels();n?.length>0||e?.length>0?this.updateResHandling.responseHandling(n,e,"Price",r):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(ae,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}resetSelectedChannels(){this.channelOptions.update(t=>(t.forEach(n=>{n.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=L({type:d,selectors:[["app-price-pos-channel"]],features:[A([M,W,ce,V])],decls:34,vars:28,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit","searchBoxPlaceHolder"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(n,e){if(n&1){let r=N();B(0),S(1,"async"),a(2,"mainpanel",0),C("onSubmit",function(i){return l(r),s(e.onSearch(i))}),a(3,"actions")(4,"div",1),T(5,de,2,1,"div"),S(6,"async"),a(7,"button",2),C("click",function(){return l(r),s(e.openExportDialog())}),v(8,"i",3),a(9,"span"),g(10,"Export"),p()()()(),a(11,"filters")(12,"div",4)(13,"label",5),g(14,"Channel"),p(),a(15,"app-channel-options-v2",6),_("ngModelChange",function(i){return l(r),f(e.searchFilter().ListChannelID,i)||(e.searchFilter().ListChannelID=i),s(i)}),p()(),a(16,"div",4)(17,"filter-query-type",7),_("numberFilterComparatorChange",function(i){return l(r),f(e.searchFilter().NumberFilterComparator,i)||(e.searchFilter().NumberFilterComparator=i),s(i)})("searchTypeChange",function(i){return l(r),f(e.searchFilter().SearchType,i)||(e.searchFilter().SearchType=i),s(i)}),p()(),a(18,"div",4)(19,"label",8),g(20,"Page Number"),p(),a(21,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().PageNumber,i)||(e.searchFilter().PageNumber=i),s(i)}),p()(),a(22,"div")(23,"label",8),g(24,"Page Size"),p(),a(25,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().RowCount,i)||(e.searchFilter().RowCount=i),s(i)}),p()()(),a(26,"content")(27,"div",10)(28,"div",11)(29,"div",12)(30,"app-table",13),S(31,"async"),C("onToggle",function(i){return l(r),s(e.onShowDifferencePrice(i))})("onSubmit",function(i){return l(r),s(e.updatePriceByVariant(i))}),p(),a(32,"infinite-paginator",14),S(33,"async"),C("onNextPage",function(){return l(r),s(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return l(r),s(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return l(r),s(e.infinitePagination.getRowCount(e.searchFilter()))}),p()()()()()()}if(n&2){let r,o=y(1,20,e.loader$);h(2),u("searchBoxPlaceHolder",e.searchPlaceholder()),h(3),I((r=y(6,22,e.data$))?5:-1,r),h(10),u("multiple",!0),P("ngModel",e.searchFilter().ListChannelID),h(2),u("numberFilterComparatorOptions",o==null||o.Options==null?null:o.Options.SearchComparatorTypeOptions),P("numberFilterComparator",e.searchFilter().NumberFilterComparator),u("searchTypeOptions",o==null||o.Options==null?null:o.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",e.searchFilter().SearchType),h(4),P("ngModel",e.searchFilter().PageNumber),h(4),P("ngModel",e.searchFilter().RowCount),h(5),u("showProductToggle",!0)("data",y(31,24,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),h(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",y(33,26,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}},dependencies:[H,Q,J,z,K,j,pe,Z,se,re,$,oe,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let m=d;return m})();export{qe as PricePosChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-4H6YQH5Y.js").then(t=>t.LoginComponent)},data:{title:"Dealpos x Marketplace"}},{path:"shopee",loadComponent(){return import("./chunk-ITY2KKS5.js").then(t=>t.ShopeeAuthorizedComponent)},data:{title:"Success"}},{path:"tiktok",loadComponent(){return import("./chunk-BTJN72MC.js").then(t=>t.TiktokComponent)},data:{title:"Success"}},{path:"lazada",loadComponent(){return import("./chunk-HBWX22FY.js").then(t=>t.LazadaComponent)},data:{title:"Success"}}];export{o as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as M}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as w}from"./chunk-
|
|
1
|
+
import{b as M}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as w}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as N}from"./chunk-D6JH2KV4.js";import{b as T}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as y,y as g,z as C}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as f,Nc as n,Oc as p,ac as E,cc as I,hc as x,ic as t,id as s,jc as i,jd as h,kc as D,kd as b,ma as S,ob as o,ra as c,v as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var O=(()=>{let r=class r{constructor(){this.httpService=c(N)}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(u(a=>a?.hits[0]?._source))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275prov=S({token:r,factory:r.\u0275fac,providedIn:"root"});let l=r;return l})();function B(l,r){if(l&1&&(t(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),n(6,"General"),i()(),t(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),n(12,"Date"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",8)(18,"div",9)(19,"label"),n(20,"Number"),i(),t(21,"div")(22,"span"),n(23),i()()()(),t(24,"div",8)(25,"div",9)(26,"label"),n(27,"Channel Name"),i(),t(28,"div")(29,"span"),n(30),i()()()(),t(31,"div",8)(32,"div",9)(33,"label"),n(34,"ShopID"),i(),t(35,"div")(36,"span"),n(37),i()()()(),t(38,"div",8)(39,"div",9)(40,"label"),n(41,"Channel ID"),i(),t(42,"div")(43,"span"),n(44),i()()()()()()()()(),t(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),n(50,"Request"),i()(),t(51,"div",6)(52,"pre"),n(53),s(54,"json"),i()()()(),t(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),n(59,"Stack Trace"),i()(),t(60,"div",6),D(61,"pre",12),i()(),t(62,"div",13)(63,"div",5)(64,"h5"),n(65,"Exception Message"),i()(),t(66,"div",6)(67,"pre"),n(68),s(69,"json"),i()()()()()()),l&2){let e=r;o(15),p(b(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),p(e==null||e.error==null?null:e.error.number),o(7),p(e==null?null:e.channelName),o(7),p(e==null?null:e.shopId),o(7),p(e==null?null:e.message),o(9),p(h(54,11,e==null||e.error==null?null:e.error.request)),o(8),x("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),p(h(69,13,e==null||e.error==null?null:e.error.response))}}var K=(()=>{let r=class r{constructor(){this.activatedRoute=c(T),this.exceptionService=c(O),this.authService=c(w),this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(m?.ID).pipe(u(d=>{let a=d;return{"@timestamp":a["@timestamp"]||a["@timestamp_received"],error:{number:a?.error?.number,stackTrace:a?.error?.stackTrace,request:JSON.parse(a?.error?.request),response:JSON.parse(a?.error?.response)},channelName:a?.channelId!=null?this.channelOptions.find(v=>v.ID===a?.channelId)?.Name:a?.shopId,shopId:a?.shopId,message:a?.message}}))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275cmp=f({type:r,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(d,a){if(d&1&&(t(0,"mainpanel",0)(1,"content"),E(2,B,70,15,"div",1),s(3,"async"),i()()),d&2){let v;x("headerTitle","Order #"+a.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),I((v=h(3,4,a.exceptionDetail$))?2:-1,v)}},dependencies:[M,y,C,g],encapsulation:2});let l=r;return l})();export{K as ExceptionDetailComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,b as ee}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as Y}from"./chunk-
|
|
1
|
+
import{a as $,b as ee}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as Y}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Q}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as U}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as z}from"./chunk-UPRDDI4K.js";import{A as K,c as j,h as q,m as G,o as J}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as V}from"./chunk-D6JH2KV4.js";import{e as A,g as H}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as F,B as k,y as B}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as L,Nc as r,Oc as f,Pc as y,Rc as s,Sc as g,Tc as u,ac as M,ad as W,cc as E,ec as P,fc as x,gc as T,hc as c,ic as e,id as b,jc as t,jd as N,kc as _,kd as R,mb as O,ob as a,ra as C,rc as I,wc as w,ya as v,yc as S,za as D}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var te=l=>({ID:l});function ne(l,m){if(l&1&&(e(0,"tr")(1,"td"),r(2),t(),e(3,"td"),_(4,"img",23),t(),e(5,"td"),r(6),t(),e(7,"td",24)(8,"a",25),r(9),b(10,"number"),t()(),e(11,"td"),r(12),t(),e(13,"td"),r(14),b(15,"date"),t()()),l&2){let o=m.$implicit;a(2),f(o._source.ChannelName),a(2),c("src",o.logo,O),a(2),f(o._source.DateRange),a(2),c("queryParams",W(12,te,o._source.ID)),a(),y(" ",N(10,7,o._source.CountOrder)," "),a(3),f(o._source.UserLogin),a(2),y(" ",R(15,9,o._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function ie(l,m){if(l&1){let o=I();e(0,"div",14)(1,"table",16)(2,"thead")(3,"tr",17)(4,"th",18),r(5,"Channel"),t(),e(6,"th",19),r(7,"Type"),t(),e(8,"th",20),r(9,"Download Date Range"),t(),e(10,"th",21),r(11,"Count"),t(),e(12,"th"),r(13,"User Login"),t(),e(14,"th"),r(15,"Created"),t()()(),e(16,"tbody"),x(17,ne,16,14,"tr",null,P),t()(),e(19,"mat-paginator",22),w("page",function(p){v(o);let n=S();return D(n.onPaginationChange(p))}),t()()}if(l&2){let o=S();a(17),T(o.downloadOrders),a(2),c("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function oe(l,m){l&1&&(e(0,"div",15),_(1,"app-empty-state"),t())}var De=(()=>{let m=class m{constructor(){this.http=C(V),this.authService=C(U),this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=z.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],decls:27,vars:7,consts:[["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/order/log/detail",3,"queryParams"]],template:function(p,n){p&1&&(e(0,"mainpanel",0),w("onSubmit",function(){return n.getDownloadOrders()}),e(1,"filters")(2,"div")(3,"label",1),r(4,"Channel"),t(),e(5,"app-channel-options-v2",2),u("ngModelChange",function(i){return g(n.filter.ChannelID,i)||(n.filter.ChannelID=i),i}),t()(),e(6,"div",3)(7,"label",4),r(8,"From/To"),t(),e(9,"div",5)(10,"datepicker",6),u("dateChange",function(i){return g(n.filter.From,i)||(n.filter.From=i),i}),t()(),e(11,"div")(12,"datepicker",7),u("dateChange",function(i){return g(n.filter.To,i)||(n.filter.To=i),i}),t()()(),e(13,"div",3)(14,"label",8),r(15,"Page Number"),t(),e(16,"input",9),u("ngModelChange",function(i){return g(n.filter.PageNumber,i)||(n.filter.PageNumber=i),i}),t()(),e(17,"div",3)(18,"label",8),r(19,"Page Size"),t(),e(20,"input",10),u("ngModelChange",function(i){return g(n.filter.RowCount,i)||(n.filter.RowCount=i),i}),t()()(),e(21,"content")(22,"div",11)(23,"div",12)(24,"div",13),M(25,ie,20,3,"div",14)(26,oe,2,0,"div",15),t()()()()()),p&2&&(c("hideSearchBox",!0),a(5),s("ngModel",n.filter.ChannelID),a(5),s("date",n.filter.From),a(2),s("date",n.filter.To),a(4),s("ngModel",n.filter.PageNumber),a(4),s("ngModel",n.filter.RowCount),a(5),E((n.downloadOrders==null?null:n.downloadOrders.length)>0?25:26))},dependencies:[k,ee,$,Q,K,j,J,q,G,Z,H,A,X,Y,F,B],encapsulation:2});let l=m;return l})();export{De as DownloadOrderLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as _}from"./chunk-
|
|
1
|
+
import{f as _}from"./chunk-YH3KWMUX.js";import{c as a}from"./chunk-UPRDDI4K.js";import{e as k,g as C}from"./chunk-UB3ZV5NW.js";import{Hb as v,Nc as u,Pc as p,ac as I,bd as D,cc as g,hc as s,ic as c,jc as m,ma as h,mb as b,ob as l,pd as f,ra as o,ud as x,yc as d}from"./chunk-OHGMB7HJ.js";var y=(()=>{let e=class e{constructor(){this.localDataService=o(_),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(n){let r="";return a.IsNotEmpty(n.ID)?r=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${n.ID}`:r="/menu/Order/detail",r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var U=(t,e)=>({Number:t,Outlet:e});function L(t,e){if(t&1&&(c(0,"a",0),u(1),m()),t&2){let i,n=d();s("href",n.baseUrl(),b),l(),p(" ",(i=n.order())==null?null:i.Number," ")}}function S(t,e){if(t&1&&(c(0,"a",1),u(1),m()),t&2){let i,n,r=d();s("routerLink",r.baseUrl())("queryParams",D(3,U,(i=r.order())==null?null:i.Number,(i=r.order())==null?null:i.Outlet)),l(),p(" ",(n=r.order())==null?null:n.Number," ")}}var z=(()=>{let e=class e{constructor(){this.order=x(),this.generateLinkService=o(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>a.IsNotEmpty(this.order()?.ID))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(r,N){r&1&&I(0,L,2,2,"a",0)(1,S,2,6,"a",1),r&2&&g(N.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2});let t=e;return t})();export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as vt}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{e as ft}from"./chunk-HZTKN5RX.js";import"./chunk-TQROQOXU.js";import{c as Pt,d as yt}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as gt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as bt}from"./chunk-DLHIDOS3.js";import{a as St}from"./chunk-27DIE2YS.js";import{a as xt}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ct}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as ut}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as ht}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as W}from"./chunk-ZSUWHVKX.js";import{h as st}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as j}from"./chunk-AGBJEXIM.js";import{b as lt,c as ct}from"./chunk-NB2H6KA7.js";import{c as N}from"./chunk-UPRDDI4K.js";import{A as mt,b as dt,h as pt,m as _t}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as at,e as D}from"./chunk-D6JH2KV4.js";import{d as rt}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ot,w as it}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as V,Hb as tt,Ia as X,K as H,Nb as A,Nc as d,Oc as nt,Pc as y,Rc as B,Sc as $,Tc as U,X as K,Z as q,ac as _,ad as E,bc as et,ca as J,cc as m,ea as k,ec as F,f as z,fa as Z,fc as I,g as R,gc as T,hc as p,ic as r,id as S,jc as c,jd as P,kc as C,ma as Q,mb as v,ob as l,oc as O,pc as M,qa as Y,ra as g,rc as f,v as w,wc as x,ya as h,yc as s,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Nt=(()=>{let o=class o{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new R(null),this.destroy$=new z,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,e){e==0?this.disableNextButton=!0:this.disableNextButton=!(e<t.RowCount*t.PageNumber)}reloadPagination(t){N.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,e){t.RowCount=e,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new R(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(J(this.destroy$),V(t=>t!=null),H(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(w(e=>e.Data))),Z(this.pagination$),K((t,e)=>{let[a,b]=t,[G]=e;return b.PageNumber==1?[G,b]:[a.concat(G),b]}),k(([t,e])=>{this.setPageNumberFooter(e),this.setPaginationButtonState(e,t.length)}),w(([t])=>t),q())}};o.\u0275fac=function(e){return new(e||o)(Y(D))},o.\u0275prov=Q({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var L=i=>[i];function Ft(i,o){if(i&1){let n=f();r(0,"button",11),x("click",function(){h(n);let e=s(3);return u(e.uploadMultipleProduct())}),C(1,"i",12),d(2),c()}if(i&2){let n=s(3);l(2),y(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function It(i,o){if(i&1&&(O(0),_(1,Ft,3,1,"button",10),M()),i&2){let n=s(2);l(),m(n.hasSelectionProduct?1:-1)}}function Tt(i,o){if(i&1){let n=f();O(0),r(1,"button",13),x("click",function(){h(n);let e=s(2);return u(e.openScanDialog())}),C(2,"i",14),d(3," Scan Channel "),c(),M()}}function Ot(i,o){i&1&&(O(0),C(1,"th",21),M())}function Mt(i,o){if(i&1){let n=f();r(0,"td",27)(1,"input",28),U("ngModelChange",function(e){h(n);let a=s(3).$implicit;return $(a.selected,e)||(a.selected=e),u(e)}),x("ngModelChange",function(){h(n);let e=s(4),a=s(3);return u(a.onSelectProduct(e))}),c()()}if(i&2){let n=s(3).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(),B("ngModel",n.selected)}}function Et(i,o){if(i&1&&(O(0),_(1,Mt,2,2,"td",27),M()),i&2){let n=s().$index;l(),m(n==0?1:-1)}}function Vt(i,o){if(i&1){let n=f();r(0,"img",35),x("click",function(e){h(n);let a=s(3).$implicit,b=s(4);return u(b.onZoomImage(e,a==null?null:a.ImageUrl))}),c()}if(i&2){let n=s(3).$implicit;p("src",n==null?null:n.ImageUrl,v)}}function kt(i,o){i&1&&C(0,"img",31)}function At(i,o){if(i&1&&(r(0,"td",27)(1,"div",29),_(2,Vt,1,1,"img",30)(3,kt,1,0,"img",31),c()(),r(4,"td",32)(5,"h4",33)(6,"span",34),d(7),c()()()),i&2){let n=s(2).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(2),m(n!=null&&n.ImageUrl?2:3),l(2),p("rowSpan",n==null?null:n.Variants.length),l(2),p("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),l(),y(" ",n==null?null:n.Name," ")}}function Bt(i,o){if(i&1&&(r(0,"div")(1,"a",23),C(2,"img",36),c()()),i&2){let n=o.$implicit;l(),p("href",n.URL,v),l(),p("src",n.Img,v)("matTooltip",n.Name)}}function $t(i,o){if(i&1&&(r(0,"div"),C(1,"img",36),c()),i&2){let n=o.$implicit;l(),p("src",n.Img,v)("matTooltip",n.Name)}}function Dt(i,o){if(i&1&&(r(0,"tr"),A(1,Et,2,1,"ng-container",2),_(2,At,8,5),r(3,"td"),d(4),c(),r(5,"td")(6,"span"),d(7),c(),r(8,"span",22)(9,"a",23),C(10,"i",24),c()()(),r(11,"td",25)(12,"div",26),I(13,Bt,3,3,"div",null,F),c()(),r(15,"td",25)(16,"div",26),I(17,$t,2,2,"div",null,F),c()()()),i&2){let n=o.$implicit,t=o.$index,e=s(5);l(),p("ngxPermissionsOnly",E(5,L,e.uploadProductRole)),l(),m(t==0?2:-1),l(2),y(" ",n.Name," "),l(3),y(" ",n.Code," "),l(2),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),v),l(4),T(n==null?null:n.Available),l(4),T(n==null?null:n.NotAvailable)}}function Lt(i,o){if(i&1&&I(0,Dt,19,7,"tr",null,F),i&2){let n=o.$implicit;T(n.Variants)}}function Rt(i,o){i&1&&(r(0,"tbody"),I(1,Lt,2,0,null,null,F),c()),i&2&&(l(),T(o))}function Ut(i,o){if(i&1&&(r(0,"div",8)(1,"table",15)(2,"thead",16)(3,"tr"),A(4,Ot,2,0,"ng-container",2),r(5,"th",17),d(6," Product "),c(),r(7,"th",18),d(8,"Variant"),c(),r(9,"th",18),d(10,"SKU"),c(),r(11,"th",19),d(12,"Available In"),c(),r(13,"th",20),d(14,"Not Available In"),c()()(),_(15,Rt,3,0,"tbody"),S(16,"async"),c()()),i&2){let n,t=s(2);l(4),p("ngxPermissionsOnly",E(4,L,t.uploadProductRole)),l(11),m((n=P(16,2,t.data$))?15:-1,n)}}function jt(i,o){i&1&&(r(0,"div",9),C(1,"app-empty-state"),c())}function Wt(i,o){if(i&1){let n=f();r(0,"span",44),x("click",function(){h(n);let e=s(4);return u(e.getRowCount())}),r(1,"i",45),d(2,"?"),c()()}}function Gt(i,o){if(i&1&&(r(0,"span"),d(1),S(2,"number"),c()),i&2){let n=o;l(),nt(P(2,1,n==null?null:n.Count))}}function zt(i,o){if(i&1){let n=f();r(0,"a",46),x("click",function(){h(n);let e=s(4);return u(e.onNextPage())}),C(1,"i",47),d(2," Next"),c()}}function Ht(i,o){if(i&1){let n=f();r(0,"a",48),x("click",function(){h(n);let e=s(4);return u(e.onLastPage())}),C(1,"i",49),d(2," Last"),c()}}function Kt(i,o){if(i&1&&(r(0,"div",37)(1,"div",38)(2,"div",39),d(3),S(4,"number"),_(5,Wt,3,0,"span",40),_(6,Gt,3,3,"span"),S(7,"async"),d(8),c()(),r(9,"div",41),_(10,zt,3,0,"a",42),_(11,Ht,3,0,"a",43),c()()),i&2){let n,t=s(),e=s(2);l(3),y(" Showing 1 - ",P(4,6,t==null?null:t.length)," of "),l(2),m(e.paginationService.hideCount?5:-1),l(),m((n=!e.paginationService.hideCount&&P(7,8,e.rowCount$))?6:-1,n),l(2),y(" records ~ ",e.paginationService.footerPageNumber," Page "),l(2),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?10:-1),l(),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?11:-1)}}function qt(i,o){if(i&1&&_(0,Kt,12,10,"div",37),i&2){let n=o;m((n==null?null:n.length)>0?0:-1)}}function Jt(i,o){if(i&1){let n=f();r(0,"mainpanel",1),x("onSubmit",function(e){h(n);let a=s();return u(a.searchProduct(e))}),r(1,"actions"),A(2,It,2,1,"ng-container",2)(3,Tt,4,0,"ng-container",2),r(4,"button",3),x("click",function(){h(n);let e=s();return u(e.openExportDialog())}),C(5,"i",4),r(6,"span"),d(7,"Export"),c()()(),r(8,"filters")(9,"filter-query-type",5),U("numberFilterComparatorChange",function(e){h(n);let a=s();return $(a.searchFilter.NumberFilterComparator,e)||(a.searchFilter.NumberFilterComparator=e),u(e)})("searchTypeChange",function(e){h(n);let a=s();return $(a.searchFilter.SearchType,e)||(a.searchFilter.SearchType=e),u(e)}),c()(),r(10,"content")(11,"div",6)(12,"div",7),_(13,Ut,17,6,"div",8),S(14,"async"),et(15,jt,2,0,"div",9),c(),_(16,qt,1,1),S(17,"async"),c()()()}if(i&2){let n,t,e=o,a=s();p("searchBoxPlaceHolder",a.searchPlaceholder()),l(2),p("ngxPermissionsOnly",E(13,L,a.uploadProductRole)),l(),p("ngxPermissionsOnly",E(15,L,a.scanProductRole)),l(6),p("numberFilterComparatorOptions",e==null||e.Options==null?null:e.Options.SearchComparatorTypeOptions),B("numberFilterComparator",a.searchFilter.NumberFilterComparator),p("searchTypeOptions",e==null||e.Options==null?null:e.Options.SearchSKUOnlyOrSKUNameOptions),B("searchType",a.searchFilter.SearchType),l(4),m(((n=P(14,9,a.data$))==null?null:n.length)>0?13:15),l(3),m((t=P(17,11,a.data$))?16:-1,t)}}var Ie=(()=>{let o=class o{constructor(){this.http=g(D),this.dialog=g(ut),this.toastr=g(at),this.route=g(rt),this.productService=g(xt),this.paginationService=g(Nt),this.biggerPictureService=g(bt),this.authService=g(st),this.uploadProductService=g(ft),this.placeholderService=g(Pt),this.loaderAPI="product/Load",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=W.ProductScan,this.uploadProductRole=W.ProductUpload,this.searchPlaceholder=X("Search ...");let t=this.authService;this.channelOptions=t.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(k(t=>{this.searchFilter=t.Filter,this.paginationService.reloadPagination(t.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(w(t=>(t=t.map(e=>(e.Variants=e.Variants.map(a=>(a.Available=this.productService.sortChannel(a.Available),a.NotAvailable=this.productService.sortChannel(a.NotAvailable),a.Available=this.assignLogoChannel(a.Available),a.NotAvailable=this.assignLogoChannel(a.NotAvailable),a)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=N.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter),this.initSearchPlaceholder()}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=N.GuidEMpty,this.dialog.open(gt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(a=>N.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.rowCount$=this.http.post(j.GetNotInChannelRowCount,t)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(j.GetNotInChannelRowCount,t).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(vt,{data:{title:"Export Not In Channel",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=tt({type:o,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[1,"btn-group"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,a){if(e&1&&(_(0,Jt,18,17,"mainpanel",0),S(1,"async")),e&2){let b;m((b=P(1,1,a.loader$))?0:-1,b)}},dependencies:[Ct,ct,lt,yt,mt,dt,pt,_t,ht,St,it,ot],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let i=o;return i})();export{Ie as NotInChannelComponent};
|
|
1
|
+
import{a as vt}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{e as ft}from"./chunk-NJYWKADT.js";import"./chunk-TQROQOXU.js";import{c as Pt,d as yt}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as gt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as bt}from"./chunk-DLHIDOS3.js";import{a as St}from"./chunk-27DIE2YS.js";import{a as xt}from"./chunk-V7V5O62J.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-PRMV4INM.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ct}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as ut}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as ht}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as W}from"./chunk-ZSUWHVKX.js";import{h as st}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as j}from"./chunk-AGBJEXIM.js";import{b as lt,c as ct}from"./chunk-NB2H6KA7.js";import{c as N}from"./chunk-UPRDDI4K.js";import{A as mt,b as dt,h as pt,m as _t}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as at,e as D}from"./chunk-D6JH2KV4.js";import{d as rt}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ot,w as it}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as V,Hb as tt,Ia as X,K as H,Nb as A,Nc as d,Oc as nt,Pc as y,Rc as B,Sc as $,Tc as U,X as K,Z as q,ac as _,ad as E,bc as et,ca as J,cc as m,ea as k,ec as F,f as z,fa as Z,fc as I,g as R,gc as T,hc as p,ic as r,id as S,jc as c,jd as P,kc as C,ma as Q,mb as v,ob as l,oc as O,pc as M,qa as Y,ra as g,rc as f,v as w,wc as x,ya as h,yc as s,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Nt=(()=>{let o=class o{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new R(null),this.destroy$=new z,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,e){e==0?this.disableNextButton=!0:this.disableNextButton=!(e<t.RowCount*t.PageNumber)}reloadPagination(t){N.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,e){t.RowCount=e,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new R(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(J(this.destroy$),V(t=>t!=null),H(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(w(e=>e.Data))),Z(this.pagination$),K((t,e)=>{let[a,b]=t,[G]=e;return b.PageNumber==1?[G,b]:[a.concat(G),b]}),k(([t,e])=>{this.setPageNumberFooter(e),this.setPaginationButtonState(e,t.length)}),w(([t])=>t),q())}};o.\u0275fac=function(e){return new(e||o)(Y(D))},o.\u0275prov=Q({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var L=i=>[i];function Ft(i,o){if(i&1){let n=f();r(0,"button",11),x("click",function(){h(n);let e=s(3);return u(e.uploadMultipleProduct())}),C(1,"i",12),d(2),c()}if(i&2){let n=s(3);l(2),y(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function It(i,o){if(i&1&&(O(0),_(1,Ft,3,1,"button",10),M()),i&2){let n=s(2);l(),m(n.hasSelectionProduct?1:-1)}}function Tt(i,o){if(i&1){let n=f();O(0),r(1,"button",13),x("click",function(){h(n);let e=s(2);return u(e.openScanDialog())}),C(2,"i",14),d(3," Scan Channel "),c(),M()}}function Ot(i,o){i&1&&(O(0),C(1,"th",21),M())}function Mt(i,o){if(i&1){let n=f();r(0,"td",27)(1,"input",28),U("ngModelChange",function(e){h(n);let a=s(3).$implicit;return $(a.selected,e)||(a.selected=e),u(e)}),x("ngModelChange",function(){h(n);let e=s(4),a=s(3);return u(a.onSelectProduct(e))}),c()()}if(i&2){let n=s(3).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(),B("ngModel",n.selected)}}function Et(i,o){if(i&1&&(O(0),_(1,Mt,2,2,"td",27),M()),i&2){let n=s().$index;l(),m(n==0?1:-1)}}function Vt(i,o){if(i&1){let n=f();r(0,"img",35),x("click",function(e){h(n);let a=s(3).$implicit,b=s(4);return u(b.onZoomImage(e,a==null?null:a.ImageUrl))}),c()}if(i&2){let n=s(3).$implicit;p("src",n==null?null:n.ImageUrl,v)}}function kt(i,o){i&1&&C(0,"img",31)}function At(i,o){if(i&1&&(r(0,"td",27)(1,"div",29),_(2,Vt,1,1,"img",30)(3,kt,1,0,"img",31),c()(),r(4,"td",32)(5,"h4",33)(6,"span",34),d(7),c()()()),i&2){let n=s(2).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(2),m(n!=null&&n.ImageUrl?2:3),l(2),p("rowSpan",n==null?null:n.Variants.length),l(2),p("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),l(),y(" ",n==null?null:n.Name," ")}}function Bt(i,o){if(i&1&&(r(0,"div")(1,"a",23),C(2,"img",36),c()()),i&2){let n=o.$implicit;l(),p("href",n.URL,v),l(),p("src",n.Img,v)("matTooltip",n.Name)}}function $t(i,o){if(i&1&&(r(0,"div"),C(1,"img",36),c()),i&2){let n=o.$implicit;l(),p("src",n.Img,v)("matTooltip",n.Name)}}function Dt(i,o){if(i&1&&(r(0,"tr"),A(1,Et,2,1,"ng-container",2),_(2,At,8,5),r(3,"td"),d(4),c(),r(5,"td")(6,"span"),d(7),c(),r(8,"span",22)(9,"a",23),C(10,"i",24),c()()(),r(11,"td",25)(12,"div",26),I(13,Bt,3,3,"div",null,F),c()(),r(15,"td",25)(16,"div",26),I(17,$t,2,2,"div",null,F),c()()()),i&2){let n=o.$implicit,t=o.$index,e=s(5);l(),p("ngxPermissionsOnly",E(5,L,e.uploadProductRole)),l(),m(t==0?2:-1),l(2),y(" ",n.Name," "),l(3),y(" ",n.Code," "),l(2),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),v),l(4),T(n==null?null:n.Available),l(4),T(n==null?null:n.NotAvailable)}}function Lt(i,o){if(i&1&&I(0,Dt,19,7,"tr",null,F),i&2){let n=o.$implicit;T(n.Variants)}}function Rt(i,o){i&1&&(r(0,"tbody"),I(1,Lt,2,0,null,null,F),c()),i&2&&(l(),T(o))}function Ut(i,o){if(i&1&&(r(0,"div",8)(1,"table",15)(2,"thead",16)(3,"tr"),A(4,Ot,2,0,"ng-container",2),r(5,"th",17),d(6," Product "),c(),r(7,"th",18),d(8,"Variant"),c(),r(9,"th",18),d(10,"SKU"),c(),r(11,"th",19),d(12,"Available In"),c(),r(13,"th",20),d(14,"Not Available In"),c()()(),_(15,Rt,3,0,"tbody"),S(16,"async"),c()()),i&2){let n,t=s(2);l(4),p("ngxPermissionsOnly",E(4,L,t.uploadProductRole)),l(11),m((n=P(16,2,t.data$))?15:-1,n)}}function jt(i,o){i&1&&(r(0,"div",9),C(1,"app-empty-state"),c())}function Wt(i,o){if(i&1){let n=f();r(0,"span",44),x("click",function(){h(n);let e=s(4);return u(e.getRowCount())}),r(1,"i",45),d(2,"?"),c()()}}function Gt(i,o){if(i&1&&(r(0,"span"),d(1),S(2,"number"),c()),i&2){let n=o;l(),nt(P(2,1,n==null?null:n.Count))}}function zt(i,o){if(i&1){let n=f();r(0,"a",46),x("click",function(){h(n);let e=s(4);return u(e.onNextPage())}),C(1,"i",47),d(2," Next"),c()}}function Ht(i,o){if(i&1){let n=f();r(0,"a",48),x("click",function(){h(n);let e=s(4);return u(e.onLastPage())}),C(1,"i",49),d(2," Last"),c()}}function Kt(i,o){if(i&1&&(r(0,"div",37)(1,"div",38)(2,"div",39),d(3),S(4,"number"),_(5,Wt,3,0,"span",40),_(6,Gt,3,3,"span"),S(7,"async"),d(8),c()(),r(9,"div",41),_(10,zt,3,0,"a",42),_(11,Ht,3,0,"a",43),c()()),i&2){let n,t=s(),e=s(2);l(3),y(" Showing 1 - ",P(4,6,t==null?null:t.length)," of "),l(2),m(e.paginationService.hideCount?5:-1),l(),m((n=!e.paginationService.hideCount&&P(7,8,e.rowCount$))?6:-1,n),l(2),y(" records ~ ",e.paginationService.footerPageNumber," Page "),l(2),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?10:-1),l(),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?11:-1)}}function qt(i,o){if(i&1&&_(0,Kt,12,10,"div",37),i&2){let n=o;m((n==null?null:n.length)>0?0:-1)}}function Jt(i,o){if(i&1){let n=f();r(0,"mainpanel",1),x("onSubmit",function(e){h(n);let a=s();return u(a.searchProduct(e))}),r(1,"actions"),A(2,It,2,1,"ng-container",2)(3,Tt,4,0,"ng-container",2),r(4,"button",3),x("click",function(){h(n);let e=s();return u(e.openExportDialog())}),C(5,"i",4),r(6,"span"),d(7,"Export"),c()()(),r(8,"filters")(9,"filter-query-type",5),U("numberFilterComparatorChange",function(e){h(n);let a=s();return $(a.searchFilter.NumberFilterComparator,e)||(a.searchFilter.NumberFilterComparator=e),u(e)})("searchTypeChange",function(e){h(n);let a=s();return $(a.searchFilter.SearchType,e)||(a.searchFilter.SearchType=e),u(e)}),c()(),r(10,"content")(11,"div",6)(12,"div",7),_(13,Ut,17,6,"div",8),S(14,"async"),et(15,jt,2,0,"div",9),c(),_(16,qt,1,1),S(17,"async"),c()()()}if(i&2){let n,t,e=o,a=s();p("searchBoxPlaceHolder",a.searchPlaceholder()),l(2),p("ngxPermissionsOnly",E(13,L,a.uploadProductRole)),l(),p("ngxPermissionsOnly",E(15,L,a.scanProductRole)),l(6),p("numberFilterComparatorOptions",e==null||e.Options==null?null:e.Options.SearchComparatorTypeOptions),B("numberFilterComparator",a.searchFilter.NumberFilterComparator),p("searchTypeOptions",e==null||e.Options==null?null:e.Options.SearchSKUOnlyOrSKUNameOptions),B("searchType",a.searchFilter.SearchType),l(4),m(((n=P(14,9,a.data$))==null?null:n.length)>0?13:15),l(3),m((t=P(17,11,a.data$))?16:-1,t)}}var Ie=(()=>{let o=class o{constructor(){this.http=g(D),this.dialog=g(ut),this.toastr=g(at),this.route=g(rt),this.productService=g(xt),this.paginationService=g(Nt),this.biggerPictureService=g(bt),this.authService=g(st),this.uploadProductService=g(ft),this.placeholderService=g(Pt),this.loaderAPI="product/Load",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=W.ProductScan,this.uploadProductRole=W.ProductUpload,this.searchPlaceholder=X("Search ...");let t=this.authService;this.channelOptions=t.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(k(t=>{this.searchFilter=t.Filter,this.paginationService.reloadPagination(t.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(w(t=>(t=t.map(e=>(e.Variants=e.Variants.map(a=>(a.Available=this.productService.sortChannel(a.Available),a.NotAvailable=this.productService.sortChannel(a.NotAvailable),a.Available=this.assignLogoChannel(a.Available),a.NotAvailable=this.assignLogoChannel(a.NotAvailable),a)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=N.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter),this.initSearchPlaceholder()}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=N.GuidEMpty,this.dialog.open(gt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(a=>N.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.rowCount$=this.http.post(j.GetNotInChannelRowCount,t)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(j.GetNotInChannelRowCount,t).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(vt,{data:{title:"Export Not In Channel",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=tt({type:o,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[1,"btn-group"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,a){if(e&1&&(_(0,Jt,18,17,"mainpanel",0),S(1,"async")),e&2){let b;m((b=P(1,1,a.loader$))?0:-1,b)}},dependencies:[Ct,ct,lt,yt,mt,dt,pt,_t,ht,St,it,ot],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let i=o;return i})();export{Ie as NotInChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as J}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as I}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as H,c as R,h as j,m as F}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as W}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B,w as k,z as P}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as x,Ia as h,Nc as i,Oc as V,Rc as f,Sc as C,Tc as b,Uc as O,Vc as D,Wc as _,Z as S,ac as M,cc as N,hc as g,ic as e,id as v,jc as t,jd as y,kc as L,ob as d,ra as E,rc as T,wc as w,ya as p,yc as A,za as m}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function Y(r,l){if(r&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),r&2){A();let U=_(25);d(),V(y(2,1,U))}}function q(r,l){r&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ae=(()=>{let l=class l{constructor(){this.httpService=E(W),this.selectedChannel=h(null),this.orderNumber=h(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(I.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(S(1))}copyToClipboard(c){if(!c)return;let s=typeof c=="string"?c:JSON.stringify(c,null,2);navigator.clipboard.writeText(s),alert("Copied to clipboard!")}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=x({type:l,selectors:[["app-escrow-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(s,n){if(s&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),w("click",function(){return p(a),m(n.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),b("ngModelChange",function(o){return p(a),C(n.selectedChannel,o)||(n.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),b("ngModelChange",function(o){return p(a),C(n.orderNumber,o)||(n.orderNumber=o),m(o)}),t()()()()(),O(25),v(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),w("click",function(){p(a);let o=_(25);return m(n.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(s&2){g("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),f("ngModel",n.selectedChannel),d(8),f("ngModel",n.orderNumber),d();let a=D(y(26,6,n.escrowLog$));d(8),g("disabled",!a),d(5),N(a?38:39)}},dependencies:[B,H,R,j,F,J,G,k,P],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]});let r=l;return r})();export{ae as EscrowApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-PDIHZKEM.js";import{a as l,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as d,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as p,ic as m,jc as c,kc as n,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var f=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,h){o&1&&(m(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),c()()(),n(4,"router-outlet")),o&2&&(a(3),p("Tabs",h.tabs))},dependencies:[u,l,s,d],encapsulation:2});let t=e;return t})();var I=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-NYBCG2UK.js").then(t=>t.OrderApiComponent)},canActivate:[r],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-RIGKFQ2Q.js").then(t=>t.ProductApiComponent)},canActivate:[r],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-GJANGM3E.js").then(t=>t.EscrowApiComponent)},canActivate:[r],data:{title:"Escrow API"}}]}];export{I as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as me}from"./chunk-JWDQVXQP.js";import{a as de,b as pe}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-
|
|
1
|
+
import{a as me}from"./chunk-JWDQVXQP.js";import{a as de,b as pe}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-FSLUPR5I.js";import{a as P}from"./chunk-L6CRWJ2O.js";import{a as se}from"./chunk-PV4OJSZI.js";import{a as ae}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as oe}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as re}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as ne}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as Q,B as X,w as J,y as K}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as I,Ia as W,Mc as A,Nc as a,Oc as w,Pc as x,Rc as _,Sc as h,Tc as v,Uc as R,Vc as H,Wc as j,Z as O,_c as U,ac as b,ad as q,cc as V,dc as B,fc as k,gc as z,hc as f,ic as t,id as y,jc as i,jd as E,kc as C,kd as G,mb as D,ob as r,ra as F,rc as M,wc as T,ya as c,yc as g,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as L,b as N}from"./chunk-66YHNWRR.js";var ue=o=>({"td-cell-hover":o});function Ce(o,m){if(o&1&&C(0,"variants-dropdown",31),o&2){let e=g().$implicit;f("variants",e==null?null:e.Variants)}}function fe(o,m){if(o&1&&C(0,"variant-with-image",32),o&2){let e=g().$implicit;f("variant",e==null?null:e.Variants[0])}}function ge(o,m){if(o&1&&(t(0,"span"),a(1),i()),o&2){let e=g().$implicit;r(),x("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function _e(o,m){if(o&1&&(t(0,"tr")(1,"td")(2,"div",24),C(3,"img",25),y(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),C(14,"order-link",29),i(),t(15,"small"),a(16),y(17,"date"),i(),C(18,"br"),t(19,"small"),C(20,"i",30),a(21),i()()(),t(22,"td"),b(23,Ce,1,1,"variants-dropdown",31)(24,fe,1,1,"variant-with-image",32),i(),t(25,"td",33),a(26),y(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),a(32),i(),b(33,ge,2,1,"span"),i(),t(34,"small"),a(35),i()()()()),o&2){let e=m.$implicit;r(3),f("src",E(4,14,e==null?null:e.MarketType),D)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),r(4),w(e.Outlet),r(3),w(e.ChannelName),r(4),f("order",e),r(2),x(" ",G(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),r(5),x(" ",e.Customer," "),r(),A(q(21,ue,(e.Variants==null?null:e.Variants.length)>1)),r(),V((e.Variants==null?null:e.Variants.length)>1?23:24),r(3),w(E(27,19,e.Amount)),r(6),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),r(),V(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),r(2),x(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function he(o,m){if(o&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",22),a(13,"Shipping"),i()()(),t(14,"tbody"),k(15,_e,36,23,"tr",null,B),i()(),t(17,"app-custom-paginator",23),T("next",function(){c(e);let p=g();return u(p.initCompletedOrders())})("previous",function(){c(e);let p=g();return u(p.initCompletedOrders())}),i()()}if(o&2){let e=g(),d=j(0);r(15),z(d),r(2),f("filter",e.filter())("totaldata",d==null?null:d.length)}}function ve(o,m){o&1&&(t(0,"div",16),C(1,"app-empty-state"),i())}var Re=(()=>{let m=class m{constructor(){this.orderService=F(P),this.filter=W({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(p=>N(L({},p),{From:d})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=I({type:m,selectors:[["app-completed"]],features:[U([P])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,l){if(p&1){let s=M();R(0),y(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return c(s),u(l.initCompletedOrders())}),v("textChange",function(n){return c(s),h(l.filter().Number,n)||(l.filter().Number=n),u(n)}),t(3,"actions")(4,"a",1),C(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),v("ngModelChange",function(n){return c(s),h(l.filter().ListChannelID,n)||(l.filter().ListChannelID=n),u(n)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),v("dateChange",function(n){return c(s),h(l.filter().From,n)||(l.filter().From=n),u(n)}),i()(),t(18,"div")(19,"datepicker",8),v("dateChange",function(n){return c(s),h(l.filter().To,n)||(l.filter().To=n),u(n)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),v("ngModelChange",function(n){return c(s),h(l.filter().PageNumber,n)||(l.filter().PageNumber=n),u(n)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),v("ngModelChange",function(n){return c(s),h(l.filter().PageSize,n)||(l.filter().PageSize=n),u(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),b(32,he,18,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=H(E(1,8,l.completedOrders$));r(2),_("text",l.filter().Number),r(10),f("multiple",!0),_("ngModel",l.filter().ListChannelID),r(5),_("date",l.filter().From),r(2),_("date",l.filter().To),r(4),_("ngModel",l.filter().PageNumber),r(4),_("ngModel",l.filter().PageSize),r(5),V((s==null?null:s.length)>0?32:33)}},dependencies:[X,re,oe,le,te,Y,ee,Z,$,de,pe,se,ne,ie,ce,ae,J,Q,K,me],encapsulation:2});let o=m;return o})();export{Re as CompletedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $}from"./chunk-RUYX7KTP.js";import{a as Z}from"./chunk-TVEI5B2O.js";import{a as Y}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as U,b as J,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as V}from"./chunk-
|
|
1
|
+
import{a as $}from"./chunk-RUYX7KTP.js";import{a as Z}from"./chunk-TVEI5B2O.js";import{a as Y}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as U,b as J,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as V}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as q,c as z,h as G,m as H,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as B}from"./chunk-D6JH2KV4.js";import{e as O}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{y as A}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as L,Nb as R,Nc as l,Oc as _,Pc as S,Rc as g,Sc as u,Tc as c,ac as P,ad as D,cc as M,ec as N,fc as E,gc as x,hc as h,ic as i,id as F,jc as n,kc as C,kd as k,mb as v,ob as r,ra as f,rc as I,wc as y,ya as b,yc as w,za as T}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ee=()=>["/menu/log/rawlog/detail"],te=o=>({ID:o});function ie(o,p){if(o&1&&(i(0,"span",17),C(1,"img",18),n(),l(2)),o&2){let a=p.item;r(),h("src",a.Img,v)("alt",a.Name),r(),S(" ",a.Name," ")}}function ne(o,p){if(o&1&&(i(0,"tr")(1,"td")(2,"a",23),l(3),F(4,"date"),n()(),i(5,"td"),l(6),n(),i(7,"td"),l(8),n(),i(9,"td"),l(10),n()()),o&2){let a=p.$implicit;r(2),h("routerLink",W(9,ee))("queryParams",D(10,te,a.id)),r(),S(" ",k(4,6,a.Created,"dd MMM yyyy HH:mm:ss")," "),r(3),_(a.type),r(2),_(a.number),r(2),_(a.message)}}function ae(o,p){if(o&1){let a=I();i(0,"div",15)(1,"table",19)(2,"thead",20)(3,"tr")(4,"th",21),l(5,"Date"),n(),i(6,"th"),l(7,"Type"),n(),i(8,"th"),l(9,"Number"),n(),i(10,"th"),l(11,"Message"),n()()(),i(12,"tbody"),E(13,ne,11,12,"tr",null,N),n()(),i(15,"mat-paginator",22),y("page",function(m){b(a);let e=w();return T(e.changePage(m))}),n()()}if(o&2){let a=w();r(13),x(a.Result),r(2),h("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function oe(o,p){o&1&&(i(0,"div",16),C(1,"app-empty-state"),n())}var be=(()=>{let p=class p{constructor(){this.http=f(B),this._RawLogService=f($),this.authService=f(V),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(d={}){this.http.post("/api/OrdersLoader/Get",d).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(d){this.filter.Number=d,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(m=>{this._RawLogService.Data=m.hits,this.Result=Array();for(let e of m.hits){let s={id:e._id,message:e._source.message,responseCode:e._source.log.responseCode,processTypeString:e._source.log.processType,type:e._source.log.type,number:e._source.log.number,Created:e._source["@timestamp_received"]};this.Result.push(s)}this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(d){this.filter.PageNumber=d.pageIndex+1,this.Get()}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=L({type:p,selectors:[["app-raw-log"]],decls:28,vars:9,consts:[["headerTitle","Channel Push 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"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(m,e){m&1&&(i(0,"mainpanel",0),c("textChange",function(t){return u(e.filter.Number,t)||(e.filter.Number=t),t}),y("onSubmit",function(t){return e.Get(t)}),i(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),n(),i(5,"ng-select",2),c("ngModelChange",function(t){return u(e.filter.ChannelID,t)||(e.filter.ChannelID=t),t}),R(6,ie,3,3,"ng-template",3),n()(),i(7,"div",4)(8,"label",5),l(9,"From/To"),n(),i(10,"div",6)(11,"datepicker",7),c("dateChange",function(t){return u(e.filter.From,t)||(e.filter.From=t),t}),n()(),i(12,"div")(13,"datepicker",8),c("dateChange",function(t){return u(e.filter.To,t)||(e.filter.To=t),t}),n()()(),i(14,"div",4)(15,"label",9),l(16,"Page Number"),n(),i(17,"input",10),c("ngModelChange",function(t){return u(e.filter.PageNumber,t)||(e.filter.PageNumber=t),t}),n()(),i(18,"div",4)(19,"label",9),l(20,"Page Size"),n(),i(21,"input",11),c("ngModelChange",function(t){return u(e.filter.RowCount,t)||(e.filter.RowCount=t),t}),n()()(),i(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),P(26,ae,16,3,"div",15)(27,oe,2,0,"div",16),n()()()()()),m&2&&(g("text",e.filter.Number),r(5),h("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),r(6),g("date",e.filter.From),r(2),g("date",e.filter.To),r(4),g("ngModel",e.filter.PageNumber),r(4),g("ngModel",e.filter.RowCount),r(5),M((e.Result==null?null:e.Result.length)>0?26:27))},dependencies:[K,Q,q,z,j,G,H,U,J,Y,O,Z,X,A],encapsulation:2});let o=p;return o})();export{be as RawLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-PDIHZKEM.js";import{a as C,b as D}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as h,e as y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as u,Nc as f,Pc as v,ad as b,ec as m,fc as s,gc as c,hc as l,ic as n,jc as o,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=e=>[e];function x(e,t){if(e&1&&(n(0,"a",8),f(1),o()),e&2){let d=t.$implicit;l("routerLink",b(2,k,d.url)),r(),v(" ",d.title)}}var T=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=u({type:t,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,p){a&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),o()(),n(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),o(),n(8,"div",6)(9,"div",7),s(10,x,2,4,"a",8,m),o()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",p.tabs),r(7),c(p.moreMenu))},dependencies:[D,C,y,h],encapsulation:2});let e=t;return e})();var F=[{path:"",component:T,children:[{path:"by-url",loadComponent(){return import("./chunk-772J5O6W.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[w]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{F as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-RUYX7KTP.js";import{a as $}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as J,b as Q,d as X}from"./chunk-BZWZ64N5.js";import{a as Y}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as G}from"./chunk-
|
|
1
|
+
import{a as ee}from"./chunk-RUYX7KTP.js";import{a as $}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as J,b as Q,d as X}from"./chunk-BZWZ64N5.js";import{a as Y}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as G}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as q,c as V,h as H,m as U,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as O}from"./chunk-D6JH2KV4.js";import{e as z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as B,y as A}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as T,Nb as E,Nc as l,Oc as f,Pc as v,Rc as g,Sc as c,Tc as u,ac as P,ad as b,cc as M,ec as R,fc as x,gc as N,hc as h,ic as t,id as D,jc as n,kc as C,kd as F,mb as L,ob as r,ra as _,rc as k,wc as y,ya as w,yc as S,za as I}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var te=a=>({"bg-gradient-warning":a}),ne=()=>["/menu/log/inventory/sync-inventory/detail"],ie=a=>({ID:a});function oe(a,m){if(a&1&&(t(0,"span",19),C(1,"img",20),n(),l(2)),a&2){let o=m.item;r(),h("src",o.Img,L)("alt",o.Name),r(),v(" ",o.Name," ")}}function ae(a,m){if(a&1&&(t(0,"tr",23)(1,"td")(2,"a",25),l(3),D(4,"date"),n()(),t(5,"td"),l(6),n(),t(7,"td"),l(8),n(),t(9,"td"),l(10),n(),t(11,"td"),l(12),n()()),a&2){let o=m.$implicit;h("ngClass",b(11,te,o.ResponseCode==400)),r(2),h("routerLink",W(13,ne))("queryParams",b(14,ie,o.ID)),r(),v(" ",F(4,8,o.Created,"dd MMM yyyy HH:mm")," "),r(3),f(o.channelName),r(2),f(o.Sku),r(2),f(o.Stock),r(2),f(o.ResponseCode)}}function re(a,m){if(a&1){let o=k();t(0,"div",17)(1,"table",21)(2,"thead")(3,"tr",22)(4,"th"),l(5,"Created"),n(),t(6,"th"),l(7,"Channel"),n(),t(8,"th"),l(9,"SKU"),n(),t(10,"th"),l(11,"Stock"),n(),t(12,"th"),l(13,"Response code"),n()()(),t(14,"tbody"),x(15,ae,13,16,"tr",23,R),n()(),t(17,"mat-paginator",24),y("page",function(d){w(o);let e=S();return I(e.changePage(d))}),n()()}if(a&2){let o=S();r(15),N(o.Result),r(2),h("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function le(a,m){a&1&&(t(0,"div",18),C(1,"app-empty-state"),n())}var Ie=(()=>{let m=class m{constructor(){this.http=_(O),this._RawLogService=_(ee),this.authService=_(G),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(p=>{this.filter=p.Filter,this.ActionTypeList=p.Options.ActionTypeList,this.Get()})}Get(p){p!=null&&(this.filter.Sku=p),this.http.post("api/Inventory/GetLog",this.filter).subscribe(d=>{this._RawLogService.Data=d.hits,this.Result=Array();for(let e of d.hits){let s={ID:e._source.log.id,Created:e._source["@timestamp_received"],channelName:e._source.log.channelName,Sku:e._source.log.sku,Stock:e._source.log.stock,ResponseCode:e._source.log.responseCode};this.Result.push(s)}this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(p){this.filter.PageNumber=p.pageIndex+1,this.Get()}};m.\u0275fac=function(d){return new(d||m)},m.\u0275cmp=T({type:m,selectors:[["app-inventory-log"]],decls:32,vars:9,consts:[["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"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[3,"ngClass"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(d,e){d&1&&(t(0,"mainpanel",0),u("textChange",function(i){return c(e.filter.Sku,i)||(e.filter.Sku=i),i}),y("onSubmit",function(i){return e.Get(i)}),t(1,"actions")(2,"a",1),l(3," Order Inventory Sync Job "),n()(),t(4,"filters")(5,"div",2)(6,"div")(7,"label",3),l(8,"Channel"),n(),t(9,"ng-select",4),u("ngModelChange",function(i){return c(e.filter.ChannelID,i)||(e.filter.ChannelID=i),i}),E(10,oe,3,3,"ng-template",5),n()(),t(11,"div",6)(12,"label",7),l(13,"From/To"),n(),t(14,"div",8)(15,"datepicker",9),u("dateChange",function(i){return c(e.filter.From,i)||(e.filter.From=i),i}),n()(),t(16,"div")(17,"datepicker",10),u("dateChange",function(i){return c(e.filter.To,i)||(e.filter.To=i),i}),n()()(),t(18,"div",6)(19,"label",11),l(20,"Page Number"),n(),t(21,"input",12),u("ngModelChange",function(i){return c(e.filter.PageNumber,i)||(e.filter.PageNumber=i),i}),n()(),t(22,"div",6)(23,"label",11),l(24,"Page Size"),n(),t(25,"input",13),u("ngModelChange",function(i){return c(e.filter.RowCount,i)||(e.filter.RowCount=i),i}),n()()()(),t(26,"content")(27,"div",14)(28,"div",15)(29,"div",16),P(30,re,18,3,"div",17)(31,le,2,0,"div",18),n()()()()()),d&2&&(g("text",e.filter.Sku),r(9),h("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),r(6),g("date",e.filter.From),r(2),g("date",e.filter.To),r(4),g("ngModel",e.filter.PageNumber),r(4),g("ngModel",e.filter.RowCount),r(5),M((e.Result==null?null:e.Result.length)>0?30:31))},dependencies:[K,z,X,q,V,j,H,U,J,Q,Z,B,$,Y,A],encapsulation:2});let a=m;return a})();export{Ie as InventoryLogComponent};
|