tri.js : simplification tri par responsable
This commit is contained in:
parent
f5eb22f03a
commit
6f9fd4032c
5
tri.js
5
tri.js
@ -152,9 +152,8 @@ function trierResp(tresp, tnoms, tnumeros, croissant = true)
|
||||
if (a.resp == '') { return 1; }
|
||||
if (b.resp == '') { return -1; }
|
||||
|
||||
// deux resp non vides
|
||||
let comp = a.resp.localeCompare(b.resp);
|
||||
if (comp == 0) { comp = a.nom.localeCompare(b.nom); }
|
||||
// deux resp non vides (forcément = "Oui")
|
||||
let comp = a.nom.localeCompare(b.nom);
|
||||
if (comp == 0) { comp = a.numero - b.numero; }
|
||||
return comp * ordre;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user