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
Ionic Native plugin: http://ionicframework.com/docs/native/firebase/ | |
base-page.ts | |
------------- | |
import { Firebase } from "@ionic-native/firebase"; | |
export abstract class BasePage { |
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
this.remainingAmount = this.totalOfBudgetAndContingency - spent; | |
this.paidPercentage = (this.amountPaid / this.totalOfBudgetAndContingency) * 100; | |
if (this.paidPercentage > 80) { | |
this.remainingPercentageExcludingPaid = 0; | |
this.contingencyPercentage = (totalContingency / this.totalOfBudgetAndContingency) * 100; | |
this.paidPercentage = 100 - this.contingencyPercentage; | |
} else { | |
this.remainingPercentageExcludingPaid = (this.remainingAmount / this.totalOfBudgetAndContingency) * 100; | |
this.contingencyPercentage = (totalContingency / this.totalOfBudgetAndContingency) * 100; | |
} |
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
{ | |
"name": "renoTracker", | |
"version": "0.0.1", | |
"author": "Ionic Framework", | |
"homepage": "http://ionicframework.com/", | |
"private": true, | |
"scripts": { | |
"clean": "ionic-app-scripts clean", | |
"build": "ionic-app-scripts build", | |
"lint": "ionic-app-scripts lint", |
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
Multi Budget |
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
Chart |
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
Photo |
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
Token |
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
patch |
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
async scheduleNotification(data: Transaction) { | |
let notifications: any[] = []; | |
notifications = await this.storage.get(LocalStorage.NOTIFICATIONS); | |
let firstNotificationTime = new Date(data.dueOn); | |
firstNotificationTime.setDate(firstNotificationTime.getDate()); | |
firstNotificationTime.setHours(20); | |
firstNotificationTime.setMinutes(23); | |
firstNotificationTime.setSeconds(0); | |
const id = random(1, 1000); | |
let notification = { |
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
//schedule Notification | |
async scheduleNotification(data: Transaction) { | |
let notifications: Notification[] = []; | |
notifications = await this.storage.get(LocalStorage.NOTIFICATIONS); | |
let firstNotificationTime = new Date(data.dueOn); | |
firstNotificationTime.setDate(firstNotificationTime.getDate()); | |
firstNotificationTime.setHours(21); | |
firstNotificationTime.setMinutes(23); | |
firstNotificationTime.setSeconds(0); | |
const id = random(1, 1000); |
OlderNewer