Initial commit: Phoenix LiveView demo for interactive data tables with filtering, sorting, pagination, URL state, and progressive enhancement
Implements a fully-featured action requests table in a single LiveView module using Flop, Ecto, and SQLite. Includes: - Fuzzy search, status/assignment filters, column sorting, 25-per-page pagination - Real-time updates, bookmarkable URLs via `handle_params/3` - JS-disabled fallback with GET forms (no duplicate logic) - 1,000,000 seeded records, Tailwind + DaisyUI styling, light/dark themes - Comprehensive README with comparisons to Django+React/Rails+React stacks - 31 tests covering all scenarios Tech: Phoenix 1.8+, LiveView, Flop, Ecto, SQLite, Elixir 1.15+
This commit is contained in:
4
priv/repo/migrations/.formatter.exs
Normal file
4
priv/repo/migrations/.formatter.exs
Normal file
@@ -0,0 +1,4 @@
|
||||
[
|
||||
import_deps: [:ecto_sql],
|
||||
inputs: ["*.exs"]
|
||||
]
|
||||
@@ -0,0 +1,20 @@
|
||||
defmodule ActionRequestsDemo.Repo.Migrations.CreateActionRequests do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:action_requests, primary_key: false) do
|
||||
add :id, :binary_id, primary_key: true
|
||||
add :patient_name, :string
|
||||
add :status, :string
|
||||
add :assigned_user_id, :integer
|
||||
add :delivery_scheduled_at, :naive_datetime
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
create index(:action_requests, [:patient_name])
|
||||
create index(:action_requests, [:status])
|
||||
create index(:action_requests, [:assigned_user_id])
|
||||
create index(:action_requests, [:inserted_at])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user