Merge pull request 'chore: Update branch' (#5) from Maradona/Backend:restfull into main
Reviewed-on: 3002833/Backend#5pull/1/head
commit
10b2b6d161
|
@ -31,3 +31,11 @@ build/
|
|||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
.history/
|
||||
|
||||
### macOS ###
|
||||
*.DS_Store
|
||||
|
||||
### Database files ###
|
||||
*.db
|
||||
*.mv.db
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
document.getElementById("primarySkill").addEventListener("change", function () {
|
||||
var primarySkillId = this.value;
|
||||
fetch("/skills/secondary-skills?primarySkillId=" + primarySkillId)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
console.log("Fetch response data:", data);
|
||||
var secondarySkillSelect = document.getElementById("secondarySkill");
|
||||
secondarySkillSelect.innerHTML =
|
||||
'<option value="" disabled selected>Select a secondary skill</option>';
|
||||
data.forEach(function (secondarySkill) {
|
||||
var option = document.createElement("option");
|
||||
option.value = secondarySkill.ssid;
|
||||
option.text = secondarySkill.description;
|
||||
secondarySkillSelect.add(option);
|
||||
});
|
||||
})
|
||||
.catch((error) => console.error("Error fetching secondary skills:", error));
|
||||
});
|
|
@ -1 +0,0 @@
|
|||
/* Placeholder */
|
|
@ -5,26 +5,9 @@
|
|||
<img src="/assets/inter-brand.svg" alt="INTER Logo" class="svg-logo" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<nav>
|
||||
<ul class="nav justify-content-end">
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
th:href="@{/projects}"
|
||||
th:classappend="${activePage == 'projects' ? 'active' : ''}"
|
||||
>Projekte</a
|
||||
>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
th:href="@{/skills}"
|
||||
th:classappend="${activePage == 'profile' ? 'active' : ''}"
|
||||
>Skills</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
th:replace="~{/core/_navigation :: navigation(activePage=${activePage})}"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<div th:fragment="navigation">
|
||||
<nav>
|
||||
<ul class="nav justify-content-end">
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
th:href="@{/projects}"
|
||||
th:classappend="${activePage == 'projects' ? 'active' : ''}"
|
||||
>Projekte</a
|
||||
>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
th:href="@{/skills}"
|
||||
th:classappend="${activePage == 'profile' ? 'active' : ''}"
|
||||
>Skills</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
|
@ -1,15 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<div th:replace="~{/core/_metadata :: metadata}"></div>
|
||||
<title>My Skill Management System</title>
|
||||
<link rel="stylesheet" href="style/notes/notes.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div th:replace="~{/core/_header :: header(activePage=${notes})}"></div>
|
||||
<div class="content container mt-4"></div>
|
||||
<div th:replace="~{/core/_footer :: footer}"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -3,10 +3,10 @@
|
|||
<head>
|
||||
<div th:replace="~{/core/_metadata :: metadata}"></div>
|
||||
<title>Create Project</title>
|
||||
<link rel="stylesheet" href="/style/projects/projects.css" />
|
||||
<link rel="stylesheet" href="/style/core/style.css" />
|
||||
<link rel="stylesheet" href="/style/core/header.css" />
|
||||
<link rel="stylesheet" href="/style/core/footer.css" />
|
||||
<link rel="stylesheet" href="/css/projects/projects.css" />
|
||||
<link rel="stylesheet" href="/css/core/style.css" />
|
||||
<link rel="stylesheet" href="/css/core/header.css" />
|
||||
<link rel="stylesheet" href="/css/core/footer.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
|
@ -3,7 +3,10 @@
|
|||
<head>
|
||||
<div th:replace="~{/core/_metadata :: metadata}"></div>
|
||||
<title>Projects</title>
|
||||
<link rel="stylesheet" href="/style/projects/projects.css" />
|
||||
<link rel="stylesheet" href="/css/projects/projects.css" />
|
||||
<link rel="stylesheet" href="/css/core/style.css" />
|
||||
<link rel="stylesheet" href="/css/core/header.css" />
|
||||
<link rel="stylesheet" href="/css/core/footer.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
|
@ -3,10 +3,10 @@
|
|||
<head>
|
||||
<div th:replace="~{/core/_metadata :: metadata}"></div>
|
||||
<title>Add Skill</title>
|
||||
<link rel="stylesheet" href="/style/skills/skills.css" />
|
||||
<link rel="stylesheet" href="/style/core/style.css" />
|
||||
<link rel="stylesheet" href="/style/core/header.css" />
|
||||
<link rel="stylesheet" href="/style/core/footer.css" />
|
||||
<link rel="stylesheet" href="/css/skills/skills.css" />
|
||||
<link rel="stylesheet" href="/css/core/style.css" />
|
||||
<link rel="stylesheet" href="/css/core/header.css" />
|
||||
<link rel="stylesheet" href="/css/core/footer.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
|
@ -15,11 +15,12 @@
|
|||
<h2 class="mb-4">Add Skill</h2>
|
||||
<form
|
||||
th:action="@{/skills/add}"
|
||||
th:object="${skillForm}"
|
||||
th:object="${skillProtoype}"
|
||||
method="post"
|
||||
class="project-card"
|
||||
>
|
||||
<div class="card-body">
|
||||
<!-- Primary Skill Dropdown -->
|
||||
<div class="form-group">
|
||||
<label for="primarySkill">Primary Skill</label>
|
||||
<select
|
||||
|
@ -28,6 +29,9 @@
|
|||
class="form-control"
|
||||
th:field="*{primarySkillId}"
|
||||
>
|
||||
<option value="" disabled selected>
|
||||
Select a primary skill
|
||||
</option>
|
||||
<option
|
||||
th:each="primarySkill : ${primarySkills}"
|
||||
th:value="${primarySkill.psid}"
|
||||
|
@ -35,6 +39,8 @@
|
|||
></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Secondary Skill Dropdown -->
|
||||
<div class="form-group">
|
||||
<label for="secondarySkill">Secondary Skill</label>
|
||||
<select
|
||||
|
@ -48,6 +54,8 @@
|
|||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Skill Level Dropdown -->
|
||||
<div class="form-group">
|
||||
<label for="level">Level</label>
|
||||
<select
|
||||
|
@ -56,6 +64,7 @@
|
|||
class="form-control"
|
||||
th:field="*{level}"
|
||||
>
|
||||
<option value="" disabled selected>Select skill level</option>
|
||||
<option
|
||||
th:each="level : ${#numbers.sequence(1, 5)}"
|
||||
th:value="${level}"
|
||||
|
@ -63,36 +72,14 @@
|
|||
></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<button type="submit" class="btn-create-project">Add Skill</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:replace="~{/core/_footer :: footer}"></div>
|
||||
</div>
|
||||
<script>
|
||||
document
|
||||
.getElementById("primarySkill")
|
||||
.addEventListener("change", function () {
|
||||
var primarySkillId = this.value;
|
||||
fetch("/skills/secondary-skills?primarySkillId=" + primarySkillId)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
console.log("Fetch response data:", data);
|
||||
var secondarySkillSelect =
|
||||
document.getElementById("secondarySkill");
|
||||
secondarySkillSelect.innerHTML =
|
||||
'<option value="" disabled selected>Select a secondary skill</option>';
|
||||
data.forEach(function (secondarySkill) {
|
||||
var option = document.createElement("option");
|
||||
option.value = secondarySkill.ssid;
|
||||
option.text = secondarySkill.description;
|
||||
secondarySkillSelect.add(option);
|
||||
});
|
||||
})
|
||||
.catch((error) =>
|
||||
console.error("Error fetching secondary skills:", error)
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<script src="/js/skills/fetchSecondarySkills.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -3,10 +3,10 @@
|
|||
<head>
|
||||
<div th:replace="~{/core/_metadata :: metadata}"></div>
|
||||
<title>Create Skill</title>
|
||||
<link rel="stylesheet" href="/style/skills/skills.css" />
|
||||
<link rel="stylesheet" href="/style/core/style.css" />
|
||||
<link rel="stylesheet" href="/style/core/header.css" />
|
||||
<link rel="stylesheet" href="/style/core/footer.css" />
|
||||
<link rel="stylesheet" href="/css/skills/skills.css" />
|
||||
<link rel="stylesheet" href="/css/core/style.css" />
|
||||
<link rel="stylesheet" href="/css/core/header.css" />
|
||||
<link rel="stylesheet" href="/css/core/footer.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
|
@ -3,8 +3,10 @@
|
|||
<head>
|
||||
<div th:replace="~{/core/_metadata :: metadata}"></div>
|
||||
<title>Skills</title>
|
||||
<link rel="stylesheet" href="/style/skills/skills.css" />
|
||||
<link rel="stylesheet" href="/style/core/style.css" />
|
||||
<link rel="stylesheet" href="/css/skills/skills.css" />
|
||||
<link rel="stylesheet" href="/css/core/style.css" />
|
||||
<link rel="stylesheet" href="/css/core/header.css" />
|
||||
<link rel="stylesheet" href="/css/core/footer.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
Loading…
Reference in New Issue