Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions src/components/PriorityBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export function PriorityBadge({ priority }: PriorityBadgeProps) {
return 'bg-yellow-100 text-yellow-700 border-yellow-200'
case 'low':
return 'bg-gray-100 text-gray-700 border-gray-200'
case 'filled':
return 'bg-green-100 text-green-700 border-green-200'
case 'pushed_to_next_quarter':
return 'bg-blue-100 text-blue-700 border-blue-200'
default:
return 'bg-gray-100 text-gray-700 border-gray-200'
}
Expand Down
6 changes: 5 additions & 1 deletion src/routes/proposed-hires.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { customFilterFns, Filter } from '.'
import { getDeelEmployeesAndProposedHires } from './org-chart'
import AddProposedHirePanel from '@/components/AddProposedHirePanel'
import { useLocalStorage } from 'usehooks-ts'
import { PriorityBadge } from '@/components/PriorityBadge'

type ProposedHire = Prisma.ProposedHireGetPayload<{
include: {
Expand Down Expand Up @@ -132,6 +133,9 @@ function RouteComponent() {
{
accessorKey: 'priority',
header: 'Priority',
cell: ({ row }) => {
return <PriorityBadge priority={row.original.priority} />
},
sortingFn: (rowA, rowB) => {
const priorityOrder = [
'high',
Expand Down Expand Up @@ -246,7 +250,7 @@ function RouteComponent() {
<TableBody>
{table.getRowModel().rows?.length ? (
table.getRowModel().rows.map((row) => (
<TableRow key={row.id} className="hover:bg-gray-50">
<TableRow key={row.id}>
{row.getVisibleCells().map((cell) => (
<TableCell key={cell.id} className="px-1 py-1">
{flexRender(
Expand Down