Properly handle event status
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -140,21 +140,29 @@
|
||||
{{ $t('Status') }}
|
||||
</h2>
|
||||
|
||||
<div class="field">
|
||||
<b-radio v-model="event.status"
|
||||
name="status"
|
||||
:native-value="EventStatus.TENTATIVE">
|
||||
<b-field>
|
||||
<b-radio-button v-model="event.status"
|
||||
name="status"
|
||||
type="is-warning"
|
||||
:native-value="EventStatus.TENTATIVE">
|
||||
<b-icon icon="calendar-question"></b-icon>
|
||||
{{ $t('Tentative: Will be confirmed later') }}
|
||||
</b-radio>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<b-radio v-model="event.status"
|
||||
name="status"
|
||||
:native-value="EventStatus.CONFIRMED">
|
||||
</b-radio-button>
|
||||
<b-radio-button v-model="event.status"
|
||||
name="status"
|
||||
type="is-success"
|
||||
:native-value="EventStatus.CONFIRMED">
|
||||
<b-icon icon="calendar-check"></b-icon>
|
||||
{{ $t('Confirmed: Will happen') }}
|
||||
</b-radio>
|
||||
</div>
|
||||
</b-radio-button>
|
||||
<b-radio-button v-model="event.status"
|
||||
name="status"
|
||||
type="is-danger"
|
||||
:native-value="EventStatus.CANCELLED">
|
||||
<b-icon icon="calendar-remove"></b-icon>
|
||||
{{ $t("Cancelled: Won't happen") }}
|
||||
</b-radio-button>
|
||||
</b-field>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -55,7 +55,11 @@
|
||||
<div class="column is-three-quarters-desktop">
|
||||
<p class="tags" v-if="event.tags.length > 0">
|
||||
<b-tag type="is-warning" size="is-medium" v-if="event.draft">{{ $t('Draft') }}</b-tag>
|
||||
<span class="visibility" v-if="!event.draft">
|
||||
<span class="event-status" v-if="event.status !== EventStatus.CONFIRMED">
|
||||
<b-tag type="is-warning" v-if="event.status === EventStatus.TENTATIVE">{{ $t('Event to be confirmed') }}</b-tag>
|
||||
<b-tag type="is-danger" v-if="event.status === EventStatus.CANCELLED">{{ $t('Event cancelled') }}</b-tag>
|
||||
</span>
|
||||
<span class="visibility" v-if="!event.draft">
|
||||
<b-tag type="is-info" v-if="event.visibility === EventVisibility.PUBLIC">{{ $t('Public event') }}</b-tag>
|
||||
<b-tag type="is-info" v-if="event.visibility === EventVisibility.UNLISTED">{{ $t('Private event') }}</b-tag>
|
||||
</span>
|
||||
@@ -215,7 +219,7 @@
|
||||
import { EVENT_PERSON_PARTICIPATION, FETCH_EVENT, JOIN_EVENT, LEAVE_EVENT } from '@/graphql/event';
|
||||
import { Component, Prop } from 'vue-property-decorator';
|
||||
import { CURRENT_ACTOR_CLIENT } from '@/graphql/actor';
|
||||
import { EventVisibility, IEvent, IParticipant, ParticipantRole } from '@/types/event.model';
|
||||
import { EventStatus, EventVisibility, IEvent, IParticipant, ParticipantRole } from '@/types/event.model';
|
||||
import { IPerson, Person } from '@/types/actor';
|
||||
import { GRAPHQL_API_ENDPOINT } from '@/api/_entrypoint';
|
||||
import DateCalendarIcon from '@/components/Event/DateCalendarIcon.vue';
|
||||
@@ -299,6 +303,7 @@ export default class Event extends EventMixin {
|
||||
isReportModalActive: boolean = false;
|
||||
isJoinModalActive: boolean = false;
|
||||
EventVisibility = EventVisibility;
|
||||
EventStatus = EventStatus;
|
||||
RouteName = RouteName;
|
||||
|
||||
get eventTitle() {
|
||||
|
||||
Reference in New Issue
Block a user