Feat: add hightlights

This commit is contained in:
2021-08-09 14:07:42 +02:00
parent 5020479b0a
commit c47062ce86
3 changed files with 39 additions and 2 deletions

View File

@@ -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

View File

@@ -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) {