import { CityWithLocation } from "../repository/city";
import { Building } from '../repository/buildings';
import _ from "lodash";
-import { topbar } from "./topbar";
function progressBar(current, max): string {
const percent = Math.ceil((current/max) * 100);
<h2 data-augmented-ui="tl-clip bl-clip none">Construction</h2>
<table>
<tr>
- <th>Free Land</th>
+ <th>Type</th>
<th>Current</th>
- <td colspan="2">${(city.totalSpace - city.usedSpace).toLocaleString()} (${Math.ceil(freeSpace/city.totalSpace * 100)}% available)</td>
+ <th>Space Available: ${(city.totalSpace - city.usedSpace).toLocaleString()} (${Math.ceil(freeSpace/city.totalSpace * 100)}% available)</th>
+ <th width="200">Cost</th>
</tr>
${
buildings.map(building => {
<input type="hidden" name="building_type" value="${building.slug}">
<button type="submit">Build</button>
</form>
- <span id="${building.slug}-cost"></span>
</td>
+ <td id="${building.slug}-cost"></td>
</tr>
`;
}).join("\n")
</table>
</div>
`;
- return html + queues + topbar(city);
-}
\ No newline at end of file
+ return html + queues;
+}