Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
138 changes: 27 additions & 111 deletions frontend/package-lock.json

Large diffs are not rendered by default.

23 changes: 14 additions & 9 deletions frontend/src/api/transactionApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,28 @@ const BASE_URL = "http://localhost:8080/api";

// Get all transactions
export const getTransactionsList = () => {
return axios.get(`${BASE_URL}/transactions`);
return axios.get(`${BASE_URL}/transactions`);
};

// Get Filtered Transactions
export const getFilteredTransactions = (filter) => {
return axios.get(`${BASE_URL}/transactions/filter`, { params: filter });
};

// Create a new transaction
export const createTransaction = async (transactionData) => {
return axios.post(`${BASE_URL}/transactions`, transactionData, {
headers: {
"Content-Type": "application/json"
}
});
return axios.post(`${BASE_URL}/transactions`, transactionData, {
headers: {
"Content-Type": "application/json",
},
});
};

// Get a single transaction by ID
export const getTransaction = async (id) => {
return axios.get(`${BASE_URL}/transaction?id=${id}`);
return axios.get(`${BASE_URL}/transaction?id=${id}`);
};

export const deleteTransactionById = async (id) => {
return axios.delete(`${BASE_URL}/transaction?id=${id}`);
};
return axios.delete(`${BASE_URL}/transaction?id=${id}`);
};
Binary file added frontend/src/assets/images/summaries-chart-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/images/view_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions frontend/src/assets/styles/summarieschart.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.summaries-chart-container {
padding: 40px;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.summaries-chart-title {
text-align: center;
margin-bottom: 30px;
font-size: 28px;
color: #374c59;
}

.summaries-chart-grid {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
max-width: 900px;
margin: 0 auto;
}

.summaries-chart-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: white;
border-radius: 10px;
padding: 20px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
min-width: 250px;
}

.summaries-chart-item h3 {
color: #444;
margin-bottom: 10px;
}

.summaries-chart-item p {
margin: 5px 0;
}

.summaries-chart-item p.income {
color: #2e7d32;
}

.summaries-chart-item p.expenses {
color: #c62828;
}
93 changes: 68 additions & 25 deletions frontend/src/assets/styles/tabselector.css
Original file line number Diff line number Diff line change
@@ -1,42 +1,66 @@
.tab-selector {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
background-color: #374c59;
border-radius: 0.2rem;
margin: 5px;
margin-right: -1px;
position: relative;
width: 250px;
}

.tab-selector header {
position: absolute;
top: 50px;
color: rgb(255, 255, 255);
background-color: rgb(132, 228, 168, 0.6);
padding: 2rem;
border-radius: 0.2rem;
box-shadow: 0 0 0.5rem rgb(22, 44, 63);
font-size: 14pt;
top: 32px;
left: 5px;
right: 50px;
font-size: 16pt;
background-color: #84e4a8;
text-align: center;
padding: 30px;
border-radius: 0.3rem;
color: #374c59;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
width: 240px;
}

.tab-selector .tabs {
position: absolute;
top: 10rem;
/* background-color: #84e4a8; */
background-color: rgb(55, 76, 89, 0.6);
color: white;
padding: 1rem;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
border-radius: 0.2rem;
background-color: #374c59;
position: absolute;
top: 20%;
width: 100%;
padding: 0;
margin-top: 2.5rem;
}

.tab-selector .tabs li {
list-style: none;
padding: 25px;
border-radius: 0.2rem;
padding: 10px;
margin-bottom: 2.5rem;
color: white;
cursor: pointer;
position: relative;
width: 100%;
text-align: start;
margin-left: 3rem;
position: relative;
}

.tab-selector .tabs li.active {
background-color: white;
border-radius: 20px 0 0 20px;
color: #374c59;
transform: scale(1.1);
transition: all 200ms ease-in-out;
}

.tab-selector .tabs li::after {
Expand All @@ -47,18 +71,37 @@
width: 0;
height: 100%;
border-radius: 20px 0 0 20px;
background-color: rgb(132, 228, 168);
background-color: rgb(255, 255, 255, 0.8);
/* background-color: rgb(132, 228, 168, 0.8); */
transition: all 300ms ease-in-out;
z-index: -1;
}

.tab-selector .tabs li:hover::after {
width: 100%;
}

.tab-content{
padding-top: 12rem;
padding-bottom: 2rem;
display: flex;
justify-content: center;
.modal-button-container {
width: 100%;
padding: 10px;
text-align: center;
}

.modal-button-container .add-transaction-btn {
position: absolute;
bottom: 20px;
left: 25px;
width: 80%;
padding: 20px;
border-radius: 0.2rem;
background-color: #84e4a8;
color: white;
font-weight: bold;
border: none;
font-size: 16px;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-button-container .add-transaction-btn i {
margin-right: 8px;
}
69 changes: 68 additions & 1 deletion frontend/src/assets/styles/transactionform.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,71 @@
.transaction-container {
display: flex;
justify-content: center;
align-items: center;
padding: 0;
width: 100%;
}

.transaction-form {
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 50px 70px;
background-color: #374c59;
box-shadow: 0 0px 80px rgba(0, 0, 0, 0.6);
border-radius: 0.2rem;
width: 75%;
max-width: 900px;
min-width: 600px;
}

.transaction-form h2 {
color: white;
margin-bottom: 1rem;
font-size: 1.7rem;
width: 100%;
}

.transaction-form label {
font-size: 1rem;
width: 100%;
margin-bottom: 0.25rem;
color: white;
}

.transaction-form input,
.transaction-form select {
width: 100%;
padding: 10px;
border: 1px solid var(--main);
border-radius: 8px;
margin-bottom: 1rem;
background-color: white;
font-size: 1rem;
}

.transaction-form button {
align-self: center;
margin-top: 1rem;
padding: 0.6rem 2rem;
background-color: #374c59;
color: white;
text-decoration: none;
font-weight: bold;
font-size: 1rem;
border-radius: 30px;
border: 1px solid white;
transition: background-color 0.3s ease;
}

.transaction-form button:hover {
background-color: #84e4a8;
color: #374c59;
border: 1px solid #374c59;
box-shadow: 0 0px 100px rgba(0, 0, 0, 0.8);
}

/* .transaction-container {
display: flex;
justify-content: center;
align-items: center;
Expand Down Expand Up @@ -63,4 +130,4 @@
color: #374c59;
border: 1px solid #374c59;
box-shadow: 0 0px 100px rgba(0, 0, 0, 0.8);
}
} */
48 changes: 48 additions & 0 deletions frontend/src/assets/styles/transactionmodal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(2px);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}

.modal-content {
background-color: transparent;
padding: 10px;
border-radius: 0.2rem;
min-width: 400px;
max-width: 600px;
position: relative;
z-index: 1001;
}

.modal-close {
background-color: #84e4a8;
position: absolute;
top: 20px;
right: 20px;
font-size: 1.5rem;
text-align: center;
line-height: 50px;
cursor: pointer;
z-index: 1002;
color: white;
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border: none;
transition: transform 0.2s ease-in-out;
}

.modal-close:hover {
transform: scale(1.2);
}
Loading