-
0 && this.startIndex < this.totalCount - 1" class="d-flex justify-content-center">
+
0 && this.startIndex < this.totalCount - 1 && this.pageSize < this.totalCount - 1" class="d-flex justify-content-center">
diff --git a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss
index 6248d3a2d..318765330 100644
--- a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss
+++ b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss
@@ -186,17 +186,32 @@
}
.filter-btn {
- position: fixed;
- right: 0px;
- z-index: 100;
- width: 37px;
+ position: fixed;
+ right: 0px;
+ z-index: 100;
+ width: 37px;
}
.filter-btn button {
- color: white;
- background-color: #23BCBA;
- width: 37px;
- height: 45px;
+ color: white;
+ background-color: #23bcba;
+ width: 37px;
+ height: 45px;
+}
+
+.search-form {
+ // font-size: 12px;
+ text-align: left;
+ width: 17.5rem;
+}
+
+.search-form mat-icon {
+ color: #129d99;
+}
+
+::ng-deep .mat-form-field-wrapper {
+ background-color: white !important;
+ padding-bottom: 0 !important;
}
// .bot-paginator {
diff --git a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts
index 8cd507e04..88b50b691 100644
--- a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts
+++ b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts
@@ -24,6 +24,7 @@ import { UiNotificationService, SnackBarNotificationLevel } from '@app/core/serv
import { isNullOrUndefined } from 'util';
import { AuthService } from '@app/core/services/auth/auth.service';
import { DmpCriteriaDialogComponent } from './criteria/dmp-criteria-dialog.component';
+import { FormBuilder, FormControl } from '@angular/forms';
@Component({
@@ -53,6 +54,9 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread
pageSize: number = 5;
criteria: DmpCriteria;
+ public formGroup = new FormBuilder().group({
+ like: new FormControl()
+ })
constructor(
private dmpService: DmpService,
@@ -153,6 +157,10 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread
}
});
+
+ this.formGroup.get('like').valueChanges
+ .pipe(takeUntil(this._destroyed))
+ .subscribe(x => this.controlModified());
}
public refresh(resetPages = false) {
@@ -206,6 +214,17 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread
this.refresh();
}
+ controlModified(): void {
+ // this.clearErrorModel();
+ // if (this.refreshCallback != null &&
+ // (this.formGroup.get('like').value == null || this.formGroup.get('like').value.length === 0 || this.formGroup.get('like').value.length > 2)
+ // ) {
+ // setTimeout(() => this.refreshCallback(true));
+ // }
+ this.criteria.like = this.formGroup.get("like").value;
+ this.refresh();
+ }
+
// rowClicked(dmp: DmpListingModel) {
// this.router.navigate(['/plans/overview/' + dmp.id]);
// }