mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
feat: cycle and module cards alerts
This commit is contained in:
parent
e4e1aa8b52
commit
df4211e54f
@ -117,8 +117,8 @@ export const DeleteCycleModal: React.FC<TConfirmCycleDeletionProps> = ({
|
|||||||
handleClose();
|
handleClose();
|
||||||
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
title: "Success",
|
|
||||||
type: "success",
|
type: "success",
|
||||||
|
title: "Success",
|
||||||
message: "Cycle deleted successfully",
|
message: "Cycle deleted successfully",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -62,8 +62,8 @@ export const CreateUpdateCycleModal: React.FC<CycleModalProps> = ({
|
|||||||
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "success",
|
type: "success",
|
||||||
title: "Success!",
|
title: "Success",
|
||||||
message: "Cycle created successfully.",
|
message: "Cycle created successfully",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@ -115,8 +115,8 @@ export const CreateUpdateCycleModal: React.FC<CycleModalProps> = ({
|
|||||||
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "success",
|
type: "success",
|
||||||
title: "Success!",
|
title: "Success",
|
||||||
message: "Cycle updated successfully.",
|
message: "Cycle updated successfully",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
@ -219,9 +219,9 @@ export const SingleCycleCard: React.FC<TSingleStatProps> = ({
|
|||||||
`${originURL}/${workspaceSlug}/projects/${projectId}/cycles/${cycle.id}`
|
`${originURL}/${workspaceSlug}/projects/${projectId}/cycles/${cycle.id}`
|
||||||
).then(() => {
|
).then(() => {
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "success",
|
type: "info",
|
||||||
title: "Link Copied!",
|
title: "Link Copied Successfully",
|
||||||
message: "Cycle link copied to clipboard.",
|
iconType: "copy",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -282,7 +282,7 @@ export const SingleCycleCard: React.FC<TSingleStatProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center justify-between mt-4">
|
<div className="mt-4 flex items-center justify-between">
|
||||||
<div className="flex items-center gap-2.5">
|
<div className="flex items-center gap-2.5">
|
||||||
{cycle.owned_by.avatar && cycle.owned_by.avatar !== "" ? (
|
{cycle.owned_by.avatar && cycle.owned_by.avatar !== "" ? (
|
||||||
<Image
|
<Image
|
||||||
@ -293,7 +293,7 @@ export const SingleCycleCard: React.FC<TSingleStatProps> = ({
|
|||||||
alt={cycle.owned_by.first_name}
|
alt={cycle.owned_by.first_name}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<span className="flex h-5 w-5 items-center justify-center rounded-full bg-brand-base capitalize bg-brand-secondary">
|
<span className="bg-brand-secondary flex h-5 w-5 items-center justify-center rounded-full bg-brand-base capitalize">
|
||||||
{cycle.owned_by.first_name.charAt(0)}
|
{cycle.owned_by.first_name.charAt(0)}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
@ -54,6 +54,11 @@ export const DeleteModuleModal: React.FC<Props> = ({ isOpen, setIsOpen, data })
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
if (moduleId) router.push(`/${workspaceSlug}/projects/${data.project}/modules`);
|
if (moduleId) router.push(`/${workspaceSlug}/projects/${data.project}/modules`);
|
||||||
handleClose();
|
handleClose();
|
||||||
|
setToastAlert({
|
||||||
|
type: "success",
|
||||||
|
title: "Success",
|
||||||
|
message: "Module deleted successfully",
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
|
@ -57,8 +57,8 @@ export const CreateUpdateModuleModal: React.FC<Props> = ({ isOpen, setIsOpen, da
|
|||||||
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "success",
|
type: "success",
|
||||||
title: "Success!",
|
title: "Success",
|
||||||
message: "Module created successfully.",
|
message: "Module created successfully",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -88,8 +88,8 @@ export const CreateUpdateModuleModal: React.FC<Props> = ({ isOpen, setIsOpen, da
|
|||||||
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "success",
|
type: "success",
|
||||||
title: "Success!",
|
title: "Success",
|
||||||
message: "Module updated successfully.",
|
message: "Module updated successfully",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
@ -104,9 +104,9 @@ export const SingleModuleCard: React.FC<Props> = ({ module, handleEditModule })
|
|||||||
`${originURL}/${workspaceSlug}/projects/${projectId}/modules/${module.id}`
|
`${originURL}/${workspaceSlug}/projects/${projectId}/modules/${module.id}`
|
||||||
).then(() => {
|
).then(() => {
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "success",
|
type: "info",
|
||||||
title: "Link Copied!",
|
title: "Link Copied Successfully",
|
||||||
message: "Module link copied to clipboard.",
|
iconType: "copy",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user