Skip to content
Snippets Groups Projects
Commit ea4c4422 authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

FIX: make user aware of single emission schedule with split timeslots (#29)

parent 858f074a
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,26 @@ ...@@ -25,7 +25,26 @@
<div v-if="loaded.schedule"> <div v-if="loaded.schedule">
<div v-if="schedule.rrule === 1"> <div v-if="schedule.rrule === 1">
<p>This is a single emission. No other timeslots in this schedule.</p> <p>
This is a single emission.
<span v-if="!loaded.scheduleTimeslots"><br>... checking for timeslots ...</span>
<span v-else>
<span v-if="scheduleTimeslots.length > 1">
But due to a previous conflict resolution there is a second timeslot, from
<b-badge variant="info">
<span v-if="timeslot.start === scheduleTimeslots[0].start">{{ prettyDateTime(scheduleTimeslots[1].start) }}</span>
<span v-else>{{ prettyDateTime(scheduleTimeslots[0].start) }}</span>
</b-badge>
to
<b-badge variant="info">
<span v-if="timeslot.start === scheduleTimeslots[0].start">{{ prettyDateTime(scheduleTimeslots[1].end) }}</span>
<span v-else>{{ prettyDateTime(scheduleTimeslots[0].end) }}</span>
</b-badge>
.
</span>
<span v-else>No other timeslots in this schedule.</span>
</span>
</p>
</div> </div>
<div v-else> <div v-else>
<p>This is a recurring event: <b>{{ rruleRender(schedule.rrule) }}</b>, until: {{ prettyDate(schedule.until) }}</p> <p>This is a recurring event: <b>{{ rruleRender(schedule.rrule) }}</b>, until: {{ prettyDate(schedule.until) }}</p>
...@@ -47,7 +66,7 @@ ...@@ -47,7 +66,7 @@
</ul> </ul>
</div> </div>
<p>What do you want to do with it?</p> <p>What do you want to do?</p>
<div align="center"> <div align="center">
<b-button-group> <b-button-group>
<b-button <b-button
...@@ -55,7 +74,8 @@ ...@@ -55,7 +74,8 @@
size="sm" size="sm"
@click="deleteFullSchedule(schedule.id)" @click="deleteFullSchedule(schedule.id)"
> >
<span v-if="schedule.rrule === 1">Delete</span> <span v-if="schedule.rrule === 1 && scheduleTimeslots.length === 1">Delete</span>
<span v-else-if="schedule.rrule === 1">Delete both</span>
<span v-else>Delete schedule + all timeslots</span> <span v-else>Delete schedule + all timeslots</span>
</b-button> </b-button>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment