B2B-30: add button to create company from super admin page

This commit is contained in:
aleksei-milisenko-at-mountbirch
2025-06-16 09:06:45 +03:00
committed by GitHub
43 changed files with 655 additions and 390 deletions

9
.env
View File

@@ -33,9 +33,9 @@ NEXT_PUBLIC_LOCALES_PATH=apps/web/public/locales
# FEATURE FLAGS
NEXT_PUBLIC_ENABLE_THEME_TOGGLE=true
NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_DELETION=true
NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING=true
NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS_DELETION=true
NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS_BILLING=true
NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING=false
NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS_DELETION=false
NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS_BILLING=false
NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS=true
NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS_CREATION=true
NEXT_PUBLIC_LANGUAGE_PRIORITY=application
@@ -47,3 +47,6 @@ NEXT_TELEMETRY_DISABLED=1
LOGGER=pino
NEXT_PUBLIC_DEFAULT_LOCALE=et
NEXT_PUBLIC_TEAM_NAVIGATION_STYLE=custom
NEXT_PUBLIC_USER_NAVIGATION_STYLE=custom

View File

@@ -10,12 +10,6 @@ SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhY
SUPABASE_DB_WEBHOOK_SECRET=WEBHOOKSECRET
# EMAILS
EMAIL_SENDER="Makerkit <admin@makerkit.dev>"
EMAIL_PORT=54325
EMAIL_HOST=localhost
EMAIL_TLS=false
EMAIL_USER=user
EMAIL_PASSWORD=password
# CONTACT FORM
CONTACT_EMAIL=test@makerkit.dev
@@ -25,3 +19,9 @@ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
# MAILER
MAILER_PROVIDER=nodemailer
# EMAIL_SENDER=
# EMAIL_USER= # refer to your email provider's documentation
# EMAIL_PASSWORD= # refer to your email provider's documentation
# EMAIL_HOST= # refer to your email provider's documentation
# EMAIL_PORT= # or 465 for SSL
# EMAIL_TLS= # or false for SSL (see provider documentation)

View File

@@ -8,3 +8,10 @@ MEDIPOST_URL=your-medipost-url
MEDIPOST_USER=your-medipost-user
MEDIPOST_PASSWORD=your-medipost-password
MEDIPOST_RECIPIENT=your-medipost-recipient
EMAIL_SENDER=
EMAIL_USER= # refer to your email provider's documentation
EMAIL_PASSWORD= # refer to your email provider's documentation
EMAIL_HOST= # refer to your email provider's documentation
EMAIL_PORT= # or 465 for SSL
EMAIL_TLS= # or false for SSL (see provider documentation)

View File

@@ -1,6 +1,6 @@
import Link from 'next/link';
import { MedReportTitle } from '@/components/med-report-title';
import { MedReportLogo } from '@/components/med-report-title';
import { ArrowRightIcon } from 'lucide-react';
import { CtaButton, Hero } from '@kit/ui/marketing';
@@ -13,7 +13,7 @@ function Home() {
<div className={'mt-4 flex flex-col space-y-24 py-14'}>
<div className={'container mx-auto'}>
<Hero
title={<MedReportTitle />}
title={<MedReportLogo />}
subtitle={
<span>
<Trans i18nKey={'marketing:heroSubtitle'} />

View File

@@ -1,6 +1,6 @@
"use client";
import { MedReportTitle } from "@/components/med-report-title";
import { MedReportLogo } from "@/components/med-report-title";
import React from "react";
import { yupResolver } from "@hookform/resolvers/yup";
import { useForm } from "react-hook-form";
@@ -45,7 +45,7 @@ export default function RegisterCompany() {
return (
<div className="flex flex-row border rounded-3xl border-border max-w-5xl overflow-hidden">
<div className="flex flex-col text-center py-14 px-12 w-1/2">
<MedReportTitle />
<MedReportLogo />
<h1 className="pt-8">Ettevõtte andmed</h1>
<p className="pt-2 text-muted-foreground text-sm">
Pakkumise saamiseks palun sisesta ettevõtte andmed millega MedReport

View File

@@ -1,11 +1,12 @@
import { MedReportTitle } from "@/components/med-report-title";
import { MedReportLogo } from "@/components/med-report-title";
import { Button } from "@kit/ui/button";
import Image from "next/image";
import Link from "next/link";
export default function CompanyRegistrationSuccess() {
return (
<div className="pt-2 px-16 pb-12 border rounded-3xl border-border">
<MedReportTitle />
<MedReportLogo />
<div className="flex flex-col items-center px-4">
<Image
src="/assets/success.png"

View File

@@ -15,6 +15,7 @@ import {
SidebarHeader,
SidebarMenu,
SidebarMenuButton,
useSidebar,
} from '@kit/ui/shadcn-sidebar';
import { AppLogo } from '~/components/app-logo';
@@ -22,11 +23,12 @@ import { ProfileAccountDropdownContainer } from '~/components/personal-account-d
export function AdminSidebar() {
const path = usePathname();
const { open } = useSidebar();
return (
<Sidebar collapsible="icon">
<SidebarHeader className={'m-2'}>
<AppLogo href={'/admin'} className="max-w-full" />
<AppLogo href={'/admin'} className="max-w-full" compact={!open} />
</SidebarHeader>
<SidebarContent>

View File

@@ -2,6 +2,7 @@ import { ServerDataLoader } from '@makerkit/data-loader-supabase-nextjs';
import { AdminAccountsTable } from '@kit/admin/components/admin-accounts-table';
import { AdminCreateUserDialog } from '@kit/admin/components/admin-create-user-dialog';
import { AdminCreateCompanyDialog } from '@kit/admin/components/admin-create-company-dialog';
import { AdminGuard } from '@kit/admin/components/admin-guard';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { AppBreadcrumbs } from '@kit/ui/app-breadcrumbs';
@@ -30,10 +31,14 @@ async function AccountsPage(props: AdminAccountsPageProps) {
return (
<>
<PageHeader description={<AppBreadcrumbs />}>
<div className="flex justify-end">
<div className="flex justify-end gap-2">
<AdminCreateUserDialog>
<Button data-test="admin-create-user-button">Create User</Button>
<Button data-test="admin-create-user-button">Create Personal Account</Button>
</AdminCreateUserDialog>
<AdminCreateCompanyDialog>
<Button>Create Company Account</Button>
</AdminCreateCompanyDialog>
</div>
</PageHeader>

View File

@@ -5,7 +5,7 @@
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "app/globals.css",
"css": "styles/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""

View File

@@ -1,47 +1,36 @@
import Link from 'next/link';
import { cn } from '@kit/ui/utils';
import { MedReportLogo } from './med-report-title';
function LogoImage({
className,
width = 105,
compact = false,
}: {
className?: string;
width?: number;
compact?: boolean;
}) {
return (
<svg
width={width}
className={cn(`w-[80px] lg:w-[95px]`, className)}
viewBox="0 0 733 140"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
className={'fill-primary dark:fill-white'}
d="M119.081 138V73.209C119.081 67.551 117.08 62.79 113.078 58.926C109.214 55.062 104.453 53.13 98.7951 53.13C93.2751 53.13 88.4451 55.062 84.3051 58.926C80.3031 62.652 78.3021 67.344 78.3021 73.002V138H59.4651V73.002C59.4651 67.206 57.5331 62.514 53.6691 58.926C49.5291 55.062 44.6301 53.13 38.9721 53.13C33.4521 53.13 28.7601 55.062 24.8961 58.926C20.7561 63.066 18.6861 67.965 18.6861 73.623V138H0.0560548V36.984H18.6861V44.643C21.0321 41.745 24.0681 39.33 27.7941 37.398C31.6581 35.466 35.3841 34.5 38.9721 34.5C45.0441 34.5 50.5641 35.742 55.5321 38.226C60.6381 40.572 65.0541 43.884 68.7801 48.162C72.5061 43.884 76.9221 40.572 82.0281 38.226C87.1341 35.742 92.7231 34.5 98.7951 34.5C104.177 34.5 109.214 35.466 113.906 37.398C118.598 39.33 122.738 42.09 126.326 45.678C129.914 49.266 132.674 53.475 134.606 58.305C136.676 62.997 137.711 67.965 137.711 73.209V138H119.081ZM242.173 138V122.268C237.757 127.374 232.651 131.445 226.855 134.481C221.059 137.517 214.918 139.035 208.432 139.035C201.256 139.035 194.494 137.724 188.146 135.102C181.936 132.48 176.416 128.754 171.586 123.924C166.756 119.232 162.961 113.712 160.201 107.364C157.579 100.878 156.268 94.116 156.268 87.078C156.268 80.04 157.579 73.347 160.201 66.999C162.961 60.513 166.756 54.855 171.586 50.025C176.416 45.195 181.936 41.469 188.146 38.847C194.494 36.225 201.256 34.914 208.432 34.914C215.056 34.914 221.266 36.294 227.062 39.054C232.996 41.814 238.033 45.678 242.173 50.646V36.984H260.803V138H242.173ZM208.432 53.337C203.878 53.337 199.462 54.234 195.184 56.028C191.044 57.684 187.456 60.03 184.42 63.066C181.384 66.102 178.969 69.759 177.175 74.037C175.519 78.177 174.691 82.524 174.691 87.078C174.691 91.632 175.519 95.979 177.175 100.119C178.969 104.259 181.384 107.847 184.42 110.883C187.456 113.919 191.044 116.334 195.184 118.128C199.462 119.784 203.878 120.612 208.432 120.612C212.986 120.612 217.333 119.784 221.473 118.128C225.613 116.334 229.201 113.919 232.237 110.883C235.273 107.847 237.619 104.259 239.275 100.119C241.069 95.979 241.966 91.632 241.966 87.078C241.966 82.524 241.069 78.177 239.275 74.037C237.619 69.759 235.273 66.102 232.237 63.066C229.201 60.03 225.613 57.684 221.473 56.028C217.333 54.234 212.986 53.337 208.432 53.337ZM331.127 138L299.663 99.705V138H281.447V0.344996H299.663V59.754L327.815 33.258H354.932L305.873 78.798L355.139 138H331.127ZM379.299 94.116C379.299 97.428 380.472 100.878 382.818 104.466C385.302 108.054 388.131 111.09 391.305 113.574C397.101 118.128 403.863 120.405 411.591 120.405C423.873 120.405 433.878 114.471 441.606 102.603L457.338 111.918C451.956 120.612 445.332 127.305 437.466 131.997C429.6 136.689 420.975 139.035 411.591 139.035C404.553 139.035 397.86 137.724 391.512 135.102C385.164 132.342 379.575 128.547 374.745 123.717C369.915 118.887 366.12 113.298 363.36 106.95C360.738 100.602 359.427 93.909 359.427 86.871C359.427 79.833 360.738 73.14 363.36 66.792C366.12 60.306 369.915 54.648 374.745 49.818C379.437 44.988 384.957 41.262 391.305 38.64C397.791 36.018 404.553 34.707 411.591 34.707C418.629 34.707 425.322 36.018 431.67 38.64C438.156 41.262 443.745 44.988 448.437 49.818C458.649 60.306 463.755 72.45 463.755 86.25C463.755 88.734 463.548 91.356 463.134 94.116H379.299ZM411.591 51.681C405.933 51.681 400.62 52.923 395.652 55.407C390.684 57.891 386.682 61.203 383.646 65.343C380.748 69.345 379.299 73.623 379.299 78.177H443.883C443.883 73.623 442.365 69.345 439.329 65.343C436.431 61.203 432.498 57.891 427.53 55.407C422.562 52.923 417.249 51.681 411.591 51.681ZM528.543 54.372C525.231 52.854 522.264 52.095 519.642 52.095C514.122 52.095 509.568 54.027 505.98 57.891C502.116 62.031 500.184 66.792 500.184 72.174V138H482.382V72.174C482.382 64.722 484.245 57.891 487.971 51.681C491.835 45.471 497.079 40.641 503.703 37.191C508.671 34.845 513.984 33.672 519.642 33.672C524.196 33.672 528.543 34.5 532.683 36.156C536.823 37.812 541.17 40.503 545.724 44.229L528.543 54.372ZM610.092 138L578.628 99.705V138H560.412V0.344996H578.628V59.754L606.78 33.258H633.897L584.838 78.798L634.104 138H610.092ZM656.049 19.596C653.427 19.596 651.15 18.699 649.218 16.905C647.424 14.973 646.527 12.696 646.527 10.074C646.527 7.45199 647.424 5.24399 649.218 3.44999C651.15 1.51799 653.427 0.551993 656.049 0.551993C658.671 0.551993 660.879 1.51799 662.673 3.44999C664.605 5.24399 665.571 7.45199 665.571 10.074C665.571 12.696 664.605 14.973 662.673 16.905C660.879 18.699 658.671 19.596 656.049 19.596ZM647.562 138V34.5H664.95V138H647.562ZM717.4 53.13V138H699.805V53.13H684.28V34.5H699.805V0.344996H717.4V34.5H732.925V53.13H717.4Z"
fill="url(#paint0_linear_1666_2)"
/>
</svg>
);
return <MedReportLogo compact={compact} className={className} />;
}
export function AppLogo({
href,
label,
className,
compact = false,
}: {
href?: string | null;
className?: string;
label?: string;
compact?: boolean;
}) {
if (href === null) {
return <LogoImage className={className} />;
return <LogoImage className={className} compact={compact} />;
}
return (
<Link aria-label={label ?? 'Home Page'} href={href ?? '/'} prefetch={true}>
<LogoImage className={className} />
<LogoImage className={className} compact={compact} />
</Link>
);
}

View File

@@ -1,10 +1,11 @@
import { cn } from "@/lib/utils";
import { MedReportSmallLogo } from "@/public/assets/med-report-small-logo";
export const MedReportTitle = () => (
<div className="flex gap-2 justify-center">
export const MedReportLogo = ({ className, compact = false }: { className?: string, compact?: boolean }) => (
<div className={cn('flex gap-2 justify-center', className)}>
<MedReportSmallLogo />
<span className="text-foreground text-lg font-semibold tracking-tighter">
{!compact && <span className="text-foreground text-lg font-semibold tracking-tighter">
MedReport
</span>
</span>}
</div>
);

View File

@@ -32,4 +32,4 @@ export const setUser = noop('Sentry.setUser');
export const loadStripe = noop('Stripe.loadStripe');
// Nodemailer
export const createTransport = noop('Nodemailer.createTransport');
// export const createTransport = noop('Nodemailer.createTransport');

View File

@@ -129,7 +129,7 @@ function getModulesAliases() {
const excludeSentry = monitoringProvider !== 'sentry';
const excludeBaselime = monitoringProvider !== 'baselime';
const excludeStripe = billingProvider !== 'stripe';
const excludeNodemailer = mailerProvider !== 'nodemailer';
// const excludeNodemailer = mailerProvider !== 'nodemailer';
const excludeTurnstile = !captchaProvider;
/** @type {Record<string, string>} */
@@ -151,9 +151,9 @@ function getModulesAliases() {
aliases['@stripe/stripe-js'] = noopPath;
}
if (excludeNodemailer) {
aliases['nodemailer'] = noopPath;
}
// if (excludeNodemailer) {
// aliases['nodemailer'] = noopPath;
// }
if (excludeTurnstile) {
aliases['@marsidev/react-turnstile'] = noopPath;

View File

@@ -93,6 +93,7 @@
"@types/react-dom": "19.1.5",
"babel-plugin-react-compiler": "19.1.0-rc.2",
"cssnano": "^7.0.7",
"dotenv": "^16.5.0",
"pino-pretty": "^13.0.0",
"prettier": "^3.5.3",
"react-hook-form": "^7.57.0",
@@ -100,8 +101,7 @@
"tailwindcss": "4.1.7",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.8.3",
"yup": "^1.6.1",
"dotenv": "^16.5.0"
"yup": "^1.6.1"
},
"prettier": "@kit/prettier-config",
"browserslist": [

View File

@@ -24,6 +24,7 @@ import { cn } from '@kit/ui/utils';
import { CreateTeamAccountDialog } from '../../../team-accounts/src/components/create-team-account-dialog';
import { usePersonalAccountData } from '../hooks/use-personal-account-data';
import { useUserWorkspace } from '../hooks/use-user-workspace';
interface AccountSelectorProps {
accounts: Array<{
@@ -63,6 +64,7 @@ export function AccountSelector({
const [isCreatingAccount, setIsCreatingAccount] = useState<boolean>(false);
const { t } = useTranslation('teams');
const personalData = usePersonalAccountData(userId);
const { user } = useUserWorkspace();
const value = useMemo(() => {
return selectedAccount ?? PERSONAL_ACCOUNT_SLUG;
@@ -89,6 +91,16 @@ export function AccountSelector({
<PersonIcon className="h-5 w-5" />
);
const isSuperAdmin = useMemo(() => {
const factors = user?.factors ?? [];
const hasAdminRole = user?.app_metadata.role === 'super-admin';
const hasTotpFactor = factors.some(
(factor) => factor.factor_type === 'totp' && factor.status === 'verified',
);
return hasAdminRole && hasTotpFactor;
}, [user]);
return (
<>
<Popover open={open} onOpenChange={setOpen}>
@@ -172,7 +184,6 @@ export function AccountSelector({
>
<Command>
<CommandInput placeholder={t('searchAccount')} className="h-9" />
<CommandList>
<CommandGroup>
<CommandItem
@@ -251,7 +262,7 @@ export function AccountSelector({
<Separator />
<If condition={features.enableTeamCreation}>
<If condition={features.enableTeamCreation && isSuperAdmin}>
<div className={'p-1'}>
<Button
data-test={'create-team-account-trigger'}
@@ -274,7 +285,7 @@ export function AccountSelector({
</PopoverContent>
</Popover>
<If condition={features.enableTeamCreation}>
<If condition={features.enableTeamCreation && isSuperAdmin}>
<CreateTeamAccountDialog
isOpen={isCreatingAccount}
setIsOpen={setIsCreatingAccount}

View File

@@ -149,7 +149,7 @@ async function PersonalAccountPage(props: { account: Account }) {
<SubscriptionsTable accountId={props.account.id} />
<div className={'divider-divider-x flex flex-col gap-y-2.5'}>
<Heading level={6}>Teams</Heading>
<Heading level={6}>Companies</Heading>
<div>
<AdminMembershipsTable memberships={memberships} />
@@ -205,16 +205,15 @@ async function TeamAccountPage(props: {
</span>
</div>
<Badge variant={'outline'}>Team Account</Badge>
<Badge variant={'outline'}>Company Account</Badge>
</div>
</div>
<div>
<div className={'flex flex-col gap-y-8'}>
<SubscriptionsTable accountId={props.account.id} />
<div className={'flex flex-col gap-y-2.5'}>
<Heading level={6}>Team Members</Heading>
<Heading level={6}>Company Employees</Heading>
<AdminMembersTable members={members} />
</div>

View File

@@ -132,7 +132,7 @@ function AccountsTableFilters(props: {
<SelectLabel>Account Type</SelectLabel>
<SelectItem value={'all'}>All accounts</SelectItem>
<SelectItem value={'team'}>Team</SelectItem>
<SelectItem value={'team'}>Company</SelectItem>
<SelectItem value={'personal'}>Personal</SelectItem>
</SelectGroup>
</SelectContent>
@@ -183,7 +183,7 @@ function getColumns(): ColumnDef<Account>[] {
id: 'type',
header: 'Type',
cell: ({ row }) => {
return row.original.is_personal_account ? 'Personal' : 'Team';
return row.original.is_personal_account ? 'Personal' : 'Company';
},
},
{
@@ -248,7 +248,7 @@ function getColumns(): ColumnDef<Account>[] {
<If condition={!isPersonalAccount}>
<AdminDeleteAccountDialog accountId={row.original.id}>
<DropdownMenuItem onSelect={(e) => e.preventDefault()}>
Delete Team Account
Delete Company Account
</DropdownMenuItem>
</AdminDeleteAccountDialog>
</If>

View File

@@ -0,0 +1,144 @@
'use client';
import { useState, useTransition } from 'react';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import { Alert, AlertDescription, AlertTitle } from '@kit/ui/alert';
import {
AlertDialog,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@kit/ui/alert-dialog';
import { Button } from '@kit/ui/button';
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@kit/ui/form';
import { If } from '@kit/ui/if';
import { Input } from '@kit/ui/input';
import { toast } from '@kit/ui/sonner';
import { createCompanyAccountAction } from '../lib/server/admin-server-actions';
import { CreateCompanySchema, CreateCompanySchemaType } from '../lib/server/schema/create-company.schema';
import { Trans } from '@kit/ui/trans';
export function AdminCreateCompanyDialog(props: React.PropsWithChildren) {
const [pending, startTransition] = useTransition();
const [error, setError] = useState<string | null>(null);
const [open, setOpen] = useState(false);
const form = useForm<CreateCompanySchemaType>({
resolver: zodResolver(CreateCompanySchema),
defaultValues: {
name: '',
},
mode: 'onChange',
});
const onSubmit = (data: CreateCompanySchemaType) => {
startTransition(async () => {
try {
const error = await createCompanyAccountAction(data);
if (!error) {
toast.success('Company created successfully');
form.reset();
setOpen(false);
setError(null);
} else {
setError('Something went wrong with company creation');
}
} catch (e) {
setError(e instanceof Error ? e.message : 'Error');
}
});
};
return (
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogTrigger asChild>{props.children}</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Create New Company Account</AlertDialogTitle>
<AlertDialogDescription>
Complete the form below to create a new company account.
</AlertDialogDescription>
</AlertDialogHeader>
<Form {...form}>
<form
data-test={'admin-create-user-form'}
className={'flex flex-col space-y-4'}
onSubmit={form.handleSubmit(onSubmit)}
>
<If condition={!!error}>
<Alert variant={'destructive'}>
<AlertTitle>Error</AlertTitle>
<AlertDescription>{error}</AlertDescription>
</Alert>
</If>
<FormField
name={'name'}
render={({ field }) => {
return (
<FormItem>
<FormLabel>
<Trans i18nKey={'teams:teamNameLabel'} />
</FormLabel>
<FormControl>
<Input
data-test={'create-team-name-input'}
required
minLength={2}
maxLength={50}
placeholder={''}
{...field}
/>
</FormControl>
<FormDescription>
<Trans i18nKey={'teams:teamNameDescription'} />
</FormDescription>
<FormMessage />
</FormItem>
);
}}
/>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<Button disabled={pending} type={'submit'}>
{pending ? 'Creating...' : 'Create Company'}
</Button>
</AlertDialogFooter>
</form>
</Form>
</AlertDialogContent>
</AlertDialog>
);
}

View File

@@ -58,7 +58,7 @@ export function AdminCreateUserDialog(props: React.PropsWithChildren) {
const result = await createUserAction(data);
if (result.success) {
toast.success('User creates successfully');
toast.success('User created successfully');
form.reset();
setOpen(false);

View File

@@ -36,10 +36,10 @@ export async function AdminDashboard() {
<Card>
<CardHeader>
<CardTitle>Team Accounts</CardTitle>
<CardTitle>Company Accounts</CardTitle>
<CardDescription>
The number of team accounts that have been created.
The number of company accounts that have been created.
</CardDescription>
</CardHeader>
@@ -49,43 +49,6 @@ export async function AdminDashboard() {
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Paying Customers</CardTitle>
<CardDescription>
The number of paying customers with active subscriptions.
</CardDescription>
</CardHeader>
<CardContent>
<div className={'flex justify-between'}>
<Figure>{data.subscriptions}</Figure>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Trials</CardTitle>
<CardDescription>
The number of trial subscriptions currently active.
</CardDescription>
</CardHeader>
<CardContent>
<div className={'flex justify-between'}>
<Figure>{data.trials}</Figure>
</div>
</CardContent>
</Card>
<div>
<p className={'text-muted-foreground w-max text-xs'}>
The above data is estimated and may not be 100% accurate.
</p>
</div>
</div>
);
}

View File

@@ -52,7 +52,7 @@ function getColumns(): ColumnDef<Memberships>[] {
{
header: 'Role',
cell: ({ row }) => {
return row.original.role;
return row.original.role === 'owner' ? 'HR' : 'Employee';
},
},
{

View File

@@ -20,6 +20,8 @@ import { ResetPasswordSchema } from './schema/reset-password.schema';
import { createAdminAccountsService } from './services/admin-accounts.service';
import { createAdminAuthUserService } from './services/admin-auth-user.service';
import { adminAction } from './utils/admin-action';
import { CreateCompanySchema } from './schema/create-company.schema';
import { createCreateCompanyAccountService } from './services/admin-create-company-account.service';
/**
* @name banUserAction
@@ -222,6 +224,42 @@ export const resetPasswordAction = adminAction(
),
);
export const createCompanyAccountAction = enhanceAction(
async ({ name }, user) => {
const logger = await getLogger();
const client = getSupabaseServerClient();
const service = createCreateCompanyAccountService(client);
const ctx = {
name: 'team-accounts.create',
userId: user.id,
accountName: name,
};
logger.info(ctx, `Creating company account...`);
const { data, error } = await service.createNewOrganizationAccount({
name,
userId: user.id,
});
if (error) {
logger.error({ ...ctx, error }, `Failed to create company account`);
return {
error: true,
};
}
logger.info(ctx, `Company account created`);
redirect(`/home/${data.slug}/settings`);
},
{
schema: CreateCompanySchema,
},
);
function revalidateAdmin() {
revalidatePath('/admin', 'layout');
}

View File

@@ -0,0 +1,52 @@
import { z } from 'zod';
/**
* @name RESERVED_NAMES_ARRAY
* @description Array of reserved names for team accounts
* This is a list of names that cannot be used for team accounts as they are reserved for other purposes.
* Please include any new reserved names here.
*/
const RESERVED_NAMES_ARRAY = [
'settings',
'billing',
// please add more reserved names here
];
const SPECIAL_CHARACTERS_REGEX = /[!@#$%^&*()+=[\]{};':"\\|,.<>/?]/;
/**
* @name CompanyNameSchema
*/
export const CompanyNameSchema = z
.string({
description: 'The name of the company account',
})
.min(2)
.max(50)
.refine(
(name) => {
return !SPECIAL_CHARACTERS_REGEX.test(name);
},
{
message: 'teams:specialCharactersError',
},
)
.refine(
(name) => {
return !RESERVED_NAMES_ARRAY.includes(name.toLowerCase());
},
{
message: 'teams:reservedNameError',
},
);
/**
* @name CreateCompanySchema
* @description Schema for creating a team account
*/
export const CreateCompanySchema = z.object({
name: CompanyNameSchema,
});
export type CreateCompanySchemaType = z.infer<typeof CreateCompanySchema>;

View File

@@ -0,0 +1,45 @@
import 'server-only';
import { SupabaseClient } from '@supabase/supabase-js';
import { getLogger } from '@kit/shared/logger';
import { Database } from '@kit/supabase/database';
export function createCreateCompanyAccountService(
client: SupabaseClient<Database>,
) {
return new CreateTeamAccountService(client);
}
class CreateTeamAccountService {
private readonly namespace = 'accounts.create-team-account';
constructor(private readonly client: SupabaseClient<Database>) {}
async createNewOrganizationAccount(params: { name: string; userId: string }) {
const logger = await getLogger();
const ctx = { ...params, namespace: this.namespace };
logger.info(ctx, `Creating new company account...`);
const { error, data } = await this.client.rpc('create_team_account', {
account_name: params.name,
});
if (error) {
logger.error(
{
error,
...ctx,
},
`Error creating company account`,
);
throw new Error('Error creating company account');
}
logger.info(ctx, `Company account created successfully`);
return { data, error };
}
}

View File

@@ -38,9 +38,7 @@ export const createTeamAccountAction = enhanceAction(
logger.info(ctx, `Team account created`);
const accountHomePath = '/home/' + data.slug;
redirect(accountHomePath);
redirect(`/home/${data.slug}/settings`);
},
{
schema: CreateTeamSchema,

View File

@@ -5,7 +5,7 @@
"tsx": true,
"tailwind": {
"config": "./tailwind.config.ts",
"css": "../../apps/web/styles/globals.css",
"css": "../../styles/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""

View File

@@ -63,8 +63,8 @@
"sendingEmailCode": "Sending code...",
"resetPasswordError": "Sorry, we could not reset your password. Please try again.",
"emailPlaceholder": "your@email.com",
"inviteAlertHeading": "You have been invited to join a team",
"inviteAlertBody": "Please sign in or sign up to accept the invite and join the team.",
"inviteAlertHeading": "You have been invited to join a company",
"inviteAlertBody": "Please sign in or sign up to accept the invite and join the company.",
"acceptTermsAndConditions": "I accept the <TermsOfServiceLink /> and <PrivacyPolicyLink />",
"termsOfService": "Terms of Service",
"privacyPolicy": "Privacy Policy",

View File

@@ -18,8 +18,8 @@
"checkoutSuccessBackButton": "Proceed to App",
"cannotManageBillingAlertTitle": "You cannot manage billing",
"cannotManageBillingAlertDescription": "You do not have permissions to manage billing. Please contact your account owner.",
"manageTeamPlan": "Manage your Team Plan",
"manageTeamPlanDescription": "Choose a plan that fits your team's needs. You can upgrade or downgrade your plan at any time.",
"manageTeamPlan": "Manage your Company Plan",
"manageTeamPlanDescription": "Choose a plan that fits your company's needs. You can upgrade or downgrade your plan at any time.",
"basePlan": "Base Plan",
"billingInterval": {
"label": "Choose your billing interval",
@@ -34,9 +34,9 @@
"redirectingToPayment": "Redirecting to checkout. Please wait...",
"proceedToPayment": "Proceed to Payment",
"startTrial": "Start Trial",
"perTeamMember": "Per team member",
"perTeamMember": "Per company employee",
"perUnit": "Per {{unit}} usage",
"teamMembers": "Team Members",
"teamMembers": "Company Employees",
"includedUpTo": "Up to {{upTo}} {{unit}} included in the plan",
"fromPreviousTierUpTo": "for each {{unit}} for the next {{ upTo }} {{ unit }}",
"andAbove": "above {{ previousTier }} {{ unit }}",

View File

@@ -1,8 +1,8 @@
{
"homeTabLabel": "Home",
"homeTabDescription": "Welcome to your home page",
"accountMembers": "Team Members",
"membersTabDescription": "Here you can manage the members of your team.",
"accountMembers": "Company Employees",
"membersTabDescription": "Here you can manage the employees of your company.",
"billingTabLabel": "Billing",
"billingTabDescription": "Manage your billing and subscription",
"dashboardTabLabel": "Dashboard",
@@ -58,7 +58,7 @@
"routes": {
"home": "Home",
"account": "Account",
"members": "Members",
"members": "Employees",
"billing": "Billing",
"dashboard": "Dashboard",
"settings": "Settings",
@@ -70,7 +70,7 @@
"label": "Owner"
},
"member": {
"label": "Member"
"label": "Employee"
}
},
"otp": {

View File

@@ -4,26 +4,26 @@
},
"settings": {
"pageTitle": "Settings",
"pageDescription": "Manage your Team details",
"teamLogo": "Team Logo",
"teamLogoDescription": "Update your team's logo to make it easier to identify",
"teamName": "Team Name",
"teamNameDescription": "Update your team's name",
"pageDescription": "Manage your Company details",
"teamLogo": "Company Logo",
"teamLogoDescription": "Update your company's logo to make it easier to identify",
"teamName": "Company Name",
"teamNameDescription": "Update your company's name",
"dangerZone": "Danger Zone",
"dangerZoneDescription": "This section contains actions that are irreversible"
},
"members": {
"pageTitle": "Members"
"pageTitle": "Employees"
},
"billing": {
"pageTitle": "Billing"
},
"yourTeams": "Your Teams ({{teamsCount}})",
"createTeam": "Create a Team",
"creatingTeam": "Creating Team...",
"yourTeams": "Your Companies ({{teamsCount}})",
"createTeam": "Create a Company",
"creatingTeam": "Creating Company...",
"personalAccount": "Personal Account",
"searchAccount": "Search Account...",
"membersTabLabel": "Members",
"membersTabLabel": "Employees",
"memberName": "Name",
"youLabel": "You",
"emailLabel": "Email",
@@ -31,108 +31,108 @@
"primaryOwnerLabel": "Primary Owner",
"joinedAtLabel": "Joined at",
"invitedAtLabel": "Invited at",
"inviteMembersPageSubheading": "Invite members to your Team",
"createTeamModalHeading": "Create Team",
"createTeamModalDescription": "Create a new Team to manage your projects and members.",
"teamNameLabel": "Team Name",
"teamNameDescription": "Your team name should be unique and descriptive",
"createTeamSubmitLabel": "Create Team",
"createTeamSuccess": "Team created successfully",
"createTeamError": "Team not created. Please try again.",
"createTeamLoading": "Creating team...",
"inviteMembersPageSubheading": "Invite employees to your Company",
"createTeamModalHeading": "Create Company",
"createTeamModalDescription": "Create a new Company to manage your projects and employees.",
"teamNameLabel": "Company Name",
"teamNameDescription": "Your company name should be unique and descriptive",
"createTeamSubmitLabel": "Create Company",
"createTeamSuccess": "Company created successfully",
"createTeamError": "Company not created. Please try again.",
"createTeamLoading": "Creating company...",
"settingsPageLabel": "General",
"createTeamDropdownLabel": "New team",
"createTeamDropdownLabel": "New company",
"changeRole": "Change Role",
"removeMember": "Remove from Account",
"inviteMembersSuccess": "Members invited successfully!",
"inviteMembersSuccess": "Employees invited successfully!",
"inviteMembersError": "Sorry, we encountered an error! Please try again",
"inviteMembersLoading": "Inviting members...",
"inviteMembersLoading": "Inviting employees...",
"removeInviteButtonLabel": "Remove invite",
"addAnotherMemberButtonLabel": "Add another one",
"inviteMembersButtonLabel": "Send Invites",
"removeMemberModalHeading": "You are removing this user",
"removeMemberModalDescription": "Remove this member from the team. They will no longer have access to the team.",
"removeMemberSuccessMessage": "Member removed successfully",
"removeMemberModalDescription": "Remove this employee from the company. They will no longer have access to the company.",
"removeMemberSuccessMessage": "Employee removed successfully",
"removeMemberErrorMessage": "Sorry, we encountered an error. Please try again",
"removeMemberErrorHeading": "Sorry, we couldn't remove the selected member.",
"removeMemberLoadingMessage": "Removing member...",
"removeMemberSubmitLabel": "Remove User from Team",
"removeMemberErrorHeading": "Sorry, we couldn't remove the selected employee.",
"removeMemberLoadingMessage": "Removing employee...",
"removeMemberSubmitLabel": "Remove User from Company",
"chooseDifferentRoleError": "Role is the same as the current one",
"updateRole": "Update Role",
"updateRoleLoadingMessage": "Updating role...",
"updateRoleSuccessMessage": "Role updated successfully",
"updatingRoleErrorMessage": "Sorry, we encountered an error. Please try again.",
"updateMemberRoleModalHeading": "Update Member's Role",
"updateMemberRoleModalHeading": "Update Employee's Role",
"updateMemberRoleModalDescription": "Change the role of the selected member. The role determines the permissions of the member.",
"roleMustBeDifferent": "Role must be different from the current one",
"memberRoleInputLabel": "Member role",
"updateRoleDescription": "Pick a role for this member.",
"updateRoleSubmitLabel": "Update Role",
"transferOwnership": "Transfer Ownership",
"transferOwnershipDescription": "Transfer ownership of the team to another member.",
"transferOwnershipDescription": "Transfer ownership of the company account to another employee.",
"transferOwnershipInputLabel": "Please type TRANSFER to confirm the transfer of ownership.",
"transferOwnershipInputDescription": "By transferring ownership, you will no longer be the primary owner of the team.",
"transferOwnershipInputDescription": "By transferring ownership, you will no longer be the primary owner of the company account.",
"deleteInvitation": "Delete Invitation",
"deleteInvitationDialogDescription": "You are about to delete the invitation. The user will no longer be able to join the team.",
"deleteInvitationDialogDescription": "You are about to delete the invitation. The user will no longer be able to join the company account.",
"deleteInviteSuccessMessage": "Invite deleted successfully",
"deleteInviteErrorMessage": "Invite not deleted. Please try again.",
"deleteInviteLoadingMessage": "Deleting invite. Please wait...",
"confirmDeletingMemberInvite": "You are deleting the invite to <b>{{ email }}</b>",
"transferOwnershipDisclaimer": "You are transferring ownership of the selected team to <b>{{ member }}</b>.",
"transferOwnershipDisclaimer": "You are transferring ownership of the selected company account to <b>{{ member }}</b>.",
"transferringOwnership": "Transferring ownership...",
"transferOwnershipSuccess": "Ownership successfully transferred",
"transferOwnershipError": "Sorry, we could not transfer ownership to the selected member. Please try again.",
"deleteInviteSubmitLabel": "Delete Invite",
"youBadgeLabel": "You",
"updateTeamLoadingMessage": "Updating Team...",
"updateTeamSuccessMessage": "Team successfully updated",
"updateTeamErrorMessage": "Could not update Team. Please try again.",
"updateTeamLoadingMessage": "Updating Company...",
"updateTeamSuccessMessage": "Company successfully updated",
"updateTeamErrorMessage": "Could not update Company. Please try again.",
"updateLogoErrorMessage": "Could not update Logo. Please try again.",
"teamNameInputLabel": "Team Name",
"teamLogoInputHeading": "Upload your team's Logo",
"teamLogoInputSubheading": "Please choose a photo to upload as your team logo.",
"updateTeamSubmitLabel": "Update Team",
"inviteMembersHeading": "Invite Members to your Team",
"inviteMembersDescription": "Invite members to your team by entering their email and role.",
"emailPlaceholder": "member@email.com",
"membersPageHeading": "Members",
"inviteMembersButton": "Invite Members",
"invitingMembers": "Inviting members...",
"inviteMembersSuccessMessage": "Members invited successfully",
"inviteMembersErrorMessage": "Sorry, members could not be invited. Please try again.",
"teamNameInputLabel": "Company Name",
"teamLogoInputHeading": "Upload your company's Logo",
"teamLogoInputSubheading": "Please choose a photo to upload as your company logo.",
"updateTeamSubmitLabel": "Update Company",
"inviteMembersHeading": "Invite Employees to your Company",
"inviteMembersDescription": "Invite employees to your company by entering their email and role.",
"emailPlaceholder": "employee@email.com",
"membersPageHeading": "Employees",
"inviteMembersButton": "Invite Employees",
"invitingMembers": "Inviting employees...",
"inviteMembersSuccessMessage": "Employees invited successfully",
"inviteMembersErrorMessage": "Sorry, employees could not be invited. Please try again.",
"pendingInvitesHeading": "Pending Invites",
"pendingInvitesDescription": " Here you can manage the pending invitations to your team.",
"pendingInvitesDescription": " Here you can manage the pending invitations to your company.",
"noPendingInvites": "No pending invites found",
"loadingMembers": "Loading members...",
"loadMembersError": "Sorry, we couldn't fetch your team's members.",
"loadInvitedMembersError": "Sorry, we couldn't fetch your team's invited members.",
"loadingInvitedMembers": "Loading invited members...",
"loadingMembers": "Loading employees...",
"loadMembersError": "Sorry, we couldn't fetch your company's employees.",
"loadInvitedMembersError": "Sorry, we couldn't fetch your company's invited employees.",
"loadingInvitedMembers": "Loading invited employees...",
"invitedBadge": "Invited",
"duplicateInviteEmailError": "You have already entered this email address",
"invitingOwnAccountError": "Hey, that's your email!",
"dangerZone": "Danger Zone",
"dangerZoneSubheading": "Delete or leave your team",
"deleteTeam": "Delete Team",
"deleteTeamDescription": "This action cannot be undone. All data associated with this team will be deleted.",
"deletingTeam": "Deleting team",
"deleteTeamModalHeading": "Deleting Team",
"deletingTeamDescription": "You are about to delete the team {{ teamName }}. This action cannot be undone.",
"deleteTeamInputField": "Type the name of the team to confirm",
"leaveTeam": "Leave Team",
"leavingTeamModalHeading": "Leaving Team",
"leavingTeamModalDescription": "You are about to leave this team. You will no longer have access to it.",
"leaveTeamDescription": "Click the button below to leave the team. Remember, you will no longer have access to it and will need to be re-invited to join.",
"deleteTeamDisclaimer": "You are deleting the team {{ teamName }}. This action cannot be undone.",
"leaveTeamDisclaimer": "You are leaving the team {{ teamName }}. You will no longer have access to it.",
"deleteTeamErrorHeading": "Sorry, we couldn't delete your team.",
"leaveTeamErrorHeading": "Sorry, we couldn't leave your team.",
"searchMembersPlaceholder": "Search members",
"createTeamErrorHeading": "Sorry, we couldn't create your team.",
"createTeamErrorMessage": "We encountered an error creating your team. Please try again.",
"transferTeamErrorHeading": "Sorry, we couldn't transfer ownership of your team.",
"transferTeamErrorMessage": "We encountered an error transferring ownership of your team. Please try again.",
"updateRoleErrorHeading": "Sorry, we couldn't update the role of the selected member.",
"updateRoleErrorMessage": "We encountered an error updating the role of the selected member. Please try again.",
"dangerZoneSubheading": "Delete or leave your company",
"deleteTeam": "Delete Company",
"deleteTeamDescription": "This action cannot be undone. All data associated with this company will be deleted.",
"deletingTeam": "Deleting company",
"deleteTeamModalHeading": "Deleting Company",
"deletingTeamDescription": "You are about to delete the company {{ teamName }}. This action cannot be undone.",
"deleteTeamInputField": "Type the name of the company to confirm",
"leaveTeam": "Leave Company",
"leavingTeamModalHeading": "Leaving Company",
"leavingTeamModalDescription": "You are about to leave this company. You will no longer have access to it.",
"leaveTeamDescription": "Click the button below to leave the company. Remember, you will no longer have access to it and will need to be re-invited to join.",
"deleteTeamDisclaimer": "You are deleting the company {{ teamName }}. This action cannot be undone.",
"leaveTeamDisclaimer": "You are leaving the company {{ teamName }}. You will no longer have access to it.",
"deleteTeamErrorHeading": "Sorry, we couldn't delete your company.",
"leaveTeamErrorHeading": "Sorry, we couldn't leave your company.",
"searchMembersPlaceholder": "Search employees",
"createTeamErrorHeading": "Sorry, we couldn't create your company.",
"createTeamErrorMessage": "We encountered an error creating your company. Please try again.",
"transferTeamErrorHeading": "Sorry, we couldn't transfer ownership of your company account.",
"transferTeamErrorMessage": "We encountered an error transferring ownership of your company account. Please try again.",
"updateRoleErrorHeading": "Sorry, we couldn't update the role of the selected employee.",
"updateRoleErrorMessage": "We encountered an error updating the role of the selected employee. Please try again.",
"searchInvitations": "Search Invitations",
"updateInvitation": "Update Invitation",
"removeInvitation": "Remove Invitation",
@@ -144,20 +144,20 @@
"active": "Active",
"inviteStatus": "Status",
"inviteNotFoundOrExpired": "Invite not found or expired",
"inviteNotFoundOrExpiredDescription": "The invite you are looking for is either expired or does not exist. Please contact the team owner to renew the invite.",
"inviteNotFoundOrExpiredDescription": "The invite you are looking for is either expired or does not exist. Please contact the company HR to renew the invite.",
"backToHome": "Back to Home",
"renewInvitationDialogDescription": "You are about to renew the invitation to {{ email }}. The user will be able to join the team.",
"renewInvitationDialogDescription": "You are about to renew the invitation to {{ email }}. The user will be able to join the company.",
"renewInvitationErrorTitle": "Sorry, we couldn't renew the invitation.",
"renewInvitationErrorDescription": "We encountered an error renewing the invitation. Please try again.",
"signInWithDifferentAccount": "Sign in with a different account",
"signInWithDifferentAccountDescription": "If you wish to accept the invitation with a different account, please sign out and back in with the account you wish to use.",
"acceptInvitationHeading": "Accept Invitation to join {{accountName}}",
"acceptInvitationDescription": "You have been invited to join the team {{accountName}}. If you wish to accept the invitation, please click the button below.",
"acceptInvitationDescription": "You have been invited to join the company {{accountName}}. If you wish to accept the invitation, please click the button below.",
"continueAs": "Continue as {{email}}",
"joinTeamAccount": "Join Team",
"joiningTeam": "Joining team...",
"leaveTeamInputLabel": "Please type LEAVE to confirm leaving the team.",
"leaveTeamInputDescription": "By leaving the team, you will no longer have access to it.",
"joinTeamAccount": "Join Company",
"joiningTeam": "Joining company...",
"leaveTeamInputLabel": "Please type LEAVE to confirm leaving the company.",
"leaveTeamInputDescription": "By leaving the company, you will no longer have access to it.",
"reservedNameError": "This name is reserved. Please choose a different one.",
"specialCharactersError": "This name cannot contain special characters. Please choose a different one."
}

View File

@@ -113,5 +113,5 @@
"createTeam": "Create a team to get started.",
"createTeamButtonLabel": "Create a Team",
"createCompanyAccount": "Create Company Account",
"requestCompanyAccount": "Küsi pakkumist"
"requestCompanyAccount": "Request Company Account"
}

View File

@@ -63,8 +63,8 @@
"sendingEmailCode": "Sending code...",
"resetPasswordError": "Sorry, we could not reset your password. Please try again.",
"emailPlaceholder": "your@email.com",
"inviteAlertHeading": "You have been invited to join a team",
"inviteAlertBody": "Please sign in or sign up to accept the invite and join the team.",
"inviteAlertHeading": "You have been invited to join a company",
"inviteAlertBody": "Please sign in or sign up to accept the invite and join the company.",
"acceptTermsAndConditions": "I accept the <TermsOfServiceLink /> and <PrivacyPolicyLink />",
"termsOfService": "Terms of Service",
"privacyPolicy": "Privacy Policy",

View File

@@ -18,8 +18,8 @@
"checkoutSuccessBackButton": "Proceed to App",
"cannotManageBillingAlertTitle": "You cannot manage billing",
"cannotManageBillingAlertDescription": "You do not have permissions to manage billing. Please contact your account owner.",
"manageTeamPlan": "Manage your Team Plan",
"manageTeamPlanDescription": "Choose a plan that fits your team's needs. You can upgrade or downgrade your plan at any time.",
"manageTeamPlan": "Manage your Company Plan",
"manageTeamPlanDescription": "Choose a plan that fits your company's needs. You can upgrade or downgrade your plan at any time.",
"basePlan": "Base Plan",
"billingInterval": {
"label": "Choose your billing interval",
@@ -34,9 +34,9 @@
"redirectingToPayment": "Redirecting to checkout. Please wait...",
"proceedToPayment": "Proceed to Payment",
"startTrial": "Start Trial",
"perTeamMember": "Per team member",
"perTeamMember": "Per company employee",
"perUnit": "Per {{unit}} usage",
"teamMembers": "Team Members",
"teamMembers": "Company Employees",
"includedUpTo": "Up to {{upTo}} {{unit}} included in the plan",
"fromPreviousTierUpTo": "for each {{unit}} for the next {{ upTo }} {{ unit }}",
"andAbove": "above {{ previousTier }} {{ unit }}",

View File

@@ -1,8 +1,8 @@
{
"homeTabLabel": "Home",
"homeTabDescription": "Welcome to your home page",
"accountMembers": "Team Members",
"membersTabDescription": "Here you can manage the members of your team.",
"accountMembers": "Company Employees",
"membersTabDescription": "Here you can manage the employees of your company.",
"billingTabLabel": "Billing",
"billingTabDescription": "Manage your billing and subscription",
"dashboardTabLabel": "Dashboard",
@@ -58,7 +58,7 @@
"routes": {
"home": "Home",
"account": "Account",
"members": "Members",
"members": "Employees",
"billing": "Billing",
"dashboard": "Dashboard",
"settings": "Settings",
@@ -70,7 +70,7 @@
"label": "Owner"
},
"member": {
"label": "Member"
"label": "Employee"
}
},
"otp": {

View File

@@ -36,5 +36,5 @@
"contactErrorDescription": "An error occurred while sending your message. Please try again later",
"footerDescription": "Here you can add a description about your company or product",
"copyright": "© Copyright {{year}} {{product}}. All Rights Reserved.",
"heroSubtitle": "Lihtne, mugav ja kiire ülevaade Sinu tervise seisundist"
"heroSubtitle": "Lihtne, mugav ja kiire ülevaade oma tervisest"
}

View File

@@ -4,26 +4,26 @@
},
"settings": {
"pageTitle": "Settings",
"pageDescription": "Manage your Team details",
"teamLogo": "Team Logo",
"teamLogoDescription": "Update your team's logo to make it easier to identify",
"teamName": "Team Name",
"teamNameDescription": "Update your team's name",
"pageDescription": "Manage your Company details",
"teamLogo": "Company Logo",
"teamLogoDescription": "Update your company's logo to make it easier to identify",
"teamName": "Company Name",
"teamNameDescription": "Update your company's name",
"dangerZone": "Danger Zone",
"dangerZoneDescription": "This section contains actions that are irreversible"
},
"members": {
"pageTitle": "Members"
"pageTitle": "Employees"
},
"billing": {
"pageTitle": "Billing"
},
"yourTeams": "Your Teams ({{teamsCount}})",
"createTeam": "Create a Team",
"creatingTeam": "Creating Team...",
"yourTeams": "Your Companies ({{teamsCount}})",
"createTeam": "Create a Company",
"creatingTeam": "Creating Company...",
"personalAccount": "Personal Account",
"searchAccount": "Search Account...",
"membersTabLabel": "Members",
"membersTabLabel": "Employees",
"memberName": "Name",
"youLabel": "You",
"emailLabel": "Email",
@@ -31,108 +31,108 @@
"primaryOwnerLabel": "Primary Owner",
"joinedAtLabel": "Joined at",
"invitedAtLabel": "Invited at",
"inviteMembersPageSubheading": "Invite members to your Team",
"createTeamModalHeading": "Create Team",
"createTeamModalDescription": "Create a new Team to manage your projects and members.",
"teamNameLabel": "Team Name",
"teamNameDescription": "Your team name should be unique and descriptive",
"createTeamSubmitLabel": "Create Team",
"createTeamSuccess": "Team created successfully",
"createTeamError": "Team not created. Please try again.",
"createTeamLoading": "Creating team...",
"inviteMembersPageSubheading": "Invite employees to your Company",
"createTeamModalHeading": "Create Company",
"createTeamModalDescription": "Create a new Company to manage your projects and employees.",
"teamNameLabel": "Company Name",
"teamNameDescription": "Your company name should be unique and descriptive",
"createTeamSubmitLabel": "Create Company",
"createTeamSuccess": "Company created successfully",
"createTeamError": "Company not created. Please try again.",
"createTeamLoading": "Creating company...",
"settingsPageLabel": "General",
"createTeamDropdownLabel": "New team",
"createTeamDropdownLabel": "New company",
"changeRole": "Change Role",
"removeMember": "Remove from Account",
"inviteMembersSuccess": "Members invited successfully!",
"inviteMembersSuccess": "Employees invited successfully!",
"inviteMembersError": "Sorry, we encountered an error! Please try again",
"inviteMembersLoading": "Inviting members...",
"inviteMembersLoading": "Inviting employees...",
"removeInviteButtonLabel": "Remove invite",
"addAnotherMemberButtonLabel": "Add another one",
"inviteMembersButtonLabel": "Send Invites",
"removeMemberModalHeading": "You are removing this user",
"removeMemberModalDescription": "Remove this member from the team. They will no longer have access to the team.",
"removeMemberSuccessMessage": "Member removed successfully",
"removeMemberModalDescription": "Remove this employee from the company. They will no longer have access to the company.",
"removeMemberSuccessMessage": "Employee removed successfully",
"removeMemberErrorMessage": "Sorry, we encountered an error. Please try again",
"removeMemberErrorHeading": "Sorry, we couldn't remove the selected member.",
"removeMemberLoadingMessage": "Removing member...",
"removeMemberSubmitLabel": "Remove User from Team",
"removeMemberErrorHeading": "Sorry, we couldn't remove the selected employee.",
"removeMemberLoadingMessage": "Removing employee...",
"removeMemberSubmitLabel": "Remove User from Company",
"chooseDifferentRoleError": "Role is the same as the current one",
"updateRole": "Update Role",
"updateRoleLoadingMessage": "Updating role...",
"updateRoleSuccessMessage": "Role updated successfully",
"updatingRoleErrorMessage": "Sorry, we encountered an error. Please try again.",
"updateMemberRoleModalHeading": "Update Member's Role",
"updateMemberRoleModalHeading": "Update Employee's Role",
"updateMemberRoleModalDescription": "Change the role of the selected member. The role determines the permissions of the member.",
"roleMustBeDifferent": "Role must be different from the current one",
"memberRoleInputLabel": "Member role",
"updateRoleDescription": "Pick a role for this member.",
"updateRoleSubmitLabel": "Update Role",
"transferOwnership": "Transfer Ownership",
"transferOwnershipDescription": "Transfer ownership of the team to another member.",
"transferOwnershipDescription": "Transfer ownership of the company account to another employee.",
"transferOwnershipInputLabel": "Please type TRANSFER to confirm the transfer of ownership.",
"transferOwnershipInputDescription": "By transferring ownership, you will no longer be the primary owner of the team.",
"transferOwnershipInputDescription": "By transferring ownership, you will no longer be the primary owner of the company account.",
"deleteInvitation": "Delete Invitation",
"deleteInvitationDialogDescription": "You are about to delete the invitation. The user will no longer be able to join the team.",
"deleteInvitationDialogDescription": "You are about to delete the invitation. The user will no longer be able to join the company account.",
"deleteInviteSuccessMessage": "Invite deleted successfully",
"deleteInviteErrorMessage": "Invite not deleted. Please try again.",
"deleteInviteLoadingMessage": "Deleting invite. Please wait...",
"confirmDeletingMemberInvite": "You are deleting the invite to <b>{{ email }}</b>",
"transferOwnershipDisclaimer": "You are transferring ownership of the selected team to <b>{{ member }}</b>.",
"transferOwnershipDisclaimer": "You are transferring ownership of the selected company account to <b>{{ member }}</b>.",
"transferringOwnership": "Transferring ownership...",
"transferOwnershipSuccess": "Ownership successfully transferred",
"transferOwnershipError": "Sorry, we could not transfer ownership to the selected member. Please try again.",
"deleteInviteSubmitLabel": "Delete Invite",
"youBadgeLabel": "You",
"updateTeamLoadingMessage": "Updating Team...",
"updateTeamSuccessMessage": "Team successfully updated",
"updateTeamErrorMessage": "Could not update Team. Please try again.",
"updateTeamLoadingMessage": "Updating Company...",
"updateTeamSuccessMessage": "Company successfully updated",
"updateTeamErrorMessage": "Could not update Company. Please try again.",
"updateLogoErrorMessage": "Could not update Logo. Please try again.",
"teamNameInputLabel": "Team Name",
"teamLogoInputHeading": "Upload your team's Logo",
"teamLogoInputSubheading": "Please choose a photo to upload as your team logo.",
"updateTeamSubmitLabel": "Update Team",
"inviteMembersHeading": "Invite Members to your Team",
"inviteMembersDescription": "Invite members to your team by entering their email and role.",
"emailPlaceholder": "member@email.com",
"membersPageHeading": "Members",
"inviteMembersButton": "Invite Members",
"invitingMembers": "Inviting members...",
"inviteMembersSuccessMessage": "Members invited successfully",
"inviteMembersErrorMessage": "Sorry, members could not be invited. Please try again.",
"teamNameInputLabel": "Company Name",
"teamLogoInputHeading": "Upload your company's Logo",
"teamLogoInputSubheading": "Please choose a photo to upload as your company logo.",
"updateTeamSubmitLabel": "Update Company",
"inviteMembersHeading": "Invite Employees to your Company",
"inviteMembersDescription": "Invite employees to your company by entering their email and role.",
"emailPlaceholder": "employee@email.com",
"membersPageHeading": "Employees",
"inviteMembersButton": "Invite Employees",
"invitingMembers": "Inviting employees...",
"inviteMembersSuccessMessage": "Employees invited successfully",
"inviteMembersErrorMessage": "Sorry, employees could not be invited. Please try again.",
"pendingInvitesHeading": "Pending Invites",
"pendingInvitesDescription": " Here you can manage the pending invitations to your team.",
"pendingInvitesDescription": " Here you can manage the pending invitations to your company.",
"noPendingInvites": "No pending invites found",
"loadingMembers": "Loading members...",
"loadMembersError": "Sorry, we couldn't fetch your team's members.",
"loadInvitedMembersError": "Sorry, we couldn't fetch your team's invited members.",
"loadingInvitedMembers": "Loading invited members...",
"loadingMembers": "Loading employees...",
"loadMembersError": "Sorry, we couldn't fetch your company's employees.",
"loadInvitedMembersError": "Sorry, we couldn't fetch your company's invited employees.",
"loadingInvitedMembers": "Loading invited employees...",
"invitedBadge": "Invited",
"duplicateInviteEmailError": "You have already entered this email address",
"invitingOwnAccountError": "Hey, that's your email!",
"dangerZone": "Danger Zone",
"dangerZoneSubheading": "Delete or leave your team",
"deleteTeam": "Delete Team",
"deleteTeamDescription": "This action cannot be undone. All data associated with this team will be deleted.",
"deletingTeam": "Deleting team",
"deleteTeamModalHeading": "Deleting Team",
"deletingTeamDescription": "You are about to delete the team {{ teamName }}. This action cannot be undone.",
"deleteTeamInputField": "Type the name of the team to confirm",
"leaveTeam": "Leave Team",
"leavingTeamModalHeading": "Leaving Team",
"leavingTeamModalDescription": "You are about to leave this team. You will no longer have access to it.",
"leaveTeamDescription": "Click the button below to leave the team. Remember, you will no longer have access to it and will need to be re-invited to join.",
"deleteTeamDisclaimer": "You are deleting the team {{ teamName }}. This action cannot be undone.",
"leaveTeamDisclaimer": "You are leaving the team {{ teamName }}. You will no longer have access to it.",
"deleteTeamErrorHeading": "Sorry, we couldn't delete your team.",
"leaveTeamErrorHeading": "Sorry, we couldn't leave your team.",
"searchMembersPlaceholder": "Search members",
"createTeamErrorHeading": "Sorry, we couldn't create your team.",
"createTeamErrorMessage": "We encountered an error creating your team. Please try again.",
"transferTeamErrorHeading": "Sorry, we couldn't transfer ownership of your team.",
"transferTeamErrorMessage": "We encountered an error transferring ownership of your team. Please try again.",
"updateRoleErrorHeading": "Sorry, we couldn't update the role of the selected member.",
"updateRoleErrorMessage": "We encountered an error updating the role of the selected member. Please try again.",
"dangerZoneSubheading": "Delete or leave your company",
"deleteTeam": "Delete Company",
"deleteTeamDescription": "This action cannot be undone. All data associated with this company will be deleted.",
"deletingTeam": "Deleting company",
"deleteTeamModalHeading": "Deleting Company",
"deletingTeamDescription": "You are about to delete the company {{ teamName }}. This action cannot be undone.",
"deleteTeamInputField": "Type the name of the company to confirm",
"leaveTeam": "Leave Company",
"leavingTeamModalHeading": "Leaving Company",
"leavingTeamModalDescription": "You are about to leave this company. You will no longer have access to it.",
"leaveTeamDescription": "Click the button below to leave the company. Remember, you will no longer have access to it and will need to be re-invited to join.",
"deleteTeamDisclaimer": "You are deleting the company {{ teamName }}. This action cannot be undone.",
"leaveTeamDisclaimer": "You are leaving the company {{ teamName }}. You will no longer have access to it.",
"deleteTeamErrorHeading": "Sorry, we couldn't delete your company.",
"leaveTeamErrorHeading": "Sorry, we couldn't leave your company.",
"searchMembersPlaceholder": "Search employees",
"createTeamErrorHeading": "Sorry, we couldn't create your company.",
"createTeamErrorMessage": "We encountered an error creating your company. Please try again.",
"transferTeamErrorHeading": "Sorry, we couldn't transfer ownership of your company account.",
"transferTeamErrorMessage": "We encountered an error transferring ownership of your company account. Please try again.",
"updateRoleErrorHeading": "Sorry, we couldn't update the role of the selected employee.",
"updateRoleErrorMessage": "We encountered an error updating the role of the selected employee. Please try again.",
"searchInvitations": "Search Invitations",
"updateInvitation": "Update Invitation",
"removeInvitation": "Remove Invitation",
@@ -144,20 +144,20 @@
"active": "Active",
"inviteStatus": "Status",
"inviteNotFoundOrExpired": "Invite not found or expired",
"inviteNotFoundOrExpiredDescription": "The invite you are looking for is either expired or does not exist. Please contact the team owner to renew the invite.",
"inviteNotFoundOrExpiredDescription": "The invite you are looking for is either expired or does not exist. Please contact the company HR to renew the invite.",
"backToHome": "Back to Home",
"renewInvitationDialogDescription": "You are about to renew the invitation to {{ email }}. The user will be able to join the team.",
"renewInvitationDialogDescription": "You are about to renew the invitation to {{ email }}. The user will be able to join the company.",
"renewInvitationErrorTitle": "Sorry, we couldn't renew the invitation.",
"renewInvitationErrorDescription": "We encountered an error renewing the invitation. Please try again.",
"signInWithDifferentAccount": "Sign in with a different account",
"signInWithDifferentAccountDescription": "If you wish to accept the invitation with a different account, please sign out and back in with the account you wish to use.",
"acceptInvitationHeading": "Accept Invitation to join {{accountName}}",
"acceptInvitationDescription": "You have been invited to join the team {{accountName}}. If you wish to accept the invitation, please click the button below.",
"acceptInvitationDescription": "You have been invited to join the company {{accountName}}. If you wish to accept the invitation, please click the button below.",
"continueAs": "Continue as {{email}}",
"joinTeamAccount": "Join Team",
"joiningTeam": "Joining team...",
"leaveTeamInputLabel": "Please type LEAVE to confirm leaving the team.",
"leaveTeamInputDescription": "By leaving the team, you will no longer have access to it.",
"joinTeamAccount": "Join Company",
"joiningTeam": "Joining company...",
"leaveTeamInputLabel": "Please type LEAVE to confirm leaving the company.",
"leaveTeamInputDescription": "By leaving the company, you will no longer have access to it.",
"reservedNameError": "This name is reserved. Please choose a different one.",
"specialCharactersError": "This name cannot contain special characters. Please choose a different one."
}

View File

@@ -63,8 +63,8 @@
"sendingEmailCode": "Sending code...",
"resetPasswordError": "Sorry, we could not reset your password. Please try again.",
"emailPlaceholder": "your@email.com",
"inviteAlertHeading": "You have been invited to join a team",
"inviteAlertBody": "Please sign in or sign up to accept the invite and join the team.",
"inviteAlertHeading": "You have been invited to join a company",
"inviteAlertBody": "Please sign in or sign up to accept the invite and join the company.",
"acceptTermsAndConditions": "I accept the <TermsOfServiceLink /> and <PrivacyPolicyLink />",
"termsOfService": "Terms of Service",
"privacyPolicy": "Privacy Policy",

View File

@@ -18,8 +18,8 @@
"checkoutSuccessBackButton": "Proceed to App",
"cannotManageBillingAlertTitle": "You cannot manage billing",
"cannotManageBillingAlertDescription": "You do not have permissions to manage billing. Please contact your account owner.",
"manageTeamPlan": "Manage your Team Plan",
"manageTeamPlanDescription": "Choose a plan that fits your team's needs. You can upgrade or downgrade your plan at any time.",
"manageTeamPlan": "Manage your Company Plan",
"manageTeamPlanDescription": "Choose a plan that fits your company's needs. You can upgrade or downgrade your plan at any time.",
"basePlan": "Base Plan",
"billingInterval": {
"label": "Choose your billing interval",
@@ -34,9 +34,9 @@
"redirectingToPayment": "Redirecting to checkout. Please wait...",
"proceedToPayment": "Proceed to Payment",
"startTrial": "Start Trial",
"perTeamMember": "Per team member",
"perTeamMember": "Per company employee",
"perUnit": "Per {{unit}} usage",
"teamMembers": "Team Members",
"teamMembers": "Company Employees",
"includedUpTo": "Up to {{upTo}} {{unit}} included in the plan",
"fromPreviousTierUpTo": "for each {{unit}} for the next {{ upTo }} {{ unit }}",
"andAbove": "above {{ previousTier }} {{ unit }}",

View File

@@ -1,8 +1,8 @@
{
"homeTabLabel": "Home",
"homeTabDescription": "Welcome to your home page",
"accountMembers": "Team Members",
"membersTabDescription": "Here you can manage the members of your team.",
"accountMembers": "Company Employees",
"membersTabDescription": "Here you can manage the employees of your company.",
"billingTabLabel": "Billing",
"billingTabDescription": "Manage your billing and subscription",
"dashboardTabLabel": "Dashboard",
@@ -58,7 +58,7 @@
"routes": {
"home": "Home",
"account": "Account",
"members": "Members",
"members": "Employees",
"billing": "Billing",
"dashboard": "Dashboard",
"settings": "Settings",
@@ -70,7 +70,7 @@
"label": "Owner"
},
"member": {
"label": "Member"
"label": "Employee"
}
},
"otp": {

View File

@@ -36,5 +36,5 @@
"contactErrorDescription": "An error occurred while sending your message. Please try again later",
"footerDescription": "Here you can add a description about your company or product",
"copyright": "© Copyright {{year}} {{product}}. All Rights Reserved.",
"heroSubtitle": "Простой, удобный и быстрый обзор вашего состояния здоровья"
"heroSubtitle": "A simple, convenient, and quick overview of your health condition"
}

View File

@@ -4,26 +4,26 @@
},
"settings": {
"pageTitle": "Settings",
"pageDescription": "Manage your Team details",
"teamLogo": "Team Logo",
"teamLogoDescription": "Update your team's logo to make it easier to identify",
"teamName": "Team Name",
"teamNameDescription": "Update your team's name",
"pageDescription": "Manage your Company details",
"teamLogo": "Company Logo",
"teamLogoDescription": "Update your company's logo to make it easier to identify",
"teamName": "Company Name",
"teamNameDescription": "Update your company's name",
"dangerZone": "Danger Zone",
"dangerZoneDescription": "This section contains actions that are irreversible"
},
"members": {
"pageTitle": "Members"
"pageTitle": "Employees"
},
"billing": {
"pageTitle": "Billing"
},
"yourTeams": "Your Teams ({{teamsCount}})",
"createTeam": "Create a Team",
"creatingTeam": "Creating Team...",
"yourTeams": "Your Companies ({{teamsCount}})",
"createTeam": "Create a Company",
"creatingTeam": "Creating Company...",
"personalAccount": "Personal Account",
"searchAccount": "Search Account...",
"membersTabLabel": "Members",
"membersTabLabel": "Employees",
"memberName": "Name",
"youLabel": "You",
"emailLabel": "Email",
@@ -31,108 +31,108 @@
"primaryOwnerLabel": "Primary Owner",
"joinedAtLabel": "Joined at",
"invitedAtLabel": "Invited at",
"inviteMembersPageSubheading": "Invite members to your Team",
"createTeamModalHeading": "Create Team",
"createTeamModalDescription": "Create a new Team to manage your projects and members.",
"teamNameLabel": "Team Name",
"teamNameDescription": "Your team name should be unique and descriptive",
"createTeamSubmitLabel": "Create Team",
"createTeamSuccess": "Team created successfully",
"createTeamError": "Team not created. Please try again.",
"createTeamLoading": "Creating team...",
"inviteMembersPageSubheading": "Invite employees to your Company",
"createTeamModalHeading": "Create Company",
"createTeamModalDescription": "Create a new Company to manage your projects and employees.",
"teamNameLabel": "Company Name",
"teamNameDescription": "Your company name should be unique and descriptive",
"createTeamSubmitLabel": "Create Company",
"createTeamSuccess": "Company created successfully",
"createTeamError": "Company not created. Please try again.",
"createTeamLoading": "Creating company...",
"settingsPageLabel": "General",
"createTeamDropdownLabel": "New team",
"createTeamDropdownLabel": "New company",
"changeRole": "Change Role",
"removeMember": "Remove from Account",
"inviteMembersSuccess": "Members invited successfully!",
"inviteMembersSuccess": "Employees invited successfully!",
"inviteMembersError": "Sorry, we encountered an error! Please try again",
"inviteMembersLoading": "Inviting members...",
"inviteMembersLoading": "Inviting employees...",
"removeInviteButtonLabel": "Remove invite",
"addAnotherMemberButtonLabel": "Add another one",
"inviteMembersButtonLabel": "Send Invites",
"removeMemberModalHeading": "You are removing this user",
"removeMemberModalDescription": "Remove this member from the team. They will no longer have access to the team.",
"removeMemberSuccessMessage": "Member removed successfully",
"removeMemberModalDescription": "Remove this employee from the company. They will no longer have access to the company.",
"removeMemberSuccessMessage": "Employee removed successfully",
"removeMemberErrorMessage": "Sorry, we encountered an error. Please try again",
"removeMemberErrorHeading": "Sorry, we couldn't remove the selected member.",
"removeMemberLoadingMessage": "Removing member...",
"removeMemberSubmitLabel": "Remove User from Team",
"removeMemberErrorHeading": "Sorry, we couldn't remove the selected employee.",
"removeMemberLoadingMessage": "Removing employee...",
"removeMemberSubmitLabel": "Remove User from Company",
"chooseDifferentRoleError": "Role is the same as the current one",
"updateRole": "Update Role",
"updateRoleLoadingMessage": "Updating role...",
"updateRoleSuccessMessage": "Role updated successfully",
"updatingRoleErrorMessage": "Sorry, we encountered an error. Please try again.",
"updateMemberRoleModalHeading": "Update Member's Role",
"updateMemberRoleModalHeading": "Update Employee's Role",
"updateMemberRoleModalDescription": "Change the role of the selected member. The role determines the permissions of the member.",
"roleMustBeDifferent": "Role must be different from the current one",
"memberRoleInputLabel": "Member role",
"updateRoleDescription": "Pick a role for this member.",
"updateRoleSubmitLabel": "Update Role",
"transferOwnership": "Transfer Ownership",
"transferOwnershipDescription": "Transfer ownership of the team to another member.",
"transferOwnershipDescription": "Transfer ownership of the company account to another employee.",
"transferOwnershipInputLabel": "Please type TRANSFER to confirm the transfer of ownership.",
"transferOwnershipInputDescription": "By transferring ownership, you will no longer be the primary owner of the team.",
"transferOwnershipInputDescription": "By transferring ownership, you will no longer be the primary owner of the company account.",
"deleteInvitation": "Delete Invitation",
"deleteInvitationDialogDescription": "You are about to delete the invitation. The user will no longer be able to join the team.",
"deleteInvitationDialogDescription": "You are about to delete the invitation. The user will no longer be able to join the company account.",
"deleteInviteSuccessMessage": "Invite deleted successfully",
"deleteInviteErrorMessage": "Invite not deleted. Please try again.",
"deleteInviteLoadingMessage": "Deleting invite. Please wait...",
"confirmDeletingMemberInvite": "You are deleting the invite to <b>{{ email }}</b>",
"transferOwnershipDisclaimer": "You are transferring ownership of the selected team to <b>{{ member }}</b>.",
"transferOwnershipDisclaimer": "You are transferring ownership of the selected company account to <b>{{ member }}</b>.",
"transferringOwnership": "Transferring ownership...",
"transferOwnershipSuccess": "Ownership successfully transferred",
"transferOwnershipError": "Sorry, we could not transfer ownership to the selected member. Please try again.",
"deleteInviteSubmitLabel": "Delete Invite",
"youBadgeLabel": "You",
"updateTeamLoadingMessage": "Updating Team...",
"updateTeamSuccessMessage": "Team successfully updated",
"updateTeamErrorMessage": "Could not update Team. Please try again.",
"updateTeamLoadingMessage": "Updating Company...",
"updateTeamSuccessMessage": "Company successfully updated",
"updateTeamErrorMessage": "Could not update Company. Please try again.",
"updateLogoErrorMessage": "Could not update Logo. Please try again.",
"teamNameInputLabel": "Team Name",
"teamLogoInputHeading": "Upload your team's Logo",
"teamLogoInputSubheading": "Please choose a photo to upload as your team logo.",
"updateTeamSubmitLabel": "Update Team",
"inviteMembersHeading": "Invite Members to your Team",
"inviteMembersDescription": "Invite members to your team by entering their email and role.",
"emailPlaceholder": "member@email.com",
"membersPageHeading": "Members",
"inviteMembersButton": "Invite Members",
"invitingMembers": "Inviting members...",
"inviteMembersSuccessMessage": "Members invited successfully",
"inviteMembersErrorMessage": "Sorry, members could not be invited. Please try again.",
"teamNameInputLabel": "Company Name",
"teamLogoInputHeading": "Upload your company's Logo",
"teamLogoInputSubheading": "Please choose a photo to upload as your company logo.",
"updateTeamSubmitLabel": "Update Company",
"inviteMembersHeading": "Invite Employees to your Company",
"inviteMembersDescription": "Invite employees to your company by entering their email and role.",
"emailPlaceholder": "employee@email.com",
"membersPageHeading": "Employees",
"inviteMembersButton": "Invite Employees",
"invitingMembers": "Inviting employees...",
"inviteMembersSuccessMessage": "Employees invited successfully",
"inviteMembersErrorMessage": "Sorry, employees could not be invited. Please try again.",
"pendingInvitesHeading": "Pending Invites",
"pendingInvitesDescription": " Here you can manage the pending invitations to your team.",
"pendingInvitesDescription": " Here you can manage the pending invitations to your company.",
"noPendingInvites": "No pending invites found",
"loadingMembers": "Loading members...",
"loadMembersError": "Sorry, we couldn't fetch your team's members.",
"loadInvitedMembersError": "Sorry, we couldn't fetch your team's invited members.",
"loadingInvitedMembers": "Loading invited members...",
"loadingMembers": "Loading employees...",
"loadMembersError": "Sorry, we couldn't fetch your company's employees.",
"loadInvitedMembersError": "Sorry, we couldn't fetch your company's invited employees.",
"loadingInvitedMembers": "Loading invited employees...",
"invitedBadge": "Invited",
"duplicateInviteEmailError": "You have already entered this email address",
"invitingOwnAccountError": "Hey, that's your email!",
"dangerZone": "Danger Zone",
"dangerZoneSubheading": "Delete or leave your team",
"deleteTeam": "Delete Team",
"deleteTeamDescription": "This action cannot be undone. All data associated with this team will be deleted.",
"deletingTeam": "Deleting team",
"deleteTeamModalHeading": "Deleting Team",
"deletingTeamDescription": "You are about to delete the team {{ teamName }}. This action cannot be undone.",
"deleteTeamInputField": "Type the name of the team to confirm",
"leaveTeam": "Leave Team",
"leavingTeamModalHeading": "Leaving Team",
"leavingTeamModalDescription": "You are about to leave this team. You will no longer have access to it.",
"leaveTeamDescription": "Click the button below to leave the team. Remember, you will no longer have access to it and will need to be re-invited to join.",
"deleteTeamDisclaimer": "You are deleting the team {{ teamName }}. This action cannot be undone.",
"leaveTeamDisclaimer": "You are leaving the team {{ teamName }}. You will no longer have access to it.",
"deleteTeamErrorHeading": "Sorry, we couldn't delete your team.",
"leaveTeamErrorHeading": "Sorry, we couldn't leave your team.",
"searchMembersPlaceholder": "Search members",
"createTeamErrorHeading": "Sorry, we couldn't create your team.",
"createTeamErrorMessage": "We encountered an error creating your team. Please try again.",
"transferTeamErrorHeading": "Sorry, we couldn't transfer ownership of your team.",
"transferTeamErrorMessage": "We encountered an error transferring ownership of your team. Please try again.",
"updateRoleErrorHeading": "Sorry, we couldn't update the role of the selected member.",
"updateRoleErrorMessage": "We encountered an error updating the role of the selected member. Please try again.",
"dangerZoneSubheading": "Delete or leave your company",
"deleteTeam": "Delete Company",
"deleteTeamDescription": "This action cannot be undone. All data associated with this company will be deleted.",
"deletingTeam": "Deleting company",
"deleteTeamModalHeading": "Deleting Company",
"deletingTeamDescription": "You are about to delete the company {{ teamName }}. This action cannot be undone.",
"deleteTeamInputField": "Type the name of the company to confirm",
"leaveTeam": "Leave Company",
"leavingTeamModalHeading": "Leaving Company",
"leavingTeamModalDescription": "You are about to leave this company. You will no longer have access to it.",
"leaveTeamDescription": "Click the button below to leave the company. Remember, you will no longer have access to it and will need to be re-invited to join.",
"deleteTeamDisclaimer": "You are deleting the company {{ teamName }}. This action cannot be undone.",
"leaveTeamDisclaimer": "You are leaving the company {{ teamName }}. You will no longer have access to it.",
"deleteTeamErrorHeading": "Sorry, we couldn't delete your company.",
"leaveTeamErrorHeading": "Sorry, we couldn't leave your company.",
"searchMembersPlaceholder": "Search employees",
"createTeamErrorHeading": "Sorry, we couldn't create your company.",
"createTeamErrorMessage": "We encountered an error creating your company. Please try again.",
"transferTeamErrorHeading": "Sorry, we couldn't transfer ownership of your company account.",
"transferTeamErrorMessage": "We encountered an error transferring ownership of your company account. Please try again.",
"updateRoleErrorHeading": "Sorry, we couldn't update the role of the selected employee.",
"updateRoleErrorMessage": "We encountered an error updating the role of the selected employee. Please try again.",
"searchInvitations": "Search Invitations",
"updateInvitation": "Update Invitation",
"removeInvitation": "Remove Invitation",
@@ -144,20 +144,20 @@
"active": "Active",
"inviteStatus": "Status",
"inviteNotFoundOrExpired": "Invite not found or expired",
"inviteNotFoundOrExpiredDescription": "The invite you are looking for is either expired or does not exist. Please contact the team owner to renew the invite.",
"inviteNotFoundOrExpiredDescription": "The invite you are looking for is either expired or does not exist. Please contact the company HR to renew the invite.",
"backToHome": "Back to Home",
"renewInvitationDialogDescription": "You are about to renew the invitation to {{ email }}. The user will be able to join the team.",
"renewInvitationDialogDescription": "You are about to renew the invitation to {{ email }}. The user will be able to join the company.",
"renewInvitationErrorTitle": "Sorry, we couldn't renew the invitation.",
"renewInvitationErrorDescription": "We encountered an error renewing the invitation. Please try again.",
"signInWithDifferentAccount": "Sign in with a different account",
"signInWithDifferentAccountDescription": "If you wish to accept the invitation with a different account, please sign out and back in with the account you wish to use.",
"acceptInvitationHeading": "Accept Invitation to join {{accountName}}",
"acceptInvitationDescription": "You have been invited to join the team {{accountName}}. If you wish to accept the invitation, please click the button below.",
"acceptInvitationDescription": "You have been invited to join the company {{accountName}}. If you wish to accept the invitation, please click the button below.",
"continueAs": "Continue as {{email}}",
"joinTeamAccount": "Join Team",
"joiningTeam": "Joining team...",
"leaveTeamInputLabel": "Please type LEAVE to confirm leaving the team.",
"leaveTeamInputDescription": "By leaving the team, you will no longer have access to it.",
"joinTeamAccount": "Join Company",
"joiningTeam": "Joining company...",
"leaveTeamInputLabel": "Please type LEAVE to confirm leaving the company.",
"leaveTeamInputDescription": "By leaving the company, you will no longer have access to it.",
"reservedNameError": "This name is reserved. Please choose a different one.",
"specialCharactersError": "This name cannot contain special characters. Please choose a different one."
}

View File

@@ -62,6 +62,13 @@ Example of usage
--color-text-foreground -> className="[property name]-text-foreground" -> className="text-text-foreground", border-text-foreground
```
## Components
- Add the component to the `packages/ui/src/shadcn` directory.
- Replace the imports with the relative imports.
- Export the component by adding a new export to the package.json file.
- Import the component directly from the package.
read more on [makerkit doc](https://makerkit.dev/docs/next-supabase-turbo/customization/adding-shadcn-ui-components)
## Fonts
https://makerkit.dev/docs/next-supabase-turbo/customization/fonts

View File

@@ -69,7 +69,7 @@ enabled = true
# Port to use for Supabase Studio.
port = 54323
# External URL of the API server that frontend connects to.
api_url = "http://127.0.0.1"
api_url = "env(SUPABASE_API_URL)"
# OpenAI API Key to use for Supabase AI in the Supabase Studio.
openai_api_key = "env(OPENAI_API_KEY)"
@@ -80,9 +80,9 @@ enabled = true
# Port to use for the email testing server web interface.
port = 54324
# Uncomment to expose additional ports for testing user applications that send emails.
smtp_port = 54325
pop3_port = 54326
# admin_email = "admin@email.com"
# smtp_port = 54325
# pop3_port = 54326
# admin_email = ""
# sender_name = "Admin"
[storage]
@@ -152,7 +152,7 @@ token_verifications = 30
enable_signup = true
# If enabled, a user will be required to confirm any email change on both the old, and new email
# addresses. If disabled, only the new email is required to confirm.
double_confirm_changes = true
double_confirm_changes = false
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false
# If enabled, users will need to reauthenticate or have logged in recently to change their password.