I'm trying to save a user's full record, but I depend on two separate tables. Profile data is saved in one resource, and the address in another. How can I write the code so that it saves the profile first, and from the generated id, save the address? It's possible?
Here is my Create User code:
export const BarberCreate = (props) => {
return (
<Create {...props}>
<TabbedForm toolbar={<BarberCreateToolbar />}>
<FormTab label="Perfil">
<TextInput source="name" />
<TextInput source="email" />
<DateInput source="birthday" />
<TextInput source="phone" placeholder="(99) 99999-9999" />
<TextInput source="transport" />
</FormTab>
<FormTab label="Endereço">
<TextInput source="street" label="Rua" />
<TextInput source="city" label="Cidade" />
<TextInput source="district" label="Bairro" />
</FormTab>
</TabbedForm>
</Create>
);
};```