Prevent deleted datasets to be shown on th dataset List
This commit is contained in:
parent
ec0fd47021
commit
f480ee6986
|
@ -105,7 +105,7 @@ public class DatasetRepository extends ElasticRepository<Dataset, DatasetCriteri
|
|||
boolQuery = boolQuery.should(QueryBuilders.termsQuery("tags.name.keyword", criteria.getTags().stream().map(Tag::getName).collect(Collectors.toList())));
|
||||
}
|
||||
|
||||
if (boolQuery.should().isEmpty()) {
|
||||
if (boolQuery.should().isEmpty() && boolQuery.mustNot().isEmpty()) {
|
||||
boolQuery.should(QueryBuilders.matchAllQuery());
|
||||
} else {
|
||||
boolQuery.minimumShouldMatch(boolQuery.should().size());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="listing-item">
|
||||
<div class="listing-item" *ngIf="!isDeleted">
|
||||
<a [routerLink]="['/datasets/edit/' + dataset.id]">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
|
|
|
@ -15,12 +15,21 @@ export class DatasetListingItemComponent implements OnInit {
|
|||
@Output() onClick: EventEmitter<DatasetListingModel> = new EventEmitter();
|
||||
|
||||
isDraft: boolean;
|
||||
isDeleted: boolean;
|
||||
|
||||
constructor(private router: Router) { }
|
||||
|
||||
ngOnInit() {
|
||||
if (this.dataset.status == DatasetStatus.Draft) { this.isDraft = true }
|
||||
else { this.isDraft = false }
|
||||
if (this.dataset.status === DatasetStatus.Draft) {
|
||||
this.isDraft = true;
|
||||
this.isDeleted = false;
|
||||
} else if (this.dataset.status === DatasetStatus.Deleted) {
|
||||
this.isDeleted = true;
|
||||
}
|
||||
else {
|
||||
this.isDraft = false;
|
||||
this.isDeleted = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue