diff --git a/src/components/RentingComponents/NewRent.vue b/src/components/RentingComponents/NewRent.vue new file mode 100644 index 0000000000000000000000000000000000000000..9218ebe948e8246338f3c147c4315eb445320e3e --- /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 163dc85a54a6abf12fd6f9e988fd8079d48c9185..d6aa72732759d95d01eb97e562ae4ed7c45d2fe1 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 0000000000000000000000000000000000000000..1f10387a6563be15d593e0914b6a48b9966300c0 --- /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>