mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
type fixes
This commit is contained in:
parent
e03c4487d1
commit
b885f14dc4
@ -72,8 +72,8 @@ export const InboxActionHeader = () => {
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
mutateInboxIssues(
|
mutateInboxIssues(
|
||||||
(prevData) =>
|
(prevData: any) =>
|
||||||
(prevData ?? []).map((i) =>
|
(prevData ?? []).map((i: any) =>
|
||||||
i.bridge_id === inboxIssueId
|
i.bridge_id === inboxIssueId
|
||||||
? { ...i, issue_inbox: [{ ...i.issue_inbox[0], ...data }] }
|
? { ...i, issue_inbox: [{ ...i.issue_inbox[0], ...data }] }
|
||||||
: i
|
: i
|
||||||
|
@ -54,7 +54,10 @@ export const IssueActivitySection: React.FC<Props> = ({ issueId, user }) => {
|
|||||||
const handleCommentDelete = async (commentId: string) => {
|
const handleCommentDelete = async (commentId: string) => {
|
||||||
if (!workspaceSlug || !projectId || !issueId) return;
|
if (!workspaceSlug || !projectId || !issueId) return;
|
||||||
|
|
||||||
mutateIssueActivities((prevData) => prevData?.filter((p) => p.id !== commentId), false);
|
mutateIssueActivities(
|
||||||
|
(prevData: any) => prevData?.filter((p: any) => p.id !== commentId),
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
await issuesService
|
await issuesService
|
||||||
.deleteIssueComment(
|
.deleteIssueComment(
|
||||||
|
@ -85,7 +85,7 @@ export const SidebarLabelSelect: React.FC<Props> = ({
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
reset(defaultValues);
|
reset(defaultValues);
|
||||||
|
|
||||||
issueLabelMutate((prevData) => [...(prevData ?? []), res], false);
|
issueLabelMutate((prevData: any) => [...(prevData ?? []), res], false);
|
||||||
|
|
||||||
submitChanges({ labels_list: [...(issueDetails?.labels ?? []), res.id] });
|
submitChanges({ labels_list: [...(issueDetails?.labels ?? []), res.id] });
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ export const LabelsListModal: React.FC<Props> = ({ isOpen, handleClose, parent,
|
|||||||
if (!workspaceSlug || !projectId) return;
|
if (!workspaceSlug || !projectId) return;
|
||||||
|
|
||||||
mutate(
|
mutate(
|
||||||
(prevData) =>
|
(prevData: any) =>
|
||||||
prevData?.map((l) => {
|
prevData?.map((l: any) => {
|
||||||
if (l.id === label.id) return { ...l, parent: parent?.id ?? "" };
|
if (l.id === label.id) return { ...l, parent: parent?.id ?? "" };
|
||||||
|
|
||||||
return l;
|
return l;
|
||||||
|
@ -42,10 +42,10 @@ export const ModulesListGanttChartView: FC<Props> = ({ modules, mutateModules })
|
|||||||
const handleModuleUpdate = (module: IModule, payload: IBlockUpdateData) => {
|
const handleModuleUpdate = (module: IModule, payload: IBlockUpdateData) => {
|
||||||
if (!workspaceSlug || !user) return;
|
if (!workspaceSlug || !user) return;
|
||||||
|
|
||||||
mutateModules((prevData) => {
|
mutateModules((prevData: any) => {
|
||||||
if (!prevData) return prevData;
|
if (!prevData) return prevData;
|
||||||
|
|
||||||
const newList = prevData.map((p) => ({
|
const newList = prevData.map((p: any) => ({
|
||||||
...p,
|
...p,
|
||||||
...(p.id === module.id
|
...(p.id === module.id
|
||||||
? {
|
? {
|
||||||
|
@ -110,7 +110,7 @@ export const ProfileIssuesView = () => {
|
|||||||
|
|
||||||
draggedItem[groupByProperty] = destinationGroup;
|
draggedItem[groupByProperty] = destinationGroup;
|
||||||
|
|
||||||
mutateProfileIssues((prevData) => {
|
mutateProfileIssues((prevData: any) => {
|
||||||
if (!prevData) return prevData;
|
if (!prevData) return prevData;
|
||||||
|
|
||||||
const sourceGroupArray = [...groupedIssues[sourceGroup]];
|
const sourceGroupArray = [...groupedIssues[sourceGroup]];
|
||||||
|
Loading…
Reference in New Issue
Block a user