IO-744 Voiding Note
This commit is contained in:
@@ -9,16 +9,23 @@ import { Button, Table } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
jobRO: selectJobReadOnly,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setNoteUpsertContext: (context) =>
|
||||
dispatch(setModalContext({ context: context, modal: "noteUpsert" })),
|
||||
});
|
||||
|
||||
export function JobNotesComponent({
|
||||
jobRO,
|
||||
loading,
|
||||
data,
|
||||
refetch,
|
||||
@@ -78,13 +85,13 @@ export function JobNotesComponent({
|
||||
<span>
|
||||
<Button
|
||||
loading={deleteLoading}
|
||||
disabled={record.audit}
|
||||
disabled={record.audit || jobRO}
|
||||
onClick={() => handleNoteDelete(record.id)}
|
||||
>
|
||||
<DeleteFilled />
|
||||
</Button>
|
||||
<Button
|
||||
disabled={record.audit}
|
||||
disabled={record.audit || jobRO}
|
||||
onClick={() => {
|
||||
setNoteUpsertContext({
|
||||
actions: { refetch: refetch },
|
||||
|
||||
Reference in New Issue
Block a user