template fixes
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<h2>{{mode === 'new' ? 'Add new sample' : 'Edit sample '}}</h2>
|
||||
<!--TODO: title-->
|
||||
<h2>{{mode === 'new' ? 'Add new sample' : 'Edit sample'}}</h2>
|
||||
|
||||
<rb-loading-spinner *ngIf="loading; else content"></rb-loading-spinner>
|
||||
|
||||
@ -14,13 +13,13 @@
|
||||
[rbFormInputAutocomplete]="autocomplete.bind(this, materialNames)" appValidate="stringOf"
|
||||
(keydown)="preventDefault($event)" (ngModelChange)="findMaterial($event)" ngModel
|
||||
[appValidateArgs]="[materialNames]" required [(ngModel)]="material.name" [autofocus]="true"
|
||||
*ngIf="baseSample.material !== undefined || mode === 'new'"
|
||||
*ngIf="baseSample.material.name !== undefined || mode === 'new'"
|
||||
title="trade name of the material, eg. Ultradur B4300 G6">
|
||||
<ng-template rbFormValidationMessage="required">Cannot be empty</ng-template>
|
||||
<ng-template rbFormValidationMessage="failure">Unknown material, add properties for new material</ng-template>
|
||||
</rb-form-input>
|
||||
<rb-icon-button class="set-new-material space-below" icon="add" mode="secondary"
|
||||
(click)="setNewMaterial(!newMaterial)" *ngIf="baseSample.material !== undefined">
|
||||
(click)="setNewMaterial(!newMaterial)" *ngIf="baseSample.material.name !== undefined">
|
||||
New material
|
||||
</rb-icon-button>
|
||||
</div>
|
||||
@ -197,8 +196,11 @@
|
||||
</button>
|
||||
</h5>
|
||||
<div *ngIf="sample.condition.condition_template" [@inOut]>
|
||||
<rb-form-select name="conditionSelect" label="Condition"
|
||||
<rb-form-select [name]="'conditionSelect-' + gIndex" label="Condition"
|
||||
[(ngModel)]="sample.condition.condition_template">
|
||||
<option [value]="sample.condition.condition_template">
|
||||
{{d.id.conditionTemplates[sample.condition.condition_template].name}} - current
|
||||
</option>
|
||||
<option *ngFor="let c of d.latest.conditionTemplates" [value]="c._id">{{c.name}}</option>
|
||||
</rb-form-select>
|
||||
|
||||
@ -234,9 +236,11 @@
|
||||
<rb-form-select [name]="'measurementTemplateSelect-' + gIndex + '-' + mIndex" label="Template"
|
||||
[(ngModel)]="measurement.measurement_template"
|
||||
(ngModelChange)="clearMeasurement(gIndex, mIndex)">
|
||||
<option [value]="sample.condition.condition_template">
|
||||
{{d.id.measurementTemplates[measurement.measurement_template].name}} - current
|
||||
</option>
|
||||
<option *ngFor="let m of d.latest.measurementTemplates" [value]="m._id">{{m.name}}</option>
|
||||
</rb-form-select>
|
||||
|
||||
<div *ngFor="let parameter of d.id.measurementTemplates[measurement.measurement_template].parameters;
|
||||
index as pIndex">
|
||||
<ng-container [ngSwitch]="(parameter.range.type ? 1 : 0) + (parameter.range.values ? 2 : 0)">
|
||||
|
Reference in New Issue
Block a user