Merge branch 'master' into upgrade-php82

This commit is contained in:
2023-02-09 18:37:30 +01:00
43 changed files with 1152 additions and 122 deletions

View File

@@ -28,7 +28,7 @@ class LocationController extends CRUDController
protected function customizeQuery(string $action, Request $request, $query): void
{
$query->where('e.availableForUsers = true'); //TODO not working
$query->where('e.availableForUsers = "TRUE"');
}
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)

View File

@@ -83,9 +83,9 @@ interface ExportInterface extends ExportElementInterface
*
* @param string $key The column key, as added in the query
* @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR')
* @param mixed $data The data from the export's form (as defined in `buildForm`
* @param mixed $data The data from the export's form (as defined in `buildForm`)
*
* @return Closure where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }`
* @return pure-callable(null|string|int|float|'_header' $value):string|int|\DateTimeInterface where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }`
*/
public function getLabels($key, array $values, $data);

View File

@@ -35,6 +35,10 @@ class DateTimeHelper
return '';
}
if ($value instanceof \DateTimeInterface) {
return $value;
}
// warning: won't work with DateTimeImmutable as we reset time a few lines later
$date = DateTime::createFromFormat('Y-m-d', $value);
$hasTime = false;

View File

@@ -229,6 +229,7 @@ Create a new circle: Créer un nouveau cercle
#admin section for location
Location: Localisation
pick location: Localisation
Location type list: Liste des types de localisation
Create a new location type: Créer un nouveau type de localisation
Available for users: Disponible aux utilisateurs