hotfix (dashboard): display allow email contact in card box client

- Added the `allowEmailContact` property to the `CardBoxClient` component to display the email contact status.
- Added the `allowEmailContact` computed property to the `Person` model to determine if email contact is allowed based on the related datasets.
- Preloaded the datasets relation in the `AuthorsController` to access the pivot attributes.
- Updated the `Dashboard.vue` to pass the `allowEmailContact` prop to the `CardBoxClient` component.
- Updated the `array_contains_types` validation rule to correct the error message for descriptions.
- Updated the `FormCheckRadio.vue` to correctly handle the radio button and checkbox components.
This commit is contained in:
Kaimbacher 2025-03-31 15:14:34 +02:00
parent 09f65359f9
commit f89b119b18
6 changed files with 31 additions and 49 deletions

View file

@ -53,9 +53,9 @@ async function arrayContainsTypes(value: unknown, options: Options, field: Field
} else if (field.getFieldPath() === 'descriptions') {
// For descriptions we expect one abstracts description and minimum one translated description.
if (!hasTypeA && !hasTypeB) {
errorMessage = 'For descriptions, define one abstracts description and minimum one translated description.';
errorMessage = 'For descriptions, define one abstract description and minimum one translated description.';
} else if (!hasTypeA) {
errorMessage = 'For descriptions, define one abstracts description.';
errorMessage = 'For descriptions, define one abstract description.';
} else if (!hasTypeB) {
errorMessage = 'For descriptions, define minimum one translated description.';
}