feature/IO-3255-simplified-parts-management - Checkpoint
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { SyncOutlined } from "@ant-design/icons";
|
||||
import { Button, Card, Input, Space, Table, Typography } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useLocation, useNavigate } from "react-router-dom";
|
||||
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||
import { pageLimit } from "../../utils/config";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
|
||||
export default function VehiclesListComponent({ loading, vehicles, total, refetch }) {
|
||||
export default function VehiclesListComponent({ loading, vehicles, total, refetch, basePath = "/manage" }) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const {
|
||||
page
|
||||
@@ -31,7 +31,7 @@ export default function VehiclesListComponent({ loading, vehicles, total, refetc
|
||||
sorter: (a, b) => alphaSort(a.v_vin, b.v_vin),
|
||||
sortOrder: state.sortedInfo.columnKey === "v_vin" && state.sortedInfo.order,
|
||||
render: (text, record) => (
|
||||
<Link to={"/manage/vehicles/" + record.id}>
|
||||
<Link to={`${basePath}/vehicles/${record.id}`}>
|
||||
<VehicleVinDisplay>{record.v_vin || "N/A"}</VehicleVinDisplay>
|
||||
</Link>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user