block business details if partial access

This commit is contained in:
2024-09-10 16:23:10 +02:00
parent 9e44ef9f1a
commit b280058fd8

View File

@@ -263,6 +263,14 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
return regex.hasMatch(text); return regex.hasMatch(text);
} }
bool isFullAccess() {
if (widget.arguments.businessUser!.access == "Partial") {
return false;
} else {
return true;
}
}
@override @override
void dispose() { void dispose() {
nameController.dispose(); nameController.dispose();
@@ -332,7 +340,9 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
padding: const EdgeInsets.all(15), padding: const EdgeInsets.all(15),
child: Column( child: Column(
children: [ children: [
Column( Visibility(
visible: isFullAccess(),
child: Column(
children: [ children: [
const Text( const Text(
"Business Profile", "Business Profile",
@@ -407,6 +417,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
), ),
], ],
), ),
),
Column( Column(
children: [ children: [
//const SizedBox(height: 15.0), //const SizedBox(height: 15.0),