Add timeline view, right-click context menu, and fix Express trust proxy
- backend/server.js: Add app.set('trust proxy', 1) to fix express-rate-limit
ValidationError when app runs behind nginx reverse proxy
- ScheduleView.jsx: Add right-click context menu on reservation blocks with
Edit and Delete options; closes on click-outside or Escape
- ScheduleView.module.css: Add context menu styles
- TimelineView.jsx: New Gantt-style monthly timeline view showing all
reservations sorted by date, with month navigation and right-click menu
- TimelineView.module.css: Styles for the timeline view
- App.jsx: Add 'タイムライン' tab to navigation
Co-authored-by: h <57948770+h@users.noreply.github.com>
Agent-Logs-Url: https://github.com/h/CarReservation/sessions/d03ca12c-21ce-45a0-881f-919d6635e7fb
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import ScheduleView from './components/ScheduleView.jsx';
|
||||
import CarManagement from './components/CarManagement.jsx';
|
||||
import TimelineView from './components/TimelineView.jsx';
|
||||
import styles from './App.module.css';
|
||||
|
||||
export default function App() {
|
||||
@@ -17,6 +18,12 @@ export default function App() {
|
||||
>
|
||||
📅 スケジュール
|
||||
</button>
|
||||
<button
|
||||
className={`${styles.navBtn} ${page === 'timeline' ? styles.active : ''}`}
|
||||
onClick={() => setPage('timeline')}
|
||||
>
|
||||
📊 タイムライン
|
||||
</button>
|
||||
<button
|
||||
className={`${styles.navBtn} ${page === 'cars' ? styles.active : ''}`}
|
||||
onClick={() => setPage('cars')}
|
||||
@@ -26,7 +33,9 @@ export default function App() {
|
||||
</nav>
|
||||
</header>
|
||||
<main className={styles.main}>
|
||||
{page === 'schedule' ? <ScheduleView /> : <CarManagement />}
|
||||
{page === 'schedule' && <ScheduleView />}
|
||||
{page === 'timeline' && <TimelineView />}
|
||||
{page === 'cars' && <CarManagement />}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user