Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Commit

Permalink
Merge pull request deltaproject#36 from Argetan/agenda-bugfixes
Browse files Browse the repository at this point in the history
Agenda bugfixes
  • Loading branch information
jvdoorn authored Feb 9, 2019
2 parents 3f39bc8 + 17a2f6a commit 6f2169c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/renderer/components/AgendaCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<template>
<div class="card" id="agenda">
<h1>Agenda <span v-show="this.$parent.cache.appointments.length != 0">voor {{ formatDateTime(targetDate, 'dddd') }}</span></h1>
<div :class="{ bigList: $parent.cache.appointments.length > 0 }">
<div :class="{ bigList: getAppointments(targetDate).length > 0 }">
<div class="cardLoading" v-if="!$parent.state.cached.appointments">
<i class="fas fa-circle-notch spin"></i>
</div>
Expand All @@ -12,7 +12,7 @@
<p>Geen afspraken voor {{ formatDateTime(targetDate, 'dddd') }}.</p>
</div>

<div v-for="appointment in getAppointments(targetDate)" class="bigListItem" :class="{ scrapped: appointment.cancelled }" @click="showAppointmentInfo(i)">
<div v-for="appointment in getAppointments(targetDate)" class="bigListItem" :class="{ scrapped: appointment.cancelled }" @click="showAppointmentInfo(appointment)">
<div class="itemContainer calendarItem">{{ appointment.startBy }}</div>
<div v-if="appointment.startBy != appointment.endBy" class="itemContainer calendarItem">{{ appointment.endBy }}</div>
<div class="itemDesc">
Expand Down Expand Up @@ -51,8 +51,10 @@
}

// Check if the target is on the weekends
if ([0, 6].includes(target.day())) {
if (target.day() === 6) {
target.day(7 + 1) // Next week Monday
} else if (target.day() === 0) {
target.day(1) // This week monday (because some fuckers think a week starts on Sunday)
}

return target
Expand Down

0 comments on commit 6f2169c

Please sign in to comment.