Commit 8c69bafe authored by roxane.carraux's avatar roxane.carraux
Browse files

change date format and add datebegin, dateend

parent 96e0a077
Loading
Loading
Loading
Loading
+17 −6
Original line number Diff line number Diff line
@@ -26,8 +26,12 @@ public class HelpProposition {
	private String matiere;
	
	@Column
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date date;
	@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
	private Date dateBegin;

	@Column
	@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
	private Date dateEnd;
	
	@Column
	private String comment;
@@ -47,8 +51,11 @@ public class HelpProposition {
		return matiere;
	}

	public Date getDate() {
		return date;
	public Date getDateBegin() {
		return dateBegin;
	}
	public Date getDateEnd() {
		return dateEnd;
	}
	
	public String getComment() {
@@ -67,8 +74,12 @@ public class HelpProposition {
		this.matiere = matiere;
	}

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

	public void setComment(String comment) {
+16 −6
Original line number Diff line number Diff line
@@ -26,8 +26,12 @@ public class HelpRequest {
	private String matiere;
	
	@Column
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date date;
	@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
	private Date dateBegin;

	@Column
	@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
	private Date dateEnd;
	
	@Column
	private String comment;
@@ -47,8 +51,11 @@ public class HelpRequest {
		return matiere;
	}

	public Date getDate() {
		return date;
	public Date getDateBegin() {
		return dateBegin;
	}
	public Date getDateEnd() {
		return dateEnd;
	}
	
	public String getComment() {
@@ -67,8 +74,11 @@ public class HelpRequest {
		this.matiere = matiere;
	}

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

	public void setComment(String comment) {
+4 −2
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@
			<tr>
				<th scope="col">Id</th>
				<th scope="col">Matiere</th>
				<th scope="col">Date</th>
				<th scope="col">Date Begin</th>
				<th scope="col">Date End</th>
				<th scope="col">Comment</th>
				<th scope="col">Poulain</th>
			</tr>
@@ -20,7 +21,8 @@
			<tr th:each="help: ${helpPropositions}">
				<td th:text="${help.id}" />
				<td th:text="${help.matiere}" />
				<td th:text="${#dates.format(help.date, 'dd-MM-yyyy')}"/>
				<td th:text="${#dates.format(help.dateBegin, 'dd-MM-yyyy HH:mm')}"/>
				<td th:text="${#dates.format(help.dateEnd, 'dd-MM-yyyy HH:mm')}"/>
				<td th:text="${help.comment}" />
				<td th:text="${help.mentor.id}" />
			</tr>
+4 −2
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@
			<tr>
				<th scope="col">Id</th>
				<th scope="col">Matiere</th>
				<th scope="col">Date</th>
				<th scope="col">Date Begin</th>
				<th scope="col">Date End</th>
				<th scope="col">Comment</th>
				<th scope="col">Poulain</th>
			</tr>
@@ -20,7 +21,8 @@
			<tr th:each="help: ${helpRequests}">
				<td th:text="${help.id}" />
				<td th:text="${help.matiere}" />
				<td th:text="${#dates.format(help.date, 'dd-MM-yyyy')}"/>
				<td th:text="${#dates.format(help.dateBegin, 'dd-MM-yyyy HH:mm')}"/>
				<td th:text="${#dates.format(help.dateEnd, 'dd-MM-yyyy HH:mm')}"/>
				<td th:text="${help.comment}" />
				<td th:text="${help.poulain.id}" />
			</tr>
+2 −1
Original line number Diff line number Diff line
@@ -8,7 +8,8 @@
		<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: <input type="date" th:field="*{{date}}" /></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><input type="submit" value="Submit" /> <input type="reset" value="Reset" /></p>
Loading