diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index a7a0a78..f8836e5 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -36,7 +36,6 @@ export class AppComponent implements OnInit{
ngOnInit() {
this.login.login().then(res => {
- console.log(res);
if (!res) {
this.router.navigate(['/']);
}
diff --git a/src/app/models/measurement.model.ts b/src/app/models/measurement.model.ts
index 8002bc5..0b8ed3d 100644
--- a/src/app/models/measurement.model.ts
+++ b/src/app/models/measurement.model.ts
@@ -8,6 +8,7 @@ export class MeasurementModel extends BaseModel {
sample_id: IdModel = null;
measurement_template: IdModel;
values: {[prop: string]: any} = {};
+ status = '';
constructor(measurementTemplate: IdModel = null) {
super();
diff --git a/src/app/models/sample.model.ts b/src/app/models/sample.model.ts
index 9172d3a..e1d3c86 100644
--- a/src/app/models/sample.model.ts
+++ b/src/app/models/sample.model.ts
@@ -17,7 +17,7 @@ export class SampleModel extends BaseModel {
measurements: MeasurementModel[] = [];
note_id: IdModel = null;
user_id: IdModel = null;
- validate = false;
+ selected = false;
notes: {
comment: string,
sample_references: {sample_id: IdModel, relation: string}[],
@@ -42,7 +42,16 @@ export class SampleModel extends BaseModel {
}
sendFormat() {
- return pick(this.conditionTemplateCheck(), ['color', 'type', 'batch', 'condition', 'material_id', 'notes']);
+ const tmp = pick(this.conditionTemplateCheck(), ['color', 'type', 'batch', 'condition', 'material_id', 'notes']);
+ Object.keys(tmp).forEach(key => {
+ if (tmp[key] === undefined) {
+ delete tmp[key];
+ }
+ });
+ if (this.material && this.material.name === undefined) {
+ delete tmp.material_id;
+ }
+ return tmp;
}
private conditionTemplateCheck() {
diff --git a/src/app/prediction/prediction.component.html b/src/app/prediction/prediction.component.html
index 4082f25..6adb6f5 100644
--- a/src/app/prediction/prediction.component.html
+++ b/src/app/prediction/prediction.component.html
@@ -44,9 +44,13 @@