feat: Erstellung-Service abgeschlossen und "Create"-Button mit Click-Event hinzugefügt.
This commit is contained in:
parent
77074fbb8c
commit
87c76daa49
@ -31,7 +31,7 @@
|
|||||||
<div class="navbar-collapse justify-content-end me-5">
|
<div class="navbar-collapse justify-content-end me-5">
|
||||||
<a class="navbar-brand" [routerLink]="['/']">User Manager Portal</a>
|
<a class="navbar-brand" [routerLink]="['/']">User Manager Portal</a>
|
||||||
<button class="btn">
|
<button class="btn">
|
||||||
<mat-icon class="scale-pulse">add_to_photos</mat-icon>
|
<mat-icon class="scale-pulse" (click)="creationService.openDialog()">add_to_photos</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn" (click)="refreshService.executeAll()">
|
<button class="btn" (click)="refreshService.executeAll()">
|
||||||
<mat-icon class="turn-360">sync</mat-icon>
|
<mat-icon class="turn-360">sync</mat-icon>
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { ColorModeBttnComponent } from '../components/common/color-mode-bttn/color-mode-bttn.component';
|
import { ColorModeBttnComponent } from '../components/common/color-mode-bttn/color-mode-bttn.component';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { RefreshService } from '../services/refresh.service';
|
import { RefreshService } from '../services/refresh.service';
|
||||||
|
import { CreationService } from '../services/creation.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
standalone: true,
|
standalone: true,
|
||||||
@ -23,7 +24,7 @@ export class NavMenuComponent {
|
|||||||
}
|
}
|
||||||
isExpanded = false;
|
isExpanded = false;
|
||||||
|
|
||||||
constructor(public dialog: MatDialog, private authService: AuthenticationService, public refreshService: RefreshService) {
|
constructor(private dialog: MatDialog, private authService: AuthenticationService, public refreshService: RefreshService, public creationService : CreationService) {
|
||||||
this.authService.isAuthenticated().then().catch()
|
this.authService.isAuthenticated().then().catch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { GroupDirImportComponent } from '../components/group-dir-import/group-dir-import.component';
|
|
||||||
import { ComponentType } from '@angular/cdk/portal';
|
import { ComponentType } from '@angular/cdk/portal';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@ -8,13 +7,17 @@ import { ComponentType } from '@angular/cdk/portal';
|
|||||||
})
|
})
|
||||||
export class CreationService {
|
export class CreationService {
|
||||||
|
|
||||||
private component: ComponentType<T> = null
|
public component: ComponentType<unknown> | undefined
|
||||||
|
public width: string = "50vw";
|
||||||
|
|
||||||
constructor(private dialog: MatDialog) { }
|
constructor(private readonly dialog: MatDialog) {
|
||||||
|
}
|
||||||
|
|
||||||
importGroup() {
|
openDialog(): MatDialogRef<unknown, any> | undefined {
|
||||||
const dialogRef = this.dialog.open(GroupDirImportComponent, {
|
return this.component
|
||||||
width: "50vw"
|
? this.dialog.open(this.component, {
|
||||||
});
|
width: this.width
|
||||||
|
})
|
||||||
|
: undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user