WIP Tech Claiming Ability
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Card, Col, Row, Table } from "antd";
|
||||
import { Button, Card, Col, Row, Table } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
@@ -28,9 +28,12 @@ export default function PartsDispatchExpander({ dispatch, job }) {
|
||||
width: "20%",
|
||||
|
||||
//sorter: (a, b) => alphaSort(a.number, b.number),
|
||||
render: (text, record) => (
|
||||
<DateTimeFormatter>{record.accepted_at}</DateTimeFormatter>
|
||||
),
|
||||
render: (text, record) =>
|
||||
record.accepted_at ? (
|
||||
<DateTimeFormatter>{record.accepted_at}</DateTimeFormatter>
|
||||
) : (
|
||||
<Button>{t("parts_dispatch.actions.accept")}</Button>
|
||||
),
|
||||
},
|
||||
];
|
||||
return (
|
||||
@@ -38,7 +41,7 @@ export default function PartsDispatchExpander({ dispatch, job }) {
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col span={24}>
|
||||
<Table
|
||||
pagination={false}
|
||||
rowKey={"id"}
|
||||
dataSource={dispatch.parts_dispatch_lines}
|
||||
columns={columns}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user