Release 1.6

Améliorations mineures de l'interface
Fix: "Absences de undefined" + Erreur
This commit is contained in:
Theal0 2021-06-11 12:53:42 +02:00
parent ef3c3ce7b8
commit 5e00bd068c
4 changed files with 20 additions and 14 deletions

View File

@ -2,7 +2,7 @@
## Description
Version mobile de l'application web ScoDoc (v1.5)
Version mobile de l'application web ScoDoc (v1.6)
### Fonctionnalités:
- Login

View File

@ -115,16 +115,18 @@ class Etudiant extends Component {
<Link to={{
pathname: `/${window.location.href.split('/')[7]}/Scolarite/${sem.formsemestre_id}/GestionSem`,
tab: "Absences",
etudid: window.location.href.split('/')[10]
etudid: window.location.href.split('/')[10],
name: this.state.etud.nomprenom
}}>
<Button variant="primary" style={{"margin-right": "2px"}}>Vers Absences</Button>
<Button variant="primary" style={{"margin-right": "2px", "margin-bottom": "2px"}}>Vers Absences</Button>
</Link>
<Link to={{
pathname: `/${window.location.href.split('/')[7]}/Scolarite/${sem.formsemestre_id}/GestionSem`,
tab: "Bulletin",
etudid: window.location.href.split('/')[10]
etudid: window.location.href.split('/')[10],
name: this.state.etud.nomprenom
}}>
<Button variant="primary" style={{"margin-left": "2px"}}>Vers bulletin</Button>
<Button variant="primary" style={{"margin-left": "2px", "margin-bottom": "2px"}}>Vers bulletin</Button>
</Link>
</div>
)

View File

@ -1,5 +1,5 @@
import React, {Component} from "react";
import {Tabs, Tab} from "react-bootstrap"
import {Tabs, Tab, Nav, NavItem, NavLink} from "react-bootstrap"
import Accueil from "./GestionSemestre/Accueil";
import Absences from "./GestionSemestre/Absences";
import Etudiants from "./GestionSemestre/Etudiants";
@ -17,7 +17,8 @@ class GestionSemestre extends Component {
id: "",
name: '',
defaulttab: "Accueil",
defaultsel: ""
defaultsel: "",
loading: true
}
}
@ -26,7 +27,7 @@ class GestionSemestre extends Component {
if (this.props.location.tab) {
this.setState({defaulttab: this.props.location.tab, defaultsel: this.props.location.etudid,
id: this.props.location.etudid, name: this.state.selectOptions.find(option => option.value === this.state.id)
id: this.props.location.etudid, name: this.props.location.name
})
}
}
@ -44,7 +45,7 @@ class GestionSemestre extends Component {
// Création d'une liste pour le select
res.data.map((student) => {
let joined = this.state.selectOptions.concat({label: student.nom_disp + " " + student.prenom, value: student.etudid});
this.setState({selectOptions: joined})
this.setState({selectOptions: joined, loading: false})
})
})
}
@ -62,20 +63,23 @@ class GestionSemestre extends Component {
{/* Selection de l'étudiant pour les sous-composants */}
<div className="col-sm" id="wrapDept">
Choix de l'étudiant
<Select className="mySelect" options={this.state.selectOptions} onChange={this.handleSelectChange.bind(this)}
<Select className="mySelect"
isLoading={this.state.loading}
options={this.state.selectOptions}
onChange={this.handleSelectChange.bind(this)}
value={this.state.selectOptions.find(option => option.value === this.state.defaultsel)} />
</div>
</div>
</div>
<div>
<Tabs defaultActiveKey={this.state.defaulttab} id="controlled-tab-example">
<Tabs fill defaultActiveKey={this.state.defaulttab} id="controlled-tab-example" variant="pills">
<Tab eventKey="Accueil" title="Accueil">
<Accueil />
</Tab>
<Tab eventKey="Absences" title="Absences">
<Absences id={this.state.id} name={this.state.name}/>
</Tab>
<Tab eventKey="Bulletin" title="Bulletin">
<Tab eventKey="Bulletin" title="Bulletins">
<Bulletin id={this.state.id} name={this.state.name}/>
</Tab>
<Tab eventKey="Etud" title="Etudiants">

View File

@ -40,7 +40,7 @@ class Etudiants extends Component {
// Liste des étudiants inscrits au semestre
students: [],
// Gestion du select
selectOptions: [{label: "Filtre: Aucun", value: "Default"}],
selectOptions: [{label: "Groupe: Aucun", value: "Default"}],
id: "",
name: '',
};