Fix: Vis kun den specifikke entry når time_id parameter er sat
This commit is contained in:
parent
d76296ea73
commit
e69f211fbf
@ -403,28 +403,9 @@
|
||||
currentEntry = entry;
|
||||
currentCaseId = entry.case_id;
|
||||
|
||||
// Only fetch other case entries if this entry is pending
|
||||
// Otherwise just show this single entry
|
||||
if (entry.status === 'pending' && entry.case_id) {
|
||||
console.log('🔍 Fetching other pending entries for case:', entry.case_id);
|
||||
const caseResponse = await fetch(`/api/v1/timetracking/wizard/case/${entry.case_id}/entries`);
|
||||
if (caseResponse.ok) {
|
||||
const caseEntries = await caseResponse.json();
|
||||
console.log('📋 Got', caseEntries.length, 'pending entries for case');
|
||||
// Make sure our entry is in the list (it should be since it's pending)
|
||||
window.currentCaseEntries = caseEntries;
|
||||
} else {
|
||||
console.log('⚠️ Could not fetch case entries, showing single entry');
|
||||
window.currentCaseEntries = [entry];
|
||||
}
|
||||
} else {
|
||||
console.log('ℹ️ Entry is not pending or has no case - showing single entry only');
|
||||
// Entry is not pending - just show this one entry
|
||||
window.currentCaseEntries = [entry];
|
||||
}
|
||||
|
||||
console.log('✨ Current entry to display:', currentEntry.id);
|
||||
console.log('📦 All entries:', window.currentCaseEntries.map(e => e.id));
|
||||
// When loading a specific entry via time_id parameter, only show that one entry
|
||||
console.log('🎯 Showing only the requested entry');
|
||||
window.currentCaseEntries = [entry];
|
||||
|
||||
// Show the entry
|
||||
displayCaseEntries({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user