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

[Demo] Fix error when viewing newly created deals in CRM demo #9733

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

erwanMarmelab
Copy link
Contributor

@erwanMarmelab erwanMarmelab commented Mar 19, 2024

Problem

In the CRM demo, there is an error on viewing a newly created deal.:

When you create a new deal. You didn't set se start_at value.
On the show page, we try to format this date.
When there is any value in the start_at column, we have an error.

Solution 1

Format conditionally this value

Solution 2

Add a start_at input tn the create form

Chosen solution : 2

@erwanMarmelab erwanMarmelab added the RFR Ready For Review label Mar 19, 2024
@fzaninotto
Copy link
Member

This is not the right fix. A new deal should have a date, so you'd better add a start_date input in the DealCreate form, under the company_id input.

                    <DateInput
                        source="start_at"
                        defaultValue={new Date()}
                        fullWidth
                    />

@fzaninotto fzaninotto changed the title [Fix] Fix CRM demo error [Demo] Fix error when viewing newly created deals in CRM demo Mar 26, 2024
@fzaninotto fzaninotto merged commit 1b52622 into master Mar 26, 2024
11 checks passed
@fzaninotto fzaninotto deleted the fix/demo-crm-error branch March 26, 2024 16:09
@fzaninotto fzaninotto added this to the 4.16.14 milestone Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants