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

Fix address payload #1820

Merged
merged 3 commits into from
May 2, 2024
Merged

Fix address payload #1820

merged 3 commits into from
May 2, 2024

Conversation

@@ -50,7 +44,6 @@ export const formatFormData = (
export const disableBtn = (values, errors, submitting) => {
if (
errors.name ||
errors.phone ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relevant to this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this bug

Copy link
Contributor

@nisusam nisusam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still pointing to ruby 3.2.2.
Please rebase with develop once

Copy link
Contributor

@prasanthchaduvula prasanthchaduvula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Small suggestions

);
// eslint-disable-next-line no-nested-ternary
const addressIndex = isNewForm
? 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const addressIndex = isNewForm ? 0 : client.address?.id ?? 0;

"client[addresses_attributes[0][country]]",
values.country?.value
);
if (!isNewForm && client.address && client.address.id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!isNewForm && client?.address?.id) {
    formData.append(`${addressPrefix}[id]`, client.address.id);
}

@apoorv1316 apoorv1316 merged commit 7f63ebe into develop May 2, 2024
1 check passed
@apoorv1316 apoorv1316 deleted the fix-address-payload branch May 2, 2024 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants