🚸 Make more obvious right that is granted by adding user (#50)
This commit is contained in:
committed by
ericlinagora
parent
b121f6c02b
commit
bfc2499b48
@@ -52,6 +52,11 @@
|
||||
"scenes.app.workspaces.create_company.group_data.group_main_activity.other": "Other",
|
||||
"components.drive_dropzone.uploading": "Uploading...",
|
||||
"components.user_picker.modal_no_result": "No results found",
|
||||
"components.user_picker.modal.result_add.none": "No rights",
|
||||
"components.user_picker.modal.result_add.read": "Grant read",
|
||||
"components.user_picker.modal.result_add.write": "Grant write",
|
||||
"components.user_picker.modal.result_add.manage": "Grant full",
|
||||
"components.user_picker.modal.result_add.remove": "Remove rights",
|
||||
"components.user_picker.modal_results_trucated": "First {{$1}} results of {{$2}} shown...",
|
||||
"components.users_picker.add_me": "Add me",
|
||||
"scenes.app.workspaces.create_company.invitations.title": "Configure your workspace.",
|
||||
|
||||
@@ -9,12 +9,14 @@ import { SearchIcon } from '@heroicons/react/solid';
|
||||
import { Info } from '@atoms/text';
|
||||
import Languages from '@features/global/services/languages-service';
|
||||
import _ from 'lodash';
|
||||
import { DriveFileAccessLevel } from 'app/features/drive/types';
|
||||
|
||||
|
||||
export default (props: {
|
||||
className?: string;
|
||||
onChange: (users: UserType[]) => void;
|
||||
initialUsers: UserType[];
|
||||
level: DriveFileAccessLevel;
|
||||
}) => {
|
||||
const [users, setUsers] = useState<UserType[]>(props.initialUsers);
|
||||
const { search, result, query } = useSearchUsers({ scope: 'company' });
|
||||
@@ -73,7 +75,7 @@ export default (props: {
|
||||
}}
|
||||
size="sm"
|
||||
>
|
||||
{Languages.t('general.add')}
|
||||
{Languages.t('components.user_picker.modal.result_add.' + props.level)}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+1
@@ -165,6 +165,7 @@ const UserAccessSelector = ({ id, disabled }: { id: string; disabled: boolean })
|
||||
<div className="grow">
|
||||
<SelectUsers
|
||||
className="rounded-r-none"
|
||||
level={level}
|
||||
onChange={(users: UserType[]) => {
|
||||
const id = users[0]?.id;
|
||||
update({
|
||||
|
||||
Reference in New Issue
Block a user