mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: cycle date check wrong projectId (#3972)
This commit is contained in:
parent
42b524b16a
commit
aaad37575b
@ -96,10 +96,10 @@ export const CycleCreateUpdateModal: React.FC<CycleModalProps> = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
const dateChecker = async (payload: CycleDateCheckData) => {
|
||||
const dateChecker = async (projectId: string, payload: CycleDateCheckData) => {
|
||||
let status = false;
|
||||
|
||||
await cycleService.cycleDateCheck(workspaceSlug as string, projectId as string, payload).then((res) => {
|
||||
await cycleService.cycleDateCheck(workspaceSlug, projectId, payload).then((res) => {
|
||||
status = res.status;
|
||||
});
|
||||
|
||||
@ -117,13 +117,13 @@ export const CycleCreateUpdateModal: React.FC<CycleModalProps> = (props) => {
|
||||
|
||||
if (payload.start_date && payload.end_date) {
|
||||
if (data?.start_date && data?.end_date)
|
||||
isDateValid = await dateChecker({
|
||||
isDateValid = await dateChecker(payload.project_id ?? projectId, {
|
||||
start_date: payload.start_date,
|
||||
end_date: payload.end_date,
|
||||
cycle_id: data.id,
|
||||
});
|
||||
else
|
||||
isDateValid = await dateChecker({
|
||||
isDateValid = await dateChecker(payload.project_id ?? projectId, {
|
||||
start_date: payload.start_date,
|
||||
end_date: payload.end_date,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user