Web:Add reassign data in context menu.
This commit is contained in:
parent
29edcdcf76
commit
353783eb5a
@ -15,6 +15,7 @@ import InviteAgainReactSvgUrl from "PUBLIC_DIR/images/invite.again.react.svg?url
|
||||
import ChangeToEmployeeReactSvgUrl from "PUBLIC_DIR/images/change.to.employee.react.svg?url";
|
||||
import DeleteReactSvgUrl from "PUBLIC_DIR/images/delete.react.svg?url";
|
||||
import InfoReactSvgUrl from "PUBLIC_DIR/images/info.react.svg?url";
|
||||
import ReassignDataReactSvgUrl from "PUBLIC_DIR/images/reassign.data.svg?url";
|
||||
import { makeAutoObservable } from "mobx";
|
||||
import toastr from "@docspace/components/toast/toastr";
|
||||
|
||||
@ -114,6 +115,14 @@ class AccountsContextOptionsStore {
|
||||
label: t("PeopleTranslations:DisableUserButton"),
|
||||
onClick: () => this.onDisableClick(t, item),
|
||||
};
|
||||
case "reassign-data":
|
||||
return {
|
||||
id: "option_reassign-data",
|
||||
key: option,
|
||||
icon: ReassignDataReactSvgUrl,
|
||||
label: t("DataReassignmentDialog:ReassignData"),
|
||||
onClick: () => this.toggleDataReassignmentDialog(item),
|
||||
};
|
||||
case "delete-personal-data":
|
||||
return {
|
||||
id: "option_delete-personal-data",
|
||||
@ -376,6 +385,24 @@ class AccountsContextOptionsStore {
|
||||
setDeleteProfileDialogVisible(true);
|
||||
};
|
||||
|
||||
toggleDataReassignmentDialog = (item) => {
|
||||
const { setDialogData, setDataReassignmentDialogVisible, closeDialogs } =
|
||||
this.peopleStore.dialogStore;
|
||||
const { id, displayName, userName, avatar, statusType } = item;
|
||||
|
||||
closeDialogs();
|
||||
|
||||
setDialogData({
|
||||
id,
|
||||
avatar,
|
||||
displayName,
|
||||
statusType,
|
||||
userName,
|
||||
});
|
||||
|
||||
setDataReassignmentDialogVisible(true);
|
||||
};
|
||||
|
||||
onDetailsClick = (item) => {
|
||||
const { setIsVisible } = this.authStore.infoPanelStore;
|
||||
const { setBufferSelection } = this.peopleStore.selectionStore;
|
||||
|
@ -259,6 +259,10 @@ class UsersStore {
|
||||
options.push("details");
|
||||
}
|
||||
|
||||
if (isOwner || isAdmin || userRole === "manager") {
|
||||
options.push("reassign-data");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "pending":
|
||||
|
12
public/images/reassign.data.svg
Normal file
12
public/images/reassign.data.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="16/ressing_data" clip-path="url(#clip0_45352_61457)">
|
||||
<path id="Vector 36" d="M4 5L7 8L4 11" stroke="#333333" stroke-width="2" stroke-linejoin="round"/>
|
||||
<path id="Ellipse 143" d="M7.00058 8.00449C7.00058 8.00449 4.65591 7.95907 3.83349 8.00463C3.12229 8.04402 2.42244 8.33538 1.87913 8.87869C0.707554 10.0503 0.707554 11.9498 1.87913 13.1213C2.46491 13.7071 3.23268 14 4.00045 14L7.00045 14" stroke="#333333" stroke-width="2" stroke-linejoin="round"/>
|
||||
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M2 1C0.895431 1 0 1.89543 0 3V6.52812C0.59839 5.9922 1.28012 5.59681 2 5.34264V3H6.58579L9 5.41421C9.37507 5.78929 9.88378 6 10.4142 6H14V13H7.00045V15H14C15.1046 15 16 14.1046 16 13V6C16 4.89543 15.1046 4 14 4H10.4142L8 1.58579C7.62493 1.21071 7.11622 1 6.58579 1H2Z" fill="#333333"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_45352_61457">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1021 B |
Loading…
Reference in New Issue
Block a user