period
This commit is contained in:
@ -29,15 +29,11 @@
|
||||
<environment names="Development">
|
||||
<fieldset><legend>Disponibilité</legend>
|
||||
<div class="form-group">
|
||||
<label asp-for="StartOfTheDay" class="col-md-2 control-label"></label>
|
||||
<label asp-for="EndOfTheDay" class="col-md-2 control-label"></label>
|
||||
<label asp-for="Availability" class="col-md-2 control-label"></label>
|
||||
|
||||
<div class="col-md-10" id="datepair">
|
||||
<input id="StartOfTheDay" name="aStartOfTheDay" class="timepicker form-control" />
|
||||
<span asp-validation-for="StartOfTheDay" class="text-danger" ></span>
|
||||
<input id="EndOfTheDay" name="aEndOfTheDay" class="timepicker form-control" />
|
||||
<span asp-validation-for="EndOfTheDay" class="text-danger" ></span>
|
||||
</div>
|
||||
@Html.EditorFor(m=>m.Availability)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ActionDistance" class="col-md-2 control-label"></label>
|
||||
|
@ -15,16 +15,10 @@
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.EndOfTheDay)
|
||||
@Html.DisplayNameFor(model => model.Availability)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.Partial("HourFromMinutes", Model.EndOfTheDay)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.StartOfTheDay)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.Partial("HourFromMinutes", Model.StartOfTheDay)
|
||||
@Html.DisplayFor(model => model.Availability)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ActionDistance)
|
||||
|
25
Yavsc/Views/Period/Create.cshtml
Normal file
25
Yavsc/Views/Period/Create.cshtml
Normal file
@ -0,0 +1,25 @@
|
||||
@model Yavsc.Models.Calendar.Period
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>Period</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
22
Yavsc/Views/Period/Delete.cshtml
Normal file
22
Yavsc/Views/Period/Delete.cshtml
Normal file
@ -0,0 +1,22 @@
|
||||
@model Yavsc.Models.Calendar.Period
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Period</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
18
Yavsc/Views/Period/Details.cshtml
Normal file
18
Yavsc/Views/Period/Details.cshtml
Normal file
@ -0,0 +1,18 @@
|
||||
@model Yavsc.Models.Calendar.Period
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Period</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
27
Yavsc/Views/Period/Edit.cshtml
Normal file
27
Yavsc/Views/Period/Edit.cshtml
Normal file
@ -0,0 +1,27 @@
|
||||
@model Yavsc.Models.Calendar.Period
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>Period</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Start" />
|
||||
<input type="hidden" asp-for="End" />
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
26
Yavsc/Views/Period/Index.cshtml
Normal file
26
Yavsc/Views/Period/Index.cshtml
Normal file
@ -0,0 +1,26 @@
|
||||
@model IEnumerable<Yavsc.Models.Calendar.Period>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
15
Yavsc/Views/Shared/DisplayTemplates/Availability.cshtml
Normal file
15
Yavsc/Views/Shared/DisplayTemplates/Availability.cshtml
Normal file
@ -0,0 +1,15 @@
|
||||
@model Availability
|
||||
|
||||
@if (Model==null || Model.Count <1) {
|
||||
<text>Pas de disponibilité renseignée</text>
|
||||
} else {
|
||||
<table>
|
||||
<th><td>@Html.DisplayNameFor(m=>m[0].Start)</td>
|
||||
<td>@Html.DisplayNameFor(m=>m[0].End)</td></th>
|
||||
@foreach (var dispo in Model)
|
||||
{
|
||||
<tr><td>@Html.DisplayFor(m=>dispo.Start)</td>
|
||||
<td>@Html.DisplayFor(m=>dispo.End)</td></tr>
|
||||
}
|
||||
</table>
|
||||
}
|
3
Yavsc/Views/Shared/EditorTemplates/Availability.cshtml
Normal file
3
Yavsc/Views/Shared/EditorTemplates/Availability.cshtml
Normal file
@ -0,0 +1,3 @@
|
||||
@model Availability
|
||||
|
||||
L'index des periodes ...
|
@ -23,6 +23,8 @@
|
||||
@using Yavsc.Models.Drawing;
|
||||
@using Yavsc.Models.Haircut;
|
||||
@using Yavsc.Models.Payment;
|
||||
@using Yavsc.Models.Calendar;
|
||||
|
||||
|
||||
@using Yavsc.ViewModels.Account;
|
||||
@using Yavsc.ViewModels.Manage;
|
||||
|
Reference in New Issue
Block a user