|
|
|
@ -86,12 +86,12 @@ class App extends Component { |
|
|
|
submitAction(this.state.expense).then( |
|
|
|
response => { |
|
|
|
this.snackbar.show({ |
|
|
|
message: `Expense ${this.state.expense.id ? "updated" : "added"}!` |
|
|
|
message: `Ausgabe ${this.state.expense.id ? "aktualisiert" : "hinzugefügt"}!` |
|
|
|
}); |
|
|
|
this.load(); |
|
|
|
}, |
|
|
|
response => { |
|
|
|
console.error("Something went wrong"); |
|
|
|
console.error("Ausgabe konnte nicht gespeichert werden!"); |
|
|
|
console.error(response); |
|
|
|
this.setState({loading: false}); |
|
|
|
} |
|
|
|
@ -127,11 +127,11 @@ class App extends Component { |
|
|
|
}) |
|
|
|
.then( |
|
|
|
response => { |
|
|
|
this.snackbar.show({ message: "Expense deleted!" }); |
|
|
|
this.snackbar.show({message: "Ausgabe entfernt!"}); |
|
|
|
this.load(); |
|
|
|
}, |
|
|
|
response => { |
|
|
|
console.error("Something went wrong"); |
|
|
|
console.error("Ausgabe konnte nicht entfernt werden!"); |
|
|
|
console.error(response); |
|
|
|
this.setState({loading: false}); |
|
|
|
} |
|
|
|
@ -246,7 +246,7 @@ class App extends Component { |
|
|
|
<header className="mdc-toolbar mdc-toolbar--fixed"> |
|
|
|
<div className="mdc-toolbar__row"> |
|
|
|
<section className="mdc-toolbar__section mdc-toolbar__section--align-start"> |
|
|
|
<span className="mdc-toolbar__title">Expenses</span> |
|
|
|
<span className="mdc-toolbar__title">Haushaltsrechner</span> |
|
|
|
</section> |
|
|
|
<section |
|
|
|
className="mdc-toolbar__section mdc-toolbar__section--align-end" |
|
|
|
@ -347,13 +347,13 @@ class App extends Component { |
|
|
|
<div> |
|
|
|
<div className="mdc-card"> |
|
|
|
<section className="mdc-card__primary"> |
|
|
|
<h2 className="mdc-card__subtitle">This month you've spent:</h2> |
|
|
|
<h2 className="mdc-card__subtitle">Ausgaben dieses Monat:</h2> |
|
|
|
<h1 className="mdc-card__title mdc-card__title--large center"> |
|
|
|
{this.state.currentMonth} |
|
|
|
</h1> |
|
|
|
</section> |
|
|
|
<section className="mdc-card__supporting-text"> |
|
|
|
Previous month: {this.state.previousMonth} |
|
|
|
Vorheriges Monat: {this.state.previousMonth} |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
<ExpenseList |
|
|
|
|