Feat: On Company Show, I can create a person and add it to the company (#1256)

* On Company Show, I can create a person and add it to the company

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Add minor refactors

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
This commit is contained in:
gitstart-twenty
2023-08-25 21:21:57 +02:00
committed by GitHub
co-authored by v1b3m RubensRafael
parent 9027a7dd1e
commit c3d4767ac4
2 changed files with 73 additions and 7 deletions
@@ -10,6 +10,7 @@ export type OwnProps = {
personId: string | null;
onSubmit: (newPersonId: PersonForSelect | null) => void;
onCancel?: () => void;
onCreate?: () => void;
excludePersonIds?: string[];
};
@@ -21,6 +22,7 @@ export function PeoplePicker({
personId,
onSubmit,
onCancel,
onCreate,
excludePersonIds,
}: OwnProps) {
const [searchFilter] = useRecoilScopedState(
@@ -53,6 +55,7 @@ export function PeoplePicker({
<SingleEntitySelect
onEntitySelected={handleEntitySelected}
onCancel={onCancel}
onCreate={onCreate}
entities={{
loading: people.loading,
entitiesToSelect: people.entitiesToSelect,