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

ocrvs-7419: misc bugs #8272

Merged
merged 3 commits into from
Jan 1, 2025
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
5 changes: 4 additions & 1 deletion packages/client/src/hooks/useAuthorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const RECORD_ALLOWED_SCOPES = {
UPDATE: [
SCOPES.RECORD_REGISTER,
SCOPES.RECORD_SUBMIT_FOR_UPDATES,
SCOPES.RECORD_SUBMIT_FOR_APPROVAL
SCOPES.RECORD_SUBMIT_FOR_APPROVAL,
SCOPES.RECORD_DECLARE_BIRTH,
SCOPES.RECORD_DECLARE_DEATH,
SCOPES.RECORD_DECLARE_MARRIAGE
],
REVIEW: [
SCOPES.RECORD_REGISTER,
Expand Down
6 changes: 0 additions & 6 deletions packages/client/src/hooks/useNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ const routeAccess: NavigationConfig[] = [
{
name: WORKQUEUE_TABS.outbox,
scopes: [
SCOPES.RECORD_DECLARE_BIRTH,
SCOPES.RECORD_DECLARE_BIRTH_MY_JURISDICTION,
SCOPES.RECORD_DECLARE_DEATH,
SCOPES.RECORD_DECLARE_DEATH_MY_JURISDICTION,
SCOPES.RECORD_DECLARE_MARRIAGE,
SCOPES.RECORD_DECLARE_MARRIAGE_MY_JURISDICTION,
SCOPES.RECORD_SUBMIT_FOR_APPROVAL,
SCOPES.RECORD_SUBMIT_FOR_UPDATES,
SCOPES.RECORD_REVIEW_DUPLICATES,
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/views/OfficeHome/myDrafts/MyDrafts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const MyDrafts: React.FC<{
onClick={() =>
navigate(
formatUrl(routes.DECLARATION_RECORD_AUDIT, {
tab: 'inProgressTab',
tab: 'myDraftsTab',
declarationId: draft.id
})
)
Expand All @@ -170,7 +170,7 @@ export const MyDrafts: React.FC<{
onClick={() =>
navigate(
formatUrl(routes.DECLARATION_RECORD_AUDIT, {
tab: 'inProgressTab',
tab: 'myDraftsTab',
declarationId: draft.id
})
)
Expand Down
1 change: 0 additions & 1 deletion packages/client/src/views/RecordAudit/ActionMenu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,6 @@ describe('Update action', () => {
it('Requires update - Assigned', async () => {
const { store } = createStore()
setScopes([SCOPES.RECORD_REGISTER], store)
setScopes([SCOPES.RECORD_REGISTER], store)
const { component, router } = await createTestComponent(
<ActionMenu
declaration={{
Expand Down
7 changes: 3 additions & 4 deletions packages/client/src/views/RecordAudit/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ export const ActionMenu: React.FC<{
assignment && assignment?.practitionerId !== userDetails?.practitionerId
)

const isDownloaded =
draft?.downloadStatus === DOWNLOAD_STATUS.DOWNLOADED ||
draft?.submissionStatus === SUBMISSION_STATUS.DRAFT
const isDownloaded = draft?.downloadStatus === DOWNLOAD_STATUS.DOWNLOADED
const isDraft = draft?.submissionStatus === SUBMISSION_STATUS.DRAFT

const isActionable = isDownloaded && assignedToSelf

Expand Down Expand Up @@ -175,7 +174,7 @@ export const ActionMenu: React.FC<{
declarationId={id}
declarationStatus={status}
type={type}
isActionable={isActionable}
isActionable={isActionable || isDraft}
/>
</ProtectedComponent>
<ProtectedComponent scopes={RECORD_ALLOWED_SCOPES.ARCHIVE}>
Expand Down
3 changes: 2 additions & 1 deletion packages/client/src/views/RecordAudit/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ export const GetHistory = ({
id: userDetails.userMgntUserID,
name: userDetails.name,
avatar: userDetails.avatar,
role: userDetails.role
role: userDetails.role,
primaryOffice: userDetails.primaryOffice
},
office: userDetails.primaryOffice,
comments: [],
Expand Down
Loading