mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 22:09:40 +00:00
Refactor DuplicateSpaceService
to return a list of SpaceModel
objects instead of a single instance. Update related components including DuplicateSpaceSuccess
state and DuplicateSpaceDialog
to handle multiple spaces. Enhance CommunityStructureHeaderActionButtonsComposer
to reflect these changes in the success callback.
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/space_management_v2/main_module/helpers/spaces_recursive_helper.dart';
|
||||
@ -53,8 +51,16 @@ class CommunityStructureHeaderActionButtonsComposer extends StatelessWidget {
|
||||
initialName: space.spaceName,
|
||||
selectedSpaceUuid: space.uuid,
|
||||
selectedCommunityUuid: selectedCommunity.uuid,
|
||||
onSuccess: (space) {
|
||||
log('space: $space');
|
||||
onSuccess: (spaces) {
|
||||
final updatedCommunity = selectedCommunity.copyWith(
|
||||
spaces: spaces,
|
||||
);
|
||||
context.read<CommunitiesBloc>().add(
|
||||
CommunitiesUpdateCommunity(updatedCommunity),
|
||||
);
|
||||
context.read<CommunitiesTreeSelectionBloc>().add(
|
||||
SelectCommunityEvent(community: updatedCommunity),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user