feat: image support

also translated some strings back into english
This commit is contained in:
2025-06-02 04:37:54 +02:00
parent f7583738d7
commit 9de5c85120
17 changed files with 125 additions and 60 deletions

View File

@@ -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 {