diff --git a/packages/console/src/pages/UserDetails/index.module.scss b/packages/console/src/pages/UserDetails/index.module.scss index 07bd8b92b..09480f8ad 100644 --- a/packages/console/src/pages/UserDetails/index.module.scss +++ b/packages/console/src/pages/UserDetails/index.module.scss @@ -39,6 +39,14 @@ color: var(--color-text); } + .suspended { + background: var(--color-error-container); + color: var(--color-text); + font: var(--font-label-medium); + padding: _.unit(0.5) _.unit(1.5); + border-radius: 10px; + } + .username { color: var(--color-text-secondary); font: var(--font-subhead-2); diff --git a/packages/console/src/pages/UserDetails/index.tsx b/packages/console/src/pages/UserDetails/index.tsx index 8e3a9553e..8d9b12ad5 100644 --- a/packages/console/src/pages/UserDetails/index.tsx +++ b/packages/console/src/pages/UserDetails/index.tsx @@ -105,6 +105,9 @@ const UserDetails = () => {
{data.name ?? '-'}
+ {data.isSuspended && ( +
{t('user_details.suspended')}
+ )} {data.username && ( <>
{data.username}
diff --git a/packages/core/src/routes/admin-user.test.ts b/packages/core/src/routes/admin-user.test.ts index 0b258a6c3..fafbf1b4d 100644 --- a/packages/core/src/routes/admin-user.test.ts +++ b/packages/core/src/routes/admin-user.test.ts @@ -347,6 +347,7 @@ describe('adminUserRoutes', () => { expect(response.status).toEqual(200); expect(response.body).toEqual({ ...mockUserResponse, + isSuspended: true, }); }); diff --git a/packages/phrases/src/locales/de/translation/admin-console/user-details.ts b/packages/phrases/src/locales/de/translation/admin-console/user-details.ts index e0643d761..acc717872 100644 --- a/packages/phrases/src/locales/de/translation/admin-console/user-details.ts +++ b/packages/phrases/src/locales/de/translation/admin-console/user-details.ts @@ -36,6 +36,7 @@ const user_details = { deletion_confirmation: 'Du entfernst die bestehende Identität. Bist du sicher, dass du das tun willst?', }, + suspended: 'Suspended', // UNTRANSLATED }; export default user_details; diff --git a/packages/phrases/src/locales/en/translation/admin-console/user-details.ts b/packages/phrases/src/locales/en/translation/admin-console/user-details.ts index 360287d42..df5f75131 100644 --- a/packages/phrases/src/locales/en/translation/admin-console/user-details.ts +++ b/packages/phrases/src/locales/en/translation/admin-console/user-details.ts @@ -34,6 +34,7 @@ const user_details = { deletion_confirmation: 'You are removing the existing identity. Are you sure you want to do that?', }, + suspended: 'Suspended', }; export default user_details; diff --git a/packages/phrases/src/locales/fr/translation/admin-console/user-details.ts b/packages/phrases/src/locales/fr/translation/admin-console/user-details.ts index 240425a65..c9372586f 100644 --- a/packages/phrases/src/locales/fr/translation/admin-console/user-details.ts +++ b/packages/phrases/src/locales/fr/translation/admin-console/user-details.ts @@ -36,6 +36,7 @@ const user_details = { deletion_confirmation: "Vous supprimez l'identité existante . Etes-vous sûr de vouloir faire ça ?", }, + suspended: 'Suspended', // UNTRANSLATED }; export default user_details; diff --git a/packages/phrases/src/locales/ko/translation/admin-console/user-details.ts b/packages/phrases/src/locales/ko/translation/admin-console/user-details.ts index 50b357da5..36385ae2b 100644 --- a/packages/phrases/src/locales/ko/translation/admin-console/user-details.ts +++ b/packages/phrases/src/locales/ko/translation/admin-console/user-details.ts @@ -33,6 +33,7 @@ const user_details = { not_connected: '이 사용자는 아직 소셜에 연동되지 않았아요.', deletion_confirmation: ' 신원을 삭제하려고 해요. 정말로 진행할까요?', }, + suspended: 'Suspended', // UNTRANSLATED }; export default user_details; diff --git a/packages/phrases/src/locales/pt-pt/translation/admin-console/user-details.ts b/packages/phrases/src/locales/pt-pt/translation/admin-console/user-details.ts index e897fde9d..e5069bed9 100644 --- a/packages/phrases/src/locales/pt-pt/translation/admin-console/user-details.ts +++ b/packages/phrases/src/locales/pt-pt/translation/admin-console/user-details.ts @@ -36,6 +36,7 @@ const user_details = { deletion_confirmation: 'Está removendo a identidade existente. Tem a certeza que deseja fazer isso?', }, + suspended: 'Suspended', // UNTRANSLATED }; export default user_details; diff --git a/packages/phrases/src/locales/tr-tr/translation/admin-console/user-details.ts b/packages/phrases/src/locales/tr-tr/translation/admin-console/user-details.ts index 6cbbbf321..86e2195c4 100644 --- a/packages/phrases/src/locales/tr-tr/translation/admin-console/user-details.ts +++ b/packages/phrases/src/locales/tr-tr/translation/admin-console/user-details.ts @@ -34,6 +34,7 @@ const user_details = { deletion_confirmation: 'Mevcut kimliğini kaldırıyorsunuz. Bunu yapmak istediğinizden emin misiniz?', }, + suspended: 'Suspended', // UNTRANSLATED }; export default user_details; diff --git a/packages/phrases/src/locales/zh-cn/translation/admin-console/user-details.ts b/packages/phrases/src/locales/zh-cn/translation/admin-console/user-details.ts index 891787724..f6be0e960 100644 --- a/packages/phrases/src/locales/zh-cn/translation/admin-console/user-details.ts +++ b/packages/phrases/src/locales/zh-cn/translation/admin-console/user-details.ts @@ -32,6 +32,7 @@ const user_details = { not_connected: '该用户还没有绑定社交帐号', deletion_confirmation: '你在正要删除现有的 身份,是否确认?', }, + suspended: '已禁用', }; export default user_details; diff --git a/packages/schemas/src/types/user.ts b/packages/schemas/src/types/user.ts index e553a9cd4..1830b9d31 100644 --- a/packages/schemas/src/types/user.ts +++ b/packages/schemas/src/types/user.ts @@ -13,6 +13,7 @@ export const userInfoSelectFields = Object.freeze([ 'lastSignInAt', 'createdAt', 'applicationId', + 'isSuspended', ] as const); export type UserInfo = Pick<