diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index b2a3a5b..4ea85c2 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -21,7 +21,7 @@ export class AppComponent {
bugReport = {do: '', work: ''};
constructor(
- public loginService: LoginService,
+ public login: LoginService,
private router: Router
) {
}
@@ -31,7 +31,7 @@ export class AppComponent {
}
logout() {
- this.loginService.logout();
+ this.login.logout();
this.router.navigate(['/']);
}
diff --git a/src/app/models/sample.model.ts b/src/app/models/sample.model.ts
index fd5f741..9172d3a 100644
--- a/src/app/models/sample.model.ts
+++ b/src/app/models/sample.model.ts
@@ -23,6 +23,7 @@ export class SampleModel extends BaseModel {
sample_references: {sample_id: IdModel, relation: string}[],
custom_fields: {[prop: string]: string}
} = {comment: '', sample_references: [], custom_fields: {}};
+ status = '';
added: Date = null;
deserialize(input: any): this {
diff --git a/src/app/samples/samples.component.html b/src/app/samples/samples.component.html
index 022b8a9..3666bf9 100644
--- a/src/app/samples/samples.component.html
+++ b/src/app/samples/samples.component.html
@@ -6,9 +6,9 @@
-
- Validate
+ {{validation ? 'Validate' : 'Validation'}}
@@ -19,13 +19,20 @@
+ [disabled]="!filters.status.new && !filters.status.deleted"
+ (ngModelChange)="loadSamples({firstPage: true})">
validated
-
new
+
+ deleted
+
@@ -135,7 +142,8 @@
-
+
|
{{sample.number}} |
@@ -151,12 +159,16 @@
{{sample.batch}} |
{{sample.notes | object: ['_id', 'sample_references']}} |
{{sample[key[1]] | exists: key[2]}} |
+ {{sample.status}} |
{{sample.added | date:'dd/MM/yy'}} |
-
+ *ngIf="sample.status !== 'deleted' &&
+ (login.isLevel.dev || (login.isLevel.write && sample.user_id === login.userId))">
+
+
|
@@ -208,6 +220,13 @@
{{measurement.value}} |
User | {{sampleDetailsSample.user}} |
+ Status | {{sampleDetailsSample.status}} |
+
+