Compare commits

..

No commits in common. "05656acd0c83b4fe77fa07a3009a65553b8162dc" and "b8551c73d7417d55e24a6f20b8c145a4eb457d5c" have entirely different histories.

View File

@ -26,23 +26,10 @@ class Accueil extends Component {
let dept = window.location.href.split('/')[7]
let sem = window.location.href.split('/')[9]
let BASE_URL = window.$api_url
// Recuperation des infos de semestre
getJson(BASE_URL + dept + '/Scolarite/Notes/formsemestre_list?format=json&formsemestre_id=' + sem)
.then(res => {
this.setState({ semestre: res.data[0], resp_l: res.data[0].responsables});
// Recuperation des noms complets des responsables
res.data[0].responsables.map((resp) =>
getJson(BASE_URL + dept + '/Scolarite/Users/user_info?format=json&user_name=' + resp)
.then(res => {
let joined = this.state.resp.concat(res.data.nomplogin)
this.setState({resp: joined, loading: false})
})
.catch(error => {
this.setState({resp: this.state.resp_l, loading: false})
})
)
})
this.setState({ semestre: res.data[0], resp: res.data[0].responsables, loading: false});
});
}
render() {
@ -58,7 +45,6 @@ class Accueil extends Component {
})}
</h1>
:
// En cas de chargement
<Spinner animation="border"/>
}
</div>