refactor: config text and semester date bounds

This commit is contained in:
Rainer Killinger
2022-10-21 18:20:49 +02:00
parent d59b55c152
commit 1791b0df51
4 changed files with 7 additions and 11 deletions

View File

@@ -6,7 +6,6 @@ import {RecursivePartial} from '@openstapps/logger/lib/common';
/**
* This is the default configuration for the technical university of Berlin
*/
const config: RecursivePartial<SCConfigFile> = {
};
const config: RecursivePartial<SCConfigFile> = {};
export default config;

View File

@@ -6,7 +6,6 @@ import {RecursivePartial} from '@openstapps/logger/lib/common';
/**
* This is the default configuration for the university of Kassel
*/
const config: RecursivePartial<SCConfigFile> = {
};
const config: RecursivePartial<SCConfigFile> = {};
export default config;

View File

@@ -3,11 +3,9 @@
import {SCConfigFile} from '@openstapps/core';
import {RecursivePartial} from '@openstapps/logger/lib/common';
/**
* This is the default configuration for the university of Kassel
*/
const config: RecursivePartial<SCConfigFile> = {
};
const config: RecursivePartial<SCConfigFile> = {};
export default config;

View File

@@ -22,8 +22,8 @@ export function inRangeInclusive(number_: number, range: number[]): boolean {
return number_ >= range[0] && number_ <= range[1];
}
const sommerRange = [4, 9];
const winterRange = [10, 3];
const sommerRange = [4, 1];
const winterRange = [10, 1];
const month = new Date().getMonth();
const year = new Date().getFullYear();
const winterYearOffset = month < winterRange[0] ? -1 : 0;
@@ -55,14 +55,14 @@ const userGroupSetting: SCUserGroupSetting = {
'Mit welcher Benutzergruppe soll die App verwendet werden?' +
' Die Einstellung wird beispielsweise für die Vorauswahl der Preiskategorie der Mensa verwendet.',
name: 'Gruppe',
values: ['Student', 'Angestellter', 'Gast'],
values: ['Studierende', 'Angestellte', 'Gäste'],
},
en: {
description:
'The user group the app is going to be used.' +
' This settings for example is getting used for the predefined price category of mensa meals.',
name: 'Group',
values: ['student', 'employee', 'guest'],
values: ['students', 'employees', 'guests'],
},
},
type: SCThingType.Setting,