refactor: Update frontend works with backend

pull/1/head
Piotr Jakubiak 2024-11-08 13:58:23 +01:00
parent 3f16503ff4
commit ae6a88e590
8 changed files with 41 additions and 22 deletions

1
.gitignore vendored
View File

@ -38,3 +38,4 @@ build/
### Database files ###
*.db
*.mv.db

Binary file not shown.

View File

@ -1,3 +1,4 @@
<div th:fragment="navigation">
<nav>
<ul class="nav justify-content-end">
<li class="nav-item">
@ -18,3 +19,4 @@
</li>
</ul>
</nav>
</div>

View File

@ -4,6 +4,9 @@
<div th:replace="~{/core/_metadata :: metadata}"></div>
<title>Projects</title>
<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">

View File

@ -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,12 +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 src="/js/skills/skills.js"></script>
<script src="/js/skills/fetchSecondarySkills.js"></script>
</body>
</html>

View File

@ -5,6 +5,8 @@
<title>Skills</title>
<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">