diff --git a/src/constants/ProxiwashConstants.ts b/src/constants/ProxiwashConstants.ts index 5f02836..838c1d5 100644 --- a/src/constants/ProxiwashConstants.ts +++ b/src/constants/ProxiwashConstants.ts @@ -48,6 +48,7 @@ export default { paymentMethods: 'screens.proxiwash.washinsa.paymentMethods', icon: 'school-outline', url: Urls.app.api + 'washinsa/washinsa_data.json', + webPageUrl: Urls.proxiwash.washinsa, }, tripodeB: { id: 'tripodeB', @@ -58,5 +59,6 @@ export default { paymentMethods: 'screens.proxiwash.tripodeB.paymentMethods', icon: 'domain', url: Urls.app.api + 'washinsa/tripode_b_data.json', + webPageUrl: Urls.proxiwash.tripodeB, }, }; diff --git a/src/constants/Urls.tsx b/src/constants/Urls.tsx index 2058fa1..10a9480 100644 --- a/src/constants/Urls.tsx +++ b/src/constants/Urls.tsx @@ -30,6 +30,7 @@ const PROXIMO_ENDPOINT = STUDENT_SERVER + '~proximo/v2/api/'; const PROXIMO_IMAGES_ENDPOINT = STUDENT_SERVER + '~proximo/api_proximo/storage/app/public/'; const APP_IMAGES_ENDPOINT = STUDENT_SERVER + '~amicale_app/images/'; +const PROXIWASH_ENDPOINT = 'https://www.proxiwash.com/weblaverie/ma-laverie-2?s='; export default { amicale: { @@ -48,6 +49,10 @@ export default { images: PROXIMO_IMAGES_ENDPOINT + 'img/', icons: PROXIMO_IMAGES_ENDPOINT + 'icon/', }, + proxiwash: { + washinsa: PROXIWASH_ENDPOINT + 'cf4f39', + tripodeB: PROXIWASH_ENDPOINT + 'b310b7', + }, planex: { planning: PLANEX_SERVER, groups: PLANEX_SERVER + 'wsAdeGrp.php?projectId=1', diff --git a/src/screens/Proxiwash/ProxiwashScreen.tsx b/src/screens/Proxiwash/ProxiwashScreen.tsx index f1b9c9c..d8ce135 100644 --- a/src/screens/Proxiwash/ProxiwashScreen.tsx +++ b/src/screens/Proxiwash/ProxiwashScreen.tsx @@ -19,6 +19,7 @@ import React, { useLayoutEffect, useRef, useState } from 'react'; import { + Linking, SectionListData, SectionListRenderItemInfo, StyleSheet, @@ -153,6 +154,11 @@ function ProxiwashScreen() { navigation.setOptions({ headerRight: () => ( + Linking.openURL(ProxiwashConstants[selectedWash].webPageUrl)} + /> ), }); - }, [navigation]); + }, [navigation, selectedWash]); /** * Callback used when the user clicks on enable notifications for a machine