add parameter to enable vote button
This commit is contained in:
parent
8f1561dd74
commit
88303be9cd
@ -7,6 +7,7 @@ import type { PropType } from 'vue';
|
|||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
proposals: { type: Object as PropType<PaginatedProposals> },
|
proposals: { type: Object as PropType<PaginatedProposals> },
|
||||||
|
votable: { type: Boolean, default: false }
|
||||||
});
|
});
|
||||||
|
|
||||||
const format = useFormatter();
|
const format = useFormatter();
|
||||||
@ -27,40 +28,16 @@ const statusMap: Record<string, string> = {
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="bg-white dark:bg-[#28334e] rounded text-sm">
|
<div class="bg-white dark:bg-[#28334e] rounded text-sm">
|
||||||
<table class="table-compact w-full table-fixed hidden lg:table">
|
<table class="table-compact w-full table-fixed lg:table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(item, index) in proposals?.proposals" :key="index">
|
<tr v-for="(item, index) in proposals?.proposals" :key="index">
|
||||||
<td class="px-4 w-20">
|
<td class="px-4 w-20">
|
||||||
<label
|
<label
|
||||||
for="proposal-detail-modal"
|
for=""
|
||||||
class="text-main text-base hover:text-indigo-400 cursor-pointer"
|
class="text-main text-base hover:text-indigo-400 cursor-pointer"
|
||||||
>
|
>
|
||||||
#{{ item?.proposal_id }}</label
|
#{{ item?.proposal_id }}</label
|
||||||
>
|
>
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
id="proposal-detail-modal"
|
|
||||||
class="modal-toggle"
|
|
||||||
/>
|
|
||||||
<div class="modal modal-bottom sm:modal-middle">
|
|
||||||
<div class="modal-box">
|
|
||||||
<h3 class="font-bold text-lg">Description</h3>
|
|
||||||
<p class="py-4">
|
|
||||||
<Component
|
|
||||||
v-if="item.content?.description"
|
|
||||||
:is="select(item.content?.description, 'horizontal')"
|
|
||||||
:value="item.content?.description"
|
|
||||||
></Component>
|
|
||||||
</p>
|
|
||||||
<div class="modal-action">
|
|
||||||
<label
|
|
||||||
for="proposal-detail-modal"
|
|
||||||
class="btn btn-sm btn-primary"
|
|
||||||
>Close</label
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="w-[35%]">
|
<td class="w-[35%]">
|
||||||
<div>
|
<div>
|
||||||
@ -117,7 +94,7 @@ const statusMap: Record<string, string> = {
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td v-if="votable">
|
||||||
<div>
|
<div>
|
||||||
<button class="btn btn-xs btn-primary rounded-sm">Vote</button>
|
<button class="btn btn-xs btn-primary rounded-sm">Vote</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user