feat: add inspection_expiry/has_etc/tire_type fields, icons in schedule view, and WebSocket real-time sync

Co-authored-by: pdf114514 <57948770+pdf114514@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pdf114514/CarReservation/sessions/6d0f25ae-6db4-4937-ae2b-6674456a5ca1
This commit is contained in:
copilot-swe-agent[bot]
2026-03-22 03:58:07 +00:00
parent 09872737b7
commit 8e9db971d3
13 changed files with 451 additions and 26 deletions

View File

@@ -0,0 +1,13 @@
/**
* Returns true if the given inspection expiry date string is within 1 month
* from today (or already past).
* @param {string} inspectionExpiry - ISO date string (YYYY-MM-DD) or empty
* @returns {boolean}
*/
export function isInspectionExpirySoon(inspectionExpiry) {
if (!inspectionExpiry) return false;
const expiry = new Date(inspectionExpiry);
const oneMonthLater = new Date();
oneMonthLater.setMonth(oneMonthLater.getMonth() + 1);
return expiry <= oneMonthLater;
}