IO-1983 Add filter to job notes table for audit.
This commit is contained in:
@@ -32606,6 +32606,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>systemnotes</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>usernotes</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { selectJobReadOnly } from "../../redux/application/application.selectors
|
|||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
import useLocalStorage from "../../utils/useLocalStorage";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
|
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
|
||||||
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
||||||
@@ -40,6 +41,8 @@ export function JobNotesComponent({
|
|||||||
relatedRos,
|
relatedRos,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const [filter, setFilter] = useLocalStorage("filter_job_notes_icons", null);
|
||||||
|
|
||||||
const Templates = TemplateList("job_special", {
|
const Templates = TemplateList("job_special", {
|
||||||
ro_number,
|
ro_number,
|
||||||
});
|
});
|
||||||
@@ -50,6 +53,18 @@ export function JobNotesComponent({
|
|||||||
dataIndex: "icons",
|
dataIndex: "icons",
|
||||||
key: "icons",
|
key: "icons",
|
||||||
width: 80,
|
width: 80,
|
||||||
|
filteredValue: filter?.icons || null,
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
text: t("notes.labels.usernotes"),
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: t("notes.labels.systemnotes"),
|
||||||
|
value: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
onFilter: (value, record) => record.audit === value,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span>
|
<span>
|
||||||
{record.critical ? (
|
{record.critical ? (
|
||||||
@@ -131,6 +146,10 @@ export function JobNotesComponent({
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
|
setFilter(filters);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
@@ -166,6 +185,7 @@ export function JobNotesComponent({
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
|
onChange={handleTableChange}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1919,7 +1919,9 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"addtorelatedro": "Add to Related ROs",
|
"addtorelatedro": "Add to Related ROs",
|
||||||
"newnoteplaceholder": "Add a note...",
|
"newnoteplaceholder": "Add a note...",
|
||||||
"notetoadd": "Note to Add"
|
"notetoadd": "Note to Add",
|
||||||
|
"systemnotes": "System Notes",
|
||||||
|
"usernotes": "User Notes"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"create": "Note created successfully.",
|
"create": "Note created successfully.",
|
||||||
|
|||||||
@@ -1919,7 +1919,9 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"addtorelatedro": "",
|
"addtorelatedro": "",
|
||||||
"newnoteplaceholder": "Agrega una nota...",
|
"newnoteplaceholder": "Agrega una nota...",
|
||||||
"notetoadd": ""
|
"notetoadd": "",
|
||||||
|
"systemnotes": "",
|
||||||
|
"usernotes": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"create": "Nota creada con éxito.",
|
"create": "Nota creada con éxito.",
|
||||||
|
|||||||
@@ -1919,7 +1919,9 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"addtorelatedro": "",
|
"addtorelatedro": "",
|
||||||
"newnoteplaceholder": "Ajouter une note...",
|
"newnoteplaceholder": "Ajouter une note...",
|
||||||
"notetoadd": ""
|
"notetoadd": "",
|
||||||
|
"systemnotes": "",
|
||||||
|
"usernotes": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"create": "Remarque créée avec succès.",
|
"create": "Remarque créée avec succès.",
|
||||||
|
|||||||
Reference in New Issue
Block a user