Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Invalid location registration for mPOS readers. #692

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 34 additions & 30 deletions dev-app/src/screens/DiscoverReadersScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,37 +291,41 @@ export default function DiscoverReadersScreen() {
testID="discovery-readers-screen"
contentContainerStyle={styles.container}
>
<List title="SELECT LOCATION">
<ListItem
onPress={() => {
if (!simulated) {
navigation.navigate('LocationListScreen', {
onSelect: (location: Location) => setSelectedLocation(location),
});
{discoveryMethod != 'internet' && (
<List title="SELECT LOCATION">
<ListItem
onPress={() => {
if (!simulated) {
navigation.navigate('LocationListScreen', {
onSelect: (location: Location) =>
setSelectedLocation(location),
showDummyLocation: true,
});
}
}}
disabled={simulated}
title={
simulated
? 'Mock simulated reader location'
: selectedLocation?.displayName || 'No location selected'
}
}}
disabled={simulated}
title={
simulated
? 'Mock simulated reader location'
: selectedLocation?.displayName || 'No location selected'
}
/>

{simulated ? (
<Text style={styles.infoText}>
Simulated readers are always registered to the mock simulated
location.
</Text>
) : (
<Text style={styles.infoText}>
Bluetooth readers must be registered to a location during the
connection process. If you do not select a location, the reader will
attempt to register to the same location it was registered to during
the previous connection.
</Text>
)}
</List>
/>

{simulated ? (
<Text style={styles.infoText}>
Simulated readers are always registered to the mock simulated
location.
</Text>
) : (
<Text style={styles.infoText}>
Bluetooth readers must be registered to a location during the
connection process. If you do not select a location, the reader
will attempt to register to the same location it was registered to
during the previous connection.
</Text>
)}
</List>
)}

{simulated && discoveryMethod !== 'internet' && (
<List title="SIMULATED UPDATE PLAN">
Expand Down