marketplacepos 5.40.0 → 5.41.0

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 (45) hide show
  1. package/Marketplace/{chunk-EZQDEFRB.js → chunk-2Q5YW6MY.js} +1 -1
  2. package/Marketplace/{chunk-C4LREOY5.js → chunk-2SUNUZ5Y.js} +1 -1
  3. package/Marketplace/{chunk-I22NQWSR.js → chunk-3BGJ2T6Y.js} +1 -1
  4. package/Marketplace/chunk-3HTZTPHD.js +1 -0
  5. package/Marketplace/{chunk-I5F2Q6RZ.js → chunk-3ZWNYMH7.js} +1 -1
  6. package/Marketplace/{chunk-XJ4SQMJS.js → chunk-56YK4SLT.js} +1 -1
  7. package/Marketplace/{chunk-OP6TQOYE.js → chunk-5FBFUPHZ.js} +1 -1
  8. package/Marketplace/{chunk-53KRESUI.js → chunk-6EV6VQBQ.js} +1 -1
  9. package/Marketplace/chunk-6NNAICJE.js +13 -0
  10. package/Marketplace/{chunk-M3L5WUPF.js → chunk-AQMHZFKJ.js} +1 -1
  11. package/Marketplace/{chunk-AREVF7FY.js → chunk-BGEYIOMP.js} +1 -1
  12. package/Marketplace/{chunk-I24AREHY.js → chunk-EDG73HHT.js} +2 -2
  13. package/Marketplace/{chunk-KC6J3HFN.js → chunk-EIGDGRRL.js} +1 -1
  14. package/Marketplace/{chunk-PNH7QN3V.js → chunk-G5MO6R5Z.js} +1 -1
  15. package/Marketplace/{chunk-P4HXQHNP.js → chunk-I6JDDQC2.js} +3 -3
  16. package/Marketplace/{chunk-MCBB72MO.js → chunk-IRKRLYXS.js} +1 -1
  17. package/Marketplace/{chunk-S6HFGRAS.js → chunk-K64THYES.js} +1 -1
  18. package/Marketplace/{chunk-O5GEOC52.js → chunk-KP4WSF75.js} +1 -1
  19. package/Marketplace/{chunk-BI277ECG.js → chunk-KQ546ATX.js} +1 -1
  20. package/Marketplace/{chunk-N7L7VSTY.js → chunk-KQAQTVXQ.js} +1 -1
  21. package/Marketplace/{chunk-JRVGD3CY.js → chunk-L4NLJBLA.js} +1 -1
  22. package/Marketplace/{chunk-6E7NG6MV.js → chunk-MNQZPU5N.js} +1 -1
  23. package/Marketplace/{chunk-MULSBKZG.js → chunk-NEIZYQV3.js} +1 -1
  24. package/Marketplace/{chunk-P27I2G35.js → chunk-NR7IH2JG.js} +1 -1
  25. package/Marketplace/{chunk-F63VQUM3.js → chunk-QNT7YFQS.js} +1 -1
  26. package/Marketplace/{chunk-FTHLIE6P.js → chunk-RLLHX27L.js} +1 -1
  27. package/Marketplace/{chunk-Z4Y34TNT.js → chunk-RNM3GVNZ.js} +1 -1
  28. package/Marketplace/chunk-SE2DPPGP.js +1 -0
  29. package/Marketplace/{chunk-6XL5WHNS.js → chunk-SMZ7F54P.js} +1 -1
  30. package/Marketplace/{chunk-Q7F2LXH2.js → chunk-SXW52HYQ.js} +1 -1
  31. package/Marketplace/{chunk-XXTUAZMH.js → chunk-TAO67VCP.js} +1 -1
  32. package/Marketplace/{chunk-JSJNHX3J.js → chunk-TQ2P22BQ.js} +1 -1
  33. package/Marketplace/{chunk-QSQ6OKT5.js → chunk-TRHB4HA4.js} +1 -1
  34. package/Marketplace/{chunk-4SNTIKSF.js → chunk-V6IVDZR7.js} +2 -2
  35. package/Marketplace/{chunk-LO4HE27Y.js → chunk-XITXJ764.js} +1 -1
  36. package/Marketplace/chunk-XYIY2TDE.js +1 -0
  37. package/Marketplace/{chunk-ABVZALC5.js → chunk-Y3U6BFV5.js} +1 -1
  38. package/Marketplace/index.html +2 -2
  39. package/Marketplace/{main-RRZE23KA.js → main-DNC2TBQ6.js} +1 -1
  40. package/Marketplace/{styles-VTPGUJ5G.css → styles-NJFTKO3E.css} +1 -1
  41. package/package.json +1 -1
  42. package/Marketplace/chunk-2P74ZFTI.js +0 -2
  43. package/Marketplace/chunk-4VXEJ6FD.js +0 -1
  44. package/Marketplace/chunk-CLKCSTGQ.js +0 -13
  45. package/Marketplace/chunk-KJHD3O3C.js +0 -2
@@ -1,4 +1,4 @@
1
- import{a as Ae,b as Ct}from"./chunk-5GX2GLRY.js";import{a as H}from"./chunk-KVP6OL4J.js";import"./chunk-77IUCPIQ.js";import"./chunk-JBKHY4HH.js";import{a as ne,b as ae,c as ot}from"./chunk-RGR34QZ3.js";import"./chunk-MS4AQ6UA.js";import{a as oe}from"./chunk-ZD5LURJS.js";import{b as ht}from"./chunk-IEYFOHME.js";import"./chunk-YXFTLQ5M.js";import{g as _t}from"./chunk-IYYVZ6B6.js";import"./chunk-RVYGL22E.js";import{a as pt,b as mt}from"./chunk-OE2JYQHN.js";import"./chunk-7GQIIDFF.js";import"./chunk-6XFYITUD.js";import{a as ft,b as St}from"./chunk-OLSC6KHB.js";import{a as re,b as lt}from"./chunk-COBHWPGI.js";import{a as st}from"./chunk-VETHPEVU.js";import{m as gt}from"./chunk-75BDXSG3.js";import"./chunk-D54NUPYF.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import{a as j}from"./chunk-UBMI3NQH.js";import{b as ut}from"./chunk-7FUVW73P.js";import{b as ct}from"./chunk-M3SJUKTG.js";import{c as dt}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a as le}from"./chunk-KC6J3HFN.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{a as ee,b as te,d as ie,e as $e}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{a as He,h as me,l as $}from"./chunk-C4LREOY5.js";import{b as Ve,e as R}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{b as tt,d as ue,e as it,f as nt,g as at,l as G,m as rt}from"./chunk-BIQHA7UA.js";import{s as et}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ke,c as Q,h as B,m as z,o as Z,y as Ze}from"./chunk-DPLEMBB4.js";import{b as w,c as N}from"./chunk-PXB4YEY3.js";import{E as Xe,F as Qe,H as X,J as Le,f as A,g as F,j as Oe,k as V,m as W,n as he}from"./chunk-GPEVUTDI.js";import{$c as k,Aa as Ge,B as qe,Ba as je,Dc as U,Eb as L,Ec as l,Fb as Me,Fc as u,G as Ye,Gc as I,Ic as C,Jc as b,Kb as f,Kc as y,Pc as K,Rc as pe,Wb as d,Z as be,Zc as T,_c as M,aa as Je,ad as q,ea as Ie,gc as i,hc as n,ic as S,ja as Ne,jc as P,ka as De,kc as E,mc as D,oa as se,ob as O,qb as o,rc as v,sc as s,v as J,wb as x,xa as Ke,ya as g,za as h}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var bt=(()=>{class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[He.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[He.downloadOrder]}]}ngOnInit(){}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-orders"]],standalone:!1,decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),n()()(),S(4,"router-outlet")),a&2&&(o(3),d("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[pt,Qe],encapsulation:2})}}return r})();var Fe=(()=>{class r{constructor(e,a){this.http=e,this.toastr=a}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ie(a=>{this.tokopediaAcceptOrderHandler(a)}))}tokopediaAcceptOrderHandler(e){let a=e.filter(m=>m.Status==!1),t=e.filter(m=>m.Status==!0);if(a.length==0&&t.length>0){let m=`<ol>${this.generateSuccessMessage(t)}</ol>`;this.toastr.success(m,"Success",{enableHtml:!0})}else if(a.length>0&&t.length>0){let m=`<ol>
1
+ import{a as Ae,b as Ct}from"./chunk-5GX2GLRY.js";import{a as H}from"./chunk-KVP6OL4J.js";import"./chunk-77IUCPIQ.js";import"./chunk-JBKHY4HH.js";import{a as ne,b as ae,c as ot}from"./chunk-RGR34QZ3.js";import"./chunk-MS4AQ6UA.js";import{a as oe}from"./chunk-ZD5LURJS.js";import{b as ht}from"./chunk-IEYFOHME.js";import"./chunk-YXFTLQ5M.js";import{g as _t}from"./chunk-IYYVZ6B6.js";import"./chunk-RVYGL22E.js";import{a as pt,b as mt}from"./chunk-OE2JYQHN.js";import"./chunk-7GQIIDFF.js";import"./chunk-6XFYITUD.js";import{a as ft,b as St}from"./chunk-OLSC6KHB.js";import{a as re,b as lt}from"./chunk-COBHWPGI.js";import{a as st}from"./chunk-VETHPEVU.js";import{m as gt}from"./chunk-75BDXSG3.js";import"./chunk-D54NUPYF.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import{a as j}from"./chunk-UBMI3NQH.js";import{b as ut}from"./chunk-7FUVW73P.js";import{b as ct}from"./chunk-M3SJUKTG.js";import{c as dt}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a as le}from"./chunk-EIGDGRRL.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{a as ee,b as te,d as ie,e as $e}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{a as He,h as me,l as $}from"./chunk-2SUNUZ5Y.js";import{b as Ve,e as R}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{b as tt,d as ue,e as it,f as nt,g as at,l as G,m as rt}from"./chunk-BIQHA7UA.js";import{s as et}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ke,c as Q,h as B,m as z,o as Z,y as Ze}from"./chunk-DPLEMBB4.js";import{b as w,c as N}from"./chunk-PXB4YEY3.js";import{E as Xe,F as Qe,H as X,J as Le,f as A,g as F,j as Oe,k as V,m as W,n as he}from"./chunk-GPEVUTDI.js";import{$c as k,Aa as Ge,B as qe,Ba as je,Dc as U,Eb as L,Ec as l,Fb as Me,Fc as u,G as Ye,Gc as I,Ic as C,Jc as b,Kb as f,Kc as y,Pc as K,Rc as pe,Wb as d,Z as be,Zc as T,_c as M,aa as Je,ad as q,ea as Ie,gc as i,hc as n,ic as S,ja as Ne,jc as P,ka as De,kc as E,mc as D,oa as se,ob as O,qb as o,rc as v,sc as s,v as J,wb as x,xa as Ke,ya as g,za as h}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var bt=(()=>{class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[He.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[He.downloadOrder]}]}ngOnInit(){}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-orders"]],standalone:!1,decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),n()()(),S(4,"router-outlet")),a&2&&(o(3),d("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[pt,Qe],encapsulation:2})}}return r})();var Fe=(()=>{class r{constructor(e,a){this.http=e,this.toastr=a}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ie(a=>{this.tokopediaAcceptOrderHandler(a)}))}tokopediaAcceptOrderHandler(e){let a=e.filter(m=>m.Status==!1),t=e.filter(m=>m.Status==!0);if(a.length==0&&t.length>0){let m=`<ol>${this.generateSuccessMessage(t)}</ol>`;this.toastr.success(m,"Success",{enableHtml:!0})}else if(a.length>0&&t.length>0){let m=`<ol>
2
2
  ${this.generateSuccessMessage(t)}
3
3
  ${this.generateErrorMessage(a)}
4
- </ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac})}}return r})();function Ot(r,c){if(r&1){let e=D();P(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return h(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),E()}}function Lt(r,c){if(r&1&&(P(0),f(1,Ot,4,0,"ng-container",3),E()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function kt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O),o(),I(" ",e.Name," ")}}function Vt(r,c){if(r&1){let e=D();P(0),i(1,"th",35)(2,"input",36),y("ngModelChange",function(t){g(e);let m=s(3);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return h(m.onSelectAllOrderData(t))}),n()(),E()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function At(r,c){if(r&1){let e=D();P(0),i(1,"input",36),y("ngModelChange",function(t){g(e);let m=s(2).$implicit;return b(m.selected,t)||(m.selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return h(m.onSelectOrderData(t))}),n(),E()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Ft(r,c){if(r&1&&(P(0),i(1,"td"),f(2,At,2,1,"ng-container",3),n(),E()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Rt(r,c){if(r&1&&(P(0),i(1,"span"),l(2),n(),E()),r&2){let e=s().$implicit;o(2),u(e.Number)}}function Wt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,O),o(),u(e.Number)}}function Bt(r,c){if(r&1&&(i(0,"tr"),f(1,Ft,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),f(5,Rt,3,1,"ng-container",24)(6,Wt,2,2,"ng-template",null,1,q),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=U(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),u(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),u(e.Customer),o(2),u(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function zt(r,c){if(r&1){let e=D();P(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),f(5,Vt,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),f(17,Bt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),T(19,"async"),T(20,"async"),v("total",function(){g(e);let t=s(2);return h(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return h(t.onNextPage())})("previous",function(){g(e);let t=s(2);return h(t.onPreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",M(20,7,t.paginationTotal$))}}function Gt(r,c){if(r&1&&(P(0),f(1,zt,21,9,"ng-container",24),E()),r&2){let e=c.ngIf;s();let a=U(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function jt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=N.GuidEMpty,this.tokopediaType=w.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(be()),this.newOrdersData$=this.sourceObs$.pipe(Ie(a=>{a.filter(m=>m.Type==w.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(be())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==w.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(J(t=>(t=t.sort((m,_)=>N.compare(m.Created,_.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(x(me),x(Ae),x(Fe),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),h(t.getNewOrders())}),i(1,"actions"),f(2,Lt,2,1,"ng-container",3),T(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(13,kt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(27,"div")(28,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),f(33,Gt,2,2,"ng-container",3),T(34,"async"),f(35,jt,2,0,"ng-template",null,0,q),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",M(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(34,13,t.newOrdersData$)))},dependencies:[A,F,Q,Z,ke,B,z,G,ie,ee,te,j,re,oe,ne,ae,H,Oe,V],encapsulation:2})}}return r})();var Ht=()=>["/menu/Order"];function Ut(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),T(5,"number"),n(),i(6,"td"),l(7),T(8,"number"),n()()),r&2){let e=c.$implicit;o(2),u(e.Code),o(2),u(M(5,3,e.Quantity)),o(3),u(M(8,5,e.Price))}}function qt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),T(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),T(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),f(66,Ut,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),I(" ",e.model.Outlet," "),o(5),I(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),I(" ",e.model.Delivery," "),o(5),I(" ",e.model.TaxType," "),o(5),I(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),I(" ",e.model.Customer.Name," "),o(5),I(" ",e.model.Customer.Email," "),o(5),I(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var vt=(()=>{class r{constructor(e,a){this.http=e,this.url=a,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(Xe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),f(6,qt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",K(5,Ht)),o(4),d("ngIf",t.model))},dependencies:[A,F,G,X,W,V],encapsulation:2})}}return r})();var xt=(()=>{class r{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(a){return new(a||r)(x(tt))}}static{this.\u0275cmp=L({type:r,selectors:[["app-print-tokopedia"]],standalone:!1,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(a,t){a&1&&(i(0,"div",0)(1,"h2",1),l(2,"Cetak label pesanan"),n(),i(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),l(7,"Kamu akan mencetak label yang berisi detail pesanan"),n(),i(8,"div",5)(9,"mat-checkbox",6),y("ngModelChange",function(_){return b(t.tandaiSudahDicetak,_)||(t.tandaiSudahDicetak=_),_}),n(),i(10,"span",7),l(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),n()()()()(),i(12,"mat-dialog-actions",8)(13,"button",9),v("click",function(){return t.onCancel()}),l(14,"Cancel"),n(),i(15,"button",10),v("click",function(){return t.onPrint()}),l(16,"Cetak Pesanan"),n()()()),a&2&&(o(9),C("ngModel",t.tandaiSudahDicetak))},dependencies:[B,z,ft,nt,it],encapsulation:2})}}return r})();var We=(()=>{class r{constructor(e,a,t){this.http=e,this.toastr=a,this.dialog=t}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tokopedia,t)),a)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tiktok,t)),a)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Shopee,t)),a)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Lazada,t)),a)))}printShippingLabelTokopedia(e){let a={OrderNumber:e,Printed:!0};this.dialog.open(xt).afterClosed().pipe(Ye(t=>t!==void 0),Je(t=>(a.Printed=t,this.http.post("api/v1/Shippinglabel/Tokopedia",a)))).subscribe(t=>{let m=window.open("about:blank","_blank");m.document.write(t.File),m.document.close()})}printShippingLabelTiktok(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",t).subscribe(m=>{m.data!=null?window.open(m.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",t).subscribe(m=>{var _=Uint8Array.from(atob(m.File),ze=>ze.charCodeAt(0)),p=new Blob([_],{type:"octet/stream"});N.openDownloadFile(p,`${e}.pdf`)})}printShippingLabelLazada(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",t).subscribe(m=>{m.result.data!=null?window.open(m.result.data.pdf_url,"_blank"):this.toastr.error(m.message,"Cannot Print")})}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve),se(ue))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var de=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(de||{});var Ce=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(Ce||{});function Jt(r,c){if(r&1&&(P(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),E()),r&2){let e=s();o(4),I(" ",e.recipient==null?null:e.recipient.City," "),o(3),I(" ",e.recipient==null?null:e.recipient.District," ")}}function Kt(r,c){if(r&1&&(P(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),I("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Xt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),T(6,"date"),n()(),E()),r&2){let e=s();o(5),u(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Qt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),u(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function Zt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),T(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),u(a+1),o(2),u(e.Product_Name),o(2),u(e.SKU),o(2),u(M(9,4,e.Quantity))}}var Be=(()=>{class r{constructor(){this.minDate=N.MinDate,this.channelType=w}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case w.Tokopedia:this.marketplaceLogo=Ce.TOKOPEDIA;break;case w.Shopee:this.marketplaceLogo=Ce.SHOPEE;break;case w.Lazada:this.marketplaceLogo=Ce.LAZADA;break;case w.Tiktok:this.marketplaceLogo=Ce.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=de.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=de.GRAB:e.includes("jne")?this.shippingLogo=de.JNE:e.includes("gosend")?this.shippingLogo=de.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=de.JNT:e.includes("sicepat")?this.shippingLogo=de.SICEPAT:e.includes("spx")?this.shippingLogo=de.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=de.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(N.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})}N.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ke],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Ge(),S(23,"svg",11),n()(),je(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),f(50,Jt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),f(61,Kt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),T(67,"number"),n()()(),f(68,Xt,7,4,"ng-container",20)(69,Qt,6,1,"ng-container",20),n(),i(70,"div",28),Ge(),S(71,"svg",29),n()()(),je(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),f(86,Zt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,O),o(3),u(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,O),o(7),I(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),u(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),u(t.recipient==null?null:t.recipient.Name),o(5),I(" ",t.recipient==null?null:t.recipient.Address," "),o(7),u(t.store==null?null:t.store.Name),o(2),u(t.store==null?null:t.store.Phone),o(2),I(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),I("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?M(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[he,A,F,W,V],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]})}}return r})();var ei=()=>["/menu/Order/detail"],ti=(r,c)=>({Number:r,Outlet:c});function ii(r,c){if(r&1){let e=D();P(0),i(1,"button",21),v("click",function(){g(e);let t=s();return h(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),E()}}function ni(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function ai(r,c){if(r&1){let e=D();P(0),i(1,"input",31),y("ngModelChange",function(t){g(e);let m=s().$implicit;return b(m.Selected,t)||(m.Selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return h(m.onSelectReadyToShip(t))}),n(),E()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ri(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,ei))("queryParams",pe(4,ti,e.Number,e.Outlet)),o(),u(e.Number)}}function oi(r,c){if(r&1&&(i(0,"a",45),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function li(r,c){if(r&1){let e=D();i(0,"a",46),v("click",function(){g(e);let t=s().$implicit,m=s(3);return h(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",47),n()}}function pi(r,c){if(r&1&&(i(0,"tr")(1,"td"),f(2,ai,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),f(6,ri,2,7,"a",39)(7,oi,2,2,"a",40),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"number"),n(),i(13,"td"),l(14),T(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",41),n(),i(18,"td",42),f(19,li,2,0,"a",43),n()()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),u(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),u(e.Customer),o(2),u(M(12,9,e.Amount)),o(3),u(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function mi(r,c){if(r&1){let e=D();P(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),y("ngModelChange",function(t){g(e);let m=s(2);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return h(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),S(19,"th",37),n()(),i(20,"tbody"),f(21,pi,20,14,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),T(23,"async"),T(24,"async"),v("total",function(){g(e);let t=s(2);return h(t.getRowCount())})("next",function(){g(e);let t=s(2);return h(t.NextPage())})("previous",function(){g(e);let t=s(2);return h(t.PreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(15),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(23,5,t.readyToShip$))==null?null:e.length)("paginationTotal",M(24,7,t.paginationTotal$))}}function di(r,c){if(r&1&&(P(0),f(1,mi,25,9,"ng-container",25),E()),r&2){let e=c.ngIf;s();let a=U(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function si(r,c){r&1&&(i(0,"div",48),S(1,"app-empty-state"),n())}function ci(r,c){r&1&&(P(0),i(1,"div",50),l(2,"\xA0"),n(),E())}function gi(r,c){if(r&1&&(P(0),S(1,"app-shipping-label",49),f(2,ci,3,0,"ng-container",4),E()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Tt=(()=>{class r{constructor(e,a,t,m,_,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=_,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=w,this.guidEmpty=N.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 a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",a).pipe(J(t=>t.Data),be(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),qe(m).pipe(J(_=>_.reduce((p,ze)=>p.concat(ze),[]))).subscribe({next:_=>{this.shippingLabels=_,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case w.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case w.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case w.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case w.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(J(a=>a?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(J(t=>t.sort((m,_)=>N.compare(m.Date,_.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==w.Tokopedia||a.TypeID==w.Shopee||a.TypeID==w.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x(ue),x(We),x(V),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[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(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),f(6,ii,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(12,ni,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(26,"div")(27,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),f(32,di,2,2,"ng-container",4),T(33,"async"),f(34,si,2,0,"ng-template",null,0,q),n()()()()(),i(36,"div",19),f(37,gi,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Q,Z,ke,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,Be,Oe,W,V],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})}}return r})();var hi=()=>["/menu/Order/detail"],ui=(r,c)=>({Number:r,Outlet:c});function _i(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function fi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,hi))("queryParams",pe(4,ui,e.Number,e.Outlet)),o(),u(e.Number)}}function Si(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Ci(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,fi,2,7,"a",32)(5,Si,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function bi(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ci,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function yi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var wt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,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==N.GuidEMpty}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,_i,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,bi,20,4,"ng-container",18)(32,yi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var vi=()=>["/menu/Order/detail"],xi=(r,c)=>({Number:r,Outlet:c});function Ti(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function wi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,vi))("queryParams",pe(4,xi,e.Number,e.Outlet)),o(),u(e.Number)}}function Pi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,O),o(),u(e.Number)}}function Ei(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,wi,2,7,"a",32)(5,Pi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Ii(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ei,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ni(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var Pt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Ti,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,Ii,20,4,"ng-container",18)(32,Ni,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Di=()=>["/menu/Order/detail"],Mi=(r,c)=>({Number:r,Outlet:c});function Oi(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function Li(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Di))("queryParams",pe(4,Mi,e.Number,e.Outlet)),o(),u(e.Number)}}function ki(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Vi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,Li,2,7,"a",35)(5,ki,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,8,e.Amount)),o(3),u(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),u(e.State),o(2),d("typeId",e.TypeID)}}function Ai(r,c){if(r&1){let e=D();P(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),f(20,Vi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Fi(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var Et=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(ht,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($),x(ue))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),h(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(15,Oi,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),f(35,Ai,22,4,"ng-container",20)(36,Fi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Ri=()=>["/menu/Order/detail"],Wi=(r,c)=>({Number:r,Outlet:c});function Bi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function zi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Ri))("queryParams",pe(4,Wi,e.Number,e.Outlet)),o(),u(e.Number)}}function Gi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function ji(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,zi,2,7,"a",33)(5,Gi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Hi(r,c){if(r&1){let e=D();P(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,ji,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ui(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var It=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.Note,p)||(t.filter.Note=p),h(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),f(35,Hi,20,4,"ng-container",19)(36,Ui,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var qi=[{path:"",component:bt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:yt,canActivate:[le],data:{title:"New Order"}},{path:"detail",component:vt,canActivate:[le],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Tt,canActivate:[le],data:{title:"Ready To Ship"}},{path:"Shipped",component:wt,canActivate:[le],data:{title:"Shipped"}},{path:"Delivered",component:Pt,canActivate:[le],data:{title:"Delivered"}},{path:"All",component:Et,canActivate:[le],data:{title:"All Order"}},{path:"Cancelled",component:It,canActivate:[le],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-P4HXQHNP.js").then(r=>r.DownloadV2Component)},canActivate:[le],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-Q7F2LXH2.js").then(r=>r.DownloadOrderLogComponent),canActivate:[le],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-DI4V7KMK.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[le],data:{title:"Download Order Log Detail"}}]}],Nt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({imports:[he,Le.forChild(qi)]})}}return r})();var Va=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({providers:[Ae,Fe,We],imports:[he,Ze,Nt,mt,rt,ut,Le,$e,gt,st,j,_t,et,lt,St,at,ct,ot,H,Be,Ct,dt]})}}return r})();export{Va as OrdersModule};
4
+ </ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac})}}return r})();function Ot(r,c){if(r&1){let e=D();P(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return h(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),E()}}function Lt(r,c){if(r&1&&(P(0),f(1,Ot,4,0,"ng-container",3),E()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function kt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O),o(),I(" ",e.Name," ")}}function Vt(r,c){if(r&1){let e=D();P(0),i(1,"th",35)(2,"input",36),y("ngModelChange",function(t){g(e);let m=s(3);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return h(m.onSelectAllOrderData(t))}),n()(),E()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function At(r,c){if(r&1){let e=D();P(0),i(1,"input",36),y("ngModelChange",function(t){g(e);let m=s(2).$implicit;return b(m.selected,t)||(m.selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return h(m.onSelectOrderData(t))}),n(),E()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Ft(r,c){if(r&1&&(P(0),i(1,"td"),f(2,At,2,1,"ng-container",3),n(),E()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Rt(r,c){if(r&1&&(P(0),i(1,"span"),l(2),n(),E()),r&2){let e=s().$implicit;o(2),u(e.Number)}}function Wt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,O),o(),u(e.Number)}}function Bt(r,c){if(r&1&&(i(0,"tr"),f(1,Ft,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),f(5,Rt,3,1,"ng-container",24)(6,Wt,2,2,"ng-template",null,1,q),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=U(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),u(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),u(e.Customer),o(2),u(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function zt(r,c){if(r&1){let e=D();P(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),f(5,Vt,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),f(17,Bt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),T(19,"async"),T(20,"async"),v("total",function(){g(e);let t=s(2);return h(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return h(t.onNextPage())})("previous",function(){g(e);let t=s(2);return h(t.onPreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",M(20,7,t.paginationTotal$))}}function Gt(r,c){if(r&1&&(P(0),f(1,zt,21,9,"ng-container",24),E()),r&2){let e=c.ngIf;s();let a=U(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function jt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=N.GuidEMpty,this.tokopediaType=w.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(be()),this.newOrdersData$=this.sourceObs$.pipe(Ie(a=>{a.filter(m=>m.Type==w.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(be())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==w.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(J(t=>(t=t.sort((m,_)=>N.compare(m.Created,_.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(x(me),x(Ae),x(Fe),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),h(t.getNewOrders())}),i(1,"actions"),f(2,Lt,2,1,"ng-container",3),T(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(13,kt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(27,"div")(28,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),f(33,Gt,2,2,"ng-container",3),T(34,"async"),f(35,jt,2,0,"ng-template",null,0,q),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",M(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(34,13,t.newOrdersData$)))},dependencies:[A,F,Q,Z,ke,B,z,G,ie,ee,te,j,re,oe,ne,ae,H,Oe,V],encapsulation:2})}}return r})();var Ht=()=>["/menu/Order"];function Ut(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),T(5,"number"),n(),i(6,"td"),l(7),T(8,"number"),n()()),r&2){let e=c.$implicit;o(2),u(e.Code),o(2),u(M(5,3,e.Quantity)),o(3),u(M(8,5,e.Price))}}function qt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),T(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),T(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),f(66,Ut,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),I(" ",e.model.Outlet," "),o(5),I(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),I(" ",e.model.Delivery," "),o(5),I(" ",e.model.TaxType," "),o(5),I(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),I(" ",e.model.Customer.Name," "),o(5),I(" ",e.model.Customer.Email," "),o(5),I(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var vt=(()=>{class r{constructor(e,a){this.http=e,this.url=a,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(Xe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),f(6,qt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",K(5,Ht)),o(4),d("ngIf",t.model))},dependencies:[A,F,G,X,W,V],encapsulation:2})}}return r})();var xt=(()=>{class r{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(a){return new(a||r)(x(tt))}}static{this.\u0275cmp=L({type:r,selectors:[["app-print-tokopedia"]],standalone:!1,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(a,t){a&1&&(i(0,"div",0)(1,"h2",1),l(2,"Cetak label pesanan"),n(),i(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),l(7,"Kamu akan mencetak label yang berisi detail pesanan"),n(),i(8,"div",5)(9,"mat-checkbox",6),y("ngModelChange",function(_){return b(t.tandaiSudahDicetak,_)||(t.tandaiSudahDicetak=_),_}),n(),i(10,"span",7),l(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),n()()()()(),i(12,"mat-dialog-actions",8)(13,"button",9),v("click",function(){return t.onCancel()}),l(14,"Cancel"),n(),i(15,"button",10),v("click",function(){return t.onPrint()}),l(16,"Cetak Pesanan"),n()()()),a&2&&(o(9),C("ngModel",t.tandaiSudahDicetak))},dependencies:[B,z,ft,nt,it],encapsulation:2})}}return r})();var We=(()=>{class r{constructor(e,a,t){this.http=e,this.toastr=a,this.dialog=t}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tokopedia,t)),a)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Tiktok,t)),a)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Shopee,t)),a)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(J(a=>(a=a.map(t=>(t.ChannelType=w.Lazada,t)),a)))}printShippingLabelTokopedia(e){let a={OrderNumber:e,Printed:!0};this.dialog.open(xt).afterClosed().pipe(Ye(t=>t!==void 0),Je(t=>(a.Printed=t,this.http.post("api/v1/Shippinglabel/Tokopedia",a)))).subscribe(t=>{let m=window.open("about:blank","_blank");m.document.write(t.File),m.document.close()})}printShippingLabelTiktok(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",t).subscribe(m=>{m.data!=null?window.open(m.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",t).subscribe(m=>{var _=Uint8Array.from(atob(m.File),ze=>ze.charCodeAt(0)),p=new Blob([_],{type:"octet/stream"});N.openDownloadFile(p,`${e}.pdf`)})}printShippingLabelLazada(e,a){let t={ShopID:a,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",t).subscribe(m=>{m.result.data!=null?window.open(m.result.data.pdf_url,"_blank"):this.toastr.error(m.message,"Cannot Print")})}static{this.\u0275fac=function(a){return new(a||r)(se(R),se(Ve),se(ue))}}static{this.\u0275prov=Ne({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var de=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(de||{});var Ce=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(Ce||{});function Jt(r,c){if(r&1&&(P(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),E()),r&2){let e=s();o(4),I(" ",e.recipient==null?null:e.recipient.City," "),o(3),I(" ",e.recipient==null?null:e.recipient.District," ")}}function Kt(r,c){if(r&1&&(P(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),I("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Xt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),T(6,"date"),n()(),E()),r&2){let e=s();o(5),u(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Qt(r,c){if(r&1&&(P(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),E()),r&2){let e=s();o(5),u(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function Zt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),T(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),u(a+1),o(2),u(e.Product_Name),o(2),u(e.SKU),o(2),u(M(9,4,e.Quantity))}}var Be=(()=>{class r{constructor(){this.minDate=N.MinDate,this.channelType=w}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case w.Tokopedia:this.marketplaceLogo=Ce.TOKOPEDIA;break;case w.Shopee:this.marketplaceLogo=Ce.SHOPEE;break;case w.Lazada:this.marketplaceLogo=Ce.LAZADA;break;case w.Tiktok:this.marketplaceLogo=Ce.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=de.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=de.GRAB:e.includes("jne")?this.shippingLogo=de.JNE:e.includes("gosend")?this.shippingLogo=de.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=de.JNT:e.includes("sicepat")?this.shippingLogo=de.SICEPAT:e.includes("spx")?this.shippingLogo=de.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=de.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(N.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})}N.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ke],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Ge(),S(23,"svg",11),n()(),je(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),f(50,Jt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),f(61,Kt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),T(67,"number"),n()()(),f(68,Xt,7,4,"ng-container",20)(69,Qt,6,1,"ng-container",20),n(),i(70,"div",28),Ge(),S(71,"svg",29),n()()(),je(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),f(86,Zt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,O),o(3),u(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,O),o(7),I(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),u(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),u(t.recipient==null?null:t.recipient.Name),o(5),I(" ",t.recipient==null?null:t.recipient.Address," "),o(7),u(t.store==null?null:t.store.Name),o(2),u(t.store==null?null:t.store.Phone),o(2),I(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),I("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?M(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[he,A,F,W,V],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]})}}return r})();var ei=()=>["/menu/Order/detail"],ti=(r,c)=>({Number:r,Outlet:c});function ii(r,c){if(r&1){let e=D();P(0),i(1,"button",21),v("click",function(){g(e);let t=s();return h(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),E()}}function ni(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function ai(r,c){if(r&1){let e=D();P(0),i(1,"input",31),y("ngModelChange",function(t){g(e);let m=s().$implicit;return b(m.Selected,t)||(m.Selected=t),h(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return h(m.onSelectReadyToShip(t))}),n(),E()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ri(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,ei))("queryParams",pe(4,ti,e.Number,e.Outlet)),o(),u(e.Number)}}function oi(r,c){if(r&1&&(i(0,"a",45),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function li(r,c){if(r&1){let e=D();i(0,"a",46),v("click",function(){g(e);let t=s().$implicit,m=s(3);return h(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",47),n()}}function pi(r,c){if(r&1&&(i(0,"tr")(1,"td"),f(2,ai,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),f(6,ri,2,7,"a",39)(7,oi,2,2,"a",40),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),T(12,"number"),n(),i(13,"td"),l(14),T(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",41),n(),i(18,"td",42),f(19,li,2,0,"a",43),n()()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),u(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),u(e.Customer),o(2),u(M(12,9,e.Amount)),o(3),u(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function mi(r,c){if(r&1){let e=D();P(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return h(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),y("ngModelChange",function(t){g(e);let m=s(2);return b(m.isCheckAll,t)||(m.isCheckAll=t),h(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return h(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),S(19,"th",37),n()(),i(20,"tbody"),f(21,pi,20,14,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),T(23,"async"),T(24,"async"),v("total",function(){g(e);let t=s(2);return h(t.getRowCount())})("next",function(){g(e);let t=s(2);return h(t.NextPage())})("previous",function(){g(e);let t=s(2);return h(t.PreviousPage())}),n()(),E()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(15),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=M(23,5,t.readyToShip$))==null?null:e.length)("paginationTotal",M(24,7,t.paginationTotal$))}}function di(r,c){if(r&1&&(P(0),f(1,mi,25,9,"ng-container",25),E()),r&2){let e=c.ngIf;s();let a=U(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function si(r,c){r&1&&(i(0,"div",48),S(1,"app-empty-state"),n())}function ci(r,c){r&1&&(P(0),i(1,"div",50),l(2,"\xA0"),n(),E())}function gi(r,c){if(r&1&&(P(0),S(1,"app-shipping-label",49),f(2,ci,3,0,"ng-container",4),E()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Tt=(()=>{class r{constructor(e,a,t,m,_,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=_,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=w,this.guidEmpty=N.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 a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",a).pipe(J(t=>t.Data),be(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,w.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),qe(m).pipe(J(_=>_.reduce((p,ze)=>p.concat(ze),[]))).subscribe({next:_=>{this.shippingLabels=_,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case w.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case w.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case w.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case w.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(J(a=>a?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(J(t=>t.sort((m,_)=>N.compare(m.Date,_.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==w.Tokopedia||a.TypeID==w.Shopee||a.TypeID==w.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x(ue),x(We),x(V),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[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(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),f(6,ii,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(12,ni,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(26,"div")(27,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),f(32,di,2,2,"ng-container",4),T(33,"async"),f(34,si,2,0,"ng-template",null,0,q),n()()()()(),i(36,"div",19),f(37,gi,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",M(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Q,Z,ke,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,Be,Oe,W,V],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})}}return r})();var hi=()=>["/menu/Order/detail"],ui=(r,c)=>({Number:r,Outlet:c});function _i(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function fi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,hi))("queryParams",pe(4,ui,e.Number,e.Outlet)),o(),u(e.Number)}}function Si(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Ci(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,fi,2,7,"a",32)(5,Si,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function bi(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ci,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function yi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var wt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,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==N.GuidEMpty}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,_i,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,bi,20,4,"ng-container",18)(32,yi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var vi=()=>["/menu/Order/detail"],xi=(r,c)=>({Number:r,Outlet:c});function Ti(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function wi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,vi))("queryParams",pe(4,xi,e.Number,e.Outlet)),o(),u(e.Number)}}function Pi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,O),o(),u(e.Number)}}function Ei(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,wi,2,7,"a",32)(5,Pi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Ii(r,c){if(r&1){let e=D();P(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,Ei,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ni(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var Pt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=w,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Ti,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(25,"div")(26,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),f(31,Ii,20,4,"ng-container",18)(32,Ni,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Di=()=>["/menu/Order/detail"],Mi=(r,c)=>({Number:r,Outlet:c});function Oi(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function Li(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Di))("queryParams",pe(4,Mi,e.Number,e.Outlet)),o(),u(e.Number)}}function ki(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function Vi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,Li,2,7,"a",35)(5,ki,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,8,e.Amount)),o(3),u(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),u(e.State),o(2),d("typeId",e.TypeID)}}function Ai(r,c){if(r&1){let e=D();P(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),f(20,Vi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Fi(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var Et=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(ht,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($),x(ue))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),h(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(15,Oi,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",16),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),f(35,Ai,22,4,"ng-container",20)(36,Fi,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var Ri=()=>["/menu/Order/detail"],Wi=(r,c)=>({Number:r,Outlet:c});function Bi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,O)("alt",e.Name),o(),I(" ",e.Name," ")}}function zi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",K(3,Ri))("queryParams",pe(4,Wi,e.Number,e.Outlet)),o(),u(e.Number)}}function Gi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,O),o(),u(e.Number)}}function ji(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),f(4,zi,2,7,"a",33)(5,Gi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),T(10,"number"),n(),i(11,"td"),l(12),T(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),u(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),u(e.Customer),o(2),u(M(10,7,e.Amount)),o(3),u(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function Hi(r,c){if(r&1){let e=D();P(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return h(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),f(18,ji,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return h(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return h(t.NextPage())})("previous",function(){g(e);let t=s();return h(t.PreviousPage())}),n()(),E()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Ui(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var It=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var a={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>N.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(x(R),x(me),x($))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=D();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),h(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),y("ngModelChange",function(p){return g(m),b(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),h(p)}),f(11,Bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),y("ngModelChange",function(p){return g(m),b(t.filter.PageNumber,p)||(t.filter.PageNumber=p),h(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),y("ngModelChange",function(p){return g(m),b(t.filter.PageSize,p)||(t.filter.PageSize=p),h(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),y("ngModelChange",function(p){return g(m),b(t.filter.Note,p)||(t.filter.Note=p),h(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),y("dateChange",function(p){return g(m),b(t.filter.From,p)||(t.filter.From=p),h(p)}),n()(),i(29,"div")(30,"datepicker",15),y("dateChange",function(p){return g(m),b(t.filter.To,p)||(t.filter.To=p),h(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),f(35,Hi,20,4,"ng-container",19)(36,Ui,2,0,"ng-template",null,0,q),n()()()()()}if(a&2){let m=U(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Q,Z,B,z,G,X,ie,ee,te,j,re,oe,ne,ae,H,W,V],encapsulation:2})}}return r})();var qi=[{path:"",component:bt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:yt,canActivate:[le],data:{title:"New Order"}},{path:"detail",component:vt,canActivate:[le],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Tt,canActivate:[le],data:{title:"Ready To Ship"}},{path:"Shipped",component:wt,canActivate:[le],data:{title:"Shipped"}},{path:"Delivered",component:Pt,canActivate:[le],data:{title:"Delivered"}},{path:"All",component:Et,canActivate:[le],data:{title:"All Order"}},{path:"Cancelled",component:It,canActivate:[le],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-I6JDDQC2.js").then(r=>r.DownloadV2Component)},canActivate:[le],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-SXW52HYQ.js").then(r=>r.DownloadOrderLogComponent),canActivate:[le],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-DI4V7KMK.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[le],data:{title:"Download Order Log Detail"}}]}],Nt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({imports:[he,Le.forChild(qi)]})}}return r})();var Va=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Me({type:r})}static{this.\u0275inj=De({providers:[Ae,Fe,We],imports:[he,Ze,Nt,mt,rt,ut,Le,$e,gt,st,j,_t,et,lt,St,at,ct,ot,H,Be,Ct,dt]})}}return r})();export{Va as OrdersModule};
@@ -1 +1 @@
1
- import{l as d}from"./chunk-C4LREOY5.js";import{b as u}from"./chunk-BUFEIJAI.js";import{G as h}from"./chunk-GPEVUTDI.js";import{ja as c,oa as s}from"./chunk-T5ONJF63.js";import{i as n}from"./chunk-K2H6WANG.js";var A=(()=>{class i{constructor(t,e,r){this.toastr=t,this.authService=e,this.router=r}canActivate(t,e){return n(this,null,function*(){let r=JSON.parse(window.localStorage.getItem("user")),a=new Date,o=!1;if(r!=null){let l=new Date(r?.Token?.expiredAt);a<l?o=yield this.checkDashboardAccess(t):(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return o})}checkDashboardAccess(t){return n(this,null,function*(){let e=!0;if(t?.url[0]?.path=="dashboard"){let a=yield this.authService.redirectUrl();a.includes("dashboard")||this.router.navigate([a])}return e})}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}static{this.\u0275fac=function(e){return new(e||i)(s(u),s(d),s(h))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{A as a};
1
+ import{l as d}from"./chunk-2SUNUZ5Y.js";import{b as u}from"./chunk-BUFEIJAI.js";import{G as h}from"./chunk-GPEVUTDI.js";import{ja as c,oa as s}from"./chunk-T5ONJF63.js";import{i as n}from"./chunk-K2H6WANG.js";var A=(()=>{class i{constructor(t,e,r){this.toastr=t,this.authService=e,this.router=r}canActivate(t,e){return n(this,null,function*(){let r=JSON.parse(window.localStorage.getItem("user")),a=new Date,o=!1;if(r!=null){let l=new Date(r?.Token?.expiredAt);a<l?o=yield this.checkDashboardAccess(t):(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return o})}checkDashboardAccess(t){return n(this,null,function*(){let e=!0;if(t?.url[0]?.path=="dashboard"){let a=yield this.authService.redirectUrl();a.includes("dashboard")||this.router.navigate([a])}return e})}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}static{this.\u0275fac=function(e){return new(e||i)(s(u),s(d),s(h))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{A as a};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-MCBB72MO.js";import{a as _t}from"./chunk-7KG3DC5J.js";import{a as k}from"./chunk-4ASUM4N5.js";import{a as dt,b as st,d as ft,e as ut}from"./chunk-6IAGGRZN.js";import{l as pt}from"./chunk-C4LREOY5.js";import{e as ct}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{l as B,m as gt}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{h as at,m as rt,y as lt}from"./chunk-DPLEMBB4.js";import{c as mt}from"./chunk-PXB4YEY3.js";import{E as ot,H as L,J as R,d as it,f as nt,g as D,j as M,k as T,m as w,n as P}from"./chunk-GPEVUTDI.js";import{$c as C,Dc as J,Eb as N,Ec as a,Fb as b,Fc as p,Gc as S,Ic as K,Jc as Q,Kb as f,Kc as X,Pc as Y,Qc as Z,Rc as tt,Wb as m,Z as O,Zc as d,_c as h,aa as z,ad as et,ca as q,f as A,gc as o,hc as n,ic as E,jc as u,ka as x,kc as g,mc as W,nb as U,ob as j,qb as r,rc as H,sc as s,v,vc as G,wb as _,ya as I,za as y}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var bt=(e,c)=>({"bg-gradient-danger":e,"bg-gradient-warning":c}),Et=()=>["/menu/notification/detail"],Dt=e=>({ID:e});function Mt(e,c){if(e&1&&(o(0,"span",14),E(1,"img",15),n(),a(2)),e&2){let t=c.item;r(),m("src",t.Img,j)("alt",t.Name),r(),S(" ",t.Name," ")}}function Tt(e,c){if(e&1&&(u(0),a(1),d(2,"number"),o(3,"span"),a(4,"s"),n(),g()),e&2){let t=s().$implicit;r(),S(" ",C(2,1,t.DurationInSecond,"1.1-1")," ")}}function wt(e,c){e&1&&a(0," - ")}function Pt(e,c){if(e&1&&(u(0),o(1,"tr",16)(2,"td")(3,"a",17),E(4,"img",18),o(5,"span"),a(6),n()()(),o(7,"td")(8,"b"),a(9),n(),E(10,"div",19),n(),o(11,"td"),f(12,Tt,5,4,"ng-container",20)(13,wt,1,0,"ng-template",null,0,et),n(),o(15,"td"),a(16),n(),o(17,"td"),a(18),d(19,"date"),n()(),g()),e&2){let t=c.$implicit,i=J(14);r(),m("ngClass",tt(14,bt,t.Status==1,t.Status==0)),r(2),m("routerLink",Y(17,Et))("queryParams",Z(18,Dt,t.ID)),r(),G("src",t.Img,j),r(2),p(t.Name),r(3),p(t.Label),r(),m("innerHTML",t.Message,U),r(2),m("ngIf",t.DurationInSecond)("ngIfElse",i),r(4),p(t.StatusLabel),r(2),p(C(19,11,t.Created,"dd MMM yyyy HH:mm"))}}function Lt(e,c){if(e&1){let t=W();u(0),o(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),d(4,"async"),d(5,"async"),H("total",function(){I(t);let l=s(2);return y(l.getRowCount())})("next",function(){I(t);let l=s(2);return y(l.getNotifications())})("previous",function(){I(t);let l=s(2);return y(l.getNotifications())}),n()()(),g()}if(e&2){let t=s().ngIf,i=s();r(3),m("filter",i.filter)("totaldata",t==null?null:t.length)("paginationTotal",h(4,4,i.rowCount$))("hasClicked",h(5,6,i.rowCount$))}}function Rt(e,c){if(e&1&&(u(0),f(1,Lt,6,8,"ng-container",13),g()),e&2){let t=c.ngIf;r(),m("ngIf",t.length>0)}}var ht=(()=>{class e{constructor(t,i,l){this.http=t,this.notificationService=i,this.authService=l,this.filter=new _t,this.destroy$=new A,this.channelOptions=l.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(q(this.destroy$)).subscribe(t=>{t.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(t=>{this.filter=t.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let t={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",t).pipe(v(i=>i.Data),v(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),O(1))}setTimeToSecond(t){return t=t.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),t}setChannelLogoToNotifications(t){return t=t.map(i=>(i.Img=mt.getChannelLogoByTypeId(i.TypeID),i)),t}getRowCount(){let t={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",t).pipe(v(i=>i.Count),O(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||e)(_(ct),_(F),_(pt))}}static{this.\u0275cmp=N({type:e,selectors:[["app-notification"]],standalone:!1,decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,l){i&1&&(o(0,"mainpanel",1),H("onSubmit",function(){return l.onFilter()}),o(1,"filters")(2,"div")(3,"h6",2),a(4,"Channel"),n(),o(5,"ng-select",3),X("ngModelChange",function($){return Q(l.filter.ChannelID,$)||(l.filter.ChannelID=$),$}),f(6,Mt,3,3,"ng-template",4),n()()(),o(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),a(16,"Channel"),n(),o(17,"th"),a(18,"Process"),n(),o(19,"th"),a(20,"Duration"),n(),o(21,"th"),a(22,"Status"),n(),o(23,"th"),a(24,"Created"),n()()(),o(25,"tbody"),f(26,Pt,20,20,"ng-container",12),d(27,"async"),n()()()()(),f(28,Rt,2,1,"ng-container",13),d(29,"async"),n()()()),i&2&&(r(5),m("clearable",!0)("items",l.channelOptions),K("ngModel",l.filter.ChannelID),r(21),m("ngForOf",h(27,5,l.notifications$)),r(2),m("ngIf",h(29,7,l.notifications$)))},dependencies:[it,nt,D,ft,dt,st,at,rt,B,L,k,M,w,T],encapsulation:2})}}return e})();function Ft(e,c){if(e&1&&(o(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),a(4,"Perflog"),n()(),o(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),a(9),n()()()()()()),e&2){let t=s().ngIf;r(9),p(t.Perflog)}}function Bt(e,c){if(e&1&&(u(0),o(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),a(5,"StackTrace"),n()(),o(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),a(10),n()()()()()(),g()),e&2){let t=s().ngIf;r(10),p(t==null?null:t.StackTrace)}}function kt(e,c){if(e&1&&(u(0),o(1,"mainpanel",1)(2,"actions")(3,"a",2),a(4,"Back"),n()(),o(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),a(12,"General"),n()(),o(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),a(18,"Created Date"),n(),o(19,"div")(20,"span"),a(21),d(22,"date"),n()()()(),o(23,"div",10)(24,"div",11)(25,"label"),a(26,"Status"),n(),o(27,"div")(28,"span"),a(29),n()()()()(),o(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),a(34,"Duration"),n(),o(35,"div")(36,"span"),a(37),d(38,"number"),n()()()(),o(39,"div",10)(40,"div",11)(41,"label"),a(42,"Label"),n(),o(43,"div")(44,"span"),a(45),n()()()()()()()()(),o(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),a(51,"Message"),n()(),o(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),a(56),n()()()()()(),f(57,Ft,10,1,"div",16)(58,Bt,11,1,"ng-container",0),n()()()(),g()),e&2){let t=c.ngIf;r(),m("headerTitle","Notification "+t.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),r(20),p(C(22,10,t.Created,"dd MMM yyyy HH:mm:ss")),r(8),p(t.StatusLabel),r(8),S("",C(38,13,t.DurationInSecond,"1.1-1")," s"),r(8),p(t.Label),r(11),p(t.Message),r(),m("ngIf",t==null?null:t.Perflog),r(),m("ngIf",t==null?null:t.StackTrace)}}var vt=(()=>{class e{constructor(t,i){this.activatedRoute=t,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(z(t=>{let i=t.ID;return this.notificationService.getNotificationDetail(i).pipe(v(l=>(l.DurationInSecond=parseInt(l.Duration)/1e3,l)))}))}static{this.\u0275fac=function(i){return new(i||e)(_(ot),_(F))}}static{this.\u0275cmp=N({type:e,selectors:[["app-detail"]],standalone:!1,decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,l){i&1&&(f(0,kt,59,16,"ng-container",0),d(1,"async")),i&2&&m("ngIf",h(1,1,l.notification$))},dependencies:[D,B,L,M,w,T],encapsulation:2})}}return e})();var $t=[{path:"",component:ht},{path:"detail",component:vt}],Ct=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=x({imports:[P,R.forChild($t)]})}}return e})();var de=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=x({imports:[P,Ct,ut,lt,gt,R,k]})}}return e})();export{de as NotificationModule};
1
+ import{a as F}from"./chunk-IRKRLYXS.js";import{a as _t}from"./chunk-7KG3DC5J.js";import{a as k}from"./chunk-4ASUM4N5.js";import{a as dt,b as st,d as ft,e as ut}from"./chunk-6IAGGRZN.js";import{l as pt}from"./chunk-2SUNUZ5Y.js";import{e as ct}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{l as B,m as gt}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{h as at,m as rt,y as lt}from"./chunk-DPLEMBB4.js";import{c as mt}from"./chunk-PXB4YEY3.js";import{E as ot,H as L,J as R,d as it,f as nt,g as D,j as M,k as T,m as w,n as P}from"./chunk-GPEVUTDI.js";import{$c as C,Dc as J,Eb as N,Ec as a,Fb as b,Fc as p,Gc as S,Ic as K,Jc as Q,Kb as f,Kc as X,Pc as Y,Qc as Z,Rc as tt,Wb as m,Z as O,Zc as d,_c as h,aa as z,ad as et,ca as q,f as A,gc as o,hc as n,ic as E,jc as u,ka as x,kc as g,mc as W,nb as U,ob as j,qb as r,rc as H,sc as s,v,vc as G,wb as _,ya as I,za as y}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var bt=(e,c)=>({"bg-gradient-danger":e,"bg-gradient-warning":c}),Et=()=>["/menu/notification/detail"],Dt=e=>({ID:e});function Mt(e,c){if(e&1&&(o(0,"span",14),E(1,"img",15),n(),a(2)),e&2){let t=c.item;r(),m("src",t.Img,j)("alt",t.Name),r(),S(" ",t.Name," ")}}function Tt(e,c){if(e&1&&(u(0),a(1),d(2,"number"),o(3,"span"),a(4,"s"),n(),g()),e&2){let t=s().$implicit;r(),S(" ",C(2,1,t.DurationInSecond,"1.1-1")," ")}}function wt(e,c){e&1&&a(0," - ")}function Pt(e,c){if(e&1&&(u(0),o(1,"tr",16)(2,"td")(3,"a",17),E(4,"img",18),o(5,"span"),a(6),n()()(),o(7,"td")(8,"b"),a(9),n(),E(10,"div",19),n(),o(11,"td"),f(12,Tt,5,4,"ng-container",20)(13,wt,1,0,"ng-template",null,0,et),n(),o(15,"td"),a(16),n(),o(17,"td"),a(18),d(19,"date"),n()(),g()),e&2){let t=c.$implicit,i=J(14);r(),m("ngClass",tt(14,bt,t.Status==1,t.Status==0)),r(2),m("routerLink",Y(17,Et))("queryParams",Z(18,Dt,t.ID)),r(),G("src",t.Img,j),r(2),p(t.Name),r(3),p(t.Label),r(),m("innerHTML",t.Message,U),r(2),m("ngIf",t.DurationInSecond)("ngIfElse",i),r(4),p(t.StatusLabel),r(2),p(C(19,11,t.Created,"dd MMM yyyy HH:mm"))}}function Lt(e,c){if(e&1){let t=W();u(0),o(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),d(4,"async"),d(5,"async"),H("total",function(){I(t);let l=s(2);return y(l.getRowCount())})("next",function(){I(t);let l=s(2);return y(l.getNotifications())})("previous",function(){I(t);let l=s(2);return y(l.getNotifications())}),n()()(),g()}if(e&2){let t=s().ngIf,i=s();r(3),m("filter",i.filter)("totaldata",t==null?null:t.length)("paginationTotal",h(4,4,i.rowCount$))("hasClicked",h(5,6,i.rowCount$))}}function Rt(e,c){if(e&1&&(u(0),f(1,Lt,6,8,"ng-container",13),g()),e&2){let t=c.ngIf;r(),m("ngIf",t.length>0)}}var ht=(()=>{class e{constructor(t,i,l){this.http=t,this.notificationService=i,this.authService=l,this.filter=new _t,this.destroy$=new A,this.channelOptions=l.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(q(this.destroy$)).subscribe(t=>{t.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(t=>{this.filter=t.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let t={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",t).pipe(v(i=>i.Data),v(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),O(1))}setTimeToSecond(t){return t=t.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),t}setChannelLogoToNotifications(t){return t=t.map(i=>(i.Img=mt.getChannelLogoByTypeId(i.TypeID),i)),t}getRowCount(){let t={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",t).pipe(v(i=>i.Count),O(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||e)(_(ct),_(F),_(pt))}}static{this.\u0275cmp=N({type:e,selectors:[["app-notification"]],standalone:!1,decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,l){i&1&&(o(0,"mainpanel",1),H("onSubmit",function(){return l.onFilter()}),o(1,"filters")(2,"div")(3,"h6",2),a(4,"Channel"),n(),o(5,"ng-select",3),X("ngModelChange",function($){return Q(l.filter.ChannelID,$)||(l.filter.ChannelID=$),$}),f(6,Mt,3,3,"ng-template",4),n()()(),o(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),a(16,"Channel"),n(),o(17,"th"),a(18,"Process"),n(),o(19,"th"),a(20,"Duration"),n(),o(21,"th"),a(22,"Status"),n(),o(23,"th"),a(24,"Created"),n()()(),o(25,"tbody"),f(26,Pt,20,20,"ng-container",12),d(27,"async"),n()()()()(),f(28,Rt,2,1,"ng-container",13),d(29,"async"),n()()()),i&2&&(r(5),m("clearable",!0)("items",l.channelOptions),K("ngModel",l.filter.ChannelID),r(21),m("ngForOf",h(27,5,l.notifications$)),r(2),m("ngIf",h(29,7,l.notifications$)))},dependencies:[it,nt,D,ft,dt,st,at,rt,B,L,k,M,w,T],encapsulation:2})}}return e})();function Ft(e,c){if(e&1&&(o(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),a(4,"Perflog"),n()(),o(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),a(9),n()()()()()()),e&2){let t=s().ngIf;r(9),p(t.Perflog)}}function Bt(e,c){if(e&1&&(u(0),o(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),a(5,"StackTrace"),n()(),o(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),a(10),n()()()()()(),g()),e&2){let t=s().ngIf;r(10),p(t==null?null:t.StackTrace)}}function kt(e,c){if(e&1&&(u(0),o(1,"mainpanel",1)(2,"actions")(3,"a",2),a(4,"Back"),n()(),o(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),a(12,"General"),n()(),o(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),a(18,"Created Date"),n(),o(19,"div")(20,"span"),a(21),d(22,"date"),n()()()(),o(23,"div",10)(24,"div",11)(25,"label"),a(26,"Status"),n(),o(27,"div")(28,"span"),a(29),n()()()()(),o(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),a(34,"Duration"),n(),o(35,"div")(36,"span"),a(37),d(38,"number"),n()()()(),o(39,"div",10)(40,"div",11)(41,"label"),a(42,"Label"),n(),o(43,"div")(44,"span"),a(45),n()()()()()()()()(),o(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),a(51,"Message"),n()(),o(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),a(56),n()()()()()(),f(57,Ft,10,1,"div",16)(58,Bt,11,1,"ng-container",0),n()()()(),g()),e&2){let t=c.ngIf;r(),m("headerTitle","Notification "+t.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),r(20),p(C(22,10,t.Created,"dd MMM yyyy HH:mm:ss")),r(8),p(t.StatusLabel),r(8),S("",C(38,13,t.DurationInSecond,"1.1-1")," s"),r(8),p(t.Label),r(11),p(t.Message),r(),m("ngIf",t==null?null:t.Perflog),r(),m("ngIf",t==null?null:t.StackTrace)}}var vt=(()=>{class e{constructor(t,i){this.activatedRoute=t,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(z(t=>{let i=t.ID;return this.notificationService.getNotificationDetail(i).pipe(v(l=>(l.DurationInSecond=parseInt(l.Duration)/1e3,l)))}))}static{this.\u0275fac=function(i){return new(i||e)(_(ot),_(F))}}static{this.\u0275cmp=N({type:e,selectors:[["app-detail"]],standalone:!1,decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,l){i&1&&(f(0,kt,59,16,"ng-container",0),d(1,"async")),i&2&&m("ngIf",h(1,1,l.notification$))},dependencies:[D,B,L,M,w,T],encapsulation:2})}}return e})();var $t=[{path:"",component:ht},{path:"detail",component:vt}],Ct=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=x({imports:[P,R.forChild($t)]})}}return e})();var de=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=x({imports:[P,Ct,ut,lt,gt,R,k]})}}return e})();export{de as NotificationModule};