@bigbinary/neeto-payments-frontend 1.4.15 → 1.4.17
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/app/javascript/src/translations/en.json +5 -5
- package/dist/index.cjs.js +1526 -1255
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1507 -1255
- package/dist/index.js.map +1 -1
- package/package.json +14 -12
package/dist/index.js
CHANGED
|
@@ -6,28 +6,46 @@ import { useQueryParams, withTitle, useMutationWithInvalidation, withT, useState
|
|
|
6
6
|
import { buildFiltersFromURL, Bar } from '@bigbinary/neeto-filters-frontend';
|
|
7
7
|
import Header from '@bigbinary/neeto-molecules/Header';
|
|
8
8
|
import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
|
|
9
|
-
import
|
|
9
|
+
import Tab from '@bigbinary/neetoui/Tab';
|
|
10
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
10
11
|
import { useTranslation, Trans } from 'react-i18next';
|
|
11
12
|
import { QueryClient, QueryCache, QueryClientProvider, useMutation, useQuery } from 'react-query';
|
|
12
13
|
import { ReactQueryDevtools } from 'react-query/devtools';
|
|
13
14
|
import { DEFAULT_STALE_TIME, DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE } from '@bigbinary/neeto-commons-frontend/constants';
|
|
15
|
+
import Toastr from '@bigbinary/neetoui/Toastr';
|
|
16
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
14
17
|
import { Download, Down, Right } from '@bigbinary/neeto-icons';
|
|
18
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
19
|
+
import Modal from '@bigbinary/neetoui/Modal';
|
|
15
20
|
import axios from 'axios';
|
|
16
21
|
import { createSubscription, getQueryParams, buildUrl, dateFormat } from '@bigbinary/neeto-commons-frontend/utils';
|
|
17
22
|
import { isEmpty, assoc, modify, concat, curry, pipe, split, map, join, mergeLeft, equals, sortBy, prop, evolve, insert, mergeDeepLeft, pluck } from 'ramda';
|
|
18
23
|
import { useHistory } from 'react-router-dom';
|
|
19
24
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
25
|
+
import Tag from '@bigbinary/neetoui/Tag';
|
|
26
|
+
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
20
27
|
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
21
28
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
22
29
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
23
30
|
import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
31
|
+
import Table from '@bigbinary/neetoui/Table';
|
|
32
|
+
import NoData from '@bigbinary/neetoui/NoData';
|
|
24
33
|
import require$$0 from 'util';
|
|
34
|
+
import Pane from '@bigbinary/neetoui/Pane';
|
|
25
35
|
import { useParams } from 'react-router-dom/cjs/react-router-dom';
|
|
26
36
|
import classNames from 'classnames';
|
|
37
|
+
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
38
|
+
import Alert from '@bigbinary/neetoui/Alert';
|
|
27
39
|
import { Finish as Finish$1, Modal as Modal$1, Demo } from 'neetointegrations';
|
|
28
|
-
import
|
|
40
|
+
import Label from '@bigbinary/neetoui/Label';
|
|
41
|
+
import Select from '@bigbinary/neetoui/formik/Select';
|
|
42
|
+
import Form from '@bigbinary/neetoui/formik/Form';
|
|
43
|
+
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
29
44
|
import * as yup from 'yup';
|
|
45
|
+
import Radio from '@bigbinary/neetoui/Radio';
|
|
46
|
+
import Input from '@bigbinary/neetoui/formik/Input';
|
|
30
47
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
48
|
+
import QRCodeImage from 'qrcode.react';
|
|
31
49
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
32
50
|
|
|
33
51
|
function _arrayWithHoles(arr) {
|
|
@@ -85,53 +103,6 @@ function _slicedToArray(arr, i) {
|
|
|
85
103
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
86
104
|
}
|
|
87
105
|
|
|
88
|
-
var queryClient = new QueryClient({
|
|
89
|
-
queryCache: new QueryCache(),
|
|
90
|
-
defaultOptions: {
|
|
91
|
-
queries: {
|
|
92
|
-
staleTime: DEFAULT_STALE_TIME,
|
|
93
|
-
keepPreviousData: true,
|
|
94
|
-
onError: function onError(error) {
|
|
95
|
-
return Toastr.error(error);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
var withReactQuery = function withReactQuery(Component) {
|
|
102
|
-
var QueryWrapper = function QueryWrapper(props) {
|
|
103
|
-
return /*#__PURE__*/React__default.createElement(QueryClientProvider, {
|
|
104
|
-
client: queryClient
|
|
105
|
-
}, /*#__PURE__*/React__default.createElement(Component, props), /*#__PURE__*/React__default.createElement(ReactQueryDevtools, {
|
|
106
|
-
initialIsOpen: false,
|
|
107
|
-
position: "bottom-right"
|
|
108
|
-
}));
|
|
109
|
-
};
|
|
110
|
-
return QueryWrapper;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
var TAB$5 = {
|
|
114
|
-
all: "all",
|
|
115
|
-
connected: "connected",
|
|
116
|
-
disconnected: "disconnected",
|
|
117
|
-
incomplete: "incomplete"
|
|
118
|
-
};
|
|
119
|
-
var TABS$5 = Object.values(TAB$5);
|
|
120
|
-
var SEARCH_PROPS$1 = {
|
|
121
|
-
key: "keyword",
|
|
122
|
-
node: "identifier,user.first_name,last_name,email",
|
|
123
|
-
model: "NeetoPaymentsEngine::Stripe::Account,User"
|
|
124
|
-
};
|
|
125
|
-
var DASHBOARD_MANDATORY_COLUMNS$2 = ["id", "status", "identifier"];
|
|
126
|
-
var FILTER_COLUMNS$3 = [{
|
|
127
|
-
key: "created_at",
|
|
128
|
-
label: t$1("neetoPayments.common.createdAt"),
|
|
129
|
-
node: "created_at",
|
|
130
|
-
type: "date",
|
|
131
|
-
showRuleSelector: true
|
|
132
|
-
}];
|
|
133
|
-
var STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY = "stripeAccountsDashboard";
|
|
134
|
-
|
|
135
106
|
function _typeof$1(o) {
|
|
136
107
|
"@babel/helpers - typeof";
|
|
137
108
|
|
|
@@ -173,6 +144,56 @@ function _defineProperty(obj, key, value) {
|
|
|
173
144
|
return obj;
|
|
174
145
|
}
|
|
175
146
|
|
|
147
|
+
var queryClient = new QueryClient({
|
|
148
|
+
queryCache: new QueryCache(),
|
|
149
|
+
defaultOptions: {
|
|
150
|
+
queries: {
|
|
151
|
+
staleTime: DEFAULT_STALE_TIME,
|
|
152
|
+
keepPreviousData: true,
|
|
153
|
+
onError: function onError(error) {
|
|
154
|
+
return Toastr.error(error);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
function ownKeys$l(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; }
|
|
161
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
162
|
+
var withReactQuery = function withReactQuery(Component) {
|
|
163
|
+
var QueryWrapper = function QueryWrapper(props) {
|
|
164
|
+
return /*#__PURE__*/jsxs(QueryClientProvider, {
|
|
165
|
+
client: queryClient,
|
|
166
|
+
children: [/*#__PURE__*/jsx(Component, _objectSpread$l({}, props)), /*#__PURE__*/jsx(ReactQueryDevtools, {
|
|
167
|
+
initialIsOpen: false,
|
|
168
|
+
position: "bottom-right"
|
|
169
|
+
})]
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
return QueryWrapper;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
var TAB$5 = {
|
|
176
|
+
all: "all",
|
|
177
|
+
connected: "connected",
|
|
178
|
+
disconnected: "disconnected",
|
|
179
|
+
incomplete: "incomplete"
|
|
180
|
+
};
|
|
181
|
+
var TABS$5 = Object.values(TAB$5);
|
|
182
|
+
var SEARCH_PROPS$1 = {
|
|
183
|
+
key: "keyword",
|
|
184
|
+
node: "identifier,user.first_name,last_name,email",
|
|
185
|
+
model: "NeetoPaymentsEngine::Stripe::Account,User"
|
|
186
|
+
};
|
|
187
|
+
var DASHBOARD_MANDATORY_COLUMNS$2 = ["id", "status", "identifier"];
|
|
188
|
+
var FILTER_COLUMNS$3 = [{
|
|
189
|
+
key: "created_at",
|
|
190
|
+
label: t$1("neetoPayments.common.createdAt"),
|
|
191
|
+
node: "created_at",
|
|
192
|
+
type: "date",
|
|
193
|
+
showRuleSelector: true
|
|
194
|
+
}];
|
|
195
|
+
var STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY = "stripeAccountsDashboard";
|
|
196
|
+
|
|
176
197
|
var BASE_URL = "payments";
|
|
177
198
|
var STRIPE_DASHBOARD_LINK = "https://dashboard.stripe.com/";
|
|
178
199
|
var CURRENCY_OPTIONS = [{
|
|
@@ -697,8 +718,8 @@ var buildStripePayoutLink = function buildStripePayoutLink(identifier) {
|
|
|
697
718
|
return "".concat(STRIPE_DASHBOARD_LINK).concat(isLive ? "" : "test/", "payouts/").concat(identifier);
|
|
698
719
|
};
|
|
699
720
|
|
|
700
|
-
function ownKeys$
|
|
701
|
-
function _objectSpread$
|
|
721
|
+
function ownKeys$k(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; }
|
|
722
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
702
723
|
var ExportModal$2 = function ExportModal(_ref) {
|
|
703
724
|
var showExportModal = _ref.showExportModal,
|
|
704
725
|
setShowExportModal = _ref.setShowExportModal,
|
|
@@ -724,13 +745,12 @@ var ExportModal$2 = function ExportModal(_ref) {
|
|
|
724
745
|
return "account-report-".concat(uuidV4());
|
|
725
746
|
}, []);
|
|
726
747
|
var receivedCallback = function receivedCallback(data) {
|
|
727
|
-
if (data.download_url)
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
748
|
+
if (!data.download_url) return;
|
|
749
|
+
setDownloadUrl(data.download_url);
|
|
750
|
+
setIsGenerating(false);
|
|
731
751
|
};
|
|
732
752
|
var handleGenerateClick = function handleGenerateClick() {
|
|
733
|
-
var payload = _objectSpread$
|
|
753
|
+
var payload = _objectSpread$k({
|
|
734
754
|
kind: "account",
|
|
735
755
|
token: token,
|
|
736
756
|
filters: filters,
|
|
@@ -757,33 +777,44 @@ var ExportModal$2 = function ExportModal(_ref) {
|
|
|
757
777
|
var onClose = function onClose() {
|
|
758
778
|
return setShowExportModal(false);
|
|
759
779
|
};
|
|
760
|
-
return /*#__PURE__*/
|
|
780
|
+
return /*#__PURE__*/jsxs(Modal, {
|
|
761
781
|
onClose: onClose,
|
|
762
|
-
isOpen: showExportModal
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
782
|
+
isOpen: showExportModal,
|
|
783
|
+
children: [/*#__PURE__*/jsx(Modal.Header, {
|
|
784
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
785
|
+
style: "h2",
|
|
786
|
+
children: t("neetoPayments.export.title.account")
|
|
787
|
+
})
|
|
788
|
+
}), /*#__PURE__*/jsx(Modal.Body, {
|
|
789
|
+
children: isFileLoading ? /*#__PURE__*/jsx(Typography, {
|
|
790
|
+
style: "body2",
|
|
791
|
+
children: t("neetoPayments.export.pleaseWait")
|
|
792
|
+
}) : /*#__PURE__*/jsx(Typography, {
|
|
793
|
+
style: "body2",
|
|
794
|
+
children: downloadUrl ? t("neetoPayments.export.fileReady") : t("neetoPayments.export.download.account")
|
|
795
|
+
})
|
|
796
|
+
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
797
|
+
className: "space-x-2",
|
|
798
|
+
children: downloadUrl ? /*#__PURE__*/jsx(Button, {
|
|
799
|
+
href: downloadUrl,
|
|
800
|
+
icon: Download,
|
|
801
|
+
label: t("neetoPayments.common.download"),
|
|
802
|
+
onClick: onClose
|
|
803
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
804
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
805
|
+
disabled: isFileLoading,
|
|
806
|
+
label: t("neetoPayments.common.cancel"),
|
|
807
|
+
style: "tertiary",
|
|
808
|
+
onClick: onClose
|
|
809
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
810
|
+
disabled: isFileLoading,
|
|
811
|
+
label: t("neetoPayments.common.export"),
|
|
812
|
+
loading: isFileLoading,
|
|
813
|
+
onClick: handleGenerateClick
|
|
814
|
+
})]
|
|
815
|
+
})
|
|
816
|
+
})]
|
|
817
|
+
});
|
|
787
818
|
};
|
|
788
819
|
|
|
789
820
|
function _arrayWithoutHoles(arr) {
|
|
@@ -802,8 +833,8 @@ function _toConsumableArray(arr) {
|
|
|
802
833
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
803
834
|
}
|
|
804
835
|
|
|
805
|
-
function ownKeys$
|
|
806
|
-
function _objectSpread$
|
|
836
|
+
function ownKeys$j(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; }
|
|
837
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
807
838
|
var processSortProperties = function processSortProperties(sortProperties) {
|
|
808
839
|
if (sortProperties.sortBy === "payment_amount") {
|
|
809
840
|
return assoc("sortBy", "neeto_payments_engine_stripe_transactions.amount", sortProperties);
|
|
@@ -818,7 +849,7 @@ var processSortProperties = function processSortProperties(sortProperties) {
|
|
|
818
849
|
};
|
|
819
850
|
var buildDefaultPageProperties = function buildDefaultPageProperties(tabs) {
|
|
820
851
|
return tabs.reduce(function (pageProperties, tab) {
|
|
821
|
-
return _objectSpread$
|
|
852
|
+
return _objectSpread$j(_objectSpread$j({}, pageProperties), {}, _defineProperty({}, tab, DEFAULT_PAGE_VALUES));
|
|
822
853
|
}, {});
|
|
823
854
|
};
|
|
824
855
|
var buildPayload = function buildPayload(_ref) {
|
|
@@ -830,7 +861,7 @@ var buildPayload = function buildPayload(_ref) {
|
|
|
830
861
|
sortProperties = _ref$sortProperties === void 0 ? {} : _ref$sortProperties,
|
|
831
862
|
_ref$payoutId = _ref.payoutId,
|
|
832
863
|
payoutId = _ref$payoutId === void 0 ? null : _ref$payoutId;
|
|
833
|
-
return _objectSpread$
|
|
864
|
+
return _objectSpread$j({
|
|
834
865
|
tab: camelToSnakeCase(tab),
|
|
835
866
|
payoutId: payoutId,
|
|
836
867
|
page: (_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.page,
|
|
@@ -846,7 +877,7 @@ var buildRowData$1 = function buildRowData(_ref2) {
|
|
|
846
877
|
tab = _ref2$tab === void 0 ? "all" : _ref2$tab;
|
|
847
878
|
return data.map(function (element, index) {
|
|
848
879
|
var _pageProperties$tab3, _pageProperties$tab4;
|
|
849
|
-
return _objectSpread$
|
|
880
|
+
return _objectSpread$j(_objectSpread$j({}, element), {}, {
|
|
850
881
|
payable: element.payable,
|
|
851
882
|
identifier: element,
|
|
852
883
|
id: isEmpty(pageProperties) ? index + 1 : ((_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize) * (((_pageProperties$tab4 = pageProperties[tab]) === null || _pageProperties$tab4 === void 0 ? void 0 : _pageProperties$tab4.page) - 1) + index + 1
|
|
@@ -857,15 +888,17 @@ var buildRowData$1 = function buildRowData(_ref2) {
|
|
|
857
888
|
var CopyButtonWrapper = function CopyButtonWrapper(_ref) {
|
|
858
889
|
var content = _ref.content,
|
|
859
890
|
children = _ref.children;
|
|
860
|
-
return /*#__PURE__*/
|
|
861
|
-
className: "flex items-center space-x-2"
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
891
|
+
return /*#__PURE__*/jsxs("div", {
|
|
892
|
+
className: "flex items-center space-x-2",
|
|
893
|
+
children: [children, isPresent(content) && /*#__PURE__*/jsx("div", {
|
|
894
|
+
className: "identifier-copy-button invisible",
|
|
895
|
+
children: /*#__PURE__*/jsx(CopyToClipboardButton, {
|
|
896
|
+
size: "small",
|
|
897
|
+
style: "text",
|
|
898
|
+
value: content
|
|
899
|
+
})
|
|
900
|
+
})]
|
|
901
|
+
});
|
|
869
902
|
};
|
|
870
903
|
|
|
871
904
|
var getTagStyle = function getTagStyle(status) {
|
|
@@ -883,15 +916,17 @@ var preProcessStatus = function preProcessStatus(type, status) {
|
|
|
883
916
|
};
|
|
884
917
|
var renderStatus = curry(function (type, status, record) {
|
|
885
918
|
var processedStatus = preProcessStatus(type, status, record);
|
|
886
|
-
return /*#__PURE__*/
|
|
919
|
+
return /*#__PURE__*/jsx(Tooltip, {
|
|
887
920
|
content: t$1("neetoPayments.tooltipContent.".concat(type, ".").concat(processedStatus)),
|
|
888
|
-
position: "top"
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
921
|
+
position: "top",
|
|
922
|
+
children: /*#__PURE__*/jsx("div", {
|
|
923
|
+
className: "w-fit",
|
|
924
|
+
children: /*#__PURE__*/jsx(Tag, {
|
|
925
|
+
label: t$1("neetoPayments.tagLabels.".concat(type, ".").concat(processedStatus)),
|
|
926
|
+
style: getTagStyle(processedStatus)
|
|
927
|
+
})
|
|
928
|
+
})
|
|
929
|
+
});
|
|
895
930
|
});
|
|
896
931
|
var renderFullName = function renderFullName(_, _ref) {
|
|
897
932
|
var firstName = _ref.firstName,
|
|
@@ -899,16 +934,17 @@ var renderFullName = function renderFullName(_, _ref) {
|
|
|
899
934
|
return "".concat(firstName, " ").concat(lastName);
|
|
900
935
|
};
|
|
901
936
|
var renderEmail = function renderEmail(email) {
|
|
902
|
-
return /*#__PURE__*/
|
|
903
|
-
content: email
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
937
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
938
|
+
content: email,
|
|
939
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
940
|
+
href: "mailto:".concat(email),
|
|
941
|
+
label: email,
|
|
942
|
+
style: "link"
|
|
943
|
+
})
|
|
944
|
+
});
|
|
909
945
|
};
|
|
910
946
|
var renderDate = function renderDate(date) {
|
|
911
|
-
return /*#__PURE__*/
|
|
947
|
+
return /*#__PURE__*/jsx(DateFormat.DateTime, {
|
|
912
948
|
date: date
|
|
913
949
|
});
|
|
914
950
|
};
|
|
@@ -916,7 +952,7 @@ var renderDate = function renderDate(date) {
|
|
|
916
952
|
var IdentifierButton = function IdentifierButton(_ref) {
|
|
917
953
|
var href = _ref.href,
|
|
918
954
|
label = _ref.label;
|
|
919
|
-
return /*#__PURE__*/
|
|
955
|
+
return /*#__PURE__*/jsx(Button, {
|
|
920
956
|
href: href,
|
|
921
957
|
label: label,
|
|
922
958
|
size: "small",
|
|
@@ -932,12 +968,13 @@ var renderIdentifier$3 = function renderIdentifier() {
|
|
|
932
968
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
933
969
|
_ref$live = _ref.live,
|
|
934
970
|
isLive = _ref$live === void 0 ? false : _ref$live;
|
|
935
|
-
return /*#__PURE__*/
|
|
936
|
-
content: identifier
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
971
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
972
|
+
content: identifier,
|
|
973
|
+
children: /*#__PURE__*/jsx(IdentifierButton$1, {
|
|
974
|
+
href: buildStripeAccountLink(identifier, isLive),
|
|
975
|
+
label: identifier
|
|
976
|
+
})
|
|
977
|
+
});
|
|
941
978
|
};
|
|
942
979
|
var renderCountry = pipe(split("_"), map(capitalize), join(" "));
|
|
943
980
|
|
|
@@ -992,8 +1029,8 @@ var COLUMNS$5 = [{
|
|
|
992
1029
|
sorter: true
|
|
993
1030
|
}];
|
|
994
1031
|
|
|
995
|
-
function ownKeys$
|
|
996
|
-
function _objectSpread$
|
|
1032
|
+
function ownKeys$i(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; }
|
|
1033
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
997
1034
|
var useFiltersAndPagination$3 = function useFiltersAndPagination() {
|
|
998
1035
|
var history = useHistory();
|
|
999
1036
|
var _useState = useState(false),
|
|
@@ -1018,7 +1055,7 @@ var useFiltersAndPagination$3 = function useFiltersAndPagination() {
|
|
|
1018
1055
|
var _getQueryParams = getQueryParams(),
|
|
1019
1056
|
_getQueryParams$searc = _getQueryParams.searchTerm,
|
|
1020
1057
|
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
1021
|
-
var searchKeywordProps = _objectSpread$
|
|
1058
|
+
var searchKeywordProps = _objectSpread$i(_objectSpread$i({}, SEARCH_PROPS$1), {}, {
|
|
1022
1059
|
key: "search_term",
|
|
1023
1060
|
value: searchTerm.trim()
|
|
1024
1061
|
});
|
|
@@ -1165,46 +1202,48 @@ var List$6 = function List(_ref) {
|
|
|
1165
1202
|
} : DEFAULT_SORT_PROPERTIES$1);
|
|
1166
1203
|
};
|
|
1167
1204
|
if (isLoading) {
|
|
1168
|
-
return /*#__PURE__*/
|
|
1205
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
1169
1206
|
}
|
|
1170
1207
|
if (dataSize <= 0 || !isPresent(accounts)) {
|
|
1171
|
-
return /*#__PURE__*/
|
|
1172
|
-
className: "flex h-full w-full items-center justify-center"
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1208
|
+
return /*#__PURE__*/jsx("div", {
|
|
1209
|
+
className: "flex h-full w-full items-center justify-center",
|
|
1210
|
+
children: /*#__PURE__*/jsx(NoData, {
|
|
1211
|
+
title: tab === TAB$5.all ? t("neetoPayments.emptyState.account") : t("neetoPayments.emptyState.accountWithStatus", {
|
|
1212
|
+
status: tab
|
|
1213
|
+
})
|
|
1176
1214
|
})
|
|
1177
|
-
})
|
|
1215
|
+
});
|
|
1178
1216
|
}
|
|
1179
|
-
return /*#__PURE__*/
|
|
1180
|
-
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1217
|
+
return /*#__PURE__*/jsx(TableWrapper, {
|
|
1218
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
1219
|
+
children: /*#__PURE__*/jsx(Table, {
|
|
1220
|
+
fixedHeight: true,
|
|
1221
|
+
allowRowClick: false,
|
|
1222
|
+
columnData: getVisibleColumnData(columnData),
|
|
1223
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
1224
|
+
handlePageChange: handleTablePagination,
|
|
1225
|
+
loading: isFetching,
|
|
1226
|
+
rowData: buildRowData$1({
|
|
1227
|
+
data: accounts,
|
|
1228
|
+
pageProperties: pageProperties,
|
|
1229
|
+
tab: tab
|
|
1230
|
+
}),
|
|
1231
|
+
rowSelection: false,
|
|
1232
|
+
sortDirections: SORT_DIRECTIONS,
|
|
1233
|
+
totalCount: dataSize,
|
|
1234
|
+
paginationProps: {
|
|
1235
|
+
showSizeChanger: true,
|
|
1236
|
+
hideOnSinglePage: true,
|
|
1237
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
1238
|
+
total: dataSize
|
|
1239
|
+
},
|
|
1240
|
+
onChange: handleTableChange,
|
|
1241
|
+
onColumnHide: function onColumnHide(_ref2) {
|
|
1242
|
+
var dataIndex = _ref2.dataIndex;
|
|
1243
|
+
return hideColumn(dataIndex);
|
|
1244
|
+
}
|
|
1245
|
+
})
|
|
1246
|
+
});
|
|
1208
1247
|
};
|
|
1209
1248
|
|
|
1210
1249
|
var AccountsDashboard = function AccountsDashboard() {
|
|
@@ -1241,90 +1280,82 @@ var AccountsDashboard = function AccountsDashboard() {
|
|
|
1241
1280
|
setFilters(filters);
|
|
1242
1281
|
});
|
|
1243
1282
|
};
|
|
1244
|
-
return /*#__PURE__*/
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}), isTabsVisible && /*#__PURE__*/React__default.createElement(Tab, null, TABS$5.map(function (item) {
|
|
1251
|
-
return /*#__PURE__*/React__default.createElement(Tab.Item, {
|
|
1252
|
-
active: tab === item,
|
|
1253
|
-
key: item,
|
|
1254
|
-
onClick: function onClick() {
|
|
1255
|
-
return handleTabChange(item);
|
|
1256
|
-
}
|
|
1257
|
-
}, t("neetoPayments.common.".concat(item)));
|
|
1258
|
-
})), /*#__PURE__*/React__default.createElement(SubHeader, {
|
|
1259
|
-
className: "mt-4",
|
|
1260
|
-
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/React__default.createElement(Typography, {
|
|
1261
|
-
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
1262
|
-
component: "h4"
|
|
1263
|
-
}, tab === TAB$5.all ? t("neetoPayments.countOf.account", {
|
|
1264
|
-
count: dataSize
|
|
1265
|
-
}) : t("neetoPayments.countOf.accountWithStatus", {
|
|
1266
|
-
count: dataSize,
|
|
1267
|
-
status: tab
|
|
1268
|
-
})),
|
|
1269
|
-
rightActionBlock: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Bar, {
|
|
1270
|
-
columns: FILTER_COLUMNS$3,
|
|
1271
|
-
keyword: searchKeywordProps,
|
|
1272
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
1273
|
-
onChange: handleFiltersChange
|
|
1274
|
-
}), isFilterButtonVisible && /*#__PURE__*/React__default.createElement(SubHeader.RightBlock, {
|
|
1275
|
-
columnsButtonProps: {
|
|
1276
|
-
columnData: columnData,
|
|
1277
|
-
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$2,
|
|
1278
|
-
localStorageKey: STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY
|
|
1279
|
-
},
|
|
1280
|
-
downloadButtonProps: {
|
|
1281
|
-
onClick: function onClick() {
|
|
1282
|
-
return setShowExportModal(true);
|
|
1283
|
-
}
|
|
1284
|
-
},
|
|
1285
|
-
filterProps: {
|
|
1286
|
-
columns: FILTER_COLUMNS$3,
|
|
1287
|
-
isOpen: isFilterPaneOpen,
|
|
1288
|
-
keyword: searchKeywordProps,
|
|
1289
|
-
setIsOpen: setIsFilterPaneOpen,
|
|
1290
|
-
onChange: handleFiltersChange
|
|
1283
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
1284
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
1285
|
+
title: t("neetoPayments.title.account"),
|
|
1286
|
+
searchProps: isFilterButtonVisible && {
|
|
1287
|
+
placeholder: t("neetoPayments.common.search"),
|
|
1288
|
+
className: "w-80"
|
|
1291
1289
|
}
|
|
1292
|
-
})
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1290
|
+
}), isTabsVisible && /*#__PURE__*/jsx(Tab, {
|
|
1291
|
+
children: TABS$5.map(function (item) {
|
|
1292
|
+
return /*#__PURE__*/jsx(Tab.Item, {
|
|
1293
|
+
active: tab === item,
|
|
1294
|
+
onClick: function onClick() {
|
|
1295
|
+
return handleTabChange(item);
|
|
1296
|
+
},
|
|
1297
|
+
children: t("neetoPayments.common.".concat(item))
|
|
1298
|
+
}, item);
|
|
1299
|
+
})
|
|
1300
|
+
}), /*#__PURE__*/jsx(SubHeader, {
|
|
1301
|
+
className: "mt-4",
|
|
1302
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/jsx(Typography, {
|
|
1303
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
1304
|
+
component: "h4",
|
|
1305
|
+
children: tab === TAB$5.all ? t("neetoPayments.countOf.account", {
|
|
1306
|
+
count: dataSize
|
|
1307
|
+
}) : t("neetoPayments.countOf.accountWithStatus", {
|
|
1308
|
+
count: dataSize,
|
|
1309
|
+
status: tab
|
|
1310
|
+
})
|
|
1311
|
+
}),
|
|
1312
|
+
rightActionBlock: /*#__PURE__*/jsxs(Fragment, {
|
|
1313
|
+
children: [/*#__PURE__*/jsx(Bar, {
|
|
1314
|
+
columns: FILTER_COLUMNS$3,
|
|
1315
|
+
keyword: searchKeywordProps,
|
|
1316
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
1317
|
+
onChange: handleFiltersChange
|
|
1318
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsx(SubHeader.RightBlock, {
|
|
1319
|
+
columnsButtonProps: {
|
|
1320
|
+
columnData: columnData,
|
|
1321
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$2,
|
|
1322
|
+
localStorageKey: STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY
|
|
1323
|
+
},
|
|
1324
|
+
downloadButtonProps: {
|
|
1325
|
+
onClick: function onClick() {
|
|
1326
|
+
return setShowExportModal(true);
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
filterProps: {
|
|
1330
|
+
columns: FILTER_COLUMNS$3,
|
|
1331
|
+
isOpen: isFilterPaneOpen,
|
|
1332
|
+
keyword: searchKeywordProps,
|
|
1333
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
1334
|
+
onChange: handleFiltersChange
|
|
1335
|
+
}
|
|
1336
|
+
})]
|
|
1337
|
+
})
|
|
1338
|
+
}), /*#__PURE__*/jsx(List$6, {
|
|
1339
|
+
columnData: columnData,
|
|
1340
|
+
filters: filters,
|
|
1341
|
+
pageProperties: pageProperties,
|
|
1342
|
+
setDataSize: setDataSize,
|
|
1343
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
1344
|
+
setPageProperties: setPageProperties,
|
|
1345
|
+
setSortProperties: setSortProperties,
|
|
1346
|
+
sortProperties: sortProperties,
|
|
1347
|
+
tab: tab
|
|
1348
|
+
}), /*#__PURE__*/jsx(ExportModal$2, {
|
|
1349
|
+
filters: filters,
|
|
1350
|
+
setShowExportModal: setShowExportModal,
|
|
1351
|
+
showExportModal: showExportModal,
|
|
1352
|
+
sortProperties: sortProperties,
|
|
1353
|
+
tab: tab
|
|
1354
|
+
})]
|
|
1355
|
+
});
|
|
1310
1356
|
};
|
|
1311
1357
|
var index$4 = withTitle(withReactQuery(AccountsDashboard), t$1("neetoPayments.title.account"));
|
|
1312
1358
|
|
|
1313
|
-
function _extends$1() {
|
|
1314
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1315
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1316
|
-
var source = arguments[i];
|
|
1317
|
-
for (var key in source) {
|
|
1318
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1319
|
-
target[key] = source[key];
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
return target;
|
|
1324
|
-
};
|
|
1325
|
-
return _extends$1.apply(this, arguments);
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
1359
|
var TAB$4 = {
|
|
1329
1360
|
all: "all",
|
|
1330
1361
|
successful: "successful",
|
|
@@ -1422,40 +1453,47 @@ var renderIdentifier$2 = function renderIdentifier() {
|
|
|
1422
1453
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
1423
1454
|
_ref$live = _ref.live,
|
|
1424
1455
|
isLive = _ref$live === void 0 ? false : _ref$live;
|
|
1425
|
-
return /*#__PURE__*/
|
|
1426
|
-
content: identifier
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1456
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
1457
|
+
content: identifier,
|
|
1458
|
+
children: /*#__PURE__*/jsx(IdentifierButton$1, {
|
|
1459
|
+
href: buildStripeTransactionLink(identifier, isLive),
|
|
1460
|
+
label: identifier
|
|
1461
|
+
})
|
|
1462
|
+
});
|
|
1431
1463
|
};
|
|
1432
1464
|
curry(function (type, kind) {
|
|
1433
|
-
return /*#__PURE__*/
|
|
1465
|
+
return /*#__PURE__*/jsx(Tooltip, {
|
|
1434
1466
|
content: t$1("neetoPayments.tooltipContent.".concat(type, ".").concat(kind)),
|
|
1435
|
-
position: "top"
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1467
|
+
position: "top",
|
|
1468
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1469
|
+
className: "w-fit",
|
|
1470
|
+
children: /*#__PURE__*/jsx(Tag, {
|
|
1471
|
+
label: t$1("neetoPayments.tagLabels.".concat(type, ".").concat(kind)),
|
|
1472
|
+
style: "secondary"
|
|
1473
|
+
})
|
|
1474
|
+
})
|
|
1475
|
+
});
|
|
1442
1476
|
});
|
|
1443
1477
|
var renderSplitIdentifier = function renderSplitIdentifier(_ref2) {
|
|
1444
1478
|
var identifier = _ref2.identifier,
|
|
1445
1479
|
isLive = _ref2.live;
|
|
1446
|
-
return identifier ? /*#__PURE__*/
|
|
1447
|
-
content: identifier
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1480
|
+
return identifier ? /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
1481
|
+
content: identifier,
|
|
1482
|
+
children: /*#__PURE__*/jsx(IdentifierButton$1, {
|
|
1483
|
+
href: buildStripeSplitLink(identifier, isLive),
|
|
1484
|
+
label: identifier
|
|
1485
|
+
})
|
|
1486
|
+
}) : /*#__PURE__*/jsx(Tooltip, {
|
|
1452
1487
|
content: t$1("neetoPayments.tooltipContent.identifierUnavailable"),
|
|
1453
|
-
position: "top"
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1488
|
+
position: "top",
|
|
1489
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1490
|
+
className: "text-center",
|
|
1491
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
1492
|
+
style: "body2",
|
|
1493
|
+
children: t$1("neetoPayments.common.notAvailable")
|
|
1494
|
+
})
|
|
1495
|
+
})
|
|
1496
|
+
});
|
|
1459
1497
|
};
|
|
1460
1498
|
var renderTransferIdentifier = function renderTransferIdentifier() {
|
|
1461
1499
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -1465,56 +1503,65 @@ var renderTransferIdentifier = function renderTransferIdentifier() {
|
|
|
1465
1503
|
account = _ref3$account === void 0 ? {} : _ref3$account,
|
|
1466
1504
|
_ref3$live = _ref3.live,
|
|
1467
1505
|
isLive = _ref3$live === void 0 ? false : _ref3$live;
|
|
1468
|
-
return identifier ? /*#__PURE__*/
|
|
1469
|
-
content: identifier
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1506
|
+
return identifier ? /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
1507
|
+
content: identifier,
|
|
1508
|
+
children: /*#__PURE__*/jsx(IdentifierButton$1, {
|
|
1509
|
+
label: identifier,
|
|
1510
|
+
href: identifier.startsWith("py") ? buildStripeTransferLink(identifier, account === null || account === void 0 ? void 0 : account.identifier, isLive) : buildStripeTransactionLink(identifier, isLive)
|
|
1511
|
+
})
|
|
1512
|
+
}) : /*#__PURE__*/jsx("div", {
|
|
1513
|
+
className: "text-center",
|
|
1514
|
+
children: /*#__PURE__*/jsx(Tooltip, {
|
|
1515
|
+
position: "top",
|
|
1516
|
+
content: t$1("neetoPayments.tooltipContent.connectedTransactionUnavailable"),
|
|
1517
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
1518
|
+
style: "body2",
|
|
1519
|
+
children: t$1("neetoPayments.common.notAvailable")
|
|
1520
|
+
})
|
|
1521
|
+
})
|
|
1522
|
+
});
|
|
1481
1523
|
};
|
|
1482
1524
|
var renderPlatformIdentifier = curry(function (setPaneStatus, data) {
|
|
1483
|
-
return /*#__PURE__*/
|
|
1484
|
-
content: data === null || data === void 0 ? void 0 : data.identifier
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1525
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
1526
|
+
content: data === null || data === void 0 ? void 0 : data.identifier,
|
|
1527
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
1528
|
+
label: data === null || data === void 0 ? void 0 : data.identifier,
|
|
1529
|
+
size: "small",
|
|
1530
|
+
style: "link",
|
|
1531
|
+
onClick: function onClick() {
|
|
1532
|
+
return setPaneStatus({
|
|
1533
|
+
transactionId: data === null || data === void 0 ? void 0 : data.id,
|
|
1534
|
+
isOpen: true
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
})
|
|
1538
|
+
});
|
|
1496
1539
|
});
|
|
1497
1540
|
var renderAccountIdentifier = function renderAccountIdentifier(_ref4) {
|
|
1498
1541
|
var _ref4$identifier = _ref4.identifier,
|
|
1499
1542
|
identifier = _ref4$identifier === void 0 ? "" : _ref4$identifier,
|
|
1500
1543
|
_ref4$live = _ref4.live,
|
|
1501
1544
|
isLive = _ref4$live === void 0 ? false : _ref4$live;
|
|
1502
|
-
return /*#__PURE__*/
|
|
1503
|
-
content: identifier
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1545
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
1546
|
+
content: identifier,
|
|
1547
|
+
children: /*#__PURE__*/jsx(IdentifierButton$1, {
|
|
1548
|
+
href: buildStripeAccountLink(identifier, isLive),
|
|
1549
|
+
label: identifier
|
|
1550
|
+
})
|
|
1551
|
+
});
|
|
1508
1552
|
};
|
|
1509
1553
|
var renderSplitDate = function renderSplitDate(date) {
|
|
1510
|
-
return isPresent(date) ? renderDate(date) : /*#__PURE__*/
|
|
1554
|
+
return isPresent(date) ? renderDate(date) : /*#__PURE__*/jsx(Tooltip, {
|
|
1511
1555
|
content: t$1("neetoPayments.tooltipContent.dateUnavailable"),
|
|
1512
|
-
position: "top"
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1556
|
+
position: "top",
|
|
1557
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1558
|
+
className: "text-center",
|
|
1559
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
1560
|
+
style: "body2",
|
|
1561
|
+
children: t$1("neetoPayments.common.notAvailable")
|
|
1562
|
+
})
|
|
1563
|
+
})
|
|
1564
|
+
});
|
|
1518
1565
|
};
|
|
1519
1566
|
var renderRefundIdentifier = function renderRefundIdentifier() {
|
|
1520
1567
|
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -1522,12 +1569,13 @@ var renderRefundIdentifier = function renderRefundIdentifier() {
|
|
|
1522
1569
|
identifier = _ref5$identifier === void 0 ? "" : _ref5$identifier,
|
|
1523
1570
|
_ref5$live = _ref5.live,
|
|
1524
1571
|
isLive = _ref5$live === void 0 ? false : _ref5$live;
|
|
1525
|
-
return /*#__PURE__*/
|
|
1526
|
-
content: identifier
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1572
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
1573
|
+
content: identifier,
|
|
1574
|
+
children: /*#__PURE__*/jsx(IdentifierButton$1, {
|
|
1575
|
+
href: buildStripeRefundLink(identifier, isLive),
|
|
1576
|
+
label: identifier
|
|
1577
|
+
})
|
|
1578
|
+
});
|
|
1531
1579
|
};
|
|
1532
1580
|
|
|
1533
1581
|
var generateSpecialColumns = function generateSpecialColumns(_ref) {
|
|
@@ -1941,8 +1989,8 @@ var modifySearchProps = function modifySearchProps(_ref5) {
|
|
|
1941
1989
|
}, searchProps);
|
|
1942
1990
|
};
|
|
1943
1991
|
|
|
1944
|
-
function ownKeys$
|
|
1945
|
-
function _objectSpread$
|
|
1992
|
+
function ownKeys$h(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; }
|
|
1993
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1946
1994
|
var ExportModal$1 = function ExportModal(_ref) {
|
|
1947
1995
|
var showExportModal = _ref.showExportModal,
|
|
1948
1996
|
setShowExportModal = _ref.setShowExportModal,
|
|
@@ -1978,7 +2026,7 @@ var ExportModal$1 = function ExportModal(_ref) {
|
|
|
1978
2026
|
setIsGenerating(false);
|
|
1979
2027
|
};
|
|
1980
2028
|
var handleGenerateClick = function handleGenerateClick() {
|
|
1981
|
-
var payload = _objectSpread$
|
|
2029
|
+
var payload = _objectSpread$h({
|
|
1982
2030
|
kind: isTransferKind(kind) ? "connected" : kind,
|
|
1983
2031
|
token: token,
|
|
1984
2032
|
filters: filters,
|
|
@@ -2014,37 +2062,48 @@ var ExportModal$1 = function ExportModal(_ref) {
|
|
|
2014
2062
|
var onClose = function onClose() {
|
|
2015
2063
|
return setShowExportModal(false);
|
|
2016
2064
|
};
|
|
2017
|
-
return /*#__PURE__*/
|
|
2065
|
+
return /*#__PURE__*/jsxs(Modal, {
|
|
2018
2066
|
onClose: onClose,
|
|
2019
|
-
isOpen: showExportModal
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2067
|
+
isOpen: showExportModal,
|
|
2068
|
+
children: [/*#__PURE__*/jsx(Modal.Header, {
|
|
2069
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
2070
|
+
style: "h2",
|
|
2071
|
+
children: t("neetoPayments.export.title.".concat(kind))
|
|
2072
|
+
})
|
|
2073
|
+
}), /*#__PURE__*/jsx(Modal.Body, {
|
|
2074
|
+
children: isFileLoading ? /*#__PURE__*/jsx(Typography, {
|
|
2075
|
+
style: "body2",
|
|
2076
|
+
children: t("neetoPayments.export.pleaseWait")
|
|
2077
|
+
}) : /*#__PURE__*/jsx(Typography, {
|
|
2078
|
+
style: "body2",
|
|
2079
|
+
children: downloadUrl ? t("neetoPayments.export.fileReady") : t("neetoPayments.export.download.".concat(kind))
|
|
2080
|
+
})
|
|
2081
|
+
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
2082
|
+
className: "space-x-2",
|
|
2083
|
+
children: downloadUrl ? /*#__PURE__*/jsx(Button, {
|
|
2084
|
+
href: downloadUrl,
|
|
2085
|
+
icon: Download,
|
|
2086
|
+
label: t("neetoPayments.common.download"),
|
|
2087
|
+
onClick: onClose
|
|
2088
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
2089
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
2090
|
+
disabled: isFileLoading,
|
|
2091
|
+
label: t("neetoPayments.common.cancel"),
|
|
2092
|
+
style: "tertiary",
|
|
2093
|
+
onClick: onClose
|
|
2094
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
2095
|
+
disabled: isFileLoading,
|
|
2096
|
+
label: t("neetoPayments.common.export"),
|
|
2097
|
+
loading: isFileLoading,
|
|
2098
|
+
onClick: handleGenerateClick
|
|
2099
|
+
})]
|
|
2100
|
+
})
|
|
2101
|
+
})]
|
|
2102
|
+
});
|
|
2044
2103
|
};
|
|
2045
2104
|
|
|
2046
|
-
function ownKeys$
|
|
2047
|
-
function _objectSpread$
|
|
2105
|
+
function ownKeys$g(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; }
|
|
2106
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2048
2107
|
var useFiltersAndPagination$2 = function useFiltersAndPagination(_ref) {
|
|
2049
2108
|
var payableEntityColumns = _ref.payableEntityColumns,
|
|
2050
2109
|
kind = _ref.kind,
|
|
@@ -2077,7 +2136,7 @@ var useFiltersAndPagination$2 = function useFiltersAndPagination(_ref) {
|
|
|
2077
2136
|
var _getQueryParams = getQueryParams(),
|
|
2078
2137
|
_getQueryParams$searc = _getQueryParams.searchTerm,
|
|
2079
2138
|
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
2080
|
-
var searchKeywordProps = _objectSpread$
|
|
2139
|
+
var searchKeywordProps = _objectSpread$g(_objectSpread$g({}, modifySearchProps({
|
|
2081
2140
|
searchProps: searchProps,
|
|
2082
2141
|
kind: kind
|
|
2083
2142
|
})), {}, {
|
|
@@ -4254,8 +4313,8 @@ var transactionsApi$1 = {
|
|
|
4254
4313
|
list: list$8
|
|
4255
4314
|
};
|
|
4256
4315
|
|
|
4257
|
-
function ownKeys$
|
|
4258
|
-
function _objectSpread$
|
|
4316
|
+
function ownKeys$f(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; }
|
|
4317
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4259
4318
|
var useFetchConnectedStripeAccount = function useFetchConnectedStripeAccount(holdableId) {
|
|
4260
4319
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4261
4320
|
return useQuery([QUERY_KEYS.CONNECTED_ACCOUNT, holdableId], function () {
|
|
@@ -4296,7 +4355,7 @@ var usePollingStripeAccount = function usePollingStripeAccount(holdableId, _ref)
|
|
|
4296
4355
|
var usePollingStripeAccountCreationStatus = function usePollingStripeAccountCreationStatus(jobId, options) {
|
|
4297
4356
|
return useQuery([QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId], function () {
|
|
4298
4357
|
return accountsApi$3.creationStatus(jobId);
|
|
4299
|
-
}, _objectSpread$
|
|
4358
|
+
}, _objectSpread$f({}, options));
|
|
4300
4359
|
};
|
|
4301
4360
|
var useDestroyStripeAccount = function useDestroyStripeAccount(_ref2) {
|
|
4302
4361
|
var onSuccess = _ref2.onSuccess,
|
|
@@ -4475,21 +4534,23 @@ var SubTable = function SubTable(_ref) {
|
|
|
4475
4534
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
4476
4535
|
_ref$kind = _ref.kind,
|
|
4477
4536
|
kind = _ref$kind === void 0 ? "split" : _ref$kind;
|
|
4478
|
-
return /*#__PURE__*/
|
|
4479
|
-
className: className || "ml-12 max-w-3xl"
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4537
|
+
return /*#__PURE__*/jsx("div", {
|
|
4538
|
+
className: className || "ml-12 max-w-3xl",
|
|
4539
|
+
children: /*#__PURE__*/jsx(TableWrapper, {
|
|
4540
|
+
hasPagination: false,
|
|
4541
|
+
children: /*#__PURE__*/jsx(Table, {
|
|
4542
|
+
fixedHeight: true,
|
|
4543
|
+
columnData: isSplitKind(kind) ? SPLIT_COLUMNS : REFUND_COLUMNS,
|
|
4544
|
+
pagination: false,
|
|
4545
|
+
rowData: buildRowData$1({
|
|
4546
|
+
data: data
|
|
4547
|
+
}),
|
|
4548
|
+
scroll: {
|
|
4549
|
+
y: 300
|
|
4550
|
+
}
|
|
4551
|
+
})
|
|
4552
|
+
})
|
|
4553
|
+
});
|
|
4493
4554
|
};
|
|
4494
4555
|
|
|
4495
4556
|
var ExpandedRow = function ExpandedRow() {
|
|
@@ -4498,28 +4559,33 @@ var ExpandedRow = function ExpandedRow() {
|
|
|
4498
4559
|
splits = _ref$splits === void 0 ? [] : _ref$splits,
|
|
4499
4560
|
_ref$refunds = _ref.refunds,
|
|
4500
4561
|
refunds = _ref$refunds === void 0 ? [] : _ref$refunds;
|
|
4501
|
-
return /*#__PURE__*/
|
|
4502
|
-
className: "my-2 space-y-2"
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4562
|
+
return /*#__PURE__*/jsxs("div", {
|
|
4563
|
+
className: "my-2 space-y-2",
|
|
4564
|
+
children: [!isEmpty(splits) && /*#__PURE__*/jsxs("div", {
|
|
4565
|
+
className: "space-y-4",
|
|
4566
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4567
|
+
className: "ml-12",
|
|
4568
|
+
style: "h3",
|
|
4569
|
+
children: t$1("neetoPayments.common.splits")
|
|
4570
|
+
}), /*#__PURE__*/jsx(SubTable, {
|
|
4571
|
+
data: splits
|
|
4572
|
+
})]
|
|
4573
|
+
}), !isEmpty(refunds) && /*#__PURE__*/jsxs("div", {
|
|
4574
|
+
className: "space-y-4",
|
|
4575
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4576
|
+
className: "ml-12",
|
|
4577
|
+
style: "h3",
|
|
4578
|
+
children: t$1("neetoPayments.title.refund")
|
|
4579
|
+
}), /*#__PURE__*/jsx(SubTable, {
|
|
4580
|
+
data: refunds,
|
|
4581
|
+
kind: "refund"
|
|
4582
|
+
})]
|
|
4583
|
+
})]
|
|
4584
|
+
});
|
|
4519
4585
|
};
|
|
4520
4586
|
|
|
4521
|
-
function ownKeys$
|
|
4522
|
-
function _objectSpread$
|
|
4587
|
+
function ownKeys$e(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; }
|
|
4588
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4523
4589
|
var useFetchData$2 = function useFetchData(_ref) {
|
|
4524
4590
|
var _data$kind, _data$kind2, _data$kind3, _data$kind4;
|
|
4525
4591
|
var kind = _ref.kind,
|
|
@@ -4527,7 +4593,7 @@ var useFetchData$2 = function useFetchData(_ref) {
|
|
|
4527
4593
|
payload = _ref.payload,
|
|
4528
4594
|
isPlatformEnabled = _ref.isPlatformEnabled;
|
|
4529
4595
|
var data = {};
|
|
4530
|
-
data.transfer = data.connected = useFetchStripeTransactions(holdableId, _objectSpread$
|
|
4596
|
+
data.transfer = data.connected = useFetchStripeTransactions(holdableId, _objectSpread$e(_objectSpread$e({}, payload), {}, {
|
|
4531
4597
|
kind: kind
|
|
4532
4598
|
}), {
|
|
4533
4599
|
enabled: isTransferKind(kind) || isConnectedKind(kind)
|
|
@@ -4554,12 +4620,12 @@ var RowExpander = function RowExpander(_ref) {
|
|
|
4554
4620
|
onExpand = _ref.onExpand,
|
|
4555
4621
|
record = _ref.record,
|
|
4556
4622
|
expandable = _ref.expandable;
|
|
4557
|
-
return expandable && (expanded ? /*#__PURE__*/
|
|
4623
|
+
return expandable && (expanded ? /*#__PURE__*/jsx(Down, {
|
|
4558
4624
|
className: "cursor-pointer",
|
|
4559
4625
|
onClick: function onClick(e) {
|
|
4560
4626
|
return onExpand(record, e);
|
|
4561
4627
|
}
|
|
4562
|
-
}) : /*#__PURE__*/
|
|
4628
|
+
}) : /*#__PURE__*/jsx(Right, {
|
|
4563
4629
|
className: "cursor-pointer",
|
|
4564
4630
|
onClick: function onClick(e) {
|
|
4565
4631
|
return onExpand(record, e);
|
|
@@ -4597,6 +4663,8 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
4597
4663
|
}
|
|
4598
4664
|
|
|
4599
4665
|
var _excluded$2 = ["transactionId"];
|
|
4666
|
+
function ownKeys$d(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; }
|
|
4667
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4600
4668
|
var Details = function Details(_ref) {
|
|
4601
4669
|
var transactionId = _ref.transactionId,
|
|
4602
4670
|
paneProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
@@ -4614,57 +4682,82 @@ var Details = function Details(_ref) {
|
|
|
4614
4682
|
live = _useFetchStripePlatfo3.live,
|
|
4615
4683
|
_useFetchStripePlatfo4 = _useFetchStripePlatfo3.splits,
|
|
4616
4684
|
splits = _useFetchStripePlatfo4 === void 0 ? [] : _useFetchStripePlatfo4;
|
|
4617
|
-
return /*#__PURE__*/
|
|
4618
|
-
size: "large"
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4685
|
+
return /*#__PURE__*/jsxs(Pane, _objectSpread$d(_objectSpread$d({}, paneProps), {}, {
|
|
4686
|
+
size: "large",
|
|
4687
|
+
children: [/*#__PURE__*/jsx(Pane.Header, {
|
|
4688
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
4689
|
+
style: "h2",
|
|
4690
|
+
children: "Transaction Details"
|
|
4691
|
+
})
|
|
4692
|
+
}), /*#__PURE__*/jsx(Pane.Body, {
|
|
4693
|
+
children: isLoading ? /*#__PURE__*/jsx(PageLoader, {}) : /*#__PURE__*/jsxs("div", {
|
|
4694
|
+
className: "w-full space-y-6 p-2",
|
|
4695
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
4696
|
+
className: "w-full space-y-2",
|
|
4697
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
4698
|
+
className: "flex items-center space-x-2",
|
|
4699
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4700
|
+
style: "body2",
|
|
4701
|
+
children: t("neetoPayments.transactionPane.transactionId")
|
|
4702
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4703
|
+
className: "neeto-ui-text-black font-medium",
|
|
4704
|
+
style: "body2",
|
|
4705
|
+
children: renderIdentifier$2({
|
|
4706
|
+
identifier: identifier,
|
|
4707
|
+
live: live
|
|
4708
|
+
})
|
|
4709
|
+
})]
|
|
4710
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
4711
|
+
className: "flex items-center space-x-2",
|
|
4712
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4713
|
+
style: "body2",
|
|
4714
|
+
children: t("neetoPayments.transactionPane.amount")
|
|
4715
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4716
|
+
className: "neeto-ui-text-black font-medium",
|
|
4717
|
+
style: "body2",
|
|
4718
|
+
children: amount
|
|
4719
|
+
})]
|
|
4720
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
4721
|
+
className: "flex items-center space-x-2",
|
|
4722
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4723
|
+
style: "body2",
|
|
4724
|
+
children: t("neetoPayments.transactionPane.netAmount")
|
|
4725
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4726
|
+
className: "neeto-ui-text-black font-medium",
|
|
4727
|
+
style: "body2",
|
|
4728
|
+
children: netAmount
|
|
4729
|
+
})]
|
|
4730
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
4731
|
+
className: "flex items-center space-x-2",
|
|
4732
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4733
|
+
style: "body2",
|
|
4734
|
+
children: t("neetoPayments.transactionPane.status")
|
|
4735
|
+
}), renderStatus("transaction", status)]
|
|
4736
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
4737
|
+
className: "flex items-center space-x-2",
|
|
4738
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4739
|
+
style: "body2",
|
|
4740
|
+
children: t("neetoPayments.transactionPane.paidOn")
|
|
4741
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4742
|
+
className: "neeto-ui-text-black font-medium",
|
|
4743
|
+
style: "body2",
|
|
4744
|
+
children: renderDate(paymentAt)
|
|
4745
|
+
})]
|
|
4746
|
+
})]
|
|
4747
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4748
|
+
style: "h3",
|
|
4749
|
+
children: "Splits"
|
|
4750
|
+
}), /*#__PURE__*/jsx(SubTable, {
|
|
4751
|
+
className: "ml-0 w-full",
|
|
4752
|
+
data: splits
|
|
4753
|
+
})]
|
|
4754
|
+
})
|
|
4755
|
+
})]
|
|
4756
|
+
}));
|
|
4666
4757
|
};
|
|
4667
4758
|
|
|
4759
|
+
function ownKeys$c(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; }
|
|
4760
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4668
4761
|
var List$5 = function List(_ref) {
|
|
4669
4762
|
var _pageProperties$tab, _pageProperties$tab2, _pageProperties$tab3;
|
|
4670
4763
|
var _ref$isPlatformEnable = _ref.isPlatformEnabled,
|
|
@@ -4748,64 +4841,70 @@ var List$5 = function List(_ref) {
|
|
|
4748
4841
|
} : DEFAULT_SORT_PROPERTIES$1);
|
|
4749
4842
|
};
|
|
4750
4843
|
if (isStripeAccountLoading || isStripePlatformAccountLoading || isDataLoading) {
|
|
4751
|
-
return /*#__PURE__*/
|
|
4844
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
4752
4845
|
}
|
|
4753
4846
|
if (!isStripeAccountConnected && dataSize <= 0 || !isPresent(data)) {
|
|
4754
|
-
return /*#__PURE__*/
|
|
4755
|
-
className: "flex h-full w-full items-center justify-center"
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4847
|
+
return /*#__PURE__*/jsx("div", {
|
|
4848
|
+
className: "flex h-full w-full items-center justify-center",
|
|
4849
|
+
children: /*#__PURE__*/jsx(NoData, {
|
|
4850
|
+
title: tab === TAB$4.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
4851
|
+
status: tab
|
|
4852
|
+
})
|
|
4759
4853
|
})
|
|
4760
|
-
})
|
|
4854
|
+
});
|
|
4761
4855
|
}
|
|
4762
4856
|
var visibleColumns = columns.filter(function (_ref2) {
|
|
4763
4857
|
var dataIndex = _ref2.dataIndex;
|
|
4764
4858
|
return !hiddenColumns.includes(processDataIndex(dataIndex));
|
|
4765
4859
|
});
|
|
4766
|
-
return /*#__PURE__*/
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4860
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
4861
|
+
children: [/*#__PURE__*/jsx(TableWrapper, {
|
|
4862
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
4863
|
+
children: /*#__PURE__*/jsx(Table, {
|
|
4864
|
+
fixedHeight: true,
|
|
4865
|
+
allowRowClick: false,
|
|
4866
|
+
columnData: visibleColumns,
|
|
4867
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
4868
|
+
handlePageChange: handleTablePaginaton,
|
|
4869
|
+
loading: isDataFetching,
|
|
4870
|
+
rowData: buildRowData$1({
|
|
4871
|
+
data: data,
|
|
4872
|
+
pageProperties: pageProperties,
|
|
4873
|
+
tab: tab
|
|
4874
|
+
}),
|
|
4875
|
+
rowSelection: false,
|
|
4876
|
+
sortDirections: SORT_DIRECTIONS,
|
|
4877
|
+
totalCount: dataSize,
|
|
4878
|
+
expandable: {
|
|
4879
|
+
expandedRowRender: ExpandedRow,
|
|
4880
|
+
showExpandColumn: isPlatformKind(kind),
|
|
4881
|
+
rowExpandable: function rowExpandable(record) {
|
|
4882
|
+
return !(isEmpty(record.splits) && isEmpty(record.refunds));
|
|
4883
|
+
},
|
|
4884
|
+
columnWidth: "64px",
|
|
4885
|
+
expandIcon: RowExpander
|
|
4886
|
+
},
|
|
4887
|
+
paginationProps: {
|
|
4888
|
+
showSizeChanger: true,
|
|
4889
|
+
hideOnSinglePage: true,
|
|
4890
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
4891
|
+
total: dataSize
|
|
4892
|
+
},
|
|
4893
|
+
onChange: handleTableChange,
|
|
4894
|
+
onColumnHide: function onColumnHide(column) {
|
|
4895
|
+
hideColumn(processDataIndex(column.dataIndex));
|
|
4896
|
+
}
|
|
4897
|
+
})
|
|
4898
|
+
}), /*#__PURE__*/jsx(Details, _objectSpread$c(_objectSpread$c({}, paneStatus), {}, {
|
|
4899
|
+
onClose: function onClose() {
|
|
4900
|
+
return setPaneStatus(INITIAL_PANE_STATUS);
|
|
4901
|
+
}
|
|
4902
|
+
}))]
|
|
4903
|
+
});
|
|
4807
4904
|
};
|
|
4808
4905
|
|
|
4906
|
+
function ownKeys$b(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; }
|
|
4907
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4809
4908
|
var Dashboard = function Dashboard(_ref) {
|
|
4810
4909
|
var _ref$isPlatformEnable = _ref.isPlatformEnabled,
|
|
4811
4910
|
isPlatformEnabled = _ref$isPlatformEnable === void 0 ? false : _ref$isPlatformEnable,
|
|
@@ -4863,80 +4962,87 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4863
4962
|
setFilters(filters);
|
|
4864
4963
|
});
|
|
4865
4964
|
};
|
|
4866
|
-
return /*#__PURE__*/
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
})), isTabsVisible && /*#__PURE__*/React__default.createElement(Tab, null, tabs.map(function (item) {
|
|
4873
|
-
return /*#__PURE__*/React__default.createElement(Tab.Item, {
|
|
4874
|
-
active: tab === item,
|
|
4875
|
-
key: item,
|
|
4876
|
-
onClick: function onClick() {
|
|
4877
|
-
return handleTabChange(item);
|
|
4965
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
4966
|
+
children: [/*#__PURE__*/jsx(Header, _objectSpread$b(_objectSpread$b({}, headerProps), {}, {
|
|
4967
|
+
title: t("neetoPayments.title.".concat(titleKind)),
|
|
4968
|
+
searchProps: isFilterButtonVisible && {
|
|
4969
|
+
placeholder: searchKeywordProps.placeholder,
|
|
4970
|
+
className: "w-80"
|
|
4878
4971
|
}
|
|
4879
|
-
},
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4972
|
+
})), isTabsVisible && /*#__PURE__*/jsx(Tab, {
|
|
4973
|
+
children: tabs.map(function (item) {
|
|
4974
|
+
return /*#__PURE__*/jsx(Tab.Item, {
|
|
4975
|
+
active: tab === item,
|
|
4976
|
+
onClick: function onClick() {
|
|
4977
|
+
return handleTabChange(item);
|
|
4978
|
+
},
|
|
4979
|
+
children: t("neetoPayments.common.".concat(item))
|
|
4980
|
+
}, item);
|
|
4981
|
+
})
|
|
4982
|
+
}), /*#__PURE__*/jsx(SubHeader, {
|
|
4983
|
+
className: "mt-4",
|
|
4984
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/jsx(Typography, {
|
|
4985
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
4986
|
+
component: "h4",
|
|
4987
|
+
children: tab === TAB$4.all ? t("neetoPayments.countOf.".concat(kind), {
|
|
4988
|
+
count: dataSize
|
|
4989
|
+
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
4990
|
+
count: dataSize,
|
|
4991
|
+
status: tab
|
|
4992
|
+
})
|
|
4993
|
+
}),
|
|
4994
|
+
rightActionBlock: /*#__PURE__*/jsxs(Fragment, {
|
|
4995
|
+
children: [/*#__PURE__*/jsx(Bar, {
|
|
4996
|
+
columns: filterableColumns,
|
|
4997
|
+
keyword: searchKeywordProps,
|
|
4998
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
4999
|
+
onChange: handleFiltersChange
|
|
5000
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsx(SubHeader.RightBlock, {
|
|
5001
|
+
columnsButtonProps: {
|
|
5002
|
+
columnData: modifiedColumns,
|
|
5003
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$1,
|
|
5004
|
+
localStorageKey: "stripePaymentDashboard_".concat(kind)
|
|
5005
|
+
},
|
|
5006
|
+
downloadButtonProps: {
|
|
5007
|
+
onClick: function onClick() {
|
|
5008
|
+
return setShowExportModal(true);
|
|
5009
|
+
}
|
|
5010
|
+
},
|
|
5011
|
+
filterProps: {
|
|
5012
|
+
columns: filterableColumns,
|
|
5013
|
+
isOpen: isFilterPaneOpen,
|
|
5014
|
+
keyword: searchKeywordProps,
|
|
5015
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
5016
|
+
onChange: handleFiltersChange
|
|
5017
|
+
}
|
|
5018
|
+
})]
|
|
5019
|
+
})
|
|
5020
|
+
}), /*#__PURE__*/jsx(List$5, {
|
|
5021
|
+
columns: columns,
|
|
5022
|
+
filters: filters,
|
|
5023
|
+
holdableId: holdableId,
|
|
5024
|
+
isPlatformEnabled: isPlatformEnabled,
|
|
5025
|
+
kind: kind,
|
|
5026
|
+
pageProperties: pageProperties,
|
|
5027
|
+
paneStatus: paneStatus,
|
|
5028
|
+
payoutId: payoutId,
|
|
5029
|
+
setDataSize: setDataSize,
|
|
5030
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
5031
|
+
setPageProperties: setPageProperties,
|
|
5032
|
+
setPaneStatus: setPaneStatus,
|
|
5033
|
+
setSortProperties: setSortProperties,
|
|
5034
|
+
sortProperties: sortProperties,
|
|
5035
|
+
tab: tab
|
|
5036
|
+
}), /*#__PURE__*/jsx(ExportModal$1, {
|
|
5037
|
+
filters: filters,
|
|
5038
|
+
holdableId: holdableId,
|
|
5039
|
+
kind: kind,
|
|
5040
|
+
setShowExportModal: setShowExportModal,
|
|
5041
|
+
showExportModal: showExportModal,
|
|
5042
|
+
sortProperties: sortProperties,
|
|
5043
|
+
tab: tab
|
|
5044
|
+
})]
|
|
5045
|
+
});
|
|
4940
5046
|
};
|
|
4941
5047
|
var Dashboard$1 = withTitle(withReactQuery(Dashboard), t$1("neetoPayments.common.payments"));
|
|
4942
5048
|
|
|
@@ -4974,8 +5080,8 @@ var DEFAULT_SORT_PROPERTIES = {
|
|
|
4974
5080
|
};
|
|
4975
5081
|
var STRIPE_PAYOUTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY = "stripePayoutsDashboard";
|
|
4976
5082
|
|
|
4977
|
-
function ownKeys$
|
|
4978
|
-
function _objectSpread$
|
|
5083
|
+
function ownKeys$a(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; }
|
|
5084
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4979
5085
|
var ExportModal = function ExportModal(_ref) {
|
|
4980
5086
|
var showExportModal = _ref.showExportModal,
|
|
4981
5087
|
setShowExportModal = _ref.setShowExportModal,
|
|
@@ -5001,13 +5107,12 @@ var ExportModal = function ExportModal(_ref) {
|
|
|
5001
5107
|
return "payout-report-".concat(uuidV4());
|
|
5002
5108
|
}, []);
|
|
5003
5109
|
var receivedCallback = function receivedCallback(data) {
|
|
5004
|
-
if (data.download_url)
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
}
|
|
5110
|
+
if (!data.download_url) return;
|
|
5111
|
+
setDownloadUrl(data.download_url);
|
|
5112
|
+
setIsGenerating(false);
|
|
5008
5113
|
};
|
|
5009
5114
|
var handleGenerateClick = function handleGenerateClick() {
|
|
5010
|
-
var payload = _objectSpread$
|
|
5115
|
+
var payload = _objectSpread$a({
|
|
5011
5116
|
kind: "payout",
|
|
5012
5117
|
token: token,
|
|
5013
5118
|
filters: filters,
|
|
@@ -5034,33 +5139,44 @@ var ExportModal = function ExportModal(_ref) {
|
|
|
5034
5139
|
var onClose = function onClose() {
|
|
5035
5140
|
return setShowExportModal(false);
|
|
5036
5141
|
};
|
|
5037
|
-
return /*#__PURE__*/
|
|
5142
|
+
return /*#__PURE__*/jsxs(Modal, {
|
|
5038
5143
|
onClose: onClose,
|
|
5039
|
-
isOpen: showExportModal
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5144
|
+
isOpen: showExportModal,
|
|
5145
|
+
children: [/*#__PURE__*/jsx(Modal.Header, {
|
|
5146
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
5147
|
+
style: "h2",
|
|
5148
|
+
children: t("neetoPayments.export.title.payout")
|
|
5149
|
+
})
|
|
5150
|
+
}), /*#__PURE__*/jsx(Modal.Body, {
|
|
5151
|
+
children: isFileLoading ? /*#__PURE__*/jsx(Typography, {
|
|
5152
|
+
style: "body2",
|
|
5153
|
+
children: t("neetoPayments.export.pleaseWait")
|
|
5154
|
+
}) : /*#__PURE__*/jsx(Typography, {
|
|
5155
|
+
style: "body2",
|
|
5156
|
+
children: downloadUrl ? t("neetoPayments.export.fileReady") : t("neetoPayments.export.download.payout")
|
|
5157
|
+
})
|
|
5158
|
+
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
5159
|
+
className: "space-x-2",
|
|
5160
|
+
children: downloadUrl ? /*#__PURE__*/jsx(Button, {
|
|
5161
|
+
href: downloadUrl,
|
|
5162
|
+
icon: Download,
|
|
5163
|
+
label: t("neetoPayments.common.download"),
|
|
5164
|
+
onClick: onClose
|
|
5165
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
5166
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
5167
|
+
disabled: isFileLoading,
|
|
5168
|
+
label: t("neetoPayments.common.cancel"),
|
|
5169
|
+
style: "tertiary",
|
|
5170
|
+
onClick: onClose
|
|
5171
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
5172
|
+
disabled: isFileLoading,
|
|
5173
|
+
label: t("neetoPayments.common.export"),
|
|
5174
|
+
loading: isFileLoading,
|
|
5175
|
+
onClick: handleGenerateClick
|
|
5176
|
+
})]
|
|
5177
|
+
})
|
|
5178
|
+
})]
|
|
5179
|
+
});
|
|
5064
5180
|
};
|
|
5065
5181
|
|
|
5066
5182
|
var COLUMNS$3 = [{
|
|
@@ -5119,20 +5235,21 @@ var renderPayoutIdentifier$1 = curry(function (route, _ref) {
|
|
|
5119
5235
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
5120
5236
|
_ref$id = _ref.id,
|
|
5121
5237
|
id = _ref$id === void 0 ? "" : _ref$id;
|
|
5122
|
-
return /*#__PURE__*/
|
|
5123
|
-
content: identifier
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5238
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
5239
|
+
content: identifier,
|
|
5240
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
5241
|
+
label: identifier,
|
|
5242
|
+
size: "small",
|
|
5243
|
+
style: "link",
|
|
5244
|
+
to: buildUrl(route, {
|
|
5245
|
+
id: id
|
|
5246
|
+
})
|
|
5130
5247
|
})
|
|
5131
|
-
})
|
|
5248
|
+
});
|
|
5132
5249
|
});
|
|
5133
5250
|
|
|
5134
|
-
function ownKeys$
|
|
5135
|
-
function _objectSpread$
|
|
5251
|
+
function ownKeys$9(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; }
|
|
5252
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5136
5253
|
var useFiltersAndPagination$1 = function useFiltersAndPagination(payoutsPageRoute) {
|
|
5137
5254
|
var history = useHistory();
|
|
5138
5255
|
var _useState = useState(false),
|
|
@@ -5157,7 +5274,7 @@ var useFiltersAndPagination$1 = function useFiltersAndPagination(payoutsPageRout
|
|
|
5157
5274
|
var _getQueryParams = getQueryParams(),
|
|
5158
5275
|
_getQueryParams$searc = _getQueryParams.searchTerm,
|
|
5159
5276
|
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
5160
|
-
var searchKeywordProps = _objectSpread$
|
|
5277
|
+
var searchKeywordProps = _objectSpread$9(_objectSpread$9({}, SEARCH_PROPS), {}, {
|
|
5161
5278
|
key: "search_term",
|
|
5162
5279
|
value: searchTerm.trim()
|
|
5163
5280
|
});
|
|
@@ -5287,44 +5404,46 @@ var List$4 = function List(_ref) {
|
|
|
5287
5404
|
} : DEFAULT_SORT_PROPERTIES);
|
|
5288
5405
|
};
|
|
5289
5406
|
if (isDataLoading) {
|
|
5290
|
-
return /*#__PURE__*/
|
|
5407
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
5291
5408
|
}
|
|
5292
5409
|
if (dataSize <= 0 || !isPresent(payouts)) {
|
|
5293
|
-
return /*#__PURE__*/
|
|
5294
|
-
className: "flex h-full w-full items-center justify-center"
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5410
|
+
return /*#__PURE__*/jsx("div", {
|
|
5411
|
+
className: "flex h-full w-full items-center justify-center",
|
|
5412
|
+
children: /*#__PURE__*/jsx(NoData, {
|
|
5413
|
+
title: t("neetoPayments.emptyState.payouts.".concat(tab))
|
|
5414
|
+
})
|
|
5415
|
+
});
|
|
5298
5416
|
}
|
|
5299
|
-
return /*#__PURE__*/
|
|
5300
|
-
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5417
|
+
return /*#__PURE__*/jsx(TableWrapper, {
|
|
5418
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
5419
|
+
children: /*#__PURE__*/jsx(Table, {
|
|
5420
|
+
fixedHeight: true,
|
|
5421
|
+
allowRowClick: false,
|
|
5422
|
+
columnData: getVisibleColumnData(columnData),
|
|
5423
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
5424
|
+
handlePageChange: handleTablePagination,
|
|
5425
|
+
loading: isDataFetching,
|
|
5426
|
+
rowData: buildRowData$1({
|
|
5427
|
+
data: payouts,
|
|
5428
|
+
pageProperties: pageProperties,
|
|
5429
|
+
tab: tab
|
|
5430
|
+
}),
|
|
5431
|
+
rowSelection: false,
|
|
5432
|
+
sortDirections: SORT_DIRECTIONS,
|
|
5433
|
+
totalCount: dataSize,
|
|
5434
|
+
paginationProps: {
|
|
5435
|
+
showSizeChanger: true,
|
|
5436
|
+
hideOnSinglePage: true,
|
|
5437
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
5438
|
+
total: dataSize
|
|
5439
|
+
},
|
|
5440
|
+
onChange: handleTableChange,
|
|
5441
|
+
onColumnHide: function onColumnHide(_ref2) {
|
|
5442
|
+
var dataIndex = _ref2.dataIndex;
|
|
5443
|
+
return hideColumn(dataIndex);
|
|
5444
|
+
}
|
|
5445
|
+
})
|
|
5446
|
+
});
|
|
5328
5447
|
};
|
|
5329
5448
|
|
|
5330
5449
|
var PayoutsDashboard = function PayoutsDashboard(_ref) {
|
|
@@ -5363,73 +5482,80 @@ var PayoutsDashboard = function PayoutsDashboard(_ref) {
|
|
|
5363
5482
|
setFilters(filters);
|
|
5364
5483
|
});
|
|
5365
5484
|
};
|
|
5366
|
-
return /*#__PURE__*/
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
}), isTabsVisible && /*#__PURE__*/React__default.createElement(Tab, null, TABS$3.map(function (item) {
|
|
5373
|
-
return /*#__PURE__*/React__default.createElement(Tab.Item, {
|
|
5374
|
-
active: tab === item,
|
|
5375
|
-
key: item,
|
|
5376
|
-
onClick: function onClick() {
|
|
5377
|
-
return handleTabChange(item);
|
|
5485
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5486
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
5487
|
+
title: t("neetoPayments.title.payouts"),
|
|
5488
|
+
searchProps: isFilterButtonVisible && {
|
|
5489
|
+
placeholder: t("neetoPayments.common.search"),
|
|
5490
|
+
className: "w-80"
|
|
5378
5491
|
}
|
|
5379
|
-
},
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5492
|
+
}), isTabsVisible && /*#__PURE__*/jsx(Tab, {
|
|
5493
|
+
children: TABS$3.map(function (item) {
|
|
5494
|
+
return /*#__PURE__*/jsx(Tab.Item, {
|
|
5495
|
+
active: tab === item,
|
|
5496
|
+
onClick: function onClick() {
|
|
5497
|
+
return handleTabChange(item);
|
|
5498
|
+
},
|
|
5499
|
+
children: t("neetoPayments.common.".concat(item))
|
|
5500
|
+
}, item);
|
|
5501
|
+
})
|
|
5502
|
+
}), /*#__PURE__*/jsx(SubHeader, {
|
|
5503
|
+
className: "mt-4",
|
|
5504
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/jsx(Typography, {
|
|
5505
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5506
|
+
component: "h4",
|
|
5507
|
+
children: tab === TAB$3.all ? t("neetoPayments.countOf.payout", {
|
|
5508
|
+
count: dataSize
|
|
5509
|
+
}) : t("neetoPayments.countOf.payoutWithStatus", {
|
|
5510
|
+
count: dataSize,
|
|
5511
|
+
status: processTab(tab)
|
|
5512
|
+
})
|
|
5513
|
+
}),
|
|
5514
|
+
rightActionBlock: /*#__PURE__*/jsxs(Fragment, {
|
|
5515
|
+
children: [/*#__PURE__*/jsx(Bar, {
|
|
5516
|
+
columns: FILTER_COLUMNS,
|
|
5517
|
+
keyword: searchKeywordProps,
|
|
5518
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5519
|
+
onChange: handleFiltersChange
|
|
5520
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsx(SubHeader.RightBlock, {
|
|
5521
|
+
columnsButtonProps: {
|
|
5522
|
+
columnData: columnData,
|
|
5523
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS,
|
|
5524
|
+
localStorageKey: STRIPE_PAYOUTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY
|
|
5525
|
+
},
|
|
5526
|
+
downloadButtonProps: {
|
|
5527
|
+
onClick: function onClick() {
|
|
5528
|
+
return setShowExportModal(true);
|
|
5529
|
+
}
|
|
5530
|
+
},
|
|
5531
|
+
filterProps: {
|
|
5532
|
+
columns: FILTER_COLUMNS,
|
|
5533
|
+
isOpen: isFilterPaneOpen,
|
|
5534
|
+
keyword: searchKeywordProps,
|
|
5535
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
5536
|
+
onChange: handleFiltersChange
|
|
5537
|
+
}
|
|
5538
|
+
})]
|
|
5539
|
+
})
|
|
5540
|
+
}), /*#__PURE__*/jsx(List$4, {
|
|
5541
|
+
columnData: columnData,
|
|
5542
|
+
filters: filters,
|
|
5543
|
+
isPlatformEnabled: isPlatformEnabled,
|
|
5544
|
+
pageProperties: pageProperties,
|
|
5545
|
+
setDataSize: setDataSize,
|
|
5546
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
5547
|
+
setPageProperties: setPageProperties,
|
|
5548
|
+
setSortProperties: setSortProperties,
|
|
5549
|
+
sortProperties: sortProperties,
|
|
5550
|
+
tab: tab
|
|
5551
|
+
}), /*#__PURE__*/jsx(ExportModal, {
|
|
5552
|
+
filters: filters,
|
|
5553
|
+
setShowExportModal: setShowExportModal,
|
|
5554
|
+
showExportModal: showExportModal,
|
|
5555
|
+
sortProperties: sortProperties,
|
|
5556
|
+
tab: tab
|
|
5557
|
+
})]
|
|
5558
|
+
});
|
|
5433
5559
|
};
|
|
5434
5560
|
var index$3 = withTitle(withReactQuery(PayoutsDashboard), t$1("neetoPayments.title.payouts"));
|
|
5435
5561
|
|
|
@@ -5454,15 +5580,18 @@ var useFetchData = function useFetchData(_ref) {
|
|
|
5454
5580
|
var renderPayoutIdentifier = function renderPayoutIdentifier() {
|
|
5455
5581
|
var identifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
5456
5582
|
var isLive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
5457
|
-
return /*#__PURE__*/
|
|
5458
|
-
content: identifier
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5583
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
5584
|
+
content: identifier,
|
|
5585
|
+
children: /*#__PURE__*/jsx(IdentifierButton$1, {
|
|
5586
|
+
href: buildStripePayoutLink(identifier, isLive),
|
|
5587
|
+
label: identifier
|
|
5588
|
+
})
|
|
5589
|
+
});
|
|
5463
5590
|
};
|
|
5464
5591
|
|
|
5465
5592
|
var _excluded$1 = ["isPlatformEnabled", "indexRoute"];
|
|
5593
|
+
function ownKeys$8(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; }
|
|
5594
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5466
5595
|
var PayoutsPage = function PayoutsPage(_ref) {
|
|
5467
5596
|
var isPlatformEnabled = _ref.isPlatformEnabled,
|
|
5468
5597
|
indexRoute = _ref.indexRoute,
|
|
@@ -5493,75 +5622,102 @@ var PayoutsPage = function PayoutsPage(_ref) {
|
|
|
5493
5622
|
}, {
|
|
5494
5623
|
text: identifier
|
|
5495
5624
|
}];
|
|
5496
|
-
if (isDataLoading) return /*#__PURE__*/
|
|
5497
|
-
return /*#__PURE__*/
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5625
|
+
if (isDataLoading) return /*#__PURE__*/jsx(PageLoader, {});
|
|
5626
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5627
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
5628
|
+
breadcrumbs: headerBreadCrumbs,
|
|
5629
|
+
title: t("neetoPayments.payoutsPage.title")
|
|
5630
|
+
}), /*#__PURE__*/jsx("div", {
|
|
5631
|
+
className: "w-full space-y-6 p-2",
|
|
5632
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
5633
|
+
className: "w-full space-y-2",
|
|
5634
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
5635
|
+
className: "flex items-center space-x-2",
|
|
5636
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5637
|
+
style: "body2",
|
|
5638
|
+
children: t("neetoPayments.payoutsPage.payoutId")
|
|
5639
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
5640
|
+
className: "neeto-ui-text-black font-medium",
|
|
5641
|
+
style: "body2",
|
|
5642
|
+
children: renderPayoutIdentifier(identifier, live)
|
|
5643
|
+
})]
|
|
5644
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
5645
|
+
className: "flex items-center space-x-2",
|
|
5646
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5647
|
+
style: "body2",
|
|
5648
|
+
children: t("neetoPayments.payoutsPage.status")
|
|
5649
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
5650
|
+
className: "neeto-ui-text-black font-medium",
|
|
5651
|
+
style: "body2",
|
|
5652
|
+
children: renderStatus("payout", status, {})
|
|
5653
|
+
})]
|
|
5654
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
5655
|
+
className: "flex items-center space-x-2",
|
|
5656
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5657
|
+
style: "body2",
|
|
5658
|
+
children: t("neetoPayments.payoutsPage.amount")
|
|
5659
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
5660
|
+
className: "neeto-ui-text-black font-medium",
|
|
5661
|
+
style: "body2",
|
|
5662
|
+
children: amount
|
|
5663
|
+
})]
|
|
5664
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
5665
|
+
className: "flex items-center space-x-2",
|
|
5666
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5667
|
+
style: "body2",
|
|
5668
|
+
children: t("neetoPayments.payoutsPage.arrivalDate")
|
|
5669
|
+
}), renderDate(arrivalDate)]
|
|
5670
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
5671
|
+
className: "flex items-center space-x-2",
|
|
5672
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5673
|
+
style: "body2",
|
|
5674
|
+
children: t("neetoPayments.payoutsPage.createdAt")
|
|
5675
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
5676
|
+
className: "neeto-ui-text-black font-medium",
|
|
5677
|
+
style: "body2",
|
|
5678
|
+
children: renderDate(createdAt)
|
|
5679
|
+
})]
|
|
5680
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
5681
|
+
className: "flex items-center space-x-2",
|
|
5682
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5683
|
+
style: "body2",
|
|
5684
|
+
children: t("neetoPayments.payoutsPage.destinationId")
|
|
5685
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
5686
|
+
className: "neeto-ui-text-black font-medium",
|
|
5687
|
+
style: "body2",
|
|
5688
|
+
children: destinationIdentifier
|
|
5689
|
+
})]
|
|
5690
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
5691
|
+
className: "flex items-center space-x-2",
|
|
5692
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5693
|
+
style: "body2",
|
|
5694
|
+
children: t("neetoPayments.payoutsPage.automatic")
|
|
5695
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
5696
|
+
className: "neeto-ui-text-black font-medium",
|
|
5697
|
+
style: "body2",
|
|
5698
|
+
children: isAutomatic ? t("neetoPayments.common.yes") : t("neetoPayments.common.no")
|
|
5699
|
+
})]
|
|
5700
|
+
}), isPresent(failureMessage) && /*#__PURE__*/jsxs("div", {
|
|
5701
|
+
className: "flex items-center space-x-2",
|
|
5702
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
5703
|
+
style: "body2",
|
|
5704
|
+
children: t("neetoPayments.payoutsPage.failureMessage")
|
|
5705
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
5706
|
+
className: "neeto-ui-text-black font-medium",
|
|
5707
|
+
style: "body2",
|
|
5708
|
+
children: failureMessage
|
|
5709
|
+
})]
|
|
5710
|
+
})]
|
|
5711
|
+
})
|
|
5712
|
+
}), isAutomatic && /*#__PURE__*/jsx(Dashboard$1, _objectSpread$8(_objectSpread$8(_objectSpread$8({}, isPlatformEnabled), {}, {
|
|
5713
|
+
kind: "connected"
|
|
5714
|
+
}, otherProps), {}, {
|
|
5715
|
+
headerProps: {
|
|
5716
|
+
size: "nano"
|
|
5717
|
+
},
|
|
5718
|
+
payoutId: id
|
|
5719
|
+
}))]
|
|
5720
|
+
});
|
|
5565
5721
|
};
|
|
5566
5722
|
|
|
5567
5723
|
var renderIdentifier$1 = function renderIdentifier() {
|
|
@@ -5570,24 +5726,28 @@ var renderIdentifier$1 = function renderIdentifier() {
|
|
|
5570
5726
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier;
|
|
5571
5727
|
var isTemporaryIdentifier = identifier.startsWith("temp_");
|
|
5572
5728
|
if (isTemporaryIdentifier) {
|
|
5573
|
-
return /*#__PURE__*/
|
|
5729
|
+
return /*#__PURE__*/jsx(Tooltip, {
|
|
5574
5730
|
content: t$1("neetoPayments.tooltipContent.paymentIdentifierUnavailable"),
|
|
5575
|
-
position: "top"
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5731
|
+
position: "top",
|
|
5732
|
+
children: /*#__PURE__*/jsx("div", {
|
|
5733
|
+
className: "text-center",
|
|
5734
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
5735
|
+
style: "body2",
|
|
5736
|
+
children: t$1("neetoPayments.common.notAvailable")
|
|
5737
|
+
})
|
|
5738
|
+
})
|
|
5739
|
+
});
|
|
5581
5740
|
}
|
|
5582
|
-
return /*#__PURE__*/
|
|
5583
|
-
content: identifier
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5741
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
5742
|
+
content: identifier,
|
|
5743
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
5744
|
+
href: "https://dashboard.razorpay.com/app/payments/".concat(identifier),
|
|
5745
|
+
label: identifier,
|
|
5746
|
+
size: "small",
|
|
5747
|
+
style: "link",
|
|
5748
|
+
target: "_blank"
|
|
5749
|
+
})
|
|
5750
|
+
});
|
|
5591
5751
|
};
|
|
5592
5752
|
|
|
5593
5753
|
var COLUMNS$2 = [{
|
|
@@ -5653,8 +5813,8 @@ var buildPaymentColumns$2 = function buildPaymentColumns(_ref) {
|
|
|
5653
5813
|
}));
|
|
5654
5814
|
};
|
|
5655
5815
|
|
|
5656
|
-
function ownKeys$
|
|
5657
|
-
function _objectSpread$
|
|
5816
|
+
function ownKeys$7(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; }
|
|
5817
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5658
5818
|
var FilterWrapper = function FilterWrapper(_ref) {
|
|
5659
5819
|
var _ref$setShowExportMod = _ref.setShowExportModal,
|
|
5660
5820
|
setShowExportModal = _ref$setShowExportMod === void 0 ? noop : _ref$setShowExportMod,
|
|
@@ -5682,7 +5842,7 @@ var FilterWrapper = function FilterWrapper(_ref) {
|
|
|
5682
5842
|
var _useTranslation = useTranslation(),
|
|
5683
5843
|
t = _useTranslation.t;
|
|
5684
5844
|
var isTabsVisible = isFilterButtonVisible || tab !== "all";
|
|
5685
|
-
var searchKeywordProps = _objectSpread$
|
|
5845
|
+
var searchKeywordProps = _objectSpread$7(_objectSpread$7({}, searchProps), {}, {
|
|
5686
5846
|
value: searchTerm.trim(),
|
|
5687
5847
|
setValue: noop
|
|
5688
5848
|
});
|
|
@@ -5696,57 +5856,64 @@ var FilterWrapper = function FilterWrapper(_ref) {
|
|
|
5696
5856
|
kind: kind,
|
|
5697
5857
|
payableEntityColumns: payableEntityColumns
|
|
5698
5858
|
});
|
|
5699
|
-
return /*#__PURE__*/
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
})), isTabsVisible && /*#__PURE__*/React__default.createElement(Tab, null, tabs.map(function (item) {
|
|
5707
|
-
return /*#__PURE__*/React__default.createElement(Tab.Item, {
|
|
5708
|
-
active: tab === item,
|
|
5709
|
-
key: item,
|
|
5710
|
-
onClick: function onClick() {
|
|
5711
|
-
return handleTabChange(item);
|
|
5712
|
-
}
|
|
5713
|
-
}, t("neetoPayments.common.".concat(item)));
|
|
5714
|
-
})), /*#__PURE__*/React__default.createElement(SubHeader, {
|
|
5715
|
-
className: "mt-4",
|
|
5716
|
-
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/React__default.createElement(Typography, {
|
|
5717
|
-
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5718
|
-
component: "h4"
|
|
5719
|
-
}, tab === "all" ? t("neetoPayments.countOf.".concat(kind), {
|
|
5720
|
-
count: dataSize
|
|
5721
|
-
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
5722
|
-
count: dataSize,
|
|
5723
|
-
status: tab
|
|
5724
|
-
})),
|
|
5725
|
-
rightActionBlock: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Bar, {
|
|
5726
|
-
columns: filterableColumns,
|
|
5727
|
-
keyword: searchKeywordProps,
|
|
5728
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5729
|
-
onChange: handleFiltersChange
|
|
5730
|
-
}), isFilterButtonVisible && /*#__PURE__*/React__default.createElement(SubHeader.RightBlock, {
|
|
5731
|
-
columnsButtonProps: {
|
|
5732
|
-
columnData: columnData,
|
|
5733
|
-
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$1,
|
|
5734
|
-
localStorageKey: "paymentDashboard_".concat(kind)
|
|
5735
|
-
},
|
|
5736
|
-
downloadButtonProps: {
|
|
5737
|
-
onClick: function onClick() {
|
|
5738
|
-
return setShowExportModal(true);
|
|
5739
|
-
}
|
|
5740
|
-
},
|
|
5741
|
-
filterProps: {
|
|
5742
|
-
columns: filterableColumns,
|
|
5743
|
-
isOpen: isFilterPaneOpen,
|
|
5744
|
-
keyword: searchKeywordProps,
|
|
5745
|
-
setIsOpen: setIsFilterPaneOpen,
|
|
5746
|
-
onChange: handleFiltersChange
|
|
5859
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5860
|
+
children: [/*#__PURE__*/jsx(Header, _objectSpread$7(_objectSpread$7({}, _objectSpread$7(_objectSpread$7({}, headerProps), {}, {
|
|
5861
|
+
title: title
|
|
5862
|
+
})), {}, {
|
|
5863
|
+
searchProps: isFilterButtonVisible && {
|
|
5864
|
+
placeholder: searchKeywordProps.placeholder,
|
|
5865
|
+
className: "w-80"
|
|
5747
5866
|
}
|
|
5748
|
-
}))
|
|
5749
|
-
|
|
5867
|
+
})), isTabsVisible && /*#__PURE__*/jsx(Tab, {
|
|
5868
|
+
children: tabs.map(function (item) {
|
|
5869
|
+
return /*#__PURE__*/jsx(Tab.Item, {
|
|
5870
|
+
active: tab === item,
|
|
5871
|
+
onClick: function onClick() {
|
|
5872
|
+
return handleTabChange(item);
|
|
5873
|
+
},
|
|
5874
|
+
children: t("neetoPayments.common.".concat(item))
|
|
5875
|
+
}, item);
|
|
5876
|
+
})
|
|
5877
|
+
}), /*#__PURE__*/jsx(SubHeader, {
|
|
5878
|
+
className: "mt-4",
|
|
5879
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/jsx(Typography, {
|
|
5880
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5881
|
+
component: "h4",
|
|
5882
|
+
children: tab === "all" ? t("neetoPayments.countOf.".concat(kind), {
|
|
5883
|
+
count: dataSize
|
|
5884
|
+
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
5885
|
+
count: dataSize,
|
|
5886
|
+
status: tab
|
|
5887
|
+
})
|
|
5888
|
+
}),
|
|
5889
|
+
rightActionBlock: /*#__PURE__*/jsxs(Fragment, {
|
|
5890
|
+
children: [/*#__PURE__*/jsx(Bar, {
|
|
5891
|
+
columns: filterableColumns,
|
|
5892
|
+
keyword: searchKeywordProps,
|
|
5893
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5894
|
+
onChange: handleFiltersChange
|
|
5895
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsx(SubHeader.RightBlock, {
|
|
5896
|
+
columnsButtonProps: {
|
|
5897
|
+
columnData: columnData,
|
|
5898
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$1,
|
|
5899
|
+
localStorageKey: "paymentDashboard_".concat(kind)
|
|
5900
|
+
},
|
|
5901
|
+
downloadButtonProps: {
|
|
5902
|
+
onClick: function onClick() {
|
|
5903
|
+
return setShowExportModal(true);
|
|
5904
|
+
}
|
|
5905
|
+
},
|
|
5906
|
+
filterProps: {
|
|
5907
|
+
columns: filterableColumns,
|
|
5908
|
+
isOpen: isFilterPaneOpen,
|
|
5909
|
+
keyword: searchKeywordProps,
|
|
5910
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
5911
|
+
onChange: handleFiltersChange
|
|
5912
|
+
}
|
|
5913
|
+
})]
|
|
5914
|
+
})
|
|
5915
|
+
}), children]
|
|
5916
|
+
});
|
|
5750
5917
|
};
|
|
5751
5918
|
|
|
5752
5919
|
var renderIdentifier = function renderIdentifier() {
|
|
@@ -5755,24 +5922,27 @@ var renderIdentifier = function renderIdentifier() {
|
|
|
5755
5922
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
5756
5923
|
_ref$receiptUrl = _ref.receiptUrl,
|
|
5757
5924
|
receiptUrl = _ref$receiptUrl === void 0 ? "" : _ref$receiptUrl;
|
|
5758
|
-
return /*#__PURE__*/
|
|
5759
|
-
content: identifier
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5925
|
+
return /*#__PURE__*/jsx(CopyButtonWrapper, {
|
|
5926
|
+
content: identifier,
|
|
5927
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
5928
|
+
href: receiptUrl,
|
|
5929
|
+
label: identifier,
|
|
5930
|
+
size: "small",
|
|
5931
|
+
style: "link",
|
|
5932
|
+
target: "_blank"
|
|
5933
|
+
})
|
|
5934
|
+
});
|
|
5767
5935
|
};
|
|
5768
5936
|
var truncatedText = function truncatedText(_ref2) {
|
|
5769
5937
|
var identifier = _ref2.identifier;
|
|
5770
|
-
return /*#__PURE__*/
|
|
5938
|
+
return /*#__PURE__*/jsx(Tooltip, {
|
|
5771
5939
|
content: identifier,
|
|
5772
|
-
position: "top"
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5940
|
+
position: "top",
|
|
5941
|
+
children: /*#__PURE__*/jsx("div", {
|
|
5942
|
+
className: "w-64 truncate",
|
|
5943
|
+
children: identifier
|
|
5944
|
+
})
|
|
5945
|
+
});
|
|
5776
5946
|
};
|
|
5777
5947
|
|
|
5778
5948
|
var COLUMNS$1 = [{
|
|
@@ -6090,49 +6260,51 @@ var List$3 = function List(_ref) {
|
|
|
6090
6260
|
return !hiddenColumns.includes(processDataIndex(dataIndex));
|
|
6091
6261
|
});
|
|
6092
6262
|
if (isAccountLoading || isPaymentsLoaidng) {
|
|
6093
|
-
return /*#__PURE__*/
|
|
6263
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
6094
6264
|
}
|
|
6095
6265
|
if (!(account !== null && account !== void 0 && account.isConnected) && views <= 0 || !isPresent(payments)) {
|
|
6096
|
-
return /*#__PURE__*/
|
|
6097
|
-
className: "flex h-full w-full items-center justify-center"
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6266
|
+
return /*#__PURE__*/jsx("div", {
|
|
6267
|
+
className: "flex h-full w-full items-center justify-center",
|
|
6268
|
+
children: /*#__PURE__*/jsx(NoData, {
|
|
6269
|
+
title: tab === TAB$2.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
6270
|
+
status: tab
|
|
6271
|
+
})
|
|
6101
6272
|
})
|
|
6102
|
-
})
|
|
6273
|
+
});
|
|
6103
6274
|
}
|
|
6104
|
-
return /*#__PURE__*/
|
|
6105
|
-
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6275
|
+
return /*#__PURE__*/jsx(TableWrapper, {
|
|
6276
|
+
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
6277
|
+
children: /*#__PURE__*/jsx(Table, {
|
|
6278
|
+
fixedHeight: true,
|
|
6279
|
+
allowRowClick: false,
|
|
6280
|
+
columnData: visibleColumns,
|
|
6281
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
6282
|
+
handlePageChange: handleTablePaginaton,
|
|
6283
|
+
loading: isFetching,
|
|
6284
|
+
rowData: buildRowData$1({
|
|
6285
|
+
data: payments,
|
|
6286
|
+
pageProperties: pageProperties,
|
|
6287
|
+
tab: tab
|
|
6288
|
+
}),
|
|
6289
|
+
rowSelection: false,
|
|
6290
|
+
sortDirections: SORT_DIRECTIONS,
|
|
6291
|
+
totalCount: views,
|
|
6292
|
+
paginationProps: {
|
|
6293
|
+
showSizeChanger: true,
|
|
6294
|
+
hideOnSinglePage: true,
|
|
6295
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
6296
|
+
total: views
|
|
6297
|
+
},
|
|
6298
|
+
onChange: handleTableChange,
|
|
6299
|
+
onColumnHide: function onColumnHide(columnData) {
|
|
6300
|
+
hideColumn(processDataIndex(columnData.dataIndex));
|
|
6301
|
+
}
|
|
6302
|
+
})
|
|
6303
|
+
});
|
|
6132
6304
|
};
|
|
6133
6305
|
|
|
6134
|
-
function ownKeys$
|
|
6135
|
-
function _objectSpread$
|
|
6306
|
+
function ownKeys$6(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; }
|
|
6307
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6136
6308
|
var RazorpayDashboard = function RazorpayDashboard(_ref) {
|
|
6137
6309
|
var searchProps = _ref.searchProps,
|
|
6138
6310
|
_ref$headerProps = _ref.headerProps,
|
|
@@ -6163,34 +6335,36 @@ var RazorpayDashboard = function RazorpayDashboard(_ref) {
|
|
|
6163
6335
|
setSortProperties = filterPaginationState.setSortProperties,
|
|
6164
6336
|
tab = filterPaginationState.tab,
|
|
6165
6337
|
setDataSize = filterPaginationState.setDataSize;
|
|
6166
|
-
return /*#__PURE__*/
|
|
6338
|
+
return /*#__PURE__*/jsxs(FilterWrapper, _objectSpread$6(_objectSpread$6({
|
|
6167
6339
|
title: t("neetoPayments.common.razorpayPayments")
|
|
6168
|
-
}, _objectSpread$
|
|
6340
|
+
}, _objectSpread$6({
|
|
6169
6341
|
headerProps: headerProps,
|
|
6170
6342
|
kind: kind,
|
|
6171
6343
|
payableEntityColumns: payableEntityColumns,
|
|
6172
6344
|
searchProps: searchProps,
|
|
6173
6345
|
setShowExportModal: setShowExportModal
|
|
6174
|
-
}, filterPaginationState)),
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6346
|
+
}, filterPaginationState)), {}, {
|
|
6347
|
+
children: [/*#__PURE__*/jsx(List$3, {
|
|
6348
|
+
filters: filters,
|
|
6349
|
+
holdableId: holdableId,
|
|
6350
|
+
kind: kind,
|
|
6351
|
+
pageProperties: pageProperties,
|
|
6352
|
+
payableEntityColumns: payableEntityColumns,
|
|
6353
|
+
setDataSize: setDataSize,
|
|
6354
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
6355
|
+
setPageProperties: setPageProperties,
|
|
6356
|
+
setSortProperties: setSortProperties,
|
|
6357
|
+
sortProperties: sortProperties,
|
|
6358
|
+
tab: tab
|
|
6359
|
+
}), /*#__PURE__*/jsx(ExportModal$1, {
|
|
6360
|
+
filters: filters,
|
|
6361
|
+
holdableId: holdableId,
|
|
6362
|
+
kind: kind,
|
|
6363
|
+
setShowExportModal: setShowExportModal,
|
|
6364
|
+
showExportModal: showExportModal,
|
|
6365
|
+
sortProperties: sortProperties,
|
|
6366
|
+
tab: tab
|
|
6367
|
+
})]
|
|
6194
6368
|
}));
|
|
6195
6369
|
};
|
|
6196
6370
|
var index$2 = withTitle(withReactQuery(RazorpayDashboard), t$1("neetoPayments.common.razorpayPayments"));
|
|
@@ -6680,7 +6854,7 @@ var RazorpayPaymentButton = function RazorpayPaymentButton(_ref) {
|
|
|
6680
6854
|
};
|
|
6681
6855
|
createRazorpayOrder(payload);
|
|
6682
6856
|
};
|
|
6683
|
-
return /*#__PURE__*/
|
|
6857
|
+
return /*#__PURE__*/jsx(Button, {
|
|
6684
6858
|
disabled: isLoading,
|
|
6685
6859
|
label: label || t("neetoPayments.common.pay"),
|
|
6686
6860
|
loading: isLoading,
|
|
@@ -6787,13 +6961,14 @@ var SquareCard = function SquareCard(_ref) {
|
|
|
6787
6961
|
useEffect(function () {
|
|
6788
6962
|
card === null || card === void 0 || card.configure(options);
|
|
6789
6963
|
}, [card, options]);
|
|
6790
|
-
return /*#__PURE__*/
|
|
6964
|
+
return /*#__PURE__*/jsx("div", {
|
|
6791
6965
|
id: id,
|
|
6792
6966
|
className: classNames({
|
|
6793
6967
|
"pointer-events-none": disabled,
|
|
6794
6968
|
"text-center": !card
|
|
6795
|
-
})
|
|
6796
|
-
|
|
6969
|
+
}),
|
|
6970
|
+
children: !card && /*#__PURE__*/jsx(Spinner, {})
|
|
6971
|
+
});
|
|
6797
6972
|
};
|
|
6798
6973
|
|
|
6799
6974
|
var TAB$1 = {
|
|
@@ -6976,46 +7151,48 @@ var List$2 = function List(_ref) {
|
|
|
6976
7151
|
} : DEFAULT_SORT_PROPERTIES$1);
|
|
6977
7152
|
};
|
|
6978
7153
|
if (isSquareAccountLoading || isDataLoading) {
|
|
6979
|
-
return /*#__PURE__*/
|
|
7154
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
6980
7155
|
}
|
|
6981
7156
|
if (!(squareAccount !== null && squareAccount !== void 0 && squareAccount.isConnected) && dataSize <= 0 || !isPresent(data)) {
|
|
6982
|
-
return /*#__PURE__*/
|
|
6983
|
-
className: "flex h-full w-full items-center justify-center"
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
7157
|
+
return /*#__PURE__*/jsx("div", {
|
|
7158
|
+
className: "flex h-full w-full items-center justify-center",
|
|
7159
|
+
children: /*#__PURE__*/jsx(NoData, {
|
|
7160
|
+
title: tab === TAB$1.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
7161
|
+
status: tab
|
|
7162
|
+
})
|
|
6987
7163
|
})
|
|
6988
|
-
})
|
|
7164
|
+
});
|
|
6989
7165
|
}
|
|
6990
|
-
return /*#__PURE__*/
|
|
6991
|
-
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7166
|
+
return /*#__PURE__*/jsx(TableWrapper, {
|
|
7167
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
7168
|
+
children: /*#__PURE__*/jsx(Table, {
|
|
7169
|
+
columnData: columnData,
|
|
7170
|
+
fixedHeight: true,
|
|
7171
|
+
allowRowClick: false,
|
|
7172
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
7173
|
+
handlePageChange: handleTablePaginaton,
|
|
7174
|
+
loading: isDataFetching,
|
|
7175
|
+
rowData: buildRowData$1({
|
|
7176
|
+
data: data,
|
|
7177
|
+
pageProperties: pageProperties,
|
|
7178
|
+
tab: tab
|
|
7179
|
+
}),
|
|
7180
|
+
rowSelection: false,
|
|
7181
|
+
sortDirections: SORT_DIRECTIONS,
|
|
7182
|
+
totalCount: dataSize,
|
|
7183
|
+
paginationProps: {
|
|
7184
|
+
showSizeChanger: true,
|
|
7185
|
+
hideOnSinglePage: true,
|
|
7186
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
7187
|
+
total: dataSize
|
|
7188
|
+
},
|
|
7189
|
+
onChange: handleTableChange
|
|
7190
|
+
})
|
|
7191
|
+
});
|
|
7015
7192
|
};
|
|
7016
7193
|
|
|
7017
|
-
function ownKeys$
|
|
7018
|
-
function _objectSpread$
|
|
7194
|
+
function ownKeys$5(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; }
|
|
7195
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7019
7196
|
var SquareDashboard = function SquareDashboard(_ref) {
|
|
7020
7197
|
var searchProps = _ref.searchProps,
|
|
7021
7198
|
_ref$headerProps = _ref.headerProps,
|
|
@@ -7042,24 +7219,26 @@ var SquareDashboard = function SquareDashboard(_ref) {
|
|
|
7042
7219
|
setSortProperties = filterPaginationState.setSortProperties,
|
|
7043
7220
|
tab = filterPaginationState.tab,
|
|
7044
7221
|
setDataSize = filterPaginationState.setDataSize;
|
|
7045
|
-
return /*#__PURE__*/
|
|
7222
|
+
return /*#__PURE__*/jsx(FilterWrapper, _objectSpread$5(_objectSpread$5({
|
|
7046
7223
|
title: isPaymentKind(kind) ? t("neetoPayments.title.squarePayment") : t("neetoPayments.title.squareRefund")
|
|
7047
|
-
}, _objectSpread$
|
|
7224
|
+
}, _objectSpread$5({
|
|
7048
7225
|
headerProps: headerProps,
|
|
7049
7226
|
kind: kind,
|
|
7050
7227
|
searchProps: searchProps
|
|
7051
|
-
}, filterPaginationState)),
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7228
|
+
}, filterPaginationState)), {}, {
|
|
7229
|
+
children: /*#__PURE__*/jsx(List$2, {
|
|
7230
|
+
filters: filters,
|
|
7231
|
+
holdableId: holdableId,
|
|
7232
|
+
kind: kind,
|
|
7233
|
+
pageProperties: pageProperties,
|
|
7234
|
+
payableEntityColumns: payableEntityColumns,
|
|
7235
|
+
setDataSize: setDataSize,
|
|
7236
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
7237
|
+
setPageProperties: setPageProperties,
|
|
7238
|
+
setSortProperties: setSortProperties,
|
|
7239
|
+
sortProperties: sortProperties,
|
|
7240
|
+
tab: tab
|
|
7241
|
+
})
|
|
7063
7242
|
}));
|
|
7064
7243
|
};
|
|
7065
7244
|
var index$1 = withTitle(withReactQuery(SquareDashboard), t$1("neetoPayments.common.squarePayments"));
|
|
@@ -7076,6 +7255,8 @@ var STRIPE_ALERT_PAYMENT_KIND_CONTENT = {
|
|
|
7076
7255
|
};
|
|
7077
7256
|
|
|
7078
7257
|
var _excluded = ["isOpen", "paymentKind", "onClose"];
|
|
7258
|
+
function ownKeys$4(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; }
|
|
7259
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7079
7260
|
var PaymentKindRestrictionAlert = function PaymentKindRestrictionAlert(_ref) {
|
|
7080
7261
|
var _ref$isOpen = _ref.isOpen,
|
|
7081
7262
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
@@ -7084,7 +7265,7 @@ var PaymentKindRestrictionAlert = function PaymentKindRestrictionAlert(_ref) {
|
|
|
7084
7265
|
_ref$onClose = _ref.onClose,
|
|
7085
7266
|
onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
|
|
7086
7267
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
7087
|
-
return /*#__PURE__*/
|
|
7268
|
+
return /*#__PURE__*/jsx(Alert, _objectSpread$4({
|
|
7088
7269
|
isOpen: isOpen,
|
|
7089
7270
|
onClose: onClose,
|
|
7090
7271
|
message: STRIPE_ALERT_PAYMENT_KIND_CONTENT[paymentKind].message,
|
|
@@ -7183,6 +7364,7 @@ var AccountForm = function AccountForm(_ref) {
|
|
|
7183
7364
|
returnUrl = _ref.returnUrl;
|
|
7184
7365
|
var _useTranslation = useTranslation(),
|
|
7185
7366
|
t = _useTranslation.t;
|
|
7367
|
+
var history = useHistory();
|
|
7186
7368
|
var _useState = useState(false),
|
|
7187
7369
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7188
7370
|
isPolling = _useState2[0],
|
|
@@ -7228,30 +7410,37 @@ var AccountForm = function AccountForm(_ref) {
|
|
|
7228
7410
|
createStripeAccount(payload);
|
|
7229
7411
|
};
|
|
7230
7412
|
if (isLoading) {
|
|
7231
|
-
return /*#__PURE__*/
|
|
7413
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
7232
7414
|
}
|
|
7233
|
-
return /*#__PURE__*/
|
|
7415
|
+
return /*#__PURE__*/jsx(Form, {
|
|
7234
7416
|
formikProps: {
|
|
7235
7417
|
enableReinitialize: true,
|
|
7236
7418
|
initialValues: INITIAL_VALUES,
|
|
7237
7419
|
validationSchema: VALIDATION_SCHEMA$2,
|
|
7238
7420
|
onSubmit: handleSubmit
|
|
7239
|
-
}
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7421
|
+
},
|
|
7422
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
7423
|
+
className: "space-y-3",
|
|
7424
|
+
children: [/*#__PURE__*/jsx(Select, {
|
|
7425
|
+
required: true,
|
|
7426
|
+
helpText: t("neetoPayments.integrationModal.form.helpText"),
|
|
7427
|
+
label: t("neetoPayments.integrationModal.form.label"),
|
|
7428
|
+
name: "country",
|
|
7429
|
+
options: buildCountryOptions(countries),
|
|
7430
|
+
placeholder: t("neetoPayments.integrationModal.form.placeholder")
|
|
7431
|
+
}), /*#__PURE__*/jsx(ActionBlock, {
|
|
7432
|
+
cancelButtonProps: {
|
|
7433
|
+
onClick: function onClick() {
|
|
7434
|
+
return history.goBack();
|
|
7435
|
+
}
|
|
7436
|
+
},
|
|
7437
|
+
isSubmitting: isCreating || isPolling,
|
|
7438
|
+
submitButtonProps: {
|
|
7439
|
+
label: submitButtonLabel
|
|
7440
|
+
}
|
|
7441
|
+
})]
|
|
7442
|
+
})
|
|
7443
|
+
});
|
|
7255
7444
|
};
|
|
7256
7445
|
|
|
7257
7446
|
var AccountDetails = function AccountDetails(_ref) {
|
|
@@ -7262,26 +7451,35 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
7262
7451
|
stripeAccount = _useFetchConnectedStr3.account;
|
|
7263
7452
|
var _useTranslation = useTranslation(),
|
|
7264
7453
|
t = _useTranslation.t;
|
|
7265
|
-
return /*#__PURE__*/
|
|
7266
|
-
className: "mb-6 space-y-3"
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7454
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7455
|
+
className: "mb-6 space-y-3",
|
|
7456
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
7457
|
+
style: "h5",
|
|
7458
|
+
weight: "medium",
|
|
7459
|
+
children: t("neetoPayments.integrationModal.account.title")
|
|
7460
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
7461
|
+
className: "grid grid-cols-4 gap-y-3",
|
|
7462
|
+
children: [/*#__PURE__*/jsx(Label, {
|
|
7463
|
+
className: "neeto-ui-text-gray-800",
|
|
7464
|
+
children: t("neetoPayments.common.id")
|
|
7465
|
+
}), /*#__PURE__*/jsx(Label, {
|
|
7466
|
+
className: "neeto-ui-text-gray-800 col-span-3",
|
|
7467
|
+
children: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.identifier
|
|
7468
|
+
}), /*#__PURE__*/jsx(Label, {
|
|
7469
|
+
className: "neeto-ui-text-gray-800",
|
|
7470
|
+
children: t("neetoPayments.common.email")
|
|
7471
|
+
}), /*#__PURE__*/jsx(Label, {
|
|
7472
|
+
className: "neeto-ui-text-gray-800 col-span-3",
|
|
7473
|
+
children: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.email
|
|
7474
|
+
}), /*#__PURE__*/jsx(Label, {
|
|
7475
|
+
className: "neeto-ui-text-gray-800",
|
|
7476
|
+
children: t("neetoPayments.common.country")
|
|
7477
|
+
}), /*#__PURE__*/jsx(Label, {
|
|
7478
|
+
className: "neeto-ui-text-gray-800 col-span-3",
|
|
7479
|
+
children: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.country
|
|
7480
|
+
})]
|
|
7481
|
+
})]
|
|
7482
|
+
});
|
|
7285
7483
|
};
|
|
7286
7484
|
|
|
7287
7485
|
var AccountProcessing = function AccountProcessing(_ref) {
|
|
@@ -7346,36 +7544,39 @@ var AccountProcessing = function AccountProcessing(_ref) {
|
|
|
7346
7544
|
var handleUseAnotherStripeAccount = function handleUseAnotherStripeAccount() {
|
|
7347
7545
|
destroyStripeAccount(stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.id);
|
|
7348
7546
|
};
|
|
7349
|
-
return /*#__PURE__*/
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7547
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
7548
|
+
children: [/*#__PURE__*/jsx(AccountDetails, {}), /*#__PURE__*/jsxs("div", {
|
|
7549
|
+
className: "flex flex-col items-start space-y-2",
|
|
7550
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
7551
|
+
disabled: isPolling,
|
|
7552
|
+
href: buildRefreshUrl(stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.id, returnUrl),
|
|
7553
|
+
label: buttonLabel(),
|
|
7554
|
+
loading: isPolling,
|
|
7555
|
+
size: "small"
|
|
7556
|
+
}), !isPolling && !isAccountProcessingFailed && /*#__PURE__*/jsx(Button, {
|
|
7557
|
+
disabled: isStripeAccountDestroying || isPolling,
|
|
7558
|
+
label: t("neetoPayments.integrationModal.anotherAccount"),
|
|
7559
|
+
size: "small",
|
|
7560
|
+
style: "link",
|
|
7561
|
+
onClick: function onClick() {
|
|
7562
|
+
return setIsAlertOpen(true);
|
|
7563
|
+
}
|
|
7564
|
+
})]
|
|
7565
|
+
}), /*#__PURE__*/jsx(Alert, {
|
|
7566
|
+
isOpen: isAlertOpen,
|
|
7567
|
+
title: t("neetoPayments.integrationModal.alert.changeTitle"),
|
|
7568
|
+
message: /*#__PURE__*/jsx(Trans, {
|
|
7569
|
+
i18nKey: "neetoPayments.integrationModal.alert.changeMessage",
|
|
7570
|
+
values: {
|
|
7571
|
+
account: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.email
|
|
7572
|
+
}
|
|
7573
|
+
}),
|
|
7574
|
+
onClose: function onClose() {
|
|
7575
|
+
return setIsAlertOpen(false);
|
|
7576
|
+
},
|
|
7577
|
+
onSubmit: handleUseAnotherStripeAccount
|
|
7578
|
+
})]
|
|
7579
|
+
});
|
|
7379
7580
|
};
|
|
7380
7581
|
|
|
7381
7582
|
var Configure = function Configure(_ref) {
|
|
@@ -7392,25 +7593,29 @@ var Configure = function Configure(_ref) {
|
|
|
7392
7593
|
window.open(onboarding === null || onboarding === void 0 ? void 0 : onboarding.url, "_self");
|
|
7393
7594
|
};
|
|
7394
7595
|
var connectDescription = isPresent(stripeAccount) ? t("neetoPayments.integrationModal.linkedDescription") : t("neetoPayments.integrationModal.subtitle");
|
|
7395
|
-
return /*#__PURE__*/
|
|
7396
|
-
className: "mx-auto w-full max-w-lg space-y-8"
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7596
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7597
|
+
className: "mx-auto w-full max-w-lg space-y-8",
|
|
7598
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
7599
|
+
className: "space-y-2",
|
|
7600
|
+
children: [/*#__PURE__*/jsx(SvgStripe, {}), /*#__PURE__*/jsx(Typography, {
|
|
7601
|
+
"data-cy": "configure-payment-title",
|
|
7602
|
+
style: "h2",
|
|
7603
|
+
weight: "semibold",
|
|
7604
|
+
children: t("neetoPayments.integrationModal.title")
|
|
7605
|
+
}), /*#__PURE__*/jsx(Label, {
|
|
7606
|
+
className: "leading-snug",
|
|
7607
|
+
children: connectDescription
|
|
7608
|
+
})]
|
|
7609
|
+
}), isPresent(stripeAccount) ? /*#__PURE__*/jsx(AccountProcessing, {
|
|
7610
|
+
onAccountCreated: handleStripeAccountCreated,
|
|
7611
|
+
holdableId: holdableId,
|
|
7612
|
+
returnUrl: returnUrl
|
|
7613
|
+
}) : /*#__PURE__*/jsx(AccountForm, {
|
|
7614
|
+
holdableId: holdableId,
|
|
7615
|
+
returnUrl: returnUrl,
|
|
7616
|
+
onAccountCreated: handleStripeAccountCreated
|
|
7617
|
+
})]
|
|
7618
|
+
});
|
|
7414
7619
|
};
|
|
7415
7620
|
|
|
7416
7621
|
/*! @license DOMPurify 3.0.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.2/LICENSE */
|
|
@@ -9040,45 +9245,51 @@ var Connect = function Connect(_ref) {
|
|
|
9040
9245
|
}
|
|
9041
9246
|
window.location.href = purify.sanitize(stripeConnectUrl);
|
|
9042
9247
|
};
|
|
9043
|
-
return /*#__PURE__*/
|
|
9044
|
-
className: "mx-auto w-full max-w-lg space-y-8"
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9248
|
+
return /*#__PURE__*/jsxs("div", {
|
|
9249
|
+
className: "mx-auto w-full max-w-lg space-y-8",
|
|
9250
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
9251
|
+
className: "space-y-2",
|
|
9252
|
+
children: [/*#__PURE__*/jsx(SvgStripe, {}), /*#__PURE__*/jsx(Typography, {
|
|
9253
|
+
"data-cy": "configure-payment-title",
|
|
9254
|
+
style: "h2",
|
|
9255
|
+
weight: "semibold",
|
|
9256
|
+
children: t("neetoPayments.integrationModal.title")
|
|
9257
|
+
}), /*#__PURE__*/jsx(Label, {
|
|
9258
|
+
className: "leading-snug",
|
|
9259
|
+
children: t("neetoPayments.integrationModal.subtitle")
|
|
9260
|
+
})]
|
|
9261
|
+
}), /*#__PURE__*/jsxs(Radio, {
|
|
9262
|
+
stacked: true,
|
|
9263
|
+
value: selectedOption,
|
|
9264
|
+
onChange: function onChange(event) {
|
|
9265
|
+
return setSelectedOption(event.target.value);
|
|
9266
|
+
},
|
|
9267
|
+
children: [/*#__PURE__*/jsx(Radio.Item, {
|
|
9268
|
+
className: "neeto-ui-border-black w-96 py-2",
|
|
9269
|
+
label: t("neetoPayments.integrationModal.createAccount"),
|
|
9270
|
+
name: "accountMethod",
|
|
9271
|
+
value: INTEGRATION_METHOD.createNewAccount
|
|
9272
|
+
}), /*#__PURE__*/jsx(Radio.Item, {
|
|
9273
|
+
className: "neeto-ui-border-black w-96 py-2",
|
|
9274
|
+
label: t("neetoPayments.integrationModal.connectAccount"),
|
|
9275
|
+
name: "accountMethod",
|
|
9276
|
+
value: INTEGRATION_METHOD.useExistingAccount
|
|
9277
|
+
})]
|
|
9278
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
9279
|
+
label: t("neetoPayments.common.continue"),
|
|
9280
|
+
onClick: handleSubmit
|
|
9281
|
+
})]
|
|
9282
|
+
});
|
|
9073
9283
|
};
|
|
9074
9284
|
|
|
9075
9285
|
var Finish = withT(function (_ref) {
|
|
9076
9286
|
var t = _ref.t,
|
|
9077
9287
|
onSuccess = _ref.onSuccess;
|
|
9078
|
-
return /*#__PURE__*/
|
|
9288
|
+
return /*#__PURE__*/jsx(Finish$1, {
|
|
9079
9289
|
title: t("v2.payment.finishTitle"),
|
|
9080
|
-
onClick: onSuccess
|
|
9081
|
-
|
|
9290
|
+
onClick: onSuccess,
|
|
9291
|
+
children: /*#__PURE__*/jsx(AccountDetails, {})
|
|
9292
|
+
});
|
|
9082
9293
|
});
|
|
9083
9294
|
|
|
9084
9295
|
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; }
|
|
@@ -9119,50 +9330,64 @@ var StripeConnect = function StripeConnect(_ref) {
|
|
|
9119
9330
|
isCompleted: activeTab === STEPS.demo
|
|
9120
9331
|
})];
|
|
9121
9332
|
}, [activeTab, stripeAccount]);
|
|
9122
|
-
return /*#__PURE__*/
|
|
9333
|
+
return /*#__PURE__*/jsxs(Modal$1, {
|
|
9123
9334
|
isOpen: isOpen,
|
|
9124
9335
|
onClose: onClose,
|
|
9125
|
-
steps: steps
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9336
|
+
steps: steps,
|
|
9337
|
+
children: [activeTab === STEPS.connect && /*#__PURE__*/jsx(Connect, {
|
|
9338
|
+
holdableId: holdableId,
|
|
9339
|
+
returnUrl: returnUrl,
|
|
9340
|
+
setActiveTab: setActiveTab
|
|
9341
|
+
}), activeTab === STEPS.configure && /*#__PURE__*/jsx(Configure, {
|
|
9342
|
+
holdableId: holdableId,
|
|
9343
|
+
returnUrl: returnUrl
|
|
9344
|
+
}), activeTab === STEPS.finish && /*#__PURE__*/jsx(Finish, {
|
|
9345
|
+
onSuccess: onClose
|
|
9346
|
+
}), activeTab === STEPS.demo && /*#__PURE__*/jsx(Demo, {
|
|
9347
|
+
onClose: onClose
|
|
9348
|
+
})]
|
|
9349
|
+
});
|
|
9138
9350
|
};
|
|
9139
9351
|
|
|
9140
9352
|
var VALIDATION_SCHEMA$1 = yup.object({
|
|
9141
|
-
upiId: yup.string().matches(/^[a-zA-Z0-9.-]{2,256}@[a-zA-
|
|
9353
|
+
upiId: yup.string().matches(/^[a-zA-Z0-9.-]{2,256}@[a-zA-Z][a-zA-Z]{2,64}$/, t$1("neetoPayments.upi.form.validation.invalidUpi")).required(t$1("neetoPayments.upi.form.validation.required"))
|
|
9142
9354
|
});
|
|
9143
9355
|
|
|
9144
|
-
var Add =
|
|
9145
|
-
var
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9356
|
+
var Add = function Add(_ref) {
|
|
9357
|
+
var handleCreateUpiId = _ref.handleCreateUpiId;
|
|
9358
|
+
var _useTranslation = useTranslation(),
|
|
9359
|
+
t = _useTranslation.t;
|
|
9360
|
+
var history = useHistory();
|
|
9361
|
+
return /*#__PURE__*/jsx("div", {
|
|
9362
|
+
children: /*#__PURE__*/jsx(Form, {
|
|
9363
|
+
formikProps: {
|
|
9364
|
+
initialValues: {
|
|
9365
|
+
upiId: ""
|
|
9366
|
+
},
|
|
9367
|
+
onSubmit: handleCreateUpiId,
|
|
9368
|
+
validationSchema: VALIDATION_SCHEMA$1
|
|
9151
9369
|
},
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9370
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
9371
|
+
className: "space-y-3",
|
|
9372
|
+
children: [/*#__PURE__*/jsx(Input, {
|
|
9373
|
+
className: "w-64",
|
|
9374
|
+
label: t("neetoPayments.upi.form.enterUpi"),
|
|
9375
|
+
name: "upiId",
|
|
9376
|
+
placeholder: t("neetoPayments.upi.form.enterUpi")
|
|
9377
|
+
}), /*#__PURE__*/jsx(ActionBlock, {
|
|
9378
|
+
cancelButtonProps: {
|
|
9379
|
+
onClick: function onClick() {
|
|
9380
|
+
return history.goBack();
|
|
9381
|
+
}
|
|
9382
|
+
},
|
|
9383
|
+
submitButtonProps: {
|
|
9384
|
+
label: t("neetoPayments.upi.form.add")
|
|
9385
|
+
}
|
|
9386
|
+
})]
|
|
9387
|
+
})
|
|
9388
|
+
})
|
|
9389
|
+
});
|
|
9390
|
+
};
|
|
9166
9391
|
|
|
9167
9392
|
var getColumnData = function getColumnData(handleDeleteClick) {
|
|
9168
9393
|
return [{
|
|
@@ -9171,23 +9396,25 @@ var getColumnData = function getColumnData(handleDeleteClick) {
|
|
|
9171
9396
|
key: "address",
|
|
9172
9397
|
width: 272,
|
|
9173
9398
|
render: function render(_, upiId) {
|
|
9174
|
-
return /*#__PURE__*/
|
|
9175
|
-
className: "flex items-center justify-between gap-3"
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9399
|
+
return /*#__PURE__*/jsxs("div", {
|
|
9400
|
+
className: "flex items-center justify-between gap-3",
|
|
9401
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
9402
|
+
className: "w-4/5",
|
|
9403
|
+
style: "body2",
|
|
9404
|
+
children: upiId.address
|
|
9405
|
+
}), /*#__PURE__*/jsx(MoreDropdown, {
|
|
9406
|
+
dropdownProps: {
|
|
9407
|
+
strategy: "fixed"
|
|
9408
|
+
},
|
|
9409
|
+
menuItems: [{
|
|
9410
|
+
key: "delete-meeting",
|
|
9411
|
+
label: t$1("neetoPayments.common.delete"),
|
|
9412
|
+
onClick: function onClick() {
|
|
9413
|
+
return handleDeleteClick(upiId);
|
|
9414
|
+
}
|
|
9415
|
+
}]
|
|
9416
|
+
})]
|
|
9417
|
+
});
|
|
9191
9418
|
}
|
|
9192
9419
|
}, {
|
|
9193
9420
|
title: t$1("neetoPayments.common.createdAt"),
|
|
@@ -9225,24 +9452,26 @@ var List$1 = function List(_ref) {
|
|
|
9225
9452
|
if (isEmpty(upiIds)) {
|
|
9226
9453
|
return null;
|
|
9227
9454
|
}
|
|
9228
|
-
return /*#__PURE__*/
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9455
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
9456
|
+
children: [/*#__PURE__*/jsx(Table, {
|
|
9457
|
+
columnData: getColumnData(handleOpenDeleteModal),
|
|
9458
|
+
rowData: upiIds
|
|
9459
|
+
}), /*#__PURE__*/jsx(Alert, {
|
|
9460
|
+
isOpen: isAlertOpen,
|
|
9461
|
+
title: t("neetoPayments.upi.alert.title"),
|
|
9462
|
+
message: /*#__PURE__*/jsx(Trans, {
|
|
9463
|
+
components: {
|
|
9464
|
+
b: /*#__PURE__*/jsx("strong", {})
|
|
9465
|
+
},
|
|
9466
|
+
i18nKey: "neetoPayments.upi.alert.message",
|
|
9467
|
+
values: {
|
|
9468
|
+
upiId: selectedUpiId.address
|
|
9469
|
+
}
|
|
9470
|
+
}),
|
|
9471
|
+
onClose: handleAlertClose,
|
|
9472
|
+
onSubmit: handleAlertSubmit
|
|
9473
|
+
})]
|
|
9474
|
+
});
|
|
9246
9475
|
};
|
|
9247
9476
|
|
|
9248
9477
|
var UpiConnect = function UpiConnect(_ref) {
|
|
@@ -9256,20 +9485,17 @@ var UpiConnect = function UpiConnect(_ref) {
|
|
|
9256
9485
|
handleDeleteUpiId = _ref$handleDeleteUpiI === void 0 ? noop : _ref$handleDeleteUpiI,
|
|
9257
9486
|
_ref$handleCreateUpiI = _ref.handleCreateUpiId,
|
|
9258
9487
|
handleCreateUpiId = _ref$handleCreateUpiI === void 0 ? noop : _ref$handleCreateUpiI;
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
isDeleting: isDeleting,
|
|
9271
|
-
upiIds: upiIds
|
|
9272
|
-
}));
|
|
9488
|
+
if (isLoading) return /*#__PURE__*/jsx(Spinner, {});
|
|
9489
|
+
return /*#__PURE__*/jsxs("div", {
|
|
9490
|
+
className: "flex w-full max-w-3xl flex-col items-start space-y-6",
|
|
9491
|
+
children: [/*#__PURE__*/jsx(Add, {
|
|
9492
|
+
handleCreateUpiId: handleCreateUpiId
|
|
9493
|
+
}), /*#__PURE__*/jsx(List$1, {
|
|
9494
|
+
handleDeleteUpiId: handleDeleteUpiId,
|
|
9495
|
+
isDeleting: isDeleting,
|
|
9496
|
+
upiIds: upiIds
|
|
9497
|
+
})]
|
|
9498
|
+
});
|
|
9273
9499
|
};
|
|
9274
9500
|
|
|
9275
9501
|
var create = function create(payload) {
|
|
@@ -9315,7 +9541,7 @@ var UpiMarkAsPaidButton = function UpiMarkAsPaidButton(_ref) {
|
|
|
9315
9541
|
payableId: payableId
|
|
9316
9542
|
});
|
|
9317
9543
|
};
|
|
9318
|
-
return /*#__PURE__*/
|
|
9544
|
+
return /*#__PURE__*/jsx(Button, {
|
|
9319
9545
|
label: t("neetoPayments.upi.payment.buttons.markAsPaid"),
|
|
9320
9546
|
loading: isLoading,
|
|
9321
9547
|
onClick: handleClick
|
|
@@ -9326,11 +9552,15 @@ var VALIDATION_SCHEMA = yup.object({
|
|
|
9326
9552
|
transactionId: yup.string().required(t$1("neetoPayments.upi.payment.transaction.required")).min(6, t$1("neetoPayments.upi.payment.transaction.sixCharacters")).max(6, t$1("neetoPayments.upi.payment.transaction.sixCharacters"))
|
|
9327
9553
|
});
|
|
9328
9554
|
|
|
9555
|
+
var vpaIdToQrCodeValue = function vpaIdToQrCodeValue(vpaId) {
|
|
9556
|
+
return "upi://pay?pa=".concat(vpaId);
|
|
9557
|
+
};
|
|
9558
|
+
|
|
9329
9559
|
function ownKeys$2(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; }
|
|
9330
9560
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9331
9561
|
var UpiPayment = function UpiPayment(_ref) {
|
|
9332
|
-
var _ref$
|
|
9333
|
-
|
|
9562
|
+
var _ref$fee = _ref.fee,
|
|
9563
|
+
fee = _ref$fee === void 0 ? {} : _ref$fee,
|
|
9334
9564
|
_ref$onSubmit = _ref.onSubmit,
|
|
9335
9565
|
onSubmit = _ref$onSubmit === void 0 ? noop : _ref$onSubmit,
|
|
9336
9566
|
_ref$onBackClick = _ref.onBackClick,
|
|
@@ -9338,7 +9568,7 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
9338
9568
|
payableId = _ref.payableId;
|
|
9339
9569
|
var _useTranslation = useTranslation(),
|
|
9340
9570
|
t = _useTranslation.t;
|
|
9341
|
-
var vpaIds = pluck("address", vpas)
|
|
9571
|
+
var vpaIds = pluck("address", fee === null || fee === void 0 ? void 0 : fee.vpas);
|
|
9342
9572
|
var _useCreateUpiPayment = useCreateUpiPayment({}),
|
|
9343
9573
|
createPayment = _useCreateUpiPayment.mutate;
|
|
9344
9574
|
var handleSubmit = function handleSubmit(values) {
|
|
@@ -9348,38 +9578,56 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
9348
9578
|
createPayment(payload);
|
|
9349
9579
|
onSubmit(values);
|
|
9350
9580
|
};
|
|
9351
|
-
return /*#__PURE__*/
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9581
|
+
return /*#__PURE__*/jsx("div", {
|
|
9582
|
+
children: /*#__PURE__*/jsxs(Form, {
|
|
9583
|
+
className: "space-y-4",
|
|
9584
|
+
formikProps: {
|
|
9585
|
+
onSubmit: handleSubmit,
|
|
9586
|
+
initialValues: {
|
|
9587
|
+
transactionId: ""
|
|
9588
|
+
},
|
|
9589
|
+
validationSchema: VALIDATION_SCHEMA
|
|
9357
9590
|
},
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9591
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
9592
|
+
style: "body1",
|
|
9593
|
+
children: t("neetoPayments.upi.payment.vpaText", {
|
|
9594
|
+
count: vpaIds.length
|
|
9595
|
+
})
|
|
9596
|
+
}), isPresent(vpaIds) && /*#__PURE__*/jsx("div", {
|
|
9597
|
+
className: "grid grid-cols-1 gap-8 gap-y-4 sm:grid-cols-2",
|
|
9598
|
+
children: vpaIds.map(function (vpaId) {
|
|
9599
|
+
return /*#__PURE__*/jsxs("div", {
|
|
9600
|
+
className: "flex flex-col items-center justify-center",
|
|
9601
|
+
children: [/*#__PURE__*/jsx(QRCodeImage, {
|
|
9602
|
+
size: 256,
|
|
9603
|
+
style: {
|
|
9604
|
+
width: 80,
|
|
9605
|
+
height: 80
|
|
9606
|
+
},
|
|
9607
|
+
value: vpaIdToQrCodeValue(vpaId)
|
|
9608
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
9609
|
+
className: "mt-2 w-full break-words text-center",
|
|
9610
|
+
style: "body2",
|
|
9611
|
+
children: vpaId
|
|
9612
|
+
})]
|
|
9613
|
+
}, vpaId);
|
|
9614
|
+
})
|
|
9615
|
+
}), /*#__PURE__*/jsx(Input, {
|
|
9616
|
+
required: true,
|
|
9617
|
+
label: t("neetoPayments.upi.payment.transaction.label"),
|
|
9618
|
+
name: "transactionId",
|
|
9619
|
+
placeholder: t("neetoPayments.upi.payment.transaction.placeholder")
|
|
9620
|
+
}), /*#__PURE__*/jsx(ActionBlock, {
|
|
9621
|
+
cancelButtonProps: {
|
|
9622
|
+
label: t("neetoPayments.upi.payment.buttons.back"),
|
|
9623
|
+
onClick: onBackClick
|
|
9624
|
+
},
|
|
9625
|
+
submitButtonProps: {
|
|
9626
|
+
label: t("neetoPayments.upi.payment.buttons.submit")
|
|
9627
|
+
}
|
|
9628
|
+
})]
|
|
9629
|
+
})
|
|
9630
|
+
});
|
|
9383
9631
|
};
|
|
9384
9632
|
|
|
9385
9633
|
var TAB = {
|
|
@@ -9548,45 +9796,47 @@ var List = function List(_ref) {
|
|
|
9548
9796
|
return !hiddenColumns.includes(processDataIndex(dataIndex));
|
|
9549
9797
|
});
|
|
9550
9798
|
if (isPaymentsLoading) {
|
|
9551
|
-
return /*#__PURE__*/
|
|
9799
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
9552
9800
|
}
|
|
9553
9801
|
if (!isPresent(payments)) {
|
|
9554
|
-
return /*#__PURE__*/
|
|
9555
|
-
className: "flex h-full w-full items-center justify-center"
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9802
|
+
return /*#__PURE__*/jsx("div", {
|
|
9803
|
+
className: "flex h-full w-full items-center justify-center",
|
|
9804
|
+
children: /*#__PURE__*/jsx(NoData, {
|
|
9805
|
+
title: tab === TAB.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
9806
|
+
status: tab
|
|
9807
|
+
})
|
|
9559
9808
|
})
|
|
9560
|
-
})
|
|
9809
|
+
});
|
|
9561
9810
|
}
|
|
9562
|
-
return /*#__PURE__*/
|
|
9563
|
-
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9811
|
+
return /*#__PURE__*/jsx(TableWrapper, {
|
|
9812
|
+
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
9813
|
+
children: /*#__PURE__*/jsx(Table, {
|
|
9814
|
+
fixedHeight: true,
|
|
9815
|
+
allowRowClick: false,
|
|
9816
|
+
columnData: visibleColumns,
|
|
9817
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
9818
|
+
handlePageChange: handleTablePaginaton,
|
|
9819
|
+
loading: isFetching,
|
|
9820
|
+
rowData: buildRowData({
|
|
9821
|
+
data: payments,
|
|
9822
|
+
pageProperties: pageProperties,
|
|
9823
|
+
tab: tab
|
|
9824
|
+
}),
|
|
9825
|
+
rowSelection: false,
|
|
9826
|
+
sortDirections: SORT_DIRECTIONS,
|
|
9827
|
+
totalCount: views,
|
|
9828
|
+
paginationProps: {
|
|
9829
|
+
showSizeChanger: true,
|
|
9830
|
+
hideOnSinglePage: true,
|
|
9831
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
9832
|
+
total: views
|
|
9833
|
+
},
|
|
9834
|
+
onChange: handleTableChange,
|
|
9835
|
+
onColumnHide: function onColumnHide(columnData) {
|
|
9836
|
+
hideColumn(processDataIndex(columnData.dataIndex));
|
|
9837
|
+
}
|
|
9838
|
+
})
|
|
9839
|
+
});
|
|
9590
9840
|
};
|
|
9591
9841
|
|
|
9592
9842
|
function ownKeys(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; }
|
|
@@ -9620,24 +9870,26 @@ var V2PaymentsDashboard = function V2PaymentsDashboard(_ref) {
|
|
|
9620
9870
|
// Note: For now this component would be called UPI payments
|
|
9621
9871
|
// Note: This cannot be called payments as right now this only shows upi payments.
|
|
9622
9872
|
// TODO: Once other payments are integrated change the header and subsequent usages of "upi"
|
|
9623
|
-
|
|
9873
|
+
jsx(FilterWrapper, _objectSpread(_objectSpread({
|
|
9624
9874
|
title: t("neetoPayments.common.upiPayments")
|
|
9625
9875
|
}, _objectSpread({
|
|
9626
9876
|
headerProps: headerProps,
|
|
9627
9877
|
kind: kind,
|
|
9628
9878
|
payableEntityColumns: payableEntityColumns,
|
|
9629
9879
|
searchProps: searchProps
|
|
9630
|
-
}, filterPaginationState)),
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9880
|
+
}, filterPaginationState)), {}, {
|
|
9881
|
+
children: /*#__PURE__*/jsx(List, {
|
|
9882
|
+
filters: filters,
|
|
9883
|
+
kind: kind,
|
|
9884
|
+
pageProperties: pageProperties,
|
|
9885
|
+
payableEntityColumns: payableEntityColumns,
|
|
9886
|
+
setDataSize: setDataSize,
|
|
9887
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
9888
|
+
setPageProperties: setPageProperties,
|
|
9889
|
+
setSortProperties: setSortProperties,
|
|
9890
|
+
sortProperties: sortProperties,
|
|
9891
|
+
tab: tab
|
|
9892
|
+
})
|
|
9641
9893
|
}))
|
|
9642
9894
|
);
|
|
9643
9895
|
};
|