ajustes para exibir todas escolas para secretaria municipal e ajusta da altura dos resultados da pesquisa
This commit is contained in:
@@ -40,7 +40,9 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
resultadoPesquisa.clear();
|
||||
alunos.clear();
|
||||
String aluno = inputPesquisa.text.replaceAll(' ', '%20').toUpperCase();
|
||||
String escola = widget.dados[3].replaceAll(' ', '%20').toUpperCase();
|
||||
print(widget.dados[3]);
|
||||
print(widget.dados[4]);
|
||||
String escola = widget.dados[4]==1 ||widget.dados[1]=='ADMINISTRADOR'?'':widget.dados[3].replaceAll(' ', '%20').toUpperCase();
|
||||
// print(q);
|
||||
final url = '${widget.dados[2]}/aluno?NOME=$aluno&CIDADE=${widget.dados[0]}&ANO=${DateTime.now().year}&ESCOLA=$escola';
|
||||
print(url);
|
||||
@@ -102,7 +104,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
var map = json.decode(response.body);
|
||||
print(map);
|
||||
List list = map;
|
||||
if(list.length != 0 ){
|
||||
if(list.length != 0){
|
||||
for(int i=0;list.length>i;i++){
|
||||
logins.add(
|
||||
LoginModel(
|
||||
@@ -267,7 +269,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
setState(() {
|
||||
buscandoDados = true;
|
||||
});
|
||||
// getAcessosBasePrincipal();
|
||||
getAcessosMariaDB();
|
||||
}else{
|
||||
showSnackBar(context, 'Digite alguma informação para pesquisar', Colors.red);
|
||||
@@ -332,7 +333,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
border: Border.all(color: logins.length==0?Colors.white:PaletteColors.grey)
|
||||
),
|
||||
margin: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
|
||||
height: height*0.74,
|
||||
height: height*0.7,
|
||||
child: ListView.builder(
|
||||
itemCount: logins.length,
|
||||
itemBuilder: (context,index){
|
||||
@@ -557,7 +558,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
),
|
||||
margin: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
|
||||
width: width*0.75,
|
||||
height: height*0.74,
|
||||
height: height*0.7,
|
||||
child: ListView.builder(
|
||||
itemCount: resultadoPesquisa.length,
|
||||
itemBuilder:(context,index){
|
||||
|
||||
@@ -19,6 +19,8 @@ class LoginScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _LoginScreenState extends State<LoginScreen> {
|
||||
//usuario e senha secretaria AFERRARINI
|
||||
|
||||
//ADMIN
|
||||
//las1594@@
|
||||
//SENHAS CRIPTOGRAFADAS PORQUE FORMA ALTERADAS, SENHAS NOVAS USUÁRIO E SENHA SÃO IGUAIS
|
||||
@@ -94,8 +96,6 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
conectAPI()async{
|
||||
|
||||
print('aqui');
|
||||
|
||||
final url = '$urlAPI/logincontrole?NO_USERNAME=${inputLogin.text.toUpperCase()}&CIDADE=${widget.cidade.toUpperCase()}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
@@ -107,7 +107,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
if(map['NO_USERNAME']==map['SENHA']){
|
||||
if(map['NO_USERNAME']==inputLogin.text.toUpperCase() && map['SENHA']==inputSenha.text.toUpperCase()){
|
||||
showSnackBar(context, 'Acesso validado', Colors.green);
|
||||
List dados = [widget.cidade.toUpperCase(),map['NO_USUARIO_SISTEMA']??'',urlAPI,map['NO_FANTASIA']??''];
|
||||
List dados = [widget.cidade.toUpperCase(),map['NO_USUARIO_SISTEMA']??'',urlAPI,map['NO_FANTASIA']??'',map['CD_UNIDADE']??0];
|
||||
Navigator.pushNamed(context, '/home',arguments: dados);
|
||||
}else{
|
||||
showSnackBar(context, 'Login não cadastrado e/ou senha incorreta e/ou Código incorreto', Colors.red);
|
||||
@@ -117,7 +117,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
print(map);
|
||||
print(map['NO_USUARIO_SISTEMA']);
|
||||
showSnackBar(context, 'Acesso validado', Colors.green);
|
||||
List dados = [widget.cidade.toUpperCase(),map['NO_USUARIO_SISTEMA']??'',urlAPI,map['NO_FANTASIA']??''];
|
||||
List dados = [widget.cidade.toUpperCase(),map['NO_USUARIO_SISTEMA']??'',urlAPI,map['NO_FANTASIA']??'',map['CD_UNIDADE']??0];
|
||||
Navigator.pushNamed(context, '/home',arguments: dados);
|
||||
}else{
|
||||
showSnackBar(context, 'Login não cadastrado e/ou senha incorreta e/ou Código incorreto', Colors.red);
|
||||
|
||||
Reference in New Issue
Block a user