-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#724 - match columns from csv with BudgetMaster attributes (date, tit…
…le and amount) + show status for each row
- Loading branch information
1 parent
1ac54dc
commit d0dd8a8
Showing
8 changed files
with
251 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...r/src/main/java/de/deadlocker8/budgetmaster/transactions/csvImport/CsvColumnSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package de.deadlocker8.budgetmaster.transactions.csvImport; | ||
|
||
public record CsvColumnSettings(int columnDate, int columnName, int columnAmount) | ||
{ | ||
} |
70 changes: 70 additions & 0 deletions
70
...rver/src/main/java/de/deadlocker8/budgetmaster/transactions/csvImport/CsvTransaction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package de.deadlocker8.budgetmaster.transactions.csvImport; | ||
|
||
import java.util.Objects; | ||
|
||
public final class CsvTransaction | ||
{ | ||
private final String date; | ||
private final String name; | ||
private final String amount; | ||
private CsvTransactionStatus status; | ||
|
||
public CsvTransaction(String date, String name, String amount, CsvTransactionStatus status) | ||
{ | ||
this.date = date; | ||
this.name = name; | ||
this.amount = amount; | ||
this.status = status; | ||
} | ||
|
||
public String getDate() | ||
{ | ||
return date; | ||
} | ||
|
||
public String getName() | ||
{ | ||
return name; | ||
} | ||
|
||
public String getAmount() | ||
{ | ||
return amount; | ||
} | ||
|
||
public CsvTransactionStatus getStatus() | ||
{ | ||
return status; | ||
} | ||
|
||
public void setStatus(CsvTransactionStatus status) | ||
{ | ||
this.status = status; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) | ||
{ | ||
if(this == o) return true; | ||
if(o == null || getClass() != o.getClass()) return false; | ||
CsvTransaction that = (CsvTransaction) o; | ||
return Objects.equals(date, that.date) && Objects.equals(name, that.name) && Objects.equals(amount, that.amount) && status == that.status; | ||
} | ||
|
||
@Override | ||
public int hashCode() | ||
{ | ||
return Objects.hash(date, name, amount, status); | ||
} | ||
|
||
@Override | ||
public String toString() | ||
{ | ||
return "CsvTransaction{" + | ||
"date='" + date + '\'' + | ||
", name='" + name + '\'' + | ||
", amount='" + amount + '\'' + | ||
", status=" + status + | ||
'}'; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...rc/main/java/de/deadlocker8/budgetmaster/transactions/csvImport/CsvTransactionStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package de.deadlocker8.budgetmaster.transactions.csvImport; | ||
|
||
public enum CsvTransactionStatus | ||
{ | ||
PENDING, | ||
IMPORTED, | ||
SKIPPED; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
BudgetMasterServer/src/main/resources/static/css/transactionImport.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
#transaction-import-overview { | ||
overflow: auto; | ||
} | ||
|
||
.transaction-import-text-with-icon { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
margin-top: 1rem; | ||
} | ||
|
||
.transaction-import-text-with-icon i { | ||
margin-right: 1.3rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters