Issue-483: WIP* moderation consultant request status and message

This commit is contained in:
mso7nueh
2025-06-03 18:17:03 +03:00
parent 7c354cc0a3
commit c361e12d35
15 changed files with 151 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/core/widgets/data_error_widget.dart';
import 'package:eatvio_app/core/widgets/loader.dart';
import 'package:eatvio_app/features/consultant/become_consultant/models/consultation_request_model.dart';
import 'package:eatvio_app/features/settings/entities/settings_entity.dart';
import 'package:eatvio_app/features/settings/presentation/bloc/settings_cubit/settings_cubit.dart';
import 'package:eatvio_app/features/settings/presentation/bloc/settings_cubit/settings_state.dart';
@@ -377,7 +378,58 @@ class _SettingsScreenState extends State<SettingsScreen> {
),
),
);
} else {
if (state.consultationRequestModel!.canceledModeration.status == ModerationStatus.created) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16) + const EdgeInsets.only(bottom: 8),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: const Color(0xFFEAEAEA),
),
child: const Center(
child: Text(
'Данные на проверке...',
style: TextStyle(
color: Colors.black,
height: 1,
fontSize: 18,
),
),
),
),
);
} else if (state.consultationRequestModel!.canceledModeration.status == ModerationStatus.canceled) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16) + const EdgeInsets.only(bottom: 8),
child: InkWell(
onTap: () => GoRouter.of(context).pushNamed('stepperBecomeConsultantScreen', extra: state.profile.slug),
borderRadius: BorderRadius.circular(20),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: const Color(0x33FFCC00),
),
child: const Center(
child: Text(
'Заявка обработана',
style: TextStyle(
color: Colors.black,
height: 1,
fontSize: 18,
),
),
),
),
),
);
}
}
return const SizedBox.shrink();
}
_deleteAccountButton(SettingsStateLoaded state) {