mirror of
https://github.com/sartography/cr-connect-bpmn.git
synced 2025-03-01 00:20:47 +00:00
Also improving the validation message display via the shared libraries. Droping the protocol-builder component, as it wasn't in use.
25 lines
457 B
TypeScript
25 lines
457 B
TypeScript
import { Injectable } from '@angular/core';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class SettingsService {
|
|
|
|
private studyIdKey = 'study_id';
|
|
|
|
constructor() { }
|
|
|
|
setStudyIdForValidation(id: number) {
|
|
localStorage.setItem(this.studyIdKey, id.toString());
|
|
}
|
|
|
|
getStudyIdForValidation() {
|
|
const value = localStorage.getItem(this.studyIdKey);
|
|
if (value) {
|
|
return parseInt(value, 10);
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|