Compare commits
2 Commits
0cfe4e747b
...
f5abac7a70
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5abac7a70 | ||
|
|
e45e70f1e4 |
@@ -11,10 +11,7 @@ class ConstVariable{
|
||||
IconThemeData iconThemeDataDefault = IconThemeData(color: Colors.white);
|
||||
double fontSizeInput = 15;
|
||||
double fontSizeTitleAppBar = 20;
|
||||
List<String> RGUF = ['AC','AI','AL','AM','AN','AP','AS','BA','BY','CA','CB','CE','CH','CN','CO','DC','DF','ES','GD','GO','GU',
|
||||
'HU','IL','LA','LE','LI','LO','LT','MA','MG','MO','MS','MT','NB','NE','NW','NT','NY','OH','OU','PA','PB',
|
||||
'PE','PI','PO','PR','QH','RJ','RM','RN','RO','RR','RN','RO','RR','RS','SC','SE','SF','SJ','SP','TA','TO',
|
||||
'VC','XX','ZU','-','--',''];
|
||||
List<String> RGUF = ['AC','AL','AP','AM','BA','CE','DF','ES','GO','MA','MT','MS','MG','PA','PB','PR','PE','PI','RJ','RN','RS','RO','RR','SC','SP','SE','TO',];
|
||||
List<String> itensProceduresStart = [
|
||||
'ATEND. INDIVIDUAL',
|
||||
'VISTA DOMICILIAR'
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:rkm/config/const_variable.dart';
|
||||
import 'package:rkm/models/pais_modelo.dart';
|
||||
import 'package:rkm/widgets/alert_dialog_default.dart';
|
||||
import 'package:rkm/widgets/button_default.dart';
|
||||
import 'package:rkm/widgets/dropdown_button_com_pesquisa.dart';
|
||||
import 'package:rkm/widgets/dropdown_button_com_pesquisa_paises.dart';
|
||||
import 'package:rkm/widgets/title_containers.dart';
|
||||
import 'package:sqflite/sqflite.dart';
|
||||
@@ -87,6 +86,8 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
var dateDeathController = TextEditingController();
|
||||
String checkCNS = '';
|
||||
String checkCPF = '';
|
||||
String checkEmail = '';
|
||||
String checkCEP = '';
|
||||
String? selectTypeCertificate;
|
||||
int? selectTypeCertificateCod;
|
||||
String? selectCTPSUF;
|
||||
@@ -360,8 +361,8 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
selectCountry==null ||
|
||||
date == 'Data de Nascimento'||
|
||||
cityBirthController.text.isEmpty ||
|
||||
messageDDDController.text.isEmpty ||
|
||||
messageController.text.isEmpty ||
|
||||
mobileDDDController.text.isEmpty ||
|
||||
mobileController.text.isEmpty ||
|
||||
checkMother ||
|
||||
checkFather ||
|
||||
checkClassification||
|
||||
@@ -387,7 +388,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//sdsafdsf
|
||||
saveCitizen()async{
|
||||
print('NISController.text');
|
||||
print(NISController.text);
|
||||
@@ -426,7 +427,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
'ID_LOGR_TIPO' : idTipo,
|
||||
'NOME_LOGR' : selectStreet,
|
||||
'CEP_LOGR' : cepController.text.isNotEmpty?int.parse(cepController.text):0,
|
||||
'NUMERO_LOGR' : numberController.text.isNotEmpty && numberController.text!='N/A'?int.parse(numberController.text):0,
|
||||
'NUMERO_LOGR' : numberController.text.isNotEmpty && numberController.text!='S/N'?int.parse(numberController.text):0,
|
||||
'LOTEAMENTO_LOGR' : selectSubdivision,
|
||||
'COMPL_LOGR' : complementController.text,
|
||||
'PONTO_REFERENCIA' : referencePointController.text,
|
||||
@@ -892,6 +893,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
enabled: enableSpouse,
|
||||
onChanged: (v)=>setState((){}),
|
||||
),
|
||||
selectMaritalStatus=='CASADO(A)'&& enableSpouse && mandatory?ErrorDefault():Container(),
|
||||
DropdownWithSubtitle(
|
||||
list: ConstVariable().listNationality,
|
||||
subtitle: 'Naturalidade',
|
||||
@@ -910,7 +912,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
}else{
|
||||
selectNaturalityCod = 3;
|
||||
}
|
||||
cityBirthController.text = 'MUNICIPIO IGNORADO - SP';
|
||||
cityBirthController.text = 'MUNICIPIO IGNORADO';
|
||||
}else{
|
||||
cityBirthController.text = '';
|
||||
selectNaturalityCod = 1;
|
||||
@@ -967,7 +969,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: cityBirthController.text == 'MUNICIPIO IGNORADO - SP' || edit?null:(){
|
||||
onTap: cityBirthController.text == 'MUNICIPIO IGNORADO' || edit?null:(){
|
||||
searchCityController.text = '';
|
||||
searchCityBirthController.text = '';
|
||||
searchCity('birth');
|
||||
@@ -1125,6 +1127,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
enabled: !enableMother && !edit,
|
||||
onChanged: (v)=>setState((){}),
|
||||
),
|
||||
!enableMother&& mandatory?ErrorDefault():Container(),
|
||||
SwitchWithSubtitle(
|
||||
width: width*0.65,
|
||||
title: 'Desconhece Mãe',
|
||||
@@ -1150,6 +1153,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
enabled: !enableFather && !edit,
|
||||
onChanged: (v)=>setState((){}),
|
||||
),
|
||||
!enableFather&& mandatory?ErrorDefault():Container(),
|
||||
SwitchWithSubtitle(
|
||||
width: width*0.65,
|
||||
title: 'Desconhece Pai',
|
||||
@@ -1310,9 +1314,9 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
hintDropdown: 'Pais de Residência',
|
||||
onChanged:selectClassification!='OUTRO MUNICIPIO'?null:(value){
|
||||
setState(() {
|
||||
selectCountry = value;
|
||||
if(selectCountry=='OUTRO'){
|
||||
cityController.text= 'MUNICIPIO IGNORADO - SP';
|
||||
selectPaisResidencia = value;
|
||||
if(selectPaisResidencia=='OUTRO'){
|
||||
cityController.text= 'MUNICIPIO IGNORADO';
|
||||
resultListResid = [{"ID_MUNICIPIO":1,"CODIGO_IBGE":"000000","NO_MUNICIPIO":"MUNICIPIO IGNORADO","UF_ESTADO":"--","ID_PAIS":33}];
|
||||
codIBGEController.text = '000000';
|
||||
numberController.clear();
|
||||
@@ -1342,7 +1346,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
),
|
||||
selectCountry==null&& mandatory?ErrorDefault():Container(),
|
||||
GestureDetector(
|
||||
onTap: selectClassification!='OUTRO MUNICIPIO'|| cityController.text == 'MUNICIPIO IGNORADO - SP'?null: (){
|
||||
onTap: selectClassification!='OUTRO MUNICIPIO'|| cityController.text == 'MUNICIPIO IGNORADO'?null: (){
|
||||
searchCityController.text = '';
|
||||
searchCityBirthController.text = '';
|
||||
searchCity('city');
|
||||
@@ -1502,8 +1506,24 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
widthSubtitle: width*0.2,
|
||||
hintInput: 'Escreva aqui',
|
||||
mandatory: mandatory,
|
||||
maxLength: 10,
|
||||
enabled: selectClassification!='OUTRO MUNICIPIO' && !edit?true:false,
|
||||
onChanged: (v)=>setState((){}),
|
||||
textInputType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
CepInputFormatter()
|
||||
],
|
||||
onChanged: (v){
|
||||
if(cepController.text.length==10){
|
||||
checkCEP = '';
|
||||
}else{
|
||||
checkCEP = 'CEP incompleto';
|
||||
}
|
||||
setState((){});
|
||||
},
|
||||
),
|
||||
checkCEP==''?Container():Container(
|
||||
width: width*0.7,child: TextDefault(text: checkCEP,fontSize: 15,color: ColorPalette.red,)
|
||||
),
|
||||
Container(
|
||||
width: width*0.7,
|
||||
@@ -1528,7 +1548,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
setState(() {
|
||||
checkBoxNumber = value!;
|
||||
if(checkBoxNumber){
|
||||
numberController.text = 'N/A';
|
||||
numberController.text = 'S/N';
|
||||
}else{
|
||||
numberController.clear();
|
||||
}
|
||||
@@ -1666,11 +1686,12 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
hintInput: 'Escreva aqui',
|
||||
maxLength: 3,
|
||||
enabled: !edit,
|
||||
mandatory: false,
|
||||
mandatory: mandatory,
|
||||
textInputType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly,],
|
||||
onChanged: (v)=>setState((){}),
|
||||
),
|
||||
selectDeficiency==null&& mandatory?ErrorDefault():Container(),
|
||||
InputWithSubtitle(
|
||||
controller: mobileController,
|
||||
subtitle: 'Celular (Só Números)',
|
||||
@@ -1681,11 +1702,12 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
widthSubtitle: width*0.7,
|
||||
hintInput: 'Escreva aqui',
|
||||
enabled: !edit,
|
||||
mandatory: false,
|
||||
mandatory: mandatory,
|
||||
textInputType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly,],
|
||||
onChanged: (v)=>setState((){}),
|
||||
),
|
||||
selectDeficiency==null&& mandatory?ErrorDefault():Container(),
|
||||
InputWithSubtitle(
|
||||
controller: messageDDDController,
|
||||
subtitle: 'Recado - DDD',
|
||||
@@ -1696,7 +1718,6 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
widthSubtitle: width*0.7,
|
||||
hintInput: 'Escreva aqui',
|
||||
enabled: !edit,
|
||||
mandatory: mandatory,
|
||||
textInputType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly,],
|
||||
onChanged: (v)=>setState((){}),
|
||||
@@ -1711,7 +1732,6 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
widthSubtitle: width*0.7,
|
||||
hintInput: 'Escreva aqui',
|
||||
enabled: !edit,
|
||||
mandatory: mandatory,
|
||||
textInputType: TextInputType.number,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly,],
|
||||
onChanged: (v)=>setState((){}),
|
||||
@@ -1727,8 +1747,18 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
mandatory: false,
|
||||
enabled: !edit,
|
||||
textInputType: TextInputType.emailAddress,
|
||||
onChanged: (v)=>setState((){}),
|
||||
onChanged: (v){
|
||||
if(emailController.text.contains('@') && emailController.text.contains('.')){
|
||||
checkEmail = '';
|
||||
}else{
|
||||
checkEmail = 'E-mail incompleto';
|
||||
}
|
||||
setState((){});
|
||||
},
|
||||
),
|
||||
checkEmail==''?Container():Container(
|
||||
width: width*0.7,child: TextDefault(text: checkEmail,fontSize: 15,color: ColorPalette.red,)
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -2068,6 +2098,10 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
mandatory: false,
|
||||
enabled: !edit,
|
||||
onChanged: (v)=>setState((){}),
|
||||
textInputType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
],
|
||||
),
|
||||
InputWithSubtitle(
|
||||
controller: numberCTPSController,
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
import 'package:rkm/models/pais_modelo.dart';
|
||||
import 'package:rkm/widgets/text_default.dart';
|
||||
import '../config/color_palette.dart';
|
||||
import '../config/const_variable.dart';
|
||||
import 'input_search_text.dart';
|
||||
|
||||
class DropDownButtonComPesquisaPaises extends StatelessWidget {
|
||||
var onChanged;
|
||||
|
||||
@@ -46,6 +46,7 @@ class DropdownWithSubtitle extends StatelessWidget {
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
name: rkm
|
||||
description: RKM AB 2.0.
|
||||
#Cadastro e edição do Cadastro do Cidadão, Cadastro Individual, Cadastro Domiciliar e Visita Domiciliar
|
||||
#versão 1.0.6+5 finalizada dia 19/02/2024
|
||||
|
||||
publish_to: 'none'
|
||||
version: 1.0.6+5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user