fix: cycle date check wrong projectId (#3972)
This commit is contained in:
parent
42b524b16a
commit
aaad37575b
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
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;
|
status = res.status;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -117,13 +117,13 @@ 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({
|
isDateValid = await dateChecker(payload.project_id ?? projectId, {
|
||||||
start_date: payload.start_date,
|
start_date: payload.start_date,
|
||||||
end_date: payload.end_date,
|
end_date: payload.end_date,
|
||||||
cycle_id: data.id,
|
cycle_id: data.id,
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
isDateValid = await dateChecker({
|
isDateValid = await dateChecker(payload.project_id ?? projectId, {
|
||||||
start_date: payload.start_date,
|
start_date: payload.start_date,
|
||||||
end_date: payload.end_date,
|
end_date: payload.end_date,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue