diff --git a/src/components/PremiumsPaymentsOverview.js b/src/components/PremiumsPaymentsOverview.js index b3775a1..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) 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";