From a8fc2adab604dac0213533a2708d9c278f658032 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 21 Jan 2026 11:22:52 +0100 Subject: [PATCH] feat(dashboard): add environment availability alert for projects - Implemented a check for projects with no accessible environments, displaying an alert message to inform users. - Updated project link behavior to prevent navigation when no environments are available, enhancing user experience. --- .../components/dashboard/projects/show.tsx | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/projects/show.tsx b/apps/dokploy/components/dashboard/projects/show.tsx index 740c75d8f..8234593e1 100644 --- a/apps/dokploy/components/dashboard/projects/show.tsx +++ b/apps/dokploy/components/dashboard/projects/show.tsx @@ -293,13 +293,24 @@ export const ShowProjects = () => { project?.environments.find((env) => env.isDefault) || project?.environments?.[0]; + const hasNoEnvironments = !accessibleEnvironment; + return (
{ + if (hasNoEnvironments) { + e.preventDefault(); + } + }} > {haveServicesWithDomains ? ( @@ -431,6 +442,16 @@ export const ShowProjects = () => { {project.description} + + {hasNoEnvironments && ( +
+ + + You have access to this project but no + environments are available + +
+ )}