diff --git a/assets/main.css b/assets/main.css index 3c55748..ca55f3d 100644 --- a/assets/main.css +++ b/assets/main.css @@ -384,3 +384,11 @@ section.mi .row input[type=checkbox] { top: 40px; position: absolute; } + +section.estimates .entry { + margin: 10px 0; +} + +section.estimates .entry:hover { + cursor: pointer; +} diff --git a/components/estimates.vue b/components/estimates.vue index 9500964..24c2ba5 100644 --- a/components/estimates.vue +++ b/components/estimates.vue @@ -29,10 +29,12 @@ -
+

Saved Estimates

-
{{e}}
+
+{{e.id}} - {{e.property}} - ${{e.price/100}} +
diff --git a/skouter.go b/skouter.go index 3102b5c..818f070 100644 --- a/skouter.go +++ b/skouter.go @@ -1108,6 +1108,8 @@ func createEstimate(w http.ResponseWriter, db *sql.DB, r *http.Request) { var estimate Estimate err := json.NewDecoder(r.Body).Decode(&estimate) if err != nil { http.Error(w, "Invalid fields.", 422); return } + claims, err := getClaims(r) + estimate.User = claims.Id estimate, err = insertEstimate(db, estimate) if err != nil { http.Error(w, err.Error(), 422); return }