Skip to content

Commit

Permalink
Modifications for Calendar & Schedule Editor:
Browse files Browse the repository at this point in the history
1) Calendar.razor & EventView.razor - added Group Name & compact month view
2) Event Schedule Editor: modified page layout, added duration (hours) and Date & time are separated to two controls
3) updated translation resource files
  • Loading branch information
nidroks committed Nov 8, 2024
1 parent 745c7a7 commit 1d19d10
Show file tree
Hide file tree
Showing 8 changed files with 228 additions and 181 deletions.
98 changes: 59 additions & 39 deletions BedBrigade.Client/Components/EventView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@
@using BedBrigade.Common.Logic
@using BedBrigade.SpeakIt;

<div class='@RequestedView-wrap'>
<div>
@{
if (RequestedView == "month"){
<div >
<span style="font-weight: bold" >@_translateLogic.GetTranslation(EventData.Subject)</span><br />
@EventData.StartTime.ToString("hh:mm tt")
- @EventData.EndTime.ToString("hh:mm tt")
@if (!string.IsNullOrEmpty(EventData.GroupName)){
<br />@EventData.GroupName
}
</div>
}
else
{
<div class='@RequestedView-wrap'>
<div>
@{

switch(RequestedView){
Expand All @@ -17,12 +30,7 @@
@_translateLogic.GetTranslation(EventData.Subject)

</h4>
break;
case "month":
<div style="font-weight: bold">
@_translateLogic.GetTranslation(EventData.Subject)
</div>
break;
break;
case "week":
default:
<div>
Expand Down Expand Up @@ -52,10 +60,9 @@
<i class="far fa-clock"></i>&nbsp;@EventData.StartTime.ToString("hh:mm tt") - @EventData.EndTime.ToString("hh:mm tt")
</div>
}




@if (!string.IsNullOrEmpty(EventData.Location))
@if (!string.IsNullOrEmpty(EventData.Location))
{
<div>
<i class="fas fa-map-marker-alt"></i>&nbsp;
Expand All @@ -72,37 +79,46 @@
</div>
}

@if (!string.IsNullOrEmpty(EventData.OrganizerName))
{
<div>
<i class="far fa-user"></i>
@_lc.Keys["OrganizerColon"] @EventData.OrganizerName
</div>
}
@if (!string.IsNullOrEmpty(EventData.GroupName))
{
<div>
<i class="fas fa-users"></i>
@_lc.Keys["Group"]&colon;&nbsp;@EventData.GroupName
</div>
}

@if (!string.IsNullOrEmpty(EventData.OrganizerEmail))
{
<div>
<i class="far fa-envelope"></i> <a href="mailto:@EventData.OrganizerEmail" @onclick="HandleHyperlinkClick" target="_blank" >@EventData.OrganizerEmail</a>
</div>
}

@if (!string.IsNullOrEmpty(EventData.OrganizerPhone))
{
<div>
<i class="fas fa-phone"></i>&nbsp;<a href="tel:@StringUtil.ExtractDigits(EventData.OrganizerPhone)" @onclick="HandleHyperlinkClick" > @EventData.OrganizerPhone</a>
</div>
}
@if (!string.IsNullOrEmpty(EventData.OrganizerName))
{
<div>
<i class="far fa-user"></i>
@_lc.Keys["OrganizerColon"] @EventData.OrganizerName
</div>
}

@if (!string.IsNullOrEmpty(EventData.Volunteers))
{
<div>
<i class="fas fa-user-friends"></i>
@_lc.Keys["VolunteersRegisteredColon"] @EventData.Volunteers
</div>
}
@if (!string.IsNullOrEmpty(EventData.OrganizerEmail))
{
<div>
<i class="far fa-envelope"></i> <a href="mailto:@EventData.OrganizerEmail" @onclick="HandleHyperlinkClick" target="_blank" >@EventData.OrganizerEmail</a>
</div>
}

@if (!string.IsNullOrEmpty(EventData.Description))
@if (!string.IsNullOrEmpty(EventData.OrganizerPhone))
{
<div>
<i class="fas fa-phone"></i>&nbsp;<a href="tel:@StringUtil.ExtractDigits(EventData.OrganizerPhone)" @onclick="HandleHyperlinkClick" > @EventData.OrganizerPhone</a>
</div>
}

@if (!string.IsNullOrEmpty(EventData.Volunteers))
{
<div>
<i class="fas fa-user-friends"></i>
@_lc.Keys["VolunteersRegisteredColon"] @EventData.Volunteers
</div>
}

@if (!string.IsNullOrEmpty(EventData.Description))
{
@switch (RequestedView)
{
Expand All @@ -128,9 +144,13 @@
<div>
<i class="far fa-comments"></i>&nbsp;
@((MarkupString)SplitDescription)
</div>
</div>
}

</div>
}
}


@code {

Expand Down
2 changes: 1 addition & 1 deletion BedBrigade.Client/Components/Pages/Calendar.razor
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
}
.e-schedule .e-month-view .e-appointment {
height: 200px;
height: 60px;
font-size: smaller;
padding-left: 5px;
}
Expand Down
1 change: 1 addition & 0 deletions BedBrigade.Client/Components/Pages/Calendar.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ private List<AppointmentData> GetCalendarAppointments(List<Schedule> BBEvents)
EndTime = s.EventDateScheduled.AddHours(s.EventDurationHours),
Description = StringUtil.IsNull(s.EventNote,""),
Location = FormatAddress(s.Address, s.City, s.State, s.PostalCode),
GroupName = StringUtil.IsNull(s.GroupName, ""),
OrganizerName = s.OrganizerName,
OrganizerPhone = s.OrganizerPhone,
OrganizerEmail = s.OrganizerEmail,
Expand Down
Loading

0 comments on commit 1d19d10

Please sign in to comment.