feat: Create deal from contact - #337
Conversation
| if (!contact) return null; | ||
|
|
||
| return ( | ||
| <ListBase |
There was a problem hiding this comment.
Using the error and loading prop together with a RecordsIterator (https://marmelab.com/ra-core/recordsiterator/) as child you wouldn't even need a separate DealsIterator.
| <Link | ||
| to={`/deals/${deal.id}/show`} | ||
| className="flex flex-col -mx-1 px-1 py-1 rounded-sm hover:bg-muted transition-colors" | ||
| > | ||
| <span className="font-medium">{deal.name}</span> | ||
| <span className="text-xs text-muted-foreground"> | ||
| <SelectField | ||
| source="stage" | ||
| choices={dealStages} | ||
| optionText="label" | ||
| optionValue="value" | ||
| /> | ||
| {", "} | ||
| <NumberField | ||
| source="amount" | ||
| options={{ | ||
| notation: "compact", | ||
| style: "currency", | ||
| currency, | ||
| currencyDisplay: "narrowSymbol", | ||
| minimumSignificantDigits: 3, | ||
| }} | ||
| /> | ||
| </span> | ||
| </Link> |
There was a problem hiding this comment.
We already have something almost identical in ContactDealList. Why don't you refactor it into a common DealList placed under the deal directory instead?
|
You've somehow changed the font size of the items in the company deal list. Beware that the dealiterator probably has two display modes: "normal" for the company show page, and "small" for the contact sidebar. |
|
You probably also need to update |

Feature Idea
On a contact's detail page, it would be nice to have a button to create a deal linked to that person.
Solution
Add a
Create dealbutton an the contact's show pageAdditional Checks
[ ] The documentation is up to date