marketplacepos 5.46.1 → 5.46.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/Marketplace/{chunk-ZVKOEYH7.js → chunk-25N6ECN7.js} +1 -1
  2. package/Marketplace/chunk-2REDCSBO.js +1 -0
  3. package/Marketplace/{chunk-BAXQ2L7B.js → chunk-2WHJU6CS.js} +1 -1
  4. package/Marketplace/chunk-3NCIMELL.js +5 -0
  5. package/Marketplace/{chunk-FB2AEPXA.js → chunk-4PL4XC3C.js} +1 -1
  6. package/Marketplace/{chunk-L7TKCTLD.js → chunk-53AH4SKO.js} +1 -1
  7. package/Marketplace/{chunk-FGFIV3VO.js → chunk-57MSCWQ4.js} +1 -1
  8. package/Marketplace/chunk-6EMUVAZD.js +1 -0
  9. package/Marketplace/{chunk-CRKCNTXF.js → chunk-6GQN3CZ7.js} +1 -1
  10. package/Marketplace/{chunk-LOU3DIPY.js → chunk-6L24E3SM.js} +1 -1
  11. package/Marketplace/{chunk-2SGPD432.js → chunk-764WEWDX.js} +1 -1
  12. package/Marketplace/{chunk-T43QRQH5.js → chunk-7NGIEICQ.js} +1 -1
  13. package/Marketplace/{chunk-GPGD3XQH.js → chunk-ACNBNSCK.js} +1 -1
  14. package/Marketplace/{chunk-3BALA33G.js → chunk-B3HL4DNT.js} +1 -1
  15. package/Marketplace/chunk-B3RO2S3D.js +1 -0
  16. package/Marketplace/{chunk-CGEIIRYF.js → chunk-BPAZ4TES.js} +1 -1
  17. package/Marketplace/{chunk-GKRWJPI3.js → chunk-BXXJEM76.js} +1 -1
  18. package/Marketplace/{chunk-3YP6ORBR.js → chunk-C7YK5TDP.js} +1 -1
  19. package/Marketplace/{chunk-ZUYGRGXM.js → chunk-CTDSVBZQ.js} +1 -1
  20. package/Marketplace/{chunk-WAZXTB4X.js → chunk-DGIH7HSJ.js} +1 -1
  21. package/Marketplace/{chunk-V6UNCLNJ.js → chunk-DSAVJZIH.js} +2 -2
  22. package/Marketplace/{chunk-YB4KXB2C.js → chunk-E42O4ZCH.js} +1 -1
  23. package/Marketplace/chunk-EOYO5KJW.js +1 -0
  24. package/Marketplace/{chunk-NLPXBGIX.js → chunk-EPCXMVX3.js} +1 -1
  25. package/Marketplace/chunk-ER3SGZ7B.js +1 -0
  26. package/Marketplace/{chunk-6CIQBRO4.js → chunk-ESDWGP24.js} +1 -1
  27. package/Marketplace/chunk-GHFADTRR.js +1 -0
  28. package/Marketplace/{chunk-6VYFG4AQ.js → chunk-HAJDTNAW.js} +1 -1
  29. package/Marketplace/chunk-IJVKHW3C.js +1 -0
  30. package/Marketplace/chunk-JGKNYWZY.js +1 -0
  31. package/Marketplace/chunk-JOZJZEGN.js +1 -0
  32. package/Marketplace/chunk-JUHGMPX2.js +1 -0
  33. package/Marketplace/{chunk-6U4YIJLC.js → chunk-K5YVT6CU.js} +2 -2
  34. package/Marketplace/{chunk-ORLTYLPA.js → chunk-LSSYGFVV.js} +1 -1
  35. package/Marketplace/{chunk-KRQHTRFM.js → chunk-M7DDFDPD.js} +1 -1
  36. package/Marketplace/chunk-MP3G42LL.js +1 -0
  37. package/Marketplace/chunk-O73TXSTZ.js +1 -0
  38. package/Marketplace/{chunk-DB7C3AL2.js → chunk-OCJXLFB4.js} +2 -2
  39. package/Marketplace/chunk-PBHJGJHF.js +1 -0
  40. package/Marketplace/{chunk-HITTNWB6.js → chunk-PHLSX23M.js} +1 -1
  41. package/Marketplace/chunk-QOG52KD3.js +1 -0
  42. package/Marketplace/chunk-QPC5ZTYC.js +1 -0
  43. package/Marketplace/chunk-QSERFP5U.js +1 -0
  44. package/Marketplace/chunk-QTTNQJAK.js +1 -0
  45. package/Marketplace/chunk-RTF4FRXW.js +3 -0
  46. package/Marketplace/{chunk-UHJEXTOG.js → chunk-RU43F4UK.js} +1 -1
  47. package/Marketplace/chunk-RXQX7567.js +1 -0
  48. package/Marketplace/{chunk-LFGPYQCI.js → chunk-SBLG2UP7.js} +1 -1
  49. package/Marketplace/{chunk-DSYYZDXI.js → chunk-TG5SFCNG.js} +1 -1
  50. package/Marketplace/{chunk-HHO2NGCF.js → chunk-THMNZQLX.js} +1 -1
  51. package/Marketplace/{chunk-NWWYOZ4V.js → chunk-TKV7XWBT.js} +1 -1
  52. package/Marketplace/{chunk-SZGOLKC6.js → chunk-TYSVSEYQ.js} +1 -1
  53. package/Marketplace/{chunk-TGQ5CJ3A.js → chunk-UDXV6RW2.js} +1 -1
  54. package/Marketplace/{chunk-IWKRZSYG.js → chunk-V33UHV5X.js} +1 -1
  55. package/Marketplace/{chunk-TE5EYKIN.js → chunk-V54LZUEC.js} +1 -1
  56. package/Marketplace/chunk-VHOREEP5.js +1 -0
  57. package/Marketplace/chunk-VODHIYRA.js +1 -0
  58. package/Marketplace/{chunk-OE7TF7SI.js → chunk-W4MTON2T.js} +1 -1
  59. package/Marketplace/{chunk-DZEO4HK4.js → chunk-WBKGEDL6.js} +1 -1
  60. package/Marketplace/{chunk-2XWZQCUR.js → chunk-WHBI5II7.js} +1 -1
  61. package/Marketplace/{chunk-OVPVQS4J.js → chunk-WIMLQM6B.js} +1 -1
  62. package/Marketplace/{chunk-RJ5D24ZW.js → chunk-WY37QAZ4.js} +1 -1
  63. package/Marketplace/{chunk-4TDVVQ64.js → chunk-XMZNTZ72.js} +1 -1
  64. package/Marketplace/{chunk-4LZODV4E.js → chunk-XSCE2K6J.js} +1 -1
  65. package/Marketplace/{chunk-77MWKV5I.js → chunk-XSJBP4EN.js} +2 -2
  66. package/Marketplace/chunk-YIKOIRZU.js +1 -0
  67. package/Marketplace/{chunk-UGG2CIUU.js → chunk-ZC7VX6UG.js} +1 -1
  68. package/Marketplace/index.html +2 -2
  69. package/Marketplace/main-CVD4P432.js +1 -0
  70. package/package.json +1 -1
  71. package/Marketplace/chunk-26ZM2UD3.js +0 -1
  72. package/Marketplace/chunk-2Z7CPNRS.js +0 -1
  73. package/Marketplace/chunk-3VUO4APC.js +0 -1
  74. package/Marketplace/chunk-7DJXZQ7M.js +0 -1
  75. package/Marketplace/chunk-EFI2CLNP.js +0 -1
  76. package/Marketplace/chunk-EI65NYTN.js +0 -1
  77. package/Marketplace/chunk-F2533PAC.js +0 -1
  78. package/Marketplace/chunk-FHWKSD5A.js +0 -3
  79. package/Marketplace/chunk-FIAI5SPR.js +0 -1
  80. package/Marketplace/chunk-FTWATKXK.js +0 -1
  81. package/Marketplace/chunk-ISUN5G42.js +0 -5
  82. package/Marketplace/chunk-JYCBJ7CC.js +0 -1
  83. package/Marketplace/chunk-KCFCXS2F.js +0 -1
  84. package/Marketplace/chunk-KFOHH7PE.js +0 -1
  85. package/Marketplace/chunk-M7LXGXUM.js +0 -1
  86. package/Marketplace/chunk-MJNFY4NT.js +0 -1
  87. package/Marketplace/chunk-OAG6OVUY.js +0 -1
  88. package/Marketplace/chunk-OHVOVAKD.js +0 -1
  89. package/Marketplace/chunk-OJZ7NGRW.js +0 -1
  90. package/Marketplace/chunk-PW42BQIY.js +0 -1
  91. package/Marketplace/chunk-RM2OSYMV.js +0 -1
  92. package/Marketplace/chunk-VIDSOLHF.js +0 -1
  93. package/Marketplace/chunk-ZXTHWBJ4.js +0 -1
  94. package/Marketplace/main-RRL4BIVO.js +0 -1
@@ -1 +1 @@
1
- import{a as me,b as de,c as pe}from"./chunk-UHJEXTOG.js";import{a as ce}from"./chunk-ZVKOEYH7.js";import{a as T}from"./chunk-GKRWJPI3.js";import{a as se}from"./chunk-67HPC5Y3.js";import{a as le}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as ae}from"./chunk-HHO2NGCF.js";import"./chunk-3YP6ORBR.js";import{a as oe}from"./chunk-LDL3A7NM.js";import"./chunk-FHWKSD5A.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as ne,n as re}from"./chunk-HJXYT6MI.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as te,s as ie}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as G,k as J,m as K,n as Q}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as I,Gc as a,Hc as v,Ic as b,Kc as _,Lc as f,Mb as x,Mc as g,Nc as A,Oc as R,Pc as H,Qc as j,Ra as F,Sc as U,Yb as c,Z as O,ac as D,ad as E,bd as q,dc as y,ec as B,gc as k,hc as z,ic as t,jc as i,kc as u,oc as V,pa as N,pb as W,rb as l,tc as M,uc as C,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ue=r=>({"td-cell-hover":r});function Ce(r,h){if(r&1&&u(0,"variants-dropdown",31),r&2){let e=C().$implicit;c("variants",e==null?null:e.Variants)}}function _e(r,h){if(r&1&&u(0,"variant-with-image",32),r&2){let e=C().$implicit;c("variant",e==null?null:e.Variants[0])}}function fe(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),u(3,"img",25),w(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),u(15,"order-link",30),i()(),t(16,"small"),a(17),w(18,"date"),i()()(),t(19,"td"),a(20),i(),t(21,"td"),x(22,Ce,1,1,"variants-dropdown",31)(23,_e,1,1,"variant-with-image",32),i(),t(24,"td",33),a(25),w(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),a(31),i(),x(32,fe,2,1,"span"),i(),t(33,"small"),a(34),i()()()()),r&2){let e=h.$implicit;l(3),c("src",E(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),v(e.Outlet),l(3),v(e.ChannelName),l(5),c("order",e),l(2),b(" ",q(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),v(e.Customer),l(),D(U(21,ue,(e.Variants==null?null:e.Variants.length)>1)),l(),y((e.Variants==null?null:e.Variants.length)>1?22:23),l(3),v(E(26,19,e.Amount)),l(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),l(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function he(r,h){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th",20),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",21),a(13,"Amount"),i(),t(14,"th",22),a(15,"Shipping"),i()()(),t(16,"tbody"),k(17,ge,35,23,"tr",null,B),i()(),t(19,"app-custom-paginator",23),M("next",function(){p(e);let n=C();return s(n.initCompletedOrders())})("previous",function(){p(e);let n=C();return s(n.initCompletedOrders())}),i()()}if(r&2){let e=C(),m=H(0);l(17),z(m),l(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function Se(r,h){r&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=N(T),this.filter=F({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>L(P({},m),{From:e})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=I({type:r,selectors:[["app-completed"]],features:[j([T])],decls:34,vars:11,consts:[["headerTitle","Completed","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","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,n){if(m&1){let d=V();A(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),g("textChange",function(o){return p(d),f(n.filter().Number,o)||(n.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"channel-select-options",4),g("ngModelChange",function(o){return p(d),f(n.filter().ListChannelID,o)||(n.filter().ListChannelID=o),s(o)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),g("dateChange",function(o){return p(d),f(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return p(d),f(n.filter().To,o)||(n.filter().To=o),s(o)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),g("ngModelChange",function(o){return p(d),f(n.filter().PageNumber,o)||(n.filter().PageNumber=o),s(o)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),g("ngModelChange",function(o){return p(d),f(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,he,20,2,"div",15)(33,Se,2,0,"div",16),i()()()()()}if(m&2){let d=R(E(1,8,n.completedOrders$));l(2),_("text",n.filter().Number),l(10),c("multiple",!0),_("ngModel",n.filter().ListChannelID),l(5),_("date",n.filter().From),l(2),_("date",n.filter().To),l(4),_("ngModel",n.filter().PageNumber),l(4),_("ngModel",n.filter().PageSize),l(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[Q,G,K,J,re,ne,le,oe,ee,X,$,Y,Z,me,de,pe,se,ae,ie,te,ce],encapsulation:2})}}return r})();export{He as CompletedComponent};
1
+ import{a as me,b as de,c as pe}from"./chunk-RU43F4UK.js";import{a as ce}from"./chunk-25N6ECN7.js";import{a as T}from"./chunk-BXXJEM76.js";import{a as se}from"./chunk-67HPC5Y3.js";import{a as le}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as ae}from"./chunk-THMNZQLX.js";import"./chunk-C7YK5TDP.js";import"./chunk-ACIMXBIC.js";import{a as oe}from"./chunk-LDL3A7NM.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as ne,n as re}from"./chunk-HJXYT6MI.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as te,s as ie}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as G,k as J,m as K,n as Q}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as I,Gc as a,Hc as v,Ic as b,Kc as _,Lc as f,Mb as x,Mc as g,Nc as A,Oc as R,Pc as H,Qc as j,Ra as F,Sc as U,Yb as c,Z as O,ac as D,ad as E,bd as q,dc as y,ec as B,gc as k,hc as z,ic as t,jc as i,kc as u,oc as V,pa as N,pb as W,rb as l,tc as M,uc as C,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ue=r=>({"td-cell-hover":r});function Ce(r,h){if(r&1&&u(0,"variants-dropdown",31),r&2){let e=C().$implicit;c("variants",e==null?null:e.Variants)}}function _e(r,h){if(r&1&&u(0,"variant-with-image",32),r&2){let e=C().$implicit;c("variant",e==null?null:e.Variants[0])}}function fe(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),u(3,"img",25),w(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),u(15,"order-link",30),i()(),t(16,"small"),a(17),w(18,"date"),i()()(),t(19,"td"),a(20),i(),t(21,"td"),x(22,Ce,1,1,"variants-dropdown",31)(23,_e,1,1,"variant-with-image",32),i(),t(24,"td",33),a(25),w(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),a(31),i(),x(32,fe,2,1,"span"),i(),t(33,"small"),a(34),i()()()()),r&2){let e=h.$implicit;l(3),c("src",E(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),v(e.Outlet),l(3),v(e.ChannelName),l(5),c("order",e),l(2),b(" ",q(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),v(e.Customer),l(),D(U(21,ue,(e.Variants==null?null:e.Variants.length)>1)),l(),y((e.Variants==null?null:e.Variants.length)>1?22:23),l(3),v(E(26,19,e.Amount)),l(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),l(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function he(r,h){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th",20),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",21),a(13,"Amount"),i(),t(14,"th",22),a(15,"Shipping"),i()()(),t(16,"tbody"),k(17,ge,35,23,"tr",null,B),i()(),t(19,"app-custom-paginator",23),M("next",function(){p(e);let n=C();return s(n.initCompletedOrders())})("previous",function(){p(e);let n=C();return s(n.initCompletedOrders())}),i()()}if(r&2){let e=C(),m=H(0);l(17),z(m),l(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function Se(r,h){r&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=N(T),this.filter=F({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>L(P({},m),{From:e})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=I({type:r,selectors:[["app-completed"]],features:[j([T])],decls:34,vars:11,consts:[["headerTitle","Completed","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","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,n){if(m&1){let d=V();A(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),g("textChange",function(o){return p(d),f(n.filter().Number,o)||(n.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"channel-select-options",4),g("ngModelChange",function(o){return p(d),f(n.filter().ListChannelID,o)||(n.filter().ListChannelID=o),s(o)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),g("dateChange",function(o){return p(d),f(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return p(d),f(n.filter().To,o)||(n.filter().To=o),s(o)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),g("ngModelChange",function(o){return p(d),f(n.filter().PageNumber,o)||(n.filter().PageNumber=o),s(o)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),g("ngModelChange",function(o){return p(d),f(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,he,20,2,"div",15)(33,Se,2,0,"div",16),i()()()()()}if(m&2){let d=R(E(1,8,n.completedOrders$));l(2),_("text",n.filter().Number),l(10),c("multiple",!0),_("ngModel",n.filter().ListChannelID),l(5),_("date",n.filter().From),l(2),_("date",n.filter().To),l(4),_("ngModel",n.filter().PageNumber),l(4),_("ngModel",n.filter().PageSize),l(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[Q,G,K,J,re,ne,le,oe,ee,X,$,Y,Z,me,de,pe,se,ae,ie,te,ce],encapsulation:2})}}return r})();export{He as CompletedComponent};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-67HPC5Y3.js";import{a as ie}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as oe,b as re}from"./chunk-ABYG6YZT.js";import"./chunk-RAQRGWCZ.js";import"./chunk-HVCIQI7B.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{i as Q}from"./chunk-FHWKSD5A.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as K}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{a as X,b as Z,d as $,e as ee}from"./chunk-PYXL7UF7.js";import{c as J}from"./chunk-PW42BQIY.js";import{m as te,n as ne}from"./chunk-HJXYT6MI.js";import{A as Y,c as U,h as j,m as q,o as G}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as A,J as H,f as W,g as F,k as B,m as k,n as z}from"./chunk-FXQKRJWU.js";import{$c as L,Fc as P,Gb as T,Gc as l,Hc as S,Ic as y,Kc as c,Lc as u,Mb as w,Mc as h,Sc as I,Yb as m,ad as N,bd as V,cd as R,ic as t,jc as n,kc as C,lc as M,mc as x,oc as O,pb as b,rb as r,tc as E,uc as v,xb as D,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var le=a=>({ID:a});function de(a,f){if(a&1&&(t(0,"span",17),C(1,"img",18),n(),l(2)),a&2){let e=f.item;r(),m("src",e.Img,b)("alt",e.Name),r(),y(" ",e.Name," ")}}function me(a,f){if(a&1&&(t(0,"tr")(1,"td"),l(2),n(),t(3,"td"),C(4,"img",28),n(),t(5,"td"),l(6),n(),t(7,"td",29)(8,"a",30),l(9),L(10,"number"),n()(),t(11,"td"),l(12),n(),t(13,"td"),l(14),L(15,"date"),n()()),a&2){let e=f.$implicit;r(2),S(e._source.ChannelName),r(2),m("src",e.logo,b),r(2),S(e._source.DateRange),r(2),m("queryParams",I(12,le,e._source.ID)),r(),y(" ",N(10,7,e._source.CountOrder)," "),r(3),S(e._source.UserLogin),r(2),y(" ",V(15,9,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function pe(a,f){if(a&1){let e=O();M(0),t(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),l(6,"Channel"),n(),t(7,"th",23),l(8,"Type"),n(),t(9,"th",24),l(10,"Download Date Range"),n(),t(11,"th",25),l(12,"Count"),n(),t(13,"th"),l(14,"User Login"),n(),t(15,"th"),l(16,"Created"),n()()(),t(17,"tbody"),w(18,me,16,14,"tr",26),n()(),t(19,"mat-paginator",27),E("page",function(i){p(e);let d=v();return s(d.onPaginationChange(i))}),n()(),x()}if(a&2){let e=v();r(18),m("ngForOf",e.downloadOrders),r(),m("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function se(a,f){a&1&&(t(0,"div",31),C(1,"app-empty-state"),n())}var xe=(()=>{class a{constructor(e,g){this.http=e,this.authService=g,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(e=>{this.filter=e.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(e=>{this.downloadOrders=e.hits,this.setChannelLogo(),this.paginationTotal=e.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(e=>(e.logo=J.getChannelLogoByTypeId(e._source.TypeID),e))}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getDownloadOrders()}static{this.\u0275fac=function(g){return new(g||a)(D(K),D(Q))}}static{this.\u0275cmp=T({type:a,selectors:[["app-download-order-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",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","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(g,i){if(g&1){let d=O();t(0,"mainpanel",1),E("onSubmit",function(){return p(d),s(i.getDownloadOrders())}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),n(),t(5,"ng-select",3),h("ngModelChange",function(o){return p(d),u(i.filter.ChannelID,o)||(i.filter.ChannelID=o),s(o)}),w(6,de,3,3,"ng-template",4),n()(),t(7,"div",5)(8,"label",6),l(9,"From/To"),n(),t(10,"div",7)(11,"datepicker",8),h("dateChange",function(o){return p(d),u(i.filter.From,o)||(i.filter.From=o),s(o)}),n()(),t(12,"div")(13,"datepicker",9),h("dateChange",function(o){return p(d),u(i.filter.To,o)||(i.filter.To=o),s(o)}),n()()(),t(14,"div",5)(15,"label",10),l(16,"Page Number"),n(),t(17,"input",11),h("ngModelChange",function(o){return p(d),u(i.filter.PageNumber,o)||(i.filter.PageNumber=o),s(o)}),n()(),t(18,"div",5)(19,"label",10),l(20,"Page Size"),n(),t(21,"input",12),h("ngModelChange",function(o){return p(d),u(i.filter.RowCount,o)||(i.filter.RowCount=o),s(o)}),n()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),w(26,pe,20,4,"ng-container",16)(27,se,2,0,"ng-template",null,0,R),n()()()()()}if(g&2){let d=P(28);m("hideSearchBox",!0),r(5),m("clearable",!0)("items",i.channelOptions),c("ngModel",i.filter.ChannelID),r(6),c("date",i.filter.From),r(2),c("date",i.filter.To),r(4),c("ngModel",i.filter.PageNumber),r(4),c("ngModel",i.filter.RowCount),r(5),m("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",d)}},dependencies:[z,W,F,k,B,re,oe,ne,te,ee,$,X,Z,Y,U,G,j,q,ae,H,A,ie],encapsulation:2})}}return a})();export{xe as DownloadOrderLogComponent};
1
+ import{a as ae}from"./chunk-67HPC5Y3.js";import{a as ie}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as oe,b as re}from"./chunk-ABYG6YZT.js";import"./chunk-RAQRGWCZ.js";import"./chunk-HVCIQI7B.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import"./chunk-ACIMXBIC.js";import{i as Q}from"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as K}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{a as X,b as Z,d as $,e as ee}from"./chunk-PYXL7UF7.js";import{c as J}from"./chunk-RXQX7567.js";import{m as te,n as ne}from"./chunk-HJXYT6MI.js";import{A as Y,c as U,h as j,m as q,o as G}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as A,J as H,f as W,g as F,k as B,m as k,n as z}from"./chunk-FXQKRJWU.js";import{$c as L,Fc as P,Gb as T,Gc as l,Hc as S,Ic as y,Kc as c,Lc as u,Mb as w,Mc as h,Sc as I,Yb as m,ad as N,bd as V,cd as R,ic as t,jc as n,kc as C,lc as M,mc as x,oc as O,pb as b,rb as r,tc as E,uc as v,xb as D,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var le=a=>({ID:a});function de(a,f){if(a&1&&(t(0,"span",17),C(1,"img",18),n(),l(2)),a&2){let e=f.item;r(),m("src",e.Img,b)("alt",e.Name),r(),y(" ",e.Name," ")}}function me(a,f){if(a&1&&(t(0,"tr")(1,"td"),l(2),n(),t(3,"td"),C(4,"img",28),n(),t(5,"td"),l(6),n(),t(7,"td",29)(8,"a",30),l(9),L(10,"number"),n()(),t(11,"td"),l(12),n(),t(13,"td"),l(14),L(15,"date"),n()()),a&2){let e=f.$implicit;r(2),S(e._source.ChannelName),r(2),m("src",e.logo,b),r(2),S(e._source.DateRange),r(2),m("queryParams",I(12,le,e._source.ID)),r(),y(" ",N(10,7,e._source.CountOrder)," "),r(3),S(e._source.UserLogin),r(2),y(" ",V(15,9,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function pe(a,f){if(a&1){let e=O();M(0),t(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),l(6,"Channel"),n(),t(7,"th",23),l(8,"Type"),n(),t(9,"th",24),l(10,"Download Date Range"),n(),t(11,"th",25),l(12,"Count"),n(),t(13,"th"),l(14,"User Login"),n(),t(15,"th"),l(16,"Created"),n()()(),t(17,"tbody"),w(18,me,16,14,"tr",26),n()(),t(19,"mat-paginator",27),E("page",function(i){p(e);let d=v();return s(d.onPaginationChange(i))}),n()(),x()}if(a&2){let e=v();r(18),m("ngForOf",e.downloadOrders),r(),m("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function se(a,f){a&1&&(t(0,"div",31),C(1,"app-empty-state"),n())}var xe=(()=>{class a{constructor(e,g){this.http=e,this.authService=g,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(e=>{this.filter=e.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(e=>{this.downloadOrders=e.hits,this.setChannelLogo(),this.paginationTotal=e.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(e=>(e.logo=J.getChannelLogoByTypeId(e._source.TypeID),e))}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getDownloadOrders()}static{this.\u0275fac=function(g){return new(g||a)(D(K),D(Q))}}static{this.\u0275cmp=T({type:a,selectors:[["app-download-order-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",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","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(g,i){if(g&1){let d=O();t(0,"mainpanel",1),E("onSubmit",function(){return p(d),s(i.getDownloadOrders())}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),n(),t(5,"ng-select",3),h("ngModelChange",function(o){return p(d),u(i.filter.ChannelID,o)||(i.filter.ChannelID=o),s(o)}),w(6,de,3,3,"ng-template",4),n()(),t(7,"div",5)(8,"label",6),l(9,"From/To"),n(),t(10,"div",7)(11,"datepicker",8),h("dateChange",function(o){return p(d),u(i.filter.From,o)||(i.filter.From=o),s(o)}),n()(),t(12,"div")(13,"datepicker",9),h("dateChange",function(o){return p(d),u(i.filter.To,o)||(i.filter.To=o),s(o)}),n()()(),t(14,"div",5)(15,"label",10),l(16,"Page Number"),n(),t(17,"input",11),h("ngModelChange",function(o){return p(d),u(i.filter.PageNumber,o)||(i.filter.PageNumber=o),s(o)}),n()(),t(18,"div",5)(19,"label",10),l(20,"Page Size"),n(),t(21,"input",12),h("ngModelChange",function(o){return p(d),u(i.filter.RowCount,o)||(i.filter.RowCount=o),s(o)}),n()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),w(26,pe,20,4,"ng-container",16)(27,se,2,0,"ng-template",null,0,R),n()()()()()}if(g&2){let d=P(28);m("hideSearchBox",!0),r(5),m("clearable",!0)("items",i.channelOptions),c("ngModel",i.filter.ChannelID),r(6),c("date",i.filter.From),r(2),c("date",i.filter.To),r(4),c("ngModel",i.filter.PageNumber),r(4),c("ngModel",i.filter.RowCount),r(5),m("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",d)}},dependencies:[z,W,F,k,B,re,oe,ne,te,ee,$,X,Z,Y,U,G,j,q,ae,H,A,ie],encapsulation:2})}}return a})();export{xe as DownloadOrderLogComponent};
@@ -1 +1 @@
1
- import{a as de,b as pe,c as se}from"./chunk-UHJEXTOG.js";import{a as ce}from"./chunk-ZVKOEYH7.js";import{a as A}from"./chunk-GKRWJPI3.js";import{a as ue}from"./chunk-67HPC5Y3.js";import{a as ae}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as me}from"./chunk-HHO2NGCF.js";import"./chunk-3YP6ORBR.js";import{a as oe}from"./chunk-LDL3A7NM.js";import"./chunk-FHWKSD5A.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as re,n as le}from"./chunk-HJXYT6MI.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as ie,s as ne}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as J,k as K,m as Q,n as X}from"./chunk-FXQKRJWU.js";import{$c as v,Gb as W,Gc as a,Hc as x,Ic as b,Kc as f,Lc as g,Mb as w,Mc as C,Nc as z,Oc as R,Pc as H,Qc as j,Ra as N,Rc as U,Sc as q,Yb as u,Z as L,ac as D,ad as V,bd as G,dc as y,ec as I,gc as B,hc as k,ic as t,jc as i,kc as c,oc as E,pa as F,pb as O,rb as o,tc as M,uc as _,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as T,b as P}from"./chunk-66YHNWRR.js";var _e=()=>[],fe=r=>({"td-cell-hover":r});function ge(r,h){if(r&1&&c(0,"variants-dropdown",27),r&2){let e=_().$implicit;u("variants",e==null?null:e.Variants)}}function Ce(r,h){if(r&1&&c(0,"variant-with-image",28),r&2){let e=_().$implicit;u("variant",e==null?null:e.Variants[0])}}function he(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=_().$implicit;o(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div",24)(4,"div"),c(5,"img",25),v(6,"channelImage"),i(),t(7,"div"),c(8,"order-link",26),i()(),t(9,"small"),a(10),v(11,"date"),i()()(),t(12,"td"),a(13),i(),t(14,"td"),w(15,ge,1,1,"variants-dropdown",27)(16,Ce,1,1,"variant-with-image",28),i(),t(17,"td"),a(18),v(19,"number"),i(),t(20,"td")(21,"div",23)(22,"div",24)(23,"span"),a(24),i(),w(25,he,2,1,"span"),i(),t(26,"small"),a(27),i()()()()),r&2){let e=h.$implicit;o(5),u("src",V(6,12,e==null?null:e.MarketType),O)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(3),u("order",e),o(2),b(" ",G(11,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),x(e.Customer),o(),D(q(19,fe,(e.Variants==null?null:e.Variants.length)>1)),o(),y((e.Variants==null?null:e.Variants.length)>1?15:16),o(3),x(V(19,17,e.Amount)),o(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1),o(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function ve(r,h){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th",20),a(7,"Customer"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",21),a(13,"Shipping"),i()()(),t(14,"tbody"),B(15,Se,28,21,"tr",null,I),i()(),t(17,"app-custom-paginator",22),M("next",function(){p(e);let n=_();return s(n.initAllOrders())})("previous",function(){p(e);let n=_();return s(n.initAllOrders())}),i()()}if(r&2){let e=_(),m=H(0);o(15),k(m),o(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function we(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var Ue=(()=>{class r{constructor(){this.orderService=F(A),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>P(T({},m),{From:e})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(L(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-all"]],features:[j([A])],decls:34,vars:12,consts:[["headerTitle","Completed","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-solid","fa-clipboard-list","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","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",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"],[3,"order"],[3,"variants"],[3,"variant"]],template:function(m,n){if(m&1){let d=E();z(0),v(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initAllOrders())}),C("textChange",function(l){return p(d),g(n.filter().Number,l)||(n.filter().Number=l),s(l)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"channel-select-options",4),C("ngModelChange",function(l){return p(d),g(n.filter().ListChannelID,l)||(n.filter().ListChannelID=l),s(l)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(l){return p(d),g(n.filter().From,l)||(n.filter().From=l),s(l)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(l){return p(d),g(n.filter().To,l)||(n.filter().To=l),s(l)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(l){return p(d),g(n.filter().PageNumber,l)||(n.filter().PageNumber=l),s(l)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(l){return p(d),g(n.filter().PageSize,l)||(n.filter().PageSize=l),s(l)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),w(32,ve,18,2,"div",15)(33,we,2,0,"div",16),i()()()()()}if(m&2){let d=R(V(1,8,n.allOrders$)||U(11,_e));o(2),f("text",n.filter().Number),o(10),u("multiple",!0),f("ngModel",n.filter().ListChannelID),o(5),f("date",n.filter().From),o(2),f("date",n.filter().To),o(4),f("ngModel",n.filter().PageNumber),o(4),f("ngModel",n.filter().PageSize),o(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[X,J,Q,K,le,re,ae,oe,te,Y,ee,Z,$,de,pe,se,ue,me,ne,ie,ce],encapsulation:2})}}return r})();export{Ue as AllComponent};
1
+ import{a as de,b as pe,c as se}from"./chunk-RU43F4UK.js";import{a as ce}from"./chunk-25N6ECN7.js";import{a as A}from"./chunk-BXXJEM76.js";import{a as ue}from"./chunk-67HPC5Y3.js";import{a as ae}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as me}from"./chunk-THMNZQLX.js";import"./chunk-C7YK5TDP.js";import"./chunk-ACIMXBIC.js";import{a as oe}from"./chunk-LDL3A7NM.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as re,n as le}from"./chunk-HJXYT6MI.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as ie,s as ne}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as J,k as K,m as Q,n as X}from"./chunk-FXQKRJWU.js";import{$c as v,Gb as W,Gc as a,Hc as x,Ic as b,Kc as f,Lc as g,Mb as w,Mc as C,Nc as z,Oc as R,Pc as H,Qc as j,Ra as N,Rc as U,Sc as q,Yb as u,Z as L,ac as D,ad as V,bd as G,dc as y,ec as I,gc as B,hc as k,ic as t,jc as i,kc as c,oc as E,pa as F,pb as O,rb as o,tc as M,uc as _,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as T,b as P}from"./chunk-66YHNWRR.js";var _e=()=>[],fe=r=>({"td-cell-hover":r});function ge(r,h){if(r&1&&c(0,"variants-dropdown",27),r&2){let e=_().$implicit;u("variants",e==null?null:e.Variants)}}function Ce(r,h){if(r&1&&c(0,"variant-with-image",28),r&2){let e=_().$implicit;u("variant",e==null?null:e.Variants[0])}}function he(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=_().$implicit;o(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div",24)(4,"div"),c(5,"img",25),v(6,"channelImage"),i(),t(7,"div"),c(8,"order-link",26),i()(),t(9,"small"),a(10),v(11,"date"),i()()(),t(12,"td"),a(13),i(),t(14,"td"),w(15,ge,1,1,"variants-dropdown",27)(16,Ce,1,1,"variant-with-image",28),i(),t(17,"td"),a(18),v(19,"number"),i(),t(20,"td")(21,"div",23)(22,"div",24)(23,"span"),a(24),i(),w(25,he,2,1,"span"),i(),t(26,"small"),a(27),i()()()()),r&2){let e=h.$implicit;o(5),u("src",V(6,12,e==null?null:e.MarketType),O)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(3),u("order",e),o(2),b(" ",G(11,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),x(e.Customer),o(),D(q(19,fe,(e.Variants==null?null:e.Variants.length)>1)),o(),y((e.Variants==null?null:e.Variants.length)>1?15:16),o(3),x(V(19,17,e.Amount)),o(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1),o(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function ve(r,h){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th",20),a(7,"Customer"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",21),a(13,"Shipping"),i()()(),t(14,"tbody"),B(15,Se,28,21,"tr",null,I),i()(),t(17,"app-custom-paginator",22),M("next",function(){p(e);let n=_();return s(n.initAllOrders())})("previous",function(){p(e);let n=_();return s(n.initAllOrders())}),i()()}if(r&2){let e=_(),m=H(0);o(15),k(m),o(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function we(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var Ue=(()=>{class r{constructor(){this.orderService=F(A),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>P(T({},m),{From:e})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(L(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-all"]],features:[j([A])],decls:34,vars:12,consts:[["headerTitle","Completed","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-solid","fa-clipboard-list","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","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",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"],[3,"order"],[3,"variants"],[3,"variant"]],template:function(m,n){if(m&1){let d=E();z(0),v(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initAllOrders())}),C("textChange",function(l){return p(d),g(n.filter().Number,l)||(n.filter().Number=l),s(l)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"channel-select-options",4),C("ngModelChange",function(l){return p(d),g(n.filter().ListChannelID,l)||(n.filter().ListChannelID=l),s(l)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(l){return p(d),g(n.filter().From,l)||(n.filter().From=l),s(l)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(l){return p(d),g(n.filter().To,l)||(n.filter().To=l),s(l)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(l){return p(d),g(n.filter().PageNumber,l)||(n.filter().PageNumber=l),s(l)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(l){return p(d),g(n.filter().PageSize,l)||(n.filter().PageSize=l),s(l)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),w(32,ve,18,2,"div",15)(33,we,2,0,"div",16),i()()()()()}if(m&2){let d=R(V(1,8,n.allOrders$)||U(11,_e));o(2),f("text",n.filter().Number),o(10),u("multiple",!0),f("ngModel",n.filter().ListChannelID),o(5),f("date",n.filter().From),o(2),f("date",n.filter().To),o(4),f("ngModel",n.filter().PageNumber),o(4),f("ngModel",n.filter().PageSize),o(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[X,J,Q,K,le,re,ae,oe,te,Y,ee,Z,$,de,pe,se,ue,me,ne,ie,ce],encapsulation:2})}}return r})();export{Ue as AllComponent};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-ZVKOEYH7.js";import{a as M}from"./chunk-GKRWJPI3.js";import{a as le}from"./chunk-67HPC5Y3.js";import{a as ne}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as re}from"./chunk-HHO2NGCF.js";import{a as te}from"./chunk-RM2OSYMV.js";import{a as ie}from"./chunk-LDL3A7NM.js";import"./chunk-FHWKSD5A.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as $,n as ee}from"./chunk-HJXYT6MI.js";import{A as X,c as J,h as K,m as Q,o as U}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as Y,s as Z}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as R,k as j,m as q,n as G}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as W,Gc as a,Hc as h,Kc as c,Lc as u,Mb as D,Mc as C,Nc as I,Oc as k,Pc as A,Qc as z,Ra as O,Yb as g,Z as P,ad as v,bd as H,dc as F,ec as L,gc as N,hc as B,ic as e,jc as t,kc as _,oc as b,pa as V,rb as l,tc as x,uc as y,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as E,b as T}from"./chunk-66YHNWRR.js";function oe(m,S){if(m&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),a(6),t(),e(7,"td"),a(8),w(9,"number"),t(),e(10,"td"),a(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),m&2){let r=S.$implicit;l(2),h(r.Outlet),l(2),g("order",r),l(2),h(r.Customer),l(2),h(v(9,6,r.Amount)),l(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),l(3),g("typeId",r==null?null:r.TypeID)}}function me(m,S){if(m&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),t(),e(6,"th",21),a(7,"Order number"),t(),e(8,"th"),a(9,"Customer"),t(),e(10,"th",22),a(11,"Amount"),t(),e(12,"th",23),a(13," Created On "),t(),e(14,"th",24),a(15,"Channel"),t()()(),e(16,"tbody"),N(17,oe,15,11,"tr",null,L),t()(),e(19,"app-custom-paginator",25),x("next",function(){p(r);let i=y();return s(i.initCancelledOrders())})("previous",function(){p(r);let i=y();return s(i.initCancelledOrders())}),t()()}if(m&2){let r=y(),o=A(0);l(17),B(o),l(2),g("filter",r.filter())("totaldata",o==null?null:o.length)("paginationTotal",o==null?null:o.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function de(m,S){m&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Oe=(()=>{class m{constructor(){this.orderService=V(M),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:r=>{this.initFromDate(r)},error:r=>{console.error("Error fetching default date:",r),this.initFromDate(null)}})}initFromDate(r){this.filter.update(o=>T(E({},o),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=W({type:m,selectors:[["app-cancelled"]],features:[z([M])],decls:34,vars:11,consts:[["headerTitle","Cancelled","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","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(o,i){if(o&1){let d=b();I(0),w(1,"async"),e(2,"mainpanel",0),x("onSubmit",function(){return p(d),s(i.initCancelledOrders())}),C("textChange",function(n){return p(d),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),a(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"channel-select-options",4),C("ngModelChange",function(n){return p(d),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),a(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(d),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(d),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),a(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(d),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),a(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(d),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),D(32,me,20,5,"div",15)(33,de,2,0,"div",16),t()()()()()}if(o&2){let d=k(v(1,8,i.cancelledOrders$));l(2),c("text",i.filter().Number),l(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),l(5),c("date",i.filter().From),l(2),c("date",i.filter().To),l(4),c("ngModel",i.filter().PageNumber),l(4),c("ngModel",i.filter().PageSize),l(5),F((d==null?null:d.length)>0?32:33)}},dependencies:[G,R,q,j,ee,$,ne,ie,X,J,U,K,Q,le,re,Z,Y,ae,te],encapsulation:2})}}return m})();export{Oe as CancelledComponent};
1
+ import{a as ae}from"./chunk-25N6ECN7.js";import{a as M}from"./chunk-BXXJEM76.js";import{a as le}from"./chunk-67HPC5Y3.js";import{a as ne}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as re}from"./chunk-THMNZQLX.js";import{a as te}from"./chunk-GHFADTRR.js";import"./chunk-ACIMXBIC.js";import{a as ie}from"./chunk-LDL3A7NM.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as $,n as ee}from"./chunk-HJXYT6MI.js";import{A as X,c as J,h as K,m as Q,o as U}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as Y,s as Z}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as R,k as j,m as q,n as G}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as W,Gc as a,Hc as h,Kc as c,Lc as u,Mb as D,Mc as C,Nc as I,Oc as k,Pc as A,Qc as z,Ra as O,Yb as g,Z as P,ad as v,bd as H,dc as F,ec as L,gc as N,hc as B,ic as e,jc as t,kc as _,oc as b,pa as V,rb as l,tc as x,uc as y,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as E,b as T}from"./chunk-66YHNWRR.js";function oe(m,S){if(m&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),a(6),t(),e(7,"td"),a(8),w(9,"number"),t(),e(10,"td"),a(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),m&2){let r=S.$implicit;l(2),h(r.Outlet),l(2),g("order",r),l(2),h(r.Customer),l(2),h(v(9,6,r.Amount)),l(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),l(3),g("typeId",r==null?null:r.TypeID)}}function me(m,S){if(m&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),t(),e(6,"th",21),a(7,"Order number"),t(),e(8,"th"),a(9,"Customer"),t(),e(10,"th",22),a(11,"Amount"),t(),e(12,"th",23),a(13," Created On "),t(),e(14,"th",24),a(15,"Channel"),t()()(),e(16,"tbody"),N(17,oe,15,11,"tr",null,L),t()(),e(19,"app-custom-paginator",25),x("next",function(){p(r);let i=y();return s(i.initCancelledOrders())})("previous",function(){p(r);let i=y();return s(i.initCancelledOrders())}),t()()}if(m&2){let r=y(),o=A(0);l(17),B(o),l(2),g("filter",r.filter())("totaldata",o==null?null:o.length)("paginationTotal",o==null?null:o.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function de(m,S){m&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Oe=(()=>{class m{constructor(){this.orderService=V(M),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:r=>{this.initFromDate(r)},error:r=>{console.error("Error fetching default date:",r),this.initFromDate(null)}})}initFromDate(r){this.filter.update(o=>T(E({},o),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}static{this.\u0275fac=function(o){return new(o||m)}}static{this.\u0275cmp=W({type:m,selectors:[["app-cancelled"]],features:[z([M])],decls:34,vars:11,consts:[["headerTitle","Cancelled","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","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(o,i){if(o&1){let d=b();I(0),w(1,"async"),e(2,"mainpanel",0),x("onSubmit",function(){return p(d),s(i.initCancelledOrders())}),C("textChange",function(n){return p(d),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),a(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"channel-select-options",4),C("ngModelChange",function(n){return p(d),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),a(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(d),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(d),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),a(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(d),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),a(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(d),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),D(32,me,20,5,"div",15)(33,de,2,0,"div",16),t()()()()()}if(o&2){let d=k(v(1,8,i.cancelledOrders$));l(2),c("text",i.filter().Number),l(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),l(5),c("date",i.filter().From),l(2),c("date",i.filter().To),l(4),c("ngModel",i.filter().PageNumber),l(4),c("ngModel",i.filter().PageSize),l(5),F((d==null?null:d.length)>0?32:33)}},dependencies:[G,R,q,j,ee,$,ne,ie,X,J,U,K,Q,le,re,Z,Y,ae,te],encapsulation:2})}}return m})();export{Oe as CancelledComponent};
@@ -1 +1 @@
1
- import{a as Me}from"./chunk-EHBCYQSG.js";import{a as Fe,b as Ve}from"./chunk-GRYGUILI.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as Te,b as De,c as Ee,d as B,e as U}from"./chunk-NWWYOZ4V.js";import{a as ve,b as be}from"./chunk-YTCIQBSO.js";import"./chunk-RHHHL4OR.js";import{a as Ie}from"./chunk-KRQHTRFM.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ce}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as ye}from"./chunk-3YP6ORBR.js";import"./chunk-6VYFG4AQ.js";import{i as ge}from"./chunk-FHWKSD5A.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as pe,e as _e}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{a as he,b as Ce,d as ue,e as xe}from"./chunk-PYXL7UF7.js";import{c as se}from"./chunk-PW42BQIY.js";import{d as fe,l as Pe,m as Se,n as we}from"./chunk-HJXYT6MI.js";import{A as le,b as ne,c as ie,h as oe,m as ae,o as re}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as me,c as de}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{d as Q,g as X,j as Y,m as D,n as ee,q as te}from"./chunk-FXQKRJWU.js";import{$c as v,Fc as q,G as W,Gb as j,Gc as d,Hc as L,Ic as b,Kc as w,Lc as I,Mb as h,Mc as y,Qc as K,Sc as T,Yb as m,Z as A,ad as F,bd as J,cd as Z,dc as P,ea as $,ec as N,gc as k,hc as R,ic as a,jc as c,kc as S,lc as z,mc as G,oc as u,pa as M,pb as V,rb as l,tc as C,uc as r,xb as f,xc as H,ya as p,za as _}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var O=i=>[i],Le=i=>({"text-decoration-line-through":i}),Be=i=>({"bg-gradient-warning":i});function Ue(i,s){if(i&1&&(a(0,"span",10),S(1,"img",11),c(),d(2)),i&2){let e=s.item;l(),m("src",e==null?null:e.Img,V),l(),b(" ",e.Name," ")}}function Oe(i,s){if(i&1){let e=u();a(0,"button",16),C("click",function(){p(e);let t=r().ngIf,o=r(2);return _(o.updateStock(t))}),S(1,"i",17),d(2," Update "),c()}}function We(i,s){if(i&1){let e=u();a(0,"actions")(1,"div",12),h(2,Oe,3,0,"button",13),a(3,"button",14),C("click",function(){p(e);let t=r(2);return _(t.openExportDialog())}),S(4,"i",15),a(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Ae(i,s){if(i&1){let e=u();a(0,"th")(1,"input",32),C("change",function(t){p(e);let o=r().ngIf,g=r(2);return _(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function $e(i,s){if(i&1){let e=u();a(0,"input",49),y("ngModelChange",function(t){p(e);let o=r(4).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),C("ngModelChange",function(){p(e);let t=r(4).$implicit,o=r(3);return _(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=r(4).$implicit;w("ngModel",e.selected)}}function je(i,s){if(i&1&&h(0,$e,1,1,"ng-template",26),i&2){let e=r(6);m("ngxPermissionsOnly",T(1,O,e.rolePriceEdit))}}function ze(i,s){if(i&1){let e=u();z(0),a(1,"img",50),C("click",function(t){p(e);let o=r(3).$implicit,g=r(3);return _(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),G()}if(i&2){let e=r(3).$implicit;l(),H("src",e.ThumbnailUrl,V)}}function Ge(i,s){i&1&&S(0,"img",51)}function He(i,s){if(i&1&&(a(0,"small",48),d(1),c()),i&2){let e=r(3).$implicit;l(),b("(",e.Category,")")}}function qe(i,s){if(i&1&&(a(0,"td",44)(1,"div",35),h(2,je,1,3,null,26),a(3,"div"),h(4,ze,2,1,"ng-container",45)(5,Ge,1,0,"ng-template",null,0,Z),c()()(),a(7,"td",46)(8,"span",47),d(9),c(),h(10,He,2,1,"small",48),c()),i&2){let e=q(6),n=r(2).$implicit;m("rowSpan",n.Variants.length),l(2),P((n.Variants==null?null:n.Variants.length)>1?2:-1),l(2),m("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),m("rowSpan",n.Variants.length),l(2),L(n.Name),l(),P(n.Category?10:-1)}}function Ke(i,s){if(i&1){let e=u();a(0,"input",54),y("ngModelChange",function(t){p(e);let o=r(2).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),c()}if(i&2){let e=r(2).$implicit;w("ngModel",e.selected)}}function Je(i,s){if(i&1&&(a(0,"td",52),h(1,Ke,1,1,"input",53),c()),i&2){let e=r().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function Ze(i,s){i&1&&(a(0,"div",36),d(1," Not Found "),c())}function Qe(i,s){if(i&1&&(a(0,"div"),d(1),v(2,"number"),c()),i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Xe(i,s){if(i&1&&(a(0,"div",37)(1,"a",40),S(2,"i",55),c()()),i&2){let e=r().$implicit,n=r(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function Ye(i,s){if(i&1){let e=u();a(0,"div",56),C("click",function(){p(e);let t=r().$implicit,o=r().$implicit,g=r(2).ngIf,x=r();return _(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function et(i,s){if(i&1){let e=u();a(0,"tr",33),h(1,qe,11,7),a(2,"td",24),d(3),c(),a(4,"td",27)(5,"span",34),d(6),c()(),h(7,Je,2,1,"ng-template",26),a(8,"td",27)(9,"div",35),h(10,Ze,2,0,"div",36)(11,Qe,3,3,"div")(12,Xe,3,1,"div",37),c()(),a(13,"td",38)(14,"div",35),h(15,Ye,3,3,"div",39),a(16,"div",37)(17,"a",40),S(18,"i",41),c()(),a(19,"div",37)(20,"div",42),C("click",function(){let t=p(e).$implicit,o=r(4);return _(o.refreshPrice(t))}),S(21,"i",43),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=r(4);l(),P(n==0?1:-1),l(2),L(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",T(12,Le,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",T(14,O,t.rolePriceEdit)),l(3),P((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),m("ngClass",T(16,Be,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),P(e.Channel.length>0?15:-1),l(2),m("href",e.Channel[0]==null?null:e.Channel[0].Url,V)}}function tt(i,s){if(i&1&&k(0,et,22,18,"tr",33,N),i&2){let e=s.$implicit;R(e.Variants)}}function nt(i,s){if(i&1){let e=u();a(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),a(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(t){p(e);let o=r(2);return I(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),_(t)}),C("toggleChange",function(){p(e);let t=r(2);return _(t.onToggleDifferentInventory())}),a(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),a(12,"th",24),d(13,"Variant"),c(),a(14,"th",25),d(15,"SKU"),c(),h(16,Ae,2,0,"ng-template",26),a(17,"th",27),d(18,"POS"),c(),a(19,"th",27)(20,"div",28),C("click",function(){p(e);let t=r(2);return _(t.openModalFilter())}),S(21,"img",29),a(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),a(25,"tbody"),k(26,tt,2,0,null,null,N),c()(),a(28,"infinite-paginator",31),v(29,"async"),C("onNextPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){p(e);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(9),w("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",T(16,O,n.rolePriceEdit)),l(4),m("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),m("src",n.selectedChannel==null?null:n.selectedChannel.Img,V),l(2),b(" ",J(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),R(e),l(2),m("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function it(i,s){if(i&1){let e=u();a(0,"mainpanel",2),y("textChange",function(t){p(e);let o=r();return I(o.searchFilter.text,t)||(o.searchFilter.text=t),_(t)}),C("onSubmit",function(){p(e);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),a(5,"ng-select",4),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),_(t)}),h(6,Ue,3,2,"ng-template",5),c()(),a(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),a(10,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),_(t)}),c()(),a(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),a(14,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),_(t)}),c()()(),h(15,We,7,1,"actions",9),v(16,"async"),h(17,nt,30,18,"content",9),v(18,"async"),c()}if(i&2){let e=r();m("headerTitle",e.pageTitle),w("text",e.searchFilter.text),l(5),m("clearable",!1)("items",e.channelOptions),w("ngModel",e.searchFilter.ChannelID),l(5),w("ngModel",e.searchFilter.PageNumber),l(4),w("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(16,9,e.data$)),l(2),m("ngIf",F(18,11,e.data$))}}var Wt=(()=>{class i{constructor(e,n,t,o,g,x,Ne,ke,Re){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.authService=x,this.mainPanelService=Ne,this.exportService=ke,this.decimalPipe=Re,this.infinitePagination=M(B),this.updateResHandling=M(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ce.PriceUpdate,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(A(1)),this.channelOptions=x.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=E.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=E.ALL:this.searchFilter.filterModel=E.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",o).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,n,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,t){let o=JSON.parse(JSON.stringify(e));this.dialog.open(Te,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(W(x=>se.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x,e)})}updateItemAfterDialog(e,n){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(o=>{let g=this.productService.findChannelById(t.ID,this.channelOptions),x=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${x}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=t.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=e,o)),t))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(f(_e),f(pe),f(fe),f(Ie),f(ye),f(ge),f(Pe),f(Fe),f(D))}}static{this.\u0275cmp=j({type:i,selectors:[["app-price-single-channel"]],features:[K([B,Me,te("https://res.cloudinary.com/"),D,U])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&(h(0,it,19,13,"mainpanel",1),v(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[ee,Q,X,Y,D,we,Se,xe,ue,he,Ce,le,ie,re,ne,oe,ae,De,Ee,de,me,be,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Wt as PriceSingleChannelComponent};
1
+ import{a as Me}from"./chunk-EHBCYQSG.js";import{a as Fe,b as Ve}from"./chunk-GRYGUILI.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as Te,b as De,c as Ee,d as B,e as U}from"./chunk-TKV7XWBT.js";import{a as ve,b as be}from"./chunk-YTCIQBSO.js";import"./chunk-RHHHL4OR.js";import{a as Ie}from"./chunk-M7DDFDPD.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ce}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as ye}from"./chunk-C7YK5TDP.js";import"./chunk-HAJDTNAW.js";import"./chunk-ACIMXBIC.js";import{i as ge}from"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as pe,e as _e}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{a as he,b as Ce,d as ue,e as xe}from"./chunk-PYXL7UF7.js";import{c as se}from"./chunk-RXQX7567.js";import{d as fe,l as Pe,m as Se,n as we}from"./chunk-HJXYT6MI.js";import{A as le,b as ne,c as ie,h as oe,m as ae,o as re}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as me,c as de}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{d as Q,g as X,j as Y,m as D,n as ee,q as te}from"./chunk-FXQKRJWU.js";import{$c as v,Fc as q,G as W,Gb as j,Gc as d,Hc as L,Ic as b,Kc as w,Lc as I,Mb as h,Mc as y,Qc as K,Sc as T,Yb as m,Z as A,ad as F,bd as J,cd as Z,dc as P,ea as $,ec as N,gc as k,hc as R,ic as a,jc as c,kc as S,lc as z,mc as G,oc as u,pa as M,pb as V,rb as l,tc as C,uc as r,xb as f,xc as H,ya as p,za as _}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var O=i=>[i],Le=i=>({"text-decoration-line-through":i}),Be=i=>({"bg-gradient-warning":i});function Ue(i,s){if(i&1&&(a(0,"span",10),S(1,"img",11),c(),d(2)),i&2){let e=s.item;l(),m("src",e==null?null:e.Img,V),l(),b(" ",e.Name," ")}}function Oe(i,s){if(i&1){let e=u();a(0,"button",16),C("click",function(){p(e);let t=r().ngIf,o=r(2);return _(o.updateStock(t))}),S(1,"i",17),d(2," Update "),c()}}function We(i,s){if(i&1){let e=u();a(0,"actions")(1,"div",12),h(2,Oe,3,0,"button",13),a(3,"button",14),C("click",function(){p(e);let t=r(2);return _(t.openExportDialog())}),S(4,"i",15),a(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Ae(i,s){if(i&1){let e=u();a(0,"th")(1,"input",32),C("change",function(t){p(e);let o=r().ngIf,g=r(2);return _(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function $e(i,s){if(i&1){let e=u();a(0,"input",49),y("ngModelChange",function(t){p(e);let o=r(4).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),C("ngModelChange",function(){p(e);let t=r(4).$implicit,o=r(3);return _(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=r(4).$implicit;w("ngModel",e.selected)}}function je(i,s){if(i&1&&h(0,$e,1,1,"ng-template",26),i&2){let e=r(6);m("ngxPermissionsOnly",T(1,O,e.rolePriceEdit))}}function ze(i,s){if(i&1){let e=u();z(0),a(1,"img",50),C("click",function(t){p(e);let o=r(3).$implicit,g=r(3);return _(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),G()}if(i&2){let e=r(3).$implicit;l(),H("src",e.ThumbnailUrl,V)}}function Ge(i,s){i&1&&S(0,"img",51)}function He(i,s){if(i&1&&(a(0,"small",48),d(1),c()),i&2){let e=r(3).$implicit;l(),b("(",e.Category,")")}}function qe(i,s){if(i&1&&(a(0,"td",44)(1,"div",35),h(2,je,1,3,null,26),a(3,"div"),h(4,ze,2,1,"ng-container",45)(5,Ge,1,0,"ng-template",null,0,Z),c()()(),a(7,"td",46)(8,"span",47),d(9),c(),h(10,He,2,1,"small",48),c()),i&2){let e=q(6),n=r(2).$implicit;m("rowSpan",n.Variants.length),l(2),P((n.Variants==null?null:n.Variants.length)>1?2:-1),l(2),m("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),m("rowSpan",n.Variants.length),l(2),L(n.Name),l(),P(n.Category?10:-1)}}function Ke(i,s){if(i&1){let e=u();a(0,"input",54),y("ngModelChange",function(t){p(e);let o=r(2).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),c()}if(i&2){let e=r(2).$implicit;w("ngModel",e.selected)}}function Je(i,s){if(i&1&&(a(0,"td",52),h(1,Ke,1,1,"input",53),c()),i&2){let e=r().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function Ze(i,s){i&1&&(a(0,"div",36),d(1," Not Found "),c())}function Qe(i,s){if(i&1&&(a(0,"div"),d(1),v(2,"number"),c()),i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Xe(i,s){if(i&1&&(a(0,"div",37)(1,"a",40),S(2,"i",55),c()()),i&2){let e=r().$implicit,n=r(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function Ye(i,s){if(i&1){let e=u();a(0,"div",56),C("click",function(){p(e);let t=r().$implicit,o=r().$implicit,g=r(2).ngIf,x=r();return _(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function et(i,s){if(i&1){let e=u();a(0,"tr",33),h(1,qe,11,7),a(2,"td",24),d(3),c(),a(4,"td",27)(5,"span",34),d(6),c()(),h(7,Je,2,1,"ng-template",26),a(8,"td",27)(9,"div",35),h(10,Ze,2,0,"div",36)(11,Qe,3,3,"div")(12,Xe,3,1,"div",37),c()(),a(13,"td",38)(14,"div",35),h(15,Ye,3,3,"div",39),a(16,"div",37)(17,"a",40),S(18,"i",41),c()(),a(19,"div",37)(20,"div",42),C("click",function(){let t=p(e).$implicit,o=r(4);return _(o.refreshPrice(t))}),S(21,"i",43),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=r(4);l(),P(n==0?1:-1),l(2),L(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",T(12,Le,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",T(14,O,t.rolePriceEdit)),l(3),P((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),m("ngClass",T(16,Be,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),P(e.Channel.length>0?15:-1),l(2),m("href",e.Channel[0]==null?null:e.Channel[0].Url,V)}}function tt(i,s){if(i&1&&k(0,et,22,18,"tr",33,N),i&2){let e=s.$implicit;R(e.Variants)}}function nt(i,s){if(i&1){let e=u();a(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),a(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(t){p(e);let o=r(2);return I(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),_(t)}),C("toggleChange",function(){p(e);let t=r(2);return _(t.onToggleDifferentInventory())}),a(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),a(12,"th",24),d(13,"Variant"),c(),a(14,"th",25),d(15,"SKU"),c(),h(16,Ae,2,0,"ng-template",26),a(17,"th",27),d(18,"POS"),c(),a(19,"th",27)(20,"div",28),C("click",function(){p(e);let t=r(2);return _(t.openModalFilter())}),S(21,"img",29),a(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),a(25,"tbody"),k(26,tt,2,0,null,null,N),c()(),a(28,"infinite-paginator",31),v(29,"async"),C("onNextPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){p(e);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(9),w("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",T(16,O,n.rolePriceEdit)),l(4),m("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),m("src",n.selectedChannel==null?null:n.selectedChannel.Img,V),l(2),b(" ",J(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),R(e),l(2),m("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function it(i,s){if(i&1){let e=u();a(0,"mainpanel",2),y("textChange",function(t){p(e);let o=r();return I(o.searchFilter.text,t)||(o.searchFilter.text=t),_(t)}),C("onSubmit",function(){p(e);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),a(5,"ng-select",4),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),_(t)}),h(6,Ue,3,2,"ng-template",5),c()(),a(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),a(10,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),_(t)}),c()(),a(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),a(14,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),_(t)}),c()()(),h(15,We,7,1,"actions",9),v(16,"async"),h(17,nt,30,18,"content",9),v(18,"async"),c()}if(i&2){let e=r();m("headerTitle",e.pageTitle),w("text",e.searchFilter.text),l(5),m("clearable",!1)("items",e.channelOptions),w("ngModel",e.searchFilter.ChannelID),l(5),w("ngModel",e.searchFilter.PageNumber),l(4),w("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(16,9,e.data$)),l(2),m("ngIf",F(18,11,e.data$))}}var Wt=(()=>{class i{constructor(e,n,t,o,g,x,Ne,ke,Re){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.authService=x,this.mainPanelService=Ne,this.exportService=ke,this.decimalPipe=Re,this.infinitePagination=M(B),this.updateResHandling=M(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ce.PriceUpdate,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(A(1)),this.channelOptions=x.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=E.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=E.ALL:this.searchFilter.filterModel=E.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",o).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,n,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,t){let o=JSON.parse(JSON.stringify(e));this.dialog.open(Te,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(W(x=>se.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x,e)})}updateItemAfterDialog(e,n){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(o=>{let g=this.productService.findChannelById(t.ID,this.channelOptions),x=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${x}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=t.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=e,o)),t))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(f(_e),f(pe),f(fe),f(Ie),f(ye),f(ge),f(Pe),f(Fe),f(D))}}static{this.\u0275cmp=j({type:i,selectors:[["app-price-single-channel"]],features:[K([B,Me,te("https://res.cloudinary.com/"),D,U])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&(h(0,it,19,13,"mainpanel",1),v(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[ee,Q,X,Y,D,we,Se,xe,ue,he,Ce,le,ie,re,ne,oe,ae,De,Ee,de,me,be,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Wt as PriceSingleChannelComponent};
@@ -1 +1 @@
1
- import{a as ie,b as oe}from"./chunk-OXWPLJEW.js";import{a as ee,b as te}from"./chunk-2O4IEGGR.js";import{na as Z}from"./chunk-RC5PUUVM.js";import{e as Q}from"./chunk-WN5DZGA4.js";import{b as g,c as r}from"./chunk-PW42BQIY.js";import{A as K,a as H,h as J,m as $}from"./chunk-5PS6ZS3N.js";import{r as X,s as Y}from"./chunk-MFQQEEHJ.js";import{i as R,j as U,n as q}from"./chunk-FXQKRJWU.js";import{$c as G,Fc as L,Gb as A,Gc as x,Ic as V,Ka as F,Kc as D,Lc as P,Mb as m,Mc as z,Qc as W,Ra as b,Yb as u,Z as S,aa as p,ad as j,cd as B,dc as M,ea as s,g as c,ia as k,ic as y,ja as I,jc as _,nc as w,oc as O,pa as f,q as l,rb as T,tc as E,uc as n,xa as N,ya as C,za as h}from"./chunk-OJMQBH6T.js";var ae=(()=>{class o{constructor(){this.httpService=f(Q),this.shopeeCategories=new c({data:[],isFirstLoad:!1}),this.tiktokCategories=new c({data:[],isFirstLoad:!1}),this.lazadaCategories=new c({data:[],isFirstLoad:!1}),this.tokopediaCategories=new c({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new c({data:[],isFirstLoad:!1})}getCategories(e,i){switch(e){case g.Shopee:return this.shopeeCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getShopeeCategories(i)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTiktokCategories(i)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getLazadaCategories(i)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTokopediaCategories(i)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getWooCommerceCategories(i)));default:return l([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.shopeeCategories.next(a)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tiktokCategories.next(a)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.lazadaCategories.next(a)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tokopediaCategories.next(a)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.wooCommerceCategories.next(a)}))}searchByIdWithParentDFS(e,i){let t=[...e];for(;t.length>0;){let a=t.pop();if(a.id===JSON.stringify(i))return a;if(a.children&&a.children.length>0)for(let v of a.children)v.parent=a,t.push(v)}return null}searchSelectAbleNode(e){let i=null;if(e.selectable)return e;let t=e.children?e.children:[];if(t.length==0)return e;for(let a of t){if(a.children.length==0&&a.selectable)return a;if(i=this.searchSelectAbleNode(a),i)return i}return i}generateCategoryLabel(e){let i="";return e?i=r.getLabelPathTree(e):i="Select a Category",i}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=I({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function ne(o,d){o&1&&w(0)}function se(o,d){if(o&1&&(y(0,"p-floatLabel",1),m(1,ne,1,0,"ng-container",2),y(2,"label",3),x(3,"Category"),_()()),o&2){n();let e=L(3);T(),u("ngTemplateOutlet",e)}}function le(o,d){o&1&&w(0)}function ce(o,d){if(o&1&&m(0,le,1,0,"ng-container",2),o&2){n();let e=L(3);u("ngTemplateOutlet",e)}}function pe(o,d){if(o&1&&(y(0,"div",6),x(1),_()),o&2){let e=n(2);u("matTooltip",e.selectedCategoryLabel()),T(),V(" ",e.selectedCategoryLabel()," ")}}function ge(o,d){if(o&1){let e=O();y(0,"p-treeSelect",4),G(1,"async"),z("ngModelChange",function(t){C(e);let a=n();return P(a.selectedNode,t)||(a.selectedNode=t),h(t)}),E("click",function(){C(e);let t=n();return h(t.onClickSelect())})("onNodeSelect",function(t){C(e);let a=n();return h(a.onNodeSelect(t))})("onClear",function(){C(e);let t=n();return h(t.onNodeUnselect())}),m(2,pe,2,2,"ng-template",5),_()}if(o&2){let e=n();D("ngModel",e.selectedNode),u("filter",!0)("options",j(1,5,e.categories$))("showClear",e.showClear)("disabled",e.disabled)}}var Pe=(()=>{class o{constructor(){this.categoryService=f(ae),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new F,this.selectedCategoryLabel=b("Select a Category"),this.selectedNode=b(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let i=e?.categoryId?.previousValue,t=e?.categoryId?.currentValue;r.IsEmpty(i)&&r.IsNotEmpty(t)&&this.initCategories(),r.IsEmpty(t)&&r.IsNotEmpty(i)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(s(e=>this.setDefaultCategory(e)),S(1))}setDefaultCategory(e){try{let i=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);i&&(this.generateCategoryLabel(i),this.selectedNode.set(i))}catch(i){console.error(i)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(S(1)))}onNodeSelect(e){let i=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(r.getLabelPathTree(i));let t=parseInt(i.id);this.onChange(t),this.selectedCategory.emit(t)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(r.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){r.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275cmp=A({type:o,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},features:[W([{provide:H,useExisting:k(()=>o),multi:!0}]),N],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&m(0,se,4,1,"p-floatLabel",1)(1,ce,1,1,"ng-container")(2,ge,3,7,"ng-template",null,0,B),i&2&&M(t.showLabel?0:1)},dependencies:[q,R,U,te,ee,Z,Y,X,K,J,$,oe,ie],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})}}return o})();export{ae as a,Pe as b};
1
+ import{a as ie,b as oe}from"./chunk-OXWPLJEW.js";import{a as ee,b as te}from"./chunk-2O4IEGGR.js";import{na as Z}from"./chunk-RC5PUUVM.js";import{e as Q}from"./chunk-WN5DZGA4.js";import{b as g,c as r}from"./chunk-RXQX7567.js";import{A as K,a as H,h as J,m as $}from"./chunk-5PS6ZS3N.js";import{r as X,s as Y}from"./chunk-MFQQEEHJ.js";import{i as R,j as U,n as q}from"./chunk-FXQKRJWU.js";import{$c as G,Fc as L,Gb as A,Gc as x,Ic as V,Ka as F,Kc as D,Lc as P,Mb as m,Mc as z,Qc as W,Ra as b,Yb as u,Z as S,aa as p,ad as j,cd as B,dc as M,ea as s,g as c,ia as k,ic as y,ja as I,jc as _,nc as w,oc as O,pa as f,q as l,rb as T,tc as E,uc as n,xa as N,ya as C,za as h}from"./chunk-OJMQBH6T.js";var ae=(()=>{class o{constructor(){this.httpService=f(Q),this.shopeeCategories=new c({data:[],isFirstLoad:!1}),this.tiktokCategories=new c({data:[],isFirstLoad:!1}),this.lazadaCategories=new c({data:[],isFirstLoad:!1}),this.tokopediaCategories=new c({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new c({data:[],isFirstLoad:!1})}getCategories(e,i){switch(e){case g.Shopee:return this.shopeeCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getShopeeCategories(i)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTiktokCategories(i)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getLazadaCategories(i)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTokopediaCategories(i)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getWooCommerceCategories(i)));default:return l([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.shopeeCategories.next(a)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tiktokCategories.next(a)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.lazadaCategories.next(a)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tokopediaCategories.next(a)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.wooCommerceCategories.next(a)}))}searchByIdWithParentDFS(e,i){let t=[...e];for(;t.length>0;){let a=t.pop();if(a.id===JSON.stringify(i))return a;if(a.children&&a.children.length>0)for(let v of a.children)v.parent=a,t.push(v)}return null}searchSelectAbleNode(e){let i=null;if(e.selectable)return e;let t=e.children?e.children:[];if(t.length==0)return e;for(let a of t){if(a.children.length==0&&a.selectable)return a;if(i=this.searchSelectAbleNode(a),i)return i}return i}generateCategoryLabel(e){let i="";return e?i=r.getLabelPathTree(e):i="Select a Category",i}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=I({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function ne(o,d){o&1&&w(0)}function se(o,d){if(o&1&&(y(0,"p-floatLabel",1),m(1,ne,1,0,"ng-container",2),y(2,"label",3),x(3,"Category"),_()()),o&2){n();let e=L(3);T(),u("ngTemplateOutlet",e)}}function le(o,d){o&1&&w(0)}function ce(o,d){if(o&1&&m(0,le,1,0,"ng-container",2),o&2){n();let e=L(3);u("ngTemplateOutlet",e)}}function pe(o,d){if(o&1&&(y(0,"div",6),x(1),_()),o&2){let e=n(2);u("matTooltip",e.selectedCategoryLabel()),T(),V(" ",e.selectedCategoryLabel()," ")}}function ge(o,d){if(o&1){let e=O();y(0,"p-treeSelect",4),G(1,"async"),z("ngModelChange",function(t){C(e);let a=n();return P(a.selectedNode,t)||(a.selectedNode=t),h(t)}),E("click",function(){C(e);let t=n();return h(t.onClickSelect())})("onNodeSelect",function(t){C(e);let a=n();return h(a.onNodeSelect(t))})("onClear",function(){C(e);let t=n();return h(t.onNodeUnselect())}),m(2,pe,2,2,"ng-template",5),_()}if(o&2){let e=n();D("ngModel",e.selectedNode),u("filter",!0)("options",j(1,5,e.categories$))("showClear",e.showClear)("disabled",e.disabled)}}var Pe=(()=>{class o{constructor(){this.categoryService=f(ae),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new F,this.selectedCategoryLabel=b("Select a Category"),this.selectedNode=b(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let i=e?.categoryId?.previousValue,t=e?.categoryId?.currentValue;r.IsEmpty(i)&&r.IsNotEmpty(t)&&this.initCategories(),r.IsEmpty(t)&&r.IsNotEmpty(i)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(s(e=>this.setDefaultCategory(e)),S(1))}setDefaultCategory(e){try{let i=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);i&&(this.generateCategoryLabel(i),this.selectedNode.set(i))}catch(i){console.error(i)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(S(1)))}onNodeSelect(e){let i=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(r.getLabelPathTree(i));let t=parseInt(i.id);this.onChange(t),this.selectedCategory.emit(t)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(r.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){r.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275cmp=A({type:o,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},features:[W([{provide:H,useExisting:k(()=>o),multi:!0}]),N],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&m(0,se,4,1,"p-floatLabel",1)(1,ce,1,1,"ng-container")(2,ge,3,7,"ng-template",null,0,B),i&2&&M(t.showLabel?0:1)},dependencies:[q,R,U,te,ee,Z,Y,X,K,J,$,oe,ie],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})}}return o})();export{ae as a,Pe as b};
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-LSSYGFVV.js";import{a as C}from"./chunk-IITU3NV6.js";import{a as h,b as y}from"./chunk-WRJFUNM3.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as v,J as o,n}from"./chunk-FXQKRJWU.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-53AH4SKO.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-XSCE2K6J.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-E42O4ZCH.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-3YP6ORBR.js";import{c as q}from"./chunk-PW42BQIY.js";import{A as R}from"./chunk-5PS6ZS3N.js";import{r as A,s as G}from"./chunk-MFQQEEHJ.js";import{d as V,f as z,g as B,m as j,n as Z,r as $}from"./chunk-FXQKRJWU.js";import{$c as y,Fc as D,Gb as M,Gc as p,Hc as x,Ic as u,Jc as F,Mb as m,Nc as L,Oa as I,Oc as N,Pc as k,Sc as b,Xb as C,Yb as a,ad as P,cd as U,dc as h,ic as r,jc as l,kc as g,lc as v,mc as _,oc as O,pb as f,rb as n,tc as T,uc as d,xb as E,ya as w,za as S}from"./chunk-OJMQBH6T.js";var J=t=>({"border-bottom-0":t}),K=t=>({"border-bottom":t});function Q(t,c){if(t&1){let e=O();v(0),r(1,"img",15),T("click",function(i){w(e);let s=d();return S(s.onZoomImage(i))}),l(),_()}if(t&2){let e=d();n(),a("ngSrc",e.image)("fill",!0)}}function W(t,c){t&1&&g(0,"img",16),t&2&&a("fill",!0)}function X(t,c){if(t&1&&(r(0,"div",17),g(1,"i",18),r(2,"span"),p(3),l()()),t&2){let e=d();n(3),x(e.code)}}function Y(t,c){if(t&1&&(r(0,"div",11),p(1),y(2,"number"),l()),t&2){let e=d();n(),u("",P(2,1,e.totalChannel())," Listing")}}function ee(t,c){if(t&1&&(r(0,"div",25),p(1),y(2,"number"),l()),t&2){d();let e=k(7);n(),u(" (",P(2,1,e)," Listing) ")}}function te(t,c){if(t&1&&(v(0),r(1,"div",29)(2,"div",30),p(3),l(),r(4,"div")(5,"a",31),g(6,"i",32),l()()(),_()),t&2){let e=c.$implicit,o=c.index,i=d().$implicit;n(),a("ngClass",b(4,K,o!==(i==null?null:i.Variants.length)-1)),n(2),F(" ",e.ProductName," - ",e.Name," "),n(2),a("href",e.URL,f)}}function ne(t,c){if(t&1&&(r(0,"div",19)(1,"h2",20)(2,"button",21)(3,"div",22),g(4,"img",23),r(5,"span",24),p(6),l(),L(7),m(8,ee,3,3,"div",25),l()()(),r(9,"div",26)(10,"div",27),m(11,te,7,6,"ng-container",28),l()()()),t&2){let e=c.$implicit,o=c.index,i=d();a("ngClass",b(12,J,i.channels.length-1==o)),n(),a("id","heading"+o+i.id),n(),C("data-bs-target","#collapse"+o+i.id)("aria-controls","#collapse"+o+i.id),n(2),a("src",i.getChannelLogo(e.TypeID),f),n(),a("matTooltip",(e==null||e.ChannelName==null?null:e.ChannelName.length)>30?e.ChannelName:""),n(),x(e.ChannelName),n();let s=N(e==null||e.Variants==null?null:e.Variants.length);n(),h(s>1&&(i.channels==null?null:i.channels.length)>1?8:-1),n(),a("id","collapse"+o+i.id),C("aria-labelledby","heading"+o+i.id),n(2),a("ngForOf",e.Variants)}}var ue=(()=>{class t{constructor(e){this.biggerPictureService=e,this.totalChannel=I(0)}getChannelLogo(e){return q.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom)}static{this.\u0275fac=function(o){return new(o||t)(E(H))}}static{this.\u0275cmp=M({type:t,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",totalChannel:[1,"totalChannel"],id:"id"},decls:17,vars:6,consts:[["elsePic",""],[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(o,i){if(o&1&&(r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),m(6,Q,2,2,"ng-container",7)(7,W,1,1,"ng-template",null,0,U),l()()(),r(9,"div",8)(10,"h4",9),p(11),l(),m(12,X,4,1,"div",10)(13,Y,3,3,"div",11),l()()(),r(14,"div",12)(15,"div",13),m(16,ne,12,14,"div",14),l()()()),o&2){let s=D(8);n(6),a("ngIf",i.image)("ngIfElse",s),n(5),u(" ",i.title," "),n(),a("ngIf",i.code),n(),h(i.totalChannel()?13:-1),n(3),a("ngForOf",i.channels)}},dependencies:[Z,V,z,B,j,R,G,A,$],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]})}}return t})();export{ue as a};
1
+ import{a as H}from"./chunk-C7YK5TDP.js";import{c as q}from"./chunk-RXQX7567.js";import{A as R}from"./chunk-5PS6ZS3N.js";import{r as A,s as G}from"./chunk-MFQQEEHJ.js";import{d as V,f as z,g as B,m as j,n as Z,r as $}from"./chunk-FXQKRJWU.js";import{$c as y,Fc as D,Gb as M,Gc as p,Hc as x,Ic as u,Jc as F,Mb as m,Nc as L,Oa as I,Oc as N,Pc as k,Sc as b,Xb as C,Yb as a,ad as P,cd as U,dc as h,ic as r,jc as l,kc as g,lc as v,mc as _,oc as O,pb as f,rb as n,tc as T,uc as d,xb as E,ya as w,za as S}from"./chunk-OJMQBH6T.js";var J=t=>({"border-bottom-0":t}),K=t=>({"border-bottom":t});function Q(t,c){if(t&1){let e=O();v(0),r(1,"img",15),T("click",function(i){w(e);let s=d();return S(s.onZoomImage(i))}),l(),_()}if(t&2){let e=d();n(),a("ngSrc",e.image)("fill",!0)}}function W(t,c){t&1&&g(0,"img",16),t&2&&a("fill",!0)}function X(t,c){if(t&1&&(r(0,"div",17),g(1,"i",18),r(2,"span"),p(3),l()()),t&2){let e=d();n(3),x(e.code)}}function Y(t,c){if(t&1&&(r(0,"div",11),p(1),y(2,"number"),l()),t&2){let e=d();n(),u("",P(2,1,e.totalChannel())," Listing")}}function ee(t,c){if(t&1&&(r(0,"div",25),p(1),y(2,"number"),l()),t&2){d();let e=k(7);n(),u(" (",P(2,1,e)," Listing) ")}}function te(t,c){if(t&1&&(v(0),r(1,"div",29)(2,"div",30),p(3),l(),r(4,"div")(5,"a",31),g(6,"i",32),l()()(),_()),t&2){let e=c.$implicit,o=c.index,i=d().$implicit;n(),a("ngClass",b(4,K,o!==(i==null?null:i.Variants.length)-1)),n(2),F(" ",e.ProductName," - ",e.Name," "),n(2),a("href",e.URL,f)}}function ne(t,c){if(t&1&&(r(0,"div",19)(1,"h2",20)(2,"button",21)(3,"div",22),g(4,"img",23),r(5,"span",24),p(6),l(),L(7),m(8,ee,3,3,"div",25),l()()(),r(9,"div",26)(10,"div",27),m(11,te,7,6,"ng-container",28),l()()()),t&2){let e=c.$implicit,o=c.index,i=d();a("ngClass",b(12,J,i.channels.length-1==o)),n(),a("id","heading"+o+i.id),n(),C("data-bs-target","#collapse"+o+i.id)("aria-controls","#collapse"+o+i.id),n(2),a("src",i.getChannelLogo(e.TypeID),f),n(),a("matTooltip",(e==null||e.ChannelName==null?null:e.ChannelName.length)>30?e.ChannelName:""),n(),x(e.ChannelName),n();let s=N(e==null||e.Variants==null?null:e.Variants.length);n(),h(s>1&&(i.channels==null?null:i.channels.length)>1?8:-1),n(),a("id","collapse"+o+i.id),C("aria-labelledby","heading"+o+i.id),n(2),a("ngForOf",e.Variants)}}var ue=(()=>{class t{constructor(e){this.biggerPictureService=e,this.totalChannel=I(0)}getChannelLogo(e){return q.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom)}static{this.\u0275fac=function(o){return new(o||t)(E(H))}}static{this.\u0275cmp=M({type:t,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",totalChannel:[1,"totalChannel"],id:"id"},decls:17,vars:6,consts:[["elsePic",""],[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(o,i){if(o&1&&(r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),m(6,Q,2,2,"ng-container",7)(7,W,1,1,"ng-template",null,0,U),l()()(),r(9,"div",8)(10,"h4",9),p(11),l(),m(12,X,4,1,"div",10)(13,Y,3,3,"div",11),l()()(),r(14,"div",12)(15,"div",13),m(16,ne,12,14,"div",14),l()()()),o&2){let s=D(8);n(6),a("ngIf",i.image)("ngIfElse",s),n(5),u(" ",i.title," "),n(),a("ngIf",i.code),n(),h(i.totalChannel()?13:-1),n(3),a("ngForOf",i.channels)}},dependencies:[Z,V,z,B,j,R,G,A,$],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]})}}return t})();export{ue as a};
@@ -1,2 +1,2 @@
1
- import{h as m}from"./chunk-FHWKSD5A.js";import{a as n}from"./chunk-CGOB6Y3X.js";import{e as u}from"./chunk-WN5DZGA4.js";import{ea as h,ja as c,pa as s,v as a}from"./chunk-OJMQBH6T.js";var f=(()=>{class i{constructor(){}convertToCSV(t,e){let r;if(typeof t=="string")r=t;else{var o=typeof t=="object"?t:JSON.parse(t);r=this.transformToCSVStringFormat(o)}this.downloadCSV(r,e)}transformToCSVStringFormat(t){if(!t||!t.length)return;let e=",",r=Object.keys(t[0]);return t.map(l=>r.map(d=>{let p=l[d]===null||l[d]===void 0?"":l[d];return p=p instanceof Date?p.toLocaleString():p.toString().replace(/"/g,'""'),p.search(/("|,|\n)/g)>=0&&(p=`"${p}"`),p}).join(e)).join(`
1
+ import{h as m}from"./chunk-RTF4FRXW.js";import{a as n}from"./chunk-CGOB6Y3X.js";import{e as u}from"./chunk-WN5DZGA4.js";import{ea as h,ja as c,pa as s,v as a}from"./chunk-OJMQBH6T.js";var f=(()=>{class i{constructor(){}convertToCSV(t,e){let r;if(typeof t=="string")r=t;else{var o=typeof t=="object"?t:JSON.parse(t);r=this.transformToCSVStringFormat(o)}this.downloadCSV(r,e)}transformToCSVStringFormat(t){if(!t||!t.length)return;let e=",",r=Object.keys(t[0]);return t.map(l=>r.map(d=>{let p=l[d]===null||l[d]===void 0?"":l[d];return p=p instanceof Date?p.toLocaleString():p.toString().replace(/"/g,'""'),p.search(/("|,|\n)/g)>=0&&(p=`"${p}"`),p}).join(e)).join(`
2
2
  `)}downloadCSV(t,e){var r=new Blob([t],{type:"text/csv;charset=utf8;"}),o=document.createElement("a");o.setAttribute("href",window.URL.createObjectURL(r)),o.setAttribute("download",e),document.body.appendChild(o),o.click(),document.body.removeChild(o)}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var w=(()=>{class i{constructor(){this.httpService=s(u),this.tokenService=s(m),this.exportService=s(f)}getShippedOrders(t){return this.httpService.post(n.GetShipped,t).pipe(a(e=>e.Data||[]))}getReadyToShipOrders(t){return this.httpService.post(n.GetToShip,t).pipe(a(e=>e?.Data))}getCompletedOrders(t){return this.httpService.post(n.GetCompleted,t).pipe(a(e=>e?.Data||[]))}getCancelledOrders(t){return this.httpService.post(n.GetCancelled,t).pipe(a(e=>e.Data))}getAwaitingCollectionOrders(t){return this.httpService.post(n.GetAwaitingCollection,t).pipe(a(e=>e?.Data))}getOrderDefaultValue(){return this.httpService.get(n.getOrderDaysFrom).pipe(a(t=>{let e=Number(t.Days??0),r=new Date;return e===0?null:new Date(r.setDate(r.getDate()-e))}))}getAllOrders(t){return this.httpService.post(n.GetAll,t).pipe(a(e=>e.Data))}exportOrders(t,e){return this.httpService.post("api/Orders/ExportOrder",t).pipe(h(r=>{this.exportService.convertToCSV(r,e)}))}refreshShippingCourier(t,e){let r={ShopID:t,OrderNumber:e};return this.httpService.post(n.RefreshShippingCourierAndRefNumber,r)}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac})}}return i})();export{w as a};
@@ -1,4 +1,4 @@
1
- import{c as mt}from"./chunk-PW42BQIY.js";import{ja as dt}from"./chunk-OJMQBH6T.js";import{a as We,b as ut,i as at}from"./chunk-66YHNWRR.js";function L(){}var Ge=e=>e;function pt(e,t){for(let n in t)e[n]=t[n];return e}function Mt(e){return e()}function Y(e){e.forEach(Mt)}function Ye(e){return typeof e=="function"}function oe(e,t){return e!=e?t==t:e!==t}function Ot(e){return Object.keys(e).length===0}function Rt(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Rt(t,n))}function Ce(e){return e&&Ye(e.destroy)?e.destroy:L}var Qe=()=>globalThis.performance.now(),xe=e=>requestAnimationFrame(e),he=new Set;function Et(e){he.forEach(t=>{t.c(e)||(he.delete(t),t.f())}),he.size!==0&&xe(Et)}function et(e){let t;return he.size===0&&xe(Et),{promise:new Promise(n=>{he.add(t={c:e,f:n})}),abort(){he.delete(t)}}}function ge(e,t){e.appendChild(t)}function P(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function At(e){return document.createTextNode(e)}function Ee(){return At("")}function N(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function R(e,t,n){e.classList[n?"add":"remove"](t)}function Nt(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var pe,tt=0,Ze={};function $t(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
1
+ import{c as mt}from"./chunk-RXQX7567.js";import{ja as dt}from"./chunk-OJMQBH6T.js";import{a as We,b as ut,i as at}from"./chunk-66YHNWRR.js";function L(){}var Ge=e=>e;function pt(e,t){for(let n in t)e[n]=t[n];return e}function Mt(e){return e()}function Y(e){e.forEach(Mt)}function Ye(e){return typeof e=="function"}function oe(e,t){return e!=e?t==t:e!==t}function Ot(e){return Object.keys(e).length===0}function Rt(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Rt(t,n))}function Ce(e){return e&&Ye(e.destroy)?e.destroy:L}var Qe=()=>globalThis.performance.now(),xe=e=>requestAnimationFrame(e),he=new Set;function Et(e){he.forEach(t=>{t.c(e)||(he.delete(t),t.f())}),he.size!==0&&xe(Et)}function et(e){let t;return he.size===0&&xe(Et),{promise:new Promise(n=>{he.add(t={c:e,f:n})}),abort(){he.delete(t)}}}function ge(e,t){e.appendChild(t)}function P(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function At(e){return document.createTextNode(e)}function Ee(){return At("")}function N(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function R(e,t,n){e.classList[n?"add":"remove"](t)}function Nt(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var pe,tt=0,Ze={};function $t(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
2
2
  `;for(let a=0;a<=1;a+=l){let p=t+(n-t)*r(a);f+=a*100+`%{${s(p,1-p)}}
3
3
  `}let d=f+`100% {${s(n,1-n)}}
4
4
  }`,u=`_bp_${Math.round(Math.random()*1e9)}_${c}`;if(!Ze[u]){if(!pe){let a=C("style");document.head.appendChild(a),pe=a.sheet}Ze[u]=!0,pe.insertRule(`@keyframes ${u} ${d}`,pe.cssRules.length)}let h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${u} ${i}ms linear ${o}ms 1 both`,tt+=1,u}function qe(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>n.indexOf("_bp")===-1).join(", "),t&&!--tt&&Yt()}function Yt(){xe(()=>{if(tt)return;let e=pe.cssRules.length;for(;e--;)pe.deleteRule(e);Ze={}})}var nt;function Ie(e){nt=e}var ze=[],ht=[],Oe=[],gt=[],Xt=Promise.resolve(),je=!1;function Wt(){je||(je=!0,Xt.then(Ct))}function ee(e){Oe.push(e)}var Fe=new Set,Le=0;function Ct(){let e=nt;do{for(;Le<ze.length;){let t=ze[Le];Le++,Ie(t),Ft(t.$$)}for(Ie(null),ze.length=0,Le=0;ht.length;)ht.pop()();for(let t=0;t<Oe.length;t+=1){let n=Oe[t];Fe.has(n)||(Fe.add(n),n())}Oe.length=0}while(ze.length);for(;gt.length;)gt.pop()();je=!1,Fe.clear(),Ie(e)}function Ft(e){if(e.fragment!==null){e.update(),Y(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}var Te;function Dt(){return Te||(Te=Promise.resolve(),Te.then(()=>{Te=null})),Te}function Ae(e,t,n){e.dispatchEvent(Nt(`${t?"intro":"outro"}${n}`))}var Re=new Set,U;function te(){U={r:0,c:[],p:U}}function ne(){U.r||Y(U.c),U=U.p}function v(e,t){e&&e.i&&(Re.delete(e),e.i(t))}function $(e,t,n,i){if(e&&e.o){if(Re.has(e))return;Re.add(e),U.c.push(()=>{Re.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}var Pt={duration:0};function St(e,t,n){let i=t(e,n),o=!1,r,s,c=0;function l(){r&&qe(e,r)}function f(){let{delay:u=0,duration:h=300,easing:a=Ge,tick:p=L,css:g}=i||Pt;g&&(r=$t(e,0,1,h,u,a,g,c++)),p(0,1);let k=Qe()+u,H=k+h;s&&s.abort(),o=!0,ee(()=>Ae(e,!0,"start")),s=et(X=>{if(o){if(X>=H)return p(1,0),Ae(e,!0,"end"),l(),o=!1;if(X>=k){let y=a((X-k)/h);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,qe(e),Ye(i)?(i=i(),Dt().then(f)):f())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function _e(e,t,n){let i=t(e,n),o=!0,r,s=U;s.r+=1;function c(){let{delay:l=0,duration:f=300,easing:d=Ge,tick:u=L,css:h}=i||Pt;h&&(r=$t(e,1,0,f,l,d,h));let a=Qe()+l,p=a+f;ee(()=>Ae(e,!1,"start")),et(g=>{if(o){if(g>=p)return u(0,1),Ae(e,!1,"end"),--s.r||Y(s.c),!1;if(g>=a){let k=d((g-a)/f);u(1-k,k)}}return o})}return Ye(i)?Dt().then(()=>{i=i(),c()}):c(),{end(l){l&&i.tick&&i.tick(1,0),o&&(r&&qe(e,r),o=!1)}}}function ke(e){e&&e.c()}function re(e,t,n,i){let{fragment:o,on_mount:r,on_destroy:s,after_update:c}=e.$$;o&&o.m(t,n),i||ee(()=>{let l=r.map(Mt).filter(Ye);s?s.push(...l):Y(l),e.$$.on_mount=[]}),c.forEach(ee)}function se(e,t){let n=e.$$;n.fragment!==null&&(Y(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Bt(e,t){e.$$.dirty[0]===-1&&(ze.push(e),Wt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function De(e,t,n,i,o,r,s,c=[-1]){let l=nt;Ie(e);let f=e.$$={fragment:null,ctx:null,props:r,update:L,not_equal:o,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:{},dirty:c,skip_bound:!1,root:t.target||l.$$.root};s&&s(f.root);let d=!1;f.ctx=n?n(e,t.props||{},(u,h,...a)=>{let p=a.length?a[0]:h;return f.ctx&&o(f.ctx[u],f.ctx[u]=p)&&(!f.skip_bound&&f.bound[u]&&f.bound[u](p),d&&Bt(e,u)),h}):[],f.update(),d=!0,Y(f.before_update),f.fragment=i?i(f.ctx):!1,t.target&&(f.fragment&&f.fragment.c(),re(e,t.target,t.anchor,t.customElement),Ct()),Ie(l)}var ie=class{$destroy(){se(this,1),this.$destroy=L}$on(t,n){let i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function it(e){let t=e-1;return t*t*t+1}function V(e,{delay:t=0,duration:n=400,easing:i=it,x:o=0,y:r=0,opacity:s=0}={}){let c=getComputedStyle(e),l=+c.opacity,f=c.transform==="none"?"":c.transform,d=l*(1-s);return{delay:t,duration:n,easing:i,css:(u,h)=>`
@@ -1 +1 @@
1
- import{a as pe,b as me,c as de}from"./chunk-UHJEXTOG.js";import{a as ce}from"./chunk-ZVKOEYH7.js";import{a as T}from"./chunk-GKRWJPI3.js";import{a as se}from"./chunk-67HPC5Y3.js";import{a as oe}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as le}from"./chunk-HHO2NGCF.js";import"./chunk-3YP6ORBR.js";import{a as ae}from"./chunk-LDL3A7NM.js";import"./chunk-FHWKSD5A.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as ne,n as re}from"./chunk-HJXYT6MI.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as te,s as ie}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as G,k as J,m as K,n as Q}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as W,Gc as l,Hc as v,Ic as b,Kc as _,Lc as g,Mb as x,Mc as f,Nc as z,Oc as A,Pc as R,Qc as H,Ra as N,Rc as j,Sc as U,Yb as c,ac as I,ad as E,bd as q,dc as y,ec as D,gc as B,hc as k,ic as t,jc as i,kc as u,oc as V,pa as O,pb as F,rb as o,tc as M,uc as h,ya as m,za as d}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ue=()=>[],he=r=>({"td-cell-hover":r});function _e(r,S){if(r&1&&u(0,"variants-dropdown",31),r&2){let e=h().$implicit;c("variants",e==null?null:e.Variants)}}function ge(r,S){if(r&1&&u(0,"variant-with-image",32),r&2){let e=h().$implicit;c("variant",e==null?null:e.Variants[0])}}function fe(r,S){if(r&1&&(t(0,"span"),l(1),i()),r&2){let e=h().$implicit;o(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(r,S){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),u(3,"img",25),w(4,"channelImage"),t(5,"div",26)(6,"div"),l(7),i(),t(8,"small",27)(9,"span"),l(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),u(15,"order-link",30),i()(),t(16,"small"),l(17),w(18,"date"),i()()(),t(19,"td"),l(20),i(),t(21,"td"),x(22,_e,1,1,"variants-dropdown",31)(23,ge,1,1,"variant-with-image",32),i(),t(24,"td",33),l(25),w(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),l(31),i(),x(32,fe,2,1,"span"),i(),t(33,"small"),l(34),i()()()()),r&2){let e=S.$implicit;o(3),c("src",E(4,14,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(4),v(e.Outlet),o(3),v(e.ChannelName),o(5),c("order",e),o(2),b(" ",q(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),v(e.Customer),o(),I(U(21,he,(e.Variants==null?null:e.Variants.length)>1)),o(),y((e.Variants==null?null:e.Variants.length)>1?22:23),o(3),v(E(26,19,e.Amount)),o(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),o(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Ce(r,S){if(r&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",20),l(7,"Number"),i(),t(8,"th",20),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",21),l(13,"Amount"),i(),t(14,"th",22),l(15,"Shipping"),i()()(),t(16,"tbody"),B(17,Se,35,23,"tr",null,D),i()(),t(19,"app-custom-paginator",23),M("next",function(){m(e);let n=h();return d(n.initShippedOrders())})("previous",function(){m(e);let n=h();return d(n.initShippedOrders())}),i()()}if(r&2){let e=h(),p=R(0);o(17),k(p),o(2),c("filter",e.filter())("totaldata",p==null?null:p.length)}}function ve(r,S){r&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=O(T),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(p=>L(P({},p),{From:e})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275cmp=W({type:r,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","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(p,n){if(p&1){let s=V();z(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return m(s),d(n.initShippedOrders())}),f("textChange",function(a){return m(s),g(n.filter().Number,a)||(n.filter().Number=a),d(a)}),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,"Channel"),i(),t(12,"channel-select-options",4),f("ngModelChange",function(a){return m(s),g(n.filter().ListChannelID,a)||(n.filter().ListChannelID=a),d(a)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(a){return m(s),g(n.filter().From,a)||(n.filter().From=a),d(a)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(a){return m(s),g(n.filter().To,a)||(n.filter().To=a),d(a)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(a){return m(s),g(n.filter().PageNumber,a)||(n.filter().PageNumber=a),d(a)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(a){return m(s),g(n.filter().PageSize,a)||(n.filter().PageSize=a),d(a)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,Ce,20,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=A(E(1,8,n.shippedOrders$)||j(11,ue));o(2),_("text",n.filter().Number),o(10),c("multiple",!0),_("ngModel",n.filter().ListChannelID),o(5),_("date",n.filter().From),o(2),_("date",n.filter().To),o(4),_("ngModel",n.filter().PageNumber),o(4),_("ngModel",n.filter().PageSize),o(5),y(s.length>0?32:33)}},dependencies:[Q,G,K,J,re,ne,oe,ae,ee,X,$,Y,Z,pe,me,de,se,le,ie,te,ce],encapsulation:2})}}return r})();export{He as ShippedComponent};
1
+ import{a as pe,b as me,c as de}from"./chunk-RU43F4UK.js";import{a as ce}from"./chunk-25N6ECN7.js";import{a as T}from"./chunk-BXXJEM76.js";import{a as se}from"./chunk-67HPC5Y3.js";import{a as oe}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as le}from"./chunk-THMNZQLX.js";import"./chunk-C7YK5TDP.js";import"./chunk-ACIMXBIC.js";import{a as ae}from"./chunk-LDL3A7NM.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as ne,n as re}from"./chunk-HJXYT6MI.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as te,s as ie}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as G,k as J,m as K,n as Q}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as W,Gc as l,Hc as v,Ic as b,Kc as _,Lc as g,Mb as x,Mc as f,Nc as z,Oc as A,Pc as R,Qc as H,Ra as N,Rc as j,Sc as U,Yb as c,ac as I,ad as E,bd as q,dc as y,ec as D,gc as B,hc as k,ic as t,jc as i,kc as u,oc as V,pa as O,pb as F,rb as o,tc as M,uc as h,ya as m,za as d}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ue=()=>[],he=r=>({"td-cell-hover":r});function _e(r,S){if(r&1&&u(0,"variants-dropdown",31),r&2){let e=h().$implicit;c("variants",e==null?null:e.Variants)}}function ge(r,S){if(r&1&&u(0,"variant-with-image",32),r&2){let e=h().$implicit;c("variant",e==null?null:e.Variants[0])}}function fe(r,S){if(r&1&&(t(0,"span"),l(1),i()),r&2){let e=h().$implicit;o(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(r,S){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),u(3,"img",25),w(4,"channelImage"),t(5,"div",26)(6,"div"),l(7),i(),t(8,"small",27)(9,"span"),l(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),u(15,"order-link",30),i()(),t(16,"small"),l(17),w(18,"date"),i()()(),t(19,"td"),l(20),i(),t(21,"td"),x(22,_e,1,1,"variants-dropdown",31)(23,ge,1,1,"variant-with-image",32),i(),t(24,"td",33),l(25),w(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),l(31),i(),x(32,fe,2,1,"span"),i(),t(33,"small"),l(34),i()()()()),r&2){let e=S.$implicit;o(3),c("src",E(4,14,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(4),v(e.Outlet),o(3),v(e.ChannelName),o(5),c("order",e),o(2),b(" ",q(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),v(e.Customer),o(),I(U(21,he,(e.Variants==null?null:e.Variants.length)>1)),o(),y((e.Variants==null?null:e.Variants.length)>1?22:23),o(3),v(E(26,19,e.Amount)),o(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),o(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Ce(r,S){if(r&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",20),l(7,"Number"),i(),t(8,"th",20),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",21),l(13,"Amount"),i(),t(14,"th",22),l(15,"Shipping"),i()()(),t(16,"tbody"),B(17,Se,35,23,"tr",null,D),i()(),t(19,"app-custom-paginator",23),M("next",function(){m(e);let n=h();return d(n.initShippedOrders())})("previous",function(){m(e);let n=h();return d(n.initShippedOrders())}),i()()}if(r&2){let e=h(),p=R(0);o(17),k(p),o(2),c("filter",e.filter())("totaldata",p==null?null:p.length)}}function ve(r,S){r&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=O(T),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(p=>L(P({},p),{From:e})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275cmp=W({type:r,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","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(p,n){if(p&1){let s=V();z(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return m(s),d(n.initShippedOrders())}),f("textChange",function(a){return m(s),g(n.filter().Number,a)||(n.filter().Number=a),d(a)}),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,"Channel"),i(),t(12,"channel-select-options",4),f("ngModelChange",function(a){return m(s),g(n.filter().ListChannelID,a)||(n.filter().ListChannelID=a),d(a)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(a){return m(s),g(n.filter().From,a)||(n.filter().From=a),d(a)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(a){return m(s),g(n.filter().To,a)||(n.filter().To=a),d(a)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(a){return m(s),g(n.filter().PageNumber,a)||(n.filter().PageNumber=a),d(a)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(a){return m(s),g(n.filter().PageSize,a)||(n.filter().PageSize=a),d(a)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,Ce,20,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=A(E(1,8,n.shippedOrders$)||j(11,ue));o(2),_("text",n.filter().Number),o(10),c("multiple",!0),_("ngModel",n.filter().ListChannelID),o(5),_("date",n.filter().From),o(2),_("date",n.filter().To),o(4),_("ngModel",n.filter().PageNumber),o(4),_("ngModel",n.filter().PageSize),o(5),y(s.length>0?32:33)}},dependencies:[Q,G,K,J,re,ne,oe,ae,ee,X,$,Y,Z,pe,me,de,se,le,ie,te,ce],encapsulation:2})}}return r})();export{He as ShippedComponent};
@@ -1,4 +1,4 @@
1
- import{b as d}from"./chunk-WN5DZGA4.js";import{c}from"./chunk-PW42BQIY.js";import{ja as h,pa as f}from"./chunk-OJMQBH6T.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
1
+ import{b as d}from"./chunk-WN5DZGA4.js";import{c}from"./chunk-RXQX7567.js";import{ja as h,pa as f}from"./chunk-OJMQBH6T.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
2
2
  <div>
3
3
  Product ${n.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${t.Channel}
4
4
  </div>