pt 3
This commit is contained in:
@@ -208,7 +208,10 @@ class MihGoRouter {
|
||||
});
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return MzansiBusinessProfile(arguments: args);
|
||||
return MzansiBusinessProfile(
|
||||
key: UniqueKey(),
|
||||
arguments: args,
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
|
||||
@@ -20,7 +20,6 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.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_success_message.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
||||
|
||||
@@ -56,6 +55,67 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
final ValueNotifier<int> _counter = ValueNotifier<int>(0);
|
||||
late String env;
|
||||
|
||||
void successPopUp(String message, bool stayOnPersonalSide) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return MihPackageAlert(
|
||||
alertIcon: Icon(
|
||||
Icons.check_circle_outline_rounded,
|
||||
size: 150,
|
||||
color: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
alertTitle: "Successfully Updated Profile",
|
||||
alertBody: Column(
|
||||
children: [
|
||||
Text(
|
||||
message,
|
||||
style: TextStyle(
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
Center(
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
context.goNamed(
|
||||
'mihHome',
|
||||
extra: stayOnPersonalSide,
|
||||
);
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
elevation: 10,
|
||||
width: 300,
|
||||
child: Text(
|
||||
"Dismiss",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
alertColour: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
);
|
||||
// return MIHSuccessMessage(
|
||||
// successType: "Success",
|
||||
// successMessage: message,
|
||||
// );
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> submitForm() async {
|
||||
if (isFormFilled()) {
|
||||
int statusCode = 0;
|
||||
@@ -80,25 +140,9 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
||||
bool successfullyUploadedFile = await uploadFile();
|
||||
if (successfullyUploadedFile) {
|
||||
//You left of here
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pushNamed(
|
||||
'/',
|
||||
arguments: AuthArguments(
|
||||
false,
|
||||
false,
|
||||
),
|
||||
);
|
||||
String message = "Your information has been updated successfully!";
|
||||
successPopUp(message, false);
|
||||
// File uploaded successfully
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MIHSuccessMessage(
|
||||
successType: "Success",
|
||||
successMessage: "Business details updated successfully",
|
||||
);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
// File upload failed
|
||||
showDialog(
|
||||
|
||||
@@ -143,7 +143,7 @@ services:
|
||||
container_name: MIH-Monitor
|
||||
image: portainer/portainer-ce:2.20.3
|
||||
ports:
|
||||
- 9443:9443
|
||||
- 9444:9443
|
||||
volumes:
|
||||
- data:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
Reference in New Issue
Block a user