diff --git a/src/Registration/Registration.API/RequestModels/ParticipantRegistrationRequest.cs b/src/Registration/Registration.API/RequestModels/ParticipantRegistrationRequest.cs
index 61f75c3..d7b36b0 100644
--- a/src/Registration/Registration.API/RequestModels/ParticipantRegistrationRequest.cs
+++ b/src/Registration/Registration.API/RequestModels/ParticipantRegistrationRequest.cs
@@ -20,7 +20,6 @@ public class ParticipantRegistrationRequest
public string? PhoneNumber { get; set; }
- [EmailAddress]
public string? Email { get; set; }
[Required]
diff --git a/src/Web/lan-frontend/app/admin/dashboard/page.tsx b/src/Web/lan-frontend/app/admin/dashboard/page.tsx
index ca7a895..f1bdc0c 100644
--- a/src/Web/lan-frontend/app/admin/dashboard/page.tsx
+++ b/src/Web/lan-frontend/app/admin/dashboard/page.tsx
@@ -15,6 +15,7 @@ interface EventContent {
rulesAndGdpr: string;
additionalInfo: string;
registrationEnabled: boolean;
+ volunteerRegistrationEnabled?: boolean;
visitorOnly: boolean;
volunteerAreas: string;
}
@@ -128,6 +129,19 @@ export default function AdminDashboard() {
Endast Besöks-registrering (Ingen Dator)
+
+ setContent(prev => prev ? { ...prev, volunteerRegistrationEnabled: e.target.checked } : null)}
+ />
+
+ Aktivera Funktionärs-anmälan
+
+
diff --git a/src/Web/lan-frontend/app/page.tsx b/src/Web/lan-frontend/app/page.tsx
index 1f836ab..8fe8589 100644
--- a/src/Web/lan-frontend/app/page.tsx
+++ b/src/Web/lan-frontend/app/page.tsx
@@ -15,6 +15,7 @@ interface EventContent {
rulesAndGdpr: string;
additionalInfo: string;
registrationEnabled: boolean;
+ volunteerRegistrationEnabled?: boolean;
visitorOnly: boolean;
volunteerAreas: string;
}
@@ -73,98 +74,111 @@ export default function LandingPage() {
{/* Info Section */}
- {(content.eventDate ||
- content.eventTime ||
- content.locationName ||
- content.locationAddress ||
- content.additionalInfo) && (
-
-
- Information
-
-
- {(content.eventDate || content.eventTime) && (
-
-
- Tid/Datum
-
- {content.eventDate &&
{content.eventDate}
}
- {content.eventTime &&
{content.eventTime}
}
-
- )}
- {(content.locationName || content.locationAddress) && (
-
-
Plats
- {content.locationName &&
{content.locationName}
}
- {content.locationAddress &&
{content.locationAddress}
}
-
- )}
-
- {content.additionalInfo && (
-
- {content.additionalInfo}
-
- )}
-
- )}
-
- {content.whatToBring && (
-
-
- Ta Med(bokad LAN-plats)
-
-
- {content.whatToBring
- .split("\n")
- .filter((line) => line.trim())
- .map((line, i) => (
- {line}
- ))}
-
-
- )}
-
- {content.rulesAndGdpr && (
-
-
- Regler för LAN & GDPR
-
-
- {content.rulesAndGdpr}
+ {!content.registrationEnabled ? (
+
+ Anmälan är stängd
+
+ Vi tar tyvärr inte emot fler anmälningar just nu. Håll utkik för framtida evenemang!
- )}
+ ) : (
+ <>
+ {(content.eventDate ||
+ content.eventTime ||
+ content.locationName ||
+ content.locationAddress ||
+ content.additionalInfo) && (
+
+
+ Information
+
+
+ {(content.eventDate || content.eventTime) && (
+
+
+ Tid/Datum
+
+ {content.eventDate &&
{content.eventDate}
}
+ {content.eventTime &&
{content.eventTime}
}
+
+ )}
+ {(content.locationName || content.locationAddress) && (
+
+
Plats
+ {content.locationName &&
{content.locationName}
}
+ {content.locationAddress &&
{content.locationAddress}
}
+
+ )}
+
+ {content.additionalInfo && (
+
+ {content.additionalInfo}
+
+ )}
+
+ )}
- {/* Call to Action */}
- {content.registrationEnabled && (
-
-
-
Vill du delta?
-
- Begränsade platser, Säkra din plats idag!
-
-
-
- Anmäl dig nu
-
-
+ {content.whatToBring && (
+
+
+ Ta Med(bokad LAN-plats)
+
+
+ {content.whatToBring
+ .split("\n")
+ .filter((line) => line.trim())
+ .map((line, i) => (
+ {line}
+ ))}
+
+
+ )}
+
+ {content.rulesAndGdpr && (
+
+
+ Regler för LAN & GDPR
+
+
+ {content.rulesAndGdpr}
+
+
+ )}
+
+ {/* Call to Action */}
+ {content.registrationEnabled && (
+
+
+
Vill du delta?
+
+ Begränsade platser, Säkra din plats idag!
+
+
+
+ Anmäl dig nu
+
+
+ )}
+ >
)}
{/* Footer */}
diff --git a/src/Web/lan-frontend/app/register/page.tsx b/src/Web/lan-frontend/app/register/page.tsx
index 991f80e..acea8f7 100644
--- a/src/Web/lan-frontend/app/register/page.tsx
+++ b/src/Web/lan-frontend/app/register/page.tsx
@@ -169,10 +169,6 @@ export default function RegisterPage() {
"Vårdnadshavarens e-postadress är ogiltig.";
}
- if (formData.email.trim() && !isValidEmail(formData.email.trim())) {
- nextFieldErrors.email = "Din e-postadress är ogiltig.";
- }
-
if (!formData.hasApprovedGdpr) {
nextFieldErrors.hasApprovedGdpr = "Du måste godkänna GDPR för att anmäla dig.";
}
@@ -240,7 +236,9 @@ export default function RegisterPage() {
if (response.ok) {
setMessage({
type: "success",
- text: "Registreringen är klar! Du är nu anmäld till LAN:et.",
+ text: isMember
+ ? "Registreringen är klar! Du är nu anmäld till LAN:et."
+ : "Din anmälan är mottagen, men det återstår ett viktigt steg för att du ska få delta.",
});
setShowBecomeMemberCta(!isMember);
@@ -300,19 +298,22 @@ export default function RegisterPage() {
{message.type === "success" && (
-
🎉
-
Klart!
+
{showBecomeMemberCta ? "⏳" : "🎉"}
+
+ {showBecomeMemberCta ? "Nästan Klart!" : "Klart!"}
+
{message.text}
{showBecomeMemberCta && (
-
+
- {message.text && (
+ {message.text && message.type !== "success" && (
@@ -42,6 +43,27 @@ export default function VolunteerPage() {
.then((data) => setContent(data))
.catch((err) => console.error("Failed to fetch content", err));
}, []);
+
+ if (content && content.volunteerRegistrationEnabled === false) {
+ return (
+
+
+
+ Anmälan är stängd
+
+
+ Vi tar tyvärr inte emot fler funktionärsanmälningar just nu.
+
+
router.push("/")}
+ className="text-blue-600 hover:underline"
+ >
+ Gå tillbaka till startsidan
+
+
+
+ );
+ }
const handleInputChange = (e: React.ChangeEvent
) => {
const { name, value, type, checked } = e.target;