Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chtrembl committed Aug 15, 2024
1 parent f196789 commit 3cd4160
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,27 @@ public class AudioData implements Serializable {
@JsonProperty("audioAsText")
private String audioAsText;

@JsonProperty("aiActionItems")
private String aiActionItems;
@JsonProperty("actionItems")
private String actionItems;

private List<String> aiActionItemsList;
@JsonProperty("summary")
private String summary;

@JsonProperty("tone")
private String tone;

private List<String> actionItemsList;

public AudioData() { }

public AudioData(String id, String audioAsText, String aiActionItems) {
public AudioData(String id, String audioAsText, String actionItems, String summary, String tone) {
this.setId(id);
this.audioAsText = audioAsText;
this.aiActionItems = aiActionItems;
this.actionItems = actionItems;
this.summary = summary;
this.tone = tone;

this.setAiActionItemsList(this.aiActionItems);
this.setActionItemsList(this.actionItems);
}

public void setId(String id) {
Expand All @@ -43,18 +51,30 @@ public void setAudioAsText(String audioAsText) {
public String getAudioAsText() {
return this.audioAsText;
}
public void setAiActionItems(String aiActionItems) {
this.aiActionItems = aiActionItems;
this.setAiActionItemsList(this.aiActionItems);
public void setActionItems(String actionItems) {
this.actionItems = actionItems;
this.setActionItemsList(this.actionItems);
}
public String getActionItems() {
return this.actionItems;
}
public List<String> getActionItemsList() {
return this.actionItemsList;
}
public void setActionItemsList(String actionItems) {
this.actionItemsList = List.of(actionItems.split("- "));
this.actionItemsList = this.actionItemsList.subList(1, this.actionItemsList.size());
}
public String getAiActionItems() {
return this.aiActionItems;
public void setSummary(String summary) {
this.summary = summary;
}
public List<String> getAiActionItemsList() {
return this.aiActionItemsList;
public String getSummary() {
return this.summary;
}
public void setAiActionItemsList(String aiActionItems) {
this.aiActionItemsList = List.of(aiActionItems.split("- "));
this.aiActionItemsList = this.aiActionItemsList.subList(1, this.aiActionItemsList.size());
public void setTone(String tone) {
this.tone = tone;
}
public String getTone() {
return this.tone;
}
}
27 changes: 18 additions & 9 deletions petstore/petstoreapp/src/main/resources/templates/audioSearch.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,32 @@ <h5 class="mb-0">
<span th:if="${audioData.audioAsText != null and audioData.audioAsText != ''}" th:text="${audioData.audioAsText}"></span>
<img th:if="${audioData.audioAsText == null or audioData.audioAsText == ''}" src="content/spinner.gif" alt="Spinner" style="height: 10%; width: 10%;">
</div>
</div>
<div style="margin-bottom: 20px;">
<span style="font-weight: bold;">AI Action Items: <br/> </span>
<div th:if="${audioData.aiActionItemsList.size() > 0}">
<div th:each="aiActionItem : ${audioData.aiActionItemsList}">
<span th:text="${aiActionItem}"></span>
<br>
<div style="margin-bottom: 20px;">
<span style="font-weight: bold;">Summary: <br/> </span>
<span th:if="${audioData.summary != null and audioData.summary != ''}" th:text="${audioData.summary}"></span>
<img th:if="${audioData.summary == null or audioData.summary == ''}" src="content/spinner.gif" alt="Spinner" style="height: 10%; width: 10%;">
</div>
<div style="margin-bottom: 20px;">
<span style="font-weight: bold;">Tone: <br/> </span>
<span th:if="${audioData.tone != null and audioData.tone != ''}" th:text="${audioData.tone}"></span>
<img th:if="${audioData.tone == null or audioData.tone == ''}" src="content/spinner.gif" alt="Spinner" style="height: 10%; width: 10%;">
</div>
<div style="margin-bottom: 20px;">
<span style="font-weight: bold;">Action Items: <br/> </span>
<div th:if="${audioData.actionItemsList.size() > 0}">
<div th:each="actionItem : ${audioData.actionItemsList}">
<span th:text="${actionItem}"></span>
<br>
</div>
</div>
<img th:unless="${audioData.actionItemsList.size() > 0}" src="content/spinner.gif" alt="Spinner" style="height: 10%; width: 10%;">
</div>
<img th:unless="${audioData.aiActionItemsList.size() > 0}" src="content/spinner.gif" alt="Spinner" style="height: 10%; width: 10%;">
</div>
</div>
</div>
</div>
</div>
</div>

<div lang="en" th:replace="fragments/footer :: footer"></div>
<div lang="en" th:replace="fragments/disclaimer :: disclaimer"></div>

Expand Down

0 comments on commit 3cd4160

Please sign in to comment.