feat(InfoByOrder): added user info to InfoByOrderScreen author card

This commit is contained in:
misha
2025-10-29 04:38:04 +03:00
parent 06cafb4257
commit 563d84ca12
10 changed files with 108 additions and 107 deletions

View File

@@ -149,10 +149,7 @@ class _ChatScreenState extends State<ChatScreen> {
centerTitle: false,
title: GestureDetector(
onTap: () {
GoRouter.of(context).pushNamed(
'profileScreen',
extra: state.chatRoom.users.receiver.slug,
);
GoRouter.of(context).pushNamed('profileScreen', extra: state.chatRoom.users.receiver.slug);
},
child: Row(
children: [
@@ -447,7 +444,7 @@ class _ChatScreenState extends State<ChatScreen> {
final blockedUsersCubit = sl<BlockedUsersCubit>();
await blockedUsersCubit.getBlockedUsers();
final blockedState = blockedUsersCubit.state;
if (blockedState is BlockedUsersStateLoaded) {
final isBlocked = blockedState.profilesList.any((profile) => profile.slug == state.chatRoom.users.receiver.slug);
if (isBlocked) {
@@ -462,7 +459,7 @@ class _ChatScreenState extends State<ChatScreen> {
return;
}
}
if (textEditingController.text.isNotEmpty || pickedFiles.isNotEmpty) {
chatRoomCubit.sendMessage(
data: textEditingController.text.isEmpty ? null : textEditingController.text.trim(),
@@ -497,6 +494,12 @@ class _ChatScreenState extends State<ChatScreen> {
left: 16,
child: AboutOrderButton(
onTap: () async {
if (amIConsultant) {
GoRouter.of(
context,
).push(InfoByOrderScreen.path, extra: {'planId': state.chatRoom.chosenPlan?.id, 'customerSlug': state.chatRoom.users.receiver.slug});
return;
}
GoRouter.of(context).push(InfoByOrderScreen.path, extra: {'planId': state.chatRoom.chosenPlan?.id});
},
),