|
|
|
@ -9,7 +9,7 @@ pub trait IntoTableData<G>
|
|
|
|
where
|
|
|
|
where
|
|
|
|
G: GenericNode,
|
|
|
|
G: GenericNode,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fn into_table_data<'a>(self, cx: Scope<'a>) -> TableContent<G>;
|
|
|
|
fn into_table_data(self, cx: Scope) -> TableContent<G>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Serialize, Deserialize)]
|
|
|
|
#[derive(Clone, Serialize, Deserialize)]
|
|
|
|
@ -23,7 +23,7 @@ impl<G> IntoTableData<G> for PaginatedResponse<TransactionCompany>
|
|
|
|
where
|
|
|
|
where
|
|
|
|
G: GenericNode,
|
|
|
|
G: GenericNode,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fn into_table_data<'a>(self, cx: Scope<'a>) -> TableContent<G> {
|
|
|
|
fn into_table_data(self, cx: Scope) -> TableContent<G> {
|
|
|
|
let headers_view = vec![
|
|
|
|
let headers_view = vec![
|
|
|
|
view! {cx, "Company" },
|
|
|
|
view! {cx, "Company" },
|
|
|
|
view! {cx, "Date published" },
|
|
|
|
view! {cx, "Date published" },
|
|
|
|
@ -45,7 +45,7 @@ where
|
|
|
|
let mut res = vec![];
|
|
|
|
let mut res = vec![];
|
|
|
|
res.push(view! {cx,
|
|
|
|
res.push(view! {cx,
|
|
|
|
a (href=format!("transactions/{}", t.company.slug),
|
|
|
|
a (href=format!("transactions/{}", t.company.slug),
|
|
|
|
class="text-indigo-800 dark:text-indigo-300 hover:text-indigo-500 dark:hover:text-indigo-600 hover:underline",
|
|
|
|
class="text-indigo-800 dark:text-indigo-300 hover:text-indigo-500 hover:underline dark:hover:text-indigo-600",
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
(t.company.name.to_owned())
|
|
|
|
(t.company.name.to_owned())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -76,7 +76,7 @@ impl<G> IntoTableData<G> for PaginatedResponse<TransactionsAggregated>
|
|
|
|
where
|
|
|
|
where
|
|
|
|
G: GenericNode,
|
|
|
|
G: GenericNode,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fn into_table_data<'a>(self, cx: Scope<'a>) -> TableContent<G> {
|
|
|
|
fn into_table_data(self, cx: Scope) -> TableContent<G> {
|
|
|
|
let headers_view = vec![
|
|
|
|
let headers_view = vec![
|
|
|
|
view! {cx, "Company" },
|
|
|
|
view! {cx, "Company" },
|
|
|
|
view! {cx, "Transactions" },
|
|
|
|
view! {cx, "Transactions" },
|
|
|
|
@ -89,7 +89,7 @@ where
|
|
|
|
let mut res = vec![];
|
|
|
|
let mut res = vec![];
|
|
|
|
res.push(view! {cx,
|
|
|
|
res.push(view! {cx,
|
|
|
|
a (href=format!("transactions/{}", t.slug),
|
|
|
|
a (href=format!("transactions/{}", t.slug),
|
|
|
|
class="text-indigo-800 dark:text-indigo-300 hover:text-indigo-500 dark:hover:text-indigo-600 hover:underline",
|
|
|
|
class="text-indigo-800 dark:text-indigo-300 hover:text-indigo-500 hover:underline dark:hover:text-indigo-600",
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
(t.name.to_owned())
|
|
|
|
(t.name.to_owned())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -111,7 +111,7 @@ impl<G> IntoTableData<G> for PaginatedResponse<LatestTransaction>
|
|
|
|
where
|
|
|
|
where
|
|
|
|
G: GenericNode,
|
|
|
|
G: GenericNode,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fn into_table_data<'a>(self, cx: Scope<'a>) -> TableContent<G> {
|
|
|
|
fn into_table_data(self, cx: Scope) -> TableContent<G> {
|
|
|
|
let headers_view = vec![
|
|
|
|
let headers_view = vec![
|
|
|
|
view! {cx, "Company" },
|
|
|
|
view! {cx, "Company" },
|
|
|
|
view! {cx, "nature" },
|
|
|
|
view! {cx, "nature" },
|
|
|
|
@ -125,7 +125,7 @@ where
|
|
|
|
let mut res = vec![];
|
|
|
|
let mut res = vec![];
|
|
|
|
res.push(view! {cx,
|
|
|
|
res.push(view! {cx,
|
|
|
|
a (href=format!("transactions/{}", t.slug),
|
|
|
|
a (href=format!("transactions/{}", t.slug),
|
|
|
|
class="text-indigo-800 dark:text-indigo-300 hover:text-indigo-500 dark:hover:text-indigo-600 hover:underline",
|
|
|
|
class="text-indigo-800 dark:text-indigo-300 hover:text-indigo-500 hover:underline dark:hover:text-indigo-600",
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
(t.company_name.to_owned())
|
|
|
|
(t.company_name.to_owned())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|