Commit 6a546111 authored by roxane.carraux's avatar roxane.carraux
Browse files

add mentor and poulain to helpProposition and helpRequest

parent 8c69bafe
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ public class HelpProposition {
	@ManyToOne
	private Mentor mentor;

	@ManyToOne
	private Poulain poulain;

	public HelpProposition() {

	}
@@ -54,6 +57,7 @@ public class HelpProposition {
	public Date getDateBegin() {
		return dateBegin;
	}
	
	public Date getDateEnd() {
		return dateEnd;
	}
@@ -66,6 +70,10 @@ public class HelpProposition {
		return mentor;
	}

	public Poulain getPoulain(){
		return poulain;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
@@ -74,10 +82,10 @@ public class HelpProposition {
		this.matiere = matiere;
	}

	
	public void setDateBegin(Date date) {
		this.dateBegin = date;
	}

	public void setDateEnd(Date date) {
		this.dateEnd = date;
	}
@@ -89,4 +97,8 @@ public class HelpProposition {
	public void setMentor(Mentor mentor) {
		this.mentor = mentor;
	}
	
	public void setPoulain(Poulain poulain) {
		this.poulain = poulain;
	}
}
+13 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ public class HelpRequest {
	@ManyToOne
	private Poulain poulain;

	@ManyToOne
	private Mentor mentor;


	public HelpRequest() {

	}
@@ -66,6 +70,10 @@ public class HelpRequest {
		return poulain;
	}

	public Mentor getMentor(){
		return mentor;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
@@ -77,6 +85,7 @@ public class HelpRequest {
	public void setDateBegin(Date date) {
		this.dateBegin = date;
	}
	
	public void setDateEnd(Date date) {
		this.dateEnd = date;
	}
@@ -88,4 +97,8 @@ public class HelpRequest {
	public void setPoulain(Poulain poulain) {
		this.poulain = poulain;
	}

	public void setMentor(Poulain poulain) {
		this.poulain = poulain;
	}
}
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
				<th scope="col">Date Begin</th>
				<th scope="col">Date End</th>
				<th scope="col">Comment</th>
				<th scope="col">Mentor</th>
				<th scope="col">Poulain</th>
			</tr>
		</thead>
@@ -25,6 +26,7 @@
				<td th:text="${#dates.format(help.dateEnd, 'dd-MM-yyyy HH:mm')}"/>
				<td th:text="${help.comment}" />
				<td th:text="${help.mentor.id}" />
				<td th:text="${help.poulain != null} ? ${help.poulain.id} : ''"/>
			</tr>
		</tbody>
	</table>
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
				<th scope="col">Date End</th>
				<th scope="col">Comment</th>
				<th scope="col">Poulain</th>
				<th scope="col">Mentor</th>
			</tr>
		</thead>
		<tbody>
@@ -25,6 +26,7 @@
				<td th:text="${#dates.format(help.dateEnd, 'dd-MM-yyyy HH:mm')}"/>
				<td th:text="${help.comment}" />
				<td th:text="${help.poulain.id}" />
				<td th:text="${help.mentor != null} ? ${help.mentor.id} : ''"/>
			</tr>
		</tbody>
	</table>
+5 −5
Original line number Diff line number Diff line
@@ -7,11 +7,11 @@
	<body>
		<h1>Form HelpProposition</h1>
		<form action="#" th:action="@{/insertHelpProposition}" th:object="${helpProposition}" method="post">
			<p>HelpRequest matiere: <input type="text" th:field="*{matiere}" /></p>
			<p>HelpRequest date begin: <input type="datetime-local" th:field="*{{dateBegin}}" /></p>
			<p>HelpRequest date end: <input type="datetime-local" th:field="*{{dateEnd}}" /></p>
			<p>HelpRequest comment: <input type="text" th:field="*{comment}" /></p>
			<p>HelpRequest Poulain : TODO recup id Mentor</p>
			<p>HelpProposition matiere: <input type="text" th:field="*{matiere}" /></p>
			<p>HelpProposition date begin: <input type="datetime-local" th:field="*{{dateBegin}}" /></p>
			<p>HelpProposition date end: <input type="datetime-local" th:field="*{{dateEnd}}" /></p>
			<p>HelpProposition comment: <input type="text" th:field="*{comment}" /></p>
			<p>HelpProposition Mentor : TODO recup id Mentor</p>
			<p><input type="submit" value="Submit" /> <input type="reset" value="Reset" /></p>
		</form>
	</body>