fix(04-06): five post-deploy fixes
- Middleware (proxy.ts): switch internal API calls to localhost instead of
request.url — avoids Docker hairpin NAT issues where the container can't
reach its own external hostname via Traefik
- ProjectRow timer: pass projectId={project.id} to TimerCell so it calls
startTimer(projectId) directly instead of startTimerForClient(project.id)
- Admin client list: add slug field to ClientWithPayments + show slug link
when available (falls back to token) — so admins see the human-readable URL
- Analytics contracted: sum projects.accepted_total (authoritative) instead
of clients.accepted_total (always 0 in multi-project architecture)
- createClient: auto-generate slug from client name at creation time
(e.g. "Mario Rossi" → "mario-rossi"), with -2/-3 suffix on conflict
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,12 +53,12 @@ export function ClientRow({ client }: { client: ClientWithPayments }) {
|
||||
</td>
|
||||
<td className="py-3 px-4">
|
||||
<a
|
||||
href={`/client/${client.token}`}
|
||||
href={`/client/${client.slug || client.token}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-xs text-[#1A463C] hover:underline font-mono"
|
||||
>
|
||||
/client/{client.token.slice(0, 8)}…
|
||||
/client/{(client.slug || client.token).slice(0, 12)}…
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -52,6 +52,7 @@ export function ProjectRow({ project }: { project: ProjectWithPayments }) {
|
||||
<td className="py-3 px-4">
|
||||
<TimerCell
|
||||
clientId={project.id}
|
||||
projectId={project.id}
|
||||
activeEntryId={project.activeTimerEntryId}
|
||||
activeStartedAt={project.activeTimerStartedAt}
|
||||
totalTrackedSeconds={project.totalTrackedSeconds}
|
||||
|
||||
Reference in New Issue
Block a user