game-village-politics-frontend/app/pages/village/[id]/workforce.vue

16 lines
718 B
Vue

<script setup lang="ts">
const route = useRoute()
const v = useVillageContext()
const village = computed(() => v.village.value!)
const showInVillage = (id: number) => navigateTo({ path: `/village/${route.params.id}`, query: { b: id } })
</script>
<!-- Who works where: staffing and priorities per building, and the population behind it. -->
<template>
<div class="grid gap-6 px-4 py-6 sm:px-6 lg:grid-cols-[minmax(0,1fr)_22rem] 2xl:grid-cols-[minmax(0,1fr)_26rem]">
<VillageBuildingTable :buildings="village.buildings" :busy="v.busy.value" @select="showInVillage" @priority="v.setPriority" />
<VillagePopulationPanel :population="village.population" :militia="village.levy.militia" />
</div>
</template>