fix width if no voter
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
|||||||
|
FROM node:lts-alpine AS build-stage
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm ci
|
||||||
|
COPY . .
|
||||||
|
RUN n
|
||||||
|
RUN npx nuxt build
|
||||||
|
|
||||||
|
FROM node:lts-alpine AS production-stage
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build-stage /app/.output/ /app
|
||||||
|
COPY --from=build-stage /app/node_modules/ /app/node_modules
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD ["node", "server/index.mjs"]
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
réaliser la distribution des œufs,
|
réaliser la distribution des œufs,
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
être Référent d’un produit.
|
être Référent d’un resultsproduit.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
être Référent du local de distribution (si officiellement créé), Référent Impression,
|
être Référent du local de distribution (si officiellement créé), Référent Impression,
|
||||||
@@ -35,7 +35,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<slot>
|
<slot>
|
||||||
<component :is="questionComponent" question-id="1" :results="results" />
|
<component :is="questionComponent" question-id="1" :results="results" :values="['oui', 'non']"
|
||||||
|
:colors="['#acab', '#caba']" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="emphased">
|
<div class="emphased">
|
||||||
<div v-for="(amount, val) in filtered_results" :id="`${questionId}-${val}`" :key="val"
|
<div v-for="(amount, val) in filtered_results" :id="`${questionId}-${val}`" :key="val"
|
||||||
:style="{ width: `${(amount / total) * 100}%`, background: colors[values.indexOf(String(val))] }">
|
:style="{ width: (total ? `${(amount / total) * 100}%` : '100%'), background: colors[values.indexOf(String(val))] }">
|
||||||
<span>({{ amount }}){{ val }}</span>
|
<span>({{ amount }}){{ val }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,7 +40,7 @@ const filtered_results = computed(() => {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const total = computed(() => Object.values(filtered_results.value).reduce((acc, v) => v + acc, 0) ?? 1)
|
const total = computed(() => (Object.values(filtered_results.value).reduce((acc, v) => v + acc, 0) || 0))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,10 @@ export default defineNuxtConfig({
|
|||||||
public: {
|
public: {
|
||||||
apiBase: '/api'
|
apiBase: '/api'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
nitro:{
|
||||||
|
prerender:{
|
||||||
|
ignore:["/poll"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user