mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 11:42:59 +00:00
refactor: enter Goethe-Uni data (f-u)
This commit is contained in:
committed by
Rainer Killinger
parent
32c8a2149a
commit
26f3f4620b
41
config/default-f-u.ts
Normal file
41
config/default-f-u.ts
Normal file
@@ -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<SCConfigFile> = {
|
||||||
|
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;
|
||||||
@@ -21,24 +21,24 @@ const config: Partial<SCConfigFile> = {
|
|||||||
coordinates: [
|
coordinates: [
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
13.31916332244873,
|
8.660432999690723,
|
||||||
52.50796756998264,
|
50.123027017044436,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
13.336544036865234,
|
8.675496285518358,
|
||||||
52.50796756998264,
|
50.123027017044436,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
13.336544036865234,
|
8.675496285518358,
|
||||||
52.51726547416385,
|
50.13066176448642,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
13.31916332244873,
|
8.660432999690723,
|
||||||
52.51726547416385,
|
50.13066176448642,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
13.31916332244873,
|
8.660432999690723,
|
||||||
52.50796756998264,
|
50.123027017044436,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -144,8 +144,8 @@ const config: Partial<SCConfigFile> = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
name: 'StApps - Technische Universität Berlin',
|
name: 'Goethe-Uni - Goethe-Universität Frankfurt am Main',
|
||||||
privacyPolicyUrl: 'https://stappsbe01.innocampus.tu-berlin.de/_static/privacy.md',
|
privacyPolicyUrl: 'https://mobile.server.uni-frankfurt.de/_static/privacy.md',
|
||||||
settings: [
|
settings: [
|
||||||
{
|
{
|
||||||
categories: ['profile'],
|
categories: ['profile'],
|
||||||
@@ -266,7 +266,7 @@ const config: Partial<SCConfigFile> = {
|
|||||||
mappingIgnoredTags: ['minlength', 'pattern', 'see', 'tjs-format'],
|
mappingIgnoredTags: ['minlength', 'pattern', 'see', 'tjs-format'],
|
||||||
maxMultiSearchRouteQueries: 5,
|
maxMultiSearchRouteQueries: 5,
|
||||||
maxRequestBodySize: 512 * 1024,
|
maxRequestBodySize: 512 * 1024,
|
||||||
name: 'Technische Universität Berlin',
|
name: 'Goethe-Universität Frankfurt am Main',
|
||||||
namespace: '909a8cbc-8520-456c-b474-ef1525f14209',
|
namespace: '909a8cbc-8520-456c-b474-ef1525f14209',
|
||||||
sortableFields: [
|
sortableFields: [
|
||||||
{
|
{
|
||||||
@@ -464,7 +464,7 @@ const config: Partial<SCConfigFile> = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
uid: 'b-tu',
|
uid: 'f-u',
|
||||||
};
|
};
|
||||||
|
|
||||||
// tslint:disable-next-line:no-default-export
|
// tslint:disable-next-line:no-default-export
|
||||||
|
|||||||
Reference in New Issue
Block a user