Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zeva minor credit agreements comment display bug #2359

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/app/components/VehicleSupplierTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ VehicleSupplierTabs.defaultProps = {
VehicleSupplierTabs.propTypes = {
active: PropTypes.string.isRequired,
locationState: PropTypes.arrayOf(PropTypes.shape()),
supplierId: PropTypes.number,
supplierId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
user: CustomPropTypes.user.isRequired
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const CreditAgreementsDetailsPage = (props) => {
} = props

const [showModal, setShowModal] = useState(false)

const showComments = details?.filteredIdirComments &&
details?.filteredIdirComments.length > 0
const showCommentInput = details?.status !== 'ISSUED'
const modal = (
<Modal
confirmLabel={(analystAction ? 'Submit' : 'Issue')}
Expand Down Expand Up @@ -81,23 +83,22 @@ const CreditAgreementsDetailsPage = (props) => {
/>
</div>
</div>
{user && user.isGovernment && details && (
{user && user.isGovernment && (showComments || showCommentInput) && (
<div className="row mt-3 mb-2">
<div className="col-sm-12">
<div
className="grey-border-area p-3 comment-box mt-2"
id="comment-input"
>
{ details?.filteredIdirComments &&
details?.filteredIdirComments.length > 0 && (
{ showComments && (
<EditableCommentList
comments={details.filteredIdirComments}
user={user}
handleCommentEdit={handleInternalCommentEdit}
handleCommentDelete={handleInternalCommentDelete}
/>
)}
{details?.status !== 'ISSUED' && (
{showCommentInput && (
<div>
<CommentInput
handleAddComment={handleAddComment}
Expand Down
Loading