fix pat man padding
This commit is contained in:
@@ -79,10 +79,9 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void appointmentPopUp(int index) {
|
void appointmentPopUp(int index, double width) {
|
||||||
var firstLetterFName = widget.patientAccesses[index].fname;
|
var firstLetterFName = widget.patientAccesses[index].fname;
|
||||||
var firstLetterLName = widget.patientAccesses[index].lname;
|
var firstLetterLName = widget.patientAccesses[index].lname;
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
idController.text = widget.patientAccesses[index].id_no;
|
idController.text = widget.patientAccesses[index].id_no;
|
||||||
fnameController.text = firstLetterFName;
|
fnameController.text = firstLetterFName;
|
||||||
@@ -97,7 +96,12 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
windowBody: Column(
|
windowBody: Padding(
|
||||||
|
padding:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
|
? EdgeInsets.symmetric(horizontal: width * 0.056)
|
||||||
|
: const EdgeInsets.symmetric(horizontal: 0),
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MihForm(
|
MihForm(
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
@@ -177,8 +181,9 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttonColor:
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
width: 300,
|
width: 300,
|
||||||
child: Text(
|
child: Text(
|
||||||
"Book Appointment",
|
"Book Appointment",
|
||||||
@@ -197,6 +202,7 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,10 +235,10 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
return hasAccess;
|
return hasAccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void patientProfileChoicePopUp(int index, Patient? patientProfile) async {
|
void patientProfileChoicePopUp(
|
||||||
|
int index, Patient? patientProfile, double width) async {
|
||||||
var firstLetterFName = widget.patientAccesses[index].fname;
|
var firstLetterFName = widget.patientAccesses[index].fname;
|
||||||
var firstLetterLName = widget.patientAccesses[index].lname;
|
var firstLetterLName = widget.patientAccesses[index].lname;
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
idController.text = widget.patientAccesses[index].id_no;
|
idController.text = widget.patientAccesses[index].id_no;
|
||||||
fnameController.text = firstLetterFName;
|
fnameController.text = firstLetterFName;
|
||||||
@@ -247,12 +253,18 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
windowBody: Column(
|
windowBody: Padding(
|
||||||
|
padding:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
|
? EdgeInsets.symmetric(horizontal: width * 0.05)
|
||||||
|
: const EdgeInsets.symmetric(horizontal: 0),
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: idController,
|
controller: idController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
@@ -266,7 +278,8 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: fnameController,
|
controller: fnameController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
@@ -280,7 +293,8 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: lnameController,
|
controller: lnameController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
@@ -298,10 +312,11 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
children: [
|
children: [
|
||||||
MihButton(
|
MihButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
appointmentPopUp(index);
|
appointmentPopUp(index, width);
|
||||||
},
|
},
|
||||||
buttonColor:
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
width: 300,
|
width: 300,
|
||||||
child: Text(
|
child: Text(
|
||||||
"Book Appointment",
|
"Book Appointment",
|
||||||
@@ -346,10 +361,11 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget displayMyPatientTile(int index) {
|
Widget displayMyPatientTile(int index, double width) {
|
||||||
var firstName = "";
|
var firstName = "";
|
||||||
var lastName = "";
|
var lastName = "";
|
||||||
String access = widget.patientAccesses[index].status.toUpperCase();
|
String access = widget.patientAccesses[index].status.toUpperCase();
|
||||||
@@ -407,7 +423,7 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
p = result;
|
p = result;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
patientProfileChoicePopUp(index, p);
|
patientProfileChoicePopUp(index, p, width);
|
||||||
} else {
|
} else {
|
||||||
noAccessWarning(index);
|
noAccessWarning(index);
|
||||||
}
|
}
|
||||||
@@ -431,6 +447,7 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
@@ -441,7 +458,7 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
},
|
},
|
||||||
itemCount: widget.patientAccesses.length,
|
itemCount: widget.patientAccesses.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return displayMyPatientTile(index);
|
return displayMyPatientTile(index, screenWidth);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
// Business Appointment Tool
|
// Business Appointment Tool
|
||||||
Widget getBusinessAppointmentsTool() {
|
Widget getBusinessAppointmentsTool(double width) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
@@ -139,7 +139,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// addAppointmentWindow();
|
// addAppointmentWindow();
|
||||||
appointmentTypeSelection();
|
appointmentTypeSelection(width);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -205,7 +205,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void appointmentTypeSelection() {
|
void appointmentTypeSelection(double width) {
|
||||||
String question = "What type of appointment would you like to add?";
|
String question = "What type of appointment would you like to add?";
|
||||||
question +=
|
question +=
|
||||||
"\n\nExisting Patient: Add an appointment for an patient your practice has access to.";
|
"\n\nExisting Patient: Add an appointment for an patient your practice has access to.";
|
||||||
@@ -276,7 +276,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
MihButton(
|
MihButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
addAppointmentWindow();
|
addAppointmentWindow(width);
|
||||||
},
|
},
|
||||||
buttonColor:
|
buttonColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
@@ -298,7 +298,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void addAppointmentWindow() {
|
void addAppointmentWindow(double width) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
@@ -314,14 +314,20 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
_appointmentDescriptionIDController.clear();
|
_appointmentDescriptionIDController.clear();
|
||||||
_patientController.clear();
|
_patientController.clear();
|
||||||
},
|
},
|
||||||
windowBody: Column(
|
windowBody: Padding(
|
||||||
|
padding:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
|
? EdgeInsets.symmetric(horizontal: width * 0.05)
|
||||||
|
: const EdgeInsets.symmetric(horizontal: 0),
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MihForm(
|
MihForm(
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
formFields: [
|
formFields: [
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
inputColor:
|
inputColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: _appointmentTitleController,
|
controller: _appointmentTitleController,
|
||||||
@@ -353,8 +359,9 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
height: 250,
|
height: 250,
|
||||||
fillColor:
|
fillColor: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
inputColor:
|
inputColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: _appointmentDescriptionIDController,
|
controller: _appointmentDescriptionIDController,
|
||||||
@@ -373,8 +380,9 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
addAppointmentCall();
|
addAppointmentCall();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttonColor:
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
.theme
|
||||||
|
.successColor(),
|
||||||
width: 300,
|
width: 300,
|
||||||
child: Text(
|
child: Text(
|
||||||
"Add",
|
"Add",
|
||||||
@@ -392,6 +400,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -477,9 +486,10 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
bodyItem: getBusinessAppointmentsTool(),
|
bodyItem: getBusinessAppointmentsTool(screenWidth),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user