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

feat: Add an API to edit onboarding extension request details before approval or rejection #2334

Merged

Conversation

pankajjs
Copy link
Member

@pankajjs pankajjs commented Jan 3, 2025

Date: 3 Dec, 2025

Developer Name: @pankajjs


Issue Ticket Number

Description

  • This PR adds feature for onboarding user to edit the onboarding extension details before it is approved or rejected by super-users.
  • This PR contains only the changes needed for the feature.
  • There is a another PR for test.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshots Screenshot 2025-01-09 at 7 17 30 PM Screenshot 2025-01-09 at 7 17 40 PM Screenshot 2025-01-09 at 7 17 51 PM Screenshot 2025-01-09 at 7 18 10 PM Screenshot 2025-01-09 at 7 18 53 PM

Test Coverage

Test coverage has been added in test PR #2335

Additional Notes

routes/requests.ts Fixed Show fixed Hide fixed
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch from acb162a to 82d007e Compare January 7, 2025 13:33
@pankajjs pankajjs marked this pull request as ready for review January 7, 2025 13:44
routes/requests.ts Dismissed Show dismissed Hide dismissed
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch 4 times, most recently from 05611b1 to eb86437 Compare January 13, 2025 16:25
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch from eb86437 to 31c470b Compare January 15, 2025 07:22
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch 2 times, most recently from a6d4a6f to 29ebf36 Compare January 16, 2025 09:37
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch 2 times, most recently from 3d2b451 to 67df348 Compare January 16, 2025 17:25
@pankajjs pankajjs requested a review from AnujChhikara January 16, 2025 17:47
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch 2 times, most recently from a8eb8c6 to c0742e5 Compare January 16, 2025 18:09
controllers/onboardingExtension.ts Outdated Show resolved Hide resolved
controllers/onboardingExtension.ts Outdated Show resolved Hide resolved
controllers/requests.ts Show resolved Hide resolved
middlewares/validators/onboardingExtensionRequest.ts Outdated Show resolved Hide resolved
middlewares/validators/requests.ts Outdated Show resolved Hide resolved
controllers/onboardingExtension.ts Outdated Show resolved Hide resolved
controllers/onboardingExtension.ts Outdated Show resolved Hide resolved
controllers/onboardingExtension.ts Outdated Show resolved Hide resolved
controllers/onboardingExtension.ts Outdated Show resolved Hide resolved
controllers/onboardingExtension.ts Show resolved Hide resolved
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch from 486a3de to e310f96 Compare January 16, 2025 21:55
@Achintya-Chatterjee Achintya-Chatterjee changed the title feat: Add an api to edit onboarding extension request details before approval or rejection feat: Add an API to edit onboarding extension request details before approval or rejection Jan 17, 2025
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch 3 times, most recently from d291fd9 to 3c05d2f Compare January 19, 2025 06:50
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch 4 times, most recently from 815b44b to da8e21a Compare January 22, 2025 15:48
- Add common validator to redirect request based on type of extension
- Add type field in onboarding extension validator
- Import addLog from services to make it available for stubbing while testing
- Moved response messages to constants file
- Reuse single instance of current date in request and log model for consistent data

- Change controller name

- Remove unused variables

- Add authorization check for superuser or request ownership

- Change authorization condition

- Remove unnecessary changes
@pankajjs pankajjs force-pushed the feat/add-api-to-edit-request branch from da8e21a to 80bdeb4 Compare January 22, 2025 15:48
Copy link
Member

@AnujChhikara AnujChhikara left a comment

Choose a reason for hiding this comment

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

LGTM

constants/requests.ts Outdated Show resolved Hide resolved
@iamitprakash iamitprakash merged commit 7552eb1 into Real-Dev-Squad:develop Jan 23, 2025
3 checks passed
@pankajjs pankajjs mentioned this pull request Jan 23, 2025
10 tasks
iamitprakash added a commit that referenced this pull request Jan 26, 2025
* chore: remove duplicate function call for onboarding extension request (#2361)

* feat: Implement Pagination for GET /progreses API (#2325)

* feat: add pagination to GET /progreses API

* fix returning 404 on a page with no data

* fix joi validator logic

* refactor getting totalcount logic

* fix dev true

* fix merge conflicts

* using constant

* maked the JsDoc more concise

---------

Co-authored-by: Vinit khandal <[email protected]>

* test : add tests for pagination of progresses api (#2328)

* added test for the get progresses pagination

* added test for dev=false

* minor fix

* added unit test for utils/progresses functions

* added progressed model unit tests

* added test for 500

* added 500 message from constant

* fix test naming

* feat: Add an API to edit onboarding extension request details before approval or rejection (#2334)

* feat: Add feature to update request before approval or rejection
- Add common validator to redirect request based on type of extension
- Add type field in onboarding extension validator
- Import addLog from services to make it available for stubbing while testing
- Moved response messages to constants file
- Reuse single instance of current date in request and log model for consistent data

- Change controller name

- Remove unused variables

- Add authorization check for superuser or request ownership

- Change authorization condition

- Remove unnecessary changes

* fix: add logs for failure cases and fix check for same old and new deadline

* refactor: separate validation and update logic in service file

* chore: fix jsDoc

* fix: send id instead of while request doc while updating it

* chore: fix lint issue

* fix: change validation response condition and fix jsDoc

* fix: add strict checking

* fix: change constant message

* feat: Add tests for PATCH /requests/:id API for onboarding extension requests (#2335)

* feat: Add test cases for controller and validator

- Remove failing tests and fix existing tests

- Add tests to check success and unexpected behaviour and fix existing tests

- Replace actual messages with constants for easily maintenance

- Add test for super user and request owner authorization check and fix existing failing tests

- Remove un-necessary changes

- Remove separate file for validator tests

* feat: add tests for onboarding update and validate service

* Merge pull request #2369 from pankajjs/fix/flaky-test

Fix flaky test present in PR[2335]

* fix: handle id query parameter in Get Requests API (#2367)

Co-authored-by: Vikas Singh <[email protected]>
Co-authored-by: Achintya Chatterjee <[email protected]>

---------

Co-authored-by: Yash Raj <[email protected]>
Co-authored-by: Pankaj <[email protected]>
Co-authored-by: Anuj Chhikara <[email protected]>
Co-authored-by: Vinit khandal <[email protected]>
Co-authored-by: Vikas Singh <[email protected]>
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.

Feature : Extend Onboarding Override for Discord Server
5 participants