mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: remove redundant console logs (#868)
This commit is contained in:
parent
5f20e65ca6
commit
fa5c994ddc
@ -50,7 +50,7 @@ export const EmailPasswordForm = ({ onSuccess }: any) => {
|
|||||||
if (!error?.response?.data) return;
|
if (!error?.response?.data) return;
|
||||||
Object.keys(error.response.data).forEach((key) => {
|
Object.keys(error.response.data).forEach((key) => {
|
||||||
const err = error.response.data[key];
|
const err = error.response.data[key];
|
||||||
console.log("err", err);
|
console.log(err);
|
||||||
setError(key as keyof EmailPasswordFormValues, {
|
setError(key as keyof EmailPasswordFormValues, {
|
||||||
type: "manual",
|
type: "manual",
|
||||||
message: Array.isArray(err) ? err.join(", ") : err,
|
message: Array.isArray(err) ? err.join(", ") : err,
|
||||||
|
@ -315,9 +315,6 @@ export const IssuesView: React.FC<Props> = ({
|
|||||||
cycleId as string,
|
cycleId as string,
|
||||||
bridgeId
|
bridgeId
|
||||||
)
|
)
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
});
|
});
|
||||||
@ -338,9 +335,6 @@ export const IssuesView: React.FC<Props> = ({
|
|||||||
moduleId as string,
|
moduleId as string,
|
||||||
bridgeId
|
bridgeId
|
||||||
)
|
)
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
});
|
});
|
||||||
|
@ -92,13 +92,8 @@ export const CycleDetailsSidebar: React.FC<Props> = ({
|
|||||||
|
|
||||||
cyclesService
|
cyclesService
|
||||||
.patchCycle(workspaceSlug as string, projectId as string, cycleId as string, data)
|
.patchCycle(workspaceSlug as string, projectId as string, cycleId as string, data)
|
||||||
.then((res) => {
|
.then(() => mutate(CYCLE_DETAILS(cycleId as string)))
|
||||||
console.log(res);
|
.catch((e) => console.log(e));
|
||||||
mutate(CYCLE_DETAILS(cycleId as string));
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCopyText = () => {
|
const handleCopyText = () => {
|
||||||
|
@ -94,9 +94,7 @@ export const CreateUpdateEstimateModal: React.FC<Props> = ({ handleClose, data,
|
|||||||
|
|
||||||
await estimatesService
|
await estimatesService
|
||||||
.patchEstimate(workspaceSlug as string, projectId as string, data?.id as string, payload)
|
.patchEstimate(workspaceSlug as string, projectId as string, data?.id as string, payload)
|
||||||
.then(() => {
|
.then(() => handleClose())
|
||||||
handleClose();
|
|
||||||
})
|
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "error",
|
type: "error",
|
||||||
|
@ -157,10 +157,7 @@ export const IssueActivitySection: React.FC<Props> = () => {
|
|||||||
issueId as string,
|
issueId as string,
|
||||||
commentId
|
commentId
|
||||||
)
|
)
|
||||||
.then((response) => {
|
.then(() => mutateIssueActivities());
|
||||||
mutateIssueActivities();
|
|
||||||
console.log(response);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getLabelColor = (labelId: string) => {
|
const getLabelColor = (labelId: string) => {
|
||||||
|
@ -78,8 +78,7 @@ export const CreateUpdateLabelInline = forwardRef<Ref, Props>(function CreateUpd
|
|||||||
labelToUpdate?.id ?? "",
|
labelToUpdate?.id ?? "",
|
||||||
formData
|
formData
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
console.log(res);
|
|
||||||
reset(defaultValues);
|
reset(defaultValues);
|
||||||
mutate<IIssueLabels[]>(
|
mutate<IIssueLabels[]>(
|
||||||
PROJECT_ISSUE_LABELS(projectId as string),
|
PROJECT_ISSUE_LABELS(projectId as string),
|
||||||
|
@ -61,10 +61,7 @@ export const LabelsListModal: React.FC<Props> = ({ isOpen, handleClose, parent }
|
|||||||
.patchIssueLabel(workspaceSlug as string, projectId as string, label.id, {
|
.patchIssueLabel(workspaceSlug as string, projectId as string, label.id, {
|
||||||
parent: parent?.id ?? "",
|
parent: parent?.id ?? "",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(() => mutate());
|
||||||
console.log(res);
|
|
||||||
mutate();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -87,13 +87,8 @@ export const ModuleDetailsSidebar: React.FC<Props> = ({ issues, module, isOpen,
|
|||||||
|
|
||||||
modulesService
|
modulesService
|
||||||
.patchModule(workspaceSlug as string, projectId as string, moduleId as string, data)
|
.patchModule(workspaceSlug as string, projectId as string, moduleId as string, data)
|
||||||
.then((res) => {
|
.then(() => mutate(MODULE_DETAILS(moduleId as string)))
|
||||||
console.log(res);
|
.catch((e) => console.log(e));
|
||||||
mutate(MODULE_DETAILS(moduleId as string));
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCreateLink = async (formData: ModuleLink) => {
|
const handleCreateLink = async (formData: ModuleLink) => {
|
||||||
|
@ -24,17 +24,14 @@ export const InviteMembers: React.FC<Props> = ({ setStep, workspace }) => {
|
|||||||
const onSubmit = async (formData: IUser) => {
|
const onSubmit = async (formData: IUser) => {
|
||||||
await workspaceService
|
await workspaceService
|
||||||
.inviteWorkspace(workspace.slug, formData)
|
.inviteWorkspace(workspace.slug, formData)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
console.log(res);
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "success",
|
type: "success",
|
||||||
title: "Invitations sent!",
|
title: "Invitations sent!",
|
||||||
});
|
});
|
||||||
setStep(4);
|
setStep(4);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => console.log(err));
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -58,7 +58,6 @@ export const SingleIntegration: React.FC<Props> = ({ integration }) => {
|
|||||||
url: html_url,
|
url: html_url,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
|
||||||
mutate(PROJECT_GITHUB_REPOSITORY(projectId as string));
|
mutate(PROJECT_GITHUB_REPOSITORY(projectId as string));
|
||||||
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
|
@ -51,11 +51,7 @@ export const CustomFloatingToolbar: React.FC<Props> = ({ gptOption, editorState
|
|||||||
</div>
|
</div>
|
||||||
{gptOption && (
|
{gptOption && (
|
||||||
<div className="flex items-center gap-x-1 px-2">
|
<div className="flex items-center gap-x-1 px-2">
|
||||||
<button
|
<button type="button" className="rounded py-1 px-1.5 text-xs hover:bg-gray-100">
|
||||||
type="button"
|
|
||||||
className="rounded py-1 px-1.5 text-xs hover:bg-gray-100"
|
|
||||||
onClick={() => console.log(editorState.selection.$anchor.nodeBefore)}
|
|
||||||
>
|
|
||||||
AI
|
AI
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,7 +56,6 @@ const SendWorkspaceInvitationModal: React.FC<Props> = ({
|
|||||||
await workspaceService
|
await workspaceService
|
||||||
.inviteWorkspace(workspace_slug, { emails: [formData] })
|
.inviteWorkspace(workspace_slug, { emails: [formData] })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
handleClose();
|
handleClose();
|
||||||
mutate(WORKSPACE_INVITATIONS, (prevData: any) => [
|
mutate(WORKSPACE_INVITATIONS, (prevData: any) => [
|
||||||
@ -64,9 +63,9 @@ const SendWorkspaceInvitationModal: React.FC<Props> = ({
|
|||||||
...(prevData ?? []),
|
...(prevData ?? []),
|
||||||
]);
|
]);
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
title: "Success",
|
|
||||||
type: "success",
|
type: "success",
|
||||||
message: "Member invited successfully",
|
title: "Success!",
|
||||||
|
message: "Member invited successfully.",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
|
@ -36,11 +36,7 @@ const fallbackCopyTextToClipboard = (text: string) => {
|
|||||||
// FIXME: Even though we are using this as a fallback, execCommand is deprecated 👎. We should find a better way to do this.
|
// FIXME: Even though we are using this as a fallback, execCommand is deprecated 👎. We should find a better way to do this.
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
|
// https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
|
||||||
var successful = document.execCommand("copy");
|
var successful = document.execCommand("copy");
|
||||||
var msg = successful ? "successful" : "unsuccessful";
|
} catch (err) {}
|
||||||
console.log("Fallback: Copying text command was " + msg);
|
|
||||||
} catch (err) {
|
|
||||||
console.error("Fallback: Oops, unable to copy", err);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.body.removeChild(textArea);
|
document.body.removeChild(textArea);
|
||||||
};
|
};
|
||||||
|
@ -94,11 +94,8 @@ const SingleModule: React.FC = () => {
|
|||||||
|
|
||||||
await modulesService
|
await modulesService
|
||||||
.addIssuesToModule(workspaceSlug as string, projectId as string, moduleId as string, data)
|
.addIssuesToModule(workspaceSlug as string, projectId as string, moduleId as string, data)
|
||||||
.then((res) => {
|
.then(() => mutate(MODULE_ISSUES(moduleId as string)))
|
||||||
console.log(res);
|
.catch(() =>
|
||||||
mutate(MODULE_ISSUES(moduleId as string));
|
|
||||||
})
|
|
||||||
.catch((e) =>
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "error",
|
type: "error",
|
||||||
title: "Error!",
|
title: "Error!",
|
||||||
|
@ -81,12 +81,7 @@ const LabelsSettings: NextPage = () => {
|
|||||||
mutate((prevData) => prevData?.filter((p) => p.id !== labelId), false);
|
mutate((prevData) => prevData?.filter((p) => p.id !== labelId), false);
|
||||||
issuesService
|
issuesService
|
||||||
.deleteIssueLabel(workspaceSlug as string, projectDetails.id, labelId)
|
.deleteIssueLabel(workspaceSlug as string, projectDetails.id, labelId)
|
||||||
.then((res) => {
|
.catch((e) => console.log(e));
|
||||||
console.log(res);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user