@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.es.js
CHANGED
|
@@ -154,6 +154,7 @@ var ACTION_TYPE = {
|
|
|
154
154
|
MAKE_PAYMENT_PAYROLL: 'PAYROLL_MUTATION_MAKE_PAYMENT_PAYROLL',
|
|
155
155
|
GET_PAYROLL_PAYMENT_FILES: 'GET_PAYROLL_PAYMENT_FILES',
|
|
156
156
|
BENEFITS_SUMMARY: 'PAYROLL_BENEFITS_SUMMARY',
|
|
157
|
+
GET_BISTP_SUMMARY: 'PAYROLL_BISTP_SUMMARY',
|
|
157
158
|
DELETE_BENEFIT_CONSUMPTION: 'BENEFIT_CONSUMPTION_MUTATION_DELETE_BENEFIT_CONSUMPTION'
|
|
158
159
|
};
|
|
159
160
|
var MUTATION_SERVICE = {
|
|
@@ -227,7 +228,11 @@ var STORE_STATE = {
|
|
|
227
228
|
benefitsSummary: [],
|
|
228
229
|
benefitsSummaryError: null,
|
|
229
230
|
fetchingBenefitsSummary: true,
|
|
230
|
-
fetchedBenefitsSummary: false
|
|
231
|
+
fetchedBenefitsSummary: false,
|
|
232
|
+
fetchingBistpSummary: false,
|
|
233
|
+
fetchedBistpSummary: false,
|
|
234
|
+
bistpSummary: {},
|
|
235
|
+
errorBistpSummary: null
|
|
231
236
|
};
|
|
232
237
|
function reducer() {
|
|
233
238
|
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;
|
|
@@ -517,6 +522,25 @@ function reducer() {
|
|
|
517
522
|
fetchingBenefitsSummary: false,
|
|
518
523
|
benefitsSummaryError: formatServerError(action.payload)
|
|
519
524
|
});
|
|
525
|
+
case REQUEST(ACTION_TYPE.GET_BISTP_SUMMARY):
|
|
526
|
+
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
527
|
+
fetchingBistpSummary: true,
|
|
528
|
+
fetchedBistpSummary: false,
|
|
529
|
+
bistpSummary: {},
|
|
530
|
+
errorBistpSummary: null
|
|
531
|
+
});
|
|
532
|
+
case SUCCESS(ACTION_TYPE.GET_BISTP_SUMMARY):
|
|
533
|
+
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
534
|
+
fetchingBistpSummary: false,
|
|
535
|
+
fetchedBistpSummary: true,
|
|
536
|
+
bistpSummary: action.payload.data,
|
|
537
|
+
errorBistpSummary: formatGraphQLError(action.payload)
|
|
538
|
+
});
|
|
539
|
+
case ERROR(ACTION_TYPE.GET_BISTP_SUMMARY):
|
|
540
|
+
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
541
|
+
fetchingBistpSummary: false,
|
|
542
|
+
errorBistpSummary: formatServerError(action.payload)
|
|
543
|
+
});
|
|
520
544
|
case REQUEST(ACTION_TYPE.MUTATION):
|
|
521
545
|
return dispatchMutationReq(state, action);
|
|
522
546
|
case ERROR(ACTION_TYPE.MUTATION):
|
|
@@ -863,6 +887,10 @@ function makePaymentForPayroll(payroll, clientMutationLabel) {
|
|
|
863
887
|
var payrollUuids = "ids: [\"".concat(payroll === null || payroll === void 0 ? void 0 : payroll.id, "\"]");
|
|
864
888
|
return PERFORM_MUTATION(MUTATION_SERVICE.PAYROLL.MAKE_PAYMENT, payrollUuids, ACTION_TYPE.MAKE_PAYMENT_PAYROLL, clientMutationLabel);
|
|
865
889
|
}
|
|
890
|
+
function fetchBistpSummary(payrollId) {
|
|
891
|
+
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 ");
|
|
892
|
+
return graphql(query, ACTION_TYPE.GET_BISTP_SUMMARY);
|
|
893
|
+
}
|
|
866
894
|
|
|
867
895
|
var pageTitle = function pageTitle(item) {
|
|
868
896
|
return {
|
|
@@ -1075,7 +1103,7 @@ function PaymentPointPage(_ref) {
|
|
|
1075
1103
|
saveTooltip: formatMessage('tooltip.save')
|
|
1076
1104
|
})));
|
|
1077
1105
|
}
|
|
1078
|
-
var mapDispatchToProps$
|
|
1106
|
+
var mapDispatchToProps$i = function mapDispatchToProps(dispatch) {
|
|
1079
1107
|
return bindActionCreators({
|
|
1080
1108
|
clearPaymentPoint: clearPaymentPoint,
|
|
1081
1109
|
createPaymentPoint: createPaymentPoint,
|
|
@@ -1087,7 +1115,7 @@ var mapDispatchToProps$h = function mapDispatchToProps(dispatch) {
|
|
|
1087
1115
|
journalize: journalize
|
|
1088
1116
|
}, dispatch);
|
|
1089
1117
|
};
|
|
1090
|
-
var mapStateToProps$
|
|
1118
|
+
var mapStateToProps$i = function mapStateToProps(state, props) {
|
|
1091
1119
|
var _state$core$user$i_us, _state$core;
|
|
1092
1120
|
return {
|
|
1093
1121
|
paymentPointUuid: props.match.params.payment_point_uuid,
|
|
@@ -1098,7 +1126,7 @@ var mapStateToProps$h = function mapStateToProps(state, props) {
|
|
|
1098
1126
|
paymentPoint: state.payroll.paymentPoint
|
|
1099
1127
|
};
|
|
1100
1128
|
};
|
|
1101
|
-
var PaymentPointPage$1 = connect(mapStateToProps$
|
|
1129
|
+
var PaymentPointPage$1 = connect(mapStateToProps$i, mapDispatchToProps$i)(PaymentPointPage);
|
|
1102
1130
|
|
|
1103
1131
|
var useStyles$f = makeStyles(function (theme) {
|
|
1104
1132
|
return {
|
|
@@ -1363,7 +1391,7 @@ function PaymentPointSearcher(_ref) {
|
|
|
1363
1391
|
rowLocked: isRowDisabled
|
|
1364
1392
|
});
|
|
1365
1393
|
}
|
|
1366
|
-
var mapStateToProps$
|
|
1394
|
+
var mapStateToProps$h = function mapStateToProps(state) {
|
|
1367
1395
|
return {
|
|
1368
1396
|
fetchingPaymentPoints: state.payroll.fetchingPaymentPoints,
|
|
1369
1397
|
fetchedPaymentPoints: state.payroll.fetchedPaymentPoints,
|
|
@@ -1376,7 +1404,7 @@ var mapStateToProps$g = function mapStateToProps(state) {
|
|
|
1376
1404
|
mutation: state.payroll.mutation
|
|
1377
1405
|
};
|
|
1378
1406
|
};
|
|
1379
|
-
var mapDispatchToProps$
|
|
1407
|
+
var mapDispatchToProps$h = function mapDispatchToProps(dispatch) {
|
|
1380
1408
|
return bindActionCreators({
|
|
1381
1409
|
fetchPaymentPoints: fetchPaymentPoints,
|
|
1382
1410
|
deletePaymentPoint: deletePaymentPoint,
|
|
@@ -1385,7 +1413,7 @@ var mapDispatchToProps$g = function mapDispatchToProps(dispatch) {
|
|
|
1385
1413
|
coreConfirm: coreConfirm
|
|
1386
1414
|
}, dispatch);
|
|
1387
1415
|
};
|
|
1388
|
-
var PaymentPointSearcher$1 = connect(mapStateToProps$
|
|
1416
|
+
var PaymentPointSearcher$1 = connect(mapStateToProps$h, mapDispatchToProps$h)(PaymentPointSearcher);
|
|
1389
1417
|
|
|
1390
1418
|
var useStyles$e = makeStyles(function (theme) {
|
|
1391
1419
|
return {
|
|
@@ -1715,7 +1743,7 @@ function AdvancedFiltersDialog(_ref) {
|
|
|
1715
1743
|
disabled: !object || confirmed || readOnly
|
|
1716
1744
|
}, formatMessage$1(intl, 'payroll', 'payroll.advancedFilters.button.filter')))) : /*#__PURE__*/React.createElement(React.Fragment, null)));
|
|
1717
1745
|
}
|
|
1718
|
-
var mapStateToProps$
|
|
1746
|
+
var mapStateToProps$g = function mapStateToProps(state, props) {
|
|
1719
1747
|
return {
|
|
1720
1748
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
1721
1749
|
confirmed: state.core.confirmed,
|
|
@@ -1725,12 +1753,12 @@ var mapStateToProps$f = function mapStateToProps(state, props) {
|
|
|
1725
1753
|
customFilters: state.core.customFilters
|
|
1726
1754
|
};
|
|
1727
1755
|
};
|
|
1728
|
-
var mapDispatchToProps$
|
|
1756
|
+
var mapDispatchToProps$g = function mapDispatchToProps(dispatch) {
|
|
1729
1757
|
return bindActionCreators({
|
|
1730
1758
|
fetchCustomFilter: fetchCustomFilter
|
|
1731
1759
|
}, dispatch);
|
|
1732
1760
|
};
|
|
1733
|
-
var AdvancedFiltersDialog$1 = injectIntl(withTheme(withStyles(styles$3)(connect(mapStateToProps$
|
|
1761
|
+
var AdvancedFiltersDialog$1 = injectIntl(withTheme(withStyles(styles$3)(connect(mapStateToProps$g, mapDispatchToProps$g)(AdvancedFiltersDialog))));
|
|
1734
1762
|
|
|
1735
1763
|
function PayrollStatusPicker(_ref) {
|
|
1736
1764
|
var required = _ref.required,
|
|
@@ -1798,7 +1826,7 @@ function PaymentMethodPicker(_ref) {
|
|
|
1798
1826
|
required: required
|
|
1799
1827
|
});
|
|
1800
1828
|
}
|
|
1801
|
-
var mapStateToProps$
|
|
1829
|
+
var mapStateToProps$f = function mapStateToProps(state) {
|
|
1802
1830
|
return {
|
|
1803
1831
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
1804
1832
|
confirmed: state.core.confirmed,
|
|
@@ -1808,12 +1836,12 @@ var mapStateToProps$e = function mapStateToProps(state) {
|
|
|
1808
1836
|
paymentMethods: state.payroll.paymentMethods
|
|
1809
1837
|
};
|
|
1810
1838
|
};
|
|
1811
|
-
var mapDispatchToProps$
|
|
1839
|
+
var mapDispatchToProps$f = function mapDispatchToProps(dispatch) {
|
|
1812
1840
|
return bindActionCreators({
|
|
1813
1841
|
fetchPaymentMethods: fetchPaymentMethods
|
|
1814
1842
|
}, dispatch);
|
|
1815
1843
|
};
|
|
1816
|
-
var PaymentMethodPicker$1 = connect(mapStateToProps$
|
|
1844
|
+
var PaymentMethodPicker$1 = connect(mapStateToProps$f, mapDispatchToProps$f)(PaymentMethodPicker);
|
|
1817
1845
|
|
|
1818
1846
|
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; }
|
|
1819
1847
|
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(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; }
|
|
@@ -2182,16 +2210,16 @@ function PayrollPaymentDataUploadDialog(_ref) {
|
|
|
2182
2210
|
disabled: !((_forms$paymentData = forms.paymentData) !== null && _forms$paymentData !== void 0 && _forms$paymentData.file && payrollUuid)
|
|
2183
2211
|
}, formatMessage$1(intl, 'payroll', 'payroll.paymentData.upload.label'))))))));
|
|
2184
2212
|
}
|
|
2185
|
-
var mapStateToProps$
|
|
2213
|
+
var mapStateToProps$e = function mapStateToProps(state) {
|
|
2186
2214
|
return {
|
|
2187
2215
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
2188
2216
|
confirmed: state.core.confirmed
|
|
2189
2217
|
};
|
|
2190
2218
|
};
|
|
2191
|
-
var mapDispatchToProps$
|
|
2219
|
+
var mapDispatchToProps$e = function mapDispatchToProps(dispatch) {
|
|
2192
2220
|
return bindActionCreators({}, dispatch);
|
|
2193
2221
|
};
|
|
2194
|
-
var PayrollPaymentDataUploadDialog$1 = injectIntl(withTheme(withStyles(styles$1)(connect(mapStateToProps$
|
|
2222
|
+
var PayrollPaymentDataUploadDialog$1 = injectIntl(withTheme(withStyles(styles$1)(connect(mapStateToProps$e, mapDispatchToProps$e)(PayrollPaymentDataUploadDialog))));
|
|
2195
2223
|
|
|
2196
2224
|
var useStyles$d = makeStyles(function (theme) {
|
|
2197
2225
|
return {
|
|
@@ -2456,15 +2484,15 @@ function AdditionalFieldsDialog(_ref) {
|
|
|
2456
2484
|
}
|
|
2457
2485
|
}))))));
|
|
2458
2486
|
}
|
|
2459
|
-
var mapStateToProps$
|
|
2487
|
+
var mapStateToProps$d = function mapStateToProps(state) {
|
|
2460
2488
|
return {
|
|
2461
2489
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : []
|
|
2462
2490
|
};
|
|
2463
2491
|
};
|
|
2464
|
-
var mapDispatchToProps$
|
|
2492
|
+
var mapDispatchToProps$d = function mapDispatchToProps(dispatch) {
|
|
2465
2493
|
return bindActionCreators({}, dispatch);
|
|
2466
2494
|
};
|
|
2467
|
-
var AdditionalFieldsDialog$1 = injectIntl(withTheme(withStyles(styles)(connect(mapStateToProps$
|
|
2495
|
+
var AdditionalFieldsDialog$1 = injectIntl(withTheme(withStyles(styles)(connect(mapStateToProps$d, mapDispatchToProps$d)(AdditionalFieldsDialog))));
|
|
2468
2496
|
|
|
2469
2497
|
/* eslint-disable max-len */
|
|
2470
2498
|
var useStyles$c = makeStyles(function () {
|
|
@@ -2838,7 +2866,7 @@ function BenefitConsumptionSearcherModal(_ref) {
|
|
|
2838
2866
|
benefitAttachments: benefitAttachments
|
|
2839
2867
|
}))));
|
|
2840
2868
|
}
|
|
2841
|
-
var mapStateToProps$
|
|
2869
|
+
var mapStateToProps$c = function mapStateToProps(state) {
|
|
2842
2870
|
return {
|
|
2843
2871
|
fetchingBenefitAttachments: state.payroll.fetchingBenefitAttachments,
|
|
2844
2872
|
fetchedBenefitAttachments: state.payroll.fetchedBenefitAttachments,
|
|
@@ -2848,13 +2876,13 @@ var mapStateToProps$b = function mapStateToProps(state) {
|
|
|
2848
2876
|
benefitAttachmentsTotalCount: state.payroll.benefitAttachmentsTotalCount
|
|
2849
2877
|
};
|
|
2850
2878
|
};
|
|
2851
|
-
var mapDispatchToProps$
|
|
2879
|
+
var mapDispatchToProps$c = function mapDispatchToProps(dispatch) {
|
|
2852
2880
|
return bindActionCreators({
|
|
2853
2881
|
fetchBenefitAttachments: fetchBenefitAttachments,
|
|
2854
2882
|
deleteBenefitConsumption: deleteBenefitConsumption
|
|
2855
2883
|
}, dispatch);
|
|
2856
2884
|
};
|
|
2857
|
-
var BenefitConsumptionSearcherModal$1 = connect(mapStateToProps$
|
|
2885
|
+
var BenefitConsumptionSearcherModal$1 = connect(mapStateToProps$c, mapDispatchToProps$c)(BenefitConsumptionSearcherModal);
|
|
2858
2886
|
|
|
2859
2887
|
function downloadPayroll(payrollId, payrollFileName) {
|
|
2860
2888
|
var blank = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
@@ -3122,14 +3150,14 @@ function PaymentApproveForPaymentDialog(_ref) {
|
|
|
3122
3150
|
}
|
|
3123
3151
|
}, formatMessage('payroll.summary.close')))))));
|
|
3124
3152
|
}
|
|
3125
|
-
var mapStateToProps$
|
|
3153
|
+
var mapStateToProps$b = function mapStateToProps(state) {
|
|
3126
3154
|
return {
|
|
3127
3155
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
3128
3156
|
confirmed: state.core.confirmed,
|
|
3129
3157
|
payroll: state.payroll.payroll
|
|
3130
3158
|
};
|
|
3131
3159
|
};
|
|
3132
|
-
var mapDispatchToProps$
|
|
3160
|
+
var mapDispatchToProps$b = function mapDispatchToProps(dispatch) {
|
|
3133
3161
|
return bindActionCreators({
|
|
3134
3162
|
closePayroll: closePayroll,
|
|
3135
3163
|
rejectPayroll: rejectPayroll,
|
|
@@ -3137,7 +3165,7 @@ var mapDispatchToProps$a = function mapDispatchToProps(dispatch) {
|
|
|
3137
3165
|
makePaymentForPayroll: makePaymentForPayroll
|
|
3138
3166
|
}, dispatch);
|
|
3139
3167
|
};
|
|
3140
|
-
var PaymentApproveForPaymentSummary = connect(mapStateToProps$
|
|
3168
|
+
var PaymentApproveForPaymentSummary = connect(mapStateToProps$b, mapDispatchToProps$b)(PaymentApproveForPaymentDialog);
|
|
3141
3169
|
|
|
3142
3170
|
var useStyles$b = makeStyles(function (theme) {
|
|
3143
3171
|
return {
|
|
@@ -3406,7 +3434,7 @@ function PayrollPage(_ref) {
|
|
|
3406
3434
|
benefitPlanId: benefitPlanId
|
|
3407
3435
|
}));
|
|
3408
3436
|
}
|
|
3409
|
-
var mapDispatchToProps$
|
|
3437
|
+
var mapDispatchToProps$a = function mapDispatchToProps(dispatch) {
|
|
3410
3438
|
return bindActionCreators({
|
|
3411
3439
|
fetchPayroll: fetchPayroll,
|
|
3412
3440
|
createPayroll: createPayroll,
|
|
@@ -3416,7 +3444,7 @@ var mapDispatchToProps$9 = function mapDispatchToProps(dispatch) {
|
|
|
3416
3444
|
journalize: journalize
|
|
3417
3445
|
}, dispatch);
|
|
3418
3446
|
};
|
|
3419
|
-
var mapStateToProps$
|
|
3447
|
+
var mapStateToProps$a = function mapStateToProps(state, props) {
|
|
3420
3448
|
var _props$match, _props$match2, _props$match3, _props$match4, _state$core$user$i_us, _state$core;
|
|
3421
3449
|
return {
|
|
3422
3450
|
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,
|
|
@@ -3429,7 +3457,7 @@ var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
|
3429
3457
|
payroll: state.payroll.payroll
|
|
3430
3458
|
};
|
|
3431
3459
|
};
|
|
3432
|
-
var PayrollPage$1 = connect(mapStateToProps$
|
|
3460
|
+
var PayrollPage$1 = connect(mapStateToProps$a, mapDispatchToProps$a)(PayrollPage);
|
|
3433
3461
|
|
|
3434
3462
|
var useStyles$9 = makeStyles(function (theme) {
|
|
3435
3463
|
return {
|
|
@@ -3764,7 +3792,7 @@ function PayrollSearcher(_ref) {
|
|
|
3764
3792
|
rowLocked: isRowDisabled
|
|
3765
3793
|
});
|
|
3766
3794
|
}
|
|
3767
|
-
var mapStateToProps$
|
|
3795
|
+
var mapStateToProps$9 = function mapStateToProps(state) {
|
|
3768
3796
|
return {
|
|
3769
3797
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
3770
3798
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -3777,7 +3805,7 @@ var mapStateToProps$8 = function mapStateToProps(state) {
|
|
|
3777
3805
|
mutation: state.payroll.mutation
|
|
3778
3806
|
};
|
|
3779
3807
|
};
|
|
3780
|
-
var mapDispatchToProps$
|
|
3808
|
+
var mapDispatchToProps$9 = function mapDispatchToProps(dispatch) {
|
|
3781
3809
|
return bindActionCreators({
|
|
3782
3810
|
fetchPayrolls: fetchPayrolls,
|
|
3783
3811
|
deletePayrolls: deletePayrolls,
|
|
@@ -3786,7 +3814,7 @@ var mapDispatchToProps$8 = function mapDispatchToProps(dispatch) {
|
|
|
3786
3814
|
coreConfirm: coreConfirm
|
|
3787
3815
|
}, dispatch);
|
|
3788
3816
|
};
|
|
3789
|
-
var PayrollSearcher$1 = connect(mapStateToProps$
|
|
3817
|
+
var PayrollSearcher$1 = connect(mapStateToProps$9, mapDispatchToProps$9)(PayrollSearcher);
|
|
3790
3818
|
|
|
3791
3819
|
var useStyles$8 = makeStyles(function (theme) {
|
|
3792
3820
|
return {
|
|
@@ -3903,7 +3931,7 @@ function PayrollPaymentFilesSearcher(_ref) {
|
|
|
3903
3931
|
defaultFilters: defaultFilters()
|
|
3904
3932
|
});
|
|
3905
3933
|
}
|
|
3906
|
-
var mapStateToProps$
|
|
3934
|
+
var mapStateToProps$8 = function mapStateToProps(state) {
|
|
3907
3935
|
return {
|
|
3908
3936
|
fetchingPayrollFiles: state.payroll.fetchingPayrollFiles,
|
|
3909
3937
|
fetchedPayrollFiles: state.payroll.fetchedPayrollFiles,
|
|
@@ -3913,12 +3941,12 @@ var mapStateToProps$7 = function mapStateToProps(state) {
|
|
|
3913
3941
|
totalCount: state.payroll.payrollFilesTotalCount
|
|
3914
3942
|
};
|
|
3915
3943
|
};
|
|
3916
|
-
var mapDispatchToProps$
|
|
3944
|
+
var mapDispatchToProps$8 = function mapDispatchToProps(dispatch) {
|
|
3917
3945
|
return bindActionCreators({
|
|
3918
3946
|
fetchPayrollPaymentFiles: fetchPayrollPaymentFiles
|
|
3919
3947
|
}, dispatch);
|
|
3920
3948
|
};
|
|
3921
|
-
var PayrollPaymentFilesSearcher$1 = connect(mapStateToProps$
|
|
3949
|
+
var PayrollPaymentFilesSearcher$1 = connect(mapStateToProps$8, mapDispatchToProps$8)(PayrollPaymentFilesSearcher);
|
|
3922
3950
|
|
|
3923
3951
|
function PayrollReconciliationFilesDialog(_ref) {
|
|
3924
3952
|
var payroll = _ref.payroll,
|
|
@@ -4130,7 +4158,7 @@ function PayrollSearcherApproved(_ref) {
|
|
|
4130
4158
|
defaultFilters: defaultFilters()
|
|
4131
4159
|
});
|
|
4132
4160
|
}
|
|
4133
|
-
var mapStateToProps$
|
|
4161
|
+
var mapStateToProps$7 = function mapStateToProps(state) {
|
|
4134
4162
|
return {
|
|
4135
4163
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
4136
4164
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -4143,7 +4171,7 @@ var mapStateToProps$6 = function mapStateToProps(state) {
|
|
|
4143
4171
|
mutation: state.payroll.mutation
|
|
4144
4172
|
};
|
|
4145
4173
|
};
|
|
4146
|
-
var mapDispatchToProps$
|
|
4174
|
+
var mapDispatchToProps$7 = function mapDispatchToProps(dispatch) {
|
|
4147
4175
|
return bindActionCreators({
|
|
4148
4176
|
fetchPayrolls: fetchPayrolls,
|
|
4149
4177
|
journalize: journalize,
|
|
@@ -4151,7 +4179,7 @@ var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
|
4151
4179
|
coreConfirm: coreConfirm
|
|
4152
4180
|
}, dispatch);
|
|
4153
4181
|
};
|
|
4154
|
-
var PayrollSearcherApproved$1 = connect(mapStateToProps$
|
|
4182
|
+
var PayrollSearcherApproved$1 = connect(mapStateToProps$7, mapDispatchToProps$7)(PayrollSearcherApproved);
|
|
4155
4183
|
|
|
4156
4184
|
var useStyles$7 = makeStyles(function (theme) {
|
|
4157
4185
|
return {
|
|
@@ -4382,19 +4410,19 @@ function PaymentReconcilationSummarytDialog(_ref) {
|
|
|
4382
4410
|
}
|
|
4383
4411
|
}, formatMessage('payroll.summary.close')))))));
|
|
4384
4412
|
}
|
|
4385
|
-
var mapStateToProps$
|
|
4413
|
+
var mapStateToProps$6 = function mapStateToProps(state) {
|
|
4386
4414
|
return {
|
|
4387
4415
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
4388
4416
|
confirmed: state.core.confirmed,
|
|
4389
4417
|
payroll: state.payroll.payroll
|
|
4390
4418
|
};
|
|
4391
4419
|
};
|
|
4392
|
-
var mapDispatchToProps$
|
|
4420
|
+
var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
4393
4421
|
return bindActionCreators({
|
|
4394
4422
|
fetchPayroll: fetchPayroll
|
|
4395
4423
|
}, dispatch);
|
|
4396
4424
|
};
|
|
4397
|
-
var PaymentReconciliationSummaryDialog = connect(mapStateToProps$
|
|
4425
|
+
var PaymentReconciliationSummaryDialog = connect(mapStateToProps$6, mapDispatchToProps$6)(PaymentReconcilationSummarytDialog);
|
|
4398
4426
|
|
|
4399
4427
|
function PayrollSearcherReconciled(_ref) {
|
|
4400
4428
|
var fetchingPayrolls = _ref.fetchingPayrolls,
|
|
@@ -4539,7 +4567,7 @@ function PayrollSearcherReconciled(_ref) {
|
|
|
4539
4567
|
defaultFilters: defaultFilters()
|
|
4540
4568
|
});
|
|
4541
4569
|
}
|
|
4542
|
-
var mapStateToProps$
|
|
4570
|
+
var mapStateToProps$5 = function mapStateToProps(state) {
|
|
4543
4571
|
return {
|
|
4544
4572
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
4545
4573
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -4552,7 +4580,7 @@ var mapStateToProps$4 = function mapStateToProps(state) {
|
|
|
4552
4580
|
mutation: state.payroll.mutation
|
|
4553
4581
|
};
|
|
4554
4582
|
};
|
|
4555
|
-
var mapDispatchToProps$
|
|
4583
|
+
var mapDispatchToProps$5 = function mapDispatchToProps(dispatch) {
|
|
4556
4584
|
return bindActionCreators({
|
|
4557
4585
|
fetchPayrolls: fetchPayrolls,
|
|
4558
4586
|
journalize: journalize,
|
|
@@ -4560,7 +4588,7 @@ var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
|
|
|
4560
4588
|
coreConfirm: coreConfirm
|
|
4561
4589
|
}, dispatch);
|
|
4562
4590
|
};
|
|
4563
|
-
var PayrollSearcherReconciled$1 = connect(mapStateToProps$
|
|
4591
|
+
var PayrollSearcherReconciled$1 = connect(mapStateToProps$5, mapDispatchToProps$5)(PayrollSearcherReconciled);
|
|
4564
4592
|
|
|
4565
4593
|
var useStyles$6 = makeStyles(function (theme) {
|
|
4566
4594
|
return {
|
|
@@ -5050,7 +5078,7 @@ function BenefitConsumptionPayrollSearcher(_ref) {
|
|
|
5050
5078
|
defaultFilters: defaultFilters()
|
|
5051
5079
|
}));
|
|
5052
5080
|
}
|
|
5053
|
-
var mapStateToProps$
|
|
5081
|
+
var mapStateToProps$4 = function mapStateToProps(state) {
|
|
5054
5082
|
return {
|
|
5055
5083
|
fetchingPayrollBenefitConsumptions: state.payroll.fetchingPayrollBenefitConsumptions,
|
|
5056
5084
|
fetchedPayrollBenefitConsumptions: state.payroll.fetchedPayrollBenefitConsumptions,
|
|
@@ -5064,13 +5092,13 @@ var mapStateToProps$3 = function mapStateToProps(state) {
|
|
|
5064
5092
|
benefitsSummary: state.payroll.benefitsSummary
|
|
5065
5093
|
};
|
|
5066
5094
|
};
|
|
5067
|
-
var mapDispatchToProps$
|
|
5095
|
+
var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
|
|
5068
5096
|
return bindActionCreators({
|
|
5069
5097
|
fetchPayrollBenefitConsumptions: fetchPayrollBenefitConsumptions,
|
|
5070
5098
|
fetchBenefitsSummary: fetchBenefitsSummary
|
|
5071
5099
|
}, dispatch);
|
|
5072
5100
|
};
|
|
5073
|
-
var BenefitConsumptionPayrollSearcher$1 = connect(mapStateToProps$
|
|
5101
|
+
var BenefitConsumptionPayrollSearcher$1 = connect(mapStateToProps$4, mapDispatchToProps$4)(BenefitConsumptionPayrollSearcher);
|
|
5074
5102
|
|
|
5075
5103
|
var PayrollTaskTableHeaders = function PayrollTaskTableHeaders() {
|
|
5076
5104
|
return [EMPTY_STRING];
|
|
@@ -5598,7 +5626,7 @@ function BenefitConsumptionSearcher(_ref) {
|
|
|
5598
5626
|
benefitConsumptions: benefitConsumptions
|
|
5599
5627
|
}))));
|
|
5600
5628
|
}
|
|
5601
|
-
var mapStateToProps$
|
|
5629
|
+
var mapStateToProps$3 = function mapStateToProps(state) {
|
|
5602
5630
|
return {
|
|
5603
5631
|
fetchingBenefitConsumptions: state.payroll.fetchingBenefitConsumptions,
|
|
5604
5632
|
fetchedBenefitConsumptions: state.payroll.fetchedBenefitConsumptions,
|
|
@@ -5608,12 +5636,12 @@ var mapStateToProps$2 = function mapStateToProps(state) {
|
|
|
5608
5636
|
benefitConsumptionsTotalCount: state.payroll.benefitConsumptionsTotalCount
|
|
5609
5637
|
};
|
|
5610
5638
|
};
|
|
5611
|
-
var mapDispatchToProps$
|
|
5639
|
+
var mapDispatchToProps$3 = function mapDispatchToProps(dispatch) {
|
|
5612
5640
|
return bindActionCreators({
|
|
5613
5641
|
fetchBenefitConsumptions: fetchBenefitConsumptions
|
|
5614
5642
|
}, dispatch);
|
|
5615
5643
|
};
|
|
5616
|
-
var BenefitConsumptionSearcher$1 = connect(mapStateToProps$
|
|
5644
|
+
var BenefitConsumptionSearcher$1 = connect(mapStateToProps$3, mapDispatchToProps$3)(BenefitConsumptionSearcher);
|
|
5617
5645
|
|
|
5618
5646
|
function BenefitConsumptionsTabLabel(_ref) {
|
|
5619
5647
|
var onChange = _ref.onChange,
|
|
@@ -5805,59 +5833,28 @@ function BistpMetric(_ref2) {
|
|
|
5805
5833
|
}, value)));
|
|
5806
5834
|
}
|
|
5807
5835
|
function BistpPaymentStatusPanel(_ref3) {
|
|
5836
|
+
var _bistpSummary$total, _bistpSummary$confirm, _bistpSummary$pendent, _bistpSummary$rejeita, _bistpSummary$enviado;
|
|
5808
5837
|
var value = _ref3.value,
|
|
5809
5838
|
payrollUuid = _ref3.payrollUuid,
|
|
5810
|
-
payroll = _ref3.payroll
|
|
5839
|
+
payroll = _ref3.payroll,
|
|
5840
|
+
fetchBistpSummary = _ref3.fetchBistpSummary,
|
|
5841
|
+
bistpSummary = _ref3.bistpSummary;
|
|
5811
5842
|
var classes = useStyles$2();
|
|
5812
5843
|
var modulesManager = useModulesManager();
|
|
5813
5844
|
var _useTranslations2 = useTranslations(MODULE_NAME, modulesManager),
|
|
5814
5845
|
formatMessage = _useTranslations2.formatMessage;
|
|
5815
|
-
var _useState = useState({
|
|
5816
|
-
total: 0,
|
|
5817
|
-
pendentes: 0,
|
|
5818
|
-
enviados: 0,
|
|
5819
|
-
confirmados: 0,
|
|
5820
|
-
rejeitados: 0
|
|
5821
|
-
}),
|
|
5822
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
5823
|
-
summary = _useState2[0],
|
|
5824
|
-
setSummary = _useState2[1];
|
|
5825
5846
|
useEffect(function () {
|
|
5826
5847
|
if (payrollUuid) {
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
// Using fetch directly as suggested in the guide to avoid Redux complications for a simple summary
|
|
5830
|
-
fetch('/api/graphql', {
|
|
5831
|
-
method: 'POST',
|
|
5832
|
-
headers: {
|
|
5833
|
-
'Content-Type': 'application/json',
|
|
5834
|
-
'Authorization': "Bearer ".concat(localStorage.getItem('token'))
|
|
5835
|
-
},
|
|
5836
|
-
body: JSON.stringify({
|
|
5837
|
-
query: query,
|
|
5838
|
-
variables: {
|
|
5839
|
-
payrollId: payrollUuid
|
|
5840
|
-
}
|
|
5841
|
-
})
|
|
5842
|
-
}).then(function (response) {
|
|
5843
|
-
return response.json();
|
|
5844
|
-
}).then(function (result) {
|
|
5845
|
-
if (result.data) {
|
|
5846
|
-
setSummary({
|
|
5847
|
-
total: result.data.total.totalCount,
|
|
5848
|
-
pendentes: result.data.pendentes.totalCount,
|
|
5849
|
-
enviados: result.data.enviados.totalCount,
|
|
5850
|
-
confirmados: result.data.confirmados.totalCount,
|
|
5851
|
-
rejeitados: result.data.rejeitados.totalCount
|
|
5852
|
-
});
|
|
5853
|
-
}
|
|
5854
|
-
});
|
|
5848
|
+
fetchBistpSummary(payrollUuid);
|
|
5855
5849
|
}
|
|
5856
5850
|
}, [payrollUuid]);
|
|
5857
5851
|
if ((payroll === null || payroll === void 0 ? void 0 : payroll.paymentMethod) !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
5858
|
-
var total =
|
|
5859
|
-
var
|
|
5860
|
-
var
|
|
5852
|
+
var total = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$total = bistpSummary.total) === null || _bistpSummary$total === void 0 ? void 0 : _bistpSummary$total.totalCount) || 0;
|
|
5853
|
+
var confirmados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$confirm = bistpSummary.confirmados) === null || _bistpSummary$confirm === void 0 ? void 0 : _bistpSummary$confirm.totalCount) || 0;
|
|
5854
|
+
var pendentes = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$pendent = bistpSummary.pendentes) === null || _bistpSummary$pendent === void 0 ? void 0 : _bistpSummary$pendent.totalCount) || 0;
|
|
5855
|
+
var rejeitados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$rejeita = bistpSummary.rejeitados) === null || _bistpSummary$rejeita === void 0 ? void 0 : _bistpSummary$rejeita.totalCount) || 0;
|
|
5856
|
+
var enviados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$enviado = bistpSummary.enviados) === null || _bistpSummary$enviado === void 0 ? void 0 : _bistpSummary$enviado.totalCount) || 0;
|
|
5857
|
+
var progress = total > 0 ? Math.min(confirmados / total * 100, 100) : 0;
|
|
5861
5858
|
return /*#__PURE__*/React.createElement(PublishedComponent, {
|
|
5862
5859
|
pubRef: "policyHolder.TabPanel",
|
|
5863
5860
|
module: "payroll",
|
|
@@ -5877,28 +5874,39 @@ function BistpPaymentStatusPanel(_ref3) {
|
|
|
5877
5874
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5878
5875
|
classes: classes,
|
|
5879
5876
|
label: formatMessage('payroll.bistp.status.reconciled'),
|
|
5880
|
-
value:
|
|
5877
|
+
value: confirmados
|
|
5881
5878
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5882
5879
|
classes: classes,
|
|
5883
5880
|
label: formatMessage('payroll.bistp.status.pending'),
|
|
5884
|
-
value:
|
|
5881
|
+
value: pendentes
|
|
5885
5882
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5886
5883
|
classes: classes,
|
|
5887
5884
|
label: formatMessage('payroll.bistp.status.rejected'),
|
|
5888
|
-
value:
|
|
5885
|
+
value: rejeitados
|
|
5889
5886
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5890
5887
|
classes: classes,
|
|
5891
5888
|
label: formatMessage('payroll.bistp.status.enviados'),
|
|
5892
|
-
value:
|
|
5889
|
+
value: enviados
|
|
5893
5890
|
})), /*#__PURE__*/React.createElement("div", {
|
|
5894
5891
|
className: classes.progress
|
|
5895
5892
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
5896
5893
|
variant: "body2"
|
|
5897
|
-
}, formatMessage('payroll.bistp.progress'), ": ",
|
|
5894
|
+
}, formatMessage('payroll.bistp.progress'), ": ", confirmados, "/", total), /*#__PURE__*/React.createElement(LinearProgress$1, {
|
|
5898
5895
|
variant: "determinate",
|
|
5899
5896
|
value: progress
|
|
5900
5897
|
})))));
|
|
5901
5898
|
}
|
|
5899
|
+
var mapStateToProps$2 = function mapStateToProps(state) {
|
|
5900
|
+
return {
|
|
5901
|
+
bistpSummary: state.payroll.bistpSummary
|
|
5902
|
+
};
|
|
5903
|
+
};
|
|
5904
|
+
var mapDispatchToProps$2 = function mapDispatchToProps(dispatch) {
|
|
5905
|
+
return bindActionCreators({
|
|
5906
|
+
fetchBistpSummary: fetchBistpSummary
|
|
5907
|
+
}, dispatch);
|
|
5908
|
+
};
|
|
5909
|
+
var BistpPaymentStatusPanel$1 = connect(mapStateToProps$2, mapDispatchToProps$2)(BistpPaymentStatusPanel);
|
|
5902
5910
|
|
|
5903
5911
|
function PaymentPendingPayrollPaymentDialog(_ref) {
|
|
5904
5912
|
var _payrollDetail$id;
|
|
@@ -7057,7 +7065,7 @@ var DEFAULT_CONFIG = {
|
|
|
7057
7065
|
id: 'legalAndFinance.beneficiariesManagement'
|
|
7058
7066
|
}],
|
|
7059
7067
|
'payroll.TabPanel.label': [BenefitConsumptionsTabLabel, PayrollTaskTabLabel, PayrollPaymentFilesTabLabel, BistpPaymentStatusTabLabel],
|
|
7060
|
-
'payroll.TabPanel.panel': [BenefitConsumptionsTabPanel, PayrollTaskTabPanel, PayrollPaymentFilesTabPanel, BistpPaymentStatusPanel],
|
|
7068
|
+
'payroll.TabPanel.panel': [BenefitConsumptionsTabPanel, PayrollTaskTabPanel, PayrollPaymentFilesTabPanel, BistpPaymentStatusPanel$1],
|
|
7061
7069
|
'tasksManagement.tasks': [{
|
|
7062
7070
|
text: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
7063
7071
|
module: "payroll",
|