Skip to content

Commit

Permalink
Merge pull request #1483 from bcgov/fix/hamed-relocate-comments-widge…
Browse files Browse the repository at this point in the history
…t-1454

Fix: Relocate 'Comments to the Director' widget - #1454
  • Loading branch information
hamed-valiollahi authored Dec 18, 2024
2 parents deab8ae + 3bc241e commit f3b404d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
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

0 comments on commit f3b404d

Please sign in to comment.