Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- save() {
- const data = this.transactionForm.value;
- data.type = data.type == 'true' || data.type == true ? true : false;
- data.updated = firebase.firestore.FieldValue.serverTimestamp();
- // Date string to timestamp
- data.date = new Date(data.date.split("-").reverse().join("-")).getTime();
- let id = data.id;
- this.transCollection.doc(id).update(data);
- }
Add Comment
Please, Sign In to add comment