Feat: default month and list display

This commit is contained in:
Bertrand Benjamin 2021-07-08 11:08:03 +02:00
parent 6d669e5ae4
commit 1309c9147a
2 changed files with 39 additions and 16 deletions

View File

@ -1,25 +1,41 @@
<template> <template>
<form id="new-month"> <div class="month-presentation" id="new-month">
<h3> Nouveau mois </h3> <div class="date">
<input type="month"> <input type="month" v-model="monthDate">
<month-form></month-form> </div>
</form> <div class="infos">
<month-form></month-form>
</div>
<div class="actions">
<button> Valider </button>
<button> Annuler </button>
</div>
</div>
</template> </template>
<script> <script>
import MonthForm from "./MonthForm" import MonthForm from "./MonthForm"
const today = new Date();
function formatDate(date) {
var y = ''+date.getFullYear()
var m = ''+(date.getMonth()+1)
if (m.length < 2) { m = '0'+m}
return [y, m].join('-')
}
export default { export default {
name: 'NewMonth', name: 'NewMonth',
props: {
},
components: { components: {
MonthForm: MonthForm, MonthForm: MonthForm,
}, },
data () { data () {
return { return {
monthDate: "2021/07", monthDate: formatDate(today),
} }
}, },
props: {
},
computed: { computed: {
}, },
} }

View File

@ -1,24 +1,31 @@
<template> <template>
<form> <form>
<ul>
<li>
<label for="ca-theo">CA théorique</label> <label for="ca-theo">CA théorique</label>
<input type="number" id="ca-theo"> <input type="number" id="ca-theo">
</li>
<li>
<label for="ca-retro">CA au moment de la rétrocession</label> <label for="ca-retro">CA au moment de la rétrocession</label>
<input type="number" id="ca-retro"> <input type="number" id="ca-retro">
</li>
<li>
<label for="ca-react">CA réactualisé</label> <label for="ca-react">CA réactualisé</label>
<input type="number" id="ca-react"> <input type="number" id="ca-react">
</li>
<li>
<label for="nbr-seance">Nombre de séances</label> <label for="nbr-seance">Nombre de séances</label>
<input type="number" id="nbr-seance"> <input type="number" id="nbr-seance">
</li>
<li>
<label for="retro">Montant de la rétrocession</label> <label for="retro">Montant de la rétrocession</label>
<input type="number" id="retro"> <input type="number" id="retro">
</li>
<li>
<label for="remumeration">Rémunération effectuée</label> <label for="remumeration">Rémunération effectuée</label>
<input type="number" id="remumeration"> <input type="number" id="remumeration">
</li>
</ul>
</form> </form>
</template> </template>
@ -30,7 +37,7 @@ export default {
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
empty: "travail/empty_month", TheEmpty: "travail/TheEmptyMonth",
}) })
}, },
} }