first version of the cruise lovers app, build 1.0.1, ready to be published on the app store
This commit is contained in:
@@ -15,6 +15,8 @@ import { ValorReservaCard } from '@/assets/components/reserva/ValorReservaCard';
|
||||
import { VooCard } from '@/assets/components/reserva/VooCard';
|
||||
import { API_ENDPOINTS, buildApiUrl } from '@/assets/config/api';
|
||||
import { useAuth } from '@/assets/contexts/useAuth';
|
||||
import WifiIcon from '@/assets/icons/wifi-solid.svg';
|
||||
import { colors } from '@/assets/styles/colors';
|
||||
import { cacheReservaFull, getCachedReservaFull } from '@/assets/services/offlineStorage';
|
||||
import {
|
||||
Documento,
|
||||
@@ -27,7 +29,6 @@ import {
|
||||
VooSegment,
|
||||
} from '@/assets/types';
|
||||
import styles from '@/styles/screens/reserva/detail.styles';
|
||||
import { FontAwesome } from '@expo/vector-icons';
|
||||
import { Stack, useLocalSearchParams } from 'expo-router';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
@@ -118,6 +119,21 @@ export default function ReservaDetalheScreen() {
|
||||
}
|
||||
};
|
||||
|
||||
function metodosPagamento($metodo: string) {
|
||||
switch ($metodo) {
|
||||
case 'mb':
|
||||
return 'Multibanco';
|
||||
case 'mbway':
|
||||
return 'MB Way';
|
||||
case 'cc':
|
||||
return 'Cartão de Crédito';
|
||||
case 'tb':
|
||||
return 'Transferência Bancária';
|
||||
default:
|
||||
return $metodo;
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
fetchReserva();
|
||||
}, [referencia, token]);
|
||||
@@ -196,7 +212,7 @@ export default function ReservaDetalheScreen() {
|
||||
<>
|
||||
{isFromCache && (
|
||||
<View style={styles.offlineBanner}>
|
||||
<FontAwesome name="wifi" size={13} color="#fff" />
|
||||
<WifiIcon width={13} height={13} fill={colors.branco} />
|
||||
<Text style={styles.offlineBannerText}>Sem ligação — a mostrar dados guardados</Text>
|
||||
</View>
|
||||
)}
|
||||
@@ -350,7 +366,7 @@ export default function ReservaDetalheScreen() {
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.tableCellRight}>
|
||||
<Text style={styles.tableValueText}>{pagamento.metodoPagamento}</Text>
|
||||
<Text style={styles.tableValueText}>{metodosPagamento(pagamento.metodoPagamento)}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<DashedDivider width={1} borderStyle="dashed" />
|
||||
|
||||
Reference in New Issue
Block a user