fixed changelog paging
This commit is contained in:
@ -13,13 +13,14 @@
|
||||
[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.name !== undefined || mode === 'new'"
|
||||
*ngIf="mode === 'new' || (baseSample.material && baseSample.material.name !== undefined)"
|
||||
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.name !== undefined">
|
||||
(click)="setNewMaterial(!newMaterial)"
|
||||
*ngIf="mode === 'new' || (baseSample.material && baseSample.material.name !== undefined)">
|
||||
New material
|
||||
</rb-icon-button>
|
||||
</div>
|
||||
|
@ -118,6 +118,7 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.baseSample);
|
||||
this.mode = this.router.url === '/samples/new' ? 'new' : '';
|
||||
this.loading = 7;
|
||||
this.d.load('materials', () => {
|
||||
@ -378,8 +379,6 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
cmSave() { // save measurements and conditions
|
||||
this.samples.forEach(sample => {
|
||||
if (sample.condition.condition_template) { // condition was set
|
||||
console.log(sample.condition);
|
||||
console.log(this.d.id.conditionTemplates[sample.condition.condition_template]);
|
||||
this.api.put('/sample/' + sample._id,
|
||||
{condition: pick(sample.condition,
|
||||
['condition_template', ...this.d.id.conditionTemplates[sample.condition.condition_template].parameters.map(e => e.name)]
|
||||
|
Reference in New Issue
Block a user