Antd V4 Icon Updates
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import React, { useState } from "react";
|
||||
import { Table, Button, Icon, notification } from "antd";
|
||||
import { Table, Button, notification } from "antd";
|
||||
import {
|
||||
WarningFilled,
|
||||
EyeInvisibleFilled,
|
||||
DeleteFilled,
|
||||
EditFilled
|
||||
} from "@ant-design/icons";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import Moment from "react-moment";
|
||||
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
|
||||
@@ -24,11 +30,9 @@ export default function JobNotesComponent({
|
||||
<span>
|
||||
{" "}
|
||||
{record.critical ? (
|
||||
<Icon style={{ margin: 4, color: "red" }} type='warning' />
|
||||
) : null}
|
||||
{record.private ? (
|
||||
<Icon style={{ margin: 4 }} type='eye-invisible' />
|
||||
<WarningFilled style={{ margin: 4, color: "red" }} />
|
||||
) : null}
|
||||
{record.private ? <EyeInvisibleFilled style={{ margin: 4 }} /> : null}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
@@ -48,7 +52,7 @@ export default function JobNotesComponent({
|
||||
sorter: (a, b) => new Date(a.updated_at) - new Date(b.updated_at),
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
<Moment format='MM/DD/YYYY @ HH:mm'>{record.updated_at}</Moment>
|
||||
<Moment format="MM/DD/YYYY @ HH:mm">{record.updated_at}</Moment>
|
||||
</span>
|
||||
)
|
||||
},
|
||||
@@ -77,15 +81,17 @@ export default function JobNotesComponent({
|
||||
message: t("notes.successes.deleted")
|
||||
});
|
||||
});
|
||||
}}>
|
||||
<Icon type='delete' />
|
||||
}}
|
||||
>
|
||||
<DeleteFilled />
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setExistingNote(record);
|
||||
setNoteModalVisible(true);
|
||||
}}>
|
||||
<Icon type='edit' />
|
||||
}}
|
||||
>
|
||||
<EditFilled />
|
||||
</Button>
|
||||
</span>
|
||||
)
|
||||
@@ -105,14 +111,15 @@ export default function JobNotesComponent({
|
||||
onClick={() => {
|
||||
setExistingNote(null);
|
||||
setNoteModalVisible(true);
|
||||
}}>
|
||||
}}
|
||||
>
|
||||
{t("notes.actions.new")}
|
||||
</Button>
|
||||
<Table
|
||||
loading={loading}
|
||||
pagination={{ position: "bottom" }}
|
||||
columns={columns.map(item => ({ ...item }))}
|
||||
rowKey='id'
|
||||
rowKey="id"
|
||||
dataSource={data}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user