diff --git a/web/src/app/administration/classification/details/classification-details.component.spec.ts b/web/src/app/administration/classification/details/classification-details.component.spec.ts index 217af068a..a040a33b8 100644 --- a/web/src/app/administration/classification/details/classification-details.component.spec.ts +++ b/web/src/app/administration/classification/details/classification-details.component.spec.ts @@ -6,12 +6,18 @@ import { RouterTestingModule } from '@angular/router/testing'; import { Component } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { AngularSvgIconModule } from 'angular-svg-icon'; +import { configureTests } from 'app/app.test.configuration'; + import { ClassificationDetailsComponent } from './classification-details.component'; import { SpinnerComponent } from 'app/shared/spinner/spinner.component'; import { ClassificationDefinition } from 'app/models/classification-definition'; import { LinksClassification } from 'app/models/links-classfication'; +import { Pair } from 'app/models/pair'; +// tslint:disable:max-line-length +import { ClassificationCategoriesService } from 'app/administration/services/classification-categories-service/classification-categories.service'; +// tslint:enable:max-line-length import { MasterAndDetailService } from 'app/services/masterAndDetail/master-and-detail.service'; import { RequestInProgressService } from 'app/services/requestInProgress/request-in-progress.service'; import { ClassificationsService } from 'app/administration/services/classifications/classifications.service'; @@ -20,12 +26,9 @@ import { ErrorModalService } from 'app/services/errorModal/error-modal.service'; import { AlertService } from 'app/services/alert/alert.service'; import { TreeService } from 'app/services/tree/tree.service'; import { ClassificationTypesService } from 'app/administration/services/classification-types/classification-types.service'; -// tslint:disable:max-line-length -import { ClassificationCategoriesService } from 'app/administration/services/classification-categories-service/classification-categories.service'; -// tslint:enable:max-line-length import { CustomFieldsService } from 'app/services/custom-fields/custom-fields.service'; -import { configureTests } from 'app/app.test.configuration'; -import { Pair } from 'app/models/pair'; +import { RemoveConfirmationService } from 'app/services/remove-confirmation/remove-confirmation.service'; + @Component({ selector: 'taskana-dummy-detail', @@ -42,10 +45,9 @@ describe('ClassificationDetailsComponent', () => { let component: ClassificationDetailsComponent; let fixture: ComponentFixture; const treeNodes: Array = new Array(new TreeNodeModel()); - const classificationTypes: Array = new Array('type1', 'type2'); - let classificationsSpy, classificationsTypesSpy; - let classificationsService, classificationTypesService, classificationCategoriesService; - let treeService; + + let classificationsService, classificationTypesService, classificationCategoriesService, + treeService, removeConfirmationService; beforeEach(done => { const configure = (testBed: TestBed) => { @@ -63,8 +65,10 @@ describe('ClassificationDetailsComponent', () => { classificationsService = TestBed.get(ClassificationsService); classificationTypesService = TestBed.get(ClassificationTypesService); classificationCategoriesService = TestBed.get(ClassificationCategoriesService); - classificationsSpy = spyOn(classificationsService, 'getClassifications').and.returnValue(Observable.of(treeNodes)); - classificationsTypesSpy = spyOn(classificationTypesService, 'getClassificationTypes').and.returnValue(Observable.of([])); + classificationsService = TestBed.get(ClassificationsService); + removeConfirmationService = TestBed.get(RemoveConfirmationService); + spyOn(classificationsService, 'getClassifications').and.returnValue(Observable.of(treeNodes)); + spyOn(classificationTypesService, 'getClassificationTypes').and.returnValue(Observable.of([])); spyOn(classificationCategoriesService, 'getCategories').and.returnValue(Observable.of(['firstCategory', 'secondCategory'])); spyOn(classificationsService, 'deleteClassification').and.returnValue(Observable.of(true)); spyOn(classificationCategoriesService, 'getCategoryIcon').and.returnValue(new Pair('assets/icons/categories/external.svg')); @@ -84,8 +88,8 @@ describe('ClassificationDetailsComponent', () => { it('should trigger treeService remove node id after removing a node', () => { const treeServiceSpy = spyOn(treeService, 'setRemovedNodeId'); - component.removeClassification(); + removeConfirmationService.runCallbackFunction(); expect(treeServiceSpy).toHaveBeenCalledWith('id1'); }); diff --git a/web/src/app/administration/classification/details/classification-details.component.ts b/web/src/app/administration/classification/details/classification-details.component.ts index 4e615c461..8df2d0a9a 100644 --- a/web/src/app/administration/classification/details/classification-details.component.ts +++ b/web/src/app/administration/classification/details/classification-details.component.ts @@ -17,6 +17,8 @@ import { RequestInProgressService } from 'app/services/requestInProgress/request import { AlertService } from 'app/services/alert/alert.service'; import { TreeService } from 'app/services/tree/tree.service'; import { ClassificationTypesService } from 'app/administration/services/classification-types/classification-types.service'; +import { RemoveConfirmationService } from 'app/services/remove-confirmation/remove-confirmation.service'; + // tslint:disable:max-line-length import { ClassificationCategoriesService } from 'app/administration/services/classification-categories-service/classification-categories.service'; // tslint:enable:max-line-length @@ -71,7 +73,8 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy { private classificationTypeService: ClassificationTypesService, private categoryService: ClassificationCategoriesService, private domainService: DomainService, - private customFieldsService: CustomFieldsService) { } + private customFieldsService: CustomFieldsService, + private removeConfirmationService: RemoveConfirmationService) { } ngOnInit() { this.classificationTypeService.getClassificationTypes().subscribe((classificationTypes: Array) => { @@ -126,27 +129,8 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy { } removeClassification() { - if (!this.classification || !this.classification.classificationId) { - this.errorModalService.triggerError( - new ErrorModel('There is no classification selected', 'Please check if you are creating a classification')); - return false; - } - this.requestInProgressService.setRequestInProgress(true); - this.treeService.setRemovedNodeId(this.classification.classificationId); - - this.classificationRemoveSubscription = this.classificationsService - .deleteClassification(this.classification._links.self.href) - .subscribe(() => { - const key = this.classification.key; - this.classification = undefined; - this.afterRequest(); - this.classificationsService.selectClassification(undefined); - this.router.navigate(['administration/classifications']); - this.alertService.triggerAlert(new AlertModel(AlertType.SUCCESS, `Classification ${key} was removed successfully`)) - }, error => { - this.errorModalService.triggerError(new ErrorModel('There was error while removing your classification', error)) - this.afterRequest(); - }) + this.removeConfirmationService.setRemoveConfirmation(this.removeClassificationConfirmation.bind(this), + `You are going to delete classification: ${this.classification.key}. Can you confirm this action?`); } onSave() { @@ -242,6 +226,30 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy { }); } + private removeClassificationConfirmation() { + + if (!this.classification || !this.classification.classificationId) { + this.errorModalService.triggerError( + new ErrorModel('There is no classification selected', 'Please check if you are creating a classification')); + return false; + } + this.requestInProgressService.setRequestInProgress(true); + this.treeService.setRemovedNodeId(this.classification.classificationId); + + this.classificationRemoveSubscription = this.classificationsService + .deleteClassification(this.classification._links.self.href) + .subscribe(() => { + const key = this.classification.key; + this.classification = undefined; + this.afterRequest(); + this.classificationsService.selectClassification(undefined); + this.router.navigate(['administration/classifications']); + this.alertService.triggerAlert(new AlertModel(AlertType.SUCCESS, `Classification ${key} was removed successfully`)) + }, error => { + this.errorModalService.triggerError(new ErrorModel('There was error while removing your classification', error)) + this.afterRequest(); + }) + } ngOnDestroy(): void { diff --git a/web/src/app/administration/workbasket/details/information/workbasket-information.component.ts b/web/src/app/administration/workbasket/details/information/workbasket-information.component.ts index 9f00b07ac..e86a7ee8c 100644 --- a/web/src/app/administration/workbasket/details/information/workbasket-information.component.ts +++ b/web/src/app/administration/workbasket/details/information/workbasket-information.component.ts @@ -1,9 +1,7 @@ -import { Component, OnInit, Input, Output, OnDestroy, OnChanges, SimpleChanges } from '@angular/core'; -import { FormGroup } from '@angular/forms'; -import { ActivatedRoute, Params, Router, NavigationStart } from '@angular/router'; +import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subscription } from 'rxjs/Subscription'; -import { IconTypeComponent } from 'app/administration/components/type-icon/icon-type.component'; import { ICONTYPES } from 'app/models/type'; import { ErrorModel } from 'app/models/modal-error'; import { ACTION } from 'app/models/action'; @@ -16,8 +14,8 @@ import { ErrorModalService } from 'app/services/errorModal/error-modal.service'; import { SavingWorkbasketService, SavingInformation } from 'app/administration/services/saving-workbaskets/saving-workbaskets.service'; import { WorkbasketService } from 'app/services/workbasket/workbasket.service'; import { RequestInProgressService } from 'app/services/requestInProgress/request-in-progress.service'; -import { TitlesService } from 'app/services/titles/titles.service'; import { CustomFieldsService } from 'app/services/custom-fields/custom-fields.service'; +import { RemoveConfirmationService } from 'app/services/remove-confirmation/remove-confirmation.service'; @Component({ selector: 'taskana-workbasket-information', @@ -53,7 +51,8 @@ export class WorkbasketInformationComponent implements OnInit, OnChanges, OnDest private errorModalService: ErrorModalService, private savingWorkbasket: SavingWorkbasketService, private requestInProgressService: RequestInProgressService, - private customFieldsService: CustomFieldsService) { + private customFieldsService: CustomFieldsService, + private removeConfirmationService: RemoveConfirmationService) { this.allTypes = new Map([['PERSONAL', 'Personal'], ['GROUP', 'Group'], ['CLEARANCE', 'Clearance'], ['TOPIC', 'Topic']]) @@ -103,18 +102,8 @@ export class WorkbasketInformationComponent implements OnInit, OnChanges, OnDest } removeWorkbasket() { - this.requestInProgressService.setRequestInProgress(true); - this.workbasketService.deleteWorkbasket(this.workbasket._links.self.href).subscribe(response => { - this.requestInProgressService.setRequestInProgress(false); - this.workbasketService.triggerWorkBasketSaved(); - this.alertService.triggerAlert(new AlertModel(AlertType.SUCCESS, - `Workbasket ${this.workbasket.workbasketId} was removed successfully`)) - this.router.navigate(['administration/workbaskets']); - }, error => { - this.requestInProgressService.setRequestInProgress(false); - this.errorModalService.triggerError(new ErrorModel( - `There was an error deleting workbasket ${this.workbasket.workbasketId}`, error)) - }); + this.removeConfirmationService.setRemoveConfirmation(this.onRemoveConfirmed.bind(this), + `You are going to delete workbasket: ${this.workbasket.key}. Can you confirm this action?`); } copyWorkbasket() { @@ -172,6 +161,21 @@ export class WorkbasketInformationComponent implements OnInit, OnChanges, OnDest this.workbasket.modified = date; } + private onRemoveConfirmed() { + this.requestInProgressService.setRequestInProgress(true); + this.workbasketService.deleteWorkbasket(this.workbasket._links.self.href).subscribe(response => { + this.requestInProgressService.setRequestInProgress(false); + this.workbasketService.triggerWorkBasketSaved(); + this.alertService.triggerAlert(new AlertModel(AlertType.SUCCESS, + `Workbasket ${this.workbasket.workbasketId} was removed successfully`)) + this.router.navigate(['administration/workbaskets']); + }, error => { + this.requestInProgressService.setRequestInProgress(false); + this.errorModalService.triggerError(new ErrorModel( + `There was an error deleting workbasket ${this.workbasket.workbasketId}`, error)) + }); + } + ngOnDestroy() { if (this.workbasketSubscription) { this.workbasketSubscription.unsubscribe(); } if (this.routeSubscription) { this.routeSubscription.unsubscribe(); } diff --git a/web/src/app/app.component.html b/web/src/app/app.component.html index 57c672464..3e389cba6 100644 --- a/web/src/app/app.component.html +++ b/web/src/app/app.component.html @@ -5,5 +5,6 @@ + diff --git a/web/src/app/app.component.spec.ts b/web/src/app/app.component.spec.ts index 6736c809b..a2eb9171a 100644 --- a/web/src/app/app.component.spec.ts +++ b/web/src/app/app.component.spec.ts @@ -6,12 +6,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { HttpClientModule } from '@angular/common/http'; import { SharedModule } from 'app/shared/shared.module'; -import { ErrorModalService } from './services/errorModal/error-modal.service'; -import { RequestInProgressService } from './services/requestInProgress/request-in-progress.service'; -import { AlertService } from './services/alert/alert.service'; -import { OrientationService } from './services/orientation/orientation.service'; -import { SelectedRouteService } from './services/selected-route/selected-route'; - import { NavBarComponent } from './components/nav-bar/nav-bar.component'; describe('AppComponent', () => { @@ -32,8 +26,7 @@ describe('AppComponent', () => { RouterTestingModule.withRoutes(routes), HttpClientModule, SharedModule - ], - providers: [ErrorModalService, RequestInProgressService, AlertService, OrientationService, SelectedRouteService] + ] }).compileComponents(); fixture = TestBed.createComponent(AppComponent); diff --git a/web/src/app/app.module.ts b/web/src/app/app.module.ts index ba687f24c..804f1d275 100644 --- a/web/src/app/app.module.ts +++ b/web/src/app/app.module.ts @@ -32,6 +32,7 @@ import { TitlesService } from 'app/services/titles/titles.service'; import { CustomFieldsService } from 'app/services/custom-fields/custom-fields.service'; import { WindowRefService } from 'app/services/window/window.service'; import { TaskanaEngineService } from 'app/services/taskana-engine/taskana-engine.service'; +import { RemoveConfirmationService } from './services/remove-confirmation/remove-confirmation.service'; /** * Components @@ -106,7 +107,8 @@ export function startupServiceFactory(startupService: StartupService): () => Pro TreeService, TitlesService, CustomFieldsService, - TaskanaEngineService + TaskanaEngineService, + RemoveConfirmationService ], bootstrap: [AppComponent] }) diff --git a/web/src/app/app.test.configuration.ts b/web/src/app/app.test.configuration.ts index 8633e2431..2dae7a4e1 100644 --- a/web/src/app/app.test.configuration.ts +++ b/web/src/app/app.test.configuration.ts @@ -8,11 +8,18 @@ import { BrowserDynamicTestingModule, platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; + import { TaskanaEngineServiceMock } from './services/taskana-engine/taskana-engine.mock.service'; import { TaskanaEngineService } from './services/taskana-engine/taskana-engine.service'; import { DomainService } from './services/domain/domain.service'; import { DomainServiceMock } from './services/domain/domain.service.mock'; import { CustomFieldsService } from 'app/services/custom-fields/custom-fields.service'; +import { RemoveConfirmationService } from 'app/services/remove-confirmation/remove-confirmation.service'; +import { AlertService } from './services/alert/alert.service'; +import { ErrorModalService } from './services/errorModal/error-modal.service'; +import { RequestInProgressService } from './services/requestInProgress/request-in-progress.service'; +import { OrientationService } from './services/orientation/orientation.service'; +import { SelectedRouteService } from './services/selected-route/selected-route'; export const configureTests = (configure: (testBed: TestBed) => void) => { @@ -27,7 +34,8 @@ export const configureTests = (configure: (testBed: TestBed) => void) => { configure(testBed); testBed.configureTestingModule({ providers: [{ provide: TaskanaEngineService, useClass: TaskanaEngineServiceMock }, - { provide: DomainService, useClass: DomainServiceMock }, CustomFieldsService] + { provide: DomainService, useClass: DomainServiceMock }, CustomFieldsService, RemoveConfirmationService, + AlertService, ErrorModalService, RequestInProgressService, OrientationService, SelectedRouteService] }); return testBed.compileComponents().then(() => testBed); diff --git a/web/src/app/services/remove-confirmation/remove-confirmation.service.ts b/web/src/app/services/remove-confirmation/remove-confirmation.service.ts new file mode 100644 index 000000000..aedd11c2b --- /dev/null +++ b/web/src/app/services/remove-confirmation/remove-confirmation.service.ts @@ -0,0 +1,25 @@ +import { Injectable } from '@angular/core'; +import { Subject } from 'rxjs/Subject'; +import { Observable } from 'rxjs/Observable'; + +@Injectable() +export class RemoveConfirmationService { + + private removeConfirmationCallbackSubject = new Subject<{ callback: Function, message: string }>(); + private removeConfirmationCallback: Function; + + constructor() { } + + setRemoveConfirmation(callback: Function, message: string) { + this.removeConfirmationCallback = callback; + this.removeConfirmationCallbackSubject.next({ callback: callback, message: message }); + } + + getRemoveConfirmation(): Observable<{ callback: Function, message: string }> { + return this.removeConfirmationCallbackSubject.asObservable(); + } + + runCallbackFunction() { + this.removeConfirmationCallback(); + } +} diff --git a/web/src/app/shared/general-message-modal/general-message-modal.component.ts b/web/src/app/shared/general-message-modal/general-message-modal.component.ts index 80d80315f..7292f0d83 100644 --- a/web/src/app/shared/general-message-modal/general-message-modal.component.ts +++ b/web/src/app/shared/general-message-modal/general-message-modal.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input, ViewChild, OnChanges, SimpleChanges, Output, EventEmitter, DoCheck } from '@angular/core'; +import { Component, Input, ViewChild, OnChanges, SimpleChanges, Output, EventEmitter } from '@angular/core'; declare var $: any; @Component({ diff --git a/web/src/app/shared/remove-confirmation/remove-confirmation.component.html b/web/src/app/shared/remove-confirmation/remove-confirmation.component.html new file mode 100644 index 000000000..47ddca981 --- /dev/null +++ b/web/src/app/shared/remove-confirmation/remove-confirmation.component.html @@ -0,0 +1,24 @@ + diff --git a/web/src/app/shared/remove-confirmation/remove-confirmation.component.scss b/web/src/app/shared/remove-confirmation/remove-confirmation.component.scss new file mode 100644 index 000000000..3a296c0d1 --- /dev/null +++ b/web/src/app/shared/remove-confirmation/remove-confirmation.component.scss @@ -0,0 +1,4 @@ +.word-break{word-break: break-word; } +.modal{ + z-index: 1051; +} \ No newline at end of file diff --git a/web/src/app/shared/remove-confirmation/remove-confirmation.component.spec.ts b/web/src/app/shared/remove-confirmation/remove-confirmation.component.spec.ts new file mode 100644 index 000000000..77956e8ff --- /dev/null +++ b/web/src/app/shared/remove-confirmation/remove-confirmation.component.spec.ts @@ -0,0 +1,29 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RemoveConfirmationComponent } from './remove-confirmation.component'; +import { configureTests } from 'app/app.test.configuration'; +import { RemoveConfirmationService } from '../../services/remove-confirmation/remove-confirmation.service'; + +describe('RemoveConfirmationComponent', () => { + let component: RemoveConfirmationComponent; + let fixture: ComponentFixture; + beforeEach(done => { + const configure = (testBed: TestBed) => { + testBed.configureTestingModule({ + declarations: [RemoveConfirmationComponent], + providers: [] + }) + }; + configureTests(configure).then(testBed => { + fixture = TestBed.createComponent(RemoveConfirmationComponent); + component = fixture.componentInstance; + TestBed.get(RemoveConfirmationService); + fixture.detectChanges(); + done(); + }); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web/src/app/shared/remove-confirmation/remove-confirmation.component.ts b/web/src/app/shared/remove-confirmation/remove-confirmation.component.ts new file mode 100644 index 000000000..2575e73f9 --- /dev/null +++ b/web/src/app/shared/remove-confirmation/remove-confirmation.component.ts @@ -0,0 +1,34 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { RemoveConfirmationService } from 'app/services/remove-confirmation/remove-confirmation.service'; +declare var $: any; + +@Component({ + selector: 'taskana-remove-confirmation', + templateUrl: './remove-confirmation.component.html', + styleUrls: ['./remove-confirmation.component.scss'] +}) +export class RemoveConfirmationComponent implements OnInit { + + + private confirmationCallback: Function; + message: string; + + @ViewChild('removeConfirmationModal') + private modal; + + constructor(private removeConfirmationService: RemoveConfirmationService) { } + + ngOnInit() { + this.removeConfirmationService.getRemoveConfirmation().subscribe(({ callback, message }) => { + this.confirmationCallback = callback; + this.message = message; + $(this.modal.nativeElement).modal('toggle'); + }) + } + + confirmAction() { + this.confirmationCallback(); + } + + +} diff --git a/web/src/app/shared/shared.module.ts b/web/src/app/shared/shared.module.ts index cc5808a4a..507d9b6ac 100644 --- a/web/src/app/shared/shared.module.ts +++ b/web/src/app/shared/shared.module.ts @@ -14,6 +14,7 @@ import { AlertComponent } from 'app/shared/alert/alert.component'; import { MasterAndDetailComponent } from 'app/shared/master-and-detail/master-and-detail.component'; import { TaskanaTreeComponent } from 'app/shared/tree/tree.component'; import { TypeAheadComponent } from 'app/shared/type-ahead/type-ahead.component'; +import { RemoveConfirmationComponent } from 'app/shared/remove-confirmation/remove-confirmation.component'; /** * Pipes @@ -30,7 +31,7 @@ import { MapToIterable } from './pipes/mapToIterable/mapToIterable'; */ import { HttpClientInterceptor } from './services/httpClientInterceptor/http-client-interceptor.service'; import { AccessIdsService } from './services/access-ids/access-ids.service'; -import {SortComponent} from './sort/sort.component'; +import { SortComponent } from './sort/sort.component'; @@ -58,7 +59,8 @@ const DECLARATIONS = [ SpreadNumberPipe, OrderBy, MapToIterable, - SortComponent + SortComponent, + RemoveConfirmationComponent ]; @NgModule({ diff --git a/web/src/app/workplace/taskdetails/taskdetails.component.ts b/web/src/app/workplace/taskdetails/taskdetails.component.ts index 36e3d86af..706255e3e 100644 --- a/web/src/app/workplace/taskdetails/taskdetails.component.ts +++ b/web/src/app/workplace/taskdetails/taskdetails.component.ts @@ -1,9 +1,11 @@ -import {Component, OnDestroy, OnInit} from '@angular/core'; -import {Task} from 'app/workplace/models/task'; -import {ActivatedRoute, Router} from '@angular/router'; -import {TaskService} from 'app/workplace/services/task.service'; -import {Subscription} from 'rxjs/Subscription'; -import {Location} from '@angular/common'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Subscription } from 'rxjs/Subscription'; +import { ActivatedRoute, Router } from '@angular/router'; + +import { TaskService } from 'app/workplace/services/task.service'; +import { RemoveConfirmationService } from 'app/services/remove-confirmation/remove-confirmation.service'; + +import { Task } from 'app/workplace/models/task'; @Component({ selector: 'taskana-task-details', @@ -17,9 +19,9 @@ export class TaskdetailsComponent implements OnInit, OnDestroy { private routeSubscription: Subscription; constructor(private route: ActivatedRoute, - private taskService: TaskService, - private router: Router, - private location: Location) { + private taskService: TaskService, + private router: Router, + private removeConfirmationService: RemoveConfirmationService) { } ngOnInit() { @@ -47,7 +49,7 @@ export class TaskdetailsComponent implements OnInit, OnDestroy { } openTask(taskId: string) { - this.router.navigate([{outlets: {detail: `task/${taskId}`}}], {relativeTo: this.route.parent}); + this.router.navigate([{ outlets: { detail: `task/${taskId}` } }], { relativeTo: this.route.parent }); } workOnTaskDisabled(): boolean { @@ -55,6 +57,11 @@ export class TaskdetailsComponent implements OnInit, OnDestroy { } deleteTask(): void { + this.removeConfirmationService.setRemoveConfirmation(this.deleteTaskConfirmation.bind(this), + `You are going to delete Task: ${this.task.taskId}. Can you confirm this action?`); + } + + deleteTaskConfirmation(): void { this.taskService.deleteTask(this.task).subscribe(); this.taskService.publishDeletedTask(this.task); this.task = null; diff --git a/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html b/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html index e8184f2fd..b5daa456c 100644 --- a/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html +++ b/web/src/app/workplace/tasklist/tasklist-toolbar/tasklist-toolbar.component.html @@ -1,22 +1,17 @@
- + - +
- +
-