-
Notifications
You must be signed in to change notification settings - Fork 21
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
FEATURE/HCMPRE-1776 : Added preview component basic screen #2102
base: console
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThis pull request introduces a new Changes
Sequence DiagramsequenceDiagram
participant User
participant CampaignType
participant AppPreview
User->>CampaignType: Click Preview Button
CampaignType->>CampaignType: Set showPopUp1 to true
CampaignType->>AppPreview: Render Preview Component
AppPreview-->>User: Display Dynamic Form
User->>CampaignType: Close Popup
CampaignType->>CampaignType: Set showPopUp1 to false
Possibly related PRs
Suggested reviewers
Poem
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js (1)
Pattern **/*.js
: check
🪛 Biome (1.9.4)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js
[error] 176-176: Avoid passing children using a prop
The canonical way to pass children in React is to use JSX elements
(lint/correctness/noChildrenProp)
[error] 184-192: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
🔇 Additional comments (5)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js (2)
1-4
: Imports are well-structured.
The current set of imports fromreact
,@egovernments/digit-ui-components
, andreact-i18next
looks appropriate. No issues found regarding unused imports or naming inconsistencies.
106-121
: DOB picker fields are always disabled.
Currently, the "Years" and "Months" inputs are disabled. If you plan to enable them in the future or calculate them based on the date input, consider implementing appropriate state logic to keep these fields in sync.health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (2)
60-60
: Properly importing the new component.
Import statement forAppPreview
is correct and well-organized. No concerns here.
179-179
: Registration ofAppPreview
is seamless.
IncludingAppPreview
incomponentsToRegister
is consistent with the existing pattern. This correctly exposes the component for dynamic loading.health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss (1)
239-244
: Good usage of flex layout.
.date-style
nicely organizes DOB fields with a flex display. Ensure the container is responsive across various screen sizes.
Summary by CodeRabbit
New Features
AppPreview
component to display a structured form with dynamic input fieldsStyle