Allow to register custom categories
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<b-field
|
||||
v-if="config"
|
||||
:label="$t('Category')"
|
||||
label-for="category"
|
||||
class="w-full md:max-w-fit"
|
||||
@@ -44,7 +45,7 @@
|
||||
expanded
|
||||
>
|
||||
<option
|
||||
v-for="category in eventCategories"
|
||||
v-for="category in config.eventCategories"
|
||||
:value="category.id"
|
||||
:key="category.id"
|
||||
>
|
||||
@@ -665,7 +666,6 @@ import { USER_SETTINGS } from "@/graphql/user";
|
||||
import { IUser } from "@/types/current-user.model";
|
||||
import { IAddress } from "@/types/address.model";
|
||||
import { LOGGED_USER_PARTICIPATIONS } from "@/graphql/participant";
|
||||
import { eventCategories } from "@/utils/categories";
|
||||
|
||||
const DEFAULT_LIMIT_NUMBER_OF_PLACES = 10;
|
||||
|
||||
@@ -775,8 +775,6 @@ export default class EditEvent extends Vue {
|
||||
|
||||
formatList = formatList;
|
||||
|
||||
eventCategories = eventCategories;
|
||||
|
||||
@Watch("eventId", { immediate: true })
|
||||
resetFormForCreation(eventId: string): void {
|
||||
if (eventId === undefined) {
|
||||
|
||||
@@ -507,7 +507,6 @@ import { IEventMetadataDescription } from "@/types/event-metadata";
|
||||
import { eventMetaDataList } from "../../services/EventMetadata";
|
||||
import { USER_SETTINGS } from "@/graphql/user";
|
||||
import { IUser } from "@/types/current-user.model";
|
||||
import { eventCategories } from "@/utils/categories";
|
||||
|
||||
// noinspection TypeScriptValidateTypes
|
||||
@Component({
|
||||
@@ -1138,7 +1137,7 @@ export default class Event extends EventMixin {
|
||||
if (this.event?.category === "MEETING") {
|
||||
return undefined;
|
||||
}
|
||||
return eventCategories.find((eventCategory) => {
|
||||
return this.config.eventCategories.find((eventCategory) => {
|
||||
return eventCategory.id === this.event?.category;
|
||||
})?.label as string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user