Add version of the social action to the state

put correct serialization groups
This commit is contained in:
Julie Lenaerts 2023-11-29 14:25:36 +01:00 committed by Julien Fastré
parent 09882bb4be
commit f00b39980c
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
3 changed files with 6 additions and 4 deletions

View File

@ -247,7 +247,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
/**
* @ORM\Column(type="integer", nullable=false, options={"default": 1})
*
* @Serializer\Groups({"read", "read:accompanyingPeriodWork:light", "read:evaluation:include-work"})
* @Serializer\Groups({"read", "accompanying_period_work:edit"})
*/
private int $version = 1;

View File

@ -297,7 +297,7 @@
@go-to-generate-workflow="goToGenerateWorkflow"
></list-workflow-modal>
</li>
<li>
<button v-if="AmIRefferer"
class="btn btn-notify"
@ -311,7 +311,7 @@
</ul>
</template>
</li>
<li v-if="!isPosting">
<button class="btn btn-save" @click="submit">
{{ $t('action.save') }}
@ -472,6 +472,7 @@ export default {
'errors',
'templatesAvailablesForAction',
'me',
'version'
]),
...mapGetters([
'hasResultsForAction',

View File

@ -35,7 +35,8 @@ const store = createStore({
referrers: window.accompanyingCourseWork.referrers,
isPosting: false,
errors: [],
me: null
me: null,
version: window.accompanyingCourseWork.version
},
getters: {
socialAction(state) {