Feat: simplify createMonth

This commit is contained in:
Bertrand Benjamin 2021-08-12 14:28:00 +02:00
parent cdbc5f9d51
commit 37d1967343
2 changed files with 7 additions and 29 deletions

View File

@ -9,32 +9,10 @@
</div> </div>
</div> </div>
<div class="datas"> <div class="datas">
<ul> <li v-for="cara in monthDesc" :key='cara.name'>
<li> <label :for='cara.name'>{{ cara.desc }}</label>
<label for="ca-theo">CA théorique</label> <input type="number" v-model.number="monthCopy[cara.name]" id="cara.name" class="value">
<input type="number" v-model.number="monthCopy.caTheo" id="ca-theo" class="value" > </li>
</li>
<li>
<label for="ca-retro">CA rétrocession</label>
<input type="number" v-model.number="monthCopy.caRetro" id="ca-retro" class="value" >
</li>
<li>
<label for="ca-react">CA réactualisé</label>
<input type="number" v-model.number="monthCopy.caReact" id="ca-react" class="value" >
</li>
<li>
<label for="nbr-seances">Nombre de séances effectuées</label>
<input type="number" v-model.number="monthCopy.sessionQty" id="nbr-seances" class="value" >
</li>
<li>
<label for="retro">Montant de la rétrocession</label>
<input type="number" v-model.number="monthCopy.retro" id="retro" class="value" >
</li>
<li>
<label for="remuneration">Rémunération effectuée</label>
<input type="number" v-model.number="monthCopy.remuneration" id="remuneration" class="value">
</li>
</ul>
</div> </div>
</div> </div>
</template> </template>
@ -68,6 +46,9 @@ export default {
...mapGetters('travail', { ...mapGetters('travail', {
'theEmptyMonth': 'TheEmptyMonth', 'theEmptyMonth': 'TheEmptyMonth',
}), }),
...mapGetters('config', {
'monthDesc': 'monthDesc',
}),
}, },
methods: { methods: {
...mapActions('travail', { ...mapActions('travail', {
@ -117,12 +98,10 @@ export default {
} }
li { li {
margin: 3px; margin: 3px;
width: 30%;
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
} }
.value { .value {
font-size: 1.5em;
font-weight: bold; font-weight: bold;
} }
</style> </style>

View File

@ -132,6 +132,5 @@ export default {
padding: 4px; padding: 4px;
font-size: 0.8em; font-size: 0.8em;
width: auto; width: auto;
} }
</style> </style>