From 13f454afb57d2d589c753b13556826863f4c3ba2 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 2 Jul 2018 17:42:15 +0100 Subject: [PATCH] Updated README database section; reformat of electors Electors page is STILL rendering an obsolete version which is nowhere in the code, and I cannot see how it possibly can. --- README.md | 16 ++++++++++++---- .../youyesyet/canvasser_app/views/electors.cljs | 13 ++++++------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index dd054c8..f21afe9 100644 --- a/README.md +++ b/README.md @@ -59,16 +59,24 @@ Do get the database initialised, run createdb youyesyet_dev -followed by +I'm no longer using Migratus as I'm using [Application Description Language]() +to generate the majority of the application, and, as changes are made to the application +description, new database schemas are generated. The database initialisation script will +be found at `resources/sql/youyesyet.postgres.sql`. Reference data initialisation scripts +will in due course be stored in the same directory. - lein migratus migrate - -**NOTE THAT** in the namespace *youyesyet.db.schema*, there are a series of functions *create-xxx-table!*. These are a snare and a delusion; they are how I originally bootstrapped the database, but are no longer used (and should probably be deleted). The database is now constructed using [migratus](https://github.com/yogthos/migratus). +Once we have a more or less finished application it may be worth going back to +[Migratus](https://github.com/yogthos/migratus); I might have a go at generating migrations from +diffs between successive versions of the application description. ## Running in a dev environment To run in a dev environment, checkout the *develop* branch +To download and install Javascript delendencies, run + + lein npm install + To start a development web server for the application, run: lein run diff --git a/src/cljs/youyesyet/canvasser_app/views/electors.cljs b/src/cljs/youyesyet/canvasser_app/views/electors.cljs index 8f0f310..eb1f5ec 100644 --- a/src/cljs/youyesyet/canvasser_app/views/electors.cljs +++ b/src/cljs/youyesyet/canvasser_app/views/electors.cljs @@ -62,11 +62,12 @@ (defn name-cell [elector] - [:td {:key (str "name-" (:id elector)) - :on-click #(dispatch - [:set-elector-and-page {:elector-id (:id elector) - :page "gdpr"}])} - (:name elector)]) + [:td {:key (str "name-" (:id elector)) + :on-click #(dispatch + [:set-elector-and-page + {:elector-id (:id elector) + :page "gdpr"}])} + (:name elector)]) (defn names-row @@ -92,9 +93,7 @@ [:div.container {:id "main-container"} [:table [:tbody - ;; genders row (genders-row electors) - ;; names row (names-row electors)]] (ui/back-link)]] (ui/error-panel "No address selected"))))