Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Minor] Ajouter un champ description sur les personnes #183

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/src/resources/Agent/Actor/Person/PersonEdit.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { ImageField, TabbedForm, TextInput, FormTab, AutocompleteInput, SelectInput } from 'react-admin';
import { ReferenceInput } from '@semapps/input-components';
import { MarkdownInput } from '@semapps/markdown-components';
import { ImageInput } from '@semapps/input-components';
import { ActivitiesInput, LocationInput, SkillsInput, ThemesInput } from '../../../../common/input';
import Edit from "../../../../layout/edit/Edit";
Expand All @@ -17,6 +18,7 @@ export const PersonEdit = props => (
<TextInput source="pair:firstName" fullWidth />
<TextInput source="pair:lastName" fullWidth />
<TextInput source="pair:comment" fullWidth />
<MarkdownInput source="pair:description" fullWidth />
<LocationInput source="pair:hasLocation" fullWidth />
<ImageInput source="image" accept="image/*">
<ImageField source="src" />
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/resources/Agent/Actor/Person/PersonShow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Grid, Box } from '@mui/material';
import { QuickAppendReferenceArrayField, ReferenceField, AvatarWithLabelField } from '@semapps/field-components';
import { ChipList, GridList } from '@semapps/list-components';
import { MapField } from '@semapps/geo-components';
import { MarkdownField } from '../../../../common/field';
import { Hero, MainList, SideList } from '../../../../common/list';
import Show from "../../../../layout/show/Show";
import RightLabel from '../../../../common/list/SideList/RightLabel';
Expand All @@ -29,6 +30,7 @@ const PersonShow = props => (
<TextField source="pair:comment" />
</Hero>
<MainList>
<MarkdownField source="pair:description" />
<MapField
source="pair:hasLocation"
address={record => record['pair:hasLocation'] && record['pair:hasLocation']['pair:label']}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/resources/Agent/Actor/Person/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const resource = {
'pair:firstName': 'Prénom',
'pair:lastName': 'Nom de famille',
'pair:comment': 'En deux mots',
'pair:description': 'Description',
image: 'Photo',
'pair:involvedIn': 'Impliqué dans',
'pair:affiliatedBy': 'Membre de',
Expand Down