marketplacepos 5.43.7 → 5.43.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/Marketplace/{chunk-GJUPDABG.js → chunk-2WE5VQIB.js} +1 -1
  2. package/Marketplace/{chunk-TXVG5OHR.js → chunk-4FDSLLEW.js} +1 -1
  3. package/Marketplace/{chunk-FHQTKJXS.js → chunk-4TCVWLGV.js} +1 -1
  4. package/Marketplace/{chunk-EBVE2XHU.js → chunk-5J2P4G7C.js} +1 -1
  5. package/Marketplace/{chunk-3IO4ZF34.js → chunk-5W5H64GB.js} +1 -1
  6. package/Marketplace/{chunk-O7FDRTJ2.js → chunk-6CRGHPSR.js} +1 -1
  7. package/Marketplace/{chunk-DO2UECCT.js → chunk-6GSTYF5H.js} +1 -1
  8. package/Marketplace/{chunk-3BYIWPKX.js → chunk-74NKCY42.js} +1 -1
  9. package/Marketplace/{chunk-BCH2MADE.js → chunk-AQGYDN3B.js} +1 -1
  10. package/Marketplace/{chunk-SUJBRB2D.js → chunk-CMLFTAEA.js} +1 -1
  11. package/Marketplace/{chunk-VJNZ5THR.js → chunk-DJLBMG6O.js} +1 -1
  12. package/Marketplace/{chunk-EHU3RPGU.js → chunk-EAKQWIS7.js} +1 -1
  13. package/Marketplace/{chunk-KG47DFP5.js → chunk-EHJ5CYUT.js} +1 -1
  14. package/Marketplace/{chunk-KMZPNPJF.js → chunk-EIWYK5TA.js} +1 -1
  15. package/Marketplace/{chunk-FO2QLLKW.js → chunk-EM443W7B.js} +2 -2
  16. package/Marketplace/{chunk-LZYW24WA.js → chunk-FBDQLWJX.js} +1 -1
  17. package/Marketplace/{chunk-FWG7M5IP.js → chunk-GVQNFCWT.js} +1 -1
  18. package/Marketplace/{chunk-6ZVXICIH.js → chunk-H7A64RRL.js} +1 -1
  19. package/Marketplace/{chunk-UDZIOJVC.js → chunk-HCQDRRUB.js} +1 -1
  20. package/Marketplace/{chunk-TSPQ2LFF.js → chunk-HIAUMXPO.js} +1 -1
  21. package/Marketplace/{chunk-ESX7MIMG.js → chunk-I6FCMA5P.js} +1 -1
  22. package/Marketplace/{chunk-UMA5ZNXQ.js → chunk-IBVAAGUH.js} +1 -1
  23. package/Marketplace/{chunk-LLDNDJ7P.js → chunk-ICZU6TYQ.js} +1 -1
  24. package/Marketplace/{chunk-R45ORDIE.js → chunk-JUIKFEYB.js} +1 -1
  25. package/Marketplace/{chunk-JX6HFP2Y.js → chunk-KXD6CZ7T.js} +1 -1
  26. package/Marketplace/{chunk-YJHI5U5R.js → chunk-KZ7INCKP.js} +1 -1
  27. package/Marketplace/{chunk-ZJVWTRCI.js → chunk-NC3Y335Z.js} +1 -1
  28. package/Marketplace/{chunk-QWJECSZK.js → chunk-NU2AT65H.js} +1 -1
  29. package/Marketplace/{chunk-JJ6HE6R7.js → chunk-OGX774CC.js} +1 -1
  30. package/Marketplace/{chunk-KJATJWWX.js → chunk-Q3IZXH7X.js} +1 -1
  31. package/Marketplace/{chunk-HFBAUQ7H.js → chunk-RC4S5BM5.js} +1 -1
  32. package/Marketplace/{chunk-6NGH2YZQ.js → chunk-SDRFBNFF.js} +1 -1
  33. package/Marketplace/{chunk-UYLU3G52.js → chunk-SEN46Y6T.js} +1 -1
  34. package/Marketplace/{chunk-AOFDSBOE.js → chunk-T6LQ7WTR.js} +1 -1
  35. package/Marketplace/{chunk-SSAGHA7U.js → chunk-UAYWO75X.js} +1 -1
  36. package/Marketplace/{chunk-XC7L6C26.js → chunk-VEPPBK2Y.js} +1 -1
  37. package/Marketplace/{chunk-J6UZFGNY.js → chunk-VWYHEJLH.js} +1 -1
  38. package/Marketplace/{chunk-5FJUX7W5.js → chunk-WPWN2PNK.js} +2 -2
  39. package/Marketplace/{chunk-FYBG3KWC.js → chunk-WRRVCTKT.js} +1 -1
  40. package/Marketplace/{chunk-Q23GGWWT.js → chunk-XT4STZN6.js} +1 -1
  41. package/Marketplace/{chunk-3NP5TQOW.js → chunk-Y4X2G3D4.js} +1 -1
  42. package/Marketplace/{chunk-AEJ5I5MW.js → chunk-YFSXR7TL.js} +1 -1
  43. package/Marketplace/{chunk-RM3KYX7K.js → chunk-ZAJW3O5K.js} +1 -1
  44. package/Marketplace/{chunk-WUUXAXFO.js → chunk-ZVVPREHB.js} +1 -1
  45. package/Marketplace/index.html +2 -2
  46. package/Marketplace/{main-4LOUTBLN.js → main-Y4LW42EY.js} +1 -1
  47. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{h as m}from"./chunk-AEJ5I5MW.js";import{a as d}from"./chunk-5HO2IJ47.js";import{c as o}from"./chunk-PW42BQIY.js";import{a as I}from"./chunk-DRMAONR7.js";import{b as g,e as C}from"./chunk-JXSBFTQM.js";import{J as h,ea as l,ja as S,oa as u,pa as f,r as c}from"./chunk-B7KTCPKC.js";var N=(()=>{class i{constructor(t,e,s){this.httpService=t,this.toastrService=e,this.notificationService=s,this.authService=f(m),this.channelOptions=this.authService.getChannels()}loader(t=o.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:t})}LoadInPOS(t=o.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:t})}filterChannelByTypeId(t,e){return t.filter(s=>e.findIndex(n=>s.TypeID==n)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(t){let e={ID:t};return this.httpService.post("/api/product/TotalProductLive",e)}clearCacheChannel(t){let e={ID:t};return this.httpService.post("/api/Channel/ClearCacheChannel",e)}detachProduct(t){return this.httpService.post("/api/product/Detach",t)}uploadSingleProduct(t,e){let s={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleChannel",s).pipe(l(n=>{this.showToastrSuccessUploadSingle(n,t[0])}),h(n=>(this.showToastErrorUploadSingle(n,t[0]),c(()=>new Error(n)))))}uploadMultipleProduct(t,e){let s={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",s).pipe(l(n=>{this.showToastrUploadMultiple(n.Message)}),h(n=>(this.showToastrUploadMultiple(n.error?.Message),c(()=>new Error(n)))))}uploadNotInChannel(t,e){let s={Products:t,Channel:e};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",s).pipe(l(n=>{this.showToastrUploadMultiple(n)}),h(n=>(this.showToastrUploadMultiple(n.error?.Message),c(()=>new Error(n)))))}scanSingle(t,e){let s={ID:t,SKU:e};return this.httpService.post("/api/product/ScanSingle",s)}scanNotInChannel(t){let e={ID:t};return this.httpService.post("/api/product/ScanNotinChannel",e)}findAllSoldInChannel(t){return this.httpService.post("/api/product/GetSoldInChannel",t)}scanAll(t,e,s,n=!1){let a={ID:t,ScanFull:e,UpdatedProduct:s,Async:n};return this.httpService.post("/api/product/ScanOptimized",a)}scanAsyncProductV2(t,e,s){let n={ID:t,ScanFull:e?1:0,UpdatedProduct:s,Async:!0};return this.httpService.post(d.ScanAsyncProductV2,n).pipe(l(a=>{this.notificationService.subscribeToJobGroup(a.JobID)}))}scanSyncProductV2(t,e,s){let n={ID:t,ScanFull:e,UpdatedProduct:s,Async:!1};return this.httpService.post(d.ScanSyncProductV2,n)}scanProductV2(t,e,s,n=!1){return n?this.scanAsyncProductV2(t,e,s).pipe(l(()=>{this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"})})):this.scanSyncProductV2(t,e,s).pipe(l(a=>{let r=this.findChannelById(t,this.channelOptions);this.successToastrScanAllProduct(a,r,!s)}))}scanCompareToPos(t){return this.httpService.post("/api/product/CompareMarketplaceToPOS",t)}getVariantCodesProduct(t){return(t.Variants||[]).map(n=>n.Code)}downloadMultipleProduct(t){let e=t.map(s=>({ChannelItemID:s.ChannelItemID,ChannelID:s.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",e).pipe(l(s=>{this.toastrService.success(`${s.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(t){let e={ChannelItemID:t.ChannelItemID,ChannelID:t.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",e).pipe(l(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(t=[]){let e=[];return t.forEach(s=>{s.Variants.forEach(n=>{e=[...e,n.Code]})}),e}filterUnselectedChannel(t,e){let s=[];t.forEach(a=>{s=[...s,...a.Channel]});let n;if(!s||s.length==0)n=e;else{let a=[];n=e.filter(r=>(a=s.filter(p=>p.ChannelID==r.ID),a.length!==t.length))}return n}findChannelById(t,e){return e.find(s=>s.ID==t)}sortChannel(t=[]){return t.sort((e,s)=>e.TypeID<s.TypeID?1:e.TypeID===s.TypeID?0:-1)}hasSelection(t=[]){return this.selectedProduct(t).length>0}selectedProduct(t=[]){return t.filter(e=>e.selected)}hasSelectionVariant(t){return this.selectedVariantProduct(t).length>0}selectedVariantProduct(t){let e=[];return t.forEach(s=>{e=[...e,...s.Variants!=null?s.Variants.filter(n=>n.selected):""]}),e}getChannelProduct(t){let e=t.Variants||[],s=[];for(let n of e)if(n.Channel!=null)for(let a of n.Channel)s.filter(r=>r.ChannelID==a.ChannelID).length==0&&s.push(a);return this.sortChannel(s)}successToastrScanAllProduct(t,e,s){let n=t.InChannel?t?.InChannel?.Product:0,a=t?.NotInPOS?.Product?t?.NotInPOS?.Product:0,r=o.IsNotEmpty(t.LastUpdate)?o.convertToReadableDate(t.LastUpdate):null;s?this.toastrService.success(`
1
+ import{h as m}from"./chunk-YFSXR7TL.js";import{a as d}from"./chunk-5HO2IJ47.js";import{c as o}from"./chunk-PW42BQIY.js";import{a as I}from"./chunk-DRMAONR7.js";import{b as g,e as C}from"./chunk-JXSBFTQM.js";import{J as h,ea as l,ja as S,oa as u,pa as f,r as c}from"./chunk-B7KTCPKC.js";var N=(()=>{class i{constructor(t,e,s){this.httpService=t,this.toastrService=e,this.notificationService=s,this.authService=f(m),this.channelOptions=this.authService.getChannels()}loader(t=o.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:t})}LoadInPOS(t=o.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:t})}filterChannelByTypeId(t,e){return t.filter(s=>e.findIndex(n=>s.TypeID==n)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(t){let e={ID:t};return this.httpService.post("/api/product/TotalProductLive",e)}clearCacheChannel(t){let e={ID:t};return this.httpService.post("/api/Channel/ClearCacheChannel",e)}detachProduct(t){return this.httpService.post("/api/product/Detach",t)}uploadSingleProduct(t,e){let s={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleChannel",s).pipe(l(n=>{this.showToastrSuccessUploadSingle(n,t[0])}),h(n=>(this.showToastErrorUploadSingle(n,t[0]),c(()=>new Error(n)))))}uploadMultipleProduct(t,e){let s={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",s).pipe(l(n=>{this.showToastrUploadMultiple(n.Message)}),h(n=>(this.showToastrUploadMultiple(n.error?.Message),c(()=>new Error(n)))))}uploadNotInChannel(t,e){let s={Products:t,Channel:e};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",s).pipe(l(n=>{this.showToastrUploadMultiple(n)}),h(n=>(this.showToastrUploadMultiple(n.error?.Message),c(()=>new Error(n)))))}scanSingle(t,e){let s={ID:t,SKU:e};return this.httpService.post("/api/product/ScanSingle",s)}scanNotInChannel(t){let e={ID:t};return this.httpService.post("/api/product/ScanNotinChannel",e)}findAllSoldInChannel(t){return this.httpService.post("/api/product/GetSoldInChannel",t)}scanAll(t,e,s,n=!1){let a={ID:t,ScanFull:e,UpdatedProduct:s,Async:n};return this.httpService.post("/api/product/ScanOptimized",a)}scanAsyncProductV2(t,e,s){let n={ID:t,ScanFull:e?1:0,UpdatedProduct:s,Async:!0};return this.httpService.post(d.ScanAsyncProductV2,n).pipe(l(a=>{this.notificationService.subscribeToJobGroup(a.JobID)}))}scanSyncProductV2(t,e,s){let n={ID:t,ScanFull:e,UpdatedProduct:s,Async:!1};return this.httpService.post(d.ScanSyncProductV2,n)}scanProductV2(t,e,s,n=!1){return n?this.scanAsyncProductV2(t,e,s).pipe(l(()=>{this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"})})):this.scanSyncProductV2(t,e,s).pipe(l(a=>{let r=this.findChannelById(t,this.channelOptions);this.successToastrScanAllProduct(a,r,!s)}))}scanCompareToPos(t){return this.httpService.post("/api/product/CompareMarketplaceToPOS",t)}getVariantCodesProduct(t){return(t.Variants||[]).map(n=>n.Code)}downloadMultipleProduct(t){let e=t.map(s=>({ChannelItemID:s.ChannelItemID,ChannelID:s.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",e).pipe(l(s=>{this.toastrService.success(`${s.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(t){let e={ChannelItemID:t.ChannelItemID,ChannelID:t.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",e).pipe(l(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(t=[]){let e=[];return t.forEach(s=>{s.Variants.forEach(n=>{e=[...e,n.Code]})}),e}filterUnselectedChannel(t,e){let s=[];t.forEach(a=>{s=[...s,...a.Channel]});let n;if(!s||s.length==0)n=e;else{let a=[];n=e.filter(r=>(a=s.filter(p=>p.ChannelID==r.ID),a.length!==t.length))}return n}findChannelById(t,e){return e.find(s=>s.ID==t)}sortChannel(t=[]){return t.sort((e,s)=>e.TypeID<s.TypeID?1:e.TypeID===s.TypeID?0:-1)}hasSelection(t=[]){return this.selectedProduct(t).length>0}selectedProduct(t=[]){return t.filter(e=>e.selected)}hasSelectionVariant(t){return this.selectedVariantProduct(t).length>0}selectedVariantProduct(t){let e=[];return t.forEach(s=>{e=[...e,...s.Variants!=null?s.Variants.filter(n=>n.selected):""]}),e}getChannelProduct(t){let e=t.Variants||[],s=[];for(let n of e)if(n.Channel!=null)for(let a of n.Channel)s.filter(r=>r.ChannelID==a.ChannelID).length==0&&s.push(a);return this.sortChannel(s)}successToastrScanAllProduct(t,e,s){let n=t.InChannel?t?.InChannel?.Product:0,a=t?.NotInPOS?.Product?t?.NotInPOS?.Product:0,r=o.IsNotEmpty(t.LastUpdate)?o.convertToReadableDate(t.LastUpdate):null;s?this.toastrService.success(`
2
2
  ${a+n} product updates in ${e.Name} </br>
3
3
  (${n} In Channel + ${a} Not In Pos)
4
4
  ${o.IsNotEmpty(r)?"since "+r:""}
@@ -1 +1 @@
1
- import{a as T}from"./chunk-SSAGHA7U.js";import{a as E}from"./chunk-DRHWRRQV.js";import{h as w}from"./chunk-AEJ5I5MW.js";import{a as D}from"./chunk-5HO2IJ47.js";import{b as i,c as m}from"./chunk-PW42BQIY.js";import{b as j,e as s}from"./chunk-JXSBFTQM.js";import{G as C}from"./chunk-M2FCTYGU.js";import{B as A,G as U,J as u,Ra as I,g as k,ja as p,pa as a,q as d,v as b}from"./chunk-B7KTCPKC.js";var F=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var x=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var v=class{};var R=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var O=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(D.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Vt=(()=>{class r{constructor(){this.authService=a(w),this.productService=a(T),this.shoppeUploadService=a(F),this.tiktokUploadService=a(x),this.lazadaUploadService=a(H),this.tokopediaUploadService=a(R),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(O),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(C),this.httpService=a(s),this._selectedProduct=new k(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(U(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return I(t.map(o=>{let c=new g;return c.id=o.ID,c.name=o.Name,c.type=o.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);A(e).pipe(b(o=>{let c=[];return o.forEach(f=>{c=[...c,...f]}),c})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],c=[],f=[],S=[],y=[],P=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:c.push(l);break;case i.Tokopedia:f.push(l);break;case i.WooCommerce:S.push(l);break;case i.Shopify:y.push(l);break;case i.Plugo:P.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:y},{type:i.Plugo,data:P}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(c));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(P));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let c=new v;c.ChannelID=o.id,c.ChannelType=o.type,c.Products=this._selectedProduct.getValue(),o.type==i.Shopify?delete c.CategoryID:c.CategoryID=o.categoryId,o.type==i.WooCommerce||o.type==i.Shopify?c.Attribute=o.attributes[0]:c.Attributes=this.formatAttributes(o.type,o.attributes),e.push(c)}),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{F as a,x as b,H as c,z as d,Vt as e};
1
+ import{a as T}from"./chunk-UAYWO75X.js";import{a as E}from"./chunk-DRHWRRQV.js";import{h as w}from"./chunk-YFSXR7TL.js";import{a as D}from"./chunk-5HO2IJ47.js";import{b as i,c as m}from"./chunk-PW42BQIY.js";import{b as j,e as s}from"./chunk-JXSBFTQM.js";import{G as C}from"./chunk-M2FCTYGU.js";import{B as A,G as U,J as u,Ra as I,g as k,ja as p,pa as a,q as d,v as b}from"./chunk-B7KTCPKC.js";var F=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var x=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var v=class{};var R=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var O=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(D.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Vt=(()=>{class r{constructor(){this.authService=a(w),this.productService=a(T),this.shoppeUploadService=a(F),this.tiktokUploadService=a(x),this.lazadaUploadService=a(H),this.tokopediaUploadService=a(R),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(O),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(C),this.httpService=a(s),this._selectedProduct=new k(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(U(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return I(t.map(o=>{let c=new g;return c.id=o.ID,c.name=o.Name,c.type=o.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);A(e).pipe(b(o=>{let c=[];return o.forEach(f=>{c=[...c,...f]}),c})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],c=[],f=[],S=[],y=[],P=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:c.push(l);break;case i.Tokopedia:f.push(l);break;case i.WooCommerce:S.push(l);break;case i.Shopify:y.push(l);break;case i.Plugo:P.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:y},{type:i.Plugo,data:P}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(c));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(P));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let c=new v;c.ChannelID=o.id,c.ChannelType=o.type,c.Products=this._selectedProduct.getValue(),o.type==i.Shopify?delete c.CategoryID:c.CategoryID=o.categoryId,o.type==i.WooCommerce||o.type==i.Shopify?c.Attribute=o.attributes[0]:c.Attributes=this.formatAttributes(o.type,o.attributes),e.push(c)}),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{F as a,x as b,H as c,z as d,Vt as e};
@@ -1 +1 @@
1
- import{a as x}from"./chunk-PE5AFID4.js";import{g as u}from"./chunk-AEJ5I5MW.js";import{b as h,d as C,i as M,j as v,k as S}from"./chunk-CLER2MX6.js";import{G as g,n as p}from"./chunk-M2FCTYGU.js";import{Gb as m,Gc as t,Yb as f,ic as i,ja as s,jc as n,kc as d,pa as o,tc as c}from"./chunk-B7KTCPKC.js";var y=(()=>{class e{constructor(){this.dialogRef=o(h),this.route=o(g),this.modalConfig=new v,this.modalConfig.title="Switch to modern authorization",this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0,this.modalConfig.headerType=M.Warning,this.modalConfig.okText="Setup"}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(),this.route.navigate(["/menu/users"])}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=m({type:e,selectors:[["app-modal-user-migration-confirmation"]],decls:19,vars:1,consts:[[3,"onOk","onCancel","config"],["content",""],[1,"d-flex","align-items-center","justify-content-between","gap-6"],[1,"text-center",2,"width","300px"],[1,"fa-solid","fa-users-gear","fa-6x"],[1,"lh-base"],["href","https://support.dealpos.com/en/collections/16213478-user-group","target","_blank"]],template:function(r,l){r&1&&(i(0,"modal-material",0),c("onOk",function(){return l.onOk()})("onCancel",function(){return l.onClose()}),i(1,"div",1)(2,"div",2)(3,"div",3),d(4,"i",4),n(),i(5,"div",5)(6,"p"),t(7," We have introduced a new Modern Authorization, Please switch from "),i(8,"b"),t(9,"legacy"),n(),t(10," to "),i(11,"b"),t(12,"modern"),n(),t(13," authorization by inviting your users. "),n(),i(14,"div"),t(15," Please refer to this "),i(16,"a",6),t(17,"article"),n(),t(18," for more information "),n()()()()()),r&2&&f("config",l.modalConfig)},dependencies:[p,S],encapsulation:2})}}return e})();var R=(()=>{class e{constructor(){this.dialog=o(C),this.tokenService=o(u),this.dialogRef=null}openDialogMigrationConfirmation(){this.tokenService.getUser()?.AuthorizationMode===x.Legacy&&!this.dialogRef&&(this.dialogRef=this.dialog.open(y),this.dialogRef.afterClosed().subscribe(()=>{this.dialogRef=null}))}resetDialogState(){this.dialogRef&&(this.dialogRef.close(),this.dialogRef=null)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var B=(e,b)=>(o(R).openDialogMigrationConfirmation(),!0);export{B as a};
1
+ import{a as x}from"./chunk-PE5AFID4.js";import{g as u}from"./chunk-YFSXR7TL.js";import{b as h,d as C,i as M,j as v,k as S}from"./chunk-CLER2MX6.js";import{G as g,n as p}from"./chunk-M2FCTYGU.js";import{Gb as m,Gc as t,Yb as f,ic as i,ja as s,jc as n,kc as d,pa as o,tc as c}from"./chunk-B7KTCPKC.js";var y=(()=>{class e{constructor(){this.dialogRef=o(h),this.route=o(g),this.modalConfig=new v,this.modalConfig.title="Switch to modern authorization",this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0,this.modalConfig.headerType=M.Warning,this.modalConfig.okText="Setup"}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(),this.route.navigate(["/menu/users"])}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=m({type:e,selectors:[["app-modal-user-migration-confirmation"]],decls:19,vars:1,consts:[[3,"onOk","onCancel","config"],["content",""],[1,"d-flex","align-items-center","justify-content-between","gap-6"],[1,"text-center",2,"width","300px"],[1,"fa-solid","fa-users-gear","fa-6x"],[1,"lh-base"],["href","https://support.dealpos.com/en/collections/16213478-user-group","target","_blank"]],template:function(r,l){r&1&&(i(0,"modal-material",0),c("onOk",function(){return l.onOk()})("onCancel",function(){return l.onClose()}),i(1,"div",1)(2,"div",2)(3,"div",3),d(4,"i",4),n(),i(5,"div",5)(6,"p"),t(7," We have introduced a new Modern Authorization, Please switch from "),i(8,"b"),t(9,"legacy"),n(),t(10," to "),i(11,"b"),t(12,"modern"),n(),t(13," authorization by inviting your users. "),n(),i(14,"div"),t(15," Please refer to this "),i(16,"a",6),t(17,"article"),n(),t(18," for more information "),n()()()()()),r&2&&f("config",l.modalConfig)},dependencies:[p,S],encapsulation:2})}}return e})();var R=(()=>{class e{constructor(){this.dialog=o(C),this.tokenService=o(u),this.dialogRef=null}openDialogMigrationConfirmation(){this.tokenService.getUser()?.AuthorizationMode===x.Legacy&&!this.dialogRef&&(this.dialogRef=this.dialog.open(y),this.dialogRef.afterClosed().subscribe(()=>{this.dialogRef=null}))}resetDialogState(){this.dialogRef&&(this.dialogRef.close(),this.dialogRef=null)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var B=(e,b)=>(o(R).openDialogMigrationConfirmation(),!0);export{B as a};
@@ -1,4 +1,4 @@
1
- import{a as Ve}from"./chunk-722SRHLY.js";import{a as ke,b as _t}from"./chunk-YZKPQRLO.js";import{a as G}from"./chunk-66MLRB2J.js";import"./chunk-MS4AQ6UA.js";import{d as lt,o as mt}from"./chunk-M5JQ7BGW.js";import{a as re}from"./chunk-EPVCMYCI.js";import{g as ct}from"./chunk-6W6DKFRE.js";import"./chunk-7UHCDGAA.js";import{a as z}from"./chunk-AJL3CYNX.js";import{c as ot}from"./chunk-MHCAI6KP.js";import{b as st}from"./chunk-6FY74YFQ.js";import{b as pt}from"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import{b as gt}from"./chunk-BFU7VKO3.js";import{b as dt}from"./chunk-RMCAWPWK.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-M5XGP4SG.js";import"./chunk-CIIO2CJ6.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-WW22F76D.js";import"./chunk-B5VBBEEN.js";import"./chunk-E3ROEHBW.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as ae}from"./chunk-AOFDSBOE.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as Se}from"./chunk-5DIRXS7I.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as tt,b as it}from"./chunk-HYJVHRMN.js";import{a as ne,b as at}from"./chunk-M7NQID2Z.js";import{a as te,b as ie,c as rt}from"./chunk-GSZJGR7K.js";import"./chunk-CMTBBXR5.js";import{e as pe,h as Q}from"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{a as Z,b as $,d as ee,e as Ze}from"./chunk-5JVEEL2T.js";import{b as I,c as D}from"./chunk-PW42BQIY.js";import{b as Xe,c as Qe}from"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as Ke,e as W}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{d as Le,h as et,m as B,n as nt}from"./chunk-CLER2MX6.js";import{A as Je,b as Me,c as Y,h as J,m as K,o as X}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{s as $e}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{E as qe,F as Ye,H as q,J as De,f as A,g as F,j as Oe,k as V,m as R,n as ce}from"./chunk-M2FCTYGU.js";import{$c as x,Aa as Be,B as je,Ba as ze,Fc as j,Gb as L,Gc as l,Hb as Ne,Hc as h,Ic as E,Kc as C,Lc as y,Mb as u,Mc as b,Rc as U,Sc as Ge,Tc as le,Yb as d,Z as fe,ad as O,bd as k,cd as H,ea as Ee,ic as i,ja as He,jc as n,ka as Ie,kc as S,lc as w,mc as P,oa as We,oc as N,pb as M,rb as o,tc as v,uc as s,v as de,xa as Ue,xb as T,ya as g,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ht=(()=>{class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[Se.DownloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[Se.DownloadOrder]}]}ngOnInit(){}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-orders"]],standalone:!1,decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),n()()(),S(4,"router-outlet")),a&2&&(o(3),d("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[tt,Ye],encapsulation:2})}}return r})();var Ae=(()=>{class r{constructor(e,a){this.http=e,this.toastr=a}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ee(a=>{this.tokopediaAcceptOrderHandler(a)}))}tokopediaAcceptOrderHandler(e){let a=e.filter(m=>m.Status==!1),t=e.filter(m=>m.Status==!0);if(a.length==0&&t.length>0){let m=`<ol>${this.generateSuccessMessage(t)}</ol>`;this.toastr.success(m,"Success",{enableHtml:!0})}else if(a.length>0&&t.length>0){let m=`<ol>
1
+ import{a as Ve}from"./chunk-722SRHLY.js";import{a as ke,b as _t}from"./chunk-YZKPQRLO.js";import{a as G}from"./chunk-66MLRB2J.js";import"./chunk-MS4AQ6UA.js";import{d as lt,o as mt}from"./chunk-M5JQ7BGW.js";import{a as re}from"./chunk-EPVCMYCI.js";import{g as ct}from"./chunk-6W6DKFRE.js";import"./chunk-7UHCDGAA.js";import{a as z}from"./chunk-AJL3CYNX.js";import{c as ot}from"./chunk-MHCAI6KP.js";import{b as st}from"./chunk-6FY74YFQ.js";import{b as pt}from"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import{b as gt}from"./chunk-BFU7VKO3.js";import{b as dt}from"./chunk-RMCAWPWK.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-M5XGP4SG.js";import"./chunk-CIIO2CJ6.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-WW22F76D.js";import"./chunk-B5VBBEEN.js";import"./chunk-E3ROEHBW.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as ae}from"./chunk-T6LQ7WTR.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as Se}from"./chunk-5DIRXS7I.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as tt,b as it}from"./chunk-HYJVHRMN.js";import{a as ne,b as at}from"./chunk-M7NQID2Z.js";import{a as te,b as ie,c as rt}from"./chunk-GSZJGR7K.js";import"./chunk-CMTBBXR5.js";import{e as pe,h as Q}from"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{a as Z,b as $,d as ee,e as Ze}from"./chunk-5JVEEL2T.js";import{b as I,c as D}from"./chunk-PW42BQIY.js";import{b as Xe,c as Qe}from"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as Ke,e as W}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{d as Le,h as et,m as B,n as nt}from"./chunk-CLER2MX6.js";import{A as Je,b as Me,c as Y,h as J,m as K,o as X}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{s as $e}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{E as qe,F as Ye,H as q,J as De,f as A,g as F,j as Oe,k as V,m as R,n as ce}from"./chunk-M2FCTYGU.js";import{$c as x,Aa as Be,B as je,Ba as ze,Fc as j,Gb as L,Gc as l,Hb as Ne,Hc as h,Ic as E,Kc as C,Lc as y,Mb as u,Mc as b,Rc as U,Sc as Ge,Tc as le,Yb as d,Z as fe,ad as O,bd as k,cd as H,ea as Ee,ic as i,ja as He,jc as n,ka as Ie,kc as S,lc as w,mc as P,oa as We,oc as N,pb as M,rb as o,tc as v,uc as s,v as de,xa as Ue,xb as T,ya as g,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ht=(()=>{class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[Se.DownloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[Se.DownloadOrder]}]}ngOnInit(){}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-orders"]],standalone:!1,decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),n()()(),S(4,"router-outlet")),a&2&&(o(3),d("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[tt,Ye],encapsulation:2})}}return r})();var Ae=(()=>{class r{constructor(e,a){this.http=e,this.toastr=a}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ee(a=>{this.tokopediaAcceptOrderHandler(a)}))}tokopediaAcceptOrderHandler(e){let a=e.filter(m=>m.Status==!1),t=e.filter(m=>m.Status==!0);if(a.length==0&&t.length>0){let m=`<ol>${this.generateSuccessMessage(t)}</ol>`;this.toastr.success(m,"Success",{enableHtml:!0})}else if(a.length>0&&t.length>0){let m=`<ol>
2
2
  ${this.generateSuccessMessage(t)}
3
3
  ${this.generateErrorMessage(a)}
4
- </ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(We(W),We(Ke))}}static{this.\u0275prov=He({token:r,factory:r.\u0275fac})}}return r})();function Et(r,c){if(r&1){let e=N();w(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return _(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),P()}}function It(r,c){if(r&1&&(w(0),u(1,Et,4,0,"ng-container",3),P()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function Nt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M),o(),E(" ",e.Name," ")}}function Ot(r,c){if(r&1){let e=N();w(0),i(1,"th",35)(2,"input",36),b("ngModelChange",function(t){g(e);let m=s(3);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return _(m.onSelectAllOrderData(t))}),n()(),P()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function Dt(r,c){if(r&1){let e=N();w(0),i(1,"input",36),b("ngModelChange",function(t){g(e);let m=s(2).$implicit;return y(m.selected,t)||(m.selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return _(m.onSelectOrderData(t))}),n(),P()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Mt(r,c){if(r&1&&(w(0),i(1,"td"),u(2,Dt,2,1,"ng-container",3),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Lt(r,c){if(r&1&&(w(0),i(1,"span"),l(2),n(),P()),r&2){let e=s().$implicit;o(2),h(e.Number)}}function kt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,M),o(),h(e.Number)}}function Vt(r,c){if(r&1&&(i(0,"tr"),u(1,Mt,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),u(5,Lt,3,1,"ng-container",24)(6,kt,2,2,"ng-template",null,1,H),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=j(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),h(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),h(e.Customer),o(2),h(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function At(r,c){if(r&1){let e=N();w(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),u(5,Ot,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),u(17,Vt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),x(19,"async"),x(20,"async"),v("total",function(){g(e);let t=s(2);return _(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return _(t.onNextPage())})("previous",function(){g(e);let t=s(2);return _(t.onPreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",O(20,7,t.paginationTotal$))}}function Ft(r,c){if(r&1&&(w(0),u(1,At,21,9,"ng-container",24),P()),r&2){let e=c.ngIf;s();let a=j(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function Rt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var ut=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=D.GuidEMpty,this.tokopediaType=I.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.getNewOrders()})}getNewOrders(){let e={PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.orderService.getNewOrders(e).pipe(fe()),this.newOrdersData$=this.sourceObs$.pipe(Ee(a=>{a.filter(m=>m.Type==I.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(fe())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==I.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(de(t=>(t=t.sort((m,f)=>D.compare(m.Created,f.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(T(pe),T(ke),T(Ae),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),_(t.getNewOrders())}),i(1,"actions"),u(2,It,2,1,"ng-container",3),x(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(13,Nt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(27,"div")(28,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),u(33,Ft,2,2,"ng-container",3),x(34,"async"),u(35,Rt,2,0,"ng-template",null,0,H),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",O(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(34,13,t.newOrdersData$)))},dependencies:[A,F,Y,X,Me,J,K,B,ee,Z,$,z,ne,re,te,ie,G,Oe,V],encapsulation:2})}}return r})();var Wt=()=>["/menu/Order"];function Bt(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),x(5,"number"),n(),i(6,"td"),l(7),x(8,"number"),n()()),r&2){let e=c.$implicit;o(2),h(e.Code),o(2),h(O(5,3,e.Quantity)),o(3),h(O(8,5,e.Price))}}function zt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),x(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),x(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),u(66,Bt,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),E(" ",e.model.Outlet," "),o(5),E(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),E(" ",e.model.Delivery," "),o(5),E(" ",e.model.TaxType," "),o(5),E(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),E(" ",e.model.Customer.Name," "),o(5),E(" ",e.model.Customer.Email," "),o(5),E(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var ft=(()=>{class r{constructor(e,a){this.http=e,this.url=a,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(qe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),u(6,zt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",U(5,Wt)),o(4),d("ngIf",t.model))},dependencies:[A,F,B,q,R,V],encapsulation:2})}}return r})();var me=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(me||{});var ue=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(ue||{});function Gt(r,c){if(r&1&&(w(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),P()),r&2){let e=s();o(4),E(" ",e.recipient==null?null:e.recipient.City," "),o(3),E(" ",e.recipient==null?null:e.recipient.District," ")}}function jt(r,c){if(r&1&&(w(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),E("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Ht(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),x(6,"date"),n()(),P()),r&2){let e=s();o(5),h(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Ut(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),h(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function qt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),x(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),h(a+1),o(2),h(e.Product_Name),o(2),h(e.SKU),o(2),h(O(9,4,e.Quantity))}}var Re=(()=>{class r{constructor(){this.minDate=D.MinDate,this.channelType=I}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case I.Tokopedia:this.marketplaceLogo=ue.TOKOPEDIA;break;case I.Shopee:this.marketplaceLogo=ue.SHOPEE;break;case I.Lazada:this.marketplaceLogo=ue.LAZADA;break;case I.Tiktok:this.marketplaceLogo=ue.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=me.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=me.GRAB:e.includes("jne")?this.shippingLogo=me.JNE:e.includes("gosend")?this.shippingLogo=me.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=me.JNT:e.includes("sicepat")?this.shippingLogo=me.SICEPAT:e.includes("spx")?this.shippingLogo=me.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=me.LAZADA_EXPRESS)}initShippingLabel(){this.recipient=this.shippingLabel.Recipient,this.store=this.shippingLabel.Store,this.products=this.shippingLabel.Products,this.logistic=this.shippingLabel.Logistic}initBarcodeConfig(){if(D.IsNotEmpty(this.logistic?.Resi_Number)){let e=this.logistic?.Resi_Number;JsBarcode(`#RESI${this.id}`,this.logistic?.Resi_Number,{displayValue:!1,width:e.length>15?1:1.5,height:40})}D.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ue],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Be(),S(23,"svg",11),n()(),ze(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),u(50,Gt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),u(61,jt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),x(67,"number"),n()()(),u(68,Ht,7,4,"ng-container",20)(69,Ut,6,1,"ng-container",20),n(),i(70,"div",28),Be(),S(71,"svg",29),n()()(),ze(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),u(86,qt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,M),o(3),h(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,M),o(7),E(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),h(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),h(t.recipient==null?null:t.recipient.Name),o(5),E(" ",t.recipient==null?null:t.recipient.Address," "),o(7),h(t.store==null?null:t.store.Name),o(2),h(t.store==null?null:t.store.Phone),o(2),E(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),E("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?O(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[ce,A,F,R,V],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]})}}return r})();var St=r=>[r],Kt=()=>["/menu/Order/detail"],Xt=(r,c)=>({Number:r,Outlet:c});function Qt(r,c){if(r&1){let e=N();w(0),i(1,"button",21),v("click",function(){g(e);let t=s();return _(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),P()}}function Zt(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function $t(r,c){r&1&&(w(0),S(1,"th",39),P())}function ei(r,c){if(r&1){let e=N();w(0),i(1,"input",31),b("ngModelChange",function(t){g(e);let m=s().$implicit;return y(m.Selected,t)||(m.Selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return _(m.onSelectReadyToShip(t))}),n(),P()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ti(r,c){if(r&1&&(i(0,"a",43),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Kt))("queryParams",le(4,Xt,e.Number,e.Outlet)),o(),h(e.Number)}}function ii(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ni(r,c){if(r&1){let e=N();i(0,"a",47),v("click",function(){g(e);let t=s(2).$implicit,m=s(3);return _(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",48),n()}}function ri(r,c){if(r&1&&(w(0),i(1,"td",45),u(2,ni,2,0,"a",46),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function ai(r,c){if(r&1&&(i(0,"tr")(1,"td"),u(2,ei,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),u(6,ti,2,7,"a",40)(7,ii,2,2,"a",41),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"number"),n(),i(13,"td"),l(14),x(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",42),n(),u(18,ri,3,1,"ng-container",37),n()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),h(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),h(e.Customer),o(2),h(O(12,9,e.Amount)),o(3),h(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(),d("ngxPermissionsOnly",Ge(14,St,a.fulfillmentRole))}}function oi(r,c){if(r&1){let e=N();w(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),b("ngModelChange",function(t){g(e);let m=s(2);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return _(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),u(19,$t,2,0,"ng-container",37),n()(),i(20,"tbody"),u(21,ai,19,16,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),x(23,"async"),x(24,"async"),v("total",function(){g(e);let t=s(2);return _(t.getRowCount())})("next",function(){g(e);let t=s(2);return _(t.NextPage())})("previous",function(){g(e);let t=s(2);return _(t.PreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(13),d("ngxPermissionsOnly",Ge(10,St,t.fulfillmentRole)),o(2),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(23,6,t.readyToShip$))==null?null:e.length)("paginationTotal",O(24,8,t.paginationTotal$))}}function li(r,c){if(r&1&&(w(0),u(1,oi,25,12,"ng-container",25),P()),r&2){let e=c.ngIf;s();let a=j(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function pi(r,c){r&1&&(i(0,"div",49),S(1,"app-empty-state"),n())}function mi(r,c){r&1&&(w(0),i(1,"div",51),l(2,"\xA0"),n(),P())}function di(r,c){if(r&1&&(w(0),S(1,"app-shipping-label",50),u(2,mi,3,0,"ng-container",4),P()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Ct=(()=>{class r{constructor(e,a,t,m,f,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=f,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=I,this.guidEmpty=D.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.fulfillmentRole=Se.Fulfillment,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.getReadyToShip()})}getReadyToShip(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",a).pipe(de(t=>t.Data),fe(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),je(m).pipe(de(f=>f.reduce((p,wt)=>p.concat(wt),[]))).subscribe({next:f=>{this.shippingLabels=f,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case I.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case I.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case I.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case I.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(de(a=>a?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(de(t=>t.sort((m,f)=>D.compare(m.Date,f.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==I.Tokopedia||a.TypeID==I.Shopee||a.TypeID==I.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Le),T(Ve),T(V),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[4,"ngxPermissionsOnly"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","10px"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"shippingLabel","id"],[1,"page-break"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),u(6,Qt,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(12,Zt,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(26,"div")(27,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),u(32,li,2,2,"ng-container",4),x(33,"async"),u(34,pi,2,0,"ng-template",null,0,H),n()()()()(),i(36,"div",19),u(37,di,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Y,X,Me,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,Re,Xe,Oe,R,V],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})}}return r})();var si=()=>["/menu/Order/detail"],ci=(r,c)=>({Number:r,Outlet:c});function gi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function _i(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,si))("queryParams",le(4,ci,e.Number,e.Outlet)),o(),h(e.Number)}}function hi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ui(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,_i,2,7,"a",32)(5,hi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function fi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,ui,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Si(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(e){return e==D.GuidEMpty}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,gi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,fi,20,4,"ng-container",18)(32,Si,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ci=()=>["/menu/Order/detail"],yi=(r,c)=>({Number:r,Outlet:c});function bi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function xi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ci))("queryParams",le(4,yi,e.Number,e.Outlet)),o(),h(e.Number)}}function vi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,M),o(),h(e.Number)}}function Ti(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,xi,2,7,"a",32)(5,vi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function wi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Ti,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Pi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var bt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==D.GuidEMpty}getChannelLogo(e){return D.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,wi,20,4,"ng-container",18)(32,Pi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ei=()=>["/menu/Order/detail"],Ii=(r,c)=>({Number:r,Outlet:c});function Ni(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Oi(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ei))("queryParams",le(4,Ii,e.Number,e.Outlet)),o(),h(e.Number)}}function Di(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Mi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Oi,2,7,"a",35)(5,Di,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,8,e.Amount)),o(3),h(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),h(e.State),o(2),d("typeId",e.TypeID)}}function Li(r,c){if(r&1){let e=N();w(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),u(20,Mi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function ki(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var xt=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==D.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(dt,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q),T(Le))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),_(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(15,Ni,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),u(35,Li,22,4,"ng-container",20)(36,ki,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Vi=()=>["/menu/Order/detail"],Ai=(r,c)=>({Number:r,Outlet:c});function Fi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Ri(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Vi))("queryParams",le(4,Ai,e.Number,e.Outlet)),o(),h(e.Number)}}function Wi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Bi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Ri,2,7,"a",33)(5,Wi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function zi(r,c){if(r&1){let e=N();w(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Bi,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Gi(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var vt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==D.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return D.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,Fi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.Note,p)||(t.filter.Note=p),_(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),u(35,zi,20,4,"ng-container",19)(36,Gi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var ji=[{path:"",component:ht,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:ut,canActivate:[ae],data:{title:"New Order"}},{path:"detail",component:ft,canActivate:[ae],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Ct,canActivate:[ae],data:{title:"Ready To Ship"}},{path:"Shipped",component:yt,canActivate:[ae],data:{title:"Shipped"}},{path:"Delivered",component:bt,canActivate:[ae],data:{title:"Delivered"}},{path:"All",component:xt,canActivate:[ae],data:{title:"All Order"}},{path:"Cancelled",component:vt,canActivate:[ae],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-6ZVXICIH.js").then(r=>r.DownloadV2Component)},canActivate:[ae],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-ZJVWTRCI.js").then(r=>r.DownloadOrderLogComponent),canActivate:[ae],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-JILE74BG.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[ae],data:{title:"Download Order Log Detail"}}]}],Tt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({imports:[ce,De.forChild(ji)]})}}return r})();var Dr=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({providers:[ke,Ae,Ve],imports:[ce,Je,Tt,it,nt,st,De,Ze,mt,lt,z,ct,$e,at,gt,et,pt,rt,G,Re,_t,ot,Qe]})}}return r})();export{Dr as OrdersModule};
4
+ </ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(We(W),We(Ke))}}static{this.\u0275prov=He({token:r,factory:r.\u0275fac})}}return r})();function Et(r,c){if(r&1){let e=N();w(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return _(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),P()}}function It(r,c){if(r&1&&(w(0),u(1,Et,4,0,"ng-container",3),P()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function Nt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M),o(),E(" ",e.Name," ")}}function Ot(r,c){if(r&1){let e=N();w(0),i(1,"th",35)(2,"input",36),b("ngModelChange",function(t){g(e);let m=s(3);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return _(m.onSelectAllOrderData(t))}),n()(),P()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function Dt(r,c){if(r&1){let e=N();w(0),i(1,"input",36),b("ngModelChange",function(t){g(e);let m=s(2).$implicit;return y(m.selected,t)||(m.selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return _(m.onSelectOrderData(t))}),n(),P()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Mt(r,c){if(r&1&&(w(0),i(1,"td"),u(2,Dt,2,1,"ng-container",3),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Lt(r,c){if(r&1&&(w(0),i(1,"span"),l(2),n(),P()),r&2){let e=s().$implicit;o(2),h(e.Number)}}function kt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,M),o(),h(e.Number)}}function Vt(r,c){if(r&1&&(i(0,"tr"),u(1,Mt,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),u(5,Lt,3,1,"ng-container",24)(6,kt,2,2,"ng-template",null,1,H),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=j(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),h(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),h(e.Customer),o(2),h(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function At(r,c){if(r&1){let e=N();w(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),u(5,Ot,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),u(17,Vt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),x(19,"async"),x(20,"async"),v("total",function(){g(e);let t=s(2);return _(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return _(t.onNextPage())})("previous",function(){g(e);let t=s(2);return _(t.onPreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",O(20,7,t.paginationTotal$))}}function Ft(r,c){if(r&1&&(w(0),u(1,At,21,9,"ng-container",24),P()),r&2){let e=c.ngIf;s();let a=j(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function Rt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var ut=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=D.GuidEMpty,this.tokopediaType=I.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.getNewOrders()})}getNewOrders(){let e={PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.orderService.getNewOrders(e).pipe(fe()),this.newOrdersData$=this.sourceObs$.pipe(Ee(a=>{a.filter(m=>m.Type==I.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(fe())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==I.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(de(t=>(t=t.sort((m,f)=>D.compare(m.Created,f.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(T(pe),T(ke),T(Ae),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),_(t.getNewOrders())}),i(1,"actions"),u(2,It,2,1,"ng-container",3),x(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(13,Nt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(27,"div")(28,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),u(33,Ft,2,2,"ng-container",3),x(34,"async"),u(35,Rt,2,0,"ng-template",null,0,H),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",O(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(34,13,t.newOrdersData$)))},dependencies:[A,F,Y,X,Me,J,K,B,ee,Z,$,z,ne,re,te,ie,G,Oe,V],encapsulation:2})}}return r})();var Wt=()=>["/menu/Order"];function Bt(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),x(5,"number"),n(),i(6,"td"),l(7),x(8,"number"),n()()),r&2){let e=c.$implicit;o(2),h(e.Code),o(2),h(O(5,3,e.Quantity)),o(3),h(O(8,5,e.Price))}}function zt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),x(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),x(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),u(66,Bt,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),E(" ",e.model.Outlet," "),o(5),E(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),E(" ",e.model.Delivery," "),o(5),E(" ",e.model.TaxType," "),o(5),E(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),E(" ",e.model.Customer.Name," "),o(5),E(" ",e.model.Customer.Email," "),o(5),E(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var ft=(()=>{class r{constructor(e,a){this.http=e,this.url=a,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(qe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),u(6,zt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",U(5,Wt)),o(4),d("ngIf",t.model))},dependencies:[A,F,B,q,R,V],encapsulation:2})}}return r})();var me=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(me||{});var ue=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(ue||{});function Gt(r,c){if(r&1&&(w(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),P()),r&2){let e=s();o(4),E(" ",e.recipient==null?null:e.recipient.City," "),o(3),E(" ",e.recipient==null?null:e.recipient.District," ")}}function jt(r,c){if(r&1&&(w(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),E("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Ht(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),x(6,"date"),n()(),P()),r&2){let e=s();o(5),h(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Ut(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),h(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function qt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),x(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),h(a+1),o(2),h(e.Product_Name),o(2),h(e.SKU),o(2),h(O(9,4,e.Quantity))}}var Re=(()=>{class r{constructor(){this.minDate=D.MinDate,this.channelType=I}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case I.Tokopedia:this.marketplaceLogo=ue.TOKOPEDIA;break;case I.Shopee:this.marketplaceLogo=ue.SHOPEE;break;case I.Lazada:this.marketplaceLogo=ue.LAZADA;break;case I.Tiktok:this.marketplaceLogo=ue.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=me.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=me.GRAB:e.includes("jne")?this.shippingLogo=me.JNE:e.includes("gosend")?this.shippingLogo=me.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=me.JNT:e.includes("sicepat")?this.shippingLogo=me.SICEPAT:e.includes("spx")?this.shippingLogo=me.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=me.LAZADA_EXPRESS)}initShippingLabel(){this.recipient=this.shippingLabel.Recipient,this.store=this.shippingLabel.Store,this.products=this.shippingLabel.Products,this.logistic=this.shippingLabel.Logistic}initBarcodeConfig(){if(D.IsNotEmpty(this.logistic?.Resi_Number)){let e=this.logistic?.Resi_Number;JsBarcode(`#RESI${this.id}`,this.logistic?.Resi_Number,{displayValue:!1,width:e.length>15?1:1.5,height:40})}D.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ue],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Be(),S(23,"svg",11),n()(),ze(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),u(50,Gt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),u(61,jt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),x(67,"number"),n()()(),u(68,Ht,7,4,"ng-container",20)(69,Ut,6,1,"ng-container",20),n(),i(70,"div",28),Be(),S(71,"svg",29),n()()(),ze(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),u(86,qt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,M),o(3),h(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,M),o(7),E(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),h(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),h(t.recipient==null?null:t.recipient.Name),o(5),E(" ",t.recipient==null?null:t.recipient.Address," "),o(7),h(t.store==null?null:t.store.Name),o(2),h(t.store==null?null:t.store.Phone),o(2),E(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),E("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?O(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[ce,A,F,R,V],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]})}}return r})();var St=r=>[r],Kt=()=>["/menu/Order/detail"],Xt=(r,c)=>({Number:r,Outlet:c});function Qt(r,c){if(r&1){let e=N();w(0),i(1,"button",21),v("click",function(){g(e);let t=s();return _(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),P()}}function Zt(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function $t(r,c){r&1&&(w(0),S(1,"th",39),P())}function ei(r,c){if(r&1){let e=N();w(0),i(1,"input",31),b("ngModelChange",function(t){g(e);let m=s().$implicit;return y(m.Selected,t)||(m.Selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return _(m.onSelectReadyToShip(t))}),n(),P()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ti(r,c){if(r&1&&(i(0,"a",43),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Kt))("queryParams",le(4,Xt,e.Number,e.Outlet)),o(),h(e.Number)}}function ii(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ni(r,c){if(r&1){let e=N();i(0,"a",47),v("click",function(){g(e);let t=s(2).$implicit,m=s(3);return _(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",48),n()}}function ri(r,c){if(r&1&&(w(0),i(1,"td",45),u(2,ni,2,0,"a",46),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function ai(r,c){if(r&1&&(i(0,"tr")(1,"td"),u(2,ei,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),u(6,ti,2,7,"a",40)(7,ii,2,2,"a",41),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"number"),n(),i(13,"td"),l(14),x(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",42),n(),u(18,ri,3,1,"ng-container",37),n()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),h(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),h(e.Customer),o(2),h(O(12,9,e.Amount)),o(3),h(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(),d("ngxPermissionsOnly",Ge(14,St,a.fulfillmentRole))}}function oi(r,c){if(r&1){let e=N();w(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),b("ngModelChange",function(t){g(e);let m=s(2);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return _(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),u(19,$t,2,0,"ng-container",37),n()(),i(20,"tbody"),u(21,ai,19,16,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),x(23,"async"),x(24,"async"),v("total",function(){g(e);let t=s(2);return _(t.getRowCount())})("next",function(){g(e);let t=s(2);return _(t.NextPage())})("previous",function(){g(e);let t=s(2);return _(t.PreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(13),d("ngxPermissionsOnly",Ge(10,St,t.fulfillmentRole)),o(2),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(23,6,t.readyToShip$))==null?null:e.length)("paginationTotal",O(24,8,t.paginationTotal$))}}function li(r,c){if(r&1&&(w(0),u(1,oi,25,12,"ng-container",25),P()),r&2){let e=c.ngIf;s();let a=j(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function pi(r,c){r&1&&(i(0,"div",49),S(1,"app-empty-state"),n())}function mi(r,c){r&1&&(w(0),i(1,"div",51),l(2,"\xA0"),n(),P())}function di(r,c){if(r&1&&(w(0),S(1,"app-shipping-label",50),u(2,mi,3,0,"ng-container",4),P()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Ct=(()=>{class r{constructor(e,a,t,m,f,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=f,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=I,this.guidEmpty=D.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.fulfillmentRole=Se.Fulfillment,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.getReadyToShip()})}getReadyToShip(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",a).pipe(de(t=>t.Data),fe(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),je(m).pipe(de(f=>f.reduce((p,wt)=>p.concat(wt),[]))).subscribe({next:f=>{this.shippingLabels=f,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case I.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case I.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case I.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case I.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(de(a=>a?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(de(t=>t.sort((m,f)=>D.compare(m.Date,f.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==I.Tokopedia||a.TypeID==I.Shopee||a.TypeID==I.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Le),T(Ve),T(V),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[4,"ngxPermissionsOnly"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","10px"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"shippingLabel","id"],[1,"page-break"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),u(6,Qt,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(12,Zt,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(26,"div")(27,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),u(32,li,2,2,"ng-container",4),x(33,"async"),u(34,pi,2,0,"ng-template",null,0,H),n()()()()(),i(36,"div",19),u(37,di,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Y,X,Me,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,Re,Xe,Oe,R,V],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})}}return r})();var si=()=>["/menu/Order/detail"],ci=(r,c)=>({Number:r,Outlet:c});function gi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function _i(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,si))("queryParams",le(4,ci,e.Number,e.Outlet)),o(),h(e.Number)}}function hi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ui(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,_i,2,7,"a",32)(5,hi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function fi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,ui,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Si(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(e){return e==D.GuidEMpty}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,gi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,fi,20,4,"ng-container",18)(32,Si,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ci=()=>["/menu/Order/detail"],yi=(r,c)=>({Number:r,Outlet:c});function bi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function xi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ci))("queryParams",le(4,yi,e.Number,e.Outlet)),o(),h(e.Number)}}function vi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,M),o(),h(e.Number)}}function Ti(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,xi,2,7,"a",32)(5,vi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function wi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Ti,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Pi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var bt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==D.GuidEMpty}getChannelLogo(e){return D.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,wi,20,4,"ng-container",18)(32,Pi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ei=()=>["/menu/Order/detail"],Ii=(r,c)=>({Number:r,Outlet:c});function Ni(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Oi(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ei))("queryParams",le(4,Ii,e.Number,e.Outlet)),o(),h(e.Number)}}function Di(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Mi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Oi,2,7,"a",35)(5,Di,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,8,e.Amount)),o(3),h(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),h(e.State),o(2),d("typeId",e.TypeID)}}function Li(r,c){if(r&1){let e=N();w(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),u(20,Mi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function ki(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var xt=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==D.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(dt,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q),T(Le))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),_(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(15,Ni,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),u(35,Li,22,4,"ng-container",20)(36,ki,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Vi=()=>["/menu/Order/detail"],Ai=(r,c)=>({Number:r,Outlet:c});function Fi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Ri(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Vi))("queryParams",le(4,Ai,e.Number,e.Outlet)),o(),h(e.Number)}}function Wi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Bi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Ri,2,7,"a",33)(5,Wi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function zi(r,c){if(r&1){let e=N();w(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Bi,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Gi(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var vt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==D.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return D.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[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"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,Fi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.Note,p)||(t.filter.Note=p),_(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),u(35,zi,20,4,"ng-container",19)(36,Gi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var ji=[{path:"",component:ht,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:ut,canActivate:[ae],data:{title:"New Order"}},{path:"detail",component:ft,canActivate:[ae],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Ct,canActivate:[ae],data:{title:"Ready To Ship"}},{path:"Shipped",component:yt,canActivate:[ae],data:{title:"Shipped"}},{path:"Delivered",component:bt,canActivate:[ae],data:{title:"Delivered"}},{path:"All",component:xt,canActivate:[ae],data:{title:"All Order"}},{path:"Cancelled",component:vt,canActivate:[ae],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-H7A64RRL.js").then(r=>r.DownloadV2Component)},canActivate:[ae],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-NC3Y335Z.js").then(r=>r.DownloadOrderLogComponent),canActivate:[ae],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-JILE74BG.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[ae],data:{title:"Download Order Log Detail"}}]}],Tt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({imports:[ce,De.forChild(ji)]})}}return r})();var Dr=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({providers:[ke,Ae,Ve],imports:[ce,Je,Tt,it,nt,st,De,Ze,mt,lt,z,ct,$e,at,gt,et,pt,rt,G,Re,_t,ot,Qe]})}}return r})();export{Dr as OrdersModule};