mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
provide all tags on edit space
This commit is contained in:
@ -40,4 +40,22 @@ class SpaceHelper {
|
||||
|
||||
return "$baseName(${maxNumber + 1})";
|
||||
}
|
||||
|
||||
static bool isSave(List<SpaceModel> spaces) {
|
||||
return spaces.isNotEmpty &&
|
||||
spaces.any((space) =>
|
||||
space.status == SpaceStatus.newSpace ||
|
||||
space.status == SpaceStatus.modified ||
|
||||
space.status == SpaceStatus.deleted);
|
||||
}
|
||||
|
||||
static bool isHighlightedSpace(SpaceModel space, SpaceModel? selectedSpace) {
|
||||
if (selectedSpace == null) return true;
|
||||
|
||||
return space == selectedSpace ||
|
||||
selectedSpace.parent?.internalId == space.internalId ||
|
||||
selectedSpace.children
|
||||
?.any((child) => child.internalId == space.internalId) ==
|
||||
true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user