Skip to content

Commit 3f9dfb4

Browse files
author
Andrea Barbasso
committed
[DURACOM-309] fix SSR build
1 parent a573770 commit 3f9dfb4

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { Injectable } from '@angular/core';
2+
import {
3+
Observable,
4+
of,
5+
} from 'rxjs';
6+
7+
import { OrejimeService } from './orejime.service';
8+
9+
10+
/**
11+
* Server implementation for the OrejimeService, representing a service for handling Orejime consent preferences and UI
12+
*/
13+
@Injectable()
14+
export class ServerOrejimeService extends OrejimeService {
15+
16+
/**
17+
* Initializes the service:
18+
* - Retrieves the current authenticated user
19+
* - Checks if the translation service is ready
20+
* - Initialize configuration for users
21+
* - Add and translate orejime configuration messages
22+
*/
23+
initialize() {
24+
}
25+
26+
/**
27+
* Return saved preferences stored in the orejime cookie
28+
*/
29+
getSavedPreferences(): Observable<any> {
30+
return of({});
31+
}
32+
33+
/**
34+
* Show the cookie consent form
35+
*/
36+
showSettings() {
37+
}
38+
39+
}

src/modules/app/server-app.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ import { MathService } from '../../app/core/shared/math.service';
5252
import { ServerMathService } from '../../app/core/shared/server-math.service';
5353
import { ServerXSRFService } from '../../app/core/xsrf/server-xsrf.service';
5454
import { XSRFService } from '../../app/core/xsrf/xsrf.service';
55+
import { OrejimeService } from '../../app/shared/cookies/orejime.service';
56+
import { ServerOrejimeService } from '../../app/shared/cookies/server-orejime.service';
5557
import { AngularticsProviderMock } from '../../app/shared/mocks/angulartics-provider.service.mock';
5658
import { Angulartics2Mock } from '../../app/shared/mocks/angulartics2.service.mock';
5759
import { Angulartics2DSpace } from '../../app/statistics/angulartics/dspace-provider';
@@ -144,5 +146,9 @@ export const serverAppConfig: ApplicationConfig = mergeApplicationConfig({
144146
provide: MathService,
145147
useClass: ServerMathService,
146148
},
149+
{
150+
provide: OrejimeService,
151+
useClass: ServerOrejimeService,
152+
},
147153
],
148154
}, commonAppConfig);

0 commit comments

Comments
 (0)