Skip to content

Commit

Permalink
add feature show all users to track
Browse files Browse the repository at this point in the history
  • Loading branch information
scammo committed Jan 4, 2024
1 parent 1cfec06 commit 0dfcbc8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/views/orga/ProposalsTrack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const loading = ref(false);
const proposals = ref([]);
const toast = useToast();
const proposalStatus = ref("created");
const trackUsers = ref([]);
onMounted(async () => {
await loadPoposals();
Expand All @@ -31,7 +32,7 @@ const loadPoposals = async () => {
const response = await client.get(`track/proposals?slug=${route.params.slug}`)
let data = response.data.proposals
const trackUsers = response.data.users
trackUsers.value = response.data.users
data = data.map((proposal) => {
return {
Expand All @@ -55,7 +56,7 @@ const loadPoposals = async () => {
(opinion) => opinion.vote !== null
).length;
//----------
const max_vote_count = trackUsers.length
const max_vote_count = trackUsers.value.length
let vote_status = 'vote_completed'
if (vote_count !== max_vote_count) {
if (proposal.opinions.find(
Expand Down Expand Up @@ -155,5 +156,10 @@ const rowClass = (data) => {
</pre>
</AccordionTab>
</Accordion>
<section>
<p>
Benutzer in diesem Track:
</p><span v-for="user in trackUsers" :key="user.id">{{ user.username }}, </span>
</section>
</template>
</template>

0 comments on commit 0dfcbc8

Please sign in to comment.