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(ui): fix New Submission button display #794

Merged
merged 11 commits into from
Sep 27, 2024
Merged

Conversation

asharonbaltazar
Copy link
Collaborator

Purpose

New Submission button was observed to show up for users who didn't have permission to create new submissions

Linked Issues to Close

https://qmacbis.atlassian.net/browse/OY2-30386

Approach

Seems like the isCms property is missing from the user object received from the API. @13bfrancis, is this an intentional change or a bug? If the latter, we should remove all reliance on isCms since it's used extensively across the app.

Copy link
Contributor

github-actions bot commented Sep 26, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 62.18% 4506 / 7246
🔵 Statements 61.81% 4773 / 7721
🔵 Functions 54.5% 1233 / 2262
🔵 Branches 33.52% 856 / 2553
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
react-app/src/main.tsx 0% 0% 0% 0% 13-18, 15-16, 20-42, 21-29, 44
react-app/src/api/useGetCounties.ts 10.52% 0% 0% 11.76% 8-20, 11-15, 14-15, 15, 25, 27-29, 28, 32-41, 34-40, 37, 37, 39, 44-45, 48-52, 50-51
react-app/src/components/ActionForm/ActionForm.test.tsx 67.93% 100% 51.16% 67.93% 25-27, 26, 42-43, 60-61, 85-86, 113-114, 134-135, 160-161, 183-184, 221-222, 263, 297, 347-348, 371-372, 389-390, 414-415, 433-434, 458-459, 481-482, 499-500, 522-523, 550-551, 575-576
react-app/src/components/ActionForm/index.tsx 57.57% 78.94% 77.77% 56.25% 137-168, 138-140, 142, 145-147, 149-150, 152-156, 158, 160-167, 263-264
react-app/src/components/Layout/index.tsx 13.95% 0% 7.69% 15% 23, 26-49, 49, 51, 55, 57-59, 58, 61-63, 62, 65, 65, 119-121, 179-182, 184-191, 185, 187-190, 193-196, 194-195, 198, 198, 200-203, 201-207, 205-206, 209-250, 297, 297
react-app/src/components/RHF/SlotField.tsx 71.42% 62.16% 60% 73.68% 100-102, 107-112, 109-111, 113, 174, 206
react-app/src/components/RHF/tests/FieldArray.test.tsx 100% 100% 100% 100%
react-app/src/components/RHF/tests/NameGen.test.tsx 86.11% 100% 58.33% 86.11% 61-62, 87, 104, 123
react-app/src/components/RHF/tests/Section.test.tsx 100% 100% 100% 100%
react-app/src/components/RHF/tests/Slot.test.tsx 100% 100% 100% 100%
react-app/src/components/RHF/tests/SlotField.test.tsx 100% 100% 100% 100%
react-app/src/features/dashboard/index.tsx 23.52% 0% 16.66% 23.52% 22-27, 23-26, 25, 29, 32-34, 33, 36, 43-45, 47-49, 78-85, 79-84
react-app/src/features/selection-flow/plan-types.tsx 45.45% 0% 0% 45.45% 25-28, 38-39, 41-43, 63-68, 71-76, 79-84, 87-92, 94-99, 101-106, 108-113, 115-120
react-app/testing/setup.ts 92.1% 90% 100% 100% 35-84
Generated in workflow #308

Copy link
Collaborator

@tiffanyvu tiffanyvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!

Copy link
Collaborator

@13bfrancis 13bfrancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good man. Glad we consolidated it to not use the userContext anymore

Copy link

codeclimate bot commented Sep 27, 2024

Code Climate has analyzed commit c8afd46 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 59.6% (50% is the threshold).

This pull request will bring the total coverage in the repository to 62.1% (0.2% change).

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants