Skip to content

Commit

Permalink
Merge branch 'hotfix/0.24.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
polosson committed May 14, 2024
2 parents 0f8fcab + 9e9fdf1 commit 0c659b6
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Tous les changements notables sur le projet sont documentés dans ce fichier.

Ce projet adhère au principe du [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.24.1 (2024-05-14)

- Corrige le click sur les éléments déroulant sur mobile / tablette.
- Corrige la recherche dans les listings quand des caractères spéciaux sont utilisés.

## 0.24.0 (2024-05-09)

- __[CHANGEMENT CRITIQUE]__ Loxya requiert maintenant au minimum PHP 8.1 pour fonctionner.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.24.0
0.24.1
7 changes: 6 additions & 1 deletion client/src/themes/default/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ const Dropdown = defineComponent({
this.isOpen = !this.isOpen;
},

handleClickOutside() {
handleClickOutside(e: Event) {
// - Si c'est un click dans le dropdown, on ne fait rien.
const $dropdown = this.$refs.dropdown as HTMLElement | undefined;
if (e.target !== null && $dropdown?.contains(e.target as Node)) {
return;
}
this.isOpen = false;
},

Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/BeneficiaryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getAll(Request $request, Response $response): ResponseInterface

$query = Beneficiary::query()
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn (Builder $query) => $query->search($search),
)
->when($onlyDeleted, static fn (Builder $builder) => (
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/BookingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ protected function getAllPaginated(Request $request, Response $response): Respon
foreach ($queries as $modelClass => $modelQuery) {
$modelQuery
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn ($builder) => $builder->search($search),
)
->when($period, static fn (Builder $builder) => (
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getAll(Request $request, Response $response): ResponseInterface

$query = Event::query()
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn ($builder) => $builder->search($search),
)
->when($exclude !== null, static fn ($builder) => (
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/MaterialController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getAll(Request $request, Response $response): ResponseInterface

$query = Material::query()
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn (Builder $subQuery) => $subQuery->search($search),
)
->when($onlyDeleted, static fn (Builder $subQuery) => (
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/ParkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getAll(Request $request, Response $response): ResponseInterface

$query = Park::query()
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn (Builder $subQuery) => $subQuery->search($search),
)
->when($onlyDeleted, static fn (Builder $subQuery) => (
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/TechnicianController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function getAll(Request $request, Response $response): ResponseInterface

$query = Technician::query()
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn (Builder $subQuery) => $subQuery->search($search),
)
->when(
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/Traits/Crud/GetAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getAll(Request $request, Response $response): ResponseInterface
// @phpstan-ignore-next-line
$query = $this->getModelClass()::query()
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn (Builder $subQuery) => $subQuery->search($search),
)
->when($onlyDeleted, static fn (Builder $subQuery) => (
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getAll(Request $request, Response $response): ResponseInterface

$query = User::query()
->when(
$search !== null && strlen($search) >= 2,
$search !== null && mb_strlen($search) >= 2,
static fn (Builder $subQuery) => $subQuery->search($search),
)
->when($group !== null, static fn (Builder $subQuery) => (
Expand Down
2 changes: 1 addition & 1 deletion server/src/App/Services/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ private static function getLanguageParts(string $language): array
$code = $language;
$region = null;

if (strlen($language) > 2) {
if (mb_strlen($language) > 2) {
if (str_contains($language, '-')) {
[$code, $region] = explode('-', $language, 2);
} elseif (str_contains($language, '_')) {
Expand Down
2 changes: 0 additions & 2 deletions server/src/views/entries/default.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{% endif -%}

<link href="{{ client_asset('/js/chunk-vendors.js') }}" rel="preload" as="script">
<link href="{{ client_asset('/js/chunk-common.js') }}" rel="preload" as="script">
<link href="{{ client_asset('/js/default.js') }}" rel="preload" as="script">

{% if env is not same as('development') -%}
Expand Down Expand Up @@ -38,6 +37,5 @@
//]]>
</script>
<script src="{{ client_asset('/js/chunk-vendors.js') }}"></script>
<script src="{{ client_asset('/js/chunk-common.js') }}"></script>
<script src="{{ client_asset('/js/default.js') }}"></script>
{% endblock %}

0 comments on commit 0c659b6

Please sign in to comment.