up labourage
This commit is contained in:
parent
7cde6a56aa
commit
1c24ae1fea
4 changed files with 32 additions and 18 deletions
|
@ -66,6 +66,8 @@ class FollowUpService
|
|||
$objects = array_filter($elements, fn($el) => ($el['tags']['natural'] ?? null) === 'tree') ?? [];
|
||||
} elseif ($type === 'places') {
|
||||
$objects = [];
|
||||
} elseif ($type === 'power_pole') {
|
||||
$objects = array_filter($elements, fn($el) => ($el['tags']['power'] ?? null) === 'pole') ?? [];
|
||||
} else {
|
||||
$objects = [];
|
||||
}
|
||||
|
@ -195,6 +197,14 @@ class FollowUpService
|
|||
|| !empty($tags['leaf_fall'] ?? null);
|
||||
return $hasTaxonomy && $hasLeaf;
|
||||
});
|
||||
} elseif ($type === 'power_pole') {
|
||||
$completed = array_filter($data['objects'], function($el) {
|
||||
$tags = $el['tags'] ?? [];
|
||||
return !empty($tags['ref'] ?? null)
|
||||
|| !empty($tags['material'] ?? null)
|
||||
|| !empty($tags['height'] ?? null)
|
||||
|| !empty($tags['operator'] ?? null);
|
||||
});
|
||||
}
|
||||
if ($type === 'places') {
|
||||
$completion = $stats->getCompletionPercent();
|
||||
|
@ -360,7 +370,8 @@ class FollowUpService
|
|||
'street_lamp' => 'Lampadaires',
|
||||
'drinking_water' => 'Eau potable',
|
||||
'tree' => 'Arbres',
|
||||
'places' => 'Lieux'
|
||||
'places' => 'Lieux',
|
||||
'power_pole' => 'Poteaux électriques',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -388,7 +399,8 @@ class FollowUpService
|
|||
'street_lamp' => 'bi-lightbulb',
|
||||
'drinking_water' => 'bi-droplet-half',
|
||||
'tree' => 'bi-tree',
|
||||
'places' => 'bi-geo-alt'
|
||||
'places' => 'bi-geo-alt',
|
||||
'power_pole' => 'bi-signpost',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue