ajustado para exibir apenas pai e mae
This commit is contained in:
@@ -3,10 +3,10 @@ import 'package:educa_controle_acesso/screens/home_screen.dart';
|
||||
import 'package:educa_controle_acesso/screens/login_screen.dart';
|
||||
import 'package:educa_controle_acesso/screens/responsible_register_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
import 'package:flutter_web_plugins/url_strategy.dart';
|
||||
|
||||
void main() {
|
||||
setUrlStrategy(PathUrlStrategy());
|
||||
usePathUrlStrategy();
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
|
||||
@@ -212,7 +212,10 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
final response = await http.get(Uri.parse(url));
|
||||
// print(response.body);
|
||||
if(response.body == 'deletado com sucesso'){
|
||||
responsaveis.removeAt(index);
|
||||
responsaveis[index].CPF = '';
|
||||
responsaveis[index].SENHA='';
|
||||
responsaveis[index].CONDICAO='';
|
||||
responsaveis[index].CD_ALUNO='';
|
||||
carregando = false;
|
||||
setState(() {});
|
||||
showSnackBar(context, 'Responsável deletado!', Colors.green);
|
||||
@@ -275,10 +278,10 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
Row(
|
||||
children: [
|
||||
TextCustom(text: 'Responsáveis Cadastrados:'),
|
||||
IconButton(
|
||||
icon: Icon(Icons.add_circle,color: PaletteColors.primaryColor),
|
||||
onPressed: ()=>setState(()=>showRegister = true),
|
||||
)
|
||||
// IconButton(
|
||||
// icon: Icon(Icons.add_circle,color: PaletteColors.primaryColor),
|
||||
// onPressed: ()=>setState(()=>showRegister = true),
|
||||
// )
|
||||
],
|
||||
),
|
||||
showRegister?Container(
|
||||
@@ -309,6 +312,7 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
width: width>900? width * 0.18:width*0.4,
|
||||
child: InputText(
|
||||
inputFormatters: [],
|
||||
enable: false,
|
||||
controller: inputNome,
|
||||
title: 'Nome Completo',
|
||||
width: width * 0.18,
|
||||
@@ -319,6 +323,7 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
width: width>900? width * 0.18:width*0.4,
|
||||
child: InputText(
|
||||
inputFormatters: [],
|
||||
enable: false,
|
||||
controller: inputParentesco,
|
||||
title: 'Parentesco',
|
||||
width: width * 0.18,
|
||||
@@ -329,7 +334,6 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
width: width>900? width * 0.18:width*0.4,
|
||||
child: InputText(
|
||||
controller: inputCpf,
|
||||
enable: !editando,
|
||||
title: 'CPF',
|
||||
width: width * 0.18,
|
||||
colorBorder: PaletteColors.white,
|
||||
@@ -415,6 +419,9 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
responsavelModel: responsaveis[index],
|
||||
onTapEdit: (){
|
||||
showRegister = true;
|
||||
|
||||
print(responsaveis[index].CONDICAO);
|
||||
|
||||
if(responsaveis[index].CONDICAO == 'NOVO' || responsaveis[index].CONDICAO == 'EDITADO'){
|
||||
editando = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user