mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Merge remote-tracking branch 'origin/master' into user_absences
This commit is contained in:
@@ -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)
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -118,7 +118,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
* Return true if the phonenumber is a landline or voip phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*
|
||||
* @param string $phonenumber
|
||||
* @param string|PhoneNumber $phonenumber
|
||||
*/
|
||||
public function isValidPhonenumberAny($phonenumber): bool
|
||||
{
|
||||
@@ -138,7 +138,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
* Return true if the phonenumber is a landline or voip phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*
|
||||
* @param string $phonenumber
|
||||
* @param string|PhoneNumber $phonenumber
|
||||
*/
|
||||
public function isValidPhonenumberLandOrVoip($phonenumber): bool
|
||||
{
|
||||
@@ -159,7 +159,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
* REturn true if the phonenumber is a mobile phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*
|
||||
* @param string $phonenumber
|
||||
* @param string|PhoneNumber $phonenumber
|
||||
*/
|
||||
public function isValidPhonenumberMobile($phonenumber): bool
|
||||
{
|
||||
@@ -182,6 +182,10 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($phonenumber instanceof PhoneNumber) {
|
||||
$phonenumber = (string) $phonenumber;
|
||||
}
|
||||
|
||||
// filter only number
|
||||
$filtered = preg_replace('/[^0-9]/', '', $phonenumber);
|
||||
|
||||
|
@@ -98,11 +98,6 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (typeof this.value.point !== 'undefined') {
|
||||
this.updateMapCenter(this.value.point);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
transName(value) {
|
||||
return value.streetNumber === undefined ? value.street : `${value.streetNumber}, ${value.street}`
|
||||
|
@@ -11,6 +11,7 @@
|
||||
{{ encore_entry_script_tags('mod_entity_workflow_subscribe') }}
|
||||
{{ encore_entry_script_tags('page_workflow_show') }}
|
||||
{{ encore_entry_script_tags('mod_wopi_link') }}
|
||||
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
@@ -19,6 +20,7 @@
|
||||
{{ encore_entry_link_tags('mod_entity_workflow_subscribe') }}
|
||||
{{ encore_entry_link_tags('page_workflow_show') }}
|
||||
{{ encore_entry_link_tags('mod_wopi_link') }}
|
||||
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
|
||||
{% endblock %}
|
||||
|
||||
{% import '@ChillMain/Workflow/macro_breadcrumb.html.twig' as macro %}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user