mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
refactor: move to eslint
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 StApps
|
||||
* Copyright (C) 2019-2022 Open StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -64,7 +64,8 @@ export interface SCAcademicEventWithoutReferences
|
||||
* @indexable
|
||||
*/
|
||||
export interface SCAcademicEvent
|
||||
extends SCEvent, SCAcademicEventWithoutReferences,
|
||||
extends SCEvent,
|
||||
SCAcademicEventWithoutReferences,
|
||||
SCThingWithCategories<SCAcademicEventCategories, SCThingWithCategoriesSpecificValues> {
|
||||
/**
|
||||
* Translated fields of an academic event
|
||||
@@ -81,7 +82,7 @@ export interface SCAcademicEvent
|
||||
* Categories of academic events
|
||||
*/
|
||||
export type SCAcademicEventCategories =
|
||||
'lecture'
|
||||
| 'lecture'
|
||||
| 'seminar'
|
||||
| 'integrated course'
|
||||
| 'written exam'
|
||||
@@ -100,8 +101,7 @@ export type SCAcademicEventCategories =
|
||||
/**
|
||||
* Translatable properties of an academic event
|
||||
*/
|
||||
export interface SCAcademicEventTranslatableProperties
|
||||
extends SCThingWithCategoriesTranslatableProperties {
|
||||
export interface SCAcademicEventTranslatableProperties extends SCThingWithCategoriesTranslatableProperties {
|
||||
/**
|
||||
* Translations of the majors of the academic event that this event belongs to
|
||||
*
|
||||
@@ -120,24 +120,26 @@ export interface SCAcademicEventTranslatableProperties
|
||||
/**
|
||||
* Meta information about academic events
|
||||
*/
|
||||
export class SCAcademicEventMeta
|
||||
extends SCThingMeta
|
||||
implements SCMetaTranslations<SCAcademicEvent> {
|
||||
export class SCAcademicEventMeta extends SCThingMeta implements SCMetaTranslations<SCAcademicEvent> {
|
||||
/**
|
||||
* Translations of fields
|
||||
*/
|
||||
fieldTranslations = {
|
||||
de: {
|
||||
...new SCEventMeta().fieldTranslations.de,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldTranslations.de,
|
||||
majors: 'Hauptfächer',
|
||||
originalCategory: 'ursprüngliche Kategorie',
|
||||
},
|
||||
en: {
|
||||
...new SCEventMeta().fieldTranslations.en,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldTranslations.en,
|
||||
majors: 'majors',
|
||||
originalCategory: 'original category',
|
||||
},
|
||||
@@ -149,8 +151,10 @@ export class SCAcademicEventMeta
|
||||
fieldValueTranslations = {
|
||||
de: {
|
||||
...new SCEventMeta().fieldValueTranslations.de,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldValueTranslations.de,
|
||||
categories: {
|
||||
'colloquium': 'Kolloquium',
|
||||
'course': 'Kurs',
|
||||
@@ -172,8 +176,10 @@ export class SCAcademicEventMeta
|
||||
},
|
||||
en: {
|
||||
...new SCEventMeta().fieldValueTranslations.en,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCAcademicEventCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldValueTranslations.en,
|
||||
type: SCThingType.AcademicEvent,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user