Commit 259b04d5 authored by JonathanMM's avatar JonathanMM

Amélioration du tri sur le nombre de bornes libres

parent a2881e80
...@@ -143,6 +143,14 @@ ...@@ -143,6 +143,14 @@
data: 'nbFreeEDock', data: 'nbFreeEDock',
render: function(data, type, row, meta) render: function(data, type, row, meta)
{ {
if(type == 'sort') //Pour le tri, on utilise le nombre de bornes libres directement
{
if(data < 10)
return '00' + data.toString();
if(data < 100)
return '0' + data.toString();
return data;
}
return data+'/'+row.nbEDock; return data+'/'+row.nbEDock;
} }
}], }],
......
...@@ -125,7 +125,14 @@ ...@@ -125,7 +125,14 @@
return putZero(date.getDate()) + '/' + putZero(date.getMonth()+1) + '/' + date.getFullYear(); return putZero(date.getDate()) + '/' + putZero(date.getMonth()+1) + '/' + date.getFullYear();
} }
},{ },{
data: 'state' data: 'state',
render: function(data, type, row, meta)
{
if(data == 'Operative' && row.nbEDock > 0)
return 'Ouverte';
else
return 'En travaux';
}
},{ },{
data: 'nbBike' data: 'nbBike'
},{ },{
...@@ -134,6 +141,14 @@ ...@@ -134,6 +141,14 @@
data: 'nbFreeEDock', data: 'nbFreeEDock',
render: function(data, type, row, meta) render: function(data, type, row, meta)
{ {
if(type == 'sort') //Pour le tri, on utilise le nombre de bornes libres directement
{
if(data < 10)
return '00' + data.toString();
if(data < 100)
return '0' + data.toString();
return data;
}
return data+'/'+row.nbEDock; return data+'/'+row.nbEDock;
} }
}], }],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment