ajustes do historico escolar e carteirinha
This commit is contained in:
@@ -38,6 +38,31 @@ class _TelaBoletimState extends State<TelaBoletim> {
|
||||
List <ItemDisciplina> listDisciplinas3 = [];
|
||||
List <ItemDisciplina> listDisciplinas4 = [];
|
||||
bool carregando = true;
|
||||
String matricula = '';
|
||||
|
||||
getMatriculas()async{
|
||||
String cd = widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_ALUNO'];
|
||||
final url = '${widget.estudanteModelo.URL}/matriculas_aluno?CD_ALUNO=$cd&CIDADE=${widget.estudanteModelo.cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
List list0 = map;
|
||||
List list = list0.reversed.toList();
|
||||
print(map);
|
||||
if(list.length!=0){
|
||||
for(int i=0; list.length>i;i++){
|
||||
if('${list[i]['ANO_FREQ']}'.toString().trim() == widget.ano){
|
||||
widget.matricula = list[i]['CD_MATRICULA'].toString();
|
||||
widget.turma = '${list[i]['DESC_SERIE']} ${list[i]['TURMA']}';
|
||||
}
|
||||
}
|
||||
buscarNotas();
|
||||
}else{
|
||||
showSnackBar(context, 'Notas não encontradas!', Colors.red);
|
||||
carregando = false;
|
||||
setState((){});
|
||||
}
|
||||
}
|
||||
|
||||
buscarNotas()async{
|
||||
|
||||
@@ -146,14 +171,14 @@ class _TelaBoletimState extends State<TelaBoletim> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
buscarNotas();
|
||||
getMatriculas();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'BOLETIM');
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'BOLETIM ESCOLAR'),
|
||||
appBar: AppBarCustom().appbar(context, 'BOLETIM ESCOLAR ${widget.ano}'),
|
||||
// drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
body: carregando?Center(
|
||||
child: Row(
|
||||
|
||||
Reference in New Issue
Block a user