BZ 530163 - Stabilisierung
diff --git a/src/app/dialogs/shift-change/shift-change.component.ts b/src/app/dialogs/shift-change/shift-change.component.ts
index 1ba6034..41f64b3 100644
--- a/src/app/dialogs/shift-change/shift-change.component.ts
+++ b/src/app/dialogs/shift-change/shift-change.component.ts
@@ -199,7 +199,15 @@
}
}
- checkIfPersonSelected() {
+ checkIfPersonSelected() {
+ if ( !this.isFetchingResp ) {
+ this.checkIfPersonSelectedShiftChange();
+ } else {
+ this.checkIfPersonSelectedFetching();
+ }
+ }
+
+ checkIfPersonSelectedShiftChange() {
this.shiftChangeFormInValid = true;
for (const responsibilityContainer of this.responsibilityContainers) {
for (const responsibility of responsibilityContainer.responsibilityList) {
@@ -211,6 +219,20 @@
}
}
+ checkIfPersonSelectedFetching() {
+ this.shiftChangeFormInValid = true;
+ for (const responsibilityContainer of this.responsibilityContainers) {
+ for (const responsibility of responsibilityContainer.responsibilityList) {
+ if (responsibility.newResponsibleUser === this.allRelevantUsers[0].username) {
+ this.shiftChangeFormInValid = false;
+ break;
+ }
+ }
+ }
+ }
+
+
+
isNewUserPresent( resp: Responsibility ): boolean {
return resp != null && resp.newResponsibleUser != null && resp.newResponsibleUser !== '';