@stssocialst-stp/fe-payroll 0.3.2 → 0.3.4
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 +107 -97
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +107 -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,12 @@ 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 query ResumoPagamentos($payrollId: UUID!) {\n total: benefitConsumptionByPayroll(payrollUuid: $payrollId, first: 0) { totalCount }\n pendentes: benefitConsumptionByPayroll(payrollUuid: $payrollId, status: ACCEPTED, first: 0) { totalCount }\n enviados: benefitConsumptionByPayroll(payrollUuid: $payrollId, status: APPROVE_FOR_PAYMENT, first: 0) { totalCount }\n confirmados: benefitConsumptionByPayroll(payrollUuid: $payrollId, status: RECONCILED, first: 0) { totalCount }\n rejeitados: benefitConsumptionByPayroll(payrollUuid: $payrollId, status: REJECTED, first: 0) { totalCount }\n }\n ";
|
|
892
|
+
return graphql(query, ACTION_TYPE.GET_BISTP_SUMMARY, {
|
|
893
|
+
payrollId: payrollId
|
|
894
|
+
});
|
|
895
|
+
}
|
|
866
896
|
|
|
867
897
|
var pageTitle = function pageTitle(item) {
|
|
868
898
|
return {
|
|
@@ -1075,7 +1105,7 @@ function PaymentPointPage(_ref) {
|
|
|
1075
1105
|
saveTooltip: formatMessage('tooltip.save')
|
|
1076
1106
|
})));
|
|
1077
1107
|
}
|
|
1078
|
-
var mapDispatchToProps$
|
|
1108
|
+
var mapDispatchToProps$i = function mapDispatchToProps(dispatch) {
|
|
1079
1109
|
return bindActionCreators({
|
|
1080
1110
|
clearPaymentPoint: clearPaymentPoint,
|
|
1081
1111
|
createPaymentPoint: createPaymentPoint,
|
|
@@ -1087,7 +1117,7 @@ var mapDispatchToProps$h = function mapDispatchToProps(dispatch) {
|
|
|
1087
1117
|
journalize: journalize
|
|
1088
1118
|
}, dispatch);
|
|
1089
1119
|
};
|
|
1090
|
-
var mapStateToProps$
|
|
1120
|
+
var mapStateToProps$i = function mapStateToProps(state, props) {
|
|
1091
1121
|
var _state$core$user$i_us, _state$core;
|
|
1092
1122
|
return {
|
|
1093
1123
|
paymentPointUuid: props.match.params.payment_point_uuid,
|
|
@@ -1098,7 +1128,7 @@ var mapStateToProps$h = function mapStateToProps(state, props) {
|
|
|
1098
1128
|
paymentPoint: state.payroll.paymentPoint
|
|
1099
1129
|
};
|
|
1100
1130
|
};
|
|
1101
|
-
var PaymentPointPage$1 = connect(mapStateToProps$
|
|
1131
|
+
var PaymentPointPage$1 = connect(mapStateToProps$i, mapDispatchToProps$i)(PaymentPointPage);
|
|
1102
1132
|
|
|
1103
1133
|
var useStyles$f = makeStyles(function (theme) {
|
|
1104
1134
|
return {
|
|
@@ -1363,7 +1393,7 @@ function PaymentPointSearcher(_ref) {
|
|
|
1363
1393
|
rowLocked: isRowDisabled
|
|
1364
1394
|
});
|
|
1365
1395
|
}
|
|
1366
|
-
var mapStateToProps$
|
|
1396
|
+
var mapStateToProps$h = function mapStateToProps(state) {
|
|
1367
1397
|
return {
|
|
1368
1398
|
fetchingPaymentPoints: state.payroll.fetchingPaymentPoints,
|
|
1369
1399
|
fetchedPaymentPoints: state.payroll.fetchedPaymentPoints,
|
|
@@ -1376,7 +1406,7 @@ var mapStateToProps$g = function mapStateToProps(state) {
|
|
|
1376
1406
|
mutation: state.payroll.mutation
|
|
1377
1407
|
};
|
|
1378
1408
|
};
|
|
1379
|
-
var mapDispatchToProps$
|
|
1409
|
+
var mapDispatchToProps$h = function mapDispatchToProps(dispatch) {
|
|
1380
1410
|
return bindActionCreators({
|
|
1381
1411
|
fetchPaymentPoints: fetchPaymentPoints,
|
|
1382
1412
|
deletePaymentPoint: deletePaymentPoint,
|
|
@@ -1385,7 +1415,7 @@ var mapDispatchToProps$g = function mapDispatchToProps(dispatch) {
|
|
|
1385
1415
|
coreConfirm: coreConfirm
|
|
1386
1416
|
}, dispatch);
|
|
1387
1417
|
};
|
|
1388
|
-
var PaymentPointSearcher$1 = connect(mapStateToProps$
|
|
1418
|
+
var PaymentPointSearcher$1 = connect(mapStateToProps$h, mapDispatchToProps$h)(PaymentPointSearcher);
|
|
1389
1419
|
|
|
1390
1420
|
var useStyles$e = makeStyles(function (theme) {
|
|
1391
1421
|
return {
|
|
@@ -1715,7 +1745,7 @@ function AdvancedFiltersDialog(_ref) {
|
|
|
1715
1745
|
disabled: !object || confirmed || readOnly
|
|
1716
1746
|
}, formatMessage$1(intl, 'payroll', 'payroll.advancedFilters.button.filter')))) : /*#__PURE__*/React.createElement(React.Fragment, null)));
|
|
1717
1747
|
}
|
|
1718
|
-
var mapStateToProps$
|
|
1748
|
+
var mapStateToProps$g = function mapStateToProps(state, props) {
|
|
1719
1749
|
return {
|
|
1720
1750
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
1721
1751
|
confirmed: state.core.confirmed,
|
|
@@ -1725,12 +1755,12 @@ var mapStateToProps$f = function mapStateToProps(state, props) {
|
|
|
1725
1755
|
customFilters: state.core.customFilters
|
|
1726
1756
|
};
|
|
1727
1757
|
};
|
|
1728
|
-
var mapDispatchToProps$
|
|
1758
|
+
var mapDispatchToProps$g = function mapDispatchToProps(dispatch) {
|
|
1729
1759
|
return bindActionCreators({
|
|
1730
1760
|
fetchCustomFilter: fetchCustomFilter
|
|
1731
1761
|
}, dispatch);
|
|
1732
1762
|
};
|
|
1733
|
-
var AdvancedFiltersDialog$1 = injectIntl(withTheme(withStyles(styles$3)(connect(mapStateToProps$
|
|
1763
|
+
var AdvancedFiltersDialog$1 = injectIntl(withTheme(withStyles(styles$3)(connect(mapStateToProps$g, mapDispatchToProps$g)(AdvancedFiltersDialog))));
|
|
1734
1764
|
|
|
1735
1765
|
function PayrollStatusPicker(_ref) {
|
|
1736
1766
|
var required = _ref.required,
|
|
@@ -1798,7 +1828,7 @@ function PaymentMethodPicker(_ref) {
|
|
|
1798
1828
|
required: required
|
|
1799
1829
|
});
|
|
1800
1830
|
}
|
|
1801
|
-
var mapStateToProps$
|
|
1831
|
+
var mapStateToProps$f = function mapStateToProps(state) {
|
|
1802
1832
|
return {
|
|
1803
1833
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
1804
1834
|
confirmed: state.core.confirmed,
|
|
@@ -1808,12 +1838,12 @@ var mapStateToProps$e = function mapStateToProps(state) {
|
|
|
1808
1838
|
paymentMethods: state.payroll.paymentMethods
|
|
1809
1839
|
};
|
|
1810
1840
|
};
|
|
1811
|
-
var mapDispatchToProps$
|
|
1841
|
+
var mapDispatchToProps$f = function mapDispatchToProps(dispatch) {
|
|
1812
1842
|
return bindActionCreators({
|
|
1813
1843
|
fetchPaymentMethods: fetchPaymentMethods
|
|
1814
1844
|
}, dispatch);
|
|
1815
1845
|
};
|
|
1816
|
-
var PaymentMethodPicker$1 = connect(mapStateToProps$
|
|
1846
|
+
var PaymentMethodPicker$1 = connect(mapStateToProps$f, mapDispatchToProps$f)(PaymentMethodPicker);
|
|
1817
1847
|
|
|
1818
1848
|
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
1849
|
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 +2212,16 @@ function PayrollPaymentDataUploadDialog(_ref) {
|
|
|
2182
2212
|
disabled: !((_forms$paymentData = forms.paymentData) !== null && _forms$paymentData !== void 0 && _forms$paymentData.file && payrollUuid)
|
|
2183
2213
|
}, formatMessage$1(intl, 'payroll', 'payroll.paymentData.upload.label'))))))));
|
|
2184
2214
|
}
|
|
2185
|
-
var mapStateToProps$
|
|
2215
|
+
var mapStateToProps$e = function mapStateToProps(state) {
|
|
2186
2216
|
return {
|
|
2187
2217
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
2188
2218
|
confirmed: state.core.confirmed
|
|
2189
2219
|
};
|
|
2190
2220
|
};
|
|
2191
|
-
var mapDispatchToProps$
|
|
2221
|
+
var mapDispatchToProps$e = function mapDispatchToProps(dispatch) {
|
|
2192
2222
|
return bindActionCreators({}, dispatch);
|
|
2193
2223
|
};
|
|
2194
|
-
var PayrollPaymentDataUploadDialog$1 = injectIntl(withTheme(withStyles(styles$1)(connect(mapStateToProps$
|
|
2224
|
+
var PayrollPaymentDataUploadDialog$1 = injectIntl(withTheme(withStyles(styles$1)(connect(mapStateToProps$e, mapDispatchToProps$e)(PayrollPaymentDataUploadDialog))));
|
|
2195
2225
|
|
|
2196
2226
|
var useStyles$d = makeStyles(function (theme) {
|
|
2197
2227
|
return {
|
|
@@ -2456,15 +2486,15 @@ function AdditionalFieldsDialog(_ref) {
|
|
|
2456
2486
|
}
|
|
2457
2487
|
}))))));
|
|
2458
2488
|
}
|
|
2459
|
-
var mapStateToProps$
|
|
2489
|
+
var mapStateToProps$d = function mapStateToProps(state) {
|
|
2460
2490
|
return {
|
|
2461
2491
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : []
|
|
2462
2492
|
};
|
|
2463
2493
|
};
|
|
2464
|
-
var mapDispatchToProps$
|
|
2494
|
+
var mapDispatchToProps$d = function mapDispatchToProps(dispatch) {
|
|
2465
2495
|
return bindActionCreators({}, dispatch);
|
|
2466
2496
|
};
|
|
2467
|
-
var AdditionalFieldsDialog$1 = injectIntl(withTheme(withStyles(styles)(connect(mapStateToProps$
|
|
2497
|
+
var AdditionalFieldsDialog$1 = injectIntl(withTheme(withStyles(styles)(connect(mapStateToProps$d, mapDispatchToProps$d)(AdditionalFieldsDialog))));
|
|
2468
2498
|
|
|
2469
2499
|
/* eslint-disable max-len */
|
|
2470
2500
|
var useStyles$c = makeStyles(function () {
|
|
@@ -2838,7 +2868,7 @@ function BenefitConsumptionSearcherModal(_ref) {
|
|
|
2838
2868
|
benefitAttachments: benefitAttachments
|
|
2839
2869
|
}))));
|
|
2840
2870
|
}
|
|
2841
|
-
var mapStateToProps$
|
|
2871
|
+
var mapStateToProps$c = function mapStateToProps(state) {
|
|
2842
2872
|
return {
|
|
2843
2873
|
fetchingBenefitAttachments: state.payroll.fetchingBenefitAttachments,
|
|
2844
2874
|
fetchedBenefitAttachments: state.payroll.fetchedBenefitAttachments,
|
|
@@ -2848,13 +2878,13 @@ var mapStateToProps$b = function mapStateToProps(state) {
|
|
|
2848
2878
|
benefitAttachmentsTotalCount: state.payroll.benefitAttachmentsTotalCount
|
|
2849
2879
|
};
|
|
2850
2880
|
};
|
|
2851
|
-
var mapDispatchToProps$
|
|
2881
|
+
var mapDispatchToProps$c = function mapDispatchToProps(dispatch) {
|
|
2852
2882
|
return bindActionCreators({
|
|
2853
2883
|
fetchBenefitAttachments: fetchBenefitAttachments,
|
|
2854
2884
|
deleteBenefitConsumption: deleteBenefitConsumption
|
|
2855
2885
|
}, dispatch);
|
|
2856
2886
|
};
|
|
2857
|
-
var BenefitConsumptionSearcherModal$1 = connect(mapStateToProps$
|
|
2887
|
+
var BenefitConsumptionSearcherModal$1 = connect(mapStateToProps$c, mapDispatchToProps$c)(BenefitConsumptionSearcherModal);
|
|
2858
2888
|
|
|
2859
2889
|
function downloadPayroll(payrollId, payrollFileName) {
|
|
2860
2890
|
var blank = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
@@ -3122,14 +3152,14 @@ function PaymentApproveForPaymentDialog(_ref) {
|
|
|
3122
3152
|
}
|
|
3123
3153
|
}, formatMessage('payroll.summary.close')))))));
|
|
3124
3154
|
}
|
|
3125
|
-
var mapStateToProps$
|
|
3155
|
+
var mapStateToProps$b = function mapStateToProps(state) {
|
|
3126
3156
|
return {
|
|
3127
3157
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
3128
3158
|
confirmed: state.core.confirmed,
|
|
3129
3159
|
payroll: state.payroll.payroll
|
|
3130
3160
|
};
|
|
3131
3161
|
};
|
|
3132
|
-
var mapDispatchToProps$
|
|
3162
|
+
var mapDispatchToProps$b = function mapDispatchToProps(dispatch) {
|
|
3133
3163
|
return bindActionCreators({
|
|
3134
3164
|
closePayroll: closePayroll,
|
|
3135
3165
|
rejectPayroll: rejectPayroll,
|
|
@@ -3137,7 +3167,7 @@ var mapDispatchToProps$a = function mapDispatchToProps(dispatch) {
|
|
|
3137
3167
|
makePaymentForPayroll: makePaymentForPayroll
|
|
3138
3168
|
}, dispatch);
|
|
3139
3169
|
};
|
|
3140
|
-
var PaymentApproveForPaymentSummary = connect(mapStateToProps$
|
|
3170
|
+
var PaymentApproveForPaymentSummary = connect(mapStateToProps$b, mapDispatchToProps$b)(PaymentApproveForPaymentDialog);
|
|
3141
3171
|
|
|
3142
3172
|
var useStyles$b = makeStyles(function (theme) {
|
|
3143
3173
|
return {
|
|
@@ -3406,7 +3436,7 @@ function PayrollPage(_ref) {
|
|
|
3406
3436
|
benefitPlanId: benefitPlanId
|
|
3407
3437
|
}));
|
|
3408
3438
|
}
|
|
3409
|
-
var mapDispatchToProps$
|
|
3439
|
+
var mapDispatchToProps$a = function mapDispatchToProps(dispatch) {
|
|
3410
3440
|
return bindActionCreators({
|
|
3411
3441
|
fetchPayroll: fetchPayroll,
|
|
3412
3442
|
createPayroll: createPayroll,
|
|
@@ -3416,7 +3446,7 @@ var mapDispatchToProps$9 = function mapDispatchToProps(dispatch) {
|
|
|
3416
3446
|
journalize: journalize
|
|
3417
3447
|
}, dispatch);
|
|
3418
3448
|
};
|
|
3419
|
-
var mapStateToProps$
|
|
3449
|
+
var mapStateToProps$a = function mapStateToProps(state, props) {
|
|
3420
3450
|
var _props$match, _props$match2, _props$match3, _props$match4, _state$core$user$i_us, _state$core;
|
|
3421
3451
|
return {
|
|
3422
3452
|
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 +3459,7 @@ var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
|
3429
3459
|
payroll: state.payroll.payroll
|
|
3430
3460
|
};
|
|
3431
3461
|
};
|
|
3432
|
-
var PayrollPage$1 = connect(mapStateToProps$
|
|
3462
|
+
var PayrollPage$1 = connect(mapStateToProps$a, mapDispatchToProps$a)(PayrollPage);
|
|
3433
3463
|
|
|
3434
3464
|
var useStyles$9 = makeStyles(function (theme) {
|
|
3435
3465
|
return {
|
|
@@ -3764,7 +3794,7 @@ function PayrollSearcher(_ref) {
|
|
|
3764
3794
|
rowLocked: isRowDisabled
|
|
3765
3795
|
});
|
|
3766
3796
|
}
|
|
3767
|
-
var mapStateToProps$
|
|
3797
|
+
var mapStateToProps$9 = function mapStateToProps(state) {
|
|
3768
3798
|
return {
|
|
3769
3799
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
3770
3800
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -3777,7 +3807,7 @@ var mapStateToProps$8 = function mapStateToProps(state) {
|
|
|
3777
3807
|
mutation: state.payroll.mutation
|
|
3778
3808
|
};
|
|
3779
3809
|
};
|
|
3780
|
-
var mapDispatchToProps$
|
|
3810
|
+
var mapDispatchToProps$9 = function mapDispatchToProps(dispatch) {
|
|
3781
3811
|
return bindActionCreators({
|
|
3782
3812
|
fetchPayrolls: fetchPayrolls,
|
|
3783
3813
|
deletePayrolls: deletePayrolls,
|
|
@@ -3786,7 +3816,7 @@ var mapDispatchToProps$8 = function mapDispatchToProps(dispatch) {
|
|
|
3786
3816
|
coreConfirm: coreConfirm
|
|
3787
3817
|
}, dispatch);
|
|
3788
3818
|
};
|
|
3789
|
-
var PayrollSearcher$1 = connect(mapStateToProps$
|
|
3819
|
+
var PayrollSearcher$1 = connect(mapStateToProps$9, mapDispatchToProps$9)(PayrollSearcher);
|
|
3790
3820
|
|
|
3791
3821
|
var useStyles$8 = makeStyles(function (theme) {
|
|
3792
3822
|
return {
|
|
@@ -3903,7 +3933,7 @@ function PayrollPaymentFilesSearcher(_ref) {
|
|
|
3903
3933
|
defaultFilters: defaultFilters()
|
|
3904
3934
|
});
|
|
3905
3935
|
}
|
|
3906
|
-
var mapStateToProps$
|
|
3936
|
+
var mapStateToProps$8 = function mapStateToProps(state) {
|
|
3907
3937
|
return {
|
|
3908
3938
|
fetchingPayrollFiles: state.payroll.fetchingPayrollFiles,
|
|
3909
3939
|
fetchedPayrollFiles: state.payroll.fetchedPayrollFiles,
|
|
@@ -3913,12 +3943,12 @@ var mapStateToProps$7 = function mapStateToProps(state) {
|
|
|
3913
3943
|
totalCount: state.payroll.payrollFilesTotalCount
|
|
3914
3944
|
};
|
|
3915
3945
|
};
|
|
3916
|
-
var mapDispatchToProps$
|
|
3946
|
+
var mapDispatchToProps$8 = function mapDispatchToProps(dispatch) {
|
|
3917
3947
|
return bindActionCreators({
|
|
3918
3948
|
fetchPayrollPaymentFiles: fetchPayrollPaymentFiles
|
|
3919
3949
|
}, dispatch);
|
|
3920
3950
|
};
|
|
3921
|
-
var PayrollPaymentFilesSearcher$1 = connect(mapStateToProps$
|
|
3951
|
+
var PayrollPaymentFilesSearcher$1 = connect(mapStateToProps$8, mapDispatchToProps$8)(PayrollPaymentFilesSearcher);
|
|
3922
3952
|
|
|
3923
3953
|
function PayrollReconciliationFilesDialog(_ref) {
|
|
3924
3954
|
var payroll = _ref.payroll,
|
|
@@ -4130,7 +4160,7 @@ function PayrollSearcherApproved(_ref) {
|
|
|
4130
4160
|
defaultFilters: defaultFilters()
|
|
4131
4161
|
});
|
|
4132
4162
|
}
|
|
4133
|
-
var mapStateToProps$
|
|
4163
|
+
var mapStateToProps$7 = function mapStateToProps(state) {
|
|
4134
4164
|
return {
|
|
4135
4165
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
4136
4166
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -4143,7 +4173,7 @@ var mapStateToProps$6 = function mapStateToProps(state) {
|
|
|
4143
4173
|
mutation: state.payroll.mutation
|
|
4144
4174
|
};
|
|
4145
4175
|
};
|
|
4146
|
-
var mapDispatchToProps$
|
|
4176
|
+
var mapDispatchToProps$7 = function mapDispatchToProps(dispatch) {
|
|
4147
4177
|
return bindActionCreators({
|
|
4148
4178
|
fetchPayrolls: fetchPayrolls,
|
|
4149
4179
|
journalize: journalize,
|
|
@@ -4151,7 +4181,7 @@ var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
|
4151
4181
|
coreConfirm: coreConfirm
|
|
4152
4182
|
}, dispatch);
|
|
4153
4183
|
};
|
|
4154
|
-
var PayrollSearcherApproved$1 = connect(mapStateToProps$
|
|
4184
|
+
var PayrollSearcherApproved$1 = connect(mapStateToProps$7, mapDispatchToProps$7)(PayrollSearcherApproved);
|
|
4155
4185
|
|
|
4156
4186
|
var useStyles$7 = makeStyles(function (theme) {
|
|
4157
4187
|
return {
|
|
@@ -4382,19 +4412,19 @@ function PaymentReconcilationSummarytDialog(_ref) {
|
|
|
4382
4412
|
}
|
|
4383
4413
|
}, formatMessage('payroll.summary.close')))))));
|
|
4384
4414
|
}
|
|
4385
|
-
var mapStateToProps$
|
|
4415
|
+
var mapStateToProps$6 = function mapStateToProps(state) {
|
|
4386
4416
|
return {
|
|
4387
4417
|
rights: !!state.core && !!state.core.user && !!state.core.user.i_user ? state.core.user.i_user.rights : [],
|
|
4388
4418
|
confirmed: state.core.confirmed,
|
|
4389
4419
|
payroll: state.payroll.payroll
|
|
4390
4420
|
};
|
|
4391
4421
|
};
|
|
4392
|
-
var mapDispatchToProps$
|
|
4422
|
+
var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
4393
4423
|
return bindActionCreators({
|
|
4394
4424
|
fetchPayroll: fetchPayroll
|
|
4395
4425
|
}, dispatch);
|
|
4396
4426
|
};
|
|
4397
|
-
var PaymentReconciliationSummaryDialog = connect(mapStateToProps$
|
|
4427
|
+
var PaymentReconciliationSummaryDialog = connect(mapStateToProps$6, mapDispatchToProps$6)(PaymentReconcilationSummarytDialog);
|
|
4398
4428
|
|
|
4399
4429
|
function PayrollSearcherReconciled(_ref) {
|
|
4400
4430
|
var fetchingPayrolls = _ref.fetchingPayrolls,
|
|
@@ -4539,7 +4569,7 @@ function PayrollSearcherReconciled(_ref) {
|
|
|
4539
4569
|
defaultFilters: defaultFilters()
|
|
4540
4570
|
});
|
|
4541
4571
|
}
|
|
4542
|
-
var mapStateToProps$
|
|
4572
|
+
var mapStateToProps$5 = function mapStateToProps(state) {
|
|
4543
4573
|
return {
|
|
4544
4574
|
fetchingPayrolls: state.payroll.fetchingPayrolls,
|
|
4545
4575
|
fetchedPayrolls: state.payroll.fetchedPayrolls,
|
|
@@ -4552,7 +4582,7 @@ var mapStateToProps$4 = function mapStateToProps(state) {
|
|
|
4552
4582
|
mutation: state.payroll.mutation
|
|
4553
4583
|
};
|
|
4554
4584
|
};
|
|
4555
|
-
var mapDispatchToProps$
|
|
4585
|
+
var mapDispatchToProps$5 = function mapDispatchToProps(dispatch) {
|
|
4556
4586
|
return bindActionCreators({
|
|
4557
4587
|
fetchPayrolls: fetchPayrolls,
|
|
4558
4588
|
journalize: journalize,
|
|
@@ -4560,7 +4590,7 @@ var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
|
|
|
4560
4590
|
coreConfirm: coreConfirm
|
|
4561
4591
|
}, dispatch);
|
|
4562
4592
|
};
|
|
4563
|
-
var PayrollSearcherReconciled$1 = connect(mapStateToProps$
|
|
4593
|
+
var PayrollSearcherReconciled$1 = connect(mapStateToProps$5, mapDispatchToProps$5)(PayrollSearcherReconciled);
|
|
4564
4594
|
|
|
4565
4595
|
var useStyles$6 = makeStyles(function (theme) {
|
|
4566
4596
|
return {
|
|
@@ -5050,7 +5080,7 @@ function BenefitConsumptionPayrollSearcher(_ref) {
|
|
|
5050
5080
|
defaultFilters: defaultFilters()
|
|
5051
5081
|
}));
|
|
5052
5082
|
}
|
|
5053
|
-
var mapStateToProps$
|
|
5083
|
+
var mapStateToProps$4 = function mapStateToProps(state) {
|
|
5054
5084
|
return {
|
|
5055
5085
|
fetchingPayrollBenefitConsumptions: state.payroll.fetchingPayrollBenefitConsumptions,
|
|
5056
5086
|
fetchedPayrollBenefitConsumptions: state.payroll.fetchedPayrollBenefitConsumptions,
|
|
@@ -5064,13 +5094,13 @@ var mapStateToProps$3 = function mapStateToProps(state) {
|
|
|
5064
5094
|
benefitsSummary: state.payroll.benefitsSummary
|
|
5065
5095
|
};
|
|
5066
5096
|
};
|
|
5067
|
-
var mapDispatchToProps$
|
|
5097
|
+
var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
|
|
5068
5098
|
return bindActionCreators({
|
|
5069
5099
|
fetchPayrollBenefitConsumptions: fetchPayrollBenefitConsumptions,
|
|
5070
5100
|
fetchBenefitsSummary: fetchBenefitsSummary
|
|
5071
5101
|
}, dispatch);
|
|
5072
5102
|
};
|
|
5073
|
-
var BenefitConsumptionPayrollSearcher$1 = connect(mapStateToProps$
|
|
5103
|
+
var BenefitConsumptionPayrollSearcher$1 = connect(mapStateToProps$4, mapDispatchToProps$4)(BenefitConsumptionPayrollSearcher);
|
|
5074
5104
|
|
|
5075
5105
|
var PayrollTaskTableHeaders = function PayrollTaskTableHeaders() {
|
|
5076
5106
|
return [EMPTY_STRING];
|
|
@@ -5598,7 +5628,7 @@ function BenefitConsumptionSearcher(_ref) {
|
|
|
5598
5628
|
benefitConsumptions: benefitConsumptions
|
|
5599
5629
|
}))));
|
|
5600
5630
|
}
|
|
5601
|
-
var mapStateToProps$
|
|
5631
|
+
var mapStateToProps$3 = function mapStateToProps(state) {
|
|
5602
5632
|
return {
|
|
5603
5633
|
fetchingBenefitConsumptions: state.payroll.fetchingBenefitConsumptions,
|
|
5604
5634
|
fetchedBenefitConsumptions: state.payroll.fetchedBenefitConsumptions,
|
|
@@ -5608,12 +5638,12 @@ var mapStateToProps$2 = function mapStateToProps(state) {
|
|
|
5608
5638
|
benefitConsumptionsTotalCount: state.payroll.benefitConsumptionsTotalCount
|
|
5609
5639
|
};
|
|
5610
5640
|
};
|
|
5611
|
-
var mapDispatchToProps$
|
|
5641
|
+
var mapDispatchToProps$3 = function mapDispatchToProps(dispatch) {
|
|
5612
5642
|
return bindActionCreators({
|
|
5613
5643
|
fetchBenefitConsumptions: fetchBenefitConsumptions
|
|
5614
5644
|
}, dispatch);
|
|
5615
5645
|
};
|
|
5616
|
-
var BenefitConsumptionSearcher$1 = connect(mapStateToProps$
|
|
5646
|
+
var BenefitConsumptionSearcher$1 = connect(mapStateToProps$3, mapDispatchToProps$3)(BenefitConsumptionSearcher);
|
|
5617
5647
|
|
|
5618
5648
|
function BenefitConsumptionsTabLabel(_ref) {
|
|
5619
5649
|
var onChange = _ref.onChange,
|
|
@@ -5805,59 +5835,28 @@ function BistpMetric(_ref2) {
|
|
|
5805
5835
|
}, value)));
|
|
5806
5836
|
}
|
|
5807
5837
|
function BistpPaymentStatusPanel(_ref3) {
|
|
5838
|
+
var _bistpSummary$total, _bistpSummary$confirm, _bistpSummary$pendent, _bistpSummary$rejeita, _bistpSummary$enviado;
|
|
5808
5839
|
var value = _ref3.value,
|
|
5809
5840
|
payrollUuid = _ref3.payrollUuid,
|
|
5810
|
-
payroll = _ref3.payroll
|
|
5841
|
+
payroll = _ref3.payroll,
|
|
5842
|
+
fetchBistpSummary = _ref3.fetchBistpSummary,
|
|
5843
|
+
bistpSummary = _ref3.bistpSummary;
|
|
5811
5844
|
var classes = useStyles$2();
|
|
5812
5845
|
var modulesManager = useModulesManager();
|
|
5813
5846
|
var _useTranslations2 = useTranslations(MODULE_NAME, modulesManager),
|
|
5814
5847
|
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
5848
|
useEffect(function () {
|
|
5826
5849
|
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
|
-
});
|
|
5850
|
+
fetchBistpSummary(payrollUuid);
|
|
5855
5851
|
}
|
|
5856
5852
|
}, [payrollUuid]);
|
|
5857
5853
|
if ((payroll === null || payroll === void 0 ? void 0 : payroll.paymentMethod) !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
5858
|
-
var total =
|
|
5859
|
-
var
|
|
5860
|
-
var
|
|
5854
|
+
var total = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$total = bistpSummary.total) === null || _bistpSummary$total === void 0 ? void 0 : _bistpSummary$total.totalCount) || 0;
|
|
5855
|
+
var confirmados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$confirm = bistpSummary.confirmados) === null || _bistpSummary$confirm === void 0 ? void 0 : _bistpSummary$confirm.totalCount) || 0;
|
|
5856
|
+
var pendentes = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$pendent = bistpSummary.pendentes) === null || _bistpSummary$pendent === void 0 ? void 0 : _bistpSummary$pendent.totalCount) || 0;
|
|
5857
|
+
var rejeitados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$rejeita = bistpSummary.rejeitados) === null || _bistpSummary$rejeita === void 0 ? void 0 : _bistpSummary$rejeita.totalCount) || 0;
|
|
5858
|
+
var enviados = (bistpSummary === null || bistpSummary === void 0 || (_bistpSummary$enviado = bistpSummary.enviados) === null || _bistpSummary$enviado === void 0 ? void 0 : _bistpSummary$enviado.totalCount) || 0;
|
|
5859
|
+
var progress = total > 0 ? Math.min(confirmados / total * 100, 100) : 0;
|
|
5861
5860
|
return /*#__PURE__*/React.createElement(PublishedComponent, {
|
|
5862
5861
|
pubRef: "policyHolder.TabPanel",
|
|
5863
5862
|
module: "payroll",
|
|
@@ -5877,28 +5876,39 @@ function BistpPaymentStatusPanel(_ref3) {
|
|
|
5877
5876
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5878
5877
|
classes: classes,
|
|
5879
5878
|
label: formatMessage('payroll.bistp.status.reconciled'),
|
|
5880
|
-
value:
|
|
5879
|
+
value: confirmados
|
|
5881
5880
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5882
5881
|
classes: classes,
|
|
5883
5882
|
label: formatMessage('payroll.bistp.status.pending'),
|
|
5884
|
-
value:
|
|
5883
|
+
value: pendentes
|
|
5885
5884
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5886
5885
|
classes: classes,
|
|
5887
5886
|
label: formatMessage('payroll.bistp.status.rejected'),
|
|
5888
|
-
value:
|
|
5887
|
+
value: rejeitados
|
|
5889
5888
|
}), /*#__PURE__*/React.createElement(BistpMetric, {
|
|
5890
5889
|
classes: classes,
|
|
5891
5890
|
label: formatMessage('payroll.bistp.status.enviados'),
|
|
5892
|
-
value:
|
|
5891
|
+
value: enviados
|
|
5893
5892
|
})), /*#__PURE__*/React.createElement("div", {
|
|
5894
5893
|
className: classes.progress
|
|
5895
5894
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
5896
5895
|
variant: "body2"
|
|
5897
|
-
}, formatMessage('payroll.bistp.progress'), ": ",
|
|
5896
|
+
}, formatMessage('payroll.bistp.progress'), ": ", confirmados, "/", total), /*#__PURE__*/React.createElement(LinearProgress$1, {
|
|
5898
5897
|
variant: "determinate",
|
|
5899
5898
|
value: progress
|
|
5900
5899
|
})))));
|
|
5901
5900
|
}
|
|
5901
|
+
var mapStateToProps$2 = function mapStateToProps(state) {
|
|
5902
|
+
return {
|
|
5903
|
+
bistpSummary: state.payroll.bistpSummary
|
|
5904
|
+
};
|
|
5905
|
+
};
|
|
5906
|
+
var mapDispatchToProps$2 = function mapDispatchToProps(dispatch) {
|
|
5907
|
+
return bindActionCreators({
|
|
5908
|
+
fetchBistpSummary: fetchBistpSummary
|
|
5909
|
+
}, dispatch);
|
|
5910
|
+
};
|
|
5911
|
+
var BistpPaymentStatusPanel$1 = connect(mapStateToProps$2, mapDispatchToProps$2)(BistpPaymentStatusPanel);
|
|
5902
5912
|
|
|
5903
5913
|
function PaymentPendingPayrollPaymentDialog(_ref) {
|
|
5904
5914
|
var _payrollDetail$id;
|
|
@@ -7057,7 +7067,7 @@ var DEFAULT_CONFIG = {
|
|
|
7057
7067
|
id: 'legalAndFinance.beneficiariesManagement'
|
|
7058
7068
|
}],
|
|
7059
7069
|
'payroll.TabPanel.label': [BenefitConsumptionsTabLabel, PayrollTaskTabLabel, PayrollPaymentFilesTabLabel, BistpPaymentStatusTabLabel],
|
|
7060
|
-
'payroll.TabPanel.panel': [BenefitConsumptionsTabPanel, PayrollTaskTabPanel, PayrollPaymentFilesTabPanel, BistpPaymentStatusPanel],
|
|
7070
|
+
'payroll.TabPanel.panel': [BenefitConsumptionsTabPanel, PayrollTaskTabPanel, PayrollPaymentFilesTabPanel, BistpPaymentStatusPanel$1],
|
|
7061
7071
|
'tasksManagement.tasks': [{
|
|
7062
7072
|
text: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
7063
7073
|
module: "payroll",
|