diff --git a/frontend/src/App.vue b/frontend/src/App.vue index a5df521..c50521b 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -2,7 +2,7 @@
diff --git a/frontend/src/router.js b/frontend/src/router.js index e75547e..67906f0 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -1,6 +1,7 @@ import Vue from "vue"; import Router from "vue-router"; import Home from "./views/Home.vue"; +import Observation from "./views/Observation.vue"; Vue.use(Router); @@ -14,8 +15,7 @@ export default new Router({ { path: "/observation", name: "observation", - component: () => - import(/* webpackChunkName: "about" */ "./views/Observation.vue") + component: Observation } ] }); diff --git a/frontend/src/views/Observation.vue b/frontend/src/views/Observation.vue index 2383635..3973ce5 100644 --- a/frontend/src/views/Observation.vue +++ b/frontend/src/views/Observation.vue @@ -1,7 +1,43 @@ \ No newline at end of file +export default { + name: "observation", + data: function() { + return { + observations: [ + { + type: "", + rating: 0, + strengths: "", + improvements: "" + } + ] + }; + }, + methods: { + addAnotherObservation: function() { + console.log("Adding"); + this.observations.push({ + type: "", + rating: 0, + strengths: "", + improvements: "" + }); + }, + deleteObservation: function(index) { + this.observations.splice(index, 1); + if (this.observations.length == 0) { + this.addAnotherObservation(); + } + } + } +}; +