2020-08-11 14:46:58 +02:00
|
|
|
<template>
|
|
|
|
<section>
|
2020-08-31 12:40:30 +02:00
|
|
|
<div class="group-section-title" :class="{ privateSection }">
|
|
|
|
<h2>
|
|
|
|
<b-icon :icon="icon" />
|
|
|
|
<span>{{ title }}</span>
|
|
|
|
</h2>
|
|
|
|
<router-link :to="route">{{ $t("View all") }}</router-link>
|
|
|
|
</div>
|
|
|
|
<div class="main-slot">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
<div class="create-slot">
|
|
|
|
<slot name="create"></slot>
|
|
|
|
</div>
|
2020-08-11 14:46:58 +02:00
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue, Prop } from "vue-property-decorator";
|
2020-08-31 12:40:30 +02:00
|
|
|
import { Route } from "vue-router";
|
2020-08-11 14:46:58 +02:00
|
|
|
|
|
|
|
@Component
|
|
|
|
export default class GroupSection extends Vue {
|
|
|
|
@Prop({ required: true, type: String }) title!: string;
|
2020-08-31 12:40:30 +02:00
|
|
|
|
2020-08-11 14:46:58 +02:00
|
|
|
@Prop({ required: true, type: String }) icon!: string;
|
2020-08-31 12:40:30 +02:00
|
|
|
|
2020-08-11 14:46:58 +02:00
|
|
|
@Prop({ required: false, type: Boolean, default: true }) privateSection!: boolean;
|
2020-08-31 12:40:30 +02:00
|
|
|
|
|
|
|
@Prop({ required: true, type: Object }) route!: Route;
|
2020-08-11 14:46:58 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2020-08-31 12:40:30 +02:00
|
|
|
section {
|
2020-08-11 14:46:58 +02:00
|
|
|
display: flex;
|
2020-08-31 12:40:30 +02:00
|
|
|
flex-direction: column;
|
|
|
|
margin-bottom: 2rem;
|
|
|
|
border: 2px solid $violet;
|
2020-10-22 10:48:49 +02:00
|
|
|
min-height: 30vh;
|
2020-08-31 12:40:30 +02:00
|
|
|
|
|
|
|
.create-slot {
|
|
|
|
display: flex;
|
2020-11-06 11:34:32 +01:00
|
|
|
justify-content: flex-end;
|
2020-08-31 12:40:30 +02:00
|
|
|
padding-bottom: 0.5rem;
|
|
|
|
padding-right: 0.5rem;
|
2020-08-11 14:46:58 +02:00
|
|
|
}
|
|
|
|
|
2020-08-31 12:40:30 +02:00
|
|
|
.main-slot {
|
|
|
|
min-height: 5rem;
|
|
|
|
padding: 5px;
|
2020-10-22 10:48:49 +02:00
|
|
|
flex: 1;
|
2020-08-11 14:46:58 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-31 12:40:30 +02:00
|
|
|
div.group-section-title {
|
|
|
|
display: flex;
|
|
|
|
align-items: stretch;
|
|
|
|
background: $secondary;
|
|
|
|
color: #3a384c;
|
|
|
|
|
|
|
|
&.privateSection {
|
|
|
|
color: $violet-2;
|
|
|
|
background: $purple-2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ & > a {
|
|
|
|
align-self: center;
|
|
|
|
margin-right: 5px;
|
|
|
|
color: $orange-3;
|
|
|
|
}
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
/deep/ span {
|
|
|
|
display: inline;
|
|
|
|
padding: 3px 8px;
|
|
|
|
font-family: "Liberation Sans", "Helvetica Neue", Roboto, Helvetica, Arial, serif;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 30px;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ span.icon {
|
|
|
|
flex: 0;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
2020-08-11 14:46:58 +02:00
|
|
|
}
|
|
|
|
</style>
|