adding dashbord

This commit is contained in:
2023-02-26 08:18:53 +01:00
parent eb9904a30b
commit a2945d2d9b
44 changed files with 928 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
<h1 mat-dialog-title>Add Text</h1>
<div mat-dialog-content>
<mat-form-field appearance="fill">
<mat-label>Text</mat-label>
<textarea matInput [(ngModel)]="text"></textarea>
</mat-form-field>
</div>
<div mat-dialog-actions align="end">
<button mat-button mat-dialog-close>Cancel</button>
<button mat-button mat-dialog-close (click)="onSaveClick()" cdkFocusInitial>Save</button>
</div>

View File

@@ -0,0 +1,3 @@
textarea {
height: 5em;
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AddTextDialogComponent } from './add-text-dialog.component';
describe('AddTextDialogComponent', () => {
let component: AddTextDialogComponent;
let fixture: ComponentFixture<AddTextDialogComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AddTextDialogComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(AddTextDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,18 @@
import { Component } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
@Component({
selector: 'app-add-text-dialog',
templateUrl: './add-text-dialog.component.html',
styleUrls: ['./add-text-dialog.component.scss']
})
export class AddTextDialogComponent {
text = "";
constructor(public dialogRef: MatDialogRef<string>){
}
onSaveClick(): void {
this.dialogRef.close(this.text);
}
}