Save before creating restore point: Periodic backup
Auto-saved at 2025-07-30 10:24:37 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -411,28 +411,76 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP
|
|||||||
const rows = table.querySelectorAll('tr')
|
const rows = table.querySelectorAll('tr')
|
||||||
if (rows[0]) {
|
if (rows[0]) {
|
||||||
const cells = rows[0].querySelectorAll('td')
|
const cells = rows[0].querySelectorAll('td')
|
||||||
const targetCell = cells[x + 1] as HTMLElement // +1 because first cell is row number
|
let targetCell = cells[x + 1] as HTMLElement // +1 because first cell is row number
|
||||||
console.log("Target cell found:", !!targetCell, "Target cell:", targetCell)
|
console.log("Initial target cell found:", !!targetCell, "Cell display:", targetCell?.style.display, "Target cell:", targetCell)
|
||||||
|
|
||||||
|
// Handle both hidden and visible cells
|
||||||
|
if (targetCell) {
|
||||||
|
if (targetCell.style.display === 'none') {
|
||||||
|
console.log("🔍 Target cell is hidden, finding visible merged cell...")
|
||||||
|
const targetX = parseInt(String(x))
|
||||||
|
|
||||||
|
// For merged cells, find the visible cell that represents this position
|
||||||
|
let foundCell = null
|
||||||
|
|
||||||
|
// Look for visible cells around this position
|
||||||
|
for (let i = 1; i < cells.length; i++) {
|
||||||
|
const cell = cells[i] as HTMLElement
|
||||||
|
if (cell && cell.style.display !== 'none') {
|
||||||
|
const cellX = parseInt(cell.getAttribute('data-x') || '0')
|
||||||
|
const cellSpan = cell.colSpan || 1
|
||||||
|
|
||||||
|
// Check if this visible cell covers our target position
|
||||||
|
if (cellX <= targetX && targetX < cellX + cellSpan) {
|
||||||
|
foundCell = cell
|
||||||
|
console.log("🎯 Found covering visible cell:", foundCell, "covers position", targetX)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (foundCell) {
|
||||||
|
targetCell = foundCell
|
||||||
|
} else {
|
||||||
|
console.warn("❌ Could not find visible cell for hidden position")
|
||||||
|
return // Skip if we can't find a visible cell
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log("✅ Target cell is visible, using directly")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (targetCell) {
|
if (targetCell) {
|
||||||
const displayValue = value !== undefined && value !== null ? String(value).trim() : ''
|
const displayValue = value !== undefined && value !== null ? String(value).trim() : ''
|
||||||
console.log("Processing value:", displayValue)
|
console.log("Processing value:", displayValue)
|
||||||
|
console.log("Target cell before rotation:", targetCell.outerHTML)
|
||||||
|
|
||||||
if (displayValue) {
|
if (displayValue) {
|
||||||
// Apply rotation with improved styling
|
// Force clear any existing content first
|
||||||
targetCell.innerHTML = `<div style="
|
targetCell.innerHTML = ''
|
||||||
transform: rotate(-90deg);
|
|
||||||
font-size: 12px;
|
// Apply rotation with improved styling - using important to override jspreadsheet styles
|
||||||
height: 80px;
|
const rotatedDiv = document.createElement('div')
|
||||||
width: 20px;
|
rotatedDiv.style.cssText = `
|
||||||
display: flex;
|
transform: rotate(-90deg) !important;
|
||||||
align-items: center;
|
font-size: 12px !important;
|
||||||
justify-content: center;
|
height: 80px !important;
|
||||||
white-space: nowrap;
|
width: 20px !important;
|
||||||
margin: 0 auto;
|
display: flex !important;
|
||||||
transform-origin: center center;
|
align-items: center !important;
|
||||||
">${displayValue}</div>`
|
justify-content: center !important;
|
||||||
|
white-space: nowrap !important;
|
||||||
|
margin: 0 auto !important;
|
||||||
|
transform-origin: center center !important;
|
||||||
|
position: relative !important;
|
||||||
|
color: #000 !important;
|
||||||
|
background: transparent !important;
|
||||||
|
`
|
||||||
|
rotatedDiv.textContent = displayValue
|
||||||
|
targetCell.appendChild(rotatedDiv)
|
||||||
|
|
||||||
console.log("✅ Rotation applied successfully to cell with value:", displayValue)
|
console.log("✅ Rotation applied successfully to cell with value:", displayValue)
|
||||||
|
console.log("Target cell after rotation:", targetCell.outerHTML)
|
||||||
} else {
|
} else {
|
||||||
// Clear cell content but maintain structure
|
// Clear cell content but maintain structure
|
||||||
targetCell.innerHTML = ''
|
targetCell.innerHTML = ''
|
||||||
|
|||||||
@@ -161,3 +161,5 @@
|
|||||||
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
||||||
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
||||||
2025-07-30 10:08:28 +02:00: 🔄 Performing auto-commit...
|
2025-07-30 10:08:28 +02:00: 🔄 Performing auto-commit...
|
||||||
|
2025-07-30 10:08:37 +02:00: ✅ Auto-commit successful
|
||||||
|
2025-07-30 10:24:37 +02:00: 🔖 Creating restore point...
|
||||||
|
|||||||
@@ -157,3 +157,5 @@
|
|||||||
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
||||||
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
2025-07-30 10:07:58 +02:00: 📝 File changed: app/layout.tsx (change)
|
||||||
2025-07-30 10:08:28 +02:00: 🔄 Performing auto-commit...
|
2025-07-30 10:08:28 +02:00: 🔄 Performing auto-commit...
|
||||||
|
2025-07-30 10:08:37 +02:00: ✅ Auto-commit successful
|
||||||
|
2025-07-30 10:24:37 +02:00: 🔖 Creating restore point...
|
||||||
|
|||||||
Reference in New Issue
Block a user