Skip to content

Commit

Permalink
improve status label on barcode screen. Fix navigator warning
Browse files Browse the repository at this point in the history
  • Loading branch information
r0xsh committed Dec 4, 2024
1 parent a421250 commit f9a6ba2
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
7 changes: 6 additions & 1 deletion src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@
"ADD_NOTE": "Notiz hinzufügen",
"REPORT_AN_INCIDENT": "Einen Vorfall melden",
"UPDATE_PARCEL_DETAILS": "Paketdetails aktualisieren",
"PICTURES": "Fotos"
"PICTURES": "Fotos",
"TASK_TODO": "Zu erledigen",
"TASK_DOING": "In Bearbeitung",
"TASK_FAILED": "Fehlgeschlagen",
"TASK_DONE": "Erledigt",
"TASK_CANCELLED": "Abgebrochen"
}
}
7 changes: 6 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@
"ADD_NOTE": "Add Note",
"REPORT_AN_INCIDENT": "Report an incident",
"UPDATE_PARCEL_DETAILS": "Update parcel details",
"PICTURES": "Photos"
"PICTURES": "Photos",
"TASK_TODO": "To do",
"TASK_DOING": "In progress",
"TASK_FAILED": "Failed",
"TASK_DONE": "Done",
"TASK_CANCELLED": "Cancelled"
}
}
7 changes: 6 additions & 1 deletion src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@
"ADD_NOTE": "Agregar nota",
"REPORT_AN_INCIDENT": "Reportar un incidente",
"UPDATE_PARCEL_DETAILS": "Actualizar detalles del paquete",
"PICTURES": "Fotos"
"PICTURES": "Fotos",
"TASK_TODO": "Por hacer",
"TASK_DOING": "En progreso",
"TASK_FAILED": "Fallido",
"TASK_DONE": "Hecho",
"TASK_CANCELLED": "Cancelado"
}
}
7 changes: 6 additions & 1 deletion src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,11 @@
"ADD_NOTE": "Ajouter une note",
"REPORT_AN_INCIDENT": "Signaler un incident",
"UPDATE_PARCEL_DETAILS": "Mettre à jour les détails du colis",
"PICTURES": "Photos"
"PICTURES": "Photos",
"TASK_TODO": "A faire",
"TASK_DOING": "En cours",
"TASK_FAILED": "Echouée",
"TASK_DONE": "Fait",
"TASK_CANCELLED": "Annulée"
}
}
7 changes: 6 additions & 1 deletion src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@
"ADD_NOTE": "Aggiungi nota",
"REPORT_AN_INCIDENT": "Segnala un incidente",
"UPDATE_PARCEL_DETAILS": "Aggiorna i dettagli del pacco",
"PICTURES": "Foto"
"PICTURES": "Foto",
"TASK_TODO": "Da fare",
"TASK_DOING": "In corso",
"TASK_FAILED": "Fallito",
"TASK_DONE": "Fatto",
"TASK_CANCELLED": "Annullato"
}
}
5 changes: 4 additions & 1 deletion src/navigation/courier/barcode/Barcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import BottomModal from '../../../components/BottomModal';
import { navigateToTask } from '../../utils';
import { selectTasks } from '../../../redux/Courier';
import { shouldNotificationBeDisplayed } from '../../../redux/App/actions';
import { Badge } from 'native-base'

async function _fetchBarcode(httpClient, barcode) {
if (barcode) {
Expand Down Expand Up @@ -274,7 +275,9 @@ function BarcodePage({
// onTouchStart={() => console.log(">>>>>>>>>> enter")}
// onTouchEnd={() => console.log(">>>>>>>>>> leave")}
>
<TextSection title={t('STATUS')} value={entity?.status} />
<View style={styles.section}>
<Badge>{ entity?.status ? t(`TASK_${entity.status}`) : '-' }</Badge>
</View>
<TextSection
title={t('ADDRESS')}
value={entity?.address?.streetAddress}
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/navigators/CourierNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const BarcodeStack = createStackNavigator();
const BarcodeNavigator = () => (
<BarcodeStack.Navigator screenOptions={stackNavigatorScreenOptions}>
<BarcodeStack.Screen
name="CourierBarcode"
name="CourierBarcodeScanner"
component={screens.CourierBarcodePage}
options={{
title: false,
Expand Down

0 comments on commit f9a6ba2

Please sign in to comment.