Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
566eb37
add salary history card
raquelmsmith Nov 15, 2025
9f1d71e
add feedback card to history
raquelmsmith Nov 15, 2025
1fe90dd
timeline view new salary form
raquelmsmith Nov 15, 2025
d4c0be8
updates
raquelmsmith Nov 15, 2025
a0524cf
make more table-like
raquelmsmith Nov 16, 2025
a8b210c
change icon
raquelmsmith Nov 16, 2025
fa177bf
show country flags
raquelmsmith Nov 16, 2025
7067d09
fix entry form style
raquelmsmith Nov 16, 2025
d8c8a81
improve timeline feedback view
raquelmsmith Nov 16, 2025
b74dfc9
fix form
raquelmsmith Nov 16, 2025
e818784
fix form
raquelmsmith Nov 16, 2025
e6f6400
clean up
raquelmsmith Nov 17, 2025
d41667c
clean up
raquelmsmith Nov 17, 2025
c9c42eb
text size
raquelmsmith Nov 17, 2025
92d8cfd
fix spacing
raquelmsmith Nov 17, 2025
100d87c
name and last change columns
raquelmsmith Nov 17, 2025
f89c317
level/step display
raquelmsmith Nov 17, 2025
b6cfc8a
priority column
raquelmsmith Nov 17, 2025
22c4864
status column
raquelmsmith Nov 17, 2025
8620bbd
reviewer avatar
raquelmsmith Nov 17, 2025
db69f30
fix comments
raquelmsmith Nov 17, 2025
0aa3964
width
raquelmsmith Nov 17, 2025
060a212
no justify end
raquelmsmith Nov 17, 2025
c0d1c7a
better mismatch display
raquelmsmith Nov 17, 2025
acf0b2b
add basic filters
raquelmsmith Nov 17, 2025
b8b7f15
change filters
raquelmsmith Nov 17, 2025
2fbb5a5
spacing
raquelmsmith Nov 17, 2025
7cc4af2
Merge remote-tracking branch 'origin/main' into rms/feat/employee-tab…
MarconLP Dec 3, 2025
d65ff96
fix
MarconLP Dec 3, 2025
19c650d
fix
MarconLP Dec 3, 2025
b0c26f6
prettify
MarconLP Dec 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions src/components/EmployeeNameCell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { useState, useRef, useLayoutEffect } from 'react'

interface EmployeeNameCellProps {
name: string
notes?: string | null
}

export function EmployeeNameCell({ name, notes }: EmployeeNameCellProps) {
const [isExpanded, setIsExpanded] = useState(false)
const [isTruncated, setIsTruncated] = useState(false)
const textRef = useRef<HTMLDivElement>(null)

useLayoutEffect(() => {
const checkTruncation = () => {
if (textRef.current) {
const element = textRef.current
setIsTruncated(element.scrollHeight > element.clientHeight)
}
}

checkTruncation()
const timeoutId = setTimeout(checkTruncation, 0)

return () => clearTimeout(timeoutId)
}, [notes, isExpanded])

return (
<div className="max-w-[300px] pl-4">
<div className="text-sm font-bold">{name}</div>
{notes && (
<div className="mt-1 mb-2 ml-2 border-l-2 border-gray-200 py-1 pl-2 text-xs text-gray-500 italic">
<div className="relative">
<p
ref={textRef}
className={`break-words whitespace-normal ${isExpanded ? '' : 'line-clamp-2'}`}
>
{notes}
</p>
{isTruncated && !isExpanded && (
<button
onClick={(e) => {
e.stopPropagation()
setIsExpanded(true)
}}
className="absolute right-0 bottom-0 bg-gradient-to-l from-white from-50% via-white via-70% to-transparent pl-10 font-semibold text-gray-500 not-italic hover:text-blue-700"
>
read more
</button>
)}
</div>
{isExpanded && (
<button
onClick={(e) => {
e.stopPropagation()
setIsExpanded(false)
}}
className="mt-1 font-semibold text-gray-500 not-italic hover:text-blue-700"
>
read less
</button>
)}
</div>
)}
</div>
)
}
Loading