Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Commit

Permalink
added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Gerber committed Mar 22, 2020
1 parent 72a904f commit 53a898d
Show file tree
Hide file tree
Showing 1,434 changed files with 3,405 additions and 43 deletions.
1,426 changes: 1,426 additions & 0 deletions .firebase/hosting.d3d3.cache

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "testwallet-8b31e"
}
}
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# DEMO

check the demo here: https://testwallet.web.app/

# Test Wallet

A tool to add positive and negative Transactions to an account

## Getting Started

### Installing

Install:
```
npm i
```
Serve:
````
ng serve
````
build:
````
ng build
````
build prod:
````
ng build --prod
````

## Notes
As I'm rather Johnny then the one that writtes a library for Johnny, I focused on using the created service in the front end.
The Concept is a CRUD Application based on firestore.
I didn't think it's neccesary to split it in two services. I thought it makes more sense if the transaction know to which user/account they belong instead of having an additional account object.

11 changes: 11 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"hosting": {
"public": "www",
"site": "testwallet",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
63 changes: 23 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"@babel/compat-data": "^7.8.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/transaction-details/transaction-details.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export class TransactionDetailsPage implements OnInit {
}

addTransaction() {

if (this.walletBalance > this.transaction.amount) {
console.log("Wallet Balance is:", this.walletBalance);
if (this.transaction.amount < 0 && -this.transaction.amount >= this.walletBalance ) {
this.showToast('Wallet Balance not enough');
} else {
this.transactionService.addTransaction(this.transaction).then(() => {
Expand Down
12 changes: 11 additions & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
export const environment = {
production: true
production: true,
firebase: {
apiKey: 'AIzaSyAksr7cQOEjrxZUsnSDqLhmTGAhpQYwMtA',
authDomain: 'testwallet-8b31e.firebaseapp.com',
databaseURL: 'https://testwallet-8b31e.firebaseio.com',
projectId: 'testwallet-8b31e',
storageBucket: 'testwallet-8b31e.appspot.com',
messagingSenderId: '793623729322',
appId: '1:793623729322:web:13f05f786aed03088b6cd3',
measurementId: 'G-4XG3N1G0P4'
}
};
1 change: 1 addition & 0 deletions www/10-es2015.508ffcbba145489b7fca.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions www/10-es5.508ffcbba145489b7fca.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 53a898d

Please sign in to comment.