Update event types in EventManagement and EventsPageSection components: Replace existing event types with new categories (ATELIER, KATA, PRESENTATION, LEARNING_HOUR) to better reflect current offerings. Adjust related functions and seed data to ensure consistency across the application.
This commit is contained in:
@@ -8,7 +8,7 @@ interface Event {
|
||||
date: string;
|
||||
name: string;
|
||||
description: string;
|
||||
type: "SUMMIT" | "LAUNCH" | "FESTIVAL" | "COMPETITION" | "CODE_KATA";
|
||||
type: "ATELIER" | "KATA" | "PRESENTATION" | "LEARNING_HOUR";
|
||||
status: "UPCOMING" | "LIVE" | "PAST";
|
||||
room?: string | null;
|
||||
time?: string | null;
|
||||
@@ -22,31 +22,28 @@ interface EventFormData {
|
||||
date: string;
|
||||
name: string;
|
||||
description: string;
|
||||
type: "SUMMIT" | "LAUNCH" | "FESTIVAL" | "COMPETITION" | "CODE_KATA";
|
||||
type: "ATELIER" | "KATA" | "PRESENTATION" | "LEARNING_HOUR";
|
||||
room?: string;
|
||||
time?: string;
|
||||
maxPlaces?: number;
|
||||
}
|
||||
|
||||
const eventTypes: Event["type"][] = [
|
||||
"SUMMIT",
|
||||
"LAUNCH",
|
||||
"FESTIVAL",
|
||||
"COMPETITION",
|
||||
"CODE_KATA",
|
||||
"ATELIER",
|
||||
"KATA",
|
||||
"PRESENTATION",
|
||||
"LEARNING_HOUR",
|
||||
];
|
||||
const getEventTypeLabel = (type: Event["type"]) => {
|
||||
switch (type) {
|
||||
case "SUMMIT":
|
||||
return "Sommet";
|
||||
case "LAUNCH":
|
||||
return "Lancement";
|
||||
case "FESTIVAL":
|
||||
return "Festival";
|
||||
case "COMPETITION":
|
||||
return "Compétition";
|
||||
case "CODE_KATA":
|
||||
return "Code Kata";
|
||||
case "ATELIER":
|
||||
return "Atelier";
|
||||
case "KATA":
|
||||
return "Kata";
|
||||
case "PRESENTATION":
|
||||
return "Présentation";
|
||||
case "LEARNING_HOUR":
|
||||
return "Learning Hour";
|
||||
default:
|
||||
return type;
|
||||
}
|
||||
@@ -75,7 +72,7 @@ export default function EventManagement() {
|
||||
date: "",
|
||||
name: "",
|
||||
description: "",
|
||||
type: "SUMMIT",
|
||||
type: "ATELIER",
|
||||
room: "",
|
||||
time: "",
|
||||
maxPlaces: undefined,
|
||||
@@ -106,7 +103,7 @@ export default function EventManagement() {
|
||||
date: "",
|
||||
name: "",
|
||||
description: "",
|
||||
type: "SUMMIT",
|
||||
type: "ATELIER",
|
||||
room: "",
|
||||
time: "",
|
||||
maxPlaces: undefined,
|
||||
@@ -157,7 +154,7 @@ export default function EventManagement() {
|
||||
date: "",
|
||||
name: "",
|
||||
description: "",
|
||||
type: "SUMMIT",
|
||||
type: "ATELIER",
|
||||
room: "",
|
||||
time: "",
|
||||
maxPlaces: undefined,
|
||||
@@ -203,7 +200,7 @@ export default function EventManagement() {
|
||||
date: "",
|
||||
name: "",
|
||||
description: "",
|
||||
type: "SUMMIT",
|
||||
type: "ATELIER",
|
||||
room: "",
|
||||
time: "",
|
||||
maxPlaces: undefined,
|
||||
|
||||
Reference in New Issue
Block a user