From e589c4e0c181b9ed4c3512cbd3529ee8f1b30869 Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Fri, 16 Aug 2024 09:54:46 +0200 Subject: [PATCH] fix buttom alignment accress UI --- .../components/builders/buildPatientList.dart | 14 +++++++---- .../lib/components/patientFiles.dart | 24 +++++++------------ .../popUpMessages/mihDeleteMessage.dart | 1 + .../patient_manager/lib/pages/patientAdd.dart | 14 +---------- .../lib/pages/patientEdit.dart | 9 +------ .../lib/pages/profileBusinessAdd.dart | 2 +- .../lib/pages/profileBusinessUpdate.dart | 2 +- .../lib/pages/profileUserUpdate.dart | 4 ++-- .../patient_manager/lib/pages/register.dart | 3 ++- .../patient_manager/lib/pages/signin.dart | 7 ++---- 10 files changed, 28 insertions(+), 52 deletions(-) diff --git a/Frontend/patient_manager/lib/components/builders/buildPatientList.dart b/Frontend/patient_manager/lib/components/builders/buildPatientList.dart index 871d6ac0..bf9c608a 100644 --- a/Frontend/patient_manager/lib/components/builders/buildPatientList.dart +++ b/Frontend/patient_manager/lib/components/builders/buildPatientList.dart @@ -60,6 +60,10 @@ class _BuildPatientsListState extends State { "The appointment has been successfully booked!\n\nAn approval request as been sent to the patient.Once the access request has been approved, you will be able to access the patients profile. ou can check the status of your request in patient queue under the appointment."; // "${fnameController.text} ${lnameController.text} patient profiole has been successfully added!\n"; Navigator.pop(context); + setState(() { + dateController.text = ""; + timeController.text = ""; + }); successPopUp(message); } else { internetConnectionPopUp(); @@ -177,7 +181,7 @@ class _BuildPatientsListState extends State { LableText: "Time", required: true, ), - const SizedBox(height: 15.0), + const SizedBox(height: 30.0), SizedBox( width: 300, height: 50, @@ -190,13 +194,13 @@ class _BuildPatientsListState extends State { .theme .primaryColor(), onTap: () { - print("here1"); + //print("here1"); bool filled = isAppointmentFieldsFilled(); - print("fields filled: $filled"); + //print("fields filled: $filled"); if (filled) { - print("here2"); + //print("here2"); submitApointment(index); - print("here3"); + //print("here3"); } else { showDialog( context: context, diff --git a/Frontend/patient_manager/lib/components/patientFiles.dart b/Frontend/patient_manager/lib/components/patientFiles.dart index f119676d..6dec0a4e 100644 --- a/Frontend/patient_manager/lib/components/patientFiles.dart +++ b/Frontend/patient_manager/lib/components/patientFiles.dart @@ -4,11 +4,11 @@ import 'dart:convert'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:patient_manager/components/builders/buildFilesList.dart'; +import 'package:patient_manager/components/inputsAndButtons/mihFileInput.dart'; import 'package:patient_manager/components/medCertInput.dart'; import 'package:patient_manager/components/mihLoadingCircle.dart'; import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihSuccessMessage.dart'; -import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart'; import 'package:patient_manager/components/inputsAndButtons/mihButton.dart'; import 'package:patient_manager/components/prescipInput.dart'; import 'package:patient_manager/env/env.dart'; @@ -431,15 +431,12 @@ class _PatientFilesState extends State { const SizedBox(height: 25.0), SizedBox( width: 700, - height: 50, - child: MIHButton( - buttonText: "Select File", - buttonColor: MzanziInnovationHub.of(context)! - .theme - .secondaryColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - onTap: () async { + child: MIHFileField( + controller: selectedFileController, + hintText: "Select File", + editable: false, + required: true, + onPressed: () async { FilePickerResult? result = await FilePicker.platform.pickFiles( type: FileType.custom, @@ -457,12 +454,7 @@ class _PatientFilesState extends State { }, ), ), - MIHTextField( - controller: selectedFileController, - hintText: "Selected FIle", - editable: false, - required: true, - ), + const SizedBox(height: 30), SizedBox( width: 300, height: 50, diff --git a/Frontend/patient_manager/lib/components/popUpMessages/mihDeleteMessage.dart b/Frontend/patient_manager/lib/components/popUpMessages/mihDeleteMessage.dart index 132e8719..b5a6b110 100644 --- a/Frontend/patient_manager/lib/components/popUpMessages/mihDeleteMessage.dart +++ b/Frontend/patient_manager/lib/components/popUpMessages/mihDeleteMessage.dart @@ -154,6 +154,7 @@ class _MIHDeleteMessageState extends State { ), ), ), + const SizedBox(height: 30), SizedBox( width: 300, height: 50, diff --git a/Frontend/patient_manager/lib/pages/patientAdd.dart b/Frontend/patient_manager/lib/pages/patientAdd.dart index 4a251429..61ef7ad1 100644 --- a/Frontend/patient_manager/lib/pages/patientAdd.dart +++ b/Frontend/patient_manager/lib/pages/patientAdd.dart @@ -176,7 +176,6 @@ class _AddPatientState extends State { editable: true, required: true, ), - const SizedBox(height: 10.0), MIHTextField( controller: fnameController, @@ -184,7 +183,6 @@ class _AddPatientState extends State { editable: false, required: true, ), - const SizedBox(height: 10.0), MIHTextField( controller: lnameController, @@ -192,34 +190,27 @@ class _AddPatientState extends State { editable: false, required: true, ), - const SizedBox(height: 10.0), - MIHTextField( controller: cellController, hintText: "Cell Number", editable: true, required: true, ), - const SizedBox(height: 10.0), - MIHTextField( controller: emailController, hintText: "Email", editable: false, required: true, ), - const SizedBox(height: 10.0), - MIHTextField( controller: addressController, hintText: "Address", editable: true, required: true, ), - const SizedBox(height: 15.0), Text( "Medical Aid Details", @@ -231,7 +222,6 @@ class _AddPatientState extends State { ), ), const SizedBox(height: 10.0), - MIHDropdownField( controller: medAidController, hintText: "Medical Aid", @@ -285,9 +275,7 @@ class _AddPatientState extends State { ], ), ), - - //const SizedBox(height: 10.0), - + const SizedBox(height: 30.0), SizedBox( width: 450.0, height: 50.0, diff --git a/Frontend/patient_manager/lib/pages/patientEdit.dart b/Frontend/patient_manager/lib/pages/patientEdit.dart index 3002e994..9db8acc6 100644 --- a/Frontend/patient_manager/lib/pages/patientEdit.dart +++ b/Frontend/patient_manager/lib/pages/patientEdit.dart @@ -388,7 +388,6 @@ class _EditPatientState extends State { editable: false, required: true, ), - const SizedBox(height: 10.0), MIHTextField( controller: fnameController, @@ -396,7 +395,6 @@ class _EditPatientState extends State { editable: false, required: true, ), - const SizedBox(height: 10.0), MIHTextField( controller: lnameController, @@ -404,7 +402,6 @@ class _EditPatientState extends State { editable: false, required: true, ), - const SizedBox(height: 10.0), MIHTextField( controller: cellController, @@ -412,7 +409,6 @@ class _EditPatientState extends State { editable: true, required: true, ), - const SizedBox(height: 10.0), MIHTextField( controller: emailController, @@ -420,7 +416,6 @@ class _EditPatientState extends State { editable: false, required: true, ), - const SizedBox(height: 10.0), MIHTextField( controller: addressController, @@ -428,7 +423,6 @@ class _EditPatientState extends State { editable: true, required: true, ), - const SizedBox(height: 15.0), Text( "Medical Aid Details", @@ -501,8 +495,7 @@ class _EditPatientState extends State { ], ), ), - - //const SizedBox(height: 10.0), + const SizedBox(height: 30.0), SizedBox( width: 500.0, height: 50.0, diff --git a/Frontend/patient_manager/lib/pages/profileBusinessAdd.dart b/Frontend/patient_manager/lib/pages/profileBusinessAdd.dart index 3dba1210..c40c8766 100644 --- a/Frontend/patient_manager/lib/pages/profileBusinessAdd.dart +++ b/Frontend/patient_manager/lib/pages/profileBusinessAdd.dart @@ -291,7 +291,7 @@ class _ProfileBusinessAddState extends State { required: true, editable: false, ), - const SizedBox(height: 15.0), + const SizedBox(height: 30.0), SizedBox( width: 500.0, height: 50.0, diff --git a/Frontend/patient_manager/lib/pages/profileBusinessUpdate.dart b/Frontend/patient_manager/lib/pages/profileBusinessUpdate.dart index 4de27ae4..d79235e9 100644 --- a/Frontend/patient_manager/lib/pages/profileBusinessUpdate.dart +++ b/Frontend/patient_manager/lib/pages/profileBusinessUpdate.dart @@ -382,7 +382,7 @@ class _ProfileBusinessUpdateState extends State { required: true, editable: false, ), - const SizedBox(height: 15.0), + const SizedBox(height: 30.0), SizedBox( width: 500.0, height: 50.0, diff --git a/Frontend/patient_manager/lib/pages/profileUserUpdate.dart b/Frontend/patient_manager/lib/pages/profileUserUpdate.dart index 0c35d274..77065be1 100644 --- a/Frontend/patient_manager/lib/pages/profileUserUpdate.dart +++ b/Frontend/patient_manager/lib/pages/profileUserUpdate.dart @@ -213,7 +213,7 @@ class _ProfileUserUpdateState extends State { ), ), const SizedBox( - width: 25, + width: 10, ), Switch( value: businessUser, @@ -225,7 +225,7 @@ class _ProfileUserUpdateState extends State { ), ], ), - const SizedBox(height: 10.0), + const SizedBox(height: 30.0), SizedBox( width: 500.0, height: 50.0, diff --git a/Frontend/patient_manager/lib/pages/register.dart b/Frontend/patient_manager/lib/pages/register.dart index d2e33047..abfbf35f 100644 --- a/Frontend/patient_manager/lib/pages/register.dart +++ b/Frontend/patient_manager/lib/pages/register.dart @@ -304,7 +304,7 @@ class _RegisterState extends State { ), ), //spacer - const SizedBox(height: 10), + const SizedBox(height: 30), // sign up button SizedBox( width: 500.0, @@ -322,6 +322,7 @@ class _RegisterState extends State { }, ), ), + const SizedBox(height: 10), //register text SizedBox( width: 500.0, diff --git a/Frontend/patient_manager/lib/pages/signin.dart b/Frontend/patient_manager/lib/pages/signin.dart index 62c151f8..f1c89a23 100644 --- a/Frontend/patient_manager/lib/pages/signin.dart +++ b/Frontend/patient_manager/lib/pages/signin.dart @@ -168,7 +168,7 @@ class _SignInState extends State { ), ), //spacer - const SizedBox(height: 10), + const SizedBox(height: 30), // sign in button SizedBox( width: 500.0, @@ -187,7 +187,7 @@ class _SignInState extends State { ), ), //spacer - //const SizedBox(height: 30), + const SizedBox(height: 10), //register text SizedBox( width: 500.0, @@ -217,9 +217,6 @@ class _SignInState extends State { ), ), ), - const SizedBox( - width: 15, - ), ], ), )