Skip to content

Fix rejection email preview#44

Open
VineetBala-AOT wants to merge 1 commit intomainfrom
fix-preview-email
Open

Fix rejection email preview#44
VineetBala-AOT wants to merge 1 commit intomainfrom
fix-preview-email

Conversation

@VineetBala-AOT
Copy link
Collaborator

Issue #: https://github.com/bcgov/met-public/issues/

Description of changes:

  • Fix rejection email preview to use end date instead of scheduled date

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

@tolkamps1 tolkamps1 marked this pull request as ready for review October 9, 2025 18:29
Copy link
Collaborator

@marklise marklise left a comment

Choose a reason for hiding this comment

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

I would remove any 3rd party library like dayjs as they include an unnecessary dependency on the project. It can be achieved with built-in functions.

// Output similar to "Oct 14, 2025"
const endDate = new Date(survey.engagement?.end_date).toLocaleDateString('en-US', { month: 'short', day: '2-digit', year: 'numeric' });

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.

2 participants