mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-21 22:18:17 +02:00
Merge pull request #281 from R0m1k3/1.1
Improve advertising list sorting for smaller numbers first
This commit is contained in:
2 files changed
+6
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 118 KiB |
@@ -1211,6 +1211,12 @@ export class DatabaseStorage implements IStorage {
|
|||||||
|
|
||||||
const results = await query.orderBy(asc(publicities.pubNumber));
|
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 publicityIds = results.map((p: any) => p.id);
|
||||||
const participations = publicityIds.length > 0
|
const participations = publicityIds.length > 0
|
||||||
? await db
|
? await db
|
||||||
|
|||||||
Reference in new issue
Block a user