<template>
<div id="hightlights"> 
    <div class="hightlight">
        <ul>
            <li>{{ ca }}</li>
            <li>CA</li>
        </ul>
    </div>
    <div class="hightlight">
        <ul>
            <li>{{ caMean }}</li>
            <li>CA moyen</li>
        </ul>
    </div>
    <div class="hightlight">
        <ul>
            <li>{{ caTheo }}</li>
            <li>CA des séances effectuées</li>
        </ul>
    </div>
    <div class="hightlight">
        <ul>
            <li>{{ caTheo - ca }}</li>
            <li>Non facturé</li>
        </ul>
    </div>
    <div class="hightlight">
        <ul>
            <li>{{ remuneration }}</li>
            <li>Rémunération</li>
        </ul>
    </div>
    <div class="hightlight">
        <ul>
            <li>{{ remunerationMean }}</li>
            <li>Rémunération moyenne</li>
        </ul>
    </div>
    <div class="hightlight">
        <ul>
            <li>{{ retrocession }}</li>
            <li>Rétrocession</li>
        </ul>
    </div>
    <div class="hightlight">
        <ul>
            <li>{{ retrocessionMean }}</li>
            <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>

<script>
import { mapGetters } from 'vuex'
import { caTotal,
    caMean,
    caTheo,
    remuneration,
    remunerationMean,
    retrocession,
    retrocessionMean,
    caPro,
    caPerso,
    caPersoUntouch 
} from '../lib/months'

export default {
    name: 'Hightlights',
    components: {
        },
    data () {
        return {}
        },
    computed: {
        ...mapGetters('config', {
            caProPercentage: 'caProPercentage',
        }),
        ...mapGetters('travail', {
            months: "months",
        }),
        ca: function () {return caTotal(this.months)},
        caMean: function () {return caMean(this.months)},
        caTheo: function () {return caTheo(this.months)},
        remuneration: function () {return remuneration(this.months)},
        remunerationMean: function () {return remunerationMean(this.months)},
        retrocession: function () {return retrocession(this.months)},
        retrocessionMean: function () {return retrocessionMean(this.months)},
        caPro: function () {return caPro(this.months, this.caProPercentage)},
        caPerso: function () {return caPerso(this.months, this.caProPercentage)},
        caPersoUntouch: function () {return caPersoUntouch(this.months, this.caProPercentage)},

      },
      mounted () {
      },
      methods: {
      },
}
</script>

<style scoped>
</style>
