Skip to content

Commit

Permalink
#300 - Permet de rentrer des lieux d'événement plus précis + Passe à …
Browse files Browse the repository at this point in the history
…Google Maps pour l'ouverture des adresses (#303)

* Enlève la limite de caractères du champ "lieu" des événements (#300)
* Google Maps est maintenant utilisé à la place de OpenStreetMap pour ouvrir les adresses (#300)
  • Loading branch information
Donov4n authored Nov 21, 2021
1 parent 779b0ff commit 21fd4f5
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 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.16.3 (UNRELEASED)

- Enlève la limite de caractères du champ "lieu" des événements (#300).
- Google Maps est maintenant utilisé à la place de OpenStreetMap pour ouvrir les adresses (#300).

## 0.16.2 (2021-11-04)

- Corrige la normalisation des horaires d'assignation des techniciens.
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/LocationText/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export default defineComponent({
{' '}
<a
rel="noopener noreferrer nofollow"
href={`https://www.openstreetmap.org/search?query=${location}`}
title={__('open-in-openstreetmap')}
href={`https://maps.google.com/?q=${location}`}
title={__('open-in-google-maps')}
target="_blank"
>
<i class="fas fa-external-link-alt" />
Expand Down
2 changes: 1 addition & 1 deletion client/src/locale/en/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default {
'print-summary': "Print this summary",
'open': "Open",
'in': "In",
'open-in-openstreetmap': "Search in OpenStreetMap",
'open-in-google-maps': "Open in Google Maps",
'on-date': "On {date}",
'from-date-to-date': "from\u00a0{from} to\u00a0{to}",
'or': "or",
Expand Down
2 changes: 1 addition & 1 deletion client/src/locale/fr/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default {
'print-summary': "Imprimer ce récapitulatif",
'open': "Ouvrir",
'in': "À",
'open-in-openstreetmap': "Rechercher dans OpenStreetMap",
'open-in-google-maps': "Ouvrir dans Google Maps",
'on-date': "Le {date}",
'from-date-to-date': "du\u00a0{from} au\u00a0{to}",
'or': "ou",
Expand Down
1 change: 0 additions & 1 deletion server/src/App/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function __construct(array $attributes = [])
'end_date' => V::callback([$this, 'checkEndDate']),
'is_confirmed' => V::notOptional()->boolType(),
'is_archived' => V::callback([$this, 'checkIsArchived']),
'location' => V::optional(V::length(2, 64)),
'is_billable' => V::optional(V::boolType()),
'is_return_inventory_done' => V::optional(V::boolType()),
];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class ChangeEventLocationToText extends AbstractMigration
{
public function up()
{
$table = $this->table('events');
$table
->changeColumn('location', 'text', ['null' => true])
->save();
}

public function down()
{
$table = $this->table('events');
$table
->changeColumn('location', 'string', ['null' => true, 'length' => 64])
->save();
}
}

0 comments on commit 21fd4f5

Please sign in to comment.