Skip to content

Refactor backend booking emails to use shared date utils#972

Closed
taroj1205 wants to merge 1 commit into
masterfrom
refactor/940-use-shared-date-utils
Closed

Refactor backend booking emails to use shared date utils#972
taroj1205 wants to merge 1 commit into
masterfrom
refactor/940-use-shared-date-utils

Conversation

@taroj1205

@taroj1205 taroj1205 commented Apr 16, 2026

Copy link
Copy Markdown
Member

Description

  • Fixes N/A
  • Route backend booking email formatting through shared date utilities backed by the configured dayjs.ts wrapper
  • Add helper coverage plus a route-level integration test for the rendered booking confirmation email payload

Type of change

  • New feature or improvement (non-breaking change which adds/modifies functionality)

How Has This Been Tested?

  • Integration tests written (requires checks to pass)

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added thorough tests that prove my fix is effective and that my feature works
  • Additional issues have been created for any tech debt left in this PR
  • I've requested a review from another user

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Preview Deployment Status

✅ Storybook Preview: https://629f207a.uabc-storybook.pages.dev

✅ Frontend Preview: https://50b50be4.uabc.pages.dev

@taroj1205 taroj1205 force-pushed the refactor/940-use-shared-date-utils branch from e50e0d4 to 42c1e49 Compare April 16, 2026 12:51
@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 82.66% (🎯 70%)
🟰 ±0%
2689 / 3253
🔵 Statements 82.58% (🎯 70%)
🟰 ±0%
2755 / 3336
🔵 Functions 76.93% (🎯 80%)
🟰 ±0%
647 / 841
🔵 Branches 78.13% (🎯 60%)
🟰 ±0%
1547 / 1980
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/backend/src/business-layer/services/MailService.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
Generated in workflow #3982 for commit 7aea98b by the Vitest Coverage Report Action

@taroj1205 taroj1205 force-pushed the refactor/940-use-shared-date-utils branch from 42c1e49 to 0702db4 Compare April 16, 2026 13:12
Expose shared date helpers for weekday, day-month, and 24-hour time formatting.

This lets backend code use the configured Day.js wrapper instead of ad hoc date formatting.

refactor(backend): use shared date utils in mail service

Replace inline booking email date formatting with shared helpers.

This keeps MailService on the configured Day.js utility path.

test(backend): verify booking email payload via route

Exercise the real booking confirmation email flow through /api/bookings.

This keeps the integration coverage on the rendered email payload.
@taroj1205 taroj1205 force-pushed the refactor/940-use-shared-date-utils branch from 0702db4 to 7aea98b Compare April 16, 2026 13:13
@taroj1205 taroj1205 closed this Apr 16, 2026
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.

1 participant