Fix compilation issues from dependency updates
This commit is contained in:
parent
66e5384fe9
commit
84cda20738
6 changed files with 1263 additions and 1068 deletions
2289
package-lock.json
generated
2289
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@
|
||||||
<mat-toolbar>
|
<mat-toolbar>
|
||||||
<span>
|
<span>
|
||||||
<a mat-icon-button *ngIf="backEnabled" (click)="goBack()">
|
<a mat-icon-button *ngIf="backEnabled" (click)="goBack()">
|
||||||
<mat-icon>arrow_back</mat-icon>
|
<mat-icon>arrow_back</mat-icon>
|
||||||
</a>
|
</a>
|
||||||
<a mat-icon-button *ngIf="!backEnabled" (click)="sidenav.open()">
|
<a mat-icon-button *ngIf="!backEnabled" (click)="sidenav.open()">
|
||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
|
|
|
@ -40,7 +40,7 @@ import { environment } from 'src/environments/environment';
|
||||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
import { ServiceWorkerModule } from '@angular/service-worker';
|
import { ServiceWorkerModule } from '@angular/service-worker';
|
||||||
import { CategoryBreakdownComponent } from './categories/category-breakdown/category-breakdown.component';
|
import { CategoryBreakdownComponent } from './categories/category-breakdown/category-breakdown.component';
|
||||||
import { ChartsModule } from 'ng2-charts';
|
import { NgChartsModule } from 'ng2-charts';
|
||||||
import { TWIGS_SERVICE } from './shared/twigs.service';
|
import { TWIGS_SERVICE } from './shared/twigs.service';
|
||||||
import { AuthInterceptor } from './shared/auth.interceptor';
|
import { AuthInterceptor } from './shared/auth.interceptor';
|
||||||
import { TwigsHttpService } from './shared/twigs.http.service';
|
import { TwigsHttpService } from './shared/twigs.http.service';
|
||||||
|
@ -93,7 +93,7 @@ import { EditBudgetComponent } from './budgets/edit-budget/edit-budget.component
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
|
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
ChartsModule,
|
NgChartsModule,
|
||||||
MatCheckboxModule,
|
MatCheckboxModule,
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
],
|
],
|
||||||
|
|
|
@ -5,8 +5,8 @@ import { AppComponent } from 'src/app/app.component';
|
||||||
import { Transaction } from 'src/app/transactions/transaction';
|
import { Transaction } from 'src/app/transactions/transaction';
|
||||||
import { Category } from 'src/app/categories/category';
|
import { Category } from 'src/app/categories/category';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { Label } from 'ng2-charts';
|
// import { Label } from 'ng2-charts';
|
||||||
import { ChartDataSets } from 'chart.js';
|
import { ChartDataset } from 'chart.js';
|
||||||
import { TWIGS_SERVICE, TwigsService } from 'src/app/shared/twigs.service';
|
import { TWIGS_SERVICE, TwigsService } from 'src/app/shared/twigs.service';
|
||||||
import { Actionable } from '../../shared/actionable';
|
import { Actionable } from '../../shared/actionable';
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ export class BudgetDetailsComponent implements OnInit, OnDestroy, Actionable {
|
||||||
actualIncome = 0;
|
actualIncome = 0;
|
||||||
expectedExpenses = 0;
|
expectedExpenses = 0;
|
||||||
actualExpenses = 0;
|
actualExpenses = 0;
|
||||||
barChartLabels: Label[] = ['Income', 'Expenses'];
|
barChartLabels: string[] = ['Income', 'Expenses'];
|
||||||
barChartData: ChartDataSets[] = [
|
barChartData: ChartDataset[] = [
|
||||||
{ data: [0, 0], label: 'Expected' },
|
{ data: [0, 0], label: 'Expected' },
|
||||||
{ data: [0, 0], label: 'Actual' },
|
{ data: [0, 0], label: 'Actual' },
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
[options]="barChartOptions"
|
[options]="barChartOptions"
|
||||||
[labels]="barChartLabels"
|
[labels]="barChartLabels"
|
||||||
[legend]="barChartLegend"
|
[legend]="barChartLegend"
|
||||||
[chartType]="barChartType">
|
[type]="barChartType">
|
||||||
</canvas>
|
</canvas>
|
||||||
</div>
|
</div>
|
|
@ -1,8 +1,8 @@
|
||||||
import { Component, OnInit, Input, OnChanges, SimpleChanges, SimpleChange, ViewChild } from '@angular/core';
|
import { Component, OnInit, Input, OnChanges, SimpleChanges, SimpleChange, ViewChild } from '@angular/core';
|
||||||
import { Category } from '../category';
|
import { Category } from '../category';
|
||||||
import { CategoriesComponent } from '../categories.component';
|
import { CategoriesComponent } from '../categories.component';
|
||||||
import { ChartOptions, ChartType, ChartDataSets } from 'chart.js';
|
import { ChartConfiguration, ChartType, ChartDataset } from 'chart.js';
|
||||||
import { BaseChartDirective, Label } from 'ng2-charts';
|
import { BaseChartDirective } from 'ng2-charts';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-category-breakdown',
|
selector: 'app-category-breakdown',
|
||||||
|
@ -10,22 +10,24 @@ import { BaseChartDirective, Label } from 'ng2-charts';
|
||||||
styleUrls: ['./category-breakdown.component.css']
|
styleUrls: ['./category-breakdown.component.css']
|
||||||
})
|
})
|
||||||
export class CategoryBreakdownComponent implements OnInit, OnChanges {
|
export class CategoryBreakdownComponent implements OnInit, OnChanges {
|
||||||
barChartOptions: ChartOptions = {
|
barChartOptions: ChartConfiguration['options'] = {
|
||||||
responsive: true,
|
responsive: true,
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
scales: {
|
scales: {
|
||||||
xAxes: [{
|
x: {
|
||||||
ticks: {
|
ticks: {
|
||||||
beginAtZero: true
|
// beginAtZero: true
|
||||||
}
|
}
|
||||||
}], yAxes: [{}]
|
},
|
||||||
|
y: {}
|
||||||
},
|
},
|
||||||
|
indexAxis: 'y'
|
||||||
};
|
};
|
||||||
@Input() barChartLabels: Label[];
|
@Input() barChartLabels: string[];
|
||||||
@Input() barChartData: ChartDataSets[] = [
|
@Input() barChartData: ChartDataset[] = [
|
||||||
{ data: [0, 0, 0, 0], label: '' },
|
{ data: [0, 0, 0, 0], label: '' },
|
||||||
];
|
];
|
||||||
barChartType: ChartType = 'horizontalBar';
|
barChartType: ChartType = 'bar';
|
||||||
barChartLegend = true;
|
barChartLegend = true;
|
||||||
@ViewChild(BaseChartDirective) chart: BaseChartDirective;
|
@ViewChild(BaseChartDirective) chart: BaseChartDirective;
|
||||||
|
|
||||||
|
@ -35,9 +37,9 @@ export class CategoryBreakdownComponent implements OnInit, OnChanges {
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
console.log(changes);
|
console.log(changes);
|
||||||
if (changes.barChartLabels) {
|
// if (changes.barChartLabels) {
|
||||||
this.barChartLabels = changes.barChartLabels.currentValue;
|
// this.barChartLabels = changes.barChartLabels.currentValue;
|
||||||
}
|
// }
|
||||||
if (changes.barChartData) {
|
if (changes.barChartData) {
|
||||||
this.barChartData = changes.barChartData.currentValue;
|
this.barChartData = changes.barChartData.currentValue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue