user search window enhancement
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_dropdown_input.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_dropdown_input.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_window.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_success_message.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_success_message.dart';
|
||||||
@@ -121,120 +122,188 @@ class _BuildUserListState extends State<BuildUserList> {
|
|||||||
lnameController.text = hideEmail(widget.users[index].email);
|
lnameController.text = hideEmail(widget.users[index].email);
|
||||||
});
|
});
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (context) => Dialog(
|
builder: (context) => MIHWindow(
|
||||||
child: Stack(
|
fullscreen: false,
|
||||||
children: [
|
windowTitle: "Add Employee",
|
||||||
Container(
|
windowBody: [
|
||||||
padding: const EdgeInsets.all(10.0),
|
const SizedBox(height: 10.0),
|
||||||
width: 700.0,
|
MIHTextField(
|
||||||
//height: 475.0,
|
controller: fnameController,
|
||||||
decoration: BoxDecoration(
|
hintText: "Username Name",
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
editable: false,
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
required: true,
|
||||||
border: Border.all(
|
|
||||||
color:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
),
|
||||||
child: SingleChildScrollView(
|
const SizedBox(height: 10.0),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
MIHTextField(
|
||||||
child: Column(
|
controller: lnameController,
|
||||||
mainAxisSize: MainAxisSize.min,
|
hintText: "Email",
|
||||||
children: [
|
editable: false,
|
||||||
Text(
|
required: true,
|
||||||
"Add Employee",
|
),
|
||||||
textAlign: TextAlign.center,
|
const SizedBox(height: 10.0),
|
||||||
style: TextStyle(
|
MIHDropdownField(
|
||||||
color: MzanziInnovationHub.of(context)!
|
controller: typeController,
|
||||||
.theme
|
hintText: "Title",
|
||||||
.secondaryColor(),
|
dropdownOptions: const ["Doctor", "Assistant"],
|
||||||
fontSize: 35.0,
|
required: true,
|
||||||
fontWeight: FontWeight.bold,
|
editable: true,
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10.0),
|
||||||
const SizedBox(height: 25.0),
|
MIHDropdownField(
|
||||||
MIHTextField(
|
controller: accessController,
|
||||||
controller: fnameController,
|
hintText: "Access",
|
||||||
hintText: "Username Name",
|
dropdownOptions: const ["Full", "Partial"],
|
||||||
editable: false,
|
required: true,
|
||||||
required: true,
|
editable: true,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 15.0),
|
||||||
MIHTextField(
|
SizedBox(
|
||||||
controller: lnameController,
|
width: 300,
|
||||||
hintText: "Email",
|
height: 50,
|
||||||
editable: false,
|
child: MIHButton(
|
||||||
required: true,
|
buttonText: "Add",
|
||||||
),
|
buttonColor:
|
||||||
const SizedBox(height: 10.0),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
MIHDropdownField(
|
textColor:
|
||||||
controller: typeController,
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
hintText: "Title",
|
onTap: () {
|
||||||
dropdownOptions: const ["Doctor", "Assistant"],
|
if (isRequiredFieldsCaptured()) {
|
||||||
required: true,
|
createBusinessUserAPICall(index);
|
||||||
editable: true,
|
} else {
|
||||||
),
|
showDialog(
|
||||||
const SizedBox(height: 10.0),
|
context: context,
|
||||||
MIHDropdownField(
|
builder: (context) {
|
||||||
controller: accessController,
|
return const MIHErrorMessage(
|
||||||
hintText: "Access",
|
errorType: "Input Error");
|
||||||
dropdownOptions: const ["Full", "Partial"],
|
|
||||||
required: true,
|
|
||||||
editable: true,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 30.0),
|
|
||||||
SizedBox(
|
|
||||||
width: 300,
|
|
||||||
height: 50,
|
|
||||||
child: MIHButton(
|
|
||||||
buttonText: "Add",
|
|
||||||
buttonColor: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
textColor: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.primaryColor(),
|
|
||||||
onTap: () {
|
|
||||||
if (isRequiredFieldsCaptured()) {
|
|
||||||
createBusinessUserAPICall(index);
|
|
||||||
} else {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return const MIHErrorMessage(
|
|
||||||
errorType: "Input Error");
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
),
|
);
|
||||||
)
|
}
|
||||||
],
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10.0),
|
||||||
Positioned(
|
],
|
||||||
top: 5,
|
windowTools: [],
|
||||||
right: 5,
|
onWindowTapClose: () {
|
||||||
width: 50,
|
Navigator.pop(context);
|
||||||
height: 50,
|
}));
|
||||||
child: IconButton(
|
// showDialog(
|
||||||
onPressed: () {
|
// context: context,
|
||||||
Navigator.pop(context);
|
// barrierDismissible: false,
|
||||||
},
|
// builder: (context) => Dialog(
|
||||||
icon: Icon(
|
// child: Stack(
|
||||||
Icons.close,
|
// children: [
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
// Container(
|
||||||
size: 35,
|
// 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: SingleChildScrollView(
|
||||||
|
// padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// "Add Employee",
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// fontSize: 35.0,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 25.0),
|
||||||
|
// MIHTextField(
|
||||||
|
// controller: fnameController,
|
||||||
|
// hintText: "Username Name",
|
||||||
|
// editable: false,
|
||||||
|
// required: true,
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 10.0),
|
||||||
|
// MIHTextField(
|
||||||
|
// controller: lnameController,
|
||||||
|
// hintText: "Email",
|
||||||
|
// editable: false,
|
||||||
|
// required: true,
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 10.0),
|
||||||
|
// MIHDropdownField(
|
||||||
|
// controller: typeController,
|
||||||
|
// hintText: "Title",
|
||||||
|
// dropdownOptions: const ["Doctor", "Assistant"],
|
||||||
|
// required: true,
|
||||||
|
// editable: true,
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 10.0),
|
||||||
|
// MIHDropdownField(
|
||||||
|
// controller: accessController,
|
||||||
|
// hintText: "Access",
|
||||||
|
// dropdownOptions: const ["Full", "Partial"],
|
||||||
|
// required: true,
|
||||||
|
// editable: true,
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 30.0),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 300,
|
||||||
|
// height: 50,
|
||||||
|
// child: MIHButton(
|
||||||
|
// buttonText: "Add",
|
||||||
|
// buttonColor: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// textColor: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .primaryColor(),
|
||||||
|
// onTap: () {
|
||||||
|
// if (isRequiredFieldsCaptured()) {
|
||||||
|
// createBusinessUserAPICall(index);
|
||||||
|
// } 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,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user