From b7b378806ee87d0a5c9c58e2af799a36dd1092a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20R=C3=B8skaft?= <haakoero@stud.ntnu.no> Date: Mon, 2 May 2022 14:30:35 +0200 Subject: [PATCH] Clean up the view some more --- src/components/RentingComponents/ItemInfo.vue | 6 ++---- .../DatepickerRange/DatepickerRange.vue | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/RentingComponents/ItemInfo.vue b/src/components/RentingComponents/ItemInfo.vue index 0297893..0e1cf92 100644 --- a/src/components/RentingComponents/ItemInfo.vue +++ b/src/components/RentingComponents/ItemInfo.vue @@ -21,6 +21,7 @@ {{ item.title }} </h1> </div> + <!-- TODO make this component render elements differently depending on screen size --> <div class="py-10 lg:pt-6 lg:pb-16 lg:col-start-1 lg:col-span-2 lg:border-r lg:border-gray-200 lg:pr-8" > @@ -58,7 +59,7 @@ </p> </div> </div> - <div class="mt-2"> + <div class="mt-2 md:col-span-1"> <div class="mt-2 space-y-2"> <p class="text-xl font-semibold text-gray-900"> Total pris: {{ totPrice }} kr @@ -149,18 +150,15 @@ export default { }, async getUser(userId) { this.userForId = await getUser(userId); - console.log(this.userForId); }, setDate(dateOfsomthing) { this.rentingStartDate = dateOfsomthing.startDate; this.rentingEndDate = dateOfsomthing.endDate; - console.log("This is the two dates " + this.rentingStartDate + " " + this.rentingEndDate); this.calculateTotPrice(); }, calculateTotPrice() { let amountOfDays = this.rentingEndDate - this.rentingStartDate; amountOfDays = amountOfDays / 86400000; - console.log("This is the difference in days " + amountOfDays); this.totPrice = this.item.pricePerDay * amountOfDays; } }, diff --git a/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue b/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue index 4b00f15..2b86965 100644 --- a/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue +++ b/src/components/TimepickerComponents/DatepickerRange/DatepickerRange.vue @@ -72,7 +72,7 @@ export default { type: Array, default: () => [], }, - messageOnDisplay: String || "Date Input (click to open)", + messageOnDisplay: String, }, data() { return { -- GitLab