restyling and deleting of console.logs

This commit is contained in:
Julie Lenaerts 2021-12-10 17:47:16 +01:00
parent 9afc8c64ad
commit 1422ddeb2a
2 changed files with 16 additions and 26 deletions

View File

@ -78,11 +78,11 @@
<ul class="record_actions" v-if="availableForCheckGoal.length > 0"> <ul class="record_actions" v-if="availableForCheckGoal.length > 0">
<li> <li>
<button :title="$t('add_an_objective')" class="btn btn-create" <button :title="$t('add_an_objective')" class="btn btn-create"
@click="toggleAddObjective"></button> @click="toggleAddObjective"></button>
</li> </li>
</ul> </ul>
<div v-else> <div v-else>
<span class="chill-no-data-statement">{{ $t('no_goals_available') }}</span> <span class="chill-no-data-statement">{{ $t('no_goals_available') }}</span>
</div> </div>
</div> </div>
<div><!-- empty for results --></div> <div><!-- empty for results --></div>
@ -367,8 +367,6 @@ export default {
]), ]),
startDate: { startDate: {
get() { get() {
//console.log('get start date', this.$store.state.startDate);
console.log(this.work);
return dateToISO(this.$store.state.startDate); return dateToISO(this.$store.state.startDate);
}, },
set(v) { set(v) {
@ -377,7 +375,6 @@ export default {
}, },
endDate: { endDate: {
get() { get() {
//console.log('get end date', this.$store.state.endDate);
return dateToISO(this.$store.state.endDate); return dateToISO(this.$store.state.endDate);
}, },
set(v) { set(v) {
@ -394,8 +391,6 @@ export default {
}, },
availableForCheckGoal() { availableForCheckGoal() {
let pickedIds = this.$store.state.goalsPicked.map(g => g.goal.id); let pickedIds = this.$store.state.goalsPicked.map(g => g.goal.id);
//console.log('pickeds goals id', pickedIds);
//console.log(this.$store.state.goalsForAction);
return this.$store.state.goalsForAction.filter(g => !pickedIds.includes(g.id)); return this.$store.state.goalsForAction.filter(g => !pickedIds.includes(g.id));
}, },
@ -405,12 +400,10 @@ export default {
personsPicked: { personsPicked: {
get() { get() {
let s = this.$store.state.personsPicked.map(p => p.id); let s = this.$store.state.personsPicked.map(p => p.id);
//console.log('persons picked', s);
return s; return s;
}, },
set(v) { set(v) {
//console.log('persons picked', v);
this.$store.commit('setPersonsPickedIds', v); this.$store.commit('setPersonsPickedIds', v);
} }
}, },
@ -420,11 +413,11 @@ export default {
this.showAddObjective = !this.showAddObjective; this.showAddObjective = !this.showAddObjective;
}, },
addGoal(g) { addGoal(g) {
//console.log('add Goal', g);
this.$store.commit('addGoal', g); this.$store.commit('addGoal', g);
}, },
removeGoal(g) { removeGoal(g) {
//console.log('remove goal', g);
this.$store.commit('removeGoal', g); this.$store.commit('removeGoal', g);
}, },
addEvaluation(e) { addEvaluation(e) {
@ -434,23 +427,19 @@ export default {
this.showAddEvaluation = !this.showAddEvaluation; this.showAddEvaluation = !this.showAddEvaluation;
}, },
setHandlingThirdParty({selected, modal}) { setHandlingThirdParty({selected, modal}) {
//console.log('setHandlingThirdParty', selected);
this.$store.commit('setHandlingThirdParty', selected.shift().result); this.$store.commit('setHandlingThirdParty', selected.shift().result);
this.$refs.handlingThirdPartyPicker.resetSearch(); this.$refs.handlingThirdPartyPicker.resetSearch();
modal.showModal = false; modal.showModal = false;
}, },
removeHandlingThirdParty() { removeHandlingThirdParty() {
//console.log('removeHandlingThirdParty');
this.$store.commit('setHandlingThirdParty', null); this.$store.commit('setHandlingThirdParty', null);
}, },
addThirdParties({selected, modal}) { addThirdParties({selected, modal}) {
//console.log('addThirdParties', selected);
this.$store.commit('addThirdParties', selected.map(r => r.result)); this.$store.commit('addThirdParties', selected.map(r => r.result));
this.$refs.thirdPartyPicker.resetSearch(); this.$refs.thirdPartyPicker.resetSearch();
modal.showModal = false; modal.showModal = false;
}, },
removeThirdParty(t) { removeThirdParty(t) {
//console.log('remove third party', t);
this.$store.commit('removeThirdParty', t); this.$store.commit('removeThirdParty', t);
}, },
submit() { submit() {

View File

@ -38,7 +38,7 @@
</h2> </h2>
<div class="accordion-collapse" id="collapse_expanded_suggestions" <div class="accordion-collapse" id="collapse_expanded_suggestions"
aria-labelledby="heading_expanded_suggestions" data-bs-parent="#expandedSuggestions"> aria-labelledby="heading_expanded_suggestions" data-bs-parent="#expandedSuggestions">
<template v-if="isExpanded"> <template v-if="isExpanded">
<ul class="list-suggest add-items"> <ul class="list-suggest add-items">
@ -90,9 +90,6 @@ export default {
throw Error(`this.destination is not implemented: ${this.destination}`); throw Error(`this.destination is not implemented: ${this.destination}`);
}, },
pickedResults() { pickedResults() {
//console.log('get checked');
//console.log('this.destination', this.destination);
//console.log('this.goal', this.goal);
if (this.destination === 'action') { if (this.destination === 'action') {
return this.$store.state.resultsPicked; return this.$store.state.resultsPicked;
} else if (this.destination === 'goal') { } else if (this.destination === 'goal') {
@ -102,16 +99,11 @@ export default {
throw Error(`this.destination is not implemented: ${this.destination}`); throw Error(`this.destination is not implemented: ${this.destination}`);
}, },
availableForCheckResults() { availableForCheckResults() {
//console.log('availableForCheckResults');
//console.log('this.destination', this.destination);
//console.log('this.goal', this.goal);
if (this.destination === 'action') { if (this.destination === 'action') {
let pickedIds = this.$store.state.resultsPicked.map(r => r.id); let pickedIds = this.$store.state.resultsPicked.map(r => r.id);
//console.log('picked ids', pickedIds);
return this.$store.state.resultsForAction.filter(r => !pickedIds.includes(r.id)); return this.$store.state.resultsForAction.filter(r => !pickedIds.includes(r.id));
} else if (this.destination === 'goal') { } else if (this.destination === 'goal') {
//console.log('results picked for goal', this.$store.getters.resultsPickedForGoal(this.goal));
let pickedIds = this.$store.getters.resultsPickedForGoal(this.goal).map(r => r.id); let pickedIds = this.$store.getters.resultsPickedForGoal(this.goal).map(r => r.id);
return this.$store.getters.resultsForGoal(this.goal).filter(r => !pickedIds.includes(r.id)); return this.$store.getters.resultsForGoal(this.goal).filter(r => !pickedIds.includes(r.id));
@ -125,7 +117,7 @@ export default {
this.isExpanded = !this.isExpanded; this.isExpanded = !this.isExpanded;
}, },
addResult(r) { addResult(r) {
//console.log('addResult', r);
if (this.destination === 'action') { if (this.destination === 'action') {
this.$store.commit('addResultPicked', r); this.$store.commit('addResultPicked', r);
return; return;
@ -136,7 +128,7 @@ export default {
throw Error(`this.destination is not implemented: ${this.destination}`); throw Error(`this.destination is not implemented: ${this.destination}`);
}, },
removeResult(r) { removeResult(r) {
//console.log('removeresult', r);
if (this.destination === 'action') { if (this.destination === 'action') {
this.$store.commit('removeResultPicked', r); this.$store.commit('removeResultPicked', r);
return; return;
@ -150,3 +142,12 @@ export default {
} }
</script> </script>
<style lang="scss" scoped>
.accordion-button {
padding: .25rem;
}
</style>