@stssocialst-stp/fe-payroll 0.1.9 → 0.2.1
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 +33 -220
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +34 -222
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
package/dist/index.es.js
CHANGED
|
@@ -8,7 +8,6 @@ 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';
|
|
12
11
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
13
12
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
14
13
|
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
@@ -18,6 +17,7 @@ import { injectIntl } from 'react-intl';
|
|
|
18
17
|
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';
|
|
19
18
|
import { withTheme, withStyles } from '@material-ui/core/styles';
|
|
20
19
|
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,7 +34,6 @@ 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';
|
|
38
37
|
import DownloadIcon from '@material-ui/icons/CloudDownload';
|
|
39
38
|
import Chip from '@material-ui/core/Chip';
|
|
40
39
|
|
|
@@ -695,6 +694,7 @@ function isBase64Encoded(str) {
|
|
|
695
694
|
return base64RegExp.test(str);
|
|
696
695
|
}
|
|
697
696
|
|
|
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,14 +712,11 @@ 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
|
-
};
|
|
718
715
|
var PAYROLL_PROJECTION = function PAYROLL_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']
|
|
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'];
|
|
720
717
|
};
|
|
721
718
|
var PAYROLL_SEARCHER_PROJECTION = function PAYROLL_SEARCHER_PROJECTION(modulesManager) {
|
|
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']
|
|
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'];
|
|
723
720
|
};
|
|
724
721
|
var CSV_RECONCILIATION_PROJECTION = function CSV_RECONCILIATION_PROJECTION() {
|
|
725
722
|
return ['fileName', 'status', 'error', 'jsonExt'];
|
|
@@ -2848,7 +2845,7 @@ function downloadPayroll(payrollId, payrollFileName) {
|
|
|
2848
2845
|
}
|
|
2849
2846
|
|
|
2850
2847
|
function PaymentApproveForPaymentDialog(_ref) {
|
|
2851
|
-
var _payrollDetail$id
|
|
2848
|
+
var _payrollDetail$id;
|
|
2852
2849
|
var classes = _ref.classes,
|
|
2853
2850
|
payroll = _ref.payroll,
|
|
2854
2851
|
closePayroll = _ref.closePayroll,
|
|
@@ -2945,14 +2942,12 @@ function PaymentApproveForPaymentDialog(_ref) {
|
|
|
2945
2942
|
var downloadPayrollData = function downloadPayrollData(payrollUuid, payrollName) {
|
|
2946
2943
|
downloadPayroll(payrollUuid, payrollName);
|
|
2947
2944
|
};
|
|
2948
|
-
var isBistp = (payrollDetail === null || payrollDetail === void 0 ? void 0 : payrollDetail.paymentMethod) === PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT;
|
|
2949
|
-
var bistpSummary = (payroll === null || payroll === void 0 ? void 0 : payroll.bistpSummary) || {};
|
|
2950
2945
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
2951
2946
|
onClick: handleOpen,
|
|
2952
2947
|
variant: "contained",
|
|
2953
2948
|
color: "primary",
|
|
2954
2949
|
className: classes.button
|
|
2955
|
-
},
|
|
2950
|
+
}, formatMessage('payroll.viewReconciliationSummary')), /*#__PURE__*/React.createElement(Dialog, {
|
|
2956
2951
|
open: isOpen,
|
|
2957
2952
|
onClose: handleClose,
|
|
2958
2953
|
PaperProps: {
|
|
@@ -2971,83 +2966,7 @@ function PaymentApproveForPaymentDialog(_ref) {
|
|
|
2971
2966
|
}
|
|
2972
2967
|
}, formatMessageWithValues('payroll.reconciliationSummary', {
|
|
2973
2968
|
payrollName: payrollDetail.name
|
|
2974
|
-
})), /*#__PURE__*/React.createElement(DialogContent, null,
|
|
2975
|
-
container: true,
|
|
2976
|
-
spacing: 2,
|
|
2977
|
-
style: {
|
|
2978
|
-
marginBottom: 16
|
|
2979
|
-
}
|
|
2980
|
-
}, /*#__PURE__*/React.createElement(Grid, {
|
|
2981
|
-
item: true,
|
|
2982
|
-
xs: 3
|
|
2983
|
-
}, /*#__PURE__*/React.createElement(Paper, {
|
|
2984
|
-
elevation: 3,
|
|
2985
|
-
style: {
|
|
2986
|
-
padding: '20px',
|
|
2987
|
-
backgroundColor: '#e8f5e9'
|
|
2988
|
-
}
|
|
2989
|
-
}, /*#__PURE__*/React.createElement(Typography$1, {
|
|
2990
|
-
variant: "h6",
|
|
2991
|
-
gutterBottom: true
|
|
2992
|
-
}, formatMessage('payroll.bistp.reconciled')), /*#__PURE__*/React.createElement(Typography$1, {
|
|
2993
|
-
variant: "body1"
|
|
2994
|
-
}, (_bistpSummary$reconci = bistpSummary.reconciled) !== null && _bistpSummary$reconci !== void 0 ? _bistpSummary$reconci : 0, " / ", (_bistpSummary$total = bistpSummary.total) !== null && _bistpSummary$total !== void 0 ? _bistpSummary$total : 0))), /*#__PURE__*/React.createElement(Grid, {
|
|
2995
|
-
item: true,
|
|
2996
|
-
xs: 3
|
|
2997
|
-
}, /*#__PURE__*/React.createElement(Paper, {
|
|
2998
|
-
elevation: 3,
|
|
2999
|
-
style: {
|
|
3000
|
-
padding: '20px',
|
|
3001
|
-
backgroundColor: '#fff3e0'
|
|
3002
|
-
}
|
|
3003
|
-
}, /*#__PURE__*/React.createElement(Typography$1, {
|
|
3004
|
-
variant: "h6",
|
|
3005
|
-
gutterBottom: true
|
|
3006
|
-
}, formatMessage('payroll.bistp.pending')), /*#__PURE__*/React.createElement(Typography$1, {
|
|
3007
|
-
variant: "body1"
|
|
3008
|
-
}, (_bistpSummary$pending = bistpSummary.pending) !== null && _bistpSummary$pending !== void 0 ? _bistpSummary$pending : 0))), /*#__PURE__*/React.createElement(Grid, {
|
|
3009
|
-
item: true,
|
|
3010
|
-
xs: 3
|
|
3011
|
-
}, /*#__PURE__*/React.createElement(Paper, {
|
|
3012
|
-
elevation: 3,
|
|
3013
|
-
style: {
|
|
3014
|
-
padding: '20px',
|
|
3015
|
-
backgroundColor: '#ffebee'
|
|
3016
|
-
}
|
|
3017
|
-
}, /*#__PURE__*/React.createElement(Typography$1, {
|
|
3018
|
-
variant: "h6",
|
|
3019
|
-
gutterBottom: true
|
|
3020
|
-
}, formatMessage('payroll.bistp.rejected')), /*#__PURE__*/React.createElement(Typography$1, {
|
|
3021
|
-
variant: "body1"
|
|
3022
|
-
}, (_bistpSummary$rejecte = bistpSummary.rejected) !== null && _bistpSummary$rejecte !== void 0 ? _bistpSummary$rejecte : 0))), /*#__PURE__*/React.createElement(Grid, {
|
|
3023
|
-
item: true,
|
|
3024
|
-
xs: 3
|
|
3025
|
-
}, /*#__PURE__*/React.createElement(Paper, {
|
|
3026
|
-
elevation: 3,
|
|
3027
|
-
style: {
|
|
3028
|
-
padding: '20px',
|
|
3029
|
-
backgroundColor: '#e3f2fd'
|
|
3030
|
-
}
|
|
3031
|
-
}, /*#__PURE__*/React.createElement(Typography$1, {
|
|
3032
|
-
variant: "h6",
|
|
3033
|
-
gutterBottom: true
|
|
3034
|
-
}, formatMessage('payroll.bistp.skippedNib')), /*#__PURE__*/React.createElement(Typography$1, {
|
|
3035
|
-
variant: "body1"
|
|
3036
|
-
}, (_bistpSummary$skipped = bistpSummary.skippedNib) !== null && _bistpSummary$skipped !== void 0 ? _bistpSummary$skipped : 0))), /*#__PURE__*/React.createElement(Grid, {
|
|
3037
|
-
item: true,
|
|
3038
|
-
xs: 3
|
|
3039
|
-
}, /*#__PURE__*/React.createElement(Paper, {
|
|
3040
|
-
elevation: 3,
|
|
3041
|
-
style: {
|
|
3042
|
-
padding: '20px',
|
|
3043
|
-
backgroundColor: '#fce4ec'
|
|
3044
|
-
}
|
|
3045
|
-
}, /*#__PURE__*/React.createElement(Typography$1, {
|
|
3046
|
-
variant: "h6",
|
|
3047
|
-
gutterBottom: true
|
|
3048
|
-
}, formatMessage('payroll.bistp.sendFailed')), /*#__PURE__*/React.createElement(Typography$1, {
|
|
3049
|
-
variant: "body1"
|
|
3050
|
-
}, (_bistpSummary$sendFai = bistpSummary.sendFailed) !== null && _bistpSummary$sendFai !== void 0 ? _bistpSummary$sendFai : 0)))) : /*#__PURE__*/React.createElement(Grid, {
|
|
2969
|
+
})), /*#__PURE__*/React.createElement(DialogContent, null, "(", /*#__PURE__*/React.createElement(Grid, {
|
|
3051
2970
|
container: true,
|
|
3052
2971
|
spacing: 2
|
|
3053
2972
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
@@ -3092,7 +3011,7 @@ function PaymentApproveForPaymentDialog(_ref) {
|
|
|
3092
3011
|
gutterBottom: true
|
|
3093
3012
|
}, formatMessage('payroll.summary.deliveredReconciliation')), /*#__PURE__*/React.createElement(Typography$1, {
|
|
3094
3013
|
variant: "body1"
|
|
3095
|
-
}, totalReconciledBillAmount)))), /*#__PURE__*/React.createElement("div", {
|
|
3014
|
+
}, totalReconciledBillAmount)))), ")}", /*#__PURE__*/React.createElement("div", {
|
|
3096
3015
|
style: {
|
|
3097
3016
|
backgroundColor: '#DFEDEF'
|
|
3098
3017
|
}
|
|
@@ -3685,39 +3604,11 @@ function PayrollSearcher(_ref) {
|
|
|
3685
3604
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
3686
3605
|
});
|
|
3687
3606
|
var headers = function headers() {
|
|
3688
|
-
return ['payroll.name', 'payroll.benefitPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', '
|
|
3607
|
+
return ['payroll.name', 'payroll.benefitPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
3689
3608
|
};
|
|
3690
3609
|
var sorts = function sorts() {
|
|
3691
3610
|
return [['name', true], ['benefitPlanNameCode', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
3692
3611
|
};
|
|
3693
|
-
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
3694
|
-
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
3695
|
-
var summary = payroll.bistpSummary || {};
|
|
3696
|
-
var total = summary.total || 0;
|
|
3697
|
-
var reconciled = summary.reconciled || 0;
|
|
3698
|
-
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
3699
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3700
|
-
style: {
|
|
3701
|
-
display: 'flex',
|
|
3702
|
-
alignItems: 'center',
|
|
3703
|
-
gap: 8,
|
|
3704
|
-
minWidth: 120
|
|
3705
|
-
}
|
|
3706
|
-
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
3707
|
-
variant: "determinate",
|
|
3708
|
-
value: progress,
|
|
3709
|
-
style: {
|
|
3710
|
-
flex: 1,
|
|
3711
|
-
height: 8,
|
|
3712
|
-
borderRadius: 4
|
|
3713
|
-
}
|
|
3714
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
3715
|
-
style: {
|
|
3716
|
-
fontSize: '0.75rem',
|
|
3717
|
-
whiteSpace: 'nowrap'
|
|
3718
|
-
}
|
|
3719
|
-
}, reconciled, "/", total));
|
|
3720
|
-
};
|
|
3721
3612
|
var defaultFilters = function defaultFilters() {
|
|
3722
3613
|
return {
|
|
3723
3614
|
isDeleted: {
|
|
@@ -3750,8 +3641,6 @@ function PayrollSearcher(_ref) {
|
|
|
3750
3641
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
3751
3642
|
}, function (payroll) {
|
|
3752
3643
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
3753
|
-
}, function (payroll) {
|
|
3754
|
-
return renderBistpProgress(payroll);
|
|
3755
3644
|
}, function (payroll) {
|
|
3756
3645
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
3757
3646
|
title: formatMessage('tooltip.viewDetails')
|
|
@@ -3855,13 +3744,13 @@ function PayrollsPage() {
|
|
|
3855
3744
|
return /*#__PURE__*/React.createElement("div", {
|
|
3856
3745
|
className: classes.page
|
|
3857
3746
|
}, /*#__PURE__*/React.createElement(Helmet, {
|
|
3858
|
-
title: formatMessage('
|
|
3747
|
+
title: formatMessage('payroll.page.title')
|
|
3859
3748
|
}), rights.includes(RIGHT_PAYROLL_SEARCH) && /*#__PURE__*/React.createElement(PayrollSearcher$1, null), rights.includes(RIGHT_PAYROLL_CREATE) && withTooltip(/*#__PURE__*/React.createElement("div", {
|
|
3860
3749
|
className: classes.fab
|
|
3861
3750
|
}, /*#__PURE__*/React.createElement(Fab, {
|
|
3862
3751
|
color: "primary",
|
|
3863
3752
|
onClick: onCreate
|
|
3864
|
-
}, /*#__PURE__*/React.createElement(AddIcon, null))), formatMessage('createButton
|
|
3753
|
+
}, /*#__PURE__*/React.createElement(AddIcon, null))), formatMessage('tooltip.createButton')));
|
|
3865
3754
|
}
|
|
3866
3755
|
|
|
3867
3756
|
function PayrollPaymentFilesSearcher(_ref) {
|
|
@@ -4060,36 +3949,8 @@ function PayrollSearcherApproved(_ref) {
|
|
|
4060
3949
|
useEffect(function () {
|
|
4061
3950
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
4062
3951
|
});
|
|
4063
|
-
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
4064
|
-
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
4065
|
-
var summary = payroll.bistpSummary || {};
|
|
4066
|
-
var total = summary.total || 0;
|
|
4067
|
-
var reconciled = summary.reconciled || 0;
|
|
4068
|
-
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
4069
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4070
|
-
style: {
|
|
4071
|
-
display: 'flex',
|
|
4072
|
-
alignItems: 'center',
|
|
4073
|
-
gap: 8,
|
|
4074
|
-
minWidth: 120
|
|
4075
|
-
}
|
|
4076
|
-
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
4077
|
-
variant: "determinate",
|
|
4078
|
-
value: progress,
|
|
4079
|
-
style: {
|
|
4080
|
-
flex: 1,
|
|
4081
|
-
height: 8,
|
|
4082
|
-
borderRadius: 4
|
|
4083
|
-
}
|
|
4084
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
4085
|
-
style: {
|
|
4086
|
-
fontSize: '0.75rem',
|
|
4087
|
-
whiteSpace: 'nowrap'
|
|
4088
|
-
}
|
|
4089
|
-
}, reconciled, "/", total));
|
|
4090
|
-
};
|
|
4091
3952
|
var headers = function headers() {
|
|
4092
|
-
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', '
|
|
3953
|
+
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
4093
3954
|
};
|
|
4094
3955
|
var sorts = function sorts() {
|
|
4095
3956
|
return [['name', true], ['paymentPlan', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
@@ -4127,8 +3988,6 @@ function PayrollSearcherApproved(_ref) {
|
|
|
4127
3988
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
4128
3989
|
}, function (payroll) {
|
|
4129
3990
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
4130
|
-
}, function (payroll) {
|
|
4131
|
-
return renderBistpProgress(payroll);
|
|
4132
3991
|
}, function (payroll) {
|
|
4133
3992
|
return /*#__PURE__*/React.createElement(PayrollReconciliationFilesDialog, {
|
|
4134
3993
|
classes: classes,
|
|
@@ -4216,7 +4075,7 @@ function ApprovedPayrollsPage() {
|
|
|
4216
4075
|
return /*#__PURE__*/React.createElement("div", {
|
|
4217
4076
|
className: classes.page
|
|
4218
4077
|
}, /*#__PURE__*/React.createElement(Helmet, {
|
|
4219
|
-
title: formatMessage('
|
|
4078
|
+
title: formatMessage('payroll.page.title')
|
|
4220
4079
|
}), rights.includes(RIGHT_PAYROLL_SEARCH) && /*#__PURE__*/React.createElement(PayrollSearcherApproved$1, {
|
|
4221
4080
|
classes: classes
|
|
4222
4081
|
}));
|
|
@@ -4469,36 +4328,8 @@ function PayrollSearcherReconciled(_ref) {
|
|
|
4469
4328
|
useEffect(function () {
|
|
4470
4329
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
4471
4330
|
});
|
|
4472
|
-
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
4473
|
-
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
4474
|
-
var summary = payroll.bistpSummary || {};
|
|
4475
|
-
var total = summary.total || 0;
|
|
4476
|
-
var reconciled = summary.reconciled || 0;
|
|
4477
|
-
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
4478
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4479
|
-
style: {
|
|
4480
|
-
display: 'flex',
|
|
4481
|
-
alignItems: 'center',
|
|
4482
|
-
gap: 8,
|
|
4483
|
-
minWidth: 120
|
|
4484
|
-
}
|
|
4485
|
-
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
4486
|
-
variant: "determinate",
|
|
4487
|
-
value: progress,
|
|
4488
|
-
style: {
|
|
4489
|
-
flex: 1,
|
|
4490
|
-
height: 8,
|
|
4491
|
-
borderRadius: 4
|
|
4492
|
-
}
|
|
4493
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
4494
|
-
style: {
|
|
4495
|
-
fontSize: '0.75rem',
|
|
4496
|
-
whiteSpace: 'nowrap'
|
|
4497
|
-
}
|
|
4498
|
-
}, reconciled, "/", total));
|
|
4499
|
-
};
|
|
4500
4331
|
var headers = function headers() {
|
|
4501
|
-
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', '
|
|
4332
|
+
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
4502
4333
|
};
|
|
4503
4334
|
var sorts = function sorts() {
|
|
4504
4335
|
return [['name', true], ['paymentPlan', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
@@ -4536,8 +4367,6 @@ function PayrollSearcherReconciled(_ref) {
|
|
|
4536
4367
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
4537
4368
|
}, function (payroll) {
|
|
4538
4369
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
4539
|
-
}, function (payroll) {
|
|
4540
|
-
return renderBistpProgress(payroll);
|
|
4541
4370
|
}, function (payroll) {
|
|
4542
4371
|
return /*#__PURE__*/React.createElement(PayrollReconciliationFilesDialog, {
|
|
4543
4372
|
classes: classes,
|
|
@@ -4625,7 +4454,7 @@ function ReconciledPayrollsPage() {
|
|
|
4625
4454
|
return /*#__PURE__*/React.createElement("div", {
|
|
4626
4455
|
className: classes.page
|
|
4627
4456
|
}, /*#__PURE__*/React.createElement(Helmet, {
|
|
4628
|
-
title: formatMessage('
|
|
4457
|
+
title: formatMessage('payroll.page.title')
|
|
4629
4458
|
}), rights.includes(RIGHT_PAYROLL_SEARCH) && /*#__PURE__*/React.createElement(PayrollSearcherReconciled$1, {
|
|
4630
4459
|
classes: classes
|
|
4631
4460
|
}));
|
|
@@ -5798,6 +5627,7 @@ function PaymentPendingPayrollPaymentDialog(_ref) {
|
|
|
5798
5627
|
var classes = _ref.classes,
|
|
5799
5628
|
payroll = _ref.payroll,
|
|
5800
5629
|
fetchPayroll = _ref.fetchPayroll,
|
|
5630
|
+
closePayroll = _ref.closePayroll,
|
|
5801
5631
|
payrollDetail = _ref.payrollDetail;
|
|
5802
5632
|
var modulesManager = useModulesManager();
|
|
5803
5633
|
var _useState = useState((_payrollDetail$id = payrollDetail === null || payrollDetail === void 0 ? void 0 : payrollDetail.id) !== null && _payrollDetail$id !== void 0 ? _payrollDetail$id : null),
|
|
@@ -5865,6 +5695,10 @@ function PaymentPendingPayrollPaymentDialog(_ref) {
|
|
|
5865
5695
|
setTotalReconciledBillAmount(reconciledAmount);
|
|
5866
5696
|
}
|
|
5867
5697
|
}, [isOpen, payroll]);
|
|
5698
|
+
var closePayrollCallback = function closePayrollCallback() {
|
|
5699
|
+
closePayroll(payrollDetail, formatMessageWithValues('payroll.mutation.closeLabel', mutationLabel(payrollDetail)));
|
|
5700
|
+
handleClose();
|
|
5701
|
+
};
|
|
5868
5702
|
var downloadPayrollData = function downloadPayrollData(payrollUuid, payrollName) {
|
|
5869
5703
|
downloadPayroll(payrollUuid, payrollName);
|
|
5870
5704
|
};
|
|
@@ -5970,7 +5804,15 @@ function PaymentPendingPayrollPaymentDialog(_ref) {
|
|
|
5970
5804
|
margin: '0 16px',
|
|
5971
5805
|
marginBottom: '15px'
|
|
5972
5806
|
}
|
|
5973
|
-
}, formatMessage('payroll.summary.download'))
|
|
5807
|
+
}, formatMessage('payroll.summary.download')), /*#__PURE__*/React.createElement(Button, {
|
|
5808
|
+
onClick: closePayrollCallback,
|
|
5809
|
+
variant: "contained",
|
|
5810
|
+
color: "primary",
|
|
5811
|
+
style: {
|
|
5812
|
+
margin: '0 16px',
|
|
5813
|
+
marginBottom: '15px'
|
|
5814
|
+
}
|
|
5815
|
+
}, formatMessage('payroll.summary.approveAndClose'))), /*#__PURE__*/React.createElement("div", {
|
|
5974
5816
|
style: {
|
|
5975
5817
|
"float": 'right',
|
|
5976
5818
|
paddingRight: '16px'
|
|
@@ -5993,7 +5835,8 @@ var mapStateToProps$1 = function mapStateToProps(state) {
|
|
|
5993
5835
|
};
|
|
5994
5836
|
var mapDispatchToProps$1 = function mapDispatchToProps(dispatch) {
|
|
5995
5837
|
return bindActionCreators({
|
|
5996
|
-
fetchPayroll: fetchPayroll
|
|
5838
|
+
fetchPayroll: fetchPayroll,
|
|
5839
|
+
closePayroll: closePayroll
|
|
5997
5840
|
}, dispatch);
|
|
5998
5841
|
};
|
|
5999
5842
|
var PayrollPendingPayrollSummary = connect(mapStateToProps$1, mapDispatchToProps$1)(PaymentPendingPayrollPaymentDialog);
|
|
@@ -6026,36 +5869,8 @@ function PayrollSearcherPending(_ref) {
|
|
|
6026
5869
|
useEffect(function () {
|
|
6027
5870
|
prevSubmittingMutationRef.current = submittingMutation;
|
|
6028
5871
|
});
|
|
6029
|
-
var renderBistpProgress = function renderBistpProgress(payroll) {
|
|
6030
|
-
if (payroll.paymentMethod !== PAYMENT_METHOD.STRATEGY_BISTP_PAYMENT) return null;
|
|
6031
|
-
var summary = payroll.bistpSummary || {};
|
|
6032
|
-
var total = summary.total || 0;
|
|
6033
|
-
var reconciled = summary.reconciled || 0;
|
|
6034
|
-
var progress = total > 0 ? reconciled / total * 100 : 0;
|
|
6035
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
6036
|
-
style: {
|
|
6037
|
-
display: 'flex',
|
|
6038
|
-
alignItems: 'center',
|
|
6039
|
-
gap: 8,
|
|
6040
|
-
minWidth: 120
|
|
6041
|
-
}
|
|
6042
|
-
}, /*#__PURE__*/React.createElement(LinearProgress, {
|
|
6043
|
-
variant: "determinate",
|
|
6044
|
-
value: progress,
|
|
6045
|
-
style: {
|
|
6046
|
-
flex: 1,
|
|
6047
|
-
height: 8,
|
|
6048
|
-
borderRadius: 4
|
|
6049
|
-
}
|
|
6050
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
6051
|
-
style: {
|
|
6052
|
-
fontSize: '0.75rem',
|
|
6053
|
-
whiteSpace: 'nowrap'
|
|
6054
|
-
}
|
|
6055
|
-
}, reconciled, "/", total));
|
|
6056
|
-
};
|
|
6057
5872
|
var headers = function headers() {
|
|
6058
|
-
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', '
|
|
5873
|
+
return ['payroll.name', 'payroll.paymentPlan', 'payroll.paymentPoint', 'payroll.status', 'payroll.paymentMethod', 'emptyLabel'];
|
|
6059
5874
|
};
|
|
6060
5875
|
var sorts = function sorts() {
|
|
6061
5876
|
return [['name', true], ['paymentPlan', true], ['paymentPoint', true], ['status', true], ['paymentMethod', true]];
|
|
@@ -6093,8 +5908,6 @@ function PayrollSearcherPending(_ref) {
|
|
|
6093
5908
|
return payroll.status ? "".concat(payroll.status) : '';
|
|
6094
5909
|
}, function (payroll) {
|
|
6095
5910
|
return payroll.paymentMethod ? "".concat(payroll.paymentMethod) : '';
|
|
6096
|
-
}, function (payroll) {
|
|
6097
|
-
return renderBistpProgress(payroll);
|
|
6098
5911
|
}, function (payroll) {
|
|
6099
5912
|
return /*#__PURE__*/React.createElement(PayrollReconciliationFilesDialog, {
|
|
6100
5913
|
classes: classes,
|
|
@@ -6182,7 +5995,7 @@ function PendingPayrollsPage() {
|
|
|
6182
5995
|
return /*#__PURE__*/React.createElement("div", {
|
|
6183
5996
|
className: classes.page
|
|
6184
5997
|
}, /*#__PURE__*/React.createElement(Helmet, {
|
|
6185
|
-
title: formatMessage('
|
|
5998
|
+
title: formatMessage('payroll.page.title')
|
|
6186
5999
|
}), rights.includes(RIGHT_PAYROLL_SEARCH) && /*#__PURE__*/React.createElement(PayrollSearcherPending$1, {
|
|
6187
6000
|
classes: classes
|
|
6188
6001
|
}));
|