Skip to content

Commit

Permalink
Refatora combo select relacionamento laboratorio create
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerDelNobre committed Jul 27, 2021
1 parent 1f8f2ff commit 82f0d22
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { MatInputModule } from '@angular/material/input';
import { MatTableModule } from '@angular/material/table';
import { MatNativeDateModule } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatSelectModule } from '@angular/material/select';

import { AppComponent } from './app.component';
import { HeaderComponent } from './components/template/header/header.component';
Expand Down Expand Up @@ -65,6 +66,7 @@ registerLocaleData(localePt);
MatListModule,
MatInputModule,
MatTableModule,
MatSelectModule,
MatButtonModule,
MatToolbarModule,
HttpClientModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
/>
</mat-form-field>

<select [(ngModel)]="laboratorio.laboratory_domain_id" name="laboratory_domain_id">
<option
*ngFor="let laboratoryDomain of laboratoryDomains"
[ngValue]="laboratoryDomain.id"
>
{{ laboratoryDomain.name }}
</option>
</select>

<mat-form-field appearance="fill">
<input
matInput
Expand All @@ -27,6 +18,22 @@
name="serie"
/>
</mat-form-field>

<mat-form-field appearance="fill">
<mat-label>Laboratório domínio</mat-label>
<mat-select
[(ngModel)]="laboratorio.laboratory_domain_id"
name="laboratory_domain_id"
>
<mat-option
*ngFor="let laboratoryDomain of laboratoryDomains"
[value]="laboratoryDomain.id"
>
{{ laboratoryDomain.name }}
</mat-option>
</mat-select>
</mat-form-field>

<mat-form-field appearance="fill">
<input
matInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class LaboratorioCreateComponent implements OnInit {
private laboratoryDomainService: LaboratoryDomainService
) {
this.laboratorio = new Laboratorio({});
// this.laboratorio.laboratory_domain_id = 1;
}

ngOnInit(): void {
Expand Down

0 comments on commit 82f0d22

Please sign in to comment.