Feat: add hightlights
This commit is contained in:
parent
5020479b0a
commit
c47062ce86
@ -48,6 +48,24 @@
|
|||||||
<li>Rétrocession moyenne</li>
|
<li>Rétrocession moyenne</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -61,6 +79,9 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters('config', {
|
||||||
|
caProPercentage: 'caProPercentage',
|
||||||
|
}),
|
||||||
...mapGetters('travail', {
|
...mapGetters('travail', {
|
||||||
ca: "ca",
|
ca: "ca",
|
||||||
caMean: "caMean",
|
caMean: "caMean",
|
||||||
@ -69,6 +90,9 @@ export default {
|
|||||||
remunerationMean: "remunerationMean",
|
remunerationMean: "remunerationMean",
|
||||||
retrocession: "retrocession",
|
retrocession: "retrocession",
|
||||||
retrocessionMean: "retrocessionMean",
|
retrocessionMean: "retrocessionMean",
|
||||||
|
caPro: "caPro",
|
||||||
|
caPerso: "caPerso",
|
||||||
|
caPersoUntouch: "caPersoUntouch",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
@ -8,12 +8,14 @@ const config = {
|
|||||||
return {
|
return {
|
||||||
//userDir: '~/.config/sousmargot/',
|
//userDir: '~/.config/sousmargot/',
|
||||||
userDir: './userDir/',
|
userDir: './userDir/',
|
||||||
dataFile: 'datas.csv'
|
dataFile: 'datas.csv',
|
||||||
|
caProPercentage: 0.5,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
userDir (state) { return state.userDir },
|
userDir (state) { return state.userDir },
|
||||||
dataFilePath (state) { return path.join(state.userDir, state.dataFile) },
|
dataFilePath (state) { return path.join(state.userDir, state.dataFile) },
|
||||||
|
caProPercentage (state) { return state.caProPercentage },
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
},
|
},
|
||||||
@ -39,4 +41,3 @@ const config = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default config
|
export default config
|
||||||
|
|
||||||
|
@ -157,6 +157,18 @@ const travail = {
|
|||||||
return Math.floor(getters.retrocession / getters.count
|
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: {
|
mutations: {
|
||||||
cleanMonths (state) {
|
cleanMonths (state) {
|
||||||
|
Loading…
Reference in New Issue
Block a user