Skip to content

Commit

Permalink
fix: relocate 'Comments to the Director' widget to correct position
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-valiollahi committed Dec 17, 2024
1 parent 9e10bc6 commit cef77fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
19 changes: 18 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,22 @@ 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

0 comments on commit cef77fd

Please sign in to comment.