automatic rearrange code (indentation: 3)

This commit is contained in:
Mathieu Jaumotte 2021-08-11 09:37:39 +02:00 committed by Marc Ducobu
parent d0fa28db2a
commit 8d98a144fd
4 changed files with 492 additions and 479 deletions

View File

@ -8,25 +8,25 @@
<div id="startDate">
<label>{{ $t('startDate') }}</label>
<input type="date" v-model="startDate" />
<input v-model="startDate" type="date"/>
</div>
<div id="endDate">
<label>{{ $t('endDate') }}</label>
<input type="date" v-model="endDate" />
<input v-model="endDate" type="date"/>
</div>
<div id="comment">
<label>{{ $t('comments') }}</label>
<ckeditor
:editor="editor"
v-model="note"
:editor="editor"
tag-name="textarea"
></ckeditor>
</div>
<div id="objectives" class="objectives_list">
<div class="title" aria="hidden">
<div aria="hidden" class="title">
<div><h3>{{ $t('goals_title') }}</h3></div>
<div><h3>{{ $t('results_title') }}</h3></div>
</div>
@ -44,13 +44,13 @@
<!-- results which **are** attached to an objective -->
<div v-for="g in goalsPicked">
<div>
<div @click="removeGoal(g)" class="objective-title">
<div class="objective-title" @click="removeGoal(g)">
<i class="fa fa-times"></i>
{{ g.goal.title.fr }}
</div>
</div>
<div>
<add-result destination="goal" :goal="g.goal"></add-result>
<add-result :goal="g.goal" destination="goal"></add-result>
</div>
</div>
@ -59,10 +59,10 @@
<div>
<div v-if="showAddObjective">
<p>{{ $t('available_goals_text')}}</p>
<p>{{ $t('available_goals_text') }}</p>
<ul class="list-objectives">
<li v-for="g in availableForCheckGoal" @click="addGoal(g)" class="badge bg-primary">
<li v-for="g in availableForCheckGoal" class="badge bg-primary" @click="addGoal(g)">
<i class="fa fa-plus"></i>
{{ g.title.fr }}
</li>
@ -70,7 +70,8 @@
</div>
<ul class="record_actions">
<li>
<button @click="toggleAddObjective" class="btn btn-create" :title="$t('add_an_objective')"></button>
<button :title="$t('add_an_objective')" class="btn btn-create"
@click="toggleAddObjective"></button>
</li>
</ul>
</div>
@ -79,7 +80,7 @@
</div>
<div id="evaluations">
<div class="title" aria="hidden">
<div aria="hidden" class="title">
<div><h3>{{ $t('Evaluations') }}</h3></div>
</div>
@ -99,9 +100,9 @@
<ul class="record_actions">
<li>
<button
:title="$t('add_an_evaluation')"
class="btn btn-create"
@click="toggleAddEvaluation"
:title="$t('add_an_evaluation')">
@click="toggleAddEvaluation">
</button>
</li>
</ul>
@ -113,7 +114,7 @@
<ul>
<li v-for="p in personsReachables" :key="p.id">
<input type="checkbox" :value="p.id" v-model="personsPicked">
<input v-model="personsPicked" :value="p.id" type="checkbox">
<person :person="p"></person>
</li>
</ul>
@ -130,12 +131,12 @@
<ul class="record_actions">
<li>
<add-persons
ref="handlingThirdPartyPicker"
v-bind:key="handlingThirdPartyPicker.key"
v-bind:buttonTitle="$t('precise_handling_thirdparty')"
v-bind:modalTitle="$t('choose_a_thirdparty')"
v-bind:key="handlingThirdPartyPicker.key"
v-bind:options="handlingThirdPartyPicker.options"
@addNewPersons="setHandlingThirdParty"
ref="handlingThirdPartyPicker"> <!-- to cast child method -->
@addNewPersons="setHandlingThirdParty"> <!-- to cast child method -->
</add-persons>
</li>
</ul>
@ -146,7 +147,8 @@
<ul class="record_actions">
<li>
<button class="btn btn-remove" @click="removeHandlingThirdParty" :title="$t('remove_handling_thirdparty')"></button>
<button :title="$t('remove_handling_thirdparty')" class="btn btn-remove"
@click="removeHandlingThirdParty"></button>
</li>
</ul>
</div>
@ -167,7 +169,8 @@
<show-address :address="t.address"></show-address>
<ul class="record_actions">
<button class="btn btn-remove" @click="removeThirdParty(t)" :title="$t('remove_thirdparty')"></button>
<button :title="$t('remove_thirdparty')" class="btn btn-remove"
@click="removeThirdParty(t)"></button>
</ul>
</li>
</ul>
@ -176,18 +179,18 @@
<ul class="record_actions">
<li>
<add-persons
ref="thirdPartyPicker"
v-bind:key="thirdPartyPicker.key"
v-bind:buttonTitle="$t('add_thirdparties')"
v-bind:modalTitle="$t('choose_thirdparties')"
v-bind:key="thirdPartyPicker.key"
v-bind:options="thirdPartyPicker.options"
@addNewPersons="addThirdParties"
ref="thirdPartyPicker"> <!-- to cast child method -->
@addNewPersons="addThirdParties"> <!-- to cast child method -->
</add-persons>
</li>
</ul>
</div>
<div id="errors" v-if="errors.length > 0">
<div v-if="errors.length > 0" id="errors">
<p>{{ $t('fix_these_errors') }}</p>
<ul>
<li v-for="e in errors">{{ e }}</li>
@ -213,8 +216,8 @@
</template>
<script>
import { mapState, mapGetters, } from 'vuex';
import { dateToISO, ISOToDate, ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
import {mapState, mapGetters,} from 'vuex';
import {dateToISO, ISOToDate, ISOToDatetime} from 'ChillMainAssets/chill/js/date.js';
import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from 'ChillMainAssets/module/ckeditor5/index.js';
import AddResult from './components/AddResult.vue';
@ -252,7 +255,7 @@ const i18n = {
choose_thirdparties: "Choisir des tiers",
fix_these_errors: "Veuillez corriger les erreurs suivantes :",
}
}
}
};
export default {
@ -275,7 +278,7 @@ export default {
handlingThirdPartyPicker: {
key: 'handling-third-party',
options: {
type: [ 'thirdparty' ],
type: ['thirdparty'],
priority: null,
uniq: true,
button: {
@ -286,7 +289,7 @@ export default {
thirdPartyPicker: {
key: 'third-party',
options: {
type: [ 'thirdparty' ],
type: ['thirdparty'],
priority: null,
uniq: false,
button: {
@ -375,7 +378,7 @@ export default {
toggleAddEvaluation() {
this.showAddEvaluation = !this.showAddEvaluation;
},
setHandlingThirdParty({ selected, modal }) {
setHandlingThirdParty({selected, modal}) {
console.log('setHandlingThirdParty', selected);
this.$store.commit('setHandlingThirdParty', selected.shift().result);
this.$refs.handlingThirdPartyPicker.resetSearch();
@ -385,7 +388,7 @@ export default {
console.log('removeHandlingThirdParty');
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.$refs.thirdPartyPicker.resetSearch();
@ -434,21 +437,26 @@ export default {
.action_title_label {
margin-bottom: 0;
}
.action_title {
margin-top: 0;
font-weight: bold;
font-size: 1.5rem;
}
}
#startDate {
grid-area: startDate;
}
#endDate {
grid-area: endDate;
}
#comment {
grid-area: comment;
}
#objectives {
grid-area: objectives;
@ -528,6 +536,7 @@ export default {
}
}
#objectives, #evaluations {
padding: 0;
@ -540,22 +549,28 @@ export default {
}
}
}
#evaluations {
grid-area: evaluations;
& > div {
@include border-collapse;
padding: 1em;
}
}
#persons {
grid-area: persons;
}
#handlingThirdParty {
grid-area: handling;
}
#thirdParties {
grid-area: tparties;
}
#errors {
grid-area: errors;
}

View File

@ -1,18 +1,18 @@
<template>
affiche les évaluations
<div class="addEvaluation" v-if="hasEvaluation">
<div v-if="hasEvaluation" class="addEvaluation">
<p class="chill-no-data-statement" v-if="pickedEvaluations.length === 0">
<p v-if="pickedEvaluations.length === 0" class="chill-no-data-statement">
{{ $t('no_evaluation_associated') }}
</p>
<ul class="list-evaluations">
<li v-for="e in pickedEvaluations" @click="removeEvaluation(e)" class="badge bg-primary">
<li v-for="e in pickedEvaluations" class="badge bg-primary" @click="removeEvaluation(e)">
<i class="fa fa-times"></i>
{{ e.id }}
</li>
<template v-if="isExpanded">
<li v-for="e in availableForCheckEvaluations" @click="addEvaluation(e)" class="badge bg-primary">
<li v-for="e in availableForCheckEvaluations" class="badge bg-primary" @click="addEvaluation(e)">
<i class="fa fa-plus"></i>
{{ e.id }}
</li>
@ -26,7 +26,7 @@
</ul>
</div>
<div class="noEvaluation" v-if="!hasEvaluation">
<div v-if="!hasEvaluation" class="noEvaluation">
<div class="chill-no-data-statement">
{{ $t('evaluation_has_no_evaluation') }}
</div>

View File

@ -1,15 +1,15 @@
<template>
<div class="addResult" v-if="hasResult">
<p class="chill-no-data-statement" v-if="pickedResults.length ===0">
<div v-if="hasResult" class="addResult">
<p v-if="pickedResults.length ===0" class="chill-no-data-statement">
Aucun résultat associé
</p>
<ul class="list-results">
<li v-for="r in pickedResults" @click="removeResult(r)" class="badge bg-primary">
<li v-for="r in pickedResults" class="badge bg-primary" @click="removeResult(r)">
<i class="fa fa-times"></i>
{{ r.title.fr }}
</li>
<template v-if="isExpanded">
<li v-for="r in availableForCheckResults" @click="addResult(r)" class="badge bg-primary">
<li v-for="r in availableForCheckResults" class="badge bg-primary" @click="addResult(r)">
<i class="fa fa-plus"></i>
{{ r.title.fr }}
</li>
@ -17,19 +17,19 @@
</ul>
<ul class="record_actions">
<li v-if="isExpanded">
<button @click="toggleSelect" class="btn btn-hide" >
<button class="btn btn-hide" @click="toggleSelect">
<i class="fa fa-eye-slash"></i>
Masquer résultats et orientations disponibles
</button>
</li>
<li v-else>
<button @click="toggleSelect" class="btn btn-show">
<button class="btn btn-show" @click="toggleSelect">
Afficher résultats et orientations disponibles
</button>
</li>
</ul>
</div>
<div class="noResult" v-if="!hasResult">
<div v-if="!hasResult" class="noResult">
<div class="chill-no-data-statement">
{{ $t('goal_has_no_result') }}
</div>
@ -48,7 +48,7 @@ const i18n = {
export default {
name: "AddResult",
props: [ 'destination', 'goal', 'availableResults' ],
props: ['destination', 'goal', 'availableResults'],
i18n,
data() {
return {
@ -106,7 +106,7 @@ export default {
this.$store.commit('addResultPicked', r);
return;
} else if (this.destination === 'goal') {
this.$store.commit('addResultForGoalPicked', { goal: this.goal, result: r });
this.$store.commit('addResultForGoalPicked', {goal: this.goal, result: r});
return;
}
throw Error(`this.destination is not implemented: ${this.destination}`);
@ -117,7 +117,7 @@ export default {
this.$store.commit('removeResultPicked', r);
return;
} else if (this.destination === 'goal') {
this.$store.commit('removeResultForGoalPicked', { goal: this.goal, result: r });
this.$store.commit('removeResultForGoalPicked', {goal: this.goal, result: r});
return;
}
throw Error(`this.destination is not implemented: ${this.destination}`);

View File

@ -1,12 +1,12 @@
<template>
<div>
<div>
<h3>
{{ $t('evaluation_title') }}
</h3>
</div>
<pre>
</div>
<pre>
{{ $t('evaluation_status') }}
{{ $t('evaluation_choose_a_status') }}
{{ $t('evaluation_startdate') }}
@ -47,9 +47,7 @@ export default {
props: [],
i18n,
data() {
return {
}
return {}
},
computed: {},
methods: {}