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

SIMSBIOHUB-15: Submit Request to Resubmit or Remove Observations, Summary Results or Documents #1033

Merged
merged 18 commits into from
May 24, 2023

Conversation

KjartanE
Copy link
Contributor

@KjartanE KjartanE commented May 15, 2023

Overview

Links to Jira tickets

Description of relevant changes

  • When Logged in to non-admin account on a project
  • If I upload an (Attachment / Observation / Summary ) to Project or Survey Page
  • When I Click the Kebab Icon, I see Option to Remove or Resubmit button
  • When clicked, Dialog for resubmission should display
  • When filled out, and Submit is clicked
  • Then an email should be sent to yourself and the @Biohub email

PR Checklist

A list of items that are good to consider when making any changes.

Note: this list is not exhaustive, and not all items are always applicable.

Code

  • New files/classes/functions have appropriately descriptive names and comment blocks to describe their use/behaviour
  • I have avoided duplicating code when possible, moving re-usable pieces into functions
  • I have avoided hard-coding values where possible and moved any re-usable constants to a constants file
  • My code is as flat as possible (avoids deeply nested if/else blocks, promise chains, etc)
  • My code changes account for null/undefined values and handle errors appropriately
  • My code uses types/interfaces to help describe values/parameters/etc, help ensure type safety, and improve readability

Style

  • My code follows the established style conventions
  • My code uses native material-ui components/icons/conventions when possible

Documentation

  • I have commented my code sufficiently, such that an unfamiliar developer could understand my code
  • I have added/updated README's and related documentation, as needed

Tests

  • I have added/updated unit tests for any code I've added/updated
  • I have added/updated the Postman requests/tests to account for any API endpoints I've added/updated

Linting/Formatting

  • I have run the linter and fixed any issues, as needed
    See the lint commands in package.json
  • I have run the formatter and fixed any issues, as needed
    See the format commands in package.json

SonarCloud

  • I have addressed all SonarCloud Bugs, Vulnerabilities, Security Hotspots, and Code Smells

@codecov
Copy link

codecov bot commented May 15, 2023

Codecov Report

Merging #1033 (4a0493c) into dev (d2708e8) will decrease coverage by 0.11%.
The diff coverage is 53.84%.

@@            Coverage Diff             @@
##              dev    #1033      +/-   ##
==========================================
- Coverage   68.10%   67.99%   -0.11%     
==========================================
  Files         387      392       +5     
  Lines       12001    12126     +125     
  Branches     2038     2063      +25     
==========================================
+ Hits         8173     8245      +72     
- Misses       3333     3380      +47     
- Partials      495      501       +6     
Impacted Files Coverage Δ
api/src/constants/notifications.ts 100.00% <ø> (ø)
api/src/repositories/survey-repository.ts 94.85% <ø> (ø)
...pi/src/services/administrative-activity-service.ts 100.00% <ø> (ø)
...pp/src/components/publish/PublishProjectButton.tsx 9.09% <0.00%> (-0.59%) ⬇️
app/src/contexts/projectAuthStateContext.tsx 11.11% <0.00%> (ø)
app/src/features/admin/users/AccessRequestList.tsx 76.59% <ø> (ø)
.../summary-results/components/FileSummaryResults.tsx 5.26% <0.00%> (-2.43%) ⬇️
...ponents/publish/components/AttachmentsFileCard.tsx 25.00% <25.00%> (ø)
app/src/hooks/api/usePublishApi.ts 35.71% <25.00%> (-4.29%) ⬇️
app/src/components/publish/PublishSurveyButton.tsx 37.25% <33.33%> (-1.53%) ⬇️
... and 8 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@KjartanE KjartanE marked this pull request as ready for review May 18, 2023 20:32
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@NickPhura
Copy link
Collaborator

NickPhura commented May 23, 2023

@KjartanE Looks good, and seems to work as expected. I did push a commit to wrap the resubmit buttons in system role guards (to match the submit buttons/statuses being hidden, for now).

Actually, a really good tech debt ticket might be to add a new type of guard to check for the environment, or even a feature flag env var. Then we could hide elements of the UI based on something other than role. Created a ticket: https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-79

@NickPhura NickPhura self-assigned this May 23, 2023
@NickPhura NickPhura merged commit f3ca89f into dev May 24, 2023
@NickPhura NickPhura deleted the SIMSBIOHUB-15 branch May 24, 2023 15:52
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.

4 participants