Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Commit

Permalink
Participation in Wahlkreis-Single-View; Generator now populates autht…
Browse files Browse the repository at this point in the history
…oken
  • Loading branch information
elordin committed Jan 16, 2016
1 parent 0813d41 commit 8c0c1ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions node-server/views/wahlkreise-single.jade
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ block content
dl.general-info
div
dt Stimmberechtigt
dd= data.meta[0].elective
dd= data.meta[0].electorate
div
dt Stimmen abgegeben
dd= data.meta[0].voted
div
dt Wahlbeteiligung
dd= 100 * Math.round(data.meta[0].participationrate / 100) + ' %'
dd= Math.round(data.meta[0].participationrate * 100) / 100 + ' %'
.first
h3 Sieger nach Erstimmen
if data.first.length < 1
Expand Down
2 changes: 1 addition & 1 deletion u04/generator/src/main/scala/generator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ object Generator {
} else {
val (firstname, lastname) = Names.getName(sz.gender)
val (dobDay, dobMonth) = randomDayOfBirth
p.println(f"INSERT INTO Citizen (idno, firstname, lastname, dateofbirth, gender, authtoken) VALUES ('${sz.toString}', '${firstname}', '${lastname}', '${2009 - sz.age}.${dobMonth}.${dobDay}', '${sz.gender}', '');")
p.println(f"INSERT INTO Citizen (idno, firstname, lastname, dateofbirth, gender, authtoken) SELECT '${sz.toString}', '${firstname}', '${lastname}', '${2009 - sz.age}.${dobMonth}.${dobDay}', '${sz.gender}', random_pin(4));")
sz.toString
}
p.println(f"INSERT INTO CitizenRegistration (idno, dwbid) VALUES ('${idno}', ${dwbid});")
Expand Down

0 comments on commit 8c0c1ec

Please sign in to comment.