|
|
|
@ -2,7 +2,7 @@ use perseus::prelude::*;
|
|
|
|
use sycamore::prelude::*;
|
|
|
|
use sycamore::prelude::*;
|
|
|
|
|
|
|
|
|
|
|
|
use crate::{
|
|
|
|
use crate::{
|
|
|
|
api::types::transaction::{LatestTransaction, TransactionsAggregated},
|
|
|
|
api::types::transaction::{LatestTransaction, MajorTransactions, TransactionsAggregated},
|
|
|
|
components::{
|
|
|
|
components::{
|
|
|
|
main_content_container::MainContentContainer,
|
|
|
|
main_content_container::MainContentContainer,
|
|
|
|
paginated_data_table::{PaginatedTable, PaginatedTableStateRx},
|
|
|
|
paginated_data_table::{PaginatedTable, PaginatedTableStateRx},
|
|
|
|
@ -42,6 +42,17 @@ fn index_page<G: Html>(cx: BoundedScope) -> View<G> {
|
|
|
|
table_class: table_classes,
|
|
|
|
table_class: table_classes,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let route_ref = create_ref(cx, move |c, p, s| {
|
|
|
|
|
|
|
|
api_scope_ref.get_major_transactions(c, p, s)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
let table_transactions_major: PaginatedTableStateRx<MajorTransactions, _, _> =
|
|
|
|
|
|
|
|
PaginatedTableStateRx {
|
|
|
|
|
|
|
|
record_label: "transactions".to_owned(),
|
|
|
|
|
|
|
|
route: route_ref,
|
|
|
|
|
|
|
|
filter: Some((24 * 30).to_string()),
|
|
|
|
|
|
|
|
table_class: table_classes,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
let dark_mode_class = create_memo(cx, || {
|
|
|
|
let dark_mode_class = create_memo(cx, || {
|
|
|
|
if *global_state.dark_mode.get() {
|
|
|
|
if *global_state.dark_mode.get() {
|
|
|
|
"dark"
|
|
|
|
"dark"
|
|
|
|
@ -68,6 +79,12 @@ fn index_page<G: Html>(cx: BoundedScope) -> View<G> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
PaginatedTable(table_transactions_month)
|
|
|
|
PaginatedTable(table_transactions_month)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
div (class="flex-grow") {
|
|
|
|
|
|
|
|
h1 (class="mb-1 text-center") {
|
|
|
|
|
|
|
|
"Major transactions in the past 30 days"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
PaginatedTable(table_transactions_major)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|