Registration pipeline chenged - fill profile step added. Order payment fixed
This commit is contained in:
@@ -4,11 +4,11 @@ import 'package:go_router/go_router.dart';
|
||||
import '../../core/app_colors.dart';
|
||||
import '../components/code_dots.dart';
|
||||
import '../event/map_event.dart';
|
||||
import '../event/pin_event.dart';
|
||||
import '../event/spalsh_event.dart';
|
||||
import '../state/pin_state.dart';
|
||||
import '../viewmodel/map_bloc.dart';
|
||||
import '../viewmodel/pin_bloc.dart';
|
||||
import '../event/pin_event.dart';
|
||||
import '../state/pin_state.dart';
|
||||
import '../viewmodel/splash_bloc.dart';
|
||||
|
||||
class PinLoginScreen extends StatefulWidget {
|
||||
@@ -52,8 +52,14 @@ class _PinLoginScreenState extends State<PinLoginScreen> {
|
||||
return BlocListener<PinBloc, PinState>(
|
||||
listener: (context, state) {
|
||||
if (state is PinSuccess) {
|
||||
context.read<SplashBloc>().add(PinVerificationSuccess());
|
||||
context.go("/home");
|
||||
if (state.isProfileIncomplete) {
|
||||
// Переходим на заполнение профиля, если хотя бы одно поле пустое
|
||||
context.go('/edit-profile?isRegistration=true');
|
||||
} else {
|
||||
// Все поля заполнены — завершаем авторизацию и идем на главный экран
|
||||
context.read<SplashBloc>().add(PinVerificationSuccess());
|
||||
context.go('/home');
|
||||
}
|
||||
}
|
||||
if (state.error != null) {
|
||||
controller.clear();
|
||||
@@ -128,7 +134,6 @@ class _PinLoginScreenState extends State<PinLoginScreen> {
|
||||
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Блок ошибки
|
||||
if (state.error != null)
|
||||
Text(
|
||||
state.error!,
|
||||
@@ -157,14 +162,13 @@ class _PinLoginScreenState extends State<PinLoginScreen> {
|
||||
"Забыли PIN-код?",
|
||||
style: TextStyle(
|
||||
color: AppColors.whiteText,
|
||||
decoration: TextDecoration.underline,
|
||||
decoration: TextDecoration.underline,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 40),
|
||||
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user