Feat: add hightlights
This commit is contained in:
parent
5020479b0a
commit
c47062ce86
@ -48,6 +48,24 @@
|
||||
<li>Rétrocession moyenne</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hightlight">
|
||||
<ul>
|
||||
<li>{{ caPro }}</li>
|
||||
<li> CA pour la partie pro ({{ caProPercentage*100}}% du CA)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hightlight">
|
||||
<ul>
|
||||
<li>{{ caPerso }}</li>
|
||||
<li> CA pour la partie perso</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hightlight">
|
||||
<ul>
|
||||
<li>{{ caPersoUntouch }}</li>
|
||||
<li> CA perso non utilisé pour se rémunérer</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -61,6 +79,9 @@ export default {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', {
|
||||
caProPercentage: 'caProPercentage',
|
||||
}),
|
||||
...mapGetters('travail', {
|
||||
ca: "ca",
|
||||
caMean: "caMean",
|
||||
@ -69,6 +90,9 @@ export default {
|
||||
remunerationMean: "remunerationMean",
|
||||
retrocession: "retrocession",
|
||||
retrocessionMean: "retrocessionMean",
|
||||
caPro: "caPro",
|
||||
caPerso: "caPerso",
|
||||
caPersoUntouch: "caPersoUntouch",
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
|
@ -8,12 +8,14 @@ const config = {
|
||||
return {
|
||||
//userDir: '~/.config/sousmargot/',
|
||||
userDir: './userDir/',
|
||||
dataFile: 'datas.csv'
|
||||
dataFile: 'datas.csv',
|
||||
caProPercentage: 0.5,
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
userDir (state) { return state.userDir },
|
||||
dataFilePath (state) { return path.join(state.userDir, state.dataFile) },
|
||||
caProPercentage (state) { return state.caProPercentage },
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
@ -39,4 +41,3 @@ const config = {
|
||||
}
|
||||
|
||||
export default config
|
||||
|
||||
|
@ -157,6 +157,18 @@ const travail = {
|
||||
return Math.floor(getters.retrocession / getters.count
|
||||
)
|
||||
},
|
||||
caPro: (state, getters, rootState, rootGetters) => {
|
||||
// Part of the CA to keep for professional use
|
||||
return getters.ca * rootGetters['config/caProPercentage']
|
||||
},
|
||||
caPerso: (state, getters) => {
|
||||
// Part of the CA to keep for personal use
|
||||
return getters.ca - getters.caPro
|
||||
},
|
||||
caPersoUntouch: (state, getters) => {
|
||||
// Part of the personnal use CA that haven't been use
|
||||
return getters.caPerso - getters.remuneration
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
cleanMonths (state) {
|
||||
|
Loading…
Reference in New Issue
Block a user