widget leantime refactor

This commit is contained in:
alma 2026-01-15 22:49:52 +01:00
parent 334bfd04e3
commit c66c44c91a

View File

@ -120,12 +120,12 @@ async function fetchTwentyTasks(): Promise<TwentyTask[]> {
return [];
}
// Log raw response for debugging
logger.debug('[TWENTY_CRM_TASKS] Raw GraphQL response', {
// Log raw response for debugging (using error level to ensure visibility)
logger.error('[TWENTY_CRM_TASKS] Raw GraphQL response', {
hasData: !!data.data,
dataKeys: data.data ? Object.keys(data.data) : [],
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
@ -208,8 +208,8 @@ async function fetchTwentyTasks(): Promise<TwentyTask[]> {
};
});
// Log all tasks before filtering for debugging
logger.debug('[TWENTY_CRM_TASKS] All tasks before filtering', {
// Log all tasks before filtering for debugging (using error level to ensure visibility)
logger.error('[TWENTY_CRM_TASKS] All tasks before filtering', {
count: allTasks.length,
tasks: allTasks.map(t => ({
id: t.id,