ajustes na tela de Atendimento Domiliar, nos models e alert dialog
This commit is contained in:
@@ -5,6 +5,8 @@ import 'package:rkm/widgets/input_text.dart';
|
||||
import '../../models/check_model.dart';
|
||||
import '../../config/color_palette.dart';
|
||||
import '../../config/const_variable.dart';
|
||||
import '../../models/drop_down_data_model.dart';
|
||||
import '../../service/db/db_querys.dart';
|
||||
import '../../widgets/alert_dialog_default.dart';
|
||||
import '../../widgets/appbar_default.dart';
|
||||
import '../../widgets/button_default.dart';
|
||||
@@ -47,6 +49,7 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
String? selectCBO;
|
||||
String add='';
|
||||
List examsList=[];
|
||||
List <String>listServicePlace=[];
|
||||
List<CheckModel> serviceConditionModel = [];
|
||||
List<CheckModel> trackingModel = [];
|
||||
List<CheckModel> nasfPoloModelList = [];
|
||||
@@ -54,6 +57,7 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
List<CheckModel> proceduresModel = [];
|
||||
List<CheckModel> conductList = [];
|
||||
List<CheckModel> forwardingList = [];
|
||||
List<DropDownDataModel> listCIAP = [];
|
||||
bool switchVaccineUpToDate = false;
|
||||
bool switchPregnancyPlane = false;
|
||||
bool switchResquestedTest = false;
|
||||
@@ -91,6 +95,21 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
loadLists() async{
|
||||
for (int i = 0; ConstVariable().listServicePlace.length > i; i++) {
|
||||
listServicePlace.add(ConstVariable().listServicePlace[i].title);
|
||||
}
|
||||
await DBQuerys().buscaCIAP().then((list){
|
||||
listCIAP.add(DropDownDataModel(cod: int.parse(list['CODIGO_CIAP']), title: list['DESC_CIAP']));
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
loadLists();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -160,7 +179,7 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
colorBorder: ColorPalette.white,
|
||||
),
|
||||
DropdownWithSubtitle(
|
||||
list: ConstVariable().listServicePlace,
|
||||
list: listServicePlace,
|
||||
widthSubtitle: width*0.2,
|
||||
subtitle: 'Local de Atendimento',
|
||||
hintDropdown: 'Local de Atendimento',
|
||||
@@ -193,7 +212,7 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
Spacer(),
|
||||
IconButton(
|
||||
icon: Icon(Icons.people_alt_rounded),
|
||||
onPressed: ()=>AlertDialogDefault().outherProfessionals(
|
||||
onPressed: ()=>AlertDialogDefault().otherProfessionals(
|
||||
context,
|
||||
'Outros Profissionais',
|
||||
'Adicionar Profissional',
|
||||
@@ -518,15 +537,15 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
context,
|
||||
controllerSearchCondition,
|
||||
ListView.separated(
|
||||
itemCount: ConstVariable().CIAP.length,
|
||||
itemCount: listCIAP.length,
|
||||
separatorBuilder: (context,index)=>Divider(color: ColorPalette.black54),
|
||||
itemBuilder: (context,index){
|
||||
return ListTile(
|
||||
onTap: ()=>setState(() {
|
||||
selectCIAP1 = ConstVariable().CIAP[index];
|
||||
selectCIAP1 = listCIAP[index].title;
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
title: TextDefault(text: ConstVariable().CIAP[index],maxLines: 2,)
|
||||
title: TextDefault(text: listCIAP[index].title,maxLines: 2,)
|
||||
);
|
||||
},
|
||||
)
|
||||
@@ -545,15 +564,15 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
context,
|
||||
controllerSearchCondition,
|
||||
ListView.separated(
|
||||
itemCount: ConstVariable().CIAP.length,
|
||||
itemCount: listCIAP.length,
|
||||
separatorBuilder: (context,index)=>Divider(color: ColorPalette.black54),
|
||||
itemBuilder: (context,index){
|
||||
return ListTile(
|
||||
onTap: ()=>setState(() {
|
||||
selectCIAP2 = ConstVariable().CIAP[index];
|
||||
selectCIAP2 = listCIAP[index].title;
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
title: TextDefault(text: ConstVariable().CIAP[index],maxLines: 2,)
|
||||
title: TextDefault(text: listCIAP[index].title,maxLines: 2,)
|
||||
);
|
||||
},
|
||||
)
|
||||
@@ -572,15 +591,15 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
context,
|
||||
controllerSearchCID,
|
||||
ListView.separated(
|
||||
itemCount: ConstVariable().CID.length,
|
||||
itemCount: listCIAP.length,
|
||||
separatorBuilder: (context,index)=>Divider(color: ColorPalette.black54),
|
||||
itemBuilder: (context,index){
|
||||
return ListTile(
|
||||
onTap: ()=>setState(() {
|
||||
selectCID = ConstVariable().CIAP[index];
|
||||
selectCID = listCIAP[index].title;
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
title: TextDefault(text: ConstVariable().CID[index],maxLines: 2,)
|
||||
title: TextDefault(text: listCIAP[index].title,maxLines: 2,)
|
||||
);
|
||||
},
|
||||
)
|
||||
@@ -599,15 +618,15 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
context,
|
||||
controllerSearchCID,
|
||||
ListView.separated(
|
||||
itemCount: ConstVariable().CID.length,
|
||||
itemCount: listCIAP.length,
|
||||
separatorBuilder: (context,index)=>Divider(color: ColorPalette.black54),
|
||||
itemBuilder: (context,index){
|
||||
return ListTile(
|
||||
onTap: ()=>setState(() {
|
||||
selectCID = ConstVariable().CIAP[index];
|
||||
selectCID = listCIAP[index].title;
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
title: TextDefault(text: ConstVariable().CID[index],maxLines: 2,)
|
||||
title: TextDefault(text: listCIAP[index].title,maxLines: 2,)
|
||||
);
|
||||
},
|
||||
)
|
||||
@@ -642,7 +661,7 @@ class _ServiceIndividualScreenState extends State<ServiceIndividualScreen> {
|
||||
Spacer(),
|
||||
IconButton(
|
||||
icon: Icon(Icons.add_circle),
|
||||
onPressed: ()=>AlertDialogDefault().outherExams(
|
||||
onPressed: ()=>AlertDialogDefault().otherExams(
|
||||
context,
|
||||
'Outros Exames',
|
||||
'Adicionar Exames',
|
||||
|
||||
Reference in New Issue
Block a user