updated tag dialogue selection

This commit is contained in:
hannathkadher
2025-03-05 22:24:45 +04:00
parent 5cea8eddb3
commit d2ff909bf2
8 changed files with 237 additions and 53 deletions

View File

@ -60,7 +60,7 @@ class SpaceManagementBloc extends Bloc<SpaceManagementEvent, SpaceManagementStat
_cachedSpaceModels = await fetchSpaceModels();
}
await fetchSpaceModels();
await fetchTags();
emit(SpaceModelLoaded(
communities:
@ -78,7 +78,7 @@ class SpaceManagementBloc extends Bloc<SpaceManagementEvent, SpaceManagementStat
} else {
_cachedSpaceModels = await fetchSpaceModels();
}
await fetchSpaceModels();
await fetchTags();
emit(SpaceModelLoaded(
communities:

View File

@ -25,7 +25,7 @@ class Tag extends BaseTag {
return Tag(
uuid: json['uuid'] ?? '',
internalId: internalId,
tag: json['tag'] ?? '',
tag: json['name'] ?? '',
product: json['product'] != null
? ProductModel.fromMap(json['product'])
: null,
@ -34,6 +34,7 @@ class Tag extends BaseTag {
@override
Tag copyWith({
String? uuid,
String? tag,
ProductModel? product,
String? location,
@ -60,7 +61,7 @@ class Tag extends BaseTag {
extension TagModelExtensions on Tag {
TagBodyModel toTagBodyModel() {
return TagBodyModel()
..uuid = uuid ?? ''
..uuid = uuid
..tag = tag ?? ''
..productUuid = product?.uuid;
}