marketplacepos 5.43.13 → 5.44.1

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 (131) hide show
  1. package/Marketplace/3rdpartylicenses.txt +41 -41
  2. package/Marketplace/{chunk-YSJSAVBS.js → chunk-2ODVHD2K.js} +1 -1
  3. package/Marketplace/{chunk-PXYBLGMN.js → chunk-2SCXTEPT.js} +1 -1
  4. package/Marketplace/{chunk-NEYMDA6P.js → chunk-2XV6YOOU.js} +1 -1
  5. package/Marketplace/{chunk-DRHWRRQV.js → chunk-35XX6SQT.js} +1 -1
  6. package/Marketplace/{chunk-5BSS4CVK.js → chunk-3OIE7ARG.js} +1 -1
  7. package/Marketplace/chunk-3ONIF6WO.js +1 -0
  8. package/Marketplace/chunk-4JS5MYC3.js +1 -0
  9. package/Marketplace/{chunk-ZUEJZI4O.js → chunk-4KKT6FMN.js} +1 -1
  10. package/Marketplace/{chunk-CRUPQQ56.js → chunk-4WI2DOJ7.js} +1 -1
  11. package/Marketplace/{chunk-Z7LBV3BO.js → chunk-57UYCHCW.js} +1 -1
  12. package/Marketplace/{chunk-G2YN5S5X.js → chunk-5JQJRPL3.js} +1 -1
  13. package/Marketplace/chunk-5TKBTQTA.js +2 -0
  14. package/Marketplace/{chunk-2IDDYNBR.js → chunk-6BIM4KEI.js} +1 -1
  15. package/Marketplace/{chunk-LROLRGKE.js → chunk-6INFVQEU.js} +11 -11
  16. package/Marketplace/{chunk-ALSCWTAY.js → chunk-6IYLH3EV.js} +1 -1
  17. package/Marketplace/{chunk-722SRHLY.js → chunk-6RKA4STM.js} +1 -1
  18. package/Marketplace/{chunk-XBUZ27V4.js → chunk-6ZVBRMK4.js} +1 -1
  19. package/Marketplace/{chunk-QWHPQWPM.js → chunk-77JJJNRM.js} +1 -1
  20. package/Marketplace/chunk-7PSP3KRN.js +1 -0
  21. package/Marketplace/{chunk-E6U3KRK7.js → chunk-7T2AVFH5.js} +1 -1
  22. package/Marketplace/{chunk-SRVGUGY2.js → chunk-AO46RPZ4.js} +1 -1
  23. package/Marketplace/chunk-B5BDARIM.js +1 -0
  24. package/Marketplace/{chunk-6FY74YFQ.js → chunk-B5V5KFQU.js} +1 -1
  25. package/Marketplace/{chunk-6BAZYVHI.js → chunk-BOGJ2QV5.js} +2 -2
  26. package/Marketplace/{chunk-WIAQQWWF.js → chunk-BU5LUO3S.js} +1 -1
  27. package/Marketplace/{chunk-YD5TUVFF.js → chunk-C5JZPXEW.js} +1 -1
  28. package/Marketplace/{chunk-3B2PNJWF.js → chunk-CCWNSX4Y.js} +1 -1
  29. package/Marketplace/{chunk-6W6DKFRE.js → chunk-CIAZIJGR.js} +3 -3
  30. package/Marketplace/{chunk-N3P55TG2.js → chunk-CSP6M3TO.js} +1 -1
  31. package/Marketplace/{chunk-J2KWRDVH.js → chunk-CUB2QFUO.js} +1 -1
  32. package/Marketplace/{chunk-WPW3D4MQ.js → chunk-D6URDVES.js} +1 -1
  33. package/Marketplace/{chunk-C3HL4S2R.js → chunk-DAVYBR3Z.js} +1 -1
  34. package/Marketplace/chunk-DHOJLUJI.js +1 -0
  35. package/Marketplace/{chunk-O5LFGGB2.js → chunk-DL66NZ2A.js} +1 -1
  36. package/Marketplace/{chunk-CUEO37N7.js → chunk-DRTTCT2P.js} +1 -1
  37. package/Marketplace/chunk-E2SXYIML.js +2 -0
  38. package/Marketplace/{chunk-L7K5HOBY.js → chunk-E4KNET2R.js} +1 -1
  39. package/Marketplace/{chunk-7ZXNQAAU.js → chunk-E4Z7OR75.js} +2 -2
  40. package/Marketplace/{chunk-2GSWEJRP.js → chunk-E66C2WAS.js} +1 -1
  41. package/Marketplace/{chunk-EZY2ATQQ.js → chunk-EGFBMQKW.js} +1 -1
  42. package/Marketplace/{chunk-AG2REZBE.js → chunk-EJG33GYS.js} +8 -8
  43. package/Marketplace/{chunk-B73M3AMU.js → chunk-EQIFZBRG.js} +1 -1
  44. package/Marketplace/{chunk-AJJSLBE3.js → chunk-ETOKAGEB.js} +2 -2
  45. package/Marketplace/{chunk-624I4PEE.js → chunk-EWYAB244.js} +1 -1
  46. package/Marketplace/{chunk-LOBNKJGT.js → chunk-F63CEOOT.js} +1 -1
  47. package/Marketplace/{chunk-TCS2Y6CC.js → chunk-F7QBIR6G.js} +1 -1
  48. package/Marketplace/chunk-G6VH553U.js +1 -0
  49. package/Marketplace/{chunk-7UHCDGAA.js → chunk-G7R7LUW4.js} +1 -1
  50. package/Marketplace/{chunk-2EOAYJGX.js → chunk-GCDQNJQN.js} +1 -1
  51. package/Marketplace/{chunk-G47XGOST.js → chunk-GIRXMYNI.js} +1 -1
  52. package/Marketplace/chunk-HFKZOM4I.js +1 -0
  53. package/Marketplace/chunk-I6VSPSNT.js +1 -0
  54. package/Marketplace/{chunk-YCH6HHU3.js → chunk-IHNN4Q2N.js} +3 -3
  55. package/Marketplace/{chunk-H3J5OAIG.js → chunk-IIZDEGGW.js} +2 -2
  56. package/Marketplace/{chunk-J7AN3ZQL.js → chunk-IM4DS3UA.js} +1 -1
  57. package/Marketplace/{chunk-7PN4XLNE.js → chunk-IMK2JGZA.js} +1 -1
  58. package/Marketplace/chunk-J5OHT4GM.js +1 -0
  59. package/Marketplace/{chunk-GH57P6KF.js → chunk-JPYSXZZO.js} +1 -1
  60. package/Marketplace/{chunk-6G5WVJGA.js → chunk-JUL73DOX.js} +1 -1
  61. package/Marketplace/{chunk-MHCAI6KP.js → chunk-K5GEJ2GZ.js} +1 -1
  62. package/Marketplace/{chunk-2TRFYYCP.js → chunk-K5VFEHP7.js} +1 -1
  63. package/Marketplace/chunk-K77RTNG2.js +1 -0
  64. package/Marketplace/{chunk-3TDK2RMH.js → chunk-K7ZFPSOU.js} +1 -1
  65. package/Marketplace/{chunk-7SVF5UPT.js → chunk-KALG6D6L.js} +1 -1
  66. package/Marketplace/chunk-KAQL5LN5.js +1 -0
  67. package/Marketplace/{chunk-OPXWL5G6.js → chunk-KIIVJXDR.js} +1 -1
  68. package/Marketplace/{chunk-5HO2IJ47.js → chunk-KMJM6UVY.js} +1 -1
  69. package/Marketplace/{chunk-G2CMMGM2.js → chunk-KWX3WSCT.js} +1 -1
  70. package/Marketplace/{chunk-M5JQ7BGW.js → chunk-L3FX4O3H.js} +6 -6
  71. package/Marketplace/{chunk-CROPN4YC.js → chunk-LDHQNVI5.js} +1 -1
  72. package/Marketplace/{chunk-3BT5DR3X.js → chunk-MH4SJTQX.js} +1 -1
  73. package/Marketplace/chunk-MS3ZBCON.js +157 -0
  74. package/Marketplace/chunk-MSQ7Z3W2.js +1 -0
  75. package/Marketplace/{chunk-U7TVLBC5.js → chunk-NOP5P5R5.js} +1 -1
  76. package/Marketplace/chunk-NXI7PMGL.js +1 -0
  77. package/Marketplace/{chunk-EOZ2J2CF.js → chunk-NZUPRMOX.js} +1 -1
  78. package/Marketplace/chunk-OA5PCIIS.js +1 -0
  79. package/Marketplace/{chunk-RZU7PSKG.js → chunk-OPFENZ3W.js} +1 -1
  80. package/Marketplace/chunk-OPYO4NH2.js +5 -0
  81. package/Marketplace/{chunk-MMVLDCF6.js → chunk-OTDC2LYA.js} +1 -1
  82. package/Marketplace/{chunk-3NMM37H7.js → chunk-P7NATRFC.js} +1 -1
  83. package/Marketplace/{chunk-JDIBETL5.js → chunk-PNITO7BE.js} +1 -1
  84. package/Marketplace/{chunk-WHG5PPSE.js → chunk-QIALMLQK.js} +1 -1
  85. package/Marketplace/{chunk-PFB7XEYZ.js → chunk-QJJ2WFVX.js} +1 -1
  86. package/Marketplace/{chunk-4JKDNUTX.js → chunk-RZZKFTCX.js} +1 -1
  87. package/Marketplace/{chunk-WS4A4RPE.js → chunk-SBZNADRN.js} +1 -1
  88. package/Marketplace/{chunk-GMVNN57A.js → chunk-SDVWA7KM.js} +1 -1
  89. package/Marketplace/{chunk-IVHM5DMM.js → chunk-SJU6ZU2K.js} +1 -1
  90. package/Marketplace/{chunk-VKMFDXJJ.js → chunk-SLI26GUH.js} +1 -1
  91. package/Marketplace/{chunk-JILE74BG.js → chunk-UBXKO4QI.js} +1 -1
  92. package/Marketplace/{chunk-CLER2MX6.js → chunk-UGVEAL7H.js} +3 -3
  93. package/Marketplace/{chunk-2OVYEC6Q.js → chunk-V2SXQQLG.js} +1 -1
  94. package/Marketplace/{chunk-POR3OF22.js → chunk-VWNEJWLI.js} +1 -1
  95. package/Marketplace/{chunk-E6XWD6WX.js → chunk-W6FZQ6XT.js} +1 -1
  96. package/Marketplace/{chunk-2YFZS6SG.js → chunk-WHDFRUFN.js} +1 -1
  97. package/Marketplace/chunk-WMYSG6O7.js +1 -0
  98. package/Marketplace/chunk-WVQIS27J.js +1 -0
  99. package/Marketplace/chunk-XHYJOIC5.js +3 -0
  100. package/Marketplace/chunk-XMIUIAY2.js +1 -0
  101. package/Marketplace/chunk-Y42GRQNF.js +1 -0
  102. package/Marketplace/chunk-YERZ6W22.js +1 -0
  103. package/Marketplace/{chunk-BFU7VKO3.js → chunk-YM4TJJMM.js} +1 -1
  104. package/Marketplace/{chunk-CIIO2CJ6.js → chunk-YPWHTELF.js} +1 -1
  105. package/Marketplace/{chunk-6NHTTVBK.js → chunk-YXGO35YT.js} +1 -1
  106. package/Marketplace/{chunk-OLCFJJOD.js → chunk-YZLHRAEO.js} +1 -1
  107. package/Marketplace/{chunk-DYWTLXMP.js → chunk-Z5GRNGHJ.js} +1 -1
  108. package/Marketplace/{chunk-QQXVBN22.js → chunk-Z5OLAUH6.js} +1 -1
  109. package/Marketplace/{chunk-L64EL5OU.js → chunk-ZQ5EGXEB.js} +2 -2
  110. package/Marketplace/chunk-ZXQNMGQG.js +1 -0
  111. package/Marketplace/index.html +3 -3
  112. package/Marketplace/{main-2SUNMEPM.js → main-AS37EDUH.js} +1 -1
  113. package/package.json +1 -1
  114. package/Marketplace/chunk-4B4NNOKK.js +0 -1
  115. package/Marketplace/chunk-56IX4GTG.js +0 -1
  116. package/Marketplace/chunk-67N4UGA5.js +0 -2
  117. package/Marketplace/chunk-7AQ244V7.js +0 -5
  118. package/Marketplace/chunk-DRMAONR7.js +0 -1
  119. package/Marketplace/chunk-GSZJGR7K.js +0 -2
  120. package/Marketplace/chunk-GVL2YXE5.js +0 -1
  121. package/Marketplace/chunk-HLOBDI4F.js +0 -2
  122. package/Marketplace/chunk-I7FTVK26.js +0 -1
  123. package/Marketplace/chunk-IRLIWSK5.js +0 -1
  124. package/Marketplace/chunk-MY5ZX6JG.js +0 -1
  125. package/Marketplace/chunk-OOCYP2XG.js +0 -1
  126. package/Marketplace/chunk-Q3MVAL6O.js +0 -1
  127. package/Marketplace/chunk-QINGXOOA.js +0 -1
  128. package/Marketplace/chunk-SMUCMLEE.js +0 -1
  129. package/Marketplace/chunk-UG7VRDLB.js +0 -3
  130. package/Marketplace/chunk-V2RVHNCX.js +0 -1
  131. package/Marketplace/chunk-ZWBTWIGY.js +0 -1
@@ -30,32 +30,6 @@ Package: @dealpos-npm/ng-dealpos-library
30
30
  License: "ISC"
31
31
 
32
32
 
33
- --------------------------------------------------------------------------------
34
- Package: @angular/cdk
35
- License: "MIT"
36
-
37
- The MIT License
38
-
39
- Copyright (c) 2025 Google LLC.
40
-
41
- Permission is hereby granted, free of charge, to any person obtaining a copy
42
- of this software and associated documentation files (the "Software"), to deal
43
- in the Software without restriction, including without limitation the rights
44
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
45
- copies of the Software, and to permit persons to whom the Software is
46
- furnished to do so, subject to the following conditions:
47
-
48
- The above copyright notice and this permission notice shall be included in
49
- all copies or substantial portions of the Software.
50
-
51
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
54
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
56
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
57
- THE SOFTWARE.
58
-
59
33
  --------------------------------------------------------------------------------
60
34
  Package: primeng
61
35
  License: "SEE LICENSE IN LICENSE.md"
@@ -138,6 +112,32 @@ The term “Software” includes all source and object code, in whole and/or par
138
112
  9. **Indemnification:** Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for any lawsuit brought against it in regards to Licensee’s use of The Software in means that violate, breach or otherwise circumvent this license, Licensor's intellectual property rights or Licensor's title in The Software. Licensor shall promptly notify Licensee in case of such legal action and request Licensee’s consent prior to any settlement in relation to such lawsuit or claim.
139
113
  10. **Governing Law, Jurisdiction:** Licensee hereby agrees not to initiate class-action lawsuits against Licensor in relation to this license and to compensate Licensor for any legal fees, cost or attorney fees should any claim brought by Licensee against Licensor be denied, in part or in full.
140
114
 
115
+ --------------------------------------------------------------------------------
116
+ Package: @angular/cdk
117
+ License: "MIT"
118
+
119
+ The MIT License
120
+
121
+ Copyright (c) 2025 Google LLC.
122
+
123
+ Permission is hereby granted, free of charge, to any person obtaining a copy
124
+ of this software and associated documentation files (the "Software"), to deal
125
+ in the Software without restriction, including without limitation the rights
126
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
127
+ copies of the Software, and to permit persons to whom the Software is
128
+ furnished to do so, subject to the following conditions:
129
+
130
+ The above copyright notice and this permission notice shall be included in
131
+ all copies or substantial portions of the Software.
132
+
133
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
134
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
135
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
136
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
137
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
138
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
139
+ THE SOFTWARE.
140
+
141
141
  --------------------------------------------------------------------------------
142
142
  Package: moment
143
143
  License: "MIT"
@@ -471,6 +471,11 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
471
471
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
472
472
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
473
473
 
474
+ --------------------------------------------------------------------------------
475
+ Package: @microsoft/signalr
476
+ License: "MIT"
477
+
478
+
474
479
  --------------------------------------------------------------------------------
475
480
  Package: firebase
476
481
  License: "Apache-2.0"
@@ -555,21 +560,6 @@ Package: @firebase/auth-compat
555
560
  License: "Apache-2.0"
556
561
 
557
562
 
558
- --------------------------------------------------------------------------------
559
- Package: @ng-select/ng-select
560
- License: "MIT"
561
-
562
-
563
- --------------------------------------------------------------------------------
564
- Package: ngx-permissions
565
- License: "MIT"
566
-
567
-
568
- --------------------------------------------------------------------------------
569
- Package: @microsoft/signalr
570
- License: "MIT"
571
-
572
-
573
563
  --------------------------------------------------------------------------------
574
564
  Package: ngx-toastr
575
565
  License: "MIT"
@@ -596,6 +586,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
596
586
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
597
587
  SOFTWARE.
598
588
 
589
+ --------------------------------------------------------------------------------
590
+ Package: @ng-select/ng-select
591
+ License: "MIT"
592
+
593
+
599
594
  --------------------------------------------------------------------------------
600
595
  Package: @angular/forms
601
596
  License: "MIT"
@@ -648,6 +643,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
648
643
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
649
644
  THE SOFTWARE.
650
645
 
646
+ --------------------------------------------------------------------------------
647
+ Package: ngx-permissions
648
+ License: "MIT"
649
+
650
+
651
651
  --------------------------------------------------------------------------------
652
652
  Package: @angular/common
653
653
  License: "MIT"
@@ -1,2 +1,2 @@
1
- import{a as de}from"./chunk-O5LFGGB2.js";import{a as Z,b,c as ee,d as V,f as ae,g as ne,h as Y,i as re,j as oe,o as u}from"./chunk-M5JQ7BGW.js";import{b as ie,d as S}from"./chunk-L7K5HOBY.js";import{a as te,b as H}from"./chunk-H3J5OAIG.js";import{a as x}from"./chunk-J2KWRDVH.js";import{a as Q,b as W,f as X}from"./chunk-7SVF5UPT.js";import{a as K}from"./chunk-ACIMXBIC.js";import{g as I,j as J,n as T}from"./chunk-M2FCTYGU.js";import{$c as U,Fc as M,Gb as D,Gc as N,Hc as R,Ka as L,Mb as g,Qc as w,Xb as P,Yb as o,Zb as v,ad as q,ca as F,f as B,g as E,ic as d,ja as O,jc as s,jd as G,kc as C,lc as j,mc as $,oc as k,rb as r,tc as f,uc as y,xa as A,xb as p,xc as z,ya as l,za as c}from"./chunk-B7KTCPKC.js";var ce=["class","component ts"];function pe(a,_){if(a&1){let e=k();d(0,"button",3),f("click",function(){l(e);let i=y(2);return c(i.todayClicked())}),C(1,"i",4),s()}}function se(a,_){if(a&1){let e=k();d(0,"button",5),f("click",function(){l(e);let i=y(2);return c(i.clearClicked())}),C(1,"i",6),s()}}function me(a,_){if(a&1&&(j(0),g(1,pe,2,0,"button",1)(2,se,2,0,"button",2),$()),a&2){let e=_.ngIf;r(),o("ngIf",!e.hideBtnToday),r(),o("ngIf",!e.hideBtnClear)}}function fe(a,_){if(a&1&&(d(0,"mat-label")(1,"span"),N(2),s()()),a&2){let e=y();r(2),R(e.placeholder)}}var le=(()=>{class a{constructor(){this._calendarHeaderConfig=new E({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=O({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})(),ue=(()=>{class a{constructor(e,t,i,n,m){this._datePicker=e,this._calendar=t,this._dateAdapter=i,this.calendarService=n,this._destroyed=new B,t.stateChanges.pipe(F(this._destroyed)).subscribe(h=>m.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(t){return new(t||a)(p(Y),p(ne),p(b),p(le),p(G))}}static{this.\u0275cmp=D({type:a,selectors:[["POS-DatepickerHeader",8,"component","ts"]],features:[w([u]),A],attrs:ce,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,i){t&1&&(d(0,"mat-calendar-header"),g(1,me,3,2,"ng-container",0),U(2,"async"),s()),t&2&&(r(),o("ngIf",q(2,1,i.calendarConfig$)))},dependencies:[T,I,J,S,ie,V,u,ae,x,H],encapsulation:2})}}return a})(),_e={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Le=(()=>{class a{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let t=null;e&&(t=e.toDate(),t?.setHours(0,0,0,0)),this.dateChange.emit(t)}constructor(e){this.calendarService=e,this.headerComponent=ue,this.data_cy="",this.placeholder="",this.appearance="outline",this.width="",this.isFloatingLabel=!0,this.date="",this.disabled=!1,this.readOnly=!1,this.dateChange=new L,this.minDate=K.MinDate,this.displayToggle=!0}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(t){return new(t||a)(p(le))}}static{this.\u0275cmp=D({type:a,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},features:[w([{provide:b,useClass:de,deps:[Z]},{provide:ee,useValue:_e},u])],decls:6,vars:16,consts:[["picker1",""],[1,"datepicker",3,"appearance"],[4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,i){if(t&1){let n=k();d(0,"mat-form-field",1),g(1,fe,3,1,"mat-label",2),d(2,"input",3),f("dateChange",function(h){return l(n),c(i.change(h.value))})("click",function(){l(n);let h=M(5);return c(h.open())}),s(),C(3,"mat-datepicker-toggle",4),d(4,"mat-datepicker",5,0),f("opened",function(){return l(n),c(i.onOpenDatepicker())})("closed",function(){return l(n),c(i.onCloseDatepicker())}),s()()}if(t&2){let n=M(5);v("width",i.width||100,"%"),o("appearance",i.appearance),r(),o("ngIf",i.isFloatingLabel&&i.placeholder),r(),z("placeholder",i.placeholder||""),o("matDatepicker",n)("min",i.minDateValidation)("max",i.maxDateValidation)("value",i.date==i.minDate?null:i.date)("disabled",i.disabled)("readonly",i.readOnly),P("data-cy",i.data_cy),r(),v("display",i.displayToggle?"unset":"none"),o("for",n),r(),o("calendarHeaderComponent",i.headerComponent)}},dependencies:[T,I,S,V,u,Y,re,oe,x,X,Q,W,H,te],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:33px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}
1
+ import{a as de}from"./chunk-DL66NZ2A.js";import{a as Z,b,c as ee,d as V,f as ae,g as ne,h as Y,i as re,j as oe,o as u}from"./chunk-L3FX4O3H.js";import{b as ie,d as S}from"./chunk-E4KNET2R.js";import{a as te,b as H}from"./chunk-IIZDEGGW.js";import{a as x}from"./chunk-CUB2QFUO.js";import{a as Q,b as W,f as X}from"./chunk-KALG6D6L.js";import{a as K}from"./chunk-ACIMXBIC.js";import{g as I,j as J,n as T}from"./chunk-M2FCTYGU.js";import{$c as U,Fc as M,Gb as D,Gc as N,Hc as R,Ka as L,Mb as g,Qc as w,Xb as P,Yb as o,Zb as v,ad as q,ca as F,f as B,g as E,ic as d,ja as O,jc as s,jd as G,kc as C,lc as j,mc as $,oc as k,rb as r,tc as f,uc as y,xa as A,xb as p,xc as z,ya as l,za as c}from"./chunk-B7KTCPKC.js";var ce=["class","component ts"];function pe(a,_){if(a&1){let e=k();d(0,"button",3),f("click",function(){l(e);let i=y(2);return c(i.todayClicked())}),C(1,"i",4),s()}}function se(a,_){if(a&1){let e=k();d(0,"button",5),f("click",function(){l(e);let i=y(2);return c(i.clearClicked())}),C(1,"i",6),s()}}function me(a,_){if(a&1&&(j(0),g(1,pe,2,0,"button",1)(2,se,2,0,"button",2),$()),a&2){let e=_.ngIf;r(),o("ngIf",!e.hideBtnToday),r(),o("ngIf",!e.hideBtnClear)}}function fe(a,_){if(a&1&&(d(0,"mat-label")(1,"span"),N(2),s()()),a&2){let e=y();r(2),R(e.placeholder)}}var le=(()=>{class a{constructor(){this._calendarHeaderConfig=new E({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=O({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})(),ue=(()=>{class a{constructor(e,t,i,n,m){this._datePicker=e,this._calendar=t,this._dateAdapter=i,this.calendarService=n,this._destroyed=new B,t.stateChanges.pipe(F(this._destroyed)).subscribe(h=>m.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(t){return new(t||a)(p(Y),p(ne),p(b),p(le),p(G))}}static{this.\u0275cmp=D({type:a,selectors:[["POS-DatepickerHeader",8,"component","ts"]],features:[w([u]),A],attrs:ce,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,i){t&1&&(d(0,"mat-calendar-header"),g(1,me,3,2,"ng-container",0),U(2,"async"),s()),t&2&&(r(),o("ngIf",q(2,1,i.calendarConfig$)))},dependencies:[T,I,J,S,ie,V,u,ae,x,H],encapsulation:2})}}return a})(),_e={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Le=(()=>{class a{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let t=null;e&&(t=e.toDate(),t?.setHours(0,0,0,0)),this.dateChange.emit(t)}constructor(e){this.calendarService=e,this.headerComponent=ue,this.data_cy="",this.placeholder="",this.appearance="outline",this.width="",this.isFloatingLabel=!0,this.date="",this.disabled=!1,this.readOnly=!1,this.dateChange=new L,this.minDate=K.MinDate,this.displayToggle=!0}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(t){return new(t||a)(p(le))}}static{this.\u0275cmp=D({type:a,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},features:[w([{provide:b,useClass:de,deps:[Z]},{provide:ee,useValue:_e},u])],decls:6,vars:16,consts:[["picker1",""],[1,"datepicker",3,"appearance"],[4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,i){if(t&1){let n=k();d(0,"mat-form-field",1),g(1,fe,3,1,"mat-label",2),d(2,"input",3),f("dateChange",function(h){return l(n),c(i.change(h.value))})("click",function(){l(n);let h=M(5);return c(h.open())}),s(),C(3,"mat-datepicker-toggle",4),d(4,"mat-datepicker",5,0),f("opened",function(){return l(n),c(i.onOpenDatepicker())})("closed",function(){return l(n),c(i.onCloseDatepicker())}),s()()}if(t&2){let n=M(5);v("width",i.width||100,"%"),o("appearance",i.appearance),r(),o("ngIf",i.isFloatingLabel&&i.placeholder),r(),z("placeholder",i.placeholder||""),o("matDatepicker",n)("min",i.minDateValidation)("max",i.maxDateValidation)("value",i.date==i.minDate?null:i.date)("disabled",i.disabled)("readonly",i.readOnly),P("data-cy",i.data_cy),r(),v("display",i.displayToggle?"unset":"none"),o("for",n),r(),o("calendarHeaderComponent",i.headerComponent)}},dependencies:[T,I,S,V,u,Y,re,oe,x,X,Q,W,H,te],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:33px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}
2
2
  `],encapsulation:2})}}return a})();export{Le as a};
@@ -1 +1 @@
1
- import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-WIAQQWWF.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-56IX4GTG.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-4B4NNOKK.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-OOCYP2XG.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-SMUCMLEE.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-MY5ZX6JG.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-ZWBTWIGY.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-C3HL4S2R.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-6G5WVJGA.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
1
+ import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-BU5LUO3S.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-4JS5MYC3.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-3ONIF6WO.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-7PSP3KRN.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-MSQ7Z3W2.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-DHOJLUJI.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-B5BDARIM.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-DAVYBR3Z.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-JUL73DOX.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
@@ -1 +1 @@
1
- import{a as _}from"./chunk-YSJSAVBS.js";import"./chunk-O5LFGGB2.js";import"./chunk-M5JQ7BGW.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-5OHRA4AS.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import{a as R}from"./chunk-G2CMMGM2.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as ue,b as ye}from"./chunk-7PN4XLNE.js";import"./chunk-CMTBBXR5.js";import"./chunk-UG7VRDLB.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{c as d}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as he}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as w,n as ge}from"./chunk-CLER2MX6.js";import{A as fe}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-M2FCTYGU.js";import{$c as k,Gb as T,Gc as p,Hb as Z,Hc as j,Ic as J,Kc as y,Lc as g,Mb as h,Mc as C,Oa as V,Rc as re,Wc as oe,Yb as m,Z as Q,ac as $,ad as B,dc as H,ea as z,ec as ee,gc as te,hc as ie,ic as r,ja as q,jc as a,ka as X,kc as v,nc as ne,oa as Y,pb as G,rb as l,rd as U,tc as b,uc as u,xb as f,xc as K}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ue,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ye,fe,ge,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
1
+ import{a as _}from"./chunk-2ODVHD2K.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import{a as R}from"./chunk-KWX3WSCT.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as ue,b as ye}from"./chunk-IMK2JGZA.js";import"./chunk-CMTBBXR5.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-KMJM6UVY.js";import{e as he}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{c as d}from"./chunk-PW42BQIY.js";import{m as w,n as ge}from"./chunk-UGVEAL7H.js";import{A as fe}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-M2FCTYGU.js";import{$c as k,Gb as T,Gc as p,Hb as Z,Hc as j,Ic as J,Kc as y,Lc as g,Mb as h,Mc as C,Oa as V,Rc as re,Wc as oe,Yb as m,Z as Q,ac as $,ad as B,dc as H,ea as z,ec as ee,gc as te,hc as ie,ic as r,ja as q,jc as a,ka as X,kc as v,nc as ne,oa as Y,pb as G,rb as l,rd as U,tc as b,uc as u,xb as f,xc as K}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ue,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ye,fe,ge,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
@@ -1,4 +1,4 @@
1
- import{c}from"./chunk-PW42BQIY.js";import{b as d}from"./chunk-JXSBFTQM.js";import{ja as h,pa as f}from"./chunk-B7KTCPKC.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-JXSBFTQM.js";import{c}from"./chunk-PW42BQIY.js";import{ja as h,pa as f}from"./chunk-B7KTCPKC.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>
@@ -1 +1 @@
1
- import{a as bt}from"./chunk-M5XGP4SG.js";import{b as xt}from"./chunk-H3J5OAIG.js";import{a as Ct}from"./chunk-J2KWRDVH.js";import{a as rt}from"./chunk-UMP6ZMEJ.js";import{b as lt}from"./chunk-PW42BQIY.js";import{a as mt,c as ct}from"./chunk-SWQXSJ7O.js";import{e as st}from"./chunk-JXSBFTQM.js";import{b as ut,c as gt,h as ht,j as ft,k as _t}from"./chunk-CLER2MX6.js";import{A as at,c as it,h as nt,m as ot}from"./chunk-6QYD6NIJ.js";import{r as pt,s as dt}from"./chunk-YCH6HHU3.js";import{g as V,i as et,m as L,n as R}from"./chunk-M2FCTYGU.js";import{$c as I,Fc as S,G as U,Gb as M,Gc as m,Hc as w,Ic as k,Jb as K,K as G,Ka as D,Kc as X,Lc as Z,Mb as u,Mc as tt,Oa as h,Ra as _,X as z,Yb as g,Z as J,ad as y,ca as W,cd as $,dc as P,ea as O,f as j,fa as Y,g as A,ic as r,ja as H,jc as l,kc as B,lc as T,mc as v,nc as Q,oa as q,oc as f,rb as a,rd as N,tc as C,uc as s,v as b,xb as E,ya as p,za as d}from"./chunk-B7KTCPKC.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.PriceUpdate).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new ft,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(ut),E(gt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ht,Ct,xt,bt,_t,at,it,nt,ot,ct,dt,pt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),U(t=>t!=null),G(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
1
+ import{a as bt}from"./chunk-M5XGP4SG.js";import{b as xt}from"./chunk-IIZDEGGW.js";import{a as Ct}from"./chunk-CUB2QFUO.js";import{a as rt}from"./chunk-UMP6ZMEJ.js";import{e as st}from"./chunk-JXSBFTQM.js";import{b as lt}from"./chunk-PW42BQIY.js";import{b as pt,c as dt,h as ut,j as gt,k as ht}from"./chunk-UGVEAL7H.js";import{A as at,c as it,h as nt,m as ot}from"./chunk-6QYD6NIJ.js";import{a as mt,c as ct}from"./chunk-SWQXSJ7O.js";import{r as ft,s as _t}from"./chunk-IHNN4Q2N.js";import{g as V,i as et,m as L,n as R}from"./chunk-M2FCTYGU.js";import{$c as I,Fc as S,G as U,Gb as M,Gc as m,Hc as w,Ic as k,Jb as K,K as G,Ka as D,Kc as X,Lc as Z,Mb as u,Mc as tt,Oa as h,Ra as _,X as z,Yb as g,Z as J,ad as y,ca as W,cd as $,dc as P,ea as O,f as j,fa as Y,g as A,ic as r,ja as H,jc as l,kc as B,lc as T,mc as v,nc as Q,oa as q,oc as f,rb as a,rd as N,tc as C,uc as s,v as b,xb as E,ya as p,za as d}from"./chunk-B7KTCPKC.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.PriceUpdate).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new gt,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(pt),E(dt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ut,Ct,xt,bt,ht,at,it,nt,ot,ct,_t,ft],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),U(t=>t!=null),G(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
@@ -0,0 +1 @@
1
+ import{a as ue}from"./chunk-6RKA4STM.js";import{a as ge,b as _e,c as Ce}from"./chunk-V5BKQSAT.js";import{a as fe,b as P}from"./chunk-K77RTNG2.js";import{a as se}from"./chunk-2ODVHD2K.js";import{a as de}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-YM4TJJMM.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as ce}from"./chunk-NOP5P5R5.js";import{a as me}from"./chunk-D6URDVES.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-KMJM6UVY.js";import{b as oe}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import{b as g}from"./chunk-PW42BQIY.js";import{m as le,n as pe}from"./chunk-UGVEAL7H.js";import{A as ne,c as $,h as ee,m as te,o as ie}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as re,s as ae}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Q,k as X,m as Y,n as Z}from"./chunk-M2FCTYGU.js";import{$c as T,Gb as O,Gc as l,Hc as x,Ic as V,Kc as f,Lc as h,Mb as v,Mc as S,Nc as H,Oc as U,Pc as q,Qc as G,Ra as D,Sc as J,Yb as C,Z as I,ac as B,ad as M,bd as K,dc as y,ec as z,gc as R,hc as j,ic as t,ja as F,jc as i,kc as u,oc as L,pa as b,pb as W,rb as a,tc as E,uc as s,ya as d,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as k,b as N}from"./chunk-66YHNWRR.js";var A=(()=>{class n{constructor(){this.shippingLabelService=b(ue),this.toastrService=b(oe)}printShippingLabel(e){switch(e?.MarketType){case g.Shopee:this.shippingLabelService.printShippingLabelShopee(e.Number,e.ShopID);break;case g.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e.Number,e.ShopID);break;case g.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e.Number);break;case g.Lazada:this.shippingLabelService.printShippingLabelLazada(e.Number,e.ShopID);break;case g.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=F({token:n,factory:n.\u0275fac})}}return n})();var Se=n=>({"td-cell-hover":n});function we(n,_){if(n&1&&u(0,"variants-dropdown",30),n&2){let e=s().$implicit;C("variants",e==null?null:e.Variants)}}function be(n,_){if(n&1&&u(0,"variant-with-image",31),n&2){let e=s().$implicit;C("variant",e==null?null:e.Variants[0])}}function ve(n,_){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=s().$implicit;a(),V("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ye(n,_){if(n&1){let e=L();t(0,"button",35),E("click",function(){d(e);let o=s().$implicit,m=s(2);return c(m.onPrintShippingLabel(o))}),u(1,"i",36),i()}}function xe(n,_){if(n&1&&(t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",26)(5,"div",27)(6,"div"),u(7,"img",28),T(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",29),i()(),t(11,"small"),l(12),T(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),v(17,we,1,1,"variants-dropdown",30)(18,be,1,1,"variant-with-image",31),i(),t(19,"td",32),l(20),T(21,"number"),i(),t(22,"td")(23,"div",26)(24,"div",27)(25,"span"),l(26),i(),v(27,ve,2,1,"span"),i(),t(28,"small"),l(29),i()()(),t(30,"td",33),v(31,ye,2,0,"button",34),i()()),n&2){let e=_.$implicit,p=s(2);a(2),x(e.Outlet),a(5),C("src",M(8,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),C("order",e),a(2),V(" ",K(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),x(e.Customer),a(),B(J(21,Se,(e.Variants==null?null:e.Variants.length)>1)),a(),y((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),x(M(21,19,e.Amount)),a(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),a(2),V(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),a(2),y((e==null?null:e.MarketType)!=p.channelType.WooCommerce?31:-1)}}function Te(n,_){if(n&1){let e=L();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i(),u(16,"th",24),i()(),t(17,"tbody"),R(18,xe,32,23,"tr",null,z),i()(),t(20,"app-custom-paginator",25),E("next",function(){d(e);let o=s();return c(o.initAwaitingCollection())})("previous",function(){d(e);let o=s();return c(o.initAwaitingCollection())}),i()()}if(n&2){let e=s(),p=q(0);a(18),j(p),a(2),C("filter",e.filter())("totaldata",p==null?null:p.length)}}function Le(n,_){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var it=(()=>{class n{constructor(){this.printShippingService=b(A),this.orderService=b(P),this.channelType=g,this.filter=D({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(p=>N(k({},p),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(I(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-awaiting-collection"]],features:[G([P,A])],decls:34,vars:11,consts:[["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(p,o){if(p&1){let m=L();H(0),T(1,"async"),t(2,"mainpanel",0),E("onSubmit",function(){return d(m),c(o.initAwaitingCollection())}),S("textChange",function(r){return d(m),h(o.filter().Number,r)||(o.filter().Number=r),c(r)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),S("ngModelChange",function(r){return d(m),h(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),c(r)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),S("dateChange",function(r){return d(m),h(o.filter().From,r)||(o.filter().From=r),c(r)}),i()(),t(18,"div")(19,"datepicker",8),S("dateChange",function(r){return d(m),h(o.filter().To,r)||(o.filter().To=r),c(r)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),S("ngModelChange",function(r){return d(m),h(o.filter().PageNumber,r)||(o.filter().PageNumber=r),c(r)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),S("ngModelChange",function(r){return d(m),h(o.filter().PageSize,r)||(o.filter().PageSize=r),c(r)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),v(32,Te,21,2,"div",15)(33,Le,2,0,"div",16),i()()()()()}if(p&2){let m=U(M(1,8,o.awaitingCollections$));a(2),f("text",o.filter().Number),a(10),C("multiple",!0),f("ngModel",o.filter().ListChannelID),a(5),f("date",o.filter().From),a(2),f("date",o.filter().To),a(4),f("ngModel",o.filter().PageNumber),a(4),f("ngModel",o.filter().PageSize),a(5),y((m==null?null:m.length)>0?32:33)}},dependencies:[Z,Q,Y,X,pe,le,de,me,ne,$,ie,ee,te,ge,_e,Ce,se,ce,ae,re,fe],encapsulation:2})}}return n})();export{it as AwaitingCollectionComponent};
@@ -0,0 +1 @@
1
+ import{a as Ve,b as Re,c as Ne}from"./chunk-V5BKQSAT.js";import{a as Le,b as se}from"./chunk-K77RTNG2.js";import{a as Ie}from"./chunk-2ODVHD2K.js";import{a as Fe}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as Ee}from"./chunk-NOP5P5R5.js";import{a as Pe}from"./chunk-D6URDVES.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as I}from"./chunk-KMJM6UVY.js";import{b as Te,e as X}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{c as Z,d as $,e as ee}from"./chunk-5JVEEL2T.js";import{b as C,c as U}from"./chunk-PW42BQIY.js";import{b as te,c as ie,d as xe,e as ne,f as oe,g as be,h as re,m as Oe,n as Me}from"./chunk-UGVEAL7H.js";import{A as E,c as ve,h as z,m as H,o as ke}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as we,s as De}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Ce,k as j,m as ye,n as M}from"./chunk-M2FCTYGU.js";import{$c as b,G as ae,Gb as w,Gc as a,Hc as y,Ic as B,Kc as v,Lc as k,Mb as P,Mc as T,Na as Y,Nc as ue,Oa as q,Oc as he,Pc as ge,Qc as fe,Ra as S,Rc as _e,Sc as Se,Yb as g,Z as me,_b as le,aa as pe,ac as de,ad as J,bd as F,dc as D,ec as V,gc as R,hc as N,ic as o,ja as A,jc as r,kc as x,oc as O,pa as h,pb as ce,rb as p,rd as Q,tc as c,uc as d,v as G,ya as f,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as W,b as K}from"./chunk-66YHNWRR.js";function qe(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("DROP_OFF"))}),o(1,"div",11),x(2,"i",12),o(3,"h3",13),a(4,"Drop off"),r()(),o(5,"p",14),a(6," You can drop off your package at the nearest shipping counter in your city. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function Je(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("PICK_UP"))}),o(1,"div",11),x(2,"i",15),o(3,"h3",16),a(4,"Pick up"),r()(),o(5,"p",17),a(6," The courier will collect the package from your address. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var We=(()=>{class n{constructor(){this.data=h(ie),this.dialogRef=h(te),this.selectedDelivery=S("DROP_OFF"),this.showPickup=S(!0),this.showDropOff=S(!0),this.initOptionsCondition()}onSelectDelivery(e){this.selectedDelivery.set(e)}initOptionsCondition(){switch(this.data.channelType){case C.Shopee:break;case C.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"text-muted","selected"],[1,"d-flex","justify-content-end",2,"margin-top","1.5rem"],[1,"btn","btn-light-blue","me-3","text-primary","btn-lg","fw-bold","mx-3","py-6",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4","titlew"],[1,"text-center","mt-4","lh-sm","subtitlew"],[1,"fa-solid","fa-hand-holding-box","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),a(4,"Delivery Order"),r(),o(5,"div",3),a(6,"Your selected order(s) will be set to"),r()(),o(7,"div")(8,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(9,"mat-dialog-content",5)(10,"div",6),P(11,qe,7,4,"div",7)(12,Je,7,4,"div",7),r(),o(13,"div",8)(14,"button",9),c("click",function(){return i.onConfirm()}),a(15," OK "),r()()()),t&2&&(p(11),D(i.showPickup()?11:-1),p(),D(i.showDropOff()?12:-1))},dependencies:[M,re,ne,oe],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{border-color:#000;color:#000}.delivery-option.selected[_ngcontent-%COMP%]{color:#5e9708;border-color:#5e9708}.delivery-option.selected[_ngcontent-%COMP%] .titlew[_ngcontent-%COMP%]{color:#5e9708;font-weight:700}.delivery-option.selected[_ngcontent-%COMP%] .subtitlew[_ngcontent-%COMP%]{color:#5e9708}"]})}}return n})();function Xe(n,u){if(n&1&&(o(0,"ng-option",3),a(1),r()),n&2){let e=u.$implicit;g("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),y(e==null?null:e.address)}}function Ze(n,u){if(n&1&&(o(0,"ng-option",6)(1,"span",7),a(2),b(3,"date"),r(),o(4,"span"),a(5),r()()),n&2){let e=u.$implicit;g("value",e==null?null:e.pickup_time_id),p(2),y(F(3,3,e==null?null:e.date,"d MMMM")),p(3),y(e==null?null:e.time_text)}}var je=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.addressList=Q(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=S(null),this.timeOptions=S(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=S(null)}onAddressChange(e){let t=this.addressList().find(i=>i.address_id===e);this.timeOptions.set(this.convertTimestampToDate(t?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(e){return e.map(t=>{let i=new Date(t.date*1e3);return K(W({},t),{date:i})})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Address"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedShipping,s)||(i.selectedShipping=s),s}),c("ngModelChange",function(s){return i.onAddressChange(s),i.onValueChanges()}),R(4,Xe,2,3,"ng-option",3,V),r()(),o(6,"div",0)(7,"label",4),a(8,"Date"),r(),o(9,"ng-select",5),T("ngModelChange",function(s){return k(i.pickupTime,s)||(i.pickupTime=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(10,Ze,6,6,"ng-option",6,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedShipping),p(),N(i.addressList()),p(5),g("clearable",!1),v("ngModel",i.pickupTime),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H,De,we],encapsulation:2})}}return n})();function $e(n,u){if(n&1&&(o(0,"ng-option",3)(1,"span",4),a(2),b(3,"date"),r(),o(4,"span"),a(5),b(6,"date"),r(),o(7,"span",5),a(8,"-"),r(),o(9,"span"),a(10),b(11,"date"),r()()),n&2){let e=u.$implicit,t=u.$index;g("value",t),p(2),y(F(3,4,e==null?null:e.start_date,"d MMMM")),p(3),y(F(6,7,e==null?null:e.start_date,"HH:mm")),p(5),y(F(11,10,e==null?null:e.end_date,"HH:mm"))}}var ze=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.timeOptions=Q(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=S(null)}onValueChanges(){let e=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:e?.start_time,end_time:e?.end_time})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Time"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedTimeIndex,s)||(i.selectedTimeIndex=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(4,$e,12,13,"ng-option",3,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedTimeIndex),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H],encapsulation:2})}}return n})();function et(n,u){if(n&1){let e=O();o(0,"shopee-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}function tt(n,u){if(n&1){let e=O();o(0,"tiktok-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}var He=(()=>{class n{constructor(){this.dialogRef=h(te),this.dialogData=h(ie),this.shippingOptions=S(this.dialogData.shippingOptions),this.channelType=S(this.dialogData.channelType),this.order=S(this.dialogData.order),this.channelTypeEnum=C,this.pickupData=S(null)}onFormChanges(e){this.pickupData.set(e)}onClose(){this.dialogRef.close()}onSave(){let e=this.generatePickupData();this.dialogRef.close(e)}generatePickupData(){switch(this.channelType()){case C.Shopee:return{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case C.Tiktok:return{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(t,i){if(t&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Set Pickup"),r(),o(5,"div",2)(6,"div",3),a(7,"Shipping Method"),r(),o(8,"div",3),a(9),r()()(),o(10,"div")(11,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(12,"mat-dialog-content",5),P(13,et,1,1,"shopee-pickup",6)(14,tt,1,1,"tiktok-pickup",6),r(),o(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),c("click",function(){return i.onClose()}),a(18," Cancel "),r(),o(19,"button",9),c("click",function(){return i.onSave()}),a(20," Ok "),r()()()),t&2){let l,s;p(9),B(" ",!((l=i.order())==null||l.LogisticService==null)&&l.LogisticService.Name?(l=i.order())==null||l.LogisticService==null?null:l.LogisticService.Name:"-"," "),p(4),D((s=i.channelType())===i.channelTypeEnum.Shopee?13:s===i.channelTypeEnum.Tiktok?14:-1)}},dependencies:[M,re,ne,be,oe,E,je,ze],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']})}}return n})();var Ue=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetTiktokShippingOptions,{OrderNumber:e,ShopID:t}).pipe(G(i=>this.formatDatePickUpOptions(i)))}pickupOrder(e){return this.httpService.post(I.TiktokSelectShipping,e)}dropOffOrder(e,t){let i={handover_method:"DROP_OFF",PackageID:e,ShopID:t};return this.httpService.post(I.TiktokSelectShipping,i)}formatDatePickUpOptions(e){return e?.Options?.pickup_slots&&(e.Options.pickup_slots=e?.Options?.pickup_slots.map(t=>{let i=U.convertTimestampToDate(t.start_time),l=U.convertTimestampToDate(t.end_time);return t.start_date=i,t.end_date=l,t})),e}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ke=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetShopeeShippingOptions,{OrderNumber:e,ShopID:t})}pickupOrder(e){return this.httpService.post(I.ShopeeSelectShipping,e)}dropOffOrder(e,t){let i={OrderNumber:e,ShopID:t,dropoff:{}};return this.httpService.post(I.ShopeeSelectShipping,i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ge=(()=>{class n{constructor(){this.shopeeShippingService=h(Ke),this.tiktokShippingService=h(Ue)}getShippingOptions(e,t,i){switch(i){case C.Shopee:return this.getShopeeShippingOptions(e,t);case C.Tiktok:return this.getTiktokShippingOptions(e,t)}}pickupOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.pickupOrder(t);case C.Tiktok:return this.tiktokShippingService.pickupOrder(t)}}dropOffOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.dropOffOrder(e.Number,e.ShopID);case C.Tiktok:let i=t?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(i,e.ShopID)}}getShopeeShippingOptions(e,t){return this.shopeeShippingService.getShippingOptions(e,t)}getTiktokShippingOptions(e,t){return this.tiktokShippingService.getShippingOptions(e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var it=()=>[],nt=n=>({"td-cell-hover":n});function ot(n,u){if(n&1&&x(0,"variants-dropdown",30),n&2){let e=d().$implicit;g("variants",e==null?null:e.Variants)}}function rt(n,u){if(n&1&&x(0,"variant-with-image",31),n&2){let e=d().$implicit;g("variant",e==null?null:e.Variants[0])}}function at(n,u){if(n&1&&(o(0,"span"),a(1),r()),n&2){let e=d().$implicit;p(),B("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function pt(n,u){if(n&1){let e=O();o(0,"button",35),c("click",function(){f(e);let i=d().$implicit,l=d(2);return _(l.onSetFulfillment(i))}),a(1," Set Fulfillment "),r()}}function lt(n,u){if(n&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"div",26)(5,"div",27)(6,"div"),x(7,"img",28),b(8,"channelImage"),r(),o(9,"div"),x(10,"order-link",29),r()(),o(11,"small"),a(12),b(13,"date"),r()()(),o(14,"td"),a(15),r(),o(16,"td"),P(17,ot,1,1,"variants-dropdown",30)(18,rt,1,1,"variant-with-image",31),r(),o(19,"td",32),a(20),b(21,"number"),r(),o(22,"td")(23,"div",26)(24,"div",27)(25,"span"),a(26),r(),P(27,at,2,1,"span"),r(),o(28,"small"),a(29),r()()(),o(30,"td",33),P(31,pt,2,0,"button",34),r()()),n&2){let e=u.$implicit,t=d(2);p(2),y(e.Outlet),p(5),g("src",J(8,14,e==null?null:e.MarketType),ce)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(3),g("order",e),p(2),B(" ",F(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),y(e.Customer),p(),de(Se(21,nt,(e.Variants==null?null:e.Variants.length)>1)),p(),D((e.Variants==null?null:e.Variants.length)>1?17:18),p(3),y(J(21,19,e.Amount)),p(6),y(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),D(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),p(2),B(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),D((e==null?null:e.MarketType)!=t.channelType.WooCommerce?31:-1)}}function st(n,u){if(n&1){let e=O();o(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),r(),o(6,"th",21),a(7,"Number"),r(),o(8,"th",21),a(9,"Customer"),r(),o(10,"th"),a(11,"Items"),r(),o(12,"th",22),a(13,"Amount"),r(),o(14,"th",23),a(15,"Shipping"),r(),x(16,"th",24),r()(),o(17,"tbody"),R(18,lt,32,23,"tr",null,V),r()(),o(20,"app-custom-paginator",25),c("next",function(){f(e);let i=d();return _(i.initReadyToShip())})("previous",function(){f(e);let i=d();return _(i.initReadyToShip())}),r()()}if(n&2){let e=d(),t=ge(0);p(18),N(t),p(2),g("filter",e.filter())("totaldata",t==null?null:t.length)}}function mt(n,u){n&1&&(o(0,"div",16),x(1,"app-empty-state"),r())}var Mi=(()=>{class n{constructor(){this.dialog=h(xe),this.pickupService=h(Ge),this.toastr=h(Te),this.orderService=h(se),this.channelType=C,this.filter=S({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(t=>K(W({},t),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(me(1))}onFilterChange(e){this.filter.update(t=>W(W({},t),e))}onSetFulfillment(e){this.pickupService.getShippingOptions(e.Number,e.ShopID,e.MarketType).pipe(pe(t=>this.dialog.open(We,{height:"400px",width:"530px",data:{options:t,channelType:e.MarketType}}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),G(i=>({type:i,order:e,options:t}))))).subscribe(t=>{t.type=="PICK_UP"?this.onSelectPickup(t.order,t.options):this.onSelectDropOff(t.order,t.options)})}onSelectPickup(e,t){this.dialog.open(He,{width:"530px",data:{order:e,shippingOptions:t,channelType:e.MarketType},disableClose:!0}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),pe(i=>this.pickupService.pickupOrder(e,i))).subscribe(()=>{this.toastr.success("Pickup order created successfully","Success"),this.initReadyToShip()})}onSelectDropOff(e,t){this.pickupService.dropOffOrder(e,t).subscribe(()=>{this.toastr.success("Drop-off order created successfully","Success"),this.initReadyToShip()})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-ready-to-ship"]],features:[fe([se])],decls:34,vars:12,consts:[["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","160px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(t,i){if(t&1){let l=O();ue(0),b(1,"async"),o(2,"mainpanel",0),c("onSubmit",function(){return f(l),_(i.initReadyToShip())}),T("textChange",function(m){return f(l),k(i.filter().Number,m)||(i.filter().Number=m),_(m)}),o(3,"actions")(4,"a",1),x(5,"i",2),o(6,"span"),a(7,"Order Fulfillment Display"),r()()(),o(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),r(),o(12,"channel-select-options",4),T("ngModelChange",function(m){return f(l),k(i.filter().ListChannelID,m)||(i.filter().ListChannelID=m),_(m)}),r()(),o(13,"div",5)(14,"label",3),a(15,"From/To"),r(),o(16,"div",6)(17,"datepicker",7),T("dateChange",function(m){return f(l),k(i.filter().From,m)||(i.filter().From=m),_(m)}),r()(),o(18,"div")(19,"datepicker",8),T("dateChange",function(m){return f(l),k(i.filter().To,m)||(i.filter().To=m),_(m)}),r()()(),o(20,"div",5)(21,"label",9),a(22,"Page Number"),r(),o(23,"input",10),T("ngModelChange",function(m){return f(l),k(i.filter().PageNumber,m)||(i.filter().PageNumber=m),_(m)}),r()(),o(24,"div",5)(25,"label",9),a(26,"Page Size"),r(),o(27,"input",11),T("ngModelChange",function(m){return f(l),k(i.filter().PageSize,m)||(i.filter().PageSize=m),_(m)}),r()()(),o(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),P(32,st,21,2,"div",15)(33,mt,2,0,"div",16),r()()()()()}if(t&2){let l=he(J(1,8,i.readyToShip$)||_e(11,it));p(2),v("text",i.filter().Number),p(10),g("multiple",!0),v("ngModel",i.filter().ListChannelID),p(5),v("date",i.filter().From),p(2),v("date",i.filter().To),p(4),v("ngModel",i.filter().PageNumber),p(4),v("ngModel",i.filter().PageSize),p(5),D(l.length>0?32:33)}},dependencies:[M,Ce,ye,j,Me,Oe,Fe,Pe,E,ve,ke,z,H,Ve,Re,Ne,Ie,Ee,Le],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return n})();export{Mi as ReadyToShipComponent};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-4JKDNUTX.js";import{a as be}from"./chunk-H3IVI3LN.js";import{a as Ve}from"./chunk-AJL3CYNX.js";import{a as Te,b as De}from"./chunk-NS46QSCM.js";import{a as Me}from"./chunk-E6XWD6WX.js";import{b as ke,c as Ee}from"./chunk-EH6HWI3G.js";import"./chunk-OLOIQI4D.js";import"./chunk-IA6KOBDJ.js";import"./chunk-RECNBAEB.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as Y}from"./chunk-UMP6ZMEJ.js";import"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-5HO2IJ47.js";import{d as Ce,e as fe}from"./chunk-5JVEEL2T.js";import{c as de}from"./chunk-PW42BQIY.js";import{a as _e,b as ge,c as he}from"./chunk-SWQXSJ7O.js";import{b as Z}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{b as xe,c as te,d as ye,j as Se,k as ve,m as Ue,n as we}from"./chunk-CLER2MX6.js";import{A as H,b as me,h as q,m as j}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{H as ce,J as pe,j as $,n as z}from"./chunk-M2FCTYGU.js";import{$b as K,$c as F,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as U,Lc as w,Mb as f,Mc as M,Nc as O,Oc as N,Pc as h,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as A,dc as v,ea as J,ec as V,gc as P,hc as I,ic as o,jc as s,kc as L,lc as b,mc as T,oc as y,pa as x,pb as ae,q as oe,rb as a,rd as R,tc as C,uc as l,v as G,ya as c,za as p}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://res.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Ae(i,m){if(i&1&&(o(0,"div",6),L(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),_("src",e.emptyStateIcon,ae)}}function Re(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),M("ngModelChange",function(t){let n=c(e).$implicit;return w(n.selected,t)||(n.selected=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(2),n=h(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,Pe)),_("binary",!0)("id",e.ID),U("ngModel",e.selected),a(),_("for",e.ID),a(),D(" ",e.Name," ")}}function Ge(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),M("ngModelChange",function(t){c(e);let n=l();return w(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),C("ngModelChange",function(t){c(e);let n=l(),d=h(0);return p(n.onCheckAllChange(t,d))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Re,4,8,"div",14,V)}if(i&2){let e=l(),r=h(0);a(),K(X(4,Pe)),_("binary",!0),U("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=x(xe),this.data=x(te),this.userService=x(k),this.dialogData=x(te),this.toastr=x(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),E(1)),this.isCheckAll=S(!0),this.selectedGroup=S(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new Se,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(de.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([k]),le],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),o(2,"modal-material",0),C("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=h(0);return p(t.onSubmit(u))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),f(9,Ae,4,1,"div",6)(10,Ge,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),C("click",function(){return c(n),p(t.onClickSelect())}),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(A(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),v((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),U("ngModel",t.selectedGroup)}},dependencies:[z,$,ve,H,q,j,ke,Me],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"]})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),C("click",function(){c(e);let t=l(2),n=h(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),L(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function We(i,m){if(i&1&&(b(0),f(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),v(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function $e(i,m){if(i&1){let e=y();b(0),o(1,"button",15),C("click",function(){c(e);let t=l(),n=h(0),d=h(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,d==null?null:d.Data))}),g(2," Migrate "),s(),T()}}function ze(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function qe(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),C("change",function(t){c(e);let n=l(),d=h(2);return p(n.onCheckAllUser(t.target.checked,d==null?null:d.Data))}),s()()(),T()}}function je(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",23),M("ngModelChange",function(t){c(e);let n=l(2).$implicit;return w(n.checked,t)||(n.checked=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(3),n=h(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),U("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),f(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),v(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function Ye(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.UserID)),a(),D(" ",e.Name," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Je(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ke(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Qe(i,m){if(i&1&&L(0,"p-chip",24),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&P(0,Qe,1,3,"p-chip",24,V),i&2){let e=l().$implicit;I(e.Channels)}}function et(i,m){i&1&&(o(0,"span"),g(1,"All Channels"),s())}function tt(i,m){if(i&1&&(o(0,"tr"),f(1,He,3,1,"ng-container",3),o(2,"td"),f(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),f(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),f(10,Xe,2,0)(11,et,2,0,"span"),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),v(r.hasUserEditRole()?3:4),a(3),v(r.hasUserEditRole()?6:7),a(4),v((e.Channels==null?null:e.Channels.length)>0?10:11)}}function it(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),C("next",function(){c(e);let t=l(),n=h(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=h(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=h(0),r=h(2);_("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)("alwaysShowNextButton",!0)}}var zt=(()=>{class i{constructor(){this.usersService=x(k),this.permissionService=x(_e),this.toastService=x(Z),this.dialog=x(ye),this.userInviteOptions=S([]),this.searchText=S(null),this.selectedGroup=S(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),E(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserInvite,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=S(!1),this.selectedUsers=S([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(ue.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),E(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ie,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([k])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),O(2),F(3,"async"),o(4,"mainpanel",0),M("textChange",function(u){return c(n),w(t.searchText,u)||(t.searchText=u),p(u)}),C("onSubmit",function(){c(n);let u=h(0);return p(t.initUsers(u==null?null:u.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),f(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,ze,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),f(21,qe,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel"),s()()(),o(28,"tbody"),P(29,tt,12,4,"tr",null,V),s()(),f(31,it,1,5,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),C("onSuccessUpdateUser",function(){c(n);let u=h(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(A(1,11,t.userLoader$));a(2);let d=N(A(3,14,t.users$));a(2),U("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),U("ngModel",t.selectedGroup),a(2),_("ngxPermissionsOnly",t.userDeleteRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(8),_("ngxPermissionsOnly",t.userDeleteRole),a(8),I(d==null?null:d.Data),a(2),v(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[z,$,we,Ue,pe,ce,Ve,he,ge,fe,Ce,H,me,q,j,Ee,De,Te],encapsulation:2})}}return i})();export{zt as UsersComponent};
1
+ import{a as k}from"./chunk-RZZKFTCX.js";import{a as be}from"./chunk-H3IVI3LN.js";import{a as Me}from"./chunk-W6FZQ6XT.js";import{a as Ve}from"./chunk-AJL3CYNX.js";import{a as Te,b as De}from"./chunk-NS46QSCM.js";import{b as ke,c as Ee}from"./chunk-EH6HWI3G.js";import"./chunk-OLOIQI4D.js";import"./chunk-RECNBAEB.js";import"./chunk-IA6KOBDJ.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as Y}from"./chunk-UMP6ZMEJ.js";import"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-KMJM6UVY.js";import{b as Z}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{d as Ce,e as fe}from"./chunk-5JVEEL2T.js";import{c as de}from"./chunk-PW42BQIY.js";import{b as xe,c as te,d as ye,j as Se,k as ve,m as Ue,n as we}from"./chunk-UGVEAL7H.js";import{A as H,b as me,h as q,m as j}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as _e,b as ge,c as he}from"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{H as ce,J as pe,j as $,n as z}from"./chunk-M2FCTYGU.js";import{$b as K,$c as F,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as U,Lc as w,Mb as f,Mc as M,Nc as O,Oc as N,Pc as h,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as A,dc as v,ea as J,ec as V,gc as P,hc as I,ic as o,jc as s,kc as L,lc as b,mc as T,oc as y,pa as x,pb as ae,q as oe,rb as a,rd as R,tc as C,uc as l,v as G,ya as c,za as p}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://res.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Ae(i,m){if(i&1&&(o(0,"div",6),L(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),_("src",e.emptyStateIcon,ae)}}function Re(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),M("ngModelChange",function(t){let n=c(e).$implicit;return w(n.selected,t)||(n.selected=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(2),n=h(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,Pe)),_("binary",!0)("id",e.ID),U("ngModel",e.selected),a(),_("for",e.ID),a(),D(" ",e.Name," ")}}function Ge(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),M("ngModelChange",function(t){c(e);let n=l();return w(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),C("ngModelChange",function(t){c(e);let n=l(),d=h(0);return p(n.onCheckAllChange(t,d))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Re,4,8,"div",14,V)}if(i&2){let e=l(),r=h(0);a(),K(X(4,Pe)),_("binary",!0),U("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=x(xe),this.data=x(te),this.userService=x(k),this.dialogData=x(te),this.toastr=x(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),E(1)),this.isCheckAll=S(!0),this.selectedGroup=S(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new Se,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(de.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([k]),le],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),o(2,"modal-material",0),C("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=h(0);return p(t.onSubmit(u))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),f(9,Ae,4,1,"div",6)(10,Ge,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),C("click",function(){return c(n),p(t.onClickSelect())}),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(A(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),v((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),U("ngModel",t.selectedGroup)}},dependencies:[z,$,ve,H,q,j,ke,Me],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"]})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),C("click",function(){c(e);let t=l(2),n=h(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),L(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function We(i,m){if(i&1&&(b(0),f(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),v(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function $e(i,m){if(i&1){let e=y();b(0),o(1,"button",15),C("click",function(){c(e);let t=l(),n=h(0),d=h(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,d==null?null:d.Data))}),g(2," Migrate "),s(),T()}}function ze(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function qe(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),C("change",function(t){c(e);let n=l(),d=h(2);return p(n.onCheckAllUser(t.target.checked,d==null?null:d.Data))}),s()()(),T()}}function je(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",23),M("ngModelChange",function(t){c(e);let n=l(2).$implicit;return w(n.checked,t)||(n.checked=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(3),n=h(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),U("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),f(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),v(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function Ye(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.UserID)),a(),D(" ",e.Name," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Je(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ke(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Qe(i,m){if(i&1&&L(0,"p-chip",24),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&P(0,Qe,1,3,"p-chip",24,V),i&2){let e=l().$implicit;I(e.Channels)}}function et(i,m){i&1&&(o(0,"span"),g(1,"All Channels"),s())}function tt(i,m){if(i&1&&(o(0,"tr"),f(1,He,3,1,"ng-container",3),o(2,"td"),f(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),f(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),f(10,Xe,2,0)(11,et,2,0,"span"),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),v(r.hasUserEditRole()?3:4),a(3),v(r.hasUserEditRole()?6:7),a(4),v((e.Channels==null?null:e.Channels.length)>0?10:11)}}function it(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),C("next",function(){c(e);let t=l(),n=h(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=h(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=h(0),r=h(2);_("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)("alwaysShowNextButton",!0)}}var zt=(()=>{class i{constructor(){this.usersService=x(k),this.permissionService=x(_e),this.toastService=x(Z),this.dialog=x(ye),this.userInviteOptions=S([]),this.searchText=S(null),this.selectedGroup=S(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),E(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserInvite,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=S(!1),this.selectedUsers=S([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(ue.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),E(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ie,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([k])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),O(2),F(3,"async"),o(4,"mainpanel",0),M("textChange",function(u){return c(n),w(t.searchText,u)||(t.searchText=u),p(u)}),C("onSubmit",function(){c(n);let u=h(0);return p(t.initUsers(u==null?null:u.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),f(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,ze,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),f(21,qe,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel"),s()()(),o(28,"tbody"),P(29,tt,12,4,"tr",null,V),s()(),f(31,it,1,5,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),C("onSuccessUpdateUser",function(){c(n);let u=h(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(A(1,11,t.userLoader$));a(2);let d=N(A(3,14,t.users$));a(2),U("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),U("ngModel",t.selectedGroup),a(2),_("ngxPermissionsOnly",t.userDeleteRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(8),_("ngxPermissionsOnly",t.userDeleteRole),a(8),I(d==null?null:d.Data),a(2),v(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[z,$,we,Ue,pe,ce,Ve,he,ge,fe,Ce,H,me,q,j,Ee,De,Te],encapsulation:2})}}return i})();export{zt as UsersComponent};
@@ -1 +1 @@
1
- import{a as E,b as A}from"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as k}from"./chunk-5HO2IJ47.js";import{e as j}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as B,n as D}from"./chunk-CLER2MX6.js";import"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as F,n as $}from"./chunk-M2FCTYGU.js";import{$c as I,Gb as y,Gc as u,Hc as M,Ic as P,Mb as _,Nc as w,Qc as T,Sc as b,Yb as c,Z as x,ac as C,ad as R,dc as S,ec as m,gc as d,hc as s,ic as r,ja as g,jc as l,pa as p,rb as o,uc as f}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var h=(()=>{class e{constructor(){this.httpService=p(j)}getMyProfile(){return this.httpService.get(k.MyProfile)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac})}}return e})();var H=e=>({"border-end-0":e});function L(e,n){if(e&1&&(r(0,"div",11)(1,"div",12)(2,"p",13),u(3),l()()()),e&2){let t=n.$implicit,i=n.$index,a=f(2).$implicit;C(b(4,H,i!==a.Role.length-1)),c("pTooltip",t.Description),o(3),P(" ",t.Name," ")}}function U(e,n){if(e&1&&(r(0,"div",5)(1,"div",6)(2,"div",7)(3,"span",8),u(4),l()()(),r(5,"div",9)(6,"div",5),d(7,L,4,6,"div",10,m),l()()()),e&2){let t=f().$implicit;o(4),M(t.Name),o(3),s(t==null?null:t.Role)}}function q(e,n){if(e&1&&_(0,U,9,1,"div",5),e&2){let t=n.$implicit;S((t==null||t.Role==null?null:t.Role.length)>0?0:-1)}}var ne=(()=>{class e{constructor(){this.myProfileService=p(h),this.profile$=this.myProfileService.getMyProfile().pipe(x(1))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=y({type:e,selectors:[["app-roles-info"]],features:[T([h])],decls:10,vars:4,consts:[["headerTitle","My Profile",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-6","px-8"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between","border-end-0",2,"height","40px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100","align-items-center","gap-4"],[1,"fs-5","w-100","text-center"],[1,"col"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"class","pTooltip"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"pTooltip"],[1,"d-flex","h-100","align-items-center","gap-4","px-2"],[1,"fs-6","text-dark",2,"margin","0"]],template:function(i,a){if(i&1&&(w(0),I(1,"async"),r(2,"mainpanel",0)(3,"content")(4,"div",1)(5,"div",2)(6,"div",3)(7,"div",4),d(8,q,1,1,null,null,m),l()()()()()()),i&2){let v=R(1,2,a.profile$);o(2),c("hideSearchBox",!0)("hideSearchDropdown",!0),o(6),s(v==null?null:v.Roles)}},dependencies:[$,F,D,B,A,E],encapsulation:2})}}return e})();export{ne as RolesInfoComponent};
1
+ import{a as E,b as A}from"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as k}from"./chunk-KMJM6UVY.js";import{e as j}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as B,n as D}from"./chunk-UGVEAL7H.js";import"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as F,n as $}from"./chunk-M2FCTYGU.js";import{$c as I,Gb as y,Gc as u,Hc as M,Ic as P,Mb as _,Nc as w,Qc as T,Sc as b,Yb as c,Z as x,ac as C,ad as R,dc as S,ec as m,gc as d,hc as s,ic as r,ja as g,jc as l,pa as p,rb as o,uc as f}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var h=(()=>{class e{constructor(){this.httpService=p(j)}getMyProfile(){return this.httpService.get(k.MyProfile)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac})}}return e})();var H=e=>({"border-end-0":e});function L(e,n){if(e&1&&(r(0,"div",11)(1,"div",12)(2,"p",13),u(3),l()()()),e&2){let t=n.$implicit,i=n.$index,a=f(2).$implicit;C(b(4,H,i!==a.Role.length-1)),c("pTooltip",t.Description),o(3),P(" ",t.Name," ")}}function U(e,n){if(e&1&&(r(0,"div",5)(1,"div",6)(2,"div",7)(3,"span",8),u(4),l()()(),r(5,"div",9)(6,"div",5),d(7,L,4,6,"div",10,m),l()()()),e&2){let t=f().$implicit;o(4),M(t.Name),o(3),s(t==null?null:t.Role)}}function q(e,n){if(e&1&&_(0,U,9,1,"div",5),e&2){let t=n.$implicit;S((t==null||t.Role==null?null:t.Role.length)>0?0:-1)}}var ne=(()=>{class e{constructor(){this.myProfileService=p(h),this.profile$=this.myProfileService.getMyProfile().pipe(x(1))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=y({type:e,selectors:[["app-roles-info"]],features:[T([h])],decls:10,vars:4,consts:[["headerTitle","My Profile",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-6","px-8"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between","border-end-0",2,"height","40px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100","align-items-center","gap-4"],[1,"fs-5","w-100","text-center"],[1,"col"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"class","pTooltip"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"pTooltip"],[1,"d-flex","h-100","align-items-center","gap-4","px-2"],[1,"fs-6","text-dark",2,"margin","0"]],template:function(i,a){if(i&1&&(w(0),I(1,"async"),r(2,"mainpanel",0)(3,"content")(4,"div",1)(5,"div",2)(6,"div",3)(7,"div",4),d(8,q,1,1,null,null,m),l()()()()()()),i&2){let v=R(1,2,a.profile$);o(2),c("hideSearchBox",!0)("hideSearchDropdown",!0),o(6),s(v==null?null:v.Roles)}},dependencies:[$,F,D,B,A,E],encapsulation:2})}}return e})();export{ne as RolesInfoComponent};