update queue date field to be reuired.
update searchfield to not submit when nothing is entered.
This commit is contained in:
@@ -69,9 +69,10 @@ class _BuildPatientsListState extends State<BuildPatientsList> {
|
|||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
Navigator.of(context).pushNamed('/patient-manager/patient',
|
// Add popup to add patienmt to queue
|
||||||
arguments: PatientViewArguments(
|
// Navigator.of(context).pushNamed('/patient-manager/patient',
|
||||||
widget.signedInUser, widget.patients[index], "business"));
|
// arguments: PatientViewArguments(
|
||||||
|
// widget.signedInUser, widget.patients[index], "business"));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
|
|||||||
@@ -6,14 +6,12 @@ class MySearchField extends StatefulWidget {
|
|||||||
final String hintText;
|
final String hintText;
|
||||||
final bool required;
|
final bool required;
|
||||||
final bool editable;
|
final bool editable;
|
||||||
final void Function(String)? onChanged;
|
|
||||||
final void Function() onTap;
|
final void Function() onTap;
|
||||||
|
|
||||||
const MySearchField({
|
const MySearchField({
|
||||||
super.key,
|
super.key,
|
||||||
required this.controller,
|
required this.controller,
|
||||||
required this.hintText,
|
required this.hintText,
|
||||||
required this.onChanged,
|
|
||||||
required this.required,
|
required this.required,
|
||||||
required this.editable,
|
required this.editable,
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
@@ -94,7 +92,11 @@ class _MySearchFieldState extends State<MySearchField> {
|
|||||||
return TextField(
|
return TextField(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
onChanged: widget.onChanged,
|
onChanged: (_) {
|
||||||
|
setState(() {
|
||||||
|
startup = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
//style: TextStyle(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
//style: TextStyle(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
readOnly: makeEditable(),
|
readOnly: makeEditable(),
|
||||||
|
|||||||
@@ -129,7 +129,6 @@ class _PrescripInputState extends State<PrescripInput> {
|
|||||||
child: MySearchField(
|
child: MySearchField(
|
||||||
controller: widget.medicineController,
|
controller: widget.medicineController,
|
||||||
hintText: "Medicine",
|
hintText: "Medicine",
|
||||||
onChanged: (value) {},
|
|
||||||
required: true,
|
required: true,
|
||||||
editable: true,
|
editable: true,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@@ -179,12 +179,11 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
MySearchField(
|
MySearchField(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
hintText: "ID or Medical Aid No. Search",
|
hintText: "ID or Medical Aid No. Search",
|
||||||
required: false,
|
required: true,
|
||||||
editable: true,
|
editable: true,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
submitPatientForm();
|
submitPatientForm();
|
||||||
},
|
},
|
||||||
onChanged: (value) {},
|
|
||||||
),
|
),
|
||||||
//spacer
|
//spacer
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
@@ -307,7 +306,7 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
MyDateField(
|
MyDateField(
|
||||||
controller: queueDateController,
|
controller: queueDateController,
|
||||||
LableText: "Date",
|
LableText: "Date",
|
||||||
required: false,
|
required: true,
|
||||||
),
|
),
|
||||||
//spacer
|
//spacer
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|||||||
Reference in New Issue
Block a user