mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
complete previous commit (+dirty auto corrections from IDE)
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
|
||||
<div id="picking">
|
||||
<p>{{ $t('pick_social_issue_linked_with_action') }}</p>
|
||||
|
||||
|
||||
<div v-for="si in socialIssues">
|
||||
<input type="radio" v-bind:value="si.id" name="socialIssue" v-model="socialIssuePicked"> {{ si.title.fr }}
|
||||
</div>
|
||||
|
||||
<div v-if="hasSocialIssuePicked">
|
||||
<h2>{{ $t('pick_an_action') }}</h2>
|
||||
<h2>{{ $t('pick_an_action') }}</h2>
|
||||
<vue-multiselect
|
||||
v-model="socialActionPicked"
|
||||
label="text"
|
||||
@@ -22,7 +22,7 @@
|
||||
:close-on-select="true"
|
||||
:show-labels="true"
|
||||
track-by="id"
|
||||
></vue-multiselect>
|
||||
></vue-multiselect>
|
||||
</div>
|
||||
|
||||
<div v-if="isLoadingSocialActions">
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
#awc_create_form {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
grid-template-areas:
|
||||
"picking picking"
|
||||
"start_date end_date"
|
||||
"confirm confirm"
|
||||
@@ -123,7 +123,7 @@
|
||||
<script>
|
||||
import { mapState, mapActions, mapGetters } from 'vuex';
|
||||
import VueMultiselect from 'vue-multiselect';
|
||||
import { dateToISO, ISOToDate } from 'ChillMainAssets/js/date.js';
|
||||
import { dateToISO, ISOToDate } from 'ChillMainAssets/chill/js/date.js';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
|
||||
const i18n = {
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
return s;
|
||||
},
|
||||
set(v) {
|
||||
console.log('persons picked', v);
|
||||
console.log('persons picked', v);
|
||||
this.$store.commit('setPersonsPickedIds', v);
|
||||
}
|
||||
},
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
import { createStore } from 'vuex';
|
||||
import { datetimeToISO } from 'ChillMainAssets/js/date.js';
|
||||
import { datetimeToISO } from 'ChillMainAssets/chill/js/date.js';
|
||||
import { findSocialActionsBySocialIssue } from 'ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js';
|
||||
import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js';
|
||||
|
||||
@@ -143,7 +143,7 @@ const store = createStore({
|
||||
},
|
||||
submit({ commit, getters, state }) {
|
||||
console.log('submit');
|
||||
let
|
||||
let
|
||||
payload = getters.buildPayloadCreate,
|
||||
errors = [];
|
||||
|
||||
@@ -169,7 +169,7 @@ const store = createStore({
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
});
|
||||
|
||||
export { store };
|
||||
|
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div id="comment">
|
||||
<label>Commentaire</label>
|
||||
<ckeditor
|
||||
<ckeditor
|
||||
:editor="editor"
|
||||
v-model="note"
|
||||
tag-name="textarea"
|
||||
@@ -32,9 +32,9 @@
|
||||
{{ $t('results_without_objective') }}
|
||||
</div>
|
||||
<div>
|
||||
<add-result :availableResults="resultsForAction" destination="action"></add-result>
|
||||
<add-result :availableResults="resultsForAction" destination="action"></add-result>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- results which **are** attached to an objective -->
|
||||
<div v-for="g in goalsPicked">
|
||||
@@ -42,10 +42,10 @@
|
||||
<div @click="removeGoal(g)" class="objective-title">
|
||||
<i class="fa fa-times"></i>
|
||||
{{ g.goal.title.fr }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<add-result destination="goal" :goal="g.goal"></add-result>
|
||||
<add-result destination="goal" :goal="g.goal"></add-result>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<ul class="list-objectives">
|
||||
<li v-for="g in availableForCheckGoal" @click="addGoal(g)" class="badge bg-primary">
|
||||
<i class="fa fa-plus"></i>
|
||||
{{ g.title.fr }}
|
||||
{{ g.title.fr }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -163,7 +163,7 @@
|
||||
<p>Veuillez corriger les erreurs suivantes:</p>
|
||||
<ul>
|
||||
<li v-for="e in errors">{{ e }}</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
#workEditor {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
grid-template-areas:
|
||||
"title title"
|
||||
"startDate endDate"
|
||||
"comment comment"
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
grid-template-columns: 50%;
|
||||
column-gap: 1rem;
|
||||
|
||||
|
||||
#title {
|
||||
grid-area: title;
|
||||
|
||||
@@ -330,9 +330,9 @@
|
||||
<script>
|
||||
|
||||
import { mapState, mapGetters, } from 'vuex';
|
||||
import { dateToISO, ISOToDate, ISOToDatetime } from 'ChillMainAssets/js/date.js';
|
||||
import { dateToISO, ISOToDate, ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
|
||||
import CKEditor from '@ckeditor/ckeditor5-vue';
|
||||
import ClassicEditor from 'ChillMainAssets/modules/ckeditor5/index.js';
|
||||
import ClassicEditor from 'ChillMainAssets/module/ckeditor5/index.js';
|
||||
import AddResult from './components/AddResult.vue';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
||||
@@ -440,7 +440,7 @@ export default {
|
||||
return s;
|
||||
},
|
||||
set(v) {
|
||||
console.log('persons picked', v);
|
||||
console.log('persons picked', v);
|
||||
this.$store.commit('setPersonsPickedIds', v);
|
||||
}
|
||||
},
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { createStore } from 'vuex';
|
||||
import { datetimeToISO, ISOToDatetime } from 'ChillMainAssets/js/date.js';
|
||||
import { datetimeToISO, ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
|
||||
import { findSocialActionsBySocialIssue } from 'ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js';
|
||||
import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js';
|
||||
|
||||
@@ -42,7 +42,7 @@ const store = createStore({
|
||||
},
|
||||
resultsPickedForGoal: (state) => (goal) => {
|
||||
let found = state.goalsPicked.find(g => g.goal.id === goal.id);
|
||||
|
||||
|
||||
return found === undefined ? [] : found.results;
|
||||
},
|
||||
hasHandlingThirdParty(state) {
|
||||
|
@@ -48,10 +48,10 @@
|
||||
<p class="move_hint">{{ $t('household_members_editor.concerned.move_to') }}:</p>
|
||||
|
||||
<template
|
||||
v-for="position in positions"
|
||||
v-for="position in positions"
|
||||
>
|
||||
|
||||
<button
|
||||
<button
|
||||
class="btn btn-outline-primary"
|
||||
@click="moveToPosition(conc.person.id, position.id)"
|
||||
>
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
|
||||
<div v-if="needsPositionning" class="positions">
|
||||
<div
|
||||
<div
|
||||
v-for="position in positions"
|
||||
>
|
||||
<h3>{{ position.label.fr }}</h3>
|
||||
@@ -128,7 +128,7 @@ import { mapGetters } from 'vuex';
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
import MemberDetails from './MemberDetails.vue';
|
||||
import { ISOToDatetime } from 'ChillMainAssets/js/date.js';
|
||||
import { ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
|
||||
|
||||
export default {
|
||||
name: 'Concerned',
|
||||
|
@@ -75,7 +75,7 @@ div.participation-details {
|
||||
import { mapGetters } from 'vuex';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
import CKEditor from '@ckeditor/ckeditor5-vue';
|
||||
import ClassicEditor from 'ChillMainAssets/modules/ckeditor5/index.js';
|
||||
import ClassicEditor from 'ChillMainAssets/module/ckeditor5/index.js';
|
||||
|
||||
export default {
|
||||
name: 'MemberDetails',
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
toggleHolder() {
|
||||
this.$store.dispatch('toggleHolder', this.conc);
|
||||
this.$store.dispatch('toggleHolder', this.conc);
|
||||
},
|
||||
removePosition() {
|
||||
this.$store.dispatch('removePosition', this.conc);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { createStore } from 'vuex';
|
||||
import { householdMove, fetchHouseholdSuggestionByAccompanyingPeriod } from './../api.js';
|
||||
import { datetimeToISO } from 'ChillMainAssets/js/date.js';
|
||||
import { datetimeToISO } from 'ChillMainAssets/chill/js/date.js';
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production';
|
||||
|
||||
@@ -72,7 +72,7 @@ const store = createStore({
|
||||
return getters.needsPositionning === false
|
||||
|| (getters.persons.length > 0 && getters.concUnpositionned.length === 0);
|
||||
},
|
||||
persons(state) {
|
||||
persons(state) {
|
||||
return state.concerned.map(conc => conc.person);
|
||||
},
|
||||
concUnpositionned(state) {
|
||||
@@ -85,7 +85,7 @@ const store = createStore({
|
||||
},
|
||||
personByPosition: (state) => (position_id) => {
|
||||
return state.concerned
|
||||
.filter(conc =>
|
||||
.filter(conc =>
|
||||
conc.position !== null ? conc.position.id === position_id : false
|
||||
)
|
||||
.map(conc => conc.person)
|
||||
@@ -93,7 +93,7 @@ const store = createStore({
|
||||
},
|
||||
concByPosition: (state) => (position_id) => {
|
||||
return state.concerned
|
||||
.filter(conc =>
|
||||
.filter(conc =>
|
||||
conc.position !== null ? conc.position.id === position_id : false
|
||||
)
|
||||
;
|
||||
@@ -117,7 +117,7 @@ const store = createStore({
|
||||
;
|
||||
|
||||
if (state.forceLeaveWithoutHousehold === false) {
|
||||
payload.destination = {
|
||||
payload.destination = {
|
||||
id: state.household.id,
|
||||
type: state.household.type
|
||||
};
|
||||
@@ -154,9 +154,9 @@ const store = createStore({
|
||||
addConcerned(state, person) {
|
||||
let persons = state.concerned.map(conc => conc.person.id);
|
||||
if (!persons.includes(person.id)) {
|
||||
state.concerned.push({
|
||||
state.concerned.push({
|
||||
person,
|
||||
position: null,
|
||||
position: null,
|
||||
allowRemove: true,
|
||||
holder: false,
|
||||
comment: "",
|
||||
@@ -182,7 +182,7 @@ const store = createStore({
|
||||
conc.position = null;
|
||||
},
|
||||
removeConcerned(state, conc) {
|
||||
state.concerned = state.concerned.filter(c =>
|
||||
state.concerned = state.concerned.filter(c =>
|
||||
c.person.id !== conc.person.id
|
||||
)
|
||||
},
|
||||
@@ -309,7 +309,7 @@ const store = createStore({
|
||||
error = household;
|
||||
for (let i in error.violations) {
|
||||
let e = error.violations[i];
|
||||
errors.push(e.title);
|
||||
errors.push(e.title);
|
||||
}
|
||||
|
||||
commit('setErrors', errors);
|
||||
|
Reference in New Issue
Block a user