diff --git a/components/timeshift-spreadsheet.tsx b/components/timeshift-spreadsheet.tsx index c023438..f31ae44 100644 --- a/components/timeshift-spreadsheet.tsx +++ b/components/timeshift-spreadsheet.tsx @@ -484,6 +484,45 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP const existingCA28Style = styles["CA28"] || "" styles["CA28"] = existingCA28Style + " border-top: 1px solid #000000;" + // Add left border to CB column (CB2-CB22 and CB24-CB27, excluding CB23) + for (let row = 2; row <= 27; row++) { + if (row !== 23) { // Skip row 23 where "Pohotovost IT" is located + const existingCBStyle = styles[`CB${row}`] || "" + styles[`CB${row}`] = existingCBStyle + " border-left: 1px solid #000000;" + } + } + + // Apply same background colors to CA column as applied to main table rows + // Background color for rows 7, 8, and 9 (same as main table) + for (let row = 7; row <= 9; row++) { + const existingCAStyle = styles[`CA${row}`] || "" + styles[`CA${row}`] = existingCAStyle + " background-color: #FCD5B4;" + } + + // Alternating row background colors for CA column starting from row 10 (same as main table) + for (let row = 10; row <= totalRows; row += 2) { // Start from 10, increment by 2 + if (row <= 27) { // Only apply to rows up to 27 + const existingCAStyle = styles[`CA${row}`] || "" + styles[`CA${row}`] = existingCAStyle + " background-color: #D9D9D9;" + } + } + + // Add dotted top borders to CA column for employee rows (starting from row 8, same as main table) + for (let row = 8; row <= 27; row++) { + // Skip rows 23 and 24 as they will get solid borders instead + if (row !== 23 && row !== 24) { + const existingCAStyle = styles[`CA${row}`] || "" + styles[`CA${row}`] = existingCAStyle + " border-top: 1px dotted #000000;" + } + } + + // Ensure solid top borders on CA23 and CA24 (override any previous styling) + const existingCA23Style2 = styles["CA23"] || "" + styles["CA23"] = existingCA23Style2.replace(" border-top: 1px dotted #000000;", "") + " border-top: 1px solid #000000;" + + const existingCA24Style2 = styles["CA24"] || "" + styles["CA24"] = existingCA24Style2.replace(" border-top: 1px dotted #000000;", "") + " border-top: 1px solid #000000;" + } // Validate configuration before initializing