Widget Devoir Finition
This commit is contained in:
parent
b3ce739153
commit
6af464eb70
@ -28,6 +28,7 @@ interface Task {
|
||||
editFrom?: string;
|
||||
type?: string;
|
||||
dependingTicketId?: number | null;
|
||||
source?: 'leantime' | 'twenty-crm';
|
||||
}
|
||||
|
||||
interface ProjectSummary {
|
||||
@ -145,7 +146,8 @@ export function Duties() {
|
||||
status: t.status,
|
||||
statusType: typeof t.status,
|
||||
})));
|
||||
leantimeTasks = leantimeData;
|
||||
// Mark tasks with source
|
||||
leantimeTasks = leantimeData.map((t: Task) => ({ ...t, source: 'leantime' as const }));
|
||||
}
|
||||
} else {
|
||||
console.warn('Failed to fetch Leantime tasks:', leantimeResponse);
|
||||
@ -156,7 +158,8 @@ export function Duties() {
|
||||
if (twentyCrmResponse.status === 'fulfilled' && twentyCrmResponse.value.ok) {
|
||||
const twentyCrmData = await twentyCrmResponse.value.json();
|
||||
if (Array.isArray(twentyCrmData)) {
|
||||
twentyCrmTasks = twentyCrmData;
|
||||
// Mark tasks with source
|
||||
twentyCrmTasks = twentyCrmData.map((t: Task) => ({ ...t, source: 'twenty-crm' as const }));
|
||||
}
|
||||
} else {
|
||||
console.warn('Failed to fetch Twenty CRM tasks:', twentyCrmResponse);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user