ajustes para a troca de estudante
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
package="com.rkm.educaapp.rkm_educa_app">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
android:label="rkm_educa_app"
|
||||
android:label="RKM ED"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:rkm_educa_app/telas/tela_agenda.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_botetim.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_chamada.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_contatos.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_eventos.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_historico.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_login.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_passe.dart';
|
||||
@@ -18,9 +17,11 @@ import '../servicos/shared_preferences/shared.dart';
|
||||
import 'item_drawer.dart';
|
||||
|
||||
class DrawerCustom extends StatelessWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List<EstudanteModelo> alunos;
|
||||
int indiceFilhos;
|
||||
DrawerCustom({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceFilhos,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -45,7 +46,7 @@ class DrawerCustom extends StatelessWidget {
|
||||
// ),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0,horizontal: 40),
|
||||
child: TextCustom(text: estudanteModelo.NO_ALUNO.split(" ").first,fontWeight: FontWeight.bold,size: 16.0,textAlign: TextAlign.start),
|
||||
child: TextCustom(text: alunos[indiceFilhos].NO_ALUNO.split(" ").first,fontWeight: FontWeight.bold,size: 16.0,textAlign: TextAlign.start),
|
||||
),
|
||||
Container(
|
||||
height: Dimensoes.height*0.5,
|
||||
@@ -56,7 +57,7 @@ class DrawerCustom extends StatelessWidget {
|
||||
texto: 'Situação Escolar',
|
||||
onPressed: ()=> Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(estudanteModelo: estudanteModelo,)),
|
||||
MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(alunos: alunos,indiceAluno: indiceFilhos)),
|
||||
),
|
||||
),
|
||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
@@ -65,7 +66,7 @@ class DrawerCustom extends StatelessWidget {
|
||||
texto: 'Perfil',
|
||||
onPressed: ()=> Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => TelaPerfil(estudanteModelo: estudanteModelo,)),
|
||||
MaterialPageRoute(builder: (context) => TelaPerfil(alunos: alunos,indiceAluno: indiceFilhos)),
|
||||
),
|
||||
),
|
||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
@@ -75,10 +76,10 @@ class DrawerCustom extends StatelessWidget {
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context)=>
|
||||
TelaBoletim(
|
||||
estudanteModelo: estudanteModelo,
|
||||
estudanteModelo: alunos[indiceFilhos],
|
||||
ano: '2023',
|
||||
turma: "${estudanteModelo.dados[estudanteModelo.nroAluno]['DESC_SERIE']} ${estudanteModelo.dados[estudanteModelo.nroAluno]['TURMA']}",
|
||||
matricula: estudanteModelo.dados[estudanteModelo.nroAluno]['CD_MATRICULA'].toString()
|
||||
turma: "${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['DESC_SERIE']} ${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['TURMA']}",
|
||||
matricula: alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['CD_MATRICULA'].toString()
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -87,19 +88,19 @@ class DrawerCustom extends StatelessWidget {
|
||||
ItemDrawer(
|
||||
icone: LineIcons.fileContract,
|
||||
texto: 'Histórico Escolar',
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaHistorico(estudanteModelo: estudanteModelo))),
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaHistorico(alunos: alunos,indiceAluno: indiceFilhos))),
|
||||
),
|
||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.checkSquareAlt,
|
||||
texto: 'Chamadas / Presenças',
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaChamada(estudanteModelo: estudanteModelo))),
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaChamada(alunos: alunos,indiceAluno: indiceFilhos))),
|
||||
),
|
||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.calendarAlt,
|
||||
texto: 'Agenda Escolar',
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaAgenda(estudanteModelo: estudanteModelo))),
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaAgenda(alunos: alunos,indiceAluno: indiceFilhos))),
|
||||
),
|
||||
// Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
// ItemDrawer(
|
||||
@@ -111,13 +112,13 @@ class DrawerCustom extends StatelessWidget {
|
||||
ItemDrawer(
|
||||
icone: LineIcons.mobilePhone,
|
||||
texto: 'Contatos',
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaContatos(estudanteModelo: estudanteModelo,))),
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaContatos(alunos: alunos,indiceAluno: indiceFilhos,))),
|
||||
),
|
||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.bus,
|
||||
texto: 'Passe',
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaPasse(estudanteModelo: estudanteModelo))),
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaPasse(alunos: alunos,indiceAluno: indiceFilhos))),
|
||||
),
|
||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
],
|
||||
|
||||
@@ -15,10 +15,12 @@ import 'package:http/http.dart' as http;
|
||||
import '../controllers/main_controllers.dart';
|
||||
|
||||
class TelaAgenda extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaAgenda({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -69,11 +71,11 @@ class _TelaAgendaState extends State<TelaAgenda> {
|
||||
carregandoEventos = true;
|
||||
setState(() {});
|
||||
|
||||
final url = '${widget.estudanteModelo.URL}/calendario?'
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/calendario?'
|
||||
'MES=${dataAtual.year}-${dataAtual.month}-01&'
|
||||
'COD_ESCOLA=${widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_CAD_DIVERSO']}&'
|
||||
'COD_ESCOLA=${widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_CAD_DIVERSO']}&'
|
||||
'QUANTIDADE=31&'
|
||||
'CIDADE=${widget.estudanteModelo.cidade}';
|
||||
'CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -117,7 +119,7 @@ class _TelaAgendaState extends State<TelaAgenda> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
buscarEventos();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'AGENDA');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'AGENDA');
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -149,7 +151,7 @@ class _TelaAgendaState extends State<TelaAgenda> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'AGENDA ESCOLAR'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
body: carregandoEventos?Center(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(80),
|
||||
|
||||
@@ -8,9 +8,11 @@ import '../componentes/item_avisos.dart';
|
||||
import '../controllers/main_controllers.dart';
|
||||
|
||||
class TelaAvisos extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
TelaAvisos({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -22,7 +24,7 @@ class _TelaAvisosState extends State<TelaAvisos> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'AVISOS');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'AVISOS');
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -30,17 +32,17 @@ class _TelaAvisosState extends State<TelaAvisos> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'AVISOS'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo,),
|
||||
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
body: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20,horizontal: 10),
|
||||
width: Dimensoes.width,
|
||||
height: Dimensoes.height,
|
||||
child: ListView(
|
||||
children: [
|
||||
ItemAvisos(data: '28/04/2023',aviso: 'Não haverá aula',naovisto: true,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(estudanteModelo: widget.estudanteModelo,)))),
|
||||
ItemAvisos(data: '05/05/2023',aviso: 'Reunião de pais',naovisto: true,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(estudanteModelo: widget.estudanteModelo)))),
|
||||
ItemAvisos(data: '08/06/2023',aviso: 'Não haverá aula',naovisto: false,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(estudanteModelo: widget.estudanteModelo)))),
|
||||
ItemAvisos(data: '07/09/2023',aviso: 'Não haverá aula',naovisto: false,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(estudanteModelo: widget.estudanteModelo)))),
|
||||
ItemAvisos(data: '28/04/2023',aviso: 'Não haverá aula',naovisto: true,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(alunos: widget.alunos,indiceAluno: widget.indiceAluno,)))),
|
||||
ItemAvisos(data: '05/05/2023',aviso: 'Reunião de pais',naovisto: true,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(alunos: widget.alunos,indiceAluno: widget.indiceAluno)))),
|
||||
ItemAvisos(data: '08/06/2023',aviso: 'Não haverá aula',naovisto: false,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(alunos: widget.alunos,indiceAluno: widget.indiceAluno)))),
|
||||
ItemAvisos(data: '07/09/2023',aviso: 'Não haverá aula',naovisto: false,onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaDetalhesAvisos(alunos: widget.alunos,indiceAluno: widget.indiceAluno)))),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
101
lib/telas/tela_cadastro.dart
Normal file
101
lib/telas/tela_cadastro.dart
Normal file
@@ -0,0 +1,101 @@
|
||||
import 'package:brasil_fields/brasil_fields.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../componentes/appbar_custom.dart';
|
||||
import '../componentes/buttom_custom.dart';
|
||||
import '../componentes/input_text.dart';
|
||||
import '../utils/cores.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class TelaCadastro extends StatefulWidget {
|
||||
const TelaCadastro({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<TelaCadastro> createState() => _TelaCadastroState();
|
||||
}
|
||||
|
||||
class _TelaCadastroState extends State<TelaCadastro> {
|
||||
|
||||
final inputCPF = TextEditingController();
|
||||
final inputSenha = TextEditingController();
|
||||
final inputRepita = TextEditingController();
|
||||
final inputCodigo = TextEditingController();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'CADASTRO'),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(Dimensoes.width*0.15),
|
||||
width: Dimensoes.width,
|
||||
height: Dimensoes.height,
|
||||
alignment: Alignment.center,
|
||||
child: ListView(
|
||||
children: [
|
||||
Container(
|
||||
child: Image.asset("assets/images/logoEduca.png",width:Dimensoes.width * 0.4,height: Dimensoes.height * 0.12)
|
||||
),
|
||||
Container(
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
child: InputText(
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
CpfInputFormatter(),
|
||||
],
|
||||
textInputType: TextInputType.number,
|
||||
controller: inputCPF,
|
||||
title: 'CPF',
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
colorBorder: PaletaCores.branco,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
child: InputText(
|
||||
inputFormatters: [],
|
||||
obscure: true,
|
||||
controller: inputSenha,
|
||||
title: 'Senha',
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
colorBorder: PaletaCores.branco,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
child: InputText(
|
||||
inputFormatters: [],
|
||||
obscure: true,
|
||||
controller: inputRepita,
|
||||
title: 'Repetir Senha',
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
colorBorder: PaletaCores.branco,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
child: InputText(
|
||||
inputFormatters: [],
|
||||
controller: inputCodigo,
|
||||
title: 'Código Cidade',
|
||||
width: Dimensoes.width>900? Dimensoes.width * 0.18:Dimensoes.width*0.7,
|
||||
colorBorder: PaletaCores.branco,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20,),
|
||||
ButtonCustom(
|
||||
widthCustom: 0.7,
|
||||
heightCustom: 0.07,
|
||||
text: "Cadastrar",
|
||||
fontsize: 14.0,
|
||||
colorText: PaletaCores.branco,
|
||||
colorButton: PaletaCores.corPrimaria,
|
||||
colorBorder: PaletaCores.corPrimaria,
|
||||
onPressed: (){},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -14,10 +14,12 @@ import '../utils/cores.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class TelaChamada extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaChamada({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -56,11 +58,11 @@ class _TelaChamadaState extends State<TelaChamada> {
|
||||
);
|
||||
|
||||
getChamada(String data)async{
|
||||
int cd = widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_MATRICULA'];
|
||||
print(widget.estudanteModelo.nroAluno);
|
||||
int cd = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_MATRICULA'];
|
||||
print(widget.alunos[widget.indiceAluno].nroAluno);
|
||||
setState(()=>carregando=true);
|
||||
presenca.clear();
|
||||
final url = '${widget.estudanteModelo.URL}/presenca?CD_MATRICULA=${cd}&DATA=$data&CIDADE=${widget.estudanteModelo.cidade}';
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/presenca?CD_MATRICULA=${cd}&DATA=$data&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -72,7 +74,7 @@ class _TelaChamadaState extends State<TelaChamada> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'CHAMADA');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'CHAMADA');
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -116,7 +118,7 @@ class _TelaChamadaState extends State<TelaChamada> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'CHAMADAS / PRESENÇAS'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
body: carregando?Center(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(80),
|
||||
|
||||
@@ -6,10 +6,12 @@ import '../componentes/item_modelo.dart';
|
||||
import '../controllers/main_controllers.dart';
|
||||
|
||||
class TelaContatos extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaContatos({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -21,32 +23,32 @@ class _TelaContatosState extends State<TelaContatos> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'CONTATOS');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'CONTATOS');
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'CONTATOS'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.all(30),
|
||||
child: ListView(
|
||||
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.55),
|
||||
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_EMAIL']==''
|
||||
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_COORDENADOR'], titulo: 'Coordenador(a)',widthCustom: 0.55),
|
||||
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,),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -10,10 +10,12 @@ import '../controllers/main_controllers.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class TelaDetalhesAvisos extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaDetalhesAvisos({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -25,7 +27,7 @@ class _TelaDetalhesAvisosState extends State<TelaDetalhesAvisos> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'DETALHES_AVISO');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'DETALHES_AVISO');
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -53,7 +55,7 @@ class _TelaDetalhesAvisosState extends State<TelaDetalhesAvisos> {
|
||||
colorButton: PaletaCores.cinzaClaro,
|
||||
colorBorder: PaletaCores.cinzaClaro,
|
||||
colorText: PaletaCores.branco,
|
||||
onPressed: ()=>Navigator.pushReplacement(context, MaterialPageRoute(builder: (context)=>TelaAvisos(estudanteModelo: widget.estudanteModelo))),
|
||||
onPressed: ()=>Navigator.pushReplacement(context, MaterialPageRoute(builder: (context)=>TelaAvisos(alunos: widget.alunos,indiceAluno: widget.indiceAluno,))),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@@ -3,15 +3,16 @@ import 'package:rkm_educa_app/componentes/appbar_custom.dart';
|
||||
import 'package:rkm_educa_app/componentes/drawer_custom.dart';
|
||||
import 'package:rkm_educa_app/componentes/item_evento.dart';
|
||||
import 'package:rkm_educa_app/modelos/estudante_modelo.dart';
|
||||
|
||||
import '../controllers/main_controllers.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class TelaEventos extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaEventos({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -23,14 +24,14 @@ class _TelaEventosState extends State<TelaEventos> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'EVENTOS');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'EVENTOS');
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'EVENTOS ESCOLARES'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
body: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20,horizontal: 10),
|
||||
width: Dimensoes.width,
|
||||
|
||||
@@ -14,10 +14,12 @@ import '../utils/cores.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class TelaHistorico extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaHistorico({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -32,14 +34,14 @@ class _TelaHistoricoState extends State<TelaHistorico> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'HISTORICO');
|
||||
print(widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_ALUNO']);
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'HISTORICO');
|
||||
print(widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO']);
|
||||
getMatriculas();
|
||||
}
|
||||
|
||||
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}';
|
||||
String cd = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/matriculas_aluno?CD_ALUNO=$cd&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -55,7 +57,7 @@ class _TelaHistoricoState extends State<TelaHistorico> {
|
||||
onTap: ()=> Navigator.push(context,
|
||||
MaterialPageRoute(builder: (context)=>
|
||||
TelaBoletim(
|
||||
estudanteModelo: widget.estudanteModelo,
|
||||
estudanteModelo: widget.alunos[widget.indiceAluno],
|
||||
ano: '${list[i]['ANO_FREQ']}',
|
||||
turma: '${list[i]['DESC_SERIE']} ${list[i]['TURMA']}',
|
||||
matricula: list[i]['CD_MATRICULA'].toString(),
|
||||
@@ -76,7 +78,7 @@ class _TelaHistoricoState extends State<TelaHistorico> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'HISTÓRICO ESCOLAR'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
drawer: DrawerCustom(alunos:widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
body: carregando?Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:rkm_educa_app/Telas/tela_situacao_escolar.dart';
|
||||
import 'package:rkm_educa_app/modelos/estudante_modelo.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_cadastro.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_seleciona_filho.dart';
|
||||
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
||||
import '../servicos/shared_preferences/shared.dart';
|
||||
@@ -37,6 +38,7 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
var map;
|
||||
int contLogo = 0;
|
||||
String urlAPI = 'https://homol-controle-educa-api.rkmsistemas.com.br';
|
||||
List <EstudanteModelo> umFilho = [];
|
||||
|
||||
verificacao(){
|
||||
if(inputLogin.text.isNotEmpty){
|
||||
@@ -193,7 +195,8 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
CD_USUARIO: CPF,
|
||||
URL: urlAPI
|
||||
);
|
||||
Navigator.pushReplacement(context,MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(estudanteModelo: estudanteModelo!)));
|
||||
umFilho.add(estudanteModelo!);
|
||||
Navigator.pushReplacement(context,MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(alunos: umFilho,indiceAluno: 0,)));
|
||||
}else{
|
||||
Navigator.pushReplacement(context,MaterialPageRoute(builder: (context) =>
|
||||
TelaSelecionaFilho(listAlunos: listAlunos,cidade: cidade,CD_USUARIO: CPF,NO_USUARIO: nome,URL: urlAPI,)));
|
||||
@@ -303,7 +306,7 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
children: [
|
||||
CircularProgressIndicator(color: PaletaCores.cinzaClaro,),
|
||||
SizedBox(width: 20,),
|
||||
TextCustom(text: status)
|
||||
TextCustom(text: status,maxLines: 1,size: 12.0,)
|
||||
],
|
||||
):ButtonCustom(
|
||||
widthCustom: 0.7,
|
||||
@@ -315,6 +318,15 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
colorBorder: PaletaCores.corPrimaria,
|
||||
onPressed: ()=>alterarSenha?salvarSenha():verificacao(),
|
||||
),
|
||||
carregando?Container():GestureDetector(
|
||||
onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaCadastro())),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 15),
|
||||
width: Dimensoes.width,
|
||||
child: TextCustom(text: 'Não tem cadastro? Cadastre-se!',color: PaletaCores.corPrimaria,)
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -13,10 +13,12 @@ import '../controllers/main_controllers.dart';
|
||||
import '../utils/cores.dart';
|
||||
|
||||
class TelaPasse extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaPasse({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -34,8 +36,8 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
|
||||
getPasse()async{
|
||||
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
||||
String passe = widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_ALUNO'];
|
||||
final url = '${widget.estudanteModelo.URL}/passe?CD_ALUNO=${teste_passe}&CIDADE=${widget.estudanteModelo.cidade}';
|
||||
String passe = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/passe?CD_ALUNO=${teste_passe}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -61,7 +63,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
}
|
||||
getFrequencia(String CD_ALUNO)async{
|
||||
dadosFrequncia.clear();
|
||||
final url = '${widget.estudanteModelo.URL}/frequencia?CD_ALUNO=${CD_ALUNO}&CIDADE=${widget.estudanteModelo.cidade}';
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/frequencia?CD_ALUNO=${CD_ALUNO}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -114,8 +116,8 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
carregando = true;
|
||||
setState(() {});
|
||||
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
||||
String CD_ALUNO = widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_ALUNO'];
|
||||
final url = '${widget.estudanteModelo.URL}/carteira?CD_ALUNO=${teste_passe}&CIDADE=${widget.estudanteModelo.cidade}';
|
||||
String CD_ALUNO = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/carteira?CD_ALUNO=${teste_passe}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -165,9 +167,9 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
Container(
|
||||
width: 53,
|
||||
height: 49,
|
||||
child: Image.asset('assets/images/logo_carteirinha_${widget.estudanteModelo.cidade.toLowerCase()}.png'),
|
||||
child: Image.asset('assets/images/logo_carteirinha_${widget.alunos[widget.indiceAluno].cidade.toLowerCase()}.png'),
|
||||
),
|
||||
TextCustom(text: widget.estudanteModelo.cidade,size: 16.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||
TextCustom(text: widget.alunos[widget.indiceAluno].cidade,size: 16.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -341,7 +343,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'PASSE');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'PASSE');
|
||||
getPasse();
|
||||
}
|
||||
|
||||
@@ -349,7 +351,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'PASSE ESCOLAR'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
bottomSheet: carregando?SizedBox(width: 0,height: 0,): Container(
|
||||
width: Dimensoes.width,
|
||||
height: 70,
|
||||
@@ -382,7 +384,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
children: [
|
||||
Container(
|
||||
color: Colors.black,
|
||||
child: TextCustom(text: widget.estudanteModelo.NO_ALUNO,fontWeight: FontWeight.bold,color: Colors.white,textAlign: TextAlign.center),
|
||||
child: TextCustom(text: widget.alunos[widget.indiceAluno].NO_ALUNO,fontWeight: FontWeight.bold,color: Colors.white,textAlign: TextAlign.center),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
@@ -409,7 +411,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
||||
TextCustom(text: 'LINHA: ${dadosPasse[0]['NR_TRANSPORTE']}',size: 14.0, fontWeight: FontWeight.bold,),
|
||||
TextCustom(text: 'SÉRIE: ${dadosPasse[0]['DESC_SERIE']} - ${dadosPasse[0]['GRAU']}'
|
||||
' TURNO: ${dadosPasse[0]['TURNO'].toString().trim()=='1'?'MANHÃ':dadosPasse[0]['GRAU'].toString().trim()=='2'?'TARDE':''}',size: 14.0, fontWeight: FontWeight.bold,),
|
||||
TextCustom(text: 'ESCOLA: ${widget.estudanteModelo.ESCOLA}',size: 14.0, fontWeight: FontWeight.bold,),
|
||||
TextCustom(text: 'ESCOLA: ${widget.alunos[widget.indiceAluno].ESCOLA}',size: 14.0, fontWeight: FontWeight.bold,),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 20),
|
||||
color: Colors.black,
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -30,8 +30,8 @@ class TelaSelecionaFilho extends StatefulWidget {
|
||||
class _TelaSelecionaFilhoState extends State<TelaSelecionaFilho> {
|
||||
|
||||
EstudanteModelo? estudanteModelo;
|
||||
|
||||
List <EstudanteModelo>listAlunos = [];
|
||||
int indiceAluno = 0;
|
||||
|
||||
carregarAlunos(){
|
||||
//print(widget.listAlunos);
|
||||
@@ -129,6 +129,8 @@ class _TelaSelecionaFilhoState extends State<TelaSelecionaFilho> {
|
||||
setState(() {
|
||||
// print(value!.nome);
|
||||
estudanteModelo = value;
|
||||
indiceAluno = value!.nroAluno;
|
||||
print(indiceAluno);
|
||||
});
|
||||
},
|
||||
),
|
||||
@@ -149,7 +151,7 @@ class _TelaSelecionaFilhoState extends State<TelaSelecionaFilho> {
|
||||
if(estudanteModelo!=null){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(estudanteModelo: estudanteModelo!,)),
|
||||
MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(alunos: listAlunos,indiceAluno: indiceAluno,)),
|
||||
);
|
||||
}else{
|
||||
showSnackBar(context, 'Selecione um estudante para avançar', Colors.red);
|
||||
|
||||
@@ -9,14 +9,18 @@ import 'package:rkm_educa_app/utils/cores.dart';
|
||||
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
||||
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
import '../componentes/alert_default.dart';
|
||||
import '../componentes/buttom_custom.dart';
|
||||
import '../componentes/drawer_custom.dart';
|
||||
import '../modelos/evento_modelo.dart';
|
||||
|
||||
class TelaSituacaoEscolar extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
List <EstudanteModelo> alunos;
|
||||
int indiceAluno;
|
||||
|
||||
TelaSituacaoEscolar({
|
||||
required this.estudanteModelo
|
||||
required this.alunos,
|
||||
required this.indiceAluno
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -33,10 +37,10 @@ class _TelaSituacaoEscolarState extends State<TelaSituacaoEscolar> {
|
||||
bool carregandoOcorrencias = true;
|
||||
|
||||
buscarEventos()async{
|
||||
final url = '${widget.estudanteModelo.URL}/calendario_home?'
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/calendario_home?'
|
||||
'HOJE=${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day}&'
|
||||
'COD_ESCOLA=${widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_CAD_DIVERSO']}&'
|
||||
'CIDADE=${widget.estudanteModelo.cidade}';
|
||||
'COD_ESCOLA=${widget.alunos[widget.indiceAluno].dados[widget.alunos[widget.indiceAluno].nroAluno]['CD_CAD_DIVERSO']}&'
|
||||
'CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
// print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -51,9 +55,9 @@ class _TelaSituacaoEscolarState extends State<TelaSituacaoEscolar> {
|
||||
}
|
||||
|
||||
buscarOcorrencia()async{
|
||||
final url = '${widget.estudanteModelo.URL}/ocorrencia?'
|
||||
'MATRICULA=${widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_MATRICULA']}&'
|
||||
'CIDADE=${widget.estudanteModelo.cidade}';
|
||||
final url = '${widget.alunos[widget.indiceAluno].URL}/ocorrencia?'
|
||||
'MATRICULA=${widget.alunos[widget.indiceAluno].dados[widget.alunos[widget.indiceAluno].nroAluno]['CD_MATRICULA']}&'
|
||||
'CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -68,7 +72,7 @@ class _TelaSituacaoEscolarState extends State<TelaSituacaoEscolar> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
MainControllers().salvarLog(widget.estudanteModelo, 'DASHBOARD');
|
||||
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'DASHBOARD');
|
||||
buscarEventos();
|
||||
buscarOcorrencia();
|
||||
// data = [
|
||||
@@ -102,16 +106,77 @@ class _TelaSituacaoEscolarState extends State<TelaSituacaoEscolar> {
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
actions: [
|
||||
widget.alunos.length==1?Container():
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
AlertDefault().alert(
|
||||
context,
|
||||
0.35,
|
||||
Container(
|
||||
height: Dimensoes.height*0.25,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
height: widget.alunos.length*80,
|
||||
child: ListView.builder(
|
||||
itemCount: widget.alunos.length,
|
||||
itemBuilder: (context,index){
|
||||
return GestureDetector(
|
||||
onTap: (){
|
||||
print(index);
|
||||
widget.indiceAluno = index;
|
||||
setState(() {
|
||||
print(widget.indiceAluno);
|
||||
});
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Card(
|
||||
color: PaletaCores.cinzaInput,
|
||||
margin: EdgeInsets.symmetric(vertical: 10),
|
||||
child: TextCustom(text: widget.alunos[index].NO_ALUNO)
|
||||
),
|
||||
);
|
||||
}
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
TextCustom(text: 'Clique em um dos nomes para exibir os dados do estudante selecionado.',maxLines: 3),
|
||||
ButtonCustom(
|
||||
onPressed: ()=>Navigator.pop(context),
|
||||
text: 'Fechar',
|
||||
widthCustom: 0.2,
|
||||
heightCustom: 0.05,
|
||||
fontsize: 14,
|
||||
colorText: Colors.white,
|
||||
colorBorder: PaletaCores.cinza,
|
||||
colorButton: PaletaCores.cinza,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
height: 20,
|
||||
alignment: Alignment.center,
|
||||
child: TextCustom(
|
||||
text: 'Trocar Estudante',
|
||||
color: PaletaCores.corPrimaria,
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: IconButton(
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaAvisos(estudanteModelo: widget.estudanteModelo,))),
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaAvisos(alunos: widget.alunos,indiceAluno: widget.indiceAluno,))),
|
||||
icon: Icon(Icons.notifications_outlined,size: 32),
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||
body: ListView(
|
||||
children: [
|
||||
Center(
|
||||
|
||||
Reference in New Issue
Block a user