mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
@@ -25,10 +25,11 @@ import {Injectable} from '@angular/core';
|
||||
import {SCIndexResponse, SCSettingInputType, SCThingOriginType, SCThingType} from '@openstapps/core';
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {delay, map} from 'rxjs/operators';
|
||||
import {facetsMock} from './data/sample-facets';
|
||||
import {SampleThings} from './data/sample-things';
|
||||
|
||||
// tslint:disable:no-magic-numbers
|
||||
const sampleIndexResponse: SCIndexResponse = {
|
||||
export const sampleIndexResponse: SCIndexResponse = {
|
||||
app: {
|
||||
campusPolygon: {
|
||||
coordinates: [
|
||||
@@ -105,7 +106,7 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
},
|
||||
},
|
||||
],
|
||||
name: '',
|
||||
name: 'main menu',
|
||||
translations: {
|
||||
de: {
|
||||
name: 'Hauptmenü',
|
||||
@@ -132,21 +133,6 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
name: 'Your Study-App',
|
||||
translations: {
|
||||
de: {
|
||||
name: 'Deine Studi-App',
|
||||
},
|
||||
en: {
|
||||
name: 'Your Study-App',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: '',
|
||||
id: 'meta',
|
||||
items: [
|
||||
{
|
||||
icon: 'information',
|
||||
route: '/about',
|
||||
@@ -161,13 +147,13 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
},
|
||||
},
|
||||
],
|
||||
name: '',
|
||||
name: 'Your Study-App',
|
||||
translations: {
|
||||
de: {
|
||||
name: '',
|
||||
name: 'Deine Studi-App',
|
||||
},
|
||||
en: {
|
||||
name: '',
|
||||
name: 'Your Study-App',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -178,7 +164,8 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
{
|
||||
categories: ['profile'],
|
||||
defaultValue: 'student',
|
||||
description: '',
|
||||
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.',
|
||||
inputType: SCSettingInputType.SingleChoice,
|
||||
name: 'group',
|
||||
order: 1,
|
||||
@@ -216,7 +203,7 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
{
|
||||
categories: ['profile'],
|
||||
defaultValue: 'en',
|
||||
description: '',
|
||||
description: 'The language this app is going to use.',
|
||||
inputType: SCSettingInputType.SingleChoice,
|
||||
name: 'language',
|
||||
order: 0,
|
||||
@@ -250,7 +237,8 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
{
|
||||
categories: ['privacy'],
|
||||
defaultValue: false,
|
||||
description: '',
|
||||
description: 'Allow the App to use the device location to provide additional information\'s based ' +
|
||||
'on your actual location.',
|
||||
inputType: SCSettingInputType.SingleChoice,
|
||||
name: 'geoLocation',
|
||||
order: 0,
|
||||
@@ -393,16 +381,16 @@ export class FakeBackendInterceptor implements HttpInterceptor {
|
||||
if (request.body.filter.arguments.field === 'uid') {
|
||||
return this.sampleFetcher.getSampleThing(request.body.filter.arguments.value)
|
||||
// tslint:disable-next-line:no-any
|
||||
.pipe(map((sampleData: any) => {
|
||||
return new HttpResponse({status: 200, body: {data: sampleData}});
|
||||
}), delay(this.RESPONSE_DELAY)); // add delay for skeleton screens to be seen (see !16)
|
||||
.pipe(map((sampleData: any) => {
|
||||
return new HttpResponse({status: 200, body: {data: sampleData}});
|
||||
}), delay(this.RESPONSE_DELAY)); // add delay for skeleton screens to be seen (see !16)
|
||||
}
|
||||
}
|
||||
|
||||
return this.sampleFetcher.getSampleThings()
|
||||
// tslint:disable-next-line:no-any
|
||||
.pipe(map((sampleData: any) => {
|
||||
return new HttpResponse({status: 200, body: {data: sampleData}});
|
||||
return new HttpResponse({status: 200, body: {data: sampleData, facets: facetsMock}});
|
||||
}), delay(this.RESPONSE_DELAY)); // add delay for skeleton screens to be seen (see !16)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user