Skip to content

Commit 817cde6

Browse files
fix: use phoneNumber for socialLink in application
1 parent 870c859 commit 817cde6

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

app/components/new-join-steps/base-step.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default class BaseStepComponent extends Component {
4242
funFact: app.intro?.funFact || '',
4343
}),
4444
newStepFourData: (app) => ({
45-
phoneNo: app.socialLink?.phoneNo || '',
45+
phoneNumber: app.socialLink?.phoneNumber || '',
4646
twitter: app.socialLink?.twitter || '',
4747
linkedin: app.socialLink?.linkedin || '',
4848
instagram: app.socialLink?.instagram || '',

app/components/new-join-steps/new-step-four.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66

77
<Reusables::InputBox
88
@field="Phone Number"
9-
@name="phoneNo"
9+
@name="phoneNumber"
1010
@placeHolder="+91 80000 00000"
1111
@type="tel"
1212
@required={{true}}
13-
@value={{this.data.phoneNo}}
13+
@value={{this.data.phoneNumber}}
1414
@onInput={{this.inputHandler}}
1515
@variant="input--full-width"
1616
/>
17-
{{#if this.errorMessage.phoneNo}}
18-
<div class="error__message">{{this.errorMessage.phoneNo}}</div>
17+
{{#if this.errorMessage.phoneNumber}}
18+
<div class="error__message">{{this.errorMessage.phoneNumber}}</div>
1919
{{/if}}
2020

2121
<Reusables::InputBox

app/components/new-join-steps/new-step-four.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default class NewStepFourComponent extends BaseStepComponent {
1111
}
1212

1313
stepValidation = {
14-
phoneNo: NEW_STEP_LIMITS.stepFour.phoneNo,
14+
phoneNumber: NEW_STEP_LIMITS.stepFour.phoneNumber,
1515
twitter: NEW_STEP_LIMITS.stepFour.twitter,
1616
linkedin: NEW_STEP_LIMITS.stepFour.linkedin,
1717
instagram: NEW_STEP_LIMITS.stepFour.instagram,
@@ -61,7 +61,7 @@ export default class NewStepFourComponent extends BaseStepComponent {
6161
}
6262

6363
validateField(field, value) {
64-
if (field === 'phoneNo') {
64+
if (field === 'phoneNumber') {
6565
const trimmedValue = value?.trim() || '';
6666
const isValid = trimmedValue && phoneNumberRegex.test(trimmedValue);
6767
return {
@@ -73,7 +73,7 @@ export default class NewStepFourComponent extends BaseStepComponent {
7373
}
7474

7575
formatError(field, result) {
76-
if (field === 'phoneNo') {
76+
if (field === 'phoneNumber') {
7777
if (result.isValid) return '';
7878
return 'Please enter a valid phone number (e.g., +91 80000 00000)';
7979
}

app/constants/applications.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const mapSocialUrls = {
2424
};
2525

2626
export const socialFields = [
27-
'phoneNo',
27+
'phoneNumber',
2828
'twitter',
2929
'linkedin',
3030
'instagram',

app/constants/new-join-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const NEW_STEP_LIMITS = {
5252
funFact: { min: 100, max: 500 },
5353
},
5454
stepFour: {
55-
phoneNo: { min: 1 },
55+
phoneNumber: { min: 1 },
5656
twitter: { min: 1 },
5757
github: { min: 1 },
5858
linkedin: { min: 1 },

tests/constants/application-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const NEW_STEPS_APPLICATIONS_DATA = {
8686
'I built my first website at age 12 and have been coding ever since.',
8787
},
8888
stepFour: {
89-
phoneNo: '+1-699-969-6969',
89+
phoneNumber: '+1-699-969-6969',
9090
twitter: 'anujchhikara',
9191
github: 'anujchhikara',
9292
linkedin: 'anujchhikara',

0 commit comments

Comments
 (0)