fixed dialogs params, UI fixed
This commit is contained in:
+4
-3
@@ -1,6 +1,7 @@
|
||||
<button
|
||||
mat-icon-button
|
||||
mat-stroked-button
|
||||
(click)="openDialog()"
|
||||
matTooltip="Hierarchie bearbeiten">
|
||||
<mat-icon color="primary">edit </mat-icon>
|
||||
[matTooltip]="isManager() ? 'Neue Hierarchie speichern' : 'Vorschlag machen'">
|
||||
<mat-icon color="primary">edit</mat-icon>
|
||||
{{ isManager() ? 'Neue Hierarchie speichern' : 'Vorschlag machen' }}
|
||||
</button>
|
||||
|
||||
+8
@@ -10,7 +10,12 @@ import type { RawNode } from '../hierarchy-chart.component';
|
||||
export interface HierarchyEditorDialogData {
|
||||
tree: RawNode | null;
|
||||
numberOfSuggestions: number;
|
||||
isManager: boolean;
|
||||
isSuggestion?: boolean;
|
||||
suggestionStatus?: 'new' | 'accepted' | 'rejected';
|
||||
}
|
||||
|
||||
/** Opens the tree editor for live-hierarchy edits and forwards saved trees. */
|
||||
@Component({
|
||||
selector: 'app-hierarchy-edit-dialog',
|
||||
standalone: true,
|
||||
@@ -20,6 +25,7 @@ export interface HierarchyEditorDialogData {
|
||||
export class HierarchyEditDialogComponent {
|
||||
private readonly dialog = inject(MatDialog);
|
||||
numberOfSuggestions = input<number>(0);
|
||||
isManager = input(false);
|
||||
data = input.required<RawNode | null>();
|
||||
|
||||
@Output() saved = new EventEmitter<RawNode>();
|
||||
@@ -33,6 +39,8 @@ export class HierarchyEditDialogComponent {
|
||||
data: {
|
||||
tree: this.data(),
|
||||
numberOfSuggestions: this.numberOfSuggestions(),
|
||||
isManager: this.isManager(),
|
||||
isSuggestion: false,
|
||||
},
|
||||
width: '65%',
|
||||
maxWidth: '95vw',
|
||||
|
||||
Reference in New Issue
Block a user