diff --git a/src/components/payroll/BenefitConsumptionSearcher.js b/src/components/payroll/BenefitConsumptionSearcher.js index 8f78aec..1893acd 100644 --- a/src/components/payroll/BenefitConsumptionSearcher.js +++ b/src/components/payroll/BenefitConsumptionSearcher.js @@ -10,6 +10,7 @@ import PhotoCameraOutlinedIcon from '@material-ui/icons/PhotoCameraOutlined'; import { fetchBenefitConsumptions } from '../../actions'; import { BENEFIT_CONSUMPTION_STATUS, DEFAULT_PAGE_SIZE, ROWS_PER_PAGE_OPTIONS } from '../../constants'; import BenefitConsumptionFilter from './BenefitConsumptionFilter'; +import AdditionalFieldsDialog from './dialogs/AdditionalFieldsDialog'; function BenefitConsumptionSearcher({ fetchBenefitConsumptions, @@ -39,6 +40,7 @@ function BenefitConsumptionSearcher({ 'benefitConsumption.status', 'benefitConsumption.payedOnTime', 'benefitConsumption.paymentDate', + '', ]; const checkBenefitDueDate = (benefitConsumption) => { @@ -74,6 +76,11 @@ function BenefitConsumptionSearcher({ ? '' : benefitConsumption?.benefitAttachment[0]?.bill?.datePayed ), + (benefitConsumption) => ( + + ), ]; const rowIdentifier = (benefitConsumption) => benefitConsumption.id; diff --git a/src/components/payroll/BenefitConsumptionSearcherModal.js b/src/components/payroll/BenefitConsumptionSearcherModal.js index e5cde6d..7e99d94 100644 --- a/src/components/payroll/BenefitConsumptionSearcherModal.js +++ b/src/components/payroll/BenefitConsumptionSearcherModal.js @@ -19,6 +19,7 @@ import { import BenefitConsumptionFilterModal from './BenefitConsumptionFilterModal'; import ErrorSummaryModal from './dialogs/ErrorSummaryModal'; import { mutationLabel } from '../../utils/string-utils'; +import AdditionalFieldsDialog from './dialogs/AdditionalFieldsDialog'; function BenefitConsumptionSearcherModal({ fetchBenefitAttachments, @@ -86,6 +87,7 @@ function BenefitConsumptionSearcherModal({ 'benefitConsumption.paymentDate', 'benefitConsumption.status', '', + '', ]; const confirmDeleteBenefitConsumption = (benefit) => { @@ -132,6 +134,11 @@ function BenefitConsumptionSearcherModal({ : benefitAttachment?.bill?.datePayed ), (benefitAttachment) => benefitAttachment?.benefit?.status, + (benefitAttachment) => ( + + ), (benefitAttachment) => ( + +
+ + {formatMessage(intl, 'payroll', 'payroll.additonalFields.label')} + + +
+ + {jsonExtFields?.map((jsonExtField) => ( + + {renderInputComponent(MODULE_NAME, jsonExtField)} + + ))} + +
+
+ +
+
+ +
+
+
+ + +
+ + ); +} + +const mapStateToProps = (state) => ({ + rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [], +}); + +const mapDispatchToProps = (dispatch) => bindActionCreators({ +}, dispatch); + +export default injectIntl( + withTheme( + withStyles(styles)( + connect(mapStateToProps, mapDispatchToProps)(AdditionalFieldsDialog), + ), + ), +); diff --git a/src/translations/en.json b/src/translations/en.json index de2537d..f95a468 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -147,5 +147,9 @@ "payroll.benefitConsumption.confirm": "Confirm", "payroll.benefitConsumption.cancel": "Cancel", "payroll.benefitConsumption.delete.confirm.title": "Delete Benefit Consumption", - "payroll.benefitConsumption.delete.confirm.message": "Are you sure you want to delete the Benefit Consumption? Once you click confirm, additional approval on the task level is required to permanently delete it." + "payroll.benefitConsumption.delete.confirm.message": "Are you sure you want to delete the Benefit Consumption? Once you click confirm, additional approval on the task level is required to permanently delete it.", + + "payroll.additonalFields.label": "Additional Fields", + "payroll.additonalFields.showAdditionalFields": "Show Additional Fields", + "payroll.additonalFields.close": "Close" } \ No newline at end of file