Skip to content

Commit

Permalink
Add section about zero waste returns. Fixes #1823.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsegura committed Oct 10, 2024
1 parent 1fc009d commit 8e0fe2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@
"CART_TIME_RANGE_CHANGED_MODAL_CHOOSE_RESTAURANT_ACTION": "Choose another restaurant",
"ORDER__SHIPPED_AT__NOT_AVAILABLE": "The delivery date is no longer available",
"ORDER__SHIPPED_AT__EXPIRED": "The delivery date is expired",
"ORDER__SHIPPING_TIME_RANGE__NOT_AVAILABLE": "Not available at the moment"
"ORDER__SHIPPING_TIME_RANGE__NOT_AVAILABLE": "Not available at the moment",
"LOOPEAT_HAS_RETURNS": "This task has zero waste returns"
}
}
12 changes: 12 additions & 0 deletions src/navigation/task/components/Details.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { showLocation } from 'react-native-map-link';
import Foundation from 'react-native-vector-icons/Foundation';
import Ionicons from 'react-native-vector-icons/Ionicons';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';

import ItemSeparator from '../../../components/ItemSeparator';
import {
Expand Down Expand Up @@ -90,6 +91,17 @@ const Details = ({ task, t }) => {
});
}

if (
task.metadata &&
task.metadata.has_loopeat_returns
) {
items.push({
iconName: 'recycle',
iconType: FontAwesome5,
text: t('LOOPEAT_HAS_RETURNS'),
});
}

if (task.address.description) {
items.push({
iconName: 'information-circle',
Expand Down

0 comments on commit 8e0fe2c

Please sign in to comment.