From 161398925c0a40b56f69c086f1ae1acfe6f85b80 Mon Sep 17 00:00:00 2001 From: abhishek Date: Thu, 15 Feb 2024 12:19:50 +0530 Subject: [PATCH] [#1176] Remove Reset Button in Last Response Column --- frontend/src/components/EditableCell.jsx | 2 +- frontend/src/pages/approvals/ApprovalDetail.jsx | 3 +-- frontend/src/pages/submissions/SubmissionEditing.jsx | 3 +-- frontend/src/pages/submissions/UploadDetail.jsx | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/EditableCell.jsx b/frontend/src/components/EditableCell.jsx index b7c3662be..59b5bcfe2 100644 --- a/frontend/src/components/EditableCell.jsx +++ b/frontend/src/components/EditableCell.jsx @@ -16,7 +16,7 @@ const EditableCell = ({ disabled = false, readonly = false, isPublic = false, - resetButton, + resetButton = {}, lastValue = false, }) => { const [editing, setEditing] = useState(false); diff --git a/frontend/src/pages/approvals/ApprovalDetail.jsx b/frontend/src/pages/approvals/ApprovalDetail.jsx index 74b6ddb07..035dd5fb4 100644 --- a/frontend/src/pages/approvals/ApprovalDetail.jsx +++ b/frontend/src/pages/approvals/ApprovalDetail.jsx @@ -515,6 +515,7 @@ const ApprovalDetail = ({ ), width: "25%", }, + Table.EXPAND_COLUMN, { title: text?.lastResponseCol, render: (row) => ( @@ -526,12 +527,10 @@ const ApprovalDetail = ({ resetCell={resetCell} disabled={true} readonly={true} - resetButton={resetButton} /> ), width: "25%", }, - Table.EXPAND_COLUMN, ]} expandable={{ expandIcon: ({ onExpand, record }) => { diff --git a/frontend/src/pages/submissions/SubmissionEditing.jsx b/frontend/src/pages/submissions/SubmissionEditing.jsx index eb64a7e8a..05fd1193d 100644 --- a/frontend/src/pages/submissions/SubmissionEditing.jsx +++ b/frontend/src/pages/submissions/SubmissionEditing.jsx @@ -79,6 +79,7 @@ const SubmissionEditing = ({ ), width: "25%", }, + Table.EXPAND_COLUMN, { title: text?.lastResponseCol, render: (row) => ( @@ -90,12 +91,10 @@ const SubmissionEditing = ({ resetCell={resetCell} disabled={true} readonly={true} - resetButton={resetButton} /> ), width: "25%", }, - Table.EXPAND_COLUMN, ]} expandable={{ expandIcon: ({ onExpand, record }) => { diff --git a/frontend/src/pages/submissions/UploadDetail.jsx b/frontend/src/pages/submissions/UploadDetail.jsx index 34ddcff96..bc0519be5 100644 --- a/frontend/src/pages/submissions/UploadDetail.jsx +++ b/frontend/src/pages/submissions/UploadDetail.jsx @@ -446,6 +446,7 @@ const UploadDetail = ({ record, setReload }) => { ), width: "25%", }, + Table.EXPAND_COLUMN, { title: text?.lastResponseCol, render: (row) => ( @@ -457,12 +458,10 @@ const UploadDetail = ({ record, setReload }) => { resetCell={resetCell} disabled={true} readonly={true} - resetButton={resetButton} /> ), width: "25%", }, - Table.EXPAND_COLUMN, ]} expandable={{ expandIcon: ({ onExpand, record }) => {