- #51: Add permanent redirect /login → /auth/signin in next.config.ts so users/testers who type the common alias land on the correct auth page - #53: Add "Allocations → New Planning Entry" link to empty states of ProjectDemandsTable and ProjectAssignmentsTable; add shortcut link in demands table header for canEdit users - #54: Track confirmed dropdown selection in ResourcePersonPicker — green ring + checkmark icon shown when user picks from suggestions; cleared on any manual keypress so free-text is clearly unconfirmed Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { formatCents, formatDate } from "~/lib/format.js";
|
||||
import { InfoTooltip } from "~/components/ui/InfoTooltip.js";
|
||||
import { FillOpenDemandModal } from "~/components/allocations/FillOpenDemandModal.js";
|
||||
@@ -59,11 +60,21 @@ export function ProjectDemandsTable({ demands, project }: ProjectDemandsTablePro
|
||||
<h2 className="text-sm font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
Open Demands ({allDemands.length})
|
||||
</h2>
|
||||
{activeDemands.length > 0 && (
|
||||
<span className="text-xs text-amber-600 dark:text-amber-400">
|
||||
{activeDemands.reduce((sum, d) => sum + d.unfilledHeadcount, 0)} seats unfilled
|
||||
</span>
|
||||
)}
|
||||
<div className="flex items-center gap-3">
|
||||
{activeDemands.length > 0 && (
|
||||
<span className="text-xs text-amber-600 dark:text-amber-400">
|
||||
{activeDemands.reduce((sum, d) => sum + d.unfilledHeadcount, 0)} seats unfilled
|
||||
</span>
|
||||
)}
|
||||
{canEdit && (
|
||||
<Link
|
||||
href="/allocations"
|
||||
className="text-xs font-medium text-brand-600 hover:text-brand-800 dark:text-brand-400 dark:hover:text-brand-200"
|
||||
>
|
||||
+ New in Allocations
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<table className="w-full">
|
||||
<thead className="bg-gray-50 dark:bg-gray-800/50 border-b border-gray-200 dark:border-gray-700">
|
||||
@@ -192,7 +203,18 @@ export function ProjectDemandsTable({ demands, project }: ProjectDemandsTablePro
|
||||
</tbody>
|
||||
</table>
|
||||
{allDemands.length === 0 && (
|
||||
<div className="text-center py-12 text-gray-500 dark:text-gray-400 text-sm">No open demands for this project.</div>
|
||||
<div className="text-center py-12 text-sm text-gray-500 dark:text-gray-400 space-y-2">
|
||||
<p>No open demands for this project.</p>
|
||||
{canEdit && (
|
||||
<p>
|
||||
Create staffing entries via{" "}
|
||||
<Link href="/allocations" className="text-brand-600 hover:underline dark:text-brand-400">
|
||||
Allocations → New Planning Entry
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user