Merge remote-tracking branch 'origin/master' into issue715_household_move_email

This commit is contained in:
2023-03-06 12:20:20 +01:00
84 changed files with 1810 additions and 540 deletions

View File

@@ -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>&nbsp;
<b>{{ accompanyingCourse.user.text }}</b>
<template v-if="accompanyingCourse.user.isAbsent">
&nbsp;
<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() {

View File

@@ -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",

View File

@@ -116,6 +116,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">
@@ -338,6 +339,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);

View File

@@ -360,7 +360,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) {

View File

@@ -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'],

View File

@@ -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>