@stssocialst-stp/fe-payroll 0.2.1 → 0.2.3
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 +135 -12
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +137 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8,6 +8,7 @@ import { bindActionCreators } from 'redux';
|
|
|
8
8
|
import { connect, useSelector } from 'react-redux';
|
|
9
9
|
import { makeStyles } from '@material-ui/styles';
|
|
10
10
|
import DeleteIcon from '@material-ui/icons/Delete';
|
|
11
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
11
12
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
12
13
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
13
14
|
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
@@ -17,7 +18,6 @@ import { injectIntl } from 'react-intl';
|
|
|
17
18
|
import { Grid, FormControlLabel, Checkbox, Tooltip, IconButton, Fab, Divider, Typography, Input, Modal, Backdrop, Fade, Box, Button as Button$1, Paper, TextField, Tab } from '@material-ui/core';
|
|
18
19
|
import { withTheme, withStyles } from '@material-ui/core/styles';
|
|
19
20
|
import AddIcon from '@material-ui/icons/Add';
|
|
20
|
-
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
21
21
|
import VisibilityIcon from '@material-ui/icons/Visibility';
|
|
22
22
|
import _debounce from 'lodash/debounce';
|
|
23
23
|
import Button from '@material-ui/core/Button';
|
|
@@ -34,6 +34,7 @@ import { useReactToPrint } from 'react-to-print';
|
|
|
34
34
|
import PrintIcon from '@material-ui/icons/Print';
|
|
35
35
|
import DialogContentText from '@material-ui/core/DialogContentText';
|
|
36
36
|
import PhotoCameraOutlinedIcon from '@material-ui/icons/PhotoCameraOutlined';
|
|
37
|
+
import LinearProgress from '@material-ui/core/LinearProgress';
|
|
37
38
|
import DownloadIcon from '@material-ui/icons/CloudDownload';
|
|
38
39
|
import Chip from '@material-ui/core/Chip';
|
|
39
40
|
|
|
@@ -354,19 +355,19 @@ function reducer() {
|
|
|
354
355
|
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
355
356
|
fetchingBenefitConsumptions: false,
|
|
356
357
|
fetchedBenefitConsumptions: true,
|
|
357
|
-
benefitConsumptions: (_parseData5 = parseData(action.payload.data.
|
|
358
|
+
benefitConsumptions: (_parseData5 = parseData(action.payload.data.benefitConsumptionByPayroll)) === null || _parseData5 === void 0 ? void 0 : _parseData5.map(function (benefitConsumption) {
|
|
358
359
|
return _objectSpread$6(_objectSpread$6({}, benefitConsumption), {}, {
|
|
359
360
|
id: decodeId(benefitConsumption.id)
|
|
360
361
|
});
|
|
361
362
|
}),
|
|
362
|
-
benefitConsumptionsPageInfo: pageInfo(action.payload.data.
|
|
363
|
-
benefitConsumptionsTotalCount: (_action$payload$data$5 = (_action$payload$data$6 = action.payload.data.
|
|
363
|
+
benefitConsumptionsPageInfo: pageInfo(action.payload.data.benefitConsumptionByPayroll),
|
|
364
|
+
benefitConsumptionsTotalCount: (_action$payload$data$5 = (_action$payload$data$6 = action.payload.data.benefitConsumptionByPayroll) === null || _action$payload$data$6 === void 0 ? void 0 : _action$payload$data$6.totalCount) !== null && _action$payload$data$5 !== void 0 ? _action$payload$data$5 : 0,
|
|
364
365
|
errorBenefitConsumptions: formatGraphQLError(action.payload)
|
|
365
366
|
});
|
|
366
367
|
case ERROR(ACTION_TYPE.GET_BENEFIT_CONSUMPTION):
|
|
367
368
|
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
368
369
|
fetchingBenefitConsumptions: false,
|
|
369
|
-
|
|
370
|
+
errorBenefitConsumptions: formatServerError(action.payload)
|
|
370
371
|
});
|
|
371
372
|
case CLEAR(ACTION_TYPE.GET_BENEFIT_CONSUMPTION):
|
|
372
373
|
return _objectSpread$6(_objectSpread$6({}, state), {}, {
|
|
@@ -694,7 +695,6 @@ function isBase64Encoded(str) {
|
|
|
694
695
|
return base64RegExp.test(str);
|
|
695
696
|
}
|
|
696
697
|
|
|
697
|
-
/* eslint-disable max-len */
|
|
698
698
|
var PAYMENT_POINT_PROJECTION = function PAYMENT_POINT_PROJECTION(modulesManager) {
|
|
699
699
|
return ['id', 'name', 'isDeleted', "location ".concat(modulesManager.getProjection('location.Location.FlatProjection')), "ppm ".concat(modulesManager.getProjection('admin.UserPicker.projection'))];
|
|
700
700
|
};
|
|
@@ -712,11 +712,14 @@ var BENEFIT_CONSUMPTION_SUMMARY_PROJECTION = function BENEFIT_CONSUMPTION_SUMMAR
|
|
|
712
712
|
var BENEFIT_ATTACHMENT_PROJECTION = function BENEFIT_ATTACHMENT_PROJECTION() {
|
|
713
713
|
return ['benefit{id, status, code, dateDue, receipt, individual {firstName, lastName}, jsonExt, type, status, amount, receipt}', 'bill{id, code, terms, amountTotal, datePayed}'];
|
|
714
714
|
};
|
|
715
|
+
var BISTP_SUMMARY_PROJECTION = function BISTP_SUMMARY_PROJECTION() {
|
|
716
|
+
return ['bistpSummary { total reconciled rejected pending skippedNib sendFailed }'];
|
|
717
|
+
};
|
|
715
718
|
var PAYROLL_PROJECTION = function PAYROLL_PROJECTION(modulesManager) {
|
|
716
|
-
return ['id', 'name', 'paymentMethod', 'paymentPlan { code, id, name, benefitPlanType }', 'benefitPlanNameCode', "paymentPoint { ".concat(PAYMENT_POINT_PROJECTION(modulesManager).join(' '), " }"), 'paymentCycle { code, startDate, endDate }', 'jsonExt', 'status', 'dateValidFrom', 'dateValidTo', 'isDeleted'];
|
|
719
|
+
return ['id', 'name', 'paymentMethod', 'paymentPlan { code, id, name, benefitPlanType }', 'benefitPlanNameCode', "paymentPoint { ".concat(PAYMENT_POINT_PROJECTION(modulesManager).join(' '), " }"), 'paymentCycle { code, startDate, endDate }', 'jsonExt', 'status', 'dateValidFrom', 'dateValidTo', 'isDeleted'].concat(_toConsumableArray(BISTP_SUMMARY_PROJECTION()));
|
|
717
720
|
};
|
|
718
721
|
var PAYROLL_SEARCHER_PROJECTION = function PAYROLL_SEARCHER_PROJECTION(modulesManager) {
|
|
719
|
-
return ['id', 'name', 'paymentMethod', 'paymentPlan { code, id, name, benefitPlanType }', 'benefitPlanNameCode', "paymentPoint { ".concat(PAYMENT_POINT_PROJECTION(modulesManager).join(' '), " }"), 'paymentCycle { code, startDate, endDate }', 'jsonExt', 'status', 'dateValidFrom', 'dateValidTo', 'isDeleted'];
|
|
722
|
+
return ['id', 'name', 'paymentMethod', 'paymentPlan { code, id, name, benefitPlanType }', 'benefitPlanNameCode', "paymentPoint { ".concat(PAYMENT_POINT_PROJECTION(modulesManager).join(' '), " }"), 'paymentCycle { code, startDate, endDate }', 'jsonExt', 'status', 'dateValidFrom', 'dateValidTo', 'isDeleted'].concat(_toConsumableArray(BISTP_SUMMARY_PROJECTION()));
|
|
720
723
|
};
|
|
721
724
|
var CSV_RECONCILIATION_PROJECTION = function CSV_RECONCILIATION_PROJECTION() {
|
|
722
725
|
return ['fileName', 'status', 'error', 'jsonExt'];
|
|
@@ -3604,11 +3607,39 @@ function PayrollSearcher(_ref) {
|
|
|
3604
3607
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
3605
3608
|
});
|
|
3606
3609
|
var headers = function headers() {
|
|
3607
|
-
return ['payroll.name', 'payroll.benefitPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
3610
|
+
return ['payroll.name', 'payroll.benefitPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'payroll.bistp.progress', 'emptyLabel'];
|
|
3608
3611
|
};
|
|
3609
3612
|
var sorts = function sorts() {
|
|
3610
3613
|
return [['name', true], ['benefitPlanNameCode', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
3611
3614
|
};
|
|
3615
|
+
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
3616
|
+
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
3617
|
+
var summary = payroll.bistpSummary || {};
|
|
3618
|
+
var total = summary.total || 0;
|
|
3619
|
+
var reconciled = summary.reconciled || 0;
|
|
3620
|
+
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
3621
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3622
|
+
style: {
|
|
3623
|
+
display: 'flex',
|
|
3624
|
+
alignItems: 'center',
|
|
3625
|
+
gap: 8,
|
|
3626
|
+
minWidth: 120
|
|
3627
|
+
}
|
|
3628
|
+
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
3629
|
+
variant: "determinate",
|
|
3630
|
+
value: progress,
|
|
3631
|
+
style: {
|
|
3632
|
+
flex: 1,
|
|
3633
|
+
height: 8,
|
|
3634
|
+
borderRadius: 4
|
|
3635
|
+
}
|
|
3636
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3637
|
+
style: {
|
|
3638
|
+
fontSize: '0.75rem',
|
|
3639
|
+
whiteSpace: 'nowrap'
|
|
3640
|
+
}
|
|
3641
|
+
}, reconciled, "/", total));
|
|
3642
|
+
};
|
|
3612
3643
|
var defaultFilters = function defaultFilters() {
|
|
3613
3644
|
return {
|
|
3614
3645
|
isDeleted: {
|
|
@@ -3641,6 +3672,8 @@ function PayrollSearcher(_ref) {
|
|
|
3641
3672
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
3642
3673
|
}, function (payroll) {
|
|
3643
3674
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
3675
|
+
}, function (payroll) {
|
|
3676
|
+
return renderBistpProgress(payroll);
|
|
3644
3677
|
}, function (payroll) {
|
|
3645
3678
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
3646
3679
|
title: formatMessage('tooltip.viewDetails')
|
|
@@ -3949,8 +3982,36 @@ function PayrollSearcherApproved(_ref) {
|
|
|
3949
3982
|
useEffect(function () {
|
|
3950
3983
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
3951
3984
|
});
|
|
3985
|
+
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
3986
|
+
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
3987
|
+
var summary = payroll.bistpSummary || {};
|
|
3988
|
+
var total = summary.total || 0;
|
|
3989
|
+
var reconciled = summary.reconciled || 0;
|
|
3990
|
+
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
3991
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3992
|
+
style: {
|
|
3993
|
+
display: 'flex',
|
|
3994
|
+
alignItems: 'center',
|
|
3995
|
+
gap: 8,
|
|
3996
|
+
minWidth: 120
|
|
3997
|
+
}
|
|
3998
|
+
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
3999
|
+
variant: "determinate",
|
|
4000
|
+
value: progress,
|
|
4001
|
+
style: {
|
|
4002
|
+
flex: 1,
|
|
4003
|
+
height: 8,
|
|
4004
|
+
borderRadius: 4
|
|
4005
|
+
}
|
|
4006
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
4007
|
+
style: {
|
|
4008
|
+
fontSize: '0.75rem',
|
|
4009
|
+
whiteSpace: 'nowrap'
|
|
4010
|
+
}
|
|
4011
|
+
}, reconciled, "/", total));
|
|
4012
|
+
};
|
|
3952
4013
|
var headers = function headers() {
|
|
3953
|
-
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
4014
|
+
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'payroll.bistp.progress', 'emptyLabel'];
|
|
3954
4015
|
};
|
|
3955
4016
|
var sorts = function sorts() {
|
|
3956
4017
|
return [['name', true], ['paymentPlan', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
@@ -3988,6 +4049,8 @@ function PayrollSearcherApproved(_ref) {
|
|
|
3988
4049
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
3989
4050
|
}, function (payroll) {
|
|
3990
4051
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
4052
|
+
}, function (payroll) {
|
|
4053
|
+
return renderBistpProgress(payroll);
|
|
3991
4054
|
}, function (payroll) {
|
|
3992
4055
|
return /*#__PURE__*/React.createElement(PayrollReconciliationFilesDialog, {
|
|
3993
4056
|
classes: classes,
|
|
@@ -4328,8 +4391,36 @@ function PayrollSearcherReconciled(_ref) {
|
|
|
4328
4391
|
useEffect(function () {
|
|
4329
4392
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
4330
4393
|
});
|
|
4394
|
+
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
4395
|
+
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
4396
|
+
var summary = payroll.bistpSummary || {};
|
|
4397
|
+
var total = summary.total || 0;
|
|
4398
|
+
var reconciled = summary.reconciled || 0;
|
|
4399
|
+
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
4400
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4401
|
+
style: {
|
|
4402
|
+
display: 'flex',
|
|
4403
|
+
alignItems: 'center',
|
|
4404
|
+
gap: 8,
|
|
4405
|
+
minWidth: 120
|
|
4406
|
+
}
|
|
4407
|
+
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
4408
|
+
variant: "determinate",
|
|
4409
|
+
value: progress,
|
|
4410
|
+
style: {
|
|
4411
|
+
flex: 1,
|
|
4412
|
+
height: 8,
|
|
4413
|
+
borderRadius: 4
|
|
4414
|
+
}
|
|
4415
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
4416
|
+
style: {
|
|
4417
|
+
fontSize: '0.75rem',
|
|
4418
|
+
whiteSpace: 'nowrap'
|
|
4419
|
+
}
|
|
4420
|
+
}, reconciled, "/", total));
|
|
4421
|
+
};
|
|
4331
4422
|
var headers = function headers() {
|
|
4332
|
-
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
4423
|
+
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'payroll.bistp.progress', 'emptyLabel'];
|
|
4333
4424
|
};
|
|
4334
4425
|
var sorts = function sorts() {
|
|
4335
4426
|
return [['name', true], ['paymentPlan', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
@@ -4367,6 +4458,8 @@ function PayrollSearcherReconciled(_ref) {
|
|
|
4367
4458
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
4368
4459
|
}, function (payroll) {
|
|
4369
4460
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
4461
|
+
}, function (payroll) {
|
|
4462
|
+
return renderBistpProgress(payroll);
|
|
4370
4463
|
}, function (payroll) {
|
|
4371
4464
|
return /*#__PURE__*/React.createElement(PayrollReconciliationFilesDialog, {
|
|
4372
4465
|
classes: classes,
|
|
@@ -5869,8 +5962,36 @@ function PayrollSearcherPending(_ref) {
|
|
|
5869
5962
|
useEffect(function () {
|
|
5870
5963
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
5871
5964
|
});
|
|
5965
|
+
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
5966
|
+
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
5967
|
+
var summary = payroll.bistpSummary || {};
|
|
5968
|
+
var total = summary.total || 0;
|
|
5969
|
+
var reconciled = summary.reconciled || 0;
|
|
5970
|
+
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
5971
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5972
|
+
style: {
|
|
5973
|
+
display: 'flex',
|
|
5974
|
+
alignItems: 'center',
|
|
5975
|
+
gap: 8,
|
|
5976
|
+
minWidth: 120
|
|
5977
|
+
}
|
|
5978
|
+
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
5979
|
+
variant: "determinate",
|
|
5980
|
+
value: progress,
|
|
5981
|
+
style: {
|
|
5982
|
+
flex: 1,
|
|
5983
|
+
height: 8,
|
|
5984
|
+
borderRadius: 4
|
|
5985
|
+
}
|
|
5986
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
5987
|
+
style: {
|
|
5988
|
+
fontSize: '0.75rem',
|
|
5989
|
+
whiteSpace: 'nowrap'
|
|
5990
|
+
}
|
|
5991
|
+
}, reconciled, "/", total));
|
|
5992
|
+
};
|
|
5872
5993
|
var headers = function headers() {
|
|
5873
|
-
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
5994
|
+
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'payroll.bistp.progress', 'emptyLabel'];
|
|
5874
5995
|
};
|
|
5875
5996
|
var sorts = function sorts() {
|
|
5876
5997
|
return [['name', true], ['paymentPlan', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
@@ -5908,6 +6029,8 @@ function PayrollSearcherPending(_ref) {
|
|
|
5908
6029
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
5909
6030
|
}, function (payroll) {
|
|
5910
6031
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
6032
|
+
}, function (payroll) {
|
|
6033
|
+
return renderBistpProgress(payroll);
|
|
5911
6034
|
}, function (payroll) {
|
|
5912
6035
|
return /*#__PURE__*/React.createElement(PayrollReconciliationFilesDialog, {
|
|
5913
6036
|
classes: classes,
|