From 5806068e2e3c78923d4ed8f9f564a21f637d5c09 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Fri, 17 May 2024 23:43:07 -0600 Subject: [PATCH] refactor: improve UI --- .../application/delete-application.tsx | 4 +- .../application/domains/delete-domain.tsx | 4 +- .../application/domains/show-domains.tsx | 14 +- .../application/domains/update-domain.tsx | 4 +- .../application/update-application.tsx | 2 +- .../dashboard/mariadb/delete-mariadb.tsx | 98 +++++----- .../dashboard/mariadb/update-mariadb.tsx | 2 +- components/dashboard/mongo/delete-mongo.tsx | 98 +++++----- components/dashboard/mongo/update-mongo.tsx | 2 +- components/dashboard/mysql/delete-mysql.tsx | 98 +++++----- components/dashboard/mysql/update-mysql.tsx | 2 +- .../dashboard/postgres/delete-postgres.tsx | 98 +++++----- .../dashboard/postgres/update-postgres.tsx | 2 +- components/dashboard/redis/delete-redis.tsx | 98 +++++----- components/dashboard/redis/update-redis.tsx | 2 +- .../certificates/show-certificates.tsx | 30 +-- .../settings/cluster/nodes/add-node.tsx | 3 +- .../cluster/registry/show-registry.tsx | 6 +- .../destination/show-destinations.tsx | 6 +- .../settings/github/github-setup.tsx | 16 +- .../settings/users/add-permissions.tsx | 11 +- .../dashboard/settings/users/add-user.tsx | 5 +- .../dashboard/settings/users/delete-user.tsx | 10 +- .../dashboard/settings/users/show-users.tsx | 174 +++++++++++------- .../services/application/[applicationId].tsx | 2 +- .../services/mariadb/[mariadbId].tsx | 2 +- .../[projectId]/services/mongo/[mongoId].tsx | 2 +- .../[projectId]/services/mysql/[mysqlId].tsx | 2 +- .../services/postgres/[postgresId].tsx | 2 +- .../[projectId]/services/redis/[redisId].tsx | 2 +- 30 files changed, 431 insertions(+), 370 deletions(-) diff --git a/components/dashboard/application/delete-application.tsx b/components/dashboard/application/delete-application.tsx index b9286674..aa6fd902 100644 --- a/components/dashboard/application/delete-application.tsx +++ b/components/dashboard/application/delete-application.tsx @@ -25,8 +25,8 @@ export const DeleteApplication = ({ applicationId }: Props) => { return ( - diff --git a/components/dashboard/application/domains/delete-domain.tsx b/components/dashboard/application/domains/delete-domain.tsx index 88521758..80c2f194 100644 --- a/components/dashboard/application/domains/delete-domain.tsx +++ b/components/dashboard/application/domains/delete-domain.tsx @@ -24,8 +24,8 @@ export const DeleteDomain = ({ domainId }: Props) => { return ( - diff --git a/components/dashboard/application/domains/show-domains.tsx b/components/dashboard/application/domains/show-domains.tsx index f315e02a..c12d9140 100644 --- a/components/dashboard/application/domains/show-domains.tsx +++ b/components/dashboard/application/domains/show-domains.tsx @@ -40,7 +40,9 @@ export const ShowDomains = ({ applicationId }: Props) => { {data && data?.length > 0 && ( - + + Add Domain + )} @@ -51,7 +53,9 @@ export const ShowDomains = ({ applicationId }: Props) => { To access to the application is required to set at least 1 domain - Add Domain + + Add Domain + ) : (
@@ -75,8 +79,10 @@ export const ShowDomains = ({ applicationId }: Props) => { - - +
+ + +
); })} diff --git a/components/dashboard/application/domains/update-domain.tsx b/components/dashboard/application/domains/update-domain.tsx index 0d6c9b34..7262c35b 100644 --- a/components/dashboard/application/domains/update-domain.tsx +++ b/components/dashboard/application/domains/update-domain.tsx @@ -115,8 +115,8 @@ export const UpdateDomain = ({ domainId }: Props) => { return ( - diff --git a/components/dashboard/application/update-application.tsx b/components/dashboard/application/update-application.tsx index 983a37ff..5dd58df0 100644 --- a/components/dashboard/application/update-application.tsx +++ b/components/dashboard/application/update-application.tsx @@ -90,7 +90,7 @@ export const UpdateApplication = ({ applicationId }: Props) => { diff --git a/components/dashboard/mariadb/delete-mariadb.tsx b/components/dashboard/mariadb/delete-mariadb.tsx index ca6a2f0b..0687a2bd 100644 --- a/components/dashboard/mariadb/delete-mariadb.tsx +++ b/components/dashboard/mariadb/delete-mariadb.tsx @@ -1,13 +1,13 @@ import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; @@ -16,47 +16,47 @@ import { useRouter } from "next/router"; import { toast } from "sonner"; interface Props { - mariadbId: string; + mariadbId: string; } export const DeleteMariadb = ({ mariadbId }: Props) => { - const { mutateAsync, isLoading } = api.mariadb.remove.useMutation(); - const { push } = useRouter(); - return ( - - - - - - - Are you absolutely sure? - - This action cannot be undone. This will permanently delete the - database - - - - Cancel - { - await mutateAsync({ - mariadbId, - }) - .then((data) => { - push(`/dashboard/project/${data?.projectId}`); - toast.success("Database delete succesfully"); - }) - .catch(() => { - toast.error("Error to delete the database"); - }); - }} - > - Confirm - - - - - ); + const { mutateAsync, isLoading } = api.mariadb.remove.useMutation(); + const { push } = useRouter(); + return ( + + + + + + + Are you absolutely sure? + + This action cannot be undone. This will permanently delete the + database + + + + Cancel + { + await mutateAsync({ + mariadbId, + }) + .then((data) => { + push(`/dashboard/project/${data?.projectId}`); + toast.success("Database delete succesfully"); + }) + .catch(() => { + toast.error("Error to delete the database"); + }); + }} + > + Confirm + + + + + ); }; diff --git a/components/dashboard/mariadb/update-mariadb.tsx b/components/dashboard/mariadb/update-mariadb.tsx index 962f4a13..46ca19bd 100644 --- a/components/dashboard/mariadb/update-mariadb.tsx +++ b/components/dashboard/mariadb/update-mariadb.tsx @@ -90,7 +90,7 @@ export const UpdateMariadb = ({ mariadbId }: Props) => { diff --git a/components/dashboard/mongo/delete-mongo.tsx b/components/dashboard/mongo/delete-mongo.tsx index 184d7988..35e1eaa0 100644 --- a/components/dashboard/mongo/delete-mongo.tsx +++ b/components/dashboard/mongo/delete-mongo.tsx @@ -1,13 +1,13 @@ import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; @@ -16,47 +16,47 @@ import { useRouter } from "next/router"; import { toast } from "sonner"; interface Props { - mongoId: string; + mongoId: string; } export const DeleteMongo = ({ mongoId }: Props) => { - const { mutateAsync, isLoading } = api.mongo.remove.useMutation(); - const { push } = useRouter(); - return ( - - - - - - - Are you absolutely sure? - - This action cannot be undone. This will permanently delete the - database - - - - Cancel - { - await mutateAsync({ - mongoId, - }) - .then((data) => { - push(`/dashboard/project/${data?.projectId}`); - toast.success("Database delete succesfully"); - }) - .catch(() => { - toast.error("Error to delete the database"); - }); - }} - > - Confirm - - - - - ); + const { mutateAsync, isLoading } = api.mongo.remove.useMutation(); + const { push } = useRouter(); + return ( + + + + + + + Are you absolutely sure? + + This action cannot be undone. This will permanently delete the + database + + + + Cancel + { + await mutateAsync({ + mongoId, + }) + .then((data) => { + push(`/dashboard/project/${data?.projectId}`); + toast.success("Database delete succesfully"); + }) + .catch(() => { + toast.error("Error to delete the database"); + }); + }} + > + Confirm + + + + + ); }; diff --git a/components/dashboard/mongo/update-mongo.tsx b/components/dashboard/mongo/update-mongo.tsx index 6f511df2..fa7a5283 100644 --- a/components/dashboard/mongo/update-mongo.tsx +++ b/components/dashboard/mongo/update-mongo.tsx @@ -90,7 +90,7 @@ export const UpdateMongo = ({ mongoId }: Props) => { diff --git a/components/dashboard/mysql/delete-mysql.tsx b/components/dashboard/mysql/delete-mysql.tsx index dc5e68b8..373c68fd 100644 --- a/components/dashboard/mysql/delete-mysql.tsx +++ b/components/dashboard/mysql/delete-mysql.tsx @@ -1,13 +1,13 @@ import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; @@ -16,47 +16,47 @@ import { useRouter } from "next/router"; import { toast } from "sonner"; interface Props { - mysqlId: string; + mysqlId: string; } export const DeleteMysql = ({ mysqlId }: Props) => { - const { mutateAsync, isLoading } = api.mysql.remove.useMutation(); - const { push } = useRouter(); - return ( - - - - - - - Are you absolutely sure? - - This action cannot be undone. This will permanently delete the - database - - - - Cancel - { - await mutateAsync({ - mysqlId, - }) - .then((data) => { - push(`/dashboard/project/${data?.projectId}`); - toast.success("Database delete succesfully"); - }) - .catch(() => { - toast.error("Error to delete the database"); - }); - }} - > - Confirm - - - - - ); + const { mutateAsync, isLoading } = api.mysql.remove.useMutation(); + const { push } = useRouter(); + return ( + + + + + + + Are you absolutely sure? + + This action cannot be undone. This will permanently delete the + database + + + + Cancel + { + await mutateAsync({ + mysqlId, + }) + .then((data) => { + push(`/dashboard/project/${data?.projectId}`); + toast.success("Database delete succesfully"); + }) + .catch(() => { + toast.error("Error to delete the database"); + }); + }} + > + Confirm + + + + + ); }; diff --git a/components/dashboard/mysql/update-mysql.tsx b/components/dashboard/mysql/update-mysql.tsx index 3c7831ac..cd281281 100644 --- a/components/dashboard/mysql/update-mysql.tsx +++ b/components/dashboard/mysql/update-mysql.tsx @@ -90,7 +90,7 @@ export const UpdateMysql = ({ mysqlId }: Props) => { diff --git a/components/dashboard/postgres/delete-postgres.tsx b/components/dashboard/postgres/delete-postgres.tsx index 96b15f80..ce64c44b 100644 --- a/components/dashboard/postgres/delete-postgres.tsx +++ b/components/dashboard/postgres/delete-postgres.tsx @@ -1,13 +1,13 @@ import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; @@ -16,47 +16,47 @@ import { useRouter } from "next/router"; import { toast } from "sonner"; interface Props { - postgresId: string; + postgresId: string; } export const DeletePostgres = ({ postgresId }: Props) => { - const { mutateAsync, isLoading } = api.postgres.remove.useMutation(); - const { push } = useRouter(); - return ( - - - - - - - Are you absolutely sure? - - This action cannot be undone. This will permanently delete the - database - - - - Cancel - { - await mutateAsync({ - postgresId, - }) - .then((data) => { - push(`/dashboard/project/${data?.projectId}`); - toast.success("Database delete succesfully"); - }) - .catch(() => { - toast.error("Error to delete the database"); - }); - }} - > - Confirm - - - - - ); + const { mutateAsync, isLoading } = api.postgres.remove.useMutation(); + const { push } = useRouter(); + return ( + + + + + + + Are you absolutely sure? + + This action cannot be undone. This will permanently delete the + database + + + + Cancel + { + await mutateAsync({ + postgresId, + }) + .then((data) => { + push(`/dashboard/project/${data?.projectId}`); + toast.success("Database delete succesfully"); + }) + .catch(() => { + toast.error("Error to delete the database"); + }); + }} + > + Confirm + + + + + ); }; diff --git a/components/dashboard/postgres/update-postgres.tsx b/components/dashboard/postgres/update-postgres.tsx index fd77fad2..45f0aa89 100644 --- a/components/dashboard/postgres/update-postgres.tsx +++ b/components/dashboard/postgres/update-postgres.tsx @@ -90,7 +90,7 @@ export const UpdatePostgres = ({ postgresId }: Props) => { diff --git a/components/dashboard/redis/delete-redis.tsx b/components/dashboard/redis/delete-redis.tsx index 509e8fc4..62db598b 100644 --- a/components/dashboard/redis/delete-redis.tsx +++ b/components/dashboard/redis/delete-redis.tsx @@ -1,13 +1,13 @@ import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; @@ -16,47 +16,47 @@ import { useRouter } from "next/router"; import { toast } from "sonner"; interface Props { - redisId: string; + redisId: string; } export const DeleteRedis = ({ redisId }: Props) => { - const { mutateAsync, isLoading } = api.redis.remove.useMutation(); - const { push } = useRouter(); - return ( - - - - - - - Are you absolutely sure? - - This action cannot be undone. This will permanently delete the - database - - - - Cancel - { - await mutateAsync({ - redisId, - }) - .then((data) => { - push(`/dashboard/project/${data?.projectId}`); - toast.success("Database delete succesfully"); - }) - .catch(() => { - toast.error("Error to delete the database"); - }); - }} - > - Confirm - - - - - ); + const { mutateAsync, isLoading } = api.redis.remove.useMutation(); + const { push } = useRouter(); + return ( + + + + + + + Are you absolutely sure? + + This action cannot be undone. This will permanently delete the + database + + + + Cancel + { + await mutateAsync({ + redisId, + }) + .then((data) => { + push(`/dashboard/project/${data?.projectId}`); + toast.success("Database delete succesfully"); + }) + .catch(() => { + toast.error("Error to delete the database"); + }); + }} + > + Confirm + + + + + ); }; diff --git a/components/dashboard/redis/update-redis.tsx b/components/dashboard/redis/update-redis.tsx index b668bdff..8ac239b3 100644 --- a/components/dashboard/redis/update-redis.tsx +++ b/components/dashboard/redis/update-redis.tsx @@ -90,7 +90,7 @@ export const UpdateRedis = ({ redisId }: Props) => { diff --git a/components/dashboard/settings/certificates/show-certificates.tsx b/components/dashboard/settings/certificates/show-certificates.tsx index a67e5507..963bc571 100644 --- a/components/dashboard/settings/certificates/show-certificates.tsx +++ b/components/dashboard/settings/certificates/show-certificates.tsx @@ -33,21 +33,23 @@ export const ShowCertificates = () => { ) : (
- {data?.map((destination, index) => ( -
- - {index + 1}. {destination.name} - -
- +
+ {data?.map((destination, index) => ( +
+ + {index + 1}. {destination.name} + +
+ +
-
- ))} + ))} +
diff --git a/components/dashboard/settings/cluster/nodes/add-node.tsx b/components/dashboard/settings/cluster/nodes/add-node.tsx index 43c21630..fd923057 100644 --- a/components/dashboard/settings/cluster/nodes/add-node.tsx +++ b/components/dashboard/settings/cluster/nodes/add-node.tsx @@ -27,8 +27,7 @@ export const AddNode = () => { Add Node Follow the steps to add a new node to your cluster, before you start - working with this feature, you need to understand how docker swarm - works.{" "} + using this feature, you need to understand how docker swarm works.{" "} {
) : ( -
+
{data?.map((registry, index) => (
{index + 1}. {registry.registryName} -
+
diff --git a/components/dashboard/settings/destination/show-destinations.tsx b/components/dashboard/settings/destination/show-destinations.tsx index b8f1a3c7..b5c0448f 100644 --- a/components/dashboard/settings/destination/show-destinations.tsx +++ b/components/dashboard/settings/destination/show-destinations.tsx @@ -34,16 +34,16 @@ export const ShowDestinations = () => {
) : ( -
+
{data?.map((destination, index) => (
{index + 1}. {destination.name} -
+
diff --git a/components/dashboard/settings/github/github-setup.tsx b/components/dashboard/settings/github/github-setup.tsx index 6e9a8058..1e78d001 100644 --- a/components/dashboard/settings/github/github-setup.tsx +++ b/components/dashboard/settings/github/github-setup.tsx @@ -87,10 +87,10 @@ export const GithubSetup = () => { {haveGithubConfigured ? (
- + Github account configured succesfully. - +
@@ -101,9 +101,9 @@ export const GithubSetup = () => { {data?.githubAppName ? (
- Youve successfully created a GitHub app named - {data.githubAppName}! The next step is to install this app in - your GitHub account. + You've successfully created a github app named{" "} + {data.githubAppName}! The next step is to + install this app in your GitHub account.
@@ -121,12 +121,12 @@ export const GithubSetup = () => { ) : (
- - To integrate your GitHub account with our services, youll +

+ To integrate your GitHub account with our services, you'll need to create and install a GitHub app. This process is straightforward and only takes a few minutes. Click the button below to get started. - +

diff --git a/components/dashboard/settings/users/add-permissions.tsx b/components/dashboard/settings/users/add-permissions.tsx index d241aef1..cf80803d 100644 --- a/components/dashboard/settings/users/add-permissions.tsx +++ b/components/dashboard/settings/users/add-permissions.tsx @@ -23,11 +23,11 @@ import { extractServices } from "@/pages/dashboard/project/[projectId]"; import { api } from "@/utils/api"; import { AlertBlock } from "@/components/shared/alert-block"; import { zodResolver } from "@hookform/resolvers/zod"; -import { ListTodo } from "lucide-react"; import { useEffect } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; +import { DropdownMenuItem } from "@/components/ui/dropdown-menu"; const addPermissions = z.object({ accesedProjects: z.array(z.string()).optional(), @@ -107,9 +107,12 @@ export const AddUserPermissions = ({ userId }: Props) => { return ( - + e.preventDefault()} + > + Add Permissions + diff --git a/components/dashboard/settings/users/add-user.tsx b/components/dashboard/settings/users/add-user.tsx index f9790b04..ee8edfea 100644 --- a/components/dashboard/settings/users/add-user.tsx +++ b/components/dashboard/settings/users/add-user.tsx @@ -25,6 +25,7 @@ import { useEffect } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; +import { PlusIcon } from "lucide-react"; const addUser = z.object({ email: z @@ -66,7 +67,9 @@ export const AddUser = () => { return ( - + diff --git a/components/dashboard/settings/users/delete-user.tsx b/components/dashboard/settings/users/delete-user.tsx index dce95bd6..f3904795 100644 --- a/components/dashboard/settings/users/delete-user.tsx +++ b/components/dashboard/settings/users/delete-user.tsx @@ -14,6 +14,7 @@ import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; import { TrashIcon } from "lucide-react"; import { toast } from "sonner"; +import { DropdownMenuItem } from "@/components/ui/dropdown-menu"; interface Props { authId: string; @@ -24,9 +25,12 @@ export const DeleteUser = ({ authId }: Props) => { return ( - + e.preventDefault()} + > + Delete User + diff --git a/components/dashboard/settings/users/show-users.tsx b/components/dashboard/settings/users/show-users.tsx index 226f86a8..55c30411 100644 --- a/components/dashboard/settings/users/show-users.tsx +++ b/components/dashboard/settings/users/show-users.tsx @@ -6,7 +6,7 @@ import { CardTitle, } from "@/components/ui/card"; import { api } from "@/utils/api"; -import { CopyIcon, Users } from "lucide-react"; +import { MoreHorizontal, Users } from "lucide-react"; import { AddUser } from "./add-user"; import { DeleteUser } from "./delete-user"; import { format } from "date-fns"; @@ -14,7 +14,24 @@ import { useEffect, useState } from "react"; import { AddUserPermissions } from "./add-permissions"; import copy from "copy-to-clipboard"; import { toast } from "sonner"; -import { UpdateUser } from "./update-user"; +import { + Table, + TableBody, + TableCaption, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table"; +import { Badge } from "@/components/ui/badge"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; +import { Button } from "@/components/ui/button"; export const ShowUsers = () => { const { data } = api.user.all.useQuery(); @@ -25,82 +42,109 @@ export const ShowUsers = () => { return (
- - - Users - Add, manage and delete users. + + +
+ Users + Add, manage and delete users. +
+ + {data && data.length > 0 && ( +
+ +
+ )}
{data?.length === 0 ? (
- To create a user is required to add + To create a user, you need to add:
) : (
- {data?.map((user) => { - return ( -
- - {user.auth.email} - - {!user.isRegistered && ( - - Expire In{" "} - {format(new Date(user.expirationDate), "PPpp")} - - )} - - - {user.isRegistered ? "Registered" : "Not Registered"} - - {user.auth.is2FAEnabled && ( - - {user.auth.is2FAEnabled - ? "2FA Enabled" - : "2FA Not Enabled"} - - )} - -
- {!user.isRegistered && ( -
-
- - {`${url}/invitation?token=${user.token}`} - -
-
)} diff --git a/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx b/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx index 71f46eab..81e92793 100644 --- a/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx +++ b/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx @@ -135,7 +135,7 @@ const Service = ( Domains Advanced -
+
{(auth?.rol === "admin" || user?.canDeleteServices) && ( diff --git a/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx b/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx index 87a86df6..8d43e4cf 100644 --- a/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx +++ b/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx @@ -116,7 +116,7 @@ const Mariadb = ( Logs Advanced -
+
{(auth?.rol === "admin" || user?.canDeleteServices) && ( diff --git a/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx b/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx index 8d50bd32..409b9bd6 100644 --- a/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx +++ b/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx @@ -118,7 +118,7 @@ const Mongo = ( Advanced -
+
{(auth?.rol === "admin" || user?.canDeleteServices) && ( diff --git a/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx b/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx index 22ea3ccc..873d6c9e 100644 --- a/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx +++ b/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx @@ -117,7 +117,7 @@ const MySql = ( Advanced -
+
{(auth?.rol === "admin" || user?.canDeleteServices) && ( diff --git a/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx b/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx index 9277b2f7..0573b578 100644 --- a/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx +++ b/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx @@ -118,7 +118,7 @@ const Postgresql = ( Advanced -
+
{(auth?.rol === "admin" || user?.canDeleteServices) && ( diff --git a/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx b/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx index 9d4ca959..2d1df422 100644 --- a/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx +++ b/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx @@ -116,7 +116,7 @@ const Redis = ( Advanced -
+
{(auth?.rol === "admin" || user?.canDeleteServices) && (