diff --git a/src/client/src/app/components/events/event-details/event-details.component.html b/src/client/src/app/components/events/event-details/event-details.component.html
index 5bd12c5..b8125a1 100644
--- a/src/client/src/app/components/events/event-details/event-details.component.html
+++ b/src/client/src/app/components/events/event-details/event-details.component.html
@@ -39,14 +39,25 @@
{{ event.registrationDeadline | date: 'medium' : undefined : locale() }}
@if (canStart()) {
-
+
+
+ @if (!hasInstances()) {
+
{{
+ translations.events_warning_notStartableNoInstances()
+ }}
+ } @else if (!allTimeslotsHaveMaps()) {
+
{{
+ translations.events_warning_notStartableMissingMap()
+ }}
+ }
+
}
@if (canCommit()) {
this.timeslots().some(x => x.instances.length > 0)
);
+ protected readonly allTimeslotsHaveMaps = computed(
+ () =>
+ !this.event()
+ ?.timeslots.filter(x => x.instances.length > 0)
+ .some(x => x.mapId === null || x.mapId === undefined)
+ );
protected readonly canBuildInstances = computed(() =>
ifTruthy(this.event(), event => event.registrationDeadline.getTime() < this.now(), false)
);
protected readonly canStart = computed(
- () =>
- this.canBuildInstances() && this.event() && !this.event()?.startedAt && this.hasInstances()
+ () => this.canBuildInstances() && this.event() && !this.event()?.startedAt
);
protected readonly canCommit = computed(
@@ -103,10 +108,7 @@ export class EventDetailsComponent {
);
protected readonly allowToStart = computed(
- () =>
- !this.event()
- ?.timeslots.filter(x => x.instances.length > 0)
- .some(x => x.mapId === null || x.mapId === undefined)
+ () => this.hasInstances() && this.allTimeslotsHaveMaps()
);
constructor() {
diff --git a/src/client/src/app/i18n/de.json b/src/client/src/app/i18n/de.json
index 1c56615..8e4bb7e 100644
--- a/src/client/src/app/i18n/de.json
+++ b/src/client/src/app/i18n/de.json
@@ -131,6 +131,10 @@
"title": "Veranstaltung freigeben",
"text": "Möchtest du die Veranstlaung {{date}} wirklich freigeben? Die Zeitfenster können nicht mehr angepasst werden und die Spieler werden über ein neues Event benachrichtigt"
},
+ "warning": {
+ "notStartableNoInstances": "Die Veranstaltung kann nicht gestartet werden, da die Gruppen noch nicht gebildet wurden.",
+ "notStartableMissingMap": "Die Veranstaltung kann nicht gestartet werden, da nicht für alle gespielten Zeitslots eine Bahn festgelegt wurde."
+ },
"error": {
"load": "Fehler beim Laden der Veranstaltungen.",
"loadOne": "Fehler beim Laden der Veranstaltung.",
diff --git a/src/client/src/app/i18n/en.json b/src/client/src/app/i18n/en.json
index 346114f..2410699 100644
--- a/src/client/src/app/i18n/en.json
+++ b/src/client/src/app/i18n/en.json
@@ -131,6 +131,10 @@
"title": "Commit event",
"text": "Do you really want to release the event {{date}}? The time slots can no longer be adjusted and players will be notified of a new event"
},
+ "warning": {
+ "notStartableNoInstances": "The event cannot be started because the groups have not been built yet.",
+ "notStartableMissingMap": "The event cannot be started because not all played timeslots have a map assigned."
+ },
"error": {
"load": "Failed to load events.",
"loadOne": "Failed to load event.",
diff --git a/src/client/src/dark-theme.scss b/src/client/src/dark-theme.scss
index 62a8d3c..dc9d9aa 100644
--- a/src/client/src/dark-theme.scss
+++ b/src/client/src/dark-theme.scss
@@ -15,5 +15,6 @@
sans-serif;
--font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
- --danger-color: #fca5a5;
+ --danger-color: #f87171;
+ --warning-color: #fb923c;
}
diff --git a/src/client/src/light-theme.scss b/src/client/src/light-theme.scss
index 94dd4f5..d7b724d 100644
--- a/src/client/src/light-theme.scss
+++ b/src/client/src/light-theme.scss
@@ -16,4 +16,5 @@
--font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
--danger-color: #ef4444;
+ --warning-color: #f97316;
}
diff --git a/src/client/tailwind.config.js b/src/client/tailwind.config.js
index 64afc83..6603af3 100644
--- a/src/client/tailwind.config.js
+++ b/src/client/tailwind.config.js
@@ -29,6 +29,7 @@ module.exports = {
'text-color-secondary': 'var(--text-color-secondary)',
primary: 'var(--primary-color)',
danger: 'var(--danger-color)',
+ warning: 'var(--warning-color)',
'primary-text': 'var(--primary-color-text)',
'surface-0': 'var(--surface-0)',
'surface-50': 'var(--surface-50)',