Commit b31d0e30 authored by RenanMontenegro3's avatar RenanMontenegro3

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

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