Skip to content

feat(events): add travel fund deadline date support#727

Open
dealako wants to merge 4 commits into
mainfrom
feat/add-travel-fund-end-date-support
Open

feat(events): add travel fund deadline date support#727
dealako wants to merge 4 commits into
mainfrom
feat/add-travel-fund-end-date-support

Conversation

@dealako
Copy link
Copy Markdown
Contributor

@dealako dealako commented May 18, 2026

Summary

Surface travel_fund_end_date from ANALYTICS.PLATINUM_LFX_ONE.EVENT_REGISTRATIONS in the Travel Funding Application experience:

  • Display application deadline on each event card in the travel-fund picker; shows Application Deadline not set when the field is null
  • Suppress events whose deadline has passed via a new excludePastTravelFundDeadline query option (TRAVEL_FUND_END_DATE IS NULL OR TRAVEL_FUND_END_DATE >= CURRENT_DATE())
  • Add Deadline column to the submitted Travel Fund Requests table for audit context

✅ [DONE!] Dependency: This feature requires TRAVEL_FUND_END_DATE to be available on ANALYTICS.PLATINUM_LFX_ONE.EVENT_REGISTRATIONS.

Changes

 event-request-list.component.html         | 16 ++++++++++++++++
 event-request-list.component.ts           |  3 ++-
 event-selection.component.html            | 11 +++++++++++
 event-selection.component.ts              |  4 +++-
 app/shared/services/events.service.ts     |  1 +
 server/controllers/events.controller.ts   |  2 ++
 server/services/events.service.ts         | 12 +++++++++++-
 packages/shared/interfaces/events.interface.ts | 12 ++++++++++++
 8 files changed, 58 insertions(+), 3 deletions(-)

Jira: LFXV2-1856

Surface travel_fund_end_date from ANALYTICS.PLATINUM_LFX_ONE.EVENT_REGISTRATIONS
in the Travel Funding Application experience:

- Display application deadline on each event card in the travel-fund picker;
  shows 'Application Deadline not set' when the field is null
- Suppress events whose deadline has passed via a new
  excludePastTravelFundDeadline query option (SQL: TRAVEL_FUND_END_DATE IS NULL
  OR TRAVEL_FUND_END_DATE >= CURRENT_DATE())
- Add 'Deadline' column to the submitted Travel Fund Requests table

Refs: https://linuxfoundation.atlassian.net/browse/LFXV2-1856

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
Copilot AI review requested due to automatic review settings May 18, 2026 20:39
@dealako dealako requested a review from a team as a code owner May 18, 2026 20:39
@dealako dealako added the ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology. label May 18, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8cdf45c9-e3d1-48f8-9cf1-fab6601749c4

📥 Commits

Reviewing files that changed from the base of the PR and between 72a572f and 49b934f.

📒 Files selected for processing (1)
  • apps/lfx-one/src/server/services/events.service.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/lfx-one/src/server/services/events.service.ts

Walkthrough

Adds travel-fund application deadline data to shared interfaces, returns and maps the deadline from server queries, optionally filters out events with past deadlines, and displays formatted deadlines in two frontend components when request type is "travel-fund".

Changes

Travel fund deadline filtering and display

Layer / File(s) Summary
Shared data contracts and interfaces
packages/shared/src/interfaces/events.interface.ts
MyEvent, MyEventRow, VisaRequest, and VisaRequestRow now include optional travelFundEndDate / TRAVEL_FUND_END_DATE. GetMyEventsParams and GetMyEventsOptions accept excludePastTravelFundDeadline?: boolean.
Backend event filtering and data projection
apps/lfx-one/src/server/controllers/events.controller.ts, apps/lfx-one/src/server/services/events.service.ts
Controller reads excludePastTravelFundDeadline query flag and passes it to service. Service selects TRAVEL_FUND_END_DATE in relevant queries, maps it to travelFundEndDate, and conditionally filters upcoming events by past travel fund deadlines when the flag is enabled.
Client-side service parameter wiring
apps/lfx-one/src/app/shared/services/events.service.ts
getMyEvents appends excludePastTravelFundDeadline=true to HTTP request params when provided.
Event selection component with deadline filter
apps/lfx-one/src/app/modules/events/my-events-dashboard/components/event-selection/event-selection.component.ts, event-selection.component.html
Component imports DatePipe, adds it to standalone imports, sets excludePastTravelFundDeadline: true in activeFilters for requestType === 'travel-fund', and template conditionally shows formatted event.travelFundEndDate or a "not set" message.
Event request list component with deadline column
apps/lfx-one/src/app/modules/events/my-events-dashboard/components/event-request-list/event-request-list.component.ts, event-request-list.component.html
Component imports DatePipe and includes it in imports; template conditionally renders a "Deadline" column and per-row formatted request.travelFundEndDate or an em dash when absent.

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main feature: adding travel fund deadline date support to the events module.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about surfacing travel_fund_end_date field, UI changes, and filtering logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-travel-fund-end-date-support

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds travel fund application deadline support across the events API and Travel Funding UI.

Changes:

  • Extends shared event/request models and server queries with TRAVEL_FUND_END_DATE.
  • Adds an excludePastTravelFundDeadline filter for travel-fund event selection.
  • Displays application deadlines in the event picker and submitted travel fund requests table.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
packages/shared/src/interfaces/events.interface.ts Adds deadline fields and query option types.
apps/lfx-one/src/server/services/events.service.ts Fetches, filters, and maps travel fund deadline data.
apps/lfx-one/src/server/controllers/events.controller.ts Parses and forwards the new deadline exclusion query option.
apps/lfx-one/src/app/shared/services/events.service.ts Sends the new query parameter to /api/events.
apps/lfx-one/src/app/modules/events/my-events-dashboard/components/event-selection/event-selection.component.ts Enables deadline filtering for travel-fund selection.
apps/lfx-one/src/app/modules/events/my-events-dashboard/components/event-selection/event-selection.component.html Displays deadline or fallback text on travel-fund event cards.
apps/lfx-one/src/app/modules/events/my-events-dashboard/components/event-request-list/event-request-list.component.ts Imports DatePipe for deadline rendering.
apps/lfx-one/src/app/modules/events/my-events-dashboard/components/event-request-list/event-request-list.component.html Adds a travel-fund-only Deadline column.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/lfx-one/src/server/services/events.service.ts Outdated
Comment thread apps/lfx-one/src/server/services/events.service.ts Outdated
Comment thread apps/lfx-one/src/server/services/events.service.ts
Comment thread packages/shared/src/interfaces/events.interface.ts Outdated
Comment thread packages/shared/src/interfaces/events.interface.ts Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

🚀 Deployment Status

Your branch has been deployed to: https://ui-pr-727.dev.v2.cluster.linuxfound.info

Deployment Details:

  • Environment: Development
  • Namespace: ui-pr-727
  • ArgoCD App: ui-pr-727

The deployment will be automatically removed when this PR is closed.

Copy link
Copy Markdown
Contributor

@MRashad26 MRashad26 left a comment

Choose a reason for hiding this comment

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

Strict pass against ~/LFX/code-enforcer-agent.md. Feature works end-to-end and the column-only-when-travel-fund pattern is clean. Four findings worth a look — one UX inconsistency in the new column, one type-shape concern, one rendering-strategy inconsistency, and one timezone edge case in the SQL filter.

Comment thread packages/shared/src/interfaces/events.interface.ts
Comment thread apps/lfx-one/src/server/services/events.service.ts Outdated
Comment thread apps/lfx-one/src/server/services/events.service.ts
Comment thread apps/lfx-one/src/server/services/events.service.ts Outdated
Copy link
Copy Markdown
Contributor Author

@dealako dealako left a comment

Choose a reason for hiding this comment

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

This PR cleanly surfaces travel_fund_end_date from the PLATINUM view into both the travel-fund picker and the submitted-requests table. The structure is solid — conditional rendering is properly gated on requestType === 'travel-fund', the SQL filter uses CURRENT_DATE() correctly, and the shared type additions are appropriately scoped.

One required fix before merge: Both row mappers (mapRowToVisaRequest line 1008, mapRowToEvent line 1053) pass row.TRAVEL_FUND_END_DATE ?? null without normalizing to YYYY-MM-DD. Snowflake's Node.js driver returns DATE columns as JavaScript Date objects, which Express serializes as UTC timestamps ("2026-07-05T00:00:00.000Z"). Angular's DatePipe then interprets this in the user's local timezone — users west of UTC can see Jul 4 for a Jul 5 deadline. Fix: use formatDateToISOString(row.TRAVEL_FUND_END_DATE) ?? null in both mappers (add formatDateToISOString to the existing @lfx-one/shared/utils import on line 38 — it's already exported).

Two nits noted inline (test ID naming, interface comment accuracy) — neither is a blocker.

…t id [LFXV2-1856]

- Normalize TRAVEL_FUND_END_DATE to YYYY-MM-DD in both mapRowToVisaRequest
  and mapRowToEvent; raw Snowflake DATE values serialize as UTC timestamps
  which DatePipe renders in local timezone (off-by-one for users west of UTC)
- Rename deadline column test id from '-sort-deadline' to '-deadline-header'
  to avoid implying the column is sortable
- Correct interface comment on VisaRequestRow.TRAVEL_FUND_END_DATE and
  VisaRequest.travelFundEndDate to accurately describe when the field is null

Refs: https://linuxfoundation.atlassian.net/browse/LFXV2-1856

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
@dealako
Copy link
Copy Markdown
Contributor Author

dealako commented May 18, 2026

Addressed all actionable AI review feedback in 72a572f:

Fixed (3 items):

  • Date normalization — Both mapRowToVisaRequest and mapRowToEvent now normalize TRAVEL_FUND_END_DATE via new Date(row.TRAVEL_FUND_END_DATE).toISOString().split('T')[0], ensuring the value is always serialized as YYYY-MM-DD regardless of how the Snowflake driver returns it at runtime. This prevents the off-by-one timezone rendering for users west of UTC.
  • Test ID naming — Renamed '-sort-deadline''-deadline-header' to avoid implying the Deadline column is sortable.
  • Interface comment accuracy — Updated JSDoc on VisaRequestRow.TRAVEL_FUND_END_DATE and VisaRequest.travelFundEndDate to accurately reflect that the field is present on visa rows but suppressed in rendering (travel-fund only).

Out of scope (noted for follow-up):

  • Deadline enforcement at submission time — by design the check is picker-level; backend enforcement would require a separate task.
  • E2E test coverage for deadline behavior — tracked separately.
  • Filter null-join concern — not applicable since the picker always calls with registeredOnly: true, so the r alias is never null.

@dealako dealako added the draft A pull request draft that is NOT ready for human review yet. label May 18, 2026
Copilot AI review requested due to automatic review settings May 18, 2026 22:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread apps/lfx-one/src/server/services/events.service.ts
Comment thread packages/shared/src/interfaces/events.interface.ts
…FXV2-1856]

The past/registered branch of getMyEvents did not include TRAVEL_FUND_END_DATE
in its SELECT list, making MyEventRow.TRAVEL_FUND_END_DATE undefined at runtime
for past event rows despite the interface typing it as string | null. The mapper
handled undefined safely (falsy -> null), but the interface contract was
inaccurate. Adding the column to the past-events SELECT makes both branches
consistent with the shared row type.

Refs: https://linuxfoundation.atlassian.net/browse/LFXV2-1856

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
@dealako
Copy link
Copy Markdown
Contributor Author

dealako commented May 18, 2026

Review Feedback Addressed (Round 2)

Commit: 49b934f

Change Made

  • apps/lfx-one/src/server/services/events.service.ts: Added TRAVEL_FUND_END_DATE to the past/registered-events query branch SELECT. The column was already selected in the upcoming-events branch but missing from the past-events branch, making MyEventRow.TRAVEL_FUND_END_DATE undefined at runtime for past rows despite the interface typing it as string | null (per copilot[bot]).

No Change Needed

  • apps/lfx-one/src/server/services/events.service.ts:112 (deadline filter on left-joined row): excludePastTravelFundDeadline is only activated alongside registeredOnly: true, which enforces r.EVENT_ID IS NOT NULL — so r is never null when the deadline filter fires (per copilot[bot]).
  • apps/lfx-one/src/app/modules/events/my-events-dashboard/components/event-selection/event-selection.component.ts:73 (E2E coverage): Tracked as a follow-up task, per the summary comment above (per copilot[bot]).

Threads Resolved

3 of 3 unresolved threads addressed in this iteration. All 17 review threads on this PR are now resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology. deploy-preview draft A pull request draft that is NOT ready for human review yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants