mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:27:32 +00:00
fix: Custom texts (#2875)
* feat: delete org * fix: return is default on custom message text * fix(projeciton): print stack trace on recover panic * chore: print panic line * fix: custom message text retunr nil, nil * fix: custom message text template * fix: remove isDefault from selection (#2876) * fix: custom message text query Co-authored-by: adlerhurst <silvan.reusser@gmail.com> Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
@@ -12,14 +12,14 @@ import { InfoSectionType } from '../info-section/info-section.component';
|
||||
})
|
||||
export class EditTextComponent implements OnInit, OnDestroy {
|
||||
@Input() label: string = '';
|
||||
@Input() current$!: Observable<{ [key: string]: any | string; }>;
|
||||
@Input() default$!: Observable<{ [key: string]: any | string; }>;
|
||||
@Input() current$!: Observable<{ [key: string]: any | string }>;
|
||||
@Input() default$!: Observable<{ [key: string]: any | string }>;
|
||||
@Input() currentlyDragged: string = '';
|
||||
@Output() changedValues: EventEmitter<{ [key: string]: string; }> = new EventEmitter();
|
||||
public currentMap: { [key: string]: string; } = {};
|
||||
@Output() changedValues: EventEmitter<{ [key: string]: string }> = new EventEmitter();
|
||||
public currentMap: { [key: string]: string } = {};
|
||||
private destroy$: Subject<void> = new Subject();
|
||||
public form!: FormGroup;
|
||||
public warnText: { [key: string]: string | undefined; } = {};
|
||||
public warnText: { [key: string]: string | undefined } = {};
|
||||
|
||||
@Input() public chips: any[] = [];
|
||||
@Input() public disabled: boolean = true;
|
||||
@@ -28,17 +28,18 @@ export class EditTextComponent implements OnInit, OnDestroy {
|
||||
public InfoSectionType: any = InfoSectionType;
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.current$.pipe(takeUntil(this.destroy$)).subscribe(value => {
|
||||
this.current$.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
||||
this.currentMap = value;
|
||||
this.form = new FormGroup({});
|
||||
Object.keys(value).map(key => {
|
||||
const control = new FormControl({ value: value[key], disabled: this.disabled });
|
||||
this.form.addControl(key, control);
|
||||
Object.keys(value).map((key) => {
|
||||
if (key !== 'isDefault') {
|
||||
const control = new FormControl({ value: value[key], disabled: this.disabled });
|
||||
this.form.addControl(key, control);
|
||||
}
|
||||
});
|
||||
|
||||
this.form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(values => this.changedValues.emit(values));
|
||||
this.form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((values) => this.changedValues.emit(values));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public ngOnDestroy(): void {
|
||||
|
Reference in New Issue
Block a user