mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 243: Message bei Inaktivität geädnert
Message bei Inaktivität geädnert Related work items: #738
This commit is contained in:
@@ -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] };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user