Feature/edit name from show page (#806)

* Enable company name edition from page

* Enable editing persons as well

* Add styling for titles

* Better manage style with inheritance

* Add stories for poeple editable fields

* Remove failing test

* Revert "Remove failing test"

This reverts commit 02cdeeba64276a26f93cf4af94f5857e47d36fff.

* Fix test

* Update name

* Fix location

* Rename tests

* Fix stories
This commit is contained in:
Emilien Chauvet
2023-07-21 15:44:42 -07:00
committed by GitHub
parent 73e9104b16
commit 725a46adfa
10 changed files with 251 additions and 7 deletions

View File

@ -17,6 +17,8 @@ import { ShowPageSummaryCard } from '@/ui/layout/show-page/components/ShowPageSu
import { CommentableType } from '~/generated/graphql';
import { getLogoUrlFromDomainName } from '~/utils';
import { CompanyNameEditableField } from '../../modules/companies/editable-field/components/CompanyNameEditableField';
export function CompanyShow() {
const companyId = useParams().companyId ?? '';
@ -39,6 +41,9 @@ export function CompanyShow() {
logoOrAvatar={getLogoUrlFromDomainName(company?.domainName ?? '')}
title={company?.name ?? 'No name'}
date={company?.createdAt ?? ''}
renderTitleEditComponent={() => (
<CompanyNameEditableField company={company} />
)}
/>
<PropertyBox extraPadding={true}>
<CompanyDomainNameEditableField company={company} />