Save before creating restore point: Periodic backup

Auto-saved at 2025-07-30 12:54:37

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Docker Config Backup
2025-07-30 12:54:37 +02:00
parent d390613a1c
commit 11aac2b8c2
3 changed files with 35 additions and 6 deletions

View File

@@ -365,6 +365,19 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP
styles["A23"] = "font-weight: bold;" // "Pohotovost IT" styles["A23"] = "font-weight: bold;" // "Pohotovost IT"
} }
// Validate configuration before initializing
if (!data || data.length === 0) {
console.error("Data is empty or undefined:", data)
isInitializingRef.current = false
return
}
if (!columns || columns.length === 0) {
console.error("Columns is empty or undefined:", columns)
isInitializingRef.current = false
return
}
console.log("Initializing jspreadsheet with config:", { console.log("Initializing jspreadsheet with config:", {
dataRows: data.length, dataRows: data.length,
dataCols: data[0]?.length, dataCols: data[0]?.length,
@@ -372,9 +385,9 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP
stylesCount: Object.keys(styles).length stylesCount: Object.keys(styles).length
}) })
jspreadsheetInstance.current = (jexcelLib as (el: HTMLElement, config: unknown) => unknown)(spreadsheetRef.current, { const config = {
data: data, data: data || [],
columns: columns, columns: columns || [],
minDimensions: [data[0]?.length || 8, Math.max(data.length + 3, 10)], minDimensions: [data[0]?.length || 8, Math.max(data.length + 3, 10)],
allowInsertRow: true, allowInsertRow: true,
allowInsertColumn: false, allowInsertColumn: false,
@@ -384,7 +397,7 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP
tableOverflow: true, tableOverflow: true,
tableWidth: "100%", tableWidth: "100%",
tableHeight: "500px", tableHeight: "500px",
style: styles, style: styles || {},
onchange: (instance: any, cell: HTMLElement, x: number, y: number, value: string) => { onchange: (instance: any, cell: HTMLElement, x: number, y: number, value: string) => {
console.log("onChange triggered:", { x, y, value, isMerging: isMergingRef.current }) console.log("onChange triggered:", { x, y, value, isMerging: isMergingRef.current })
@@ -501,9 +514,19 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP
}) })
} }
} }
}) }
console.log("jspreadsheet initialized:", !!jspreadsheetInstance.current) console.log("Config validation passed, creating jspreadsheet instance...")
try {
jspreadsheetInstance.current = (jexcelLib as (el: HTMLElement, config: unknown) => unknown)(spreadsheetRef.current, config)
console.log("jspreadsheet initialized:", !!jspreadsheetInstance.current)
} catch (error) {
console.error("Error initializing jspreadsheet:", error)
console.error("Config that caused error:", config)
isInitializingRef.current = false
return
}
// Additional event listener for first row rotation as fallback // Additional event listener for first row rotation as fallback
setTimeout(() => { setTimeout(() => {

View File

@@ -173,3 +173,6 @@
2025-07-30 11:54:37 +02:00: 🔖 Creating restore point... 2025-07-30 11:54:37 +02:00: 🔖 Creating restore point...
2025-07-30 11:54:53 +02:00: ✅ Restore point created 2025-07-30 11:54:53 +02:00: ✅ Restore point created
2025-07-30 12:24:37 +02:00: 🔖 Creating restore point... 2025-07-30 12:24:37 +02:00: 🔖 Creating restore point...
2025-07-30 12:26:09 +02:00: ✅ Restore point created
2025-07-30 12:54:37 +02:00: 🔄 Hourly reset: Commit counter reset to 0
2025-07-30 12:54:37 +02:00: 🔖 Creating restore point...

View File

@@ -169,3 +169,6 @@
2025-07-30 11:54:37 +02:00: 🔖 Creating restore point... 2025-07-30 11:54:37 +02:00: 🔖 Creating restore point...
2025-07-30 11:54:53 +02:00: ✅ Restore point created 2025-07-30 11:54:53 +02:00: ✅ Restore point created
2025-07-30 12:24:37 +02:00: 🔖 Creating restore point... 2025-07-30 12:24:37 +02:00: 🔖 Creating restore point...
2025-07-30 12:26:09 +02:00: ✅ Restore point created
2025-07-30 12:54:37 +02:00: 🔄 Hourly reset: Commit counter reset to 0
2025-07-30 12:54:37 +02:00: 🔖 Creating restore point...