Layout verbessert Diverse Bugs im Kalender- und Intervallfindermodul gefixt
196 lines
10 KiB
Plaintext
196 lines
10 KiB
Plaintext
@model BeWoPlanerMobil.Models.SchedulerModel
|
|
|
|
<script>
|
|
function deleteAppointment(appointmentOid) {
|
|
try {
|
|
$.get("@Url.Action("DeleteAppointment")", { appointmentOid: appointmentOid}).done(function() {
|
|
$("#appointment-list-container").load("@Url.Action("FetchAppointments")");
|
|
});
|
|
} catch(error) {
|
|
logError(error);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
@* Ganztagestermine in eine Liste mit weniger Margin und Padding *@
|
|
<div id="one-day-scheduler-partial-container">
|
|
@if(Model.AppointmentListItems.Any(a => a.AllDay))
|
|
{
|
|
foreach(var appointment in Model.AppointmentListItems.Where(a => a.AllDay))
|
|
{
|
|
<div class="card w-100 mb-3 p-0">
|
|
<div class="card-header border-left appointment-header py-0 my-0" onclick="cardHeaderClick('#chevron-appointment-@appointment.Identifier', '#collapse-appointment-@appointment.Identifier')">
|
|
<div class="d-inline-flex">
|
|
<i class="fas fa-chevron-down h-100 text-primary" id="chevron-appointment-@appointment.Identifier"></i>
|
|
</div>
|
|
<div class="p2 d-inline-flex text-primary h-100">
|
|
<button type="button" class="btn btn-link text-wrap text-break">
|
|
@if(appointment.IsTask)
|
|
{
|
|
<span class="text-bewo-task-red">@appointment.DateTimeInfo</span>
|
|
}
|
|
else
|
|
{
|
|
<span>@appointment.DateTimeInfo</span>
|
|
}
|
|
|
|
@if(appointment.Oid is null)
|
|
{
|
|
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
|
|
}
|
|
|
|
@if(appointment.IsException)
|
|
{
|
|
<span class="fa-stack ml-2" style="display: inline;">
|
|
<i class="fas fa-sync-alt fa-stack-1x text-secondary"></i>
|
|
<i class="fas fa-slash fa-stack-1x text-secondary"></i>
|
|
</span>
|
|
}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="collapse" id="collapse-appointment-@appointment.Identifier">
|
|
<div class="card-body">
|
|
<div class="container-fluid">
|
|
@if(appointment.HasEmployeesCustomersOrResources && !appointment.IsTask)
|
|
{
|
|
<div class="row">
|
|
@if(!string.IsNullOrWhiteSpace(appointment.EmployeeListInfo))
|
|
{
|
|
<div class="col col-12 col-md-@appointment.ColSize">
|
|
<i class="fas fa-user text-bewo-employee"></i>
|
|
@appointment.EmployeeListInfo
|
|
</div>
|
|
}
|
|
@if(!string.IsNullOrWhiteSpace(appointment.CustomerListInfo))
|
|
{
|
|
<div class="col col-12 col-md-@appointment.ColSize">
|
|
<i class="fas fa-user text-bewo-customers"></i>
|
|
@appointment.CustomerListInfo
|
|
</div>
|
|
}
|
|
@if(!string.IsNullOrWhiteSpace(appointment.ResourceListInfo))
|
|
{
|
|
<div class="col col-12 col-md-@appointment.ColSize">
|
|
<i class="fas fa-cubes text-bewo-resource"></i>
|
|
@appointment.ResourceListInfo
|
|
</div>
|
|
}
|
|
</div>
|
|
<hr />
|
|
}
|
|
|
|
@if(Model.HasRightToEditAppointment(appointment.Oid) && !appointment.IsTask && appointment.Oid.HasValue && appointment.CanBeEdited)
|
|
{
|
|
using(Html.BeginForm("SelectAppointmentToEdit", "Scheduler", FormMethod.Post))
|
|
{
|
|
<div class="row mb-3">
|
|
<div class="col-auto">
|
|
<button type="submit" class="btn btn-primary" onclick="showSpinner()">
|
|
<span class="fas fa-edit"></span>
|
|
</button>
|
|
<input type="hidden" name="scheduler-oid-holder" value="@appointment.Oid" />
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
<p>@appointment.Description</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<hr />
|
|
}
|
|
|
|
@foreach(var appointment in Model.AppointmentListItems.Where(a => !a.AllDay))
|
|
{
|
|
<div class="card w-100 mb-3">
|
|
<div class="card-header border-left appointment-header" onclick="cardHeaderClick('#chevron-appointment-@appointment.Identifier', '#collapse-appointment-@appointment.Identifier')">
|
|
<div class="d-inline-flex">
|
|
<i class="fas fa-chevron-down h-100 text-primary" id="chevron-appointment-@appointment.Identifier"></i>
|
|
</div>
|
|
<div class="p2 d-inline-flex text-primary h-100">
|
|
<button type="button" class="btn btn-link text-wrap text-break">
|
|
@if(appointment.IsTask)
|
|
{
|
|
<span class="text-bewo-task-red">@appointment.DateTimeInfo</span>
|
|
}
|
|
else
|
|
{
|
|
<span>@appointment.DateTimeInfo</span>
|
|
}
|
|
|
|
@if(appointment.Oid == null)
|
|
{
|
|
<i class="ml-2 fas fa-sync-alt text-secondary"></i>
|
|
}
|
|
|
|
@if(appointment.IsException)
|
|
{
|
|
<span class="fa-stack ml-2" style="display: inline;">
|
|
<i class="fas fa-sync-alt fa-stack-1x text-secondary"></i>
|
|
<i class="fas fa-slash fa-stack-1x text-secondary"></i>
|
|
</span>
|
|
}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="collapse" id="collapse-appointment-@appointment.Identifier">
|
|
<div class="card-body">
|
|
<div class="container-fluid">
|
|
@if(appointment.HasEmployeesCustomersOrResources && !appointment.IsTask)
|
|
{
|
|
<div class="row">
|
|
@if(!string.IsNullOrWhiteSpace(appointment.EmployeeListInfo))
|
|
{
|
|
<div class="col col-12 col-md-@appointment.ColSize">
|
|
<i class="fas fa-user text-bewo-employee"></i>
|
|
@appointment.EmployeeListInfo
|
|
</div>
|
|
}
|
|
@if(!string.IsNullOrWhiteSpace(appointment.CustomerListInfo))
|
|
{
|
|
<div class="col col-12 col-md-@appointment.ColSize">
|
|
<i class="fas fa-user text-bewo-customers"></i>
|
|
@appointment.CustomerListInfo
|
|
</div>
|
|
}
|
|
@if(!string.IsNullOrWhiteSpace(appointment.ResourceListInfo))
|
|
{
|
|
<div class="col col-12 col-md-@appointment.ColSize">
|
|
<i class="fas fa-cubes text-bewo-resource"></i>
|
|
@appointment.ResourceListInfo
|
|
</div>
|
|
}
|
|
</div>
|
|
<hr />
|
|
}
|
|
|
|
@if(Model.HasRightToEditAppointment(appointment.Oid) && !appointment.IsTask && appointment.Oid.HasValue && appointment.CanBeEdited)
|
|
{
|
|
using(Html.BeginForm("SelectAppointmentToEdit", "Scheduler", FormMethod.Post))
|
|
{
|
|
<div class="row mb-3">
|
|
<div class="col-auto">
|
|
<button type="submit" class="btn btn-primary" onclick="showSpinner()">
|
|
<span class="fas fa-edit"></span>
|
|
</button>
|
|
<input type="hidden" name="scheduler-oid-holder" value="@appointment.Oid" />
|
|
</div>
|
|
<div class="col-auto">
|
|
<button type="button" class="btn btn-primary" onclick="deleteAppointment(@appointment.Oid)">
|
|
<span class="fas fa-trash-alt"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
<p>@appointment.Description</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div> |