v.1.2.7 #36

Merged
yaso_meth merged 26 commits from v.1.2.7 into main 2026-06-01 12:23:48 +00:00
14 changed files with 230 additions and 226 deletions
Showing only changes of commit aee6497ccb - Show all commits
+60 -56
View File
@@ -42,29 +42,29 @@ class MihGoRouterPaths {
static const String mihAuthentication = '/mih-authentication';
static const String mihHome = '/';
static const String notifications = '/notifications';
static const String forgotPassword = '/mih-authentication/forgot-password';
static const String aboutMih = '/about';
static const String mzansiProfileManage = '/mzansi-profile';
static const String mzansiProfileView = '/mzansi-profile/view';
static const String businessProfileSetup = '/business-profile/set-up';
static const String businessProfileManage = '/business-profile/manage';
static const String businessProfileView = '/business-profile/view';
static const String patientProfile = '/patient-profile';
static const String patientProfileSetup = '/patient-profile/set-up';
static const String mzansiWallet = '/mzansi-wallet';
static const String mzansiDirectory = '/mzansi-directory';
static const String mihAccess = '/mih-access';
static const String calendar = '/calendar';
static const String appointments = '/appointments';
static const String patientManager = '/patient-manager';
static const String patientManagerPatient = '/patient-manager/patient';
static const String forgotPassword = 'forgot-password';
static const String aboutMih = 'about';
static const String mzansiProfileManage = 'mzansi-profile';
static const String mzansiProfileView = 'mzansi-profile/view';
static const String businessProfileSetup = 'business-profile/set-up';
static const String businessProfileManage = 'business-profile/manage';
static const String businessProfileView = 'business-profile/view';
static const String patientProfile = 'patient-profile';
static const String patientProfileSetup = 'patient-profile/set-up';
static const String mzansiWallet = 'mzansi-wallet';
static const String mzansiDirectory = 'mzansi-directory';
static const String mihAccess = 'mih-access';
static const String calendar = 'calendar';
static const String appointments = 'appointments';
static const String patientManager = 'patient-manager';
static const String patientManagerPatient = 'patient-manager/patient';
static const String fileViewer = '/file-veiwer';
static const String printPreview = '/file-veiwer/print-preview';
static const String barcodeScanner = '/scanner';
static const String calculator = '/calculator';
static const String mzansiAi = '/mzansi-ai';
static const String mihMineSweeper = '/mih-minesweeper';
static const String packageDevTest = '/package-dev';
static const String calculator = 'calculator';
static const String mzansiAi = 'mzansi-ai';
static const String mihMineSweeper = 'mih-minesweeper';
static const String packageDevTest = 'package-dev';
}
class MihGoRouter {
@@ -74,9 +74,9 @@ class MihGoRouter {
final bool isUserSignedIn = await SuperTokens.doesSessionExist();
final unauthenticatedPaths = [
MihGoRouterPaths.mihAuthentication,
MihGoRouterPaths.forgotPassword,
"${MihGoRouterPaths.mihAuthentication}/${MihGoRouterPaths.forgotPassword}",
MihGoRouterPaths.resetPassword,
MihGoRouterPaths.aboutMih,
"/${MihGoRouterPaths.aboutMih}",
MihGoRouterPaths.businessProfileView,
];
KenLogger.success(
@@ -101,7 +101,7 @@ class MihGoRouter {
KenLogger.success("MihGoRouter: mihAuthentication");
return MihAuthentication();
},
),
routes: [
GoRoute(
name: "forgotPassword",
path: MihGoRouterPaths.forgotPassword,
@@ -110,6 +110,8 @@ class MihGoRouter {
return const MihAuthForgotPassword();
},
),
],
),
GoRoute(
name: "resetPassword",
path: MihGoRouterPaths.resetPassword,
@@ -136,7 +138,7 @@ class MihGoRouter {
key: UniqueKey(),
);
},
),
routes: [
// ========================== About MIH ==================================
GoRoute(
name: "aboutMih",
@@ -246,20 +248,13 @@ class MihGoRouter {
return MihWallet();
},
),
// ========================== MIH Access Controls ==================================
GoRoute(
name: "barcodeScanner",
path: MihGoRouterPaths.barcodeScanner,
name: "mihAccess",
path: MihGoRouterPaths.mihAccess,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: barcodeScanner");
final TextEditingController? args =
state.extra as TextEditingController?;
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MihBarcodeScanner(cardNumberController: args);
KenLogger.success("MihGoRouter: mihAccess");
return MihAccess();
},
),
// ========================== Test Package ==================================
@@ -271,13 +266,22 @@ class MihGoRouter {
return PackageTest();
},
),
// ========================== MIH Access Controls ==================================
// ========================== Mzansi Directory ==================================
GoRoute(
name: "mihAccess",
path: MihGoRouterPaths.mihAccess,
name: "mzansiDirectory",
path: MihGoRouterPaths.mzansiDirectory,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihAccess");
return MihAccess();
KenLogger.success("MihGoRouter: mzansiDirectory");
return MzansiDirectory();
},
),
// ========================== MIH Minesweeper ==================================
GoRoute(
name: "mihMinesweeper",
path: MihGoRouterPaths.mihMineSweeper,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihMineSweeper");
return MihMineSweeper();
},
),
// ========================== Patient Profile ==================================
@@ -313,16 +317,25 @@ class MihGoRouter {
return PatientProfile();
},
),
// ========================== Mzansi Directory ==================================
// ========================== End ==================================
],
),
GoRoute(
name: "mzansiDirectory",
path: MihGoRouterPaths.mzansiDirectory,
name: "barcodeScanner",
path: MihGoRouterPaths.barcodeScanner,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiDirectory");
return MzansiDirectory();
KenLogger.success("MihGoRouter: barcodeScanner");
final TextEditingController? args =
state.extra as TextEditingController?;
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MihBarcodeScanner(cardNumberController: args);
},
),
// ========================== End ==================================
GoRoute(
name: "fileViewer",
path: MihGoRouterPaths.fileViewer,
@@ -347,15 +360,6 @@ class MihGoRouter {
return MIHPrintPreview(arguments: args);
},
),
// ========================== MIH Minesweeper ==================================
GoRoute(
name: "mihMinesweeper",
path: MihGoRouterPaths.mihMineSweeper,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihMineSweeper");
return MihMineSweeper();
},
),
// ========================== End ==================================
// GoRoute(
// name: "notifications",
@@ -18,7 +18,7 @@ class _AboutMihTileState extends State<AboutMihTile> {
Widget build(BuildContext context) {
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
"aboutMih",
);
// Navigator.of(context).pushNamed(
@@ -20,7 +20,7 @@ class _MihAccessTileState extends State<MihAccessTile> {
return MihPackageTile(
authenticateUser: true,
onTap: () {
context.pushNamed(
context.goNamed(
"mihAccess",
);
// Navigator.of(context).pushNamed(
@@ -30,7 +30,7 @@ class _MihAccessTileState extends State<MihAccessTile> {
},
packageName: "Access Controls",
packageIcon: Icon(
MihIcons.accessControl,
MihIcons.mihAccessControls,
color: MihColors.secondary(),
// size: widget.packageSize,
),
@@ -19,13 +19,13 @@ class _MihCalculatorTileState extends State<MihCalculatorTile> {
Widget build(BuildContext context) {
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
"mihCalculator",
);
},
packageName: "Calculator",
packageIcon: Icon(
MihIcons.calculator,
MihIcons.mihCalculator,
color: MihColors.secondary(),
// size: widget.packageSize,
),
@@ -19,7 +19,7 @@ class _MzansiCalendarTileState extends State<MzansiCalendarTile> {
Widget build(BuildContext context) {
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
"mihCalendar",
);
// Navigator.of(context).pushNamed(
@@ -29,7 +29,7 @@ class _MzansiCalendarTileState extends State<MzansiCalendarTile> {
},
packageName: "Calendar",
packageIcon: Icon(
MihIcons.calendar,
MihIcons.mihCalendar,
color: MihColors.secondary(),
// size: widget.packageSize,
),
@@ -75,7 +75,7 @@ class _MihAuthenticationState extends State<MihAuthentication> {
iconColor: MihColors.secondary(),
iconSize: 45,
onTap: () {
context.goNamed("aboutMih", extra: true);
context.pushNamed("aboutMih", extra: true);
},
),
);
@@ -18,13 +18,13 @@ class _MihMineSweeperTileState extends State<MihMineSweeperTile> {
Widget build(BuildContext context) {
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
"mihMinesweeper",
);
},
packageName: "Minesweeper",
packageIcon: Icon(
MihIcons.mineSweeper,
MihIcons.mihMinesweeper,
color: MihColors.secondary(),
// size: widget.packageSize,
),
@@ -19,7 +19,7 @@ class _MzansiAiTileState extends State<MzansiAiTile> {
Widget build(BuildContext context) {
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
'mzansiAi',
);
// Navigator.of(context).pushNamed(
@@ -18,7 +18,7 @@ class _MzansiDirectoryTileState extends State<MzansiDirectoryTile> {
Widget build(BuildContext context) {
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
"mzansiDirectory",
);
// Navigator.of(context).pushNamed(
@@ -19,7 +19,7 @@ class _MzansiBusinessProfileTileState extends State<MzansiBusinessProfileTile> {
Widget build(BuildContext context) {
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
"businessProfileManage",
);
// Navigator.of(context).pushNamed(
@@ -20,7 +20,7 @@ class _MzansiProfileTileState extends State<MzansiProfileTile> {
// ImageProvider logo = MzansiInnovationHub.of(context)!.theme.logoImage();
return MihPackageTile(
onTap: () {
context.pushNamed(
context.goNamed(
'mzansiProfileManage',
);
},
@@ -20,7 +20,7 @@ class _MihWalletTileState extends State<MihWalletTile> {
return MihPackageTile(
// authenticateUser: true,
onTap: () {
context.pushNamed(
context.goNamed(
'mzansiWallet',
);
// Navigator.of(context).pushNamed(
@@ -22,7 +22,7 @@ class _PatManagerTileState extends State<PatManagerTile> {
return MihPackageTile(
authenticateUser: true,
onTap: () {
context.pushNamed(
context.goNamed(
'patientManager',
);
// Navigator.of(context).pushNamed(
@@ -25,7 +25,7 @@ class _PatientProfileTileState extends State<PatientProfileTile> {
PatientManagerProvider patManProvider =
context.read<PatientManagerProvider>();
patManProvider.setPersonalMode(true);
context.pushNamed("patientProfile");
context.goNamed("patientProfile");
},
packageName: "Patient Profile",
packageIcon: Icon(