fix: handle apartments

This commit is contained in:
Anna 2023-02-19 22:17:41 -05:00
parent 71ebff5cba
commit 50e1ff546b
1 changed files with 9 additions and 1 deletions

View File

@ -79,7 +79,15 @@ internal class MessageList : ITab {
loc += $" (Ward {message.Ward.Value}";
if (message.Plot != null) {
loc += $", Plot {message.Plot.Value}";
if (message.Plot.Value >= 10_000) {
var apartment = message.Plot.Value - 10_000;
var wing = apartment < 5_000 ? 1 : 2;
var apt = wing == 2 ? apartment - 5_000 : apartment;
loc += $", Apt. {apt}, Wing {wing}";
} else {
loc += $", Plot {message.Plot.Value}";
}
}
loc += ")";