forked from github/plane
chore: bug fixes and improvement (#3434)
* fix: peek overview issue delete bug * chore: create cycle workflow improvement * chore: project setting improvement
This commit is contained in:
parent
2986769f28
commit
bb50df0dff
@ -5,10 +5,11 @@ import { CycleService } from "services/cycle.service";
|
||||
// hooks
|
||||
import { useApplication, useCycle } from "hooks/store";
|
||||
import useToast from "hooks/use-toast";
|
||||
import useLocalStorage from "hooks/use-local-storage";
|
||||
// components
|
||||
import { CycleForm } from "components/cycles";
|
||||
// types
|
||||
import type { CycleDateCheckData, ICycle } from "@plane/types";
|
||||
import type { CycleDateCheckData, ICycle, TCycleView } from "@plane/types";
|
||||
|
||||
type CycleModalProps = {
|
||||
isOpen: boolean;
|
||||
@ -33,6 +34,8 @@ export const CycleCreateUpdateModal: React.FC<CycleModalProps> = (props) => {
|
||||
// toast alert
|
||||
const { setToastAlert } = useToast();
|
||||
|
||||
const { setValue: setCycleTab } = useLocalStorage<TCycleView>("cycle_tab", "active");
|
||||
|
||||
const handleCreateCycle = async (payload: Partial<ICycle>) => {
|
||||
if (!workspaceSlug || !projectId) return;
|
||||
|
||||
@ -117,7 +120,11 @@ export const CycleCreateUpdateModal: React.FC<CycleModalProps> = (props) => {
|
||||
|
||||
if (isDateValid) {
|
||||
if (data) await handleUpdateCycle(data.id, payload);
|
||||
else await handleCreateCycle(payload);
|
||||
else {
|
||||
await handleCreateCycle(payload).then(() => {
|
||||
setCycleTab("all");
|
||||
});
|
||||
}
|
||||
handleClose();
|
||||
} else
|
||||
setToastAlert({
|
||||
|
@ -47,11 +47,6 @@ export const DeleteIssueModal: React.FC<Props> = (props) => {
|
||||
if (onSubmit)
|
||||
await onSubmit()
|
||||
.then(() => {
|
||||
setToastAlert({
|
||||
title: "Success",
|
||||
type: "success",
|
||||
message: "Issue deleted successfully",
|
||||
});
|
||||
onClose();
|
||||
})
|
||||
.catch(() => {
|
||||
|
@ -109,7 +109,10 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
||||
{issue && !is_archived && (
|
||||
<DeleteIssueModal
|
||||
isOpen={isDeleteIssueModalOpen}
|
||||
handleClose={() => toggleDeleteIssueModal(false)}
|
||||
handleClose={() => {
|
||||
toggleDeleteIssueModal(false);
|
||||
removeRoutePeekId();
|
||||
}}
|
||||
data={issue}
|
||||
onSubmit={() => issueOperations.remove(workspaceSlug, projectId, issueId)}
|
||||
/>
|
||||
|
@ -7,6 +7,8 @@ import useToast from "hooks/use-toast";
|
||||
import EmojiIconPicker from "components/emoji-icon-picker";
|
||||
import { ImagePickerPopover } from "components/core";
|
||||
import { Button, CustomSelect, Input, TextArea } from "@plane/ui";
|
||||
// icons
|
||||
import { Lock } from "lucide-react";
|
||||
// types
|
||||
import { IProject, IWorkspace } from "@plane/types";
|
||||
// helpers
|
||||
@ -169,8 +171,10 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
|
||||
<div className="flex flex-col gap-1 truncate text-white">
|
||||
<span className="truncate text-lg font-semibold">{watch("name")}</span>
|
||||
<span className="flex items-center gap-2 text-sm">
|
||||
<span>
|
||||
{watch("identifier")} . {currentNetwork?.label}
|
||||
<span>{watch("identifier")} .</span>
|
||||
<span className="flex items-center gap-1.5">
|
||||
{project.network === 0 && <Lock className="h-2.5 w-2.5 text-white " />}
|
||||
{currentNetwork?.label}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user