Skip to content

Commit

Permalink
fix bug count assumes 3 line heading
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornregnell committed Sep 1, 2023
1 parent 9537c74 commit fe6a7ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
<p> -->

<!-- Include Scala.js compiled code. Bump version to force clear cache in client -->
<script type="text/javascript" src="https://fileadmin.cs.lth.se/pgk/kaptenalloc/main.js?version=42"></script>
<script type="text/javascript" src="https://fileadmin.cs.lth.se/pgk/kaptenalloc/main.js?version=43"></script>
</body>
</html>
5 changes: 3 additions & 2 deletions src/main/scala/main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ extension (rows: Seq[String])
val end = start.toIntOption.map(_ + 2).getOrElse("??")
s"$start-$end"
val paymentRows = register.map(xs => Seq(xs.last) :+ xs(0) :+ xs(1) :+ timeToPeriod(xs(4)))
for row <- "init;kurs;datum;tid" +: paymentRows.map(_.mkString(";"))
if row.containsAll(words.drop(1)) || row.startsWith("init")
val headings = Seq("lönereg kopiera till csv", "------------------------", "init;kurs;datum;tid")
for row <- headings ++ paymentRows.map(_.mkString(";"))
if row.containsAll(words.drop(1)) || row.startsWith("init") || row.startsWith("-") || row.startsWith("lön")
yield row

/** Add a week number column for a KaptenAlloc formatted matrix */
Expand Down

0 comments on commit fe6a7ce

Please sign in to comment.