mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
[HIMA-1145] fixed issue with Anrede dropdown also fixed issue with customer create data was not cleared up when closing process
This commit is contained in:
@@ -22,6 +22,8 @@ import { AppSetCurrentProcess } from '../../core/store/actions/app.actions';
|
||||
import { ProcessSelectors } from '../../core/store/selectors/process.selectors';
|
||||
import { ModuleSwitcher } from '../../core/models/app-switcher.enum';
|
||||
import { ViewRef_ } from '@angular/core/src/view';
|
||||
import { USER_FORM_STATE_KEY, USER_EXTRAS_FORM_STATE_KEY, USER_ERRORS_FORM_STATE_KEY } from '../../core/utils/app.constants';
|
||||
import { DeleteFormState } from '../../core/store/actions/forms.actions';
|
||||
|
||||
@Component({
|
||||
selector: 'app-process-tab',
|
||||
@@ -69,6 +71,7 @@ export class ProcessTabComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
this.store.dispatch(new Notify(1));
|
||||
const processes = this.store.selectSnapshot(ProcessSelectors.getProcesses) as Process[];
|
||||
if (processes) {
|
||||
this.processDeleteCleanUp();
|
||||
if (processes.length < 1) {
|
||||
this.router.navigate(['/dashboard']);
|
||||
} else {
|
||||
@@ -173,6 +176,12 @@ export class ProcessTabComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
this.router.navigate(['/cart/review']);
|
||||
}
|
||||
|
||||
private processDeleteCleanUp() {
|
||||
this.store.dispatch(new DeleteFormState(USER_FORM_STATE_KEY));
|
||||
this.store.dispatch(new DeleteFormState(USER_EXTRAS_FORM_STATE_KEY));
|
||||
this.store.dispatch(new DeleteFormState(USER_ERRORS_FORM_STATE_KEY));
|
||||
}
|
||||
|
||||
detectChanges() {
|
||||
setTimeout(() => {
|
||||
if (this.cdr !== null && this.cdr !== undefined && !(this.cdr as ViewRef_).destroyed) {
|
||||
|
||||
@@ -749,10 +749,12 @@ export class CreateCustomerCardComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
genderSelect(gender: string) {
|
||||
console.log('gender', gender);
|
||||
this.updateDataForSelectedOption('gender', gender, 'Andrede');
|
||||
}
|
||||
|
||||
titelSelect(title: string) {
|
||||
console.log('title', title);
|
||||
this.updateDataForSelectedOption('title', title, 'Titel');
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,11 @@ export class SelectComponent implements OnInit {
|
||||
@Input() set isDirty(value: boolean) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
this.dirty = value;
|
||||
if (this.value === this.label) {
|
||||
this.dirty = false;
|
||||
} else {
|
||||
this.dirty = value;
|
||||
}
|
||||
this.detectChanges();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user