diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 1e65c23191773d738c6bc3c7599ecc8b6da0d576..e129e18b44b1abbea4d84d28895017a1d5474603 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,12 +1,12 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { BearbeitenComponent } from './bearbeiten/bearbeiten.component'; import { BestandComponent } from './bestand/bestand.component'; -import { BuchungComponent } from './buchung/buchung.component'; const routes: Routes = [ { path: '', redirectTo: 'bestand', pathMatch: 'full' }, { path: 'bestand', component: BestandComponent }, - { path: 'buchung', component: BuchungComponent }, + { path: 'bearbeiten', component: BearbeitenComponent }, ]; @NgModule({ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index fa70b9c7e5a18049f3e8278006b6afb48e1cad7d..7dac17d8806b017d664e96f2c71c4e8499429fe5 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -9,8 +9,8 @@ export class AppComponent { constructor(public router: Router, public route: ActivatedRoute) {} activeLink = ""; - links = ['#/bestand', '#/buchung', '#/neu']; - titles = ['Bestand', 'Buchung', 'Neu']; + links = ['#/bestand', '#/bearbeiten', '#/neu']; + titles = ['Bestand', 'Bearbeiten', 'Neu']; title = 'Lagerverwaltung'; ngOnInit(){ console.log(this.router.url); diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5aef7372d57bb8960a28d4e8282bdc320962c88b..7684f04e2f48978f6056a7c288a7b55fa1823194 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -14,17 +14,19 @@ import {MatToolbarModule} from '@angular/material/toolbar'; import {MatIconModule} from '@angular/material/icon' import {MatTabsModule} from '@angular/material/tabs'; import { MatTableModule } from '@angular/material/table'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatSelectModule } from '@angular/material/select'; +import { MatInputModule } from '@angular/material/input'; import { BestandComponent } from './bestand/bestand.component'; -import { BuchungComponent } from './buchung/buchung.component'; - +import { BearbeitenComponent } from './bearbeiten/bearbeiten.component'; const graphQL = '/api/'; @NgModule({ declarations: [ AppComponent, BestandComponent, - BuchungComponent + BearbeitenComponent ], imports: [ BrowserModule, @@ -35,7 +37,11 @@ const graphQL = '/api/'; MatToolbarModule, MatIconModule, MatTabsModule, - MatTableModule + MatTableModule, + MatFormFieldModule, + MatSelectModule, + MatFormFieldModule, + MatInputModule ], providers: [ { diff --git a/src/app/bearbeiten/bearbeiten.component.html b/src/app/bearbeiten/bearbeiten.component.html new file mode 100644 index 0000000000000000000000000000000000000000..d07f917427e38735822209d83bf5c63343ae5582 --- /dev/null +++ b/src/app/bearbeiten/bearbeiten.component.html @@ -0,0 +1,27 @@ +<div class = "Simple example"> + <mat-form-field appearance = "fill"> + <mat-label> Name </mat-label> + <input matInput> + </mat-form-field> + <br> + <mat-form-field appearance = "fill"> + <mat-label> Hersteller </mat-label> + <mat-select> + <mat-option value = "option"> Male </mat-option> + <mat-option value = "option"> Female </mat-option> + </mat-select> + </mat-form-field> + <br> + <mat-form-field appearance = "fill"> + <mat-label> Position </mat-label> + <mat-select> + <mat-option value = "option"> Male </mat-option> + <mat-option value = "option"> Female </mat-option> + </mat-select> + </mat-form-field> + <br> + <mat-form-field appearance = "fill"> + <mat-label> Lagerbestand </mat-label> + <input matInput type="number" min="0"> + </mat-form-field> + </div> \ No newline at end of file diff --git a/src/app/bearbeiten/bearbeiten.component.scss b/src/app/bearbeiten/bearbeiten.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..8337fa420913088eea55c1eb96483dbd5494fec4 --- /dev/null +++ b/src/app/bearbeiten/bearbeiten.component.scss @@ -0,0 +1,5 @@ +:host { + display: flex; + flex-direction: column; + align-items: flex-start; + } \ No newline at end of file diff --git a/src/app/buchung/buchung.component.spec.ts b/src/app/bearbeiten/bearbeiten.component.spec.ts similarity index 54% rename from src/app/buchung/buchung.component.spec.ts rename to src/app/bearbeiten/bearbeiten.component.spec.ts index 32dced1953d505ece3f9c9e92428aff85a12cc47..b28e50d174da30c39805ea25edd1ae96d051a7f5 100644 --- a/src/app/buchung/buchung.component.spec.ts +++ b/src/app/bearbeiten/bearbeiten.component.spec.ts @@ -1,20 +1,20 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { BuchungComponent } from './buchung.component'; +import { BearbeitenComponent } from './bearbeiten.component'; -describe('BuchungComponent', () => { - let component: BuchungComponent; - let fixture: ComponentFixture<BuchungComponent>; +describe('BearbeitenComponent', () => { + let component: BearbeitenComponent; + let fixture: ComponentFixture<BearbeitenComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ BuchungComponent ] + declarations: [ BearbeitenComponent ] }) .compileComponents(); }); beforeEach(() => { - fixture = TestBed.createComponent(BuchungComponent); + fixture = TestBed.createComponent(BearbeitenComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/bearbeiten/bearbeiten.component.ts b/src/app/bearbeiten/bearbeiten.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..0b9dbaff3ad881ab37a5f9b88283bac2a3f71a4f --- /dev/null +++ b/src/app/bearbeiten/bearbeiten.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-bearbeiten', + templateUrl: './bearbeiten.component.html', + styleUrls: ['./bearbeiten.component.scss'] +}) +export class BearbeitenComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/bestand/bestand.component.ts b/src/app/bestand/bestand.component.ts index 2308c7469cc117feefaeb7d24c0a8b8288cccba1..e9af24162624ec1fcde5994d7cc4b8bc42472fc7 100644 --- a/src/app/bestand/bestand.component.ts +++ b/src/app/bestand/bestand.component.ts @@ -43,7 +43,7 @@ export class BestandComponent implements OnInit { } rowClicked(row: Product) { - window.location.href = "/#/buchung?item=" + row.id + window.location.href = "/#/bearbeiten?item=" + row.id } ngOnDestroy() { diff --git a/src/app/buchung/buchung.component.html b/src/app/buchung/buchung.component.html deleted file mode 100644 index 1e5c4a2cf97ecaad98c9193946c2f8faf271e06f..0000000000000000000000000000000000000000 --- a/src/app/buchung/buchung.component.html +++ /dev/null @@ -1 +0,0 @@ -<p>buchung works!</p> diff --git a/src/app/buchung/buchung.component.scss b/src/app/buchung/buchung.component.scss deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/app/buchung/buchung.component.ts b/src/app/buchung/buchung.component.ts deleted file mode 100644 index bbe5597bee7b90202dc2bc59f5b5158c652a5abd..0000000000000000000000000000000000000000 --- a/src/app/buchung/buchung.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-buchung', - templateUrl: './buchung.component.html', - styleUrls: ['./buchung.component.scss'] -}) -export class BuchungComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -}