amend window to always include menu
This commit is contained in:
@@ -281,122 +281,10 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
|
||||
),
|
||||
],
|
||||
),
|
||||
windowTools: null,
|
||||
onWindowTapClose: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
);
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// barrierDismissible: false,
|
||||
// builder: (context) => Dialog(
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// Container(
|
||||
// //padding: const EdgeInsets.all(15.0),
|
||||
// width: popUpWidth,
|
||||
// height: popUpheight,
|
||||
// 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: EdgeInsets.all(popUpPaddingSize),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// Text(
|
||||
// "Update Appointment Access",
|
||||
// textAlign: TextAlign.center,
|
||||
// style: TextStyle(
|
||||
// color: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .secondaryColor(),
|
||||
// fontSize: popUpTitleSize,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(height: 15.0),
|
||||
// Text(
|
||||
// subtitle,
|
||||
// textAlign: TextAlign.left,
|
||||
// style: TextStyle(
|
||||
// color: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .secondaryColor(),
|
||||
// fontSize: popUpBodySize,
|
||||
// //fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(height: 10.0),
|
||||
// Wrap(
|
||||
// runSpacing: 10,
|
||||
// spacing: 10,
|
||||
// children: [
|
||||
// SizedBox(
|
||||
// width: popUpButtonWidth,
|
||||
// height: 50,
|
||||
// child: MIHButton(
|
||||
// onTap: () {
|
||||
// updateAccessAPICall(index, "declined");
|
||||
// },
|
||||
// buttonText: "Decline",
|
||||
// buttonColor: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .errorColor(),
|
||||
// textColor: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .primaryColor(),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: popUpButtonWidth,
|
||||
// height: 50,
|
||||
// child: MIHButton(
|
||||
// onTap: () {
|
||||
// updateAccessAPICall(index, "approved");
|
||||
// },
|
||||
// buttonText: "Approve",
|
||||
// buttonColor: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .successColor(),
|
||||
// textColor: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .primaryColor(),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// 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
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_multiline_text_input.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_time_input.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_delete_message.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||
@@ -156,58 +155,44 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
||||
return MihPackageWindow(
|
||||
fullscreen: false,
|
||||
windowTitle: "Appointment Details",
|
||||
windowTools: Visibility(
|
||||
visible: canEditAppointment(index),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: MihFloatingMenu(
|
||||
animatedIcon: AnimatedIcons.menu_close,
|
||||
direction: SpeedDialDirection.down,
|
||||
children: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.edit,
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Edit Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
appointmentUpdateWindow(index);
|
||||
},
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
deleteAppointmentConfirmationWindow(index);
|
||||
},
|
||||
),
|
||||
],
|
||||
menuOptions: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.edit,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Edit Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
appointmentUpdateWindow(index);
|
||||
},
|
||||
),
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
deleteAppointmentConfirmationWindow(index);
|
||||
},
|
||||
),
|
||||
],
|
||||
onWindowTapClose: () {
|
||||
Navigator.of(context).pop();
|
||||
widget.dateController.clear();
|
||||
@@ -257,38 +242,6 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// Visibility(
|
||||
// visible: canEditAppointment(index),
|
||||
// child: SizedBox(
|
||||
// width: 500,
|
||||
// height: 50,
|
||||
// child: MIHButton(
|
||||
// onTap: () {
|
||||
// appointmentUpdateWindow(index);
|
||||
// },
|
||||
// buttonText: "Edit",
|
||||
// buttonColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
// textColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 500,
|
||||
// height: 50,
|
||||
// child: MIHButton(
|
||||
// onTap: () {
|
||||
// addAppointmentCall();
|
||||
// checkforchange();
|
||||
// },
|
||||
// buttonText: "Add",
|
||||
// buttonColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
// textColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -304,58 +257,44 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
||||
return MihPackageWindow(
|
||||
fullscreen: false,
|
||||
windowTitle: "Appointment Details",
|
||||
windowTools: Visibility(
|
||||
visible: canEditAppointment(index),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: MihFloatingMenu(
|
||||
animatedIcon: AnimatedIcons.menu_close,
|
||||
direction: SpeedDialDirection.down,
|
||||
children: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.edit,
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Edit Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
appointmentUpdateWindow(index);
|
||||
},
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
deleteAppointmentConfirmationWindow(index);
|
||||
},
|
||||
),
|
||||
],
|
||||
menuOptions: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.edit,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Edit Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
appointmentUpdateWindow(index);
|
||||
},
|
||||
),
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Appointment",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
deleteAppointmentConfirmationWindow(index);
|
||||
},
|
||||
),
|
||||
],
|
||||
onWindowTapClose: () {
|
||||
Navigator.of(context).pop();
|
||||
widget.dateController.clear();
|
||||
@@ -414,38 +353,6 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
// Visibility(
|
||||
// visible: canEditAppointment(index),
|
||||
// child: SizedBox(
|
||||
// width: 500,
|
||||
// height: 50,
|
||||
// child: MIHButton(
|
||||
// onTap: () {
|
||||
// appointmentUpdateWindow(index);
|
||||
// },
|
||||
// buttonText: "Edit",
|
||||
// buttonColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
// textColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 500,
|
||||
// height: 50,
|
||||
// child: MIHButton(
|
||||
// onTap: () {
|
||||
// addAppointmentCall();
|
||||
// checkforchange();
|
||||
// },
|
||||
// buttonText: "Add",
|
||||
// buttonColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
// textColor:
|
||||
// MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -461,7 +368,6 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
||||
return MihPackageWindow(
|
||||
fullscreen: false,
|
||||
windowTitle: "Update Appointment",
|
||||
windowTools: null,
|
||||
onWindowTapClose: () {
|
||||
setState(() {
|
||||
widget.titleController.text = widget.appointmentList[index].title;
|
||||
|
||||
Reference in New Issue
Block a user