Remove team account related services and actions

Removed services and actions related to team account deletion as well as updated paths within other dependent files, better reflecting their new locations. Also, added a new service titled 'AccountBillingService' for handling billing-related operations and restructured the form layout and handled translation in 'team-account-danger-zone' component.
This commit is contained in:
giancarlo
2024-03-28 15:27:56 +08:00
parent 3ac4d3b00d
commit 041efb89fb
77 changed files with 1998 additions and 1553 deletions

View File

@@ -0,0 +1,62 @@
import { TeamAccountSettingsContainer } from '@kit/team-accounts/components';
import { PageBody, PageHeader } from '@kit/ui/page';
import { Trans } from '@kit/ui/trans';
import { loadTeamWorkspace } from '~/(dashboard)/home/[account]/_lib/load-team-account-workspace';
import pathsConfig from '~/config/paths.config';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
export const generateMetadata = async () => {
const i18n = await createI18nServerInstance();
const title = i18n.t('accounts:settings:pageTitle');
return {
title,
};
};
interface Props {
params: {
account: string;
};
}
const paths = {
teamAccountSettings: pathsConfig.app.accountSettings,
};
async function TeamAccountSettingsPage(props: Props) {
const data = await loadTeamWorkspace(props.params.account);
const account = {
id: data.account.id,
name: data.account.name,
pictureUrl: data.account.picture_url,
slug: data.account.slug,
primaryOwnerUserId: data.account.primary_owner_user_id,
};
return (
<>
<PageHeader
title={<Trans i18nKey={'teams:settings.pageTitle'} />}
description={<Trans i18nKey={'teams:settings.pageDescription'} />}
/>
<PageBody>
<div
className={
'container mx-auto flex w-full max-w-4xl flex-1 flex-col items-center'
}
>
<TeamAccountSettingsContainer
userId={data.user.id}
account={account}
paths={paths}
/>
</div>
</PageBody>
</>
);
}
export default TeamAccountSettingsPage;