Allow to register custom categories

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-03-28 20:02:43 +02:00
parent f5bdedf789
commit 368911b58e
40 changed files with 4587 additions and 725 deletions

View File

@@ -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;
}