From 82ade5e137a2088d8ae933d73a04c4cf65b24dbf Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 14 Aug 2024 15:29:59 +0300 Subject: [PATCH] [develop | DONE | ADDED ] bulk removal of projects, update page if all projects of the page are removed, --- .../pages/projects/add-projects.component.ts | 4 +- .../projects/remove-projects.component.html | 16 ++++ .../projects/remove-projects.component.ts | 85 ++++++++++++++++--- src/app/services/manageProjects.service.ts | 5 ++ 4 files changed, 95 insertions(+), 15 deletions(-) diff --git a/src/app/pages/projects/add-projects.component.ts b/src/app/pages/projects/add-projects.component.ts index 1030d89..5570e08 100644 --- a/src/app/pages/projects/add-projects.component.ts +++ b/src/app/pages/projects/add-projects.component.ts @@ -283,6 +283,7 @@ export class AddProjectsComponent implements OnInit { goTo(page: number = 1, refineQuery: boolean = true) { this.openaireSearchUtils.page = page; this.openaireSearchUtils.status = this.errorCodes.LOADING; + this.selectedIndexes = []; if(refineQuery) { this.openaireSearchUtils.refineStatus = this.errorCodes.LOADING; this.getFunders(); @@ -390,10 +391,9 @@ export class AddProjectsComponent implements OnInit { } public selectAll(){ if(this.selectedIndexes.length < this.openaireProjects.length) { - this.selectedIndexes = Array.from(Array(10).keys()); + this.selectedIndexes = Array.from(Array(this.openaireProjects.length).keys()); }else{ this.selectedIndexes = []; } - console.log(this.selectedIndexes) } } diff --git a/src/app/pages/projects/remove-projects.component.html b/src/app/pages/projects/remove-projects.component.html index 2c28e11..12df547 100644 --- a/src/app/pages/projects/remove-projects.component.html +++ b/src/app/pages/projects/remove-projects.component.html @@ -23,6 +23,18 @@
+ +
+ + +
+
@@ -109,6 +121,10 @@