Add car reordering and AM/PM period for reservations

Agent-Logs-Url: https://github.com/h/CarReservation/sessions/c0a4b7dc-228e-4e7d-a985-61b9a17de159

Co-authored-by: h <57948770+h@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-06 07:12:49 +00:00
committed by GitHub
parent 88b5f8deaf
commit cdf4b6452d
8 changed files with 176 additions and 22 deletions

View File

@@ -2,7 +2,7 @@ import { useState, useEffect, useRef, useCallback } from 'react';
import { format, addDays, startOfWeek, parseISO, differenceInDays, isSameDay } from 'date-fns';
import { ja } from 'date-fns/locale';
import { api } from '../api.js';
import { isInspectionExpirySoon } from '../utils/carUtils.js';
import { isInspectionExpirySoon, formatDateRange, formatReservationTooltip } from '../utils/carUtils.js';
import ReservationModal from './ReservationModal.jsx';
import styles from './ScheduleView.module.css';
@@ -552,14 +552,14 @@ export default function ScheduleView({ reloadKey = 0 }) {
e.stopPropagation();
setContextMenu({ x: e.clientX, y: e.clientY, reservation: r });
}}
title={`${r.customer_name || '予約'}\n${r.start_date}${r.end_date}${r.notes ? '\n' + r.notes : ''}`}
title={formatReservationTooltip(r)}
>
<span className={styles.blockText}>
{r.customer_name || '予約'}
</span>
{width > 80 && (
<span className={styles.blockDates}>
{r.start_date.slice(5)} {r.end_date.slice(5)}
{formatDateRange(r.start_date, r.start_period, r.end_date, r.end_period)}
</span>
)}
</div>