Widget Devoir Finition
This commit is contained in:
parent
db361a92b8
commit
b9177bc2f4
@ -224,7 +224,7 @@ export async function GET(request: NextRequest) {
|
||||
if (taskStatus !== null && taskStatus !== undefined) {
|
||||
const statusNum = typeof taskStatus === 'string' ? parseInt(taskStatus, 10) : taskStatus;
|
||||
const statusStr = typeof taskStatus === 'string' ? taskStatus.trim().toLowerCase() : String(taskStatus).trim().toLowerCase();
|
||||
const isDone = statusNum === 3 || statusNum === 5 || statusStr === '3' || statusStr === '5' || statusStr === 'done';
|
||||
const isDone = statusNum === 0 || statusNum === 3 || statusNum === 5 || statusStr === '0' || statusStr === '3' || statusStr === '5' || statusStr === 'done';
|
||||
|
||||
if (isDone) {
|
||||
logger.debug('[LEANTIME_TASKS] Filtering out done task', {
|
||||
|
||||
@ -193,14 +193,16 @@ export function Duties() {
|
||||
const doneTasks = leantimeStatusDetails.filter(t => t.isDone);
|
||||
|
||||
// Always log status breakdown for debugging
|
||||
const statusGroupsArray = Object.keys(statusGroups).map(key => ({
|
||||
status: key,
|
||||
count: statusGroups[key].count,
|
||||
sample: statusGroups[key].tasks,
|
||||
}));
|
||||
console.log('[Devoirs Widget] 📊 Status Breakdown:', {
|
||||
totalTasks: leantimeTasks.length,
|
||||
statusGroups: Object.keys(statusGroups).map(key => ({
|
||||
status: key,
|
||||
count: statusGroups[key].count,
|
||||
sample: statusGroups[key].tasks,
|
||||
})),
|
||||
statusGroups: statusGroupsArray,
|
||||
doneTasksCount: doneTasks.length,
|
||||
allStatuses: leantimeStatusDetails.map(t => `${t.id}:${t.status}(${t.statusType})`),
|
||||
});
|
||||
|
||||
if (doneTasks.length > 0) {
|
||||
@ -246,7 +248,7 @@ export function Duties() {
|
||||
} else {
|
||||
const taskStatus = typeof rawStatus === 'string' ? parseInt(rawStatus, 10) : rawStatus;
|
||||
const statusStr = typeof rawStatus === 'string' ? rawStatus.toLowerCase() : String(rawStatus).toLowerCase();
|
||||
if (taskStatus === 3 || taskStatus === 5 || statusStr === '3' || statusStr === '5' || statusStr === 'done') {
|
||||
if (taskStatus === 0 || taskStatus === 3 || taskStatus === 5 || statusStr === '0' || statusStr === '3' || statusStr === '5' || statusStr === 'done') {
|
||||
console.log('[Devoirs Widget] Filtering out done task:', {
|
||||
id: task.id,
|
||||
headline: task.headline,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user