Compare commits
4 Commits
d59cf78062
...
a8c46cc9db
| Author | SHA1 | Date | |
|---|---|---|---|
| a8c46cc9db | |||
|
|
902167b663 | ||
|
|
4590c9e5fe | ||
|
|
aa5bf0c64e |
@@ -8,7 +8,6 @@ import jakarta.persistence.GeneratedValue;
|
|||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.OneToMany;
|
import jakarta.persistence.OneToMany;
|
||||||
import jakarta.persistence.OneToOne;
|
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
import com.example.demo.app.domain.model.CourseModel;
|
import com.example.demo.app.domain.model.CourseModel;
|
||||||
@@ -39,10 +38,6 @@ public class CourseEntity {
|
|||||||
@OneToMany(mappedBy = "courseEntity")
|
@OneToMany(mappedBy = "courseEntity")
|
||||||
private List<UserEntity> userEntity;
|
private List<UserEntity> userEntity;
|
||||||
|
|
||||||
@OneToOne(mappedBy = "courseEntity")
|
|
||||||
private AllocationEntity allocationEntity;
|
|
||||||
|
|
||||||
|
|
||||||
public static List<CourseModel> createCourseModelList(List<CourseEntity> courseEntityList) {
|
public static List<CourseModel> createCourseModelList(List<CourseEntity> courseEntityList) {
|
||||||
|
|
||||||
return courseEntityList
|
return courseEntityList
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class CourseController {
|
|||||||
model.addAttribute("courseList", CourseForm.convertFrom(courseService.findAll()));
|
model.addAttribute("courseList", CourseForm.convertFrom(courseService.findAll()));
|
||||||
model.addAttribute("courseInfoList", CourseInfoForm.convertFrom(courseInfoService.findAll()));
|
model.addAttribute("courseInfoList", CourseInfoForm.convertFrom(courseInfoService.findAll()));
|
||||||
|
|
||||||
return "select-course";
|
return "select_course";
|
||||||
|
|
||||||
//} catch (Exception e) {
|
//} catch (Exception e) {
|
||||||
// // ログイン情報の破棄
|
// // ログイン情報の破棄
|
||||||
|
|||||||
@@ -17,8 +17,14 @@ import lombok.RequiredArgsConstructor;
|
|||||||
public class UserController {
|
public class UserController {
|
||||||
|
|
||||||
@GetMapping("/user/register")
|
@GetMapping("/user/register")
|
||||||
public String showRegister(Model model) {
|
public String showRegister(Model model, HttpSession session) {
|
||||||
model.addAttribute("userForm", new UserForm());
|
UserForm userForm = (UserForm) session.getAttribute("userForm");
|
||||||
|
|
||||||
|
if(userForm == null) {
|
||||||
|
userForm = new UserForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
model.addAttribute("userForm", userForm);
|
||||||
return "user_register";
|
return "user_register";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
spring.application.name=Monegement
|
spring.application.name=Monegement
|
||||||
|
|
||||||
spring.datasource.url=jdbc:mysql://localhost:3306/rezo_spring
|
spring.datasource.url=jdbc:mysql://localhost:3306/springdb
|
||||||
spring.datasource.username=rezouser
|
spring.datasource.username=rezouser
|
||||||
spring.datasource.password=Rezo_0000
|
spring.datasource.password=Rezo_0000
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
<div th:if="${errorMessage}" th:text="${errorMessage}"></div>
|
<div th:if="${errorMessage}" th:text="${errorMessage}"></div>
|
||||||
<form th:action="@{/login}" th:object="${loginForm}" method="post">
|
<form th:action="@{/login}" th:object="${loginForm}" method="post">
|
||||||
<div>
|
<div>
|
||||||
<label for="emailAddress">メールアドレス</label>
|
<label for="mailAddress">メールアドレス</label>
|
||||||
|
|
||||||
<input type="email"
|
<input type="email"
|
||||||
id="emailAddress"
|
id="mailAddress"
|
||||||
th:field="{emailAddress}"
|
th:field="*{mailAddress}"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<input type="password"
|
<input type="password"
|
||||||
id="password"
|
id="password"
|
||||||
th:field="{password}"
|
th:field="*{password}"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -36,11 +36,11 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="@{user/register}">新規会員登録</a>
|
<a th:href="@{user/register}">新規会員登録</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="@{password/authentication}">パスワードを忘れた方</a>
|
<a th:href="@{password/authentication}">パスワードを忘れた方</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>カテゴリ名</th><tr>配分(%)</tr>
|
<th>カテゴリ名</th><tr>配分(%)</tr>
|
||||||
</tr>
|
</tr>
|
||||||
<tr th:each="courseInfo:${courseInfoList}" th:if="course.courseId=courseInfo.courseId">
|
<tr th:each="courseInfo:${courseInfoList}" th:if="course.courseId == courseInfo.courseId">
|
||||||
<td th:text="${courseInfo.categoryName}"></td>
|
<td th:text="${courseInfo.categoryName}"></td>
|
||||||
<td th:text="${courseInfo.allocationRatio}"></td>
|
<td th:text="${courseInfo.allocationRatio}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -98,28 +98,18 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="goalId">目標</label>
|
<label for="goalId">目標</label>
|
||||||
<select id="goalId"
|
<input type="number"
|
||||||
|
id="goalId"
|
||||||
th:field="*{goalId}"
|
th:field="*{goalId}"
|
||||||
|
min="0"
|
||||||
required>
|
required>
|
||||||
<option value="">選択してください</option>
|
|
||||||
<option th:each="goal : ${goalList}"
|
|
||||||
th:value="${goal.goalId}"
|
|
||||||
th:text="${goal.goalTitle}">
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="courseId">コース</label>
|
<label>コース</label>
|
||||||
<select id="courseId"
|
<input type="hidden" th:field="*{courseId}">
|
||||||
th:field="*{courseId}"
|
<span th:text="${selectedCourseName}">未選択</span>
|
||||||
required>
|
<button type="button"onclick="location.href='/select-course'">コース選択</button>
|
||||||
<option value="">選択してください</option>
|
|
||||||
<option th:each="course : ${courseList}"
|
|
||||||
th:value="${course.courseId}"
|
|
||||||
th:text="${course.courseName}">
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user