mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-09 14:59:43 +00:00
Use an object (instead of string) for dynamic classList in SocialIssuesAcc.vue component
This commit is contained in:
6
.changes/unreleased/Fixed-20251008-113621.yaml
Normal file
6
.changes/unreleased/Fixed-20251008-113621.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: Fix loading of social issues and social actions within vue component
|
||||||
|
time: 2025-10-08T11:36:21.158819835+02:00
|
||||||
|
custom:
|
||||||
|
Issue: ""
|
||||||
|
SchemaChange: No schema change
|
@@ -136,8 +136,14 @@ export default {
|
|||||||
issueIsLoading: false,
|
issueIsLoading: false,
|
||||||
actionIsLoading: false,
|
actionIsLoading: false,
|
||||||
actionAreLoaded: false,
|
actionAreLoaded: false,
|
||||||
socialIssuesClassList: 'col-form-label',
|
socialIssuesClassList: {
|
||||||
socialActionsClassList: 'col-form-label',
|
"col-form-label": true,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
socialActionsClassList: {
|
||||||
|
"col-form-label": true,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -159,14 +165,18 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
/* Load classNames after element is present */
|
/* Load classNames after element is present */
|
||||||
const socialActionsEl = document.querySelector("input#chill_activitybundle_activity_socialActions");
|
const socialActionsEl = document.querySelector(
|
||||||
|
"input#chill_activitybundle_activity_socialActions",
|
||||||
|
);
|
||||||
if (socialActionsEl && socialActionsEl.hasAttribute("required")) {
|
if (socialActionsEl && socialActionsEl.hasAttribute("required")) {
|
||||||
this.socialActionsClassList += ' required';
|
this.socialActionsClassList.required = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const socialIssuessEl = document.querySelector("input#chill_activitybundle_activity_socialIssues");
|
const socialIssuesEl = document.querySelector(
|
||||||
if (socialIssuessEl && socialIssuessEl.hasAttribute("required")) {
|
"input#chill_activitybundle_activity_socialIssues",
|
||||||
this.socialIssuesClassList += ' required';
|
);
|
||||||
|
if (socialIssuesEl && socialIssuesEl.hasAttribute("required")) {
|
||||||
|
this.socialIssuesClassList.required = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load other issues in multiselect */
|
/* Load other issues in multiselect */
|
||||||
|
Reference in New Issue
Block a user