@using EventHub.Options @using EventHub.Web @using EventHub.Web.Pages.Events @using EventHub.Web.Pages.Events.Components.CreateOrEditEventArea @using Microsoft.AspNetCore.Http @using Microsoft.Extensions.Options @model EventHub.Web.Pages.Events.Components.CreateOrEditEventArea.CreateOrEditEventAreaViewComponent.NewEventViewModel @inject IOptions UrlOptions @{ var organizationName = ""; var countryName = ""; Guid? eventId = null; @if (ViewData["StepType"]!.ToString() == CreateOrEditEventAreaViewComponent.ProgressStepType.Preview.ToString()) { eventId = ViewData["EventId"] as Guid?; organizationName = ViewData["OrganizationName"] as string; if (organizationName.IsNullOrWhiteSpace()) { throw new BadHttpRequestException("Organization name cannot be empty!"); } countryName = ViewData["CountryName"] as string; if (Model is {CountryId: { } } && countryName.IsNullOrWhiteSpace()) { throw new BadHttpRequestException("Country name cannot be empty when CountryId exists!"); } } } @if (Model is not null) {

Event Preview

Organization Name:
@organizationName
Title:
@Model.Title
Start Date:
@Model.StartTime.ToShortDateString() - @Model.StartTime.ToShortTimeString()
End Date:
@Model.EndTime.ToShortDateString() - @Model.EndTime.ToShortTimeString()
Event’s Explanation:

@Model.Description

Cover Image:
@if (Model.IsOnline != null && Model.IsOnline!.Value) {
Event Type:
Online
@if (!Model.OnlineLink.IsNullOrWhiteSpace()) {
Url:
@Model.OnlineLink
} } else if (Model.CountryId.HasValue && !Model.City.IsNullOrEmpty()) {
Country:
@countryName
City:
@Model.City
} @if (!Model.Language.IsNullOrWhiteSpace()) {
Language:
@Model.Language
} @if (Model.Capacity.HasValue) {
Capacity:
@Model.Capacity
} @if (Model.Tracks.Any()) {
Tracks:
@Model.Tracks.Count
Sessions:
@foreach (var track in Model.Tracks) { } @foreach (var track in Model.Tracks) { }
@track.Name
@if (track.Sessions.Any()) { @foreach (var session in track.Sessions) {
@session.Title.TruncateWithPostfix(55) @EventDateHelper.GetTimeRangeText(TimeOnly.FromDateTime(session.StartTime), TimeOnly.FromDateTime(session.EndTime)) | @session.Language @foreach (var speaker in session.Speakers) { @speaker.UserName }
} } else {
There is no session! Tracks without Session are not visible after the event is published.
}
}
} else { }