fix(#1020): fix ooo accept/reject flow#1024
fix(#1020): fix ooo accept/reject flow#1024iamitprakash merged 8 commits intoRealDevSquad:developfrom
Conversation
- update network request for approval and rejection of OOO requests and updated payload for these - fix bug for OOO request card where reason and comment were being rendered in each other's div
…d new card out of feature flag
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Summary by CodeRabbit
WalkthroughIntroduces isOOORequest across request-card component and utilities, unifies requests page rendering to always use createRequestCardComponent, updates API routing and payloads for OOO via PATCH with dev=true, adjusts date formatting, adds REQUESTS_LINK constant and wiring for superuser visibility, and removes a legacy date formatting util. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant SU as Superuser
participant RP as Requests Page
participant RC as createRequestCardComponent
participant U as Request Card Utils
participant API as Server API
SU->>RP: Open Requests
RP->>RP: fetch requests
loop For each request
RP->>RC: createRequestCardComponent({ isOOORequest })
RC->>U: createTextBlockContainer(..., isOOORequest)
RC->>U: createActionContainer(..., isOOORequest)
end
SU->>RC: Approve/Reject (optional remark)
RC->>U: handleRequestStatusUpdate({ isOOORequest, ... })
alt isOOORequest
U->>U: buildRequestBody(OOO payload)
U->>API: PATCH /requests/... ?dev=true
else non-OOO
U->>U: buildRequestBody(standard payload)
U->>API: PUT/PATCH standard endpoint
end
API-->>U: Response
U-->>RC: Update UI state/logs
Estimated code review effort🎯 4 (Complex) | ⏱️ ~55 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Redundant boolean conversion ▹ view | ✅ Fix detected | |
| Missing function definition ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| constants.js | ✅ |
| requests/util.js | ✅ |
| script.js | ✅ |
| components/request-card/script.js | ✅ |
| requests/script.js | ✅ |
| components/request-card/utils.js | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
|
added test case for the request button we added on home page |
MayankBansal12
left a comment
There was a problem hiding this comment.
@Hariom01010 kindly include the test coverage screenshot
added test coverage |
iamitprakash
left a comment
There was a problem hiding this comment.
form design and button alignment doesn't looks good to me, can you please check how other popup is being displayed and designed
Date: 11 Oct 2025
Developer Name: @Hariom01010
Issue Ticket Number
Description
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
fix-ooo-flow.1.mp4
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Fix the OOO (out-of-office) accept/reject flow by updating the request card component, tests, and related utilities to correctly handle OOO requests, propagate an isOOORequest flag, and adjust UI/selectors and API interactions accordingly.
Why are these changes being made?
To ensure the OOO request lifecycle works end-to-end (approve/reject) with correct UI states, statuses, and data flow, and to align tests with the updated component behavior and endpoints. This also introduces consistent handling for OOO requests across development and production flows.