This commit is contained in:
michael committed 2026-09-15 11:49:47 +00:00
1 parent 235c19e51b
commit 227644cfeb
8 files changed
+1041 -309

No files matched your search

+8 -2
View File
@@ -61,6 +61,12 @@ function ticketTeamspaceEntries(ticket: TicketMeta | null | undefined) {
return ticket?.project_teamspace_entries ?? [];
}
function teamspaceEntryOptionLabel(entry: { teamspace_project: string | null; is_default: boolean }) {
const label = entry.teamspace_project || "Ohne Teamspace-ID";
return entry.is_default ? `${label} (Standard)` : label;
}
function requiresTeamspaceEntry(ticket: TicketMeta | null | undefined) {
return Boolean(ticket?.is_project && ticketTeamspaceEntries(ticket).length > 1);
}
@@ -741,7 +747,7 @@ export function TimerPage({ timers, setTimers, selectedTimerId, setSelectedTimer
<option value="">Bitte wählen</option>
{ticketTeamspaceEntries(manualLookupTicket).map((entry) => (
<option key={entry.id} value={entry.id}>
{entry.teamspace_project || (entry.is_default ? "Standard" : "Ohne Teamspace-ID")}
{teamspaceEntryOptionLabel(entry)}
</option>
))}
</select>
@@ -880,7 +886,7 @@ export function TimerPage({ timers, setTimers, selectedTimerId, setSelectedTimer
<option value="">Bitte wählen</option>
{ticketTeamspaceEntries(finished?.ticket).map((entry) => (
<option key={entry.id} value={entry.id}>
{entry.teamspace_project || (entry.is_default ? "Standard" : "Ohne Teamspace-ID")}
{teamspaceEntryOptionLabel(entry)}
</option>
))}
</select>