social issue added to title

This commit is contained in:
Julie Lenaerts 2021-12-10 17:01:06 +01:00
parent 5ed7572f95
commit 536a1a46da
3 changed files with 32 additions and 8 deletions

View File

@ -170,12 +170,12 @@ export default {
personsPicked: {
get() {
let s = this.$store.state.personsPicked.map(p => p.id);
console.log('persons picked', s);
// console.log('persons picked', s);
return s;
},
set(v) {
console.log('persons picked', v);
// console.log('persons picked', v);
this.$store.commit('setPersonsPickedIds', v);
}
},

View File

@ -1,7 +1,13 @@
<template>
<div id="workEditor" class="my-4">
<div id="title" class="action-row">
<div>
<p class="wl-item social-issues">
<span class="chill-entity entity-social-issue">
<span class="badge bg-chill-l-gray text-dark">{{ work.socialAction.issue.text }}</span>
</span>
</p>
</div>
<h2 class="badge-title">
<span class="title_label">Action</span>
<span class="title_action">{{ work.socialAction.text }}</span>
@ -110,9 +116,9 @@
<button :title="$t('add_an_evaluation')" class="btn btn-create" @click="toggleAddEvaluation"></button>
</li>
</ul>
<div v-else>
<span class="chill-no-data-statement">{{ $t('no_evaluations_available') }}</span>
</div>
<div v-else>
<span class="chill-no-data-statement">{{ $t('no_evaluations_available') }}</span>
</div>
</div>
</div>
@ -186,8 +192,10 @@
>
<template v-slot:record-actions>
<ul class="record_actions">
<li><on-the-fly :type="thirdparty.type" :id="thirdparty.id" action="show"></on-the-fly></li>
<li><on-the-fly :type="thirdparty.type" :id="thirdparty.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly"></on-the-fly></li>
<li>
<button :title="$t('remove_thirdparty')" class="btn btn-remove" @click="removeThirdParty(thirdparty)" />
<button :title="$t('remove_thirdparty')" class="btn btn-sm btn-remove" @click="removeThirdParty(thirdparty)" />
</li>
</ul>
</template>
@ -258,6 +266,7 @@ import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue';
import ThirdPartyRenderBox from 'ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue';
import PickTemplate from 'ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue';
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue';
const i18n = {
messages: {
@ -307,6 +316,7 @@ export default {
ThirdPartyRenderBox,
PickTemplate,
ThirdPartyRenderBox,
OnTheFly
},
i18n,
data() {
@ -359,6 +369,7 @@ export default {
startDate: {
get() {
//console.log('get start date', this.$store.state.startDate);
console.log(this.work);
return dateToISO(this.$store.state.startDate);
},
set(v) {
@ -449,6 +460,18 @@ export default {
beforeGenerateTemplate() {
console.log('before generate');
return Promise.resolve();
},
saveFormOnTheFly(payload) {
console.log('saveFormOnTheFly: type', payload.type, ', data', payload.data);
payload.target = 'resource';
this.$store.dispatch('patchOnTheFly', payload)
.catch(({name, violations}) => {
if (name === 'ValidationException' || name === 'AccessException') {
violations.forEach((violation) => this.$toast.open({message: violation}));
} else {
this.$toast.open({message: 'An error occurred'})
}
});
}
}
};
@ -506,7 +529,7 @@ div#workEditor {
p {
margin-top: 0;
font-weight: bold;
font-size: 1.5rem;
font-size: 1rem;
}
}

View File

@ -39,6 +39,7 @@ class SocialActionNormalizer implements NormalizerAwareInterface, NormalizerInte
'parent' => $this->normalizer->normalize($socialAction->getParent(), $format, $context),
'desactivationDate' => $this->normalizer->normalize($socialAction->getDesactivationDate(), $format, $context),
'title' => $socialAction->getTitle(),
'issue' => $this->normalizer->normalize($socialAction->getIssue(), $format, $context),
];
case 'docgen':