marketplacepos 5.43.4 → 5.43.5

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 (74) hide show
  1. package/Marketplace/{chunk-YRFZDTXH.js → chunk-2Y2VSIHL.js} +1 -1
  2. package/Marketplace/{chunk-7UWULSSK.js → chunk-3MUVNECT.js} +1 -1
  3. package/Marketplace/{chunk-Q6TBOHRA.js → chunk-3TX6JLFF.js} +1 -1
  4. package/Marketplace/{chunk-CATX24UZ.js → chunk-46CA5SER.js} +1 -1
  5. package/Marketplace/{chunk-G6X5CZ34.js → chunk-4JKDNUTX.js} +1 -1
  6. package/Marketplace/{chunk-BLXMX3JN.js → chunk-4Q35WLYQ.js} +1 -1
  7. package/Marketplace/{chunk-ZHZMT7GZ.js → chunk-5DG3HADY.js} +1 -1
  8. package/Marketplace/{chunk-V3NCYRCF.js → chunk-5HO2IJ47.js} +1 -1
  9. package/Marketplace/{chunk-C4XFI4J7.js → chunk-7AQ244V7.js} +1 -1
  10. package/Marketplace/chunk-AJL3CYNX.js +1 -0
  11. package/Marketplace/{chunk-JHEGROJF.js → chunk-BQVXVM7F.js} +1 -1
  12. package/Marketplace/{chunk-2CBZOVID.js → chunk-BRTYGXCD.js} +1 -1
  13. package/Marketplace/{chunk-74FAXIJ6.js → chunk-BXVG56VT.js} +1 -1
  14. package/Marketplace/{chunk-ISRFFTGW.js → chunk-BZIF3CQ5.js} +1 -1
  15. package/Marketplace/chunk-CROOKZYC.js +1 -0
  16. package/Marketplace/{chunk-FNEDIIIS.js → chunk-CRUPQQ56.js} +1 -1
  17. package/Marketplace/{chunk-2YTIJJIP.js → chunk-DEJVMFIS.js} +1 -1
  18. package/Marketplace/chunk-DFMLZFNU.js +1 -0
  19. package/Marketplace/{chunk-32WYK3BN.js → chunk-DRMAONR7.js} +1 -1
  20. package/Marketplace/{chunk-53FUEOBJ.js → chunk-ELDFGVXL.js} +1 -1
  21. package/Marketplace/{chunk-K2GYNGBL.js → chunk-EZY2ATQQ.js} +1 -1
  22. package/Marketplace/{chunk-5DODHGO5.js → chunk-FVFKSAIS.js} +1 -1
  23. package/Marketplace/{chunk-MQQD4OJO.js → chunk-GQLSQKDI.js} +1 -1
  24. package/Marketplace/{chunk-PP3PVKNQ.js → chunk-HFGJVJO2.js} +1 -1
  25. package/Marketplace/chunk-IONDX3X4.js +2 -0
  26. package/Marketplace/chunk-JMPW6NPQ.js +7 -0
  27. package/Marketplace/{chunk-GS3A2D4O.js → chunk-JSZ2HWK6.js} +1 -1
  28. package/Marketplace/{chunk-YMMOJKVP.js → chunk-KFNKVXCN.js} +1 -1
  29. package/Marketplace/{chunk-P42VFND7.js → chunk-KUW2UF4E.js} +1 -1
  30. package/Marketplace/{chunk-MQD5HJA6.js → chunk-LB7PE76T.js} +1 -1
  31. package/Marketplace/{chunk-T6SBAKYS.js → chunk-LRR6JS6H.js} +1 -1
  32. package/Marketplace/{chunk-64IHCPTX.js → chunk-M3XHIUXS.js} +1 -1
  33. package/Marketplace/{chunk-EK4VKN7N.js → chunk-MCOWAYNM.js} +1 -1
  34. package/Marketplace/{chunk-ONLHWPKX.js → chunk-MOR4ZQ3B.js} +1 -1
  35. package/Marketplace/chunk-NKBQM2CA.js +1 -0
  36. package/Marketplace/chunk-NQ4I4MFR.js +1 -0
  37. package/Marketplace/chunk-OPXWL5G6.js +1 -0
  38. package/Marketplace/{chunk-227LB3XT.js → chunk-PFRHV7VB.js} +1 -1
  39. package/Marketplace/{chunk-YB65PX7S.js → chunk-QINGXOOA.js} +1 -1
  40. package/Marketplace/{chunk-JTIFX4RL.js → chunk-QQ5LLQNX.js} +2 -2
  41. package/Marketplace/{chunk-JFUCAI5X.js → chunk-QZEHOQYW.js} +1 -1
  42. package/Marketplace/{chunk-YT3P3EBI.js → chunk-RIR77G7B.js} +1 -1
  43. package/Marketplace/{chunk-43XFDAKY.js → chunk-RVGDKAUB.js} +1 -1
  44. package/Marketplace/{chunk-FTGUKCA5.js → chunk-RXIOO5CN.js} +1 -1
  45. package/Marketplace/{chunk-UWIHXA2S.js → chunk-TAA75BNT.js} +1 -1
  46. package/Marketplace/chunk-TBG76OM6.js +1 -0
  47. package/Marketplace/{chunk-PVY6MYHG.js → chunk-TDZ7YWEM.js} +1 -1
  48. package/Marketplace/{chunk-S5SDX7ZG.js → chunk-USNELOQD.js} +1 -1
  49. package/Marketplace/{chunk-VYIEJVSJ.js → chunk-V6MTRLRN.js} +1 -1
  50. package/Marketplace/{chunk-S2HNMEC2.js → chunk-WAFTFIDQ.js} +1 -1
  51. package/Marketplace/chunk-WDJS26KO.js +1 -0
  52. package/Marketplace/{chunk-3ASK736S.js → chunk-WYEAWOUO.js} +1 -1
  53. package/Marketplace/{chunk-6LN62T32.js → chunk-WZD7N5DN.js} +1 -1
  54. package/Marketplace/{chunk-KDEVWOVI.js → chunk-Y32UC4LV.js} +1 -1
  55. package/Marketplace/chunk-Y77CFR5W.js +1 -0
  56. package/Marketplace/{chunk-5TIGE5UP.js → chunk-YYA3EM3E.js} +1 -1
  57. package/Marketplace/{chunk-Q2U3MMNW.js → chunk-Z2NHQWEV.js} +1 -1
  58. package/Marketplace/{chunk-H4OBICY5.js → chunk-Z5NWWPJP.js} +1 -1
  59. package/Marketplace/{chunk-ADDTLV5D.js → chunk-ZMBJFK7P.js} +2 -2
  60. package/Marketplace/{chunk-GA7T6FWT.js → chunk-ZTKQ3U35.js} +1 -1
  61. package/Marketplace/index.html +2 -2
  62. package/Marketplace/{main-ZMGZIM3D.js → main-ISCOUMZ4.js} +1 -1
  63. package/package.json +1 -1
  64. package/Marketplace/chunk-BTHDOSGS.js +0 -1
  65. package/Marketplace/chunk-DDV4X5WD.js +0 -7
  66. package/Marketplace/chunk-IGXU4VAO.js +0 -1
  67. package/Marketplace/chunk-IRK2APYZ.js +0 -1
  68. package/Marketplace/chunk-JWARXDWM.js +0 -1
  69. package/Marketplace/chunk-LUVP4A3V.js +0 -1
  70. package/Marketplace/chunk-ORD5Z4XI.js +0 -1
  71. package/Marketplace/chunk-R4GAF5EA.js +0 -1
  72. package/Marketplace/chunk-XUL4LU4R.js +0 -1
  73. package/Marketplace/chunk-Y2QG7YNG.js +0 -2
  74. package/Marketplace/chunk-YUCD4HRB.js +0 -1
@@ -1 +1 @@
1
- import{a as se,b as ce,c as ue}from"./chunk-V5BKQSAT.js";import{a as he}from"./chunk-MQQD4OJO.js";import{a as me}from"./chunk-CATX24UZ.js";import{a as de}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as pe}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as le}from"./chunk-WPW3D4MQ.js";import"./chunk-S5SDX7ZG.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ie}from"./chunk-V3NCYRCF.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as te}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as oe,n as ae}from"./chunk-CLER2MX6.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as ne,s as re}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as q,k as J,m as K,n as Q}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as N,Gc as l,Hc as v,Ic as B,Kc as _,Lc as f,Mb as x,Mc as S,Nc as z,Oc as A,Pc as j,Qc as H,Ra as O,Rc as R,Sc as U,Yb as c,ac as W,ad as E,bd as G,dc as b,ec as I,gc as D,hc as k,ic as t,ja as L,jc as i,kc as u,oc as V,pa as y,pb as F,rb as a,tc as M,uc as h,v as P,ya as m,za as d}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var T=(()=>{class n{constructor(){this.httpService=y(te)}getShippedOrders(e){return this.httpService.post(ie.GetShipped,e).pipe(P(p=>p.Data||[]))}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=L({token:n,factory:n.\u0275fac})}}return n})();var fe=()=>[],Se=n=>({"td-cell-hover":n});function ge(n,g){if(n&1&&u(0,"variants-dropdown",29),n&2){let e=h().$implicit;c("variants",e==null?null:e.Variants)}}function Ce(n,g){if(n&1&&u(0,"variant-with-image",30),n&2){let e=h().$implicit;c("variant",e==null?null:e.Variants[0])}}function ve(n,g){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=h().$implicit;a(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function we(n,g){if(n&1&&(t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",25)(5,"div",26)(6,"div"),u(7,"img",27),w(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",28),i()(),t(11,"small"),l(12),w(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),x(17,ge,1,1,"variants-dropdown",29)(18,Ce,1,1,"variant-with-image",30),i(),t(19,"td",31),l(20),w(21,"number"),i(),t(22,"td")(23,"span"),l(24),i(),x(25,ve,2,1,"span"),i()()),n&2){let e=g.$implicit;a(2),v(e.Outlet),a(5),c("src",E(8,12,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),c("order",e),a(2),B(" ",G(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),v(e.Customer),a(),W(U(19,Se,(e.Variants==null?null:e.Variants.length)>1)),a(),b((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),v(E(21,17,e.Amount)),a(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function ye(n,g){if(n&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i()()(),t(16,"tbody"),D(17,we,26,21,"tr",null,I),i()(),t(19,"app-custom-paginator",24),M("next",function(){m(e);let r=h();return d(r.initShippedOrders())})("previous",function(){m(e);let r=h();return d(r.initShippedOrders())}),i()()}if(n&2){let e=h(),p=j(0);a(17),k(p),a(2),c("filter",e.filter())("totaldata",p==null?null:p.length)}}function xe(n,g){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Xe=(()=>{class n{constructor(){this.shippedService=y(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.shippedService.getShippedOrders(this.filter())}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=N({type:n,selectors:[["app-shipped"]],features:[H([T])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","12px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(p,r){if(p&1){let s=V();z(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return m(s),d(r.initShippedOrders())}),S("textChange",function(o){return m(s),f(r.filter().Number,o)||(r.filter().Number=o),d(o)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),S("ngModelChange",function(o){return m(s),f(r.filter().ListChannelID,o)||(r.filter().ListChannelID=o),d(o)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),S("dateChange",function(o){return m(s),f(r.filter().From,o)||(r.filter().From=o),d(o)}),i()(),t(18,"div")(19,"datepicker",8),S("dateChange",function(o){return m(s),f(r.filter().To,o)||(r.filter().To=o),d(o)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),S("ngModelChange",function(o){return m(s),f(r.filter().PageNumber,o)||(r.filter().PageNumber=o),d(o)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),S("ngModelChange",function(o){return m(s),f(r.filter().PageSize,o)||(r.filter().PageSize=o),d(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,ye,20,2,"div",15)(33,xe,2,0,"div",16),i()()()()()}if(p&2){let s=A(E(1,8,r.shippedOrders$)||R(11,fe));a(2),_("text",r.filter().Number),a(10),c("multiple",!0),_("ngModel",r.filter().ListChannelID),a(5),_("date",r.filter().From),a(2),_("date",r.filter().To),a(4),_("ngModel",r.filter().PageNumber),a(4),_("ngModel",r.filter().PageSize),a(5),b(s.length>0?32:33)}},dependencies:[Q,q,K,J,ae,oe,pe,le,ee,X,$,Y,Z,se,ce,ue,de,me,re,ne,he],encapsulation:2})}}return n})();export{Xe as ShippedComponent};
1
+ import{a as se,b as ce,c as ue}from"./chunk-V5BKQSAT.js";import{a as he}from"./chunk-GQLSQKDI.js";import{a as me}from"./chunk-46CA5SER.js";import{a as de}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as pe}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as le}from"./chunk-WPW3D4MQ.js";import"./chunk-USNELOQD.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ie}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as te}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as oe,n as ae}from"./chunk-CLER2MX6.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as ne,s as re}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as q,k as J,m as K,n as Q}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as N,Gc as l,Hc as v,Ic as B,Kc as _,Lc as f,Mb as x,Mc as S,Nc as z,Oc as A,Pc as j,Qc as H,Ra as O,Rc as R,Sc as U,Yb as c,ac as W,ad as E,bd as G,dc as b,ec as I,gc as D,hc as k,ic as t,ja as L,jc as i,kc as u,oc as V,pa as y,pb as F,rb as a,tc as M,uc as h,v as P,ya as m,za as d}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var T=(()=>{class n{constructor(){this.httpService=y(te)}getShippedOrders(e){return this.httpService.post(ie.GetShipped,e).pipe(P(p=>p.Data||[]))}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=L({token:n,factory:n.\u0275fac})}}return n})();var fe=()=>[],Se=n=>({"td-cell-hover":n});function ge(n,g){if(n&1&&u(0,"variants-dropdown",29),n&2){let e=h().$implicit;c("variants",e==null?null:e.Variants)}}function Ce(n,g){if(n&1&&u(0,"variant-with-image",30),n&2){let e=h().$implicit;c("variant",e==null?null:e.Variants[0])}}function ve(n,g){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=h().$implicit;a(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function we(n,g){if(n&1&&(t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",25)(5,"div",26)(6,"div"),u(7,"img",27),w(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",28),i()(),t(11,"small"),l(12),w(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),x(17,ge,1,1,"variants-dropdown",29)(18,Ce,1,1,"variant-with-image",30),i(),t(19,"td",31),l(20),w(21,"number"),i(),t(22,"td")(23,"span"),l(24),i(),x(25,ve,2,1,"span"),i()()),n&2){let e=g.$implicit;a(2),v(e.Outlet),a(5),c("src",E(8,12,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),c("order",e),a(2),B(" ",G(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),v(e.Customer),a(),W(U(19,Se,(e.Variants==null?null:e.Variants.length)>1)),a(),b((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),v(E(21,17,e.Amount)),a(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function ye(n,g){if(n&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i()()(),t(16,"tbody"),D(17,we,26,21,"tr",null,I),i()(),t(19,"app-custom-paginator",24),M("next",function(){m(e);let r=h();return d(r.initShippedOrders())})("previous",function(){m(e);let r=h();return d(r.initShippedOrders())}),i()()}if(n&2){let e=h(),p=j(0);a(17),k(p),a(2),c("filter",e.filter())("totaldata",p==null?null:p.length)}}function xe(n,g){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Xe=(()=>{class n{constructor(){this.shippedService=y(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.shippedService.getShippedOrders(this.filter())}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=N({type:n,selectors:[["app-shipped"]],features:[H([T])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","12px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(p,r){if(p&1){let s=V();z(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return m(s),d(r.initShippedOrders())}),S("textChange",function(o){return m(s),f(r.filter().Number,o)||(r.filter().Number=o),d(o)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),S("ngModelChange",function(o){return m(s),f(r.filter().ListChannelID,o)||(r.filter().ListChannelID=o),d(o)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),S("dateChange",function(o){return m(s),f(r.filter().From,o)||(r.filter().From=o),d(o)}),i()(),t(18,"div")(19,"datepicker",8),S("dateChange",function(o){return m(s),f(r.filter().To,o)||(r.filter().To=o),d(o)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),S("ngModelChange",function(o){return m(s),f(r.filter().PageNumber,o)||(r.filter().PageNumber=o),d(o)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),S("ngModelChange",function(o){return m(s),f(r.filter().PageSize,o)||(r.filter().PageSize=o),d(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,ye,20,2,"div",15)(33,xe,2,0,"div",16),i()()()()()}if(p&2){let s=A(E(1,8,r.shippedOrders$)||R(11,fe));a(2),_("text",r.filter().Number),a(10),c("multiple",!0),_("ngModel",r.filter().ListChannelID),a(5),_("date",r.filter().From),a(2),_("date",r.filter().To),a(4),_("ngModel",r.filter().PageNumber),a(4),_("ngModel",r.filter().PageSize),a(5),b(s.length>0?32:33)}},dependencies:[Q,q,K,J,ae,oe,pe,le,ee,X,$,Y,Z,se,ce,ue,de,me,re,ne,he],encapsulation:2})}}return n})();export{Xe as ShippedComponent};
@@ -1 +1 @@
1
- import{a as q}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as oe}from"./chunk-EPVCMYCI.js";import{a as re,b as Be}from"./chunk-6FY74YFQ.js";import"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import{a as W}from"./chunk-227LB3XT.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as Ve,b as We}from"./chunk-HYJVHRMN.js";import"./chunk-CMTBBXR5.js";import{h as j}from"./chunk-S5SDX7ZG.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-V3NCYRCF.js";import{a as te,b as ie,d as ne,e as Pe}from"./chunk-5JVEEL2T.js";import{c as B}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as M}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as N,n as ke}from"./chunk-CLER2MX6.js";import{A as Ne,B as Le,c as Q,h as X,m as $,o as ee,u as De,v as Me}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as Re,s as Oe}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{E as k,F as Te,H as P,J as fe,d as ge,f as Z,g as T,j as Ee,k as D,l as F,n as he}from"./chunk-M2FCTYGU.js";import{$c as b,Fc as J,Gb as x,Gc as r,Hb as pe,Hc as m,Ic as R,Kc as _,Lc as y,Mb as f,Mc as C,Rc as Y,Sc as A,Yb as p,ac as Ie,ad as O,bd as E,cd as K,ic as i,ja as ce,jc as n,ka as me,kc as L,lc as H,mc as z,oa as we,oc as I,pb as G,rb as l,tc as w,uc as S,v as ue,xb as h,ya as c,za as u}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ae=(()=>{class o{constructor(){this.ObjectlogTabs=[{Title:"Channel Push Log Exception",Url:"/menu/log/exception"},{Title:"Channel Push Log",Url:"/menu/log/rawlog"},{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"}]}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-logs"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(a,e){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),L(3,"nav-tab",2),n()()(),L(4,"router-outlet")),a&2&&(l(3),p("Tabs",e.ObjectlogTabs))},dependencies:[Te,Ve],encapsulation:2})}}return o})();var ae=(()=>{class o{constructor(){}get Data(){return this._Data}set Data(t){this._Data=t}Fill(t){return this._Data.find(a=>a._id==t)}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Xe=()=>["/menu/log/order/detail-user"],$e=o=>({ID:o}),et=o=>({"bg-warning":o});function tt(o,g){if(o&1&&(i(0,"span",22),L(1,"img",23),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function it(o,g){o&1&&(i(0,"th",27)(1,"span",33),r(2," Response Body Warning "),n()())}function nt(o,g){o&1&&(i(0,"th")(1,"span",33),r(2," Number Override "),n()())}function ot(o,g){if(o&1&&(i(0,"td",27)(1,"span",36),r(2),n()()),o&2){let t=S().$implicit;l(),p("ngClass",A(2,et,t.responseBodyWarning!=null)),l(),m(t.responseBodyWarning)}}function rt(o,g){if(o&1&&(i(0,"td"),r(1),n()),o&2){let t=S().$implicit;l(),R(" ",t.ResponseBodyWarningReference," ")}}function at(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",34),r(3),b(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td",27)(12,"span",35),r(13),n()(),f(14,ot,3,4,"td",29)(15,rt,2,1,"td",30),n()),o&2){let t=g.$implicit,a=S(2);l(2),p("routerLink",Y(14,Xe))("queryParams",A(15,$e,t.ID)),l(),R(" ",E(4,11,t.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),m(t.ChannelName),l(2),m(t.POSActionTypeString),l(2),m(t.Number),l(2),Ie(t.ResponseCode===200||t.ResponseCode===202?"bg-success":"bg-warning"),l(),R(" ",t.ResponseCode," "),l(),p("ngIf",a.responseBodyWarningVisible),l(),p("ngIf",a.responseBodyWarningVisible)}}function lt(o,g){if(o&1){let t=I();H(0),i(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),r(6,"Date"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"Actions"),n(),i(11,"th"),r(12,"Number"),n(),i(13,"th",27)(14,"span",28),r(15," Response Code "),n()(),f(16,it,3,0,"th",29)(17,nt,3,0,"th",30),n()(),i(18,"tbody"),f(19,at,16,17,"tr",31),n()(),i(20,"mat-paginator",32),w("page",function(e){c(t);let d=S();return u(d.changePage(e))}),n()(),z()}if(o&2){let t=S();l(16),p("ngIf",t.responseBodyWarningVisible),l(),p("ngIf",t.responseBodyWarningVisible),l(2),p("ngForOf",t.Result),l(),p("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function st(o,g){o&1&&(i(0,"div",37),L(1,"app-empty-state"),n())}var Fe=(()=>{class o{constructor(t,a,e,d){this.http=t,this._RawLogService=a,this.route=e,this.authService=d,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(t=>{this.responseCode=t.responseCode,this.responseCode!=null?this.Load(t):this.Load()})}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("/api/Orders/Get",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){e._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let d={ID:e._id,Created:e._source["@timestamp_received"],shopId:e._source.shopId,MarketTypeString:e._source.log.type,ChannelName:e._source?.channelId!=null?this.channelOptions.find(v=>v.ID===e._source?.channelId)?.Name:"",POSActionTypeString:e._source.message,Number:e._source.log.number,ResponseCode:e._source.log.responseCode,responseBodyWarning:e._source.log.responseBodyWarning,ResponseBodyWarningReference:e._source.log.ResponseBodyWarningReference};this.Result.push(d)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(ae),h(k),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-order"]],standalone:!1,decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order 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"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),C("textChange",function(s){return c(d),y(e.Number,s)||(e.Number=s),u(s)}),w("onSubmit",function(s){return c(d),u(e.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(6,tt,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",2),r(9,"Action"),n(),i(10,"ng-select",6),C("ngModelChange",function(s){return c(d),y(e.filter.ActionType,s)||(e.filter.ActionType=s),u(s)}),n()(),i(11,"div",5)(12,"label",7),r(13,"From/To"),n(),i(14,"div",8)(15,"datepicker",9),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",10),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(18,"div",5)(19,"label",11),r(20,"Response Code"),n(),i(21,"input",12),C("ngModelChange",function(s){return c(d),y(e.filter.StatusCode,s)||(e.filter.StatusCode=s),u(s)}),n()(),i(22,"div",5)(23,"label",11),r(24,"Response Body Warning"),n(),i(25,"input",13),C("ngModelChange",function(s){return c(d),y(e.filter.responseBodyWarning,s)||(e.filter.responseBodyWarning=s),u(s)}),n(),i(26,"datalist",14),L(27,"option",15),n()(),i(28,"div",5)(29,"label",11),r(30,"Page Number"),n(),i(31,"input",16),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(32,"div",5)(33,"label",11),r(34,"Page Size"),n(),i(35,"input",17),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()(),i(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),f(40,lt,21,6,"ng-container",21)(41,st,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(42);_("text",e.Number),l(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(5),p("clearable",!0)("items",e.ActionTypeList),_("ngModel",e.filter.ActionType),l(5),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.StatusCode),l(4),_("ngModel",e.filter.responseBodyWarning),l(6),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",d)}},dependencies:[ge,Z,T,De,Me,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,Re,D],encapsulation:2})}}return o})();var dt=o=>({"bg-gradient-warning":o}),mt=()=>["/menu/log/inventory/sync-inventory/detail"],pt=o=>({ID:o});function ct(o,g){if(o&1&&(i(0,"span",19),L(1,"img",20),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function ut(o,g){if(o&1&&(i(0,"tr",26)(1,"td")(2,"a",27),r(3),b(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td"),r(12),n()()),o&2){let t=g.$implicit;p("ngClass",A(11,dt,t.ResponseCode==400)),l(2),p("routerLink",Y(13,mt))("queryParams",A(14,pt,t.ID)),l(),R(" ",E(4,8,t.Created,"dd MMM yyyy HH:mm")," "),l(3),m(t.channelName),l(2),m(t.Sku),l(2),m(t.Stock),l(2),m(t.ResponseCode)}}function gt(o,g){if(o&1){let t=I();H(0),i(1,"div",21)(2,"table",22)(3,"thead")(4,"tr",23)(5,"th"),r(6,"Created"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"SKU"),n(),i(11,"th"),r(12,"Stock"),n(),i(13,"th"),r(14,"Response code"),n()()(),i(15,"tbody"),f(16,ut,13,16,"tr",24),n()(),i(17,"mat-paginator",25),w("page",function(e){c(t);let d=S();return u(d.changePage(e))}),n()(),z()}if(o&2){let t=S();l(16),p("ngForOf",t.Result),l(),p("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function ht(o,g){o&1&&(i(0,"div",28),L(1,"app-empty-state"),n())}var je=(()=>{class o{constructor(t,a,e){this.http=t,this._RawLogService=a,this.authService=e,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(t=>{this.filter=t.Filter,this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(t){t!=null&&(this.filter.Sku=t),this.http.post("api/Inventory/GetLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){let d={ID:e._source.log.id,Created:e._source["@timestamp_received"],channelName:e._source.log.channelName,Sku:e._source.log.sku,Stock:e._source.log.stock,ResponseCode:e._source.log.responseCode};this.Result.push(d)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(ae),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-log"]],standalone:!1,decls:33,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Inventory Sync","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),C("textChange",function(s){return c(d),y(e.filter.Sku,s)||(e.filter.Sku=s),u(s)}),w("onSubmit",function(s){return c(d),u(e.Get(s))}),i(1,"actions")(2,"a",2),r(3," Order Inventory Sync Job "),n()(),i(4,"filters")(5,"div",3)(6,"div")(7,"label",4),r(8,"Channel"),n(),i(9,"ng-select",5),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(10,ct,3,3,"ng-template",6),n()(),i(11,"div",7)(12,"label",8),r(13,"From/To"),n(),i(14,"div",9)(15,"datepicker",10),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",11),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(18,"div",7)(19,"label",12),r(20,"Page Number"),n(),i(21,"input",13),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(22,"div",7)(23,"label",12),r(24,"Page Size"),n(),i(25,"input",14),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()()(),i(26,"content")(27,"div",15)(28,"div",16)(29,"div",17),f(30,gt,18,4,"ng-container",18)(31,ht,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(32);_("text",e.filter.Sku),l(9),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(6),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",d)}},dependencies:[ge,Z,T,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,D],encapsulation:2})}}return o})();var ft=()=>["/menu/log/rawlog/detail"],vt=o=>({ID:o});function _t(o,g){if(o&1&&(i(0,"span",17),L(1,"img",18),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function yt(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",25),r(3),b(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n()()),o&2){let t=g.$implicit;l(2),p("routerLink",Y(9,ft))("queryParams",A(10,vt,t.id)),l(),R(" ",E(4,6,t.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),m(t.type),l(2),m(t.number),l(2),m(t.message)}}function Ct(o,g){if(o&1){let t=I();H(0),i(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),r(6,"Date"),n(),i(7,"th"),r(8,"Type"),n(),i(9,"th"),r(10,"Number"),n(),i(11,"th"),r(12,"Message"),n()()(),i(13,"tbody"),f(14,yt,11,12,"tr",23),n()(),i(15,"mat-paginator",24),w("page",function(e){c(t);let d=S();return u(d.changePage(e))}),n()(),z()}if(o&2){let t=S();l(14),p("ngForOf",t.Result),l(),p("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function St(o,g){o&1&&(i(0,"div",26),L(1,"app-empty-state"),n())}var qe=(()=>{class o{constructor(t,a,e){this.http=t,this._RawLogService=a,this.authService=e,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(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){let d={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(d)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(ae),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-log"]],standalone:!1,decls:29,vars:10,consts:[["EMPTY_STATE",""],["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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),C("textChange",function(s){return c(d),y(e.filter.Number,s)||(e.filter.Number=s),u(s)}),w("onSubmit",function(s){return c(d),u(e.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(6,_t,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",6),r(9,"From/To"),n(),i(10,"div",7)(11,"datepicker",8),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(12,"div")(13,"datepicker",9),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(14,"div",5)(15,"label",10),r(16,"Page Number"),n(),i(17,"input",11),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(18,"div",5)(19,"label",10),r(20,"Page Size"),n(),i(21,"input",12),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()(),i(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),f(26,Ct,16,4,"ng-container",16)(27,St,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(28);_("text",e.filter.Number),l(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(6),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",d)}},dependencies:[Z,T,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,D],encapsulation:2})}}return o})();function bt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let t=S();l(6),m(t.ProcessedCode)}}function xt(o,g){if(o&1){let t=I();i(0,"a",16),w("click",function(){c(t);let e=S();return u(e.Retry())}),r(1,"Retry"),n()}}var Ge=(()=>{class o{constructor(t,a){this.route=t,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var t={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",t).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var t={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",t).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=B.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=B.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-detail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),b(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,bt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),b(69,"json"),n()()(),i(70,"actions",14),f(71,xt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),b(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),m(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),m(e.Number),l(7),m(e.MarketTypeString),l(7),m(e.ResponseCode),l(7),m(e.shopId),l(),p("ngIf",e.ProcessedCode!=null),l(7),m(e.POSActionTypeString),l(11),m(O(69,17,e.request)),l(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),m(O(82,19,e.response)))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();function wt(o,g){if(o&1&&(i(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),r(4,"General"),n()(),i(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),r(10,"Date"),n(),i(11,"div")(12,"span"),r(13),b(14,"date"),n()()()(),i(15,"div",6)(16,"div",12)(17,"label"),r(18,"SKU"),n(),i(19,"div")(20,"span"),r(21),n()()()(),i(22,"div",6)(23,"div",12)(24,"label"),r(25,"Channel"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",6)(30,"div",12)(31,"label"),r(32,"Response Code"),n(),i(33,"div")(34,"span"),r(35),n()()()()()()()()),o&2){let t=S();l(13),m(E(14,4,t.data.Created,"dd MMM yyyy")),l(8),m(t.data.Sku),l(7),m(t.data.ChannelName),l(7),m(t.data.ResponseCode)}}var He=(()=>{class o{constructor(t,a,e){this.route=t,this.http=a,this._RawLogService=e,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(d=>{this.ID=d.ID,this.Load()})}ngOnInit(){}Load(){var t={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",t).subscribe(a=>{this.data.Created=a.hits[0]._source["@timestamp_received"],this.data.Sku=a.hits[0]._source.log.sku,this.data.ChannelName=a.hits[0]._source.log.channelName,this.data.ResponseCode=a.hits[0]._source.log.responseCode,this.request=B.IsNotEmpty(a.hits[0]?._source.log?.request)?JSON.parse(a.hits[0]?._source?.log?.request):"",this.response=a.hits[0]._source.log.response})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M),h(ae))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-detail"]],standalone:!1,decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3),f(7,wt,36,7,"div",4),n(),i(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),r(13,"Request"),n()(),i(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),r(18),b(19,"json"),n()()()()()(),i(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),r(24,"Response"),n()(),i(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),r(29),n()()()()()()()()()()),a&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(7),p("ngIf",e.data),l(11),m(O(19,5,e.request)),l(11),m(e.response))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();function It(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let t=S();l(6),m(t.ProcessedCode)}}function Et(o,g){if(o&1){let t=I();i(0,"a",16),w("click",function(){c(t);let e=S();return u(e.Retry())}),r(1,"Retry"),n()}}var ze=(()=>{class o{constructor(t,a){this.route=t,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var t={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",t).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var t={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",t).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=B.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=B.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),b(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,It,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),b(69,"json"),n()()(),i(70,"actions",14),f(71,Et,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),b(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),m(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),m(e.Number),l(7),m(e.MarketTypeString),l(7),m(e.ResponseCode),l(7),m(e.shopId),l(),p("ngIf",e.ProcessedCode!=null),l(7),m(e.POSActionTypeString),l(11),m(O(69,17,e.request)),l(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),m(O(82,19,e.response)))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();var Tt=()=>["/menu/log/exception/detail"],Dt=o=>({ID:o});function Mt(o,g){if(o&1&&(i(0,"span",17),L(1,"img",18),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function Nt(o,g){if(o&1&&L(0,"img",27),o&2){let t=S().$implicit;p("src",t.Logo,G)}}function Lt(o,g){if(o&1&&(i(0,"tr")(1,"td"),f(2,Nt,1,1,"img",25),r(3),n(),i(4,"td")(5,"a",26),r(6),n()(),i(7,"td"),r(8),b(9,"date"),n(),i(10,"td")(11,"div",10),r(12),n(),i(13,"div"),r(14),n()()()),o&2){let t,a=g.$implicit;l(2),p("ngIf",a.Logo),l(),R(" ",a.ChannelName," "),l(2),p("routerLink",Y(11,Tt))("queryParams",A(12,Dt,a.id)),l(),R(" ",(t=a.number)!==null&&t!==void 0?t:"N/A"," "),l(2),m(E(9,8,a.date,"dd-MM-yyyy hh:mm:ss")),l(4),m(a.message),l(2),m(a.stackTrace)}}function Pt(o,g){if(o&1){let t=I();H(0),i(1,"mat-paginator",28),w("page",function(e){c(t);let d=S(2);return u(d.onPaginationChange(e))}),n(),z()}if(o&2){let t=S(2);l(),p("length",t.pageTotal)("pageSize",t.pageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function Rt(o,g){if(o&1&&(H(0),i(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),r(6,"Channel Name"),n(),i(7,"th",22),r(8,"Number"),n(),i(9,"th",22),r(10,"Date"),n(),i(11,"th"),r(12,"Exception"),n()()(),i(13,"tbody"),f(14,Lt,15,14,"tr",23),n()(),f(15,Pt,2,3,"ng-container",24),n(),z()),o&2){let t=S();l(14),p("ngForOf",t.exceptions),l(),p("ngIf",(t.exceptions==null?null:t.exceptions.length)>0)}}function Ot(o,g){o&1&&(i(0,"div",29),L(1,"app-empty-state"),n())}var Ue=(()=>{class o{constructor(t,a){this.http=t,this.authService=a,this.exceptions=[],this.filter={RowCount:50,PageNumber:1,Number:null,From:null,To:null,ChannelID:null},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(a=>{this.filter=a.Filter,this.getData()})}getData(t){this.filter.Number=t,this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(a=>{this.exceptions=a.hits.map(e=>({id:e._id,ChannelName:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Name:e._source?.shopId,Logo:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Img:null,number:e._source?.error?.number,date:e._source["@timestamp_received"],stackTrace:e._source?.error?.stackTrace,message:e._source?.message,requestJSON:e._source?.error?.requestJSON})),this.pageTotal=a.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(t){this.filter.PageNumber=t.pageIndex+1,this.getData()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-log"]],standalone:!1,decls:29,vars:9,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...",3,"onSubmit"],[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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","10%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["alt","Logo","style","width: 18px;",3,"src",4,"ngIf"],[3,"routerLink","queryParams"],["alt","Logo",2,"width","18px",3,"src"],[3,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),w("onSubmit",function(s){return c(d),u(e.getData(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(6,Mt,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",6),r(9,"From/To"),n(),i(10,"div",7)(11,"datepicker",8),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(12,"div")(13,"datepicker",9),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(14,"div",5)(15,"label",10),r(16,"Page Number"),n(),i(17,"input",11),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(18,"div",5)(19,"label",10),r(20,"Page Size"),n(),i(21,"input",12),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()(),i(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),f(26,Rt,16,2,"ng-container",16)(27,Ot,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(28);l(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(6),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",e.exceptions.length>0)("ngIfElse",d)}},dependencies:[Z,T,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,D],encapsulation:2})}}return o})();var Je=(()=>{class o{constructor(t){this.httpService=t}getExceptionDetail(t){return this.httpService.post("/api/Orders/GetDetailException",{ID:t}).pipe(ue(e=>e?.hits[0]?._source))}static{this.\u0275fac=function(a){return new(a||o)(we(M))}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function Wt(o,g){if(o&1&&(i(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),r(6,"General"),n()(),i(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),b(16,"date"),n()()()(),i(17,"div",9)(18,"div",10)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",9)(25,"div",10)(26,"label"),r(27,"Channel Name"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",9)(32,"div",10)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()(),i(38,"div",9)(39,"div",10)(40,"label"),r(41,"Channel ID"),n(),i(42,"div")(43,"span"),r(44),n()()()()()()()()(),i(45,"div",11)(46,"div",9)(47,"div",5)(48,"div",6)(49,"h5"),r(50,"Request"),n()(),i(51,"div",7)(52,"div",12)(53,"div",13)(54,"pre"),r(55),b(56,"json"),n()()()()()(),i(57,"div",9)(58,"div",5)(59,"div",6)(60,"h5"),r(61,"Exception"),n()(),i(62,"div",7)(63,"div",14)(64,"div",13)(65,"pre"),r(66),n()()()()()()()()),o&2){let t=g.ngIf;l(15),m(E(16,7,t["@timestamp"],"dd MMM yyyy HH:mm:ss")),l(8),m(t==null||t.error==null?null:t.error.number),l(7),m(t==null?null:t.channelName),l(7),m(t==null?null:t.shopId),l(7),m(t==null?null:t.message),l(11),m(O(56,10,t==null||t.error==null?null:t.error.request)),l(11),m(t==null||t.error==null?null:t.error.response)}}var Ye=(()=>{class o{constructor(t,a,e){this.activatedRoute=t,this.exceptionService=a,this.authService=e,this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let t=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(t?.ID).pipe(ue(a=>{let e=a;return{"@timestamp":e["@timestamp"]||e["@timestamp_received"],error:{number:e?.error?.number,request:JSON.parse(e?.error?.request),response:JSON.parse(e?.error?.response)},channelName:e?.channelId!=null?this.channelOptions.find(d=>d.ID===e?.channelId)?.Name:e?.shopId,shopId:e?.shopId,message:e?.message}}))}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(Je),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-detail"]],standalone:!1,decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[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(a,e){a&1&&(i(0,"mainpanel",0)(1,"content"),f(2,Wt,67,12,"div",1),b(3,"async"),n()()),a&2&&(p("headerTitle","Order #"+e.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngIf",O(3,4,e.exceptionDetail$)))},dependencies:[T,N,Ee,F,D],encapsulation:2})}}return o})();function kt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let t=S();l(6),m(t.ProcessedCode)}}function Bt(o,g){if(o&1){let t=I();i(0,"a",16),w("click",function(){c(t);let e=S();return u(e.Retry())}),r(1,"Retry"),n()}}var Ke=(()=>{class o{constructor(t,a){this.route=t,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var t={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",t).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var t={ID:this.ID};this.http.post("/api/Orders/GetDetailSyncOrder",t).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=B.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=B.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail-user"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),b(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,kt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),b(69,"json"),n()()(),i(70,"actions",14),f(71,Bt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),b(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),m(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),m(e.Number),l(7),m(e.MarketTypeString),l(7),m(e.ResponseCode),l(7),m(e.shopId),l(),p("ngIf",e.ProcessedCode!=null),l(7),m(e.POSActionTypeString),l(11),m(O(69,17,e.request)),l(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),m(O(82,19,e.response)))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();var At=[{path:"",component:Ae,children:[{path:"",redirectTo:"exception",pathMatch:"full"},{path:"order",component:Fe,canActivate:[W],data:{title:"Order Log"}},{path:"inventory/sync-inventory",component:je,canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"rawlog",component:qe,canActivate:[W],data:{title:"Raw Log"}},{path:"rawlog/detail",component:Ge,canActivate:[W],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",component:He,canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",component:ze,canActivate:[W],data:{title:"Order Details"}},{path:"order/detail-user",component:Ke,canActivate:[W],data:{title:"Order User Details"}},{path:"exception",component:Ue,canActivate:[W],data:{title:"Exception Log"}},{path:"exception/detail",component:Ye,canActivate:[W],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-CSBEB66Y.js").then(o=>o.InventoryAsyncLogComponent),canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-2IDDYNBR.js").then(o=>o.InventoryAsyncDetailComponent),canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-BLXMX3JN.js").then(o=>o.ChannelLogComponent)},canActivate:[W],data:{title:"Authorization Log"}}]}],Ze=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=pe({type:o})}static{this.\u0275inj=me({imports:[he,fe.forChild(At)]})}}return o})();var Qe=(()=>{class o{static \u0275fac=function(a){return new(a||o)};static \u0275mod=pe({type:o});static \u0275inj=me({})}return o})();var $i=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=pe({type:o})}static{this.\u0275inj=me({imports:[he,Ne,Le,Ze,fe,ke,Qe,Be,Pe,We,q,Oe]})}}return o})();export{$i as LogsModule};
1
+ import{a as q}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as oe}from"./chunk-EPVCMYCI.js";import{a as re,b as Be}from"./chunk-6FY74YFQ.js";import"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import{a as W}from"./chunk-PFRHV7VB.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as Ve,b as We}from"./chunk-HYJVHRMN.js";import"./chunk-CMTBBXR5.js";import{h as j}from"./chunk-USNELOQD.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{a as te,b as ie,d as ne,e as Pe}from"./chunk-5JVEEL2T.js";import{c as B}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as M}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as N,n as ke}from"./chunk-CLER2MX6.js";import{A as Ne,B as Le,c as Q,h as X,m as $,o as ee,u as De,v as Me}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as Re,s as Oe}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{E as k,F as Te,H as P,J as fe,d as ge,f as Z,g as T,j as Ee,k as D,l as F,n as he}from"./chunk-M2FCTYGU.js";import{$c as b,Fc as J,Gb as x,Gc as r,Hb as pe,Hc as m,Ic as R,Kc as _,Lc as y,Mb as f,Mc as C,Rc as Y,Sc as A,Yb as p,ac as Ie,ad as O,bd as E,cd as K,ic as i,ja as ce,jc as n,ka as me,kc as L,lc as H,mc as z,oa as we,oc as I,pb as G,rb as l,tc as w,uc as S,v as ue,xb as h,ya as c,za as u}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ae=(()=>{class o{constructor(){this.ObjectlogTabs=[{Title:"Channel Push Log Exception",Url:"/menu/log/exception"},{Title:"Channel Push Log",Url:"/menu/log/rawlog"},{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"}]}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-logs"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(a,e){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),L(3,"nav-tab",2),n()()(),L(4,"router-outlet")),a&2&&(l(3),p("Tabs",e.ObjectlogTabs))},dependencies:[Te,Ve],encapsulation:2})}}return o})();var ae=(()=>{class o{constructor(){}get Data(){return this._Data}set Data(t){this._Data=t}Fill(t){return this._Data.find(a=>a._id==t)}static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Xe=()=>["/menu/log/order/detail-user"],$e=o=>({ID:o}),et=o=>({"bg-warning":o});function tt(o,g){if(o&1&&(i(0,"span",22),L(1,"img",23),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function it(o,g){o&1&&(i(0,"th",27)(1,"span",33),r(2," Response Body Warning "),n()())}function nt(o,g){o&1&&(i(0,"th")(1,"span",33),r(2," Number Override "),n()())}function ot(o,g){if(o&1&&(i(0,"td",27)(1,"span",36),r(2),n()()),o&2){let t=S().$implicit;l(),p("ngClass",A(2,et,t.responseBodyWarning!=null)),l(),m(t.responseBodyWarning)}}function rt(o,g){if(o&1&&(i(0,"td"),r(1),n()),o&2){let t=S().$implicit;l(),R(" ",t.ResponseBodyWarningReference," ")}}function at(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",34),r(3),b(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td",27)(12,"span",35),r(13),n()(),f(14,ot,3,4,"td",29)(15,rt,2,1,"td",30),n()),o&2){let t=g.$implicit,a=S(2);l(2),p("routerLink",Y(14,Xe))("queryParams",A(15,$e,t.ID)),l(),R(" ",E(4,11,t.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),m(t.ChannelName),l(2),m(t.POSActionTypeString),l(2),m(t.Number),l(2),Ie(t.ResponseCode===200||t.ResponseCode===202?"bg-success":"bg-warning"),l(),R(" ",t.ResponseCode," "),l(),p("ngIf",a.responseBodyWarningVisible),l(),p("ngIf",a.responseBodyWarningVisible)}}function lt(o,g){if(o&1){let t=I();H(0),i(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),r(6,"Date"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"Actions"),n(),i(11,"th"),r(12,"Number"),n(),i(13,"th",27)(14,"span",28),r(15," Response Code "),n()(),f(16,it,3,0,"th",29)(17,nt,3,0,"th",30),n()(),i(18,"tbody"),f(19,at,16,17,"tr",31),n()(),i(20,"mat-paginator",32),w("page",function(e){c(t);let d=S();return u(d.changePage(e))}),n()(),z()}if(o&2){let t=S();l(16),p("ngIf",t.responseBodyWarningVisible),l(),p("ngIf",t.responseBodyWarningVisible),l(2),p("ngForOf",t.Result),l(),p("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function st(o,g){o&1&&(i(0,"div",37),L(1,"app-empty-state"),n())}var Fe=(()=>{class o{constructor(t,a,e,d){this.http=t,this._RawLogService=a,this.route=e,this.authService=d,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(t=>{this.responseCode=t.responseCode,this.responseCode!=null?this.Load(t):this.Load()})}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("/api/Orders/Get",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){e._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let d={ID:e._id,Created:e._source["@timestamp_received"],shopId:e._source.shopId,MarketTypeString:e._source.log.type,ChannelName:e._source?.channelId!=null?this.channelOptions.find(v=>v.ID===e._source?.channelId)?.Name:"",POSActionTypeString:e._source.message,Number:e._source.log.number,ResponseCode:e._source.log.responseCode,responseBodyWarning:e._source.log.responseBodyWarning,ResponseBodyWarningReference:e._source.log.ResponseBodyWarningReference};this.Result.push(d)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(ae),h(k),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-order"]],standalone:!1,decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order 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"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),C("textChange",function(s){return c(d),y(e.Number,s)||(e.Number=s),u(s)}),w("onSubmit",function(s){return c(d),u(e.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(6,tt,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",2),r(9,"Action"),n(),i(10,"ng-select",6),C("ngModelChange",function(s){return c(d),y(e.filter.ActionType,s)||(e.filter.ActionType=s),u(s)}),n()(),i(11,"div",5)(12,"label",7),r(13,"From/To"),n(),i(14,"div",8)(15,"datepicker",9),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",10),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(18,"div",5)(19,"label",11),r(20,"Response Code"),n(),i(21,"input",12),C("ngModelChange",function(s){return c(d),y(e.filter.StatusCode,s)||(e.filter.StatusCode=s),u(s)}),n()(),i(22,"div",5)(23,"label",11),r(24,"Response Body Warning"),n(),i(25,"input",13),C("ngModelChange",function(s){return c(d),y(e.filter.responseBodyWarning,s)||(e.filter.responseBodyWarning=s),u(s)}),n(),i(26,"datalist",14),L(27,"option",15),n()(),i(28,"div",5)(29,"label",11),r(30,"Page Number"),n(),i(31,"input",16),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(32,"div",5)(33,"label",11),r(34,"Page Size"),n(),i(35,"input",17),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()(),i(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),f(40,lt,21,6,"ng-container",21)(41,st,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(42);_("text",e.Number),l(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(5),p("clearable",!0)("items",e.ActionTypeList),_("ngModel",e.filter.ActionType),l(5),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.StatusCode),l(4),_("ngModel",e.filter.responseBodyWarning),l(6),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",d)}},dependencies:[ge,Z,T,De,Me,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,Re,D],encapsulation:2})}}return o})();var dt=o=>({"bg-gradient-warning":o}),mt=()=>["/menu/log/inventory/sync-inventory/detail"],pt=o=>({ID:o});function ct(o,g){if(o&1&&(i(0,"span",19),L(1,"img",20),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function ut(o,g){if(o&1&&(i(0,"tr",26)(1,"td")(2,"a",27),r(3),b(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n(),i(11,"td"),r(12),n()()),o&2){let t=g.$implicit;p("ngClass",A(11,dt,t.ResponseCode==400)),l(2),p("routerLink",Y(13,mt))("queryParams",A(14,pt,t.ID)),l(),R(" ",E(4,8,t.Created,"dd MMM yyyy HH:mm")," "),l(3),m(t.channelName),l(2),m(t.Sku),l(2),m(t.Stock),l(2),m(t.ResponseCode)}}function gt(o,g){if(o&1){let t=I();H(0),i(1,"div",21)(2,"table",22)(3,"thead")(4,"tr",23)(5,"th"),r(6,"Created"),n(),i(7,"th"),r(8,"Channel"),n(),i(9,"th"),r(10,"SKU"),n(),i(11,"th"),r(12,"Stock"),n(),i(13,"th"),r(14,"Response code"),n()()(),i(15,"tbody"),f(16,ut,13,16,"tr",24),n()(),i(17,"mat-paginator",25),w("page",function(e){c(t);let d=S();return u(d.changePage(e))}),n()(),z()}if(o&2){let t=S();l(16),p("ngForOf",t.Result),l(),p("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function ht(o,g){o&1&&(i(0,"div",28),L(1,"app-empty-state"),n())}var je=(()=>{class o{constructor(t,a,e){this.http=t,this._RawLogService=a,this.authService=e,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(t=>{this.filter=t.Filter,this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(t){t!=null&&(this.filter.Sku=t),this.http.post("api/Inventory/GetLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){let d={ID:e._source.log.id,Created:e._source["@timestamp_received"],channelName:e._source.log.channelName,Sku:e._source.log.sku,Stock:e._source.log.stock,ResponseCode:e._source.log.responseCode};this.Result.push(d)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(ae),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-log"]],standalone:!1,decls:33,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Inventory Sync","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),C("textChange",function(s){return c(d),y(e.filter.Sku,s)||(e.filter.Sku=s),u(s)}),w("onSubmit",function(s){return c(d),u(e.Get(s))}),i(1,"actions")(2,"a",2),r(3," Order Inventory Sync Job "),n()(),i(4,"filters")(5,"div",3)(6,"div")(7,"label",4),r(8,"Channel"),n(),i(9,"ng-select",5),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(10,ct,3,3,"ng-template",6),n()(),i(11,"div",7)(12,"label",8),r(13,"From/To"),n(),i(14,"div",9)(15,"datepicker",10),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(16,"div")(17,"datepicker",11),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(18,"div",7)(19,"label",12),r(20,"Page Number"),n(),i(21,"input",13),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(22,"div",7)(23,"label",12),r(24,"Page Size"),n(),i(25,"input",14),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()()(),i(26,"content")(27,"div",15)(28,"div",16)(29,"div",17),f(30,gt,18,4,"ng-container",18)(31,ht,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(32);_("text",e.filter.Sku),l(9),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(6),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",d)}},dependencies:[ge,Z,T,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,D],encapsulation:2})}}return o})();var ft=()=>["/menu/log/rawlog/detail"],vt=o=>({ID:o});function _t(o,g){if(o&1&&(i(0,"span",17),L(1,"img",18),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function yt(o,g){if(o&1&&(i(0,"tr")(1,"td")(2,"a",25),r(3),b(4,"date"),n()(),i(5,"td"),r(6),n(),i(7,"td"),r(8),n(),i(9,"td"),r(10),n()()),o&2){let t=g.$implicit;l(2),p("routerLink",Y(9,ft))("queryParams",A(10,vt,t.id)),l(),R(" ",E(4,6,t.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),m(t.type),l(2),m(t.number),l(2),m(t.message)}}function Ct(o,g){if(o&1){let t=I();H(0),i(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),r(6,"Date"),n(),i(7,"th"),r(8,"Type"),n(),i(9,"th"),r(10,"Number"),n(),i(11,"th"),r(12,"Message"),n()()(),i(13,"tbody"),f(14,yt,11,12,"tr",23),n()(),i(15,"mat-paginator",24),w("page",function(e){c(t);let d=S();return u(d.changePage(e))}),n()(),z()}if(o&2){let t=S();l(14),p("ngForOf",t.Result),l(),p("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function St(o,g){o&1&&(i(0,"div",26),L(1,"app-empty-state"),n())}var qe=(()=>{class o{constructor(t,a,e){this.http=t,this._RawLogService=a,this.authService=e,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(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){let d={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(d)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(ae),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-log"]],standalone:!1,decls:29,vars:10,consts:[["EMPTY_STATE",""],["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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),C("textChange",function(s){return c(d),y(e.filter.Number,s)||(e.filter.Number=s),u(s)}),w("onSubmit",function(s){return c(d),u(e.Get(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(6,_t,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",6),r(9,"From/To"),n(),i(10,"div",7)(11,"datepicker",8),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(12,"div")(13,"datepicker",9),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(14,"div",5)(15,"label",10),r(16,"Page Number"),n(),i(17,"input",11),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(18,"div",5)(19,"label",10),r(20,"Page Size"),n(),i(21,"input",12),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()(),i(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),f(26,Ct,16,4,"ng-container",16)(27,St,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(28);_("text",e.filter.Number),l(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(6),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",d)}},dependencies:[Z,T,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,D],encapsulation:2})}}return o})();function bt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let t=S();l(6),m(t.ProcessedCode)}}function xt(o,g){if(o&1){let t=I();i(0,"a",16),w("click",function(){c(t);let e=S();return u(e.Retry())}),r(1,"Retry"),n()}}var Ge=(()=>{class o{constructor(t,a){this.route=t,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var t={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",t).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var t={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",t).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=B.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=B.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M))}}static{this.\u0275cmp=x({type:o,selectors:[["app-raw-detail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),b(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,bt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),b(69,"json"),n()()(),i(70,"actions",14),f(71,xt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),b(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),m(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),m(e.Number),l(7),m(e.MarketTypeString),l(7),m(e.ResponseCode),l(7),m(e.shopId),l(),p("ngIf",e.ProcessedCode!=null),l(7),m(e.POSActionTypeString),l(11),m(O(69,17,e.request)),l(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),m(O(82,19,e.response)))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();function wt(o,g){if(o&1&&(i(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),r(4,"General"),n()(),i(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),r(10,"Date"),n(),i(11,"div")(12,"span"),r(13),b(14,"date"),n()()()(),i(15,"div",6)(16,"div",12)(17,"label"),r(18,"SKU"),n(),i(19,"div")(20,"span"),r(21),n()()()(),i(22,"div",6)(23,"div",12)(24,"label"),r(25,"Channel"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",6)(30,"div",12)(31,"label"),r(32,"Response Code"),n(),i(33,"div")(34,"span"),r(35),n()()()()()()()()),o&2){let t=S();l(13),m(E(14,4,t.data.Created,"dd MMM yyyy")),l(8),m(t.data.Sku),l(7),m(t.data.ChannelName),l(7),m(t.data.ResponseCode)}}var He=(()=>{class o{constructor(t,a,e){this.route=t,this.http=a,this._RawLogService=e,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(d=>{this.ID=d.ID,this.Load()})}ngOnInit(){}Load(){var t={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",t).subscribe(a=>{this.data.Created=a.hits[0]._source["@timestamp_received"],this.data.Sku=a.hits[0]._source.log.sku,this.data.ChannelName=a.hits[0]._source.log.channelName,this.data.ResponseCode=a.hits[0]._source.log.responseCode,this.request=B.IsNotEmpty(a.hits[0]?._source.log?.request)?JSON.parse(a.hits[0]?._source?.log?.request):"",this.response=a.hits[0]._source.log.response})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M),h(ae))}}static{this.\u0275cmp=x({type:o,selectors:[["app-inventory-detail"]],standalone:!1,decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3),f(7,wt,36,7,"div",4),n(),i(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),r(13,"Request"),n()(),i(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),r(18),b(19,"json"),n()()()()()(),i(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),r(24,"Response"),n()(),i(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),r(29),n()()()()()()()()()()),a&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(7),p("ngIf",e.data),l(11),m(O(19,5,e.request)),l(11),m(e.response))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();function It(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let t=S();l(6),m(t.ProcessedCode)}}function Et(o,g){if(o&1){let t=I();i(0,"a",16),w("click",function(){c(t);let e=S();return u(e.Retry())}),r(1,"Retry"),n()}}var ze=(()=>{class o{constructor(t,a){this.route=t,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var t={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",t).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var t={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",t).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=B.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=B.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),b(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,It,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),b(69,"json"),n()()(),i(70,"actions",14),f(71,Et,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),b(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),m(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),m(e.Number),l(7),m(e.MarketTypeString),l(7),m(e.ResponseCode),l(7),m(e.shopId),l(),p("ngIf",e.ProcessedCode!=null),l(7),m(e.POSActionTypeString),l(11),m(O(69,17,e.request)),l(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),m(O(82,19,e.response)))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();var Tt=()=>["/menu/log/exception/detail"],Dt=o=>({ID:o});function Mt(o,g){if(o&1&&(i(0,"span",17),L(1,"img",18),n(),r(2)),o&2){let t=g.item;l(),p("src",t.Img,G)("alt",t.Name),l(),R(" ",t.Name," ")}}function Nt(o,g){if(o&1&&L(0,"img",27),o&2){let t=S().$implicit;p("src",t.Logo,G)}}function Lt(o,g){if(o&1&&(i(0,"tr")(1,"td"),f(2,Nt,1,1,"img",25),r(3),n(),i(4,"td")(5,"a",26),r(6),n()(),i(7,"td"),r(8),b(9,"date"),n(),i(10,"td")(11,"div",10),r(12),n(),i(13,"div"),r(14),n()()()),o&2){let t,a=g.$implicit;l(2),p("ngIf",a.Logo),l(),R(" ",a.ChannelName," "),l(2),p("routerLink",Y(11,Tt))("queryParams",A(12,Dt,a.id)),l(),R(" ",(t=a.number)!==null&&t!==void 0?t:"N/A"," "),l(2),m(E(9,8,a.date,"dd-MM-yyyy hh:mm:ss")),l(4),m(a.message),l(2),m(a.stackTrace)}}function Pt(o,g){if(o&1){let t=I();H(0),i(1,"mat-paginator",28),w("page",function(e){c(t);let d=S(2);return u(d.onPaginationChange(e))}),n(),z()}if(o&2){let t=S(2);l(),p("length",t.pageTotal)("pageSize",t.pageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function Rt(o,g){if(o&1&&(H(0),i(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),r(6,"Channel Name"),n(),i(7,"th",22),r(8,"Number"),n(),i(9,"th",22),r(10,"Date"),n(),i(11,"th"),r(12,"Exception"),n()()(),i(13,"tbody"),f(14,Lt,15,14,"tr",23),n()(),f(15,Pt,2,3,"ng-container",24),n(),z()),o&2){let t=S();l(14),p("ngForOf",t.exceptions),l(),p("ngIf",(t.exceptions==null?null:t.exceptions.length)>0)}}function Ot(o,g){o&1&&(i(0,"div",29),L(1,"app-empty-state"),n())}var Ue=(()=>{class o{constructor(t,a){this.http=t,this.authService=a,this.exceptions=[],this.filter={RowCount:50,PageNumber:1,Number:null,From:null,To:null,ChannelID:null},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(a=>{this.filter=a.Filter,this.getData()})}getData(t){this.filter.Number=t,this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(a=>{this.exceptions=a.hits.map(e=>({id:e._id,ChannelName:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Name:e._source?.shopId,Logo:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Img:null,number:e._source?.error?.number,date:e._source["@timestamp_received"],stackTrace:e._source?.error?.stackTrace,message:e._source?.message,requestJSON:e._source?.error?.requestJSON})),this.pageTotal=a.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(t){this.filter.PageNumber=t.pageIndex+1,this.getData()}static{this.\u0275fac=function(a){return new(a||o)(h(M),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-log"]],standalone:!1,decls:29,vars:9,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...",3,"onSubmit"],[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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","10%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["alt","Logo","style","width: 18px;",3,"src",4,"ngIf"],[3,"routerLink","queryParams"],["alt","Logo",2,"width","18px",3,"src"],[3,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let d=I();i(0,"mainpanel",1),w("onSubmit",function(s){return c(d),u(e.getData(s))}),i(1,"filters")(2,"div")(3,"label",2),r(4,"Channel"),n(),i(5,"ng-select",3),C("ngModelChange",function(s){return c(d),y(e.filter.ChannelID,s)||(e.filter.ChannelID=s),u(s)}),f(6,Mt,3,3,"ng-template",4),n()(),i(7,"div",5)(8,"label",6),r(9,"From/To"),n(),i(10,"div",7)(11,"datepicker",8),C("dateChange",function(s){return c(d),y(e.filter.From,s)||(e.filter.From=s),u(s)}),n()(),i(12,"div")(13,"datepicker",9),C("dateChange",function(s){return c(d),y(e.filter.To,s)||(e.filter.To=s),u(s)}),n()()(),i(14,"div",5)(15,"label",10),r(16,"Page Number"),n(),i(17,"input",11),C("ngModelChange",function(s){return c(d),y(e.filter.PageNumber,s)||(e.filter.PageNumber=s),u(s)}),n()(),i(18,"div",5)(19,"label",10),r(20,"Page Size"),n(),i(21,"input",12),C("ngModelChange",function(s){return c(d),y(e.filter.RowCount,s)||(e.filter.RowCount=s),u(s)}),n()()(),i(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),f(26,Rt,16,2,"ng-container",16)(27,Ot,2,0,"ng-template",null,0,K),n()()()()()}if(a&2){let d=J(28);l(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),l(6),_("date",e.filter.From),l(2),_("date",e.filter.To),l(4),_("ngModel",e.filter.PageNumber),l(4),_("ngModel",e.filter.RowCount),l(5),p("ngIf",e.exceptions.length>0)("ngIfElse",d)}},dependencies:[Z,T,Q,ee,X,$,P,N,re,ne,te,ie,q,oe,D],encapsulation:2})}}return o})();var Je=(()=>{class o{constructor(t){this.httpService=t}getExceptionDetail(t){return this.httpService.post("/api/Orders/GetDetailException",{ID:t}).pipe(ue(e=>e?.hits[0]?._source))}static{this.\u0275fac=function(a){return new(a||o)(we(M))}}static{this.\u0275prov=ce({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function Wt(o,g){if(o&1&&(i(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),r(6,"General"),n()(),i(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),b(16,"date"),n()()()(),i(17,"div",9)(18,"div",10)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",9)(25,"div",10)(26,"label"),r(27,"Channel Name"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",9)(32,"div",10)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()(),i(38,"div",9)(39,"div",10)(40,"label"),r(41,"Channel ID"),n(),i(42,"div")(43,"span"),r(44),n()()()()()()()()(),i(45,"div",11)(46,"div",9)(47,"div",5)(48,"div",6)(49,"h5"),r(50,"Request"),n()(),i(51,"div",7)(52,"div",12)(53,"div",13)(54,"pre"),r(55),b(56,"json"),n()()()()()(),i(57,"div",9)(58,"div",5)(59,"div",6)(60,"h5"),r(61,"Exception"),n()(),i(62,"div",7)(63,"div",14)(64,"div",13)(65,"pre"),r(66),n()()()()()()()()),o&2){let t=g.ngIf;l(15),m(E(16,7,t["@timestamp"],"dd MMM yyyy HH:mm:ss")),l(8),m(t==null||t.error==null?null:t.error.number),l(7),m(t==null?null:t.channelName),l(7),m(t==null?null:t.shopId),l(7),m(t==null?null:t.message),l(11),m(O(56,10,t==null||t.error==null?null:t.error.request)),l(11),m(t==null||t.error==null?null:t.error.response)}}var Ye=(()=>{class o{constructor(t,a,e){this.activatedRoute=t,this.exceptionService=a,this.authService=e,this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let t=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(t?.ID).pipe(ue(a=>{let e=a;return{"@timestamp":e["@timestamp"]||e["@timestamp_received"],error:{number:e?.error?.number,request:JSON.parse(e?.error?.request),response:JSON.parse(e?.error?.response)},channelName:e?.channelId!=null?this.channelOptions.find(d=>d.ID===e?.channelId)?.Name:e?.shopId,shopId:e?.shopId,message:e?.message}}))}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(Je),h(j))}}static{this.\u0275cmp=x({type:o,selectors:[["app-exception-detail"]],standalone:!1,decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[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(a,e){a&1&&(i(0,"mainpanel",0)(1,"content"),f(2,Wt,67,12,"div",1),b(3,"async"),n()()),a&2&&(p("headerTitle","Order #"+e.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngIf",O(3,4,e.exceptionDetail$)))},dependencies:[T,N,Ee,F,D],encapsulation:2})}}return o})();function kt(o,g){if(o&1&&(i(0,"div",9)(1,"div",10)(2,"label"),r(3,"Process Code"),n(),i(4,"div")(5,"span"),r(6),n()()()()),o&2){let t=S();l(6),m(t.ProcessedCode)}}function Bt(o,g){if(o&1){let t=I();i(0,"a",16),w("click",function(){c(t);let e=S();return u(e.Retry())}),r(1,"Retry"),n()}}var Ke=(()=>{class o{constructor(t,a){this.route=t,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var t={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",t).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var t={ID:this.ID};this.http.post("/api/Orders/GetDetailSyncOrder",t).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=B.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=B.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}static{this.\u0275fac=function(a){return new(a||o)(h(k),h(M))}}static{this.\u0275cmp=x({type:o,selectors:[["app-orderdetail-user"]],standalone:!1,decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Back"),n()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),r(11,"General"),n()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),r(17,"Date"),n(),i(18,"div")(19,"span"),r(20),b(21,"date"),n()()()(),i(22,"div",9)(23,"div",10)(24,"label"),r(25,"Number"),n(),i(26,"div")(27,"span"),r(28),n()()()(),i(29,"div",9)(30,"div",10)(31,"label"),r(32,"Type"),n(),i(33,"div")(34,"span"),r(35),n()()()(),i(36,"div",9)(37,"div",10)(38,"label"),r(39,"Response Code"),n(),i(40,"div")(41,"span"),r(42),n()()()(),i(43,"div",9)(44,"div",10)(45,"label"),r(46,"ShopID"),n(),i(47,"div")(48,"span"),r(49),n()()()(),f(50,kt,7,1,"div",11),i(51,"div",9)(52,"div",10)(53,"label"),r(54,"Action"),n(),i(55,"div")(56,"span"),r(57),n()()()()()()()()(),i(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),r(63,"Request"),n()(),i(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),r(68),b(69,"json"),n()()(),i(70,"actions",14),f(71,Bt,2,0,"a",15),n()()()(),i(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),r(76,"Response"),n()(),i(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),r(81),b(82,"json"),n()()()()()()()()()()),a&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),m(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),m(e.Number),l(7),m(e.MarketTypeString),l(7),m(e.ResponseCode),l(7),m(e.shopId),l(),p("ngIf",e.ProcessedCode!=null),l(7),m(e.POSActionTypeString),l(11),m(O(69,17,e.request)),l(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),m(O(82,19,e.response)))},dependencies:[T,P,N,F,D],encapsulation:2})}}return o})();var At=[{path:"",component:Ae,children:[{path:"",redirectTo:"exception",pathMatch:"full"},{path:"order",component:Fe,canActivate:[W],data:{title:"Order Log"}},{path:"inventory/sync-inventory",component:je,canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"rawlog",component:qe,canActivate:[W],data:{title:"Raw Log"}},{path:"rawlog/detail",component:Ge,canActivate:[W],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",component:He,canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",component:ze,canActivate:[W],data:{title:"Order Details"}},{path:"order/detail-user",component:Ke,canActivate:[W],data:{title:"Order User Details"}},{path:"exception",component:Ue,canActivate:[W],data:{title:"Exception Log"}},{path:"exception/detail",component:Ye,canActivate:[W],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-CSBEB66Y.js").then(o=>o.InventoryAsyncLogComponent),canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-2IDDYNBR.js").then(o=>o.InventoryAsyncDetailComponent),canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-4Q35WLYQ.js").then(o=>o.ChannelLogComponent)},canActivate:[W],data:{title:"Authorization Log"}}]}],Ze=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=pe({type:o})}static{this.\u0275inj=me({imports:[he,fe.forChild(At)]})}}return o})();var Qe=(()=>{class o{static \u0275fac=function(a){return new(a||o)};static \u0275mod=pe({type:o});static \u0275inj=me({})}return o})();var $i=(()=>{class o{static{this.\u0275fac=function(a){return new(a||o)}}static{this.\u0275mod=pe({type:o})}static{this.\u0275inj=me({imports:[he,Ne,Le,Ze,fe,ke,Qe,Be,Pe,We,q,Oe]})}}return o})();export{$i as LogsModule};
@@ -1 +1 @@
1
- import{a as ge,b as Ce,c as _e}from"./chunk-V5BKQSAT.js";import{a as fe}from"./chunk-MQQD4OJO.js";import{a as se}from"./chunk-CATX24UZ.js";import{a as ue}from"./chunk-722SRHLY.js";import{a as de}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as ce}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-BFU7VKO3.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as me}from"./chunk-WPW3D4MQ.js";import"./chunk-S5SDX7ZG.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as oe}from"./chunk-V3NCYRCF.js";import"./chunk-5JVEEL2T.js";import{b}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as ie,e as ne}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as le,n as pe}from"./chunk-CLER2MX6.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as re,s as ae}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as J,k as K,m as Q,n as X}from"./chunk-M2FCTYGU.js";import{$c as y,Gb as F,Gc as l,Hc as v,Ic as z,Kc as C,Lc as _,Mb as x,Mc as f,Nc as j,Oc as H,Pc as R,Qc as U,Ra as N,Sc as G,Yb as g,Z as P,ac as W,ad as E,bd as q,dc as L,ec as D,gc as O,hc as B,ic as t,ja as k,jc as i,kc as d,oc as T,pa as S,pb as I,rb as a,tc as A,uc as u,v as M,ya as c,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var V=(()=>{class n{constructor(){this.httpService=S(ne),this.shippingLabelService=S(ue),this.toastrService=S(ie)}getAwaitingCollectionOrders(e){return this.httpService.post(oe.GetAwaitingCollection,e).pipe(M(p=>p?.Data))}printShippingLabel(e){switch(e?.MarketType){case b.Shopee:this.shippingLabelService.printShippingLabelShopee(e.Number,e.ShopID);break;case b.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e.Number,e.ShopID);break;case b.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e.Number);break;case b.Lazada:this.shippingLabelService.printShippingLabelLazada(e.Number,e.ShopID);break;case b.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=k({token:n,factory:n.\u0275fac})}}return n})();var we=n=>({"td-cell-hover":n});function Se(n,h){if(n&1&&d(0,"variants-dropdown",30),n&2){let e=u().$implicit;g("variants",e==null?null:e.Variants)}}function ve(n,h){if(n&1&&d(0,"variant-with-image",31),n&2){let e=u().$implicit;g("variant",e==null?null:e.Variants[0])}}function be(n,h){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=u().$implicit;a(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function ye(n,h){if(n&1){let e=T();t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",26)(5,"div",27)(6,"div"),d(7,"img",28),y(8,"channelImage"),i(),t(9,"div"),d(10,"order-link",29),i()(),t(11,"small"),l(12),y(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),x(17,Se,1,1,"variants-dropdown",30)(18,ve,1,1,"variant-with-image",31),i(),t(19,"td",32),l(20),y(21,"number"),i(),t(22,"td")(23,"span"),l(24),i(),x(25,be,2,1,"span"),i(),t(26,"td",33)(27,"button",34),A("click",function(){let o=c(e).$implicit,m=u(2);return s(m.onPrintShippingLabel(o))}),d(28,"i",35),i()()()}if(n&2){let e=h.$implicit;a(2),v(e.Outlet),a(5),g("src",E(8,12,e==null?null:e.MarketType),I)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),g("order",e),a(2),z(" ",q(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),v(e.Customer),a(),W(G(19,we,(e.Variants==null?null:e.Variants.length)>1)),a(),L((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),v(E(21,17,e.Amount)),a(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),L(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function xe(n,h){if(n&1){let e=T();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i(),d(16,"th",24),i()(),t(17,"tbody"),O(18,ye,29,21,"tr",null,D),i()(),t(20,"app-custom-paginator",25),A("next",function(){c(e);let o=u();return s(o.initAwaitingCollection())})("previous",function(){c(e);let o=u();return s(o.initAwaitingCollection())}),i()()}if(n&2){let e=u(),p=R(0);a(18),B(p),a(2),g("filter",e.filter())("totaldata",p==null?null:p.length)}}function Le(n,h){n&1&&(t(0,"div",16),d(1,"app-empty-state"),i())}var it=(()=>{class n{constructor(){this.awaitingCollectionService=S(V),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.awaitingCollectionService.getAwaitingCollectionOrders(this.filter()).pipe(P(1))}onPrintShippingLabel(e){this.awaitingCollectionService.printShippingLabel(e)}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=F({type:n,selectors:[["app-awaiting-collection"]],features:[U([V])],decls:34,vars:11,consts:[["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Print shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],[1,"fa-solid","fa-print","fs-3"]],template:function(p,o){if(p&1){let m=T();j(0),y(1,"async"),t(2,"mainpanel",0),A("onSubmit",function(){return c(m),s(o.initAwaitingCollection())}),f("textChange",function(r){return c(m),_(o.filter().Number,r)||(o.filter().Number=r),s(r)}),t(3,"actions")(4,"a",1),d(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),f("ngModelChange",function(r){return c(m),_(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),s(r)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(r){return c(m),_(o.filter().From,r)||(o.filter().From=r),s(r)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(r){return c(m),_(o.filter().To,r)||(o.filter().To=r),s(r)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(r){return c(m),_(o.filter().PageNumber,r)||(o.filter().PageNumber=r),s(r)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(r){return c(m),_(o.filter().PageSize,r)||(o.filter().PageSize=r),s(r)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,xe,21,2,"div",15)(33,Le,2,0,"div",16),i()()()()()}if(p&2){let m=H(E(1,8,o.awaitingCollections$));a(2),C("text",o.filter().Number),a(10),g("multiple",!0),C("ngModel",o.filter().ListChannelID),a(5),C("date",o.filter().From),a(2),C("date",o.filter().To),a(4),C("ngModel",o.filter().PageNumber),a(4),C("ngModel",o.filter().PageSize),a(5),L((m==null?null:m.length)>0?32:33)}},dependencies:[X,J,Q,K,pe,le,ce,me,te,Y,ee,Z,$,ge,Ce,_e,de,se,ae,re,fe],encapsulation:2})}}return n})();export{it as AwaitingCollectionComponent};
1
+ import{a as ge,b as Ce,c as _e}from"./chunk-V5BKQSAT.js";import{a as fe}from"./chunk-GQLSQKDI.js";import{a as se}from"./chunk-46CA5SER.js";import{a as ue}from"./chunk-722SRHLY.js";import{a as de}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as ce}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-BFU7VKO3.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as me}from"./chunk-WPW3D4MQ.js";import"./chunk-USNELOQD.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as oe}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import{b}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as ie,e as ne}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as le,n as pe}from"./chunk-CLER2MX6.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as re,s as ae}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as J,k as K,m as Q,n as X}from"./chunk-M2FCTYGU.js";import{$c as y,Gb as F,Gc as l,Hc as v,Ic as z,Kc as C,Lc as _,Mb as x,Mc as f,Nc as j,Oc as H,Pc as R,Qc as U,Ra as N,Sc as G,Yb as g,Z as P,ac as W,ad as E,bd as q,dc as L,ec as D,gc as O,hc as B,ic as t,ja as k,jc as i,kc as d,oc as T,pa as S,pb as I,rb as a,tc as A,uc as u,v as M,ya as c,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var V=(()=>{class n{constructor(){this.httpService=S(ne),this.shippingLabelService=S(ue),this.toastrService=S(ie)}getAwaitingCollectionOrders(e){return this.httpService.post(oe.GetAwaitingCollection,e).pipe(M(p=>p?.Data))}printShippingLabel(e){switch(e?.MarketType){case b.Shopee:this.shippingLabelService.printShippingLabelShopee(e.Number,e.ShopID);break;case b.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e.Number,e.ShopID);break;case b.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e.Number);break;case b.Lazada:this.shippingLabelService.printShippingLabelLazada(e.Number,e.ShopID);break;case b.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=k({token:n,factory:n.\u0275fac})}}return n})();var we=n=>({"td-cell-hover":n});function Se(n,h){if(n&1&&d(0,"variants-dropdown",30),n&2){let e=u().$implicit;g("variants",e==null?null:e.Variants)}}function ve(n,h){if(n&1&&d(0,"variant-with-image",31),n&2){let e=u().$implicit;g("variant",e==null?null:e.Variants[0])}}function be(n,h){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=u().$implicit;a(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function ye(n,h){if(n&1){let e=T();t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",26)(5,"div",27)(6,"div"),d(7,"img",28),y(8,"channelImage"),i(),t(9,"div"),d(10,"order-link",29),i()(),t(11,"small"),l(12),y(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),x(17,Se,1,1,"variants-dropdown",30)(18,ve,1,1,"variant-with-image",31),i(),t(19,"td",32),l(20),y(21,"number"),i(),t(22,"td")(23,"span"),l(24),i(),x(25,be,2,1,"span"),i(),t(26,"td",33)(27,"button",34),A("click",function(){let o=c(e).$implicit,m=u(2);return s(m.onPrintShippingLabel(o))}),d(28,"i",35),i()()()}if(n&2){let e=h.$implicit;a(2),v(e.Outlet),a(5),g("src",E(8,12,e==null?null:e.MarketType),I)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),g("order",e),a(2),z(" ",q(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),v(e.Customer),a(),W(G(19,we,(e.Variants==null?null:e.Variants.length)>1)),a(),L((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),v(E(21,17,e.Amount)),a(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),L(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function xe(n,h){if(n&1){let e=T();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i(),d(16,"th",24),i()(),t(17,"tbody"),O(18,ye,29,21,"tr",null,D),i()(),t(20,"app-custom-paginator",25),A("next",function(){c(e);let o=u();return s(o.initAwaitingCollection())})("previous",function(){c(e);let o=u();return s(o.initAwaitingCollection())}),i()()}if(n&2){let e=u(),p=R(0);a(18),B(p),a(2),g("filter",e.filter())("totaldata",p==null?null:p.length)}}function Le(n,h){n&1&&(t(0,"div",16),d(1,"app-empty-state"),i())}var it=(()=>{class n{constructor(){this.awaitingCollectionService=S(V),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.awaitingCollectionService.getAwaitingCollectionOrders(this.filter()).pipe(P(1))}onPrintShippingLabel(e){this.awaitingCollectionService.printShippingLabel(e)}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=F({type:n,selectors:[["app-awaiting-collection"]],features:[U([V])],decls:34,vars:11,consts:[["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Print shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],[1,"fa-solid","fa-print","fs-3"]],template:function(p,o){if(p&1){let m=T();j(0),y(1,"async"),t(2,"mainpanel",0),A("onSubmit",function(){return c(m),s(o.initAwaitingCollection())}),f("textChange",function(r){return c(m),_(o.filter().Number,r)||(o.filter().Number=r),s(r)}),t(3,"actions")(4,"a",1),d(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),f("ngModelChange",function(r){return c(m),_(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),s(r)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(r){return c(m),_(o.filter().From,r)||(o.filter().From=r),s(r)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(r){return c(m),_(o.filter().To,r)||(o.filter().To=r),s(r)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(r){return c(m),_(o.filter().PageNumber,r)||(o.filter().PageNumber=r),s(r)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(r){return c(m),_(o.filter().PageSize,r)||(o.filter().PageSize=r),s(r)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,xe,21,2,"div",15)(33,Le,2,0,"div",16),i()()()()()}if(p&2){let m=H(E(1,8,o.awaitingCollections$));a(2),C("text",o.filter().Number),a(10),g("multiple",!0),C("ngModel",o.filter().ListChannelID),a(5),C("date",o.filter().From),a(2),C("date",o.filter().To),a(4),C("ngModel",o.filter().PageNumber),a(4),C("ngModel",o.filter().PageSize),a(5),L((m==null?null:m.length)>0?32:33)}},dependencies:[X,J,Q,K,pe,le,ce,me,te,Y,ee,Z,$,ge,Ce,_e,de,se,ae,re,fe],encapsulation:2})}}return n})();export{it as AwaitingCollectionComponent};
@@ -1 +1 @@
1
- import{h as k}from"./chunk-S5SDX7ZG.js";import{a as A,b as F,d as U,e as W}from"./chunk-5JVEEL2T.js";import{A as L,a as D,h as V,m as I}from"./chunk-6QYD6NIJ.js";import{n as E}from"./chunk-M2FCTYGU.js";import{Gb as M,Gc as p,Ic as f,Kc as O,Lc as T,Mb as u,Mc as N,Oa as d,Qc as w,Yb as s,dc as y,ic as a,jc as o,kc as h,oc as x,pa as S,pb as g,rb as r,tc as C,uc as _,ya as v,za as b}from"./chunk-B7KTCPKC.js";function z(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o()),t&2){let e=m.item;r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," ")}}function P(t,m){if(t&1){let e=x();a(0,"span",6),C("click",function(){v(e);let n=_(),c=n.item,l=n.clear;return b(l(c))}),p(1,"x"),o()}}function j(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o(),u(4,P,2,0,"span",5)),t&2){let e=m.item,i=_();r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," "),r(),y(i.clearable()?4:-1)}}var Y=(()=>{class t{constructor(){this.authService=S(k),this.multiple=d(!1),this.clearable=d(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[w([{provide:D,multi:!0,useExisting:t}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,n){i&1&&(a(0,"ng-select",0),N("ngModelChange",function(l){return T(n.selectedChannels,l)||(n.selectedChannels=l),l}),C("ngModelChange",function(l){return n.onChannelChange(l)}),u(1,z,4,2,"ng-template",1)(2,j,5,3,"ng-template",2),o()),i&2&&(s("clearable",n.clearable())("items",n.options),O("ngModel",n.selectedChannels),s("multiple",n.multiple()))},dependencies:[E,W,U,A,F,L,V,I],encapsulation:2})}}return t})();export{Y as a};
1
+ import{h as k}from"./chunk-USNELOQD.js";import{a as A,b as F,d as U,e as W}from"./chunk-5JVEEL2T.js";import{A as L,a as D,h as V,m as I}from"./chunk-6QYD6NIJ.js";import{n as E}from"./chunk-M2FCTYGU.js";import{Gb as M,Gc as p,Ic as f,Kc as O,Lc as T,Mb as u,Mc as N,Oa as d,Qc as w,Yb as s,dc as y,ic as a,jc as o,kc as h,oc as x,pa as S,pb as g,rb as r,tc as C,uc as _,ya as v,za as b}from"./chunk-B7KTCPKC.js";function z(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o()),t&2){let e=m.item;r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," ")}}function P(t,m){if(t&1){let e=x();a(0,"span",6),C("click",function(){v(e);let n=_(),c=n.item,l=n.clear;return b(l(c))}),p(1,"x"),o()}}function j(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o(),u(4,P,2,0,"span",5)),t&2){let e=m.item,i=_();r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," "),r(),y(i.clearable()?4:-1)}}var Y=(()=>{class t{constructor(){this.authService=S(k),this.multiple=d(!1),this.clearable=d(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[w([{provide:D,multi:!0,useExisting:t}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,n){i&1&&(a(0,"ng-select",0),N("ngModelChange",function(l){return T(n.selectedChannels,l)||(n.selectedChannels=l),l}),C("ngModelChange",function(l){return n.onChannelChange(l)}),u(1,z,4,2,"ng-template",1)(2,j,5,3,"ng-template",2),o()),i&2&&(s("clearable",n.clearable())("items",n.options),O("ngModel",n.selectedChannels),s("multiple",n.multiple()))},dependencies:[E,W,U,A,F,L,V,I],encapsulation:2})}}return t})();export{Y as a};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-V3NCYRCF.js";import{e as o}from"./chunk-JXSBFTQM.js";import{ja as s,pa as i}from"./chunk-B7KTCPKC.js";var u=(()=>{class r{constructor(){this.httpService=i(o)}getLoader(){return this.httpService.post(e.GetUserLoader,{})}getUsers(t){return this.httpService.post(e.GetUsers,t)}getUserFormLoader(t=null){return this.httpService.post(e.GetLoaderForm,{ID:t})}deleteUsers(t){return this.httpService.post(e.DeleteUsers,{UserIDs:t})}getUserMigrateLoader(){return this.httpService.get(e.MigrateLoader)}migrateUser(t){return this.httpService.post(e.MigrateUsers,t)}onInviteUser(t){return this.httpService.post(e.UpdateUser,t)}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275prov=s({token:r,factory:r.\u0275fac})}}return r})();export{u as a};
1
+ import{a as e}from"./chunk-5HO2IJ47.js";import{e as o}from"./chunk-JXSBFTQM.js";import{ja as s,pa as i}from"./chunk-B7KTCPKC.js";var u=(()=>{class r{constructor(){this.httpService=i(o)}getLoader(){return this.httpService.post(e.GetUserLoader,{})}getUsers(t){return this.httpService.post(e.GetUsers,t)}getUserFormLoader(t=null){return this.httpService.post(e.GetLoaderForm,{ID:t})}deleteUsers(t){return this.httpService.post(e.DeleteUsers,{UserIDs:t})}getUserMigrateLoader(){return this.httpService.get(e.MigrateLoader)}migrateUser(t){return this.httpService.post(e.MigrateUsers,t)}onInviteUser(t){return this.httpService.post(e.UpdateUser,t)}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275prov=s({token:r,factory:r.\u0275fac})}}return r})();export{u as a};
@@ -1 +1 @@
1
- import{a as oe}from"./chunk-EPVCMYCI.js";import{a as le,b as re}from"./chunk-6FY74YFQ.js";import"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{b as ae}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{h as X}from"./chunk-S5SDX7ZG.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-V3NCYRCF.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-5JVEEL2T.js";import{c as K}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as Q}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ne,n as ie}from"./chunk-CLER2MX6.js";import{A as G,h as H,m as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as V,k as J,l as W,n as k}from"./chunk-M2FCTYGU.js";import{$c as m,Gb as P,Gc as p,Hc as C,Ic as y,Kc as j,Lc as O,Mb as u,Mc as q,Qc as z,Yb as d,Z as M,aa as D,ad as c,bd as A,dc as R,ec as B,g as L,gc as T,hc as $,ic as i,ja as w,jc as a,kc as f,oc as F,pa as g,pb as S,rb as l,tc as v,uc as x,v as I,ya as E,za as N}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{class n{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(e=>this.getLogs$(e).pipe()))}getLogs$(e){return this.httpService.post("/api/Channel/GetChannelLogPaged",e)}onPaginationChange(e){let t=this._pageination.value;t.PageNumber=e.pageIndex+1,this._pageination.next(t)}onFilter(e){let t=this._pageination.value;t.PageNumber=1,t=_(_({},t),e),this._pageination.next(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=w({token:n,factory:n.\u0275fac})}}return n})();function me(n,h){if(n&1&&(i(0,"span",10),f(1,"img",11),a(),p(2)),n&2){let e=h.item;l(),d("src",e.Img,S)("alt",e.Name),l(),y(" ",e.Name," ")}}function se(n,h){if(n&1&&(i(0,"tr")(1,"td"),f(2,"img",17),i(3,"span"),p(4),a()(),i(5,"td")(6,"span",18),p(7),m(8,"json"),a()(),i(9,"td"),p(10),m(11,"json"),a(),i(12,"td"),p(13),m(14,"date"),a()()),n&2){let e=h.$implicit;l(2),d("src",e.Img,S),l(2),y(" ",e.ChannelName," "),l(3),C(c(8,5,e.Request)),l(3),C(c(11,7,e.Response)),l(3),C(A(14,9,e.Created,"dd-MM-yyyy hh:mm:ss"))}}function ce(n,h){if(n&1){let e=F();i(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),p(5,"Channel"),a(),i(6,"th"),p(7,"Request"),a(),i(8,"th"),p(9,"Response"),a(),i(10,"th",15),p(11,"Created"),a()()(),i(12,"tbody"),T(13,se,15,12,"tr",null,B),m(15,"async"),a()(),i(16,"mat-paginator",16),m(17,"async"),m(18,"async"),m(19,"async"),m(20,"async"),v("page",function(r){E(e);let o=x();return N(o.channelLogService.onPaginationChange(r))}),a()()}if(n&2){let e,t,r,o,s=x();l(13),$((e=c(15,3,s.channelLogs$))==null?null:e.Data),l(3),d("length",(t=c(17,5,s.channelLogs$))==null?null:t.Count)("pageSize",(r=c(18,7,s.filter$))==null?null:r.RowCount)("pageIndex",(o=c(19,9,s.filter$))!=null&&o.PageNumber?0:((o=c(20,11,s.filter$))==null?null:o.PageNumber)-1)}}function de(n,h){n&1&&(i(0,"div",9),f(1,"app-empty-state"),a())}var Oe=(()=>{class n{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(e=>(e.Data?e.Data=e.Data.map(t=>(t.Response=t.Response?JSON.parse(t.Response):"",t.Request=t.Request?JSON.parse(t.Request):"",t.Img=K.getChannelLogoByTypeId(t.TypeID),t)):e.Data=[],e)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-channel-log"]],features:[z([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(t,r){if(t&1&&(i(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),i(1,"filters")(2,"div",1)(3,"div")(4,"label",2),p(5,"Channel"),a(),i(6,"ng-select",3),q("ngModelChange",function(s){return O(r.channelID,s)||(r.channelID=s),s}),u(7,me,3,3,"ng-template",4),a()()()(),i(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,ce,21,13,"div",8),m(13,"async"),u(14,de,2,0,"div",9),a()()()()()),t&2){let o;d("hideSearchBox",!0),l(6),d("clearable",!0)("items",r.channelOptions),j("ngModel",r.channelID),l(6),R(((o=c(13,5,r.channelLogs$))==null||o.Data==null?null:o.Data.length)>0?12:14)}},dependencies:[k,V,W,J,ie,ne,oe,re,le,ae,te,ee,Y,Z,G,H,U],encapsulation:2})}}return n})();export{Oe as ChannelLogComponent};
1
+ import{a as oe}from"./chunk-EPVCMYCI.js";import{a as le,b as re}from"./chunk-6FY74YFQ.js";import"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{b as ae}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{h as X}from"./chunk-USNELOQD.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-5JVEEL2T.js";import{c as K}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as Q}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ne,n as ie}from"./chunk-CLER2MX6.js";import{A as G,h as H,m as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as V,k as J,l as W,n as k}from"./chunk-M2FCTYGU.js";import{$c as m,Gb as P,Gc as p,Hc as C,Ic as y,Kc as j,Lc as O,Mb as u,Mc as q,Qc as z,Yb as d,Z as M,aa as D,ad as c,bd as A,dc as R,ec as B,g as L,gc as T,hc as $,ic as i,ja as w,jc as a,kc as f,oc as F,pa as g,pb as S,rb as l,tc as v,uc as x,v as I,ya as E,za as N}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{class n{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(e=>this.getLogs$(e).pipe()))}getLogs$(e){return this.httpService.post("/api/Channel/GetChannelLogPaged",e)}onPaginationChange(e){let t=this._pageination.value;t.PageNumber=e.pageIndex+1,this._pageination.next(t)}onFilter(e){let t=this._pageination.value;t.PageNumber=1,t=_(_({},t),e),this._pageination.next(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=w({token:n,factory:n.\u0275fac})}}return n})();function me(n,h){if(n&1&&(i(0,"span",10),f(1,"img",11),a(),p(2)),n&2){let e=h.item;l(),d("src",e.Img,S)("alt",e.Name),l(),y(" ",e.Name," ")}}function se(n,h){if(n&1&&(i(0,"tr")(1,"td"),f(2,"img",17),i(3,"span"),p(4),a()(),i(5,"td")(6,"span",18),p(7),m(8,"json"),a()(),i(9,"td"),p(10),m(11,"json"),a(),i(12,"td"),p(13),m(14,"date"),a()()),n&2){let e=h.$implicit;l(2),d("src",e.Img,S),l(2),y(" ",e.ChannelName," "),l(3),C(c(8,5,e.Request)),l(3),C(c(11,7,e.Response)),l(3),C(A(14,9,e.Created,"dd-MM-yyyy hh:mm:ss"))}}function ce(n,h){if(n&1){let e=F();i(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),p(5,"Channel"),a(),i(6,"th"),p(7,"Request"),a(),i(8,"th"),p(9,"Response"),a(),i(10,"th",15),p(11,"Created"),a()()(),i(12,"tbody"),T(13,se,15,12,"tr",null,B),m(15,"async"),a()(),i(16,"mat-paginator",16),m(17,"async"),m(18,"async"),m(19,"async"),m(20,"async"),v("page",function(r){E(e);let o=x();return N(o.channelLogService.onPaginationChange(r))}),a()()}if(n&2){let e,t,r,o,s=x();l(13),$((e=c(15,3,s.channelLogs$))==null?null:e.Data),l(3),d("length",(t=c(17,5,s.channelLogs$))==null?null:t.Count)("pageSize",(r=c(18,7,s.filter$))==null?null:r.RowCount)("pageIndex",(o=c(19,9,s.filter$))!=null&&o.PageNumber?0:((o=c(20,11,s.filter$))==null?null:o.PageNumber)-1)}}function de(n,h){n&1&&(i(0,"div",9),f(1,"app-empty-state"),a())}var Oe=(()=>{class n{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(e=>(e.Data?e.Data=e.Data.map(t=>(t.Response=t.Response?JSON.parse(t.Response):"",t.Request=t.Request?JSON.parse(t.Request):"",t.Img=K.getChannelLogoByTypeId(t.TypeID),t)):e.Data=[],e)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-channel-log"]],features:[z([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(t,r){if(t&1&&(i(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),i(1,"filters")(2,"div",1)(3,"div")(4,"label",2),p(5,"Channel"),a(),i(6,"ng-select",3),q("ngModelChange",function(s){return O(r.channelID,s)||(r.channelID=s),s}),u(7,me,3,3,"ng-template",4),a()()()(),i(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,ce,21,13,"div",8),m(13,"async"),u(14,de,2,0,"div",9),a()()()()()),t&2){let o;d("hideSearchBox",!0),l(6),d("clearable",!0)("items",r.channelOptions),j("ngModel",r.channelID),l(6),R(((o=c(13,5,r.channelLogs$))==null||o.Data==null?null:o.Data.length)>0?12:14)}},dependencies:[k,V,W,J,ie,ne,oe,re,le,ae,te,ee,Y,Z,G,H,U],encapsulation:2})}}return n})();export{Oe as ChannelLogComponent};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-G6X5CZ34.js";import{a as be}from"./chunk-H3IVI3LN.js";import{a as Ve}from"./chunk-XUL4LU4R.js";import{a as Te,b as De}from"./chunk-NS46QSCM.js";import{a as Me}from"./chunk-E6XWD6WX.js";import{b as ke,c as Ee}from"./chunk-EH6HWI3G.js";import"./chunk-OLOIQI4D.js";import"./chunk-IA6KOBDJ.js";import"./chunk-RECNBAEB.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as Y}from"./chunk-5DIRXS7I.js";import"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-V3NCYRCF.js";import{d as he,e as fe}from"./chunk-5JVEEL2T.js";import{c as de}from"./chunk-PW42BQIY.js";import{a as _e,b as ge,c as Ce}from"./chunk-SWQXSJ7O.js";import{b as Z}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{b as xe,c as te,d as ye,j as Se,k as ve,m as Ue,n as we}from"./chunk-CLER2MX6.js";import{A as H,b as me,h as q,m as j}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{H as ce,J as pe,j as $,n as z}from"./chunk-M2FCTYGU.js";import{$b as K,$c as A,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as U,Lc as w,Mb as f,Mc as M,Nc as O,Oc as N,Pc as C,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as F,dc as v,ea as J,ec as V,gc as P,hc as I,ic as o,jc as s,kc as L,lc as b,mc as T,oc as y,pa as x,pb as ae,q as oe,rb as a,rd as R,tc as h,uc as l,v as G,ya as c,za as p}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://res.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Fe(i,m){if(i&1&&(o(0,"div",6),L(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),_("src",e.emptyStateIcon,ae)}}function Re(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),M("ngModelChange",function(t){let n=c(e).$implicit;return w(n.selected,t)||(n.selected=t),p(t)}),h("ngModelChange",function(){c(e);let t=l(2),n=C(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,Pe)),_("binary",!0)("id",e.ID),U("ngModel",e.selected),a(),_("for",e.ID),a(),D(" ",e.Name," ")}}function Ge(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),M("ngModelChange",function(t){c(e);let n=l();return w(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),h("ngModelChange",function(t){c(e);let n=l(),d=C(0);return p(n.onCheckAllChange(t,d))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Re,4,8,"div",14,V)}if(i&2){let e=l(),r=C(0);a(),K(X(4,Pe)),_("binary",!0),U("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=x(xe),this.data=x(te),this.userService=x(k),this.dialogData=x(te),this.toastr=x(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),E(1)),this.isCheckAll=S(!0),this.selectedGroup=S(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new Se,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(de.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([k]),le],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();O(0),A(1,"async"),o(2,"modal-material",0),h("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=C(0);return p(t.onSubmit(u))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),f(9,Fe,4,1,"div",6)(10,Ge,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),h("click",function(){return c(n),p(t.onClickSelect())}),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(F(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),v((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),U("ngModel",t.selectedGroup)}},dependencies:[z,$,ve,H,q,j,ke,Me],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"]})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),h("click",function(){c(e);let t=l(2),n=C(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),L(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function We(i,m){if(i&1&&(b(0),f(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),v(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function $e(i,m){if(i&1){let e=y();b(0),o(1,"button",15),h("click",function(){c(e);let t=l(),n=C(0),d=C(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,d==null?null:d.Data))}),g(2," Migrate "),s(),T()}}function ze(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function qe(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),h("change",function(t){c(e);let n=l(),d=C(2);return p(n.onCheckAllUser(t.target.checked,d==null?null:d.Data))}),s()()(),T()}}function je(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",23),M("ngModelChange",function(t){c(e);let n=l(2).$implicit;return w(n.checked,t)||(n.checked=t),p(t)}),h("ngModelChange",function(){c(e);let t=l(3),n=C(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),U("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),f(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),v(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function Ye(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.UserID)),a(),D(" ",e.Name," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Je(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ke(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Qe(i,m){if(i&1&&L(0,"p-chip",24),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&P(0,Qe,1,3,"p-chip",24,V),i&2){let e=l().$implicit;I(e.Channels)}}function et(i,m){i&1&&(o(0,"span"),g(1,"All Channels"),s())}function tt(i,m){if(i&1&&(o(0,"tr"),f(1,He,3,1,"ng-container",3),o(2,"td"),f(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),f(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),f(10,Xe,2,0)(11,et,2,0,"span"),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),v(r.hasUserEditRole()?3:4),a(3),v(r.hasUserEditRole()?6:7),a(4),v((e.Channels==null?null:e.Channels.length)>0?10:11)}}function it(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),h("next",function(){c(e);let t=l(),n=C(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=C(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=C(0),r=C(2);_("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)}}var zt=(()=>{class i{constructor(){this.usersService=x(k),this.permissionService=x(_e),this.toastService=x(Z),this.dialog=x(ye),this.userInviteOptions=S([]),this.searchText=S(null),this.selectedGroup=S(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),E(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserAdd,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=S(!1),this.selectedUsers=S([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(ue.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),E(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ie,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([k])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(r,t){if(r&1){let n=y();O(0),A(1,"async"),O(2),A(3,"async"),o(4,"mainpanel",0),M("textChange",function(u){return c(n),w(t.searchText,u)||(t.searchText=u),p(u)}),h("onSubmit",function(){c(n);let u=C(0);return p(t.initUsers(u==null?null:u.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),f(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,ze,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),f(21,qe,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel"),s()()(),o(28,"tbody"),P(29,tt,12,4,"tr",null,V),s()(),f(31,it,1,4,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),h("onSuccessUpdateUser",function(){c(n);let u=C(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(F(1,11,t.userLoader$));a(2);let d=N(F(3,14,t.users$));a(2),U("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),U("ngModel",t.selectedGroup),a(2),_("ngxPermissionsOnly",t.userDeleteRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(8),_("ngxPermissionsOnly",t.userDeleteRole),a(8),I(d==null?null:d.Data),a(2),v(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[z,$,we,Ue,pe,ce,Ve,Ce,ge,fe,he,H,me,q,j,Ee,De,Te],encapsulation:2})}}return i})();export{zt as UsersComponent};
1
+ import{a as k}from"./chunk-4JKDNUTX.js";import{a as be}from"./chunk-H3IVI3LN.js";import{a as Ve}from"./chunk-AJL3CYNX.js";import{a as Te,b as De}from"./chunk-NS46QSCM.js";import{a as Me}from"./chunk-E6XWD6WX.js";import{b as ke,c as Ee}from"./chunk-EH6HWI3G.js";import"./chunk-OLOIQI4D.js";import"./chunk-IA6KOBDJ.js";import"./chunk-RECNBAEB.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as Y}from"./chunk-5DIRXS7I.js";import"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-5HO2IJ47.js";import{d as Ce,e as fe}from"./chunk-5JVEEL2T.js";import{c as de}from"./chunk-PW42BQIY.js";import{a as _e,b as ge,c as he}from"./chunk-SWQXSJ7O.js";import{b as Z}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{b as xe,c as te,d as ye,j as Se,k as ve,m as Ue,n as we}from"./chunk-CLER2MX6.js";import{A as H,b as me,h as q,m as j}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{H as ce,J as pe,j as $,n as z}from"./chunk-M2FCTYGU.js";import{$b as K,$c as A,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as U,Lc as w,Mb as f,Mc as M,Nc as O,Oc as N,Pc as h,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as F,dc as v,ea as J,ec as V,gc as P,hc as I,ic as o,jc as s,kc as L,lc as b,mc as T,oc as y,pa as x,pb as ae,q as oe,rb as a,rd as R,tc as C,uc as l,v as G,ya as c,za as p}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://res.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Fe(i,m){if(i&1&&(o(0,"div",6),L(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),_("src",e.emptyStateIcon,ae)}}function Re(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),M("ngModelChange",function(t){let n=c(e).$implicit;return w(n.selected,t)||(n.selected=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(2),n=h(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,Pe)),_("binary",!0)("id",e.ID),U("ngModel",e.selected),a(),_("for",e.ID),a(),D(" ",e.Name," ")}}function Ge(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),M("ngModelChange",function(t){c(e);let n=l();return w(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),C("ngModelChange",function(t){c(e);let n=l(),d=h(0);return p(n.onCheckAllChange(t,d))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Re,4,8,"div",14,V)}if(i&2){let e=l(),r=h(0);a(),K(X(4,Pe)),_("binary",!0),U("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=x(xe),this.data=x(te),this.userService=x(k),this.dialogData=x(te),this.toastr=x(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),E(1)),this.isCheckAll=S(!0),this.selectedGroup=S(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new Se,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(de.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([k]),le],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();O(0),A(1,"async"),o(2,"modal-material",0),C("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=h(0);return p(t.onSubmit(u))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),f(9,Fe,4,1,"div",6)(10,Ge,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),C("click",function(){return c(n),p(t.onClickSelect())}),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(F(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),v((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),U("ngModel",t.selectedGroup)}},dependencies:[z,$,ve,H,q,j,ke,Me],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"]})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),C("click",function(){c(e);let t=l(2),n=h(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),L(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function We(i,m){if(i&1&&(b(0),f(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),v(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function $e(i,m){if(i&1){let e=y();b(0),o(1,"button",15),C("click",function(){c(e);let t=l(),n=h(0),d=h(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,d==null?null:d.Data))}),g(2," Migrate "),s(),T()}}function ze(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function qe(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),C("change",function(t){c(e);let n=l(),d=h(2);return p(n.onCheckAllUser(t.target.checked,d==null?null:d.Data))}),s()()(),T()}}function je(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",23),M("ngModelChange",function(t){c(e);let n=l(2).$implicit;return w(n.checked,t)||(n.checked=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(3),n=h(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),U("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),f(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),v(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function Ye(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.UserID)),a(),D(" ",e.Name," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Je(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ke(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Qe(i,m){if(i&1&&L(0,"p-chip",24),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&P(0,Qe,1,3,"p-chip",24,V),i&2){let e=l().$implicit;I(e.Channels)}}function et(i,m){i&1&&(o(0,"span"),g(1,"All Channels"),s())}function tt(i,m){if(i&1&&(o(0,"tr"),f(1,He,3,1,"ng-container",3),o(2,"td"),f(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),f(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),f(10,Xe,2,0)(11,et,2,0,"span"),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),v(r.hasUserEditRole()?3:4),a(3),v(r.hasUserEditRole()?6:7),a(4),v((e.Channels==null?null:e.Channels.length)>0?10:11)}}function it(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),C("next",function(){c(e);let t=l(),n=h(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=h(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=h(0),r=h(2);_("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)("alwaysShowNextButton",!0)}}var zt=(()=>{class i{constructor(){this.usersService=x(k),this.permissionService=x(_e),this.toastService=x(Z),this.dialog=x(ye),this.userInviteOptions=S([]),this.searchText=S(null),this.selectedGroup=S(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),E(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserAdd,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=S(!1),this.selectedUsers=S([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(ue.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),E(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ie,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([k])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(r,t){if(r&1){let n=y();O(0),A(1,"async"),O(2),A(3,"async"),o(4,"mainpanel",0),M("textChange",function(u){return c(n),w(t.searchText,u)||(t.searchText=u),p(u)}),C("onSubmit",function(){c(n);let u=h(0);return p(t.initUsers(u==null?null:u.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),f(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,ze,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),f(21,qe,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel"),s()()(),o(28,"tbody"),P(29,tt,12,4,"tr",null,V),s()(),f(31,it,1,5,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),C("onSuccessUpdateUser",function(){c(n);let u=h(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(F(1,11,t.userLoader$));a(2);let d=N(F(3,14,t.users$));a(2),U("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),U("ngModel",t.selectedGroup),a(2),_("ngxPermissionsOnly",t.userDeleteRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(8),_("ngxPermissionsOnly",t.userDeleteRole),a(8),I(d==null?null:d.Data),a(2),v(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[z,$,we,Ue,pe,ce,Ve,he,ge,fe,Ce,H,me,q,j,Ee,De,Te],encapsulation:2})}}return i})();export{zt as UsersComponent};
@@ -1 +1 @@
1
- var e=(()=>{class t{static{this.SubmitConfig="/api/Channel/SubmitConfig"}static{this.PosAccountTest="/api/POSAccount/Test"}static{this.PosAccountRemove="/api/POSAccount/Remove"}static{this.PosAccountGetConfig="/api/ChannelLoader/GetConfig"}static{this.ChannelGetLastSyncByID="/api/Channel/GetLastSyncByID"}static{this.GetChannel="/api/Channel/GetChannel"}static{this.GetChannelLoader="/api/ChannelLoader/GetChannelLoader"}static{this.TestShopID="/api/Channel/TestShopID"}static{this.UpdateChannelIndex="/api/Channel/UpdateChannelIndex"}static{this.DeleteChannel="/api/Channel/DeleteChannel"}static{this.GetRegisterByOutletName="/api/Channel/GetRegistersByOutletOrder"}static{this.GetChannelRowCount="/api/Channel/GetCountChannel"}static{this.GetChannelWarehouse="/api/Channel/GetChannelWarehouseLocation"}static{this.UnSynchronizedWarehouse="/api/Channel/UnSynchronizedWarehouse"}static{this.GetChannelDetail="/api/ChannelLoader/GetChannelView"}static{this.GetOrderPreview="/api/Orders/Preview"}static{this.GetOrderPreviewV2="/api/Orders/PreviewV2"}static{this.GetDownloadOrder="/api/Orders/Download"}static{this.GetDownloadOrderV2="/api/Orders/DownloadV2"}static{this.ShopeeV2_URL="/api/ChannelAuthorization/ShopeeV2_URL"}static{this.Tiktok_URL="/api/ChannelAuthorization/Tiktok_URL"}static{this.Lazada_URL="/api/ChannelAuthorization/Lazada_URL"}static{this.AddTokopedia="/api/ChannelAdd/Tokopedia"}static{this.AddShopify="/api/ChannelAdd/AddShopify"}static{this.AddWoocommerce="/api/ChannelAdd/AddWooCommerce"}static{this.AddPlugo="/api/ChannelAdd/Plugo"}static{this.UploadPlugoProduct="/api/product/plugo/AddProduct"}static{this.RefreshToken="/api/RefreshToken"}static{this.RefreshInventory="/api/Inventory/RefreshInventory"}static{this.GetToShip="/api/orders/toship"}static{this.GetShipped="/api/orders/shipped"}static{this.GetCompleted="/api/orders/completed"}static{this.GetAll="/api/orders/all"}static{this.GetCancelled="/api/orders/GetCancelled"}static{this.GetAwaitingCollection="/api/orders/AwaitingCollection"}static{this.GetShopeeShippingOptions="/api/v1/shipping/shopee/OptionShip"}static{this.ShopeeSelectShipping="/api/v1/shipping/shopee/SelectShip"}static{this.GetTiktokShippingOptions="/api/v1/shipping/tiktok/OptionShip"}static{this.TiktokSelectShipping="/api/v1/shipping/tiktok/SelectShip"}static{this.GetOrderApiLog="/api/Orders/GetOrderDetailByChannel"}static{this.GetUserLoader="/api/userloader/List"}static{this.GetUsers="/api/user/list"}static{this.GetLoaderForm="/api/userloader/Form"}static{this.UpdateUser="/api/user/Submit"}static{this.DeleteUsers="/api/user/Delete"}static{this.MyProfile="/api/user/myprofile"}static{this.MigrateUsers="/api/user/migrate"}static{this.MigrateLoader="/api/userloader/Migrate"}static{this.GetGroups="/api/UserGroup/list"}static{this.GetGroupsLoader="/api/UserGroupLoader/list"}static{this.GetGroupFormLoader="/api/UserGrouploader/Form"}static{this.SubmitGroup="/api/userGroup/AssignRole"}static{this.DeleteGroups="/api/userGroup/Delete"}static{this.GetEscrowDetail="/api/Orders/GetEscrowDetail"}static{this.DetachVariant="/api/product/DetachVariant"}static{this.GetProductApiLog="/api/Product/GetProductDetailBySKU"}}return t})();export{e as a};
1
+ var e=(()=>{class t{static{this.SubmitConfig="/api/Channel/SubmitConfig"}static{this.PosAccountTest="/api/POSAccount/Test"}static{this.PosAccountRemove="/api/POSAccount/Remove"}static{this.PosAccountGetConfig="/api/ChannelLoader/GetConfig"}static{this.ChannelGetLastSyncByID="/api/Channel/GetLastSyncByID"}static{this.GetChannel="/api/Channel/GetChannel"}static{this.GetChannelLoader="/api/ChannelLoader/GetChannelLoader"}static{this.TestShopID="/api/Channel/TestShopID"}static{this.UpdateChannelIndex="/api/Channel/UpdateChannelIndex"}static{this.DeleteChannel="/api/Channel/DeleteChannel"}static{this.GetRegisterByOutletName="/api/Channel/GetRegistersByOutletOrder"}static{this.GetChannelRowCount="/api/Channel/GetCountChannel"}static{this.GetChannelWarehouse="/api/Channel/GetChannelWarehouseLocation"}static{this.UnSynchronizedWarehouse="/api/Channel/UnSynchronizedWarehouse"}static{this.GetChannelDetail="/api/ChannelLoader/GetChannelView"}static{this.GetOrderPreview="/api/Orders/Preview"}static{this.GetOrderPreviewV2="/api/Orders/PreviewV2"}static{this.GetDownloadOrder="/api/Orders/Download"}static{this.GetDownloadOrderV2="/api/Orders/DownloadV2"}static{this.ShopeeV2_URL="/api/ChannelAuthorization/ShopeeV2_URL"}static{this.Tiktok_URL="/api/ChannelAuthorization/Tiktok_URL"}static{this.Lazada_URL="/api/ChannelAuthorization/Lazada_URL"}static{this.AddTokopedia="/api/ChannelAdd/Tokopedia"}static{this.AddShopify="/api/ChannelAdd/AddShopify"}static{this.AddWoocommerce="/api/ChannelAdd/AddWooCommerce"}static{this.AddPlugo="/api/ChannelAdd/Plugo"}static{this.UploadPlugoProduct="/api/product/plugo/AddProduct"}static{this.RefreshToken="/api/RefreshToken"}static{this.RefreshInventory="/api/Inventory/RefreshInventory"}static{this.GetToShip="/api/orders/toship"}static{this.GetShipped="/api/orders/shipped"}static{this.GetCompleted="/api/orders/completed"}static{this.GetAll="/api/orders/all"}static{this.GetCancelled="/api/orders/GetCancelled"}static{this.GetAwaitingCollection="/api/orders/AwaitingCollection"}static{this.GetShopeeShippingOptions="/api/v1/shipping/shopee/OptionShip"}static{this.ShopeeSelectShipping="/api/v1/shipping/shopee/SelectShip"}static{this.GetTiktokShippingOptions="/api/v1/shipping/tiktok/OptionShip"}static{this.TiktokSelectShipping="/api/v1/shipping/tiktok/SelectShip"}static{this.GetOrderApiLog="/api/Orders/GetOrderDetailByChannel"}static{this.GetUserLoader="/api/userloader/List"}static{this.GetUsers="/api/user/list"}static{this.GetLoaderForm="/api/userloader/Form"}static{this.UpdateUser="/api/user/Submit"}static{this.DeleteUsers="/api/user/Delete"}static{this.MyProfile="/api/user/myprofile"}static{this.MigrateUsers="/api/user/migrate"}static{this.MigrateLoader="/api/userloader/Migrate"}static{this.GetGroups="/api/UserGroup/list"}static{this.GetGroupsLoader="/api/UserGroupLoader/list"}static{this.GetGroupFormLoader="/api/UserGrouploader/Form"}static{this.SubmitGroup="/api/userGroup/AssignRole"}static{this.DeleteGroups="/api/userGroup/Delete"}static{this.GetEscrowDetail="/api/Orders/GetEscrowDetail"}static{this.DetachVariant="/api/product/DetachVariant"}static{this.GetProductApiLog="/api/Product/GetProductDetailBySKU"}static{this.ScanSyncProductV2="/api/v2/ProductScan/SyncProduct"}static{this.ScanAsyncProductV2="/api/v2/ProductScan/AsyncProduct"}static{this.GetProductScanStatusV2="/api/Inventory/GetOrderDownloadLatestOn"}}return t})();export{e as a};
@@ -1,4 +1,4 @@
1
- import{a as g}from"./chunk-V3NCYRCF.js";import{b as l,e as h}from"./chunk-JXSBFTQM.js";import{ja as c,oa as o}from"./chunk-B7KTCPKC.js";var S=(()=>{class n{constructor(r,t){this.toastrService=r,this.http=t}refreshInventory(r){let t=r.map(e=>e.Channel.map(a=>(a.VariantID=e.ID,a))).reduce((e,s)=>(e=e.concat(s),e),[]).map(e=>({ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID,VariantID:e.VariantID,ChannelVariationID:e.ChannelVariationID}));return this.http.post(g.RefreshInventory,t)}showToastrUpdateInventory(r,t,e){let s=t.length>0,a=e.length>0;if(!a&&s&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),a&&s){let i=`<li>${this.generateSuccessMessage(t.length)}</li>`,u=this.generateErrorMessage(r,e),m=`<ol>${i} ${u}</ol>`;this.toastrService.warning(m,"Warning",{enableHtml:!0})}if(a&&!s){let i=`<ol>${this.generateErrorMessage(r,e)}</ol>`;this.toastrService.error(i,"Error",{enableHtml:!0})}}generateSuccessMessage(r){return`
1
+ import{a as g}from"./chunk-5HO2IJ47.js";import{b as l,e as h}from"./chunk-JXSBFTQM.js";import{ja as c,oa as o}from"./chunk-B7KTCPKC.js";var S=(()=>{class n{constructor(r,t){this.toastrService=r,this.http=t}refreshInventory(r){let t=r.map(e=>e.Channel.map(a=>(a.VariantID=e.ID,a))).reduce((e,s)=>(e=e.concat(s),e),[]).map(e=>({ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID,VariantID:e.VariantID,ChannelVariationID:e.ChannelVariationID}));return this.http.post(g.RefreshInventory,t)}showToastrUpdateInventory(r,t,e){let s=t.length>0,a=e.length>0;if(!a&&s&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),a&&s){let i=`<li>${this.generateSuccessMessage(t.length)}</li>`,u=this.generateErrorMessage(r,e),m=`<ol>${i} ${u}</ol>`;this.toastrService.warning(m,"Warning",{enableHtml:!0})}if(a&&!s){let i=`<ol>${this.generateErrorMessage(r,e)}</ol>`;this.toastrService.error(i,"Error",{enableHtml:!0})}}generateSuccessMessage(r){return`
2
2
  <div>
3
3
  <span class="fw-bold">Successfully</span> updated ${r} variants in 1 channels
4
4
  </div>