From da7a7c94f6da3c2b889da815665781860f1d0841 Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Sun, 16 Sep 2018 19:52:07 -0500 Subject: [PATCH] WIP: Integrate with API --- package-lock.json | 5 + package.json | 1 + src/app/account.service.spec.ts | 15 +++ ...accounts.service.ts => account.service.ts} | 2 +- src/app/accounts.service.spec.ts | 15 --- .../add-edit-category.component.html | 2 +- .../add-edit-category.component.ts | 6 +- .../add-edit-transaction.component.html | 2 +- .../add-edit-transaction.component.ts | 4 + src/app/api.service.ts | 39 ++++++ src/app/app.component.html | 1 + src/app/app.component.ts | 20 ++- src/app/app.module.ts | 17 ++- src/app/auth.service.ts | 6 +- src/app/budget-database.ts | 120 +++++++++++------- src/app/categories/categories.component.ts | 1 + .../category-details.component.ts | 5 +- .../category-list/category-list.component.ts | 27 +--- src/app/dashboard/dashboard.component.html | 2 +- src/app/register/register.component.html | 2 +- src/app/register/register.component.ts | 5 + .../transaction-details.component.ts | 7 +- src/app/transaction.service.ts | 65 +++++++--- src/app/transaction.ts | 18 ++- .../transactions/transactions.component.html | 7 +- src/styles.css | 4 + 26 files changed, 276 insertions(+), 122 deletions(-) create mode 100644 src/app/account.service.spec.ts rename src/app/{accounts.service.ts => account.service.ts} (77%) delete mode 100644 src/app/accounts.service.spec.ts diff --git a/package-lock.json b/package-lock.json index cecd402..fa6ec43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5829,6 +5829,11 @@ "integrity": "sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw==", "dev": true }, + "ng2-currency-mask": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ng2-currency-mask/-/ng2-currency-mask-5.3.1.tgz", + "integrity": "sha1-1z4nv2DqQj38AEAQbI6hcxbQeqs=" + }, "no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", diff --git a/package.json b/package.json index b0bbcaf..c094bbd 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "core-js": "^2.5.4", "dexie": "^2.0.4", "hammerjs": "^2.0.8", + "ng2-currency-mask": "^5.3.1", "rxjs": "^6.0.0", "zone.js": "~0.8.26" }, diff --git a/src/app/account.service.spec.ts b/src/app/account.service.spec.ts new file mode 100644 index 0000000..59b9884 --- /dev/null +++ b/src/app/account.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { AccountService } from './account.service'; + +describe('AccountService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [AccountService] + }); + }); + + it('should be created', inject([AccountService], (service: AccountService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/app/accounts.service.ts b/src/app/account.service.ts similarity index 77% rename from src/app/accounts.service.ts rename to src/app/account.service.ts index 053723b..c269b56 100644 --- a/src/app/accounts.service.ts +++ b/src/app/account.service.ts @@ -3,7 +3,7 @@ import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) -export class AccountsService { +export class AccountService { constructor() { } } diff --git a/src/app/accounts.service.spec.ts b/src/app/accounts.service.spec.ts deleted file mode 100644 index 795c14d..0000000 --- a/src/app/accounts.service.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { TestBed, inject } from '@angular/core/testing'; - -import { AccountsService } from './accounts.service'; - -describe('AccountsService', () => { - beforeEach(() => { - TestBed.configureTestingModule({ - providers: [AccountsService] - }); - }); - - it('should be created', inject([AccountsService], (service: AccountsService) => { - expect(service).toBeTruthy(); - })); -}); diff --git a/src/app/add-edit-category/add-edit-category.component.html b/src/app/add-edit-category/add-edit-category.component.html index cfd3361..74a5bcb 100644 --- a/src/app/add-edit-category/add-edit-category.component.html +++ b/src/app/add-edit-category/add-edit-category.component.html @@ -6,7 +6,7 @@ - +