mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
Merge remote-tracking branch 'origin/master' into issue714_eval_time_spent
This commit is contained in:
@@ -20,9 +20,6 @@ div.accompanying-course-work {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
td {
|
||||
font-size: 85%;
|
||||
}
|
||||
td.obj,
|
||||
td.res {
|
||||
width: 50%;
|
||||
@@ -37,6 +34,10 @@ div.accompanying-course-work {
|
||||
}
|
||||
}
|
||||
|
||||
.smallfont table.obj-res-eval {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
ul {
|
||||
&.goal_title,
|
||||
&.result_list,
|
||||
|
@@ -22,7 +22,12 @@
|
||||
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i>
|
||||
</span>
|
||||
<span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
|
||||
<span class="item-key">{{ $t('course.referrer') }}:</span> <b>{{ accompanyingCourse.user.text }}</b>
|
||||
<span class="item-key">{{ $t('course.referrer') }}:</span>
|
||||
<b>{{ accompanyingCourse.user.text }}</b>
|
||||
<template v-if="accompanyingCourse.user.isAbsent">
|
||||
|
||||
<span class="badge bg-danger rounded-pill" title="Absent">A</span>
|
||||
</template>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
@@ -59,13 +64,15 @@
|
||||
import ToggleFlags from './Banner/ToggleFlags';
|
||||
import SocialIssue from './Banner/SocialIssue.vue';
|
||||
import PersonsAssociated from './Banner/PersonsAssociated.vue';
|
||||
import UserRenderBoxBadge from 'ChillMainAssets/vuejs/_components/Entity/UserRenderBoxBadge.vue';
|
||||
|
||||
export default {
|
||||
name: 'Banner',
|
||||
components: {
|
||||
ToggleFlags,
|
||||
SocialIssue,
|
||||
PersonsAssociated
|
||||
PersonsAssociated,
|
||||
UserRenderBoxBadge,
|
||||
},
|
||||
computed: {
|
||||
accompanyingCourse() {
|
||||
|
@@ -2,6 +2,29 @@
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-80"></a>{{ $t('referrer.title') }}</h2>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal"
|
||||
:modalDialogClass="modal.modalDialogClass"
|
||||
@close="cancelChange">
|
||||
<template v-slot:header>
|
||||
<h3 class="modal-title">{{ $t('confirm.title') }}</h3>
|
||||
</template>
|
||||
|
||||
<template v-slot:body-head>
|
||||
<div class="modal-body">
|
||||
<p v-html="$t('confirm.sure_referrer', { referrer: this.value.text })"></p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-save"
|
||||
@click.prevent="this.confirmReferrer">
|
||||
{{ $t('confirm.ok_referrer')}}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
|
||||
<div>
|
||||
|
||||
<label class="col-form-label" for="selectJob">
|
||||
@@ -35,6 +58,8 @@
|
||||
:searchable="true"
|
||||
:placeholder="$t('referrer.placeholder')"
|
||||
v-model="value"
|
||||
@select="updateReferrer"
|
||||
@remove="removeReferrer"
|
||||
:options="users"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
@@ -78,16 +103,24 @@ import VueMultiselect from 'vue-multiselect';
|
||||
import {makeFetch} from 'ChillMainAssets/lib/api/apiMethods';
|
||||
import {mapState, mapGetters} from 'vuex';
|
||||
import UserRenderBoxBadge from "ChillMainAssets/vuejs/_components/Entity/UserRenderBoxBadge";
|
||||
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
|
||||
|
||||
export default {
|
||||
name: "Referrer",
|
||||
components: {
|
||||
UserRenderBoxBadge,
|
||||
VueMultiselect,
|
||||
Modal
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
jobs: []
|
||||
jobs: [],
|
||||
modal: {
|
||||
showModal: false,
|
||||
modalDialogClass: "modal-dialog-scrollable modal-xl"
|
||||
},
|
||||
value: this.$store.state.accompanyingCourse.user,
|
||||
confirmed: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -118,22 +151,6 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
value: {
|
||||
get() {
|
||||
return this.$store.state.accompanyingCourse.user;
|
||||
},
|
||||
set(value) {
|
||||
console.log('set referrer', value);
|
||||
this.$store.dispatch('updateReferrer', value)
|
||||
.catch(({name, violations}) => {
|
||||
if (name === 'ValidationException' || name === 'AccessException') {
|
||||
violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getJobs();
|
||||
@@ -141,6 +158,7 @@ export default {
|
||||
methods: {
|
||||
updateReferrer(value) {
|
||||
this.value = value;
|
||||
this.toggleModal();
|
||||
},
|
||||
getJobs() {
|
||||
const url = '/api/1.0/main/user-job.json';
|
||||
@@ -159,12 +177,38 @@ export default {
|
||||
const url = `/api/1.0/main/whoami.json`;
|
||||
makeFetch('GET', url)
|
||||
.then(user => {
|
||||
this.value = user
|
||||
// this.value = user
|
||||
this.updateReferrer(user);
|
||||
})
|
||||
/*.catch((error) => {
|
||||
commit('catchError', error);
|
||||
this.$toast.open({message: error.body})
|
||||
})*/
|
||||
},
|
||||
toggleModal() {
|
||||
this.modal.showModal = !this.modal.showModal;
|
||||
},
|
||||
confirmReferrer() {
|
||||
this.$store.dispatch('updateReferrer', this.value)
|
||||
.catch(({name, violations}) => {
|
||||
if (name === 'ValidationException' || name === 'AccessException') {
|
||||
violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'})
|
||||
}
|
||||
});
|
||||
this.toggleModal()
|
||||
},
|
||||
removeReferrer() {
|
||||
console.log('remove option')
|
||||
this.$store.dispatch('updateReferrer', null)
|
||||
.catch(({name, violations}) => {
|
||||
if (name === 'ValidationException' || name === 'AccessException') {
|
||||
violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'})
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelChange() {
|
||||
this.value = this.$store.state.accompanyingCourse.user
|
||||
this.toggleModal()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -178,7 +178,7 @@ export default {
|
||||
body.civility = {type: 'chill_main_civility', id: payload.data.civility.id};
|
||||
}
|
||||
if (null !== payload.data.profession) {
|
||||
body.profession = {type: 'third_party_profession', id: payload.data.profession.id};
|
||||
body.profession = payload.data.profession;
|
||||
}
|
||||
// console.log('body', body);
|
||||
|
||||
|
@@ -29,7 +29,8 @@ const appMessages = {
|
||||
emergency: "urgent",
|
||||
confidential: "confidentiel",
|
||||
regular: "régulier",
|
||||
occasional: "ponctuel"
|
||||
occasional: "ponctuel",
|
||||
absent: "Absent",
|
||||
},
|
||||
origin: {
|
||||
title: "Origine de la demande",
|
||||
@@ -138,8 +139,10 @@ const appMessages = {
|
||||
set_a_scope: "indiquez au moins un service",
|
||||
sure: "Êtes-vous sûr ?",
|
||||
sure_description: "Une fois le changement confirmé, il ne sera plus possible de le remettre à l'état de brouillon !",
|
||||
sure_referrer: "Êtes-vous sûr de vouloir assigner ce parcours à <b>{referrer}</b>",
|
||||
ok: "Confirmer le parcours",
|
||||
delete: "Supprimer le parcours",
|
||||
ok_referrer: "Confirmer le référent",
|
||||
no_suggested_referrer: "Il n'y a aucun référent qui puisse être suggéré pour ce parcours. Vérifiez la localisation du parcours, les métiers et service indiqués. Si les données sont correctes, vous pouvez confirmer ce parcours.",
|
||||
one_suggested_referrer: "Un unique référent peut être suggéré pour ce parcours",
|
||||
choose_suggested_referrer: "Voulez-vous le désigner directement ?",
|
||||
|
@@ -130,6 +130,7 @@
|
||||
:filename="d.title"
|
||||
:can-edit="true"
|
||||
:execute-before-leave="submitBeforeLeaveToEditor"
|
||||
@on-stored-object-status-change="onStatusDocumentChanged"
|
||||
></document-action-buttons-group>
|
||||
</li>
|
||||
<li v-if="d.workflows.length === 0">
|
||||
@@ -374,6 +375,10 @@ export default {
|
||||
this.$store.commit('removeDocument', {key: this.evaluation.key, document: document});
|
||||
}
|
||||
},
|
||||
onStatusDocumentChanged(newStatus) {
|
||||
console.log('onStatusDocumentChanged', newStatus);
|
||||
this.$store.commit('statusDocumentChanged', {key: this.evaluation.key, newStatus: newStatus});
|
||||
},
|
||||
goToGenerateWorkflowEvaluationDocument({event, link, workflowName, payload}) {
|
||||
const callback = (data) => {
|
||||
let evaluation = data.accompanyingPeriodWorkEvaluations.find(e => e.key === this.evaluation.key);
|
||||
|
@@ -367,7 +367,22 @@ const store = createStore({
|
||||
state.evaluationsPicked.find(e => e.key === payload.evaluationKey)
|
||||
.documents.find(d => d.id === payload.id).title = payload.title;
|
||||
}
|
||||
}
|
||||
},
|
||||
statusDocumentChanged(state, {newStatus, key}) {
|
||||
const e = state.evaluationsPicked.find(e => e.key === key);
|
||||
if (typeof e === 'undefined') {
|
||||
console.error('evaluation not found for given key', {key});
|
||||
}
|
||||
|
||||
const doc = e.documents.find(d => d.storedObject?.id === newStatus.id);
|
||||
if (typeof doc === 'undefined') {
|
||||
console.error('document not found', {newStatus});
|
||||
}
|
||||
|
||||
doc.storedObject.status = newStatus.status;
|
||||
doc.storedObject.type = newStatus.type;
|
||||
doc.storedObject.filename = newStatus.filename;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
updateThirdParty({ commit }, payload) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="container tpartycontainer">
|
||||
<div class="tparty-identification">
|
||||
<span v-if="item.result.profession" class="profession">{{ item.result.profession.name.fr }}</span>
|
||||
<span v-if="item.result.profession" class="profession">{{ item.result.profession }}</span>
|
||||
<span class="name">
|
||||
{{ item.result.text }}
|
||||
</span>
|
||||
|
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div class="container usercontainer">
|
||||
<div class="user-identification">
|
||||
<span class="name">
|
||||
{{ item.result.text }}
|
||||
</span>
|
||||
<user-render-box-badge :user="item.result"></user-render-box-badge>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
@@ -16,10 +14,12 @@
|
||||
|
||||
<script>
|
||||
import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
|
||||
import UserRenderBoxBadge from 'ChillMainAssets/vuejs/_components/Entity/UserRenderBoxBadge.vue';
|
||||
|
||||
export default {
|
||||
name: 'SuggestionUser',
|
||||
components: {
|
||||
UserRenderBoxBadge,
|
||||
BadgeEntity
|
||||
},
|
||||
props: ['item'],
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# - itemBlocClass: [uniq|colored|extended]
|
||||
# - displayContent: [short|long] default: short
|
||||
# - displayAction: [true|false] default: false
|
||||
# - displayFontSmall: [true|false] default: false
|
||||
#}
|
||||
<div class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
|
||||
@@ -83,7 +84,7 @@
|
||||
{%- if w.referrers|length > 0 -%}
|
||||
{% for u in w.referrers %}
|
||||
<span class="wl-item">
|
||||
{{ u|chill_entity_render_box }}
|
||||
<span class="badge-user">{{ u|chill_entity_render_box }}</span>
|
||||
{% if not loop.last %}, {% endif %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
@@ -110,7 +111,7 @@
|
||||
</div>
|
||||
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row column">
|
||||
<div class="item-row column{% if displayFontSmall is defined and displayFontSmall == true %} smallfont{% endif %}">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent
|
||||
} %}
|
||||
|
@@ -130,27 +130,20 @@
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
|
||||
<div class="download mb-4 container">
|
||||
{% if e.documents|length > 0 %}
|
||||
|
||||
{% if e.documents|length > 0 %}
|
||||
<table class="table mt-4 mx-auto">
|
||||
{% for d in e.documents %}
|
||||
<div class="row">
|
||||
<div class="col text-start">
|
||||
{{ d.title }}
|
||||
</div>
|
||||
<div class="col-md-auto text-center">
|
||||
{{ mm.mimeIcon(d.storedObject.type) }}
|
||||
</div>
|
||||
<div class="col col-lg-4 text-end">
|
||||
{{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }}
|
||||
</div>
|
||||
</div>
|
||||
<tr class="border-0">
|
||||
<td class="border-0">{{ d.title }}</td>
|
||||
<td class="border-0">{{ mm.mimeIcon(d.storedObject.type) }}</td>
|
||||
<td class="border-0 text-end">{{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</table>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@@ -25,6 +25,7 @@
|
||||
{% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with {
|
||||
'displayAction': true,
|
||||
'displayContent': 'short',
|
||||
'displayFontSmall': true,
|
||||
'itemBlocClass': ''
|
||||
} %}
|
||||
{% endfor %}
|
||||
|
@@ -33,8 +33,10 @@
|
||||
<span class="item-key">{{ 'Referrers'|trans ~ ' : ' }}</span>
|
||||
{% for u in w.referrers %}
|
||||
<span class="badge-user">{{ u|chill_entity_render_box }}</span>
|
||||
{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
{% if w.referrers|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="associated-persons">
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#}{{ period.user.label }},
|
||||
|
||||
L'usager {{ oldPersonLocation|chill_entity_render_string }} a déménagé.
|
||||
{{ app.user|chill_entity_render_string }} a enregistré ce déménagement.
|
||||
|
||||
Son adresse était utilisée pour localiser le parcours n°{{ period.id }}, dont vous êtes
|
||||
le référent.
|
||||
|
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
<div class="user">
|
||||
{{ acp.user|chill_entity_render_box }}
|
||||
<span class="badge-user">{{ acp.user|chill_entity_render_box }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -21,7 +21,7 @@
|
||||
</h2>
|
||||
</div>
|
||||
<div class="item-row column">
|
||||
<table class="obj-res-eval my-3" style="font-size: 110% !important;">
|
||||
<table class="obj-res-eval my-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="eval">
|
||||
|
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row column">
|
||||
<table class="obj-res-eval my-3" style="font-size: 110% !important;">
|
||||
<table class="obj-res-eval my-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="eval">
|
||||
|
@@ -17,9 +17,13 @@
|
||||
|
||||
<div class="list-group vertical-menu {{ 'menu-' ~ menus.name }}">
|
||||
{% for menu in menus %}
|
||||
<a class="list-group-item list-group-item-action"
|
||||
|
||||
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
|
||||
href="{{ menu.uri }}">
|
||||
{{ menu.label|upper }}
|
||||
{% if menu.extras.counter is defined and menu.extras.counter is not null %}
|
||||
<span class="badge rounded-pill bg-secondary notification-counter">{{ menu.extras.counter }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user