Skip to content

Commit

Permalink
Fixed application save data path; Replaced input type "datetime-local…
Browse files Browse the repository at this point in the history
…" with flatpickr library; Implemented edit logic for predefined epics, user stories and technical tasks
  • Loading branch information
MarkoDojkic committed Aug 14, 2024
1 parent 4524550 commit c049a01
Show file tree
Hide file tree
Showing 7 changed files with 389 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static void main(String[] args)

//TODO: Correct JIRA activity stream timings
//TODO: Fix issue with carousel that button (i.e. carousel item is below scroll container when scrolled and thus not interactable)
//TODO: Add Edit logic for predefined epics, user stories and technical tasks (moving user stories and technical task is possibility)
//TODO: Write tests for complete application flow, predefined and randomized data flow saving and loading
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,10 @@ public class Utilities {
private static ObjectMapper objectMapper;

static {
ZonedDateTime now = ZonedDateTime.now();
Path base = Paths.get(System.getProperty("user.home"),
System.getProperty("app.groupId", "dev.markodojkic"),
System.getProperty("app.artifactId", "software_development_simulation"),
System.getProperty("app.version", "0.0.0-TESTING"));
Path base = Paths.get(System.getProperty("user.home"), "dev.markodojkic", "software_development_simulation", "1.3.0");

currentApplicationDataPath = base;
currentApplicationLogsPath = Paths.get(String.valueOf(base),
"logs",
now.format(DateTimeFormatter.ofPattern("dd.MM.yyyy")),
now.format(DateTimeFormatter.ofPattern("HH.mm.ss")));
currentApplicationLogsPath = Paths.get(String.valueOf(base), "logs", ZonedDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH-mm-ss")));
}

public static void loadPredefinedTasks(List<Epic> predefinedEpics){
Expand Down
6 changes: 1 addition & 5 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ server.port=21682
mqtt.serverURI=ws://localhost:15675/ws
mqtt.username=guest
mqtt.password=guest
mqtt.defaultTopic=default

app.groupId=dev.markodojkic
app.artifactId=software_development_simulation
app.version=1.3.0
mqtt.defaultTopic=default
2 changes: 1 addition & 1 deletion src/main/resources/static/js/developers.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $(window).on("load", async () => {
success: response => {
$("#sl-tab-panel-3").html(response);
$("#sl-tab-panel-3 .developerExperienceSlRange")[0].tooltipFormatter = value => `Developer experience - ${value}/10`; //*Here needs to be reinitialize since new sl-range is created
$(document).on("click", ".editDeveloperResetSlButt", async () => {
$(document).on("click", ".editDeveloperResetSlButton", async () => {
window.history.replaceState(null, null, "/developers");
viewTab.prop("disabled", false);
createTab.prop("disabled", false)
Expand Down
411 changes: 371 additions & 40 deletions src/main/resources/static/js/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/templates/developers.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
<div style="display: inline-flex">
<sl-button variant="success" outline type="submit">Confirm</sl-button>
<sl-divider vertical></sl-divider>
<sl-button class="editDeveloperResetSlButt" variant="danger" outline>Cancel</sl-button>
<sl-button class="editDeveloperResetSlButton" variant="danger" outline>Cancel</sl-button>
</div>
</form>
</div>
Expand Down
16 changes: 13 additions & 3 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<title>Software development simulator - Home page</title>
<link href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.15.1/cdn/themes/light.css" media="(prefers-color-scheme:light)" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.15.1/cdn/themes/dark.css" media="(prefers-color-scheme:dark)" onload="document.documentElement.classList.add('sl-theme-dark');" rel="stylesheet"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<link rel="stylesheet" th:href="@{/css/index.css}"/>
<script type="module" src="https://cdn.jsdelivr.net/npm/flatpickr" integrity="sha512-K/oyQtMXpxI4+K0W7H25UopjM8pzq0yrVdFdG21Fh5dBe91I40pDd9A4lzNlHPHBIP2cwZuoxaUSX0GJSObvGA==" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.15.1/cdn/shoelace-autoloader.js" integrity="sha512-iTpkJ1vB9YD5jFwrppJ+0A6NIa8faZcY+iQTmkg4bkOfEw2R1OlLZnxsC43GzqHX92i87xCLULbYnFpBZFbAxA==" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" integrity="sha512-nlrGqnXyDyswl/oRH13cQUfr7ZsQs0XxVAZP0Ygs1hzJcq0PiBgTzqnI3YSEFosXOPznrul6lDYcwVvc7gX0UA==" crossorigin="anonymous"></script>
Expand Down Expand Up @@ -97,7 +99,7 @@
<sl-divider vertical></sl-divider>
<sl-select class="labelOnLeftModification" disabled help-text="<name> (<developer_rating (max 12)>)" label="Assignee" name="epicAssignee" pill placement="bottom" required></sl-select>
<sl-divider vertical></sl-divider>
<sl-input help-text=" " label="Created on" name="epicCreatedOn" required type="datetime-local"></sl-input>
<sl-input help-text=" " label="Created on" name="epicCreatedOn" required type="text"></sl-input>
</div>
<sl-divider class="horizontalDivider"></sl-divider>
<sl-textarea help-text="Description: Max length is 128 characters" maxlength="128" name="epicDescription" required rows="5"></sl-textarea>
Expand Down Expand Up @@ -141,7 +143,7 @@
<sl-divider vertical></sl-divider>
<sl-select class="labelOnLeftModification" disabled help-text="<name> (<developer_rating (max 12)>)" label="Assignee" name="userStoryAssignee" pill placement="bottom" required></sl-select>
<sl-divider vertical></sl-divider>
<sl-input help-text=" " label="Created on" name="userStoryCreatedOn" required type="datetime-local"></sl-input>
<sl-input help-text=" " label="Created on" name="userStoryCreatedOn" required type="text"></sl-input>
</div>
<sl-divider class="horizontalDivider"></sl-divider>
<sl-textarea help-text="Description: Max length is 128 characters" maxlength="128" name="userStoryDescription" required rows="5"></sl-textarea>
Expand Down Expand Up @@ -187,7 +189,7 @@
<sl-divider vertical></sl-divider>
<sl-select class="labelOnLeftModification" disabled help-text="<name> (<developer_rating (max 12)>)" label="Assignee" name="technicalTaskAssignee" pill placement="bottom" required></sl-select>
<sl-divider vertical></sl-divider>
<sl-input help-text=" " label="Created on" name="technicalTaskCreatedOn" required type="datetime-local"></sl-input>
<sl-input help-text=" " label="Created on" name="technicalTaskCreatedOn" required type="text"></sl-input>
</div>
<sl-divider class="horizontalDivider"></sl-divider>
<sl-textarea help-text="Description: Max length is 128 characters" maxlength="128" name="technicalTaskDescription" required rows="5"></sl-textarea>
Expand All @@ -213,7 +215,15 @@
</div>
</div>

<div id="developmentTeamOptions" style="display: none">
<sl-option th:each="developmentTeamSummary, developerTeamIterator : ${developmentTeamsSummary}" th:text="|#${developerTeamIterator.index}: ${developmentTeamSummary}" th:value="${developerTeamIterator.index}"></sl-option>
</div>

<div id="priorityBadges" style="display: none">
<sl-badge th:class="|ansi_bg_${priority.getAnsiColorCode()}m|" th:each="priority, priorityIterator : ${priorities}" th:id="${priority}" th:text="|${priority.name()} (Urgency: ${priority.getUrgency()})|" variant=""></sl-badge>
</div>

<div id="priorityOptions" style="display: none">
<sl-option th:class="|ansi_fg_${priority.getAnsiColorCode()}m|" th:each="priority, priorityIterator : ${priorities}" th:text="|${priority.name()} (Urgency: ${priority.getUrgency()})|" th:value="${priority}"></sl-option>
</div>
</html>

0 comments on commit c049a01

Please sign in to comment.