mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
refactor(console,phrases): display inviter name on tenant invitations table (#5622)
* refactor(console,phrases): display inviter name on tenant invitations table * chore: bump @logto/cloud * chore: update pnpm lockfile
This commit is contained in:
parent
caaad693bf
commit
316c11128a
20 changed files with 35 additions and 34 deletions
|
@ -48,6 +48,6 @@
|
||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@logto/cloud": "0.2.5-c2fffa4"
|
"@logto/cloud": "0.2.5-6c090b2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"@fontsource/roboto-mono": "^5.0.0",
|
"@fontsource/roboto-mono": "^5.0.0",
|
||||||
"@jest/types": "^29.5.0",
|
"@jest/types": "^29.5.0",
|
||||||
"@logto/app-insights": "workspace:^1.4.0",
|
"@logto/app-insights": "workspace:^1.4.0",
|
||||||
"@logto/cloud": "0.2.5-c2fffa4",
|
"@logto/cloud": "0.2.5-6c090b2",
|
||||||
"@logto/connector-kit": "workspace:^2.1.0",
|
"@logto/connector-kit": "workspace:^2.1.0",
|
||||||
"@logto/core-kit": "workspace:^2.3.0",
|
"@logto/core-kit": "workspace:^2.3.0",
|
||||||
"@logto/language-kit": "workspace:^1.1.0",
|
"@logto/language-kit": "workspace:^1.1.0",
|
||||||
|
|
|
@ -15,6 +15,7 @@ import UsersEmptyDark from '@/assets/images/users-empty-dark.svg';
|
||||||
import UsersEmpty from '@/assets/images/users-empty.svg';
|
import UsersEmpty from '@/assets/images/users-empty.svg';
|
||||||
import { useAuthedCloudApi } from '@/cloud/hooks/use-cloud-api';
|
import { useAuthedCloudApi } from '@/cloud/hooks/use-cloud-api';
|
||||||
import type { InvitationResponse, TenantInvitationResponse } from '@/cloud/types/router';
|
import type { InvitationResponse, TenantInvitationResponse } from '@/cloud/types/router';
|
||||||
|
import Breakable from '@/components/Breakable';
|
||||||
import { RoleOption } from '@/components/OrganizationRolesSelect';
|
import { RoleOption } from '@/components/OrganizationRolesSelect';
|
||||||
import { TenantsContext } from '@/contexts/TenantsProvider';
|
import { TenantsContext } from '@/contexts/TenantsProvider';
|
||||||
import ActionMenu, { ActionMenuItem } from '@/ds-components/ActionMenu';
|
import ActionMenu, { ActionMenuItem } from '@/ds-components/ActionMenu';
|
||||||
|
@ -129,13 +130,13 @@ function Invitations() {
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
dataIndex: 'user',
|
dataIndex: 'user',
|
||||||
colSpan: 4,
|
colSpan: 2,
|
||||||
title: t('user'),
|
title: t('user'),
|
||||||
render: ({ invitee }) => <span>{invitee}</span>,
|
render: ({ invitee }) => <span>{invitee}</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'roles',
|
dataIndex: 'roles',
|
||||||
colSpan: 4,
|
colSpan: 2,
|
||||||
title: t('roles'),
|
title: t('roles'),
|
||||||
render: ({ organizationRoles }) => {
|
render: ({ organizationRoles }) => {
|
||||||
if (organizationRoles.length === 0) {
|
if (organizationRoles.length === 0) {
|
||||||
|
@ -154,7 +155,7 @@ function Invitations() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
colSpan: 4,
|
colSpan: 2,
|
||||||
title: t('invitation_status'),
|
title: t('invitation_status'),
|
||||||
render: ({ status }) => (
|
render: ({ status }) => (
|
||||||
<Tag type="state" status={convertInvitationStatusToTagStatus(status)}>
|
<Tag type="state" status={convertInvitationStatusToTagStatus(status)}>
|
||||||
|
@ -163,14 +164,14 @@ function Invitations() {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'sentAt',
|
dataIndex: 'inviter',
|
||||||
colSpan: 4,
|
colSpan: 3,
|
||||||
title: t('invitation_sent'),
|
title: t('inviter'),
|
||||||
render: ({ createdAt }) => <span>{format(createdAt, 'MMM do, yyyy')}</span>,
|
render: ({ inviterName }) => <Breakable>{inviterName ?? '-'}</Breakable>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'expiresAt',
|
dataIndex: 'expiresAt',
|
||||||
colSpan: 4,
|
colSpan: 2,
|
||||||
title: t('expiration_date'),
|
title: t('expiration_date'),
|
||||||
render: ({ expiresAt }) => <span>{format(expiresAt, 'MMM do, yyyy')}</span>,
|
render: ({ expiresAt }) => <span>{format(expiresAt, 'MMM do, yyyy')}</span>,
|
||||||
},
|
},
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@logto/cloud": "0.2.5-c2fffa4",
|
"@logto/cloud": "0.2.5-6c090b2",
|
||||||
"@silverhand/eslint-config": "5.0.0",
|
"@silverhand/eslint-config": "5.0.0",
|
||||||
"@silverhand/ts-config": "5.0.0",
|
"@silverhand/ts-config": "5.0.0",
|
||||||
"@types/debug": "^4.1.7",
|
"@types/debug": "^4.1.7",
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ const tenant_members = {
|
||||||
admin: 'Admin',
|
admin: 'Admin',
|
||||||
collaborator: 'Collaborator',
|
collaborator: 'Collaborator',
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
title: 'Invite people to Silverhand',
|
title: 'Invite people to Silverhand',
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const tenant_members = {
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_status: 'Invitation status',
|
invitation_status: 'Invitation status',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
invitation_sent: 'Invitation sent',
|
inviter: 'Inviter',
|
||||||
/** UNTRANSLATED */
|
/** UNTRANSLATED */
|
||||||
expiration_date: 'Expiration date',
|
expiration_date: 'Expiration date',
|
||||||
invite_modal: {
|
invite_modal: {
|
||||||
|
|
|
@ -1235,8 +1235,8 @@ importers:
|
||||||
version: 3.22.4
|
version: 3.22.4
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@logto/cloud':
|
'@logto/cloud':
|
||||||
specifier: 0.2.5-c2fffa4
|
specifier: 0.2.5-6c090b2
|
||||||
version: 0.2.5-c2fffa4(zod@3.22.4)
|
version: 0.2.5-6c090b2(zod@3.22.4)
|
||||||
'@rollup/plugin-commonjs':
|
'@rollup/plugin-commonjs':
|
||||||
specifier: ^25.0.0
|
specifier: ^25.0.0
|
||||||
version: 25.0.7(rollup@4.12.0)
|
version: 25.0.7(rollup@4.12.0)
|
||||||
|
@ -2715,8 +2715,8 @@ importers:
|
||||||
specifier: workspace:^1.4.0
|
specifier: workspace:^1.4.0
|
||||||
version: link:../app-insights
|
version: link:../app-insights
|
||||||
'@logto/cloud':
|
'@logto/cloud':
|
||||||
specifier: 0.2.5-c2fffa4
|
specifier: 0.2.5-6c090b2
|
||||||
version: 0.2.5-c2fffa4(zod@3.22.4)
|
version: 0.2.5-6c090b2(zod@3.22.4)
|
||||||
'@logto/connector-kit':
|
'@logto/connector-kit':
|
||||||
specifier: workspace:^2.1.0
|
specifier: workspace:^2.1.0
|
||||||
version: link:../toolkit/connector-kit
|
version: link:../toolkit/connector-kit
|
||||||
|
@ -3202,8 +3202,8 @@ importers:
|
||||||
version: 3.22.4
|
version: 3.22.4
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@logto/cloud':
|
'@logto/cloud':
|
||||||
specifier: 0.2.5-c2fffa4
|
specifier: 0.2.5-6c090b2
|
||||||
version: 0.2.5-c2fffa4(zod@3.22.4)
|
version: 0.2.5-6c090b2(zod@3.22.4)
|
||||||
'@silverhand/eslint-config':
|
'@silverhand/eslint-config':
|
||||||
specifier: 5.0.0
|
specifier: 5.0.0
|
||||||
version: 5.0.0(eslint@8.44.0)(prettier@3.0.0)(typescript@5.3.3)
|
version: 5.0.0(eslint@8.44.0)(prettier@3.0.0)(typescript@5.3.3)
|
||||||
|
@ -7644,8 +7644,8 @@ packages:
|
||||||
jose: 5.2.2
|
jose: 5.2.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@logto/cloud@0.2.5-c2fffa4(zod@3.22.4):
|
/@logto/cloud@0.2.5-6c090b2(zod@3.22.4):
|
||||||
resolution: {integrity: sha512-l7x0LwqCCkn9rhi0U8vDN76TYWVDs0zJHQd1PVlRuaWKQp7ynxmW5885b1oN2ACsNu6YeHuTuZ/qW8OXsgw0wQ==}
|
resolution: {integrity: sha512-hyPwnd3endAlvW3/55zde2g2hUFGDbHMswh1HqIQoizBikgdI1KjZL9YF/kfTGAOr8AYHJQOYOpphWNcNQ1AZQ==}
|
||||||
engines: {node: ^20.9.0}
|
engines: {node: ^20.9.0}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@silverhand/essentials': 2.9.0
|
'@silverhand/essentials': 2.9.0
|
||||||
|
|
Loading…
Reference in a new issue