@olea-bps/base 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ import CollektorVersion2ApiProvider from './CollektorVersion2ApiProvider';
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* @typedef Ticket
|
|
27
|
-
* @property {string} barcode
|
|
27
|
+
* @property {string} barcode URL oder Data-URI für den Ticketbarcode als Bild
|
|
28
28
|
* @property {string} owner
|
|
29
29
|
* @property {date} valid_from
|
|
30
30
|
* @property {date} valid_to
|
|
@@ -32,7 +32,7 @@ import CollektorVersion2ApiProvider from './CollektorVersion2ApiProvider';
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @typedef PublicTransportTicketContext
|
|
35
|
-
* @property {string} ticketBarcode
|
|
35
|
+
* @property {string} ticketBarcode Barcode Data-URI/URL
|
|
36
36
|
* @property {string} ticketOwner
|
|
37
37
|
* @property {string} ticketValidFrom
|
|
38
38
|
* @property {string} ticketValidTo
|
package/package.json
CHANGED
|
@@ -13,12 +13,21 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { useState, useEffect, useMemo, useCallback } from 'react';
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
AppState,
|
|
18
|
+
SafeAreaView,
|
|
19
|
+
View,
|
|
20
|
+
ScrollView,
|
|
21
|
+
StyleSheet,
|
|
22
|
+
Alert,
|
|
23
|
+
useWindowDimensions,
|
|
24
|
+
RefreshControl,
|
|
25
|
+
Image,
|
|
26
|
+
} from 'react-native';
|
|
17
27
|
|
|
18
28
|
import { useTheme, Text, Button } from 'react-native-paper';
|
|
19
29
|
import { useFocusEffect } from '@react-navigation/native';
|
|
20
30
|
import { useTranslation } from 'react-i18next';
|
|
21
|
-
import QRCode from 'react-native-qrcode-svg';
|
|
22
31
|
|
|
23
32
|
import AppbarComponent from '../../components/AppBar';
|
|
24
33
|
import { useUser } from '../../context/context-user';
|
|
@@ -114,9 +123,8 @@ export default function PublicTransportTicketView() {
|
|
|
114
123
|
ticketBarcode
|
|
115
124
|
? <>
|
|
116
125
|
<View>
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
size={width * 0.8}
|
|
126
|
+
<Image
|
|
127
|
+
source={{ uri: ticketBarcode }}
|
|
120
128
|
/>
|
|
121
129
|
</View>
|
|
122
130
|
<Text>
|