Skip to content

Commit

Permalink
CM-770: adjustments on frontend level - tip, upgrading fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
sniedzielski committed Mar 14, 2024
1 parent 9a04a03 commit 43b5fb6
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 30 deletions.
66 changes: 38 additions & 28 deletions src/components/PaymentPlanHeadPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,35 +278,45 @@ class PaymentPlanHeadPanel extends FormPanel {
/>
</Grid>
</Grid>
<Divider />
<Fragment>
<div className={classes.item}>
<FormattedMessage module="contributionPlan" id="paymentPlan.advancedCriteria" />
</div>
<Divider />
<Grid container className={classes.item}>
{paymentPlanType.replace(/\s+/g, '') === PAYMENT_PLAN_TYPE.BENEFIT_PLAN && (
<AdvancedCriteriaDialog
object={paymentPlan.benefitPlan}
objectToSave={paymentPlan}
moduleName="social_protection"
objectType="BenefitPlan"
setAppliedCustomFilters={this.setAppliedCustomFilters}
appliedCustomFilters={appliedCustomFilters}
appliedFiltersRowStructure={appliedFiltersRowStructure}
setAppliedFiltersRowStructure={this.setAppliedFiltersRowStructure}
updateAttributes={this.updateJsonExt}
getDefaultAppliedCustomFilters={this.getDefaultAppliedCustomFilters}
edited={this.props.edited}
/>
)}
</Grid>
</Fragment>
<Divider />
{paymentPlanType.replace(/\s+/g, '') === PAYMENT_PLAN_TYPE.BENEFIT_PLAN && (
<>
<Divider />
<Fragment>
<Typography>
<div className={classes.item}>
<FormattedMessage module="contributionPlan" id="paymentPlan.advancedCriteria" />
</div>
</Typography>
<div className={classes.item}>
<FormattedMessage module="contributionPlan" id="paymentPlan.advancedCriteria.tip" />
</div>
<Divider />
<Grid container className={classes.item}>

<AdvancedCriteriaDialog
object={paymentPlan.benefitPlan}
objectToSave={paymentPlan}
moduleName="social_protection"
objectType="BenefitPlan"
setAppliedCustomFilters={this.setAppliedCustomFilters}
appliedCustomFilters={appliedCustomFilters}
appliedFiltersRowStructure={appliedFiltersRowStructure}
setAppliedFiltersRowStructure={this.setAppliedFiltersRowStructure}
updateAttributes={this.updateJsonExt}
getDefaultAppliedCustomFilters={this.getDefaultAppliedCustomFilters}
edited={this.props.edited} />

</Grid>
</Fragment>
<Divider />
</>
)}
<Fragment>
<div className={classes.item}>
<FormattedMessage module="contributionPlan" id="calculationParams" />
</div>
<Typography>
<div className={classes.item}>
<FormattedMessage module="contributionPlan" id="calculationParams" />
</div>
</Typography>
<Divider />
<Grid container className={classes.item}>
<Contributions
Expand Down
5 changes: 3 additions & 2 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,15 @@
"paymentPlan.type.product": "Product",
"paymentPlan.type.benefitplan": "Benefit Plan",
"paymentPlan.advancedCriteria": "Advanced Criteria",
"paymentPlan.advancedCriteria.tip": "Please click the 'Confirm Filters' button to apply your chosen criteria.",
"paymentPlan.advancedCriteria.field": "Field",
"paymentPlan.advancedCriteria.filter": "Filter",
"paymentPlan.advancedCriteria.filter": "Confirm Filters",
"paymentPlan.advancedCriteria.value": "Value",
"paymentPlan.advancedCriteria.amount": "Amount",
"paymentPlan.advancedCriteria.button.AdvancedCriteria": "Advanced Criteria",
"paymentPlan.advancedCriteria.button.addFilters": "Add filter",
"paymentPlan.advancedCriteria.button.clearAllFilters": "Clear All Criteria",
"paymentPlan.advancedCriteria.button.cancel": "Cancel",
"paymentPlan.advancedCriteria.button.filter": "Filter",
"paymentPlan.advancedCriteria.button.filter": "Confirm Filters",
"paymentPlanPicker.label": "Payment Plan Picker"
}

0 comments on commit 43b5fb6

Please sign in to comment.