ajustes para usuários bloqueados
This commit is contained in:
@@ -38,7 +38,7 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
var inputData = TextEditingController();
|
||||
bool carregando = true;
|
||||
|
||||
bloquearResponsavel(int index)async{
|
||||
bloquearResponsavel(int index,String CONDICAO)async{
|
||||
final url = '${widget.alunoModel.URL}/inserirpais';
|
||||
|
||||
final response = await http.post(
|
||||
@@ -51,7 +51,7 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
'SENHA' : responsaveis[index].SENHA,
|
||||
'PARENTESCO' : responsaveis[index].PARENTESCO,
|
||||
'DATA_CADASTRO' : DateFormat('dd/MM/yyyy HH:mm').format(DateTime.now()),
|
||||
'CONDICAO' : 'BLOQUEADO',
|
||||
'CONDICAO' : CONDICAO=='BLOQUEADO'?'EDITADO':'BLOQUEADO',
|
||||
'CIDADE' : widget.alunoModel.cidade
|
||||
}
|
||||
);
|
||||
@@ -510,8 +510,10 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
context: context,
|
||||
builder: (BuildContext context){
|
||||
return AlertDialog(
|
||||
title: TextCustom(text: 'Bloquear'),
|
||||
content: TextCustom(text:'Deseja realmente bloquear esse responsável?',),
|
||||
title: TextCustom(text: responsaveis[index].CONDICAO=='BLOQUEADO'?'Desbloquear':'Bloquear'),
|
||||
content: TextCustom(text:responsaveis[index].CONDICAO=='BLOQUEADO'
|
||||
?'Deseja realmente desbloquear esse responsável'
|
||||
:'Deseja realmente bloquear esse responsável?',),
|
||||
actions: [
|
||||
ButtonCustom(
|
||||
onPressed:()=>Navigator.pop(context),
|
||||
@@ -528,7 +530,7 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
||||
editando = true;
|
||||
carregando = true;
|
||||
setState(() {});
|
||||
bloquearResponsavel(index);
|
||||
bloquearResponsavel(index,responsaveis[index].CONDICAO);
|
||||
},
|
||||
text: 'SIM',
|
||||
widthCustom: 0.1,
|
||||
|
||||
Reference in New Issue
Block a user