L'échantillon d'une recette n'est plus obligatoire.
This commit is contained in:
parent
267bf28065
commit
6019b9e718
|
@ -6,7 +6,7 @@ import {Validators} from '@angular/forms'
|
|||
import {CompanyService} from '../../../company/service/company.service'
|
||||
import {map} from 'rxjs/operators'
|
||||
import {ActivatedRoute, Router} from '@angular/router'
|
||||
import {ErrorModel, ErrorService} from '../../../shared/service/error.service'
|
||||
import {ErrorService} from '../../../shared/service/error.service'
|
||||
|
||||
@Component({
|
||||
selector: 'cre-add',
|
||||
|
@ -40,7 +40,7 @@ export class AddComponent extends ErrorHandlingComponent {
|
|||
label: 'Échantillon',
|
||||
icon: 'pound',
|
||||
type: 'number',
|
||||
validator: Validators.compose([Validators.required, Validators.min(0)]),
|
||||
validator: Validators.min(0),
|
||||
errorMessages: [
|
||||
{conditionFn: errors => errors.required, message: 'Un numéro d\'échantillon est requis'},
|
||||
{conditionFn: errors => errors.min, message: 'Le numéro d\'échantillon doit être supérieur ou égal à 0'}
|
||||
|
|
|
@ -50,7 +50,7 @@ export class EditComponent extends ErrorHandlingComponent {
|
|||
label: 'Échantillon',
|
||||
icon: 'pound',
|
||||
type: 'number',
|
||||
validator: Validators.compose([Validators.required, Validators.min(0)]),
|
||||
validator: Validators.min(0),
|
||||
errorMessages: [
|
||||
{conditionFn: errors => errors.required, message: 'Un numéro d\'échantillon est requis'},
|
||||
{conditionFn: errors => errors.min, message: 'Le numéro d\'échantillon doit être supérieur ou égal à 0'}
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
|
||||
<ng-container matColumnDef="sample">
|
||||
<th mat-header-cell *matHeaderCellDef>Échantillon</th>
|
||||
<td mat-cell *matCellDef="let recipe">#{{recipe.sample}}</td>
|
||||
<td mat-cell *matCellDef="let recipe">
|
||||
<ng-container *ngIf="recipe.sample">#{{recipe.sample}}</ng-container>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Icons -->
|
||||
|
|
Loading…
Reference in New Issue