@stssocialst-stp/fe-payroll 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +105 -97
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +105 -97
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -198,6 +198,7 @@ var ACTION_TYPE = {
|
|
|
198
198
|
MAKE_PAYMENT_PAYROLL: 'PAYROLL_MUTATION_MAKE_PAYMENT_PAYROLL',
|
|
199
199
|
GET_PAYROLL_PAYMENT_FILES: 'GET_PAYROLL_PAYMENT_FILES',
|
|
200
200
|
BENEFITS_SUMMARY: 'PAYROLL_BENEFITS_SUMMARY',
|
|
201
|
+
GET_BISTP_SUMMARY: 'PAYROLL_BISTP_SUMMARY',
|
|
201
202
|
DELETE_BENEFIT_CONSUMPTION: 'BENEFIT_CONSUMPTION_MUTATION_DELETE_BENEFIT_CONSUMPTION'
|
|
202
203
|
};
|
|
203
204
|
var MUTATION_SERVICE = {
|
|
@@ -271,7 +272,11 @@ var STORE_STATE = {
|
|
|
271
272
|
benefitsSummary: [],
|
|
272
273
|
benefitsSummaryError: null,
|
|
273
274
|
fetchingBenefitsSummary: true,
|
|
274
|
-
fetchedBenefitsSummary: false
|
|
275
|
+
fetchedBenefitsSummary: false,
|
|
276
|
+
fetchingBistpSummary: false,
|
|
277
|
+
fetchedBistpSummary: false,
|
|
278
|
+
bistpSummary: {},
|
|
279
|
+
errorBistpSummary: null
|
|
275
280
|
};
|
|
276
281
|
function reducer() {
|
|
277
282
|
var _parseData, _action$payload$data$, _action$payload$data$2, _parseData2, _action$payload$data$3, _action$payload$data$4, _parseData3, _parseData4, _parseData5, _action$payload$data$5, _action$payload$data$6, _parseData6, _action$payload$data$7, _action$payload$data$8, _parseData7, _action$payload$data$9, _action$payload$data$0, _parseData8, _action$payload$data$1, _action$payload$data$10;
|
|
@@ -561,6 +566,25 @@ function reducer() {
|
|
|
561
566
|
fetchingBenefitsSummary: false,
|
|
562
567
|
benefitsSummaryError: feCore.formatServerError(action.payload)
|
|
563
568
|
});
|
|
569
|
+
case REQUEST(ACTION_TYPE.GET_BISTP_SUMMARY):
|
|
570
|
+
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
571
|
+
fetchingBistpSummary: true,
|
|
572
|
+
fetchedBistpSummary: false,
|
|
573
|
+
bistpSummary: {},
|
|
574
|
+
errorBistpSummary: null
|
|
575
|
+
});
|
|
576
|
+
case SUCCESS(ACTION_TYPE.GET_BISTP_SUMMARY):
|
|
577
|
+
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
578
|
+
fetchingBistpSummary: false,
|
|
579
|
+
fetchedBistpSummary: true,
|
|
580
|
+
bistpSummary: action.payload.data,
|
|
581
|
+
errorBistpSummary: feCore.formatGraphQLError(action.payload)
|
|
582
|
+
});
|
|
583
|
+
case ERROR(ACTION_TYPE.GET_BISTP_SUMMARY):
|
|
584
|
+
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
585
|
+
fetchingBistpSummary: false,
|
|
586
|
+
errorBistpSummary: feCore.formatServerError(action.payload)
|
|
587
|
+
});
|
|
564
588
|
case REQUEST(ACTION_TYPE.MUTATION):
|
|
565
589
|
return feCore.dispatchMutationReq(state, action);
|
|
566
590
|
case ERROR(ACTION_TYPE.MUTATION):
|
|
@@ -907,6 +931,10 @@ function makePaymentForPayroll(payroll, clientMutationLabel) {
|
|
|
907
931
|
var payrollUuids = "ids: [\"".concat(payroll === null || payroll === void 0 ? void 0 : payroll.id, "\"]");
|
|
908
932
|
return PERFORM_MUTATION(MUTATION_SERVICE.PAYROLL.MAKE_PAYMENT, payrollUuids, ACTION_TYPE.MAKE_PAYMENT_PAYROLL, clientMutationLabel);
|
|
909
933
|
}
|
|
934
|
+
function fetchBistpSummary(payrollId) {
|
|
935
|
+
var query = "\n {\n total: benefitConsumptionByPayroll(payrollUuid: \"".concat(payrollId, "\", first: 0) { totalCount }\n pendentes: benefitConsumptionByPayroll(payrollUuid: \"").concat(payrollId, "\", status: ACCEPTED, first: 0) { totalCount }\n enviados: benefitConsumptionByPayroll(payrollUuid: \"").concat(payrollId, "\", status: APPROVE_FOR_PAYMENT, first: 0) { totalCount }\n confirmados: benefitConsumptionByPayroll(payrollUuid: \"").concat(payrollId, "\", status: RECONCILED, first: 0) { totalCount }\n rejeitados: benefitConsumptionByPayroll(payrollUuid: \"").concat(payrollId, "\", status: REJECTED, first: 0) { totalCount }\n }\n ");
|
|
936
|
+
return feCore.graphql(query, ACTION_TYPE.GET_BISTP_SUMMARY);
|
|
937
|
+
}
|
|
910
938
|
|
|
911
939
|
var pageTitle = function pageTitle(item) {
|
|
912
940
|
return {
|
|
@@ -1119,7 +1147,7 @@ function PaymentPointPage(_ref) {
|
|
|
1119
1147
|
saveTooltip: formatMessage('tooltip.save')
|
|
1120
1148
|
})));
|
|
1121
1149
|
}
|
|
1122
|
-
var mapDispatchToProps$
|
|
1150
|
+
var mapDispatchToProps$i = function mapDispatchToProps(dispatch) {
|
|
1123
1151
|
return redux.bindActionCreators({
|
|
1124
1152
|
clearPaymentPoint: clearPaymentPoint,
|
|
1125
1153
|
createPaymentPoint: createPaymentPoint,
|
|
@@ -1131,7 +1159,7 @@ var mapDispatchToProps$h = function mapDispatchToProps(dispatch) {
|
|
|
1131
1159
|
journalize: feCore.journalize
|
|
1132
1160
|
}, dispatch);
|
|
1133
1161
|
};
|
|
1134
|
-
var mapStateToProps$
|
|
1162
|
+
var mapStateToProps$i = function mapStateToProps(state, props) {
|
|
1135
1163
|
var _state$core$user$i_us, _state$core;
|
|
1136
1164
|
return {
|
|
1137
1165
|
paymentPointUuid: props.match.params.payment_point_uuid,
|
|
@@ -1142,7 +1170,7 @@ var mapStateToProps$h = function mapStateToProps(state, props) {
|
|
|
1142
1170
|
paymentPoint: state.payroll.paymentPoint
|
|
1143
1171
|
};
|
|
1144
1172
|
};
|
|
1145
|
-
var PaymentPointPage$1 = reactRedux.connect(mapStateToProps$
|
|
1173
|
+
var PaymentPointPage$1 = reactRedux.connect(mapStateToProps$i, mapDispatchToProps$i)(PaymentPointPage);
|
|
1146
1174
|
|
|
1147
1175
|
var useStyles$f = styles$7.makeStyles(function (theme) {
|
|
1148
1176
|
return {
|
|
@@ -1407,7 +1435,7 @@ function PaymentPointSearcher(_ref) {
|
|
|
1407
1435
|
rowLocked: isRowDisabled
|
|
1408
1436
|
});
|
|
1409
1437
|
}
|
|
1410
|
-
var mapStateToProps$
|
|
1438
|
+
var mapStateToProps$h = function mapStateToProps(state) {
|
|
1411
1439
|
return {
|
|
1412
1440
|
fetchingPaymentPoints: state.payroll.fetchingPaymentPoints,
|
|
1413
1441
|
fetchedPaymentPoints: state.payroll.fetchedPaymentPoints,
|
|
@@ -1420,7 +1448,7 @@ var mapStateToProps$g = function mapStateToProps(state) {
|
|
|
1420
1448
|
mutation: state.payroll.mutation
|
|
1421
1449
|
};
|
|
1422
1450
|
};
|
|
1423
|
-
var mapDispatchToProps$
|
|
1451
|
+
var mapDispatchToProps$h = function mapDispatchToProps(dispatch) {
|
|
1424
1452
|
return redux.bindActionCreators({
|
|
1425
1453
|
fetchPaymentPoints: fetchPaymentPoints,
|
|
1426
1454
|
deletePaymentPoint: deletePaymentPoint,
|
|
@@ -1429,7 +1457,7 @@ var mapDispatchToProps$g = function mapDispatchToProps(dispatch) {
|
|
|
1429
1457
|
coreConfirm: feCore.coreConfirm
|
|
1430
1458
|
}, dispatch);
|
|
1431
1459
|
};
|
|
1432
|
-
var PaymentPointSearcher$1 = reactRedux.connect(mapStateToProps$
|
|
1460
|
+
var PaymentPointSearcher$1 = reactRedux.connect(mapStateToProps$h, mapDispatchToProps$h)(PaymentPointSearcher);
|
|
1433
1461
|
|
|
1434
1462
|
var useStyles$e = styles$7.makeStyles(function (theme) {
|
|
1435
1463
|
return {
|
|
@@ -1759,7 +1787,7 @@ function AdvancedFiltersDialog(_ref) {
|
|
|
1759
1787
|
disabled: !object || confirmed || readOnly
|
|
1760
1788
|
}, feCore.formatMessage(intl, 'payroll', 'payroll.advancedFilters.button.filter')))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null)));
|
|
1761
1789
|
}
|
|
1762
|
-
var mapStateToProps$
|
|
1790
|
+
var mapStateToProps$g = function mapStateToProps(state, props) {
|
|
1763
1791
|
return {
|
|
1764
1792
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
1765
1793
|
confirmed: state.core.confirmed,
|
|
@@ -1769,12 +1797,12 @@ var mapStateToProps$f = function mapStateToProps(state, props) {
|
|
|
1769
1797
|
customFilters: state.core.customFilters
|
|
1770
1798
|
};
|
|
1771
1799
|
};
|
|
1772
|
-
var mapDispatchToProps$
|
|
1800
|
+
var mapDispatchToProps$g = function mapDispatchToProps(dispatch) {
|
|
1773
1801
|
return redux.bindActionCreators({
|
|
1774
1802
|
fetchCustomFilter: feCore.fetchCustomFilter
|
|
1775
1803
|
}, dispatch);
|
|
1776
1804
|
};
|
|
1777
|
-
var AdvancedFiltersDialog$1 = reactIntl.injectIntl(styles$6.withTheme(styles$6.withStyles(styles$3)(reactRedux.connect(mapStateToProps$
|
|
1805
|
+
var AdvancedFiltersDialog$1 = reactIntl.injectIntl(styles$6.withTheme(styles$6.withStyles(styles$3)(reactRedux.connect(mapStateToProps$g, mapDispatchToProps$g)(AdvancedFiltersDialog))));
|
|
1778
1806
|
|
|
1779
1807
|
function PayrollStatusPicker(_ref) {
|
|
1780
1808
|
var required = _ref.required,
|
|
@@ -1842,7 +1870,7 @@ function PaymentMethodPicker(_ref) {
|
|
|
1842
1870
|
required: required
|
|
1843
1871
|
});
|
|
1844
1872
|
}
|
|
1845
|
-
var mapStateToProps$
|
|
1873
|
+
var mapStateToProps$f = function mapStateToProps(state) {
|
|
1846
1874
|
return {
|
|
1847
1875
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
1848
1876
|
confirmed: state.core.confirmed,
|
|
@@ -1852,12 +1880,12 @@ var mapStateToProps$e = function mapStateToProps(state) {
|
|
|
1852
1880
|
paymentMethods: state.payroll.paymentMethods
|
|
1853
1881
|
};
|
|
1854
1882
|
};
|
|
1855
|
-
var mapDispatchToProps$
|
|
1883
|
+
var mapDispatchToProps$f = function mapDispatchToProps(dispatch) {
|
|
1856
1884
|
return redux.bindActionCreators({
|
|
1857
1885
|
fetchPaymentMethods: fetchPaymentMethods
|
|
1858
1886
|
}, dispatch);
|
|
1859
1887
|
};
|
|
1860
|
-
var PaymentMethodPicker$1 = reactRedux.connect(mapStateToProps$
|
|
1888
|
+
var PaymentMethodPicker$1 = reactRedux.connect(mapStateToProps$f, mapDispatchToProps$f)(PaymentMethodPicker);
|
|
1861
1889
|
|
|
1862
1890
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1863
1891
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -2226,16 +2254,16 @@ function PayrollPaymentDataUploadDialog(_ref) {
|
|
|
2226
2254
|
disabled: !((_forms$paymentData = forms.paymentData) !== null && _forms$paymentData !== void 0 && _forms$paymentData.file && payrollUuid)
|
|
2227
2255
|
}, feCore.formatMessage(intl, 'payroll', 'payroll.paymentData.upload.label'))))))));
|
|
2228
2256
|
}
|
|
2229
|
-
var mapStateToProps$
|
|
2257
|
+
var mapStateToProps$e = function mapStateToProps(state) {
|
|
2230
2258
|
return {
|
|
2231
2259
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
2232
2260
|
confirmed: state.core.confirmed
|
|
2233
2261
|
};
|
|
2234
2262
|
};
|
|
2235
|
-
var mapDispatchToProps$
|
|
2263
|
+
var mapDispatchToProps$e = function mapDispatchToProps(dispatch) {
|
|
2236
2264
|
return redux.bindActionCreators({}, dispatch);
|
|
2237
2265
|
};
|
|
2238
|
-
var PayrollPaymentDataUploadDialog$1 = reactIntl.injectIntl(styles$6.withTheme(styles$6.withStyles(styles$1)(reactRedux.connect(mapStateToProps$
|
|
2266
|
+
var PayrollPaymentDataUploadDialog$1 = reactIntl.injectIntl(styles$6.withTheme(styles$6.withStyles(styles$1)(reactRedux.connect(mapStateToProps$e, mapDispatchToProps$e)(PayrollPaymentDataUploadDialog))));
|
|
2239
2267
|
|
|
2240
2268
|
var useStyles$d = styles$7.makeStyles(function (theme) {
|
|
2241
2269
|
return {
|
|
@@ -2500,15 +2528,15 @@ function AdditionalFieldsDialog(_ref) {
|
|
|
2500
2528
|
}
|
|
2501
2529
|
}))))));
|
|
2502
2530
|
}
|
|
2503
|
-
var mapStateToProps$
|
|
2531
|
+
var mapStateToProps$d = function mapStateToProps(state) {
|
|
2504
2532
|
return {
|
|
2505
2533
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : []
|
|
2506
2534
|
};
|
|
2507
2535
|
};
|
|
2508
|
-
var mapDispatchToProps$
|
|
2536
|
+
var mapDispatchToProps$d = function mapDispatchToProps(dispatch) {
|
|
2509
2537
|
return redux.bindActionCreators({}, dispatch);
|
|
2510
2538
|
};
|
|
2511
|
-
var AdditionalFieldsDialog$1 = reactIntl.injectIntl(styles$6.withTheme(styles$6.withStyles(styles)(reactRedux.connect(mapStateToProps$
|
|
2539
|
+
var AdditionalFieldsDialog$1 = reactIntl.injectIntl(styles$6.withTheme(styles$6.withStyles(styles)(reactRedux.connect(mapStateToProps$d, mapDispatchToProps$d)(AdditionalFieldsDialog))));
|
|
2512
2540
|
|
|
2513
2541
|
/* eslint-disable max-len */
|
|
2514
2542
|
var useStyles$c = styles$7.makeStyles(function () {
|
|
@@ -2882,7 +2910,7 @@ function BenefitConsumptionSearcherModal(_ref) {
|
|
|
2882
2910
|
benefitAttachments: benefitAttachments
|
|
2883
2911
|
}))));
|
|
2884
2912
|
}
|
|
2885
|
-
var mapStateToProps$
|
|
2913
|
+
var mapStateToProps$c = function mapStateToProps(state) {
|
|
2886
2914
|
return {
|
|
2887
2915
|
fetchingBenefitAttachments: state.payroll.fetchingBenefitAttachments,
|
|
2888
2916
|
fetchedBenefitAttachments: state.payroll.fetchedBenefitAttachments,
|
|
@@ -2892,13 +2920,13 @@ var mapStateToProps$b = function mapStateToProps(state) {
|
|
|
2892
2920
|
benefitAttachmentsTotalCount: state.payroll.benefitAttachmentsTotalCount
|
|
2893
2921
|
};
|
|
2894
2922
|
};
|
|
2895
|
-
var mapDispatchToProps$
|
|
2923
|
+
var mapDispatchToProps$c = function mapDispatchToProps(dispatch) {
|
|
2896
2924
|
return redux.bindActionCreators({
|
|
2897
2925
|
fetchBenefitAttachments: fetchBenefitAttachments,
|
|
2898
2926
|
deleteBenefitConsumption: deleteBenefitConsumption
|
|
2899
2927
|
}, dispatch);
|
|
2900
2928
|
};
|
|
2901
|
-
var BenefitConsumptionSearcherModal$1 = reactRedux.connect(mapStateToProps$
|
|
2929
|
+
var BenefitConsumptionSearcherModal$1 = reactRedux.connect(mapStateToProps$c, mapDispatchToProps$c)(BenefitConsumptionSearcherModal);
|
|
2902
2930
|
|
|
2903
2931
|
function downloadPayroll(payrollId, payrollFileName) {
|
|
2904
2932
|
var blank = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
@@ -3166,14 +3194,14 @@ function PaymentApproveForPaymentDialog(_ref) {
|
|
|
3166
3194
|
}
|
|
3167
3195
|
}, formatMessage('payroll.summary.close')))))));
|
|
3168
3196
|
}
|
|
3169
|
-
var mapStateToProps$
|
|
3197
|
+
var mapStateToProps$b = function mapStateToProps(state) {
|
|
3170
3198
|
return {
|
|
3171
3199
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
3172
3200
|
confirmed: state.core.confirmed,
|
|
3173
3201
|
payroll: state.payroll.payroll
|
|
3174
3202
|
};
|
|
3175
3203
|
};
|
|
3176
|
-
var mapDispatchToProps$
|
|
3204
|
+
var mapDispatchToProps$b = function mapDispatchToProps(dispatch) {
|
|
3177
3205
|
return redux.bindActionCreators({
|
|
3178
3206
|
closePayroll: closePayroll,
|
|
3179
3207
|
rejectPayroll: rejectPayroll,
|
|
@@ -3181,7 +3209,7 @@ var mapDispatchToProps$a = function mapDispatchToProps(dispatch) {
|
|
|
3181
3209
|
makePaymentForPayroll: makePaymentForPayroll
|
|
3182
3210
|
}, dispatch);
|
|
3183
3211
|
};
|
|
3184
|
-
var PaymentApproveForPaymentSummary = reactRedux.connect(mapStateToProps$
|
|
3212
|
+
var PaymentApproveForPaymentSummary = reactRedux.connect(mapStateToProps$b, mapDispatchToProps$b)(PaymentApproveForPaymentDialog);
|
|
3185
3213
|
|
|
3186
3214
|
var useStyles$b = styles$7.makeStyles(function (theme) {
|
|
3187
3215
|
return {
|
|
@@ -3450,7 +3478,7 @@ function PayrollPage(_ref) {
|
|
|
3450
3478
|
benefitPlanId: benefitPlanId
|
|
3451
3479
|
}));
|
|
3452
3480
|
}
|
|
3453
|
-
var mapDispatchToProps$
|
|
3481
|
+
var mapDispatchToProps$a = function mapDispatchToProps(dispatch) {
|
|
3454
3482
|
return redux.bindActionCreators({
|
|
3455
3483
|
fetchPayroll: fetchPayroll,
|
|
3456
3484
|
createPayroll: createPayroll,
|
|
@@ -3460,7 +3488,7 @@ var mapDispatchToProps$9 = function mapDispatchToProps(dispatch) {
|
|
|
3460
3488
|
journalize: feCore.journalize
|
|
3461
3489
|
}, dispatch);
|
|
3462
3490
|
};
|
|
3463
|
-
var mapStateToProps$
|
|
3491
|
+
var mapStateToProps$a = function mapStateToProps(state, props) {
|
|
3464
3492
|
var _props$match, _props$match2, _props$match3, _props$match4, _state$core$user$i_us, _state$core;
|
|
3465
3493
|
return {
|
|
3466
3494
|
statePayrollUuid: (props === null || props === void 0 || (_props$match = props.match) === null || _props$match === void 0 || (_props$match = _props$match.params) === null || _props$match === void 0 ? void 0 : _props$match.payroll_uuid) === 'null' ? null : props === null || props === void 0 || (_props$match2 = props.match) === null || _props$match2 === void 0 ? void 0 : _props$match2.params.payroll_uuid,
|
|
@@ -3473,7 +3501,7 @@ var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
|
3473
3501
|
payroll: state.payroll.payroll
|
|
3474
3502
|
};
|
|
3475
3503
|
};
|
|
3476
|
-
var PayrollPage$1 = reactRedux.connect(mapStateToProps$
|
|
3504
|
+
var PayrollPage$1 = reactRedux.connect(mapStateToProps$a, mapDispatchToProps$a)(PayrollPage);
|
|
3477
3505
|
|
|
3478
3506
|
var useStyles$9 = styles$7.makeStyles(function (theme) {
|
|
3479
3507
|
return {
|
|
@@ -3808,7 +3836,7 @@ function PayrollSearcher(_ref) {
|
|
|
3808
3836
|
rowLocked: isRowDisabled
|
|
3809
3837
|
});
|
|
3810
3838
|
}
|
|
3811
|
-
var mapStateToProps$
|
|
3839
|
+
var mapStateToProps$9 = function mapStateToProps(state) {
|
|
3812
3840
|
return {
|
|
3813
3841
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
3814
3842
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -3821,7 +3849,7 @@ var mapStateToProps$8 = function mapStateToProps(state) {
|
|
|
3821
3849
|
mutation: state.payroll.mutation
|
|
3822
3850
|
};
|
|
3823
3851
|
};
|
|
3824
|
-
var mapDispatchToProps$
|
|
3852
|
+
var mapDispatchToProps$9 = function mapDispatchToProps(dispatch) {
|
|
3825
3853
|
return redux.bindActionCreators({
|
|
3826
3854
|
fetchPayrolls: fetchPayrolls,
|
|
3827
3855
|
deletePayrolls: deletePayrolls,
|
|
@@ -3830,7 +3858,7 @@ var mapDispatchToProps$8 = function mapDispatchToProps(dispatch) {
|
|
|
3830
3858
|
coreConfirm: feCore.coreConfirm
|
|
3831
3859
|
}, dispatch);
|
|
3832
3860
|
};
|
|
3833
|
-
var PayrollSearcher$1 = reactRedux.connect(mapStateToProps$
|
|
3861
|
+
var PayrollSearcher$1 = reactRedux.connect(mapStateToProps$9, mapDispatchToProps$9)(PayrollSearcher);
|
|
3834
3862
|
|
|
3835
3863
|
var useStyles$8 = styles$7.makeStyles(function (theme) {
|
|
3836
3864
|
return {
|
|
@@ -3947,7 +3975,7 @@ function PayrollPaymentFilesSearcher(_ref) {
|
|
|
3947
3975
|
defaultFilters: defaultFilters()
|
|
3948
3976
|
});
|
|
3949
3977
|
}
|
|
3950
|
-
var mapStateToProps$
|
|
3978
|
+
var mapStateToProps$8 = function mapStateToProps(state) {
|
|
3951
3979
|
return {
|
|
3952
3980
|
fetchingPayrollFiles: state.payroll.fetchingPayrollFiles,
|
|
3953
3981
|
fetchedPayrollFiles: state.payroll.fetchedPayrollFiles,
|
|
@@ -3957,12 +3985,12 @@ var mapStateToProps$7 = function mapStateToProps(state) {
|
|
|
3957
3985
|
totalCount: state.payroll.payrollFilesTotalCount
|
|
3958
3986
|
};
|
|
3959
3987
|
};
|
|
3960
|
-
var mapDispatchToProps$
|
|
3988
|
+
var mapDispatchToProps$8 = function mapDispatchToProps(dispatch) {
|
|
3961
3989
|
return redux.bindActionCreators({
|
|
3962
3990
|
fetchPayrollPaymentFiles: fetchPayrollPaymentFiles
|
|
3963
3991
|
}, dispatch);
|
|
3964
3992
|
};
|
|
3965
|
-
var PayrollPaymentFilesSearcher$1 = reactRedux.connect(mapStateToProps$
|
|
3993
|
+
var PayrollPaymentFilesSearcher$1 = reactRedux.connect(mapStateToProps$8, mapDispatchToProps$8)(PayrollPaymentFilesSearcher);
|
|
3966
3994
|
|
|
3967
3995
|
function PayrollReconciliationFilesDialog(_ref) {
|
|
3968
3996
|
var payroll = _ref.payroll,
|
|
@@ -4174,7 +4202,7 @@ function PayrollSearcherApproved(_ref) {
|
|
|
4174
4202
|
defaultFilters: defaultFilters()
|
|
4175
4203
|
});
|
|
4176
4204
|
}
|
|
4177
|
-
var mapStateToProps$
|
|
4205
|
+
var mapStateToProps$7 = function mapStateToProps(state) {
|
|
4178
4206
|
return {
|
|
4179
4207
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
4180
4208
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -4187,7 +4215,7 @@ var mapStateToProps$6 = function mapStateToProps(state) {
|
|
|
4187
4215
|
mutation: state.payroll.mutation
|
|
4188
4216
|
};
|
|
4189
4217
|
};
|
|
4190
|
-
var mapDispatchToProps$
|
|
4218
|
+
var mapDispatchToProps$7 = function mapDispatchToProps(dispatch) {
|
|
4191
4219
|
return redux.bindActionCreators({
|
|
4192
4220
|
fetchPayrolls: fetchPayrolls,
|
|
4193
4221
|
journalize: feCore.journalize,
|
|
@@ -4195,7 +4223,7 @@ var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
|
4195
4223
|
coreConfirm: feCore.coreConfirm
|
|
4196
4224
|
}, dispatch);
|
|
4197
4225
|
};
|
|
4198
|
-
var PayrollSearcherApproved$1 = reactRedux.connect(mapStateToProps$
|
|
4226
|
+
var PayrollSearcherApproved$1 = reactRedux.connect(mapStateToProps$7, mapDispatchToProps$7)(PayrollSearcherApproved);
|
|
4199
4227
|
|
|
4200
4228
|
var useStyles$7 = styles$7.makeStyles(function (theme) {
|
|
4201
4229
|
return {
|
|
@@ -4426,19 +4454,19 @@ function PaymentReconcilationSummarytDialog(_ref) {
|
|
|
4426
4454
|
}
|
|
4427
4455
|
}, formatMessage('payroll.summary.close')))))));
|
|
4428
4456
|
}
|
|
4429
|
-
var mapStateToProps$
|
|
4457
|
+
var mapStateToProps$6 = function mapStateToProps(state) {
|
|
4430
4458
|
return {
|
|
4431
4459
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
4432
4460
|
confirmed: state.core.confirmed,
|
|
4433
4461
|
payroll: state.payroll.payroll
|
|
4434
4462
|
};
|
|
4435
4463
|
};
|
|
4436
|
-
var mapDispatchToProps$
|
|
4464
|
+
var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
4437
4465
|
return redux.bindActionCreators({
|
|
4438
4466
|
fetchPayroll: fetchPayroll
|
|
4439
4467
|
}, dispatch);
|
|
4440
4468
|
};
|
|
4441
|
-
var PaymentReconciliationSummaryDialog = reactRedux.connect(mapStateToProps$
|
|
4469
|
+
var PaymentReconciliationSummaryDialog = reactRedux.connect(mapStateToProps$6, mapDispatchToProps$6)(PaymentReconcilationSummarytDialog);
|
|
4442
4470
|
|
|
4443
4471
|
function PayrollSearcherReconciled(_ref) {
|
|
4444
4472
|
var fetchingPayrolls = _ref.fetchingPayrolls,
|
|
@@ -4583,7 +4611,7 @@ function PayrollSearcherReconciled(_ref) {
|
|
|
4583
4611
|
defaultFilters: defaultFilters()
|
|
4584
4612
|
});
|
|
4585
4613
|
}
|
|
4586
|
-
var mapStateToProps$
|
|
4614
|
+
var mapStateToProps$5 = function mapStateToProps(state) {
|
|
4587
4615
|
return {
|
|
4588
4616
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
4589
4617
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -4596,7 +4624,7 @@ var mapStateToProps$4 = function mapStateToProps(state) {
|
|
|
4596
4624
|
mutation: state.payroll.mutation
|
|
4597
4625
|
};
|
|
4598
4626
|
};
|
|
4599
|
-
var mapDispatchToProps$
|
|
4627
|
+
var mapDispatchToProps$5 = function mapDispatchToProps(dispatch) {
|
|
4600
4628
|
return redux.bindActionCreators({
|
|
4601
4629
|
fetchPayrolls: fetchPayrolls,
|
|
4602
4630
|
journalize: feCore.journalize,
|
|
@@ -4604,7 +4632,7 @@ var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
|
|
|
4604
4632
|
coreConfirm: feCore.coreConfirm
|
|
4605
4633
|
}, dispatch);
|
|
4606
4634
|
};
|
|
4607
|
-
var PayrollSearcherReconciled$1 = reactRedux.connect(mapStateToProps$
|
|
4635
|
+
var PayrollSearcherReconciled$1 = reactRedux.connect(mapStateToProps$5, mapDispatchToProps$5)(PayrollSearcherReconciled);
|
|
4608
4636
|
|
|
4609
4637
|
var useStyles$6 = styles$7.makeStyles(function (theme) {
|
|
4610
4638
|
return {
|
|
@@ -5094,7 +5122,7 @@ function BenefitConsumptionPayrollSearcher(_ref) {
|
|
|
5094
5122
|
defaultFilters: defaultFilters()
|
|
5095
5123
|
}));
|
|
5096
5124
|
}
|
|
5097
|
-
var mapStateToProps$
|
|
5125
|
+
var mapStateToProps$4 = function mapStateToProps(state) {
|
|
5098
5126
|
return {
|
|
5099
5127
|
fetchingPayrollBenefitConsumptions: state.payroll.fetchingPayrollBenefitConsumptions,
|
|
5100
5128
|
fetchedPayrollBenefitConsumptions: state.payroll.fetchedPayrollBenefitConsumptions,
|
|
@@ -5108,13 +5136,13 @@ var mapStateToProps$3 = function mapStateToProps(state) {
|
|
|
5108
5136
|
benefitsSummary: state.payroll.benefitsSummary
|
|
5109
5137
|
};
|
|
5110
5138
|
};
|
|
5111
|
-
var mapDispatchToProps$
|
|
5139
|
+
var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
|
|
5112
5140
|
return redux.bindActionCreators({
|
|
5113
5141
|
fetchPayrollBenefitConsumptions: fetchPayrollBenefitConsumptions,
|
|
5114
5142
|
fetchBenefitsSummary: fetchBenefitsSummary
|
|
5115
5143
|
}, dispatch);
|
|
5116
5144
|
};
|
|
5117
|
-
var BenefitConsumptionPayrollSearcher$1 = reactRedux.connect(mapStateToProps$
|
|
5145
|
+
var BenefitConsumptionPayrollSearcher$1 = reactRedux.connect(mapStateToProps$4, mapDispatchToProps$4)(BenefitConsumptionPayrollSearcher);
|
|
5118
5146
|
|
|
5119
5147
|
var PayrollTaskTableHeaders = function PayrollTaskTableHeaders() {
|
|
5120
5148
|
return [EMPTY_STRING];
|
|
@@ -5642,7 +5670,7 @@ function BenefitConsumptionSearcher(_ref) {
|
|
|
5642
5670
|
benefitConsumptions: benefitConsumptions
|
|
5643
5671
|
}))));
|
|
5644
5672
|
}
|
|
5645
|
-
var mapStateToProps$
|
|
5673
|
+
var mapStateToProps$3 = function mapStateToProps(state) {
|
|
5646
5674
|
return {
|
|
5647
5675
|
fetchingBenefitConsumptions: state.payroll.fetchingBenefitConsumptions,
|
|
5648
5676
|
fetchedBenefitConsumptions: state.payroll.fetchedBenefitConsumptions,
|
|
@@ -5652,12 +5680,12 @@ var mapStateToProps$2 = function mapStateToProps(state) {
|
|
|
5652
5680
|
benefitConsumptionsTotalCount: state.payroll.benefitConsumptionsTotalCount
|
|
5653
5681
|
};
|
|
5654
5682
|
};
|
|
5655
|
-
var mapDispatchToProps$
|
|
5683
|
+
var mapDispatchToProps$3 = function mapDispatchToProps(dispatch) {
|
|
5656
5684
|
return redux.bindActionCreators({
|
|
5657
5685
|
fetchBenefitConsumptions: fetchBenefitConsumptions
|
|
5658
5686
|
}, dispatch);
|
|
5659
5687
|
};
|
|
5660
|
-
var BenefitConsumptionSearcher$1 = reactRedux.connect(mapStateToProps$
|
|
5688
|
+
var BenefitConsumptionSearcher$1 = reactRedux.connect(mapStateToProps$3, mapDispatchToProps$3)(BenefitConsumptionSearcher);
|
|
5661
5689
|
|
|
5662
5690
|
function BenefitConsumptionsTabLabel(_ref) {
|
|
5663
5691
|
var onChange = _ref.onChange,
|
|
@@ -5849,59 +5877,28 @@ function BistpMetric(_ref2) {
|
|
|
5849
5877
|
}, value)));
|
|
5850
5878
|
}
|
|
5851
5879
|
function BistpPaymentStatusPanel(_ref3) {
|
|
5880
|
+
var _bistpSummary$total, _bistpSummary$confirm, _bistpSummary$pendent, _bistpSummary$rejeita, _bistpSummary$enviado;
|
|
5852
5881
|
var value = _ref3.value,
|
|
5853
5882
|
payrollUuid = _ref3.payrollUuid,
|
|
5854
|
-
payroll = _ref3.payroll
|
|
5883
|
+
payroll = _ref3.payroll,
|
|
5884
|
+
fetchBistpSummary = _ref3.fetchBistpSummary,
|
|
5885
|
+
bistpSummary = _ref3.bistpSummary;
|
|
5855
5886
|
var classes = useStyles$2();
|
|
5856
5887
|
var modulesManager = feCore.useModulesManager();
|
|
5857
5888
|
var _useTranslations2 = feCore.useTranslations(MODULE_NAME, modulesManager),
|
|
5858
5889
|
formatMessage = _useTranslations2.formatMessage;
|
|
5859
|
-
var _useState = React.useState({
|
|
5860
|
-
total: 0,
|
|
5861
|
-
pendentes: 0,
|
|
5862
|
-
enviados: 0,
|
|
5863
|
-
confirmados: 0,
|
|
5864
|
-
rejeitados: 0
|
|
5865
|
-
}),
|
|
5866
|
-
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
5867
|
-
summary = _useState2[0],
|
|
5868
|
-
setSummary = _useState2[1];
|
|
5869
5890
|
React.useEffect(function () {
|
|
5870
5891
|
if (payrollUuid) {
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
// Using fetch directly as suggested in the guide to avoid Redux complications for a simple summary
|
|
5874
|
-
fetch('/api/graphql', {
|
|
5875
|
-
method: 'POST',
|
|
5876
|
-
headers: {
|
|
5877
|
-
'Content-Type': 'application/json',
|
|
5878
|
-
'Authorization': "Bearer ".concat(localStorage.getItem('token'))
|
|
5879
|
-
},
|
|
5880
|
-
body: JSON.stringify({
|
|
5881
|
-
query: query,
|
|
5882
|
-
variables: {
|
|
5883
|
-
payrollId: payrollUuid
|
|
5884
|
-
}
|
|
5885
|
-
})
|
|
5886
|
-
}).then(function (response) {
|
|
5887
|
-
return response.json();
|
|
5888
|
-
}).then(function (result) {
|
|
5889
|
-
if (result.data) {
|
|
5890
|
-
setSummary({
|
|
5891
|
-
total: result.data.total.totalCount,
|
|
5892
|
-
pendentes: result.data.pendentes.totalCount,
|
|
5893
|
-
enviados: result.data.enviados.totalCount,
|
|
5894
|
-
confirmados: result.data.confirmados.totalCount,
|
|
5895
|
-
rejeitados: result.data.rejeitados.totalCount
|
|
5896
|
-
});
|
|
5897
|
-
}
|
|
5898
|
-
});
|
|
5892
|
+
fetchBistpSummary(payrollUuid);
|
|
5899
5893
|
}
|
|
5900
5894
|
}, [payrollUuid]);
|
|
5901
5895
|
if ((payroll === null || payroll === void 0 ? void 0 : payroll.paymentMethod) !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
5902
|
-
var total =
|
|
5903
|
-
var
|
|
5904
|
-
var
|
|
5896
|
+
var total = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$total = bistpSummary.total) === null || _bistpSummary$total === void 0 ? void 0 : _bistpSummary$total.totalCount) || 0;
|
|
5897
|
+
var confirmados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$confirm = bistpSummary.confirmados) === null || _bistpSummary$confirm === void 0 ? void 0 : _bistpSummary$confirm.totalCount) || 0;
|
|
5898
|
+
var pendentes = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$pendent = bistpSummary.pendentes) === null || _bistpSummary$pendent === void 0 ? void 0 : _bistpSummary$pendent.totalCount) || 0;
|
|
5899
|
+
var rejeitados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$rejeita = bistpSummary.rejeitados) === null || _bistpSummary$rejeita === void 0 ? void 0 : _bistpSummary$rejeita.totalCount) || 0;
|
|
5900
|
+
var enviados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$enviado = bistpSummary.enviados) === null || _bistpSummary$enviado === void 0 ? void 0 : _bistpSummary$enviado.totalCount) || 0;
|
|
5901
|
+
var progress = total > 0 ? Math.min(confirmados / total * 100, 100) : 0;
|
|
5905
5902
|
return /*#__PURE__*/React__default["default"].createElement(feCore.PublishedComponent, {
|
|
5906
5903
|
pubRef: "policyHolder.TabPanel",
|
|
5907
5904
|
module: "payroll",
|
|
@@ -5921,28 +5918,39 @@ function BistpPaymentStatusPanel(_ref3) {
|
|
|
5921
5918
|
}), /*#__PURE__*/React__default["default"].createElement(BistpMetric, {
|
|
5922
5919
|
classes: classes,
|
|
5923
5920
|
label: formatMessage('payroll.bistp.status.reconciled'),
|
|
5924
|
-
value:
|
|
5921
|
+
value: confirmados
|
|
5925
5922
|
}), /*#__PURE__*/React__default["default"].createElement(BistpMetric, {
|
|
5926
5923
|
classes: classes,
|
|
5927
5924
|
label: formatMessage('payroll.bistp.status.pending'),
|
|
5928
|
-
value:
|
|
5925
|
+
value: pendentes
|
|
5929
5926
|
}), /*#__PURE__*/React__default["default"].createElement(BistpMetric, {
|
|
5930
5927
|
classes: classes,
|
|
5931
5928
|
label: formatMessage('payroll.bistp.status.rejected'),
|
|
5932
|
-
value:
|
|
5929
|
+
value: rejeitados
|
|
5933
5930
|
}), /*#__PURE__*/React__default["default"].createElement(BistpMetric, {
|
|
5934
5931
|
classes: classes,
|
|
5935
5932
|
label: formatMessage('payroll.bistp.status.enviados'),
|
|
5936
|
-
value:
|
|
5933
|
+
value: enviados
|
|
5937
5934
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5938
5935
|
className: classes.progress
|
|
5939
5936
|
}, /*#__PURE__*/React__default["default"].createElement(core.Typography, {
|
|
5940
5937
|
variant: "body2"
|
|
5941
|
-
}, formatMessage('payroll.bistp.progress'), ": ",
|
|
5938
|
+
}, formatMessage('payroll.bistp.progress'), ": ", confirmados, "/", total), /*#__PURE__*/React__default["default"].createElement(core.LinearProgress, {
|
|
5942
5939
|
variant: "determinate",
|
|
5943
5940
|
value: progress
|
|
5944
5941
|
})))));
|
|
5945
5942
|
}
|
|
5943
|
+
var mapStateToProps$2 = function mapStateToProps(state) {
|
|
5944
|
+
return {
|
|
5945
|
+
bistpSummary: state.payroll.bistpSummary
|
|
5946
|
+
};
|
|
5947
|
+
};
|
|
5948
|
+
var mapDispatchToProps$2 = function mapDispatchToProps(dispatch) {
|
|
5949
|
+
return redux.bindActionCreators({
|
|
5950
|
+
fetchBistpSummary: fetchBistpSummary
|
|
5951
|
+
}, dispatch);
|
|
5952
|
+
};
|
|
5953
|
+
var BistpPaymentStatusPanel$1 = reactRedux.connect(mapStateToProps$2, mapDispatchToProps$2)(BistpPaymentStatusPanel);
|
|
5946
5954
|
|
|
5947
5955
|
function PaymentPendingPayrollPaymentDialog(_ref) {
|
|
5948
5956
|
var _payrollDetail$id;
|
|
@@ -7101,7 +7109,7 @@ var DEFAULT_CONFIG = {
|
|
|
7101
7109
|
id: 'legalAndFinance.beneficiariesManagement'
|
|
7102
7110
|
}],
|
|
7103
7111
|
'payroll.TabPanel.label': [BenefitConsumptionsTabLabel, PayrollTaskTabLabel, PayrollPaymentFilesTabLabel, BistpPaymentStatusTabLabel],
|
|
7104
|
-
'payroll.TabPanel.panel': [BenefitConsumptionsTabPanel, PayrollTaskTabPanel, PayrollPaymentFilesTabPanel, BistpPaymentStatusPanel],
|
|
7112
|
+
'payroll.TabPanel.panel': [BenefitConsumptionsTabPanel, PayrollTaskTabPanel, PayrollPaymentFilesTabPanel, BistpPaymentStatusPanel$1],
|
|
7105
7113
|
'tasksManagement.tasks': [{
|
|
7106
7114
|
text: /*#__PURE__*/React__default["default"].createElement(feCore.FormattedMessage, {
|
|
7107
7115
|
module: "payroll",
|