Skip to content

Commit

Permalink
✨ feat(Deliverable reports): Update priority action format and labels
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjitm committed Apr 11, 2024
1 parent 10015a5 commit 0586cd4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1849,16 +1849,16 @@ private TypedTableModel getDeliverablesDataReportingTableModel() {
if (action != null && action.getShfrmPriorityAction() != null
&& action.getShfrmPriorityAction().getId() != null
&& action.getShfrmPriorityAction().getComposedName() != null) {
actionsText += "<br> " + action.getShfrmPriorityAction().getComposedName();
actionsText += "\n " + action.getShfrmPriorityAction().getComposedName();
subActions = deliverableShfrmSubActionManager.findByPriorityActionAndPhase(action.getId(),
this.getSelectedPhase().getId());

if (subActions != null && !subActions.isEmpty()) {
actionsText += "<br><b> SubActions:</b><br>";
actionsText += "\n <b> SubActions:</b>\n";
for (DeliverableShfrmSubAction subAction : subActions) {
if (subAction != null && subAction.getShfrmSubAction() != null
&& subAction.getShfrmSubAction().getComposedName() != null) {
actionsText += " ● " + subAction.getShfrmSubAction().getComposedName() + "<br>";
actionsText += " ● " + subAction.getShfrmSubAction().getComposedName() + "\n";
}
}
}
Expand All @@ -1870,9 +1870,9 @@ private TypedTableModel getDeliverablesDataReportingTableModel() {
LOG.error(e + " error getting shfrm actions and subactions");
}
} else {
contributingNarrative = "<Not Apply>";
shfrmActions = "<Not Apply>";
contributingNarrativeReporting = "<Not Apply>";
contributingNarrative = "<Not Applicable>";
shfrmActions = "<Not Applicable>";
contributingNarrativeReporting = "<Not Applicable>";
}

model.addRow(new Object[] {deliverable.getId(), title, delivType, delivSubType, delivStatus, delivYear,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,17 @@ private TypedTableModel getDeliverablesDetailsTableModel() {
if (deliverableDissemination.getArticleUrl() != null) {
articleURL = deliverableDissemination.getArticleUrl();
} else {
articleURL = "<Not Defined>";
articleURL = "&lt;Not Defined&gt;";
}
} else {
articleURL = "<Not Applicable>";
articleURL = "&lt;Not Applicable&gt;";
}
} else {
articleURL = "<Not Applicable>";
articleURL = "&lt;Not Applicable&gt;";
}

if (articleURL == null || (articleURL != null && articleURL.isEmpty())) {
articleURL = "Not Defined&gt;";
}

LinkedHashSet<Institution> managingResponsibleList = new LinkedHashSet<>();
Expand Down Expand Up @@ -1112,6 +1116,11 @@ private TypedTableModel getDeliverablesDetailsTableModel() {
} else {
regions = null;
}

if (regions == null) {
regions = "&lt;Not Defined&gt;";
}

String openFS = "";
String finishedFS = "";
Set<String> fsWindowsSet = new HashSet<String>();
Expand Down Expand Up @@ -1349,10 +1358,11 @@ private TypedTableModel getDeliverablesDetailsTableModel() {

if (isContributing.equals("Yes")) {

if (deliverable.getDeliverableInfo().getShfrmContributionNarrative() != null) {
if (deliverable.getDeliverableInfo().getShfrmContributionNarrative() != null
&& !deliverable.getDeliverableInfo().getShfrmContributionNarrative().isEmpty()) {
contributingNarrative = deliverable.getDeliverableInfo().getShfrmContributionNarrative();
} else {
contributingNarrative = "<Not provided>";
contributingNarrative = "<Not Provided>";
}

List<DeliverableShfrmPriorityAction> actions = new ArrayList<>();
Expand All @@ -1368,16 +1378,16 @@ private TypedTableModel getDeliverablesDetailsTableModel() {
if (action != null && action.getShfrmPriorityAction() != null
&& action.getShfrmPriorityAction().getId() != null
&& action.getShfrmPriorityAction().getComposedName() != null) {
actionsText += "<br> " + action.getShfrmPriorityAction().getComposedName();
actionsText += "\n " + action.getShfrmPriorityAction().getComposedName();
subActions = deliverableShfrmSubActionManager.findByPriorityActionAndPhase(action.getId(),
this.getSelectedPhase().getId());

if (subActions != null && !subActions.isEmpty()) {
actionsText += "<br><b> SubActions:</b><br>";
actionsText += "\n <b> SubActions:</b> \n";
for (DeliverableShfrmSubAction subAction : subActions) {
if (subAction != null && subAction.getShfrmSubAction() != null
&& subAction.getShfrmSubAction().getComposedName() != null) {
actionsText += " ● " + subAction.getShfrmSubAction().getComposedName() + "<br>";
actionsText += " ● " + subAction.getShfrmSubAction().getComposedName() + "\n";
}
}
}
Expand All @@ -1389,8 +1399,8 @@ private TypedTableModel getDeliverablesDetailsTableModel() {
LOG.error(e + " error getting shfrm actions and subactions");
}
} else {
contributingNarrative = "<Not Apply>";
shfrmActions = "<Not Apply>";
contributingNarrative = "&lt;Not Applicable&gt;";
shfrmActions = "&lt;Not Applicable&gt;";
}

model.addRow(new Object[] {deliverableId, deliverableTitle, completionYear, deliverableType, deliverableSubType,
Expand Down

0 comments on commit 0586cd4

Please sign in to comment.