mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 13:40:13 +01:00
feat: image support
also translated some strings back into english
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Security.Cryptography;
|
||||
using WebApp.DTOs;
|
||||
using WebApp.Entities;
|
||||
|
||||
@@ -12,6 +13,7 @@ public static class EventMapping
|
||||
{
|
||||
Title = ECDto.Title,
|
||||
Description = ECDto.Description,
|
||||
ImageURL = ECDto.ImageURL,
|
||||
Location = ECDto.Location,
|
||||
EventDate = DateTime.SpecifyKind(ECDto.EventDate!.Value, DateTimeKind.Utc),
|
||||
EventSkills = ECDto.EventSkills,
|
||||
@@ -26,6 +28,7 @@ public static class EventMapping
|
||||
EventId = id,
|
||||
Title = EUDto.Title,
|
||||
Description = EUDto.Description,
|
||||
ImageURL = EUDto.ImageURL,
|
||||
Location = EUDto.Location,
|
||||
EventDate = DateTime.SpecifyKind(EUDto.EventDate!.Value, DateTimeKind.Utc),
|
||||
EventSkills = EUDto.EventSkills
|
||||
@@ -38,14 +41,20 @@ public static class EventMapping
|
||||
List<SkillSummaryDto> ssdto = [];
|
||||
List<EventRegistrationDto> erdto = [];
|
||||
|
||||
foreach (EventSkill es in myEvent.EventSkills)
|
||||
if (myEvent.EventSkills != null)
|
||||
{
|
||||
ssdto.Add(es.ToSkillSummaryDto());
|
||||
foreach (EventSkill es in myEvent.EventSkills)
|
||||
{
|
||||
ssdto.Add(es.ToSkillSummaryDto());
|
||||
}
|
||||
}
|
||||
|
||||
foreach (EventRegistration er in myEvent.EventRegistrations)
|
||||
if (myEvent.EventRegistrations != null)
|
||||
{
|
||||
erdto.Add(er.ToEventRegistrationDto());
|
||||
foreach (EventRegistration er in myEvent.EventRegistrations)
|
||||
{
|
||||
erdto.Add(er.ToEventRegistrationDto());
|
||||
}
|
||||
}
|
||||
|
||||
return new EventSummaryDto {
|
||||
@@ -92,14 +101,20 @@ public static class EventMapping
|
||||
List<SkillSummaryDto> ssdto = [];
|
||||
List<EventRegistrationDto> erdto = [];
|
||||
|
||||
foreach (EventSkill es in myEvent.EventSkills)
|
||||
if (myEvent.EventSkills != null)
|
||||
{
|
||||
ssdto.Add(es.ToSkillSummaryDto());
|
||||
foreach (EventSkill es in myEvent.EventSkills)
|
||||
{
|
||||
ssdto.Add(es.ToSkillSummaryDto());
|
||||
}
|
||||
}
|
||||
|
||||
foreach (EventRegistration er in myEvent.EventRegistrations)
|
||||
if (myEvent.EventRegistrations != null)
|
||||
{
|
||||
erdto.Add(er.ToEventRegistrationDto());
|
||||
foreach (EventRegistration er in myEvent.EventRegistrations)
|
||||
{
|
||||
erdto.Add(er.ToEventRegistrationDto());
|
||||
}
|
||||
}
|
||||
|
||||
return new EventDetailsDto {
|
||||
|
||||
Reference in New Issue
Block a user