From 606b6177e199df4cf74a96b34ab5d7bc83d0ae67 Mon Sep 17 00:00:00 2001 From: michel-lewis Date: Wed, 8 May 2024 14:20:13 +0100 Subject: [PATCH 1/3] fix: retrait du module de payment dans l affichage des familles polygames --- src/components/PremiumsPaymentsOverview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PremiumsPaymentsOverview.js b/src/components/PremiumsPaymentsOverview.js index b3775a1..65dfdb2 100644 --- a/src/components/PremiumsPaymentsOverview.js +++ b/src/components/PremiumsPaymentsOverview.js @@ -198,7 +198,7 @@ class PremiumsPaymentsOverview extends PagedDataHandler { rights, fetchingPremiumsPayments, } = this.props; - if (!family.uuid) return null; + if (!family.uuid ||(!!family.headInsuree && family.headInsuree.marital === 'P')) return null; const canAdd = rights.includes(RIGHT_PAYMENT_ADD); let actions = [ { From 647c200f84c7e645a114e0b11bc3a19da51c748e Mon Sep 17 00:00:00 2001 From: michel-lewis Date: Fri, 10 May 2024 18:51:10 +0100 Subject: [PATCH 2/3] fix:blocage du module en cas de familles polygame --- src/components/PremiumsPaymentsOverview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PremiumsPaymentsOverview.js b/src/components/PremiumsPaymentsOverview.js index 65dfdb2..811d35f 100644 --- a/src/components/PremiumsPaymentsOverview.js +++ b/src/components/PremiumsPaymentsOverview.js @@ -198,7 +198,7 @@ class PremiumsPaymentsOverview extends PagedDataHandler { rights, fetchingPremiumsPayments, } = this.props; - if (!family.uuid ||(!!family.headInsuree && family.headInsuree.marital === 'P')) return null; + if (!family.uuid ||(!!family.familyType && family.familyType.code == 'P')) return null; const canAdd = rights.includes(RIGHT_PAYMENT_ADD); let actions = [ { From 614595d04011a160593ec1aecfc8ead0677438ff Mon Sep 17 00:00:00 2001 From: michel-lewis Date: Wed, 6 Nov 2024 11:26:42 +0100 Subject: [PATCH 3/3] fix(payment): ajout de la constante P et correction dans le code --- src/components/PremiumsPaymentsOverview.js | 4 +++- src/constants.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/PremiumsPaymentsOverview.js b/src/components/PremiumsPaymentsOverview.js index 811d35f..37e8eb1 100644 --- a/src/components/PremiumsPaymentsOverview.js +++ b/src/components/PremiumsPaymentsOverview.js @@ -24,6 +24,7 @@ import DeletePaymentDialog from "./DeletePaymentDialog"; import { RIGHT_PAYMENT_DELETE, RIGHT_PAYMENT_ADD, + FAMILY_TYPE_POLYGAMY_CODE, } from "../constants"; const styles = theme => ({ @@ -195,10 +196,11 @@ class PremiumsPaymentsOverview extends PagedDataHandler { pageInfo, readOnly, premium, + edited, rights, fetchingPremiumsPayments, } = this.props; - if (!family.uuid ||(!!family.familyType && family.familyType.code == 'P')) return null; + if (!family.uuid ||(!!family.familyType && family.familyType.code == FAMILY_TYPE_POLYGAMY_CODE) || (!!edited && !!edited.familyType && edited.familyType.code == FAMILY_TYPE_POLYGAMY_CODE )) return null; const canAdd = rights.includes(RIGHT_PAYMENT_ADD); let actions = [ { diff --git a/src/constants.js b/src/constants.js index 802cdf9..0f9c237 100644 --- a/src/constants.js +++ b/src/constants.js @@ -30,3 +30,4 @@ export const MODULE_NAME = "payment"; export const PAYMENT_STATUS = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]; export const PAYMENTS_TAB_VALUE = "paymentsTab"; +export const FAMILY_TYPE_POLYGAMY_CODE = "P";