forked from yaso_meth/mih-project
rename files and widgets from my... to mih...
This commit is contained in:
@@ -3,9 +3,9 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/BuildFileView.dart';
|
||||
import 'package:patient_manager/components/mihDeleteMessage.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
@@ -122,7 +122,7 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -198,7 +198,7 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: () {
|
||||
html.window.open(
|
||||
url,
|
||||
|
||||
@@ -2,9 +2,9 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/mihDeleteMessage.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/myMLTextInput.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihMLTextInput.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
@@ -58,7 +58,7 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -129,7 +129,7 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||
),
|
||||
const SizedBox(height: 25.0),
|
||||
Expanded(
|
||||
child: MyMLTextField(
|
||||
child: MIHMLTextField(
|
||||
controller: noteTextController,
|
||||
hintText: "Note Details",
|
||||
editable: false,
|
||||
@@ -140,7 +140,7 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||
// SizedBox(
|
||||
// width: 300,
|
||||
// height: 100,
|
||||
// child: MyButton(
|
||||
// child: MIHButton(
|
||||
// onTap: () {
|
||||
// Navigator.pop(context);
|
||||
// },
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
import 'package:patient_manager/objects/arguments.dart';
|
||||
import 'package:patient_manager/objects/patients.dart';
|
||||
//import 'package:patient_manager/pages/patientView.dart';
|
||||
|
||||
class BuildPatientsList extends StatefulWidget {
|
||||
final List<Patient> patients;
|
||||
@@ -20,6 +20,104 @@ class BuildPatientsList extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _BuildPatientsListState extends State<BuildPatientsList> {
|
||||
TextEditingController dateController = TextEditingController();
|
||||
TextEditingController timeController = TextEditingController();
|
||||
|
||||
void submitApointment() {}
|
||||
|
||||
bool isAppointmentFieldsFilled() {
|
||||
if (dateController.text.isEmpty || timeController.text.isEmpty) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void appointmentPopUp() {
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => Dialog(
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
width: 700.0,
|
||||
//height: 475.0,
|
||||
decoration: BoxDecoration(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
border: Border.all(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Add Patient to appointment",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
fontSize: 35.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MIHButton(
|
||||
buttonText: "Generate",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
textColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
onTap: () {
|
||||
if (isAppointmentFieldsFilled()) {
|
||||
submitApointment();
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MIHErrorMessage(
|
||||
errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: 5,
|
||||
width: 50,
|
||||
height: 50,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||
size: 35,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget isMainMember(int index) {
|
||||
//var matchRE = RegExp(r'^[a-z]+$');
|
||||
var firstLetterFName = widget.patients[index].first_name[0];
|
||||
@@ -91,9 +189,9 @@ class _BuildPatientsListState extends State<BuildPatientsList> {
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
Navigator.of(context).pushNamed('/patient-manager/patient',
|
||||
arguments: PatientViewArguments(
|
||||
widget.signedInUser, widget.patients[index], "business"));
|
||||
// Navigator.of(context).pushNamed('/patient-manager/patient',
|
||||
// arguments: PatientViewArguments(
|
||||
// widget.signedInUser, widget.patients[index], "business"));
|
||||
});
|
||||
},
|
||||
trailing: Icon(
|
||||
|
||||
@@ -6,8 +6,8 @@ import 'package:patient_manager/components/mihAppDrawer.dart';
|
||||
import 'package:patient_manager/components/mihDeleteMessage.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/mihWarningMessage.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
@@ -227,7 +227,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Invalid Username");
|
||||
return const MIHErrorMessage(errorType: "Invalid Username");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -239,7 +239,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MySuccessMessage(
|
||||
return const MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage:
|
||||
"Congratulations! Your account has been created successfully. You are log in and can start exploring.\n\nPlease note: more apps will appear once you update your profile.");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/myDateInput.dart';
|
||||
import 'package:patient_manager/components/mihDateInput.dart';
|
||||
|
||||
class Medcertinput extends StatefulWidget {
|
||||
final startDateController;
|
||||
@@ -26,7 +26,7 @@ class _MedcertinputState extends State<Medcertinput> {
|
||||
const SizedBox(height: 50.0),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: MyDateField(
|
||||
child: MIHDateField(
|
||||
controller: widget.startDateController,
|
||||
LableText: "From",
|
||||
required: true,
|
||||
@@ -35,7 +35,7 @@ class _MedcertinputState extends State<Medcertinput> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: MyDateField(
|
||||
child: MIHDateField(
|
||||
controller: widget.endDateTextController,
|
||||
LableText: "Up to Including",
|
||||
required: true,
|
||||
@@ -44,7 +44,7 @@ class _MedcertinputState extends State<Medcertinput> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: MyDateField(
|
||||
child: MIHDateField(
|
||||
controller: widget.retDateTextController,
|
||||
LableText: "Return",
|
||||
required: true,
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/buildMedList.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/medicine.dart';
|
||||
@@ -47,7 +47,7 @@ class _MedicineSearchState extends State<MedicineSearch> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MyButton extends StatelessWidget {
|
||||
class MIHButton extends StatelessWidget {
|
||||
final void Function() onTap;
|
||||
final String buttonText;
|
||||
final Color buttonColor;
|
||||
final Color textColor;
|
||||
|
||||
const MyButton({
|
||||
const MIHButton({
|
||||
super.key,
|
||||
required this.onTap,
|
||||
required this.buttonText,
|
||||
@@ -1,12 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MyDateField extends StatefulWidget {
|
||||
class MIHDateField extends StatefulWidget {
|
||||
final controller;
|
||||
final String LableText;
|
||||
final bool required;
|
||||
|
||||
const MyDateField({
|
||||
const MIHDateField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.LableText,
|
||||
@@ -14,10 +14,10 @@ class MyDateField extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<MyDateField> createState() => _MyDateFieldState();
|
||||
State<MIHDateField> createState() => _MIHDateFieldState();
|
||||
}
|
||||
|
||||
class _MyDateFieldState extends State<MyDateField> {
|
||||
class _MIHDateFieldState extends State<MIHDateField> {
|
||||
FocusNode _focus = FocusNode();
|
||||
bool startup = true;
|
||||
// bool makeEditable() {
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MIHDeleteMessage extends StatefulWidget {
|
||||
@@ -72,7 +72,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: widget.onTap,
|
||||
buttonText: "Delete",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
@@ -157,7 +157,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: widget.onTap,
|
||||
buttonText: "Delete",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MyDropdownField extends StatefulWidget {
|
||||
class MIHDropdownField extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
final String hintText;
|
||||
final bool required;
|
||||
@@ -9,7 +9,7 @@ class MyDropdownField extends StatefulWidget {
|
||||
final void Function(String?)? onSelect;
|
||||
final bool editable;
|
||||
|
||||
const MyDropdownField({
|
||||
const MIHDropdownField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hintText,
|
||||
@@ -20,10 +20,10 @@ class MyDropdownField extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<MyDropdownField> createState() => _MyDropdownFieldState();
|
||||
State<MIHDropdownField> createState() => _MIHDropdownFieldState();
|
||||
}
|
||||
|
||||
class _MyDropdownFieldState extends State<MyDropdownField> {
|
||||
class _MIHDropdownFieldState extends State<MIHDropdownField> {
|
||||
//var dropbownItems = ["Dr.", "Assistant"];
|
||||
bool startup = true;
|
||||
final FocusNode _focus = FocusNode();
|
||||
@@ -1,18 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MyErrorMessage extends StatefulWidget {
|
||||
class MIHErrorMessage extends StatefulWidget {
|
||||
final String errorType;
|
||||
const MyErrorMessage({
|
||||
const MIHErrorMessage({
|
||||
super.key,
|
||||
required this.errorType,
|
||||
});
|
||||
|
||||
@override
|
||||
State<MyErrorMessage> createState() => _MyErrorMessageState();
|
||||
State<MIHErrorMessage> createState() => _MIHErrorMessageState();
|
||||
}
|
||||
|
||||
class _MyErrorMessageState extends State<MyErrorMessage> {
|
||||
class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
||||
var messageTypes = <String, Widget>{};
|
||||
// late double width = 50;
|
||||
// late double height = 50;
|
||||
@@ -1,14 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MyFileField extends StatefulWidget {
|
||||
class MIHFileField extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
final String hintText;
|
||||
final bool editable;
|
||||
final bool required;
|
||||
final void Function() onPressed;
|
||||
|
||||
const MyFileField({
|
||||
const MIHFileField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hintText,
|
||||
@@ -18,10 +18,10 @@ class MyFileField extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<MyFileField> createState() => _MyFileFieldState();
|
||||
State<MIHFileField> createState() => _MIHFileFieldState();
|
||||
}
|
||||
|
||||
class _MyFileFieldState extends State<MyFileField> {
|
||||
class _MIHFileFieldState extends State<MIHFileField> {
|
||||
bool startup = true;
|
||||
FocusNode _focus = FocusNode();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MyMLTextField extends StatefulWidget {
|
||||
class MIHMLTextField extends StatefulWidget {
|
||||
final controller;
|
||||
final String hintText;
|
||||
final bool editable;
|
||||
final bool required;
|
||||
|
||||
const MyMLTextField({
|
||||
const MIHMLTextField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hintText,
|
||||
@@ -16,10 +16,10 @@ class MyMLTextField extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<MyMLTextField> createState() => _MyMLTextFieldState();
|
||||
State<MIHMLTextField> createState() => _MIHMLTextFieldState();
|
||||
}
|
||||
|
||||
class _MyMLTextFieldState extends State<MyMLTextField> {
|
||||
class _MIHMLTextFieldState extends State<MIHMLTextField> {
|
||||
bool startup = true;
|
||||
FocusNode _focus = FocusNode();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MyPassField extends StatefulWidget {
|
||||
class MIHPassField extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
final String hintText;
|
||||
final bool required;
|
||||
final bool signIn;
|
||||
|
||||
const MyPassField({
|
||||
const MIHPassField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hintText,
|
||||
@@ -16,10 +16,10 @@ class MyPassField extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<MyPassField> createState() => _MyPassFieldState();
|
||||
State<MIHPassField> createState() => _MIHPassFieldState();
|
||||
}
|
||||
|
||||
class _MyPassFieldState extends State<MyPassField> {
|
||||
class _MIHPassFieldState extends State<MIHPassField> {
|
||||
bool startup = true;
|
||||
final textFieldFocusNode = FocusNode();
|
||||
bool _obscured = true;
|
||||
@@ -1,14 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MySearchField extends StatefulWidget {
|
||||
class MIHSearchField extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
final String hintText;
|
||||
final bool required;
|
||||
final bool editable;
|
||||
final void Function() onTap;
|
||||
|
||||
const MySearchField({
|
||||
const MIHSearchField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hintText,
|
||||
@@ -18,10 +18,10 @@ class MySearchField extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<MySearchField> createState() => _MySearchFieldState();
|
||||
State<MIHSearchField> createState() => _MIHSearchFieldState();
|
||||
}
|
||||
|
||||
class _MySearchFieldState extends State<MySearchField> {
|
||||
class _MIHSearchFieldState extends State<MIHSearchField> {
|
||||
bool startup = true;
|
||||
FocusNode _focus = FocusNode();
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MySuccessMessage extends StatefulWidget {
|
||||
class MIHSuccessMessage extends StatefulWidget {
|
||||
final String successType;
|
||||
final String successMessage;
|
||||
const MySuccessMessage({
|
||||
const MIHSuccessMessage({
|
||||
super.key,
|
||||
required this.successType,
|
||||
required this.successMessage,
|
||||
});
|
||||
|
||||
@override
|
||||
State<MySuccessMessage> createState() => _MySuccessMessageState();
|
||||
State<MIHSuccessMessage> createState() => _MIHSuccessMessageState();
|
||||
}
|
||||
|
||||
class _MySuccessMessageState extends State<MySuccessMessage> {
|
||||
class _MIHSuccessMessageState extends State<MIHSuccessMessage> {
|
||||
var messageTypes = <String, Widget>{};
|
||||
late String message;
|
||||
|
||||
@@ -71,7 +71,7 @@ class _MySuccessMessageState extends State<MySuccessMessage> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
@@ -1,13 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MyTextField extends StatefulWidget {
|
||||
class MIHTextField extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
final String hintText;
|
||||
final bool editable;
|
||||
final bool required;
|
||||
|
||||
const MyTextField({
|
||||
const MIHTextField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hintText,
|
||||
@@ -16,10 +16,10 @@ class MyTextField extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<MyTextField> createState() => _MyTextFieldState();
|
||||
State<MIHTextField> createState() => _MIHTextFieldState();
|
||||
}
|
||||
|
||||
class _MyTextFieldState extends State<MyTextField> {
|
||||
class _MIHTextFieldState extends State<MIHTextField> {
|
||||
bool startup = true;
|
||||
FocusNode _focus = FocusNode();
|
||||
|
||||
146
Frontend/patient_manager/lib/components/mihTimeInput.dart
Normal file
146
Frontend/patient_manager/lib/components/mihTimeInput.dart
Normal file
@@ -0,0 +1,146 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class MIHDateField extends StatefulWidget {
|
||||
final controller;
|
||||
final String LableText;
|
||||
final bool required;
|
||||
|
||||
const MIHDateField({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.LableText,
|
||||
required this.required,
|
||||
});
|
||||
|
||||
@override
|
||||
State<MIHDateField> createState() => _MIHDateFieldState();
|
||||
}
|
||||
|
||||
class _MIHDateFieldState extends State<MIHDateField> {
|
||||
FocusNode _focus = FocusNode();
|
||||
bool startup = true;
|
||||
// bool makeEditable() {
|
||||
Future<void> _selectDate(BuildContext context) async {
|
||||
DateTime? picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: DateTime.now(),
|
||||
firstDate: DateTime(2000),
|
||||
lastDate: DateTime(2100),
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
widget.controller.text = picked.toString().split(" ")[0];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Widget setRequiredText() {
|
||||
if (widget.required) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"*",
|
||||
style: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.errorColor()),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 8.0,
|
||||
),
|
||||
Text(widget.LableText,
|
||||
style: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor())),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return Text(widget.LableText,
|
||||
style: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()));
|
||||
}
|
||||
}
|
||||
|
||||
void _onFocusChange() {
|
||||
setState(() {
|
||||
startup = false;
|
||||
});
|
||||
}
|
||||
|
||||
String? get _errorText {
|
||||
final text = widget.controller.text;
|
||||
if (startup) {
|
||||
return null;
|
||||
}
|
||||
if (!widget.required) {
|
||||
return null;
|
||||
}
|
||||
if (text.isEmpty) {
|
||||
return "${widget.LableText} is required";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_focus.addListener(_onFocusChange);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextField(
|
||||
style: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||
controller: widget.controller,
|
||||
readOnly: true,
|
||||
obscureText: false,
|
||||
focusNode: _focus,
|
||||
onChanged: (_) => setState(() {
|
||||
startup = false;
|
||||
}),
|
||||
decoration: InputDecoration(
|
||||
errorText: _errorText,
|
||||
errorStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||
fontWeight: FontWeight.bold),
|
||||
label: setRequiredText(),
|
||||
//labelText: widget.LableText,
|
||||
//labelStyle: const TextStyle(color: Colors.blueAccent),
|
||||
prefixIcon: Icon(
|
||||
Icons.calendar_today,
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
),
|
||||
fillColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
filled: true,
|
||||
//hintText: hintText,
|
||||
//hintStyle: TextStyle(color: Colors.blueGrey[400]),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
_selectDate(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/patients.dart';
|
||||
|
||||
@@ -41,7 +41,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
children: [
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: idController,
|
||||
hintText: "ID No.",
|
||||
editable: false,
|
||||
@@ -49,7 +49,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: fnameController,
|
||||
hintText: "Name",
|
||||
editable: false,
|
||||
@@ -57,7 +57,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: lnameController,
|
||||
hintText: "Surname",
|
||||
editable: false,
|
||||
@@ -65,7 +65,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: cellController,
|
||||
hintText: "Cell No.",
|
||||
editable: false,
|
||||
@@ -73,7 +73,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: emailController,
|
||||
hintText: "Email",
|
||||
editable: false,
|
||||
@@ -81,7 +81,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: addressController,
|
||||
hintText: "Address",
|
||||
editable: false,
|
||||
@@ -95,7 +95,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
List<Widget> medAidDet = [];
|
||||
medAidDet.add(SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: medAidController,
|
||||
hintText: "Medical Aid",
|
||||
editable: false,
|
||||
@@ -112,7 +112,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
visible: req,
|
||||
child: SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: medMainMemController,
|
||||
hintText: "Main Member",
|
||||
editable: false,
|
||||
@@ -124,7 +124,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
visible: req,
|
||||
child: SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: medNoController,
|
||||
hintText: "No.",
|
||||
editable: false,
|
||||
@@ -136,7 +136,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
visible: req,
|
||||
child: SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: medAidCodeController,
|
||||
hintText: "Code",
|
||||
editable: false,
|
||||
@@ -148,7 +148,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
visible: req,
|
||||
child: SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: medNameController,
|
||||
hintText: "Name",
|
||||
editable: false,
|
||||
@@ -160,7 +160,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
visible: req,
|
||||
child: SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: medSchemeController,
|
||||
hintText: "Scheme",
|
||||
editable: false,
|
||||
|
||||
@@ -6,10 +6,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/buildFilesList.dart';
|
||||
import 'package:patient_manager/components/medCertInput.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/components/prescipInput.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
@@ -229,7 +229,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -290,7 +290,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Generate",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
@@ -305,7 +305,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(
|
||||
return const MIHErrorMessage(
|
||||
errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
@@ -450,7 +450,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Select File",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
@@ -475,7 +475,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
},
|
||||
),
|
||||
),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: selectedFileController,
|
||||
hintText: "Selected FIle",
|
||||
editable: false,
|
||||
@@ -484,7 +484,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Add File",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
@@ -499,7 +499,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(
|
||||
return const MIHErrorMessage(
|
||||
errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
@@ -536,7 +536,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/buildNotesList.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/myMLTextInput.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihMLTextInput.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
@@ -81,7 +81,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -93,7 +93,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: titleController,
|
||||
hintText: "Title of Note",
|
||||
editable: true,
|
||||
@@ -154,7 +154,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
),
|
||||
const SizedBox(height: 25.0),
|
||||
Expanded(
|
||||
child: MyMLTextField(
|
||||
child: MIHMLTextField(
|
||||
controller: noteTextController,
|
||||
hintText: "Note Details",
|
||||
editable: true,
|
||||
@@ -164,7 +164,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: () {
|
||||
if (isFieldsFilled()) {
|
||||
addPatientNoteAPICall();
|
||||
@@ -173,7 +173,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(
|
||||
return const MIHErrorMessage(
|
||||
errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/medicineSearch.dart';
|
||||
import 'package:patient_manager/components/myDropdownInput.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySearchInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihDropdownInput.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihSearchInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
|
||||
class PrescripInput extends StatefulWidget {
|
||||
@@ -126,7 +126,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: MySearchField(
|
||||
child: MIHSearchField(
|
||||
controller: widget.medicineController,
|
||||
hintText: "Medicine",
|
||||
required: true,
|
||||
@@ -139,7 +139,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: MyDropdownField(
|
||||
child: MIHDropdownField(
|
||||
controller: widget.quantityController,
|
||||
hintText: "Quantity",
|
||||
dropdownOptions: numberOptions,
|
||||
@@ -150,7 +150,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: MyDropdownField(
|
||||
child: MIHDropdownField(
|
||||
controller: widget.dosageController,
|
||||
hintText: "Dosage",
|
||||
dropdownOptions: numberOptions,
|
||||
@@ -161,7 +161,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: MyDropdownField(
|
||||
child: MIHDropdownField(
|
||||
controller: widget.timesDailyController,
|
||||
hintText: "Times Daily",
|
||||
dropdownOptions: numberOptions,
|
||||
@@ -172,7 +172,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: MyDropdownField(
|
||||
child: MIHDropdownField(
|
||||
controller: widget.noDaysController,
|
||||
hintText: "No. Days",
|
||||
dropdownOptions: numberOptions,
|
||||
@@ -183,7 +183,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
const SizedBox(height: 25.0),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: MyDropdownField(
|
||||
child: MIHDropdownField(
|
||||
controller: widget.noRepeatsController,
|
||||
hintText: "No. Repeats",
|
||||
dropdownOptions: numberOptions,
|
||||
@@ -193,7 +193,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Add",
|
||||
buttonColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
@@ -215,7 +215,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
return const MIHErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -281,7 +281,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: () {
|
||||
// if (isMedCertFieldsFilled()) {
|
||||
// generateMedCert();
|
||||
@@ -290,7 +290,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (context) {
|
||||
// return const MyErrorMessage(
|
||||
// return const MIHErrorMessage(
|
||||
// errorType: "Input Error");
|
||||
// },
|
||||
// );
|
||||
|
||||
@@ -2,11 +2,11 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:patient_manager/components/myDropdownInput.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihDropdownInput.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
@@ -114,7 +114,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -170,7 +170,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: idController,
|
||||
hintText: "13 digit ID Number or Passport",
|
||||
editable: true,
|
||||
@@ -178,7 +178,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
),
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: fnameController,
|
||||
hintText: "First Name",
|
||||
editable: false,
|
||||
@@ -186,7 +186,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
),
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: lnameController,
|
||||
hintText: "Last Name",
|
||||
editable: false,
|
||||
@@ -195,7 +195,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: cellController,
|
||||
hintText: "Cell Number",
|
||||
editable: true,
|
||||
@@ -204,7 +204,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: emailController,
|
||||
hintText: "Email",
|
||||
editable: false,
|
||||
@@ -213,7 +213,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: addressController,
|
||||
hintText: "Address",
|
||||
editable: true,
|
||||
@@ -232,7 +232,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: medAidController,
|
||||
hintText: "Medical Aid",
|
||||
editable: true,
|
||||
@@ -247,7 +247,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 10.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: medMainMemController,
|
||||
hintText: "Main Member",
|
||||
editable: medRequired,
|
||||
@@ -255,28 +255,28 @@ class _AddPatientState extends State<AddPatient> {
|
||||
dropdownOptions: const ["Yes", "No"],
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medNoController,
|
||||
hintText: "Medical Aid No.",
|
||||
editable: medRequired,
|
||||
required: medRequired,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medAidCodeController,
|
||||
hintText: "Medical Aid Code",
|
||||
editable: medRequired,
|
||||
required: medRequired,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medNameController,
|
||||
hintText: "Medical Aid Name",
|
||||
editable: medRequired,
|
||||
required: medRequired,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medSchemeController,
|
||||
hintText: "Medical Aid Scheme",
|
||||
editable: medRequired,
|
||||
@@ -291,7 +291,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
SizedBox(
|
||||
width: 450.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: () {
|
||||
submitForm();
|
||||
},
|
||||
@@ -313,7 +313,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
return const MIHErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:patient_manager/components/mihAppBar.dart';
|
||||
import 'package:patient_manager/components/myDropdownInput.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihDropdownInput.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/patients.dart';
|
||||
@@ -163,7 +163,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -259,7 +259,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 100,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: deletePatientApiCall,
|
||||
buttonText: "Delete",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
@@ -299,7 +299,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -382,7 +382,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: idController,
|
||||
hintText: "13 digit ID Number or Passport",
|
||||
editable: false,
|
||||
@@ -390,7 +390,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
),
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: fnameController,
|
||||
hintText: "First Name",
|
||||
editable: false,
|
||||
@@ -398,7 +398,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
),
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: lnameController,
|
||||
hintText: "Last Name",
|
||||
editable: false,
|
||||
@@ -406,7 +406,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
),
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: cellController,
|
||||
hintText: "Cell Number",
|
||||
editable: true,
|
||||
@@ -414,7 +414,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
),
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: emailController,
|
||||
hintText: "Email",
|
||||
editable: false,
|
||||
@@ -422,7 +422,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
),
|
||||
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: addressController,
|
||||
hintText: "Address",
|
||||
editable: true,
|
||||
@@ -440,7 +440,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: medAidController,
|
||||
hintText: "Medical Aid",
|
||||
onSelect: (selected) {
|
||||
@@ -463,7 +463,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 10.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: medMainMemController,
|
||||
hintText: "Main Member.",
|
||||
editable: medRequired,
|
||||
@@ -471,28 +471,28 @@ class _EditPatientState extends State<EditPatient> {
|
||||
dropdownOptions: const ["Yes", "No"],
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medNoController,
|
||||
hintText: "Medical Aid No.",
|
||||
editable: medRequired,
|
||||
required: medRequired,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medAidCodeController,
|
||||
hintText: "Medical Aid Code",
|
||||
editable: medRequired,
|
||||
required: medRequired,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medNameController,
|
||||
hintText: "Medical Aid Name",
|
||||
editable: medRequired,
|
||||
required: medRequired,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: medSchemeController,
|
||||
hintText: "Medical Aid Scheme",
|
||||
editable: medRequired,
|
||||
@@ -506,7 +506,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
onTap: () {
|
||||
submitForm();
|
||||
},
|
||||
@@ -537,7 +537,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
return const MIHErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@ import 'package:patient_manager/components/buildPatientList.dart';
|
||||
import 'package:patient_manager/components/buildPatientQueueList.dart';
|
||||
import 'package:patient_manager/components/mihAppBar.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myDateInput.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihDateInput.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/objects/arguments.dart';
|
||||
import 'package:patient_manager/objects/patientQueue.dart';
|
||||
import 'package:supertokens_flutter/http.dart' as http;
|
||||
import 'package:patient_manager/components/mySearchInput.dart';
|
||||
import 'package:patient_manager/components/mihSearchInput.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/patients.dart';
|
||||
@@ -177,7 +177,7 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
),
|
||||
//spacer
|
||||
const SizedBox(height: 10),
|
||||
MySearchField(
|
||||
MIHSearchField(
|
||||
controller: searchController,
|
||||
hintText: "ID or Medical Aid No. Search",
|
||||
required: true,
|
||||
@@ -304,7 +304,7 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
MyDateField(
|
||||
MIHDateField(
|
||||
controller: queueDateController,
|
||||
LableText: "Date",
|
||||
required: true,
|
||||
@@ -383,7 +383,7 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
return const MIHErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:patient_manager/components/mihAppBar.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myDropdownInput.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/myFileInput.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihDropdownInput.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihFileInput.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
@@ -128,7 +128,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -184,21 +184,21 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: regController,
|
||||
hintText: "Registration No.",
|
||||
editable: true,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: nameController,
|
||||
hintText: "Business Name",
|
||||
editable: true,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: typeController,
|
||||
hintText: "Business Type",
|
||||
dropdownOptions: const ["Doctors Office", "Other"],
|
||||
@@ -206,7 +206,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
editable: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyFileField(
|
||||
MIHFileField(
|
||||
controller: logonameController,
|
||||
hintText: "Logo",
|
||||
editable: false,
|
||||
@@ -240,7 +240,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: titleController,
|
||||
hintText: "Title",
|
||||
dropdownOptions: const ["Doctor", "Assistant"],
|
||||
@@ -248,21 +248,21 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
editable: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: fnameController,
|
||||
hintText: "Name",
|
||||
editable: false,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: lnameController,
|
||||
hintText: "Surname",
|
||||
editable: false,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyFileField(
|
||||
MIHFileField(
|
||||
controller: signtureController,
|
||||
hintText: "Signature",
|
||||
editable: false,
|
||||
@@ -284,7 +284,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: accessController,
|
||||
hintText: "Access",
|
||||
dropdownOptions: const ["Full", "Partial"],
|
||||
@@ -295,7 +295,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Add",
|
||||
buttonColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
|
||||
@@ -5,12 +5,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:patient_manager/components/mihAppBar.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myDropdownInput.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/myFileInput.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihDropdownInput.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihFileInput.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/arguments.dart';
|
||||
@@ -196,7 +196,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -205,7 +205,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -270,21 +270,21 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: regController,
|
||||
hintText: "Registration No.",
|
||||
editable: true,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: nameController,
|
||||
hintText: "Business Name",
|
||||
editable: true,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: typeController,
|
||||
hintText: "Business Type",
|
||||
dropdownOptions: const ["Doctors Office", "Other"],
|
||||
@@ -292,7 +292,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
editable: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyFileField(
|
||||
MIHFileField(
|
||||
controller: logonameController,
|
||||
hintText: "Logo",
|
||||
editable: false,
|
||||
@@ -331,7 +331,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: titleController,
|
||||
hintText: "Title",
|
||||
dropdownOptions: const ["Doctor", "Assistant"],
|
||||
@@ -339,21 +339,21 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
editable: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: fnameController,
|
||||
hintText: "Name",
|
||||
editable: false,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: lnameController,
|
||||
hintText: "Surname",
|
||||
editable: false,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyFileField(
|
||||
MIHFileField(
|
||||
controller: signtureController,
|
||||
hintText: "Signature",
|
||||
editable: false,
|
||||
@@ -375,7 +375,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
MyDropdownField(
|
||||
MIHDropdownField(
|
||||
controller: accessController,
|
||||
hintText: "Access",
|
||||
dropdownOptions: const ["Full", "Partial"],
|
||||
@@ -386,7 +386,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Add",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
|
||||
@@ -3,10 +3,10 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:patient_manager/components/mihAppBar.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/objects/appUser.dart';
|
||||
@@ -98,7 +98,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MySuccessMessage(
|
||||
return MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: message,
|
||||
);
|
||||
@@ -119,7 +119,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Invalid Username");
|
||||
return const MIHErrorMessage(errorType: "Invalid Username");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -136,7 +136,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
return const MIHErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -180,21 +180,21 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: usernameController,
|
||||
hintText: "Username",
|
||||
editable: true,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: fnameController,
|
||||
hintText: "First Name",
|
||||
editable: true,
|
||||
required: true,
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
MyTextField(
|
||||
MIHTextField(
|
||||
controller: lnameController,
|
||||
hintText: "Last Name",
|
||||
editable: true,
|
||||
@@ -229,7 +229,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Update",
|
||||
buttonColor:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
|
||||
@@ -3,11 +3,11 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/myPassInput.dart';
|
||||
import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihPassInput.dart';
|
||||
import 'package:patient_manager/components/mihSuccessMessage.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
//import 'package:patient_manager/objects/sessionST.dart';
|
||||
@@ -139,7 +139,7 @@ class _RegisterState extends State<Register> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Internet Connection");
|
||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -148,7 +148,7 @@ class _RegisterState extends State<Register> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MySuccessMessage(
|
||||
return const MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage:
|
||||
"Congratulations! Your account has been created successfully. You are logged in and can start exploring.\n\nPlease note: more apps will appear once you update your profile.");
|
||||
@@ -160,7 +160,7 @@ class _RegisterState extends State<Register> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "User Exists");
|
||||
return const MIHErrorMessage(errorType: "User Exists");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ class _RegisterState extends State<Register> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Password Match");
|
||||
return const MIHErrorMessage(errorType: "Password Match");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ class _RegisterState extends State<Register> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Invalid Email");
|
||||
return const MIHErrorMessage(errorType: "Invalid Email");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -187,7 +187,7 @@ class _RegisterState extends State<Register> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Password Requirements");
|
||||
return const MIHErrorMessage(errorType: "Password Requirements");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -210,7 +210,7 @@ class _RegisterState extends State<Register> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
return const MIHErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
} else {
|
||||
@@ -272,7 +272,7 @@ class _RegisterState extends State<Register> {
|
||||
//email input
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: emailController,
|
||||
hintText: 'Email',
|
||||
editable: true,
|
||||
@@ -284,7 +284,7 @@ class _RegisterState extends State<Register> {
|
||||
//password input
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
child: MyPassField(
|
||||
child: MIHPassField(
|
||||
controller: passwordController,
|
||||
hintText: 'Password',
|
||||
required: true,
|
||||
@@ -296,7 +296,7 @@ class _RegisterState extends State<Register> {
|
||||
//password input
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
child: MyPassField(
|
||||
child: MIHPassField(
|
||||
controller: confirmPasswordController,
|
||||
hintText: 'Confirm Password',
|
||||
required: true,
|
||||
@@ -309,7 +309,7 @@ class _RegisterState extends State<Register> {
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Sign Up",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
|
||||
@@ -3,10 +3,10 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/components/myPassInput.dart';
|
||||
import 'package:patient_manager/components/myTextInput.dart';
|
||||
import 'package:patient_manager/components/mybutton.dart';
|
||||
import 'package:patient_manager/components/mihErrorMessage.dart';
|
||||
import 'package:patient_manager/components/mihPassInput.dart';
|
||||
import 'package:patient_manager/components/mihTextInput.dart';
|
||||
import 'package:patient_manager/components/mihButton.dart';
|
||||
import 'package:patient_manager/env/env.dart';
|
||||
import 'package:patient_manager/main.dart';
|
||||
import 'package:supabase_auth_ui/supabase_auth_ui.dart';
|
||||
@@ -79,7 +79,7 @@ class _SignInState extends State<SignIn> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Invalid Credentials");
|
||||
return const MIHErrorMessage(errorType: "Invalid Credentials");
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ class _SignInState extends State<SignIn> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
return const MIHErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
} else {
|
||||
@@ -148,7 +148,7 @@ class _SignInState extends State<SignIn> {
|
||||
//email input
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
child: MyTextField(
|
||||
child: MIHTextField(
|
||||
controller: emailController,
|
||||
hintText: 'Email',
|
||||
editable: true,
|
||||
@@ -160,7 +160,7 @@ class _SignInState extends State<SignIn> {
|
||||
//password input
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
child: MyPassField(
|
||||
child: MIHPassField(
|
||||
controller: passwordController,
|
||||
hintText: 'Password',
|
||||
required: true,
|
||||
@@ -173,7 +173,7 @@ class _SignInState extends State<SignIn> {
|
||||
SizedBox(
|
||||
width: 500.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
child: MIHButton(
|
||||
buttonText: "Sign In",
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
|
||||
Reference in New Issue
Block a user