V2.0.1 : VOICI LES MODIFICATIONS MAJEURS APPRTÉES DANS CETTE VERSION :
-> REFONTE DU DESIGN DES AFFICHEURS CLASSIQUES (GÉNÉRAL + QUAIS) -> IMPLÉMENTATION DU DESIGN AFL : GÉNÉRAL ET QUAIS -> CHOIX DE LA SÉLECTION DES TYPES D'AFFICHEURS (GÉNÉRAL / QUAIS) UNE FOIS LE TYPE D'AFFICHEUR SÉLECTIONNÉS
This commit is contained in:
1 parent
71822823f2
commit
19868a451f
16 files changed
+156
-48
No files matched your search
@@ -27,7 +27,7 @@ export default function SelectAfficheur({ onBack, navigate }) {
|
||||
}
|
||||
try {
|
||||
setLoading(true);
|
||||
const { data, error } = await supabase.from('horaires').select('stops, quai_reel, voie, quai, gare_depart_nom, gare_arrivee_nom');
|
||||
const { data, error } = await supabase.from('horaires').select('quai_reel, voie, quai, gare_depart_nom, gare_arrivee_nom, gares_desservies');
|
||||
if (error) throw error;
|
||||
if (!mounted) return;
|
||||
|
||||
@@ -36,10 +36,10 @@ export default function SelectAfficheur({ onBack, navigate }) {
|
||||
|
||||
(data || []).forEach(h => {
|
||||
let stopsList = [];
|
||||
if (Array.isArray(h.stops)) {
|
||||
stopsList = h.stops;
|
||||
} else if (typeof h.stops === 'string') {
|
||||
try { stopsList = JSON.parse(h.stops); } catch (e) {}
|
||||
if (Array.isArray(h.gares_desservies)) {
|
||||
stopsList = h.gares_desservies;
|
||||
} else if (typeof h.gares_desservies === 'string') {
|
||||
try { stopsList = JSON.parse(h.gares_desservies); } catch (e) {}
|
||||
}
|
||||
if (!Array.isArray(stopsList)) stopsList = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user