|
@@ -15,6 +15,7 @@ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } f
|
|
|
import { RouteForm } from '../components/RouteForm';
|
|
import { RouteForm } from '../components/RouteForm';
|
|
|
import type { CreateRouteInput, UpdateRouteInput } from '@d8d/server/modules/routes/route.schema';
|
|
import type { CreateRouteInput, UpdateRouteInput } from '@d8d/server/modules/routes/route.schema';
|
|
|
import { LocationSelect } from '../components/LocationSelect';
|
|
import { LocationSelect } from '../components/LocationSelect';
|
|
|
|
|
+import { getVehicleTypeText } from '@/share/route.types';
|
|
|
|
|
|
|
|
// 类型提取规范
|
|
// 类型提取规范
|
|
|
type RouteResponse = InferResponseType<typeof routeClient.$get, 200>['data'][0];
|
|
type RouteResponse = InferResponseType<typeof routeClient.$get, 200>['data'][0];
|
|
@@ -305,7 +306,7 @@ export const RoutesPage: React.FC = () => {
|
|
|
)}
|
|
)}
|
|
|
{vehicleTypeFilter !== 'all' && (
|
|
{vehicleTypeFilter !== 'all' && (
|
|
|
<Badge variant="secondary" className="flex items-center gap-1">
|
|
<Badge variant="secondary" className="flex items-center gap-1">
|
|
|
- 车型: {vehicleTypeFilter === 'bus' ? '大巴' : vehicleTypeFilter === 'minibus' ? '中巴' : '小车'}
|
|
|
|
|
|
|
+ 车型: {getVehicleTypeText(vehicleTypeFilter)}
|
|
|
<button
|
|
<button
|
|
|
onClick={() => setVehicleTypeFilter('all')}
|
|
onClick={() => setVehicleTypeFilter('all')}
|
|
|
className="ml-1 hover:text-red-500"
|
|
className="ml-1 hover:text-red-500"
|
|
@@ -385,7 +386,7 @@ export const RoutesPage: React.FC = () => {
|
|
|
</TableCell>
|
|
</TableCell>
|
|
|
<TableCell>
|
|
<TableCell>
|
|
|
<span className="px-2 py-1 rounded-full text-xs bg-blue-100 text-blue-800">
|
|
<span className="px-2 py-1 rounded-full text-xs bg-blue-100 text-blue-800">
|
|
|
- {route.vehicleType}
|
|
|
|
|
|
|
+ {getVehicleTypeText(route.vehicleType)}
|
|
|
</span>
|
|
</span>
|
|
|
</TableCell>
|
|
</TableCell>
|
|
|
<TableCell>
|
|
<TableCell>
|