Merge pull request #281 from R0m1k3/1.1

Improve advertising list sorting for smaller numbers first
This commit is contained in:
LogiFlow authored and GitHub committed 2025-08-21 12:35:40 +02:00
commit c3107a80b4
2 files changed
+6

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

+6
View File
@@ -1210,6 +1210,12 @@ export class DatabaseStorage implements IStorage {
}
const results = await query.orderBy(asc(publicities.pubNumber));
// LOG: Debug du tri des publicités
console.log(`📋 PUBLICITES: Tri par pubNumber croissant - ${results.length} résultats:`,
results.slice(0, 3).map(p => `N°${p.pubNumber}(${p.designation})`).join(', ') +
(results.length > 3 ? '...' : '')
);
const publicityIds = results.map((p: any) => p.id);
const participations = publicityIds.length > 0