From 68fedc9feac09e55c3feddb4ede450b39089a373 Mon Sep 17 00:00:00 2001 From: JhonSGIzquierdo <53907237+MetalPrime@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:21:17 -0500 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9C=A8=20feat(innovation=20table):=20add?= =?UTF-8?q?=20loader=20animation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/crp/views/projects/projectInnovationList.ftl | 2 ++ .../main/webapp/crp/js/projects/projectInnovationsList.js | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl index 0b7213383c..d1c58daea0 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl @@ -39,6 +39,7 @@ [#-- Innovations List --]

[@s.text name="projectInnovations" /]

+ [@innovationsTableMacro list=(projectInnovations)![] /]
@@ -58,6 +59,7 @@

Previous [@s.text name="projectInnovations" /]

+ [@innovationsTableMacro list=(projectOldInnovations)![] currentTable=false/]
diff --git a/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js b/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js index c267ce075d..e1d233b131 100644 --- a/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js +++ b/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js @@ -2,6 +2,13 @@ $(document).ready(function() { // Add Data Table addDataTable(); + + // Add click event to tsURL links + $('a[href*="/projects"]').on('click', function() { + const table = $(this).closest('#table-innovations_wrapper'); + const loadingElement = table.siblings('.loading'); + loadingElement.show(); + }); }); function addDataTable() { From e3b36dca980884c96f172fdc43a3c37b6b051518 Mon Sep 17 00:00:00 2001 From: JhonSGIzquierdo <53907237+MetalPrime@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:55:16 -0500 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=A7=20chore(innovations):=20update?= =?UTF-8?q?=20dates=20tables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl index d1c58daea0..2be51e2c27 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl @@ -3,7 +3,7 @@ [#assign currentSectionString = "project-${actionName?replace('/','-')}-${projectID}-phase-${(actualPhase.id)!}" /] [#assign pageLibs = [ "datatables.net", "datatables.net-bs"] /] [#assign customJS = [ - "${baseUrlMedia}/js/projects/projectInnovationsList.js?20230306", + "${baseUrlMedia}/js/projects/projectInnovationsList.js?20241218", "${baseUrlCdn}/global/js/autoSave.js", "${baseUrlCdn}/global/js/fieldsValidation.js" ] /] From eb2129a11d95323b787d9dcce5d6cd5853b49c99 Mon Sep 17 00:00:00 2001 From: JhonSGIzquierdo <53907237+MetalPrime@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:45:51 -0500 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=94=A7=20chore(innovations):=20update?= =?UTF-8?q?=20animation=20and=20table=20visual?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/projects/projectInnovationList.ftl | 70 ++++++++++--------- .../crp/css/projects/projectInnovations.css | 2 - .../crp/js/projects/projectInnovationsList.js | 3 +- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl index 2be51e2c27..9415352789 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl @@ -4,10 +4,13 @@ [#assign pageLibs = [ "datatables.net", "datatables.net-bs"] /] [#assign customJS = [ "${baseUrlMedia}/js/projects/projectInnovationsList.js?20241218", - "${baseUrlCdn}/global/js/autoSave.js", + [#-- "${baseUrlCdn}/global/js/autoSave.js", --] "${baseUrlCdn}/global/js/fieldsValidation.js" ] /] -[#assign customCSS = ["${baseUrlMedia}/css/projects/projectInnovations.css?20240517"] /] +[#assign customCSS = [ + "${baseUrlCdn}/global/css/customDataTable.css", + "${baseUrlMedia}/css/projects/projectInnovations.css?20240517" + ] /] [#assign currentSection = "projects" /] [#assign currentStage = "innovations" /] [#assign isListSection = true /] @@ -36,32 +39,33 @@ [#-- Section Messages --] [#include "/WEB-INF/crp/views/projects/messages-projects.ftl" /] - [#-- Innovations List --] -

[@s.text name="projectInnovations" /]

-
- - [@innovationsTableMacro list=(projectInnovations)![] /] -
- - [#-- Add Innovation Button --] - [#if canEdit] -
-
- -
+ [@s.form action=actionName method="POST" enctype="multipart/form-data" cssClass=""] + [#-- Innovations List --] +

[@s.text name="projectInnovations" /]

+
+ [@innovationsTableMacro list=(projectInnovations)![] /]
-
- [/#if] + + [#-- Add Innovation Button --] + [#if canEdit] +
+ +
+ [/#if] - [#-- Previous Innovations List --] -
-

Previous [@s.text name="projectInnovations" /]

-
- - [@innovationsTableMacro list=(projectOldInnovations)![] currentTable=false/] -
+ [#-- Previous Innovations List --] +
+

Previous [@s.text name="projectInnovations" /]

+
+ [@innovationsTableMacro list=(projectOldInnovations)![] currentTable=false/] +
+ + [/@s.form]
@@ -78,20 +82,20 @@ ID - [@s.text name="projectInnovations.table.title" /] - [@s.text name="projectInnovations.table.type" /] - [@s.text name="projectInnovations.table.stage" /] + [@s.text name="projectInnovations.table.title" /] + [@s.text name="projectInnovations.table.type" /] + [@s.text name="projectInnovations.table.stage" /] [@s.text name="projectInnovations.table.year" /] [#if action.hasSpecificities('feedback_active') ] Feedback Status [/#if] - Owner + Owner [#if currentTable] - + [/#if] - + [#if currentTable] - + [/#if] diff --git a/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css b/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css index 2000ef5844..be6fe32858 100644 --- a/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css +++ b/marlo-web/src/main/webapp/crp/css/projects/projectInnovations.css @@ -133,13 +133,11 @@ table ul { /** MARLO Responsibe Tables */ .table-responsive table { - min-width: 1500px; margin-bottom: 0; } .table-responsive { border: 1px solid #ddd; - max-height: 500px; } .table > thead > tr > th { diff --git a/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js b/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js index e1d233b131..f1b49810ad 100644 --- a/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js +++ b/marlo-web/src/main/webapp/crp/js/projects/projectInnovationsList.js @@ -5,8 +5,7 @@ $(document).ready(function() { // Add click event to tsURL links $('a[href*="/projects"]').on('click', function() { - const table = $(this).closest('#table-innovations_wrapper'); - const loadingElement = table.siblings('.loading'); + const loadingElement = $('.container_page_load'); loadingElement.show(); }); }); From 759bc9d51195e9e45e50fc131fcbaa342554f9b9 Mon Sep 17 00:00:00 2001 From: JhonSGIzquierdo <53907237+MetalPrime@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:09:05 -0500 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=94=A7=20chore(innovations):=20update?= =?UTF-8?q?=20visual=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl index 9415352789..f74ecb0fd8 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectInnovationList.ftl @@ -8,7 +8,6 @@ "${baseUrlCdn}/global/js/fieldsValidation.js" ] /] [#assign customCSS = [ - "${baseUrlCdn}/global/css/customDataTable.css", "${baseUrlMedia}/css/projects/projectInnovations.css?20240517" ] /] [#assign currentSection = "projects" /] From 8b7d9d4b99e90b33f0e2bb269d6ab12170b7f5a9 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Thu, 19 Dec 2024 14:35:37 -0500 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=94=A7=20chore(activities):=20Update?= =?UTF-8?q?=20filter=20in=20save=20processs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ccafs/marlo/action/projects/ProjectActivitiesAction.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java index db61807774..e152fd054e 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/ProjectActivitiesAction.java @@ -642,8 +642,7 @@ public String save() { List activitiesDB = new ArrayList(); try { activitiesDB = - this.activityManager.getActiveActivitiesByProject(projectBD.getId(), this.getActualPhase().getId()).stream() - .filter(a -> a.isActive() && a.getPhase().equals(this.getActualPhase())).collect(Collectors.toList()); + this.activityManager.getActiveActivitiesByProject(projectBD.getId(), this.getActualPhase().getId()); } catch (Exception e) { logger.info(" unable to get activities from the BD in save function "); }