Skip to content

Commit 1d78122

Browse files
committed
fix: fix issues after updates to Angular 13 in rooms component and country orders component
1 parent 0ea6951 commit 1d78122

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/pages/dashboard/rooms/rooms.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { map } from 'rxjs/operators';
1212
class="collapse"
1313
[hidden]="isCollapsed()">
1414
</nb-icon>
15-
<ngx-room-selector [class.dark-background]="isDarkTheme" (select)="select($event)"></ngx-room-selector>
15+
<ngx-room-selector [class.dark-background]="isDarkTheme" (selectEvent)="select($event)"></ngx-room-selector>
1616
<ngx-player [collapsed]="isCollapsed() && breakpoint.width <= breakpoints.md"></ngx-player>
1717
</nb-card>
1818
`,

src/app/pages/e-commerce/country-orders/chart/country-orders-chart.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AfterViewInit, Component, Input, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
1+
import { Component, Input, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
22
import { NbThemeService } from '@nebular/theme';
33
import { takeWhile } from 'rxjs/operators';
44
import { LayoutService } from '../../../../@core/utils/layout.service';
@@ -19,7 +19,7 @@ import { LayoutService } from '../../../../@core/utils/layout.service';
1919
</div>
2020
`,
2121
})
22-
export class CountryOrdersChartComponent implements AfterViewInit, OnDestroy, OnChanges {
22+
export class CountryOrdersChartComponent implements OnDestroy, OnChanges {
2323

2424
@Input() countryName: string;
2525
@Input() data: number[];
@@ -58,7 +58,7 @@ export class CountryOrdersChartComponent implements AfterViewInit, OnDestroy, On
5858
}
5959
}
6060

61-
ngAfterViewInit() {
61+
initChartOptions() {
6262
this.theme.getJsTheme()
6363
.pipe(takeWhile(() => this.alive))
6464
.subscribe(config => {
@@ -166,6 +166,8 @@ export class CountryOrdersChartComponent implements AfterViewInit, OnDestroy, On
166166

167167
onChartInit(ec) {
168168
this.echartsInstance = ec;
169+
170+
this.initChartOptions();
169171
}
170172

171173
resizeChart() {

src/app/pages/e-commerce/country-orders/country-orders.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { CountryOrderData } from '../../../@core/data/country-order';
1010
<nb-card [size]="breakpoint.width >= breakpoints.md ? 'medium' : 'giant'">
1111
<nb-card-header>Country Orders Statistics</nb-card-header>
1212
<nb-card-body>
13-
<ngx-country-orders-map (select)="selectCountryById($event)"
13+
<ngx-country-orders-map (selectEvent)="selectCountryById($event)"
1414
countryId="USA">
1515
</ngx-country-orders-map>
1616
<ngx-country-orders-chart [countryName]="countryName"

0 commit comments

Comments
 (0)