diff --git a/config/default-f-u.ts b/config/default-f-u.ts new file mode 100644 index 00000000..988fe365 --- /dev/null +++ b/config/default-f-u.ts @@ -0,0 +1,41 @@ +// tslint:disable:no-default-export +// tslint:disable:no-magic-numbers +import {SCConfigFile} from '@openstapps/core'; +import {RecursivePartial} from '@openstapps/logger/lib/common'; +import moment from 'moment'; +import {inRangeInclusive} from '../src/common'; + +const ssRange = [4, 9]; +const wsRange = [10, 3]; +const month = moment() + .month(); +const year = moment() + .year(); +const wsYearOffset = (month < wsRange[0] ? -1 : 0); +const wsAcronym = `WS ${year + wsYearOffset}/${(year + 1 + wsYearOffset) + .toString() + .slice(-2)}`; +const ssAcronym = `SS ${year + (month <= wsRange[1] ? -1 : 0)}`; + +/** + * This is the default configuration for the technical university of Berlin + */ +const config: RecursivePartial = { + internal: { + boostings: { + default: [ + { + factor: 1, + fields: { + 'academicTerms.acronym': { + [ssAcronym]: inRangeInclusive(month, ssRange) ? 1.1 : 1.05, + [wsAcronym]: inRangeInclusive(month, wsRange) ? 1.1 : 1.05, + }, + }, + }, + ], + }, + }, +}; + +export default config; diff --git a/config/default.ts b/config/default.ts index add0f882..e636a37c 100644 --- a/config/default.ts +++ b/config/default.ts @@ -21,24 +21,24 @@ const config: Partial = { coordinates: [ [ [ - 13.31916332244873, - 52.50796756998264, + 8.660432999690723, + 50.123027017044436, ], [ - 13.336544036865234, - 52.50796756998264, + 8.675496285518358, + 50.123027017044436, ], [ - 13.336544036865234, - 52.51726547416385, + 8.675496285518358, + 50.13066176448642, ], [ - 13.31916332244873, - 52.51726547416385, + 8.660432999690723, + 50.13066176448642, ], [ - 13.31916332244873, - 52.50796756998264, + 8.660432999690723, + 50.123027017044436, ], ], ], @@ -144,8 +144,8 @@ const config: Partial = { }, }, ], - name: 'StApps - Technische Universität Berlin', - privacyPolicyUrl: 'https://stappsbe01.innocampus.tu-berlin.de/_static/privacy.md', + name: 'Goethe-Uni - Goethe-Universität Frankfurt am Main', + privacyPolicyUrl: 'https://mobile.server.uni-frankfurt.de/_static/privacy.md', settings: [ { categories: ['profile'], @@ -266,7 +266,7 @@ const config: Partial = { mappingIgnoredTags: ['minlength', 'pattern', 'see', 'tjs-format'], maxMultiSearchRouteQueries: 5, maxRequestBodySize: 512 * 1024, - name: 'Technische Universität Berlin', + name: 'Goethe-Universität Frankfurt am Main', namespace: '909a8cbc-8520-456c-b474-ef1525f14209', sortableFields: [ { @@ -464,7 +464,7 @@ const config: Partial = { ], }, }, - uid: 'b-tu', + uid: 'f-u', }; // tslint:disable-next-line:no-default-export