diff --git a/screens/Proximo/ProximoAboutScreen.js b/screens/Proximo/ProximoAboutScreen.js index 4b759e3..93e87f5 100644 --- a/screens/Proximo/ProximoAboutScreen.js +++ b/screens/Proximo/ProximoAboutScreen.js @@ -43,17 +43,12 @@ export default class ProximoAboutScreen extends React.Component { style={{flex: 1, resizeMode: "contain"}} resizeMode="contain"/> - - Le Proximo c’est ta petite épicerie étudiante tenu par les étudiants directement sur le - campus. Ouvert tous les jours de 18h30 à 19h30, nous t’accueillons et te souvent quand tu n’as - plus de pâtes ou de diluant ! Différents produits pour différentes galère, le tout à prix - coûtant. Tu peux payer par Lydia ou par espèce. - + {i18n.t('proximoScreen.description')} -

Horaires

+

{i18n.t('proximoScreen.openingHours')}

@@ -64,11 +59,11 @@ export default class ProximoAboutScreen extends React.Component { -

Paiement

+

{i18n.t('proximoScreen.paymentMethods')}

- Espèce ou Lydia + {i18n.t('proximoScreen.paymentMethodsDescription')}
diff --git a/screens/ProxiwashAboutScreen.js b/screens/ProxiwashAboutScreen.js index 9acc22f..5c4188e 100644 --- a/screens/ProxiwashAboutScreen.js +++ b/screens/ProxiwashAboutScreen.js @@ -2,7 +2,7 @@ import * as React from 'react'; import {Image, Linking, View} from 'react-native'; -import {Card, CardItem, Container, Content, H2, Left, Tab, TabHeading, Tabs, Text} from 'native-base'; +import {Body, Card, CardItem, Container, Content, H2, H3, Left, Tab, TabHeading, Tabs, Text} from 'native-base'; import CustomHeader from "../components/CustomHeader"; import i18n from "i18n-js"; import CustomMaterialIcon from "../components/CustomMaterialIcon"; @@ -39,46 +39,64 @@ export default class ProxiwashAboutScreen extends React.Component { color={'#fff'} fontSize={20} /> - Information + {i18n.t('proxiwashScreen.informationTab')} } key={1} style={{backgroundColor: ThemeManager.getCurrentThemeVariables().containerBgColor}}> - - - + + + Ta laverie directement sur le campus, au pied du R3. -

Seche linge

+

{i18n.t('proxiwashScreen.dryer')}

- Coucou + +

{i18n.t('proxiwashScreen.procedure')}

+ {i18n.t('proxiwashScreen.dryerProcedure')} + +
+ + +

{i18n.t('proxiwashScreen.tips')}

+ {i18n.t('proxiwashScreen.dryerTips')} +
-

Machine a laver

+

{i18n.t('proxiwashScreen.washer')}

- Coucou + +

{i18n.t('proxiwashScreen.procedure')}

+ {i18n.t('proxiwashScreen.washerProcedure')} + +
+ + +

{i18n.t('proxiwashScreen.tips')}

+ {i18n.t('proxiwashScreen.washerTips')} +
@@ -91,7 +109,7 @@ export default class ProxiwashAboutScreen extends React.Component { color={'#fff'} fontSize={20} /> - Payment + {i18n.t('proxiwashScreen.paymentTab')} } key={2} @@ -101,22 +119,27 @@ export default class ProxiwashAboutScreen extends React.Component { -

Tarifs

+

{i18n.t('proxiwashScreen.tariffs')}

- Coucou + + {i18n.t('proxiwashScreen.washersTariff')} + {i18n.t('proxiwashScreen.dryersTariff')} + -

Moyens de Paiement

+

{i18n.t('proxiwashScreen.paymentMethods')}

- Coucou + + {i18n.t('proxiwashScreen.paymentMethodsDescription')} +
diff --git a/screens/ProxiwashScreen.js b/screens/ProxiwashScreen.js index fc14905..35fa302 100644 --- a/screens/ProxiwashScreen.js +++ b/screens/ProxiwashScreen.js @@ -9,9 +9,9 @@ import CustomMaterialIcon from "../components/CustomMaterialIcon"; import FetchedDataSectionList from "../components/FetchedDataSectionList"; import NotificationsManager from "../utils/NotificationsManager"; import PlatformTouchable from "react-native-platform-touchable"; +import Touchable from "react-native-platform-touchable"; import AsyncStorageManager from "../utils/AsyncStorageManager"; import * as Expo from "expo"; -import Touchable from "react-native-platform-touchable"; const DATA_URL = "https://srv-falcon.etud.insa-toulouse.fr/~vergnet/appli-amicale/washinsa/washinsa.json"; @@ -296,8 +296,9 @@ export default class ProxiwashScreen extends FetchedDataSectionList { * @param title * @param item * @param remainingTime + * @param isDryer */ - showAlert(title: string, item: Object, remainingTime: number) { + showAlert(title: string, item: Object, remainingTime: number, isDryer: boolean) { let buttons = [{text: i18n.t("proxiwashScreen.modal.ok")}]; let message = modalStateStrings[MACHINE_STATES[item.state]]; if (MACHINE_STATES[item.state] === MACHINE_STATES["EN COURS"]) { @@ -318,6 +319,11 @@ export default class ProxiwashScreen extends FetchedDataSectionList { end: item.endTime, remaining: remainingTime }); + } else if (MACHINE_STATES[item.state] === MACHINE_STATES.DISPONIBLE) { + if (isDryer) + message += '\n' + i18n.t('proxiwashScreen.dryersTariff'); + else + message += '\n' + i18n.t('proxiwashScreen.washersTariff'); } Alert.alert( title, @@ -349,6 +355,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList { getRenderItem(item: Object, section: Object, data: Object) { let isMachineRunning = MACHINE_STATES[item.state] === MACHINE_STATES["EN COURS"]; let machineName = (section.title === i18n.t('proxiwashScreen.dryers') ? i18n.t('proxiwashScreen.dryer') : i18n.t('proxiwashScreen.washer')) + ' n°' + item.number; + let isDryer = section.title === i18n.t('proxiwashScreen.dryers'); let remainingTime = 0; if (isMachineRunning) remainingTime = ProxiwashScreen.getRemainingTime(item.startTime, item.endTime, item.donePercent); @@ -376,7 +383,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList { backgroundColor: ThemeManager.getCurrentThemeVariables().containerBgColor }}/> this.showAlert(machineName, item, remainingTime)} + onPress={() => this.showAlert(machineName, item, remainingTime, isDryer)} style={{ height: 64, position: 'absolute', @@ -389,7 +396,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList { diff --git a/screens/SelfMenuScreen.js b/screens/SelfMenuScreen.js index c96ba6c..7a6f666 100644 --- a/screens/SelfMenuScreen.js +++ b/screens/SelfMenuScreen.js @@ -53,7 +53,6 @@ export default class SelfMenuScreen extends React.Component { render() { const nav = this.props.navigation; - console.log(this.customInjectedJS); return (