diff --git a/frontend/src/components/InfoPage.tsx b/frontend/src/components/InfoPage.tsx
index f45b0d6..7bb7845 100644
--- a/frontend/src/components/InfoPage.tsx
+++ b/frontend/src/components/InfoPage.tsx
@@ -164,7 +164,7 @@ export function InfoPage() {
)}
- {updateInfo && updateInfo.available && (
+ {updateInfo && updateInfo.available && !downloadComplete && (
@@ -187,7 +187,7 @@ export function InfoPage() {
{updateInfo.release_notes && (
Änderungen:
-
+
{updateInfo.release_notes}
@@ -197,17 +197,75 @@ export function InfoPage() {
{updateInfo.download_url && (
+
+ {downloading && (
+
+ Update wird heruntergeladen und verifiziert. Dies kann einige Minuten dauern...
+
+ )}
)}
)}
+
+ {/* Download Complete State */}
+ {downloadComplete && (
+
+
+
+
+
+ Update heruntergeladen
+
+
+
+ Das Update auf Version {updateInfo?.latest_version} wurde erfolgreich heruntergeladen und die SHA256-Prüfsumme wurde verifiziert.
+
+
+ Bitte starten Sie die Anwendung neu, um das Update zu installieren.
+
+
+
+
+
+
+
+
+
+
+ )}
diff --git a/frontend/src/components/WeekPlanner.tsx b/frontend/src/components/WeekPlanner.tsx
index 1a87300..40f0e7f 100644
--- a/frontend/src/components/WeekPlanner.tsx
+++ b/frontend/src/components/WeekPlanner.tsx
@@ -105,6 +105,164 @@ export function WeekPlanner({ year, week, className = '' }: WeekPlannerProps) {
}
};
+ // Handle print preview
+ const handlePrintPreview = () => {
+ if (!weekPlan) return;
+
+ // Erstelle druckbares HTML
+ const printContent = `
+
+
+
+
+
+ Wochenplan KW ${week} ${year} - Druckvorschau
+
+
+
+
+
+
+ ${weekDays.map((date, index) => {
+ const dayNumber = (index + 1) as WeekDay;
+ const dayName = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag'][index];
+ const dateStr = date.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' });
+
+ const specialDay = getSpecialDay(dayNumber);
+ const fruehstueckEntries = getEntriesForDay(dayNumber, 'fruehstueck');
+ const vesperEntries = getEntriesForDay(dayNumber, 'vesper');
+
+ return `
+
+
+
+ ${specialDay ? `
${specialDay.label || specialDay.type}
` : ''}
+
+
+
Frühstück
+ ${fruehstueckEntries.map(entry => `
+
+ ${entry.product_name || entry.custom_text || 'Eintrag'}
+ ${entry.group_label ? ` (${entry.group_label})` : ''}
+
+ `).join('')}
+ ${fruehstueckEntries.length === 0 ? '
-
' : ''}
+
+
+
+
Vesper
+ ${vesperEntries.map(entry => `
+
+ ${entry.product_name || entry.custom_text || 'Eintrag'}
+ ${entry.group_label ? ` (${entry.group_label})` : ''}
+
+ `).join('')}
+ ${vesperEntries.length === 0 ? '
-
' : ''}
+
+
+ `;
+ }).join('')}
+
+
+
+
+
+
+
+ `;
+
+ // Öffne neues Fenster mit druckbarem Content
+ const printWindow = window.open('', '_blank');
+ if (printWindow) {
+ printWindow.document.write(printContent);
+ printWindow.document.close();
+ }
+ };
+
// Loading state
if (loading && !weekPlan) {
return (
@@ -224,6 +382,17 @@ export function WeekPlanner({ year, week, className = '' }: WeekPlannerProps) {
)}
{pdfExporting ? 'Erstelle PDF...' : 'PDF erstellen'}
+
+ {/* Print Preview Button */}
+
Erstellt: {new Date(weekPlan.created_at).toLocaleDateString('de-DE')}