This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ion-navbar *navbar> | |
<ion-title>Today</ion-title> | |
</ion-navbar> | |
<ion-content class="today"> | |
<ion-card> | |
<ion-item> | |
<button clear (click)="prevDay()" item-left> | |
<icon rewind></icon> | |
</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Page} from 'ionic/ionic'; | |
import {Calculate} from '../../services/calculate'; | |
import {Dates} from '../../services/dates'; | |
@Page({ | |
templateUrl: 'build/pages/today/today.html', | |
providers: [Calculate, Dates] | |
}) | |
export class Today { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Page, Modal, NavParams} from 'ionic/ionic'; | |
import {TransactionsService} from './transactions.service'; | |
@Page({ | |
templateUrl: 'build/pages/transactions/input-modal.html', | |
providers: [TransactionsService] | |
}) | |
export class TransactionInputModal { | |
constructor(modal: Modal, params: NavParams, transactionsService: TransactionsService) { | |
this.modal = modal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Page, Modal} from 'ionic/ionic'; | |
import {TransactionInputModal} from './input-modal'; | |
import {TransactionsService} from './transactions.service'; | |
import {ToFloat} from '../../pipes/to-float'; | |
import {DirectionIcon} from '../../components/direction-icon'; | |
@Page({ | |
templateUrl: 'build/pages/transactions/transactions.html', | |
providers: [TransactionsService], | |
pipes: [ToFloat], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {CustomStorage} from '../../storage/custom-storage'; | |
import * as _ from 'lodash'; | |
export class TransactionsService { | |
constructor() { | |
this.storage = new CustomStorage(); | |
this.createTransactionsTableIfItDoesNotExist(); | |
} | |
all() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Pipe} from 'angular2/core'; | |
import * as _ from 'lodash'; | |
@Pipe({ | |
name: 'toFloat' | |
}) | |
export class ToFloat { | |
transform(value, args) { | |
if (value === null || value === undefined || _.trim(value) === '') { | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Pipe} from 'angular2/core'; | |
import * as _ from 'lodash'; | |
@Pipe({ | |
name: 'toInteger' | |
}) | |
export class ToInteger { | |
transform(value, args) { | |
if (value === null || value === undefined || _.trim(value) === '') { | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component} from 'angular2/core'; | |
import {IONIC_DIRECTIVES} from 'ionic/ionic'; | |
@Component({ | |
selector: 'direction-icon', | |
template: ` | |
<button clear secondary *ngIf="direction === 'In'"><icon thumbs-up></icon></button> | |
<button clear danger *ngIf="direction === 'Out'"><icon thumbs-down></icon></button> | |
`, | |
directives: [IONIC_DIRECTIVES], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Page, Modal} from 'ionic/ionic'; | |
import {InputModal} from './input-modal'; | |
import {RatesService} from './rates.service'; | |
import {ToInteger} from '../../pipes/to-integer'; | |
import {ToFloat} from '../../pipes/to-float'; | |
import {DirectionIcon} from '../../components/direction-icon'; | |
@Page({ | |
templateUrl: 'build/pages/rates/rates.html', | |
providers: [RatesService], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {CustomStorage} from '../../storage/custom-storage'; | |
import * as _ from 'lodash'; | |
export class RatesService { | |
constructor() { | |
this.storage = new CustomStorage(); | |
this.createRatesTableIfItDoesNotExist(); | |
} | |
all() { |