chore: helper function added and code refactor (#6419)
This commit is contained in:
parent
00cc338c07
commit
9ae1ce0a9a
3 changed files with 17 additions and 0 deletions
12
web/ce/components/issues/issue-layouts/issue-stats.tsx
Normal file
12
web/ce/components/issues/issue-layouts/issue-stats.tsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use client";
|
||||
|
||||
import React, { FC } from "react";
|
||||
|
||||
type Props = {
|
||||
issueId: string;
|
||||
};
|
||||
|
||||
export const IssueStats: FC<Props> = (props) => {
|
||||
const { issueId } = props;
|
||||
return <></>;
|
||||
};
|
||||
|
|
@ -22,6 +22,7 @@ import { TSelectionHelper } from "@/hooks/use-multiple-select";
|
|||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// plane web components
|
||||
import { IssueIdentifier } from "@/plane-web/components/issues";
|
||||
import { IssueStats } from "@/plane-web/components/issues/issue-layouts/issue-stats";
|
||||
// types
|
||||
import { TRenderQuickActions } from "./list-view-types";
|
||||
|
||||
|
|
@ -276,6 +277,7 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
|
|||
<div className="flex flex-shrink-0 items-center gap-2">
|
||||
{!issue?.tempId ? (
|
||||
<>
|
||||
{isEpic && <IssueStats issueId={issue.id} />}
|
||||
<IssueProperties
|
||||
className={`relative flex flex-wrap ${isSidebarCollapsed ? "md:flex-grow md:flex-shrink-0" : "lg:flex-grow lg:flex-shrink-0"} items-center gap-2 whitespace-nowrap`}
|
||||
issue={issue}
|
||||
|
|
|
|||
|
|
@ -39,3 +39,6 @@ export const debounce = (func: any, wait: number, immediate: boolean = false) =>
|
|||
export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
|
||||
|
||||
export const convertRemToPixel = (rem: number): number => rem * 0.9 * 16;
|
||||
|
||||
export const getProgress = (completed: number | undefined, total: number | undefined) =>
|
||||
total && total > 0 ? Math.round(((completed ?? 0) / total) * 100) : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue