ajustes para a troca de estudante

This commit is contained in:
Reginaldo
2023-08-22 16:54:47 -03:00
parent 94a181e767
commit 822e7f7b7c
15 changed files with 313 additions and 115 deletions

View File

@@ -10,10 +10,12 @@ import '../componentes/item_modelo.dart';
import '../controllers/main_controllers.dart';
class TelaPerfil extends StatefulWidget {
EstudanteModelo estudanteModelo;
List <EstudanteModelo> alunos;
int indiceAluno;
TelaPerfil({
required this.estudanteModelo
required this.alunos,
required this.indiceAluno
});
@override
@@ -26,14 +28,14 @@ class _TelaPerfilState extends State<TelaPerfil> {
@override
void initState() {
super.initState();
MainControllers().salvarLog(widget.estudanteModelo, 'PERFIL');
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'PERFIL');
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarCustom().appbar(context, 'PERFIL'),
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
body: ListView(
padding: EdgeInsets.symmetric(vertical: 0,horizontal: 20),
children: [
@@ -46,13 +48,13 @@ class _TelaPerfilState extends State<TelaPerfil> {
// )
// ),
SizedBox(height: 25,),
ItemModelo(texto: widget.estudanteModelo.NO_ALUNO,titulo: 'Nome',),
ItemModelo(texto: widget.estudanteModelo.IDADE_ALUNO.toString()+' anos',titulo: 'Idade',),
ItemModelo(texto: widget.estudanteModelo.ANO_LETIVO.toString(),titulo: 'Ano Escolar',),
ItemModelo(texto: widget.estudanteModelo.RA_ALUNO,titulo: 'RA',),
ItemModelo(texto: widget.alunos[widget.indiceAluno].NO_ALUNO,titulo: 'Nome',),
ItemModelo(texto: widget.alunos[widget.indiceAluno].IDADE_ALUNO.toString()+' anos',titulo: 'Idade',),
ItemModelo(texto: widget.alunos[widget.indiceAluno].ANO_LETIVO.toString(),titulo: 'Ano Escolar',),
ItemModelo(texto: widget.alunos[widget.indiceAluno].RA_ALUNO,titulo: 'RA',),
Row(
children: [
ItemModelo(texto: widget.estudanteModelo.ESCOLA,titulo: 'Escola',widthCustom: 0.6,),
ItemModelo(texto: widget.alunos[widget.indiceAluno].ESCOLA,titulo: 'Escola',widthCustom: 0.6,),
IconButton(
onPressed: ()=>
AlertDefault().alert(
@@ -63,20 +65,20 @@ class _TelaPerfilState extends State<TelaPerfil> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR']==''
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_DIRETOR']==''
?Container()
:ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR'], titulo: 'Diretor(a)',widthCustom: 0.65),
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_VICE_DIRETOR']==''?Container()
:ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_VICE_DIRETOR'], titulo: 'Vice - Diretor(a)',widthCustom: 0.6),
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_COORDENADOR']==''
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_DIRETOR'], titulo: 'Diretor(a)',widthCustom: 0.65),
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_VICE_DIRETOR']==''?Container()
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_VICE_DIRETOR'], titulo: 'Vice - Diretor(a)',widthCustom: 0.6),
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_COORDENADOR']==''
?Container()
:ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_COORDENADOR'], titulo: 'Coordenador(a)',widthCustom: 0.6),
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_EMAIL']==''
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_COORDENADOR'], titulo: 'Coordenador(a)',widthCustom: 0.6),
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_EMAIL']==''
?Container()
:ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_EMAIL'], titulo: 'E - mail',widthCustom: 0.6),
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_SITE']==''
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_EMAIL'], titulo: 'E - mail',widthCustom: 0.6),
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_SITE']==''
?Container()
:ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_SITE'], titulo: 'Site',widthCustom: 0.6,),
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_SITE'], titulo: 'Site',widthCustom: 0.6,),
Spacer(),
ButtonCustom(
onPressed: ()=>Navigator.pop(context),