author | ymh <ymh.work@gmail.com> |
Mon, 04 Apr 2022 17:02:10 +0200 | |
changeset 26 | eb14941af2e7 |
parent 0 | 5f4fcbc80b37 |
permissions | -rw-r--r-- |
0
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
import React from 'react'; |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
import { FormattedMessage } from 'react-intl'; |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
import PropTypes from 'prop-types'; |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
|
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
|
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
import AnnotationsDocumentsTableRow from './AnnotationsDocumentsTableRow'; |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
|
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
const AnnotationsDocumentsTable = ({ |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
documents, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
viaBaseUrl, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
topics, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
metacategories, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
}) => ( |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
<table className="table w-100"> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
<thead> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
<tr> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
<th><FormattedMessage id="ui.annotations-documents-table.col.update" defaultMessage="upd." /></th> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
<th><FormattedMessage id="ui.annotations-documents-table.col.document" defaultMessage="document" /></th> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
<th><FontAwesomeIcon icon="user" /></th> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
<th><FontAwesomeIcon icon="pencil-alt" /></th> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
<th><FormattedMessage id="ui.annotations-documents-table.col.h" defaultMessage="h" /></th> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
</tr> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
</thead> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
<tbody> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
{ |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
documents.map(document => ( |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
<AnnotationsDocumentsTableRow |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
key={document.uri} |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
document={document} |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
viaBaseUrl={viaBaseUrl} |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
topics={topics} |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
metacategories={metacategories} |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
/> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |
)) |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
36 |
} |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
37 |
</tbody> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
38 |
</table> |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
39 |
); |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
40 |
|
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
41 |
AnnotationsDocumentsTable.propTypes = { |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
42 |
documents: PropTypes.arrayOf(PropTypes.object).isRequired, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
43 |
metacategories: PropTypes.arrayOf(PropTypes.object).isRequired, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
44 |
topics: PropTypes.arrayOf(PropTypes.string).isRequired, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
45 |
viaBaseUrl: PropTypes.string.isRequired, |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
46 |
}; |
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
47 |
|
5f4fcbc80b37
Create new repository to host all dashboard developments
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
48 |
export default AnnotationsDocumentsTable; |