Cleanup
This commit is contained in:
parent
14e1248b54
commit
69322620ca
|
@ -8,8 +8,6 @@ import javafx.fxml.FXML;
|
|||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
import static com.andrewlalis.perfin.PerfinApp.router;
|
||||
|
||||
public class AccountViewController implements RouteSelectionListener {
|
||||
|
@ -47,9 +45,7 @@ public class AccountViewController implements RouteSelectionListener {
|
|||
|
||||
@FXML
|
||||
public void deleteAccount() {
|
||||
Profile.getCurrent().getDataSource().useAccountRepository(repo -> {
|
||||
repo.delete(account);
|
||||
});
|
||||
Profile.getCurrent().getDataSource().useAccountRepository(repo -> repo.delete(account));
|
||||
router.getHistory().clear();
|
||||
router.navigate("accounts");
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.andrewlalis.perfin.control.component;
|
||||
|
||||
import com.andrewlalis.perfin.data.DateUtil;
|
||||
import com.andrewlalis.perfin.model.Account;
|
||||
import com.andrewlalis.perfin.model.AccountType;
|
||||
import com.andrewlalis.perfin.model.Profile;
|
||||
|
@ -10,7 +9,6 @@ import javafx.scene.input.MouseEvent;
|
|||
import javafx.scene.layout.*;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.andrewlalis.perfin.PerfinApp.router;
|
||||
|
@ -77,9 +75,7 @@ public class AccountTile extends BorderPane {
|
|||
accountBalanceLabel.setDisable(false);
|
||||
});
|
||||
|
||||
this.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> {
|
||||
router.navigate("account", account);
|
||||
});
|
||||
this.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> router.navigate("account", account));
|
||||
}
|
||||
|
||||
private static Label newPropertyLabel(String text) {
|
||||
|
|
|
@ -5,8 +5,6 @@ import com.andrewlalis.perfin.model.Account;
|
|||
import javafx.application.Platform;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.MathContext;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Currency;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.andrewlalis.perfin.model.Account;
|
|||
import com.andrewlalis.perfin.model.AccountEntry;
|
||||
import com.andrewlalis.perfin.model.Transaction;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.math.BigDecimal;
|
|||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
>
|
||||
<top>
|
||||
<VBox>
|
||||
<HBox fx:id="mainHeader">
|
||||
<HBox>
|
||||
<Button text="Back" onAction="#goBack"/>
|
||||
<Button text="Forward" onAction="#goForward"/>
|
||||
<Button text="Accounts" onAction="#goToAccounts"/>
|
||||
|
|
Loading…
Reference in New Issue