fix: active cycle update payload (#6270)
This commit is contained in:
parent
ba1a314608
commit
ea78c2bceb
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { format } from "date-fns";
|
||||||
import { mutate } from "swr";
|
import { mutate } from "swr";
|
||||||
// types
|
// types
|
||||||
import type { CycleDateCheckData, ICycle, TCycleTabOptions } from "@plane/types";
|
import type { CycleDateCheckData, ICycle, TCycleTabOptions } from "@plane/types";
|
||||||
|
|
@ -131,8 +132,8 @@ export const CycleCreateUpdateModal: React.FC<CycleModalProps> = (props) => {
|
||||||
if (payload.start_date && payload.end_date) {
|
if (payload.start_date && payload.end_date) {
|
||||||
if (data?.start_date && data?.end_date)
|
if (data?.start_date && data?.end_date)
|
||||||
isDateValid = await dateChecker(payload.project_id ?? projectId, {
|
isDateValid = await dateChecker(payload.project_id ?? projectId, {
|
||||||
start_date: payload.start_date,
|
start_date: format(payload.start_date, "yyyy-MM-dd"),
|
||||||
end_date: payload.end_date,
|
end_date: format(payload.end_date, "yyyy-MM-dd"),
|
||||||
cycle_id: data.id,
|
cycle_id: data.id,
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue