refactor: improve team management, OKRs, and session components

This commit is contained in:
2026-02-25 17:29:40 +01:00
parent c828ab1a48
commit a10205994c
74 changed files with 3771 additions and 1889 deletions

View File

@@ -4,7 +4,12 @@ import { auth } from '@/lib/auth';
import { getWorkshop, getSessionsTabUrl } from '@/lib/workshops';
import { getWeatherSessionById, getPreviousWeatherEntriesForUsers } from '@/services/weather';
import { getUserTeams } from '@/services/teams';
import { WeatherBoard, WeatherLiveWrapper, WeatherInfoPanel, WeatherAverageBar } from '@/components/weather';
import {
WeatherBoard,
WeatherLiveWrapper,
WeatherInfoPanel,
WeatherAverageBar,
} from '@/components/weather';
import { Badge } from '@/components/ui';
import { EditableWeatherTitle } from '@/components/ui/EditableWeatherTitle';
@@ -26,10 +31,7 @@ export default async function WeatherSessionPage({ params }: WeatherSessionPageP
notFound();
}
const allUserIds = [
session.user.id,
...session.shares.map((s: { userId: string }) => s.userId),
];
const allUserIds = [session.user.id, ...session.shares.map((s: { userId: string }) => s.userId)];
const [previousEntries, userTeams] = await Promise.all([
getPreviousWeatherEntriesForUsers(session.id, session.date, allUserIds),

View File

@@ -19,7 +19,9 @@ export default function NewWeatherPage() {
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
const [selectedDate, setSelectedDate] = useState(new Date().toISOString().split('T')[0]);
const [title, setTitle] = useState(() => getWeekYearLabel(new Date(new Date().toISOString().split('T')[0])));
const [title, setTitle] = useState(() =>
getWeekYearLabel(new Date(new Date().toISOString().split('T')[0]))
);
const [isTitleManuallyEdited, setIsTitleManuallyEdited] = useState(false);
async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
@@ -69,7 +71,8 @@ export default function NewWeatherPage() {
Nouvelle Météo
</CardTitle>
<CardDescription>
Créez une météo personnelle pour faire le point sur 4 axes clés et partagez-la avec votre équipe
Créez une météo personnelle pour faire le point sur 4 axes clés et partagez-la avec
votre équipe
</CardDescription>
</CardHeader>
@@ -109,7 +112,8 @@ export default function NewWeatherPage() {
<h3 className="font-medium text-foreground mb-2">Comment ça marche ?</h3>
<ol className="text-sm text-muted space-y-1 list-decimal list-inside">
<li>
<strong>Performance</strong> : Comment évaluez-vous votre performance personnelle ?
<strong>Performance</strong> : Comment évaluez-vous votre performance personnelle
?
</li>
<li>
<strong>Moral</strong> : Quel est votre moral actuel ?
@@ -118,11 +122,13 @@ export default function NewWeatherPage() {
<strong>Flux</strong> : Comment se passe votre flux de travail personnel ?
</li>
<li>
<strong>Création de valeur</strong> : Comment évaluez-vous votre création de valeur ?
<strong>Création de valeur</strong> : Comment évaluez-vous votre création de
valeur ?
</li>
</ol>
<p className="text-sm text-muted mt-2">
💡 <strong>Astuce</strong> : Partagez votre météo avec votre équipe pour qu&apos;ils puissent voir votre état. Chaque membre peut créer sa propre météo et la partager !
💡 <strong>Astuce</strong> : Partagez votre météo avec votre équipe pour qu&apos;ils
puissent voir votre état. Chaque membre peut créer sa propre météo et la partager !
</p>
</div>