mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
[HIMA-258] when on cart confirmation page closing tab does not show the asking popup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, Input, ViewChild, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef, AfterViewInit } from '@angular/core';
|
||||
import { Process } from '../../core/models/process.model';
|
||||
import { Router } from '@angular/router';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { Store, Select } from '@ngxs/store';
|
||||
import {
|
||||
DeleteProcess,
|
||||
@@ -58,7 +58,8 @@ export class ProcessTabComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
cartCount = 0;
|
||||
cartanimation = '';
|
||||
|
||||
constructor(private store: Store, private router: Router, private cdr: ChangeDetectorRef) {}
|
||||
constructor(private store: Store, private router: Router, private cdr: ChangeDetectorRef, route: ActivatedRoute) {}
|
||||
isProcessFinished = this.router.url === '/cart/confirmation';
|
||||
|
||||
deleteProcess(process: Process) {
|
||||
this.store.dispatch(new DeleteProcess(process));
|
||||
@@ -81,7 +82,7 @@ export class ProcessTabComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
}
|
||||
|
||||
openDeleteConfirmationDialog() {
|
||||
if (this.process.closeDirectlyTab) {
|
||||
if (this.process.closeDirectlyTab || this.isProcessFinished) {
|
||||
this.deleteProcess(this.process);
|
||||
} else {
|
||||
this.processDeleteDialogComponent.openDialog();
|
||||
|
||||
Reference in New Issue
Block a user