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

Fix: Relocate 'Comments to the Director' widget - #1454 #1483

Merged
17 changes: 16 additions & 1 deletion frontend/src/views/Transfers/AddEditViewTransfer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useNavigate,
useParams
} from 'react-router-dom'
import { roles } from '@/constants/roles'
import { roles, govRoles } from '@/constants/roles'
import { ROUTES } from '@/constants/routes'
import { TRANSACTIONS } from '@/constants/routes/routes'
import { TRANSFER_STATUSES } from '@/constants/statuses'
Expand Down Expand Up @@ -47,6 +47,7 @@ import { buttonClusterConfigFn } from './buttonConfigs'
import { CategoryCheckbox } from './components/CategoryCheckbox'
import { Recommendation } from './components/Recommendation'
import SigningAuthority from './components/SigningAuthority'
import InternalComments from '@/components/InternalComments'

export const AddEditViewTransfer = () => {
const queryClient = useQueryClient()
Expand Down Expand Up @@ -444,6 +445,20 @@ export const AddEditViewTransfer = () => {
</>
)}

{/* Internal Comments */}
{!editorMode && (
<Role roles={govRoles}>
{transferId && (
<BCBox py={2}>
<InternalComments
entityType="Transfer"
entityId={transferId}
/>
</BCBox>
)}
</Role>
)}

{/* Signing Authority Confirmation show it to FromOrg user when in draft and ToOrg when in Sent status */}
{(!currentStatus ||
(currentStatus === TRANSFER_STATUSES.DRAFT &&
Expand Down
12 changes: 2 additions & 10 deletions frontend/src/views/Transfers/components/TransferView.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import BCBox from '@/components/BCBox'
import InternalComments from '@/components/InternalComments'
import { Role } from '@/components/Role'
import { roles, govRoles } from '@/constants/roles'

import { roles } from '@/constants/roles'
import {
TRANSFER_STATUSES,
getAllTerminalTransferStatuses
Expand Down Expand Up @@ -89,13 +88,6 @@ export const TransferView = ({ transferId, editorMode, transferData }) => {
/>
)}

{/* Internal Comments */}
<Role roles={govRoles}>
{transferId && (
<InternalComments entityType="Transfer" entityId={transferId} />
)}
</Role>

{/* List of attachments */}
{/* <AttachmentList attachments={demoData.attachments} /> */}

Expand Down
Loading