Widget Devoir Finition
This commit is contained in:
parent
690de0ab5b
commit
cd298af142
@ -141,6 +141,10 @@ async function getDoneStatusValues(userId: number): Promise<Set<string>> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log('[LEANTIME_TASKS] ✅ Identified done status values:', {
|
||||||
|
doneStatusValues: Array.from(doneStatusValues),
|
||||||
|
projectsCount: data.result.length,
|
||||||
|
});
|
||||||
logger.debug('[LEANTIME_TASKS] Identified done status values', {
|
logger.debug('[LEANTIME_TASKS] Identified done status values', {
|
||||||
doneStatusValues: Array.from(doneStatusValues),
|
doneStatusValues: Array.from(doneStatusValues),
|
||||||
projectsCount: data.result.length,
|
projectsCount: data.result.length,
|
||||||
@ -188,6 +192,7 @@ export async function GET(request: NextRequest) {
|
|||||||
|
|
||||||
// Get done status values dynamically from Leantime status labels
|
// Get done status values dynamically from Leantime status labels
|
||||||
const doneStatusValues = await getDoneStatusValues(userId);
|
const doneStatusValues = await getDoneStatusValues(userId);
|
||||||
|
console.log('[LEANTIME_TASKS] ✅ Done status values for filtering:', Array.from(doneStatusValues));
|
||||||
logger.debug('[LEANTIME_TASKS] Done status values identified', {
|
logger.debug('[LEANTIME_TASKS] Done status values identified', {
|
||||||
doneStatusValues: Array.from(doneStatusValues),
|
doneStatusValues: Array.from(doneStatusValues),
|
||||||
});
|
});
|
||||||
@ -318,6 +323,11 @@ export async function GET(request: NextRequest) {
|
|||||||
|
|
||||||
// Only show tasks where the user is the editor
|
// Only show tasks where the user is the editor
|
||||||
const isUserEditor = taskEditorId === currentUserId;
|
const isUserEditor = taskEditorId === currentUserId;
|
||||||
|
|
||||||
|
if (!isUserEditor) {
|
||||||
|
console.log(`[LEANTIME_TASKS] ⚠️ Task filtered - user is not editor: ID=${task.id}, EditorId=${taskEditorId}, UserId=${currentUserId}`);
|
||||||
|
}
|
||||||
|
|
||||||
return isUserEditor;
|
return isUserEditor;
|
||||||
})
|
})
|
||||||
.map((task: any) => ({
|
.map((task: any) => ({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user