add mih window to access reviews

This commit is contained in:
2024-09-26 15:18:02 +02:00
parent d71d4e0b71
commit f2517d8416

View File

@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart'; import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart';
import 'package:patient_manager/mih_components/mih_layout/mih_window.dart';
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_success_message.dart'; import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_success_message.dart';
import 'package:patient_manager/mih_env/env.dart'; import 'package:patient_manager/mih_env/env.dart';
@@ -204,52 +205,25 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
showDialog( showDialog(
context: context, context: context,
barrierDismissible: false, barrierDismissible: false,
builder: (context) => Dialog( builder: (context) => MIHWindow(
child: Stack( windowTitle: "Update Appointment Access",
children: [ windowItems: [
Container( const SizedBox(
//padding: const EdgeInsets.all(15.0), height: 10,
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(
padding: EdgeInsets.all(popUpPaddingSize), padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column( child: Text(
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, subtitle,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: MzanziInnovationHub.of(context)! color:
.theme MzanziInnovationHub.of(context)!.theme.secondaryColor(),
.secondaryColor(),
fontSize: popUpBodySize, fontSize: popUpBodySize,
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
), ),
), ),
const SizedBox(height: 10.0), ),
Wrap( Wrap(
runSpacing: 10, runSpacing: 10,
spacing: 10, spacing: 10,
@@ -262,12 +236,10 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
updateAccessAPICall(index, "declined"); updateAccessAPICall(index, "declined");
}, },
buttonText: "Decline", buttonText: "Decline",
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.errorColor(),
.errorColor(), textColor:
textColor: MzanziInnovationHub.of(context)! MzanziInnovationHub.of(context)!.theme.primaryColor(),
.theme
.primaryColor(),
), ),
), ),
SizedBox( SizedBox(
@@ -278,40 +250,134 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
updateAccessAPICall(index, "approved"); updateAccessAPICall(index, "approved");
}, },
buttonText: "Approve", buttonText: "Approve",
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.successColor(), textColor:
textColor: MzanziInnovationHub.of(context)! MzanziInnovationHub.of(context)!.theme.primaryColor(),
.theme
.primaryColor(),
), ),
), ),
], ],
) ),
const SizedBox(
height: 10,
),
], ],
), actionItems: const [],
), onTapClose: () {
),
Positioned(
top: 5,
right: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, }),
icon: Icon(
Icons.close,
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
size: 35,
),
),
),
],
),
),
); );
// 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