From af5c204eb69b4ac8dfed1ccf0928ef2ee51adf34 Mon Sep 17 00:00:00 2001 From: Immanuel Onyeka Date: Sun, 16 Jul 2023 19:53:52 -0400 Subject: [PATCH] Save estimates to database from summary view --- components/app.vue | 4 +- components/new/details.vue | 44 +++- components/new/new.vue | 18 +- components/new/summary.vue | 32 ++- migrations/0_29092022_setup_tables.sql | 3 +- skouter.go | 282 ++++++++++++++++++++++++- 6 files changed, 352 insertions(+), 31 deletions(-) diff --git a/components/app.vue b/components/app.vue index 7607860..5933b03 100644 --- a/components/app.vue +++ b/components/app.vue @@ -43,7 +43,6 @@ function getCookie(name) { function refreshToken() { const token = getCookie("skouter") - this.token = token fetch(`/api/token`, {method: 'GET', @@ -54,6 +53,8 @@ function refreshToken() { }).then(response => { if (!response.ok) { console.log("Error refreshing token.") + } else { + this.token = getCookie("skouter") } }) @@ -99,7 +100,6 @@ function getFees() { }).then (result => { if (!result || !result.length) return // Exit if token is invalid or no fees are saved this.fees = result - console.log(result) }) } diff --git a/components/new/details.vue b/components/new/details.vue index 33e88f5..e32466e 100644 --- a/components/new/details.vue +++ b/components/new/details.vue @@ -33,18 +33,39 @@

Transaction Type

- -
+
+

Occupancy

+ + + + + + +
+

Property Details

@@ -53,10 +74,10 @@
@@ -113,8 +134,8 @@ - + - + +
@@ -22,7 +25,7 @@
- +
@@ -32,6 +35,7 @@