25 lines
1.0 KiB
JavaScript
25 lines
1.0 KiB
JavaScript
import { Box } from "@mui/material";
|
|
import Reject from "./Form/RejectForm";
|
|
import Confirm from "./Form/ConfirmForm";
|
|
import ReserveForm from "./Form/ReserveForm";
|
|
import ReferReason from "./Form/ReferReason";
|
|
import ReferUser from "./Form/ReferUser";
|
|
import UserInfoForm from "./Form/UserInfoForm";
|
|
|
|
const TableRow = ({ row, mutate }) => {
|
|
return (
|
|
<Box sx={{ display: "flex", flexWrap: "nowrap", gap: "8px" }}>
|
|
{row.original.latest_history?.action === "refer" || row.original.latest_history?.action === "user-edit" ? (
|
|
<ReferReason row={row} />
|
|
) : null}
|
|
<UserInfoForm rowId={row.getValue("id")} row={row} />
|
|
<ReferUser rowId={row.getValue("id")} mutate={mutate} />
|
|
<Confirm rowId={row.getValue("id")} vehicle_type={row.original.vehicle_type} mutate={mutate} row={row} />
|
|
<ReserveForm rowId={row.getValue("id")} mutate={mutate} />
|
|
<Reject rowId={row.getValue("id")} mutate={mutate} />
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default TableRow;
|