-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(signature-collection): Application for Parliamentary Create List #15333
Conversation
WalkthroughThis set of changes introduces a new form structure for creating a parliamentary list, encapsulated in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Form as Prerequisites Form
participant Api as API
participant State as State Manager
User->>Form: Start application
Form->>Form: Show data collection screen
User->>Form: Approve data collection
Form->>Api: Fetch necessary data
Api-->>Form: Return data
Form->>Form: Display constituency selection
User->>Form: Select constituency
Form->>Form: Display manager & supervisor details form
User->>Form: Enter manager & supervisor details
Form->>Form: Show overview
User->>Form: Review and submit
Form->>Api: Submit application
Api-->>Form: Acknowledge submission
Form->>State: Update state to PREREQUISITES
State-->>Form: Confirmation
Form-->>User: Display confirmation message
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Datadog ReportAll test runs ✅ 21 Total Test Services: 0 Failed, 21 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (1)
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15333 +/- ##
==========================================
- Coverage 37.01% 37.00% -0.02%
==========================================
Files 6540 6542 +2
Lines 133720 133757 +37
Branches 38255 38301 +46
==========================================
- Hits 49502 49501 -1
- Misses 84218 84256 +38
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 40 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Affected services are: air-discount-scheme-api,air-discount-scheme-backend,api,application-system-api,download-service,financial-aid-api,financial-aid-backend,financial-aid-open-api,judicial-system-api,judicial-system-digital-mailbox-api,judicial-system-backend,judicial-system-message-handler,judicial-system-robot-api,judicial-system-scheduler,judicial-system-xrd-api,license-api,regulations-admin-backend,services-auth-admin-api,services-auth-delegation-api,services-auth-ids-api,services-auth-personal-representative,services-auth-personal-representative-public,services-auth-public-api,services-endorsements-api,services-search-indexer,services-sessions,services-university-gateway,services-user-notification,services-user-profile,air-discount-scheme-web,skilavottord-web,web,application-system-form,island-ui-storybook,portals-admin,service-portal,system-e2e, |
…gnature_collection_parliamentary
…om/island-is/island.is into signature_collection_parliamentary
…/island-is/island.is into signature_collection_parliamentary
…om/island-is/island.is into signature_collection_parliamentary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Draft.ts (1 hunks)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/index.ts (1 hunks)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.ts (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Draft.ts
- libs/application/templates/signature-collection/parliamentary-list-creation/src/index.ts
Additional context used
Path-based instructions (1)
libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (8)
libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.ts (8)
20-24
: LGTM! WeekLifeCycle configuration is appropriate.The lifecycle configuration for a week is correctly defined.
26-39
: LGTM! Template configuration is well-defined.The template configuration for the parliamentary list creation application is comprehensive and correctly defined.
40-79
: LGTM! State machine configuration forPREREQUISITES
state is well-defined.The state machine configuration for the
PREREQUISITES
state is comprehensive and correctly defined.
80-116
: LGTM! State machine configuration forDRAFT
state is well-defined.The state machine configuration for the
DRAFT
state is comprehensive and correctly defined.
142-150
: LGTM!mapUserToRole
function is correctly defined.The function maps the user to the applicant role correctly.
153-153
: LGTM! Export statement is correctly defined.The file correctly exports
createListTemplate
as the default export.
117-139
: Verify the commented-outonEntry
block inDONE
state.The
onEntry
block is commented out. Verify if this is intentional and if it needs to be implemented.
1-19
: Ensure all imports are necessary and correctly referenced.All imports seem to be relevant to the functionality provided in this file. However, verify if all the imported modules are used and necessary.
Verification successful
All imports are necessary and correctly referenced.
All imported modules in the file
createCollectionTemplate.ts
are utilized within the file, confirming their necessity.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if all imported modules are used in the file. # Test: List all imports and check their usage in the file. rg --type python 'import' libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.tsLength of output: 168
Script:
#!/bin/bash # Description: Verify if all imported modules are used in the file. # Test: List all imports and check their usage in the file. rg --type typescript 'import' libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.tsLength of output: 176
Script:
#!/bin/bash # Description: Verify if all imported modules are used in the file. # List all imports in the file. imports=$(rg --type ts '^import' libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.ts) # Check usage of each import. for import in $(echo "$imports" | awk '{print $2}'); do echo "Checking usage for import: $import" rg "$import" libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.ts doneLength of output: 2665
Script:
#!/bin/bash # Description: Verify if all imported modules are used in the file. # List all imports in the file. imports=$(rg --type ts '^import' libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.ts) # Extract module names and check their usage in the file. echo "$imports" | awk -F '[{}]' '{for(i=2;i<=NF;i+=2) print $i}' | tr ',' '\n' | while read -r module; do module=$(echo "$module" | xargs) # Trim whitespace if [ -n "$module" ]; then echo "Checking usage for module: $module" rg "\b$module\b" libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/createCollectionTemplate.ts fi doneLength of output: 4010
libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Draft.ts
Show resolved
Hide resolved
.../application/templates/signature-collection/parliamentary-list-creation/src/lib/constants.ts
Outdated
Show resolved
Hide resolved
.../application/templates/signature-collection/parliamentary-list-creation/src/lib/constants.ts
Show resolved
Hide resolved
...application/templates/signature-collection/parliamentary-list-creation/src/lib/dataSchema.ts
Show resolved
Hide resolved
libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/errors.ts
Outdated
Show resolved
Hide resolved
libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Prerequisites.ts (1 hunks)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/constants.ts (1 hunks)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/errors.ts (1 hunks)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Prerequisites.ts
- libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/constants.ts
- libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/errors.ts
- libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts
…#15333) * initial commit * chore: nx format:write update dirty files * merge fix * chore: nx format:write update dirty files * test * temp * temp2 * fix(ui-fields): TableRepeaterField with NationalIdWithName component * hehe, revert * tweak * tweak for item type * chore: nx format:write update dirty files * lint * person in table repeater * small refactor moving functions to utils * tweaks * tweaks * cleanup * temp * chore: nx format:write update dirty files * rabbit * cleanup2 * tables * texts * fix for undefined * t * review tweaks * chore: nx format:write update dirty files * tweak overview * refactor * cleanup * keep handleCustomMappedValues in utils tho * tweak * added comment in utils * rabbit review * cleanup * dataschema * format * tweaks * tweaks vol 2 * removed any's * linting tweaks * adding translationNamespaces * removed custom component * chore: nx format:write update dirty files * renamed template * review tweaks --------- Co-authored-by: andes-it <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Still a WIP - behind feature flag
Feature branch: https://signaturecollectionparliamentary-beta.dev01.devland.is/umsoknir/althingis-medmaelasofnun/
Checklist:
Summary by CodeRabbit
New Features
react-intl
.Bug Fixes
Enhancements