added help component, improved prediction with model templates
This commit is contained in:
@ -230,8 +230,6 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
if (formReady) { // fields are ready, do validation
|
||||
this.checkFormAfterInit = false;
|
||||
Object.keys(this.cmForm.form.controls).forEach(field => {
|
||||
console.log(field);
|
||||
console.log(this.cmForm.form.get(field).valid);
|
||||
this.cmForm.form.get(field).updateValueAndValidity();
|
||||
});
|
||||
}
|
||||
@ -269,7 +267,6 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
}
|
||||
new Promise<void>(resolve => {
|
||||
if (this.newMaterial) { // save material first if new one exists
|
||||
console.log(this.material);
|
||||
this.material.numbers = this.material.numbers.filter(e => e !== '');
|
||||
this.api.post<MaterialModel>('/material/new', this.material.sendFormat(), data => {
|
||||
this.d.arr.materials.push(data); // add material to data
|
||||
@ -379,7 +376,6 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
this.generatedSamples[gIndex].measurements.push(
|
||||
new MeasurementModel(this.d.latest.measurementTemplates.find(e => e.name === 'spectrum')._id)
|
||||
);
|
||||
console.log(this.d.latest.measurementTemplates.find(e => e.name === 'spectrum'));
|
||||
if (!this.charts[gIndex]) { // add array if there are no charts yet
|
||||
this.charts[gIndex] = [];
|
||||
}
|
||||
@ -402,7 +398,6 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
}
|
||||
|
||||
fileToArray(files, gIndex, mIndex, parameter) {
|
||||
console.log(files);
|
||||
for (const i in files) {
|
||||
if (files.hasOwnProperty(i)) {
|
||||
const fileReader = new FileReader();
|
||||
@ -494,7 +489,6 @@ export class SampleComponent implements OnInit, AfterContentChecked {
|
||||
this.api.get<{ _id: string, number: string }[]>(
|
||||
'/samples?status[]=validated&status[]=new&page-size=25&sort=number-asc&fields[]=number&fields[]=_id&' +
|
||||
'filters[]=%7B%22mode%22%3A%22stringin%22%2C%22field%22%3A%22number%22%2C%22values%22%3A%5B%22' + value + '%22%5D%7D', data => {
|
||||
console.log(data);
|
||||
this.sampleReferenceAutocomplete[this.currentSRIndex] = data.map(e => e.number);
|
||||
this.sampleReferenceFinds = data;
|
||||
observer.next(data.map(e => e.number));
|
||||
|
Reference in New Issue
Block a user