fixed back button with source, and customer in customer lsit clickable

This commit is contained in:
2026-03-21 12:16:04 +01:00
parent d7b42f64b1
commit eecc6cd73e
7 changed files with 38 additions and 23 deletions
@@ -271,7 +271,7 @@ export default function ContractList() {
<div className="w-6" /> // Platzhalter für Ausrichtung
) : null}
<Link to={`/contracts/${contract.id}`} className="font-mono flex items-center gap-1 hover:text-blue-600 hover:underline">
<Link to={`/contracts/${contract.id}`} state={{ from: '/contracts' }} className="font-mono flex items-center gap-1 hover:text-blue-600 hover:underline">
{contract.contractNumber}
<CopyButton value={contract.contractNumber} />
</Link>
@@ -456,7 +456,7 @@ export default function ContractList() {
{data.data.map((contract) => (
<tr key={contract.id} className="border-b hover:bg-gray-50">
<td className="py-3 px-4 font-mono text-sm">
<Link to={`/contracts/${contract.id}`} className="text-blue-600 hover:underline">
<Link to={`/contracts/${contract.id}`} state={{ from: '/contracts' }} className="text-blue-600 hover:underline">
{contract.contractNumber}
</Link>
</td>
@@ -465,6 +465,7 @@ export default function ContractList() {
{contract.customer && (
<Link
to={`/customers/${contract.customer.id}`}
state={{ from: '/contracts' }}
className="text-blue-600 hover:underline"
>
{contract.customer.companyName ||
@@ -504,7 +505,7 @@ export default function ContractList() {
<Eye className="w-4 h-4" />
</Button>
{hasPermission('contracts:update') && !isCustomer && (
<Link to={`/contracts/${contract.id}/edit`}>
<Link to={`/contracts/${contract.id}/edit`} state={{ from: '/contracts' }}>
<Button variant="ghost" size="sm">
<Edit className="w-4 h-4" />
</Button>