Skip to content

Commit

Permalink
disabled home
Browse files Browse the repository at this point in the history
  • Loading branch information
technbuzz committed Feb 13, 2020
1 parent 3502663 commit ed74215
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/app/home/home.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@


<!-- List all the expense of this month -->
<section class="ion-padding-horizontal">
<!-- <section class="ion-padding-horizontal">
<header>
<h2>{{this.currentMonth}} </h2>
<h2>{{this.total }}</h2>
Expand All @@ -103,7 +103,7 @@ <h2>{{this.total }}</h2>
<expense-item [expense]="item" (onDelete)="delete($event)"
*ngFor="let item of expenses | async; trackBy:trackByFn"></expense-item>
</ion-list>
</section>
</section> -->


<!-- List all the recurring expense -->
Expand Down
36 changes: 18 additions & 18 deletions src/app/home/home.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,24 @@ export class HomePage implements OnInit {

this.checkRecurring()

this.maxDate = this.cdo.toISOString().split('T')[0]
this.expenses = this.expCollRef.valueChanges().pipe(map(array => {
return array.map(item => {
return {
...item,
date: item.date.toDate()
}
})
}))

this.expenses.pipe(throttleTime(1500)).subscribe((values) => {
new Promise((resolve, reject) => {
this.total = values.reduce((prev, current, index, array) => {
if(index === array.length - 1) resolve('😎')
return prev + Number(current.price)
}, 0)
}) // Promise
})// forEach
// this.maxDate = this.cdo.toISOString().split('T')[0]
// this.expenses = this.expCollRef.valueChanges().pipe(map(array => {
// return array.map(item => {
// return {
// ...item,
// date: item.date.toDate()
// }
// })
// }))

// this.expenses.pipe(throttleTime(1500)).subscribe((values) => {
// new Promise((resolve, reject) => {
// this.total = values.reduce((prev, current, index, array) => {
// if(index === array.length - 1) resolve('😎')
// return prev + Number(current.price)
// }, 0)
// }) // Promise
// })// forEach

}

Expand Down

0 comments on commit ed74215

Please sign in to comment.