feat(consultant): ***WIP: consultant request status in settings

This commit is contained in:
mso7nueh
2025-06-02 17:51:27 +03:00
parent f0a184b800
commit 7c354cc0a3
8 changed files with 59 additions and 38 deletions

View File

@@ -58,11 +58,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
const SizedBox(height: 12),
_aboutEatvio(state),
const SizedBox(height: 12),
if (!state.profile.roles.contains('consultant'))
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: _becomeConsultantButton(state),
),
_becomeConsultantButton(state),
_deleteAccountButton(state),
],
),
@@ -355,31 +351,33 @@ class _SettingsScreenState extends State<SettingsScreen> {
}
_becomeConsultantButton(SettingsStateLoaded state) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: InkWell(
onTap: () => GoRouter.of(context).pushNamed('becomeConsultantScreen'),
borderRadius: BorderRadius.circular(20),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: appTheme.blueA400,
),
child: const Center(
child: Text(
'Стать консультантом',
style: TextStyle(
color: Colors.white,
height: 1,
fontSize: 18,
if (state.consultationRequestModel == null) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16) + const EdgeInsets.only(bottom: 8),
child: InkWell(
onTap: () => GoRouter.of(context).pushNamed('becomeConsultantScreen'),
borderRadius: BorderRadius.circular(20),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: appTheme.blueA400,
),
child: const Center(
child: Text(
'Стать консультантом',
style: TextStyle(
color: Colors.white,
height: 1,
fontSize: 18,
),
),
),
),
),
),
);
);
}
}
_deleteAccountButton(SettingsStateLoaded state) {