diff --git a/web/data_endpoints.go b/web/data_endpoints.go index 000b63e..09024fb 100644 --- a/web/data_endpoints.go +++ b/web/data_endpoints.go @@ -39,10 +39,26 @@ func getTransactionsRows(w http.ResponseWriter, req *http.Request) { component.Render(context.Background(), w); } -func getTransactionQuickAccess(w http.ResponseWriter, req *http.Request) { - component := transaction_quick_access(); - component.Render(context.Background(), w); +func getTransactionQuickAccessEntries(w http.ResponseWriter, req *http.Request) { + transactions := make([]types.HumanLegibleTransaction, 20) + // Populate the slice with dummy data (you can replace this with your actual data) + for i := 20; i > 0; i-- { + transaction := types.HumanLegibleTransaction{ + Id: i, + Amount: fmt.Sprintf("%d.00", (i+1)*100), + Description: sql.NullString{String: fmt.Sprintf("Transaction %d", i+1), Valid: true}, + AccountName: sql.NullString{String: "Savings", Valid: true}, + Account: 123, + Bucket: sql.NullInt64{Int64: int64(i + 100), Valid: true}, + BucketName: sql.NullString{String: fmt.Sprintf("Bucket %d", i+1), Valid: true}, + Date: time.Now(), + } + + transactions[20 - i] = transaction + } + component := transaction_quick_access_entries(&transactions); + component.Render(context.Background(), w); } func getRightPanelQuickAccess(w http.ResponseWriter, req *http.Request) { diff --git a/web/dataendpoints.templ b/web/dataendpoints.templ index 7f0b519..6da9475 100644 --- a/web/dataendpoints.templ +++ b/web/dataendpoints.templ @@ -57,34 +57,31 @@ templ account_summary_rows(accounts *[]types.TwoIntsItem){ } } -templ transaction_quick_access() { -