Projects
This commit is contained in:
parent
251617d0d7
commit
eb78346dc1
|
|
@ -36,14 +36,18 @@ List<int> filteredProjectsSelector(
|
|||
BuiltMap<int, ClientEntity> clientMap) {
|
||||
final list = projectList.where((projectId) {
|
||||
final project = projectMap[projectId];
|
||||
|
||||
if (project.clientId > 0 && clientMap[project.clientId].isArchived) {
|
||||
final client = clientMap[project.clientId] ?? ClientEntity(id: project.clientId);
|
||||
if (client == null || !client.isActive) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!project.matchesStates(projectListState.stateFilters)) {
|
||||
return false;
|
||||
}
|
||||
if (projectListState.filterEntityId != null &&
|
||||
project.clientId != projectListState.filterEntityId) {
|
||||
return false;
|
||||
}
|
||||
if (projectListState.custom1Filters.isNotEmpty &&
|
||||
!projectListState.custom1Filters.contains(project.customValue1)) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ List<int> filteredStubsSelector(BuiltMap<int, StubEntity> stubMap,
|
|||
if (!stub.matchesStates(stubListState.stateFilters)) {
|
||||
return false;
|
||||
}
|
||||
if (stubListState.filterEntityId != null &&
|
||||
stub.clientId != stubListState.filterEntityId) {
|
||||
return false;
|
||||
}
|
||||
if (stubListState.custom1Filters.isNotEmpty &&
|
||||
!stubListState.custom1Filters.contains(stub.customValue1)) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue