From 53b3f00005600c50fc245e2649b1ba5989698dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20LEBAN?= Date: Mon, 5 Jul 2021 12:58:16 +0200 Subject: [PATCH 1/4] Add urls leading to proxiwash webpage (washinsa and tripodeB) --- src/constants/Urls.tsx | 5 +++++ 1 file changed, 5 insertions(+) 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', -- 2.39.5 From 06dc9966ecf4a6b85b666b61eb66c20a950d5a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20LEBAN?= Date: Mon, 5 Jul 2021 12:58:29 +0200 Subject: [PATCH 2/4] Add urls leading to proxiwash webpage (washinsa and tripodeB) --- src/constants/ProxiwashConstants.ts | 2 ++ 1 file changed, 2 insertions(+) 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, }, }; -- 2.39.5 From b127cca068ed7733972b010f46fc0747f0d89ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20LEBAN?= Date: Mon, 5 Jul 2021 13:09:22 +0200 Subject: [PATCH 3/4] Add a button to open the proxiwash website in the default browser --- src/screens/Proxiwash/ProxiwashScreen.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/screens/Proxiwash/ProxiwashScreen.tsx b/src/screens/Proxiwash/ProxiwashScreen.tsx index f1b9c9c..7675645 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 -- 2.39.5 From ba62e5d3ec3f834f8a97bee40018baf01e5e077a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20LEBAN?= Date: Mon, 5 Jul 2021 13:17:52 +0200 Subject: [PATCH 4/4] Add a button to open the proxiwash website in the default browser --- src/screens/Proxiwash/ProxiwashScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/Proxiwash/ProxiwashScreen.tsx b/src/screens/Proxiwash/ProxiwashScreen.tsx index 7675645..d8ce135 100644 --- a/src/screens/Proxiwash/ProxiwashScreen.tsx +++ b/src/screens/Proxiwash/ProxiwashScreen.tsx @@ -156,7 +156,7 @@ function ProxiwashScreen() { Linking.openURL(ProxiwashConstants[selectedWash].webPageUrl)} />