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

MR : #OICI-10 #OICI-9 #OICI-12 #OICI-13#OICI-15#OICI-14#OICI-17 #142

Open
wants to merge 80 commits into
base: implementation/COM/develop
Choose a base branch
from

Conversation

vaneck237
Copy link

No description provided.

michel-lewis and others added 30 commits March 27, 2024 17:56
src/actions.js Outdated
"phone",
"healthFacility" + mm.getProjection("location.HealthFacilityPicker.projection"),
];
const FAMILY_HEAD_PROJECTION =
Copy link
Member

Choose a reason for hiding this comment

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

Be consistent with the definition of projection. Keep as in FAMILY_FULL_PROJECTION a list instead of a big string. Just add the missing part to the list so it will be easier to upgrade the module.

src/actions.js Outdated
"validityFrom",
"validityTo",
`headInsuree{${FAMILY_HEAD_PROJECTION(mm).join(",")}}`,
FAMILY_HEAD_PROJECTION,
Copy link
Member

Choose a reason for hiding this comment

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

Be consistent with the definition of projection.

src/actions.js Outdated
`
}

export function formatUnlinFamily (familyUuids, cancelPolicies){
Copy link
Member

Choose a reason for hiding this comment

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

Fix spelling formatUnlinkFamily

@@ -213,7 +222,7 @@ class FamilyForm extends Component {
openFamilyButton={openFamilyButton}
overview={overview}
HeadPanel={FamilyMasterPanel}
Panels={overview ? [FamilyInsureesOverview] : [HeadInsureeMasterPanel]}
Panels={(overview && (!!family.familyType && family.familyType.code == 'P'))? [ HeadInsureeMasterPanel, SubFamiliesSummary] : overview &&(!!family.familyType && family.familyType.code !== 'P') ? [ FamilyInsureesOverview] : [HeadInsureeMasterPanel]}
Copy link
Member

Choose a reason for hiding this comment

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

Define 'P' as a constant to improve code reading.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

/>
</Grid>}

{/* <Grid item xs={2} className={classes.item}>
Copy link
Member

Choose a reason for hiding this comment

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

This should not be commented but hidden with a module configuration parameter.

Copy link
Author

Choose a reason for hiding this comment

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

src/reducer.js Outdated
@@ -309,7 +364,7 @@ function reducer(
...state,
fetchingFamilyTypes: false,
fetchedFamilyTypes: true,
familyTypes: action.payload.data.familyTypes.map((t) => t.code),
familyTypes: action.payload.data.familyTypes.filter(t => t.code !== 'C' && t.code !=='O').map((t) => t.code),
Copy link
Member

Choose a reason for hiding this comment

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

Make constants for C and O for code understanding.

src/reducer.js Outdated
@@ -398,7 +498,7 @@ function reducer(
...state,
fetchingRelations: false,
fetchedRelations: true,
relations: action.payload.data.relations.map((p) => p.id),
relations: action.payload.data.relations.filter((p) => p.id !==10).map((p) => p.id),
Copy link
Member

Choose a reason for hiding this comment

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

What is 10? Create constant.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

"insuree.Profession.2": "Employee",
"insuree.Profession.3": "Self Employee",
"insuree.Profession.4": "Other",
"insuree.Profession.1": "Liberal",
Copy link
Member

Choose a reason for hiding this comment

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

These terms should be in the language pack.

Copy link
Author

Choose a reason for hiding this comment

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

for comores RFC we have others option for profession fields options

(!!insuree.passport && (insuree.passport.length < PASSPORT_LENGTH || insuree.passport.length > PASSPORT_LENGTH))
)
return false;
if (!!insuree.preferredPaymentMethod && insuree.preferredPaymentMethod == "PB" && !insuree.bankCoordinates)
Copy link
Member

Choose a reason for hiding this comment

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

Create constants for PB.

Copy link
Author

Choose a reason for hiding this comment

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

we created INSUREE_PREFERRED_PAYMENT_METHOD in constant.js

src/constants.js Outdated
@@ -23,7 +24,7 @@ export const RIGHT_INSUREE_ADD = 101102;
export const RIGHT_INSUREE_EDIT = 101103;
export const RIGHT_INSUREE_DELETE = 101104;
export const RIGHT_INSUREE_ENQUIRE = 101105;

export const PASSPORT_LENGTH = 7
Copy link
Member

Choose a reason for hiding this comment

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

We should be able to modify by module config.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

Copy link

sonarcloud bot commented Oct 31, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
23.6% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

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.

5 participants