diff --git a/Cargo.toml b/Cargo.toml
index e054d51..dc89f2f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,6 @@ edition = "2021"
server = { version = "0.1.0", path = "./server" }
client = { version = "0.1.0", path = "./client" }
-
[workspace]
members = ["server", "client"]
diff --git a/client/index.html b/client/index.html
deleted file mode 100644
index 00420c4..0000000
--- a/client/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/client/src/api/routes/transaction.rs b/client/src/api/routes/transaction.rs
index b43ae20..d1b9dc5 100644
--- a/client/src/api/routes/transaction.rs
+++ b/client/src/api/routes/transaction.rs
@@ -1,19 +1,26 @@
-use crate::api::types::{paginated_response::PaginatedResponse, transaction::TransactionCompany};
+use crate::{
+ api::types::{paginated_response::PaginatedResponse, transaction::TransactionCompany},
+ env::Config,
+};
pub async fn get_transactions(
+ company_slug: Option,
page: i64,
size: i64,
) -> Result, ()> {
let res = reqwasm::http::Request::get(&format!(
- "http://localhost:8000/v1/transaction?page={}&size={}",
- page, size,
+ "{}transaction{}?page={}&size={}",
+ Config::new().api_url,
+ company_slug.unwrap_or("".to_string()),
+ page,
+ size,
))
.send()
.await
- .unwrap()
+ .map_err(|_| ())?
.json::>()
.await
- .unwrap();
+ .map_err(|_| ())?;
Ok(res)
}
diff --git a/client/src/components/base_async_select.rs b/client/src/components/base_async_select.rs
index 53a1f2b..73ca286 100644
--- a/client/src/components/base_async_select.rs
+++ b/client/src/components/base_async_select.rs
@@ -10,11 +10,17 @@ pub struct AsyncSelectRx
where
T: 'static + PartialEq + Clone + IntoAsyncSelectListItem,
{
+ pub remote_list: ReadSignal,
pub selected_item: Signal