ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: guest-доступ Operational Core

This commit is contained in:
DCCONSTRUCTIONS
2026-05-12 19:36:01 +03:00
parent d0e2f423e6
commit 87e1857f53
12 changed files with 70 additions and 42 deletions
@@ -27,6 +27,13 @@ type DNDStoreType =
| EIssuesStoreType.EPIC
| EIssuesStoreType.TEAM_PROJECT_WORK_ITEMS;
const resolveDragDropErrorMessage = (message?: string) => {
if (message === "You are not allowed to move this work item") return "У вас нет прав перемещать эту карточку";
if (message === "Work item cannot be moved to completed cycles") return "Карточку нельзя перенести в завершённый цикл";
if (message === "Failed to perform this action") return "Не удалось выполнить действие";
return message || "Не удалось выполнить действие";
};
export const useGroupIssuesDragNDrop = (
storeType: DNDStoreType,
orderBy: TIssueOrderByOptions | undefined,
@@ -63,8 +70,8 @@ export const useGroupIssuesDragNDrop = (
) => {
const errorToastProps = {
type: TOAST_TYPE.ERROR,
title: "Error!",
message: "Error while updating work item",
title: "Ошибка",
message: "Не удалось обновить карточку",
};
const moduleKey = ISSUE_FILTER_DEFAULT_DATA["module"];
const cycleKey = ISSUE_FILTER_DEFAULT_DATA["cycle"];
@@ -117,9 +124,9 @@ export const useGroupIssuesDragNDrop = (
orderBy !== "sort_order"
).catch((err) => {
setToast({
title: "Error!",
title: "Ошибка",
type: TOAST_TYPE.ERROR,
message: err?.detail ?? "Failed to perform this action",
message: resolveDragDropErrorMessage(err?.detail),
});
});
};