Skip to content

Commit

Permalink
Merge pull request #18 from dimmik/minor-ui-changes
Browse files Browse the repository at this point in the history
Minor ui changes
  • Loading branch information
dimmik authored Oct 14, 2019
2 parents 08db3f1 + 0e1558c commit ec39e0d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion TCalcCore/Logic/TourCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public Tour SuggestFinalPayments()
ToGuid = new[] { creditors.First().GUID }.ToList(),
ToAll = false,
AmountInCents = credit > highestDebt ? highestDebt : credit,
Description = $"'{debtors.First()?.Name ?? "n/a"}' -> '{creditors.First()?.Name ?? "n/a"}'",
Description = $"X '{debtors.First()?.Name ?? "n/a"}' -> '{creditors.First()?.Name ?? "n/a"}'",
GUID = Guid.NewGuid().ToString()
});
// add spending
Expand Down
2 changes: 1 addition & 1 deletion TourCalcWebApp/App/containers/appstate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default class AppState {
comp.setState(this.state);
},
(error) => {
alert('Error loading tour')
//alert('Error loading tour')
this.state = {
isTourLoaded: true,
error
Expand Down
2 changes: 1 addition & 1 deletion TourCalcWebApp/App/containers/tour-person-edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class PersonForm extends React.Component {
super(props);
this.state = {
dialogOpen: props.open,
person: props.person == null ? { name: "", weight: 100, parentId: "" } : props.person,
person: props.person == null ? { name: "", weight: 100, parentId: "" } : JSON.parse(JSON.stringify(props.person)),
tour: props.tour
}
}
Expand Down
2 changes: 1 addition & 1 deletion TourCalcWebApp/App/containers/tour-spending-edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class SpendingsForm extends React.Component {
constructor(props) {
super(props);
this.tour = props.tour
if (props.spending != null) this.spending = props.spending
if (props.spending != null) this.spending = JSON.parse(JSON.stringify(props.spending))
else this.spending.fromGuid = this.tour.persons.length > 0 ? this.tour.persons[0].guid : ""
this.state = {
dialogOpen: props.open,
Expand Down
5 changes: 3 additions & 2 deletions TourCalcWebApp/App/containers/tour-ui.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ class TourTable extends React.Component {
app={this}
><Button color='primary' variant='outlined'>Add</Button></SpendingForm>
&nbsp;
<Button color='secondary' variant='outlined' onClick={() => { this.setState({ showSuggested: !this.state.showSuggested }) }}>
{this.state.showSuggested ? 'Hide' : 'Show'} suggested
<Button color='secondary' variant='outlined'
onClick={() => { this.setState({ showSuggested: !this.state.showSuggested }) }}>
{this.state.showSuggested ? 'hide' : 'show'}
</Button>

</TableCell>
Expand Down

0 comments on commit ec39e0d

Please sign in to comment.