From 943c7e0ec3f81752bb7c1bdcfeb2279f39c9b8d4 Mon Sep 17 00:00:00 2001 From: Mayank Bansal Date: Thu, 26 Feb 2026 03:35:03 +0530 Subject: [PATCH 1/4] fix: add status card for request changes --- app/components/join-steps/status-card.hbs | 26 +++++++++++++++++++++++ app/components/join-steps/status-card.js | 22 ++++++++++++++++++- app/constants/join.js | 1 + app/controllers/join.js | 2 ++ 4 files changed, 50 insertions(+), 1 deletion(-) diff --git a/app/components/join-steps/status-card.hbs b/app/components/join-steps/status-card.hbs index 9970dfb5c..384e72b07 100644 --- a/app/components/join-steps/status-card.hbs +++ b/app/components/join-steps/status-card.hbs @@ -60,6 +60,32 @@ {{/if}}

You're almost there! Join our Discord server to connect with the team.

+ {{else if + (eq this.status this.APPLICATION_STATUS_TYPES.changes_requested) + }} +

+ Admin has requested some changes on your application. +

+ + {{#if this.feedback}} +
+

Feedback:

+

{{this.feedback}}

+
+ {{/if}} + +

+ Please review the feedback and update your application accordingly. +

+ + {{/if}} diff --git a/app/components/join-steps/status-card.js b/app/components/join-steps/status-card.js index 54aee57f9..55c1a6836 100644 --- a/app/components/join-steps/status-card.js +++ b/app/components/join-steps/status-card.js @@ -35,6 +35,11 @@ export default class StatusCardComponent extends Component { heading: 'Accepted', icon: 'square-check', }, + { + status: APPLICATION_STATUS_TYPES.changes_requested, + heading: 'Changes Requested', + icon: 'edit', + }, ]; constructor() { @@ -51,7 +56,11 @@ export default class StatusCardComponent extends Component { } get feedback() { - return this.args.feedback || this.fetchedFeedback; + const lastMessage = this.args.feedback || this.fetchedFeedback; + if (Array.isArray(lastMessage)) { + return lastMessage[lastMessage.length - 1].feedback; + } + return lastMessage; } get currentStatusDetails() { @@ -101,6 +110,17 @@ export default class StatusCardComponent extends Component { this.toast.error('Error in copying to clipboard', 'Error!', TOAST_OPTIONS); } + @action + editApplication() { + this.router.transitionTo('join', { + queryParams: { + edit: true, + dev: true, + step: 1, + }, + }); + } + @action trackApplication() { if (this.applicationId) { diff --git a/app/constants/join.js b/app/constants/join.js index e573c74d0..33428b6ef 100644 --- a/app/constants/join.js +++ b/app/constants/join.js @@ -25,4 +25,5 @@ export const APPLICATION_STATUS_TYPES = { accepted: 'accepted', rejected: 'rejected', pending: 'pending', + changes_requested: 'changes_requested', }; diff --git a/app/controllers/join.js b/app/controllers/join.js index 6125cbd9c..2b09b959b 100644 --- a/app/controllers/join.js +++ b/app/controllers/join.js @@ -15,6 +15,8 @@ export default class JoinController extends Controller { @tracked isLoading = false; @tracked oldOnboarding = null; @tracked step = null; + @tracked edit = null; + @tracked dev = null; ANKUSH_TWITTER = ANKUSH_TWITTER; From 3c1a65e5d153ffbb1ee97f907d182455cd99bfd4 Mon Sep 17 00:00:00 2001 From: Mayank Bansal Date: Fri, 27 Feb 2026 12:28:50 +0530 Subject: [PATCH 2/4] fix: error message for create application and redirection --- app/components/new-join-steps/base-step.js | 8 ++++++-- app/components/new-stepper.js | 13 +++++++------ app/constants/join.js | 2 +- .../components/new-stepper-test.js | 19 +++++++++++++------ 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/components/new-join-steps/base-step.js b/app/components/new-join-steps/base-step.js index f691f1ef1..00b38150e 100644 --- a/app/components/new-join-steps/base-step.js +++ b/app/components/new-join-steps/base-step.js @@ -101,10 +101,14 @@ export default class BaseStepComponent extends Component { @action inputHandler(e) { if (!e?.target) return; - this.args.setIsPreValid(false); const field = e.target.name; const value = e.target.value; - debounceTask(this, 'handleFieldUpdate', field, value, JOIN_DEBOUNCE_TIME); + this.updateFieldValue(field, value); + const result = this.validateField(field, value); + this.updateWordCount(field, result); + this.updateErrorMessage(field, result); + this.args.setIsPreValid(this.isDataValid()); + debounceTask(this, 'syncFormValidity', JOIN_DEBOUNCE_TIME); } validateField(field, value) { diff --git a/app/components/new-stepper.js b/app/components/new-stepper.js index 9032c13a9..424c94cac 100644 --- a/app/components/new-stepper.js +++ b/app/components/new-stepper.js @@ -31,7 +31,7 @@ export default class NewStepperComponent extends Component { @service toast; @tracked preValid = false; - @tracked isValid = getLocalStorageItem('isValid') === 'true'; + @tracked isValid = false; @tracked isSubmitting = false; @tracked currentStep = 0; @@ -135,6 +135,7 @@ export default class NewStepperComponent extends Component { const method = this.isEditMode ? 'PATCH' : 'POST'; const response = await apiRequest(url, method, applicationData); + const data = await response.json(); if (response.status === 409) { this.toast.error( @@ -150,7 +151,7 @@ export default class NewStepperComponent extends Component { if (!response.ok) { this.toast.error( - response.message || + data.message || `Failed to ${this.isEditMode ? 'edit' : 'submit'} application. Please try again.`, 'Error!', TOAST_OPTIONS, @@ -159,8 +160,6 @@ export default class NewStepperComponent extends Component { return; } - await response.json(); - this.toast.success( this.isEditMode ? 'You have successfully edited the application' @@ -169,9 +168,10 @@ export default class NewStepperComponent extends Component { TOAST_OPTIONS, ); + const applicationId = + data?.applicationId ?? this.onboarding.applicationData?.id; this.clearAllStepData(); - this.isSubmitting = false; - this.router.replaceWith('join', { + this.router.transitionTo('applications.detail', applicationId, { queryParams: { dev: true }, }); } catch (error) { @@ -181,6 +181,7 @@ export default class NewStepperComponent extends Component { 'Error!', TOAST_OPTIONS, ); + } finally { this.isSubmitting = false; } } diff --git a/app/constants/join.js b/app/constants/join.js index 33428b6ef..121808f82 100644 --- a/app/constants/join.js +++ b/app/constants/join.js @@ -1,4 +1,4 @@ -export const JOIN_DEBOUNCE_TIME = 1000; +export const JOIN_DEBOUNCE_TIME = 300; export const STEP_ONE_LIMITS = { city: 1, state: 1, diff --git a/tests/integration/components/new-stepper-test.js b/tests/integration/components/new-stepper-test.js index 0766e54e1..cabd20b1b 100644 --- a/tests/integration/components/new-stepper-test.js +++ b/tests/integration/components/new-stepper-test.js @@ -122,7 +122,10 @@ module('Integration | Component | new-stepper', function (hooks) { this.apiStub = sinon.stub(window, 'fetch').resolves({ ok: false, status: 409, - message: '24 hour restriction', + json: () => + Promise.resolve({ + message: 'You will be able to edit after 24 hrs.', + }), }); await render(hbs``); @@ -204,15 +207,19 @@ module('Integration | Component | new-stepper', function (hooks) { .isNotDisabled('Submit button enabled after edit completes'); }); - test('redirects to join page after successful edit', async function (assert) { + test('redirects to application detail page after successful edit', async function (assert) { await render(hbs``); await click('[data-test-button="submit-review"]'); assert.ok( - this.routerService.replaceWith.calledWith('join', { - queryParams: { dev: true }, - }), - 'Redirects to join page after successful edit', + this.routerService.transitionTo.calledWith( + 'applications.detail', + APPLICATIONS_DATA.id, + { + queryParams: { dev: true }, + }, + ), + 'Redirects to application detail page after successful edit', ); }); }); From 9237269ffe4f2382dfcec26981b659d772dd9705 Mon Sep 17 00:00:00 2001 From: Mayank Bansal Date: Sat, 28 Feb 2026 01:38:53 +0530 Subject: [PATCH 3/4] fix: add image validation, auto apply role, fix socials message --- app/components/new-join-steps/base-step.js | 3 ++ .../new-join-steps/new-step-one.hbs | 6 ++- app/components/new-join-steps/new-step-one.js | 11 +++++ app/components/signup-steps/step-zero.hbs | 6 ++- app/components/signup-steps/step-zero.js | 2 + app/constants/new-join-form.js | 1 + app/constants/new-signup.js | 3 +- app/constants/urls.js | 10 ++-- app/controllers/goto.js | 14 +----- app/styles/new-stepper.module.css | 4 ++ .../new-join-steps/new-step-one-test.js | 47 +++++++++++++++++++ .../components/new-signup/info-test.js | 2 +- .../components/signup-steps/step-zero-test.js | 2 +- 13 files changed, 88 insertions(+), 23 deletions(-) diff --git a/app/components/new-join-steps/base-step.js b/app/components/new-join-steps/base-step.js index 00b38150e..093147b46 100644 --- a/app/components/new-join-steps/base-step.js +++ b/app/components/new-join-steps/base-step.js @@ -163,6 +163,9 @@ export default class BaseStepComponent extends Component { if (fieldType === 'select' || fieldType === 'dropdown') { return 'Please choose an option'; } + if (fieldType === 'image') { + return 'Please upload a profile image'; + } if (result.remainingToMin) { return `At least ${result.remainingToMin} more word(s) required`; } diff --git a/app/components/new-join-steps/new-step-one.hbs b/app/components/new-join-steps/new-step-one.hbs index 8625b37aa..f95cff187 100644 --- a/app/components/new-join-steps/new-step-one.hbs +++ b/app/components/new-join-steps/new-step-one.hbs @@ -103,7 +103,10 @@ />
-

Applying as

+

Applying as + {{#if this.isRoleAvailable}}(auto-applied from profile){{/if}}

{{#each this.roleOptions as |role|}}