Further UI Updates.

This commit is contained in:
Patrick Fic
2021-03-30 17:13:33 -07:00
parent a0654bdb2c
commit a61be6a44f
48 changed files with 755 additions and 616 deletions

View File

@@ -1,4 +1,4 @@
import { Input, Table } from "antd";
import { Card, Input, Table } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { alphaSort } from "../../utils/sorters";
@@ -97,32 +97,36 @@ export default function ContractsCarsComponent({
);
return (
<Table
loading={loading}
title={() => (
<Card
title={t("contracts.labels.availablecars")}
extra={
<Input.Search
placeholder={t("general.labels.search")}
value={state.search}
onChange={(e) => setState({ ...state, search: e.target.value })}
/>
)}
pagination={{ position: "top" }}
columns={columns.map((item) => ({ ...item }))}
rowKey="id"
dataSource={filteredData}
onChange={handleTableChange}
rowSelection={{
onSelect: handleSelect,
type: "radio",
selectedRowKeys: [selectedCar],
}}
onRow={(record, rowIndex) => {
return {
onClick: (event) => {
handleSelect(record);
},
};
}}
/>
}
>
<Table
loading={loading}
pagination={{ position: "top" }}
columns={columns}
rowKey="id"
dataSource={filteredData}
onChange={handleTableChange}
rowSelection={{
onSelect: handleSelect,
type: "radio",
selectedRowKeys: [selectedCar],
}}
onRow={(record, rowIndex) => {
return {
onClick: (event) => {
handleSelect(record);
},
};
}}
/>
</Card>
);
}