Initial commit: Plane
Some checks failed
Branch Build CE / Build Setup (push) Has been cancelled
Branch Build CE / Build-Push Admin Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Sync Repositories / sync_changes (push) Has been cancelled
Some checks failed
Branch Build CE / Build Setup (push) Has been cancelled
Branch Build CE / Build-Push Admin Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Sync Repositories / sync_changes (push) Has been cancelled
Synced from upstream: 8853637e981ed7d8a6cff32bd98e7afe20f54362
This commit is contained in:
@@ -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>
|
||||
);
|
||||
});
|
||||
13
apps/web/ce/components/estimates/helper.tsx
Normal file
13
apps/web/ce/components/estimates/helper.tsx
Normal 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;
|
||||
}
|
||||
};
|
||||
4
apps/web/ce/components/estimates/index.ts
Normal file
4
apps/web/ce/components/estimates/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from "./estimate-list-item-buttons";
|
||||
export * from "./update";
|
||||
export * from "./points";
|
||||
export * from "./helper";
|
||||
1
apps/web/ce/components/estimates/inputs/index.ts
Normal file
1
apps/web/ce/components/estimates/inputs/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./time-input";
|
||||
8
apps/web/ce/components/estimates/inputs/time-input.tsx
Normal file
8
apps/web/ce/components/estimates/inputs/time-input.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { FC } from "react";
|
||||
|
||||
export type TEstimateTimeInputProps = {
|
||||
value?: number;
|
||||
handleEstimateInputValue: (value: string) => void;
|
||||
};
|
||||
|
||||
export const EstimateTimeInput: FC<TEstimateTimeInputProps> = () => <></>;
|
||||
19
apps/web/ce/components/estimates/points/delete.tsx
Normal file
19
apps/web/ce/components/estimates/points/delete.tsx
Normal 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> = () => <></>;
|
||||
1
apps/web/ce/components/estimates/points/index.ts
Normal file
1
apps/web/ce/components/estimates/points/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./delete";
|
||||
1
apps/web/ce/components/estimates/update/index.ts
Normal file
1
apps/web/ce/components/estimates/update/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./modal";
|
||||
14
apps/web/ce/components/estimates/update/modal.tsx
Normal file
14
apps/web/ce/components/estimates/update/modal.tsx
Normal 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(() => <></>);
|
||||
Reference in New Issue
Block a user