Feat: use output function for month description

This commit is contained in:
Bertrand Benjamin 2021-08-13 09:43:47 +02:00
parent 710015a37b
commit 9cf4cf934b
2 changed files with 8 additions and 2 deletions

View File

@ -17,7 +17,7 @@
<ul v-show="!editing">
<li v-for="cara in monthDesc" :key='cara.name'>
<label :for='cara.name'>{{ cara.desc }}</label>
<span class="value" >{{ TheMonth.[cara.name] ?? "∅"}} {{cara.unit}}</span>
<span class="value" >{{ cara.output(TheMonth) ?? "∅"}} {{cara.unit}}</span>
</li>
</ul>
<ul v-show="editing">
@ -26,7 +26,6 @@
<input type="number" v-model.number="monthCopy[cara.name]" id="cara.name" class="value">
</li>
</ul>
</div>
</div>
</template>

View File

@ -18,6 +18,7 @@ const config = {
name: 'caTheo',
unit: '€',
hightlight: true,
output: month => month.caTheo,
},
{
color: '',
@ -26,6 +27,7 @@ const config = {
name: 'caRetro',
unit: '€',
hightlight: false,
output: month => month.caRetro,
},
{
color: '',
@ -34,6 +36,7 @@ const config = {
name: 'caReact',
unit: '€',
hightlight: true,
output: month => month.caReact,
},
{
color: '',
@ -42,6 +45,7 @@ const config = {
name: 'sessionQty',
unit: '',
hightlight: false,
output: month => month.sessionQty,
},
{
color: '',
@ -50,6 +54,7 @@ const config = {
name: 'retro',
unit: '€',
hightlight: false,
output: month => month.retro,
},
{
color: '',
@ -58,6 +63,7 @@ const config = {
name: 'remuneration',
unit: '€',
hightlight: true,
output: month => month.remuneration,
},
{
color: '',
@ -66,6 +72,7 @@ const config = {
name: 'proPercentage',
unit: '%',
hightlight: false,
output: month => month.proPercentage,
},
],
}