mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Merge branch 'develop' of github.com:makeplane/plane into chore/date-time-standardization
This commit is contained in:
commit
52b5a9c766
@ -46,7 +46,7 @@ export const ThemeSwitch: FC<Props> = (props) => {
|
|||||||
}
|
}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
input
|
input
|
||||||
width="w-full"
|
width="w-full z-20"
|
||||||
>
|
>
|
||||||
{THEME_OPTIONS.map((themeOption) => (
|
{THEME_OPTIONS.map((themeOption) => (
|
||||||
<CustomSelect.Option key={themeOption.value} value={themeOption}>
|
<CustomSelect.Option key={themeOption.value} value={themeOption}>
|
||||||
|
@ -273,7 +273,7 @@ export const CycleDetailsSidebar: React.FC<Props> = observer((props) => {
|
|||||||
[workspaceSlug, projectId, cycleId, issueFilters, updateFilters]
|
[workspaceSlug, projectId, cycleId, issueFilters, updateFilters]
|
||||||
);
|
);
|
||||||
|
|
||||||
const cycleStatus = cycleDetails.status.toLocaleLowerCase();
|
const cycleStatus = cycleDetails?.status.toLocaleLowerCase();
|
||||||
const isCompleted = cycleStatus === "completed";
|
const isCompleted = cycleStatus === "completed";
|
||||||
|
|
||||||
const isStartValid = new Date(`${cycleDetails?.start_date}`) <= new Date();
|
const isStartValid = new Date(`${cycleDetails?.start_date}`) <= new Date();
|
||||||
|
@ -48,7 +48,7 @@ export const ProjectLayoutRoot: React.FC = observer(() => {
|
|||||||
{Object.keys(getIssues ?? {}).length == 0 ? (
|
{Object.keys(getIssues ?? {}).length == 0 ? (
|
||||||
<ProjectEmptyState />
|
<ProjectEmptyState />
|
||||||
) : (
|
) : (
|
||||||
<div className="relative h-full w-full overflow-auto">
|
<div className="relative h-full w-full overflow-auto bg-custom-background-90">
|
||||||
{activeLayout === "list" ? (
|
{activeLayout === "list" ? (
|
||||||
<ListLayout />
|
<ListLayout />
|
||||||
) : activeLayout === "kanban" ? (
|
) : activeLayout === "kanban" ? (
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FC } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
// components
|
// components
|
||||||
import EmojiIconPicker from "components/emoji-icon-picker";
|
import EmojiIconPicker from "components/emoji-icon-picker";
|
||||||
@ -42,6 +42,7 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
|
|||||||
control,
|
control,
|
||||||
setValue,
|
setValue,
|
||||||
setError,
|
setError,
|
||||||
|
reset,
|
||||||
formState: { errors, isSubmitting },
|
formState: { errors, isSubmitting },
|
||||||
} = useForm<IProject>({
|
} = useForm<IProject>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
@ -51,6 +52,15 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!project) return;
|
||||||
|
reset({
|
||||||
|
...project,
|
||||||
|
emoji_and_icon: project.emoji ?? project.icon_prop,
|
||||||
|
workspace: (project.workspace as IWorkspace).id,
|
||||||
|
});
|
||||||
|
}, [project, reset]);
|
||||||
|
|
||||||
const handleIdentifierChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
const handleIdentifierChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const { value } = event.target;
|
const { value } = event.target;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ const GeneralSettingsPage: NextPageWithLayout = observer(() => {
|
|||||||
const { workspaceSlug, projectId } = router.query;
|
const { workspaceSlug, projectId } = router.query;
|
||||||
// api call to fetch project details
|
// api call to fetch project details
|
||||||
useSWR(
|
useSWR(
|
||||||
workspaceSlug && projectId ? "PROJECT_DETAILS" : null,
|
workspaceSlug && projectId ? `PROJECT_DETAILS_${projectId}` : null,
|
||||||
workspaceSlug && projectId
|
workspaceSlug && projectId
|
||||||
? () => projectStore.fetchProjectDetails(workspaceSlug.toString(), projectId.toString())
|
? () => projectStore.fetchProjectDetails(workspaceSlug.toString(), projectId.toString())
|
||||||
: null
|
: null
|
||||||
|
Loading…
Reference in New Issue
Block a user