|
@@ -311,43 +311,42 @@ export default class ProximoListScreen extends React.Component<Props, State> {
|
311
|
311
|
hasSearchField={true}
|
312
|
312
|
searchCallback={(text) => this.search(text)}
|
313
|
313
|
shouldFocusSearchBar={this.shouldFocusSearchBar}
|
314
|
|
- rightButton={this.getSortMenu()}/>
|
|
314
|
+ rightButton={this.getSortMenu()}
|
|
315
|
+ />
|
315
|
316
|
|
316
|
|
- <Content>
|
317
|
|
- <FlatList
|
318
|
|
- data={this.state.currentlyDisplayedData}
|
319
|
|
- extraData={this.state.currentlyDisplayedData}
|
320
|
|
- keyExtractor={(item) => item.name + item.code}
|
321
|
|
- style={{minHeight: 300, width: '100%'}}
|
322
|
|
- renderItem={({item}) =>
|
323
|
|
- <ListItem
|
324
|
|
- thumbnail
|
325
|
|
- onPress={() => {
|
326
|
|
- this.showItemDetails(item);
|
327
|
|
- }}
|
328
|
|
- >
|
329
|
|
- <Left>
|
330
|
|
- <Thumbnail square source={{uri: item.image}}/>
|
331
|
|
- </Left>
|
332
|
|
- <Body>
|
333
|
|
- <Text style={{marginLeft: 20}}>
|
334
|
|
- {item.name}
|
335
|
|
- </Text>
|
336
|
|
- <Text note style={{
|
337
|
|
- marginLeft: 20,
|
338
|
|
- color: this.getStockColor(parseInt(item.quantity))
|
339
|
|
- }}>
|
340
|
|
- {item.quantity + ' ' + i18n.t('proximoScreen.inStock')}
|
341
|
|
- </Text>
|
342
|
|
- </Body>
|
343
|
|
- <Right>
|
344
|
|
- <Text style={{fontWeight: "bold"}}>
|
345
|
|
- {item.price}€
|
346
|
|
- </Text>
|
347
|
|
- </Right>
|
348
|
|
- </ListItem>}
|
349
|
|
- />
|
350
|
|
- </Content>
|
|
317
|
+ <FlatList
|
|
318
|
+ data={this.state.currentlyDisplayedData}
|
|
319
|
+ extraData={this.state.currentlyDisplayedData}
|
|
320
|
+ keyExtractor={(item) => item.name + item.code}
|
|
321
|
+ style={{minHeight: 300, width: '100%'}}
|
|
322
|
+ renderItem={({item}) =>
|
|
323
|
+ <ListItem
|
|
324
|
+ thumbnail
|
|
325
|
+ onPress={() => {
|
|
326
|
+ this.showItemDetails(item);
|
|
327
|
+ }}
|
|
328
|
+ >
|
|
329
|
+ <Left>
|
|
330
|
+ <Thumbnail square source={{uri: item.image}}/>
|
|
331
|
+ </Left>
|
|
332
|
+ <Body>
|
|
333
|
+ <Text style={{marginLeft: 20}}>
|
|
334
|
+ {item.name}
|
|
335
|
+ </Text>
|
|
336
|
+ <Text note style={{
|
|
337
|
+ marginLeft: 20,
|
|
338
|
+ color: this.getStockColor(parseInt(item.quantity))
|
|
339
|
+ }}>
|
|
340
|
+ {item.quantity + ' ' + i18n.t('proximoScreen.inStock')}
|
|
341
|
+ </Text>
|
|
342
|
+ </Body>
|
|
343
|
+ <Right>
|
|
344
|
+ <Text style={{fontWeight: "bold"}}>
|
|
345
|
+ {item.price}€
|
|
346
|
+ </Text>
|
|
347
|
+ </Right>
|
|
348
|
+ </ListItem>}
|
|
349
|
+ />
|
351
|
350
|
</Container>
|
352
|
351
|
);
|
353
|
352
|
}
|