Merged PR 706: #1878 Task Calendar Fix, changes Status correctly if click on button Erneut B...

#1878 Task Calendar Fix, changes Status correctly if click on button Erneut Bearbeiten
This commit is contained in:
Nino Righi
2021-06-14 12:15:10 +00:00
committed by Lorenz Hilpert
parent 16e3a4c0d6
commit 720fe3e5c0
2 changed files with 5 additions and 4 deletions

View File

@@ -32,7 +32,7 @@
</ng-container>
</div>
<ng-container *ngIf="showResetEditCta$ | async">
<button class="btn-cta-secondary" type="button" (click)="resetEdit()">Erneut bearbeiten</button>
<button class="btn-cta-secondary" type="button" (click)="edit()">Erneut bearbeiten</button>
<button class="btn-cta" type="button" (click)="close()">Fenster schließen</button>
</ng-container>
</div>

View File

@@ -6,7 +6,7 @@ import { UiMessageModalComponent, UiModalRef, UiModalService } from '@ui/modal';
import { isNullOrUndefined } from '@utils/common';
import { NativeContainerService } from 'native-container';
import { combineLatest, ReplaySubject } from 'rxjs';
import { map, shareReplay, switchMap } from 'rxjs/operators';
import { map, tap, shareReplay, switchMap } from 'rxjs/operators';
import { CameraCaptureModalComponent } from '../camera/camera-capture-modal.component';
@Component({
@@ -30,6 +30,7 @@ export class TaskModalComponent {
);
status$ = this.processingStatus$.pipe(
tap((x) => console.log(x)),
map((processingStatus) => {
if (processingStatus.includes('InProcess')) {
return 'In Bearbeitung';
@@ -93,8 +94,8 @@ export class TaskModalComponent {
this.close();
}
async resetEdit() {
await this.domainTaskCalendarService.resetConfirmation({ infoId: this.info.id }).toPromise();
async edit() {
await this.domainTaskCalendarService.setToEdit({ infoId: this.info.id }).toPromise();
this.reloadInfo();
}