[activity] fix loading of social action in edit mode

This commit is contained in:
Julien Fastré 2021-11-29 23:01:17 +01:00
parent 7b0c7988df
commit e99b14b870
3 changed files with 28 additions and 7 deletions

View File

@ -11,10 +11,17 @@ and this project adheres to
## Unreleased ## Unreleased
<!-- write down unreleased development here --> <!-- write down unreleased development here -->
* [household] do not allow to create two addresses on the same date
## Test releases ## Test releases
### Test release 2021-11-19 - bis
* [household] do not allow to create two addresses on the same date
* [activity] handle case when there is no social action associated to social issue
* [activity] layout for issues / actions
* [activity][bugfix] in edit mode, the form will now load the social action list
### Test release 2021-11-29 ### Test release 2021-11-29
* [person] suggest entities (person | thirdparty) when creating/editing the accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/119) * [person] suggest entities (person | thirdparty) when creating/editing the accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/119)

View File

@ -151,6 +151,7 @@ export default {
this.issueIsLoading = false; this.issueIsLoading = false;
this.actionAreLoaded = true; this.actionAreLoaded = true;
this.updateActionsList();
resolve(); resolve();
})); }));
}, },
@ -183,7 +184,6 @@ export default {
to get social actions concerned to get social actions concerned
*/ */
updateActionsList() { updateActionsList() {
//console.log('updateActionsList');
this.resetActionsList(); this.resetActionsList();
this.socialIssuesSelected.forEach(item => { this.socialIssuesSelected.forEach(item => {
@ -198,6 +198,7 @@ export default {
this.$store.commit('filterList', 'actions'); this.$store.commit('filterList', 'actions');
this.actionIsLoading = false; this.actionIsLoading = false;
this.actionAreLoaded = true;
resolve(); resolve();
})); }));
}, this); }, this);
@ -206,6 +207,7 @@ export default {
*/ */
resetActionsList() { resetActionsList() {
this.$store.commit('resetActionsList'); this.$store.commit('resetActionsList');
this.actionAreLoaded = false;
this.socialActionsSelected.forEach(item => { this.socialActionsSelected.forEach(item => {
this.$store.commit('addActionInList', item); this.$store.commit('addActionInList', item);
}, this); }, this);

View File

@ -10,7 +10,7 @@
v-bind:value="action" v-bind:value="action"
/> />
<label class="form-check-label" v-bind:for="action.id"> <label class="form-check-label" v-bind:for="action.id">
{{ action.text }} <span class="badge bg-light text-dark">{{ action.text }}</span>
</label> </label>
</div> </div>
@ -34,3 +34,15 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped>
@import 'ChillMainAssets/module/bootstrap/shared';
@import 'ChillPersonAssets/chill/scss/mixins';
@import 'ChillMainAssets/chill/scss/chill_variables';
span.badge {
@include badge_social($social-action-color);
font-size: 95%;
margin-bottom: 5px;
margin-right: 1em;
}
</style>