Skip to content

Commit

Permalink
closes 62
Browse files Browse the repository at this point in the history
  • Loading branch information
technbuzz committed Nov 18, 2022
1 parent 12519b0 commit da7d490
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion apps/kharchay/src/app/filter/filter.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ const routes: Routes = [
{
path: '',
component: FilterPage
}
},
{
path: ':id',
component: FilterPage
},
];

@NgModule({
Expand Down
6 changes: 4 additions & 2 deletions apps/kharchay/src/app/filter/filter.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import isBefore from 'date-fns/esm/isBefore';
import startOfMonth from 'date-fns/esm/startOfMonth';
import lightFormat from 'date-fns/esm/lightFormat';
import parseISO from 'date-fns/esm/parseISO';
import parse from 'date-fns/esm/parse';

import { Observable } from 'rxjs';
import { BaseExpense } from '../home/expense-base.model';
import { categories } from '../shared/categories';
import { Stepper } from '../shared/stepper';
import { Router } from '@angular/router';
import { ActivatedRoute, Router } from '@angular/router';


@Component({
Expand All @@ -39,12 +40,13 @@ export class FilterPage extends Stepper implements OnInit{
total = 0;


constructor(private router: Router, private afs: Firestore) {
constructor(private route: ActivatedRoute, private router: Router, private afs: Firestore) {
super();
Object.assign(this.categories, categories);
}

ngOnInit() {
this.filter.month = parse(this.route.snapshot.params['id'], 'yyyy-MM', new Date()).toISOString()
this.loadBasic();
}

Expand Down
2 changes: 1 addition & 1 deletion apps/kharchay/src/app/summary/summary.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<kh-doughnut [chartLabel]="chartLabels" [chartData]="chartData"></kh-doughnut>

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button >
<ion-fab-button [routerLink]='["/filter", month]'>
<ion-icon name="list-outline"></ion-icon>
</ion-fab-button>
</ion-fab>
Expand Down

0 comments on commit da7d490

Please sign in to comment.