-
Notifications
You must be signed in to change notification settings - Fork 42
Kpis integrate #1919
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
Kpis integrate #1919
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces several updates across multiple files, primarily focused on enhancing the user interface and functionality related to health metrics. Key changes include updating the version of a CSS stylesheet in HTML files, adding new React components for displaying Key Performance Indicators (KPIs), and modifying SCSS styles for improved layout. Additionally, new hooks and configuration files are introduced to facilitate data fetching and visualization for health metrics. Changes
Possibly related PRs
Suggested reviewers
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: 23
🧹 Outside diff range comments (3)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)
Line range hint
1-900
: Consider breaking down the component for better maintainabilityThe PopInbox component is quite large and handles multiple responsibilities. Consider breaking it down into smaller, more focused components.
Consider:
- Extracting the workflow-related logic into a custom hook
- Moving the table-related code into a separate component
- Creating a separate component for the action buttons
- Moving the toast and confirmation dialogs into their own components
This will improve:
- Code maintainability
- Testing capabilities
- Code reusability
- Performance through better memoization opportunities
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)
Line range hint
1-785
: Consider splitting the component into smaller, more manageable piecesThe PlanInbox component is quite large and handles multiple responsibilities including:
- State management
- Data fetching
- UI rendering
- Workflow actions
- Timeline management
Consider breaking it down into smaller, more focused components to improve maintainability and reusability.
Suggested structure:
- Create separate components for:
- Search and filter section
- Data table section
- Action buttons section
- Timeline popup
- Move complex state management to custom hooks
- Extract workflow-related logic to a separate utility
Example structure:
// Components const PlanInboxSearch = ({ onSearch, onClear, ...props }) => { ... } const PlanInboxTable = ({ data, onSelect, ...props }) => { ... } const PlanInboxActions = ({ selectedItems, onAction, ...props }) => { ... } // Hooks const usePlanWorkflow = (planId) => { ... } const usePlanData = (searchParams) => { ... } // Main component const PlanInbox = () => { const { workflowState, handleAction } = usePlanWorkflow(planId); const { data, loading } = usePlanData(searchParams); return ( <> <PlanInboxSearch /> <PlanInboxTable /> <PlanInboxActions /> </> ); }health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss (1)
Line range hint
1-2606
: Improve code maintainability and consistency.Several areas in the codebase could benefit from better organization and consistency:
- Inconsistent indentation in nested classes
- Hardcoded color values instead of using variables
- Inconsistent BEM naming conventions
Consider these improvements:
- Use the existing color variables consistently:
- border: 1px solid #d6d5d4; + border: 1px solid $border-color; - background-color: #fafafa; + background-color: rgba(250, 250, 250, 1);
- Follow BEM naming conventions consistently:
- .assumptionsForm-label-field + .assumptions-form__label-field - .assumptionsForm-card + .assumptions-form__card
- Consider extracting common styles into mixins:
@mixin card-base { background-color: rgba(255, 255, 255, 1); border-radius: 0.25rem; box-shadow: 0 0.063rem 0.125rem 0 $box-shadow-color; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
⛔ Files ignored due to path filters (1)
health/micro-ui/web/micro-ui-internals/packages/css/package.json
is excluded by!**/*.json
📒 Files selected for processing (10)
health/micro-ui/web/micro-ui-internals/example/public/index.html
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/DssChartConfig.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchDssChartV2.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js
(3 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js
(3 hunks)health/micro-ui/web/public/index.html
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/DssChartConfig.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchDssChartV2.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)
Pattern **/*.js
: check
📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (2)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.370Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.024Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
🪛 Gitleaks (8.21.2)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/DssChartConfig.js
114-114: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
130-130: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🔇 Additional comments (12)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js (1)
1-2
:
Fix the incorrect import path
The import path for searchDssChartV2
appears to be incorrect. The current path suggests it's in a services
subdirectory, but the import statement uses a relative path from the current directory.
Let's verify the correct path:
health/micro-ui/web/public/index.html (1)
13-13
: Verify visual changes after CSS version update.
The CSS version update from 0.1.46 to 0.1.47 might introduce visual changes. Please ensure that:
- The UI layout and styling remain consistent
- No visual regressions are introduced
- The changes align with the KPI integration objectives
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (2)
27-34
: LGTM! Hooks are properly implemented
The hooks usage follows React best practices:
- useTranslation is correctly implemented for i18n
- useKpiDssSearch receives all necessary props
1-6
: Verify the custom hook implementation
The code imports a custom hook useKpiDssSearch
. Let's ensure it's properly implemented and exported.
✅ Verification successful
Let me verify the actual implementation of the hook since we found the file exists.
Custom hook implementation verified successfully
The useKpiDssSearch
hook is properly implemented in the expected location with correct export and functionality. The hook:
- Is implemented in
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js
- Accepts the required configuration parameters
- Uses React Query for data fetching
- Is properly exported as default
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the custom hook implementation
# Expected: Find the hook implementation in the hooks directory
# Search for the hook implementation
ast-grep --pattern 'export $_ function useKpiDssSearch' || \
ast-grep --pattern 'export default function useKpiDssSearch'
# Backup search in case the export syntax is different
rg -l "useKpiDssSearch" "health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/"
Length of output: 253
Script:
#!/bin/bash
# Get the implementation details of the hook
rg -A 10 "useKpiDssSearch" "health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js"
Length of output: 841
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (2)
9-9
: LGTM!
The import statement for GenericKpiFromDSS
is clean and follows the correct relative path structure.
200-200
: Verify the module identifier and prop values.
The component integration looks good, but let's verify:
- The static module identifier "MICROPLAN-FACILITY" is correct
- The required props are properly handled when their source values are undefined
✅ Verification successful
Let me gather more information about how the module identifier is used and how the component handles props.
Based on the results, I can now provide the final verification response:
The module identifier and prop handling have been verified successfully
- The "MICROPLAN-FACILITY" module identifier is correctly used and matches the configuration in DssChartConfig.js
- The GenericKpiFromDSS component properly handles undefined props:
- planEmployee has a default empty object:
planEmployee={}
- All props from url and campaignObject are safely accessed using optional chaining
- The component includes proper null/loading state handling
- planEmployee has a default empty object:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the module identifier and component usage
# Check if the module identifier is consistently used across the codebase
rg -l "MICROPLAN-FACILITY"
# Check the GenericKpiFromDSS component implementation for proper prop handling
ast-grep --pattern 'const GenericKpiFromDSS = ({ module, planId, campaignType, planEmployee }) => {
$$$
}'
Length of output: 346
Script:
#!/bin/bash
# Check how MICROPLAN-FACILITY is used in the config file
rg -A 5 "MICROPLAN-FACILITY" health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/DssChartConfig.js
# Look for GenericKpiFromDSS component definition and implementation
ast-grep --pattern 'const GenericKpiFromDSS = $_'
# Check for any default prop values or prop type definitions
rg "GenericKpiFromDSS.defaultProps|GenericKpiFromDSS.propTypes" -A 3
Length of output: 7977
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/DssChartConfig.js (2)
1-232
: Overall configuration structure looks good!
The configuration is well-structured with consistent patterns across all modules. The static analysis warnings about API keys are false positives as they are just age ranges in locale keys.
🧰 Tools
🪛 Gitleaks (8.21.2)
114-114: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
130-130: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
98-184
: Verify buffer calculation logic for SPAQ metrics.
The configuration includes metrics with and without buffer for SPAQ calculations. Please ensure that the corresponding implementation correctly handles these buffer calculations.
🧰 Tools
🪛 Gitleaks (8.21.2)
114-114: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
130-130: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (3)
11-11
: LGTM!
The import statement for the GenericKpiFromDSS component is correctly placed with other imports.
571-571
: 🧹 Nitpick (assertive)
Consider extracting role determination logic
The role determination logic before the return statement could be extracted into a separate function for better maintainability and reusability.
Consider refactoring to:
+const determineUserRole = (roles) => {
+ if (roles.some(role => role.code === "ROOT_POPULATION_DATA_APPROVER")) {
+ return "ROOT_POPULATION_DATA_APPROVER";
+ }
+ if (roles.some(role => role.code === "POPULATION_DATA_APPROVER")) {
+ return "POPULATION_DATA_APPROVER";
+ }
+ return "";
+};
-const roles = Digit.UserService.getUser().info.roles;
-const userName = Digit.UserService.getUser().info.name;
-let userRole = "";
-
-roles.forEach(role => {
- if (role.code === "ROOT_POPULATION_DATA_APPROVER") {
- userRole = "ROOT_POPULATION_DATA_APPROVER";
- } else if (userRole !== "ROOT_POPULATION_DATA_APPROVER" && role.code === "POPULATION_DATA_APPROVER") {
- userRole = "POPULATION_DATA_APPROVER";
- }
-});
+const { roles, name: userName } = Digit.UserService.getUser().info;
+const userRole = determineUserRole(roles);
Likely invalid or redundant comment.
586-586
: 🧹 Nitpick (assertive)
Verify the KPI component integration
The GenericKpiFromDSS component is integrated with appropriate props. However, we should ensure that the component handles undefined props gracefully.
Consider adding default values for the props to handle cases where planEmployee or boundariesForKpi might be undefined:
-<GenericKpiFromDSS module="CENSUS" planId={microplanId} campaignType={campaignObject?.projectType} planEmployee={planEmployee} boundariesForKpi={defaultBoundaries}/>
+<GenericKpiFromDSS
+ module="CENSUS"
+ planId={microplanId}
+ campaignType={campaignObject?.projectType}
+ planEmployee={planEmployee || {}}
+ boundariesForKpi={defaultBoundaries || []}
+/>
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)
800-800
: Verify KPI component integration
The GenericKpiFromDSS component is being integrated with several props. Ensure that all required props are properly validated and the component handles undefined states gracefully.
✅ Verification successful
Based on the search results, I can now generate the final response as we have found the component implementation. The search shows that the GenericKpiFromDSS component does handle undefined states through default props (planEmployee={}
and boundariesForKpi=[]
) and uses optional chaining for nested properties. Here's the final response:
Props handling is properly implemented in GenericKpiFromDSS
The component already implements proper handling of undefined states:
- Default empty object for
planEmployee
prop - Default empty array for
boundariesForKpi
prop - Uses optional chaining (
?.
) when accessing nested properties - Performs existence checks before using critical data (
if(jurisdictionCodes && hierarchyLevel)
)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for prop validation in GenericKpiFromDSS component
ast-grep --pattern 'const GenericKpiFromDSS = ({ module, planId, campaignType, planEmployee, boundariesForKpi }) => {
$$$
}'
Length of output: 128
Script:
#!/bin/bash
# Let's try to find the GenericKpiFromDSS component definition using ripgrep
rg "GenericKpiFromDSS" -A 10
# Also search for any PropTypes validation
rg "GenericKpiFromDSS.propTypes"
Length of output: 11413
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js
Show resolved
Hide resolved
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js
Outdated
Show resolved
Hide resolved
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js
Show resolved
Hide resolved
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js
Show resolved
Hide resolved
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchDssChartV2.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchDssChartV2.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchDssChartV2.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchDssChartV2.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchDssChartV2.js
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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (3)
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (1)
Pattern **/*.js
: check
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1)
Pattern **/*.js
: check
🔇 Additional comments (8)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (5)
1-6
: LGTM! Imports are well-organized.
The necessary dependencies are properly imported, including React core, UI components, and custom hooks.
7-8
: Add prop type validation for better type safety.
Consider adding PropTypes to validate the component's props at runtime.
29-34
: Add error state handling for better user experience.
The error state from useKpiDssSearch hook should be handled to provide proper feedback to users.
14-25
: 🛠️ Refactor suggestion
Simplify boundaries initialization and add validation.
The current implementation has complex nested optional chaining and lacks proper validation.
Consider this improved version that includes additional validation:
- if (localBoundariesForKpi.length === 0) {
- const hierarchyLevel = planEmployee?.planData?.[0]?.hierarchyLevel;
- const jurisdictionCodes = planEmployee?.planData?.[0]?.jurisdiction;
- if(jurisdictionCodes && hierarchyLevel){
- for (const code of jurisdictionCodes) {
- localBoundariesForKpi.push({
- type: hierarchyLevel,
- code: code
- });
- }
- }
- }
+ if (localBoundariesForKpi.length === 0) {
+ const planData = planEmployee?.planData?.[0];
+ const hierarchyLevel = planData?.hierarchyLevel;
+ const jurisdictionCodes = planData?.jurisdiction;
+
+ if (!hierarchyLevel) {
+ console.warn('Missing hierarchy level in plan data');
+ return null;
+ }
+
+ if (!Array.isArray(jurisdictionCodes) || jurisdictionCodes.length === 0) {
+ console.warn('Invalid or empty jurisdiction codes');
+ return null;
+ }
+
+ localBoundariesForKpi.push(
+ ...jurisdictionCodes.map(code => ({
+ type: hierarchyLevel,
+ code
+ }))
+ );
+ }
40-53
: 🛠️ Refactor suggestion
Enhance accessibility and component performance.
The render logic could benefit from accessibility improvements and performance optimizations.
Additionally, consider memoizing the data transformation:
+ const memoizedKpiData = React.useMemo(() =>
+ Object.entries(data).map(([key, value]) => ({
+ key,
+ value: String(value).padStart(2, '0'),
+ label: t(key)
+ })),
+ [data, t]
+ );
+
return (
- <Card>
+ <Card role="region" aria-label={t('KPI_METRICS')}>
<div className="kpi-container">
- {Object.keys(data).map((key) => (
+ {memoizedKpiData.map(({ key, value, label }) => (
<div key={key} className={`kpi-card`}>
- <h2>{String(data[key]).padStart(2, '0')}</h2>
+ <h2 aria-label={`${label}: ${value}`}>{value}</h2>
<p className='kpi-text'>
- {t(key)}
+ {label}
</p>
</div>
))}
</div>
</Card>
);
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (2)
9-9
: LGTM!
Clean import of the GenericKpiFromDSS component using relative path.
200-202
: Verify GenericKpiFromDSS component usage
The component integration looks good, but let's verify the required props and their usage.
Let's check how this component is used across the codebase:
✅ Verification successful
Let me gather more information about the component definition to verify the props.
Let me check the actual component implementation to verify the props.
Props usage in GenericKpiFromDSS component is correct
The component implementation shows that all required props (module
, planId
, campaignType
, planEmployee
) are properly handled. The boundariesForKpi
prop is optional with a default empty array. The usage in FacilityCatchmentMapping.js matches the component's implementation.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify GenericKpiFromDSS component usage and prop requirements
# Check component definition and required props
ast-grep --pattern 'const GenericKpiFromDSS = ({ $_ }) => {
$$$
}'
# Find other usages of GenericKpiFromDSS
rg -A 5 '<GenericKpiFromDSS'
Length of output: 2942
Script:
#!/bin/bash
# Search for GenericKpiFromDSS component definition
ast-grep --pattern 'const GenericKpiFromDSS = ({ $_ }) => {
$$$
}'
# Search for GenericKpiFromDSS prop types or interface
rg -A 10 'GenericKpiFromDSS.propTypes'
rg -A 10 'interface GenericKpiFromDSS'
# Search for the component file
fd GenericKpiFromDSS
Length of output: 275
Script:
#!/bin/bash
# Get the component implementation
cat health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Length of output: 1820
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss (1)
2609-2616
: 🛠️ Refactor suggestion
Enhance KPI card implementation for better responsiveness and accessibility.
While the current implementation provides basic styling, it could be improved for better responsiveness and accessibility.
Consider these improvements:
.kpi-card {
text-align: center;
+ min-width: 120px;
+ width: calc(25% - 1rem);
+ max-width: 200px;
display: grid;
justify-content: center;
flex-shrink: 0;
+ padding: 1rem;
+ border-radius: 4px;
+ transition: transform 0.2s ease;
+
+ &:hover, &:focus {
+ transform: translateY(-2px);
+ }
+
+ @media (max-width: 768px) {
+ width: calc(50% - 1rem);
+ }
+
+ @media (max-width: 480px) {
+ width: 100%;
+ }
.kpi-text {
font-size: 1rem;
line-height: 1.2;
text-align: center;
+ word-break: break-word;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
}
}
These changes will:
- Make cards responsive across different screen sizes
- Add hover/focus states for better interactivity
- Handle text overflow gracefully
- Improve overall visual hierarchy
Likely invalid or redundant comment.
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Outdated
Show resolved
Hide resolved
...micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js
Show resolved
Hide resolved
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss
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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (1)
Pattern **/*.js
: check
🔇 Additional comments (4)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (4)
14-25
: Add validation and simplify nested optional chaining
The current implementation needs validation for empty/invalid jurisdictionCodes and has complex nested optional chaining that could be simplified.
36-38
: Consider using skeleton loading for better UX
While the current loading state is functional, implementing a skeleton loading pattern would provide a smoother user experience.
41-52
: Enhance accessibility and performance
Consider adding ARIA labels and memoizing the component to prevent unnecessary re-renders.
43-50
: 🛠️ Refactor suggestion
Optimize rendering performance
Using Object.keys().map()
can be inefficient for large datasets. Consider using Object.entries()
to avoid accessing the object twice.
- {Object.keys(data).map((key) => (
- <div key={key} className={`kpi-card`}>
- <h2>{String(data[key]).padStart(2, '0')}</h2>
+ {Object.entries(data).map(([key, value]) => (
+ <div key={key} className="kpi-card">
+ <h2>{String(value).padStart(2, '0')}</h2>
Likely invalid or redundant comment.
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Show resolved
Hide resolved
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Show resolved
Hide resolved
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
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
🧹 Outside diff range comments (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)
Line range hint
21-1000
: Consider breaking down the component for better maintainabilityThe PlanInbox component has grown quite large and handles multiple responsibilities including:
- State management for filters, pagination, and selections
- Workflow actions and status management
- Data fetching and transformation
- UI rendering and event handling
Consider:
- Extracting state management logic into custom hooks (e.g., usePlanInboxState, useWorkflowActions)
- Breaking down the UI into smaller, focused components (e.g., PlanInboxFilters, PlanInboxTable)
- Moving table column definitions to a separate configuration file
This would improve code maintainability, reusability, and testing.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)
Pattern **/*.js
: check
🔇 Additional comments (3)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (3)
18-18
: LGTM: Import statement is properly placed
The import for GenericKpiFromDSS follows React component naming conventions and is correctly grouped with other imports.
785-785
: LGTM: KPI component integration looks good
The GenericKpiFromDSS component is properly integrated with all necessary props derived from the component's state and props.
770-770
: 🛠️ Refactor suggestion
Remove commented out duplicate TimelinePopUpWrapper implementation
This is a duplicate of the TimelinePopUpWrapper implementation that appears later in the render method. Remove this commented-out code to maintain code cleanliness.
- if (showTimelinePopup) {
- return (
- <TimelinePopUpWrapper
- key={`${selectedBusinessId}-${Date.now()}`}
- onClose={() => {
- setShowTimelinePopup(false);
- setSelectedBoundaryCode(null);
- setSelectedBusinessId(null); // Reset the selectedBusinessId when popup is closed
- }}
- businessId={selectedBusinessId} // Pass selectedBusinessId as businessId
- heading={`${t("HCM_MICROPLAN_STATUS_LOG_FOR_LABEL")} ${t(selectedBoundaryCode)}`}
- labelPrefix={"PLAN_ACTIONS_"}
- />
- );
- }
Likely invalid or redundant comment.
fd7f0de
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: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (1)
Pattern **/*.js
: check
🔇 Additional comments (2)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (2)
1-6
: LGTM! Imports are well-organized.
The imports are appropriate and necessary for the component's functionality.
36-38
: 🛠️ Refactor suggestion
Improve loading state condition
The current condition doesn't handle cases where data is undefined or null.
-if (loader) {
+if (loader || !data) {
return <Loader />
}
Likely invalid or redundant comment.
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Show resolved
Hide resolved
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Show resolved
Hide resolved
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Show resolved
Hide resolved
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js (1)
Pattern **/*.js
: check
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Show resolved
Hide resolved
...cro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/GenericKpiFromDSS.js
Show resolved
Hide resolved
* fixed assumption audit fixes (#1758) * fixed draft issue of Setup campaign (#1757) Co-authored-by: Jagankumar <[email protected]> * Summary css fix (#1755) * updated css for summary screen * removed log * added null check --------- Co-authored-by: rachana-egov <[email protected]> * Breadcrumb for usermanagement (#1761) * Breadcrumb changes * console.log removed * indentations * Finalised microplan download (#1762) * Feat : Added download button for finalised microplans * Added Todo * fixed HCMPRE-776 and removed updated old validation (#1763) * fixed HCMPRE-776 and removed updated old validation * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update MyCampaign.js * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update CampaignDates.js * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update SetupCampaign.js --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix key (#1764) Co-authored-by: NabeelAyubee <[email protected]> * Fixed UiCustomisation Digit issue (#1766) Checking UisCustomisation * Fixed double selection of boundaries (#1765) Update MultiSelectDropdown.js * Fixed loader,breadcrumb,table cells css and added placeholder text fo… (#1769) Fixed loader,breadcrumb,table cells css and added placeholder text for assumption fields * fixed targetvalidation and added no results in boundary (#1768) * Dynamic column pop inbox (#1770) * Added dynamic column inside pop inbox * updated status to action in status logs * updated status log * added comment logs for edit population * updated css version * updated code rabbit comment and css version --------- Co-authored-by: rachana-egov <[email protected]> * Feature/bug (#1773) * z-index and camapaign-name in preview * ui-ux-demo-review * version updates * ver * Update ViewHierarchy.js --------- Co-authored-by: Jagankumar <[email protected]> * Updated the search dropdown (#1776) updated the search dropdown Co-authored-by: rachana-egov <[email protected]> * Info ToolTip added (#1775) * Added info icon on formula and assumptions * Incremented CSS version * Vesrion update (#1778) * updated react-components version to fix icon issues in inbox screen * updated versions everywhere * myMicroplanFixes (#1777) * My microplan data fixes, localisation fixes * setup response screen fixes, breadcrumb localisation code correctify * search bar fix * fixes * ADD NEW LOCALE * roletable fixes for mobile number search, qa issue fix * FIXES * quickfixes * quick fixes/ Tagging UI UX fixes * fix * added locale * census table assignee issue fixes * role table pop up css fix and my microplan click fix * fixes and stepper click enable for back * added user tag fixes * UserAccessfixes * Custom Assumption - Custom Formula * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Updated date formate (#1779) * updated date formate and css * updated css --------- Co-authored-by: rachana-egov <[email protected]> * Fix for cycle draft ::changes for the draft flow (#1780) * Fixed assumption form multi save (#1781) Update SetupMicroplan.js * user tagging fixes (#1782) Co-authored-by: NabeelAyubee <[email protected]> * Usermanagement row on click redirect (#1783) * Changes to usermanagement redirext on row click * changes to onRow click in userManagement * console removed * changes * null check * changes * removing extra mdms call * changing useState * removed var * changes * changes * Plan and Pop inbox changes (#1784) * removed popup for facilitya and population upload * updated plan inbox --------- Co-authored-by: rachana-egov <[email protected]> * Feature/bugs (#1785) * bug/boundary * changed field name * added something * Update checklistSearchConfig.js * Update ViewHierarchy.js * fixes * fixes1 * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/ViewHierarchy.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed order in boundary details and changed hierarchy master (#1786) * added the checks for the update campaign flow (#1788) * Open Boundary Management ui Info pending changes (#1789) * pending changes * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useBoundaryHome.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/GeoPode.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/GeoPode.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Reverted action in assign to all, updated the column heading with pro… (#1790) * reverted action in assign to all, updated the column heading with projecttype * removed logs --------- Co-authored-by: rachana-egov <[email protected]> * Usermanagement css and boundaryScreen css (#1791) Changes to userManagement, css for boundary * Vehicle Change Assumptions & Formula (#1787) * user tagging fixes * Vehicle Assumptions and Vehicle Formula * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * yarn --------- Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * css fixes (#1792) Co-authored-by: Jagankumar <[email protected]> * LCOALISATION FIXES (#1793) * user tagging fixes * Vehicle Assumptions and Vehicle Formula * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * yarn * locaisaton code fixes --------- Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * some-ui-fixes (#1794) * some-ui-fixes * version updates * fixed boundary selection dropdown issue (#1796) * fixed boundary selection dropdown issue * fixed search juridiction dropdown --------- Co-authored-by: rachana-egov <[email protected]> * Allowed to update the name of microplan (#1795) * Allowed to update the name of microplan * changed hardcoded date to 30 from 100 --------- Co-authored-by: rachana-egov <[email protected]> * demo issue fixes (#1797) Co-authored-by: rachana-egov <[email protected]> * ui fixes (#1798) * Added retry of failed campaign * stepper rvert back (#1799) * ESTIMATION & FORMULA FIXES (#1804) * user tagging fixes * Vehicle Assumptions and Vehicle Formula * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * yarn * locaisaton code fixes * estimationa and formula fixes --------- Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * error toast and checklist updates (#1805) error taost and cehcklist updates * HCMPRE 1131 (#1807) * user tagging fixes * Vehicle Assumptions and Vehicle Formula * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * yarn * locaisaton code fixes * estimationa and formula fixes * my microplan fix * fixes --------- Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Updated sidebar for microplan (#1802) * Updated sidebar for microplan * Update index.scss --------- Co-authored-by: rachana-egov <[email protected]> Co-authored-by: Nipun Arora <[email protected]> * style change of toolTip (#1806) * toast and minor ui (#1809) * ui/ux fixes (#1810) * Changes to AssummptionList and stepper disable in setupConfig (#1811) * Changes to assumptions list * setupCompleted changes * Formula View, and Select Acitivity Screen CSS changes (#1803) * select-activity-commit * Hover over formulaConfigView * margin adjust * removed console * css changes * package update * changes to css * package css update * Revert "Allowed to update the name of microplan (#1795)" (#1812) This reverts commit e32aad6. Co-authored-by: Nipun Arora <[email protected]> * updated message for header and label and added validation for max length (#1813) * Cleaned up boundary Management code and add some validations * redirect and ui (#1814) * Assumptionlist fix (#1815) changes * changes in the delivery type and selection of boundary (#1816) * to be picked (#1819) * to be picked * checklist and other changes * role table fixes, drop down fix, pop up fix, use tag fix (#1820) * user tagging fixes * Vehicle Assumptions and Vehicle Formula * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * yarn * locaisaton code fixes * estimationa and formula fixes * my microplan fix * fixes * pull fixes * user tag changes * fixes --------- Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fetch data type from mdms (#1822) * fixed app delivery condition (#1825) * not selected added in single value list (#1824) * not selected added in single value list * isActive added * one more fix * Facility dropdown (#1817) * Added single dropdown in facilityCatchment * tenantId fix * Hierarchies fix * Microplan name update (#1821) * updated start date for campaign * added update microplan name changes --------- Co-authored-by: rachana-egov <[email protected]> * Internal demo fixes (#1827) * disabled the viewer card * updated suggested microplan name formate * updated assignee to assigner in timeline wrapper * updated button side in my microplan screen * updated sucurity and accessibility edit buttons * commented tranportation mode from accessibility details * added assignee next to village updated comment * updated plan inbox --------- Co-authored-by: rachana-egov <[email protected]> * tenant logo css fix (#1828) * Facility data fix (#1829) FacilityData Fix * Added boundary manager access to the home card * Updated activity selection screen to have view also (#1830) updated activity selection screen to have view also Co-authored-by: rachana-egov <[email protected]> * Added confirmation pop up to finalise actions (#1832) added confimation pop up to finalize actions Co-authored-by: rachana-egov <[email protected]> * Popup for userAccess boundary area and toast message for assign unassign (#1831) * Changed localization * Loc * Changes for popup in userAccess * changes * My MICROPLAN fixes, formula fixes (#1835) * Hcmpre 1290 (#1834) * fixed app delivery condition * added my microplan screen * changes in the url * changes --------- Co-authored-by: Jagankumar <[email protected]> * Inbox (#1838) * fixed app delivery condition * fixed hover issue on search screen * demo review changes in boudnary management (#1836) * demo review changes in boudnary management * different download template for hierarchy from geopode and completely new * info cards added * code clean * Update searchSavedPlansWithCampaign.js (#1839) Co-authored-by: Nipun Arora <[email protected]> * Space (#1840) * fixed app delivery condition * added space * fixed miner issues (#1837) * fixed miner issues * fixed pop inbox issue * fixed status log issue * Update PopInbox.js --------- Co-authored-by: rachana-egov <[email protected]> Co-authored-by: Nipun Arora <[email protected]> * Update searchSavedPlansWithCampaign.js (#1841) Co-authored-by: Nipun Arora <[email protected]> * Gepspatial map view (#1842) * added minor css changes and basic logic for geospatial view * updated css version * updated chooseactivity screen * fixed syntax issue * PO finding fixes (#1843) * Fix campaign Type in draft (#1846) * Plan Inbox patch fix (#1847) * added workflow for toast message * updated workflow button color * added count for assign to me and all tabs * added back button --------- Co-authored-by: rachana-egov <[email protected]> * Go Back button and microplan name quotes fix (#1844) * Updated the core and other component version for landing page card override * Po finding fixes2 (#1845) * added tooltip for residing boundary * registered hierarchy tooltip inside component * added different workflow message and alert header * updated button color for workflow actions * added info icons in select activity card * added back button * fixed action for facility * updated css version --------- Co-authored-by: rachana-egov <[email protected]> * Summary user role tagging and Response Screen (#1852) * Changes ro userAccessTableWrapper * Response Screen * comment removed * minor updates (#1853) Co-authored-by: Nipun Arora <[email protected]> * toast localistaion (#1855) * updated core component & css version * updating the module versions * Reverting the libraries version update * Updated all the core component version from 1.8.3 to 1.8.10 * PO fixes (#1857) * reverted column freeze as it was causing issues (#1858) reverted column fix as it was causing issues * Added column in sorted way, added assignee, added total pop (#1859) Co-authored-by: NabeelAyubee <[email protected]> * added serving facility (#1860) Co-authored-by: NabeelAyubee <[email protected]> * updated code (#1861) * Formcomposer action bar fixes (#1862) * added serving facility * form composer action bar fix --------- Co-authored-by: NabeelAyubee <[email protected]> * Updated few localisation messages * added loader screen to ftech data from microplan integration screen * Updated UI Customizations file * Approved microplan integration * Added toast & success for api response * plan inbox assignee fix (#1863) * added serving facility * form composer action bar fix * plan inbox assignee fix --------- Co-authored-by: NabeelAyubee <[email protected]> * formula and assumption refresh issue (#1864) * added serving facility * form composer action bar fix * plan inbox assignee fix * formula and assumption refresh issue --------- Co-authored-by: NabeelAyubee <[email protected]> * minor changes (#1866) * Action bar fixes, session fixes (#1867) * added serving facility * form composer action bar fix * plan inbox assignee fix * formula and assumption refresh issue * action bar hidden fixes, session fixes * Update index.js * Update index.js --------- Co-authored-by: NabeelAyubee <[email protected]> * Download Button (#1865) * Loc changes to popInbox * Loc * Changes * UICust update * css package update * Changes * changes * Update UICustomizations.js * Name of file * For Download update * UI cust changes * added return in UI * Changes --------- Co-authored-by: Nipun Arora <[email protected]> * User Role being displayed in Pop, Plan and Fac (#1854) * changes localizations * Adding userName and their roles * resolved conflict * css package update * UIcustomization dropdown changes * pop-inbox changes * package update * loc added * loc changes * dropdown options changed * UICust making same as in example * UnassignPopup * comments * loc * Loader added * changes * changes to roletablecomposer for unassign popup * changes * Facility Catchment * reverted facility popup * Changes * KPI Card * package update * Facility data keys * changes according to comments * Changes * rowOn click redirection * Dummy Data removed * removed import * removed for residing boundary * removed 5000 * package update for css --------- Co-authored-by: Nipun Arora <[email protected]> * fixes (#1869) * added serving facility * form composer action bar fix * plan inbox assignee fix * formula and assumption refresh issue * action bar hidden fixes, session fixes * fixes * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js --------- Co-authored-by: NabeelAyubee <[email protected]> * patch fix (#1868) * route back to home on back * fixed refresh issue for pop inbox --------- Co-authored-by: rachana-egov <[email protected]> * polling fix (#1870) * polling fix * Update TimelineComponent.js * assumptions fixes (#1871) Co-authored-by: Nipun Arora <[email protected]> * Facility pop up fix (#1872) * Localizations and Actions being cut (#1874) * Changes * Package update * Disabled updating security and accessibility details after finalize … (#1873) Disabled updating security and accessibility details after finalize facility catchment Co-authored-by: rachana-egov <[email protected]> * Update PopInbox.js (#1875) Co-authored-by: Nipun Arora <[email protected]> * scroll (#1876) Co-authored-by: Nipun Arora <[email protected]> * Update FacilityPopup.js (#1877) * qquickfix (#1878) * added serving facility * form composer action bar fix * plan inbox assignee fix * formula and assumption refresh issue * action bar hidden fixes, session fixes * fixes * fix --------- Co-authored-by: NabeelAyubee <[email protected]> * Updated the microplan integration piece * adhoc changes (#1879) * some fixes * Update PlanInbox.js * added checklist redirection (#1880) * added checklist redirection * removed console * Updated workbench module version * Plan and Pop inbox fix (#1881) * fixed pop inbox boundary getting empty issue * fixed back button issue * updated search juridiction component * fixed facility pop up boundary refresh * removed pending for approval from status filter --------- Co-authored-by: rachana-egov <[email protected]> * updated table and other fixes (#1882) * updated table and other fixes * fixed table issue * Latest KPI values and Heading change (#1883) * Popup changed to alert type * UserName to name * userName to name * changes to heading font wieght * css package update * Removed i icon * changes * removed comments * removed comments * changes * isLoading removed * updated css --------- Co-authored-by: Nipun Arora <[email protected]> * Added count of villages and facilities in confirmation messages (#1885) Co-authored-by: rachana-egov <[email protected]> * Update UserUpload.js (#1886) * fixed localization issue (#1888) Co-authored-by: rachana-egov <[email protected]> * Removed Core HRMS and updated the timeout of fetch from microplan * changed residing-boundary to multiselect dropdown, fixed table scroll… (#1889) * changed residing-boundary to multiselect dropdown, fixed table scroll styles, made boundary selection popup dropdown searcheable * fixed dropdown alignment * fixed validation in boundary create and timeline button in the summary (#1890) * fixed validation in boundary create and timeline button in the summary * changed localisation condition * Added missing the translation * Added list of assignee for pop and plan inbox (#1887) * added list of assignee for pop and plan inbox * updated comments * updated assignee for plan inbox --------- Co-authored-by: rachana-egov <[email protected]> * Re render assumption fix, atleast one mdms check, blank custom name check, (#1884) * added serving facility * form composer action bar fix * plan inbox assignee fix * formula and assumption refresh issue * action bar hidden fixes, session fixes * fixes * fix * action bar fix, formula next back issue * assumption and formula one mdms check and refetch blank label check * remove status log column * fix * adhoc fix * fix * fix * del session --------- Co-authored-by: NabeelAyubee <[email protected]> * fixed validation cond for app (#1891) * fixed filestore call issue (#1895) * toast fix, user tagging table dropdown fix and added comment toast (#1896) * FIXES (#1893) * added serving facility * form composer action bar fix * plan inbox assignee fix * formula and assumption refresh issue * action bar hidden fixes, session fixes * fixes * fix * action bar fix, formula next back issue * assumption and formula one mdms check and refetch blank label check * remove status log column * fix * adhoc fix * fix * fix * del session * FIXES 1. After clicking on nextin vehicle after addinginvalid valu3 it redirects me to 1st assumption page 2. yes no buttton ki jagah same rakho na dono pop up me in formula and assumption pop up 3. User can add same duplicate text assumption and same value comess. similary for same dropdowns can be selected multiple times(in vehicle). Applies for formula and assumption 4. cache issue in pop of add new in assumption and formula. Entered value is not reset if they close and reopen the popup. Applies for formula and assumption 5. need different loc code for description for vehicle assumption and vehicle estimation * revert * a --------- Co-authored-by: NabeelAyubee <[email protected]> * ui fixes. (#1897) * ui fixes. * review changes * review changes1 * Fetch microplan related changes (#1898) * mychange * added changes for fetch from microplan screen * updated packege * added back button, redirected checklist success and fixed null issue … (#1894) added back button, redirected checklist success and fixed null issue for app * fixed finalized button issue (#1899) * added fixes for the campaign update and fetch from mp * added timeout cleaned up & fetch will start after the data template download * Employee search fix (#1892) * button change * Changes * Formula name validation * Changes * console log removed * changes * changes * changes * Original formula config * Formula config change for toast * Update FormulaConfiguration.js --------- Co-authored-by: Nipun Arora <[email protected]> * Bug fix (#1900) * fixed decimal issue and total not getting validated issue * fixed user tagging multiselect dropdown issue --------- Co-authored-by: rachana-egov <[email protected]> * Added few extra waiting steps for templates * KPI card fix, and css change (#1903) * Heading added * changes to query, for kpi card * css change * css package update * update to inbox codes (#1904) updates * Added dynamic columns in facility screen (#1902) * Added dynamic columns in facility screen * changed the filter condition * Update FacilityPopup.js --------- Co-authored-by: rachana-egov <[email protected]> Co-authored-by: Nipun Arora <[email protected]> * validations done for assumptions and formula (#1906) Co-authored-by: Nipun Arora <[email protected]> * localisation and error codes (#1905) * Added fixes for timeout and redirection for fetch microplan (#1901) * Added fixes for timeout and redirection for fetch microplan * Update useFetchFromMicroplan.js * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Added fixes for the template generation * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * wait and retry message (#1909) * Updated toast wran to warning message toast type * checking popup issue in facility screen (#1910) Co-authored-by: Swathi-eGov <[email protected]> * Adhoc fixes 91 (#1912) * updates to validation * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated regex --------- Co-authored-by: Nipun Arora <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Pop inbox Pagination fix (#1907) Co-authored-by: rachana-egov <[email protected]> * Facility Pagination Fix (#1908) Co-authored-by: rachana-egov <[email protected]> * Feature/er (#1914) * wait and retry message * type of structure changed for irs * fixed plan inbox issues (#1915) Co-authored-by: rachana-egov <[email protected]> * Table changes (#1913) * a lot of changes * small change * changes * loc * removed * added fixes for sort, view summary issue, no results in dropdown (#1916) added fixes * fixed facility catchment pop up issue (#1917) Co-authored-by: rachana-egov <[email protected]> * Fixed Audit issues (#1918) Co-authored-by: rachana-egov <[email protected]> * removed alphanumeric valiadtion (#1922) Co-authored-by: Nipun Arora <[email protected]> * updated the loader screen loader styles as per ux audit * Kpis integrate (#1919) * Kpis integration * Some style changes * Some validations * Remove console * Removed merged changes * Data null handled * Data null handled * Assumption Toast Validation and Irs removed 1 (#1921) * changes * changes * changes * Fixed accessibility dropdown issue (#1923) Co-authored-by: rachana-egov <[email protected]> * Added extra steps and styles updated * Added toast and changes primary, seccondary in Assumption,Formula (#1924) * changes * changes * changes * changes * Changed hierarchy schema for microplan (#1925) * Changed hierarchy schema for microplan * Update UserUpload.js * removed duplicate campaignId --------- Co-authored-by: rachana-egov <[email protected]> * Fixed small issues (#1927) Co-authored-by: rachana-egov <[email protected]> * Audit fixes main (#1926) * audit fixes * fixed campaign details css issue * Update health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated core, react-components,ui-components and releated css versions * added icon for download and changed primary to secondary for action button --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * width fix for module card (#1929) * Formula Checking Fix (#1930) * small changes * changes * changes * Edit Size button changed (#1931) changes * Update HypothesisWrapper.js (#1932) Co-authored-by: Nipun Arora <[email protected]> * Feature/fixes (#1928) * microplan hover and campign fixes with checklist minor improvements * bottom margin below add levels * review changes * Updates to formula (#1933) * Update HypothesisWrapper.js * Update FormulaConfigWrapper.js --------- Co-authored-by: Nipun Arora <[email protected]> * fixed pop issue (#1934) Co-authored-by: rachana-egov <[email protected]> * css fix on card comp (#1935) * Updated the campaign Card for the roles mapping * Fixed screen breaking issue (#1936) Co-authored-by: rachana-egov <[email protected]> * validation update (#1937) Update HypothesisWrapper.js * Fixed assignee count for pop and plan inbox (#1938) * Fixed assignee count for pop and plan inbox * fixed back button issue in plan inbox * removed logs --------- Co-authored-by: rachana-egov <[email protected]> * Changes in facility kpis (#1939) * Changes in facility kpis * Some changes * fixed product chip and summary issue (#1941) fixed productchip and summary issue * Mdms kpi (#1942) * Kpis from mdms * Some optimizations * Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Dropdown popup fixes (#1943) * removed custom loader, updated dropdown styles inside popup,fixed action drodpown css * updated css version * Added inline validations (#1944) Co-authored-by: rachana-egov <[email protected]> * Added refetch (#1945) * Assumption formula fixes (#1946) * added a toast on back button * updated formula source to CUSTOM when any custom assumption is used in --------- Co-authored-by: Nipun Arora <[email protected]> * Update createUpdatePlanProject.js (#1948) Co-authored-by: Nipun Arora <[email protected]> * Fixed back button and edit population error message logic (#1949) * fixed back button and edit population error message logic * updated back button in facility screen * added show on ui conditions on fields * added translation function --------- Co-authored-by: rachana-egov <[email protected]> * localizations for user management and user tag (#1950) * Loc in userManagement * Changes to user tag loc * added status filters (#1952) * additional validations on assumptions + showing formulas in plan inbox based on show on estimation dashboard (#1953) additional validations * Updated Bread crumbs (#1954) * fixed back button and edit population error message logic * Updated breadcrumbs * removed unused import --------- Co-authored-by: rachana-egov <[email protected]> * sort issue fix, title for buttons, actionbar fix (#1955) * Patch fix (#1956) * added list of roles for assigner * added null check --------- Co-authored-by: rachana-egov <[email protected]> * Popup fix (#1958) * fixed popup scroll issue * updated versions * Changes for kpis (#1960) * Fixed toast issue + fixed invalidation of assumption and formula (#1963) Co-authored-by: Nipun Arora <[email protected]> * Updated the loader text, updated the icon information, change log updated * fixed error message issue (#1964) Co-authored-by: rachana-egov <[email protected]> * Adhoc fixes 13: Fixed formula custom cascading changes + validations (#1966) * updated toast error in formulas * Update createUpdatePlanProject.js * updated mdms paths (#1968) * Update searchDssChartV2.js (#1969) * fixed resources,delivery screen issue and added campaign name (#1965) * fixed resources,delivery screen issue and added campaign name * added classname * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BoundarySummary.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * removed logs --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * bug bash bug of download popup openinng again and again (#1961) * bug bash bug of download popup openinng again and again * review changes * Update UploadData.js --------- Co-authored-by: Jagankumar <[email protected]> * changes from count to quantity (#1970) * changes from count to quantity * removed logs * Feature/time (#1971) * timeline fix for microplan * ui * Update campaign.scss --------- Co-authored-by: Jagankumar <[email protected]> * added campaign name in update (#1973) * Updated loc codes (#1976) Update Module.js * Revert module changes for localisation (#1977) Revert "Updated loc codes (#1976)" This reverts commit cf596aa. * Added fix for the buil issue for trying out the optional deepndency #1974 (#1978) Added fix for the buil issue for trying out the optional deepndency * Some handlings (#1980) * Updated hrms path (#1979) updated hrms path Co-authored-by: rachana-egov <[email protected]> * removed commented code * fixed usermanagement toast issue (#1982) * removed commented code * Added core ui build to check performance * Fixed error issue (#1983) * updated the package version of campaign manager modules * adding utils and remove hardcoding module name (#1984) * adding utils and remove hardcoding module name * Update UICustomizations.js * Update index.js --------- Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: Jagankumar <[email protected]> * added title for all buttons (#1985) * updated package versions * filtering fixes (#1986) Co-authored-by: NabeelAyubee <[email protected]> * Updated the config for the core app * updated directory * Feature/hcmpre1418 (#1988) rounding off to nearest integer in attributes * formatted * Update health/micro-ui/web/core/install-deps.sh Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health/micro-ui/web/core/install-deps.sh Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated changeQueryName for planfacilityserach as residingBoundaries … (#1989) * updated changeQueryName for planfacilityserach as residingBoundaries is changed to multiselect dropdown * fixed length change issue * fixed page responsiveness issue for formula configuration screen (#1990) * clearing console (#1991) Co-authored-by: NabeelAyubee <[email protected]> * fixed rerendering of summary screen in update dates (#1992) --------- Co-authored-by: Swathi-eGov <[email protected]> Co-authored-by: Bhavya-egov <[email protected]> Co-authored-by: rachana-egov <[email protected]> Co-authored-by: rachana-egov <[email protected]> Co-authored-by: abishekTa-egov <[email protected]> Co-authored-by: ashish-egov <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <[email protected]> Co-authored-by: NabeelAyubee <[email protected]> Co-authored-by: suryansh-egov <[email protected]> Co-authored-by: Nipun Arora <[email protected]> Co-authored-by: Swathi-eGov <[email protected]> Co-authored-by: Shashwat Mishra <[email protected]> Co-authored-by: Anuraj <[email protected]> Co-authored-by: Bhavya-egov <[email protected]>
Summary by CodeRabbit
Release Notes
New Features
GenericKpiFromDSS
, for displaying Key Performance Indicators (KPIs) in various pages, enhancing data visualization.Improvements
.kpi-container
and.kpi-card
classes for better presentation and usability.PlanInbox
andPopInbox
components to conditionally render the new KPI component, improving UI interactivity.These updates aim to provide users with better insights and a more cohesive experience across the application.