marketplacepos 5.50.2 → 5.50.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/Marketplace/3rdpartylicenses.txt +26 -26
  2. package/Marketplace/{chunk-2DZHA445.js → chunk-2FB6QJKT.js} +1 -1
  3. package/Marketplace/{chunk-7K6U3ABQ.js → chunk-2OKZEOBU.js} +1 -1
  4. package/Marketplace/{chunk-WG34QKGX.js → chunk-3PUUKJCQ.js} +1 -1
  5. package/Marketplace/{chunk-LQUMSCFQ.js → chunk-3YUIOGNI.js} +1 -1
  6. package/Marketplace/{chunk-DYTXOFIM.js → chunk-53ZGHR7J.js} +1 -1
  7. package/Marketplace/chunk-5NWJOQN5.js +1 -0
  8. package/Marketplace/{chunk-TH27YE6R.js → chunk-6MUVEZMQ.js} +1 -1
  9. package/Marketplace/{chunk-JUWHPFPW.js → chunk-7E4ZSLPD.js} +1 -1
  10. package/Marketplace/{chunk-3TK5BYAY.js → chunk-7VJ22OLT.js} +1 -1
  11. package/Marketplace/{chunk-XF4A775R.js → chunk-CBULW22C.js} +1 -1
  12. package/Marketplace/{chunk-CZICXKFA.js → chunk-CFJAZJYY.js} +1 -1
  13. package/Marketplace/{chunk-VFZ76Z6T.js → chunk-CGDIULPW.js} +1 -1
  14. package/Marketplace/{chunk-5NJAMQES.js → chunk-CQBHWYUO.js} +1 -1
  15. package/Marketplace/{chunk-7XA3VQEB.js → chunk-DIDUSCV7.js} +1 -1
  16. package/Marketplace/{chunk-WXXGLR46.js → chunk-EV6TBBSW.js} +1 -1
  17. package/Marketplace/{chunk-TVFILHVN.js → chunk-FBXKHJ2G.js} +1 -1
  18. package/Marketplace/{chunk-OUYOKQ57.js → chunk-FDVRSAF3.js} +1 -1
  19. package/Marketplace/{chunk-KUPGF23P.js → chunk-FO75JP2L.js} +1 -1
  20. package/Marketplace/{chunk-WCX3T6LK.js → chunk-FPJTI4LM.js} +1 -1
  21. package/Marketplace/{chunk-BGJEGBP5.js → chunk-FS3VTRY2.js} +1 -1
  22. package/Marketplace/{chunk-ZLNNQRTE.js → chunk-HAZ7U3MT.js} +1 -1
  23. package/Marketplace/chunk-HHDJUCIT.js +1 -0
  24. package/Marketplace/{chunk-B5BQZD66.js → chunk-HMDHDMIC.js} +1 -1
  25. package/Marketplace/{chunk-TLCH5ENB.js → chunk-JEJHGIUU.js} +1 -1
  26. package/Marketplace/{chunk-GRVGKVD6.js → chunk-JG7M73IA.js} +1 -1
  27. package/Marketplace/{chunk-GD6ZN56B.js → chunk-JLDXWNDU.js} +1 -1
  28. package/Marketplace/{chunk-U7FIZHGC.js → chunk-KDJVMFOK.js} +1 -1
  29. package/Marketplace/{chunk-PRM7MTFP.js → chunk-KKQ32Z72.js} +1 -1
  30. package/Marketplace/{chunk-DQXBBV26.js → chunk-KMNWLBEP.js} +1 -1
  31. package/Marketplace/{chunk-G3KVHCET.js → chunk-KNE2UYQ2.js} +1 -1
  32. package/Marketplace/{chunk-TUJBAZ5Q.js → chunk-MYJZFEAZ.js} +1 -1
  33. package/Marketplace/{chunk-4NT5VNJW.js → chunk-MZWP4SZF.js} +2 -2
  34. package/Marketplace/{chunk-YYKWI27U.js → chunk-N4MYHIMN.js} +1 -1
  35. package/Marketplace/{chunk-SS4PLPBF.js → chunk-NGQFZI6A.js} +1 -1
  36. package/Marketplace/{chunk-TG7XOXCH.js → chunk-PFP5WMC3.js} +1 -1
  37. package/Marketplace/{chunk-OWLZQ5WE.js → chunk-PHVEBMTE.js} +1 -1
  38. package/Marketplace/{chunk-CHGAMAQX.js → chunk-QJH7APJQ.js} +1 -1
  39. package/Marketplace/{chunk-ZD5PSX3I.js → chunk-QJU2YGUH.js} +1 -1
  40. package/Marketplace/{chunk-KA2HPWPG.js → chunk-QWEMPIP7.js} +1 -1
  41. package/Marketplace/{chunk-YBRWFONB.js → chunk-QZMWXAUJ.js} +1 -1
  42. package/Marketplace/{chunk-EKYPWTJN.js → chunk-RRRPWDKB.js} +1 -1
  43. package/Marketplace/{chunk-42GDFAAQ.js → chunk-S2ZFBPPJ.js} +1 -1
  44. package/Marketplace/{chunk-QB7PXKAO.js → chunk-TOPYLZOF.js} +1 -1
  45. package/Marketplace/{chunk-FUBZ75C7.js → chunk-UMJVPGHV.js} +1 -1
  46. package/Marketplace/{chunk-A4UF2QH6.js → chunk-UWKDFRVX.js} +1 -1
  47. package/Marketplace/{chunk-QSW7O4GN.js → chunk-VA7NXG7X.js} +1 -1
  48. package/Marketplace/{chunk-XCJ5XRFI.js → chunk-X2WAAZ7G.js} +1 -1
  49. package/Marketplace/{chunk-PQM7IB5J.js → chunk-XCGXT3P7.js} +1 -1
  50. package/Marketplace/{chunk-YQKEWN54.js → chunk-XMU7MXAM.js} +1 -1
  51. package/Marketplace/{chunk-ELAPYSP6.js → chunk-XYRET5HT.js} +1 -1
  52. package/Marketplace/{chunk-F24YPKYG.js → chunk-XYZI7ZXN.js} +1 -1
  53. package/Marketplace/{chunk-7AJN7ECH.js → chunk-YCKLOFMA.js} +1 -1
  54. package/Marketplace/{chunk-EDGT4W2Q.js → chunk-YDNXBOLU.js} +1 -1
  55. package/Marketplace/{chunk-EU324R5S.js → chunk-YEU5TPRD.js} +1 -1
  56. package/Marketplace/{chunk-6LXQMIYX.js → chunk-YQPAS2RI.js} +1 -1
  57. package/Marketplace/{chunk-2UKRRVAM.js → chunk-ZLJBRQ5V.js} +1 -1
  58. package/Marketplace/{chunk-RNJHJCHP.js → chunk-ZM7ND6FE.js} +1 -1
  59. package/Marketplace/index.html +2 -2
  60. package/Marketplace/{main-G6GGJLGW.js → main-7TBLEURN.js} +1 -1
  61. package/package.json +1 -1
  62. package/Marketplace/chunk-UQ7PDZO3.js +0 -1
  63. /package/Marketplace/{chunk-FDGH6XKK.js → chunk-CIVDQKQZ.js} +0 -0
@@ -1 +1 @@
1
- import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-TUJBAZ5Q.js";import{a as d,b as m}from"./chunk-75IM3UUA.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as u}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as c,hc as l,ic as p,jc as s,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let o=class o{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan Job",Url:"/menu/products/status/notification",Description:"Scan results for each channel, including product counts and synchronization status"}]}};o.\u0275fac=function(a){return new(a||o)},o.\u0275cmp=c({type:o,selectors:[["app-status"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(a,f){a&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),s()()(),i(4,"router-outlet")),a&2&&(r(3),l("Tabs",f.productTabs))},dependencies:[m,d,u],encapsulation:2});let t=o;return t})();var U=[{component:h,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",loadComponent(){return import("./chunk-ZLNNQRTE.js").then(t=>t.InPosComponent)},canActivate:[n,e],data:{title:"Products in POS"}},{path:"sold-in-channel",loadComponent(){return import("./chunk-EDGT4W2Q.js").then(t=>t.SoldInChannelComponent)},canActivate:[n,e],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",loadComponent(){return import("./chunk-VFZ76Z6T.js").then(t=>t.NotInChannelComponent)},canActivate:[n,e],data:{title:"Products not in Channel"}},{path:"not-in-pos",loadComponent(){return import("./chunk-TG7XOXCH.js").then(t=>t.NotInPosComponent)},canActivate:[n,e],data:{title:"Products not in POS"}},{path:"duplicate-sku",loadComponent(){return import("./chunk-RNJHJCHP.js").then(t=>t.DuplicateSkuComponent)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-SS4PLPBF.js").then(t=>t.DuplicateSkuV2Component)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",loadComponent(){return import("./chunk-QSW7O4GN.js").then(t=>t.ChannelStatisticComponent)},canActivate:[n,e],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-YQKEWN54.js").then(t=>t.NotificationComponent)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-B5BQZD66.js").then(t=>t.NotificationV2Component)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-2WQLSGW3.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-KA2HPWPG.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}}]}];export{U as routes};
1
+ import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-MYJZFEAZ.js";import{a as d,b as m}from"./chunk-75IM3UUA.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as u}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as c,hc as l,ic as p,jc as s,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let o=class o{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan Job",Url:"/menu/products/status/notification",Description:"Scan results for each channel, including product counts and synchronization status"}]}};o.\u0275fac=function(a){return new(a||o)},o.\u0275cmp=c({type:o,selectors:[["app-status"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(a,f){a&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),s()()(),i(4,"router-outlet")),a&2&&(r(3),l("Tabs",f.productTabs))},dependencies:[m,d,u],encapsulation:2});let t=o;return t})();var U=[{component:h,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",loadComponent(){return import("./chunk-HAZ7U3MT.js").then(t=>t.InPosComponent)},canActivate:[n,e],data:{title:"Products in POS"}},{path:"sold-in-channel",loadComponent(){return import("./chunk-YDNXBOLU.js").then(t=>t.SoldInChannelComponent)},canActivate:[n,e],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",loadComponent(){return import("./chunk-CGDIULPW.js").then(t=>t.NotInChannelComponent)},canActivate:[n,e],data:{title:"Products not in Channel"}},{path:"not-in-pos",loadComponent(){return import("./chunk-PFP5WMC3.js").then(t=>t.NotInPosComponent)},canActivate:[n,e],data:{title:"Products not in POS"}},{path:"duplicate-sku",loadComponent(){return import("./chunk-ZM7ND6FE.js").then(t=>t.DuplicateSkuComponent)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-NGQFZI6A.js").then(t=>t.DuplicateSkuV2Component)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",loadComponent(){return import("./chunk-VA7NXG7X.js").then(t=>t.ChannelStatisticComponent)},canActivate:[n,e],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-XMU7MXAM.js").then(t=>t.NotificationComponent)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-HMDHDMIC.js").then(t=>t.NotificationV2Component)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-2WQLSGW3.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-QWEMPIP7.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}}]}];export{U as routes};
@@ -1 +1 @@
1
- import{b as w}from"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import{b as k}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{b as T,e as P,g as R}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as g,B as M,w as y,y as I}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as E,Nc as i,Oc as l,Pc as D,aa as C,ac as m,cc as p,hc as _,ic as t,id as v,jc as e,jd as b,kd as x,ob as d,ra as u,v as h,yc as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function B(a,o){if(a&1&&(t(0,"div",9)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"Perflog"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n.Perflog)}}function L(a,o){if(a&1&&(t(0,"div",15)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"StackTrace"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n==null?null:n.StackTrace)}}function N(a,o){if(a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Back"),e()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),i(11,"General"),e()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),i(17,"Created Date"),e(),t(18,"div")(19,"span"),i(20),v(21,"date"),e()()()(),t(22,"div",9)(23,"div",10)(24,"label"),i(25,"Status"),e(),t(26,"div")(27,"span"),i(28),e()()()()(),t(29,"div",11)(30,"div",9)(31,"div",10)(32,"label"),i(33,"Duration"),e(),t(34,"div")(35,"span"),i(36),v(37,"number"),e()()()(),t(38,"div",9)(39,"div",10)(40,"label"),i(41,"Label"),e(),t(42,"div")(43,"span"),i(44),e()()()()()()()()(),t(45,"div",3)(46,"div",9)(47,"div",12)(48,"div",6)(49,"h5"),i(50,"Message"),e()(),t(51,"div",7)(52,"div",13)(53,"div",14)(54,"pre"),i(55),e()()()()()(),m(56,B,10,1,"div",9),m(57,L,10,1,"div",15),e()()()()),a&2){let n=o;_("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),l(x(21,10,n.Created,"dd MMM yyyy HH:mm:ss")),d(8),l(n.StatusLabel),d(8),D("",x(37,13,n.DurationInSecond,"1.1-1")," s"),d(8),l(n.Label),d(11),l(n.Message),d(),p(n!=null&&n.Perflog?56:-1),d(),p(n!=null&&n.StackTrace?57:-1)}}var Q=(()=>{let o=class o{constructor(){this.activatedRoute=u(T),this.notificationService=u(w)}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(C(s=>{let r=s.ID;return this.notificationService.getNotificationDetail(r).pipe(h(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};o.\u0275fac=function(r){return new(r||o)},o.\u0275cmp=E({type:o,selectors:[["app-detail"]],decls:2,vars:3,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/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"],[1,"col-sm-12"]],template:function(r,c){if(r&1&&(m(0,N,58,16,"mainpanel",0),v(1,"async")),r&2){let S;p((S=b(1,1,c.notification$))?0:-1,S)}},dependencies:[M,k,R,P,y,g,I],encapsulation:2});let a=o;return a})();export{Q as DetailComponent};
1
+ import{b as w}from"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import{b as k}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{b as T,e as P,g as R}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as g,B as M,w as y,y as I}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as E,Nc as i,Oc as l,Pc as D,aa as C,ac as m,cc as p,hc as _,ic as t,id as v,jc as e,jd as b,kd as x,ob as d,ra as u,v as h,yc as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function B(a,o){if(a&1&&(t(0,"div",9)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"Perflog"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n.Perflog)}}function L(a,o){if(a&1&&(t(0,"div",15)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"StackTrace"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n==null?null:n.StackTrace)}}function N(a,o){if(a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Back"),e()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),i(11,"General"),e()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),i(17,"Created Date"),e(),t(18,"div")(19,"span"),i(20),v(21,"date"),e()()()(),t(22,"div",9)(23,"div",10)(24,"label"),i(25,"Status"),e(),t(26,"div")(27,"span"),i(28),e()()()()(),t(29,"div",11)(30,"div",9)(31,"div",10)(32,"label"),i(33,"Duration"),e(),t(34,"div")(35,"span"),i(36),v(37,"number"),e()()()(),t(38,"div",9)(39,"div",10)(40,"label"),i(41,"Label"),e(),t(42,"div")(43,"span"),i(44),e()()()()()()()()(),t(45,"div",3)(46,"div",9)(47,"div",12)(48,"div",6)(49,"h5"),i(50,"Message"),e()(),t(51,"div",7)(52,"div",13)(53,"div",14)(54,"pre"),i(55),e()()()()()(),m(56,B,10,1,"div",9),m(57,L,10,1,"div",15),e()()()()),a&2){let n=o;_("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),l(x(21,10,n.Created,"dd MMM yyyy HH:mm:ss")),d(8),l(n.StatusLabel),d(8),D("",x(37,13,n.DurationInSecond,"1.1-1")," s"),d(8),l(n.Label),d(11),l(n.Message),d(),p(n!=null&&n.Perflog?56:-1),d(),p(n!=null&&n.StackTrace?57:-1)}}var Q=(()=>{let o=class o{constructor(){this.activatedRoute=u(T),this.notificationService=u(w)}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(C(s=>{let r=s.ID;return this.notificationService.getNotificationDetail(r).pipe(h(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};o.\u0275fac=function(r){return new(r||o)},o.\u0275cmp=E({type:o,selectors:[["app-detail"]],decls:2,vars:3,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/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"],[1,"col-sm-12"]],template:function(r,c){if(r&1&&(m(0,N,58,16,"mainpanel",0),v(1,"async")),r&2){let S;p((S=b(1,1,c.notification$))?0:-1,S)}},dependencies:[M,k,R,P,y,g,I],encapsulation:2});let a=o;return a})();export{Q as DetailComponent};
@@ -1,4 +1,4 @@
1
- import{a as j,b as G,c as z,d as q,e as J,f as K}from"./chunk-3WGAMHZW.js";import{b as $}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as R}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as W,c as F,h as A,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as P}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{u as O}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as b,Ic as y,Nb as S,Nc as p,Oc as U,Rc as k,Sc as B,Tc as M,_c as L,ac as C,ad as V,cc as x,ec as w,fc as v,gc as E,hc as m,ic as i,jc as o,kc as d,lb as I,ma as T,ob as s,ra as g,rc as _,tb as N,ud as D,wc as h,ya as u,yc as c,za as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(()=>{let t=class t{constructor(){this.httpService=g(P)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var te=e=>({"background-color":e});function ne(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),U(a.column)}}function ie(e,t){if(e&1&&(i(0,"td"),d(1,"span",4),o()),e&2){let a=t.$implicit,n=c().$implicit;s(),m("innerHTML",n[a.prop],I)}}function oe(e,t){if(e&1&&(i(0,"tr",3),v(1,ie,2,1,"td",null,w),o()),e&2){let a=t.$implicit,n=c();m("ngStyle",V(1,te,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),E(n.configs())}}var Y=(()=>{let t=class t{constructor(){this.configs=D([]),this.data=D([]),this.status=D(void 0),this.eventClose=new N}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),v(4,ne,2,1,"th",null,w),o()(),i(6,"tbody"),v(7,oe,3,3,"tr",3,w),o()()()),r&2&&(s(4),E(l.configs()),s(3),E(l.data()))},dependencies:[O],encapsulation:2});let e=t;return e})();function re(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onNewStepperState(l))}),d(1,"i",18),p(2," New "),o()}}function ae(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a),c();let r=y(11);return f(r.previous())}),p(1," Back "),o()}}function le(e,t){if(e&1){let a=_();i(0,"button",19),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function pe(e,t){if(e&1){let a=_();i(0,"button",20),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=c();m("disabled",!a.urls)}}function se(e,t){e&1&&(d(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function ce(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function me(e,t){e&1&&(d(0,"i",29),i(1,"span"),p(2,"Download"),o())}function de(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),M("ngModelChange",function(r){u(a);let l=c();return B(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=c();s(),m("placeholder",a.urlPlaceholder),k("ngModel",a.urls)}}function ue(e,t){e&1&&(d(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function fe(e,t){if(e&1&&(i(0,"div",22),d(1,"app-response-api-list",32),o()),e&2){let a=c();s(),m("data",a.downloadResponses)("configs",a.configs)}}function _e(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function he(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function ge(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var Ae=(()=>{let t=class t{constructor(){this.downloadService=g(X),this.authService=g(R),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
1
+ import{a as j,b as G,c as z,d as q,e as J,f as K}from"./chunk-3WGAMHZW.js";import{b as $}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as R}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as W,c as F,h as A,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as P}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{u as O}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as b,Ic as y,Nb as S,Nc as p,Oc as U,Rc as k,Sc as B,Tc as M,_c as L,ac as C,ad as V,cc as x,ec as w,fc as v,gc as E,hc as m,ic as i,jc as o,kc as d,lb as I,ma as T,ob as s,ra as g,rc as _,tb as N,ud as D,wc as h,ya as u,yc as c,za as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(()=>{let t=class t{constructor(){this.httpService=g(P)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var te=e=>({"background-color":e});function ne(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),U(a.column)}}function ie(e,t){if(e&1&&(i(0,"td"),d(1,"span",4),o()),e&2){let a=t.$implicit,n=c().$implicit;s(),m("innerHTML",n[a.prop],I)}}function oe(e,t){if(e&1&&(i(0,"tr",3),v(1,ie,2,1,"td",null,w),o()),e&2){let a=t.$implicit,n=c();m("ngStyle",V(1,te,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),E(n.configs())}}var Y=(()=>{let t=class t{constructor(){this.configs=D([]),this.data=D([]),this.status=D(void 0),this.eventClose=new N}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),v(4,ne,2,1,"th",null,w),o()(),i(6,"tbody"),v(7,oe,3,3,"tr",3,w),o()()()),r&2&&(s(4),E(l.configs()),s(3),E(l.data()))},dependencies:[O],encapsulation:2});let e=t;return e})();function re(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onNewStepperState(l))}),d(1,"i",18),p(2," New "),o()}}function ae(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a),c();let r=y(11);return f(r.previous())}),p(1," Back "),o()}}function le(e,t){if(e&1){let a=_();i(0,"button",19),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function pe(e,t){if(e&1){let a=_();i(0,"button",20),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=c();m("disabled",!a.urls)}}function se(e,t){e&1&&(d(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function ce(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function me(e,t){e&1&&(d(0,"i",29),i(1,"span"),p(2,"Download"),o())}function de(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),M("ngModelChange",function(r){u(a);let l=c();return B(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=c();s(),m("placeholder",a.urlPlaceholder),k("ngModel",a.urls)}}function ue(e,t){e&1&&(d(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function fe(e,t){if(e&1&&(i(0,"div",22),d(1,"app-response-api-list",32),o()),e&2){let a=c();s(),m("data",a.downloadResponses)("configs",a.configs)}}function _e(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function he(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function ge(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var Ae=(()=>{let t=class t{constructor(){this.downloadService=g(X),this.authService=g(R),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
2
  https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let r=this.urls.split(/\r?\n/);this.downloadService.download(r).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
3
3
  ${n?.Name}
4
4
  </a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-by-url"]],features:[L([{provide:j,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(r,l){if(r&1){let Z=_();i(0,"mainpanel",1)(1,"actions"),C(2,re,3,0,"button",2),C(3,ae,2,0,"button",2),C(4,le,2,0,"button",3),C(5,pe,2,1,"button",4),o(),i(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),h("selectionChange",function(ee){return u(Z),f(l.onStepperChange(ee))}),i(12,"mat-step",9),S(13,se,3,0,"ng-template",10)(14,ce,16,0,"ng-template",11),o(),i(15,"mat-step",12),S(16,me,3,0,"ng-template",10)(17,de,2,2,"ng-template",11),o(),i(18,"mat-step",13),S(19,ue,3,0,"ng-template",10)(20,fe,2,2,"ng-template",11),o(),S(21,_e,2,0,"ng-template",14)(22,he,2,0,"ng-template",15)(23,ge,2,0,"ng-template",16),o()()()()()()}r&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),x(l.stepperState=="FINISH"?2:-1),s(),x(l.stepperState=="DOWNLOAD"?3:-1),s(),x(l.stepperState=="GUIDE"?4:-1),s(),x(l.stepperState=="DOWNLOAD"?5:-1),s(5),m("selectedIndex",1),s(2),m("editable",l.stepperState!="FINISH")("completed",!0),s(3),m("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[$,K,J,G,q,W,F,A,H,Y,z],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
@@ -1 +1 @@
1
- import{a as Se}from"./chunk-MSSRROS6.js";import{a as V}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as Ce,b as ge}from"./chunk-XF4A775R.js";import"./chunk-FH2KAM6J.js";import{c as fe,d as O,e as R}from"./chunk-C67KF7MG.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as me,d as ue}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as de}from"./chunk-WCX3T6LK.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as ce,b as pe}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as se}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import{h as N}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as E}from"./chunk-AGBJEXIM.js";import{b as ee,c as te}from"./chunk-NB2H6KA7.js";import{c as _}from"./chunk-UPRDDI4K.js";import{A as le,c as ie,h as oe,m as re,o as ae}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Z,e as $}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as Y,w as X}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as k,Hb as A,Ia as y,Nb as G,Nc as v,Rc as b,Sc as I,Tc as T,Uc as K,_c as Q,ac as F,ad as J,cc as M,ea as H,hc as f,ic as s,id as w,jc as d,jd as P,kc as j,ma as W,ob as C,oc as z,pc as q,ra as c,rc as D,wc as S,ya as p,yc as g,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as B,b as U}from"./chunk-66YHNWRR.js";var x=(()=>{let l=class l{constructor(){this.authService=c(N),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(n,r){let e=Object.assign([],this.channelOptions),i=[],o;return n.forEach(t=>{o=e.find(u=>u.ID==t?.parent?.id),o&&(o=U(B({},o),{Name:`${t?.parent?.label} - ${t?.label}`,LocationID:t?.id}),i.push(o))}),r.forEach(t=>{o=e.find(u=>u.ID==t.id),o&&i.push(o)}),i}generateFilterLocation(n,r){let e=[],i=[],o=[];return n.length>0?(e=n.map(t=>t.id),i=n.filter(t=>_.IsNotEmpty(t?.parent?.id)).map(t=>t?.parent?.id).filter((t,u,L)=>L.indexOf(t)===u)):(e=[],i=[]),o=r.map(t=>t.id),o=o.concat(i).filter((t,u,L)=>L.indexOf(t)===u),{locationIds:e,channelIds:o}}};l.\u0275fac=function(r){return new(r||l)},l.\u0275prov=W({token:l,factory:l.\u0275fac});let a=l;return a})();var ye=a=>[a];function ve(a,l){if(a&1){let m=D();s(0,"button",17),S("click",function(){p(m);let r=g(2),e=g();return h(e.onUpdateItems(r))}),j(1,"i",18),v(2," Update "),d()}}function be(a,l){if(a&1&&(z(0),F(1,ve,3,0,"button",16),q()),a&2){let m=g(),n=g();C(),M(n.productService.hasSelectionVariant(m)?1:-1)}}function Ie(a,l){if(a&1&&(s(0,"actions")(1,"div",14),G(2,be,2,1,"ng-container",15),d()()),a&2){let m=g();C(2),f("ngxPermissionsOnly",J(1,ye,m.inventoryUpdateRole))}}function we(a,l){if(a&1){let m=D();s(0,"app-table",19),S("onToggle",function(r){p(m);let e=g();return h(e.onShowDifferenceStock(r))})("onSubmit",function(r){p(m);let e=g();return h(e.updateStockByVariant(r))}),d()}if(a&2){let m=g();f("data",l)("channel",m.channels())("showProductToggle",!0)("hiddenIPOSInventory",m.searchFilter.HiddenIPOSInventory)}}var st=(()=>{let l=class l{constructor(){this.http=c($),this.toastr=c(Z),this.dialog=c(se),this.productService=c(de),this.authService=c(N),this.mainPanelService=c(ce),this.placeholderService=c(me),this.paginationService=c(O),this.multiChannelService=c(x),this.updateResHandling=c(R),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=y([]),this.selectedChannels=y([]),this.channels=y([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.searchPlaceholder=y("Search ..."),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(H(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:V.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory,SearchType:n.Filter.SearchType,NumberFilterComparator:n.Filter.NumberFilterComparator},this.searchFilter=n.Filter,this.initSearchPlaceholder(),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onChannelChange(n=[]){let r=n.filter(i=>_.isValidGUID(i.id)==!1),e=n.filter(i=>_.isValidGUID(i.id));this.selectedLocations.set(r),this.selectedChannels.set(e)}onSearch(n){let r=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(r);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=n,this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,r){if(n.length>0){let e=[];n.forEach(t=>{t.Channel?.forEach(u=>{e.push({ChannelItemID:u?.ChannelItemID,ChannelVariationID:u?.ChannelVariationID,Inventory:t.Inventory,LocationID:u?.LocationID})})});let o={ListChannelID:r.filter(t=>t.selected).map(t=>t.ID),List:e};this.http.post(E.UpdateInventoryChannel,o).subscribe(t=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n){let r=n.InventoryMultiwarehouse[0]?.LocationID,e={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:r};this.http.post(E.UpdateUpdateQuantityByItem,e).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(i)})}handlingUpdateStock(n){if(n){let r=n?.Response?.Fail_list,e=n?.Response?.Success_list;this.updateResHandling.responseHandling(e,r,"Stock")}else this.toastr.error(n?.Exception,"Error")}onShowDifferenceStock(n){n?this.searchFilter.filterModel=V.DIFFERENCE:this.searchFilter.filterModel=V.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let r=this.productService.selectedVariantProduct(n),e=this.channelOptions.filter(i=>this.channels()?.find(o=>o.ID===i.ID));this.dialog.open(Ce,{data:{selectedItems:r,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(k(i=>_.IsNotEmpty(i))).subscribe(i=>{this.updateStock(r,i)})}};l.\u0275fac=function(r){return new(r||l)},l.\u0275cmp=A({type:l,selectors:[["app-multi-channel-comparison"]],features:[Q([O,x,R])],decls:28,vars:25,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"mb-5"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(r,e){if(r&1){let i=D();s(0,"mainpanel",0),S("onSubmit",function(t){return p(i),h(e.onSearch(t))}),F(1,Ie,3,3,"actions"),w(2,"async"),s(3,"filters"),K(4),w(5,"async"),s(6,"div",1)(7,"label",2),v(8,"Channel"),d(),s(9,"multiwarehouse-tree-select",3),S("onChannelChange",function(t){return p(i),h(e.onChannelChange(t))}),d()(),s(10,"div",1)(11,"filter-query-type",4),T("numberFilterComparatorChange",function(t){return p(i),I(e.searchFilter.NumberFilterComparator,t)||(e.searchFilter.NumberFilterComparator=t),h(t)})("searchTypeChange",function(t){return p(i),I(e.searchFilter.SearchType,t)||(e.searchFilter.SearchType=t),h(t)}),d()(),s(12,"div",1)(13,"label",5),v(14,"PageNumber"),d(),s(15,"input",6),T("ngModelChange",function(t){return p(i),I(e.searchFilter.PageNumber,t)||(e.searchFilter.PageNumber=t),h(t)}),d()(),s(16,"div")(17,"label",7),v(18,"Page Size"),d(),s(19,"input",8),T("ngModelChange",function(t){return p(i),I(e.searchFilter.RowCount,t)||(e.searchFilter.RowCount=t),h(t)}),d()()(),s(20,"content")(21,"div",9)(22,"div",10)(23,"div",11),F(24,we,1,4,"app-table",12),w(25,"async"),s(26,"infinite-paginator",13),w(27,"async"),S("onNextPage",function(){return p(i),h(e.paginationService.onNextPage(e.searchFilter))})("onLastPage",function(){return p(i),h(e.paginationService.onLastPage(e.searchFilter))})("onGetRowCount",function(){return p(i),h(e.paginationService.getRowCount(e.searchFilter))}),d()()()()()()}if(r&2){let i,o;f("hideSearchBox",!1)("searchBoxPlaceHolder",e.searchPlaceholder()),C(),M((i=P(2,17,e.paginationService.data$))?1:-1,i);let t=P(5,19,e.loader$);C(8),f("multiple",!0),C(2),f("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),b("numberFilterComparator",e.searchFilter.NumberFilterComparator),f("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),b("searchType",e.searchFilter.SearchType),C(4),b("ngModel",e.searchFilter.PageNumber),C(4),b("ngModel",e.searchFilter.RowCount),C(5),M((o=P(25,21,e.paginationService.data$))?24:-1,o),C(2),f("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",P(27,23,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage())}},dependencies:[Y,pe,ge,le,ie,ae,oe,re,fe,Se,te,ee,he,ue,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=l;return a})();export{st as MultiChannelComparison};
1
+ import{a as Se}from"./chunk-MSSRROS6.js";import{a as V}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as Ce,b as ge}from"./chunk-CBULW22C.js";import"./chunk-FH2KAM6J.js";import{c as fe,d as O,e as R}from"./chunk-C67KF7MG.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as me,d as ue}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as de}from"./chunk-FPJTI4LM.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as ce,b as pe}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as se}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import{h as N}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as E}from"./chunk-AGBJEXIM.js";import{b as ee,c as te}from"./chunk-NB2H6KA7.js";import{c as _}from"./chunk-UPRDDI4K.js";import{A as le,c as ie,h as oe,m as re,o as ae}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Z,e as $}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as Y,w as X}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as k,Hb as A,Ia as y,Nb as G,Nc as v,Rc as b,Sc as I,Tc as T,Uc as K,_c as Q,ac as F,ad as J,cc as M,ea as H,hc as f,ic as s,id as w,jc as d,jd as P,kc as j,ma as W,ob as C,oc as z,pc as q,ra as c,rc as D,wc as S,ya as p,yc as g,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as B,b as U}from"./chunk-66YHNWRR.js";var x=(()=>{let l=class l{constructor(){this.authService=c(N),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(n,r){let e=Object.assign([],this.channelOptions),i=[],o;return n.forEach(t=>{o=e.find(u=>u.ID==t?.parent?.id),o&&(o=U(B({},o),{Name:`${t?.parent?.label} - ${t?.label}`,LocationID:t?.id}),i.push(o))}),r.forEach(t=>{o=e.find(u=>u.ID==t.id),o&&i.push(o)}),i}generateFilterLocation(n,r){let e=[],i=[],o=[];return n.length>0?(e=n.map(t=>t.id),i=n.filter(t=>_.IsNotEmpty(t?.parent?.id)).map(t=>t?.parent?.id).filter((t,u,L)=>L.indexOf(t)===u)):(e=[],i=[]),o=r.map(t=>t.id),o=o.concat(i).filter((t,u,L)=>L.indexOf(t)===u),{locationIds:e,channelIds:o}}};l.\u0275fac=function(r){return new(r||l)},l.\u0275prov=W({token:l,factory:l.\u0275fac});let a=l;return a})();var ye=a=>[a];function ve(a,l){if(a&1){let m=D();s(0,"button",17),S("click",function(){p(m);let r=g(2),e=g();return h(e.onUpdateItems(r))}),j(1,"i",18),v(2," Update "),d()}}function be(a,l){if(a&1&&(z(0),F(1,ve,3,0,"button",16),q()),a&2){let m=g(),n=g();C(),M(n.productService.hasSelectionVariant(m)?1:-1)}}function Ie(a,l){if(a&1&&(s(0,"actions")(1,"div",14),G(2,be,2,1,"ng-container",15),d()()),a&2){let m=g();C(2),f("ngxPermissionsOnly",J(1,ye,m.inventoryUpdateRole))}}function we(a,l){if(a&1){let m=D();s(0,"app-table",19),S("onToggle",function(r){p(m);let e=g();return h(e.onShowDifferenceStock(r))})("onSubmit",function(r){p(m);let e=g();return h(e.updateStockByVariant(r))}),d()}if(a&2){let m=g();f("data",l)("channel",m.channels())("showProductToggle",!0)("hiddenIPOSInventory",m.searchFilter.HiddenIPOSInventory)}}var st=(()=>{let l=class l{constructor(){this.http=c($),this.toastr=c(Z),this.dialog=c(se),this.productService=c(de),this.authService=c(N),this.mainPanelService=c(ce),this.placeholderService=c(me),this.paginationService=c(O),this.multiChannelService=c(x),this.updateResHandling=c(R),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=y([]),this.selectedChannels=y([]),this.channels=y([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.searchPlaceholder=y("Search ..."),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(H(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:V.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory,SearchType:n.Filter.SearchType,NumberFilterComparator:n.Filter.NumberFilterComparator},this.searchFilter=n.Filter,this.initSearchPlaceholder(),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onChannelChange(n=[]){let r=n.filter(i=>_.isValidGUID(i.id)==!1),e=n.filter(i=>_.isValidGUID(i.id));this.selectedLocations.set(r),this.selectedChannels.set(e)}onSearch(n){let r=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(r);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=n,this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,r){if(n.length>0){let e=[];n.forEach(t=>{t.Channel?.forEach(u=>{e.push({ChannelItemID:u?.ChannelItemID,ChannelVariationID:u?.ChannelVariationID,Inventory:t.Inventory,LocationID:u?.LocationID})})});let o={ListChannelID:r.filter(t=>t.selected).map(t=>t.ID),List:e};this.http.post(E.UpdateInventoryChannel,o).subscribe(t=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n){let r=n.InventoryMultiwarehouse[0]?.LocationID,e={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:r};this.http.post(E.UpdateUpdateQuantityByItem,e).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(i)})}handlingUpdateStock(n){if(n){let r=n?.Response?.Fail_list,e=n?.Response?.Success_list;this.updateResHandling.responseHandling(e,r,"Stock")}else this.toastr.error(n?.Exception,"Error")}onShowDifferenceStock(n){n?this.searchFilter.filterModel=V.DIFFERENCE:this.searchFilter.filterModel=V.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let r=this.productService.selectedVariantProduct(n),e=this.channelOptions.filter(i=>this.channels()?.find(o=>o.ID===i.ID));this.dialog.open(Ce,{data:{selectedItems:r,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(k(i=>_.IsNotEmpty(i))).subscribe(i=>{this.updateStock(r,i)})}};l.\u0275fac=function(r){return new(r||l)},l.\u0275cmp=A({type:l,selectors:[["app-multi-channel-comparison"]],features:[Q([O,x,R])],decls:28,vars:25,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"mb-5"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(r,e){if(r&1){let i=D();s(0,"mainpanel",0),S("onSubmit",function(t){return p(i),h(e.onSearch(t))}),F(1,Ie,3,3,"actions"),w(2,"async"),s(3,"filters"),K(4),w(5,"async"),s(6,"div",1)(7,"label",2),v(8,"Channel"),d(),s(9,"multiwarehouse-tree-select",3),S("onChannelChange",function(t){return p(i),h(e.onChannelChange(t))}),d()(),s(10,"div",1)(11,"filter-query-type",4),T("numberFilterComparatorChange",function(t){return p(i),I(e.searchFilter.NumberFilterComparator,t)||(e.searchFilter.NumberFilterComparator=t),h(t)})("searchTypeChange",function(t){return p(i),I(e.searchFilter.SearchType,t)||(e.searchFilter.SearchType=t),h(t)}),d()(),s(12,"div",1)(13,"label",5),v(14,"PageNumber"),d(),s(15,"input",6),T("ngModelChange",function(t){return p(i),I(e.searchFilter.PageNumber,t)||(e.searchFilter.PageNumber=t),h(t)}),d()(),s(16,"div")(17,"label",7),v(18,"Page Size"),d(),s(19,"input",8),T("ngModelChange",function(t){return p(i),I(e.searchFilter.RowCount,t)||(e.searchFilter.RowCount=t),h(t)}),d()()(),s(20,"content")(21,"div",9)(22,"div",10)(23,"div",11),F(24,we,1,4,"app-table",12),w(25,"async"),s(26,"infinite-paginator",13),w(27,"async"),S("onNextPage",function(){return p(i),h(e.paginationService.onNextPage(e.searchFilter))})("onLastPage",function(){return p(i),h(e.paginationService.onLastPage(e.searchFilter))})("onGetRowCount",function(){return p(i),h(e.paginationService.getRowCount(e.searchFilter))}),d()()()()()()}if(r&2){let i,o;f("hideSearchBox",!1)("searchBoxPlaceHolder",e.searchPlaceholder()),C(),M((i=P(2,17,e.paginationService.data$))?1:-1,i);let t=P(5,19,e.loader$);C(8),f("multiple",!0),C(2),f("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),b("numberFilterComparator",e.searchFilter.NumberFilterComparator),f("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),b("searchType",e.searchFilter.SearchType),C(4),b("ngModel",e.searchFilter.PageNumber),C(4),b("ngModel",e.searchFilter.RowCount),C(5),M((o=P(25,21,e.paginationService.data$))?24:-1,o),C(2),f("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",P(27,23,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage())}},dependencies:[Y,pe,ge,le,ie,ae,oe,re,fe,Se,te,ee,he,ue,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=l;return a})();export{st as MultiChannelComparison};
@@ -1 +1 @@
1
- import{b as O}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as w}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as N}from"./chunk-D6JH2KV4.js";import{b as C}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as b,y,z as g}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as f,Nc as r,Oc as p,ac as S,cc as I,hc as E,ic as e,id as u,jc as t,jd as h,kd as D,ma as x,ob as d,ra as s,v}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var M=(()=>{let i=class i{constructor(){this.httpService=s(N)}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(v(a=>a?.hits[0]?._source))}};i.\u0275fac=function(l){return new(l||i)},i.\u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function q(o,i){if(o&1&&(e(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),t()(),e(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),t(),e(13,"div")(14,"span"),r(15),u(16,"date"),t()()()(),e(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),t(),e(21,"div")(22,"span"),r(23),t()()()(),e(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),t(),e(28,"div")(29,"span"),r(30),t()()()(),e(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),t(),e(35,"div")(36,"span"),r(37),t()()()(),e(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),t(),e(42,"div")(43,"span"),r(44),t()()()()()()()()(),e(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),t()(),e(51,"div",6)(52,"div",11)(53,"div",12)(54,"pre"),r(55),u(56,"json"),t()()()()()(),e(57,"div",8)(58,"div",4)(59,"div",5)(60,"h5"),r(61,"Exception"),t()(),e(62,"div",6)(63,"div",13)(64,"div",12)(65,"pre"),r(66),t()()()()()()()()),o&2){let n=i;d(15),p(D(16,7,n["@timestamp"],"dd MMM yyyy HH:mm:ss")),d(8),p(n==null||n.error==null?null:n.error.number),d(7),p(n==null?null:n.channelName),d(7),p(n==null?null:n.shopId),d(7),p(n==null?null:n.message),d(11),p(h(56,10,n==null||n.error==null?null:n.error.request)),d(11),p(n==null||n.error==null?null:n.error.response)}}var z=(()=>{let i=class i{constructor(){this.activatedRoute=s(C),this.exceptionService=s(M),this.authService=s(w),this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(m?.ID).pipe(v(l=>{let a=l;return{"@timestamp":a["@timestamp"]||a["@timestamp_received"],error:{number:a?.error?.number,request:JSON.parse(a?.error?.request),response:JSON.parse(a?.error?.response)},channelName:a?.channelId!=null?this.channelOptions.find(c=>c.ID===a?.channelId)?.Name:a?.shopId,shopId:a?.shopId,message:a?.message}}))}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=f({type:i,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(l,a){if(l&1&&(e(0,"mainpanel",0)(1,"content"),S(2,q,67,12,"div",1),u(3,"async"),t()()),l&2){let c;E("headerTitle","Order #"+a.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),d(2),I((c=h(3,4,a.exceptionDetail$))?2:-1,c)}},dependencies:[O,b,g,y],encapsulation:2});let o=i;return o})();export{z as ExceptionDetailComponent};
1
+ import{b as O}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as w}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as N}from"./chunk-D6JH2KV4.js";import{b as C}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as b,y,z as g}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as f,Nc as r,Oc as p,ac as S,cc as I,hc as E,ic as e,id as u,jc as t,jd as h,kd as D,ma as x,ob as d,ra as s,v}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var M=(()=>{let i=class i{constructor(){this.httpService=s(N)}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(v(a=>a?.hits[0]?._source))}};i.\u0275fac=function(l){return new(l||i)},i.\u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function q(o,i){if(o&1&&(e(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),t()(),e(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),t(),e(13,"div")(14,"span"),r(15),u(16,"date"),t()()()(),e(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),t(),e(21,"div")(22,"span"),r(23),t()()()(),e(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),t(),e(28,"div")(29,"span"),r(30),t()()()(),e(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),t(),e(35,"div")(36,"span"),r(37),t()()()(),e(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),t(),e(42,"div")(43,"span"),r(44),t()()()()()()()()(),e(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),t()(),e(51,"div",6)(52,"div",11)(53,"div",12)(54,"pre"),r(55),u(56,"json"),t()()()()()(),e(57,"div",8)(58,"div",4)(59,"div",5)(60,"h5"),r(61,"Exception"),t()(),e(62,"div",6)(63,"div",13)(64,"div",12)(65,"pre"),r(66),t()()()()()()()()),o&2){let n=i;d(15),p(D(16,7,n["@timestamp"],"dd MMM yyyy HH:mm:ss")),d(8),p(n==null||n.error==null?null:n.error.number),d(7),p(n==null?null:n.channelName),d(7),p(n==null?null:n.shopId),d(7),p(n==null?null:n.message),d(11),p(h(56,10,n==null||n.error==null?null:n.error.request)),d(11),p(n==null||n.error==null?null:n.error.response)}}var z=(()=>{let i=class i{constructor(){this.activatedRoute=s(C),this.exceptionService=s(M),this.authService=s(w),this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(m?.ID).pipe(v(l=>{let a=l;return{"@timestamp":a["@timestamp"]||a["@timestamp_received"],error:{number:a?.error?.number,request:JSON.parse(a?.error?.request),response:JSON.parse(a?.error?.response)},channelName:a?.channelId!=null?this.channelOptions.find(c=>c.ID===a?.channelId)?.Name:a?.shopId,shopId:a?.shopId,message:a?.message}}))}};i.\u0275fac=function(l){return new(l||i)},i.\u0275cmp=f({type:i,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(l,a){if(l&1&&(e(0,"mainpanel",0)(1,"content"),S(2,q,67,12,"div",1),u(3,"async"),t()()),l&2){let c;E("headerTitle","Order #"+a.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),d(2),I((c=h(3,4,a.exceptionDetail$))?2:-1,c)}},dependencies:[O,b,g,y],encapsulation:2});let o=i;return o})();export{z as ExceptionDetailComponent};
@@ -1,4 +1,4 @@
1
- import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import{a as _i,b as yi}from"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as gi,b as fi}from"./chunk-JU4ZP3HI.js";import{a as li}from"./chunk-3T5VLB63.js";import{d as ft,e as Bt}from"./chunk-STOW2RQN.js";import{a as di}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import{a as We,b as hi,c as mi}from"./chunk-KOUB5HRK.js";import{a as Qe}from"./chunk-QETZ5VDX.js";import{a as gt,d as ci,e as ui}from"./chunk-WIRXMAIF.js";import{b as Ke}from"./chunk-S22I47XG.js";import{a as K}from"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{a as M,e as F,f as ri}from"./chunk-C4MTEDSW.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-JMRRXRKO.js";import{b as ai}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{G as ei,U as ht,V as qe,ea as ti,fa as Ft,ga as Lt,ia as ii,la as ie,ma as q,ua as ce}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ni}from"./chunk-ZSUWHVKX.js";import{h as Yt}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Zt,c as Xt}from"./chunk-NB2H6KA7.js";import{c as Dt}from"./chunk-UPRDDI4K.js";import{A as we,a as Ie,b as oi,g as mt,h as Ne,m as He}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Wt,e as Jt}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as qt,B as ne,D as Oe,q as Ve,s as pt,t as Le,u as ut,v as be,w as jt}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as Mt,Aa as S,Ab as ke,Bc as v,Ca as tt,Cc as ae,Dc as b,Ec as _,Fd as T,Gd as Z,Hb as I,Ia as it,Ib as le,Ic as lt,Jb as Rt,Jc as Re,K as kt,Lb as E,Lc as ze,Mb as se,Mc as C,Nb as p,Nc as V,Oc as $e,Pa as x,Pc as te,Rc as Me,Sc as De,Tc as Fe,Z as et,_b as D,_c as oe,ac as me,ad as G,bd as Se,cc as ge,dc as Ut,dd as st,ea as Ue,ed as dt,f as Pe,fc as at,fd as je,gc as rt,gd as $t,hc as l,ic as h,id as Te,jc as m,jd as ve,kc as B,la as xe,lc as U,ld as ye,ma as ee,mb as nt,mc as $,na as re,nc as L,ob as s,oc as O,pa as de,pc as N,pd as ct,qc as k,ra as z,rc as H,sc as X,tb as R,ub as ot,ud as fe,v as Gt,wc as P,ya as y,yc as c,za as w}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var Ti=`
1
+ import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-3PUUKJCQ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import{a as _i,b as yi}from"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as gi,b as fi}from"./chunk-JU4ZP3HI.js";import{a as li}from"./chunk-3T5VLB63.js";import{d as ft,e as Bt}from"./chunk-STOW2RQN.js";import{a as di}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import{a as We,b as hi,c as mi}from"./chunk-KOUB5HRK.js";import{a as Qe}from"./chunk-QETZ5VDX.js";import{a as gt,d as ci,e as ui}from"./chunk-WIRXMAIF.js";import{b as Ke}from"./chunk-S22I47XG.js";import{a as K}from"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{a as M,e as F,f as ri}from"./chunk-C4MTEDSW.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-JMRRXRKO.js";import{b as ai}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{G as ei,U as ht,V as qe,ea as ti,fa as Ft,ga as Lt,ia as ii,la as ie,ma as q,ua as ce}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ni}from"./chunk-ZSUWHVKX.js";import{h as Yt}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Zt,c as Xt}from"./chunk-NB2H6KA7.js";import{c as Dt}from"./chunk-UPRDDI4K.js";import{A as we,a as Ie,b as oi,g as mt,h as Ne,m as He}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Wt,e as Jt}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as qt,B as ne,D as Oe,q as Ve,s as pt,t as Le,u as ut,v as be,w as jt}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as Mt,Aa as S,Ab as ke,Bc as v,Ca as tt,Cc as ae,Dc as b,Ec as _,Fd as T,Gd as Z,Hb as I,Ia as it,Ib as le,Ic as lt,Jb as Rt,Jc as Re,K as kt,Lb as E,Lc as ze,Mb as se,Mc as C,Nb as p,Nc as V,Oc as $e,Pa as x,Pc as te,Rc as Me,Sc as De,Tc as Fe,Z as et,_b as D,_c as oe,ac as me,ad as G,bd as Se,cc as ge,dc as Ut,dd as st,ea as Ue,ed as dt,f as Pe,fc as at,fd as je,gc as rt,gd as $t,hc as l,ic as h,id as Te,jc as m,jd as ve,kc as B,la as xe,lc as U,ld as ye,ma as ee,mb as nt,mc as $,na as re,nc as L,ob as s,oc as O,pa as de,pc as N,pd as ct,qc as k,ra as z,rc as H,sc as X,tb as R,ub as ot,ud as fe,v as Gt,wc as P,ya as y,yc as c,za as w}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var Ti=`
2
2
  .p-datatable {
3
3
  position: relative;
4
4
  display: block;
@@ -1 +1 @@
1
- import{a as e}from"./chunk-TUJBAZ5Q.js";import{a as d,b as h}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as m}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as l,ic as p,jc as c,kc as a,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var u=(()=>{let n=class n{constructor(){this.ObjectlogTabs=[{Title:"Channel Push Log Exception",Url:"/menu/log/exception"},{Title:"Channel Push Log",Url:"/menu/log/rawlog"},{Title:"POS Sync Order Log",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"},{Title:"Flush Cache ",Url:"/menu/log/flush-cache"}]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=i({type:n,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,s){o&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),c()()(),a(4,"router-outlet")),o&2&&(r(3),l("Tabs",s.ObjectlogTabs))},dependencies:[h,d,m],encapsulation:2});let t=n;return t})();var b=[{path:"",component:u,children:[{path:"",redirectTo:"exception",pathMatch:"full"},{path:"order",loadComponent(){return import("./chunk-BGJEGBP5.js").then(t=>t.OrderComponent)},canActivate:[e],data:{title:"Order Log"}},{path:"inventory/sync-inventory",loadComponent(){return import("./chunk-7XA3VQEB.js").then(t=>t.InventoryLogComponent)},canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"rawlog",loadComponent(){return import("./chunk-PQM7IB5J.js").then(t=>t.RawLogComponent)},canActivate:[e],data:{title:"Raw Log"}},{path:"rawlog/detail",loadComponent(){return import("./chunk-HWMXSD34.js").then(t=>t.RawDetailComponent)},canActivate:[e],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",loadComponent(){return import("./chunk-MAT6VW43.js").then(t=>t.InventoryDetailComponent)},canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",loadComponent(){return import("./chunk-DMENVSHH.js").then(t=>t.OrderdetailComponent)},canActivate:[e],data:{title:"Order Details"}},{path:"order/detail-user",loadComponent(){return import("./chunk-WD3ADLM3.js").then(t=>t.OrderdetailUserComponent)},canActivate:[e],data:{title:"Order User Details"}},{path:"exception",loadComponent(){return import("./chunk-DQXBBV26.js").then(t=>t.ExceptionLogComponent)},canActivate:[e],data:{title:"Exception Log"}},{path:"exception/detail",loadComponent(){return import("./chunk-42GDFAAQ.js").then(t=>t.ExceptionDetailComponent)},canActivate:[e],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-PKYMYIGB.js").then(t=>t.InventoryAsyncLogComponent),canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-Z3YSNML6.js").then(t=>t.InventoryAsyncDetailComponent),canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-YYKWI27U.js").then(t=>t.ChannelLogComponent)},canActivate:[e],data:{title:"Authorization Log"}},{path:"flush-cache",loadComponent(){return import("./chunk-CIWFLDCI.js").then(t=>t.FlushCacheComponent)},canActivate:[e],data:{title:"Flush Cache"}}]}];export{b as routes};
1
+ import{a as e}from"./chunk-MYJZFEAZ.js";import{a as d,b as h}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as m}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as l,ic as p,jc as c,kc as a,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var u=(()=>{let n=class n{constructor(){this.ObjectlogTabs=[{Title:"Channel Push Log Exception",Url:"/menu/log/exception"},{Title:"Channel Push Log",Url:"/menu/log/rawlog"},{Title:"POS Sync Order Log",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"},{Title:"Flush Cache ",Url:"/menu/log/flush-cache"}]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=i({type:n,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,s){o&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),c()()(),a(4,"router-outlet")),o&2&&(r(3),l("Tabs",s.ObjectlogTabs))},dependencies:[h,d,m],encapsulation:2});let t=n;return t})();var b=[{path:"",component:u,children:[{path:"",redirectTo:"exception",pathMatch:"full"},{path:"order",loadComponent(){return import("./chunk-FS3VTRY2.js").then(t=>t.OrderComponent)},canActivate:[e],data:{title:"Order Log"}},{path:"inventory/sync-inventory",loadComponent(){return import("./chunk-DIDUSCV7.js").then(t=>t.InventoryLogComponent)},canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"rawlog",loadComponent(){return import("./chunk-XCGXT3P7.js").then(t=>t.RawLogComponent)},canActivate:[e],data:{title:"Raw Log"}},{path:"rawlog/detail",loadComponent(){return import("./chunk-HWMXSD34.js").then(t=>t.RawDetailComponent)},canActivate:[e],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",loadComponent(){return import("./chunk-MAT6VW43.js").then(t=>t.InventoryDetailComponent)},canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",loadComponent(){return import("./chunk-DMENVSHH.js").then(t=>t.OrderdetailComponent)},canActivate:[e],data:{title:"Order Details"}},{path:"order/detail-user",loadComponent(){return import("./chunk-WD3ADLM3.js").then(t=>t.OrderdetailUserComponent)},canActivate:[e],data:{title:"Order User Details"}},{path:"exception",loadComponent(){return import("./chunk-KMNWLBEP.js").then(t=>t.ExceptionLogComponent)},canActivate:[e],data:{title:"Exception Log"}},{path:"exception/detail",loadComponent(){return import("./chunk-S2ZFBPPJ.js").then(t=>t.ExceptionDetailComponent)},canActivate:[e],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-PKYMYIGB.js").then(t=>t.InventoryAsyncLogComponent),canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-Z3YSNML6.js").then(t=>t.InventoryAsyncDetailComponent),canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-N4MYHIMN.js").then(t=>t.ChannelLogComponent)},canActivate:[e],data:{title:"Authorization Log"}},{path:"flush-cache",loadComponent(){return import("./chunk-CIWFLDCI.js").then(t=>t.FlushCacheComponent)},canActivate:[e],data:{title:"Flush Cache"}}]}];export{b as routes};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-TUJBAZ5Q.js";import{a as l,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as d,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as p,ic as m,jc as c,kc as n,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var f=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,h){o&1&&(m(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),c()()(),n(4,"router-outlet")),o&2&&(a(3),p("Tabs",h.tabs))},dependencies:[u,l,s,d],encapsulation:2});let t=e;return t})();var I=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-5NJAMQES.js").then(t=>t.OrderApiComponent)},canActivate:[r],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-3TK5BYAY.js").then(t=>t.ProductApiComponent)},canActivate:[r],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-OWLZQ5WE.js").then(t=>t.EscrowApiComponent)},canActivate:[r],data:{title:"Escrow API"}}]}];export{I as routes};
1
+ import{a as r}from"./chunk-MYJZFEAZ.js";import{a as l,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as d,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as p,ic as m,jc as c,kc as n,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var f=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,h){o&1&&(m(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),c()()(),n(4,"router-outlet")),o&2&&(a(3),p("Tabs",h.tabs))},dependencies:[u,l,s,d],encapsulation:2});let t=e;return t})();var I=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-CQBHWYUO.js").then(t=>t.OrderApiComponent)},canActivate:[r],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-7VJ22OLT.js").then(t=>t.ProductApiComponent)},canActivate:[r],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-PHVEBMTE.js").then(t=>t.EscrowApiComponent)},canActivate:[r],data:{title:"Escrow API"}}]}];export{I as routes};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import{a as et}from"./chunk-27DIE2YS.js";import{a as tt}from"./chunk-WCX3T6LK.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as X}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as W}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Q}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as K}from"./chunk-ZSUWHVKX.js";import{h as J}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Y,c as G}from"./chunk-NB2H6KA7.js";import{c as T}from"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as H}from"./chunk-D6JH2KV4.js";import{e as z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,w as q,y as R}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as D,G as P,Hb as O,Nb as L,Nc as c,Oc as N,Pc as _,ac as w,ad as g,bc as $,ca as b,cc as I,ec as B,f as E,fc as A,gc as F,hc as u,ic as o,id as h,jc as r,jd as S,kc as m,kd as j,mb as k,ob as s,oc as M,pc as V,ra as C,rc as y,wc as v,ya as f,yc as p,za as x}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var it=()=>["/menu/products/status/sold-in-channel"],nt=e=>({ID:e}),ot=()=>["/menu/products/status/not-in-pos"],rt=e=>[e];function at(e,a){if(e&1&&c(0),e&2){let i=p().$implicit;_(" ",i.Count," ")}}function ct(e,a){if(e&1){let i=y();o(0,"span",23),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.getLiveProductCount(t.ID,t))}),m(1,"i",24),r()}}function lt(e,a){if(e&1){let i=y();M(0),o(1,"button",25),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.onScanChannel(t))}),m(2,"i",26),c(3," Scan "),r(),V()}}function st(e,a){if(e&1){let i=y();o(0,"tr")(1,"td"),m(2,"img",14),o(3,"span",15),c(4),r()(),o(5,"td",16),w(6,at,1,1)(7,ct,2,0,"span",17),r(),o(8,"td",16)(9,"a",18),c(10),h(11,"number"),r()(),o(12,"td",16)(13,"a",18),c(14),h(15,"number"),r()(),o(16,"td"),c(17),h(18,"date"),r(),o(19,"td")(20,"div",19),L(21,lt,4,0,"ng-container",20),o(22,"button",21),v("click",function(){let t=f(i).$implicit,l=p(2);return x(l.onClearCache(t.ID))}),m(23,"i",22),c(24," Clear "),r()()()()}if(e&2){let i=a.$implicit,n=p(2);s(2),u("src",n.getChannelLogo(i.TypeID),k),s(2),N(i.Name),s(2),I(i.Count!==void 0?6:7),s(3),u("routerLink",D(18,it))("queryParams",g(19,nt,i.ID)),s(),_(" ",S(11,11,i.SoldInChannel)," "),s(3),u("routerLink",D(21,ot))("queryParams",g(22,nt,i.ID)),s(),_(" ",S(15,13,i.NotInPOS)," "),s(3),_(" ",i.LastSync?j(18,15,i.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),s(4),u("ngxPermissionsOnly",g(24,rt,n.scanProductRole))}}function pt(e,a){if(e&1&&(o(0,"div",4)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th"),c(5,"Channel"),r(),o(6,"th",9),c(7," Live Product "),r(),o(8,"th",10),c(9," Sold In Channel "),r(),o(10,"th",11),c(11," Product Not in POS "),r(),o(12,"th",12),c(13,"Last Sync"),r(),m(14,"th",13),r()(),o(15,"tbody"),A(16,st,25,26,"tr",null,B),h(18,"async"),r()()()),e&2){let i,n=p();s(16),F((i=S(18,0,n.channels$))==null?null:i.Data)}}function dt(e,a){e&1&&(o(0,"div",5),m(1,"app-empty-state"),r())}var kt=(()=>{let a=class a{constructor(){this.productService=C(tt),this.toastr=C(H),this.dialog=C(W),this.authService=C(J),this.scanProductRole=K.ProductScan;let n=this.authService;this.destroy$=new E,this.channelOptions=n.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(n,t){this.productService.getTotalProductLive(n).pipe(b(this.destroy$)).subscribe(l=>{t.Count=l.Count})}onScanChannel(n){this.dialog.open(Z,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:n.ID},disabledChannelOption:!0}}).afterClosed().pipe(P(t=>T.IsNotEmpty(t))).subscribe(t=>{this.scanAllProduct(n.ID,t)})}scanAllProduct(n,t){let l=this.productService.findChannelById(n,this.channelOptions);this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).pipe(P(d=>d)).subscribe(d=>{t.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(d,l,!t.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(n){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(n).pipe(b(this.destroy$)).subscribe(l=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(n){return T.getChannelLogoByTypeId(n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=O({type:a,selectors:[["app-channel-statistic"]],decls:8,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"]],template:function(t,l){if(t&1&&(o(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),w(5,pt,19,2,"div",4),h(6,"async"),$(7,dt,2,0,"div",5),r()()()()()),t&2){let d;u("hideSearchBox",!0)("hideSearchDropdown",!0),s(5),I(((d=S(6,3,l.channels$))==null||d.Data==null?null:d.Data.length)>0?5:7)}},dependencies:[X,Q,z,G,Y,et,q,U,R],encapsulation:2});let e=a;return e})();export{kt as ChannelStatisticComponent};
1
+ import{a as Z}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import{a as et}from"./chunk-27DIE2YS.js";import{a as tt}from"./chunk-FPJTI4LM.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as X}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as W}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Q}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as K}from"./chunk-ZSUWHVKX.js";import{h as J}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Y,c as G}from"./chunk-NB2H6KA7.js";import{c as T}from"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as H}from"./chunk-D6JH2KV4.js";import{e as z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,w as q,y as R}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as D,G as P,Hb as O,Nb as L,Nc as c,Oc as N,Pc as _,ac as w,ad as g,bc as $,ca as b,cc as I,ec as B,f as E,fc as A,gc as F,hc as u,ic as o,id as h,jc as r,jd as S,kc as m,kd as j,mb as k,ob as s,oc as M,pc as V,ra as C,rc as y,wc as v,ya as f,yc as p,za as x}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var it=()=>["/menu/products/status/sold-in-channel"],nt=e=>({ID:e}),ot=()=>["/menu/products/status/not-in-pos"],rt=e=>[e];function at(e,a){if(e&1&&c(0),e&2){let i=p().$implicit;_(" ",i.Count," ")}}function ct(e,a){if(e&1){let i=y();o(0,"span",23),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.getLiveProductCount(t.ID,t))}),m(1,"i",24),r()}}function lt(e,a){if(e&1){let i=y();M(0),o(1,"button",25),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.onScanChannel(t))}),m(2,"i",26),c(3," Scan "),r(),V()}}function st(e,a){if(e&1){let i=y();o(0,"tr")(1,"td"),m(2,"img",14),o(3,"span",15),c(4),r()(),o(5,"td",16),w(6,at,1,1)(7,ct,2,0,"span",17),r(),o(8,"td",16)(9,"a",18),c(10),h(11,"number"),r()(),o(12,"td",16)(13,"a",18),c(14),h(15,"number"),r()(),o(16,"td"),c(17),h(18,"date"),r(),o(19,"td")(20,"div",19),L(21,lt,4,0,"ng-container",20),o(22,"button",21),v("click",function(){let t=f(i).$implicit,l=p(2);return x(l.onClearCache(t.ID))}),m(23,"i",22),c(24," Clear "),r()()()()}if(e&2){let i=a.$implicit,n=p(2);s(2),u("src",n.getChannelLogo(i.TypeID),k),s(2),N(i.Name),s(2),I(i.Count!==void 0?6:7),s(3),u("routerLink",D(18,it))("queryParams",g(19,nt,i.ID)),s(),_(" ",S(11,11,i.SoldInChannel)," "),s(3),u("routerLink",D(21,ot))("queryParams",g(22,nt,i.ID)),s(),_(" ",S(15,13,i.NotInPOS)," "),s(3),_(" ",i.LastSync?j(18,15,i.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),s(4),u("ngxPermissionsOnly",g(24,rt,n.scanProductRole))}}function pt(e,a){if(e&1&&(o(0,"div",4)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th"),c(5,"Channel"),r(),o(6,"th",9),c(7," Live Product "),r(),o(8,"th",10),c(9," Sold In Channel "),r(),o(10,"th",11),c(11," Product Not in POS "),r(),o(12,"th",12),c(13,"Last Sync"),r(),m(14,"th",13),r()(),o(15,"tbody"),A(16,st,25,26,"tr",null,B),h(18,"async"),r()()()),e&2){let i,n=p();s(16),F((i=S(18,0,n.channels$))==null?null:i.Data)}}function dt(e,a){e&1&&(o(0,"div",5),m(1,"app-empty-state"),r())}var kt=(()=>{let a=class a{constructor(){this.productService=C(tt),this.toastr=C(H),this.dialog=C(W),this.authService=C(J),this.scanProductRole=K.ProductScan;let n=this.authService;this.destroy$=new E,this.channelOptions=n.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(n,t){this.productService.getTotalProductLive(n).pipe(b(this.destroy$)).subscribe(l=>{t.Count=l.Count})}onScanChannel(n){this.dialog.open(Z,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:n.ID},disabledChannelOption:!0}}).afterClosed().pipe(P(t=>T.IsNotEmpty(t))).subscribe(t=>{this.scanAllProduct(n.ID,t)})}scanAllProduct(n,t){let l=this.productService.findChannelById(n,this.channelOptions);this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).pipe(P(d=>d)).subscribe(d=>{t.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(d,l,!t.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(n){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(n).pipe(b(this.destroy$)).subscribe(l=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(n){return T.getChannelLogoByTypeId(n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=O({type:a,selectors:[["app-channel-statistic"]],decls:8,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"]],template:function(t,l){if(t&1&&(o(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),w(5,pt,19,2,"div",4),h(6,"async"),$(7,dt,2,0,"div",5),r()()()()()),t&2){let d;u("hideSearchBox",!0)("hideSearchDropdown",!0),s(5),I(((d=S(6,3,l.channels$))==null||d.Data==null?null:d.Data.length)>0?5:7)}},dependencies:[X,Q,z,G,Y,et,q,U,R],encapsulation:2});let e=a;return e})();export{kt as ChannelStatisticComponent};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as o}from"./chunk-TUJBAZ5Q.js";import"./chunk-IA7NJXJD.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as p}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,kc as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=i({type:n,selectors:[["app-products"]],decls:1,vars:0,template:function(r,l){r&1&&a(0,"router-outlet")},dependencies:[p],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let t=n;return t})();var f=[{path:"",component:d,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-ZD5PSX3I.js").then(t=>t.routes),canActivate:[o,e]},{path:"download",loadChildren:()=>import("./chunk-TLCH5ENB.js").then(t=>t.routes),canActivate:[o,e]},{path:"upload",loadComponent:()=>import("./chunk-2UKRRVAM.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[o,e]}]}];export{f as routes};
1
+ import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as o}from"./chunk-MYJZFEAZ.js";import"./chunk-IA7NJXJD.js";import"./chunk-O3BS4AC6.js";import"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as p}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,kc as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=i({type:n,selectors:[["app-products"]],decls:1,vars:0,template:function(r,l){r&1&&a(0,"router-outlet")},dependencies:[p],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let t=n;return t})();var f=[{path:"",component:d,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-QJU2YGUH.js").then(t=>t.routes),canActivate:[o,e]},{path:"download",loadChildren:()=>import("./chunk-JEJHGIUU.js").then(t=>t.routes),canActivate:[o,e]},{path:"upload",loadComponent:()=>import("./chunk-ZLJBRQ5V.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[o,e]}]}];export{f as routes};
@@ -1 +1 @@
1
- import{a as $}from"./chunk-RUYX7KTP.js";import{a as Z}from"./chunk-TVEI5B2O.js";import{a as Y}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as U,b as J,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as V}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as q,c as z,h as G,m as H,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as B}from"./chunk-D6JH2KV4.js";import{e as O}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{y as A}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as L,Nb as R,Nc as l,Oc as _,Pc as S,Rc as g,Sc as u,Tc as c,ac as P,ad as D,cc as M,ec as N,fc as E,gc as x,hc as h,ic as i,id as F,jc as n,kc as C,kd as k,mb as v,ob as r,ra as f,rc as I,wc as y,ya as b,yc as w,za as T}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ee=()=>["/menu/log/rawlog/detail"],te=o=>({ID:o});function ie(o,p){if(o&1&&(i(0,"span",17),C(1,"img",18),n(),l(2)),o&2){let a=p.item;r(),h("src",a.Img,v)("alt",a.Name),r(),S(" ",a.Name," ")}}function ne(o,p){if(o&1&&(i(0,"tr")(1,"td")(2,"a",23),l(3),F(4,"date"),n()(),i(5,"td"),l(6),n(),i(7,"td"),l(8),n(),i(9,"td"),l(10),n()()),o&2){let a=p.$implicit;r(2),h("routerLink",W(9,ee))("queryParams",D(10,te,a.id)),r(),S(" ",k(4,6,a.Created,"dd MMM yyyy HH:mm:ss")," "),r(3),_(a.type),r(2),_(a.number),r(2),_(a.message)}}function ae(o,p){if(o&1){let a=I();i(0,"div",15)(1,"table",19)(2,"thead",20)(3,"tr")(4,"th",21),l(5,"Date"),n(),i(6,"th"),l(7,"Type"),n(),i(8,"th"),l(9,"Number"),n(),i(10,"th"),l(11,"Message"),n()()(),i(12,"tbody"),E(13,ne,11,12,"tr",null,N),n()(),i(15,"mat-paginator",22),y("page",function(m){b(a);let e=w();return T(e.changePage(m))}),n()()}if(o&2){let a=w();r(13),x(a.Result),r(2),h("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function oe(o,p){o&1&&(i(0,"div",16),C(1,"app-empty-state"),n())}var be=(()=>{let p=class p{constructor(){this.http=f(B),this._RawLogService=f($),this.authService=f(V),this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(d={}){this.http.post("/api/OrdersLoader/Get",d).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(d){this.filter.Number=d,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(m=>{this._RawLogService.Data=m.hits,this.Result=Array();for(let e of m.hits){let s={id:e._id,message:e._source.message,responseCode:e._source.log.responseCode,processTypeString:e._source.log.processType,type:e._source.log.type,number:e._source.log.number,Created:e._source["@timestamp_received"]};this.Result.push(s)}this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(d){this.filter.PageNumber=d.pageIndex+1,this.Get()}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=L({type:p,selectors:[["app-raw-log"]],decls:28,vars:9,consts:[["headerTitle","Channel Push Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(m,e){m&1&&(i(0,"mainpanel",0),c("textChange",function(t){return u(e.filter.Number,t)||(e.filter.Number=t),t}),y("onSubmit",function(t){return e.Get(t)}),i(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),n(),i(5,"ng-select",2),c("ngModelChange",function(t){return u(e.filter.ChannelID,t)||(e.filter.ChannelID=t),t}),R(6,ie,3,3,"ng-template",3),n()(),i(7,"div",4)(8,"label",5),l(9,"From/To"),n(),i(10,"div",6)(11,"datepicker",7),c("dateChange",function(t){return u(e.filter.From,t)||(e.filter.From=t),t}),n()(),i(12,"div")(13,"datepicker",8),c("dateChange",function(t){return u(e.filter.To,t)||(e.filter.To=t),t}),n()()(),i(14,"div",4)(15,"label",9),l(16,"Page Number"),n(),i(17,"input",10),c("ngModelChange",function(t){return u(e.filter.PageNumber,t)||(e.filter.PageNumber=t),t}),n()(),i(18,"div",4)(19,"label",9),l(20,"Page Size"),n(),i(21,"input",11),c("ngModelChange",function(t){return u(e.filter.RowCount,t)||(e.filter.RowCount=t),t}),n()()(),i(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),P(26,ae,16,3,"div",15)(27,oe,2,0,"div",16),n()()()()()),m&2&&(g("text",e.filter.Number),r(5),h("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),r(6),g("date",e.filter.From),r(2),g("date",e.filter.To),r(4),g("ngModel",e.filter.PageNumber),r(4),g("ngModel",e.filter.RowCount),r(5),M((e.Result==null?null:e.Result.length)>0?26:27))},dependencies:[K,Q,q,z,j,G,H,U,J,Y,O,Z,X,A],encapsulation:2});let o=p;return o})();export{be as RawLogComponent};
1
+ import{a as $}from"./chunk-RUYX7KTP.js";import{a as Z}from"./chunk-TVEI5B2O.js";import{a as Y}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as U,b as J,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as V}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as q,c as z,h as G,m as H,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as B}from"./chunk-D6JH2KV4.js";import{e as O}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{y as A}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as L,Nb as R,Nc as l,Oc as _,Pc as S,Rc as g,Sc as u,Tc as c,ac as P,ad as D,cc as M,ec as N,fc as E,gc as x,hc as h,ic as i,id as F,jc as n,kc as C,kd as k,mb as v,ob as r,ra as f,rc as I,wc as y,ya as b,yc as w,za as T}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ee=()=>["/menu/log/rawlog/detail"],te=o=>({ID:o});function ie(o,p){if(o&1&&(i(0,"span",17),C(1,"img",18),n(),l(2)),o&2){let a=p.item;r(),h("src",a.Img,v)("alt",a.Name),r(),S(" ",a.Name," ")}}function ne(o,p){if(o&1&&(i(0,"tr")(1,"td")(2,"a",23),l(3),F(4,"date"),n()(),i(5,"td"),l(6),n(),i(7,"td"),l(8),n(),i(9,"td"),l(10),n()()),o&2){let a=p.$implicit;r(2),h("routerLink",W(9,ee))("queryParams",D(10,te,a.id)),r(),S(" ",k(4,6,a.Created,"dd MMM yyyy HH:mm:ss")," "),r(3),_(a.type),r(2),_(a.number),r(2),_(a.message)}}function ae(o,p){if(o&1){let a=I();i(0,"div",15)(1,"table",19)(2,"thead",20)(3,"tr")(4,"th",21),l(5,"Date"),n(),i(6,"th"),l(7,"Type"),n(),i(8,"th"),l(9,"Number"),n(),i(10,"th"),l(11,"Message"),n()()(),i(12,"tbody"),E(13,ne,11,12,"tr",null,N),n()(),i(15,"mat-paginator",22),y("page",function(m){b(a);let e=w();return T(e.changePage(m))}),n()()}if(o&2){let a=w();r(13),x(a.Result),r(2),h("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function oe(o,p){o&1&&(i(0,"div",16),C(1,"app-empty-state"),n())}var be=(()=>{let p=class p{constructor(){this.http=f(B),this._RawLogService=f($),this.authService=f(V),this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(d={}){this.http.post("/api/OrdersLoader/Get",d).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(d){this.filter.Number=d,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(m=>{this._RawLogService.Data=m.hits,this.Result=Array();for(let e of m.hits){let s={id:e._id,message:e._source.message,responseCode:e._source.log.responseCode,processTypeString:e._source.log.processType,type:e._source.log.type,number:e._source.log.number,Created:e._source["@timestamp_received"]};this.Result.push(s)}this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(d){this.filter.PageNumber=d.pageIndex+1,this.Get()}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=L({type:p,selectors:[["app-raw-log"]],decls:28,vars:9,consts:[["headerTitle","Channel Push Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(m,e){m&1&&(i(0,"mainpanel",0),c("textChange",function(t){return u(e.filter.Number,t)||(e.filter.Number=t),t}),y("onSubmit",function(t){return e.Get(t)}),i(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),n(),i(5,"ng-select",2),c("ngModelChange",function(t){return u(e.filter.ChannelID,t)||(e.filter.ChannelID=t),t}),R(6,ie,3,3,"ng-template",3),n()(),i(7,"div",4)(8,"label",5),l(9,"From/To"),n(),i(10,"div",6)(11,"datepicker",7),c("dateChange",function(t){return u(e.filter.From,t)||(e.filter.From=t),t}),n()(),i(12,"div")(13,"datepicker",8),c("dateChange",function(t){return u(e.filter.To,t)||(e.filter.To=t),t}),n()()(),i(14,"div",4)(15,"label",9),l(16,"Page Number"),n(),i(17,"input",10),c("ngModelChange",function(t){return u(e.filter.PageNumber,t)||(e.filter.PageNumber=t),t}),n()(),i(18,"div",4)(19,"label",9),l(20,"Page Size"),n(),i(21,"input",11),c("ngModelChange",function(t){return u(e.filter.RowCount,t)||(e.filter.RowCount=t),t}),n()()(),i(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),P(26,ae,16,3,"div",15)(27,oe,2,0,"div",16),n()()()()()),m&2&&(g("text",e.filter.Number),r(5),h("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),r(6),g("date",e.filter.From),r(2),g("date",e.filter.To),r(4),g("ngModel",e.filter.PageNumber),r(4),g("ngModel",e.filter.RowCount),r(5),M((e.Result==null?null:e.Result.length)>0?26:27))},dependencies:[K,Q,q,z,j,G,H,U,J,Y,O,Z,X,A],encapsulation:2});let o=p;return o})();export{be as RawLogComponent};
@@ -1 +1 @@
1
- import{e as ot}from"./chunk-BZWZ64N5.js";import{a as lt}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as at}from"./chunk-7KG3DC5J.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import{b as it}from"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as nt}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as K}from"./chunk-UPRDDI4K.js";import{A as et,h as Z,m as tt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as Q}from"./chunk-D6JH2KV4.js";import{e as X,g as Y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,B as G,q,w as A,y as J}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as z,Hb as L,Nc as l,Oc as x,Pc as w,Rc as V,Sc as k,Tc as H,Xc as O,Z as v,ac as g,ad as W,bd as j,ca as E,cc as S,ec as F,f as D,fc as R,gc as $,hc as d,ic as o,id as c,jc as a,jd as u,kc as N,kd as I,lb as M,mb as P,ob as p,ra as b,rc as B,v as _,wc as T,ya as C,yc as s,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var pt=(i,r)=>({"bg-gradient-danger":i,"bg-gradient-warning":r}),st=()=>["/menu/products/status/notification/detail"],ct=i=>({ID:i});function mt(i,r){if(i&1&&(l(0),c(1,"number"),o(2,"span"),l(3,"s"),a()),i&2){let n=s().$implicit;w(" ",I(1,1,n.DurationInSecond,"1.1-1")," ")}}function dt(i,r){i&1&&l(0," - ")}function ut(i,r){if(i&1&&(o(0,"tr",11)(1,"td")(2,"a",12),N(3,"img",13),o(4,"span"),l(5),a()()(),o(6,"td")(7,"b"),l(8),a(),N(9,"div",14),a(),o(10,"td"),g(11,mt,4,4)(12,dt,1,0),a(),o(13,"td"),l(14),a(),o(15,"td"),l(16),c(17,"date"),a()()),i&2){let n=r.$implicit;d("ngClass",j(14,pt,n.Status==1,n.Status==0)),p(2),d("routerLink",z(17,st))("queryParams",W(18,ct,n.ID)),p(),d("src",O(n.Img),P),p(2),x(n.Name),p(3),x(n.Label),p(),d("innerHTML",n.Message,M),p(2),S(n.DurationInSecond?11:12),p(3),x(n.StatusLabel),p(2),w(" ",I(17,11,n.Created,"dd MMM yyyy HH:mm")," ")}}function ft(i,r){if(i&1){let n=B();o(0,"div",5)(1,"div",15)(2,"app-custom-paginator",16),c(3,"async"),c(4,"async"),T("total",function(){C(n);let t=s(2);return h(t.getRowCount())})("next",function(){C(n);let t=s(2);return h(t.getNotifications())})("previous",function(){C(n);let t=s(2);return h(t.getNotifications())}),a()()()}if(i&2){let n=s(),e=s();p(2),d("filter",e.filter)("totaldata",n==null?null:n.length)("paginationTotal",u(3,4,e.rowCount$))("hasClicked",u(4,6,e.rowCount$))}}function _t(i,r){i&1&&g(0,ft,5,8,"div",5),i&2&&S(r.length>0?0:-1)}var $t=(()=>{let r=class r{constructor(){this.http=b(Q),this.notificationService=b(it),this.filter=new at,this.destroy$=new D}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(E(this.destroy$)).subscribe(e=>{e.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(e=>{this.filter=e.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let e={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(_(t=>t.Data),_(t=>(t=this.setChannelLogoToNotifications(t),t=this.setTimeToSecond(t),t)),v(1))}setTimeToSecond(e){return e=e.map(t=>(t.DurationInSecond=parseInt(t.Duration)/1e3,t)),e}setChannelLogoToNotifications(e){return e=e.map(t=>(t.Img=K.getChannelLogoByTypeId(t.TypeID),t)),e}getRowCount(){let e={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(_(t=>t.Count),v(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=L({type:r,selectors:[["app-notification"]],decls:33,vars:6,consts:[["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],[3,"ngModelChange","ngModel"],[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"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,m){if(t&1&&(o(0,"mainpanel",0),T("onSubmit",function(){return m.onFilter()}),o(1,"actions")(2,"a",1),l(3," Scan Job V2 "),a()(),o(4,"filters")(5,"div")(6,"h6",2),l(7,"Channel"),a(),o(8,"app-channel-options-v2",3),H("ngModelChange",function(y){return k(m.filter.ChannelID,y)||(m.filter.ChannelID=y),y}),a()()(),o(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"table",8)(15,"thead",9)(16,"tr",10)(17,"th"),l(18,"Channel"),a(),o(19,"th"),l(20,"Process"),a(),o(21,"th"),l(22,"Duration"),a(),o(23,"th"),l(24,"Status"),a(),o(25,"th"),l(26,"Created"),a()()(),o(27,"tbody"),R(28,ut,18,20,"tr",11,F),c(30,"async"),a()()()()(),g(31,_t,1,1),c(32,"async"),a()()()),t&2){let f;p(8),V("ngModel",m.filter.ChannelID),p(20),$(u(30,2,m.notifications$)),p(3),S((f=u(32,4,m.notifications$))?31:-1,f)}},dependencies:[G,q,et,Z,tt,nt,rt,ot,Y,X,lt,A,U,J],encapsulation:2});let i=r;return i})();export{$t as NotificationComponent};
1
+ import{e as ot}from"./chunk-BZWZ64N5.js";import{a as lt}from"./chunk-3PUUKJCQ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as at}from"./chunk-7KG3DC5J.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import{b as it}from"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as nt}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as K}from"./chunk-UPRDDI4K.js";import{A as et,h as Z,m as tt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as Q}from"./chunk-D6JH2KV4.js";import{e as X,g as Y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,B as G,q,w as A,y as J}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as z,Hb as L,Nc as l,Oc as x,Pc as w,Rc as V,Sc as k,Tc as H,Xc as O,Z as v,ac as g,ad as W,bd as j,ca as E,cc as S,ec as F,f as D,fc as R,gc as $,hc as d,ic as o,id as c,jc as a,jd as u,kc as N,kd as I,lb as M,mb as P,ob as p,ra as b,rc as B,v as _,wc as T,ya as C,yc as s,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var pt=(i,r)=>({"bg-gradient-danger":i,"bg-gradient-warning":r}),st=()=>["/menu/products/status/notification/detail"],ct=i=>({ID:i});function mt(i,r){if(i&1&&(l(0),c(1,"number"),o(2,"span"),l(3,"s"),a()),i&2){let n=s().$implicit;w(" ",I(1,1,n.DurationInSecond,"1.1-1")," ")}}function dt(i,r){i&1&&l(0," - ")}function ut(i,r){if(i&1&&(o(0,"tr",11)(1,"td")(2,"a",12),N(3,"img",13),o(4,"span"),l(5),a()()(),o(6,"td")(7,"b"),l(8),a(),N(9,"div",14),a(),o(10,"td"),g(11,mt,4,4)(12,dt,1,0),a(),o(13,"td"),l(14),a(),o(15,"td"),l(16),c(17,"date"),a()()),i&2){let n=r.$implicit;d("ngClass",j(14,pt,n.Status==1,n.Status==0)),p(2),d("routerLink",z(17,st))("queryParams",W(18,ct,n.ID)),p(),d("src",O(n.Img),P),p(2),x(n.Name),p(3),x(n.Label),p(),d("innerHTML",n.Message,M),p(2),S(n.DurationInSecond?11:12),p(3),x(n.StatusLabel),p(2),w(" ",I(17,11,n.Created,"dd MMM yyyy HH:mm")," ")}}function ft(i,r){if(i&1){let n=B();o(0,"div",5)(1,"div",15)(2,"app-custom-paginator",16),c(3,"async"),c(4,"async"),T("total",function(){C(n);let t=s(2);return h(t.getRowCount())})("next",function(){C(n);let t=s(2);return h(t.getNotifications())})("previous",function(){C(n);let t=s(2);return h(t.getNotifications())}),a()()()}if(i&2){let n=s(),e=s();p(2),d("filter",e.filter)("totaldata",n==null?null:n.length)("paginationTotal",u(3,4,e.rowCount$))("hasClicked",u(4,6,e.rowCount$))}}function _t(i,r){i&1&&g(0,ft,5,8,"div",5),i&2&&S(r.length>0?0:-1)}var $t=(()=>{let r=class r{constructor(){this.http=b(Q),this.notificationService=b(it),this.filter=new at,this.destroy$=new D}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(E(this.destroy$)).subscribe(e=>{e.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(e=>{this.filter=e.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let e={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(_(t=>t.Data),_(t=>(t=this.setChannelLogoToNotifications(t),t=this.setTimeToSecond(t),t)),v(1))}setTimeToSecond(e){return e=e.map(t=>(t.DurationInSecond=parseInt(t.Duration)/1e3,t)),e}setChannelLogoToNotifications(e){return e=e.map(t=>(t.Img=K.getChannelLogoByTypeId(t.TypeID),t)),e}getRowCount(){let e={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(_(t=>t.Count),v(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=L({type:r,selectors:[["app-notification"]],decls:33,vars:6,consts:[["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],[3,"ngModelChange","ngModel"],[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"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,m){if(t&1&&(o(0,"mainpanel",0),T("onSubmit",function(){return m.onFilter()}),o(1,"actions")(2,"a",1),l(3," Scan Job V2 "),a()(),o(4,"filters")(5,"div")(6,"h6",2),l(7,"Channel"),a(),o(8,"app-channel-options-v2",3),H("ngModelChange",function(y){return k(m.filter.ChannelID,y)||(m.filter.ChannelID=y),y}),a()()(),o(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"table",8)(15,"thead",9)(16,"tr",10)(17,"th"),l(18,"Channel"),a(),o(19,"th"),l(20,"Process"),a(),o(21,"th"),l(22,"Duration"),a(),o(23,"th"),l(24,"Status"),a(),o(25,"th"),l(26,"Created"),a()()(),o(27,"tbody"),R(28,ut,18,20,"tr",11,F),c(30,"async"),a()()()()(),g(31,_t,1,1),c(32,"async"),a()()()),t&2){let f;p(8),V("ngModel",m.filter.ChannelID),p(20),$(u(30,2,m.notifications$)),p(3),S((f=u(32,4,m.notifications$))?31:-1,f)}},dependencies:[G,q,et,Z,tt,nt,rt,ot,Y,X,lt,A,U,J],encapsulation:2});let i=r;return i})();export{$t as NotificationComponent};
@@ -1,4 +1,4 @@
1
- import{a as de}from"./chunk-L6CRWJ2O.js";import{a as Xe,b as et,c as tt}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import"./chunk-VYI7JYH5.js";import"./chunk-OH5T7D7O.js";import{a as He,b as Ke,c as Qe,e as Ze,f as qe,g as Je}from"./chunk-3WGAMHZW.js";import{a as We,b as Be,c as Le}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{c as Fe,d as Oe,e as Re}from"./chunk-BZWZ64N5.js";import{a as $e}from"./chunk-WCX3T6LK.js";import"./chunk-3T5VLB63.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ne}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as re}from"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import{f as ze,g as Ue,h as Ge,i as je,j as Ye}from"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-TBVMCNS2.js";import{e as Ae}from"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import{ka as Pe}from"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as ie}from"./chunk-7K6U3ABQ.js";import{a as Me}from"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as te}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as ee,c as x}from"./chunk-UPRDDI4K.js";import{A as ae,b as Ee,c as ke,h as ne,m as oe,x as Ve}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as xe,e as Te}from"./chunk-D6JH2KV4.js";import{g as be}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as V,q as O,w as X,y as $}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as ve,Cc as fe,Dc as ge,Ec as _e,Hb as k,Ia as g,Ic as N,Nb as Y,Nc as s,Oc as F,Pc as D,Rc as b,Sc as M,Tc as P,Xc as Ce,Z as G,Zc as we,_c as Z,aa as ce,ac as w,ad as q,bd as Se,cc as v,ea as j,ec as R,fc as W,gc as B,hc as h,ic as o,id as L,jc as a,jd as H,kc as S,kd as ye,m as me,ma as ue,mb as he,ob as l,qd as J,ra as y,rc as T,tb as A,td as De,ud as I,v as Q,wc as C,ya as c,yc as _,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as se,b as pe}from"./chunk-66YHNWRR.js";var rt=e=>({"over-due":e});function lt(e,r){if(e&1&&(o(0,"tr",6)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),e&2){let d=r.$implicit,t=r.$index;h("ngClass",q(5,rt,d.Exception)),l(2),F(t+1),l(2),F(d.Number),l(2),F(d.Status),l(2),F(d.Exception)}}function dt(e,r){if(e&1&&W(0,lt,9,7,"tr",6,R),e&2){let d,t=_();B((d=t.downloadResult())==null?null:d.Body)}}function st(e,r){e&1&&(o(0,"tr",5)(1,"td",7)(2,"div",8),S(3,"i",9),a(),o(4,"h4",10),s(5," There is no order to processed "),a()()())}var it=(()=>{let r=class r{constructor(){this.downloadResult=I()}ngOnInit(){}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"ngClass"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),S(5,"th",4),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),w(13,dt,2,0)(14,st,6,0,"tr",5),a()()()()),n&2){let p;l(13),v(((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0?13:14)}},dependencies:[V,O],encapsulation:2});let e=r;return e})();var mt=e=>({"full-width":e}),ct=()=>({standalone:!0}),nt=(()=>{let r=class r{constructor(){this.datePipe=y($),this.fullWidth=I(!1),this.timeChange=new A}ngOnInit(){}onTimeChange(t){let n=null;t&&(n=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(n),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="outside")}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(n,i){if(n&1){let p=T();o(0,"p-datepicker",1,0),P("ngModelChange",function(m){return c(p),M(i.time,m)||(i.time=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onTimeChange(m))})("onSelect",function(){return c(p),u(i.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),C("click",function(){return c(p),N(1).hideOverlay(),u(i.onShowCalendar())}),a()()()}n&2&&(h("ngClass",q(5,mt,i.fullWidth()))("baseZIndex",1100),b("ngModel",i.time),h("timeOnly",!0)("ngModelOptions",ve(7,ct)))},dependencies:[V,O,ae,ne,oe,tt,et,Xe,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]});let e=r;return e})();var z=(()=>{let r=class r{constructor(){this.httpService=y(Te),this.toastr=y(xe),this.datePipe=y($)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(j(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):me}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),p=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?x.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=x.formatTitleFromDate(new Date(t),new Date(n)),p=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${f}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=ue({token:r,factory:r.\u0275fac});let e=r;return e})();function ut(e,r){if(e&1&&(o(0,"ng-option",7),S(1,"img",17),s(2),a()),e&2){let d=r.$implicit;h("value",d.ID),l(),h("src",d==null?null:d.Img,he),l(),D("",d.Name," ")}}function ht(e,r){if(e&1){let d=T();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),P("ngModelChange",function(n){c(d);let i=_();return M(i.downloadType,n)||(i.downloadType=n),u(n)}),C("ngModelChange",function(){c(d);let n=_();return u(n.onDownloadTypeChange())}),o(10,"mat-radio-button",20),s(11," Orders "),a(),o(12,"mat-radio-button",21),s(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),S(16,"i",24),a(),o(17,"p",25),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let d=_();l(9),b("ngModel",d.downloadType),l(),h("value",!1),l(2),h("value",!0)}}function ft(e,r){e&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",26),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function gt(e,r){e&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function _t(e,r){if(e&1){let d=T();o(0,"div",16)(1,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.startTime,n)||(i.startTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onStartTimeChange())}),a(),o(2,"span",28),s(3,"-"),a(),o(4,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.endTime,n)||(i.endTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onEndTimeChange())}),a()()}if(e&2){let d=_();l(),b("time",d.startTime),l(3),b("time",d.endTime)}}var ot=(()=>{let r=class r{constructor(){this.reset=I(!1),this.authService=y(ie),this.tokenService=y(Me),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.minDate=g(new Date),this.maxDate=g(new Date),this.filterData=new A,this._onRememberMeChange=De({alias:"onRememberMeChange"}),this.rememberMe=g(!1),J(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let t=this.tokenService?.getTokenValue(),n=t?.DownloadRange?JSON.parse(t?.DownloadRange):0;if(n<=0)this.minDate.set(null),this.maxDate.set(null);else{let i=new Date,p=x.addDays(i,n-1);this.minDate.set(p)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(Q(t=>t?.Model),G(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(t){this._onRememberMeChange.emit(t)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[Z([z,Ae()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=T();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(m){return c(p),M(i.selectedChannelId,m)||(i.selectedChannelId=m),u(m)}),C("ngModelChange",function(){return c(p),u(i.onSelectChannel())}),W(10,ut,3,3,"ng-option",7,R),a()()(),w(12,ht,19,3,"div",8),L(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),s(17,"Date Range"),a(),w(18,ft,5,0,"p",5)(19,gt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),P("ngModelChange",function(m){return c(p),M(i.startDate,m)||(i.startDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())}),a(),o(24,"input",12),P("ngModelChange",function(m){return c(p),M(i.endDate,m)||(i.endDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())})("ngModelChange",function(){return c(p),u(i.onFilterDateChange())}),a()(),S(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),P("ngModelChange",function(m){return c(p),M(i.rememberMe,m)||(i.rememberMe=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onChangeRememberMe(m))}),a(),o(29,"h5",15),s(30,"Save Date"),a()(),w(31,_t,5,2,"div",16),a()()()()}if(n&2){let p,f,m=N(26);l(9),h("clearable",!1),b("ngModel",i.selectedChannelId),l(),B(i.channelOptions()),l(2),v((p=H(13,11,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?12:-1),l(6),v(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?18:19),l(4),h("rangePicker",m)("min",i.minDate())("max",i.maxDate()),l(),b("ngModel",i.startDate),l(),b("ngModel",i.endDate),l(4),b("ngModel",i.rememberMe),l(3),v(i.showTimePicker()?31:-1)}},dependencies:[V,Re,Oe,Fe,Le,We,Be,ae,ke,Ee,ne,Ve,oe,nt,je,ze,Ye,Ue,Ge,X],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=r;return e})();var E=(function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e})(E||{});var U=(function(e){return e[e.DoNothing=0]="DoNothing",e[e.New=1]="New",e[e.Update=2]="Update",e})(U||{});var Ct=(e,r)=>({"over-due-today":e,"over-due":r});function wt(e,r){if(e&1&&(o(0,"th",17),s(1),a()),e&2){let d=_();l(),D(" ",d.selectedChannel()?"Created Date":"Last Status Update"," ")}}function vt(e,r){if(e&1&&(o(0,"td"),s(1),L(2,"date"),a()),e&2){let d=_().$implicit;l(),D(" ",ye(2,1,d.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function St(e,r){if(e&1&&(o(0,"span"),s(1),a()),e&2){let d=_().$implicit;l(),D(" ",d.ActionString," ")}}function yt(e,r){if(e&1&&(o(0,"li"),s(1),a()),e&2){let d=r.$implicit;l(),D(" ",d," ")}}function Dt(e,r){if(e&1&&(o(0,"ul",21),W(1,yt,2,1,"li",null,R),a()),e&2){let d=_().$implicit;l(),B(d.ActionString)}}function xt(e,r){if(e&1&&(o(0,"span",22),S(1,"i",23),a()),e&2){let d=_().$implicit;h("title",we("Delivery : ",d.DeliveryState,`
1
+ import{a as de}from"./chunk-L6CRWJ2O.js";import{a as Xe,b as et,c as tt}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import"./chunk-VYI7JYH5.js";import"./chunk-OH5T7D7O.js";import{a as He,b as Ke,c as Qe,e as Ze,f as qe,g as Je}from"./chunk-3WGAMHZW.js";import{a as We,b as Be,c as Le}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{c as Fe,d as Oe,e as Re}from"./chunk-BZWZ64N5.js";import{a as $e}from"./chunk-FPJTI4LM.js";import"./chunk-3T5VLB63.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ne}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as re}from"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import{f as ze,g as Ue,h as Ge,i as je,j as Ye}from"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-TBVMCNS2.js";import{e as Ae}from"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import{ka as Pe}from"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as ie}from"./chunk-2OKZEOBU.js";import{a as Me}from"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as te}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as ee,c as x}from"./chunk-UPRDDI4K.js";import{A as ae,b as Ee,c as ke,h as ne,m as oe,x as Ve}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as xe,e as Te}from"./chunk-D6JH2KV4.js";import{g as be}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as V,q as O,w as X,y as $}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as ve,Cc as fe,Dc as ge,Ec as _e,Hb as k,Ia as g,Ic as N,Nb as Y,Nc as s,Oc as F,Pc as D,Rc as b,Sc as M,Tc as P,Xc as Ce,Z as G,Zc as we,_c as Z,aa as ce,ac as w,ad as q,bd as Se,cc as v,ea as j,ec as R,fc as W,gc as B,hc as h,ic as o,id as L,jc as a,jd as H,kc as S,kd as ye,m as me,ma as ue,mb as he,ob as l,qd as J,ra as y,rc as T,tb as A,td as De,ud as I,v as Q,wc as C,ya as c,yc as _,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as se,b as pe}from"./chunk-66YHNWRR.js";var rt=e=>({"over-due":e});function lt(e,r){if(e&1&&(o(0,"tr",6)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),e&2){let d=r.$implicit,t=r.$index;h("ngClass",q(5,rt,d.Exception)),l(2),F(t+1),l(2),F(d.Number),l(2),F(d.Status),l(2),F(d.Exception)}}function dt(e,r){if(e&1&&W(0,lt,9,7,"tr",6,R),e&2){let d,t=_();B((d=t.downloadResult())==null?null:d.Body)}}function st(e,r){e&1&&(o(0,"tr",5)(1,"td",7)(2,"div",8),S(3,"i",9),a(),o(4,"h4",10),s(5," There is no order to processed "),a()()())}var it=(()=>{let r=class r{constructor(){this.downloadResult=I()}ngOnInit(){}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"ngClass"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),S(5,"th",4),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),w(13,dt,2,0)(14,st,6,0,"tr",5),a()()()()),n&2){let p;l(13),v(((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0?13:14)}},dependencies:[V,O],encapsulation:2});let e=r;return e})();var mt=e=>({"full-width":e}),ct=()=>({standalone:!0}),nt=(()=>{let r=class r{constructor(){this.datePipe=y($),this.fullWidth=I(!1),this.timeChange=new A}ngOnInit(){}onTimeChange(t){let n=null;t&&(n=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(n),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="outside")}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(n,i){if(n&1){let p=T();o(0,"p-datepicker",1,0),P("ngModelChange",function(m){return c(p),M(i.time,m)||(i.time=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onTimeChange(m))})("onSelect",function(){return c(p),u(i.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),C("click",function(){return c(p),N(1).hideOverlay(),u(i.onShowCalendar())}),a()()()}n&2&&(h("ngClass",q(5,mt,i.fullWidth()))("baseZIndex",1100),b("ngModel",i.time),h("timeOnly",!0)("ngModelOptions",ve(7,ct)))},dependencies:[V,O,ae,ne,oe,tt,et,Xe,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]});let e=r;return e})();var z=(()=>{let r=class r{constructor(){this.httpService=y(Te),this.toastr=y(xe),this.datePipe=y($)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(j(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):me}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),p=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?x.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=x.formatTitleFromDate(new Date(t),new Date(n)),p=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${f}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=ue({token:r,factory:r.\u0275fac});let e=r;return e})();function ut(e,r){if(e&1&&(o(0,"ng-option",7),S(1,"img",17),s(2),a()),e&2){let d=r.$implicit;h("value",d.ID),l(),h("src",d==null?null:d.Img,he),l(),D("",d.Name," ")}}function ht(e,r){if(e&1){let d=T();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),P("ngModelChange",function(n){c(d);let i=_();return M(i.downloadType,n)||(i.downloadType=n),u(n)}),C("ngModelChange",function(){c(d);let n=_();return u(n.onDownloadTypeChange())}),o(10,"mat-radio-button",20),s(11," Orders "),a(),o(12,"mat-radio-button",21),s(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),S(16,"i",24),a(),o(17,"p",25),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let d=_();l(9),b("ngModel",d.downloadType),l(),h("value",!1),l(2),h("value",!0)}}function ft(e,r){e&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",26),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function gt(e,r){e&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function _t(e,r){if(e&1){let d=T();o(0,"div",16)(1,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.startTime,n)||(i.startTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onStartTimeChange())}),a(),o(2,"span",28),s(3,"-"),a(),o(4,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.endTime,n)||(i.endTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onEndTimeChange())}),a()()}if(e&2){let d=_();l(),b("time",d.startTime),l(3),b("time",d.endTime)}}var ot=(()=>{let r=class r{constructor(){this.reset=I(!1),this.authService=y(ie),this.tokenService=y(Me),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.minDate=g(new Date),this.maxDate=g(new Date),this.filterData=new A,this._onRememberMeChange=De({alias:"onRememberMeChange"}),this.rememberMe=g(!1),J(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let t=this.tokenService?.getTokenValue(),n=t?.DownloadRange?JSON.parse(t?.DownloadRange):0;if(n<=0)this.minDate.set(null),this.maxDate.set(null);else{let i=new Date,p=x.addDays(i,n-1);this.minDate.set(p)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(Q(t=>t?.Model),G(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(t){this._onRememberMeChange.emit(t)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[Z([z,Ae()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=T();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(m){return c(p),M(i.selectedChannelId,m)||(i.selectedChannelId=m),u(m)}),C("ngModelChange",function(){return c(p),u(i.onSelectChannel())}),W(10,ut,3,3,"ng-option",7,R),a()()(),w(12,ht,19,3,"div",8),L(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),s(17,"Date Range"),a(),w(18,ft,5,0,"p",5)(19,gt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),P("ngModelChange",function(m){return c(p),M(i.startDate,m)||(i.startDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())}),a(),o(24,"input",12),P("ngModelChange",function(m){return c(p),M(i.endDate,m)||(i.endDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())})("ngModelChange",function(){return c(p),u(i.onFilterDateChange())}),a()(),S(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),P("ngModelChange",function(m){return c(p),M(i.rememberMe,m)||(i.rememberMe=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onChangeRememberMe(m))}),a(),o(29,"h5",15),s(30,"Save Date"),a()(),w(31,_t,5,2,"div",16),a()()()()}if(n&2){let p,f,m=N(26);l(9),h("clearable",!1),b("ngModel",i.selectedChannelId),l(),B(i.channelOptions()),l(2),v((p=H(13,11,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?12:-1),l(6),v(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?18:19),l(4),h("rangePicker",m)("min",i.minDate())("max",i.maxDate()),l(),b("ngModel",i.startDate),l(),b("ngModel",i.endDate),l(4),b("ngModel",i.rememberMe),l(3),v(i.showTimePicker()?31:-1)}},dependencies:[V,Re,Oe,Fe,Le,We,Be,ae,ke,Ee,ne,Ve,oe,nt,je,ze,Ye,Ue,Ge,X],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=r;return e})();var E=(function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e})(E||{});var U=(function(e){return e[e.DoNothing=0]="DoNothing",e[e.New=1]="New",e[e.Update=2]="Update",e})(U||{});var Ct=(e,r)=>({"over-due-today":e,"over-due":r});function wt(e,r){if(e&1&&(o(0,"th",17),s(1),a()),e&2){let d=_();l(),D(" ",d.selectedChannel()?"Created Date":"Last Status Update"," ")}}function vt(e,r){if(e&1&&(o(0,"td"),s(1),L(2,"date"),a()),e&2){let d=_().$implicit;l(),D(" ",ye(2,1,d.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function St(e,r){if(e&1&&(o(0,"span"),s(1),a()),e&2){let d=_().$implicit;l(),D(" ",d.ActionString," ")}}function yt(e,r){if(e&1&&(o(0,"li"),s(1),a()),e&2){let d=r.$implicit;l(),D(" ",d," ")}}function Dt(e,r){if(e&1&&(o(0,"ul",21),W(1,yt,2,1,"li",null,R),a()),e&2){let d=_().$implicit;l(),B(d.ActionString)}}function xt(e,r){if(e&1&&(o(0,"span",22),S(1,"i",23),a()),e&2){let d=_().$implicit;h("title",we("Delivery : ",d.DeliveryState,`
2
2
  Payment : `,d.PaymentState))}}function Tt(e,r){if(e&1&&(o(0,"tr")(1,"td"),s(2),a(),o(3,"td"),s(4),a(),w(5,vt,3,4,"td"),o(6,"td")(7,"span"),s(8),a(),s(9),a(),o(10,"td",20)(11,"span"),s(12),a(),s(13),a(),o(14,"td"),w(15,St,2,1,"span"),w(16,Dt,3,0,"ul",21),a(),o(17,"td"),w(18,xt,2,3,"span",22),a()()),e&2){let d,t=r.$implicit,n=r.$index,i=_(2);l(2),F(n+1),l(2),F(t.Number),l(),v(((d=i.selectedChannel())==null?null:d.TypeID)!=i.channelType.Shopee&&((d=i.selectedChannel())==null?null:d.TypeID)!==i.channelType.Tiktok?5:-1),l(3),D("",t.ChannelStatus," - "),l(),D("",t.ChannelStatusDescription," "),l(),h("ngClass",Se(12,Ct,(t==null?null:t.Action)==i.actionPreviewOrder.Update,(t==null?null:t.Action)==i.actionPreviewOrder.New))("matTooltip",t.POSStatus==91||t.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),D("",t.POSStatus," - "),l(),D("",t.POSStatusDescription," "),l(2),v(t.ActionString.length==1?15:-1),l(),v(t.ActionString.length>1?16:-1),l(2),v(t.ChannelStatus!=99&&t.POSStatus!=99?18:-1)}}function bt(e,r){if(e&1&&W(0,Tt,19,15,"tr",null,R),e&2){let d=_();B(d.displayPreviewData())}}function Mt(e,r){e&1&&(o(0,"tr",19)(1,"td",24)(2,"div",25),S(3,"i",26),a(),o(4,"h4",27),s(5," There is no order to processed "),a()()())}var at=(()=>{let r=class r{constructor(){this.orderPreview=I(),this.selectedChannel=I(),this.channelType=ee,this.allData=g(0),this.syncData=g(0),this.wrongData=g(0),this.unsyncData=g(0),this.pillStatus=g(E.ALL),this.actionPreviewOrder=U,this.previewStatus=E,this.displayPreviewData=g([]),this.exportOrders=new A,J(()=>{this.orderPreview()&&(this.filterPreviewData(E.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(t){this.pillStatus.update(()=>t),this.displayPreviewData.update(()=>this.filterDataByStatus(t))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(E.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(E.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(E.UNSYNC).length)}filterDataByStatus(t){let n=[];switch(t){case E.ALL:n=this.orderPreview();break;case E.SYNC:n=this.orderPreview().filter(i=>i.Action==U.DoNothing);break;case E.WRONG:n=this.orderPreview().filter(i=>i.Action==U.Update);break;case E.UNSYNC:n=this.orderPreview().filter(i=>i.Action==U.New);break}return n}onExportOrders(){this.exportOrders.emit()}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:40,vars:10,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%"],["width","10%"],[1,"text-center"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div")(5,"ul",4)(6,"li",5)(7,"button",6),C("click",function(){return i.filterPreviewData(i.previewStatus.ALL)}),s(8),a()(),o(9,"li",7)(10,"button",8),C("click",function(){return i.filterPreviewData(i.previewStatus.SYNC)}),s(11),a()(),o(12,"li",7)(13,"button",9),C("click",function(){return i.filterPreviewData(i.previewStatus.WRONG)}),s(14),a()(),o(15,"li",7)(16,"button",10),C("click",function(){return i.filterPreviewData(i.previewStatus.UNSYNC)}),s(17),a()()()(),o(18,"div")(19,"button",11),C("click",function(){return i.onExportOrders()}),S(20,"i",12),o(21,"span"),s(22,"Export"),a()()()()(),o(23,"table",13)(24,"thead",14)(25,"tr"),S(26,"th",15),o(27,"th",16),s(28,"Number"),a(),w(29,wt,2,1,"th",17),o(30,"th",18),s(31,"Channel Status"),a(),o(32,"th",18),s(33,"POS Status"),a(),o(34,"th"),s(35,"Action"),a(),S(36,"th",15),a()(),o(37,"tbody"),w(38,bt,2,0)(39,Mt,6,0,"tr",19),a()()()()),n&2){let p,f;l(7),h("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),D(" All (",i.allData(),") "),l(2),h("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),l(),D(" Existing (",i.syncData(),") "),l(2),h("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),D(" Wrong Status (",i.wrongData(),") "),l(2),h("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),l(),D(" Missing (",i.unsyncData(),") "),l(12),v(((p=i.selectedChannel())==null?null:p.TypeID)!=i.channelType.Shopee&&((p=i.selectedChannel())==null?null:p.TypeID)!==i.channelType.Tiktok?29:-1),l(9),v(((f=i.displayPreviewData())==null?null:f.length)>0?38:39)}},dependencies:[V,O,re,Ie,$],encapsulation:2});let e=r;return e})();var Pt=["stepper"];function Et(e,r){if(e&1){let d=T();o(0,"div",2)(1,"button",20),C("click",function(){c(d);let n=_();return u(n.onStepperBack())}),s(2," Back "),a(),o(3,"button",21),C("click",function(){c(d);let n=_();return u(n.onNextStep())}),s(4," Next "),a()()}if(e&2){let d=_();l(3),h("disabled",d.disabledNextFilter())}}function kt(e,r){if(e&1){let d=T();o(0,"button",22),C("click",function(){c(d);let n=_();return u(n.onNextStep())}),s(1," Next "),a()}if(e&2){let d=_();h("disabled",d.disabledNextFilter())}}function Vt(e,r){if(e&1){let d=T();o(0,"button",23),C("click",function(){c(d);let n=_();return u(n.onNewDownload())}),S(1,"i",24),s(2," New "),a()}}function It(e,r){e&1&&(S(0,"i",25),o(1,"span"),s(2,"Filter"),a())}function Nt(e,r){e&1&&(S(0,"i",26),o(1,"span"),s(2,"Preview"),a())}function Ft(e,r){if(e&1){let d=T();o(0,"preview-step",27),C("onExportOrders",function(){c(d);let n=_();return u(n.onExportOrders())}),a()}e&2&&h("orderPreview",r)}function Ot(e,r){e&1&&(S(0,"i",28),o(1,"span"),s(2,"Finish"),a())}function Rt(e,r){e&1&&S(0,"complete-step",16),e&2&&h("downloadResult",r)}function Wt(e,r){e&1&&(o(0,"h6"),s(1,"1"),a())}function Bt(e,r){e&1&&(o(0,"h6"),s(1,"2"),a())}function Lt(e,r){e&1&&(o(0,"h6"),s(1,"3"),a())}var pn=(()=>{let r=class r{constructor(){this.downloadService=y(z),this.orderService=y(de),this.productService=y($e),this.authService=y(ie),this.stepperSelectedIndex=g(0),this.disabledNextFilter=g(!0),this.isResetFilter=g(!1),this.pageTitle=g("Download to POS"),this.cacheKey=g(x.GuidEMpty),this.rememberMe=g(!1)}onFilterChange(t){this.filter=t,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>x.IsEmpty(this.filter?.channelId)||!x.isValidDate(this.filter.startDate)||!x.isValidDate(this.filter.endDate))}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let t=this.productService.findChannelById(this.filter.channelId,this.authService.getChannels());this.setPageTitle(`Preview ${t?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};x.IsNotEmpty(this.filter.startTime)&&(t=pe(se({},t),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(t).pipe(j(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),Q(n=>n.Data),G(1))}onExportOrders(){let t={ID:this.filter.channelId,From:this.filter.startDate?this.filter.startDate:null,To:this.filter.endDate?this.filter.endDate:null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(t,n).subscribe()}onDownload(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(ce(n=>(t.ListPreview=n,this.downloadService.getDownloadOrder(t))),j(()=>{this.onStepperNext()}),G(1))}setPageTitle(t){this.pageTitle.update(()=>`
3
3
  ${t} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
4
4
  `)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!this.rememberMe()),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&fe(Pt,5),n&2){let p;ge(p=_e())&&(i.stepper=p.first)}},features:[Z([z,de,{provide:He,useValue:{displayDefaultIndicatorType:!1}}])],decls:26,vars:21,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","onRememberMeChange","reset"],["state","preview",3,"editable","completed"],[3,"orderPreview"],["state","finish"],[3,"downloadResult"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview"],[1,"fa-solid","fa-flag","me-3"]],template:function(n,i){if(n&1){let p=T();o(0,"mainpanel",1)(1,"actions"),w(2,Et,5,1,"div",2),w(3,kt,2,1,"button",3),w(4,Vt,3,0,"button",4),a(),o(5,"content")(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"mat-stepper",9,0),P("selectedIndexChange",function(m){return c(p),M(i.stepperSelectedIndex,m)||(i.stepperSelectedIndex=m),u(m)}),o(12,"mat-step",10),Y(13,It,3,0,"ng-template",11),o(14,"filter-step",12),C("onFilterChange",function(m){return c(p),u(i.onFilterChange(m))})("onRememberMeChange",function(m){return c(p),u(i.rememberMe.set(m))}),a()(),o(15,"mat-step",13),Y(16,Nt,3,0,"ng-template",11),w(17,Ft,1,1,"preview-step",14),L(18,"async"),a(),o(19,"mat-step",15),Y(20,Ot,3,0,"ng-template",11),w(21,Rt,1,1,"complete-step",16),L(22,"async"),a(),Y(23,Wt,2,0,"ng-template",17)(24,Bt,2,0,"ng-template",18)(25,Lt,2,0,"ng-template",19),a()()()()()()()}if(n&2){let p,f,m=N(11);h("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),l(2),v(i.stepperSelectedIndex()==1?2:-1),l(),v(i.stepperSelectedIndex()==0?3:-1),l(),v(i.stepperSelectedIndex()==2?4:-1),l(6),h("ngClass",Ce("last-edited-step-"+m.selectedIndex)),b("selectedIndex",i.stepperSelectedIndex),l(2),h("completed",!1)("editable",i.stepperSelectedIndex()!=2),l(2),h("reset",i.isResetFilter()),l(),h("editable",i.stepperSelectedIndex()!=2)("completed",!1),l(2),v((p=H(18,17,i.orderPreview$))?17:-1,p),l(4),v((f=H(22,19,i.downloadPreview$))?21:-1,f)}},dependencies:[V,O,it,ot,at,Je,Ze,Ke,qe,Qe,Ne,be,re,X],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}