diff --git a/server/routers/resource/listResources.ts b/server/routers/resource/listResources.ts index 14b7c4b4..1bc1e896 100644 --- a/server/routers/resource/listResources.ts +++ b/server/routers/resource/listResources.ts @@ -58,6 +58,7 @@ function queryResources( fullDomain: resources.fullDomain, ssl: resources.ssl, siteName: sites.name, + siteId: sites.niceId, passwordId: resourcePassword.passwordId, pincodeId: resourcePincode.pincodeId, sso: resources.sso, @@ -86,6 +87,7 @@ function queryResources( ssl: resources.ssl, fullDomain: resources.fullDomain, siteName: sites.name, + siteId: sites.niceId, passwordId: resourcePassword.passwordId, sso: resources.sso, pincodeId: resourcePincode.pincodeId, diff --git a/server/routers/user/inviteUser.ts b/server/routers/user/inviteUser.ts index 546ae479..84c6eb45 100644 --- a/server/routers/user/inviteUser.ts +++ b/server/routers/user/inviteUser.ts @@ -86,7 +86,6 @@ export async function inviteUser( inviteTracker[email].timestamps.push(currentTime); - logger.debug("here0") const org = await db .select() .from(orgs) @@ -98,7 +97,6 @@ export async function inviteUser( ); } - logger.debug("here1") const existingUser = await db .select() .from(users) @@ -114,7 +112,6 @@ export async function inviteUser( ); } - logger.debug("here2") const inviteId = generateRandomString( 10, alphabet("a-z", "A-Z", "0-9"), @@ -124,7 +121,6 @@ export async function inviteUser( const tokenHash = await hashPassword(token); - logger.debug("here3") // delete any existing invites for this email await db .delete(userInvites) @@ -133,7 +129,6 @@ export async function inviteUser( ) .execute(); - logger.debug("here4") await db.insert(userInvites).values({ inviteId, orgId, @@ -145,23 +140,21 @@ export async function inviteUser( const inviteLink = `${config.app.base_url}/invite?token=${inviteId}-${token}`; - logger.debug("here5") - // await sendEmail( - // SendInviteLink({ - // email, - // inviteLink, - // expiresInDays: (validHours / 24).toString(), - // orgName: org[0].name || orgId, - // inviterName: req.user?.email, - // }), - // { - // to: email, - // from: config.email?.no_reply, - // subject: "You're invited to join a Fossorial organization", - // }, - // ); + await sendEmail( + SendInviteLink({ + email, + inviteLink, + expiresInDays: (validHours / 24).toString(), + orgName: org[0].name || orgId, + inviterName: req.user?.email, + }), + { + to: email, + from: config.email?.no_reply, + subject: "You're invited to join a Fossorial organization", + }, + ); - logger.debug("here6") return response(res, { data: { inviteLink, diff --git a/src/app/[orgId]/settings/access/components/AccessPageHeaderAndNav.tsx b/src/app/[orgId]/settings/access/components/AccessPageHeaderAndNav.tsx index c6ff586c..8c1053d6 100644 --- a/src/app/[orgId]/settings/access/components/AccessPageHeaderAndNav.tsx +++ b/src/app/[orgId]/settings/access/components/AccessPageHeaderAndNav.tsx @@ -24,7 +24,7 @@ export default function AccessPageHeaderAndNav({ return ( <> diff --git a/src/app/[orgId]/settings/access/roles/components/RolesDataTable.tsx b/src/app/[orgId]/settings/access/roles/components/RolesDataTable.tsx index 6f004c4b..3d42edc6 100644 --- a/src/app/[orgId]/settings/access/roles/components/RolesDataTable.tsx +++ b/src/app/[orgId]/settings/access/roles/components/RolesDataTable.tsx @@ -22,7 +22,7 @@ import { import { Button } from "@app/components/ui/button"; import { useState } from "react"; import { Input } from "@app/components/ui/input"; -import { Plus } from "lucide-react"; +import { Plus, Search } from "lucide-react"; import { DataTablePagination } from "@app/components/DataTablePagination"; interface DataTableProps { @@ -61,19 +61,23 @@ export function RolesDataTable({ return (
- - table - .getColumn("name") - ?.setFilterValue(event.target.value) - } - className="max-w-sm mr-2" - /> +
+ + table + .getColumn("name") + ?.setFilterValue(event.target.value) + } + className="w-full pl-8" + /> + +
+ ); + }, cell: ({ row }) => { const resourceRow = row.original; return ( diff --git a/src/app/[orgId]/settings/resources/page.tsx b/src/app/[orgId]/settings/resources/page.tsx index e9aa41c9..42cf449e 100644 --- a/src/app/[orgId]/settings/resources/page.tsx +++ b/src/app/[orgId]/settings/resources/page.tsx @@ -51,6 +51,7 @@ export default async function ResourcesPage(props: ResourcesPageProps) { orgId: params.orgId, domain: `${resource.ssl ? "https://" : "http://"}${resource.fullDomain}`, site: resource.siteName || "None", + siteId: resource.siteId || "Unknown", hasAuth: resource.sso || resource.pincodeId !== null || diff --git a/src/app/[orgId]/settings/sites/components/SitesDataTable.tsx b/src/app/[orgId]/settings/sites/components/SitesDataTable.tsx index 0a441fd2..e4e8af59 100644 --- a/src/app/[orgId]/settings/sites/components/SitesDataTable.tsx +++ b/src/app/[orgId]/settings/sites/components/SitesDataTable.tsx @@ -24,7 +24,7 @@ import { Button } from "@app/components/ui/button"; import { useState } from "react"; import { Input } from "@app/components/ui/input"; import { DataTablePagination } from "../../../../../components/DataTablePagination"; -import { Plus } from "lucide-react"; +import { Plus, Search } from "lucide-react"; interface DataTableProps { columns: ColumnDef[]; @@ -62,19 +62,23 @@ export function SitesDataTable({ return (
- - table - .getColumn("name") - ?.setFilterValue(event.target.value) - } - className="max-w-sm mr-2" - /> +
+ + table + .getColumn("name") + ?.setFilterValue(event.target.value) + } + className="w-full pl-8" + /> + +
+ ); + }, }, { accessorKey: "mbOut", - header: "MB Out", + header: ({ column }) => { + return ( + + ); + }, }, { accessorKey: "type", - header: "Connection Type", + header: ({ column }) => { + return ( + + ); + }, cell: ({ row }) => { const originalRow = row.original;