added user status and prediction user
This commit is contained in:
@ -169,7 +169,7 @@
|
||||
<tr><td>Type</td><td>{{baseSample.type}}</td></tr>
|
||||
<tr><td>color</td><td>{{baseSample.color}}</td></tr>
|
||||
<tr><td>Batch</td><td>{{baseSample.batch}}</td></tr>
|
||||
<tr><td>Comment</td><td>{{baseSample.notes.comment}}</td></tr>
|
||||
<tr><td>Comment</td><td>{{baseSample.notes | exists:'comment'}}</td></tr>
|
||||
<tr *ngFor="let reference of sampleReferences.slice(0, -1)">
|
||||
<td>Sample reference</td><td>{{reference[0]}} - {{reference[1]}}</td>
|
||||
</tr>
|
||||
@ -323,7 +323,8 @@
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalDeleteConfirm>
|
||||
<rb-alert alertTitle="Are you sure?" type="danger" [okBtnLabel]="'Delete sample' + (samples.length > 1 ? 's' : '')" cancelBtnLabel="Cancel">
|
||||
<rb-alert alertTitle="Are you sure?" type="danger" [okBtnLabel]="'Delete sample' + (samples.length > 1 ? 's' : '')"
|
||||
cancelBtnLabel="Cancel">
|
||||
Do you really want to delete {{samples.length > 1 ? 'these samples' : 'this sample'}}?
|
||||
</rb-alert>
|
||||
</ng-template>
|
||||
|
@ -329,15 +329,17 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
resolve();
|
||||
}
|
||||
}).then(() => { // save sample
|
||||
this.baseSample.notes.custom_fields = {};
|
||||
this.customFields.forEach(element => {
|
||||
if (element[0] !== '') {
|
||||
this.baseSample.notes.custom_fields[element[0]] = element[1];
|
||||
}
|
||||
});
|
||||
this.baseSample.notes.sample_references = this.sampleReferences
|
||||
.filter(e => e[0] && e[1] && e[2])
|
||||
.map(e => ({sample_id: e[2], relation: e[1]}));
|
||||
if (this.baseSample.notes) {
|
||||
this.baseSample.notes.custom_fields = {};
|
||||
this.customFields.forEach(element => {
|
||||
if (element[0] !== '') {
|
||||
this.baseSample.notes.custom_fields[element[0]] = element[1];
|
||||
}
|
||||
});
|
||||
this.baseSample.notes.sample_references = this.sampleReferences
|
||||
.filter(e => e[0] && e[1] && e[2])
|
||||
.map(e => ({sample_id: e[2], relation: e[1]}));
|
||||
}
|
||||
if (this.samples.length === 0) { // only save new sample for the first time in mode new, otherwise save changes
|
||||
for (let i = 0; i < this.sampleCount; i ++) {
|
||||
this.api.post<SampleModel>('/sample/new', this.baseSample.sendFormat(), data => {
|
||||
|
Reference in New Issue
Block a user