fixed merge conflict

This commit is contained in:
Dakshesh Jain 2022-12-02 17:23:11 +05:30
commit 5224b3da88
34 changed files with 3869 additions and 429 deletions

View File

@ -1,6 +1,10 @@
import React, { useState, useCallback, useEffect } from "react";
// next
import { useRouter } from "next/router";
// swr
import { mutate } from "swr";
// react hook form
import { SubmitHandler, useForm } from "react-hook-form";
// headless ui
import { Combobox, Dialog, Transition } from "@headlessui/react";
// hooks
@ -22,9 +26,11 @@ import CreateProjectModal from "components/project/CreateProjectModal";
import CreateUpdateIssuesModal from "components/project/issues/CreateUpdateIssueModal";
import CreateUpdateCycleModal from "components/project/cycles/CreateUpdateCyclesModal";
// types
import { IIssue } from "types";
import { IIssue, IProject, IssueResponse } from "types";
import { Button } from "ui";
import { SubmitHandler, useForm } from "react-hook-form";
import issuesServices from "lib/services/issues.services";
// fetch keys
import { PROJECTS_LIST, PROJECT_ISSUES_LIST } from "constants/fetch-keys";
type ItemType = {
name: string;
@ -33,7 +39,7 @@ type ItemType = {
};
type FormInput = {
issue: string[];
issue_ids: string[];
};
const CommandPalette: React.FC = () => {
@ -47,7 +53,7 @@ const CommandPalette: React.FC = () => {
const [isShortcutsModalOpen, setIsShortcutsModalOpen] = useState(false);
const [isCreateCycleModalOpen, setIsCreateCycleModalOpen] = useState(false);
const { issues, activeProject } = useUser();
const { activeWorkspace, activeProject, issues, cycles } = useUser();
const { toggleCollapsed } = useTheme();
@ -59,6 +65,14 @@ const CommandPalette: React.FC = () => {
: issues?.results.filter((issue) => issue.name.toLowerCase().includes(query.toLowerCase())) ??
[];
const {
register,
formState: { errors, isSubmitting },
handleSubmit,
reset,
setError,
} = useForm<FormInput>();
const quickActions = [
{
name: "Add new issue...",
@ -81,6 +95,7 @@ const CommandPalette: React.FC = () => {
const handleCommandPaletteClose = () => {
setIsPaletteOpen(false);
setQuery("");
reset();
};
const handleKeyDown = useCallback(
@ -127,21 +142,42 @@ const CommandPalette: React.FC = () => {
[toggleCollapsed, setToastAlert, router]
);
const {
register,
formState: { errors, isSubmitting },
handleSubmit,
reset,
setError,
control,
} = useForm<FormInput>();
const handleDelete: SubmitHandler<FormInput> = (data) => {
console.log("Deleting... " + JSON.stringify(data));
if (activeWorkspace && activeProject && data.issue_ids) {
issuesServices
.bulkDeleteIssues(activeWorkspace.slug, activeProject.id, data)
.then((res) => {
mutate<IssueResponse>(
PROJECT_ISSUES_LIST(activeWorkspace.slug, activeProject.id),
(prevData) => {
return {
...(prevData as IssueResponse),
count: (prevData?.results ?? []).filter(
(p) => !data.issue_ids.some((id) => p.id === id)
).length,
results: (prevData?.results ?? []).filter(
(p) => !data.issue_ids.some((id) => p.id === id)
),
};
},
false
);
})
.catch((e) => {
console.log(e);
});
}
};
const handleAddToCycle: SubmitHandler<FormInput> = (data) => {
console.log("Adding to cycle...");
if (activeWorkspace && activeProject && data.issue_ids) {
issuesServices
.bulkAddIssuesToCycle(activeWorkspace.slug, activeProject.id, "", data)
.then((res) => {})
.catch((e) => {
console.log(e);
});
}
};
useEffect(() => {
@ -254,10 +290,16 @@ const CommandPalette: React.FC = () => {
/> */}
<input
type="checkbox"
{...register("issue")}
{...register("issue_ids")}
id={`issue-${issue.id}`}
value={issue.id}
/>
<span className="ml-3 flex-auto truncate">{issue.name}</span>
<label
htmlFor={`issue-${issue.id}`}
className="ml-3 flex-auto truncate"
>
{issue.name}
</label>
{active && (
<span className="ml-3 flex-none text-gray-500">
Jump to...

View File

@ -19,6 +19,7 @@ import { LexicalToolbar } from "./toolbar";
import { initialConfig } from "./config";
// helpers
import { getValidatedValue } from "./helpers/editor";
import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
export interface RichTextEditorProps {
onChange: (state: string) => void;
@ -51,6 +52,7 @@ const RichTextEditor: FC<RichTextEditorProps> = (props) => {
contentEditable={
<ContentEditable className='className="h-[450px] outline-none py-[15px] px-2.5 resize-none overflow-hidden text-ellipsis' />
}
ErrorBoundary={LexicalErrorBoundary}
placeholder={
<div className="absolute top-[15px] left-[10px] pointer-events-none select-none text-gray-400">
Enter some text...

View File

@ -14,6 +14,7 @@ import ReadOnlyPlugin from "./plugins/read-only";
import { initialConfig } from "./config";
// helpers
import { getValidatedValue } from "./helpers/editor";
import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
export interface RichTextViewerProps {
id: string;
@ -38,6 +39,7 @@ const RichTextViewer: FC<RichTextViewerProps> = (props) => {
contentEditable={
<ContentEditable className='className="h-[450px] outline-none py-[15px] resize-none overflow-hidden text-ellipsis' />
}
ErrorBoundary={LexicalErrorBoundary}
placeholder={
<div className="absolute top-[15px] left-[10px] pointer-events-none select-none text-gray-400">
Enter some text...

View File

@ -61,9 +61,6 @@ const SingleBoard: React.FC<Props> = ({
// Collapse/Expand
const [show, setState] = useState<any>(true);
// Edit state name
const [showInput, setInput] = useState<any>(false);
if (selectedGroup === "priority")
groupTitle === "high"
? (bgColor = "#dc2626")
@ -86,10 +83,9 @@ const SingleBoard: React.FC<Props> = ({
<div className={`${!show ? "" : "h-full space-y-3 overflow-y-auto flex flex-col"}`}>
<div
className={`flex justify-between p-3 pb-0 ${
snapshot.isDragging ? "bg-indigo-50 border-indigo-100 border-b" : ""
} ${!show ? "flex-col bg-gray-50 rounded-md border" : ""}`}
!show ? "flex-col bg-gray-50 rounded-md border" : ""
}`}
>
{showInput ? null : (
<div className={`flex items-center ${!show ? "flex-col gap-2" : "gap-1"}`}>
<button
type="button"
@ -133,7 +129,6 @@ const SingleBoard: React.FC<Props> = ({
</span>
</div>
</div>
)}
<div className={`flex items-center ${!show ? "flex-col pb-2" : ""}`}>
<button
@ -141,7 +136,6 @@ const SingleBoard: React.FC<Props> = ({
className="h-7 w-7 p-1 grid place-items-center rounded hover:bg-gray-200 duration-300 outline-none"
onClick={() => {
setState(!show);
setInput(false);
}}
>
{show ? (

View File

@ -20,7 +20,7 @@ type Props = {
};
const SelectSprint: React.FC<Props> = ({ control, setIsOpen }) => {
const { sprints } = useUser();
const { cycles } = useUser();
return (
<>
@ -35,7 +35,7 @@ const SelectSprint: React.FC<Props> = ({ control, setIsOpen }) => {
<Listbox.Button className="flex items-center gap-1 hover:bg-gray-100 relative border rounded-md shadow-sm px-2 py-1 cursor-pointer focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm duration-300">
<ArrowPathIcon className="h-3 w-3" />
<span className="block truncate">
{sprints?.find((i) => i.id.toString() === value?.toString())?.name ?? "Cycle"}
{cycles?.find((i) => i.id.toString() === value?.toString())?.name ?? "Cycle"}
</span>
</Listbox.Button>
@ -48,10 +48,10 @@ const SelectSprint: React.FC<Props> = ({ control, setIsOpen }) => {
>
<Listbox.Options className="absolute z-10 mt-1 bg-white shadow-lg max-h-28 rounded-md py-1 text-xs ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none">
<div className="p-1">
{sprints?.map((sprint) => (
{cycles?.map((cycle) => (
<Listbox.Option
key={sprint.id}
value={sprint.id}
key={cycle.id}
value={cycle.id}
className={({ active }) =>
`relative cursor-pointer select-none p-2 rounded-md ${
active ? "bg-theme text-white" : "text-gray-900"
@ -61,7 +61,7 @@ const SelectSprint: React.FC<Props> = ({ control, setIsOpen }) => {
{({ active, selected }) => (
<>
<span className={`block ${selected && "font-semibold"}`}>
{sprint.name}
{cycle.name}
</span>
</>
)}

View File

@ -1,4 +1,4 @@
import React from "react";
import React, { useState } from "react";
// swr
import useSWR from "swr";
// headless ui
@ -22,6 +22,7 @@ import {
import { classNames, copyTextToClipboard } from "constants/common";
// ui
import { Input, Button, Spinner } from "ui";
import { Popover } from "@headlessui/react";
// icons
import {
UserIcon,
@ -37,6 +38,7 @@ import {
// types
import type { Control } from "react-hook-form";
import type { IIssue, IIssueLabels, IssueResponse, IState, WorkspaceMember } from "types";
import { TwitterPicker } from "react-color";
type Props = {
control: Control<IIssue, any>;
@ -48,6 +50,7 @@ const PRIORITIES = ["high", "medium", "low"];
const defaultValues: Partial<IIssueLabels> = {
name: "",
colour: "#ff0000",
};
const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDetail }) => {
@ -86,6 +89,8 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
handleSubmit,
formState: { isSubmitting },
reset,
watch,
control: controlLabel,
} = useForm({
defaultValues,
});
@ -101,17 +106,8 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
});
};
const sidebarOptions = [
{
label: "Priority",
name: "priority",
canSelectMultipleOptions: false,
icon: ChartBarIcon,
options: PRIORITIES.map((property) => ({
label: property,
value: property,
})),
},
const sidebarSections = [
[
{
label: "Status",
name: "state",
@ -122,16 +118,6 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
value: state.id,
})),
},
{
label: "Cycle",
name: "cycle",
canSelectMultipleOptions: false,
icon: ArrowPathIcon,
options: cycles?.map((cycle) => ({
label: cycle.name,
value: cycle.id,
})),
},
{
label: "Assignees",
name: "assignees_list",
@ -142,6 +128,18 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
value: person.member.id,
})),
},
{
label: "Priority",
name: "priority",
canSelectMultipleOptions: false,
icon: ChartBarIcon,
options: PRIORITIES.map((property) => ({
label: property,
value: property,
})),
},
],
[
{
label: "Blocker",
name: "blockers_list",
@ -162,6 +160,25 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
value: issue.id,
})),
},
{
label: "Due Date",
name: "target_date",
canSelectMultipleOptions: true,
icon: UserIcon,
},
],
[
{
label: "Cycle",
name: "cycle",
canSelectMultipleOptions: false,
icon: ArrowPathIcon,
options: cycles?.map((cycle) => ({
label: cycle.name,
value: cycle.id,
})),
},
],
];
const handleCycleChange = (cycleId: string) => {
@ -172,10 +189,11 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
};
return (
<div className="h-full w-full">
<div className="space-y-3">
<div className="flex flex-col gap-y-4">
<h3 className="text-lg font-medium leading-6 text-gray-900">Quick Actions</h3>
<div className="h-full w-full divide-y-2 divide-gray-100">
<div className="flex justify-between items-center pb-3">
<h4 className="text-sm font-medium">
{activeProject?.identifier}-{issueDetail?.sequence_id}
</h4>
<div className="flex items-center gap-2 flex-wrap">
<button
type="button"
@ -196,13 +214,34 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
<ClipboardDocumentIcon className="h-3.5 w-3.5" />
</button>
</div>
{sidebarOptions.map((item) => (
<div className="flex items-center justify-between gap-x-2" key={item.label}>
</div>
<div className="divide-y-2 divide-gray-100">
{sidebarSections.map((section, index) => (
<div key={index} className="py-1">
{section.map((item) => (
<div key={item.label} className="flex justify-between items-center gap-x-2 py-2">
<div className="flex items-center gap-x-2 text-sm">
<item.icon className="h-4 w-4" />
<p>{item.label}</p>
</div>
<div>
{item.name === "target_date" ? (
<Controller
control={control}
name="target_date"
render={({ field: { value, onChange } }) => (
<input
type="date"
value={value ?? new Date().toString()}
onChange={(e: any) => {
submitChanges({ target_date: e.target.value });
onChange(e.target.value);
}}
className="hover:bg-gray-100 border rounded-md shadow-sm px-2 py-1 cursor-pointer focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 text-xs duration-300"
/>
)}
/>
) : (
<Controller
control={control}
name={item.name as keyof IIssue}
@ -232,10 +271,12 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
? value
.map(
(i: any) =>
item.options?.find((option) => option.value === i)?.label
item.options?.find((option) => option.value === i)
?.label
)
.join(", ") || item.label
: item.options?.find((option) => option.value === value)?.label
: item.options?.find((option) => option.value === value)
?.label
: "None"}
</span>
<ChevronDownIcon className="h-3 w-3" />
@ -283,18 +324,64 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
</Listbox>
)}
/>
)}
</div>
</div>
))}
<div>
</div>
))}
</div>
<div className="space-y-2 pt-3">
<h5 className="text-xs font-medium">Add new label</h5>
<form className="flex items-center gap-x-2" onSubmit={handleSubmit(onSubmit)}>
<div>
<Popover className="relative">
{({ open }) => (
<>
<Popover.Button
className={`bg-white flex items-center gap-1 rounded-md p-1 outline-none focus:ring-2 focus:ring-indigo-500`}
>
{watch("colour") && watch("colour") !== "" && (
<span
className="w-6 h-6 rounded"
style={{
backgroundColor: watch("colour") ?? "green",
}}
></span>
)}
<ChevronDownIcon className="h-4 w-4" />
</Popover.Button>
<Transition
as={React.Fragment}
enter="transition ease-out duration-200"
enterFrom="opacity-0 translate-y-1"
enterTo="opacity-100 translate-y-0"
leave="transition ease-in duration-150"
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
<Popover.Panel className="absolute z-10 transform right-0 mt-1 px-2 max-w-xs sm:px-0">
<Controller
name="colour"
control={controlLabel}
render={({ field: { value, onChange } }) => (
<TwitterPicker color={value} onChange={(value) => onChange(value.hex)} />
)}
/>
</Popover.Panel>
</Transition>
</>
)}
</Popover>
</div>
<Input
id="name"
name="name"
placeholder="Add new label"
placeholder="Title"
register={register}
validations={{
required: false,
required: "This is required",
}}
autoComplete="off"
/>
@ -302,7 +389,6 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
+
</Button>
</form>
</div>
<div className="flex justify-between items-center gap-x-2">
<div className="flex items-center gap-x-2 text-sm">
<TagIcon className="w-4 h-4" />
@ -317,7 +403,7 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
as="div"
value={value}
multiple
onChange={(value) => submitChanges({ labels_list: value })}
onChange={(value: any) => submitChanges({ labels_list: value })}
className="flex-shrink-0"
>
{({ open }) => (
@ -354,7 +440,7 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
<div className="p-1">
{issueLabels ? (
issueLabels.length > 0 ? (
issueLabels.map((label: any) => (
issueLabels.map((label: IIssueLabels) => (
<Listbox.Option
key={label.id}
className={({ active, selected }) =>
@ -362,10 +448,14 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
active || selected
? "text-white bg-theme"
: "text-gray-900"
} cursor-pointer select-none relative p-2 rounded-md truncate`
} flex items-center gap-2 cursor-pointer select-none relative p-2 rounded-md truncate`
}
value={label.id}
>
<span
className="h-2 w-2 rounded-full flex-shrink-0"
style={{ backgroundColor: label.colour ?? "green" }}
></span>
{label.name}
</Listbox.Option>
))
@ -388,7 +478,6 @@ const IssueDetailSidebar: React.FC<Props> = ({ control, submitChanges, issueDeta
</div>
</div>
</div>
</div>
);
};

View File

@ -1,6 +1,7 @@
// next
import Image from "next/image";
import {
CalendarDaysIcon,
ChartBarIcon,
ChatBubbleBottomCenterTextIcon,
Squares2X2Icon,
@ -19,6 +20,7 @@ const activityIcons = {
priority: <ChartBarIcon className="h-4 w-4" />,
name: <ChatBubbleBottomCenterTextIcon className="h-4 w-4" />,
description: <ChatBubbleBottomCenterTextIcon className="h-4 w-4" />,
target_date: <CalendarDaysIcon className="h-4 w-4" />,
};
const IssueActivitySection: React.FC<Props> = ({ issueActivities, states }) => {
@ -64,23 +66,24 @@ const IssueActivitySection: React.FC<Props> = ({ issueActivities, states }) => {
</div>
)}
<div className="w-full">
<div className="w-full text-xs">
<p>
{activity.actor_detail.first_name} {activity.actor_detail.last_name}{" "}
<span className="font-medium">
{activity.actor_detail.first_name} {activity.actor_detail.last_name}
</span>{" "}
<span>{activity.verb}</span>{" "}
{activity.verb !== "created" ? (
<span>{activity.field ?? "commented"}</span>
) : (
" this issue"
)}
<span className="ml-2 text-gray-500">{timeAgo(activity.created_at)}</span>
</p>
<p className="text-xs text-gray-500">{timeAgo(activity.created_at)}</p>
<div className="w-full mt-2">
{activity.verb !== "created" && (
<div className="text-sm">
<div>
From:{" "}
<span className="text-gray-500">
<div>
<span className="text-gray-500">From: </span>
{activity.field === "state"
? activity.old_value
? addSpaceIfCamelCase(
@ -88,11 +91,9 @@ const IssueActivitySection: React.FC<Props> = ({ issueActivities, states }) => {
)
: "None"
: activity.old_value}
</span>
</div>
<div>
To:{" "}
<span className="text-gray-500">
<span className="text-gray-500">To: </span>
{activity.field === "state"
? activity.new_value
? addSpaceIfCamelCase(
@ -100,7 +101,6 @@ const IssueActivitySection: React.FC<Props> = ({ issueActivities, states }) => {
)
: "None"
: activity.new_value}
</span>
</div>
</div>
)}

View File

@ -103,6 +103,13 @@ export const ISSUE_LABELS = (workspaceSlug: string, projectId: string) =>
export const FILTER_STATE_ISSUES = (workspaceSlug: string, projectId: string, state: string) =>
`/api/workspaces/${workspaceSlug}/projects/${projectId}/issues/?state=${state}`;
export const BULK_DELETE_ISSUES = (workspaceSlug: string, projectId: string) =>
`/api/workspaces/${workspaceSlug}/projects/${projectId}/bulk-delete-issues/`;
export const BULK_ADD_ISSUES_TO_CYCLE = (
workspaceSlug: string,
projectId: string,
cycleId: string
) => `/api/workspaces/${workspaceSlug}/projects/${projectId}/cycles/${cycleId}/bulk-assign-issues/`;
// states
export const STATES_ENDPOINT = (workspaceSlug: string, projectId: string) =>

View File

@ -78,10 +78,11 @@ abstract class APIService {
});
}
delete(url: string, config = {}): Promise<any> {
delete(url: string, data?: any, config = {}): Promise<any> {
return axios({
method: "delete",
url: this.baseURL + url,
data: data,
headers: this.getAccessToken() ? this.getHeaders() : {},
...config,
});

View File

@ -8,6 +8,8 @@ import {
ISSUE_PROPERTIES_ENDPOINT,
CYCLE_DETAIL,
ISSUE_LABELS,
BULK_DELETE_ISSUES,
BULK_ADD_ISSUES_TO_CYCLE,
} from "constants/api-routes";
// services
import APIService from "lib/services/api.service";
@ -235,6 +237,31 @@ class ProjectIssuesServices extends APIService {
throw error?.response?.data;
});
}
async bulkDeleteIssues(workspace_slug: string, projectId: string, data: any): Promise<any> {
return this.delete(BULK_DELETE_ISSUES(workspace_slug, projectId), data)
.then((response) => {
return response?.data;
})
.catch((error) => {
throw error?.response?.data;
});
}
async bulkAddIssuesToCycle(
workspace_slug: string,
projectId: string,
cycleId: string,
data: any
): Promise<any> {
return this.post(BULK_ADD_ISSUES_TO_CYCLE(workspace_slug, projectId, cycleId), data)
.then((response) => {
return response?.data;
})
.catch((error) => {
throw error?.response?.data;
});
}
}
export default new ProjectIssuesServices();

View File

@ -1,5 +1,5 @@
{
"name": "plane",
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
@ -11,6 +11,9 @@
"dependencies": {
"@headlessui/react": "^1.7.3",
"@heroicons/react": "^2.0.12",
"@lexical/list": "^0.6.4",
"@lexical/react": "^0.6.4",
"@lexical/utils": "^0.6.4",
"axios": "^1.1.3",
"js-cookie": "^3.0.1",
"lexical": "^0.6.4",

View File

@ -21,11 +21,7 @@ import { Button, Spinner, EmptySpace, EmptySpaceItem } from "ui";
import { CubeIcon, PlusIcon } from "@heroicons/react/24/outline";
// types
import type { IWorkspaceInvitation } from "types";
<<<<<<< Updated upstream
import { CubeIcon, PlusIcon } from "@heroicons/react/24/outline";
import { EmptySpace, EmptySpaceItem } from "ui/EmptySpace";
=======
>>>>>>> Stashed changes
import Link from "next/link";
const OnBoard: NextPage = () => {
const router = useRouter();
@ -71,16 +67,9 @@ const OnBoard: NextPage = () => {
});
};
useEffect(() => {
<<<<<<< Updated upstream
userService.updateUserOnBoard().then((response) => {
console.log(response);
});
}, []);
=======
if (workspaces && workspaces.length === 0) setCanRedirect(false);
}, [workspaces]);
>>>>>>> Stashed changes
// useEffect(() => {
// if (workspaces && workspaces.length === 0) setCanRedirect(false);
// }, [workspaces]);
return (
<DefaultLayout
@ -100,7 +89,6 @@ const OnBoard: NextPage = () => {
<div className="w-full md:w-2/3 lg:w-1/3 p-8 rounded-lg">
{invitations && workspaces ? (
invitations.length > 0 ? (
<<<<<<< Updated upstream
<div className="mt-3 sm:mt-5">
<div className="mt-2">
<h2 className="text-2xl font-medium mb-4">Join your workspaces</h2>
@ -141,11 +129,6 @@ const OnBoard: NextPage = () => {
</div>
))}
</div>
=======
<div className="max-w-lg">
<div className="mb-4">
<CubeIcon className="h-14 w-14 text-gray-400" />
>>>>>>> Stashed changes
</div>
<h2 className="text-lg font-medium text-gray-900">Workspace Invitations</h2>
<p className="mt-1 text-sm text-gray-500">

View File

@ -53,7 +53,19 @@ const IssueDetail: NextPage = () => {
handleSubmit,
reset,
control,
} = useForm<IIssue>({});
} = useForm<IIssue>({
defaultValues: {
name: "",
description: "",
state: "",
assignees_list: [],
priority: "low",
blockers_list: [],
blocked_list: [],
target_date: new Date().toString(),
cycle: "",
},
});
const { data: issueActivities } = useSWR<any[]>(
activeWorkspace && projectId && issueId ? PROJECT_ISSUES_ACTIVITY : null,
@ -150,6 +162,7 @@ const IssueDetail: NextPage = () => {
/>
<div className="space-y-5">
<div className="flex items-center justify-between w-full">
<Breadcrumbs>
<BreadcrumbItem
title={`${activeProject?.name ?? "Project"} Issues`}
@ -161,10 +174,6 @@ const IssueDetail: NextPage = () => {
} Details`}
/>
</Breadcrumbs>
<div className="flex items-center justify-between w-full">
<h2 className="text-lg font-medium">{`${activeProject?.name ?? "Project"}/${
activeProject?.identifier ?? "..."
}-${issueDetail?.sequence_id ?? "..."}`}</h2>
<div className="flex items-center gap-x-3">
<HeaderButton
Icon={ChevronLeftIcon}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -14,6 +14,13 @@
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
font-variant-ligatures: none;
-webkit-font-variant-ligatures: none;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
/* Scrollbar style */

View File

@ -45,6 +45,7 @@ export interface IIssue {
blockers: any[];
blocked_issue_details: any[];
sprints: string | null;
cycle: string | null;
}
export interface BlockeIssue {
@ -118,8 +119,10 @@ export interface IIssueLabels {
updated_at: Date;
name: string;
description: string;
colour: string;
created_by: string;
updated_by: string;
project: string;
workspace: string;
parent: string | null;
}

View File

@ -16,5 +16,6 @@
"eslint": "^8.28.0",
"eslint-config-turbo": "latest",
"turbo": "latest"
}
},
"packageManager": "pnpm@7.15.0"
}

3103
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

2
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,2 @@
packages:
- 'apps/*'

167
yarn.lock
View File

@ -10,7 +10,7 @@
core-js-pure "^3.25.1"
regenerator-runtime "^0.13.11"
"@babel/runtime@^7.10.2", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.9", "@babel/runtime@^7.9.2":
"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.9", "@babel/runtime@^7.9.2":
version "7.20.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.6.tgz#facf4879bfed9b5326326273a64220f099b0fce3"
integrity sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==
@ -77,6 +77,159 @@
resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8"
integrity sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw==
"@lexical/clipboard@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/clipboard/-/clipboard-0.6.4.tgz#fdbe763bd0fde6f08f1f6fc2cad40d9977127941"
integrity sha512-pbJmbR1B9d3l4Ey/NrNfvLibA9CzGBamf3HanDtSEcXTDwKoSkUoPDgY9worUYdz9vnQlefntIRrOGjaDbFOxA==
dependencies:
"@lexical/html" "0.6.4"
"@lexical/list" "0.6.4"
"@lexical/selection" "0.6.4"
"@lexical/utils" "0.6.4"
"@lexical/code@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/code/-/code-0.6.4.tgz#9cdbcaf395248f8e194e3c3edde4c17f8511dd0f"
integrity sha512-fsGLvY6BgLSuKRn4/xqbZMnJSrY3u1b2htk7AKVOBxSeEENjLClMkdomVvbWF6CkGMX1c1wkP93MmeOe9VmF/g==
dependencies:
"@lexical/utils" "0.6.4"
prismjs "^1.27.0"
"@lexical/dragon@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/dragon/-/dragon-0.6.4.tgz#a69aeaf5ab89187cf2ff3d1ac92631c91a0dec0c"
integrity sha512-6M7rtmZck1CxHsKCpUaSUNIzU0zDfus77RWEKbdBAdvFROqQoOKmBJnBRjlghqDPpi5lz8pL+70eXfcfJepwlw==
"@lexical/hashtag@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/hashtag/-/hashtag-0.6.4.tgz#3d670b1c933db254a6fa027c798da0e1fa06829d"
integrity sha512-xB2/Es9PsDdtEHtcOxZk5AtqSEAkzbgadSJC7iYFssc+ltX1ZGOLqXHREZCwL8c++kUnuwr+tALL7iRuLpVouA==
dependencies:
"@lexical/utils" "0.6.4"
"@lexical/history@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/history/-/history-0.6.4.tgz#52ec268b3769663d6fd8d573018ef0a67f96d18e"
integrity sha512-NdFxuwNdnFFihHsawewy1tQTW3M0ubzxmkAHZNYnEnjTcF77NxetM24jdUbNS84aLckCJnc4uM84/B0N6P3H2Q==
dependencies:
"@lexical/utils" "0.6.4"
"@lexical/html@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/html/-/html-0.6.4.tgz#d9e26779f5dc816289643ebac2beb3f42fe47d97"
integrity sha512-NVW70XFd9Ekfe4t/FwZc2EuT2axC8wYxNQ3NI9FXnqAWvLP3F6caDUa0Qn58Gdyx8QQGKRa6GL0BFEXqaD3cxw==
dependencies:
"@lexical/selection" "0.6.4"
"@lexical/link@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/link/-/link-0.6.4.tgz#e7c1ab092d8281cc4ccf0d371e407b3aed4a2e7d"
integrity sha512-4ergNX/GOKyRFUIf2daflB1LzU96UAi4mGH3QdkvfDBo+a4eFj7GYXCf98ktilhvGlC7El4cgLVCq/BoidjS/w==
dependencies:
"@lexical/utils" "0.6.4"
"@lexical/list@0.6.4", "@lexical/list@^0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/list/-/list-0.6.4.tgz#ad1f89401bc3104130baffa260c9607240f1d30a"
integrity sha512-2WjQTABK4Zckup0YXp/UpAuCul4Ay8yTTUNEhsPpZegeYyglURugx5uYsh811+wN6acUZwFhkYRyyzxU9cDPsg==
dependencies:
"@lexical/utils" "0.6.4"
"@lexical/mark@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/mark/-/mark-0.6.4.tgz#d9c9d284a6a3f236290023b39f68647756c659cb"
integrity sha512-2Hpc21i2VmAHilnAevbuUlQijiRd6KVoIEJldx2+oK0vsXQnYnAF4T/RdZO3BStPVdSW3KnIa2TNqsmMJHqG2g==
dependencies:
"@lexical/utils" "0.6.4"
"@lexical/markdown@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/markdown/-/markdown-0.6.4.tgz#884a91028ee303e3446b817c3d8b284c9038b808"
integrity sha512-9kg+BsP4ePCztrK7UYW8a+8ad1/h/OLziJkMZkl3YAkfhJudkHoj4ljCTJZcLuXHtVXmvLZhyGZktitcJImnOg==
dependencies:
"@lexical/code" "0.6.4"
"@lexical/link" "0.6.4"
"@lexical/list" "0.6.4"
"@lexical/rich-text" "0.6.4"
"@lexical/text" "0.6.4"
"@lexical/utils" "0.6.4"
"@lexical/offset@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/offset/-/offset-0.6.4.tgz#06fdf49e8e18135e82c9925c6b168e7e012a5420"
integrity sha512-IdB1GL5yRRDQPOedXG4zT7opdjHGx+7DqLKOQwcSMWo/XprnJxIq8zpFew3XCp/nBKp+hyUsdf98vmEaG3XctQ==
"@lexical/overflow@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/overflow/-/overflow-0.6.4.tgz#0f0139a54916d3ff8e0a6fadb55804a45d2afa5e"
integrity sha512-Mdcpi2PyWTaDpEfTBAGSEX+5E0v/okSTLoIg1eDO3Q3VgGEkr5++FrJH8rVGIl6KIJeAa1WVM0vcu/W4O6y5ng==
"@lexical/plain-text@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/plain-text/-/plain-text-0.6.4.tgz#003e8f712d49e117d55a8add31516277757b384a"
integrity sha512-VB1zKqyef+3Vs8SVwob1HvCGRRfn4bypyKUyk93kk6LQDpjiGC6Go2OyuPX0EuJeFnQBYmYd3Bi205k/nVjfZA==
"@lexical/react@^0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/react/-/react-0.6.4.tgz#80e524701ec83797fd66b89d1bc04c63afc0d9fc"
integrity sha512-KAbNF/H5TzwCBFe5zuxz9ZSxj6a9ol8a2JkhACriO4HqWM0mURsxrXU8g3hySFpp4W7tdjpGSWsHLTdnaovHzw==
dependencies:
"@lexical/clipboard" "0.6.4"
"@lexical/code" "0.6.4"
"@lexical/dragon" "0.6.4"
"@lexical/hashtag" "0.6.4"
"@lexical/history" "0.6.4"
"@lexical/link" "0.6.4"
"@lexical/list" "0.6.4"
"@lexical/mark" "0.6.4"
"@lexical/markdown" "0.6.4"
"@lexical/overflow" "0.6.4"
"@lexical/plain-text" "0.6.4"
"@lexical/rich-text" "0.6.4"
"@lexical/selection" "0.6.4"
"@lexical/table" "0.6.4"
"@lexical/text" "0.6.4"
"@lexical/utils" "0.6.4"
"@lexical/yjs" "0.6.4"
react-error-boundary "^3.1.4"
"@lexical/rich-text@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/rich-text/-/rich-text-0.6.4.tgz#d00e2621d0113ed842178f505618060cde2f2b0f"
integrity sha512-GUTAEUPmSKzL1kldvdHqM9IgiAJC1qfMeDQFyUS2xwWKQnid0nVeUZXNxyBwxZLyOcyDkx5dXp9YiEO6X4x+TQ==
"@lexical/selection@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/selection/-/selection-0.6.4.tgz#2a3c8537c1e9e8bf492ccd6fbaafcfb02fea231a"
integrity sha512-dmrIQCQJOKARS7VRyE9WEKRaqP8SG9Xtzm8Bsk6+P0up1yWzlUvww+2INKr0bUUeQmI7DJxo5PX68qcoLeTAUg==
"@lexical/table@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/table/-/table-0.6.4.tgz#a07b642899e40c5981ab81b6ac541944bfef19ed"
integrity sha512-PjmRd5w5Gy4ht4i3IpQag/bsOi5V3/Fd0RQaD2gFaTFCh49NsYWrJcV6K1tH7xpO4PDJFibC5At2EiVKwhMyFA==
dependencies:
"@lexical/utils" "0.6.4"
"@lexical/text@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/text/-/text-0.6.4.tgz#49267e7a9395720b6361ca12631e0370c118c03a"
integrity sha512-gCANONCi3J2zf+yxv2CPEj2rsxpUBgQuR4TymGjsoVFsHqjRc3qHF5lNlbpWjPL5bJDSHFJySwn4/P20GNWggg==
"@lexical/utils@0.6.4", "@lexical/utils@^0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/utils/-/utils-0.6.4.tgz#7e1d79dd112efbcc048088714a3dc8e403b5aee5"
integrity sha512-JPFC+V65Eu+YTfThzV+LEGWj/QXre91Yq6c+P3VMWNfck4ZC1Enc6v7ntP9UI7FYFyM5NfwvWTzjUGEOYGajwg==
dependencies:
"@lexical/list" "0.6.4"
"@lexical/table" "0.6.4"
"@lexical/yjs@0.6.4":
version "0.6.4"
resolved "https://registry.yarnpkg.com/@lexical/yjs/-/yjs-0.6.4.tgz#0773a7a7abbd3d32bb16e7ff84d9f89ee2284996"
integrity sha512-QlhB/gIB+/3d9nP5zgnR8oJZ++14vw1VxgjBjXs1pW+32ho4ET4Wa+E0OHuVSwozEhJsC4wT1Q1C38oX+yRHdQ==
dependencies:
"@lexical/offset" "0.6.4"
"@next/env@12.2.2":
version "12.2.2"
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.2.tgz#cc1a0a445bd254499e30f632968c03192455f4cc"
@ -1913,6 +2066,11 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prismjs@^1.27.0:
version "1.29.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12"
integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==
prop-types@^15.5.10, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
@ -2116,6 +2274,13 @@ react-dropzone@^14.2.3:
file-selector "^0.6.0"
prop-types "^15.8.1"
react-error-boundary@^3.1.4:
version "3.1.4"
resolved "https://registry.yarnpkg.com/react-error-boundary/-/react-error-boundary-3.1.4.tgz#255db92b23197108757a888b01e5b729919abde0"
integrity sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==
dependencies:
"@babel/runtime" "^7.12.5"
react-hook-form@^7.38.0:
version "7.39.7"
resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.39.7.tgz#8eabf2dbb9fce5baccfa60f401f6ef99c4e17fb4"