berkansasmaz
5 years ago
No known key found for this signature in database
GPG Key ID: 884D815C3F32BE00
10 changed files with
16 additions and
26 deletions
-
src/EventHub.Application/Events/EventAppService.cs
-
src/EventHub.Domain/Events/Event.cs
-
src/EventHub.Domain/Events/Track.cs
-
src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml
-
src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/Default.cshtml
-
src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_eventSection.cshtml
-
src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_sessionSection.cshtml
-
src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_trackSection.cshtml
-
src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/create-or-edit-event-area.js
-
src/EventHub.Web/Pages/PrivacyPolicy.cshtml.cs
|
|
|
@ -262,7 +262,6 @@ namespace EventHub.Events |
|
|
|
[Authorize] |
|
|
|
public async Task UpdateAsync(Guid id, UpdateEventDto input) |
|
|
|
{ |
|
|
|
// TODO(berkansasmaz): Should it be updated on past events?
|
|
|
|
var @event = await _eventRepository.GetAsync(id); |
|
|
|
await CheckIfValidOwnerAsync(@event); |
|
|
|
|
|
|
|
|
|
|
|
@ -185,9 +185,7 @@ namespace EventHub.Events |
|
|
|
ICollection<Guid> speakerUserIds) |
|
|
|
{ |
|
|
|
CheckIfValidSessionTime(startTime, endTime); |
|
|
|
|
|
|
|
// TODO(berkansasmaz): Add domain rule: The same user cannot be a speaker in more than one session at the same time.
|
|
|
|
|
|
|
|
|
|
|
|
var track = GetTrack(trackId); |
|
|
|
track.AddSession(sessionId, title, description,startTime, endTime, language, speakerUserIds); |
|
|
|
return this; |
|
|
|
@ -243,12 +241,6 @@ namespace EventHub.Events |
|
|
|
|
|
|
|
private void CheckIfValidSessionTime(DateTime startTime, DateTime endTime) |
|
|
|
{ |
|
|
|
// TODO(berkansasmaz): This control is already done in Track and even Session. Do you really need this?
|
|
|
|
if (startTime > endTime) |
|
|
|
{ |
|
|
|
throw new BusinessException(EventHubErrorCodes.SessionEndTimeCantBeEarlierThanStartTime); |
|
|
|
} |
|
|
|
|
|
|
|
if (startTime < this.StartTime || this.EndTime < endTime) |
|
|
|
{ |
|
|
|
throw new BusinessException(EventHubErrorCodes.SessionTimeShouldBeInTheEventTime); |
|
|
|
|
|
|
|
@ -54,7 +54,7 @@ namespace EventHub.Events |
|
|
|
|
|
|
|
if (startTime > endTime) |
|
|
|
{ |
|
|
|
throw new BusinessException(EventHubErrorCodes.EndTimeCantBeEarlierThanStartTime); |
|
|
|
throw new BusinessException(EventHubErrorCodes.SessionEndTimeCantBeEarlierThanStartTime); |
|
|
|
} |
|
|
|
|
|
|
|
CheckIfValidSessionTime(startTime); |
|
|
|
@ -76,7 +76,7 @@ namespace EventHub.Events |
|
|
|
{ |
|
|
|
if (startTime > endTime) |
|
|
|
{ |
|
|
|
throw new BusinessException(EventHubErrorCodes.EndTimeCantBeEarlierThanStartTime); |
|
|
|
throw new BusinessException(EventHubErrorCodes.SessionEndTimeCantBeEarlierThanStartTime); |
|
|
|
} |
|
|
|
|
|
|
|
var session = Sessions.Single(x => x.Id == sessionId); |
|
|
|
|
|
|
|
@ -44,7 +44,6 @@ |
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge"> |
|
|
|
|
|
|
|
<title>@pageTitle</title> |
|
|
|
@* TODO(berkansasmaz): Get SEO content from the marketing team *@ |
|
|
|
<meta name="description" content="@(!string.IsNullOrEmpty(ViewBag.Description) ? ViewBag.Description : "EventHub Description")"/> |
|
|
|
<meta property="og:title" content="@(!string.IsNullOrWhiteSpace(ViewBag.OgTitle) ? ViewBag.OgTitle : "EventHub Title")"/> |
|
|
|
<meta property="og:url" content="@Context.Request.GetDisplayUrl()"/> |
|
|
|
@ -88,4 +87,4 @@ |
|
|
|
@await RenderSectionAsync("scripts", false) |
|
|
|
@await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Application) |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
</html> |
|
|
|
|
|
|
|
@ -18,14 +18,14 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
<div id="CreateEventContainer" style="@(stepType != CreateOrEditEventAreaViewComponent.ProgressStepType.Event ? "display: none" : "")"> |
|
|
|
<partial name="_newEventSection.cshtml" model="@Model"/> |
|
|
|
<div id="EventContainer" style="@(stepType != CreateOrEditEventAreaViewComponent.ProgressStepType.Event ? "display: none" : "")"> |
|
|
|
<partial name="_eventSection.cshtml" model="@Model"/> |
|
|
|
</div> |
|
|
|
<div id="CreateTrackContainer" style="@(stepType != CreateOrEditEventAreaViewComponent.ProgressStepType.Track ? "display: none" : "")"> |
|
|
|
<partial name="_addTrackSection.cshtml" model="@Model.Tracks"/> |
|
|
|
<div id="TrackContainer" style="@(stepType != CreateOrEditEventAreaViewComponent.ProgressStepType.Track ? "display: none" : "")"> |
|
|
|
<partial name="_trackSection.cshtml" model="@Model.Tracks"/> |
|
|
|
</div> |
|
|
|
<div id="CreateSessionContainer" style="@(stepType != CreateOrEditEventAreaViewComponent.ProgressStepType.Session ? "display: none" : "")"> |
|
|
|
<partial name="_addSessionSection.cshtml" model="@Model.Tracks"/> |
|
|
|
<div id="SessionContainer" style="@(stepType != CreateOrEditEventAreaViewComponent.ProgressStepType.Session ? "display: none" : "")"> |
|
|
|
<partial name="_sessionSection.cshtml" model="@Model.Tracks"/> |
|
|
|
</div> |
|
|
|
<div id="PreviewContainer" style="@(stepType != CreateOrEditEventAreaViewComponent.ProgressStepType.Preview ? "display: none" : "")"> |
|
|
|
<partial name="_previewSection.cshtml" model="@Model"/> |
|
|
|
|
|
|
|
@ -42,7 +42,7 @@ |
|
|
|
<div class="col-md-9 mx-auto profile-content"> |
|
|
|
<div class="card"> |
|
|
|
<div class="card-body" style="min-height: 496px"> |
|
|
|
<h3 class="mb-4">Create New Event</h3> |
|
|
|
<h3 class="mb-4">@(eventId.HasValue ? "Edit" : "Create New") Event</h3> |
|
|
|
<div class="form"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-md-6"> |
|
|
|
@ -152,7 +152,7 @@ |
|
|
|
<div class="col-md-12 text-end"> |
|
|
|
<button id="CreateEventButton" disabled type="submit" class="btn btn-primary btn-lg" |
|
|
|
data-url="@(eventId.HasValue ? Url.ActionLink("Update", "Event", new {Area = "eventhub", id = eventId!.Value}, null) : Url.ActionLink("Create", "Event", new {Area = "eventhub"}, null))"> |
|
|
|
Next Step |
|
|
|
Next Step <i class="fa fa-arrow-right ms-2"></i> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -93,8 +93,8 @@ |
|
|
|
}); |
|
|
|
|
|
|
|
function SwitchToTrackCreation() { |
|
|
|
$('#CreateEventContainer').css('display', 'none'); |
|
|
|
$('#CreateTrackContainer').css('display', ''); |
|
|
|
$('#EventContainer').css('display', 'none'); |
|
|
|
$('#TrackContainer').css('display', ''); |
|
|
|
ScrollToWrapperBegin(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -2,11 +2,11 @@ namespace EventHub.Web.Pages |
|
|
|
{ |
|
|
|
public class PrivacyPolicy : EventHubPageModel |
|
|
|
{ |
|
|
|
public static string LastUpdateDate { get; set; } = "February 23, 2020"; // ToDo: Change LastUpdateDate
|
|
|
|
public static string LastUpdateDate { get; set; } = "February 23, 2020"; |
|
|
|
|
|
|
|
public void OnGet() |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|