marketplacepos 3.21.2 → 3.21.4

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 (96) hide show
  1. package/Marketplace/chunk-27EDOHQU.js +1 -0
  2. package/Marketplace/{chunk-GQG2K3LS.js → chunk-2KEQ33LI.js} +1 -1
  3. package/Marketplace/{chunk-MKJON4UM.js → chunk-2LJXM62F.js} +1 -1
  4. package/Marketplace/{chunk-4A5AMPIQ.js → chunk-3MZT6OI2.js} +1 -1
  5. package/Marketplace/{chunk-VBCIYCOF.js → chunk-45PCYYJD.js} +1 -1
  6. package/Marketplace/{chunk-L4BFVIW5.js → chunk-4AUJZEST.js} +1 -1
  7. package/Marketplace/{chunk-47PEHCOU.js → chunk-4NXO2JYR.js} +1 -1
  8. package/Marketplace/{chunk-OTR5MBON.js → chunk-5SIWWKAE.js} +1 -1
  9. package/Marketplace/{chunk-2FRMUOJY.js → chunk-633RG6PO.js} +1 -1
  10. package/Marketplace/chunk-6IOO2XET.js +1 -0
  11. package/Marketplace/chunk-6ROL3HRT.js +1 -0
  12. package/Marketplace/{chunk-KINF7AYI.js → chunk-6WWFUHEP.js} +1 -1
  13. package/Marketplace/{chunk-GNY5TY3R.js → chunk-7FSQ3UC2.js} +1 -1
  14. package/Marketplace/{chunk-PYD2YWAN.js → chunk-7IIB5DLC.js} +1 -1
  15. package/Marketplace/{chunk-33L2SBIN.js → chunk-7N5WLZWW.js} +1 -1
  16. package/Marketplace/{chunk-6UDYSYXW.js → chunk-AGKVS3IQ.js} +1 -1
  17. package/Marketplace/{chunk-VQNE7IIA.js → chunk-AIGTFBXE.js} +1 -1
  18. package/Marketplace/chunk-AUBPDK26.js +1 -0
  19. package/Marketplace/chunk-BDBO2JSY.js +1 -0
  20. package/Marketplace/{chunk-EIBGI6U2.js → chunk-C2SGQUOH.js} +1 -1
  21. package/Marketplace/chunk-DCGU62F7.js +1 -0
  22. package/Marketplace/{chunk-HMZY4WZJ.js → chunk-DE2UMV34.js} +1 -1
  23. package/Marketplace/{chunk-NKDTKE6B.js → chunk-DG262GXE.js} +1 -1
  24. package/Marketplace/chunk-DMWXGJII.js +1 -0
  25. package/Marketplace/{chunk-ZX3SBNZT.js → chunk-DSKMV7XY.js} +1 -1
  26. package/Marketplace/{chunk-WKSTGJK5.js → chunk-ENIJ4MFV.js} +1 -1
  27. package/Marketplace/{chunk-ADKNVAA3.js → chunk-EWCG5FBG.js} +1 -1
  28. package/Marketplace/{chunk-MZNSPLFO.js → chunk-EXBAGUW2.js} +1 -1
  29. package/Marketplace/{chunk-BGWVHGAY.js → chunk-EYZIWEGE.js} +1 -1
  30. package/Marketplace/{chunk-YVTEU2IF.js → chunk-F57GDDSE.js} +1 -1
  31. package/Marketplace/{chunk-P66JCWQF.js → chunk-F6TQHNA5.js} +1 -1
  32. package/Marketplace/{chunk-JPEFRFJ2.js → chunk-FTDAPWOP.js} +1 -1
  33. package/Marketplace/chunk-FVFDCW5W.js +1 -0
  34. package/Marketplace/{chunk-YKTOOHMO.js → chunk-G7G4KTO3.js} +1 -1
  35. package/Marketplace/{chunk-7AAR6LMW.js → chunk-GAD5DRHK.js} +4 -4
  36. package/Marketplace/{chunk-WTMUHE4V.js → chunk-GCHJ4FTF.js} +1 -1
  37. package/Marketplace/{chunk-E5BOLHDG.js → chunk-GDA72XOJ.js} +1 -1
  38. package/Marketplace/{chunk-XKNXCYHS.js → chunk-HUL2TN2V.js} +1 -1
  39. package/Marketplace/{chunk-JY3L4RUM.js → chunk-J5DBLKIA.js} +1 -1
  40. package/Marketplace/{chunk-DY2P6RVD.js → chunk-J7V5HHYR.js} +1 -1
  41. package/Marketplace/{chunk-2E5AKA74.js → chunk-JCKUKK6T.js} +1 -1
  42. package/Marketplace/{chunk-B7HIQ2V5.js → chunk-JIOCWSW2.js} +1 -1
  43. package/Marketplace/{chunk-I4EO52EA.js → chunk-JJH6ADRN.js} +6 -6
  44. package/Marketplace/{chunk-HCJ6C5OR.js → chunk-KJ4SL5OX.js} +1 -1
  45. package/Marketplace/{chunk-JHYIHRQH.js → chunk-KTXT25SP.js} +1 -1
  46. package/Marketplace/{chunk-FTHTFVHH.js → chunk-KZ2VDCDO.js} +1 -1
  47. package/Marketplace/{chunk-ULELZXI5.js → chunk-L3JD55OC.js} +1 -1
  48. package/Marketplace/{chunk-GET2YOCJ.js → chunk-L4OULL5X.js} +1 -1
  49. package/Marketplace/{chunk-2NOOFEXI.js → chunk-L72IRPXZ.js} +1 -1
  50. package/Marketplace/{chunk-65RMQ5Q5.js → chunk-LIPM3QTO.js} +1 -1
  51. package/Marketplace/{chunk-HHIG3XFB.js → chunk-LQWFYVLD.js} +1 -1
  52. package/Marketplace/{chunk-ZA7FXMFZ.js → chunk-LZVUS3GC.js} +1 -1
  53. package/Marketplace/chunk-MAV4K2MS.js +1 -0
  54. package/Marketplace/{chunk-TTE7ZLBI.js → chunk-MQ3P5NWM.js} +1 -1
  55. package/Marketplace/{chunk-QYY5XVLP.js → chunk-NLZCSTVO.js} +1 -1
  56. package/Marketplace/{chunk-C6QIBOCB.js → chunk-O4N2CCVN.js} +1 -1
  57. package/Marketplace/{chunk-2SC3HO66.js → chunk-OE7XFNYO.js} +1 -1
  58. package/Marketplace/{chunk-4CEFDQPI.js → chunk-OI3SQ5ZO.js} +1 -1
  59. package/Marketplace/{chunk-7VKIP3Z6.js → chunk-OUJF6YWV.js} +1 -1
  60. package/Marketplace/chunk-OVGQQRBL.js +1 -0
  61. package/Marketplace/chunk-P5VJV3CP.js +2 -0
  62. package/Marketplace/{chunk-KZ6AD6KW.js → chunk-PCKZD4LZ.js} +1 -1
  63. package/Marketplace/{chunk-V64ZU2C6.js → chunk-QFU3JTYR.js} +1 -1
  64. package/Marketplace/{chunk-ZIZWZZ4E.js → chunk-QNL3BTRG.js} +3 -3
  65. package/Marketplace/{chunk-WHX7G2VN.js → chunk-QX4NLZIJ.js} +1 -1
  66. package/Marketplace/{chunk-BZPMSXEO.js → chunk-RQCGB4NH.js} +1 -1
  67. package/Marketplace/{chunk-7WUKCDMC.js → chunk-RVEC755T.js} +1 -1
  68. package/Marketplace/{chunk-A37OKNC2.js → chunk-S66L7N22.js} +1 -1
  69. package/Marketplace/{chunk-3FD4NGLO.js → chunk-SDHQ4QJU.js} +1 -1
  70. package/Marketplace/{chunk-P3XFOLPT.js → chunk-SI3X25VI.js} +1 -1
  71. package/Marketplace/{chunk-WRABGKH5.js → chunk-TOBQPCIM.js} +1 -1
  72. package/Marketplace/chunk-UAXJ7MHW.js +1 -0
  73. package/Marketplace/{chunk-DQIP7MCZ.js → chunk-UEB6GFG5.js} +1 -1
  74. package/Marketplace/{chunk-BTY6PS53.js → chunk-UOT5GPQI.js} +1 -1
  75. package/Marketplace/{chunk-D76K4RZ7.js → chunk-UX3GY5M2.js} +1 -1
  76. package/Marketplace/{chunk-NNBWVWVQ.js → chunk-VI7R5DDJ.js} +1 -1
  77. package/Marketplace/{chunk-7V2SU4MA.js → chunk-VMV4M5HA.js} +1 -1
  78. package/Marketplace/{chunk-LTNUYNEH.js → chunk-WC6VNRSI.js} +1 -1
  79. package/Marketplace/{chunk-DSAW6CY2.js → chunk-WEY37XEX.js} +1 -1
  80. package/Marketplace/{chunk-D6L7HUOY.js → chunk-XSYSCEVJ.js} +1 -1
  81. package/Marketplace/{chunk-DYLT6RRK.js → chunk-YUBBVFFI.js} +1 -1
  82. package/Marketplace/{chunk-EPZEV5WZ.js → chunk-ZRLWAA7O.js} +1 -1
  83. package/Marketplace/{chunk-CJILX5R7.js → chunk-ZRW4OZGG.js} +1 -1
  84. package/Marketplace/{chunk-XUSY2QT2.js → chunk-ZSZQPMV2.js} +1 -1
  85. package/Marketplace/index.html +2 -2
  86. package/Marketplace/{main-PKZNZGWL.js → main-YAU5Z2J5.js} +1 -1
  87. package/package.json +1 -1
  88. package/Marketplace/chunk-5HY6FBUD.js +0 -1
  89. package/Marketplace/chunk-7YWHTN3X.js +0 -1
  90. package/Marketplace/chunk-HGGT6RY6.js +0 -1
  91. package/Marketplace/chunk-HX5GZTZA.js +0 -1
  92. package/Marketplace/chunk-IH4PJ6DR.js +0 -1
  93. package/Marketplace/chunk-IJKP4K6S.js +0 -1
  94. package/Marketplace/chunk-KFEQKRGB.js +0 -1
  95. package/Marketplace/chunk-QO73KTMB.js +0 -2
  96. package/Marketplace/chunk-RDSLGGC4.js +0 -1
@@ -1,9 +1,9 @@
1
- import{a as ee}from"./chunk-HHIG3XFB.js";import"./chunk-6U6JR5K6.js";import{a as $t,d as Zt,e as Xt}from"./chunk-YVTEU2IF.js";import{a as ht}from"./chunk-BVIRHZTZ.js";import{a as le,b as pe,c as vt}from"./chunk-33L2SBIN.js";import{a as se}from"./chunk-BGWVHGAY.js";import{b as Rt}from"./chunk-ULELZXI5.js";import"./chunk-E5BOLHDG.js";import"./chunk-A37OKNC2.js";import{a as Bt,b as zt,c as Gt,d as jt,e as Ht,f as Ut,g as Yt}from"./chunk-L4BFVIW5.js";import"./chunk-GNY5TY3R.js";import{a as Dt,b as Et}from"./chunk-7YWHTN3X.js";import"./chunk-CJILX5R7.js";import{i as qt}from"./chunk-2FRMUOJY.js";import{a as Jt,b as Kt}from"./chunk-C6QIBOCB.js";import{a as me,b as Tt}from"./chunk-47PEHCOU.js";import{f as kt,g as Lt,h as Vt,i as Ft,j as At}from"./chunk-KZ6AD6KW.js";import{a as Ot}from"./chunk-7VKIP3Z6.js";import"./chunk-DYLT6RRK.js";import{a as Q}from"./chunk-WTMUHE4V.js";import{b as Wt}from"./chunk-MKJON4UM.js";import{b as Mt}from"./chunk-WKSTGJK5.js";import{a as Pt,b as It,c as Nt}from"./chunk-GQG2K3LS.js";import{a as ge}from"./chunk-B7HIQ2V5.js";import"./chunk-BTY6PS53.js";import"./chunk-EIBGI6U2.js";import{a as re,b as oe,c as gt,d as X,e as _t}from"./chunk-PYD2YWAN.js";import{f as ce,i as Z}from"./chunk-NKDTKE6B.js";import{b as Te,e as A}from"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{b as Ct,d as De,e as yt,f as wt,g as xt,m as Y,n as bt}from"./chunk-4CEFDQPI.js";import{t as ft,u as St}from"./chunk-2SC3HO66.js";import{P as ut}from"./chunk-DQIP7MCZ.js";import{b as He,c as $,h as z,m as G,o as ae,y as Ue}from"./chunk-2E5AKA74.js";import{b as N,c as M}from"./chunk-FTHTFVHH.js";import{$ as fe,$c as je,Ab as mt,B as at,Bb as st,Bc as ve,Cc as F,Ec as K,Fc as Se,Ha as V,Ib as O,Ja as p,Jb as m,Ka as v,Kb as S,Lb as T,Nb as w,Ob as x,Pb as b,Q as ye,Qb as dt,Rb as We,Sb as J,T as rt,Tb as Be,Ub as ie,Va as pt,Wc as Ge,X as be,Xc as ct,Zc as ne,_a as u,aa as Ae,ab as d,ac as P,bc as k,ca as de,cc as R,dc as U,ga as L,ha as Re,hb as Qe,mb as n,na as ot,nb as r,oa as g,ob as C,pa as _,pb as D,q as j,qa as Ze,qb as E,ra as Xe,sb as I,vb as y,vc as ze,w as nt,xb as c,xc as W,yc as B,za as lt}from"./chunk-ZIZWZZ4E.js";import{a as tt,b as it}from"./chunk-GNOSNGXM.js";var Qt=(()=>{let l=class l{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:[ht.downloadOrder]}]}ngOnInit(){}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=L({type:l,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,i){t&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),r()()(),C(4,"router-outlet")),t&2&&(p(3),d("Tabs",i.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Dt,ct]});let a=l;return a})();var ei=(()=>{let l=class l{constructor(){}convertToCSV(e,t){let i;if(typeof e=="string")i=e;else{var h=typeof e=="object"?e:JSON.parse(e);i=this.transformToCSVStringFormat(h)}this.downloadCSV(i,t)}transformToCSVStringFormat(e){if(!e||!e.length)return;let t=",",i=Object.keys(e[0]);return e.map(f=>i.map(s=>{let q=f[s]===null||f[s]===void 0?"":f[s];return q=q instanceof Date?q.toLocaleString():q.toString().replace(/"/g,'""'),q.search(/("|,|\n)/g)>=0&&(q=`"${q}"`),q}).join(t)).join(`
2
- `)}downloadCSV(e,t){var i=new Blob([e],{type:"text/csv;charset=utf8;"}),h=document.createElement("a");h.setAttribute("href",window.URL.createObjectURL(i)),h.setAttribute("download",t),document.body.appendChild(h),h.click(),document.body.removeChild(h)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=fe({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Ee=(()=>{let l=class l{constructor(e,t){this.http=e,this.exportService=t}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(e){return this.http.post("/api/orders/GetNewOrder",e).pipe(j(t=>t.Data))}getTotalNewOrders(e,t,i){let h={ListChannelID:e,From:t,To:i};return this.http.post("/api/orders/GetCountNewOrder",h).pipe(j(f=>f.Count))}exportOrders(e,t){return this.http.post("api/Orders/ExportOrder",e).pipe(be(i=>{this.exportService.convertToCSV(i,t)}))}};l.\u0275fac=function(t){return new(t||l)(de(A),de(ei))},l.\u0275prov=fe({token:l,factory:l.\u0275fac});let a=l;return a})();var Ye=(()=>{let l=class l{constructor(e,t){this.http=e,this.toastr=t}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(be(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(e){let t=e.filter(h=>h.Status==!1),i=e.filter(h=>h.Status==!0);if(t.length==0&&i.length>0){let h=`<ol>${this.generateSuccessMessage(i)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&i.length>0){let h=`<ol>
1
+ import{a as ee}from"./chunk-LQWFYVLD.js";import"./chunk-6U6JR5K6.js";import{a as $t,d as Zt,e as Xt}from"./chunk-F57GDDSE.js";import{a as et}from"./chunk-BVIRHZTZ.js";import{a as le,b as pe,c as vt}from"./chunk-7N5WLZWW.js";import{a as se}from"./chunk-EYZIWEGE.js";import{b as Rt}from"./chunk-L3JD55OC.js";import"./chunk-GDA72XOJ.js";import"./chunk-S66L7N22.js";import{a as Bt,b as zt,c as Gt,d as jt,e as Ht,f as Ut,g as Yt}from"./chunk-4AUJZEST.js";import"./chunk-7FSQ3UC2.js";import{a as Dt,b as Et}from"./chunk-UAXJ7MHW.js";import"./chunk-ZRW4OZGG.js";import{i as qt}from"./chunk-633RG6PO.js";import{a as Jt,b as Kt}from"./chunk-O4N2CCVN.js";import{a as me,b as Tt}from"./chunk-4NXO2JYR.js";import{f as kt,g as Lt,h as Vt,i as Ft,j as At}from"./chunk-PCKZD4LZ.js";import{a as Ot}from"./chunk-OUJF6YWV.js";import"./chunk-YUBBVFFI.js";import{a as Q}from"./chunk-GCHJ4FTF.js";import{b as Wt}from"./chunk-2LJXM62F.js";import{b as Mt}from"./chunk-ENIJ4MFV.js";import{a as Pt,b as It,c as Nt}from"./chunk-2KEQ33LI.js";import{a as de}from"./chunk-JIOCWSW2.js";import"./chunk-UOT5GPQI.js";import"./chunk-C2SGQUOH.js";import{a as re,b as oe,c as gt,d as X,e as _t}from"./chunk-7IIB5DLC.js";import{f as he,i as Z}from"./chunk-DG262GXE.js";import{b as Te,e as A}from"./chunk-KTXT25SP.js";import"./chunk-KCDL7SWP.js";import{b as Ct,d as De,e as yt,f as wt,g as xt,m as Y,n as bt}from"./chunk-OI3SQ5ZO.js";import{t as ft,u as St}from"./chunk-OE7XFNYO.js";import{P as ut}from"./chunk-UEB6GFG5.js";import{b as He,c as $,h as z,m as G,o as ae,y as Ue}from"./chunk-JCKUKK6T.js";import{b as N,c as M}from"./chunk-KZ2VDCDO.js";import{$ as fe,$c as je,Ab as st,B as rt,Bb as dt,Bc as ve,Cc as F,Ec as K,Fc as Se,Ha as V,Ib as O,Ja as p,Jb as m,Ka as v,Kb as S,Lb as T,Nb as w,Ob as x,Pb as b,Q as ye,Qb as ct,Rb as We,Sb as J,T as ot,Tb as Be,Ub as ie,Va as mt,Wc as Ge,X as be,Xc as ht,Zc as ne,_a as u,aa as Ae,ab as d,ac as P,bc as k,ca as ce,cc as R,dc as U,ga as L,ha as Re,hb as Qe,mb as n,na as lt,nb as r,oa as g,ob as C,pa as _,pb as D,q as j,qa as Ze,qb as E,ra as Xe,sb as I,vb as y,vc as ze,w as at,xb as c,xc as W,yc as B,za as pt}from"./chunk-QNL3BTRG.js";import{a as it,b as nt}from"./chunk-GNOSNGXM.js";var Qt=(()=>{let l=class l{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:[et.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[et.downloadOrder]}]}ngOnInit(){}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=L({type:l,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,i){t&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),r()()(),C(4,"router-outlet")),t&2&&(p(3),d("Tabs",i.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Dt,ht]});let a=l;return a})();var ei=(()=>{let l=class l{constructor(){}convertToCSV(e,t){let i;if(typeof e=="string")i=e;else{var h=typeof e=="object"?e:JSON.parse(e);i=this.transformToCSVStringFormat(h)}this.downloadCSV(i,t)}transformToCSVStringFormat(e){if(!e||!e.length)return;let t=",",i=Object.keys(e[0]);return e.map(f=>i.map(s=>{let q=f[s]===null||f[s]===void 0?"":f[s];return q=q instanceof Date?q.toLocaleString():q.toString().replace(/"/g,'""'),q.search(/("|,|\n)/g)>=0&&(q=`"${q}"`),q}).join(t)).join(`
2
+ `)}downloadCSV(e,t){var i=new Blob([e],{type:"text/csv;charset=utf8;"}),h=document.createElement("a");h.setAttribute("href",window.URL.createObjectURL(i)),h.setAttribute("download",t),document.body.appendChild(h),h.click(),document.body.removeChild(h)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=fe({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Ee=(()=>{let l=class l{constructor(e,t){this.http=e,this.exportService=t}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(e){return this.http.post("/api/orders/GetNewOrder",e).pipe(j(t=>t.Data))}getTotalNewOrders(e,t,i){let h={ListChannelID:e,From:t,To:i};return this.http.post("/api/orders/GetCountNewOrder",h).pipe(j(f=>f.Count))}exportOrders(e,t){return this.http.post("api/Orders/ExportOrder",e).pipe(be(i=>{this.exportService.convertToCSV(i,t)}))}};l.\u0275fac=function(t){return new(t||l)(ce(A),ce(ei))},l.\u0275prov=fe({token:l,factory:l.\u0275fac});let a=l;return a})();var Ye=(()=>{let l=class l{constructor(e,t){this.http=e,this.toastr=t}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(be(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(e){let t=e.filter(h=>h.Status==!1),i=e.filter(h=>h.Status==!0);if(t.length==0&&i.length>0){let h=`<ol>${this.generateSuccessMessage(i)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&i.length>0){let h=`<ol>
3
3
  ${this.generateSuccessMessage(i)}
4
4
  ${this.generateErrorMessage(t)}
5
- </ol>`;this.toastr.warning(h,"Warning",{enableHtml:!0})}else{let h=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastr.error(h,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let t="";return e.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> was successfully Accept</li>`}),t}generateErrorMessage(e){let t="";return e.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> ${i.Message}</li>`}),t}};l.\u0275fac=function(t){return new(t||l)(de(A),de(Te))},l.\u0275prov=fe({token:l,factory:l.\u0275fac});let a=l;return a})();function _i(a,l){if(a&1){let o=I();D(0),n(1,"button",18),y("click",function(){g(o);let t=c().ngIf,i=c();return _(i.onAcceptOrder(t))}),C(2,"i",19),m(3," Accept "),r(),E()}}function ui(a,l){if(a&1&&(D(0),u(1,_i,4,0,"ng-container",3),E()),a&2){let o=c();p(),d("ngIf",o.isTokopediaAvailable&&o.isTokopediaSelected)}}function fi(a,l){if(a&1&&(n(0,"span",20),C(1,"img",21),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V),p(),T(" ",o.Name," ")}}function Si(a,l){if(a&1){let o=I();D(0),n(1,"th",33)(2,"input",34),b("ngModelChange",function(t){g(o);let i=c(3);return x(i.isCheckAll,t)||(i.isCheckAll=t),_(t)}),y("ngModelChange",function(){g(o);let t=c(2).ngIf,i=c();return _(i.onSelectAllOrderData(t))}),r()(),E()}if(a&2){let o=c(3);p(2),w("ngModel",o.isCheckAll)}}function Ci(a,l){if(a&1){let o=I();D(0),n(1,"input",34),b("ngModelChange",function(t){g(o);let i=c(2).$implicit;return x(i.selected,t)||(i.selected=t),_(t)}),y("ngModelChange",function(){g(o);let t=c(4).ngIf,i=c();return _(i.onSelectOrderData(t))}),r(),E()}if(a&2){let o=c(2).$implicit;p(),w("ngModel",o.selected)}}function yi(a,l){if(a&1&&(D(0),n(1,"td"),u(2,Ci,2,1,"ng-container",3),r(),E()),a&2){let o=c().$implicit,e=c(3);p(2),d("ngIf",o.Type==e.tokopediaType)}}function wi(a,l){if(a&1&&(D(0),n(1,"span"),m(2),r(),E()),a&2){let o=c().$implicit;p(2),S(o.Number)}}function xi(a,l){if(a&1&&(n(0,"a",36),m(1),r()),a&2){let o=c().$implicit,e=c(3);d("href",e.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+o.ID,V),p(),S(o.Number)}}function bi(a,l){if(a&1&&(n(0,"tr"),u(1,yi,3,1,"ng-container",3),n(2,"td"),m(3),r(),n(4,"td"),u(5,wi,3,1,"ng-container",22)(6,xi,2,2,"ng-template",null,1,U),r(),n(8,"td"),m(9),r(),n(10,"td"),m(11),P(12,"date"),r(),n(13,"td"),C(14,"app-channel-logo",35),r()()),a&2){let o=l.$implicit,e=O(7),t=c(3);p(),d("ngIf",t.isTokopediaAvailable),p(2),S(o.Outlet),p(2),d("ngIf",o.ID==t.guidEmpty)("ngIfElse",e),p(4),S(o.Customer),p(2),S(R(12,7,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.Type)}}function vi(a,l){if(a&1){let o=I();D(0),n(1,"div",23)(2,"table",24),y("matSortChange",function(t){g(o);let i=c(2);return _(i.onSort(t))}),n(3,"thead",25)(4,"tr",26),u(5,Si,3,1,"ng-container",3),n(6,"th",27),m(7,"Outlet"),r(),n(8,"th",28),m(9,"Order number"),r(),n(10,"th"),m(11,"Customer"),r(),n(12,"th",29),m(13,"Created On"),r(),n(14,"th",30),m(15,"Channel"),r()()(),n(16,"tbody"),u(17,bi,15,10,"tr",31),r()(),n(18,"app-mat-paginator-no-count",32),P(19,"async"),P(20,"async"),y("total",function(){g(o);let t=c(2);return _(t.getPaginatonTotal())})("next",function(){g(o);let t=c(2);return _(t.onNextPage())})("previous",function(){g(o);let t=c(2);return _(t.onPreviousPage())}),r()(),E()}if(a&2){let o,e=c().ngIf,t=c();p(5),d("ngIf",t.isTokopediaAvailable&&e),p(12),d("ngForOf",e),p(),d("filter",t.filter)("totaldata",(o=k(19,5,t.newOrdersData$))==null?null:o.length)("paginationTotal",k(20,7,t.paginationTotal$))}}function Ti(a,l){if(a&1&&(D(0),u(1,vi,21,9,"ng-container",22),E()),a&2){let o=l.ngIf;c();let e=O(32);p(),d("ngIf",(o==null?null:o.length)>0)("ngIfElse",e)}}function Di(a,l){a&1&&(n(0,"div",37),C(1,"app-empty-state"),r())}var ni=(()=>{let l=class l{constructor(e,t,i,h){this.localDataService=e,this.orderService=t,this.acceptOrderService=i,this.authService=h,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=M.GuidEMpty,this.tokopediaType=N.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(ye()),this.newOrdersData$=this.sourceObs$.pipe(be(t=>{t.filter(h=>h.Type==N.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(ye())}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(i=>i.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(t=>(t.Type==N.Tokopedia&&(t.selected=this.isCheckAll),t)),this.onSelectOrderData(e)}onAcceptOrder(e){let t=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(t).subscribe(i=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(i=>i.selected).map(i=>i.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let t=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(j(i=>(i=i.sort((h,f)=>M.compare(h.Created,f.Created,t)),i)))}}};l.\u0275fac=function(t){return new(t||l)(v(ce),v(Ee),v(Ye),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-new-order"]],decls:33,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[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"],["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(t,i){if(t&1){let h=I();n(0,"mainpanel",2),y("onSubmit",function(){return g(h),_(i.getNewOrders())}),n(1,"actions"),u(2,ui,2,1,"ng-container",3),P(3,"async"),r(),n(4,"filters")(5,"div")(6,"label",4),m(7,"Channel"),r(),n(8,"ng-select",5),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(9,fi,3,2,"ng-template",6),r()(),n(10,"div",7)(11,"label",8),m(12,"Page Number"),r(),n(13,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(14,"div",7)(15,"label",8),m(16,"Page Size"),r(),n(17,"input",10),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(18,"div",7)(19,"label",11),m(20,"From/To"),r(),n(21,"div",12)(22,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(23,"div")(24,"datepicker",14),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(25,"content")(26,"div",15)(27,"div",16)(28,"div",17),u(29,Ti,2,2,"ng-container",3),P(30,"async"),u(31,Di,2,0,"ng-template",null,0,U),r()()()()()}t&2&&(d("hideSearchBox",!0),p(2),d("ngIf",k(3,11,i.newOrdersData$)),p(6),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",k(30,13,i.newOrdersData$)))},dependencies:[W,B,$,ae,He,z,G,Y,X,re,oe,Q,me,se,le,pe,ee,ve,F]});let a=l;return a})();var Ei=()=>["/menu/Order"];function Pi(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),m(4),P(5,"number"),r(),n(6,"td"),m(7),P(8,"number"),r()()),a&2){let o=l.$implicit;p(2),S(o.Code),p(2),S(k(5,3,o.Quantity)),p(3),S(k(8,5,o.Price))}}function Ii(a,l){if(a&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),m(5,"Outlet Info"),r()(),n(6,"div",4)(7,"div",9),m(8," Outlet : "),r(),n(9,"div",9),m(10),r()(),n(11,"div",4)(12,"div",9),m(13," Date : "),r(),n(14,"div",9),m(15),P(16,"date"),r()(),n(17,"div",4)(18,"div",9),m(19," Status : "),r(),n(20,"div",9),m(21),r()(),n(22,"div",4)(23,"div",9),m(24," Tax Type : "),r(),n(25,"div",9),m(26),r()(),n(27,"div",4)(28,"div",9),m(29," Due Date : "),r(),n(30,"div",9),m(31),P(32,"date"),r()()(),n(33,"div",6)(34,"div",7)(35,"h3",8),m(36,"Customer Info"),r()(),n(37,"div",4)(38,"div",9),m(39," Name : "),r(),n(40,"div",9),m(41),r()(),n(42,"div",4)(43,"div",9),m(44," Email : "),r(),n(45,"div",9),m(46),r()(),n(47,"div",4)(48,"div",9),m(49," Mobile : "),r(),n(50,"div",9),m(51),r()()()(),n(52,"div",10)(53,"h3",11),m(54,"Products Sold"),r(),n(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),m(60,"Code"),r(),n(61,"th"),m(62,"Quantity"),r(),n(63,"th"),m(64,"Price"),r()()(),n(65,"tbody"),u(66,Pi,9,7,"tr",16),r()()()()()),a&2){let o=c();p(10),T(" ",o.model.Outlet," "),p(5),T(" ",R(16,9,o.model.Date,"dd MMM yyyy")," "),p(6),T(" ",o.model.Delivery," "),p(5),T(" ",o.model.TaxType," "),p(5),T(" ",R(32,12,o.model.DueDate,"dd MMM yyyy")," "),p(10),T(" ",o.model.Customer.Name," "),p(5),T(" ",o.model.Customer.Email," "),p(5),T(" ",o.model.Customer.Mobile," "),p(15),d("ngForOf",o.model.Variants)}}var ai=(()=>{let l=class l{constructor(e,t){this.http=e,this.url=t,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(t=>{this.model=t})}};l.\u0275fac=function(t){return new(t||l)(v(A),v(Ge))},l.\u0275cmp=L({type:l,selectors:[["app-detail-order"]],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(t,i){t&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),m(3,"Back"),r()(),n(4,"content")(5,"div",2),u(6,Ii,67,15,"div",3),r()()()),t&2&&(d("headerTitle","Order #"+i.number)("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),d("routerLink",J(5,Ei)),p(4),d("ngIf",i.model))},dependencies:[W,B,Y,ne,K,F]});let a=l;return a})();var ri=(()=>{let l=class l{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)(v(Ct))},l.\u0275cmp=L({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),b("ngModelChange",function(f){return x(i.tandaiSudahDicetak,f)||(i.tandaiSudahDicetak=f),f}),r(),n(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),y("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),n(15,"button",10),y("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),w("ngModel",i.tandaiSudahDicetak))},dependencies:[z,G,Jt,wt,yt]});let a=l;return a})();var Je=(()=>{let l=class l{constructor(e,t,i){this.http=e,this.toastr=t,this.dialog=i}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Tokopedia,i)),t)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Tiktok,i)),t)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Shopee,i)),t)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Lazada,i)),t)))}printShippingLabelTokopedia(e){let t={OrderNumber:e,Printed:!0};this.dialog.open(ri).afterClosed().pipe(at(i=>i!==void 0),rt(i=>(t.Printed=i,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(i=>{let h=window.open("about:blank","_blank");h.document.write(i.File),h.document.close()})}printShippingLabelTiktok(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",i).subscribe(h=>{h.data!=null?window.open(h.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",i).subscribe(h=>{var f=Uint8Array.from(atob(h.File),q=>q.charCodeAt(0)),s=new Blob([f],{type:"octet/stream"});M.openDownloadFile(s,`${e}.pdf`)})}printShippingLabelLazada(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",i).subscribe(h=>{h.result.data!=null?window.open(h.result.data.pdf_url,"_blank"):this.toastr.error(h.message,"Cannot Print")})}};l.\u0275fac=function(t){return new(t||l)(de(A),de(Te),de(De))},l.\u0275prov=fe({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var he=function(a){return a.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",a.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",a.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",a.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",a.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",a.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",a.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",a.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",a}(he||{});var Ne=function(a){return a.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",a.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",a.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",a.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",a}(Ne||{});function Mi(a,l){if(a&1&&(D(0),n(1,"div",36)(2,"div",12)(3,"div",37),m(4),r()(),n(5,"div",12)(6,"div",37),m(7),r()()(),E()),a&2){let o=c();p(4),T(" ",o.recipient==null?null:o.recipient.City," "),p(3),T(" ",o.recipient==null?null:o.recipient.District," ")}}function Oi(a,l){if(a&1&&(D(0),n(1,"div")(2,"span",15),m(3,"Berat: "),r(),n(4,"span",18),m(5),r()(),E()),a&2){let o=c();p(5),T("",o.shippingLabel==null?null:o.shippingLabel.Weight," gr")}}function ki(a,l){if(a&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"Batas Kirim:"),r(),n(4,"span",18),m(5),P(6,"date"),r()(),E()),a&2){let o=c();p(5),S(R(6,1,o.logistic==null?null:o.logistic.Batas_kirim,"dd-MM-yyy"))}}function Li(a,l){if(a&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"No.Pesanan:"),r(),n(4,"span",18),m(5),r()(),E()),a&2){let o=c();p(5),S(o.shippingLabel==null?null:o.shippingLabel.OrderNumber)}}function Vi(a,l){if(a&1&&(n(0,"tr")(1,"td",39),m(2),r(),n(3,"td"),m(4),r(),n(5,"td"),m(6),r(),n(7,"td"),m(8),P(9,"number"),r()()),a&2){let o=l.$implicit,e=l.index;p(2),S(e+1),p(2),S(o.Product_Name),p(2),S(o.SKU),p(2),S(k(9,4,o.Quantity))}}var Ke=(()=>{let l=class l{constructor(){this.minDate=M.MinDate,this.channelType=N}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case N.Tokopedia:this.marketplaceLogo=Ne.TOKOPEDIA;break;case N.Shopee:this.marketplaceLogo=Ne.SHOPEE;break;case N.Lazada:this.marketplaceLogo=Ne.LAZADA;break;case N.Tiktok:this.marketplaceLogo=Ne.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=he.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=he.GRAB:e.includes("jne")?this.shippingLogo=he.JNE:e.includes("gosend")?this.shippingLogo=he.GOSEND:e.includes("j&t")?this.shippingLogo=he.JNT:e.includes("sicepat")?this.shippingLogo=he.SICEPAT:e.includes("spx")?this.shippingLogo=he.SPX:e.includes("lex")&&(this.shippingLogo=he.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(M.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})}M.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=L({type:l,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},standalone:!0,features:[ot,We],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(t,i){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),C(6,"img",5),r(),n(7,"div")(8,"h4"),m(9),r()(),n(10,"div"),C(11,"img",5),r()()()(),n(12,"div",6),C(13,"hr"),r(),n(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),m(18),r(),n(19,"span"),m(20),r()()()(),n(21,"div",7)(22,"div",10),Ze(),C(23,"svg",11),r()(),Xe(),n(24,"div",6),C(25,"hr"),r(),n(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),m(30,"Penerima: "),r(),n(31,"div",15),m(32),r()(),n(33,"div",16)(34,"span",15),m(35,"Alamat Pengiriman:"),r(),n(36,"div",17),m(37),r()()(),n(38,"div",12)(39,"div",13)(40,"div",14),m(41,"Pengirim: "),r(),n(42,"div")(43,"div",15),m(44),r(),n(45,"div",18),m(46),r(),n(47,"div",19),m(48),r()()(),C(49,"div"),r()(),u(50,Mi,8,2,"ng-container",20),n(51,"div",21)(52,"div",22)(53,"div",15),m(54,"CASHLESS"),r()(),n(55,"div",23)(56,"small",24),m(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),r()()(),n(58,"div",25)(59,"div",26)(60,"div",27),u(61,Oi,6,1,"ng-container",20),n(62,"div")(63,"span",15),m(64,"COD: "),r(),n(65,"span",18),m(66),P(67,"number"),r()()(),u(68,ki,7,4,"ng-container",20)(69,Li,6,1,"ng-container",20),r(),n(70,"div",28),Ze(),C(71,"svg",29),r()()(),Xe(),n(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),m(78,"No."),r(),n(79,"th",32),m(80,"Nama Produk"),r(),n(81,"th",33),m(82,"SKU"),r(),n(83,"th",34),m(84,"Qty"),r()()(),n(85,"tbody"),u(86,Vi,10,6,"tr",35),r()()()()()),t&2&&(p(6),d("src",i.marketplaceLogo,V),p(3),S(i.logistic==null?null:i.logistic.Service),p(2),d("src",i.shippingLogo,V),p(7),T(" ",(i.shippingLabel==null?null:i.shippingLabel.ChannelType)==(i.channelType==null?null:i.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),p(2),S(i.logistic==null?null:i.logistic.Resi_Number),p(3),d("id","RESI"+i.id),p(9),S(i.recipient==null?null:i.recipient.Name),p(5),T(" ",i.recipient==null?null:i.recipient.Address," "),p(7),S(i.store==null?null:i.store.Name),p(2),S(i.store==null?null:i.store.Phone),p(2),T(" ",i.store==null?null:i.store.Address," "),p(2),d("ngIf",(i.recipient==null?null:i.recipient.City)&&(i.recipient==null?null:i.recipient.District)),p(11),d("ngIf",i.shippingLabel==null?null:i.shippingLabel.Weight),p(5),T("Rp. ",i.shippingLabel!=null&&i.shippingLabel.IsCOD?k(67,18,i.shippingLabel==null||i.shippingLabel.SummaryPrice==null?null:i.shippingLabel.SummaryPrice.Total):0,""),p(2),d("ngIf",(i.logistic==null?null:i.logistic.Batas_kirim)&&(i.logistic==null?null:i.logistic.Batas_kirim)!==i.minDate),p(),d("ngIf",i.shippingLabel==null?null:i.shippingLabel.OrderNumber),p(2),d("id","NO"+i.id),p(15),d("ngForOf",i.products))},dependencies:[Se,W,B,K,F],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}"]});let a=l;return a})();var Ai=()=>["/menu/Order/detail"],Ri=(a,l)=>({Number:a,Outlet:l});function Wi(a,l){if(a&1){let o=I();D(0),n(1,"button",19),y("click",function(){g(o);let t=c();return _(t.onPrintMultipleShippingLabel())}),C(2,"i",20),n(3,"span"),m(4,"Print Shipping Label"),r()(),E()}}function Bi(a,l){if(a&1&&(n(0,"span",21),C(1,"img",22),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function zi(a,l){if(a&1){let o=I();D(0),n(1,"input",29),b("ngModelChange",function(t){g(o);let i=c().$implicit;return x(i.Selected,t)||(i.Selected=t),_(t)}),y("ngModelChange",function(){g(o);let t=c(3).ngIf,i=c();return _(i.onSelectReadyToShip(t))}),r(),E()}if(a&2){let o=c().$implicit;p(),w("ngModel",o.Selected)}}function Gi(a,l){if(a&1&&(n(0,"a",42),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,Ai))("queryParams",ie(4,Ri,o.Number,o.Outlet)),p(),S(o.Number)}}function ji(a,l){if(a&1&&(n(0,"a",43),m(1),r()),a&2){let o=c().$implicit,e=c(3);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function Hi(a,l){if(a&1){let o=I();n(0,"a",44),y("click",function(){g(o);let t=c().$implicit,i=c(3);return _(i.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),C(1,"i",45),r()}}function Ui(a,l){if(a&1&&(n(0,"tr")(1,"td"),u(2,zi,2,1,"ng-container",2),r(),n(3,"td"),m(4),r(),n(5,"td"),u(6,Gi,2,7,"a",37)(7,ji,2,2,"a",38),r(),n(8,"td"),m(9),r(),n(10,"td"),m(11),P(12,"number"),r(),n(13,"td"),m(14),P(15,"date"),r(),n(16,"td"),C(17,"app-channel-logo",39),r(),n(18,"td",40),u(19,Hi,2,0,"a",41),r()()),a&2){let o=l.$implicit,e=c(3);p(2),d("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok),p(2),S(o.Outlet),p(2),d("ngIf",e.guidEmpty==o.ID),p(),d("ngIf",e.guidEmpty!=o.ID),p(2),S(o.Customer),p(2),S(k(12,9,o.Amount)),p(3),S(R(15,11,o.Date,"dd MMM yyyy")),p(3),d("typeId",o.TypeID),p(2),d("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok||o.TypeID==e.channelType.Lazada)}}function Yi(a,l){if(a&1){let o=I();D(0),n(1,"div",24)(2,"table",25),y("matSortChange",function(t){g(o);let i=c(2);return _(i.onSort(t))}),n(3,"thead",26)(4,"tr",27)(5,"th",28)(6,"input",29),b("ngModelChange",function(t){g(o);let i=c(2);return x(i.isCheckAll,t)||(i.isCheckAll=t),_(t)}),y("ngModelChange",function(){g(o);let t=c().ngIf,i=c();return _(i.onSelectAllReadyToShip(t))}),r()(),n(7,"th",30),m(8,"Outlet"),r(),n(9,"th",31),m(10,"Order number"),r(),n(11,"th"),m(12,"Customer"),r(),n(13,"th",32),m(14,"Amount"),r(),n(15,"th",33),m(16,"Date"),r(),n(17,"th",34),m(18,"Channel"),r(),C(19,"th",35),r()(),n(20,"tbody"),u(21,Ui,20,14,"tr",18),r()(),n(22,"app-mat-paginator-no-count",36),P(23,"async"),P(24,"async"),y("total",function(){g(o);let t=c(2);return _(t.getRowCount())})("next",function(){g(o);let t=c(2);return _(t.NextPage())})("previous",function(){g(o);let t=c(2);return _(t.PreviousPage())}),r()(),E()}if(a&2){let o,e=c().ngIf,t=c();p(6),w("ngModel",t.isCheckAll),p(15),d("ngForOf",e),p(),d("filter",t.filter)("totaldata",(o=k(23,5,t.readyToShip$))==null?null:o.length)("paginationTotal",k(24,7,t.paginationTotal$))}}function qi(a,l){if(a&1&&(D(0),u(1,Yi,25,9,"ng-container",23),E()),a&2){let o=l.ngIf;c();let e=O(31);p(),d("ngIf",o.length>0)("ngIfElse",e)}}function Ji(a,l){a&1&&(n(0,"div",46),C(1,"app-empty-state"),r())}function Ki(a,l){a&1&&(D(0),n(1,"div",48),m(2,"\xA0"),r(),E())}function $i(a,l){if(a&1&&(D(0),C(1,"app-shipping-label",47),u(2,Ki,3,0,"ng-container",2),E()),a&2){let o=l.$implicit,e=l.index,t=c();p(),d("shippingLabel",o)("id",e),p(),d("ngIf",e!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var oi=(()=>{let l=class l{constructor(e,t,i,h,f,s){this.http=e,this.localDataService=t,this.dialog=i,this.shippingLabelService=h,this.datePipe=f,this.authService=s,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=N,this.guidEmpty=M.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,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 t={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",t).pipe(j(i=>i.Data),ye(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,N.Tokopedia),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,N.Shopee),i=this.filterReadyToShipByChannel(this.selectedReadyToShip,N.Tiktok),h=[];e.length>0&&h.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),t.length>0&&h.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(t))),i.length>0&&h.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(i))),nt(h).pipe(j(f=>f.reduce((s,q)=>s.concat(q),[]))).subscribe({next:f=>{this.shippingLabels=f,this.printShippingLabel()}})}filterReadyToShipByChannel(e,t){return e.filter(i=>i.TypeID==t)}shippingLabelPayload(e){return e.map(t=>({ShopID:t.ShopID,OrderNumber:t.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,t,i){switch(i){case N.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case N.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,t);break;case N.Shopee:this.shippingLabelService.printShippingLabelShopee(e,t);break;case N.Lazada:this.shippingLabelService.printShippingLabelLazada(e,t);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,t=this.datePipe.transform(e,"dd-MM-yyyy"),i=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${t}_${i}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(t=>t.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(j(t=>t?.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 t=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(j(i=>i.sort((h,f)=>M.compare(h.Date,f.Date,t))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(t=>((t.TypeID==N.Tokopedia||t.TypeID==N.Shopee||t.TypeID==N.Lazada)&&(t.Selected=this.isCheckAll),t)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}};l.\u0275fac=function(t){return new(t||l)(v(A),v(ce),v(De),v(Je),v(F),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-ready-to-ship"]],decls:34,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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"],[2,"width","10px"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.getReadyToShip(s))}),n(1,"actions"),u(2,Wi,5,0,"ng-container",2),r(),n(3,"filters")(4,"div")(5,"label",3),m(6,"Channel"),r(),n(7,"ng-select",4),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(8,Bi,3,3,"ng-template",5),r()(),n(9,"div",6)(10,"label",7),m(11,"Page Number"),r(),n(12,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(13,"div",6)(14,"label",7),m(15,"Page Size"),r(),n(16,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(17,"div",6)(18,"label",10),m(19,"From/To"),r(),n(20,"div",11)(21,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(22,"div")(23,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(24,"content")(25,"div",14)(26,"div",15)(27,"div",16),u(28,qi,2,2,"ng-container",2),P(29,"async"),u(30,Ji,2,0,"ng-template",null,0,U),r()()()()(),n(32,"div",17),u(33,$i,3,3,"ng-container",18),r()}t&2&&(p(2),d("ngIf",i.selectedReadyToShip.length>0),p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",k(29,11,i.readyToShip$)),p(5),d("ngForOf",i.shippingLabels))},dependencies:[W,B,$,ae,He,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,Ke,ve,K,F],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}}"]});let a=l;return a})();var Zi=()=>["/menu/Order/detail"],Xi=(a,l)=>({Number:a,Outlet:l});function Qi(a,l){if(a&1&&(n(0,"span",17),C(1,"img",18),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function en(a,l){if(a&1&&(n(0,"a",33),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,Zi))("queryParams",ie(4,Xi,o.Number,o.Outlet)),p(),S(o.Number)}}function tn(a,l){if(a&1&&(n(0,"a",34),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function nn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,en,2,7,"a",30)(5,tn,2,2,"a",31),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),C(15,"app-channel-logo",32),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,7,o.Amount)),p(3),S(R(13,9,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.TypeID)}}function an(a,l){if(a&1){let o=I();D(0),n(1,"div",19)(2,"table",20),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),r(),n(7,"th",24),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",25),m(12,"Amount"),r(),n(13,"th",26),m(14," Created On "),r(),n(15,"th",27),m(16,"Channel"),r()()(),n(17,"tbody"),u(18,nn,16,12,"tr",28),r()(),n(19,"app-mat-paginator-no-count",29),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(18),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function rn(a,l){a&1&&(n(0,"div",35),C(1,"app-empty-state"),r())}var li=(()=>{let l=class l{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=N,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==M.GuidEMpty}Get(e){var t={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",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.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(t=>{this.paginationTotal=t.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 t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(ce),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-shipped"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),r(),n(5,"ng-select",3),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(6,Qi,3,3,"ng-template",4),r()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),r(),n(10,"input",7),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),r(),n(14,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),r(),n(18,"div",10)(19,"datepicker",11),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(20,"div")(21,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,an,20,4,"ng-container",16)(27,rn,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(28);p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var on=()=>["/menu/Order/detail"],ln=(a,l)=>({Number:a,Outlet:l});function pn(a,l){if(a&1&&(n(0,"span",17),C(1,"img",18),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function mn(a,l){if(a&1&&(n(0,"a",33),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,on))("queryParams",ie(4,ln,o.Number,o.Outlet)),p(),S(o.Number)}}function sn(a,l){if(a&1&&(n(0,"a",34),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.customerInfoUrl+o.ID,V),p(),S(o.Number)}}function dn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,mn,2,7,"a",30)(5,sn,2,2,"a",31),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),C(15,"app-channel-logo",32),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,7,o.Amount)),p(3),S(R(13,9,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.TypeID)}}function cn(a,l){if(a&1){let o=I();D(0),n(1,"div",19)(2,"table",20),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),r(),n(7,"th",24),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",25),m(12,"Amount"),r(),n(13,"th",26),m(14," Created On "),r(),n(15,"th",27),m(16,"Channel"),r()()(),n(17,"tbody"),u(18,dn,16,12,"tr",28),r()(),n(19,"app-mat-paginator-no-count",29),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(18),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function hn(a,l){a&1&&(n(0,"div",35),C(1,"app-empty-state"),r())}var pi=(()=>{let l=class l{constructor(e,t){this.http=e,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=N,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==M.GuidEMpty}getChannelLogo(e){return M.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 t={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 ",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.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(t=>{this.paginationTotal=t.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 t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-delivered"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),r(),n(5,"ng-select",3),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(6,pn,3,3,"ng-template",4),r()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),r(),n(10,"input",7),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),r(),n(14,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),r(),n(18,"div",10)(19,"datepicker",11),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(20,"div")(21,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,cn,20,4,"ng-container",16)(27,hn,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(28);p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var gn=()=>["/menu/Order/detail"],_n=(a,l)=>({Number:a,Outlet:l});function un(a,l){if(a&1&&(n(0,"span",19),C(1,"img",20),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function fn(a,l){if(a&1&&(n(0,"a",36),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,gn))("queryParams",ie(4,_n,o.Number,o.Outlet)),p(),S(o.Number)}}function Sn(a,l){if(a&1&&(n(0,"a",37),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function Cn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,fn,2,7,"a",33)(5,Sn,2,2,"a",34),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),m(15),r(),n(16,"td"),C(17,"app-channel-logo",35),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,8,o.Amount)),p(3),S(R(13,10,o.Created,"dd MMM yyyy HH:mm")),p(3),S(o.State),p(2),d("typeId",o.TypeID)}}function yn(a,l){if(a&1){let o=I();D(0),n(1,"div",21)(2,"table",22),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",23)(4,"tr",24)(5,"th",25),m(6,"Outlet"),r(),n(7,"th",26),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",27),m(12,"Amount"),r(),n(13,"th",28),m(14," Created On "),r(),n(15,"th",29),m(16,"Status"),r(),n(17,"th",30),m(18,"Channel"),r()()(),n(19,"tbody"),u(20,Cn,18,13,"tr",31),r()(),n(21,"app-mat-paginator-no-count",32),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(20),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function wn(a,l){a&1&&(n(0,"div",38),C(1,"app-empty-state"),r())}var mi=(()=>{let l=class l{constructor(e,t,i,h){this.http=e,this.localDataService=t,this.authService=i,this.dialog=h,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==M.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 t={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",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(Rt,{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(t=>{this.paginationTotal=t.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 t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(ce),v(Z),v(De))},l.\u0275cmp=L({type:l,selectors:[["app-all-order"]],decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"actions")(2,"button",2),y("click",function(){return g(h),_(i.openExportDialog())}),C(3,"i",3),n(4,"span"),m(5,"Export"),r()()(),n(6,"filters")(7,"div")(8,"label",4),m(9,"Channel"),r(),n(10,"ng-select",5),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(11,un,3,3,"ng-template",6),r()(),n(12,"div",7)(13,"label",8),m(14,"Page Number"),r(),n(15,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(16,"div",7)(17,"label",8),m(18,"Page Size"),r(),n(19,"input",10),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(20,"div",7)(21,"label",11),m(22,"From/To"),r(),n(23,"div",12)(24,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(25,"div")(26,"datepicker",14),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,yn,22,4,"ng-container",18)(32,wn,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(33);p(10),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var xn=()=>["/menu/Order/detail"],bn=(a,l)=>({Number:a,Outlet:l});function vn(a,l){if(a&1&&(n(0,"span",18),C(1,"img",19),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function Tn(a,l){if(a&1&&(n(0,"a",34),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,xn))("queryParams",ie(4,bn,o.Number,o.Outlet)),p(),S(o.Number)}}function Dn(a,l){if(a&1&&(n(0,"a",35),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function En(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,Tn,2,7,"a",31)(5,Dn,2,2,"a",32),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),C(15,"app-channel-logo",33),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,7,o.Amount)),p(3),S(R(13,9,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.TypeID)}}function Pn(a,l){if(a&1){let o=I();D(0),n(1,"div",20)(2,"table",21),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",22)(4,"tr",23)(5,"th",24),m(6,"Outlet"),r(),n(7,"th",25),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",26),m(12,"Amount"),r(),n(13,"th",27),m(14," Created On "),r(),n(15,"th",28),m(16,"Channel"),r()()(),n(17,"tbody"),u(18,En,16,12,"tr",29),r()(),n(19,"app-mat-paginator-no-count",30),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(18),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function In(a,l){a&1&&(n(0,"div",36),C(1,"app-empty-state"),r())}var si=(()=>{let l=class l{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,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==M.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 t={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 ",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.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(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return M.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(ce),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-cancelled"]],decls:33,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),r(),n(5,"ng-select",3),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(6,vn,3,3,"ng-template",4),r()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),r(),n(10,"input",7),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),r(),n(14,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(15,"div",5)(16,"label",6),m(17,"Note"),r(),n(18,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.Note,s)||(i.filter.Note=s),_(s)}),r()(),n(19,"div",5)(20,"label",10),m(21,"From/To"),r(),n(22,"div",11)(23,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(24,"div")(25,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(26,"content")(27,"div",14)(28,"div",15)(29,"div",16),u(30,Pn,20,4,"ng-container",17)(31,In,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(32);p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(4),w("ngModel",i.filter.Note),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var Me=function(a){return a[a.DoNothing=0]="DoNothing",a[a.New=1]="New",a[a.Update=2]="Update",a}(Me||{});var Nn=a=>({"full-width":a}),Mn=()=>({standalone:!0}),$e=(()=>{let l=class l{constructor(e){this.datePipe=e,this.fullWidth=!1,this.timeChange=new lt}ngOnInit(){}onTimeChange(e){let t=null;e&&(t=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(t),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}};l.\u0275fac=function(t){return new(t||l)(v(F))},l.\u0275cmp=L({type:l,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:"fullWidth"},outputs:{timeChange:"timeChange"},standalone:!0,features:[We],decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["pButton","","type","button","label","Close",3,"click"]],template:function(t,i){if(t&1){let h=I();n(0,"p-calendar",1,0),b("ngModelChange",function(s){return g(h),x(i.time,s)||(i.time=s),_(s)}),y("ngModelChange",function(s){return g(h),_(i.onTimeChange(s))})("onSelect",function(){return g(h),_(i.onShowCalendar())}),n(2,"p-footer")(3,"button",2),y("click",function(){return g(h),O(1).hideOverlay(),_(i.onShowCalendar())}),r()()()}t&2&&(d("ngClass",Be(5,Nn,i.fullWidth))("baseZIndex",1100),w("ngModel",i.time),d("timeOnly",!0)("ngModelOptions",J(7,Mn)))},dependencies:[Se,ze,Xt,Zt,$t,qt,Ue,z,G],styles:["p-calendar span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:55px} p-calendar.full-width span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:100%!important}"]});let a=l;return a})();var kn=(a,l)=>({"over-due-today":a,"over-due":l}),Ln=a=>({"over-due":a});function Vn(a,l){if(a&1){let o=I();D(0),n(1,"div",19)(2,"button",20),y("click",function(){g(o),c();let t=O(11);return _(t.previous())}),m(3," Back "),r(),n(4,"button",21),y("click",function(){g(o);let t=c(),i=O(11);return _(t.onNext(i))}),m(5," Next "),r()(),E()}if(a&2){let o=c();p(4),d("disabled",o.checkDisabledNextFilter())}}function Fn(a,l){if(a&1){let o=I();D(0),n(1,"button",22),y("click",function(){g(o);let t=c(),i=O(11);return _(t.onNext(i))}),m(2," Next "),r(),E()}if(a&2){let o=c();p(),d("disabled",o.checkDisabledNextFilter())}}function An(a,l){if(a&1){let o=I();D(0),n(1,"button",23),y("click",function(){g(o);let t=c(),i=O(11);return _(t.onNew(i))}),C(2,"i",24),m(3," New "),r(),E()}}function Rn(a,l){a&1&&(C(0,"i",25),n(1,"span"),m(2,"Filter"),r())}function Wn(a,l){if(a&1&&(n(0,"ng-option",35),C(1,"img",36),m(2),r()),a&2){let o=l.$implicit;d("value",o.ID),p(),d("src",o==null?null:o.Img,V),p(),T("",o.Name," ")}}function Bn(a,l){if(a&1){let o=I();n(0,"div",31)(1,"div",27)(2,"h5"),m(3,"Type"),r(),n(4,"p",28),m(5,"Select Type want to download"),r()(),n(6,"div",27)(7,"div",37)(8,"div")(9,"mat-radio-group",38),b("ngModelChange",function(t){g(o);let i=c(2);return x(i.downloadType,t)||(i.downloadType=t),_(t)}),n(10,"mat-radio-button",39),m(11," Orders "),r(),n(12,"mat-radio-button",40),m(13," Disbursement "),r()()()(),n(14,"div",41)(15,"div",42),C(16,"i",43),r(),n(17,"p",44),m(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),r()()()()}if(a&2){let o=c(2);p(9),w("ngModel",o.downloadType),p(),d("value",!1),p(2),d("value",!0)}}function zn(a,l){a&1&&(n(0,"p",28),m(1," Select Disbursement date "),n(2,"span",45),m(3,"(payment date / order complete date)"),r(),m(4," of the channel you want to download (Max 1 Week). "),r())}function Gn(a,l){a&1&&(n(0,"p",28),m(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),r())}function jn(a,l){if(a&1){let o=I();D(0),n(1,"div",46)(2,"app-timepicker",47),b("timeChange",function(t){g(o);let i=c(2);return x(i.timeFrom,t)||(i.timeFrom=t),_(t)}),r(),n(3,"span",48),m(4,"-"),r(),n(5,"app-timepicker",47),b("timeChange",function(t){g(o);let i=c(2);return x(i.timeTo,t)||(i.timeTo=t),_(t)}),r()(),E()}if(a&2){let o=c(2);p(2),w("time",o.timeFrom),p(3),w("time",o.timeTo)}}function Hn(a,l){if(a&1){let o=I();n(0,"div",26)(1,"div",8)(2,"div",7)(3,"div",27)(4,"h5"),m(5,"Select a Channel"),r(),n(6,"p",28),m(7," Select Channel want to download order "),r()(),n(8,"div",27)(9,"ng-select",29),b("ngModelChange",function(t){g(o);let i=c();return x(i.channelID,t)||(i.channelID=t),_(t)}),y("ngModelChange",function(){g(o);let t=c();return _(t.onSelectChannel())}),u(10,Wn,3,3,"ng-option",30),r()()(),u(11,Bn,19,3,"div",31),P(12,"async"),n(13,"div",31)(14,"div",27)(15,"h5"),m(16,"Date Range"),r(),u(17,zn,5,0,"p",28)(18,Gn,2,0,"p",28),r(),n(19,"div",27)(20,"div",8)(21,"mat-date-range-input",32)(22,"input",33),b("ngModelChange",function(t){g(o);let i=c();return x(i.startDate,t)||(i.startDate=t),_(t)}),y("click",function(){g(o);let t=O(25);return _(t.open())}),r(),n(23,"input",34),b("ngModelChange",function(t){g(o);let i=c();return x(i.endDate,t)||(i.endDate=t),_(t)}),y("click",function(){g(o);let t=O(25);return _(t.open())})("ngModelChange",function(){g(o);let t=c();return _(t.onFilterDateChange())}),r()(),C(24,"mat-date-range-picker",null,1),r(),u(26,jn,6,2,"ng-container",5),r()()()()}if(a&2){let o,e=O(25),t=c();p(9),d("clearable",!1),w("ngModel",t.channelID),p(),d("ngForOf",t.channelOptions),p(),Qe((o=k(12,9,t.channelDetail$))!=null&&o.ServiceFeeWriteOff?11:-1),p(6),Qe(t.downloadType()&&(t.currentChannel==null?null:t.currentChannel.TypeID)==t.channelType.Tokopedia?17:18),p(4),d("rangePicker",e),p(),w("ngModel",t.startDate),p(),w("ngModel",t.endDate),p(3),d("ngIf",t.showTimePicker)}}function Un(a,l){a&1&&(C(0,"i",49),n(1,"span"),m(2,"Preview"),r())}function Yn(a,l){if(a&1&&(n(0,"th",71),m(1),r()),a&2){let o=c(3);p(),T(" ",o.currentChannel?"Created Date":"Last Status Update"," ")}}function qn(a,l){if(a&1&&(n(0,"td"),m(1),P(2,"date"),r()),a&2){let o=c().$implicit;p(),T(" ",R(2,1,o.Date,"dd MMM yyyy HH:mm:ss")," ")}}function Jn(a,l){if(a&1&&(n(0,"span"),m(1),r()),a&2){let o=c().$implicit;p(),T(" ",o.ActionString," ")}}function Kn(a,l){if(a&1&&(n(0,"li"),m(1),r()),a&2){let o=l.$implicit;p(),T(" ",o," ")}}function $n(a,l){if(a&1&&(n(0,"ul",76),u(1,Kn,2,1,"li",72),r()),a&2){let o=c().$implicit;p(),d("ngForOf",o.ActionString)}}function Zn(a,l){if(a&1&&(n(0,"span",77),C(1,"i",78),r()),a&2){let o=c().$implicit;st("title","Delivery : ",o.DeliveryState,`
6
- Payment : `,o.PaymentState,"")}}function Xn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),m(4),r(),u(5,qn,3,4,"td",5),n(6,"td")(7,"span"),m(8),r(),m(9),r(),n(10,"td",73)(11,"span"),m(12),r(),m(13),r(),n(14,"td"),u(15,Jn,2,1,"span",5)(16,$n,2,1,"ul",74),r(),n(17,"td"),u(18,Zn,2,3,"span",75),r()()),a&2){let o=l.$implicit,e=l.index,t=c(4);p(2),S(e+1),p(2),S(o.Number),p(),d("ngIf",(t.currentChannel==null?null:t.currentChannel.TypeID)!=t.channelType.Shopee&&(t.currentChannel==null?null:t.currentChannel.TypeID)!==t.channelType.Tiktok),p(3),T("",o.ChannelStatus," - "),p(),T("",o.ChannelStatusDescription," "),p(),d("ngClass",ie(12,kn,(o==null?null:o.Action)==t.actionPreviewOrder.Update,(o==null?null:o.Action)==t.actionPreviewOrder.New))("matTooltip",o.POSStatus==91||o.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),p(2),T("",o.POSStatus," - "),p(),T("",o.POSStatusDescription," "),p(2),d("ngIf",o.ActionString.length==1),p(),d("ngIf",o.ActionString.length>1),p(2),d("ngIf",o.ChannelStatus!=99&&o.POSStatus!=99)}}function Qn(a,l){if(a&1&&(D(0),u(1,Xn,19,15,"tr",72),E()),a&2){let o=c(3);p(),d("ngForOf",o.displayedPreviewData)}}function ea(a,l){a&1&&(n(0,"tr",79)(1,"td",80)(2,"div",81),C(3,"i",82),r(),n(4,"h4",83),m(5," There is no order to processed "),r()()())}function ta(a,l){if(a&1){let o=I();n(0,"div",51)(1,"div",52)(2,"div",53)(3,"div",54)(4,"div")(5,"ul",55)(6,"li",56)(7,"button",57),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.ALL))}),m(8),r()(),n(9,"li",58)(10,"button",59),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.SYNC))}),m(11),r()(),n(12,"li",58)(13,"button",60),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.WRONG))}),m(14),r()(),n(15,"li",58)(16,"button",61),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.UNSYNC))}),m(17),r()()()(),n(18,"div")(19,"button",62),y("click",function(){g(o);let t=c(2);return _(t.exportOrders())}),C(20,"i",63),n(21,"span"),m(22,"Export"),r()()()()(),n(23,"table",64)(24,"thead",65)(25,"tr"),C(26,"th",66),n(27,"th",67),m(28,"Number"),r(),u(29,Yn,2,1,"th",68),n(30,"th",69),m(31,"Channel Status"),r(),n(32,"th",69),m(33,"POS Status"),r(),n(34,"th"),m(35,"Action"),r(),C(36,"th",66),r()(),n(37,"tbody"),u(38,Qn,2,1,"ng-container",70)(39,ea,6,0,"ng-template",null,2,U),r()()()()}if(a&2){let o=O(40),e=c(2);p(7),d("ngClass",e.pillStatus=="all"?"btn-secondary text-white":"btn-outline-dark"),p(),T(" All (",e.allData,") "),p(2),d("ngClass",e.pillStatus=="sync"?"btn-success":"btn-outline-success"),p(),T(" Existing (",e.syncData,") "),p(2),d("ngClass",e.pillStatus=="wrong"?"btn-warning text-white":"btn-outline-warning"),p(),T(" Wrong Status (",e.wrongData,") "),p(2),d("ngClass",e.pillStatus=="unsync"?"btn-danger":"btn-outline-danger"),p(),T(" Missing (",e.unsyncData,") "),p(12),d("ngIf",(e.currentChannel==null?null:e.currentChannel.TypeID)!=e.channelType.Shopee&&(e.currentChannel==null?null:e.currentChannel.TypeID)!==e.channelType.Tiktok),p(9),d("ngIf",e.displayedPreviewData.length>0)("ngIfElse",o)}}function ia(a,l){if(a&1&&u(0,ta,41,11,"div",50),a&2){let o=c();d("ngIf",o.currentState=="preview")}}function na(a,l){a&1&&(C(0,"i",84),n(1,"span"),m(2,"Finish"),r())}function aa(a,l){if(a&1&&(n(0,"tr",86)(1,"td"),m(2),r(),n(3,"td"),m(4),r(),n(5,"td"),m(6),r(),n(7,"td"),m(8),r()()),a&2){let o=l.$implicit,e=l.index;d("ngClass",Be(5,Ln,o.Exception)),p(2),S(e+1),p(2),S(o.Number),p(2),S(o.Status),p(2),S(o.Exception)}}function ra(a,l){if(a&1&&(D(0),u(1,aa,9,7,"tr",85),E()),a&2){let o=c(3);p(),d("ngForOf",o.downloadData)}}function oa(a,l){a&1&&(n(0,"tr",79)(1,"td",80)(2,"div",81),C(3,"i",82),r(),n(4,"h4",83),m(5," There is no order to processed "),r()()())}function la(a,l){if(a&1&&(n(0,"div",51)(1,"div",52)(2,"table",64)(3,"thead",65)(4,"tr"),C(5,"th",66),n(6,"th"),m(7,"Order Number"),r(),n(8,"th"),m(9,"Status"),r(),n(10,"th"),m(11,"Exception"),r()()(),n(12,"tbody"),u(13,ra,2,1,"ng-container",70)(14,oa,6,0,"ng-template",null,3,U),r()()()()),a&2){let o=O(15),e=c(2);p(13),d("ngIf",(e.downloadData==null?null:e.downloadData.length)>0)("ngIfElse",o)}}function pa(a,l){if(a&1&&u(0,la,16,2,"div",50),a&2){let o=c();d("ngIf",o.currentState=="finish")}}function ma(a,l){a&1&&(n(0,"h6"),m(1,"1"),r())}function sa(a,l){a&1&&(n(0,"h6"),m(1,"2"),r())}function da(a,l){a&1&&(n(0,"h6"),m(1,"3"),r())}var te=function(a){return a.ALL="all",a.SYNC="sync",a.WRONG="wrong",a.UNSYNC="unsync",a}(te||{}),di=(()=>{let l=class l{constructor(e,t,i,h,f,s,q){this.http=e,this.toastr=t,this.datePipe=i,this.url=h,this.productService=f,this.orderService=s,this.authService=q,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=N,this.previewStatus=te,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=Me,this.showTimePicker=!1,this.downloadType=pt(!1),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initTimeFilter(),this.url.queryParams.subscribe(e=>{this.channelID=e.ChannelID,this.startDate=new Date(e.Date),this.endDate=new Date(e.Date)})}initTimeFilter(){this.timeFrom="00:00",this.timeTo="23:59"}onDownload(e){let t={ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData,IsDisbursement:this.downloadType()};this.http.post("/api/Orders/Download",t).subscribe(i=>{this.downloadData=i.Body,this.onStepperNext(e)})}onPreview(e){if(!this.validateDatePreview())return;let t={ID:this.channelID,From:this.startDate,To:this.endDate,IsDisbursement:this.downloadType()};this.showTimePicker&&(t=it(tt({},t),{TimeFrom:this.timeFrom+":00",TimeTo:this.timeTo+":00"})),this.http.post("/api/Orders/Preview",t).subscribe(i=>{if(i.length==0){this.toastrEmptyPreview();return}this.previewData=i,this.groupingPreviewData(),this.filterPreviewData(te.ALL),this.initLengthStatusData(),this.onStepperNext(e)})}toastrEmptyPreview(){let e=this.datePipe.transform(this.startDate,"dd MMM yyyy"),t=this.datePipe.transform(this.endDate,"dd MMM yyyy"),i=this.showTimePicker?this.timeFrom+":00":"",h=this.showTimePicker?this.timeTo+":00":"";this.toastr.info(`There is no orders from ${e} ${i} to ${t} ${h}!`,"No Orders!")}validateDatePreview(){let e=!0;return this.downloadType()==!0?M.getDaysDiff(this.startDate,this.endDate)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Failed"),e=!1):M.getDaysDiff(this.startDate,this.endDate)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),e=!1),e}onSelectChannel(){this.currentChannel=this.channelOptions.find(e=>e.ID==this.channelID),this.initGetChannelDetail()}initGetChannelDetail(){this.currentChannel.TypeID==N.Tokopedia?this.channelDetail$=this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.currentChannel.ID}).pipe(j(e=>e?.Model),ye(1)):this.channelDetail$=null}setPageTitle(e){this.pageTitle=`
5
+ </ol>`;this.toastr.warning(h,"Warning",{enableHtml:!0})}else{let h=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastr.error(h,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let t="";return e.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> was successfully Accept</li>`}),t}generateErrorMessage(e){let t="";return e.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> ${i.Message}</li>`}),t}};l.\u0275fac=function(t){return new(t||l)(ce(A),ce(Te))},l.\u0275prov=fe({token:l,factory:l.\u0275fac});let a=l;return a})();function _i(a,l){if(a&1){let o=I();D(0),n(1,"button",18),y("click",function(){g(o);let t=c().ngIf,i=c();return _(i.onAcceptOrder(t))}),C(2,"i",19),m(3," Accept "),r(),E()}}function ui(a,l){if(a&1&&(D(0),u(1,_i,4,0,"ng-container",3),E()),a&2){let o=c();p(),d("ngIf",o.isTokopediaAvailable&&o.isTokopediaSelected)}}function fi(a,l){if(a&1&&(n(0,"span",20),C(1,"img",21),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V),p(),T(" ",o.Name," ")}}function Si(a,l){if(a&1){let o=I();D(0),n(1,"th",33)(2,"input",34),b("ngModelChange",function(t){g(o);let i=c(3);return x(i.isCheckAll,t)||(i.isCheckAll=t),_(t)}),y("ngModelChange",function(){g(o);let t=c(2).ngIf,i=c();return _(i.onSelectAllOrderData(t))}),r()(),E()}if(a&2){let o=c(3);p(2),w("ngModel",o.isCheckAll)}}function Ci(a,l){if(a&1){let o=I();D(0),n(1,"input",34),b("ngModelChange",function(t){g(o);let i=c(2).$implicit;return x(i.selected,t)||(i.selected=t),_(t)}),y("ngModelChange",function(){g(o);let t=c(4).ngIf,i=c();return _(i.onSelectOrderData(t))}),r(),E()}if(a&2){let o=c(2).$implicit;p(),w("ngModel",o.selected)}}function yi(a,l){if(a&1&&(D(0),n(1,"td"),u(2,Ci,2,1,"ng-container",3),r(),E()),a&2){let o=c().$implicit,e=c(3);p(2),d("ngIf",o.Type==e.tokopediaType)}}function wi(a,l){if(a&1&&(D(0),n(1,"span"),m(2),r(),E()),a&2){let o=c().$implicit;p(2),S(o.Number)}}function xi(a,l){if(a&1&&(n(0,"a",36),m(1),r()),a&2){let o=c().$implicit,e=c(3);d("href",e.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+o.ID,V),p(),S(o.Number)}}function bi(a,l){if(a&1&&(n(0,"tr"),u(1,yi,3,1,"ng-container",3),n(2,"td"),m(3),r(),n(4,"td"),u(5,wi,3,1,"ng-container",22)(6,xi,2,2,"ng-template",null,1,U),r(),n(8,"td"),m(9),r(),n(10,"td"),m(11),P(12,"date"),r(),n(13,"td"),C(14,"app-channel-logo",35),r()()),a&2){let o=l.$implicit,e=O(7),t=c(3);p(),d("ngIf",t.isTokopediaAvailable),p(2),S(o.Outlet),p(2),d("ngIf",o.ID==t.guidEmpty)("ngIfElse",e),p(4),S(o.Customer),p(2),S(R(12,7,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.Type)}}function vi(a,l){if(a&1){let o=I();D(0),n(1,"div",23)(2,"table",24),y("matSortChange",function(t){g(o);let i=c(2);return _(i.onSort(t))}),n(3,"thead",25)(4,"tr",26),u(5,Si,3,1,"ng-container",3),n(6,"th",27),m(7,"Outlet"),r(),n(8,"th",28),m(9,"Order number"),r(),n(10,"th"),m(11,"Customer"),r(),n(12,"th",29),m(13,"Created On"),r(),n(14,"th",30),m(15,"Channel"),r()()(),n(16,"tbody"),u(17,bi,15,10,"tr",31),r()(),n(18,"app-mat-paginator-no-count",32),P(19,"async"),P(20,"async"),y("total",function(){g(o);let t=c(2);return _(t.getPaginatonTotal())})("next",function(){g(o);let t=c(2);return _(t.onNextPage())})("previous",function(){g(o);let t=c(2);return _(t.onPreviousPage())}),r()(),E()}if(a&2){let o,e=c().ngIf,t=c();p(5),d("ngIf",t.isTokopediaAvailable&&e),p(12),d("ngForOf",e),p(),d("filter",t.filter)("totaldata",(o=k(19,5,t.newOrdersData$))==null?null:o.length)("paginationTotal",k(20,7,t.paginationTotal$))}}function Ti(a,l){if(a&1&&(D(0),u(1,vi,21,9,"ng-container",22),E()),a&2){let o=l.ngIf;c();let e=O(32);p(),d("ngIf",(o==null?null:o.length)>0)("ngIfElse",e)}}function Di(a,l){a&1&&(n(0,"div",37),C(1,"app-empty-state"),r())}var ni=(()=>{let l=class l{constructor(e,t,i,h){this.localDataService=e,this.orderService=t,this.acceptOrderService=i,this.authService=h,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=M.GuidEMpty,this.tokopediaType=N.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(ye()),this.newOrdersData$=this.sourceObs$.pipe(be(t=>{t.filter(h=>h.Type==N.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(ye())}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(i=>i.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(t=>(t.Type==N.Tokopedia&&(t.selected=this.isCheckAll),t)),this.onSelectOrderData(e)}onAcceptOrder(e){let t=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(t).subscribe(i=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(i=>i.selected).map(i=>i.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let t=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(j(i=>(i=i.sort((h,f)=>M.compare(h.Created,f.Created,t)),i)))}}};l.\u0275fac=function(t){return new(t||l)(v(he),v(Ee),v(Ye),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-new-order"]],decls:33,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[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"],["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(t,i){if(t&1){let h=I();n(0,"mainpanel",2),y("onSubmit",function(){return g(h),_(i.getNewOrders())}),n(1,"actions"),u(2,ui,2,1,"ng-container",3),P(3,"async"),r(),n(4,"filters")(5,"div")(6,"label",4),m(7,"Channel"),r(),n(8,"ng-select",5),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(9,fi,3,2,"ng-template",6),r()(),n(10,"div",7)(11,"label",8),m(12,"Page Number"),r(),n(13,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(14,"div",7)(15,"label",8),m(16,"Page Size"),r(),n(17,"input",10),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(18,"div",7)(19,"label",11),m(20,"From/To"),r(),n(21,"div",12)(22,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(23,"div")(24,"datepicker",14),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(25,"content")(26,"div",15)(27,"div",16)(28,"div",17),u(29,Ti,2,2,"ng-container",3),P(30,"async"),u(31,Di,2,0,"ng-template",null,0,U),r()()()()()}t&2&&(d("hideSearchBox",!0),p(2),d("ngIf",k(3,11,i.newOrdersData$)),p(6),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",k(30,13,i.newOrdersData$)))},dependencies:[W,B,$,ae,He,z,G,Y,X,re,oe,Q,me,se,le,pe,ee,ve,F]});let a=l;return a})();var Ei=()=>["/menu/Order"];function Pi(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),m(4),P(5,"number"),r(),n(6,"td"),m(7),P(8,"number"),r()()),a&2){let o=l.$implicit;p(2),S(o.Code),p(2),S(k(5,3,o.Quantity)),p(3),S(k(8,5,o.Price))}}function Ii(a,l){if(a&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),m(5,"Outlet Info"),r()(),n(6,"div",4)(7,"div",9),m(8," Outlet : "),r(),n(9,"div",9),m(10),r()(),n(11,"div",4)(12,"div",9),m(13," Date : "),r(),n(14,"div",9),m(15),P(16,"date"),r()(),n(17,"div",4)(18,"div",9),m(19," Status : "),r(),n(20,"div",9),m(21),r()(),n(22,"div",4)(23,"div",9),m(24," Tax Type : "),r(),n(25,"div",9),m(26),r()(),n(27,"div",4)(28,"div",9),m(29," Due Date : "),r(),n(30,"div",9),m(31),P(32,"date"),r()()(),n(33,"div",6)(34,"div",7)(35,"h3",8),m(36,"Customer Info"),r()(),n(37,"div",4)(38,"div",9),m(39," Name : "),r(),n(40,"div",9),m(41),r()(),n(42,"div",4)(43,"div",9),m(44," Email : "),r(),n(45,"div",9),m(46),r()(),n(47,"div",4)(48,"div",9),m(49," Mobile : "),r(),n(50,"div",9),m(51),r()()()(),n(52,"div",10)(53,"h3",11),m(54,"Products Sold"),r(),n(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),m(60,"Code"),r(),n(61,"th"),m(62,"Quantity"),r(),n(63,"th"),m(64,"Price"),r()()(),n(65,"tbody"),u(66,Pi,9,7,"tr",16),r()()()()()),a&2){let o=c();p(10),T(" ",o.model.Outlet," "),p(5),T(" ",R(16,9,o.model.Date,"dd MMM yyyy")," "),p(6),T(" ",o.model.Delivery," "),p(5),T(" ",o.model.TaxType," "),p(5),T(" ",R(32,12,o.model.DueDate,"dd MMM yyyy")," "),p(10),T(" ",o.model.Customer.Name," "),p(5),T(" ",o.model.Customer.Email," "),p(5),T(" ",o.model.Customer.Mobile," "),p(15),d("ngForOf",o.model.Variants)}}var ai=(()=>{let l=class l{constructor(e,t){this.http=e,this.url=t,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(t=>{this.model=t})}};l.\u0275fac=function(t){return new(t||l)(v(A),v(Ge))},l.\u0275cmp=L({type:l,selectors:[["app-detail-order"]],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(t,i){t&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),m(3,"Back"),r()(),n(4,"content")(5,"div",2),u(6,Ii,67,15,"div",3),r()()()),t&2&&(d("headerTitle","Order #"+i.number)("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),d("routerLink",J(5,Ei)),p(4),d("ngIf",i.model))},dependencies:[W,B,Y,ne,K,F]});let a=l;return a})();var ri=(()=>{let l=class l{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)(v(Ct))},l.\u0275cmp=L({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),b("ngModelChange",function(f){return x(i.tandaiSudahDicetak,f)||(i.tandaiSudahDicetak=f),f}),r(),n(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),y("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),n(15,"button",10),y("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),w("ngModel",i.tandaiSudahDicetak))},dependencies:[z,G,Jt,wt,yt]});let a=l;return a})();var Je=(()=>{let l=class l{constructor(e,t,i){this.http=e,this.toastr=t,this.dialog=i}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Tokopedia,i)),t)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Tiktok,i)),t)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Shopee,i)),t)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(j(t=>(t=t.map(i=>(i.ChannelType=N.Lazada,i)),t)))}printShippingLabelTokopedia(e){let t={OrderNumber:e,Printed:!0};this.dialog.open(ri).afterClosed().pipe(rt(i=>i!==void 0),ot(i=>(t.Printed=i,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(i=>{let h=window.open("about:blank","_blank");h.document.write(i.File),h.document.close()})}printShippingLabelTiktok(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",i).subscribe(h=>{h.data!=null?window.open(h.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",i).subscribe(h=>{var f=Uint8Array.from(atob(h.File),q=>q.charCodeAt(0)),s=new Blob([f],{type:"octet/stream"});M.openDownloadFile(s,`${e}.pdf`)})}printShippingLabelLazada(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",i).subscribe(h=>{h.result.data!=null?window.open(h.result.data.pdf_url,"_blank"):this.toastr.error(h.message,"Cannot Print")})}};l.\u0275fac=function(t){return new(t||l)(ce(A),ce(Te),ce(De))},l.\u0275prov=fe({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var ge=function(a){return a.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",a.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",a.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",a.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",a.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",a.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",a.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",a.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",a}(ge||{});var Ne=function(a){return a.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",a.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",a.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",a.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",a}(Ne||{});function Mi(a,l){if(a&1&&(D(0),n(1,"div",36)(2,"div",12)(3,"div",37),m(4),r()(),n(5,"div",12)(6,"div",37),m(7),r()()(),E()),a&2){let o=c();p(4),T(" ",o.recipient==null?null:o.recipient.City," "),p(3),T(" ",o.recipient==null?null:o.recipient.District," ")}}function Oi(a,l){if(a&1&&(D(0),n(1,"div")(2,"span",15),m(3,"Berat: "),r(),n(4,"span",18),m(5),r()(),E()),a&2){let o=c();p(5),T("",o.shippingLabel==null?null:o.shippingLabel.Weight," gr")}}function ki(a,l){if(a&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"Batas Kirim:"),r(),n(4,"span",18),m(5),P(6,"date"),r()(),E()),a&2){let o=c();p(5),S(R(6,1,o.logistic==null?null:o.logistic.Batas_kirim,"dd-MM-yyy"))}}function Li(a,l){if(a&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"No.Pesanan:"),r(),n(4,"span",18),m(5),r()(),E()),a&2){let o=c();p(5),S(o.shippingLabel==null?null:o.shippingLabel.OrderNumber)}}function Vi(a,l){if(a&1&&(n(0,"tr")(1,"td",39),m(2),r(),n(3,"td"),m(4),r(),n(5,"td"),m(6),r(),n(7,"td"),m(8),P(9,"number"),r()()),a&2){let o=l.$implicit,e=l.index;p(2),S(e+1),p(2),S(o.Product_Name),p(2),S(o.SKU),p(2),S(k(9,4,o.Quantity))}}var Ke=(()=>{let l=class l{constructor(){this.minDate=M.MinDate,this.channelType=N}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case N.Tokopedia:this.marketplaceLogo=Ne.TOKOPEDIA;break;case N.Shopee:this.marketplaceLogo=Ne.SHOPEE;break;case N.Lazada:this.marketplaceLogo=Ne.LAZADA;break;case N.Tiktok:this.marketplaceLogo=Ne.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=ge.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=ge.GRAB:e.includes("jne")?this.shippingLogo=ge.JNE:e.includes("gosend")?this.shippingLogo=ge.GOSEND:e.includes("j&t")?this.shippingLogo=ge.JNT:e.includes("sicepat")?this.shippingLogo=ge.SICEPAT:e.includes("spx")?this.shippingLogo=ge.SPX:e.includes("lex")&&(this.shippingLogo=ge.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(M.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})}M.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=L({type:l,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},standalone:!0,features:[lt,We],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(t,i){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),C(6,"img",5),r(),n(7,"div")(8,"h4"),m(9),r()(),n(10,"div"),C(11,"img",5),r()()()(),n(12,"div",6),C(13,"hr"),r(),n(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),m(18),r(),n(19,"span"),m(20),r()()()(),n(21,"div",7)(22,"div",10),Ze(),C(23,"svg",11),r()(),Xe(),n(24,"div",6),C(25,"hr"),r(),n(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),m(30,"Penerima: "),r(),n(31,"div",15),m(32),r()(),n(33,"div",16)(34,"span",15),m(35,"Alamat Pengiriman:"),r(),n(36,"div",17),m(37),r()()(),n(38,"div",12)(39,"div",13)(40,"div",14),m(41,"Pengirim: "),r(),n(42,"div")(43,"div",15),m(44),r(),n(45,"div",18),m(46),r(),n(47,"div",19),m(48),r()()(),C(49,"div"),r()(),u(50,Mi,8,2,"ng-container",20),n(51,"div",21)(52,"div",22)(53,"div",15),m(54,"CASHLESS"),r()(),n(55,"div",23)(56,"small",24),m(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),r()()(),n(58,"div",25)(59,"div",26)(60,"div",27),u(61,Oi,6,1,"ng-container",20),n(62,"div")(63,"span",15),m(64,"COD: "),r(),n(65,"span",18),m(66),P(67,"number"),r()()(),u(68,ki,7,4,"ng-container",20)(69,Li,6,1,"ng-container",20),r(),n(70,"div",28),Ze(),C(71,"svg",29),r()()(),Xe(),n(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),m(78,"No."),r(),n(79,"th",32),m(80,"Nama Produk"),r(),n(81,"th",33),m(82,"SKU"),r(),n(83,"th",34),m(84,"Qty"),r()()(),n(85,"tbody"),u(86,Vi,10,6,"tr",35),r()()()()()),t&2&&(p(6),d("src",i.marketplaceLogo,V),p(3),S(i.logistic==null?null:i.logistic.Service),p(2),d("src",i.shippingLogo,V),p(7),T(" ",(i.shippingLabel==null?null:i.shippingLabel.ChannelType)==(i.channelType==null?null:i.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),p(2),S(i.logistic==null?null:i.logistic.Resi_Number),p(3),d("id","RESI"+i.id),p(9),S(i.recipient==null?null:i.recipient.Name),p(5),T(" ",i.recipient==null?null:i.recipient.Address," "),p(7),S(i.store==null?null:i.store.Name),p(2),S(i.store==null?null:i.store.Phone),p(2),T(" ",i.store==null?null:i.store.Address," "),p(2),d("ngIf",(i.recipient==null?null:i.recipient.City)&&(i.recipient==null?null:i.recipient.District)),p(11),d("ngIf",i.shippingLabel==null?null:i.shippingLabel.Weight),p(5),T("Rp. ",i.shippingLabel!=null&&i.shippingLabel.IsCOD?k(67,18,i.shippingLabel==null||i.shippingLabel.SummaryPrice==null?null:i.shippingLabel.SummaryPrice.Total):0,""),p(2),d("ngIf",(i.logistic==null?null:i.logistic.Batas_kirim)&&(i.logistic==null?null:i.logistic.Batas_kirim)!==i.minDate),p(),d("ngIf",i.shippingLabel==null?null:i.shippingLabel.OrderNumber),p(2),d("id","NO"+i.id),p(15),d("ngForOf",i.products))},dependencies:[Se,W,B,K,F],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}"]});let a=l;return a})();var Ai=()=>["/menu/Order/detail"],Ri=(a,l)=>({Number:a,Outlet:l});function Wi(a,l){if(a&1){let o=I();D(0),n(1,"button",19),y("click",function(){g(o);let t=c();return _(t.onPrintMultipleShippingLabel())}),C(2,"i",20),n(3,"span"),m(4,"Print Shipping Label"),r()(),E()}}function Bi(a,l){if(a&1&&(n(0,"span",21),C(1,"img",22),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function zi(a,l){if(a&1){let o=I();D(0),n(1,"input",29),b("ngModelChange",function(t){g(o);let i=c().$implicit;return x(i.Selected,t)||(i.Selected=t),_(t)}),y("ngModelChange",function(){g(o);let t=c(3).ngIf,i=c();return _(i.onSelectReadyToShip(t))}),r(),E()}if(a&2){let o=c().$implicit;p(),w("ngModel",o.Selected)}}function Gi(a,l){if(a&1&&(n(0,"a",42),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,Ai))("queryParams",ie(4,Ri,o.Number,o.Outlet)),p(),S(o.Number)}}function ji(a,l){if(a&1&&(n(0,"a",43),m(1),r()),a&2){let o=c().$implicit,e=c(3);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function Hi(a,l){if(a&1){let o=I();n(0,"a",44),y("click",function(){g(o);let t=c().$implicit,i=c(3);return _(i.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),C(1,"i",45),r()}}function Ui(a,l){if(a&1&&(n(0,"tr")(1,"td"),u(2,zi,2,1,"ng-container",2),r(),n(3,"td"),m(4),r(),n(5,"td"),u(6,Gi,2,7,"a",37)(7,ji,2,2,"a",38),r(),n(8,"td"),m(9),r(),n(10,"td"),m(11),P(12,"number"),r(),n(13,"td"),m(14),P(15,"date"),r(),n(16,"td"),C(17,"app-channel-logo",39),r(),n(18,"td",40),u(19,Hi,2,0,"a",41),r()()),a&2){let o=l.$implicit,e=c(3);p(2),d("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok),p(2),S(o.Outlet),p(2),d("ngIf",e.guidEmpty==o.ID),p(),d("ngIf",e.guidEmpty!=o.ID),p(2),S(o.Customer),p(2),S(k(12,9,o.Amount)),p(3),S(R(15,11,o.Date,"dd MMM yyyy")),p(3),d("typeId",o.TypeID),p(2),d("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok||o.TypeID==e.channelType.Lazada)}}function Yi(a,l){if(a&1){let o=I();D(0),n(1,"div",24)(2,"table",25),y("matSortChange",function(t){g(o);let i=c(2);return _(i.onSort(t))}),n(3,"thead",26)(4,"tr",27)(5,"th",28)(6,"input",29),b("ngModelChange",function(t){g(o);let i=c(2);return x(i.isCheckAll,t)||(i.isCheckAll=t),_(t)}),y("ngModelChange",function(){g(o);let t=c().ngIf,i=c();return _(i.onSelectAllReadyToShip(t))}),r()(),n(7,"th",30),m(8,"Outlet"),r(),n(9,"th",31),m(10,"Order number"),r(),n(11,"th"),m(12,"Customer"),r(),n(13,"th",32),m(14,"Amount"),r(),n(15,"th",33),m(16,"Date"),r(),n(17,"th",34),m(18,"Channel"),r(),C(19,"th",35),r()(),n(20,"tbody"),u(21,Ui,20,14,"tr",18),r()(),n(22,"app-mat-paginator-no-count",36),P(23,"async"),P(24,"async"),y("total",function(){g(o);let t=c(2);return _(t.getRowCount())})("next",function(){g(o);let t=c(2);return _(t.NextPage())})("previous",function(){g(o);let t=c(2);return _(t.PreviousPage())}),r()(),E()}if(a&2){let o,e=c().ngIf,t=c();p(6),w("ngModel",t.isCheckAll),p(15),d("ngForOf",e),p(),d("filter",t.filter)("totaldata",(o=k(23,5,t.readyToShip$))==null?null:o.length)("paginationTotal",k(24,7,t.paginationTotal$))}}function qi(a,l){if(a&1&&(D(0),u(1,Yi,25,9,"ng-container",23),E()),a&2){let o=l.ngIf;c();let e=O(31);p(),d("ngIf",o.length>0)("ngIfElse",e)}}function Ji(a,l){a&1&&(n(0,"div",46),C(1,"app-empty-state"),r())}function Ki(a,l){a&1&&(D(0),n(1,"div",48),m(2,"\xA0"),r(),E())}function $i(a,l){if(a&1&&(D(0),C(1,"app-shipping-label",47),u(2,Ki,3,0,"ng-container",2),E()),a&2){let o=l.$implicit,e=l.index,t=c();p(),d("shippingLabel",o)("id",e),p(),d("ngIf",e!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var oi=(()=>{let l=class l{constructor(e,t,i,h,f,s){this.http=e,this.localDataService=t,this.dialog=i,this.shippingLabelService=h,this.datePipe=f,this.authService=s,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=N,this.guidEmpty=M.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,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 t={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",t).pipe(j(i=>i.Data),ye(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,N.Tokopedia),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,N.Shopee),i=this.filterReadyToShipByChannel(this.selectedReadyToShip,N.Tiktok),h=[];e.length>0&&h.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),t.length>0&&h.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(t))),i.length>0&&h.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(i))),at(h).pipe(j(f=>f.reduce((s,q)=>s.concat(q),[]))).subscribe({next:f=>{this.shippingLabels=f,this.printShippingLabel()}})}filterReadyToShipByChannel(e,t){return e.filter(i=>i.TypeID==t)}shippingLabelPayload(e){return e.map(t=>({ShopID:t.ShopID,OrderNumber:t.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,t,i){switch(i){case N.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case N.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,t);break;case N.Shopee:this.shippingLabelService.printShippingLabelShopee(e,t);break;case N.Lazada:this.shippingLabelService.printShippingLabelLazada(e,t);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,t=this.datePipe.transform(e,"dd-MM-yyyy"),i=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${t}_${i}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(t=>t.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(j(t=>t?.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 t=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(j(i=>i.sort((h,f)=>M.compare(h.Date,f.Date,t))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(t=>((t.TypeID==N.Tokopedia||t.TypeID==N.Shopee||t.TypeID==N.Lazada)&&(t.Selected=this.isCheckAll),t)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}};l.\u0275fac=function(t){return new(t||l)(v(A),v(he),v(De),v(Je),v(F),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-ready-to-ship"]],decls:34,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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"],[2,"width","10px"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.getReadyToShip(s))}),n(1,"actions"),u(2,Wi,5,0,"ng-container",2),r(),n(3,"filters")(4,"div")(5,"label",3),m(6,"Channel"),r(),n(7,"ng-select",4),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(8,Bi,3,3,"ng-template",5),r()(),n(9,"div",6)(10,"label",7),m(11,"Page Number"),r(),n(12,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(13,"div",6)(14,"label",7),m(15,"Page Size"),r(),n(16,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(17,"div",6)(18,"label",10),m(19,"From/To"),r(),n(20,"div",11)(21,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(22,"div")(23,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(24,"content")(25,"div",14)(26,"div",15)(27,"div",16),u(28,qi,2,2,"ng-container",2),P(29,"async"),u(30,Ji,2,0,"ng-template",null,0,U),r()()()()(),n(32,"div",17),u(33,$i,3,3,"ng-container",18),r()}t&2&&(p(2),d("ngIf",i.selectedReadyToShip.length>0),p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",k(29,11,i.readyToShip$)),p(5),d("ngForOf",i.shippingLabels))},dependencies:[W,B,$,ae,He,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,Ke,ve,K,F],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}}"]});let a=l;return a})();var Zi=()=>["/menu/Order/detail"],Xi=(a,l)=>({Number:a,Outlet:l});function Qi(a,l){if(a&1&&(n(0,"span",17),C(1,"img",18),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function en(a,l){if(a&1&&(n(0,"a",33),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,Zi))("queryParams",ie(4,Xi,o.Number,o.Outlet)),p(),S(o.Number)}}function tn(a,l){if(a&1&&(n(0,"a",34),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function nn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,en,2,7,"a",30)(5,tn,2,2,"a",31),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),C(15,"app-channel-logo",32),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,7,o.Amount)),p(3),S(R(13,9,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.TypeID)}}function an(a,l){if(a&1){let o=I();D(0),n(1,"div",19)(2,"table",20),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),r(),n(7,"th",24),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",25),m(12,"Amount"),r(),n(13,"th",26),m(14," Created On "),r(),n(15,"th",27),m(16,"Channel"),r()()(),n(17,"tbody"),u(18,nn,16,12,"tr",28),r()(),n(19,"app-mat-paginator-no-count",29),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(18),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function rn(a,l){a&1&&(n(0,"div",35),C(1,"app-empty-state"),r())}var li=(()=>{let l=class l{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=N,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==M.GuidEMpty}Get(e){var t={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",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.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(t=>{this.paginationTotal=t.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 t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(he),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-shipped"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),r(),n(5,"ng-select",3),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(6,Qi,3,3,"ng-template",4),r()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),r(),n(10,"input",7),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),r(),n(14,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),r(),n(18,"div",10)(19,"datepicker",11),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(20,"div")(21,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,an,20,4,"ng-container",16)(27,rn,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(28);p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var on=()=>["/menu/Order/detail"],ln=(a,l)=>({Number:a,Outlet:l});function pn(a,l){if(a&1&&(n(0,"span",17),C(1,"img",18),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function mn(a,l){if(a&1&&(n(0,"a",33),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,on))("queryParams",ie(4,ln,o.Number,o.Outlet)),p(),S(o.Number)}}function sn(a,l){if(a&1&&(n(0,"a",34),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.customerInfoUrl+o.ID,V),p(),S(o.Number)}}function dn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,mn,2,7,"a",30)(5,sn,2,2,"a",31),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),C(15,"app-channel-logo",32),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,7,o.Amount)),p(3),S(R(13,9,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.TypeID)}}function cn(a,l){if(a&1){let o=I();D(0),n(1,"div",19)(2,"table",20),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),r(),n(7,"th",24),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",25),m(12,"Amount"),r(),n(13,"th",26),m(14," Created On "),r(),n(15,"th",27),m(16,"Channel"),r()()(),n(17,"tbody"),u(18,dn,16,12,"tr",28),r()(),n(19,"app-mat-paginator-no-count",29),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(18),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function hn(a,l){a&1&&(n(0,"div",35),C(1,"app-empty-state"),r())}var pi=(()=>{let l=class l{constructor(e,t){this.http=e,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=N,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==M.GuidEMpty}getChannelLogo(e){return M.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 t={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 ",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.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(t=>{this.paginationTotal=t.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 t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-delivered"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),r(),n(5,"ng-select",3),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(6,pn,3,3,"ng-template",4),r()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),r(),n(10,"input",7),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),r(),n(14,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),r(),n(18,"div",10)(19,"datepicker",11),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(20,"div")(21,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,cn,20,4,"ng-container",16)(27,hn,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(28);p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var gn=()=>["/menu/Order/detail"],_n=(a,l)=>({Number:a,Outlet:l});function un(a,l){if(a&1&&(n(0,"span",19),C(1,"img",20),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function fn(a,l){if(a&1&&(n(0,"a",36),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,gn))("queryParams",ie(4,_n,o.Number,o.Outlet)),p(),S(o.Number)}}function Sn(a,l){if(a&1&&(n(0,"a",37),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function Cn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,fn,2,7,"a",33)(5,Sn,2,2,"a",34),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),m(15),r(),n(16,"td"),C(17,"app-channel-logo",35),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,8,o.Amount)),p(3),S(R(13,10,o.Created,"dd MMM yyyy HH:mm")),p(3),S(o.State),p(2),d("typeId",o.TypeID)}}function yn(a,l){if(a&1){let o=I();D(0),n(1,"div",21)(2,"table",22),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",23)(4,"tr",24)(5,"th",25),m(6,"Outlet"),r(),n(7,"th",26),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",27),m(12,"Amount"),r(),n(13,"th",28),m(14," Created On "),r(),n(15,"th",29),m(16,"Status"),r(),n(17,"th",30),m(18,"Channel"),r()()(),n(19,"tbody"),u(20,Cn,18,13,"tr",31),r()(),n(21,"app-mat-paginator-no-count",32),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(20),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function wn(a,l){a&1&&(n(0,"div",38),C(1,"app-empty-state"),r())}var mi=(()=>{let l=class l{constructor(e,t,i,h){this.http=e,this.localDataService=t,this.authService=i,this.dialog=h,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==M.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 t={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",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(Rt,{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(t=>{this.paginationTotal=t.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 t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(he),v(Z),v(De))},l.\u0275cmp=L({type:l,selectors:[["app-all-order"]],decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"actions")(2,"button",2),y("click",function(){return g(h),_(i.openExportDialog())}),C(3,"i",3),n(4,"span"),m(5,"Export"),r()()(),n(6,"filters")(7,"div")(8,"label",4),m(9,"Channel"),r(),n(10,"ng-select",5),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(11,un,3,3,"ng-template",6),r()(),n(12,"div",7)(13,"label",8),m(14,"Page Number"),r(),n(15,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(16,"div",7)(17,"label",8),m(18,"Page Size"),r(),n(19,"input",10),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(20,"div",7)(21,"label",11),m(22,"From/To"),r(),n(23,"div",12)(24,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(25,"div")(26,"datepicker",14),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,yn,22,4,"ng-container",18)(32,wn,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(33);p(10),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var xn=()=>["/menu/Order/detail"],bn=(a,l)=>({Number:a,Outlet:l});function vn(a,l){if(a&1&&(n(0,"span",18),C(1,"img",19),r(),m(2)),a&2){let o=l.item;p(),d("src",o==null?null:o.Img,V)("alt",o.Name),p(),T(" ",o.Name," ")}}function Tn(a,l){if(a&1&&(n(0,"a",34),m(1),r()),a&2){let o=c().$implicit;d("routerLink",J(3,xn))("queryParams",ie(4,bn,o.Number,o.Outlet)),p(),S(o.Number)}}function Dn(a,l){if(a&1&&(n(0,"a",35),m(1),r()),a&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,V),p(),S(o.Number)}}function En(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),u(4,Tn,2,7,"a",31)(5,Dn,2,2,"a",32),r(),n(6,"td"),m(7),r(),n(8,"td"),m(9),P(10,"number"),r(),n(11,"td"),m(12),P(13,"date"),r(),n(14,"td"),C(15,"app-channel-logo",33),r()()),a&2){let o=l.$implicit,e=c(2);p(2),S(o.Outlet),p(2),d("ngIf",e.hasGuidEmpty(o.ID)),p(),d("ngIf",!e.hasGuidEmpty(o.ID)),p(2),S(o.Customer),p(2),S(k(10,7,o.Amount)),p(3),S(R(13,9,o.Created,"dd MMM yyyy HH:mm")),p(3),d("typeId",o.TypeID)}}function Pn(a,l){if(a&1){let o=I();D(0),n(1,"div",20)(2,"table",21),y("matSortChange",function(t){g(o);let i=c();return _(i.onSort(t))}),n(3,"thead",22)(4,"tr",23)(5,"th",24),m(6,"Outlet"),r(),n(7,"th",25),m(8,"Order number"),r(),n(9,"th"),m(10,"Customer"),r(),n(11,"th",26),m(12,"Amount"),r(),n(13,"th",27),m(14," Created On "),r(),n(15,"th",28),m(16,"Channel"),r()()(),n(17,"tbody"),u(18,En,16,12,"tr",29),r()(),n(19,"app-mat-paginator-no-count",30),y("total",function(){g(o);let t=c();return _(t.StoreRowsCountAPIResult())})("next",function(){g(o);let t=c();return _(t.NextPage())})("previous",function(){g(o);let t=c();return _(t.PreviousPage())}),r()(),E()}if(a&2){let o=c();p(18),d("ngForOf",o.data),p(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function In(a,l){a&1&&(n(0,"div",36),C(1,"app-empty-state"),r())}var si=(()=>{let l=class l{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,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==M.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 t={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 ",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.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(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return M.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((i,h)=>M.compare(i.Created,h.Created,t))}}};l.\u0275fac=function(t){return new(t||l)(v(A),v(he),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-cancelled"]],decls:33,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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(t,i){if(t&1){let h=I();n(0,"mainpanel",1),y("onSubmit",function(s){return g(h),_(i.Get(s))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),r(),n(5,"ng-select",3),b("ngModelChange",function(s){return g(h),x(i.filter.ListChannelID,s)||(i.filter.ListChannelID=s),_(s)}),u(6,vn,3,3,"ng-template",4),r()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),r(),n(10,"input",7),b("ngModelChange",function(s){return g(h),x(i.filter.PageNumber,s)||(i.filter.PageNumber=s),_(s)}),r()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),r(),n(14,"input",8),b("ngModelChange",function(s){return g(h),x(i.filter.PageSize,s)||(i.filter.PageSize=s),_(s)}),r()(),n(15,"div",5)(16,"label",6),m(17,"Note"),r(),n(18,"input",9),b("ngModelChange",function(s){return g(h),x(i.filter.Note,s)||(i.filter.Note=s),_(s)}),r()(),n(19,"div",5)(20,"label",10),m(21,"From/To"),r(),n(22,"div",11)(23,"datepicker",12),b("dateChange",function(s){return g(h),x(i.filter.From,s)||(i.filter.From=s),_(s)}),r()(),n(24,"div")(25,"datepicker",13),b("dateChange",function(s){return g(h),x(i.filter.To,s)||(i.filter.To=s),_(s)}),r()()()(),n(26,"content")(27,"div",14)(28,"div",15)(29,"div",16),u(30,Pn,20,4,"ng-container",17)(31,In,2,0,"ng-template",null,0,U),r()()()()()}if(t&2){let h=O(32);p(5),d("clearable",!0)("multiple",!0)("items",i.channelOptions),w("ngModel",i.filter.ListChannelID),p(5),w("ngModel",i.filter.PageNumber),p(4),w("ngModel",i.filter.PageSize),p(4),w("ngModel",i.filter.Note),p(5),w("date",i.filter.From),p(2),w("date",i.filter.To),p(5),d("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[W,B,$,ae,z,G,Y,ne,X,re,oe,Q,me,se,le,pe,ee,K,F]});let a=l;return a})();var Me=function(a){return a[a.DoNothing=0]="DoNothing",a[a.New=1]="New",a[a.Update=2]="Update",a}(Me||{});var Nn=a=>({"full-width":a}),Mn=()=>({standalone:!0}),$e=(()=>{let l=class l{constructor(e){this.datePipe=e,this.fullWidth=!1,this.timeChange=new pt}ngOnInit(){}onTimeChange(e){let t=null;e&&(t=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(t),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}};l.\u0275fac=function(t){return new(t||l)(v(F))},l.\u0275cmp=L({type:l,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:"fullWidth"},outputs:{timeChange:"timeChange"},standalone:!0,features:[We],decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["pButton","","type","button","label","Close",3,"click"]],template:function(t,i){if(t&1){let h=I();n(0,"p-calendar",1,0),b("ngModelChange",function(s){return g(h),x(i.time,s)||(i.time=s),_(s)}),y("ngModelChange",function(s){return g(h),_(i.onTimeChange(s))})("onSelect",function(){return g(h),_(i.onShowCalendar())}),n(2,"p-footer")(3,"button",2),y("click",function(){return g(h),O(1).hideOverlay(),_(i.onShowCalendar())}),r()()()}t&2&&(d("ngClass",Be(5,Nn,i.fullWidth))("baseZIndex",1100),w("ngModel",i.time),d("timeOnly",!0)("ngModelOptions",J(7,Mn)))},dependencies:[Se,ze,Xt,Zt,$t,qt,Ue,z,G],styles:["p-calendar span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:55px} p-calendar.full-width span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:100%!important}"]});let a=l;return a})();var kn=(a,l)=>({"over-due-today":a,"over-due":l}),Ln=a=>({"over-due":a});function Vn(a,l){if(a&1){let o=I();D(0),n(1,"div",19)(2,"button",20),y("click",function(){g(o),c();let t=O(11);return _(t.previous())}),m(3," Back "),r(),n(4,"button",21),y("click",function(){g(o);let t=c(),i=O(11);return _(t.onNext(i))}),m(5," Next "),r()(),E()}if(a&2){let o=c();p(4),d("disabled",o.checkDisabledNextFilter())}}function Fn(a,l){if(a&1){let o=I();D(0),n(1,"button",22),y("click",function(){g(o);let t=c(),i=O(11);return _(t.onNext(i))}),m(2," Next "),r(),E()}if(a&2){let o=c();p(),d("disabled",o.checkDisabledNextFilter())}}function An(a,l){if(a&1){let o=I();D(0),n(1,"button",23),y("click",function(){g(o);let t=c(),i=O(11);return _(t.onNew(i))}),C(2,"i",24),m(3," New "),r(),E()}}function Rn(a,l){a&1&&(C(0,"i",25),n(1,"span"),m(2,"Filter"),r())}function Wn(a,l){if(a&1&&(n(0,"ng-option",35),C(1,"img",36),m(2),r()),a&2){let o=l.$implicit;d("value",o.ID),p(),d("src",o==null?null:o.Img,V),p(),T("",o.Name," ")}}function Bn(a,l){if(a&1){let o=I();n(0,"div",31)(1,"div",27)(2,"h5"),m(3,"Type"),r(),n(4,"p",28),m(5,"Select Type want to download"),r()(),n(6,"div",27)(7,"div",37)(8,"div")(9,"mat-radio-group",38),b("ngModelChange",function(t){g(o);let i=c(2);return x(i.downloadType,t)||(i.downloadType=t),_(t)}),n(10,"mat-radio-button",39),m(11," Orders "),r(),n(12,"mat-radio-button",40),m(13," Disbursement "),r()()()(),n(14,"div",41)(15,"div",42),C(16,"i",43),r(),n(17,"p",44),m(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),r()()()()}if(a&2){let o=c(2);p(9),w("ngModel",o.downloadType),p(),d("value",!1),p(2),d("value",!0)}}function zn(a,l){a&1&&(n(0,"p",28),m(1," Select Disbursement date "),n(2,"span",45),m(3,"(payment date / order complete date)"),r(),m(4," of the channel you want to download (Max 1 Week). "),r())}function Gn(a,l){a&1&&(n(0,"p",28),m(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),r())}function jn(a,l){if(a&1){let o=I();D(0),n(1,"div",46)(2,"app-timepicker",47),b("timeChange",function(t){g(o);let i=c(2);return x(i.timeFrom,t)||(i.timeFrom=t),_(t)}),r(),n(3,"span",48),m(4,"-"),r(),n(5,"app-timepicker",47),b("timeChange",function(t){g(o);let i=c(2);return x(i.timeTo,t)||(i.timeTo=t),_(t)}),r()(),E()}if(a&2){let o=c(2);p(2),w("time",o.timeFrom),p(3),w("time",o.timeTo)}}function Hn(a,l){if(a&1){let o=I();n(0,"div",26)(1,"div",8)(2,"div",7)(3,"div",27)(4,"h5"),m(5,"Select a Channel"),r(),n(6,"p",28),m(7," Select Channel want to download order "),r()(),n(8,"div",27)(9,"ng-select",29),b("ngModelChange",function(t){g(o);let i=c();return x(i.channelID,t)||(i.channelID=t),_(t)}),y("ngModelChange",function(){g(o);let t=c();return _(t.onSelectChannel())}),u(10,Wn,3,3,"ng-option",30),r()()(),u(11,Bn,19,3,"div",31),P(12,"async"),n(13,"div",31)(14,"div",27)(15,"h5"),m(16,"Date Range"),r(),u(17,zn,5,0,"p",28)(18,Gn,2,0,"p",28),r(),n(19,"div",27)(20,"div",8)(21,"mat-date-range-input",32)(22,"input",33),b("ngModelChange",function(t){g(o);let i=c();return x(i.startDate,t)||(i.startDate=t),_(t)}),y("click",function(){g(o);let t=O(25);return _(t.open())}),r(),n(23,"input",34),b("ngModelChange",function(t){g(o);let i=c();return x(i.endDate,t)||(i.endDate=t),_(t)}),y("click",function(){g(o);let t=O(25);return _(t.open())})("ngModelChange",function(){g(o);let t=c();return _(t.onFilterDateChange())}),r()(),C(24,"mat-date-range-picker",null,1),r(),u(26,jn,6,2,"ng-container",5),r()()()()}if(a&2){let o,e=O(25),t=c();p(9),d("clearable",!1),w("ngModel",t.channelID),p(),d("ngForOf",t.channelOptions),p(),Qe((o=k(12,9,t.channelDetail$))!=null&&o.ServiceFeeWriteOff?11:-1),p(6),Qe(t.downloadType()&&(t.currentChannel==null?null:t.currentChannel.TypeID)==t.channelType.Tokopedia?17:18),p(4),d("rangePicker",e),p(),w("ngModel",t.startDate),p(),w("ngModel",t.endDate),p(3),d("ngIf",t.showTimePicker)}}function Un(a,l){a&1&&(C(0,"i",49),n(1,"span"),m(2,"Preview"),r())}function Yn(a,l){if(a&1&&(n(0,"th",71),m(1),r()),a&2){let o=c(3);p(),T(" ",o.currentChannel?"Created Date":"Last Status Update"," ")}}function qn(a,l){if(a&1&&(n(0,"td"),m(1),P(2,"date"),r()),a&2){let o=c().$implicit;p(),T(" ",R(2,1,o.Date,"dd MMM yyyy HH:mm:ss")," ")}}function Jn(a,l){if(a&1&&(n(0,"span"),m(1),r()),a&2){let o=c().$implicit;p(),T(" ",o.ActionString," ")}}function Kn(a,l){if(a&1&&(n(0,"li"),m(1),r()),a&2){let o=l.$implicit;p(),T(" ",o," ")}}function $n(a,l){if(a&1&&(n(0,"ul",76),u(1,Kn,2,1,"li",72),r()),a&2){let o=c().$implicit;p(),d("ngForOf",o.ActionString)}}function Zn(a,l){if(a&1&&(n(0,"span",77),C(1,"i",78),r()),a&2){let o=c().$implicit;dt("title","Delivery : ",o.DeliveryState,`
6
+ Payment : `,o.PaymentState,"")}}function Xn(a,l){if(a&1&&(n(0,"tr")(1,"td"),m(2),r(),n(3,"td"),m(4),r(),u(5,qn,3,4,"td",5),n(6,"td")(7,"span"),m(8),r(),m(9),r(),n(10,"td",73)(11,"span"),m(12),r(),m(13),r(),n(14,"td"),u(15,Jn,2,1,"span",5)(16,$n,2,1,"ul",74),r(),n(17,"td"),u(18,Zn,2,3,"span",75),r()()),a&2){let o=l.$implicit,e=l.index,t=c(4);p(2),S(e+1),p(2),S(o.Number),p(),d("ngIf",(t.currentChannel==null?null:t.currentChannel.TypeID)!=t.channelType.Shopee&&(t.currentChannel==null?null:t.currentChannel.TypeID)!==t.channelType.Tiktok),p(3),T("",o.ChannelStatus," - "),p(),T("",o.ChannelStatusDescription," "),p(),d("ngClass",ie(12,kn,(o==null?null:o.Action)==t.actionPreviewOrder.Update,(o==null?null:o.Action)==t.actionPreviewOrder.New))("matTooltip",o.POSStatus==91||o.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),p(2),T("",o.POSStatus," - "),p(),T("",o.POSStatusDescription," "),p(2),d("ngIf",o.ActionString.length==1),p(),d("ngIf",o.ActionString.length>1),p(2),d("ngIf",o.ChannelStatus!=99&&o.POSStatus!=99)}}function Qn(a,l){if(a&1&&(D(0),u(1,Xn,19,15,"tr",72),E()),a&2){let o=c(3);p(),d("ngForOf",o.displayedPreviewData)}}function ea(a,l){a&1&&(n(0,"tr",79)(1,"td",80)(2,"div",81),C(3,"i",82),r(),n(4,"h4",83),m(5," There is no order to processed "),r()()())}function ta(a,l){if(a&1){let o=I();n(0,"div",51)(1,"div",52)(2,"div",53)(3,"div",54)(4,"div")(5,"ul",55)(6,"li",56)(7,"button",57),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.ALL))}),m(8),r()(),n(9,"li",58)(10,"button",59),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.SYNC))}),m(11),r()(),n(12,"li",58)(13,"button",60),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.WRONG))}),m(14),r()(),n(15,"li",58)(16,"button",61),y("click",function(){g(o);let t=c(2);return _(t.filterPreviewData(t.previewStatus.UNSYNC))}),m(17),r()()()(),n(18,"div")(19,"button",62),y("click",function(){g(o);let t=c(2);return _(t.exportOrders())}),C(20,"i",63),n(21,"span"),m(22,"Export"),r()()()()(),n(23,"table",64)(24,"thead",65)(25,"tr"),C(26,"th",66),n(27,"th",67),m(28,"Number"),r(),u(29,Yn,2,1,"th",68),n(30,"th",69),m(31,"Channel Status"),r(),n(32,"th",69),m(33,"POS Status"),r(),n(34,"th"),m(35,"Action"),r(),C(36,"th",66),r()(),n(37,"tbody"),u(38,Qn,2,1,"ng-container",70)(39,ea,6,0,"ng-template",null,2,U),r()()()()}if(a&2){let o=O(40),e=c(2);p(7),d("ngClass",e.pillStatus=="all"?"btn-secondary text-white":"btn-outline-dark"),p(),T(" All (",e.allData,") "),p(2),d("ngClass",e.pillStatus=="sync"?"btn-success":"btn-outline-success"),p(),T(" Existing (",e.syncData,") "),p(2),d("ngClass",e.pillStatus=="wrong"?"btn-warning text-white":"btn-outline-warning"),p(),T(" Wrong Status (",e.wrongData,") "),p(2),d("ngClass",e.pillStatus=="unsync"?"btn-danger":"btn-outline-danger"),p(),T(" Missing (",e.unsyncData,") "),p(12),d("ngIf",(e.currentChannel==null?null:e.currentChannel.TypeID)!=e.channelType.Shopee&&(e.currentChannel==null?null:e.currentChannel.TypeID)!==e.channelType.Tiktok),p(9),d("ngIf",e.displayedPreviewData.length>0)("ngIfElse",o)}}function ia(a,l){if(a&1&&u(0,ta,41,11,"div",50),a&2){let o=c();d("ngIf",o.currentState=="preview")}}function na(a,l){a&1&&(C(0,"i",84),n(1,"span"),m(2,"Finish"),r())}function aa(a,l){if(a&1&&(n(0,"tr",86)(1,"td"),m(2),r(),n(3,"td"),m(4),r(),n(5,"td"),m(6),r(),n(7,"td"),m(8),r()()),a&2){let o=l.$implicit,e=l.index;d("ngClass",Be(5,Ln,o.Exception)),p(2),S(e+1),p(2),S(o.Number),p(2),S(o.Status),p(2),S(o.Exception)}}function ra(a,l){if(a&1&&(D(0),u(1,aa,9,7,"tr",85),E()),a&2){let o=c(3);p(),d("ngForOf",o.downloadData)}}function oa(a,l){a&1&&(n(0,"tr",79)(1,"td",80)(2,"div",81),C(3,"i",82),r(),n(4,"h4",83),m(5," There is no order to processed "),r()()())}function la(a,l){if(a&1&&(n(0,"div",51)(1,"div",52)(2,"table",64)(3,"thead",65)(4,"tr"),C(5,"th",66),n(6,"th"),m(7,"Order Number"),r(),n(8,"th"),m(9,"Status"),r(),n(10,"th"),m(11,"Exception"),r()()(),n(12,"tbody"),u(13,ra,2,1,"ng-container",70)(14,oa,6,0,"ng-template",null,3,U),r()()()()),a&2){let o=O(15),e=c(2);p(13),d("ngIf",(e.downloadData==null?null:e.downloadData.length)>0)("ngIfElse",o)}}function pa(a,l){if(a&1&&u(0,la,16,2,"div",50),a&2){let o=c();d("ngIf",o.currentState=="finish")}}function ma(a,l){a&1&&(n(0,"h6"),m(1,"1"),r())}function sa(a,l){a&1&&(n(0,"h6"),m(1,"2"),r())}function da(a,l){a&1&&(n(0,"h6"),m(1,"3"),r())}var te=function(a){return a.ALL="all",a.SYNC="sync",a.WRONG="wrong",a.UNSYNC="unsync",a}(te||{}),di=(()=>{let l=class l{constructor(e,t,i,h,f,s,q){this.http=e,this.toastr=t,this.datePipe=i,this.url=h,this.productService=f,this.orderService=s,this.authService=q,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=N,this.previewStatus=te,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=Me,this.showTimePicker=!1,this.downloadType=mt(!1),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initTimeFilter(),this.url.queryParams.subscribe(e=>{this.channelID=e.ChannelID,this.startDate=new Date(e.Date),this.endDate=new Date(e.Date)})}initTimeFilter(){this.timeFrom="00:00",this.timeTo="23:59"}onDownload(e){let t={ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData,IsDisbursement:this.downloadType()};this.http.post("/api/Orders/Download",t).subscribe(i=>{this.downloadData=i.Body,this.onStepperNext(e)})}onPreview(e){if(!this.validateDatePreview())return;let t={ID:this.channelID,From:this.startDate,To:this.endDate,IsDisbursement:this.downloadType()};this.showTimePicker&&(t=nt(it({},t),{TimeFrom:this.timeFrom+":00",TimeTo:this.timeTo+":00"})),this.http.post("/api/Orders/Preview",t).subscribe(i=>{if(i.length==0){this.toastrEmptyPreview();return}this.previewData=i,this.groupingPreviewData(),this.filterPreviewData(te.ALL),this.initLengthStatusData(),this.onStepperNext(e)})}toastrEmptyPreview(){let e=this.datePipe.transform(this.startDate,"dd MMM yyyy"),t=this.datePipe.transform(this.endDate,"dd MMM yyyy"),i=this.showTimePicker?this.timeFrom+":00":"",h=this.showTimePicker?this.timeTo+":00":"";this.toastr.info(`There is no orders from ${e} ${i} to ${t} ${h}!`,"No Orders!")}validateDatePreview(){let e=!0;return this.downloadType()==!0?M.getDaysDiff(this.startDate,this.endDate)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Failed"),e=!1):M.getDaysDiff(this.startDate,this.endDate)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),e=!1),e}onSelectChannel(){this.currentChannel=this.channelOptions.find(e=>e.ID==this.channelID),this.initGetChannelDetail()}initGetChannelDetail(){this.currentChannel.TypeID==N.Tokopedia?this.channelDetail$=this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.currentChannel.ID}).pipe(j(e=>e?.Model),ye(1)):this.channelDetail$=null}setPageTitle(e){this.pageTitle=`
7
7
  ${e} (${this.getDateTitle()})
8
- `}getDateTitle(){let e=M.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),t=this.datePipe.transform(this.startDate,e),i=this.datePipe.transform(this.endDate,"dd MMM yyyy");return`${e==null?"":t+"-"} ${i}`}onNew(e){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",this.channelDetail$=null,e.reset()}groupingPreviewData(){let e=this.filterDataByStatus(te.UNSYNC),t=this.filterDataByStatus(te.WRONG),i=[];this.currentChannel.TypeID==N.Tokopedia&&(i=this.filterDataByStatus(te.SYNC)),this.downloadedPreviewData=[...i,...e,...t]}filterDataByStatus(e){let t=[];switch(e){case te.ALL:t=this.previewData;break;case te.SYNC:t=this.previewData.filter(i=>i.Action==Me.DoNothing);break;case te.WRONG:t=this.previewData.filter(i=>i.Action==Me.Update);break;case te.UNSYNC:t=this.previewData.filter(i=>i.Action==Me.New);break}return t}filterPreviewData(e){this.pillStatus=e,this.displayedPreviewData=this.filterDataByStatus(e)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(te.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(te.SYNC).length,this.unsyncData=this.filterDataByStatus(te.UNSYNC).length}getTypeID(){var e=this.channelOptions.find(t=>t.ID==this.channelID)?.TypeID;return e??0}onStepperChange(e){this.currentState=e.selectedStep.state}onStepperNext(e){e.selected.completed=!0,e.next()}onNext(e){switch(this.currentState){case"filter":this.onPreview(e);break;case"preview":this.onDownload(e);break}}stepChange(e){switch(e?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let t=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${t?.Name}`);break;case"finish":this.setPageTitle("Download");break}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let e=!M.isValidDate(this.startDate)||!M.isValidDate(this.endDate),t=M.IsEmpty(this.channelID);return e||t}exportOrders(){let e={ID:this.channelID,From:this.startDate,To:this.endDate},t=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(e,t).subscribe()}onFilterDateChange(){let e=1;this.startDate&&this.endDate&&(e=M.getDaysDiff(this.startDate,this.endDate)),this.showTimePicker=e==0}};l.\u0275fac=function(t){return new(t||l)(v(A),v(Te),v(F),v(Ge),v(Ot),v(Ee),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-download"]],features:[dt([{provide:Bt,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:12,consts:[["stepper",""],["picker",""],["EMPTY",""],["EMPTY_DOWNLOAD",""],[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectionChange","ngClass"],["state","filter",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","preview",3,"editable","completed"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[1,"mt-8"],[3,"timeChange","time"],[1,"mx-4"],[1,"fa-solid","fa-file","me-3"],["class","row pt-2",4,"ngIf"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(t,i){if(t&1){let h=I();n(0,"mainpanel",4)(1,"actions"),u(2,Vn,6,1,"ng-container",5)(3,Fn,3,1,"ng-container",5)(4,An,4,0,"ng-container",5),r(),n(5,"content")(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9)(10,"mat-stepper",10,0),y("selectionChange",function(s){return g(h),_(i.stepChange(s))})("selectionChange",function(s){return g(h),_(i.onStepperChange(s))}),n(12,"mat-step",11),u(13,Rn,3,0,"ng-template",12)(14,Hn,27,11,"ng-template",13),r(),n(15,"mat-step",14),u(16,Un,3,0,"ng-template",12)(17,ia,1,1,"ng-template",13),r(),n(18,"mat-step",15),u(19,na,3,0,"ng-template",12)(20,pa,1,1,"ng-template",13),r(),u(21,ma,2,0,"ng-template",16)(22,sa,2,0,"ng-template",17)(23,da,2,0,"ng-template",18),r()()()()()()()}if(t&2){let h=O(11);d("headerTitle",i.pageTitle)("description",i.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),d("ngIf",i.currentState=="preview"),p(),d("ngIf",i.currentState=="filter"),p(),d("ngIf",i.currentState=="finish"),p(6),mt("ngClass","last-edited-step-"+h.selectedIndex),p(2),d("editable",i.currentState!="finish")("completed",!1),p(3),d("editable",i.currentState!="finish")("completed",!1)}},dependencies:[ze,W,B,$,z,G,Y,X,gt,Vt,kt,Lt,Ft,Ht,zt,Ut,Gt,jt,ft,$e,Pt,It,ve,F],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
9
- `],encapsulation:2});let a=l;return a})();var ca=[{path:"",component:Qt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:ni,canActivate:[ge],data:{title:"New Order"}},{path:"detail",component:ai,canActivate:[ge],data:{title:"Orders detail"}},{path:"ready_to_ship",component:oi,canActivate:[ge],data:{title:"Ready To Ship"}},{path:"Shipped",component:li,canActivate:[ge],data:{title:"Shipped"}},{path:"Delivered",component:pi,canActivate:[ge],data:{title:"Delivered"}},{path:"All",component:mi,canActivate:[ge],data:{title:"All Order"}},{path:"Cancelled",component:si,canActivate:[ge],data:{title:"Cancelled"}},{path:"Download",component:di,canActivate:[ge],data:{title:"Download"}}]}],ci=(()=>{let l=class l{};l.\u0275fac=function(t){return new(t||l)},l.\u0275mod=Re({type:l}),l.\u0275inj=Ae({imports:[Se,je.forChild(ca)]});let a=l;return a})();var No=(()=>{let l=class l{};l.\u0275fac=function(t){return new(t||l)},l.\u0275mod=Re({type:l}),l.\u0275inj=Ae({providers:[Ee,Ye,Je],imports:[Se,Ue,ci,Et,bt,Wt,je,_t,At,ut,Q,Yt,St,Tt,Kt,xt,Mt,vt,ee,Ke,$e,Nt]});let a=l;return a})();export{No as OrdersModule};
8
+ `}getDateTitle(){let e=M.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),t=this.datePipe.transform(this.startDate,e),i=this.datePipe.transform(this.endDate,"dd MMM yyyy");return`${e==null?"":t+"-"} ${i}`}onNew(e){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",this.channelDetail$=null,e.reset()}groupingPreviewData(){let e=this.filterDataByStatus(te.UNSYNC),t=this.filterDataByStatus(te.WRONG),i=[];this.currentChannel.TypeID==N.Tokopedia&&(i=this.filterDataByStatus(te.SYNC)),this.downloadedPreviewData=[...i,...e,...t]}filterDataByStatus(e){let t=[];switch(e){case te.ALL:t=this.previewData;break;case te.SYNC:t=this.previewData.filter(i=>i.Action==Me.DoNothing);break;case te.WRONG:t=this.previewData.filter(i=>i.Action==Me.Update);break;case te.UNSYNC:t=this.previewData.filter(i=>i.Action==Me.New);break}return t}filterPreviewData(e){this.pillStatus=e,this.displayedPreviewData=this.filterDataByStatus(e)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(te.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(te.SYNC).length,this.unsyncData=this.filterDataByStatus(te.UNSYNC).length}getTypeID(){var e=this.channelOptions.find(t=>t.ID==this.channelID)?.TypeID;return e??0}onStepperChange(e){this.currentState=e.selectedStep.state}onStepperNext(e){e.selected.completed=!0,e.next()}onNext(e){switch(this.currentState){case"filter":this.onPreview(e);break;case"preview":this.onDownload(e);break}}stepChange(e){switch(e?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let t=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${t?.Name}`);break;case"finish":this.setPageTitle("Download");break}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let e=!M.isValidDate(this.startDate)||!M.isValidDate(this.endDate),t=M.IsEmpty(this.channelID);return e||t}exportOrders(){let e={ID:this.channelID,From:this.startDate,To:this.endDate},t=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(e,t).subscribe()}onFilterDateChange(){let e=1;this.startDate&&this.endDate&&(e=M.getDaysDiff(this.startDate,this.endDate)),this.showTimePicker=e==0}};l.\u0275fac=function(t){return new(t||l)(v(A),v(Te),v(F),v(Ge),v(Ot),v(Ee),v(Z))},l.\u0275cmp=L({type:l,selectors:[["app-download"]],features:[ct([{provide:Bt,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:12,consts:[["stepper",""],["picker",""],["EMPTY",""],["EMPTY_DOWNLOAD",""],[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectionChange","ngClass"],["state","filter",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","preview",3,"editable","completed"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[1,"mt-8"],[3,"timeChange","time"],[1,"mx-4"],[1,"fa-solid","fa-file","me-3"],["class","row pt-2",4,"ngIf"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(t,i){if(t&1){let h=I();n(0,"mainpanel",4)(1,"actions"),u(2,Vn,6,1,"ng-container",5)(3,Fn,3,1,"ng-container",5)(4,An,4,0,"ng-container",5),r(),n(5,"content")(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9)(10,"mat-stepper",10,0),y("selectionChange",function(s){return g(h),_(i.stepChange(s))})("selectionChange",function(s){return g(h),_(i.onStepperChange(s))}),n(12,"mat-step",11),u(13,Rn,3,0,"ng-template",12)(14,Hn,27,11,"ng-template",13),r(),n(15,"mat-step",14),u(16,Un,3,0,"ng-template",12)(17,ia,1,1,"ng-template",13),r(),n(18,"mat-step",15),u(19,na,3,0,"ng-template",12)(20,pa,1,1,"ng-template",13),r(),u(21,ma,2,0,"ng-template",16)(22,sa,2,0,"ng-template",17)(23,da,2,0,"ng-template",18),r()()()()()()()}if(t&2){let h=O(11);d("headerTitle",i.pageTitle)("description",i.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),d("ngIf",i.currentState=="preview"),p(),d("ngIf",i.currentState=="filter"),p(),d("ngIf",i.currentState=="finish"),p(6),st("ngClass","last-edited-step-"+h.selectedIndex),p(2),d("editable",i.currentState!="finish")("completed",!1),p(3),d("editable",i.currentState!="finish")("completed",!1)}},dependencies:[ze,W,B,$,z,G,Y,X,gt,Vt,kt,Lt,Ft,Ht,zt,Ut,Gt,jt,ft,$e,Pt,It,ve,F],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
9
+ `],encapsulation:2});let a=l;return a})();var ca=[{path:"",component:Qt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:ni,canActivate:[de],data:{title:"New Order"}},{path:"detail",component:ai,canActivate:[de],data:{title:"Orders detail"}},{path:"ready_to_ship",component:oi,canActivate:[de],data:{title:"Ready To Ship"}},{path:"Shipped",component:li,canActivate:[de],data:{title:"Shipped"}},{path:"Delivered",component:pi,canActivate:[de],data:{title:"Delivered"}},{path:"All",component:mi,canActivate:[de],data:{title:"All Order"}},{path:"Cancelled",component:si,canActivate:[de],data:{title:"Cancelled"}},{path:"Download",component:di,canActivate:[de],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-6IOO2XET.js").then(a=>a.DownloadOrderLogComponent),canActivate:[de],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-AUBPDK26.js").then(a=>a.DownloadOrderDetailComponent),canActivate:[de],data:{title:"Download Order Log Detail"}}]}],ci=(()=>{let l=class l{};l.\u0275fac=function(t){return new(t||l)},l.\u0275mod=Re({type:l}),l.\u0275inj=Ae({imports:[Se,je.forChild(ca)]});let a=l;return a})();var No=(()=>{let l=class l{};l.\u0275fac=function(t){return new(t||l)},l.\u0275mod=Re({type:l}),l.\u0275inj=Ae({providers:[Ee,Ye,Je],imports:[Se,Ue,ci,Et,bt,Wt,je,_t,At,ut,Q,Yt,St,Tt,Kt,xt,Mt,vt,ee,Ke,$e,Nt]});let a=l;return a})();export{No as OrdersModule};