Files
BeWoPlaner/BeWoPlanerMobil/Views/DevExpressScheduler/VerticalAppointmentTemplatePartial.cshtml

80 lines
2.6 KiB
Plaintext

@using BeWoPlanerMobil.Util
@using BS.Shared.DataContracts
@using DevExpress.Web.ASPxScheduler.Drawing
@model AppointmentViewInfo
@functions{
string GetHeaderText(){
return $"{Model.AppointmentInterval.Start.ToShortTimeString()} - {Model.Appointment.End.ToShortTimeString()}";
}
string GetRight()
{
var serviceRecords = Model.Appointment.CustomFields[nameof(SchedulerAppointmentDC.ServiceRecordList)] as List<ServiceRecordDC> ?? new List<ServiceRecordDC>();
return serviceRecords.Any() ? "40px" : "23px";
}
}
<style type="text/css">
.verticalTemplate {
position: absolute;
top: 3px;
left: 3px;
height: 90%;
width: 90%;
overflow: hidden;
cursor: default;
background-color: #C0FFD0;
font-family: "Signika Negative";
border-radius: 5px;
}
.verticalTemplateInfoDiv {
white-space: nowrap;
overflow: hidden;
font: 10pt 'Signika Negative';
color: #37414D;
margin: .25em;
display: block;
}
.vertical-appointment-label .recurring-label-span {
margin-left: auto;
margin-right: 0;
}
.vertical-appointment-label {
display: inline-block;
margin-right: 5px;
}
</style>
<div class="verticalTemplate" style="border-left: @MobileUtils.GetLeftAppointmentBorder(Model.Appointment);background: @MobileUtils.GetAppointmentRightBackground(Model.Appointment) right / 5px 100% no-repeat, #C0FFD0;">
<div class="verticalTemplateInfoDiv">
<label class="vertical-appointment-label text-truncate" style="width: 90%;">
@GetHeaderText() <span style="font-weight: bold;">@Model.Appointment.Subject (@Model.Appointment.Location)</span>
</label>
<div class="clearfix d-inline">
@if(Model.Appointment.CustomFields[nameof(SchedulerAppointmentDC.ServiceRecordList)] is List<ServiceRecordDC> serviceRecords && serviceRecords.Any())
{
<i class="fas fa-clock text-bewo-service-records float-right recurring-label-span mr-1"></i>
}
@if(Model.Appointment.IsRecurring)
{
if(Model.Appointment.Id is long)
{
<span class="fa-stack fa-1x text-info float-right" style="height:fit-content;width:fit-content;position:absolute;top:10px;right:@GetRight();">
<i class="fas fa-solid fa-stack-1x fa-slash"></i>
<i class="fas fa-solid fa-stack-1x fa-sync-alt"></i>
</span>
}
else
{
<i class="fas fa-sync-alt text-info float-right mr-1 recurring-label-span"></i>
}
}
</div>
</div>
</div>