Skip to content
Snippets Groups Projects
Verified Commit 3b0e891b authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Move chip for event status to own component

parent b261631b
No related branches found
No related tags found
1 merge request!1148Calendar events and iCal feeds
......@@ -14,16 +14,9 @@
</v-toolbar-title>
<v-spacer></v-spacer>
<slot name="badge" :selected-event="selectedEvent">
<v-chip
<cancelled-calendar-status-chip
v-if="selectedEvent.status === 'CANCELLED' && !withoutBadge"
color="error"
label
>
<v-avatar left>
<v-icon>mdi-cancel</v-icon>
</v-avatar>
{{ $t("calendar.cancelled") }}
</v-chip>
/>
</slot>
</v-toolbar>
<slot name="time" :selected-event="selectedEvent">
......@@ -64,9 +57,11 @@
<script>
import calendarFeedDetailsMixin from "../../mixins/calendarFeedDetails.js";
import CancelledCalendarStatusChip from "./CancelledCalendarStatusChip.vue";
export default {
name: "BaseCalendarFeedDetails",
components: { CancelledCalendarStatusChip },
mixins: [calendarFeedDetailsMixin],
};
</script>
<script>
export default {
name: "CalendarStatusChip",
props: {
color: {
type: String,
required: true,
},
icon: {
type: String,
required: true,
},
},
};
</script>
<template>
<v-chip :color="color" label>
<v-avatar left>
<v-icon>{{ icon }}</v-icon>
</v-avatar>
<slot></slot>
</v-chip>
</template>
<script>
import CalendarStatusChip from "./CalendarStatusChip.vue";
export default {
name: "CancelledCalendarStatusChip",
components: { CalendarStatusChip },
};
</script>
<template>
<calendar-status-chip icon="mdi-cancel" color="error">
{{ $t("calendar.cancelled") }}
</calendar-status-chip>
</template>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment