feat: init
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
chuan
2025-11-11 01:56:44 +08:00
commit bba4bb40c8
4638 changed files with 447437 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { Pen, Trash } from "lucide-react";
import { PROJECT_SETTINGS_TRACKER_ELEMENTS } from "@plane/constants";
import { Tooltip } from "@plane/propel/tooltip";
// components
import { ProIcon } from "@/components/common/pro-icon";
type TEstimateListItem = {
estimateId: string;
isAdmin: boolean;
isEstimateEnabled: boolean;
isEditable: boolean;
onEditClick?: (estimateId: string) => void;
onDeleteClick?: (estimateId: string) => void;
};
export const EstimateListItemButtons: FC<TEstimateListItem> = observer((props) => {
const { estimateId, isAdmin, isEditable, onDeleteClick } = props;
if (!isAdmin || !isEditable) return <></>;
return (
<div className="relative flex items-center gap-1">
<Tooltip
tooltipContent={
<div className="relative flex items-center gap-2">
<div>Upgrade</div>
<ProIcon className="w-3 h-3" />
</div>
}
position="top"
>
<button
className="relative flex-shrink-0 w-6 h-6 flex justify-center items-center rounded cursor-pointer transition-colors overflow-hidden hover:bg-custom-background-80"
data-ph-element={PROJECT_SETTINGS_TRACKER_ELEMENTS.ESTIMATES_LIST_ITEM}
>
<Pen size={12} />
</button>
</Tooltip>
<button
className="relative flex-shrink-0 w-6 h-6 flex justify-center items-center rounded cursor-pointer transition-colors overflow-hidden hover:bg-custom-background-80"
onClick={() => onDeleteClick && onDeleteClick(estimateId)}
data-ph-element={PROJECT_SETTINGS_TRACKER_ELEMENTS.ESTIMATES_LIST_ITEM}
>
<Trash size={12} />
</button>
</div>
);
});

View File

@@ -0,0 +1,13 @@
import type { TEstimateSystemKeys } from "@plane/types";
import { EEstimateSystem } from "@plane/types";
export const isEstimateSystemEnabled = (key: TEstimateSystemKeys) => {
switch (key) {
case EEstimateSystem.POINTS:
return true;
case EEstimateSystem.CATEGORIES:
return true;
default:
return false;
}
};

View File

@@ -0,0 +1,4 @@
export * from "./estimate-list-item-buttons";
export * from "./update";
export * from "./points";
export * from "./helper";

View File

@@ -0,0 +1 @@
export * from "./time-input";

View File

@@ -0,0 +1,8 @@
import type { FC } from "react";
export type TEstimateTimeInputProps = {
value?: number;
handleEstimateInputValue: (value: string) => void;
};
export const EstimateTimeInput: FC<TEstimateTimeInputProps> = () => <></>;

View File

@@ -0,0 +1,19 @@
"use client";
import type { FC } from "react";
import type { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types";
export type TEstimatePointDelete = {
workspaceSlug: string;
projectId: string;
estimateId: string;
estimatePointId: string;
estimatePoints: TEstimatePointsObject[];
callback: () => void;
estimatePointError?: TEstimateTypeErrorObject | undefined;
handleEstimatePointError?: (newValue: string, message: string | undefined, mode?: "add" | "delete") => void;
estimateSystem: TEstimateSystemKeys;
};
export const EstimatePointDelete: FC<TEstimatePointDelete> = () => <></>;

View File

@@ -0,0 +1 @@
export * from "./delete";

View File

@@ -0,0 +1 @@
export * from "./modal";

View File

@@ -0,0 +1,14 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
type TUpdateEstimateModal = {
workspaceSlug: string;
projectId: string;
estimateId: string | undefined;
isOpen: boolean;
handleClose: () => void;
};
export const UpdateEstimateModal: FC<TUpdateEstimateModal> = observer(() => <></>);