From d702a2df7fa7d45a24bed6338487ed53e8222aaf Mon Sep 17 00:00:00 2001 From: Docker Config Backup Date: Tue, 29 Jul 2025 14:54:35 +0200 Subject: [PATCH] Final auto-save before shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-saved at 2025-07-29 14:54:35 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- auto-commit.sh | 8 ++++ components/timeshift-spreadsheet.tsx | 66 +++++++--------------------- logs/auto-commit.log | 4 ++ logs/auto-commit.out.log | 4 ++ 4 files changed, 33 insertions(+), 49 deletions(-) diff --git a/auto-commit.sh b/auto-commit.sh index ebf1280..b7c9ad7 100755 --- a/auto-commit.sh +++ b/auto-commit.sh @@ -36,6 +36,14 @@ EOF echo "✅ Changes committed successfully" + # Auto-push to remote repository + echo "📤 Pushing to remote repository..." + if git push origin main 2>/dev/null; then + echo "✅ Successfully pushed to remote" + else + echo "⚠️ Push failed (remote may be unreachable)" + fi + # Show short log git log --oneline -3 else diff --git a/components/timeshift-spreadsheet.tsx b/components/timeshift-spreadsheet.tsx index 78fa856..32b5382 100644 --- a/components/timeshift-spreadsheet.tsx +++ b/components/timeshift-spreadsheet.tsx @@ -102,13 +102,13 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP "Pohotovost IT" ] - // Add separator column and "Práce mimo směnu" column - titleRow.push("", "") // Empty separator + empty for merged cell - dayNameRow.push("", "Práce mimo směnu") // Empty separator + the text - yearRow.push("", "") // Empty separator + empty for merged cell - monthRow.push("", "") // Empty separator + empty for merged cell - dateRow.push("", "") // Empty separator + empty for merged cell - shiftRow.push("", "") // Empty separator + empty for merged cell + // Add one more column to the right + titleRow.push("") + dayNameRow.push("") + yearRow.push("") + monthRow.push("") + dateRow.push("") + shiftRow.push("") const employeeRows = employees.map(name => { const row = [name] @@ -263,7 +263,7 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP } // Style weekend days (Saturday/Sunday in day name row and date rows below) - for (let col = 1; col < (data[0]?.length || 0) - 2; col += 2) { // -2 to exclude separator and Práce mimo směnu columns + for (let col = 1; col < (data[0]?.length || 0); col += 2) { const dayName = data[1]?.[col] if (dayName === "Sobota" || dayName === "Neděle") { const colLetter = getExcelColumnName(col) @@ -281,27 +281,9 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP } } - // Style the "Práce mimo směnu" column (last column) - const totalCols = data[0]?.length || 0 - if (totalCols >= 2) { - const separatorColIndex = totalCols - 2 - const praceMimoColIndex = totalCols - 1 - const separatorColLetter = getExcelColumnName(separatorColIndex) - const praceMimoColLetter = getExcelColumnName(praceMimoColIndex) - - // Style separator column with left border - for (let row = 2; row <= 6; row++) { - styles[`${separatorColLetter}${row}`] = "border-left: 2px solid #000000;" - } - - // Style "Práce mimo směnu" column - styles[`${praceMimoColLetter}2`] = "border: 1px solid #000000; text-align: center; vertical-align: middle; font-weight: bold; height: 50px;" - for (let row = 3; row <= 6; row++) { - styles[`${praceMimoColLetter}${row}`] = "border-left: 1px solid #000000; border-right: 1px solid #000000;" - } - // Bottom border for the last row of the merged cell - styles[`${praceMimoColLetter}6`] += " border-bottom: 1px solid #000000;" - } + // Remove formatting specifically from BZ6 and CA6 cells + styles["BZ6"] = "" // Override any formatting for BZ6 + styles["CA6"] = "" // Override any formatting for CA6 } console.log("Initializing jspreadsheet with config:", { @@ -334,10 +316,10 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP const instance = jspreadsheetInstance.current as any if (instance.setMerge) { try { - // Merge all pairs in rows 2, 3, 4, 5 (day names, year, month, day) excluding separator and Práce mimo směnu columns + // Merge all pairs in rows 1, 2, 3, 4, 5 (title, day names, year, month, day) const totalCols = data[0]?.length || 0 - for (let row = 2; row <= 5; row++) { - for (let col = 1; col < totalCols - 2; col += 2) { // -2 to exclude separator and Práce mimo směnu columns + for (let row = 1; row <= 5; row++) { + for (let col = 1; col < totalCols; col += 2) { const colLetter = getExcelColumnName(col) try { // Correct syntax: setMerge(cellAddress, colspan, rowspan) @@ -347,15 +329,6 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP } } } - - // Merge "Práce mimo směnu" column vertically from rows 2-6 - const praceMimoColIndex = totalCols - 1 - const praceMimoColLetter = getExcelColumnName(praceMimoColIndex) - try { - instance.setMerge(`${praceMimoColLetter}2`, 1, 5) // 1 column, 5 rows (2-6) - } catch (error) { - console.error("Error merging Práce mimo směnu column:", error) - } } catch (error) { console.error("Error during merging:", error) } @@ -375,17 +348,12 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP if (rows[rowIndex]) { const cells = rows[rowIndex].querySelectorAll('td') cells.forEach((cell, cellIndex) => { - // Skip first two columns (row numbers and field labels), separator column, but include Práce mimo směnu + // Skip first two columns (row numbers and field labels) if (cellIndex > 1 && cellIndex < totalCells + 1) { // +1 because of row number column const originalText = cell.textContent?.trim() if (originalText) { - // Special handling for "Práce mimo směnu" text - if (originalText === "Práce mimo směnu") { - cell.innerHTML = `
${originalText}
` - } else if (cellIndex < totalCells - 1) { // Don't rotate separator column (empty) - // Use 12px font for all other rotated values (date values, day names, and shifts) - cell.innerHTML = `
${originalText}
` - } + // Use 12px font for all rotated values (date values, day names, and shifts) + cell.innerHTML = `
${originalText}
` } } }) diff --git a/logs/auto-commit.log b/logs/auto-commit.log index 12823ce..1977c26 100644 --- a/logs/auto-commit.log +++ b/logs/auto-commit.log @@ -30,3 +30,7 @@ 2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) 2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) 2025-07-29 14:35:46 +02:00: 🔄 Performing auto-commit... +2025-07-29 14:35:46 +02:00: ✅ Auto-commit successful +2025-07-29 14:54:35 +02:00: +2025-07-29 14:54:35 +02:00: 🛑 Stopping auto-commit watcher... +2025-07-29 14:54:35 +02:00: 💾 Saving final changes... diff --git a/logs/auto-commit.out.log b/logs/auto-commit.out.log index 9bc6e95..37d2664 100644 --- a/logs/auto-commit.out.log +++ b/logs/auto-commit.out.log @@ -28,3 +28,7 @@ 2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) 2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) 2025-07-29 14:35:46 +02:00: 🔄 Performing auto-commit... +2025-07-29 14:35:46 +02:00: ✅ Auto-commit successful +2025-07-29 14:54:35 +02:00: +2025-07-29 14:54:35 +02:00: 🛑 Stopping auto-commit watcher... +2025-07-29 14:54:35 +02:00: 💾 Saving final changes...