Browse Source

Merge branch 'btn-proxiwash' of leban/application-amicale into master

Arnaud Vergnet 2 years ago
parent
commit
7f763dcbcb

+ 2
- 0
src/constants/ProxiwashConstants.ts View File

@@ -48,6 +48,7 @@ export default {
48 48
     paymentMethods: 'screens.proxiwash.washinsa.paymentMethods',
49 49
     icon: 'school-outline',
50 50
     url: Urls.app.api + 'washinsa/washinsa_data.json',
51
+    webPageUrl: Urls.proxiwash.washinsa,
51 52
   },
52 53
   tripodeB: {
53 54
     id: 'tripodeB',
@@ -58,5 +59,6 @@ export default {
58 59
     paymentMethods: 'screens.proxiwash.tripodeB.paymentMethods',
59 60
     icon: 'domain',
60 61
     url: Urls.app.api + 'washinsa/tripode_b_data.json',
62
+    webPageUrl: Urls.proxiwash.tripodeB,
61 63
   },
62 64
 };

+ 5
- 0
src/constants/Urls.tsx View File

@@ -30,6 +30,7 @@ const PROXIMO_ENDPOINT = STUDENT_SERVER + '~proximo/v2/api/';
30 30
 const PROXIMO_IMAGES_ENDPOINT =
31 31
   STUDENT_SERVER + '~proximo/api_proximo/storage/app/public/';
32 32
 const APP_IMAGES_ENDPOINT = STUDENT_SERVER + '~amicale_app/images/';
33
+const PROXIWASH_ENDPOINT = 'https://www.proxiwash.com/weblaverie/ma-laverie-2?s=';
33 34
 
34 35
 export default {
35 36
   amicale: {
@@ -48,6 +49,10 @@ export default {
48 49
     images: PROXIMO_IMAGES_ENDPOINT + 'img/',
49 50
     icons: PROXIMO_IMAGES_ENDPOINT + 'icon/',
50 51
   },
52
+  proxiwash: {
53
+    washinsa: PROXIWASH_ENDPOINT + 'cf4f39',
54
+    tripodeB: PROXIWASH_ENDPOINT + 'b310b7',
55
+  },
51 56
   planex: {
52 57
     planning: PLANEX_SERVER,
53 58
     groups: PLANEX_SERVER + 'wsAdeGrp.php?projectId=1',

+ 7
- 1
src/screens/Proxiwash/ProxiwashScreen.tsx View File

@@ -19,6 +19,7 @@
19 19
 
20 20
 import React, { useLayoutEffect, useRef, useState } from 'react';
21 21
 import {
22
+  Linking,
22 23
   SectionListData,
23 24
   SectionListRenderItemInfo,
24 25
   StyleSheet,
@@ -154,6 +155,11 @@ function ProxiwashScreen() {
154 155
       headerRight: () => (
155 156
         <MaterialHeaderButtons>
156 157
           <Item
158
+            title={'web'}
159
+            iconName={'web'}
160
+            onPress={() => Linking.openURL(ProxiwashConstants[selectedWash].webPageUrl)}
161
+          />
162
+          <Item
157 163
             title={'information'}
158 164
             iconName={'information'}
159 165
             onPress={() => navigation.navigate('proxiwash-about')}
@@ -161,7 +167,7 @@ function ProxiwashScreen() {
161 167
         </MaterialHeaderButtons>
162 168
       ),
163 169
     });
164
-  }, [navigation]);
170
+  }, [navigation, selectedWash]);
165 171
 
166 172
   /**
167 173
    * Callback used when the user clicks on enable notifications for a machine

Loading…
Cancel
Save