mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: resolved build error
This commit is contained in:
parent
cce9ad2a14
commit
18c5b2a0a6
1
packages/types/src/index.d.ts
vendored
1
packages/types/src/index.d.ts
vendored
@ -15,7 +15,6 @@ export * from "./importer";
|
||||
export * from "./inbox";
|
||||
export * from "./analytics";
|
||||
export * from "./api_token";
|
||||
export * from "./app";
|
||||
export * from "./auth";
|
||||
export * from "./calendar";
|
||||
export * from "./instance";
|
||||
|
@ -8,6 +8,8 @@ import { EModalPosition, EModalWidth, ModalCore } from "@/components/core";
|
||||
import { EstimateCreateStageOne, EstimatePointCreateRoot } from "@/components/estimates";
|
||||
// constants
|
||||
import { EEstimateSystem, ESTIMATE_SYSTEMS } from "@/constants/estimates";
|
||||
// helpers
|
||||
import { isEstimatePointValuesRepeated } from "@/helpers/estimates";
|
||||
// hooks
|
||||
import { useProjectEstimates } from "@/hooks/store";
|
||||
|
||||
@ -30,7 +32,7 @@ export const CreateEstimateModal: FC<TCreateEstimateModal> = observer((props) =>
|
||||
const handleUpdatePoints = (newPoints: TEstimatePointsObject[] | undefined) => setEstimatePoints(newPoints);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isOpen) {
|
||||
if (isOpen) {
|
||||
setEstimateSystem(EEstimateSystem.CATEGORIES);
|
||||
setEstimatePoints(undefined);
|
||||
}
|
||||
@ -56,6 +58,12 @@ export const CreateEstimateModal: FC<TCreateEstimateModal> = observer((props) =>
|
||||
}
|
||||
|
||||
if (validatedEstimatePoints.length === estimatePoints?.length) {
|
||||
const isRepeated = isEstimatePointValuesRepeated(
|
||||
estimatePoints.map((point) => point.value),
|
||||
estimateSystem
|
||||
);
|
||||
console.log("isRepeated", isRepeated);
|
||||
if (!isRepeated) {
|
||||
const payload: IEstimateFormData = {
|
||||
estimate: {
|
||||
name: ESTIMATE_SYSTEMS[estimateSystem]?.name,
|
||||
@ -71,6 +79,8 @@ export const CreateEstimateModal: FC<TCreateEstimateModal> = observer((props) =>
|
||||
message: "Created and Enabled successfully",
|
||||
});
|
||||
handleClose();
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
|
@ -29,7 +29,7 @@ export const UpdateEstimateModal: FC<TUpdateEstimateModal> = observer((props) =>
|
||||
const [estimateSystemSwitchType, setEstimateSystemSwitchType] = useState<TEstimateSystemKeys | undefined>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isOpen) {
|
||||
if (isOpen) {
|
||||
setEstimateEditType(undefined);
|
||||
setEstimateSystemSwitchType(undefined);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { EEstimateSystem } from "@plane/types/src/enums";
|
||||
import { EEstimateSystem } from "@/constants/estimates";
|
||||
|
||||
|
||||
export const isEstimatePointValuesRepeated = (
|
||||
estimatePoints: string[],
|
||||
|
18
yarn.lock
18
yarn.lock
@ -4168,9 +4168,9 @@
|
||||
integrity sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==
|
||||
|
||||
"@types/emscripten@^1.39.6":
|
||||
version "1.39.12"
|
||||
resolved "https://registry.yarnpkg.com/@types/emscripten/-/emscripten-1.39.12.tgz#e43b4fdd4b389861897d6cbb9665532f3afd5abd"
|
||||
integrity sha512-AQImDBgudQfMqUBfrjZYilRxoHDzTBp+ejh+g1fY67eSMalwIKtBXofjpyI0JBgNpHGzxeGAR2QDya0wxW9zbA==
|
||||
version "1.39.13"
|
||||
resolved "https://registry.yarnpkg.com/@types/emscripten/-/emscripten-1.39.13.tgz#afeb1648648dc096efe57983e20387627306e2aa"
|
||||
integrity sha512-cFq+fO/isvhvmuP/+Sl4K4jtU6E23DoivtbO4r50e3odaxAiVdbfSYRDdJ4gCdxx+3aRjhphS5ZMwIH4hFy/Cw==
|
||||
|
||||
"@types/escodegen@^0.0.6":
|
||||
version "0.0.6"
|
||||
@ -5694,9 +5694,9 @@ camelcase-css@^2.0.1:
|
||||
integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
|
||||
|
||||
caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001579, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599:
|
||||
version "1.0.30001624"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001624.tgz#0ec4c8fa7a46e5b785477c70b38a56d0b10058eb"
|
||||
integrity sha512-0dWnQG87UevOCPYaOR49CBcLBwoZLpws+k6W37nLjWUhumP1Isusj0p2u+3KhjNloRWK9OKMgjBBzPujQHw4nA==
|
||||
version "1.0.30001625"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001625.tgz#ead1b155ea691d6a87938754d3cb119c24465b03"
|
||||
integrity sha512-4KE9N2gcRH+HQhpeiRZXd+1niLB/XNLAhSy4z7fI8EzcbcPoAqjNInxVHTiTwWfTIV4w096XG8OtCOCQQKPv3w==
|
||||
|
||||
capital-case@^1.0.4:
|
||||
version "1.0.4"
|
||||
@ -7735,9 +7735,9 @@ flatted@^3.2.9:
|
||||
integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
|
||||
|
||||
flow-parser@0.*:
|
||||
version "0.236.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.236.0.tgz#8e8e6c59ff7e8d196c0ed215b3919320a1c6e332"
|
||||
integrity sha512-0OEk9Gr+Yj7wjDW2KgaNYUypKau71jAfFyeLQF5iVtxqc6uJHag/MT7pmaEApf4qM7u86DkBcd4ualddYMfbLw==
|
||||
version "0.237.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.237.0.tgz#eac7f0970ffa613aa84ea026a6fca7d94b6f6136"
|
||||
integrity sha512-pLm2gF5jQ46NlcSx+RZwFeXMr5OEs8j5VvwG04QDAzE7mr4P7TsOSp7YXLdvgD4n4B56NvACgHjBIRkogCIV7A==
|
||||
|
||||
follow-redirects@^1.15.6:
|
||||
version "1.15.6"
|
||||
|
Loading…
Reference in New Issue
Block a user