From f99014e91d00717d79767e944fb34c3eb2258ad6 Mon Sep 17 00:00:00 2001
From: henrikburmann <haburmann@gmail.com>
Date: Fri, 29 Apr 2022 09:14:49 +0200
Subject: [PATCH] Underway with new rent

---
 src/components/RentingComponents/NewRent.vue | 65 ++++++++++++++++++++
 src/router/index.js                          |  6 ++
 src/views/RentingViews/NewRentView.vue       | 13 ++++
 3 files changed, 84 insertions(+)
 create mode 100644 src/components/RentingComponents/NewRent.vue
 create mode 100644 src/views/RentingViews/NewRentView.vue

diff --git a/src/components/RentingComponents/NewRent.vue b/src/components/RentingComponents/NewRent.vue
new file mode 100644
index 0000000..9218ebe
--- /dev/null
+++ b/src/components/RentingComponents/NewRent.vue
@@ -0,0 +1,65 @@
+<template>
+  <div class="confirmationBox">
+    <div>
+      <h1>
+        {{ title }}
+      </h1>
+    </div>
+    <div>
+      <p>{{ description }}</p>
+    </div>
+    <div>
+    <p>Fra: {{ from_time }}</p>
+    </div>
+    <div>
+    <p>Til: {{ to_time }}</p>
+    </div>
+    <div>
+    <label
+        class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400"
+        id="descriptionLabel"
+        >Skriv en melding til utleier</label>
+    <textarea
+      id="description"
+      rows="4"
+      v-bind="message"
+      class="block p-2.5 w-full text-sm text-gray-900 bg-gray-200 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
+      required
+    ></textarea>
+    </div>
+    <button @click="cancelRent">Avbryt</button>
+    <button @click="sendRent">Send forespøsel</button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "NewRent",
+  data() {
+    return {
+      //   title: "Objekt",
+      //   from_time: "2022-04-03",
+      //   to_time: "2022-04-10",
+      message: ""
+    };
+  },
+  props: {
+    newRentBox: {
+      title: String,
+      description: String,
+      from_time: Date,
+      to_time: Date,
+    },
+  },
+  methods: {
+    cancelRent() {
+      console.log("Canceled");
+    },
+    sendRent: function () {
+      console.log(this.message);
+    },
+  },
+};
+</script>
+
+<style></style>
diff --git a/src/router/index.js b/src/router/index.js
index 163dc85..d6aa727 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -98,6 +98,12 @@ const routes = [
     component: () => import("../views/CommunityViews/CommunityHomeView.vue"),
     beforeEnter: guardRoute,
   },
+  {
+    path: "/newRent",
+    name: "newRent",
+    component: () => import("../views/RentingViews/NewRentView.vue"),
+    beforeEnter: guardRoute,
+  },
 ];
 
 const router = createRouter({
diff --git a/src/views/RentingViews/NewRentView.vue b/src/views/RentingViews/NewRentView.vue
new file mode 100644
index 0000000..1f10387
--- /dev/null
+++ b/src/views/RentingViews/NewRentView.vue
@@ -0,0 +1,13 @@
+<template>
+  <NewRent> </NewRent>
+</template>
+
+<script>
+import NewRent from "@/components/RentingComponents/NewRent.vue";
+export default {
+  name: "NewRentView.vue",
+  components: {
+    NewRent,
+  },
+};
+</script>
-- 
GitLab