diff --git a/web/src/app/administration/components/classification-details/classification-details.component.ts b/web/src/app/administration/components/classification-details/classification-details.component.ts index 5f02fe98b..f3b3a0f80 100644 --- a/web/src/app/administration/components/classification-details/classification-details.component.ts +++ b/web/src/app/administration/components/classification-details/classification-details.component.ts @@ -101,11 +101,13 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy { onSubmit() { this.formsValidatorService.formSubmitAttempt = true; - this.formsValidatorService.validateFormInformation(this.classificationForm, this.toggleValidationMap).then(value => { - if (value) { - this.onSave(); - } - }); + this.formsValidatorService + .validateFormInformation(this.classificationForm, this.toggleValidationMap) + .then((value) => { + if (value) { + this.onSave(); + } + }); } onRestore() { @@ -244,7 +246,10 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy { } if (model.value.length >= max && !event.altKey && !event.ctrlKey) { this.tooLongMap.set(model.name, true); - this.timeout.set(model.name, timer(3000).subscribe(() => this.tooLongMap.set(model.name, false))); + this.timeout.set( + model.name, + timer(3000).subscribe(() => this.tooLongMap.set(model.name, false)) + ); } } } diff --git a/web/src/app/administration/components/workbasket-information/workbasket-information.component.html b/web/src/app/administration/components/workbasket-information/workbasket-information.component.html index 772ca00d6..9a1eadcb3 100644 --- a/web/src/app/administration/components/workbasket-information/workbasket-information.component.html +++ b/web/src/app/administration/components/workbasket-information/workbasket-information.component.html @@ -1,130 +1,168 @@
-
-
- - - - - +
+
+ + + + + +
+

{{workbasket.name}}  + {{badgeMessage}} +

+
+ +
+
+
+ +
+ + +
{{lengthError}}
+ +
-

{{workbasket.name}}  - {{badgeMessage}} -

-
-
- -
- -
- - - - -
+ +
+ + +
{{lengthError}}
+ + +
- -
- - - - -
+ +
+ + +
{{lengthError}}
+
+ + +
{{lengthError}}
+ + +
+
- -
- - - - - - - -
+ +
+ + +
- -
- - -
- - -
-
- - -
-
- - -
-
+ +
+
+ + -
-
- - -
-
- - -
-
- - -
-
- - -
- -
- - -
-
-
- -
+
+
+ + +
{{lengthError}}
+
+
+
+
+
+ + +
{{lengthError}}
+
+
+ + +
{{lengthError}}
+
+
+ + +
{{lengthError}}
+
+
+ + +
{{lengthError}}
+
+ +
+ + +
{{lengthError}}
+
+
+
+ +
diff --git a/web/src/app/administration/components/workbasket-information/workbasket-information.component.ts b/web/src/app/administration/components/workbasket-information/workbasket-information.component.ts index 175b0de57..ea925449a 100644 --- a/web/src/app/administration/components/workbasket-information/workbasket-information.component.ts +++ b/web/src/app/administration/components/workbasket-information/workbasket-information.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { Observable, Subject, Subscription } from 'rxjs'; -import { NgForm } from '@angular/forms'; +import { Observable, Subject, Subscription, timer } from 'rxjs'; +import { NgForm, NgModel } from '@angular/forms'; import { Select, Store } from '@ngxs/store'; import { ICONTYPES } from 'app/shared/models/icon-types'; @@ -53,6 +53,9 @@ export class WorkbasketInformationComponent implements OnInit, OnChanges, OnDest customFields$: Observable; destroy$ = new Subject(); + readonly lengthError = 'You have reached the maximum length'; + tooLongMap = new Map(); + private timeout = new Map(); constructor( private workbasketService: WorkbasketService, @@ -187,4 +190,18 @@ export class WorkbasketInformationComponent implements OnInit, OnChanges, OnDest this.destroy$.next(); this.destroy$.complete(); } + + onKeyPressed(model: NgModel, max: Number): void { + if (this.timeout.has(model.name)) { + this.timeout.get(model.name).unsubscribe(); + } + console.log(model.name); + if (model.value.length >= max) { + this.tooLongMap.set(model.name, true); + this.timeout.set( + model.name, + timer(3000).subscribe(() => this.tooLongMap.set(model.name, false)) + ); + } + } } diff --git a/web/src/app/workplace/components/taskdetails-general-fields-extension/general-fields-extension.component.ts b/web/src/app/workplace/components/taskdetails-general-fields-extension/general-fields-extension.component.ts index 198d32a34..e651f6d7e 100644 --- a/web/src/app/workplace/components/taskdetails-general-fields-extension/general-fields-extension.component.ts +++ b/web/src/app/workplace/components/taskdetails-general-fields-extension/general-fields-extension.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { Task } from 'app/workplace/models/task'; @Component({ - selector: 'taskana-general-fields-extension', + selector: 'taskana-task-details-general-fields-extension', templateUrl: './general-fields-extension.component.html', styleUrls: ['./general-fields-extension.component.scss'] }) diff --git a/web/src/app/workplace/components/taskdetails/taskdetails.component.html b/web/src/app/workplace/components/taskdetails/taskdetails.component.html index 34a480b99..2ab945bbb 100644 --- a/web/src/app/workplace/components/taskdetails/taskdetails.component.html +++ b/web/src/app/workplace/components/taskdetails/taskdetails.component.html @@ -1,5 +1,6 @@
+
+
+ - + + - + + + + - +