Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/consultant #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/components/Consultant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ export default class Phase extends Vue {

<!-- Add 'scoped' attribute to limit CSS to this component only -->
<style scoped lang='scss'>
.new-consultant-wrapper {
}
.new-consultant-wrapper * {
margin: 6px;
}
Expand Down
12 changes: 5 additions & 7 deletions src/components/JehMaker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
<Frais v-model="fee" :totalPrice="totalPrice"/>
</sui-grid-column>
<sui-grid-column>
<!-- <consultants
<consultants
@newConsultant="onNewConsultant"
@removeConsultant="onRemoveConsultant"
:consultants="consultants"
>
</consultants> -->
</consultants>
</sui-grid-column>
<sui-grid-column>
<DistributionChart :chartData="chartData"></DistributionChart>
Expand Down Expand Up @@ -59,7 +59,6 @@
</div>
<div class="ui fluid container scrollable">
<table class="ui small celled table">
<!-- <table class="cell"> -->
<thead>
<tr class="center aligned">
<th></th>
Expand All @@ -68,7 +67,7 @@
<th colspan="2" class="center aligned">JEH</th>
<th colspan="2"></th>
<th colspan="2" class="center aligned">Part JE</th>
<th colspan="4" class="center aligned">Part intervenant(s)</th> <!-- todo: s que si plusieurs intervenants -->
<th colspan="4" class="center aligned">Part intervenant</th>
<th></th>
</tr>
<tr class="center aligned">
Expand All @@ -86,7 +85,7 @@
<!-- <p class="bold-normal">Moyenne : {{ averageMarginJe | percentage }}</p> -->
</th>
<th>URSSAF</th>
<!-- <th>Intervenants</th> -->
<th>Intervenants</th>
<th>Rémunération</th>
<th>URSSAF</th>
<th>net</th>
Expand Down Expand Up @@ -118,7 +117,7 @@
<th></th>
<th></th>
<th>{{ totalUrssafJe | euro }}</th>
<!-- <th></th> -->
<th></th>
<th>{{ totalPay | euro }}</th>
<th>{{ totalUrssafConsultant | euro }}</th>
<th>{{ totalNetConsultant | euro }}</th>
Expand All @@ -137,7 +136,6 @@
<script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'

// import DistributionChart from './DistributionChart'
import DistributionChart from '../chart/ReadingChart.vue'
import { PhaseObject, TauxObject } from '../types'
import Phase from './Phase.vue'
Expand Down
14 changes: 2 additions & 12 deletions src/components/Phase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@
</td>
<td>{{ phase.marginJE | percentage }}</td>
<td>{{ phase.urssafJE | euro }}</td>
<!-- <td>
<td>
<multiple-select
:options="consultants"
:placeholder="'Intervenant'"
></multiple-select>
</td> -->
</td>
<td>
<div class="ui verysmall input">
<input
Expand All @@ -53,7 +52,6 @@
<td>{{ phase.netConsultant | euro }}</td>
<td>{{ phase.netByConsultant | euro }}</td>
<td @click="deletePhaseEvent"><i class="icon close"></i></td>
<!-- <td>{{ mode }}</td> -->
</tr>
</template>

Expand All @@ -70,8 +68,6 @@ import MultipleSelect from './MultipleSelect.vue'
export default class Phase extends Vue {
// Props
@Prop() private phase!: PhaseObject
@Prop() private contributions!: any
// @Prop() private consultants!: string[]
@Prop() private taux!: TauxObject

// Data
Expand All @@ -86,14 +82,9 @@ export default class Phase extends Vue {

mode: string = 'price' // 'price' or 'pay' (avoid infinite loop cause by watch and calculations)

consultant: string = '';

// Lifecycle hood
mounted () {
this.calculate()
// if (this.consultants.length) {
// this.consultant = this.consultants[0]
// }
}

// Watchers
Expand Down Expand Up @@ -171,7 +162,6 @@ export default class Phase extends Vue {
this.phase.netByConsultant = 0
this.phase.pcConsultant = 0
}
// toInt(strnb): [number, string] { // convert to integer and if possible then call calculate, otherwise call reset
toInt (strnb: string): number { // convert to integer and if possible then call calculate, otherwise call reset
let nb = parseInt(strnb)
if (isNaN(nb)) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Taux.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class Taux extends Vue {
this.open = !this.open
}

handleInput (e) {
handleInput () {
this.$emit('input', this.content)
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/unit/types.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const testSetMethods = [
},
taux: new TauxObject(39.04, 0.30116, 0.042, 0.1605, 0)
}
// TODO Add values from 2020 with updated rates
]

describe('TauxObject', () => {
Expand Down