mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: formatting files
This commit is contained in:
parent
1fa47a6c04
commit
bce69bcbe1
@ -71,7 +71,11 @@ export const setToast = (props: SetToastProps) => {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}}
|
}}
|
||||||
className={cn("w-[350px] h-[67.3px] rounded-lg border shadow-sm p-2", backgroundColorClassName, borderColorClassName)}
|
className={cn(
|
||||||
|
"w-[350px] h-[67.3px] rounded-lg border shadow-sm p-2",
|
||||||
|
backgroundColorClassName,
|
||||||
|
borderColorClassName
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<div className="w-full h-full flex items-center justify-center px-4 py-2">
|
<div className="w-full h-full flex items-center justify-center px-4 py-2">
|
||||||
{icon && <div className="flex items-center justify-center">{icon}</div>}
|
{icon && <div className="flex items-center justify-center">{icon}</div>}
|
||||||
|
@ -205,9 +205,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
className="ml-1.5 flex-shrink-0"
|
className="ml-1.5 flex-shrink-0"
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
>
|
>
|
||||||
{currentProjectCycleIds?.map((cycleId) => (
|
{currentProjectCycleIds?.map((cycleId) => <CycleDropdownOption key={cycleId} cycleId={cycleId} />)}
|
||||||
<CycleDropdownOption key={cycleId} cycleId={cycleId} />
|
|
||||||
))}
|
|
||||||
</CustomMenu>
|
</CustomMenu>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -206,9 +206,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => {
|
|||||||
className="ml-1.5 flex-shrink-0"
|
className="ml-1.5 flex-shrink-0"
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
>
|
>
|
||||||
{projectModuleIds?.map((moduleId) => (
|
{projectModuleIds?.map((moduleId) => <ModuleDropdownOption key={moduleId} moduleId={moduleId} />)}
|
||||||
<ModuleDropdownOption key={moduleId} moduleId={moduleId} />
|
|
||||||
))}
|
|
||||||
</CustomMenu>
|
</CustomMenu>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -31,13 +31,7 @@ interface IBaseCalendarRoot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const BaseCalendarRoot = observer((props: IBaseCalendarRoot) => {
|
export const BaseCalendarRoot = observer((props: IBaseCalendarRoot) => {
|
||||||
const {
|
const { QuickActions, storeType, addIssuesToView, viewId, isCompletedCycle = false } = props;
|
||||||
QuickActions,
|
|
||||||
storeType,
|
|
||||||
addIssuesToView,
|
|
||||||
viewId,
|
|
||||||
isCompletedCycle = false,
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
// router
|
// router
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -5,7 +5,15 @@ import { observer } from "mobx-react-lite";
|
|||||||
import { Spinner } from "@plane/ui";
|
import { Spinner } from "@plane/ui";
|
||||||
import { CalendarHeader, CalendarWeekDays, CalendarWeekHeader } from "components/issues";
|
import { CalendarHeader, CalendarWeekDays, CalendarWeekHeader } from "components/issues";
|
||||||
// types
|
// types
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TGroupedIssues, TIssue, TIssueKanbanFilters, TIssueMap } from "@plane/types";
|
import {
|
||||||
|
IIssueDisplayFilterOptions,
|
||||||
|
IIssueDisplayProperties,
|
||||||
|
IIssueFilterOptions,
|
||||||
|
TGroupedIssues,
|
||||||
|
TIssue,
|
||||||
|
TIssueKanbanFilters,
|
||||||
|
TIssueMap,
|
||||||
|
} from "@plane/types";
|
||||||
import { ICalendarWeek } from "./types";
|
import { ICalendarWeek } from "./types";
|
||||||
// constants
|
// constants
|
||||||
import { EIssueFilterType, EIssuesStoreType } from "constants/issue";
|
import { EIssueFilterType, EIssuesStoreType } from "constants/issue";
|
||||||
|
@ -9,7 +9,13 @@ import { Popover, Transition } from "@headlessui/react";
|
|||||||
import { Check, ChevronUp } from "lucide-react";
|
import { Check, ChevronUp } from "lucide-react";
|
||||||
import { ToggleSwitch } from "@plane/ui";
|
import { ToggleSwitch } from "@plane/ui";
|
||||||
// types
|
// types
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TCalendarLayouts, TIssueKanbanFilters } from "@plane/types";
|
import {
|
||||||
|
IIssueDisplayFilterOptions,
|
||||||
|
IIssueDisplayProperties,
|
||||||
|
IIssueFilterOptions,
|
||||||
|
TCalendarLayouts,
|
||||||
|
TIssueKanbanFilters,
|
||||||
|
} from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
import { CALENDAR_LAYOUTS } from "constants/calendar";
|
import { CALENDAR_LAYOUTS } from "constants/calendar";
|
||||||
import { EIssueFilterType } from "constants/issue";
|
import { EIssueFilterType } from "constants/issue";
|
||||||
|
@ -14,7 +14,7 @@ export const ModuleCalendarLayout: React.FC = observer(() => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { workspaceSlug, projectId, moduleId } = router.query;
|
const { workspaceSlug, projectId, moduleId } = router.query;
|
||||||
|
|
||||||
const {issues} = useIssues(EIssuesStoreType.MODULE)
|
const { issues } = useIssues(EIssuesStoreType.MODULE);
|
||||||
|
|
||||||
if (!moduleId) return null;
|
if (!moduleId) return null;
|
||||||
|
|
||||||
|
@ -5,4 +5,4 @@ import { EIssuesStoreType } from "constants/issue";
|
|||||||
// components
|
// components
|
||||||
import { BaseGanttRoot } from "./base-gantt-root";
|
import { BaseGanttRoot } from "./base-gantt-root";
|
||||||
|
|
||||||
export const GanttLayout: React.FC = observer(() =>( <BaseGanttRoot storeType={EIssuesStoreType.PROJECT} />));
|
export const GanttLayout: React.FC = observer(() => <BaseGanttRoot storeType={EIssuesStoreType.PROJECT} />);
|
||||||
|
@ -198,13 +198,9 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBas
|
|||||||
let kanbanFilters = issuesFilter?.issueFilters?.kanbanFilters?.[toggle] || [];
|
let kanbanFilters = issuesFilter?.issueFilters?.kanbanFilters?.[toggle] || [];
|
||||||
if (kanbanFilters.includes(value)) kanbanFilters = kanbanFilters.filter((_value) => _value != value);
|
if (kanbanFilters.includes(value)) kanbanFilters = kanbanFilters.filter((_value) => _value != value);
|
||||||
else kanbanFilters.push(value);
|
else kanbanFilters.push(value);
|
||||||
updateFilters(
|
updateFilters(projectId.toString(), EIssueFilterType.KANBAN_FILTERS, {
|
||||||
projectId.toString(),
|
|
||||||
EIssueFilterType.KANBAN_FILTERS,
|
|
||||||
{
|
|
||||||
[toggle]: kanbanFilters,
|
[toggle]: kanbanFilters,
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { EIssuesStoreType } from "constants/issue";
|
|||||||
import { EUserProjectRoles } from "constants/project";
|
import { EUserProjectRoles } from "constants/project";
|
||||||
import { useIssues, useUser } from "hooks/store";
|
import { useIssues, useUser } from "hooks/store";
|
||||||
|
|
||||||
import { TIssue } from "@plane/types"
|
import { TIssue } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
import { List } from "./default";
|
import { List } from "./default";
|
||||||
import { IQuickActionProps } from "./list-view-types";
|
import { IQuickActionProps } from "./list-view-types";
|
||||||
|
@ -770,4 +770,3 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -142,9 +142,8 @@ export const SendProjectInvitationModal: React.FC<Props> = observer((props) => {
|
|||||||
if (!memberDetails?.member) return;
|
if (!memberDetails?.member) return;
|
||||||
return {
|
return {
|
||||||
value: `${memberDetails?.member.id}`,
|
value: `${memberDetails?.member.id}`,
|
||||||
query: `${memberDetails?.member.first_name} ${
|
query: `${memberDetails?.member.first_name} ${memberDetails?.member
|
||||||
memberDetails?.member.last_name
|
.last_name} ${memberDetails?.member.display_name.toLowerCase()}`,
|
||||||
} ${memberDetails?.member.display_name.toLowerCase()}`,
|
|
||||||
content: (
|
content: (
|
||||||
<div className="flex w-full items-center gap-2">
|
<div className="flex w-full items-center gap-2">
|
||||||
<div className="flex-shrink-0 pt-0.5">
|
<div className="flex-shrink-0 pt-0.5">
|
||||||
|
@ -41,13 +41,16 @@ export const groupReactions: (reactions: any[], key: string) => { [key: string]:
|
|||||||
reactions: any,
|
reactions: any,
|
||||||
key: string
|
key: string
|
||||||
) => {
|
) => {
|
||||||
const groupedReactions = reactions.reduce((acc: any, reaction: any) => {
|
const groupedReactions = reactions.reduce(
|
||||||
|
(acc: any, reaction: any) => {
|
||||||
if (!acc[reaction[key]]) {
|
if (!acc[reaction[key]]) {
|
||||||
acc[reaction[key]] = [];
|
acc[reaction[key]] = [];
|
||||||
}
|
}
|
||||||
acc[reaction[key]].push(reaction);
|
acc[reaction[key]].push(reaction);
|
||||||
return acc;
|
return acc;
|
||||||
}, {} as { [key: string]: any[] });
|
},
|
||||||
|
{} as { [key: string]: any[] }
|
||||||
|
);
|
||||||
|
|
||||||
return groupedReactions;
|
return groupedReactions;
|
||||||
};
|
};
|
||||||
|
@ -172,11 +172,7 @@ export const renderIssueBlocksStructure = (blocks: TIssue[]): IGanttBlock[] =>
|
|||||||
target_date: block.target_date ? new Date(block.target_date) : null,
|
target_date: block.target_date ? new Date(block.target_date) : null,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
export function getChangedIssuefields(formData: Partial<TIssue>, dirtyFields: { [key: string]: boolean | undefined }) {
|
||||||
export function getChangedIssuefields(
|
|
||||||
formData: Partial<TIssue>,
|
|
||||||
dirtyFields: { [key: string]: boolean | undefined }
|
|
||||||
) {
|
|
||||||
const changedFields: Partial<TIssue> = {};
|
const changedFields: Partial<TIssue> = {};
|
||||||
|
|
||||||
const dirtyFieldKeys = Object.keys(dirtyFields) as (keyof TIssue)[];
|
const dirtyFieldKeys = Object.keys(dirtyFields) as (keyof TIssue)[];
|
||||||
|
@ -21,9 +21,7 @@ export const ProfileSettingsLayout: FC<IProfileSettingsLayout> = (props) => {
|
|||||||
<ProfileLayoutSidebar />
|
<ProfileLayoutSidebar />
|
||||||
<main className="relative flex h-full w-full flex-col overflow-hidden bg-custom-background-100">
|
<main className="relative flex h-full w-full flex-col overflow-hidden bg-custom-background-100">
|
||||||
{header}
|
{header}
|
||||||
<div className="h-full w-full overflow-x-hidden overflow-y-scroll">
|
<div className="h-full w-full overflow-x-hidden overflow-y-scroll">{children}</div>
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</UserAuthWrapper>
|
</UserAuthWrapper>
|
||||||
|
@ -69,9 +69,10 @@ const ArchivedIssueDetailsPage: NextPageWithLayout = observer(() => {
|
|||||||
title: "Success",
|
title: "Success",
|
||||||
message:
|
message:
|
||||||
issue &&
|
issue &&
|
||||||
`${getProjectById(issue.project_id)?.identifier}-${
|
`${getProjectById(issue.project_id)
|
||||||
issue?.sequence_id
|
?.identifier}-${issue?.sequence_id} is restored successfully under the project ${getProjectById(
|
||||||
} is restored successfully under the project ${getProjectById(issue.project_id)?.name}`,
|
issue.project_id
|
||||||
|
)?.name}`,
|
||||||
});
|
});
|
||||||
router.push(`/${workspaceSlug}/projects/${projectId}/issues/${archivedIssueId}`);
|
router.push(`/${workspaceSlug}/projects/${projectId}/issues/${archivedIssueId}`);
|
||||||
})
|
})
|
||||||
|
@ -127,9 +127,8 @@ export class WorkspaceMemberStore implements IWorkspaceMemberStore {
|
|||||||
const searchedWorkspaceMemberIds = workspaceMemberIds?.filter((userId) => {
|
const searchedWorkspaceMemberIds = workspaceMemberIds?.filter((userId) => {
|
||||||
const memberDetails = this.getWorkspaceMemberDetails(userId);
|
const memberDetails = this.getWorkspaceMemberDetails(userId);
|
||||||
if (!memberDetails) return false;
|
if (!memberDetails) return false;
|
||||||
const memberSearchQuery = `${memberDetails.member.first_name} ${memberDetails.member.last_name} ${
|
const memberSearchQuery = `${memberDetails.member.first_name} ${memberDetails.member.last_name} ${memberDetails
|
||||||
memberDetails.member?.display_name
|
.member?.display_name} ${memberDetails.member.email ?? ""}`;
|
||||||
} ${memberDetails.member.email ?? ""}`;
|
|
||||||
return memberSearchQuery.toLowerCase()?.includes(searchQuery.toLowerCase());
|
return memberSearchQuery.toLowerCase()?.includes(searchQuery.toLowerCase());
|
||||||
});
|
});
|
||||||
return searchedWorkspaceMemberIds;
|
return searchedWorkspaceMemberIds;
|
||||||
|
Loading…
Reference in New Issue
Block a user