Merged PR 243: Message bei Inaktivität geädnert

Message bei Inaktivität geädnert

Related work items: #738
This commit is contained in:
Lorenz Hilpert
2020-09-02 15:33:56 +00:00
committed by Sebastian Neumair

View File

@@ -10,7 +10,7 @@ import { ErrorService } from './error.service';
@Component({
selector: 'app-error',
templateUrl: './error.component.html',
styleUrls: ['./error.component.scss']
styleUrls: ['./error.component.scss'],
})
export class ErrorComponent implements OnInit, OnDestroy {
id = 'error-modal';
@@ -42,7 +42,7 @@ export class ErrorComponent implements OnInit, OnDestroy {
this.formatInvalidProperties(invalidProperties);
}
this.title = logout ? 'Willkommen zurück!' : 'Irgendwas hat nicht funktioniert…';
this.message = logout ? 'Sie waren seit 5 Stunden nicht in der ISA.<br> Bitte melden Sie sich erneut an.' : '';
this.message = logout ? 'Sie waren zu lange nicht in der ISA aktiv.<br>Bitte melden Sie sich erneut an.' : '';
if (this.validMessageCodes.includes(code) && !isNullOrUndefined(message)) {
this.message = message;
}
@@ -76,13 +76,9 @@ export class ErrorComponent implements OnInit, OnDestroy {
}
formatInvalidProperties(invalidProperties: string) {
const properties = invalidProperties
.replace('{', '')
.replace('}', '')
.replace(/"/g, '')
.split(',');
const properties = invalidProperties.replace('{', '').replace('}', '').replace(/"/g, '').split(',');
if (properties && properties.length > 0) {
this.invalidAttributes = properties.map(propertie => {
this.invalidAttributes = properties.map((propertie) => {
const keyValuePropertie = propertie.split(':');
return { key: keyValuePropertie[0], value: keyValuePropertie[1] };
});