forked from vergnet/application-amicale
Fixed crash on menu screen + added french dashboard translation
This commit is contained in:
parent
158973c74d
commit
44294bb7ca
3 changed files with 21 additions and 8 deletions
|
@ -71,7 +71,7 @@ export default class SideBar extends React.Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigate to the selected route, close the drawer, and mark the correct item as selected
|
* Navigate to the selected route
|
||||||
* @param route {string} The route name to navigate to
|
* @param route {string} The route name to navigate to
|
||||||
*/
|
*/
|
||||||
navigateToScreen(route: string) {
|
navigateToScreen(route: string) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ export default class SelfMenuScreen extends FetchedDataSectionList {
|
||||||
}
|
}
|
||||||
|
|
||||||
getKeyExtractor(item: Object) {
|
getKeyExtractor(item: Object) {
|
||||||
return item !== undefined ? item['date'] + '_' + item['name'] : undefined;
|
return item !== undefined ? item['name'] : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
hasBackButton() {
|
hasBackButton() {
|
||||||
|
@ -71,7 +71,7 @@ export default class SelfMenuScreen extends FetchedDataSectionList {
|
||||||
result = [
|
result = [
|
||||||
{
|
{
|
||||||
title: '',
|
title: '',
|
||||||
data: {},
|
data: [],
|
||||||
extraData: super.state,
|
extraData: super.state,
|
||||||
keyExtractor: this.getKeyExtractor
|
keyExtractor: this.getKeyExtractor
|
||||||
}
|
}
|
||||||
|
@ -79,10 +79,6 @@ export default class SelfMenuScreen extends FetchedDataSectionList {
|
||||||
}
|
}
|
||||||
// fetched data is an array here
|
// fetched data is an array here
|
||||||
for (let i = 0; i < fetchedData.length; i++) {
|
for (let i = 0; i < fetchedData.length; i++) {
|
||||||
// Add the date to the item to allow creation of unique list id
|
|
||||||
for (let item of fetchedData[i].meal[0].foodcategory) {
|
|
||||||
item['date'] = fetchedData[i]['date'];
|
|
||||||
}
|
|
||||||
result.push(
|
result.push(
|
||||||
{
|
{
|
||||||
title: this.getFormattedDate(fetchedData[i].date),
|
title: this.getFormattedDate(fetchedData[i].date),
|
||||||
|
@ -109,6 +105,7 @@ export default class SelfMenuScreen extends FetchedDataSectionList {
|
||||||
marginRight: 10,
|
marginRight: 10,
|
||||||
marginTop: 10,
|
marginTop: 10,
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
|
borderRadius: 50
|
||||||
}}>
|
}}>
|
||||||
<H2 style={{
|
<H2 style={{
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
|
|
@ -69,7 +69,23 @@
|
||||||
},
|
},
|
||||||
"homeScreen": {
|
"homeScreen": {
|
||||||
"listUpdated": "List mise à jour!",
|
"listUpdated": "List mise à jour!",
|
||||||
"listUpdateFail": "Erreur lors de la mise à jour de la liste"
|
"listUpdateFail": "Erreur lors de la mise à jour de la liste",
|
||||||
|
"newsFeed": "Nouvelles du campus",
|
||||||
|
"dashboard": {
|
||||||
|
"todayEventsTitle": "Événements aujourd'hui",
|
||||||
|
"todayEventsSubtitleNA": "Pas d'événements",
|
||||||
|
"todayEventsSubtitle": " événements aujourd'hui",
|
||||||
|
"proximoTitle": "Proximo",
|
||||||
|
"proximoSubtitleNA": "pas d'article en vente",
|
||||||
|
"proximoSubtitle": " articles disponibles",
|
||||||
|
"proxiwashTitle": "Machines disponibles",
|
||||||
|
"proxiwashSubtitleNA": "Pas de machine disponible",
|
||||||
|
"proxiwashSubtitle1": " sèches linges et ",
|
||||||
|
"proxiwashSubtitle2": " laves linges",
|
||||||
|
"menuTitle": "Menu d'aujourd'hui",
|
||||||
|
"menuSubtitleNA": "Pas de menu disponible",
|
||||||
|
"menuSubtitle": "Cliquez ici pour voir le menu"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"planningScreen": {
|
"planningScreen": {
|
||||||
"wipTitle": "WORK IN PROGRESS",
|
"wipTitle": "WORK IN PROGRESS",
|
||||||
|
|
Loading…
Reference in a new issue