Commit b31d0e30 authored by RenanMontenegro3's avatar RenanMontenegro3

feat:"alteração em add+ edit + visualização de navio"

parent 7227c5a2
......@@ -48,9 +48,9 @@
<div class="row">
<mat-form-field class="field medium" appearance="outline">
<mat-label>Calado Máximo</mat-label>
<input matInput type="text" formControlName="calado_maximo" [currencyMask]="{ prefix: '', thousands: '.', decimal: ',' }">
<mat-error *ngIf="empForm.get('calado_maximo')?.invalid">
{{ getErrorMessage('calado_maximo') }}
<input matInput type="text" formControlName="calado_max" [currencyMask]="{ prefix: '', thousands: '.', decimal: ',' }">
<mat-error *ngIf="empForm.get('calado_max')?.invalid">
{{ getErrorMessage('calado_max') }}
</mat-error>
</mat-form-field>
</div>
......
......@@ -71,7 +71,7 @@ export class NavioAddComponent implements OnInit {
mfold_quilha: ['', Validators.required],
categoria: ['', Validators.required],
flag: ['', Validators.required],
calado_maximo: ['', Validators.required],
calado_max: ['', Validators.required],
obs: [''],
});
......
......@@ -83,7 +83,15 @@
getErrorMessage("mfold_quilha")
}}</mat-error>
</mat-form-field>
<div class="row">
<mat-form-field class="field medium" appearance="outline">
<mat-label>Calado Máximo</mat-label>
<input matInput type="text" formControlName="calado_max" [currencyMask]="{ prefix: '', thousands: '.', decimal: ',' }">
<mat-error *ngIf="empForm.get('calado_max')?.invalid">
{{ getErrorMessage('calado_max') }}
</mat-error>
</mat-form-field>
</div>
<mat-form-field class="field medium" appearance="outline">
<mat-label>Categoria</mat-label>
<mat-select formControlName="categoria" (selectionChange)="onCategoriaChange($event.value)">
......
......@@ -72,6 +72,7 @@ export class NavioEditComponent implements OnInit {
categoria: [Number(this.data?.categoria) || '', Validators.required],
flag: [Number(this.data?.flag) || '', Validators.required],
obs: [this.data?.obs || ''],
calado_max: [Number(this.data?.calado_max) || '', Validators.required],
});
this.empForm.get('categoria')?.valueChanges.subscribe(catId => {
const cat = this.categoria.find((c: any) => c.id === catId);
......
......@@ -23,6 +23,9 @@
<div class="column" style="flex: 1 1 30%; margin-bottom: 10px;">
<p><strong>Boca:</strong> {{ data.boca || 'Não informado' }}</p>
</div>
<div class="column" style="flex: 1 1 30%; margin-bottom: 10px;">
<p><strong>Calado Máximo:</strong> {{ data.calado_max || 'Não informado' }}</p>
</div>
<div class="column" style="flex: 1 1 30%; margin-bottom: 10px;">
<p><strong>DWT:</strong> {{ data.dwt || 'Não informado' }}</p>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment