widget leantime refactor
This commit is contained in:
parent
334bfd04e3
commit
c66c44c91a
@ -120,12 +120,12 @@ async function fetchTwentyTasks(): Promise<TwentyTask[]> {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log raw response for debugging
|
// Log raw response for debugging (using error level to ensure visibility)
|
||||||
logger.debug('[TWENTY_CRM_TASKS] Raw GraphQL response', {
|
logger.error('[TWENTY_CRM_TASKS] Raw GraphQL response', {
|
||||||
hasData: !!data.data,
|
hasData: !!data.data,
|
||||||
dataKeys: data.data ? Object.keys(data.data) : [],
|
dataKeys: data.data ? Object.keys(data.data) : [],
|
||||||
tasksEdgesCount: data.data?.tasks?.edges?.length || 0,
|
tasksEdgesCount: data.data?.tasks?.edges?.length || 0,
|
||||||
sampleResponse: JSON.stringify(data.data).substring(0, 500),
|
sampleResponse: JSON.stringify(data.data).substring(0, 1000),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Try different possible response structures
|
// Try different possible response structures
|
||||||
@ -208,8 +208,8 @@ async function fetchTwentyTasks(): Promise<TwentyTask[]> {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// Log all tasks before filtering for debugging
|
// Log all tasks before filtering for debugging (using error level to ensure visibility)
|
||||||
logger.debug('[TWENTY_CRM_TASKS] All tasks before filtering', {
|
logger.error('[TWENTY_CRM_TASKS] All tasks before filtering', {
|
||||||
count: allTasks.length,
|
count: allTasks.length,
|
||||||
tasks: allTasks.map(t => ({
|
tasks: allTasks.map(t => ({
|
||||||
id: t.id,
|
id: t.id,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user