mirror of
https://github.com/documenso/documenso.git
synced 2025-11-26 14:34:05 +10:00
feat: add navigation links between admin org pages (#2243)
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
|
import { Trans } from '@lingui/react/macro';
|
||||||
|
import { Link } from 'react-router';
|
||||||
|
|
||||||
import { getOrganisationDetailedInsights } from '@documenso/lib/server-only/admin/get-organisation-detailed-insights';
|
import { getOrganisationDetailedInsights } from '@documenso/lib/server-only/admin/get-organisation-detailed-insights';
|
||||||
import type { DateRange } from '@documenso/lib/types/search-params';
|
import type { DateRange } from '@documenso/lib/types/search-params';
|
||||||
import { getAdminOrganisation } from '@documenso/trpc/server/admin-router/get-admin-organisation';
|
import { getAdminOrganisation } from '@documenso/trpc/server/admin-router/get-admin-organisation';
|
||||||
|
import { Button } from '@documenso/ui/primitives/button';
|
||||||
|
|
||||||
import { OrganisationInsightsTable } from '~/components/tables/organisation-insights-table';
|
import { OrganisationInsightsTable } from '~/components/tables/organisation-insights-table';
|
||||||
|
|
||||||
@@ -38,12 +42,17 @@ export async function loader({ params, request }: Route.LoaderArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function OrganisationInsights({ loaderData }: Route.ComponentProps) {
|
export default function OrganisationInsights({ loaderData }: Route.ComponentProps) {
|
||||||
const { insights, page, perPage, dateRange, view, organisationName } = loaderData;
|
const { insights, page, perPage, dateRange, view, organisationName, organisationId } = loaderData;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<h2 className="text-4xl font-semibold">{organisationName}</h2>
|
<h2 className="text-4xl font-semibold">{organisationName}</h2>
|
||||||
|
<Button variant="outline" asChild>
|
||||||
|
<Link to={`/admin/organisations/${organisationId}`}>
|
||||||
|
<Trans>Manage organisation</Trans>
|
||||||
|
</Link>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-8">
|
<div className="mt-8">
|
||||||
<OrganisationInsightsTable
|
<OrganisationInsightsTable
|
||||||
|
|||||||
@@ -162,7 +162,13 @@ export default function OrganisationGroupSettingsPage({ params }: Route.Componen
|
|||||||
<SettingsHeader
|
<SettingsHeader
|
||||||
title={t`Manage organisation`}
|
title={t`Manage organisation`}
|
||||||
subtitle={t`Manage the ${organisation.name} organisation`}
|
subtitle={t`Manage the ${organisation.name} organisation`}
|
||||||
/>
|
>
|
||||||
|
<Button variant="outline" asChild>
|
||||||
|
<Link to={`/admin/organisation-insights/${organisationId}`}>
|
||||||
|
<Trans>View insights</Trans>
|
||||||
|
</Link>
|
||||||
|
</Button>
|
||||||
|
</SettingsHeader>
|
||||||
|
|
||||||
<GenericOrganisationAdminForm organisation={organisation} />
|
<GenericOrganisationAdminForm organisation={organisation} />
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"commitlint": "commitlint --edit",
|
"commitlint": "commitlint --edit",
|
||||||
"clean": "turbo run clean && rimraf node_modules",
|
"clean": "turbo run clean && rimraf node_modules",
|
||||||
"d": "npm run dx && npm run translate:compile && npm run dev",
|
"d": "npm run dx && npm run translate:compile && npm run dev",
|
||||||
"dx": "npm i && npm run dx:up && npm run prisma:migrate-dev && npm run prisma:seed",
|
"dx": "npm ci && npm run dx:up && npm run prisma:migrate-dev && npm run prisma:seed",
|
||||||
"dx:up": "docker compose -f docker/development/compose.yml up -d",
|
"dx:up": "docker compose -f docker/development/compose.yml up -d",
|
||||||
"dx:down": "docker compose -f docker/development/compose.yml down",
|
"dx:down": "docker compose -f docker/development/compose.yml down",
|
||||||
"ci": "turbo run build --filter=@documenso/remix && turbo run test:e2e",
|
"ci": "turbo run build --filter=@documenso/remix && turbo run test:e2e",
|
||||||
|
|||||||
Reference in New Issue
Block a user