- Rename billFwd* to billsNotification* for clarity - Rename rentDueNotification* to rentNotification* for consistency - Rename utilBillsProofOfPayment to billsProofOfPayment - Introduce enums for type safety: - BillsNotificationStrategy (WhenPayed, WhenAttached) - BillsNotificationStatus (Scheduled, Sent, Failed) - RentNotificationStatus (Sent, Failed) - Replace "pending" status with "scheduled" for better semantics - Fix function names to proper camelCase - Fix incorrect import path in web-app/app/lib/format.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
13 lines
380 B
TypeScript
13 lines
380 B
TypeScript
import { YearMonth } from "@evidencija-rezija/shared-code";
|
|
|
|
export const formatYearMonth = ({ year, month }: YearMonth): string => {
|
|
return `${year}-${month<10?"0":""}${month}`;
|
|
}
|
|
|
|
export const parseYearMonth = (yearMonthString: string): YearMonth => {
|
|
|
|
const [year, month] = yearMonthString.split("-").map((s) => parseInt(s, 10));
|
|
|
|
return({ year, month } as YearMonth);
|
|
}
|