Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(console,phrases): rename tenant member role to collaborator #5618

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/connectors/connector-logto-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"access": "public"
},
"devDependencies": {
"@logto/cloud": "0.2.5-2a777a1"
"@logto/cloud": "0.2.5-c2fffa4"
}
}
2 changes: 1 addition & 1 deletion packages/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@fontsource/roboto-mono": "^5.0.0",
"@jest/types": "^29.5.0",
"@logto/app-insights": "workspace:^1.4.0",
"@logto/cloud": "0.2.5-2a777a1",
"@logto/cloud": "0.2.5-c2fffa4",
"@logto/connector-kit": "workspace:^2.1.0",
"@logto/core-kit": "workspace:^2.3.0",
"@logto/language-kit": "workspace:^1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ function EditMemberModal({ user, isOpen, onClose }: Props) {
const onSubmit = async () => {
setIsLoading(true);
try {
// TODO: @charles Uncomment later once the Cloud APIs are updated
// await cloudApi.put(`/api/tenants/:tenantId/members/:userId/roles`, {
// params: { tenantId: currentTenantId, userId: user.id },
// body: { roleName: role },
// });
await cloudApi.put(`/api/tenants/:tenantId/members/:userId/roles`, {
params: { tenantId: currentTenantId, userId: user.id },
body: { roleName: role },
});
onClose();
} finally {
setIsLoading(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OrganizationInvitationStatus } from '@logto/schemas';
import { OrganizationInvitationStatus, TenantRole } from '@logto/schemas';
import { condArray, conditional } from '@silverhand/essentials';
import { format } from 'date-fns';
import { useContext, useState } from 'react';
Expand Down Expand Up @@ -142,9 +142,12 @@ function Invitations() {
return '-';
}

return organizationRoles.map(({ id, name }) => (
return organizationRoles.map(({ id }) => (
<Tag key={id} variant="cell">
<RoleOption value={id} title={name} />
<RoleOption
value={id}
title={t(id === TenantRole.Admin ? 'admin' : 'collaborator')}
/>
</Tag>
));
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,14 @@ function InviteMemberModal({ isOpen, onClose }: Props) {
return;
}

// TODO: @charles Uncomment later once the Cloud APIs are updated
// await Promise.all(
// emails.map(async (email) =>
// cloudApi.post('/api/tenants/:tenantId/invitations', {
// params: { tenantId: currentTenantId },
// body: { invitee: email.value, roleName: role },
// })
// )
// );
await Promise.all(
emails.map(async (email) =>
cloudApi.post('/api/tenants/:tenantId/invitations', {
params: { tenantId: currentTenantId },
body: { invitee: email.value, roleName: role },
})
)
);
toast.success(t('messages.invitation_sent'));
onClose(true);
} finally {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@logto/cloud": "0.2.5-2a777a1",
"@logto/cloud": "0.2.5-c2fffa4",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/debug": "^4.1.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
const tenant_members = {
members: 'Members',
collaborators: 'Collaborators',
invitations: 'Invitations',
invite_members: 'Invite members',
user: 'User',
roles: 'Roles',
admin: 'Admin',
member: 'Member',
collaborator: 'Collaborator',
invitation_status: 'Invitation status',
invitation_sent: 'Invitation sent',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const tenant_members = {
/** UNTRANSLATED */
members: 'Members',
/** UNTRANSLATED */
collaborators: 'Collaborators',
/** UNTRANSLATED */
invitations: 'Invitations',
/** UNTRANSLATED */
invite_members: 'Invite members',
Expand All @@ -14,8 +12,6 @@ const tenant_members = {
/** UNTRANSLATED */
admin: 'Admin',
/** UNTRANSLATED */
member: 'Member',
/** UNTRANSLATED */
collaborator: 'Collaborator',
/** UNTRANSLATED */
invitation_status: 'Invitation status',
Expand Down
Loading
Loading