update business user edit workflow
This commit is contained in:
@@ -5,7 +5,6 @@ import 'package:mzansi_innovation_hub/main.dart';
|
|||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
|
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_circle_avatar.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_form.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_form.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_image_display.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_image_display.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_window.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_window.dart';
|
||||||
@@ -133,27 +132,29 @@ class _MihUpdateMyBusinessUserDetailsState
|
|||||||
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"
|
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||||
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||||
child: Column(
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
children: [
|
children: [
|
||||||
MihForm(
|
MihForm(
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
formFields: [
|
formFields: [
|
||||||
Center(
|
// Center(
|
||||||
child: MihCircleAvatar(
|
// child: MihCircleAvatar(
|
||||||
imageFile: mzansiProfileProvider.userProfilePicture,
|
// imageFile: mzansiProfileProvider.userProfilePicture,
|
||||||
width: 150,
|
// width: 150,
|
||||||
editable: false,
|
// editable: false,
|
||||||
fileNameController: fileNameController,
|
// fileNameController: fileNameController,
|
||||||
userSelectedfile: userPicFile,
|
// userSelectedfile: userPicFile,
|
||||||
frameColor: MihColors.getSecondaryColor(
|
// frameColor: MihColors.getSecondaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
// MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
"Dark"),
|
// "Dark"),
|
||||||
backgroundColor: MihColors.getPrimaryColor(
|
// backgroundColor: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
// MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
"Dark"),
|
// "Dark"),
|
||||||
onChange: (_) {},
|
// onChange: (_) {},
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: false,
|
visible: false,
|
||||||
child: MihTextFormField(
|
child: MihTextFormField(
|
||||||
@@ -302,7 +303,9 @@ class _MihUpdateMyBusinessUserDetailsState
|
|||||||
"Update",
|
"Update",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.mode ==
|
||||||
"Dark"),
|
"Dark"),
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@@ -315,6 +318,35 @@ class _MihUpdateMyBusinessUserDetailsState
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
right: 0,
|
||||||
|
child: MihButton(
|
||||||
|
onPressed: () {
|
||||||
|
if (_formKey.currentState!.validate()) {
|
||||||
|
submitForm(mzansiProfileProvider);
|
||||||
|
} else {
|
||||||
|
MihAlertServices().inputErrorAlert(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonColor: MihColors.getGreenColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
|
width: 100,
|
||||||
|
height: 25,
|
||||||
|
child: Text(
|
||||||
|
"Update",
|
||||||
|
style: TextStyle(
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
|
"Dark"),
|
||||||
|
fontSize: 15,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -184,7 +184,9 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: MihCircleAvatar(
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
MihCircleAvatar(
|
||||||
imageFile: mzansiProfileProvider.userProfilePicture,
|
imageFile: mzansiProfileProvider.userProfilePicture,
|
||||||
width: 150,
|
width: 150,
|
||||||
editable: false,
|
editable: false,
|
||||||
@@ -198,6 +200,31 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
"Dark"),
|
"Dark"),
|
||||||
onChange: (_) {},
|
onChange: (_) {},
|
||||||
),
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 5,
|
||||||
|
right: 5,
|
||||||
|
child: MihButton(
|
||||||
|
onPressed: () {
|
||||||
|
editBizUserProfileWindow(
|
||||||
|
mzansiProfileProvider, width);
|
||||||
|
},
|
||||||
|
buttonColor: MihColors.getGreenColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
|
"Dark"),
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
child: Icon(
|
||||||
|
Icons.edit,
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.mode ==
|
||||||
|
"Dark"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
buildEmployeeInfoCard(mzansiProfileProvider),
|
buildEmployeeInfoCard(mzansiProfileProvider),
|
||||||
@@ -246,28 +273,6 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
Center(
|
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
|
||||||
editBizUserProfileWindow(
|
|
||||||
mzansiProfileProvider, width);
|
|
||||||
},
|
|
||||||
buttonColor: MihColors.getGreenColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Edit Profile",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user