forked from DGNum/gestioCOF
Reprise de la vue historique
- Ajout de paramètres à cette vue - `opegroups` contient maintenant une liste de groupes d'opérations et non plus un dictionnaire contenant `opegroup.pk` => `opegroup`
This commit is contained in:
parent
54ff265b0f
commit
b380984a1e
3 changed files with 82 additions and 26 deletions
|
@ -1083,14 +1083,19 @@ $(document).ready(function() {
|
|||
}
|
||||
|
||||
function getHistory() {
|
||||
var data = {
|
||||
from: moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss'),
|
||||
};
|
||||
console.log(data);
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
url : "{% url 'kfet.kpsul.history' %}",
|
||||
method : "GET",
|
||||
url : "{% url 'kfet.history.json' %}",
|
||||
method : "POST",
|
||||
data : data,
|
||||
})
|
||||
.done(function(data) {
|
||||
for (var opegroup_id in data) {
|
||||
addOpeGroup(data[opegroup_id]);
|
||||
for (var i=0; i<data['opegroups'].length; i++) {
|
||||
addOpeGroup(data['opegroups'][i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue