Update localization texts, add permissions check, and seed data
This commit removes the membersTabDescription, updates the deleteAccountDescription text in the localization files, and adds a condition to check permissions in account invitation component. It also includes test credentials in README and provides a significant amount of seed data for testing the database.
This commit is contained in:
@@ -76,7 +76,7 @@ export const AccountLayoutMobileNavigation = (
|
||||
</DropdownMenuTrigger>
|
||||
|
||||
<DropdownMenuContent sideOffset={10} className={'w-screen rounded-none'}>
|
||||
<OrganizationsModal />
|
||||
<TeamAccountsModal />
|
||||
|
||||
{Links}
|
||||
|
||||
@@ -130,7 +130,7 @@ function SignOutDropdownItem(
|
||||
);
|
||||
}
|
||||
|
||||
function OrganizationsModal() {
|
||||
function TeamAccountsModal() {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
@@ -143,7 +143,7 @@ function OrganizationsModal() {
|
||||
<Home className={'h-4'} />
|
||||
|
||||
<span>
|
||||
<Trans i18nKey={'common:yourOrganizations'} />
|
||||
<Trans i18nKey={'common:yourAccounts'} />
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
</DialogTrigger>
|
||||
@@ -151,7 +151,7 @@ function OrganizationsModal() {
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
<Trans i18nKey={'common:yourOrganizations'} />
|
||||
<Trans i18nKey={'common:yourAccounts'} />
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ import { getSupabaseServerComponentClient } from '@kit/supabase/server-component
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
|
||||
/**
|
||||
* Load the organization workspace data.
|
||||
* Load the account workspace data.
|
||||
* We place this function into a separate file so it can be reused in multiple places across the server components.
|
||||
*
|
||||
* This function is used in the layout component for the organization workspace.
|
||||
* This function is used in the layout component for the account workspace.
|
||||
* It is cached so that the data is only fetched once per request.
|
||||
*
|
||||
* @param accountSlug
|
||||
@@ -42,7 +42,7 @@ export const loadTeamWorkspace = cache(async (accountSlug: string) => {
|
||||
throw accountResult.error;
|
||||
}
|
||||
|
||||
// we cannot find any record for the selected organization
|
||||
// we cannot find any record for the selected account
|
||||
// so we redirect the user to the home page
|
||||
if (!accountResult.data.length) {
|
||||
return redirect(pathsConfig.app.home);
|
||||
@@ -50,7 +50,7 @@ export const loadTeamWorkspace = cache(async (accountSlug: string) => {
|
||||
|
||||
const accountData = accountResult.data[0];
|
||||
|
||||
// we cannot find any record for the selected organization
|
||||
// we cannot find any record for the selected account
|
||||
// so we redirect the user to the home page
|
||||
if (!accountData) {
|
||||
return redirect(pathsConfig.app.home);
|
||||
|
||||
Reference in New Issue
Block a user