amend window to always include menu
This commit is contained in:
@@ -50,7 +50,6 @@ class _MIHTileState extends State<MIHTile> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: widget.tileName,
|
windowTitle: widget.tileName,
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,6 +49,26 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Test No Full",
|
windowTitle: "Test No Full",
|
||||||
|
menuOptions: [
|
||||||
|
SpeedDialChild(
|
||||||
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "Show New Window",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
// showTestWindow();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import 'package:mzansi_innovation_hub/main.dart';
|
|||||||
|
|
||||||
class MihFloatingMenu extends StatefulWidget {
|
class MihFloatingMenu extends StatefulWidget {
|
||||||
final IconData? icon;
|
final IconData? icon;
|
||||||
|
final double? iconSize;
|
||||||
final AnimatedIconData? animatedIcon;
|
final AnimatedIconData? animatedIcon;
|
||||||
final SpeedDialDirection? direction;
|
final SpeedDialDirection? direction;
|
||||||
final List<SpeedDialChild> children;
|
final List<SpeedDialChild> children;
|
||||||
const MihFloatingMenu({
|
const MihFloatingMenu({
|
||||||
super.key,
|
super.key,
|
||||||
this.icon,
|
this.icon,
|
||||||
|
this.iconSize,
|
||||||
this.animatedIcon,
|
this.animatedIcon,
|
||||||
this.direction,
|
this.direction,
|
||||||
required this.children,
|
required this.children,
|
||||||
@@ -22,26 +24,21 @@ class MihFloatingMenu extends StatefulWidget {
|
|||||||
class _MihFloatingMenuState extends State<MihFloatingMenu> {
|
class _MihFloatingMenuState extends State<MihFloatingMenu> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return SpeedDial(
|
||||||
padding: const EdgeInsets.only(
|
icon: widget.icon,
|
||||||
right: 5.0,
|
buttonSize: Size(widget.iconSize ?? 56.0, widget.iconSize ?? 56.0),
|
||||||
bottom: 5.0,
|
animatedIcon: widget.animatedIcon,
|
||||||
),
|
direction: widget.direction ?? SpeedDialDirection.up,
|
||||||
child: SpeedDial(
|
activeIcon: Icons.close,
|
||||||
icon: widget.icon,
|
backgroundColor: MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
animatedIcon: widget.animatedIcon,
|
activeBackgroundColor:
|
||||||
direction: widget.direction ?? SpeedDialDirection.up,
|
MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
activeIcon: Icons.close,
|
foregroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
backgroundColor: MzanziInnovationHub.of(context)!.theme.successColor(),
|
overlayColor: Colors.black,
|
||||||
activeBackgroundColor:
|
overlayOpacity: 0.5,
|
||||||
MzanziInnovationHub.of(context)!.theme.errorColor(),
|
children: widget.children,
|
||||||
foregroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
onOpen: () => debugPrint('OPENING DIAL'),
|
||||||
overlayColor: Colors.black,
|
onClose: () => debugPrint('DIAL CLOSED'),
|
||||||
overlayOpacity: 0.5,
|
|
||||||
children: widget.children,
|
|
||||||
onOpen: () => debugPrint('OPENING DIAL'),
|
|
||||||
onClose: () => debugPrint('DIAL CLOSED'),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_single_child_scroll.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
|
||||||
|
|
||||||
class MihPackageWindow extends StatefulWidget {
|
class MihPackageWindow extends StatefulWidget {
|
||||||
final String windowTitle;
|
final String windowTitle;
|
||||||
final Widget windowBody;
|
final Widget windowBody;
|
||||||
final Widget? windowTools;
|
final List<SpeedDialChild>? menuOptions;
|
||||||
// final List<SpeedDialChild> menuOptions;
|
|
||||||
final void Function() onWindowTapClose;
|
final void Function() onWindowTapClose;
|
||||||
final bool fullscreen;
|
final bool fullscreen;
|
||||||
const MihPackageWindow({
|
const MihPackageWindow({
|
||||||
super.key,
|
super.key,
|
||||||
required this.fullscreen,
|
required this.fullscreen,
|
||||||
required this.windowTitle,
|
required this.windowTitle,
|
||||||
this.windowTools,
|
this.menuOptions,
|
||||||
// required this.menuOptions,
|
|
||||||
required this.onWindowTapClose,
|
required this.onWindowTapClose,
|
||||||
required this.windowBody,
|
required this.windowBody,
|
||||||
});
|
});
|
||||||
@@ -54,66 +54,6 @@ class _MihPackageWindowState extends State<MihPackageWindow> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getWindowHeader() {
|
|
||||||
return Container(
|
|
||||||
// color: Colors.green,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
height: 50,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
// color: Colors.white,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(25), // Optional: rounds the corners
|
|
||||||
boxShadow: const [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromARGB(
|
|
||||||
60, 0, 0, 0), // 0.2 opacity = 51 in alpha (255 * 0.2)
|
|
||||||
spreadRadius: -5,
|
|
||||||
blurRadius: 5,
|
|
||||||
offset: Offset(0, 5),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: IconButton.filled(
|
|
||||||
style: ButtonStyle(
|
|
||||||
backgroundColor: WidgetStateProperty.all<Color>(
|
|
||||||
MzanziInnovationHub.of(context)!.theme.errorColor()),
|
|
||||||
),
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
iconSize: 20,
|
|
||||||
onPressed: () {
|
|
||||||
widget.onWindowTapClose();
|
|
||||||
},
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.close,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 15),
|
|
||||||
// color: Colors.pink,
|
|
||||||
child: Text(
|
|
||||||
widget.windowTitle,
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: windowTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
widget.windowTools != null ? widget.windowTools! : Container(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@@ -139,44 +79,139 @@ class _MihPackageWindowState extends State<MihPackageWindow> {
|
|||||||
),
|
),
|
||||||
insetAnimationCurve: Easing.emphasizedDecelerate,
|
insetAnimationCurve: Easing.emphasizedDecelerate,
|
||||||
insetAnimationDuration: Durations.short1,
|
insetAnimationDuration: Durations.short1,
|
||||||
child: Container(
|
child: Stack(
|
||||||
decoration: BoxDecoration(
|
children: [
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
Container(
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
width: 5.0),
|
border: Border.all(
|
||||||
),
|
color:
|
||||||
child: widget.fullscreen
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
? Column(
|
width: 5.0),
|
||||||
mainAxisSize: MainAxisSize.max,
|
),
|
||||||
children: [
|
child: widget.fullscreen
|
||||||
getWindowHeader(),
|
? Column(
|
||||||
Expanded(
|
mainAxisSize: MainAxisSize.max,
|
||||||
child: SingleChildScrollView(child: widget.windowBody)),
|
children: [
|
||||||
],
|
const SizedBox(height: 10),
|
||||||
)
|
Row(
|
||||||
: Column(
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisSize: MainAxisSize.min,
|
children: [
|
||||||
children: [
|
Expanded(
|
||||||
getWindowHeader(),
|
child: Text(
|
||||||
Flexible(
|
widget.windowTitle,
|
||||||
child: Padding(
|
textAlign: TextAlign.center,
|
||||||
padding: EdgeInsets.only(
|
style: TextStyle(
|
||||||
left: 25,
|
fontSize: windowTitleSize,
|
||||||
right: 25,
|
fontWeight: FontWeight.bold,
|
||||||
bottom: vertticalWindowPadding,
|
color: MzanziInnovationHub.of(context)!
|
||||||
),
|
.theme
|
||||||
child: ConstrainedBox(
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
Expanded(
|
||||||
|
child:
|
||||||
|
SingleChildScrollView(child: widget.windowBody)),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
widget.windowTitle,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: windowTitleSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
Flexible(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 25,
|
||||||
|
right: 25,
|
||||||
|
bottom: vertticalWindowPadding,
|
||||||
|
),
|
||||||
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxHeight: windowHeight * 0.85,
|
maxHeight: windowHeight * 0.85,
|
||||||
maxWidth: windowWidth * 0.85,
|
maxWidth: windowWidth * 0.85,
|
||||||
),
|
),
|
||||||
child: MihSingleChildScroll(
|
child:
|
||||||
child: widget.windowBody))),
|
MihSingleChildScroll(child: widget.windowBody),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 10,
|
||||||
|
left: 10,
|
||||||
|
child: Container(
|
||||||
|
// color: Colors.white,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(25), // Optional: rounds the corners
|
||||||
|
boxShadow: const [
|
||||||
|
BoxShadow(
|
||||||
|
color: Color.fromARGB(
|
||||||
|
60, 0, 0, 0), // 0.2 opacity = 51 in alpha (255 * 0.2)
|
||||||
|
spreadRadius: -2,
|
||||||
|
blurRadius: 10,
|
||||||
|
offset: Offset(0, 5),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
child: IconButton.filled(
|
||||||
|
style: ButtonStyle(
|
||||||
|
backgroundColor: WidgetStateProperty.all<Color>(
|
||||||
|
MzanziInnovationHub.of(context)!.theme.errorColor()),
|
||||||
|
),
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
iconSize: 20,
|
||||||
|
onPressed: () {
|
||||||
|
widget.onWindowTapClose();
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.close,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible:
|
||||||
|
widget.menuOptions != null || widget.menuOptions!.isNotEmpty,
|
||||||
|
child: Positioned(
|
||||||
|
top: 10,
|
||||||
|
right: 10,
|
||||||
|
child: MihFloatingMenu(
|
||||||
|
iconSize: 40,
|
||||||
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
|
direction: SpeedDialDirection.down,
|
||||||
|
children: widget.menuOptions != null ? widget.menuOptions! : [],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ abstract class AppEnviroment {
|
|||||||
case Enviroment.dev:
|
case Enviroment.dev:
|
||||||
{
|
{
|
||||||
//================= Android Dev Urls =================
|
//================= Android Dev Urls =================
|
||||||
baseApiUrl = "http://10.0.2.2:8080";
|
// baseApiUrl = "http://10.0.2.2:8080";
|
||||||
baseFileUrl = "http://10.0.2.2:9000";
|
// baseFileUrl = "http://10.0.2.2:9000";
|
||||||
baseAiUrl = "http://10.0.2.2:11434";
|
// baseAiUrl = "http://10.0.2.2:11434";
|
||||||
//================= Web Dev Urls =================
|
//================= Web Dev Urls =================
|
||||||
// baseApiUrl = "http://localhost:8080";
|
baseApiUrl = "http://localhost:8080";
|
||||||
// baseFileUrl = "http://localhost:9000";
|
baseFileUrl = "http://localhost:9000";
|
||||||
// baseAiUrl = "http://localhost:11434";
|
baseAiUrl = "http://localhost:11434";
|
||||||
whatsappAccessToken =
|
whatsappAccessToken =
|
||||||
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
|
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
|
||||||
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';
|
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';
|
||||||
|
|||||||
@@ -279,7 +279,6 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -436,7 +436,6 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
windowTools: null,
|
|
||||||
windowBody: Column(
|
windowBody: Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
@@ -281,122 +281,10 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
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
|
@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_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_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_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_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_delete_message.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_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(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Appointment Details",
|
windowTitle: "Appointment Details",
|
||||||
windowTools: Visibility(
|
menuOptions: [
|
||||||
visible: canEditAppointment(index),
|
SpeedDialChild(
|
||||||
child: Padding(
|
child: Icon(
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
Icons.edit,
|
||||||
child: MihFloatingMenu(
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
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);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
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: () {
|
onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
widget.dateController.clear();
|
widget.dateController.clear();
|
||||||
@@ -257,38 +242,6 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
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(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Appointment Details",
|
windowTitle: "Appointment Details",
|
||||||
windowTools: Visibility(
|
menuOptions: [
|
||||||
visible: canEditAppointment(index),
|
SpeedDialChild(
|
||||||
child: Padding(
|
child: Icon(
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
Icons.edit,
|
||||||
child: MihFloatingMenu(
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
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);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
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: () {
|
onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
widget.dateController.clear();
|
widget.dateController.clear();
|
||||||
@@ -414,38 +353,6 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
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(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Update Appointment",
|
windowTitle: "Update Appointment",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.titleController.text = widget.appointmentList[index].title;
|
widget.titleController.text = widget.appointmentList[index].title;
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ class _PatientAccessRequestState extends State<Appointments> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Add Appointment",
|
windowTitle: "Add Appointment",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
_appointmentDateController.clear();
|
_appointmentDateController.clear();
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'dart:convert';
|
|||||||
// import 'dart:convert';
|
// import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.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_package_components/mih_package_window.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_objects/patients.dart';
|
import 'package:mzansi_innovation_hub/mih_objects/patients.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -857,59 +856,26 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
windowTools: Padding(
|
menuOptions: [
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
SpeedDialChild(
|
||||||
child: MihFloatingMenu(
|
child: Icon(
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
Icons.delete,
|
||||||
direction: SpeedDialDirection.down,
|
color:
|
||||||
children: [
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
SpeedDialChild(
|
),
|
||||||
child: Icon(
|
label: "Delete File",
|
||||||
Icons.delete,
|
labelBackgroundColor:
|
||||||
color: MzanziInnovationHub.of(context)!
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
.theme
|
labelStyle: TextStyle(
|
||||||
.primaryColor(),
|
color:
|
||||||
),
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
label: "Wallet?",
|
fontWeight: FontWeight.bold,
|
||||||
labelBackgroundColor: MzanziInnovationHub.of(context)!
|
),
|
||||||
.theme
|
backgroundColor:
|
||||||
.successColor(),
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
labelStyle: TextStyle(
|
onTap: () {},
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.primaryColor(),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
backgroundColor: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.successColor(),
|
|
||||||
onTap: () {},
|
|
||||||
),
|
|
||||||
SpeedDialChild(
|
|
||||||
child: Icon(
|
|
||||||
Icons.delete,
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.primaryColor(),
|
|
||||||
),
|
|
||||||
label: "Delete File",
|
|
||||||
labelBackgroundColor: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.successColor(),
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.primaryColor(),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
backgroundColor: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.successColor(),
|
|
||||||
onTap: () {},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -172,64 +172,64 @@ class _AiChatState extends State<AiChat> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: 'Mzansi AI Thoughts',
|
windowTitle: 'Mzansi AI Thoughts',
|
||||||
windowTools: Row(
|
// menuOptions: Row(
|
||||||
children: [
|
// children: [
|
||||||
Visibility(
|
// Visibility(
|
||||||
visible: _aiThinking == false,
|
// visible: _aiThinking == false,
|
||||||
child: Padding(
|
// child: Padding(
|
||||||
padding: const EdgeInsets.all(5.0),
|
// padding: const EdgeInsets.all(5.0),
|
||||||
child: Container(
|
// child: Container(
|
||||||
//color: MzanziInnovationHub.of(context)!.theme.successColor(),
|
// //color: MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!
|
// color: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
// .theme
|
||||||
.successColor(),
|
// .successColor(),
|
||||||
borderRadius: const BorderRadius.all(
|
// borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(100),
|
// Radius.circular(100),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: IconButton(
|
// child: IconButton(
|
||||||
color: MzanziInnovationHub.of(context)!
|
// color: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
// .theme
|
||||||
.primaryColor(),
|
// .primaryColor(),
|
||||||
onPressed: () async {
|
// onPressed: () async {
|
||||||
print("Start TTS now");
|
// print("Start TTS now");
|
||||||
|
|
||||||
_speakText(snapshot.requireData);
|
// _speakText(snapshot.requireData);
|
||||||
},
|
// },
|
||||||
icon: const Icon(Icons.volume_up),
|
// icon: const Icon(Icons.volume_up),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Visibility(
|
// Visibility(
|
||||||
visible: _aiThinking == true,
|
// visible: _aiThinking == true,
|
||||||
child: Padding(
|
// child: Padding(
|
||||||
padding: const EdgeInsets.all(5.0),
|
// padding: const EdgeInsets.all(5.0),
|
||||||
child: Container(
|
// child: Container(
|
||||||
// color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
// // color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.errorColor(),
|
// MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
borderRadius: const BorderRadius.all(
|
// borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(100),
|
// Radius.circular(100),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: IconButton(
|
// child: IconButton(
|
||||||
color: MzanziInnovationHub.of(context)!
|
// color: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
// .theme
|
||||||
.primaryColor(),
|
// .primaryColor(),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
//print("Start TTS now");
|
// //print("Start TTS now");
|
||||||
_flutterTts.stop();
|
// _flutterTts.stop();
|
||||||
},
|
// },
|
||||||
icon: const Icon(Icons.volume_off),
|
// icon: const Icon(Icons.volume_off),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
_captureAIResponse(snapshot.requireData);
|
_captureAIResponse(snapshot.requireData);
|
||||||
_flutterTts.stop();
|
_flutterTts.stop();
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import 'package:mzansi_innovation_hub/main.dart';
|
|||||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_dropdown_input.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_dropdown_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_text_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_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_delete_message.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
@@ -154,33 +153,26 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Employee Details",
|
windowTitle: "Employee Details",
|
||||||
windowTools: Padding(
|
menuOptions: [
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
SpeedDialChild(
|
||||||
child: MihFloatingMenu(
|
child: Icon(
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
Icons.delete,
|
||||||
direction: SpeedDialDirection.down,
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
children: [
|
),
|
||||||
SpeedDialChild(
|
label: "Delete Employee",
|
||||||
child: Icon(
|
labelBackgroundColor:
|
||||||
Icons.delete,
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
labelStyle: TextStyle(
|
||||||
),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
label: "Delete Employee",
|
fontWeight: FontWeight.bold,
|
||||||
labelBackgroundColor:
|
),
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
backgroundColor:
|
||||||
labelStyle: TextStyle(
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
onTap: () {
|
||||||
fontWeight: FontWeight.bold,
|
showDeleteWarning(index);
|
||||||
),
|
},
|
||||||
backgroundColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
|
||||||
onTap: () {
|
|
||||||
showDeleteWarning(index);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -189,7 +189,6 @@ class _BuildUserListState extends State<BuildUserList> {
|
|||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.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_package_components/mih_package_window.dart';
|
||||||
import 'package:supertokens_flutter/http.dart' as http;
|
import 'package:supertokens_flutter/http.dart' as http;
|
||||||
|
|
||||||
@@ -155,33 +154,26 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Employee Details",
|
windowTitle: "Employee Details",
|
||||||
windowTools: Padding(
|
menuOptions: [
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
SpeedDialChild(
|
||||||
child: MihFloatingMenu(
|
child: Icon(
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
Icons.delete,
|
||||||
direction: SpeedDialDirection.down,
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
children: [
|
),
|
||||||
SpeedDialChild(
|
label: "Delete Employee",
|
||||||
child: Icon(
|
labelBackgroundColor:
|
||||||
Icons.delete,
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
labelStyle: TextStyle(
|
||||||
),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
label: "Delete Employee",
|
fontWeight: FontWeight.bold,
|
||||||
labelBackgroundColor:
|
),
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
backgroundColor:
|
||||||
labelStyle: TextStyle(
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
onTap: () {
|
||||||
fontWeight: FontWeight.bold,
|
showDeleteWarning(index);
|
||||||
),
|
},
|
||||||
backgroundColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
|
||||||
onTap: () {
|
|
||||||
showDeleteWarning(index);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -190,125 +190,9 @@ class _BuildUserListState extends State<BuildUserList> {
|
|||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}));
|
}));
|
||||||
// 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: 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
|
||||||
|
|||||||
@@ -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_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_package_components/mih_package_alert.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.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_delete_message.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_objects/app_user.dart';
|
import 'package:mzansi_innovation_hub/mih_objects/app_user.dart';
|
||||||
@@ -52,7 +51,6 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Edit Loyalty Card",
|
windowTitle: "Edit Loyalty Card",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
_cardNumberController.clear();
|
_cardNumberController.clear();
|
||||||
_nicknameController.clear();
|
_nicknameController.clear();
|
||||||
@@ -60,6 +58,7 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
|
|||||||
},
|
},
|
||||||
windowBody: Column(
|
windowBody: Column(
|
||||||
children: [
|
children: [
|
||||||
|
const SizedBox(height: 10),
|
||||||
MIHTextField(
|
MIHTextField(
|
||||||
controller: _nicknameController,
|
controller: _nicknameController,
|
||||||
hintText: "Card Title",
|
hintText: "Card Title",
|
||||||
@@ -279,89 +278,79 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: widget.cardList[index].shop_name.toUpperCase(),
|
windowTitle: widget.cardList[index].shop_name.toUpperCase(),
|
||||||
windowTools: Padding(
|
menuOptions: [
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
SpeedDialChild(
|
||||||
child: MihFloatingMenu(
|
child: widget.cardList[index].favourite == ""
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
? Icon(
|
||||||
direction: SpeedDialDirection.down,
|
Icons.favorite,
|
||||||
children: [
|
color:
|
||||||
SpeedDialChild(
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
child: widget.cardList[index].favourite == ""
|
)
|
||||||
? Icon(
|
: Icon(
|
||||||
Icons.favorite,
|
Icons.favorite_border,
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
.primaryColor(),
|
),
|
||||||
)
|
label: widget.cardList[index].favourite == ""
|
||||||
: Icon(
|
? "Add to Favourite"
|
||||||
Icons.favorite_border,
|
: "Remove from Favourite",
|
||||||
color: MzanziInnovationHub.of(context)!
|
labelBackgroundColor:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
.primaryColor(),
|
labelStyle: TextStyle(
|
||||||
),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
label: widget.cardList[index].favourite == ""
|
fontWeight: FontWeight.bold,
|
||||||
? "Add to Favourite"
|
),
|
||||||
: "Remove from Favourite",
|
backgroundColor:
|
||||||
labelBackgroundColor:
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
onTap: () {
|
||||||
labelStyle: TextStyle(
|
if (widget.cardList[index].favourite == "") {
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
addToFavCardWindow(context, index);
|
||||||
fontWeight: FontWeight.bold,
|
} else {
|
||||||
),
|
removeFromFavCardWindow(context, index);
|
||||||
backgroundColor:
|
}
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
},
|
||||||
onTap: () {
|
|
||||||
if (widget.cardList[index].favourite == "") {
|
|
||||||
addToFavCardWindow(context, index);
|
|
||||||
} else {
|
|
||||||
removeFromFavCardWindow(context, index);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SpeedDialChild(
|
|
||||||
child: Icon(
|
|
||||||
Icons.edit,
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
),
|
|
||||||
label: "Edit Card Details",
|
|
||||||
labelBackgroundColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
backgroundColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
_cardNumberController.text =
|
|
||||||
widget.cardList[index].card_number;
|
|
||||||
_nicknameController.text = widget.cardList[index].nickname;
|
|
||||||
});
|
|
||||||
editCardWindow(context, index);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SpeedDialChild(
|
|
||||||
child: Icon(
|
|
||||||
Icons.delete,
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
),
|
|
||||||
label: "Delete Card",
|
|
||||||
labelBackgroundColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
backgroundColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
|
||||||
onTap: () {
|
|
||||||
deleteCardWindow(context, index);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
SpeedDialChild(
|
||||||
|
child: Icon(
|
||||||
|
Icons.edit,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "Edit Card Details",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_cardNumberController.text = widget.cardList[index].card_number;
|
||||||
|
_nicknameController.text = widget.cardList[index].nickname;
|
||||||
|
});
|
||||||
|
editCardWindow(context, index);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SpeedDialChild(
|
||||||
|
child: Icon(
|
||||||
|
Icons.delete,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "Delete Card",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
deleteCardWindow(context, index);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ class _MihCardsState extends State<MihCards> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Add New Loyalty Card",
|
windowTitle: "Add New Loyalty Card",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
shopController.clear();
|
shopController.clear();
|
||||||
cardNumberController.clear();
|
cardNumberController.clear();
|
||||||
|
|||||||
@@ -170,7 +170,6 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Patient Appointment",
|
windowTitle: "Patient Appointment",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
@@ -327,7 +326,6 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Patient Profile",
|
windowTitle: "Patient Profile",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Patient Appointment",
|
windowTitle: "Patient Appointment",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
@@ -220,7 +219,6 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Patient Profile",
|
windowTitle: "Patient Profile",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -225,7 +225,6 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Appointment Type",
|
windowTitle: "Appointment Type",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
@@ -303,7 +302,6 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Add Appointment",
|
windowTitle: "Add Appointment",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
_appointmentDateController.clear();
|
_appointmentDateController.clear();
|
||||||
|
|||||||
@@ -392,7 +392,6 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Generate Claim/ Statement Document",
|
windowTitle: "Generate Claim/ Statement Document",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
// medicineController.clear();
|
// medicineController.clear();
|
||||||
// quantityController.clear();
|
// quantityController.clear();
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ class _ICD10SearchWindowState extends State<ICD10SearchWindow> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "ICD-10 Search",
|
windowTitle: "ICD-10 Search",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
// medicineController.clear();
|
// medicineController.clear();
|
||||||
// quantityController.clear();
|
// quantityController.clear();
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ class _MedicineSearchState extends State<MedicineSearch> {
|
|||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Select Medicine",
|
windowTitle: "Select Medicine",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_apis/mih_claim_statement_generation_api.dart';
|
import 'package:mzansi_innovation_hub/mih_apis/mih_claim_statement_generation_api.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_apis/mih_file_api.dart';
|
import 'package:mzansi_innovation_hub/mih_apis/mih_file_api.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_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_delete_message.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
@@ -130,14 +129,8 @@ class _BuildClaimStatementFileListState
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
windowTools: Visibility(
|
menuOptions: hasAccessToDelete
|
||||||
visible: hasAccessToDelete,
|
? [
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
|
||||||
child: MihFloatingMenu(
|
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
|
||||||
direction: SpeedDialDirection.down,
|
|
||||||
children: [
|
|
||||||
SpeedDialChild(
|
SpeedDialChild(
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.delete,
|
Icons.delete,
|
||||||
@@ -158,25 +151,8 @@ class _BuildClaimStatementFileListState
|
|||||||
deleteFilePopUp(filePath, fileID);
|
deleteFilePopUp(filePath, fileID);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
]
|
||||||
),
|
: null,
|
||||||
),
|
|
||||||
),
|
|
||||||
// [
|
|
||||||
// Visibility(
|
|
||||||
// visible: hasAccessToDelete,
|
|
||||||
// child: IconButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// deleteFilePopUp(filePath, fileID);
|
|
||||||
// },
|
|
||||||
// icon: Icon(
|
|
||||||
// size: 35,
|
|
||||||
// Icons.delete,
|
|
||||||
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -115,7 +115,8 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
//double height = MediaQuery.sizeOf(context).height;
|
//double height = MediaQuery.sizeOf(context).height;
|
||||||
debugPrint(widget.link);
|
debugPrint(widget.link);
|
||||||
if (getExtType(widget.path).toLowerCase() == "pdf") {
|
if (getExtType(widget.path).toLowerCase() == "pdf") {
|
||||||
return Expanded(
|
return SizedBox(
|
||||||
|
height: 500,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
children: [
|
children: [
|
||||||
@@ -185,9 +186,8 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Expanded(
|
return SizedBox(
|
||||||
// height: height,
|
height: 500,
|
||||||
// padding: const EdgeInsets.all(10.0),
|
|
||||||
child: Stack(
|
child: Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:fl_downloader/fl_downloader.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_apis/mih_file_api.dart';
|
import 'package:mzansi_innovation_hub/mih_apis/mih_file_api.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_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_delete_message.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
@@ -19,6 +19,8 @@ import 'package:mzansi_innovation_hub/mih_objects/patients.dart';
|
|||||||
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/list_builders/build_file_view.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/list_builders/build_file_view.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:supertokens_flutter/http.dart' as http;
|
import 'package:supertokens_flutter/http.dart' as http;
|
||||||
|
import 'package:http/http.dart' as http2;
|
||||||
|
import "package:universal_html/html.dart" as html;
|
||||||
|
|
||||||
class BuildFilesList extends StatefulWidget {
|
class BuildFilesList extends StatefulWidget {
|
||||||
final AppUser signedInUser;
|
final AppUser signedInUser;
|
||||||
@@ -160,6 +162,39 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getFileName(String path) {
|
||||||
|
//print(pdfLink.split(".")[1]);
|
||||||
|
return path.split("/").last;
|
||||||
|
}
|
||||||
|
|
||||||
|
void printDocument(String link, String path) async {
|
||||||
|
http2.Response response = await http.get(Uri.parse(link));
|
||||||
|
var pdfData = response.bodyBytes;
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/file-veiwer/print-preview',
|
||||||
|
arguments: PrintPreviewArguments(
|
||||||
|
pdfData,
|
||||||
|
getFileName(path),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void nativeFileDownload(String fileLink) async {
|
||||||
|
var permission = await FlDownloader.requestPermission();
|
||||||
|
if (permission == StoragePermissionStatus.granted) {
|
||||||
|
try {
|
||||||
|
mihLoadingPopUp();
|
||||||
|
await FlDownloader.download(fileLink);
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
} on Exception catch (error) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
print(error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("denied");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void viewFilePopUp(String fileName, String filePath, int fileID, String url) {
|
void viewFilePopUp(String fileName, String filePath, int fileID, String url) {
|
||||||
bool hasAccessToDelete = false;
|
bool hasAccessToDelete = false;
|
||||||
if (widget.type == "business") {
|
if (widget.type == "business") {
|
||||||
@@ -169,29 +204,58 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: true,
|
fullscreen: false,
|
||||||
windowTitle: fileName,
|
windowTitle: fileName,
|
||||||
windowBody: Column(
|
windowBody: BuildFileView(
|
||||||
children: [
|
link: url,
|
||||||
BuildFileView(
|
path: filePath,
|
||||||
link: url,
|
//pdfLink: '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||||
path: filePath,
|
|
||||||
//pdfLink: '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 10,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
windowTools: Visibility(
|
menuOptions: [
|
||||||
visible: hasAccessToDelete,
|
SpeedDialChild(
|
||||||
child: Padding(
|
child: Icon(
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
Icons.download,
|
||||||
child: MihFloatingMenu(
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
),
|
||||||
direction: SpeedDialDirection.down,
|
label: "Download",
|
||||||
children: [
|
labelBackgroundColor:
|
||||||
SpeedDialChild(
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
||||||
|
"Web") {
|
||||||
|
html.window.open(url, 'download');
|
||||||
|
} else {
|
||||||
|
nativeFileDownload(url);
|
||||||
|
}
|
||||||
|
printDocument(url, filePath);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SpeedDialChild(
|
||||||
|
child: Icon(
|
||||||
|
Icons.print,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "Print",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
printDocument(url, filePath);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
hasAccessToDelete == true
|
||||||
|
? SpeedDialChild(
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.delete,
|
Icons.delete,
|
||||||
color:
|
color:
|
||||||
@@ -210,116 +274,42 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
deleteFilePopUp(filePath, fileID);
|
deleteFilePopUp(filePath, fileID);
|
||||||
},
|
},
|
||||||
|
)
|
||||||
|
: SpeedDialChild(
|
||||||
|
child: Icon(
|
||||||
|
Icons.fullscreen,
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "Full Screen",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
printDocument(url, filePath);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// showDialog(
|
}
|
||||||
// context: context,
|
|
||||||
// barrierDismissible: false,
|
void mihLoadingPopUp() {
|
||||||
// builder: (context) => Dialog(
|
showDialog(
|
||||||
// child: Stack(
|
context: context,
|
||||||
// children: [
|
builder: (context) {
|
||||||
// Container(
|
return const Mihloadingcircle();
|
||||||
// padding: const EdgeInsets.all(10.0),
|
},
|
||||||
// width: 800.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: [
|
|
||||||
// const SizedBox(
|
|
||||||
// height: 25,
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// fileName,
|
|
||||||
// textAlign: TextAlign.center,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: MzanziInnovationHub.of(context)!
|
|
||||||
// .theme
|
|
||||||
// .secondaryColor(),
|
|
||||||
// fontSize: 35.0,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// const SizedBox(height: 25.0),
|
|
||||||
// Expanded(
|
|
||||||
// child: BuildFileView(
|
|
||||||
// link: url,
|
|
||||||
// path: filePath,
|
|
||||||
// //pdfLink: '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
|
||||||
// )),
|
|
||||||
// const SizedBox(height: 30.0),
|
|
||||||
// SizedBox(
|
|
||||||
// width: 300,
|
|
||||||
// height: 50,
|
|
||||||
// child: MIHButton(
|
|
||||||
// onTap: () {
|
|
||||||
// html.window.open(
|
|
||||||
// url,
|
|
||||||
// // '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
|
||||||
// 'download');
|
|
||||||
// },
|
|
||||||
// buttonText: "Dowload",
|
|
||||||
// buttonColor: MzanziInnovationHub.of(context)!
|
|
||||||
// .theme
|
|
||||||
// .secondaryColor(),
|
|
||||||
// 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,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Positioned(
|
|
||||||
// top: 5,
|
|
||||||
// left: 5,
|
|
||||||
// width: 50,
|
|
||||||
// height: 50,
|
|
||||||
// child: IconButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// deleteFilePopUp(filePath, fileID);
|
|
||||||
// },
|
|
||||||
// icon: Icon(
|
|
||||||
// Icons.delete,
|
|
||||||
// color:
|
|
||||||
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
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_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_text_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_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_delete_message.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
@@ -139,16 +138,10 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: true,
|
fullscreen: false,
|
||||||
windowTitle: selectednote.note_name,
|
windowTitle: "Note Details",
|
||||||
windowTools: Visibility(
|
menuOptions: hasAccessToDelete
|
||||||
visible: hasAccessToDelete,
|
? [
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 5.0),
|
|
||||||
child: MihFloatingMenu(
|
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
|
||||||
direction: SpeedDialDirection.down,
|
|
||||||
children: [
|
|
||||||
SpeedDialChild(
|
SpeedDialChild(
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.delete,
|
Icons.delete,
|
||||||
@@ -169,15 +162,14 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
deletePatientPopUp(selectednote.idpatient_notes);
|
deletePatientPopUp(selectednote.idpatient_notes);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
]
|
||||||
),
|
: null,
|
||||||
),
|
|
||||||
),
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
windowBody: Column(
|
windowBody: Column(
|
||||||
children: [
|
children: [
|
||||||
|
const SizedBox(height: 10.0),
|
||||||
MIHTextField(
|
MIHTextField(
|
||||||
controller: businessNameController,
|
controller: businessNameController,
|
||||||
hintText: "Office",
|
hintText: "Office",
|
||||||
@@ -206,7 +198,8 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
required: false,
|
required: false,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
Expanded(
|
SizedBox(
|
||||||
|
height: 250,
|
||||||
child: MIHMLTextField(
|
child: MIHMLTextField(
|
||||||
controller: noteTextController,
|
controller: noteTextController,
|
||||||
hintText: "Note Details",
|
hintText: "Note Details",
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Add Note",
|
windowTitle: "Add Note",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
titleController.clear();
|
titleController.clear();
|
||||||
|
|||||||
@@ -224,7 +224,6 @@ class _PatientDocumentsState extends State<PatientDocuments> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Upload File",
|
windowTitle: "Upload File",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
@@ -291,7 +290,6 @@ class _PatientDocumentsState extends State<PatientDocuments> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Create Medical Certificate",
|
windowTitle: "Create Medical Certificate",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
@@ -340,7 +338,6 @@ class _PatientDocumentsState extends State<PatientDocuments> {
|
|||||||
builder: (context) => MihPackageWindow(
|
builder: (context) => MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Create Prescription",
|
windowTitle: "Create Prescription",
|
||||||
windowTools: null,
|
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
medicineController.clear();
|
medicineController.clear();
|
||||||
quantityController.clear();
|
quantityController.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user