@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.cjs.js
CHANGED
|
@@ -9,28 +9,46 @@ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
|
9
9
|
var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
|
|
10
10
|
var Header = require('@bigbinary/neeto-molecules/Header');
|
|
11
11
|
var SubHeader = require('@bigbinary/neeto-molecules/SubHeader');
|
|
12
|
-
var
|
|
12
|
+
var Tab = require('@bigbinary/neetoui/Tab');
|
|
13
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
13
14
|
var reactI18next = require('react-i18next');
|
|
14
15
|
var reactQuery = require('react-query');
|
|
15
16
|
var devtools = require('react-query/devtools');
|
|
16
17
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
18
|
+
var Toastr = require('@bigbinary/neetoui/Toastr');
|
|
19
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
17
20
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
21
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
22
|
+
var Modal = require('@bigbinary/neetoui/Modal');
|
|
18
23
|
var axios = require('axios');
|
|
19
24
|
var utils$3 = require('@bigbinary/neeto-commons-frontend/utils');
|
|
20
25
|
var ramda = require('ramda');
|
|
21
26
|
var reactRouterDom = require('react-router-dom');
|
|
22
27
|
var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
|
|
28
|
+
var Tag = require('@bigbinary/neetoui/Tag');
|
|
29
|
+
var Tooltip = require('@bigbinary/neetoui/Tooltip');
|
|
23
30
|
var CopyToClipboardButton = require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
24
31
|
var Columns = require('@bigbinary/neeto-molecules/Columns');
|
|
25
32
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
26
33
|
var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
|
|
34
|
+
var Table = require('@bigbinary/neetoui/Table');
|
|
35
|
+
var NoData = require('@bigbinary/neetoui/NoData');
|
|
27
36
|
var require$$0 = require('util');
|
|
37
|
+
var Pane = require('@bigbinary/neetoui/Pane');
|
|
28
38
|
var reactRouterDom$1 = require('react-router-dom/cjs/react-router-dom');
|
|
29
39
|
var classNames = require('classnames');
|
|
40
|
+
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
41
|
+
var Alert = require('@bigbinary/neetoui/Alert');
|
|
30
42
|
var neetointegrations = require('neetointegrations');
|
|
31
|
-
var
|
|
43
|
+
var Label = require('@bigbinary/neetoui/Label');
|
|
44
|
+
var Select = require('@bigbinary/neetoui/formik/Select');
|
|
45
|
+
var Form = require('@bigbinary/neetoui/formik/Form');
|
|
46
|
+
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
32
47
|
var yup = require('yup');
|
|
48
|
+
var Radio = require('@bigbinary/neetoui/Radio');
|
|
49
|
+
var Input = require('@bigbinary/neetoui/formik/Input');
|
|
33
50
|
var MoreDropdown = require('@bigbinary/neeto-molecules/MoreDropdown');
|
|
51
|
+
var QRCodeImage = require('qrcode.react');
|
|
34
52
|
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
35
53
|
|
|
36
54
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -57,15 +75,34 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
57
75
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
58
76
|
var Header__default = /*#__PURE__*/_interopDefaultLegacy(Header);
|
|
59
77
|
var SubHeader__default = /*#__PURE__*/_interopDefaultLegacy(SubHeader);
|
|
78
|
+
var Tab__default = /*#__PURE__*/_interopDefaultLegacy(Tab);
|
|
79
|
+
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
80
|
+
var Toastr__default = /*#__PURE__*/_interopDefaultLegacy(Toastr);
|
|
81
|
+
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
82
|
+
var Modal__default = /*#__PURE__*/_interopDefaultLegacy(Modal);
|
|
60
83
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
61
84
|
var DateFormat__default = /*#__PURE__*/_interopDefaultLegacy(DateFormat);
|
|
85
|
+
var Tag__default = /*#__PURE__*/_interopDefaultLegacy(Tag);
|
|
86
|
+
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
|
62
87
|
var CopyToClipboardButton__default = /*#__PURE__*/_interopDefaultLegacy(CopyToClipboardButton);
|
|
63
88
|
var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
|
|
64
89
|
var TableWrapper__default = /*#__PURE__*/_interopDefaultLegacy(TableWrapper);
|
|
90
|
+
var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table);
|
|
91
|
+
var NoData__default = /*#__PURE__*/_interopDefaultLegacy(NoData);
|
|
65
92
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
93
|
+
var Pane__default = /*#__PURE__*/_interopDefaultLegacy(Pane);
|
|
66
94
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
95
|
+
var Spinner__default = /*#__PURE__*/_interopDefaultLegacy(Spinner);
|
|
96
|
+
var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
|
|
97
|
+
var Label__default = /*#__PURE__*/_interopDefaultLegacy(Label);
|
|
98
|
+
var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
|
|
99
|
+
var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
100
|
+
var ActionBlock__default = /*#__PURE__*/_interopDefaultLegacy(ActionBlock);
|
|
67
101
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
102
|
+
var Radio__default = /*#__PURE__*/_interopDefaultLegacy(Radio);
|
|
103
|
+
var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
|
|
68
104
|
var MoreDropdown__default = /*#__PURE__*/_interopDefaultLegacy(MoreDropdown);
|
|
105
|
+
var QRCodeImage__default = /*#__PURE__*/_interopDefaultLegacy(QRCodeImage);
|
|
69
106
|
|
|
70
107
|
function _arrayWithHoles(arr) {
|
|
71
108
|
if (Array.isArray(arr)) return arr;
|
|
@@ -122,53 +159,6 @@ function _slicedToArray(arr, i) {
|
|
|
122
159
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
123
160
|
}
|
|
124
161
|
|
|
125
|
-
var queryClient = new reactQuery.QueryClient({
|
|
126
|
-
queryCache: new reactQuery.QueryCache(),
|
|
127
|
-
defaultOptions: {
|
|
128
|
-
queries: {
|
|
129
|
-
staleTime: constants.DEFAULT_STALE_TIME,
|
|
130
|
-
keepPreviousData: true,
|
|
131
|
-
onError: function onError(error) {
|
|
132
|
-
return neetoui.Toastr.error(error);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
var withReactQuery = function withReactQuery(Component) {
|
|
139
|
-
var QueryWrapper = function QueryWrapper(props) {
|
|
140
|
-
return /*#__PURE__*/React__default["default"].createElement(reactQuery.QueryClientProvider, {
|
|
141
|
-
client: queryClient
|
|
142
|
-
}, /*#__PURE__*/React__default["default"].createElement(Component, props), /*#__PURE__*/React__default["default"].createElement(devtools.ReactQueryDevtools, {
|
|
143
|
-
initialIsOpen: false,
|
|
144
|
-
position: "bottom-right"
|
|
145
|
-
}));
|
|
146
|
-
};
|
|
147
|
-
return QueryWrapper;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
var TAB$5 = {
|
|
151
|
-
all: "all",
|
|
152
|
-
connected: "connected",
|
|
153
|
-
disconnected: "disconnected",
|
|
154
|
-
incomplete: "incomplete"
|
|
155
|
-
};
|
|
156
|
-
var TABS$5 = Object.values(TAB$5);
|
|
157
|
-
var SEARCH_PROPS$1 = {
|
|
158
|
-
key: "keyword",
|
|
159
|
-
node: "identifier,user.first_name,last_name,email",
|
|
160
|
-
model: "NeetoPaymentsEngine::Stripe::Account,User"
|
|
161
|
-
};
|
|
162
|
-
var DASHBOARD_MANDATORY_COLUMNS$2 = ["id", "status", "identifier"];
|
|
163
|
-
var FILTER_COLUMNS$3 = [{
|
|
164
|
-
key: "created_at",
|
|
165
|
-
label: i18next.t("neetoPayments.common.createdAt"),
|
|
166
|
-
node: "created_at",
|
|
167
|
-
type: "date",
|
|
168
|
-
showRuleSelector: true
|
|
169
|
-
}];
|
|
170
|
-
var STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY = "stripeAccountsDashboard";
|
|
171
|
-
|
|
172
162
|
function _typeof$1(o) {
|
|
173
163
|
"@babel/helpers - typeof";
|
|
174
164
|
|
|
@@ -210,6 +200,56 @@ function _defineProperty(obj, key, value) {
|
|
|
210
200
|
return obj;
|
|
211
201
|
}
|
|
212
202
|
|
|
203
|
+
var queryClient = new reactQuery.QueryClient({
|
|
204
|
+
queryCache: new reactQuery.QueryCache(),
|
|
205
|
+
defaultOptions: {
|
|
206
|
+
queries: {
|
|
207
|
+
staleTime: constants.DEFAULT_STALE_TIME,
|
|
208
|
+
keepPreviousData: true,
|
|
209
|
+
onError: function onError(error) {
|
|
210
|
+
return Toastr__default["default"].error(error);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
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; }
|
|
217
|
+
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; }
|
|
218
|
+
var withReactQuery = function withReactQuery(Component) {
|
|
219
|
+
var QueryWrapper = function QueryWrapper(props) {
|
|
220
|
+
return /*#__PURE__*/jsxRuntime.jsxs(reactQuery.QueryClientProvider, {
|
|
221
|
+
client: queryClient,
|
|
222
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread$l({}, props)), /*#__PURE__*/jsxRuntime.jsx(devtools.ReactQueryDevtools, {
|
|
223
|
+
initialIsOpen: false,
|
|
224
|
+
position: "bottom-right"
|
|
225
|
+
})]
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
return QueryWrapper;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
var TAB$5 = {
|
|
232
|
+
all: "all",
|
|
233
|
+
connected: "connected",
|
|
234
|
+
disconnected: "disconnected",
|
|
235
|
+
incomplete: "incomplete"
|
|
236
|
+
};
|
|
237
|
+
var TABS$5 = Object.values(TAB$5);
|
|
238
|
+
var SEARCH_PROPS$1 = {
|
|
239
|
+
key: "keyword",
|
|
240
|
+
node: "identifier,user.first_name,last_name,email",
|
|
241
|
+
model: "NeetoPaymentsEngine::Stripe::Account,User"
|
|
242
|
+
};
|
|
243
|
+
var DASHBOARD_MANDATORY_COLUMNS$2 = ["id", "status", "identifier"];
|
|
244
|
+
var FILTER_COLUMNS$3 = [{
|
|
245
|
+
key: "created_at",
|
|
246
|
+
label: i18next.t("neetoPayments.common.createdAt"),
|
|
247
|
+
node: "created_at",
|
|
248
|
+
type: "date",
|
|
249
|
+
showRuleSelector: true
|
|
250
|
+
}];
|
|
251
|
+
var STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY = "stripeAccountsDashboard";
|
|
252
|
+
|
|
213
253
|
var BASE_URL = "payments";
|
|
214
254
|
var STRIPE_DASHBOARD_LINK = "https://dashboard.stripe.com/";
|
|
215
255
|
var CURRENCY_OPTIONS = [{
|
|
@@ -734,8 +774,8 @@ var buildStripePayoutLink = function buildStripePayoutLink(identifier) {
|
|
|
734
774
|
return "".concat(STRIPE_DASHBOARD_LINK).concat(isLive ? "" : "test/", "payouts/").concat(identifier);
|
|
735
775
|
};
|
|
736
776
|
|
|
737
|
-
function ownKeys$
|
|
738
|
-
function _objectSpread$
|
|
777
|
+
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; }
|
|
778
|
+
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; }
|
|
739
779
|
var ExportModal$2 = function ExportModal(_ref) {
|
|
740
780
|
var showExportModal = _ref.showExportModal,
|
|
741
781
|
setShowExportModal = _ref.setShowExportModal,
|
|
@@ -761,13 +801,12 @@ var ExportModal$2 = function ExportModal(_ref) {
|
|
|
761
801
|
return "account-report-".concat(uuidV4());
|
|
762
802
|
}, []);
|
|
763
803
|
var receivedCallback = function receivedCallback(data) {
|
|
764
|
-
if (data.download_url)
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}
|
|
804
|
+
if (!data.download_url) return;
|
|
805
|
+
setDownloadUrl(data.download_url);
|
|
806
|
+
setIsGenerating(false);
|
|
768
807
|
};
|
|
769
808
|
var handleGenerateClick = function handleGenerateClick() {
|
|
770
|
-
var payload = _objectSpread$
|
|
809
|
+
var payload = _objectSpread$k({
|
|
771
810
|
kind: "account",
|
|
772
811
|
token: token,
|
|
773
812
|
filters: filters,
|
|
@@ -794,33 +833,44 @@ var ExportModal$2 = function ExportModal(_ref) {
|
|
|
794
833
|
var onClose = function onClose() {
|
|
795
834
|
return setShowExportModal(false);
|
|
796
835
|
};
|
|
797
|
-
return /*#__PURE__*/
|
|
836
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Modal__default["default"], {
|
|
798
837
|
onClose: onClose,
|
|
799
|
-
isOpen: showExportModal
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
838
|
+
isOpen: showExportModal,
|
|
839
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Header, {
|
|
840
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
841
|
+
style: "h2",
|
|
842
|
+
children: t("neetoPayments.export.title.account")
|
|
843
|
+
})
|
|
844
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Body, {
|
|
845
|
+
children: isFileLoading ? /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
846
|
+
style: "body2",
|
|
847
|
+
children: t("neetoPayments.export.pleaseWait")
|
|
848
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
849
|
+
style: "body2",
|
|
850
|
+
children: downloadUrl ? t("neetoPayments.export.fileReady") : t("neetoPayments.export.download.account")
|
|
851
|
+
})
|
|
852
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Footer, {
|
|
853
|
+
className: "space-x-2",
|
|
854
|
+
children: downloadUrl ? /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
855
|
+
href: downloadUrl,
|
|
856
|
+
icon: neetoIcons.Download,
|
|
857
|
+
label: t("neetoPayments.common.download"),
|
|
858
|
+
onClick: onClose
|
|
859
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
860
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
861
|
+
disabled: isFileLoading,
|
|
862
|
+
label: t("neetoPayments.common.cancel"),
|
|
863
|
+
style: "tertiary",
|
|
864
|
+
onClick: onClose
|
|
865
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
866
|
+
disabled: isFileLoading,
|
|
867
|
+
label: t("neetoPayments.common.export"),
|
|
868
|
+
loading: isFileLoading,
|
|
869
|
+
onClick: handleGenerateClick
|
|
870
|
+
})]
|
|
871
|
+
})
|
|
872
|
+
})]
|
|
873
|
+
});
|
|
824
874
|
};
|
|
825
875
|
|
|
826
876
|
function _arrayWithoutHoles(arr) {
|
|
@@ -839,8 +889,8 @@ function _toConsumableArray(arr) {
|
|
|
839
889
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
840
890
|
}
|
|
841
891
|
|
|
842
|
-
function ownKeys$
|
|
843
|
-
function _objectSpread$
|
|
892
|
+
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; }
|
|
893
|
+
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; }
|
|
844
894
|
var processSortProperties = function processSortProperties(sortProperties) {
|
|
845
895
|
if (sortProperties.sortBy === "payment_amount") {
|
|
846
896
|
return ramda.assoc("sortBy", "neeto_payments_engine_stripe_transactions.amount", sortProperties);
|
|
@@ -855,7 +905,7 @@ var processSortProperties = function processSortProperties(sortProperties) {
|
|
|
855
905
|
};
|
|
856
906
|
var buildDefaultPageProperties = function buildDefaultPageProperties(tabs) {
|
|
857
907
|
return tabs.reduce(function (pageProperties, tab) {
|
|
858
|
-
return _objectSpread$
|
|
908
|
+
return _objectSpread$j(_objectSpread$j({}, pageProperties), {}, _defineProperty({}, tab, DEFAULT_PAGE_VALUES));
|
|
859
909
|
}, {});
|
|
860
910
|
};
|
|
861
911
|
var buildPayload = function buildPayload(_ref) {
|
|
@@ -867,7 +917,7 @@ var buildPayload = function buildPayload(_ref) {
|
|
|
867
917
|
sortProperties = _ref$sortProperties === void 0 ? {} : _ref$sortProperties,
|
|
868
918
|
_ref$payoutId = _ref.payoutId,
|
|
869
919
|
payoutId = _ref$payoutId === void 0 ? null : _ref$payoutId;
|
|
870
|
-
return _objectSpread$
|
|
920
|
+
return _objectSpread$j({
|
|
871
921
|
tab: neetoCist.camelToSnakeCase(tab),
|
|
872
922
|
payoutId: payoutId,
|
|
873
923
|
page: (_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.page,
|
|
@@ -883,7 +933,7 @@ var buildRowData$1 = function buildRowData(_ref2) {
|
|
|
883
933
|
tab = _ref2$tab === void 0 ? "all" : _ref2$tab;
|
|
884
934
|
return data.map(function (element, index) {
|
|
885
935
|
var _pageProperties$tab3, _pageProperties$tab4;
|
|
886
|
-
return _objectSpread$
|
|
936
|
+
return _objectSpread$j(_objectSpread$j({}, element), {}, {
|
|
887
937
|
payable: element.payable,
|
|
888
938
|
identifier: element,
|
|
889
939
|
id: ramda.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
|
|
@@ -894,15 +944,17 @@ var buildRowData$1 = function buildRowData(_ref2) {
|
|
|
894
944
|
var CopyButtonWrapper = function CopyButtonWrapper(_ref) {
|
|
895
945
|
var content = _ref.content,
|
|
896
946
|
children = _ref.children;
|
|
897
|
-
return /*#__PURE__*/
|
|
898
|
-
className: "flex items-center space-x-2"
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
947
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
948
|
+
className: "flex items-center space-x-2",
|
|
949
|
+
children: [children, neetoCist.isPresent(content) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
950
|
+
className: "identifier-copy-button invisible",
|
|
951
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton__default["default"], {
|
|
952
|
+
size: "small",
|
|
953
|
+
style: "text",
|
|
954
|
+
value: content
|
|
955
|
+
})
|
|
956
|
+
})]
|
|
957
|
+
});
|
|
906
958
|
};
|
|
907
959
|
|
|
908
960
|
var getTagStyle = function getTagStyle(status) {
|
|
@@ -920,15 +972,17 @@ var preProcessStatus = function preProcessStatus(type, status) {
|
|
|
920
972
|
};
|
|
921
973
|
var renderStatus = ramda.curry(function (type, status, record) {
|
|
922
974
|
var processedStatus = preProcessStatus(type, status, record);
|
|
923
|
-
return /*#__PURE__*/
|
|
975
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], {
|
|
924
976
|
content: i18next.t("neetoPayments.tooltipContent.".concat(type, ".").concat(processedStatus)),
|
|
925
|
-
position: "top"
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
977
|
+
position: "top",
|
|
978
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
979
|
+
className: "w-fit",
|
|
980
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Tag__default["default"], {
|
|
981
|
+
label: i18next.t("neetoPayments.tagLabels.".concat(type, ".").concat(processedStatus)),
|
|
982
|
+
style: getTagStyle(processedStatus)
|
|
983
|
+
})
|
|
984
|
+
})
|
|
985
|
+
});
|
|
932
986
|
});
|
|
933
987
|
var renderFullName = function renderFullName(_, _ref) {
|
|
934
988
|
var firstName = _ref.firstName,
|
|
@@ -936,16 +990,17 @@ var renderFullName = function renderFullName(_, _ref) {
|
|
|
936
990
|
return "".concat(firstName, " ").concat(lastName);
|
|
937
991
|
};
|
|
938
992
|
var renderEmail = function renderEmail(email) {
|
|
939
|
-
return /*#__PURE__*/
|
|
940
|
-
content: email
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
993
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
994
|
+
content: email,
|
|
995
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
996
|
+
href: "mailto:".concat(email),
|
|
997
|
+
label: email,
|
|
998
|
+
style: "link"
|
|
999
|
+
})
|
|
1000
|
+
});
|
|
946
1001
|
};
|
|
947
1002
|
var renderDate = function renderDate(date) {
|
|
948
|
-
return /*#__PURE__*/
|
|
1003
|
+
return /*#__PURE__*/jsxRuntime.jsx(DateFormat__default["default"].DateTime, {
|
|
949
1004
|
date: date
|
|
950
1005
|
});
|
|
951
1006
|
};
|
|
@@ -953,7 +1008,7 @@ var renderDate = function renderDate(date) {
|
|
|
953
1008
|
var IdentifierButton = function IdentifierButton(_ref) {
|
|
954
1009
|
var href = _ref.href,
|
|
955
1010
|
label = _ref.label;
|
|
956
|
-
return /*#__PURE__*/
|
|
1011
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
957
1012
|
href: href,
|
|
958
1013
|
label: label,
|
|
959
1014
|
size: "small",
|
|
@@ -969,12 +1024,13 @@ var renderIdentifier$3 = function renderIdentifier() {
|
|
|
969
1024
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
970
1025
|
_ref$live = _ref.live,
|
|
971
1026
|
isLive = _ref$live === void 0 ? false : _ref$live;
|
|
972
|
-
return /*#__PURE__*/
|
|
973
|
-
content: identifier
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1027
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
1028
|
+
content: identifier,
|
|
1029
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IdentifierButton$1, {
|
|
1030
|
+
href: buildStripeAccountLink(identifier, isLive),
|
|
1031
|
+
label: identifier
|
|
1032
|
+
})
|
|
1033
|
+
});
|
|
978
1034
|
};
|
|
979
1035
|
var renderCountry = ramda.pipe(ramda.split("_"), ramda.map(neetoCist.capitalize), ramda.join(" "));
|
|
980
1036
|
|
|
@@ -1029,8 +1085,8 @@ var COLUMNS$5 = [{
|
|
|
1029
1085
|
sorter: true
|
|
1030
1086
|
}];
|
|
1031
1087
|
|
|
1032
|
-
function ownKeys$
|
|
1033
|
-
function _objectSpread$
|
|
1088
|
+
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; }
|
|
1089
|
+
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; }
|
|
1034
1090
|
var useFiltersAndPagination$3 = function useFiltersAndPagination() {
|
|
1035
1091
|
var history = reactRouterDom.useHistory();
|
|
1036
1092
|
var _useState = React.useState(false),
|
|
@@ -1055,7 +1111,7 @@ var useFiltersAndPagination$3 = function useFiltersAndPagination() {
|
|
|
1055
1111
|
var _getQueryParams = utils$3.getQueryParams(),
|
|
1056
1112
|
_getQueryParams$searc = _getQueryParams.searchTerm,
|
|
1057
1113
|
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
1058
|
-
var searchKeywordProps = _objectSpread$
|
|
1114
|
+
var searchKeywordProps = _objectSpread$i(_objectSpread$i({}, SEARCH_PROPS$1), {}, {
|
|
1059
1115
|
key: "search_term",
|
|
1060
1116
|
value: searchTerm.trim()
|
|
1061
1117
|
});
|
|
@@ -1202,46 +1258,48 @@ var List$6 = function List(_ref) {
|
|
|
1202
1258
|
} : DEFAULT_SORT_PROPERTIES$1);
|
|
1203
1259
|
};
|
|
1204
1260
|
if (isLoading) {
|
|
1205
|
-
return /*#__PURE__*/
|
|
1261
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
1206
1262
|
}
|
|
1207
1263
|
if (dataSize <= 0 || !neetoCist.isPresent(accounts)) {
|
|
1208
|
-
return /*#__PURE__*/
|
|
1209
|
-
className: "flex h-full w-full items-center justify-center"
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1264
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1265
|
+
className: "flex h-full w-full items-center justify-center",
|
|
1266
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], {
|
|
1267
|
+
title: tab === TAB$5.all ? t("neetoPayments.emptyState.account") : t("neetoPayments.emptyState.accountWithStatus", {
|
|
1268
|
+
status: tab
|
|
1269
|
+
})
|
|
1213
1270
|
})
|
|
1214
|
-
})
|
|
1271
|
+
});
|
|
1215
1272
|
}
|
|
1216
|
-
return /*#__PURE__*/
|
|
1217
|
-
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1273
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
|
|
1274
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
1275
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
1276
|
+
fixedHeight: true,
|
|
1277
|
+
allowRowClick: false,
|
|
1278
|
+
columnData: getVisibleColumnData(columnData),
|
|
1279
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
1280
|
+
handlePageChange: handleTablePagination,
|
|
1281
|
+
loading: isFetching,
|
|
1282
|
+
rowData: buildRowData$1({
|
|
1283
|
+
data: accounts,
|
|
1284
|
+
pageProperties: pageProperties,
|
|
1285
|
+
tab: tab
|
|
1286
|
+
}),
|
|
1287
|
+
rowSelection: false,
|
|
1288
|
+
sortDirections: SORT_DIRECTIONS,
|
|
1289
|
+
totalCount: dataSize,
|
|
1290
|
+
paginationProps: {
|
|
1291
|
+
showSizeChanger: true,
|
|
1292
|
+
hideOnSinglePage: true,
|
|
1293
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
1294
|
+
total: dataSize
|
|
1295
|
+
},
|
|
1296
|
+
onChange: handleTableChange,
|
|
1297
|
+
onColumnHide: function onColumnHide(_ref2) {
|
|
1298
|
+
var dataIndex = _ref2.dataIndex;
|
|
1299
|
+
return hideColumn(dataIndex);
|
|
1300
|
+
}
|
|
1301
|
+
})
|
|
1302
|
+
});
|
|
1245
1303
|
};
|
|
1246
1304
|
|
|
1247
1305
|
var AccountsDashboard = function AccountsDashboard() {
|
|
@@ -1278,90 +1336,82 @@ var AccountsDashboard = function AccountsDashboard() {
|
|
|
1278
1336
|
setFilters(filters);
|
|
1279
1337
|
});
|
|
1280
1338
|
};
|
|
1281
|
-
return /*#__PURE__*/
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
}), isTabsVisible && /*#__PURE__*/React__default["default"].createElement(neetoui.Tab, null, TABS$5.map(function (item) {
|
|
1288
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tab.Item, {
|
|
1289
|
-
active: tab === item,
|
|
1290
|
-
key: item,
|
|
1291
|
-
onClick: function onClick() {
|
|
1292
|
-
return handleTabChange(item);
|
|
1293
|
-
}
|
|
1294
|
-
}, t("neetoPayments.common.".concat(item)));
|
|
1295
|
-
})), /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"], {
|
|
1296
|
-
className: "mt-4",
|
|
1297
|
-
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1298
|
-
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
1299
|
-
component: "h4"
|
|
1300
|
-
}, tab === TAB$5.all ? t("neetoPayments.countOf.account", {
|
|
1301
|
-
count: dataSize
|
|
1302
|
-
}) : t("neetoPayments.countOf.accountWithStatus", {
|
|
1303
|
-
count: dataSize,
|
|
1304
|
-
status: tab
|
|
1305
|
-
})),
|
|
1306
|
-
rightActionBlock: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoFiltersFrontend.Bar, {
|
|
1307
|
-
columns: FILTER_COLUMNS$3,
|
|
1308
|
-
keyword: searchKeywordProps,
|
|
1309
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
1310
|
-
onChange: handleFiltersChange
|
|
1311
|
-
}), isFilterButtonVisible && /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"].RightBlock, {
|
|
1312
|
-
columnsButtonProps: {
|
|
1313
|
-
columnData: columnData,
|
|
1314
|
-
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$2,
|
|
1315
|
-
localStorageKey: STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY
|
|
1316
|
-
},
|
|
1317
|
-
downloadButtonProps: {
|
|
1318
|
-
onClick: function onClick() {
|
|
1319
|
-
return setShowExportModal(true);
|
|
1320
|
-
}
|
|
1321
|
-
},
|
|
1322
|
-
filterProps: {
|
|
1323
|
-
columns: FILTER_COLUMNS$3,
|
|
1324
|
-
isOpen: isFilterPaneOpen,
|
|
1325
|
-
keyword: searchKeywordProps,
|
|
1326
|
-
setIsOpen: setIsFilterPaneOpen,
|
|
1327
|
-
onChange: handleFiltersChange
|
|
1339
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1340
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header__default["default"], {
|
|
1341
|
+
title: t("neetoPayments.title.account"),
|
|
1342
|
+
searchProps: isFilterButtonVisible && {
|
|
1343
|
+
placeholder: t("neetoPayments.common.search"),
|
|
1344
|
+
className: "w-80"
|
|
1328
1345
|
}
|
|
1329
|
-
})
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1346
|
+
}), isTabsVisible && /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"], {
|
|
1347
|
+
children: TABS$5.map(function (item) {
|
|
1348
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"].Item, {
|
|
1349
|
+
active: tab === item,
|
|
1350
|
+
onClick: function onClick() {
|
|
1351
|
+
return handleTabChange(item);
|
|
1352
|
+
},
|
|
1353
|
+
children: t("neetoPayments.common.".concat(item))
|
|
1354
|
+
}, item);
|
|
1355
|
+
})
|
|
1356
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
1357
|
+
className: "mt-4",
|
|
1358
|
+
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1359
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
1360
|
+
component: "h4",
|
|
1361
|
+
children: tab === TAB$5.all ? t("neetoPayments.countOf.account", {
|
|
1362
|
+
count: dataSize
|
|
1363
|
+
}) : t("neetoPayments.countOf.accountWithStatus", {
|
|
1364
|
+
count: dataSize,
|
|
1365
|
+
status: tab
|
|
1366
|
+
})
|
|
1367
|
+
}),
|
|
1368
|
+
rightActionBlock: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1369
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoFiltersFrontend.Bar, {
|
|
1370
|
+
columns: FILTER_COLUMNS$3,
|
|
1371
|
+
keyword: searchKeywordProps,
|
|
1372
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
1373
|
+
onChange: handleFiltersChange
|
|
1374
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"].RightBlock, {
|
|
1375
|
+
columnsButtonProps: {
|
|
1376
|
+
columnData: columnData,
|
|
1377
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$2,
|
|
1378
|
+
localStorageKey: STRIPE_ACCOUNTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY
|
|
1379
|
+
},
|
|
1380
|
+
downloadButtonProps: {
|
|
1381
|
+
onClick: function onClick() {
|
|
1382
|
+
return setShowExportModal(true);
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
filterProps: {
|
|
1386
|
+
columns: FILTER_COLUMNS$3,
|
|
1387
|
+
isOpen: isFilterPaneOpen,
|
|
1388
|
+
keyword: searchKeywordProps,
|
|
1389
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
1390
|
+
onChange: handleFiltersChange
|
|
1391
|
+
}
|
|
1392
|
+
})]
|
|
1393
|
+
})
|
|
1394
|
+
}), /*#__PURE__*/jsxRuntime.jsx(List$6, {
|
|
1395
|
+
columnData: columnData,
|
|
1396
|
+
filters: filters,
|
|
1397
|
+
pageProperties: pageProperties,
|
|
1398
|
+
setDataSize: setDataSize,
|
|
1399
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
1400
|
+
setPageProperties: setPageProperties,
|
|
1401
|
+
setSortProperties: setSortProperties,
|
|
1402
|
+
sortProperties: sortProperties,
|
|
1403
|
+
tab: tab
|
|
1404
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ExportModal$2, {
|
|
1405
|
+
filters: filters,
|
|
1406
|
+
setShowExportModal: setShowExportModal,
|
|
1407
|
+
showExportModal: showExportModal,
|
|
1408
|
+
sortProperties: sortProperties,
|
|
1409
|
+
tab: tab
|
|
1410
|
+
})]
|
|
1411
|
+
});
|
|
1347
1412
|
};
|
|
1348
1413
|
var index$4 = reactUtils.withTitle(withReactQuery(AccountsDashboard), i18next.t("neetoPayments.title.account"));
|
|
1349
1414
|
|
|
1350
|
-
function _extends$1() {
|
|
1351
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1352
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1353
|
-
var source = arguments[i];
|
|
1354
|
-
for (var key in source) {
|
|
1355
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1356
|
-
target[key] = source[key];
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
return target;
|
|
1361
|
-
};
|
|
1362
|
-
return _extends$1.apply(this, arguments);
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
1415
|
var TAB$4 = {
|
|
1366
1416
|
all: "all",
|
|
1367
1417
|
successful: "successful",
|
|
@@ -1459,40 +1509,47 @@ var renderIdentifier$2 = function renderIdentifier() {
|
|
|
1459
1509
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
1460
1510
|
_ref$live = _ref.live,
|
|
1461
1511
|
isLive = _ref$live === void 0 ? false : _ref$live;
|
|
1462
|
-
return /*#__PURE__*/
|
|
1463
|
-
content: identifier
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1512
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
1513
|
+
content: identifier,
|
|
1514
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IdentifierButton$1, {
|
|
1515
|
+
href: buildStripeTransactionLink(identifier, isLive),
|
|
1516
|
+
label: identifier
|
|
1517
|
+
})
|
|
1518
|
+
});
|
|
1468
1519
|
};
|
|
1469
1520
|
ramda.curry(function (type, kind) {
|
|
1470
|
-
return /*#__PURE__*/
|
|
1521
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], {
|
|
1471
1522
|
content: i18next.t("neetoPayments.tooltipContent.".concat(type, ".").concat(kind)),
|
|
1472
|
-
position: "top"
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1523
|
+
position: "top",
|
|
1524
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1525
|
+
className: "w-fit",
|
|
1526
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Tag__default["default"], {
|
|
1527
|
+
label: i18next.t("neetoPayments.tagLabels.".concat(type, ".").concat(kind)),
|
|
1528
|
+
style: "secondary"
|
|
1529
|
+
})
|
|
1530
|
+
})
|
|
1531
|
+
});
|
|
1479
1532
|
});
|
|
1480
1533
|
var renderSplitIdentifier = function renderSplitIdentifier(_ref2) {
|
|
1481
1534
|
var identifier = _ref2.identifier,
|
|
1482
1535
|
isLive = _ref2.live;
|
|
1483
|
-
return identifier ? /*#__PURE__*/
|
|
1484
|
-
content: identifier
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1536
|
+
return identifier ? /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
1537
|
+
content: identifier,
|
|
1538
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IdentifierButton$1, {
|
|
1539
|
+
href: buildStripeSplitLink(identifier, isLive),
|
|
1540
|
+
label: identifier
|
|
1541
|
+
})
|
|
1542
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], {
|
|
1489
1543
|
content: i18next.t("neetoPayments.tooltipContent.identifierUnavailable"),
|
|
1490
|
-
position: "top"
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1544
|
+
position: "top",
|
|
1545
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1546
|
+
className: "text-center",
|
|
1547
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1548
|
+
style: "body2",
|
|
1549
|
+
children: i18next.t("neetoPayments.common.notAvailable")
|
|
1550
|
+
})
|
|
1551
|
+
})
|
|
1552
|
+
});
|
|
1496
1553
|
};
|
|
1497
1554
|
var renderTransferIdentifier = function renderTransferIdentifier() {
|
|
1498
1555
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -1502,56 +1559,65 @@ var renderTransferIdentifier = function renderTransferIdentifier() {
|
|
|
1502
1559
|
account = _ref3$account === void 0 ? {} : _ref3$account,
|
|
1503
1560
|
_ref3$live = _ref3.live,
|
|
1504
1561
|
isLive = _ref3$live === void 0 ? false : _ref3$live;
|
|
1505
|
-
return identifier ? /*#__PURE__*/
|
|
1506
|
-
content: identifier
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1562
|
+
return identifier ? /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
1563
|
+
content: identifier,
|
|
1564
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IdentifierButton$1, {
|
|
1565
|
+
label: identifier,
|
|
1566
|
+
href: identifier.startsWith("py") ? buildStripeTransferLink(identifier, account === null || account === void 0 ? void 0 : account.identifier, isLive) : buildStripeTransactionLink(identifier, isLive)
|
|
1567
|
+
})
|
|
1568
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1569
|
+
className: "text-center",
|
|
1570
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], {
|
|
1571
|
+
position: "top",
|
|
1572
|
+
content: i18next.t("neetoPayments.tooltipContent.connectedTransactionUnavailable"),
|
|
1573
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1574
|
+
style: "body2",
|
|
1575
|
+
children: i18next.t("neetoPayments.common.notAvailable")
|
|
1576
|
+
})
|
|
1577
|
+
})
|
|
1578
|
+
});
|
|
1518
1579
|
};
|
|
1519
1580
|
var renderPlatformIdentifier = ramda.curry(function (setPaneStatus, data) {
|
|
1520
|
-
return /*#__PURE__*/
|
|
1521
|
-
content: data === null || data === void 0 ? void 0 : data.identifier
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1581
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
1582
|
+
content: data === null || data === void 0 ? void 0 : data.identifier,
|
|
1583
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
1584
|
+
label: data === null || data === void 0 ? void 0 : data.identifier,
|
|
1585
|
+
size: "small",
|
|
1586
|
+
style: "link",
|
|
1587
|
+
onClick: function onClick() {
|
|
1588
|
+
return setPaneStatus({
|
|
1589
|
+
transactionId: data === null || data === void 0 ? void 0 : data.id,
|
|
1590
|
+
isOpen: true
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1593
|
+
})
|
|
1594
|
+
});
|
|
1533
1595
|
});
|
|
1534
1596
|
var renderAccountIdentifier = function renderAccountIdentifier(_ref4) {
|
|
1535
1597
|
var _ref4$identifier = _ref4.identifier,
|
|
1536
1598
|
identifier = _ref4$identifier === void 0 ? "" : _ref4$identifier,
|
|
1537
1599
|
_ref4$live = _ref4.live,
|
|
1538
1600
|
isLive = _ref4$live === void 0 ? false : _ref4$live;
|
|
1539
|
-
return /*#__PURE__*/
|
|
1540
|
-
content: identifier
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1601
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
1602
|
+
content: identifier,
|
|
1603
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IdentifierButton$1, {
|
|
1604
|
+
href: buildStripeAccountLink(identifier, isLive),
|
|
1605
|
+
label: identifier
|
|
1606
|
+
})
|
|
1607
|
+
});
|
|
1545
1608
|
};
|
|
1546
1609
|
var renderSplitDate = function renderSplitDate(date) {
|
|
1547
|
-
return neetoCist.isPresent(date) ? renderDate(date) : /*#__PURE__*/
|
|
1610
|
+
return neetoCist.isPresent(date) ? renderDate(date) : /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], {
|
|
1548
1611
|
content: i18next.t("neetoPayments.tooltipContent.dateUnavailable"),
|
|
1549
|
-
position: "top"
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1612
|
+
position: "top",
|
|
1613
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1614
|
+
className: "text-center",
|
|
1615
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1616
|
+
style: "body2",
|
|
1617
|
+
children: i18next.t("neetoPayments.common.notAvailable")
|
|
1618
|
+
})
|
|
1619
|
+
})
|
|
1620
|
+
});
|
|
1555
1621
|
};
|
|
1556
1622
|
var renderRefundIdentifier = function renderRefundIdentifier() {
|
|
1557
1623
|
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -1559,12 +1625,13 @@ var renderRefundIdentifier = function renderRefundIdentifier() {
|
|
|
1559
1625
|
identifier = _ref5$identifier === void 0 ? "" : _ref5$identifier,
|
|
1560
1626
|
_ref5$live = _ref5.live,
|
|
1561
1627
|
isLive = _ref5$live === void 0 ? false : _ref5$live;
|
|
1562
|
-
return /*#__PURE__*/
|
|
1563
|
-
content: identifier
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1628
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
1629
|
+
content: identifier,
|
|
1630
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IdentifierButton$1, {
|
|
1631
|
+
href: buildStripeRefundLink(identifier, isLive),
|
|
1632
|
+
label: identifier
|
|
1633
|
+
})
|
|
1634
|
+
});
|
|
1568
1635
|
};
|
|
1569
1636
|
|
|
1570
1637
|
var generateSpecialColumns = function generateSpecialColumns(_ref) {
|
|
@@ -1978,8 +2045,8 @@ var modifySearchProps = function modifySearchProps(_ref5) {
|
|
|
1978
2045
|
}, searchProps);
|
|
1979
2046
|
};
|
|
1980
2047
|
|
|
1981
|
-
function ownKeys$
|
|
1982
|
-
function _objectSpread$
|
|
2048
|
+
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; }
|
|
2049
|
+
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; }
|
|
1983
2050
|
var ExportModal$1 = function ExportModal(_ref) {
|
|
1984
2051
|
var showExportModal = _ref.showExportModal,
|
|
1985
2052
|
setShowExportModal = _ref.setShowExportModal,
|
|
@@ -2015,7 +2082,7 @@ var ExportModal$1 = function ExportModal(_ref) {
|
|
|
2015
2082
|
setIsGenerating(false);
|
|
2016
2083
|
};
|
|
2017
2084
|
var handleGenerateClick = function handleGenerateClick() {
|
|
2018
|
-
var payload = _objectSpread$
|
|
2085
|
+
var payload = _objectSpread$h({
|
|
2019
2086
|
kind: isTransferKind(kind) ? "connected" : kind,
|
|
2020
2087
|
token: token,
|
|
2021
2088
|
filters: filters,
|
|
@@ -2051,37 +2118,48 @@ var ExportModal$1 = function ExportModal(_ref) {
|
|
|
2051
2118
|
var onClose = function onClose() {
|
|
2052
2119
|
return setShowExportModal(false);
|
|
2053
2120
|
};
|
|
2054
|
-
return /*#__PURE__*/
|
|
2121
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Modal__default["default"], {
|
|
2055
2122
|
onClose: onClose,
|
|
2056
|
-
isOpen: showExportModal
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2123
|
+
isOpen: showExportModal,
|
|
2124
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Header, {
|
|
2125
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
2126
|
+
style: "h2",
|
|
2127
|
+
children: t("neetoPayments.export.title.".concat(kind))
|
|
2128
|
+
})
|
|
2129
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Body, {
|
|
2130
|
+
children: isFileLoading ? /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
2131
|
+
style: "body2",
|
|
2132
|
+
children: t("neetoPayments.export.pleaseWait")
|
|
2133
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
2134
|
+
style: "body2",
|
|
2135
|
+
children: downloadUrl ? t("neetoPayments.export.fileReady") : t("neetoPayments.export.download.".concat(kind))
|
|
2136
|
+
})
|
|
2137
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Footer, {
|
|
2138
|
+
className: "space-x-2",
|
|
2139
|
+
children: downloadUrl ? /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
2140
|
+
href: downloadUrl,
|
|
2141
|
+
icon: neetoIcons.Download,
|
|
2142
|
+
label: t("neetoPayments.common.download"),
|
|
2143
|
+
onClick: onClose
|
|
2144
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2145
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
2146
|
+
disabled: isFileLoading,
|
|
2147
|
+
label: t("neetoPayments.common.cancel"),
|
|
2148
|
+
style: "tertiary",
|
|
2149
|
+
onClick: onClose
|
|
2150
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
2151
|
+
disabled: isFileLoading,
|
|
2152
|
+
label: t("neetoPayments.common.export"),
|
|
2153
|
+
loading: isFileLoading,
|
|
2154
|
+
onClick: handleGenerateClick
|
|
2155
|
+
})]
|
|
2156
|
+
})
|
|
2157
|
+
})]
|
|
2158
|
+
});
|
|
2081
2159
|
};
|
|
2082
2160
|
|
|
2083
|
-
function ownKeys$
|
|
2084
|
-
function _objectSpread$
|
|
2161
|
+
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; }
|
|
2162
|
+
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; }
|
|
2085
2163
|
var useFiltersAndPagination$2 = function useFiltersAndPagination(_ref) {
|
|
2086
2164
|
var payableEntityColumns = _ref.payableEntityColumns,
|
|
2087
2165
|
kind = _ref.kind,
|
|
@@ -2114,7 +2192,7 @@ var useFiltersAndPagination$2 = function useFiltersAndPagination(_ref) {
|
|
|
2114
2192
|
var _getQueryParams = utils$3.getQueryParams(),
|
|
2115
2193
|
_getQueryParams$searc = _getQueryParams.searchTerm,
|
|
2116
2194
|
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
2117
|
-
var searchKeywordProps = _objectSpread$
|
|
2195
|
+
var searchKeywordProps = _objectSpread$g(_objectSpread$g({}, modifySearchProps({
|
|
2118
2196
|
searchProps: searchProps,
|
|
2119
2197
|
kind: kind
|
|
2120
2198
|
})), {}, {
|
|
@@ -4291,8 +4369,8 @@ var transactionsApi$1 = {
|
|
|
4291
4369
|
list: list$8
|
|
4292
4370
|
};
|
|
4293
4371
|
|
|
4294
|
-
function ownKeys$
|
|
4295
|
-
function _objectSpread$
|
|
4372
|
+
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; }
|
|
4373
|
+
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; }
|
|
4296
4374
|
var useFetchConnectedStripeAccount = function useFetchConnectedStripeAccount(holdableId) {
|
|
4297
4375
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4298
4376
|
return reactQuery.useQuery([QUERY_KEYS.CONNECTED_ACCOUNT, holdableId], function () {
|
|
@@ -4333,7 +4411,7 @@ var usePollingStripeAccount = function usePollingStripeAccount(holdableId, _ref)
|
|
|
4333
4411
|
var usePollingStripeAccountCreationStatus = function usePollingStripeAccountCreationStatus(jobId, options) {
|
|
4334
4412
|
return reactQuery.useQuery([QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId], function () {
|
|
4335
4413
|
return accountsApi$3.creationStatus(jobId);
|
|
4336
|
-
}, _objectSpread$
|
|
4414
|
+
}, _objectSpread$f({}, options));
|
|
4337
4415
|
};
|
|
4338
4416
|
var useDestroyStripeAccount = function useDestroyStripeAccount(_ref2) {
|
|
4339
4417
|
var onSuccess = _ref2.onSuccess,
|
|
@@ -4512,21 +4590,23 @@ var SubTable = function SubTable(_ref) {
|
|
|
4512
4590
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
4513
4591
|
_ref$kind = _ref.kind,
|
|
4514
4592
|
kind = _ref$kind === void 0 ? "split" : _ref$kind;
|
|
4515
|
-
return /*#__PURE__*/
|
|
4516
|
-
className: className || "ml-12 max-w-3xl"
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4593
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4594
|
+
className: className || "ml-12 max-w-3xl",
|
|
4595
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
|
|
4596
|
+
hasPagination: false,
|
|
4597
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
4598
|
+
fixedHeight: true,
|
|
4599
|
+
columnData: isSplitKind(kind) ? SPLIT_COLUMNS : REFUND_COLUMNS,
|
|
4600
|
+
pagination: false,
|
|
4601
|
+
rowData: buildRowData$1({
|
|
4602
|
+
data: data
|
|
4603
|
+
}),
|
|
4604
|
+
scroll: {
|
|
4605
|
+
y: 300
|
|
4606
|
+
}
|
|
4607
|
+
})
|
|
4608
|
+
})
|
|
4609
|
+
});
|
|
4530
4610
|
};
|
|
4531
4611
|
|
|
4532
4612
|
var ExpandedRow = function ExpandedRow() {
|
|
@@ -4535,28 +4615,33 @@ var ExpandedRow = function ExpandedRow() {
|
|
|
4535
4615
|
splits = _ref$splits === void 0 ? [] : _ref$splits,
|
|
4536
4616
|
_ref$refunds = _ref.refunds,
|
|
4537
4617
|
refunds = _ref$refunds === void 0 ? [] : _ref$refunds;
|
|
4538
|
-
return /*#__PURE__*/
|
|
4539
|
-
className: "my-2 space-y-2"
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4618
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4619
|
+
className: "my-2 space-y-2",
|
|
4620
|
+
children: [!ramda.isEmpty(splits) && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4621
|
+
className: "space-y-4",
|
|
4622
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4623
|
+
className: "ml-12",
|
|
4624
|
+
style: "h3",
|
|
4625
|
+
children: i18next.t("neetoPayments.common.splits")
|
|
4626
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubTable, {
|
|
4627
|
+
data: splits
|
|
4628
|
+
})]
|
|
4629
|
+
}), !ramda.isEmpty(refunds) && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4630
|
+
className: "space-y-4",
|
|
4631
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4632
|
+
className: "ml-12",
|
|
4633
|
+
style: "h3",
|
|
4634
|
+
children: i18next.t("neetoPayments.title.refund")
|
|
4635
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubTable, {
|
|
4636
|
+
data: refunds,
|
|
4637
|
+
kind: "refund"
|
|
4638
|
+
})]
|
|
4639
|
+
})]
|
|
4640
|
+
});
|
|
4556
4641
|
};
|
|
4557
4642
|
|
|
4558
|
-
function ownKeys$
|
|
4559
|
-
function _objectSpread$
|
|
4643
|
+
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; }
|
|
4644
|
+
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; }
|
|
4560
4645
|
var useFetchData$2 = function useFetchData(_ref) {
|
|
4561
4646
|
var _data$kind, _data$kind2, _data$kind3, _data$kind4;
|
|
4562
4647
|
var kind = _ref.kind,
|
|
@@ -4564,7 +4649,7 @@ var useFetchData$2 = function useFetchData(_ref) {
|
|
|
4564
4649
|
payload = _ref.payload,
|
|
4565
4650
|
isPlatformEnabled = _ref.isPlatformEnabled;
|
|
4566
4651
|
var data = {};
|
|
4567
|
-
data.transfer = data.connected = useFetchStripeTransactions(holdableId, _objectSpread$
|
|
4652
|
+
data.transfer = data.connected = useFetchStripeTransactions(holdableId, _objectSpread$e(_objectSpread$e({}, payload), {}, {
|
|
4568
4653
|
kind: kind
|
|
4569
4654
|
}), {
|
|
4570
4655
|
enabled: isTransferKind(kind) || isConnectedKind(kind)
|
|
@@ -4591,12 +4676,12 @@ var RowExpander = function RowExpander(_ref) {
|
|
|
4591
4676
|
onExpand = _ref.onExpand,
|
|
4592
4677
|
record = _ref.record,
|
|
4593
4678
|
expandable = _ref.expandable;
|
|
4594
|
-
return expandable && (expanded ? /*#__PURE__*/
|
|
4679
|
+
return expandable && (expanded ? /*#__PURE__*/jsxRuntime.jsx(neetoIcons.Down, {
|
|
4595
4680
|
className: "cursor-pointer",
|
|
4596
4681
|
onClick: function onClick(e) {
|
|
4597
4682
|
return onExpand(record, e);
|
|
4598
4683
|
}
|
|
4599
|
-
}) : /*#__PURE__*/
|
|
4684
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(neetoIcons.Right, {
|
|
4600
4685
|
className: "cursor-pointer",
|
|
4601
4686
|
onClick: function onClick(e) {
|
|
4602
4687
|
return onExpand(record, e);
|
|
@@ -4634,6 +4719,8 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
4634
4719
|
}
|
|
4635
4720
|
|
|
4636
4721
|
var _excluded$2 = ["transactionId"];
|
|
4722
|
+
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; }
|
|
4723
|
+
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; }
|
|
4637
4724
|
var Details = function Details(_ref) {
|
|
4638
4725
|
var transactionId = _ref.transactionId,
|
|
4639
4726
|
paneProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
@@ -4651,57 +4738,82 @@ var Details = function Details(_ref) {
|
|
|
4651
4738
|
live = _useFetchStripePlatfo3.live,
|
|
4652
4739
|
_useFetchStripePlatfo4 = _useFetchStripePlatfo3.splits,
|
|
4653
4740
|
splits = _useFetchStripePlatfo4 === void 0 ? [] : _useFetchStripePlatfo4;
|
|
4654
|
-
return /*#__PURE__*/
|
|
4655
|
-
size: "large"
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4741
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], _objectSpread$d(_objectSpread$d({}, paneProps), {}, {
|
|
4742
|
+
size: "large",
|
|
4743
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane__default["default"].Header, {
|
|
4744
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4745
|
+
style: "h2",
|
|
4746
|
+
children: "Transaction Details"
|
|
4747
|
+
})
|
|
4748
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Pane__default["default"].Body, {
|
|
4749
|
+
children: isLoading ? /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4750
|
+
className: "w-full space-y-6 p-2",
|
|
4751
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4752
|
+
className: "w-full space-y-2",
|
|
4753
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4754
|
+
className: "flex items-center space-x-2",
|
|
4755
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4756
|
+
style: "body2",
|
|
4757
|
+
children: t("neetoPayments.transactionPane.transactionId")
|
|
4758
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4759
|
+
className: "neeto-ui-text-black font-medium",
|
|
4760
|
+
style: "body2",
|
|
4761
|
+
children: renderIdentifier$2({
|
|
4762
|
+
identifier: identifier,
|
|
4763
|
+
live: live
|
|
4764
|
+
})
|
|
4765
|
+
})]
|
|
4766
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4767
|
+
className: "flex items-center space-x-2",
|
|
4768
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4769
|
+
style: "body2",
|
|
4770
|
+
children: t("neetoPayments.transactionPane.amount")
|
|
4771
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4772
|
+
className: "neeto-ui-text-black font-medium",
|
|
4773
|
+
style: "body2",
|
|
4774
|
+
children: amount
|
|
4775
|
+
})]
|
|
4776
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4777
|
+
className: "flex items-center space-x-2",
|
|
4778
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4779
|
+
style: "body2",
|
|
4780
|
+
children: t("neetoPayments.transactionPane.netAmount")
|
|
4781
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4782
|
+
className: "neeto-ui-text-black font-medium",
|
|
4783
|
+
style: "body2",
|
|
4784
|
+
children: netAmount
|
|
4785
|
+
})]
|
|
4786
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4787
|
+
className: "flex items-center space-x-2",
|
|
4788
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4789
|
+
style: "body2",
|
|
4790
|
+
children: t("neetoPayments.transactionPane.status")
|
|
4791
|
+
}), renderStatus("transaction", status)]
|
|
4792
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4793
|
+
className: "flex items-center space-x-2",
|
|
4794
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4795
|
+
style: "body2",
|
|
4796
|
+
children: t("neetoPayments.transactionPane.paidOn")
|
|
4797
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4798
|
+
className: "neeto-ui-text-black font-medium",
|
|
4799
|
+
style: "body2",
|
|
4800
|
+
children: renderDate(paymentAt)
|
|
4801
|
+
})]
|
|
4802
|
+
})]
|
|
4803
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4804
|
+
style: "h3",
|
|
4805
|
+
children: "Splits"
|
|
4806
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubTable, {
|
|
4807
|
+
className: "ml-0 w-full",
|
|
4808
|
+
data: splits
|
|
4809
|
+
})]
|
|
4810
|
+
})
|
|
4811
|
+
})]
|
|
4812
|
+
}));
|
|
4703
4813
|
};
|
|
4704
4814
|
|
|
4815
|
+
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; }
|
|
4816
|
+
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; }
|
|
4705
4817
|
var List$5 = function List(_ref) {
|
|
4706
4818
|
var _pageProperties$tab, _pageProperties$tab2, _pageProperties$tab3;
|
|
4707
4819
|
var _ref$isPlatformEnable = _ref.isPlatformEnabled,
|
|
@@ -4785,64 +4897,70 @@ var List$5 = function List(_ref) {
|
|
|
4785
4897
|
} : DEFAULT_SORT_PROPERTIES$1);
|
|
4786
4898
|
};
|
|
4787
4899
|
if (isStripeAccountLoading || isStripePlatformAccountLoading || isDataLoading) {
|
|
4788
|
-
return /*#__PURE__*/
|
|
4900
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
4789
4901
|
}
|
|
4790
4902
|
if (!isStripeAccountConnected && dataSize <= 0 || !neetoCist.isPresent(data)) {
|
|
4791
|
-
return /*#__PURE__*/
|
|
4792
|
-
className: "flex h-full w-full items-center justify-center"
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4903
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4904
|
+
className: "flex h-full w-full items-center justify-center",
|
|
4905
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], {
|
|
4906
|
+
title: tab === TAB$4.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
4907
|
+
status: tab
|
|
4908
|
+
})
|
|
4796
4909
|
})
|
|
4797
|
-
})
|
|
4910
|
+
});
|
|
4798
4911
|
}
|
|
4799
4912
|
var visibleColumns = columns.filter(function (_ref2) {
|
|
4800
4913
|
var dataIndex = _ref2.dataIndex;
|
|
4801
4914
|
return !hiddenColumns.includes(processDataIndex(dataIndex));
|
|
4802
4915
|
});
|
|
4803
|
-
return /*#__PURE__*/
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4916
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4917
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
|
|
4918
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
4919
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
4920
|
+
fixedHeight: true,
|
|
4921
|
+
allowRowClick: false,
|
|
4922
|
+
columnData: visibleColumns,
|
|
4923
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
4924
|
+
handlePageChange: handleTablePaginaton,
|
|
4925
|
+
loading: isDataFetching,
|
|
4926
|
+
rowData: buildRowData$1({
|
|
4927
|
+
data: data,
|
|
4928
|
+
pageProperties: pageProperties,
|
|
4929
|
+
tab: tab
|
|
4930
|
+
}),
|
|
4931
|
+
rowSelection: false,
|
|
4932
|
+
sortDirections: SORT_DIRECTIONS,
|
|
4933
|
+
totalCount: dataSize,
|
|
4934
|
+
expandable: {
|
|
4935
|
+
expandedRowRender: ExpandedRow,
|
|
4936
|
+
showExpandColumn: isPlatformKind(kind),
|
|
4937
|
+
rowExpandable: function rowExpandable(record) {
|
|
4938
|
+
return !(ramda.isEmpty(record.splits) && ramda.isEmpty(record.refunds));
|
|
4939
|
+
},
|
|
4940
|
+
columnWidth: "64px",
|
|
4941
|
+
expandIcon: RowExpander
|
|
4942
|
+
},
|
|
4943
|
+
paginationProps: {
|
|
4944
|
+
showSizeChanger: true,
|
|
4945
|
+
hideOnSinglePage: true,
|
|
4946
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
4947
|
+
total: dataSize
|
|
4948
|
+
},
|
|
4949
|
+
onChange: handleTableChange,
|
|
4950
|
+
onColumnHide: function onColumnHide(column) {
|
|
4951
|
+
hideColumn(processDataIndex(column.dataIndex));
|
|
4952
|
+
}
|
|
4953
|
+
})
|
|
4954
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Details, _objectSpread$c(_objectSpread$c({}, paneStatus), {}, {
|
|
4955
|
+
onClose: function onClose() {
|
|
4956
|
+
return setPaneStatus(INITIAL_PANE_STATUS);
|
|
4957
|
+
}
|
|
4958
|
+
}))]
|
|
4959
|
+
});
|
|
4844
4960
|
};
|
|
4845
4961
|
|
|
4962
|
+
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; }
|
|
4963
|
+
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; }
|
|
4846
4964
|
var Dashboard = function Dashboard(_ref) {
|
|
4847
4965
|
var _ref$isPlatformEnable = _ref.isPlatformEnabled,
|
|
4848
4966
|
isPlatformEnabled = _ref$isPlatformEnable === void 0 ? false : _ref$isPlatformEnable,
|
|
@@ -4900,80 +5018,87 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4900
5018
|
setFilters(filters);
|
|
4901
5019
|
});
|
|
4902
5020
|
};
|
|
4903
|
-
return /*#__PURE__*/
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
})), isTabsVisible && /*#__PURE__*/React__default["default"].createElement(neetoui.Tab, null, tabs.map(function (item) {
|
|
4910
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tab.Item, {
|
|
4911
|
-
active: tab === item,
|
|
4912
|
-
key: item,
|
|
4913
|
-
onClick: function onClick() {
|
|
4914
|
-
return handleTabChange(item);
|
|
4915
|
-
}
|
|
4916
|
-
}, t("neetoPayments.common.".concat(item)));
|
|
4917
|
-
})), /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"], {
|
|
4918
|
-
className: "mt-4",
|
|
4919
|
-
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4920
|
-
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
4921
|
-
component: "h4"
|
|
4922
|
-
}, tab === TAB$4.all ? t("neetoPayments.countOf.".concat(kind), {
|
|
4923
|
-
count: dataSize
|
|
4924
|
-
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
4925
|
-
count: dataSize,
|
|
4926
|
-
status: tab
|
|
4927
|
-
})),
|
|
4928
|
-
rightActionBlock: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoFiltersFrontend.Bar, {
|
|
4929
|
-
columns: filterableColumns,
|
|
4930
|
-
keyword: searchKeywordProps,
|
|
4931
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
4932
|
-
onChange: handleFiltersChange
|
|
4933
|
-
}), isFilterButtonVisible && /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"].RightBlock, {
|
|
4934
|
-
columnsButtonProps: {
|
|
4935
|
-
columnData: modifiedColumns,
|
|
4936
|
-
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$1,
|
|
4937
|
-
localStorageKey: "stripePaymentDashboard_".concat(kind)
|
|
4938
|
-
},
|
|
4939
|
-
downloadButtonProps: {
|
|
4940
|
-
onClick: function onClick() {
|
|
4941
|
-
return setShowExportModal(true);
|
|
4942
|
-
}
|
|
4943
|
-
},
|
|
4944
|
-
filterProps: {
|
|
4945
|
-
columns: filterableColumns,
|
|
4946
|
-
isOpen: isFilterPaneOpen,
|
|
4947
|
-
keyword: searchKeywordProps,
|
|
4948
|
-
setIsOpen: setIsFilterPaneOpen,
|
|
4949
|
-
onChange: handleFiltersChange
|
|
5021
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5022
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header__default["default"], _objectSpread$b(_objectSpread$b({}, headerProps), {}, {
|
|
5023
|
+
title: t("neetoPayments.title.".concat(titleKind)),
|
|
5024
|
+
searchProps: isFilterButtonVisible && {
|
|
5025
|
+
placeholder: searchKeywordProps.placeholder,
|
|
5026
|
+
className: "w-80"
|
|
4950
5027
|
}
|
|
4951
|
-
}))
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
5028
|
+
})), isTabsVisible && /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"], {
|
|
5029
|
+
children: tabs.map(function (item) {
|
|
5030
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"].Item, {
|
|
5031
|
+
active: tab === item,
|
|
5032
|
+
onClick: function onClick() {
|
|
5033
|
+
return handleTabChange(item);
|
|
5034
|
+
},
|
|
5035
|
+
children: t("neetoPayments.common.".concat(item))
|
|
5036
|
+
}, item);
|
|
5037
|
+
})
|
|
5038
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
5039
|
+
className: "mt-4",
|
|
5040
|
+
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5041
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5042
|
+
component: "h4",
|
|
5043
|
+
children: tab === TAB$4.all ? t("neetoPayments.countOf.".concat(kind), {
|
|
5044
|
+
count: dataSize
|
|
5045
|
+
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
5046
|
+
count: dataSize,
|
|
5047
|
+
status: tab
|
|
5048
|
+
})
|
|
5049
|
+
}),
|
|
5050
|
+
rightActionBlock: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5051
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoFiltersFrontend.Bar, {
|
|
5052
|
+
columns: filterableColumns,
|
|
5053
|
+
keyword: searchKeywordProps,
|
|
5054
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5055
|
+
onChange: handleFiltersChange
|
|
5056
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"].RightBlock, {
|
|
5057
|
+
columnsButtonProps: {
|
|
5058
|
+
columnData: modifiedColumns,
|
|
5059
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$1,
|
|
5060
|
+
localStorageKey: "stripePaymentDashboard_".concat(kind)
|
|
5061
|
+
},
|
|
5062
|
+
downloadButtonProps: {
|
|
5063
|
+
onClick: function onClick() {
|
|
5064
|
+
return setShowExportModal(true);
|
|
5065
|
+
}
|
|
5066
|
+
},
|
|
5067
|
+
filterProps: {
|
|
5068
|
+
columns: filterableColumns,
|
|
5069
|
+
isOpen: isFilterPaneOpen,
|
|
5070
|
+
keyword: searchKeywordProps,
|
|
5071
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
5072
|
+
onChange: handleFiltersChange
|
|
5073
|
+
}
|
|
5074
|
+
})]
|
|
5075
|
+
})
|
|
5076
|
+
}), /*#__PURE__*/jsxRuntime.jsx(List$5, {
|
|
5077
|
+
columns: columns,
|
|
5078
|
+
filters: filters,
|
|
5079
|
+
holdableId: holdableId,
|
|
5080
|
+
isPlatformEnabled: isPlatformEnabled,
|
|
5081
|
+
kind: kind,
|
|
5082
|
+
pageProperties: pageProperties,
|
|
5083
|
+
paneStatus: paneStatus,
|
|
5084
|
+
payoutId: payoutId,
|
|
5085
|
+
setDataSize: setDataSize,
|
|
5086
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
5087
|
+
setPageProperties: setPageProperties,
|
|
5088
|
+
setPaneStatus: setPaneStatus,
|
|
5089
|
+
setSortProperties: setSortProperties,
|
|
5090
|
+
sortProperties: sortProperties,
|
|
5091
|
+
tab: tab
|
|
5092
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ExportModal$1, {
|
|
5093
|
+
filters: filters,
|
|
5094
|
+
holdableId: holdableId,
|
|
5095
|
+
kind: kind,
|
|
5096
|
+
setShowExportModal: setShowExportModal,
|
|
5097
|
+
showExportModal: showExportModal,
|
|
5098
|
+
sortProperties: sortProperties,
|
|
5099
|
+
tab: tab
|
|
5100
|
+
})]
|
|
5101
|
+
});
|
|
4977
5102
|
};
|
|
4978
5103
|
var Dashboard$1 = reactUtils.withTitle(withReactQuery(Dashboard), i18next.t("neetoPayments.common.payments"));
|
|
4979
5104
|
|
|
@@ -5011,8 +5136,8 @@ var DEFAULT_SORT_PROPERTIES = {
|
|
|
5011
5136
|
};
|
|
5012
5137
|
var STRIPE_PAYOUTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY = "stripePayoutsDashboard";
|
|
5013
5138
|
|
|
5014
|
-
function ownKeys$
|
|
5015
|
-
function _objectSpread$
|
|
5139
|
+
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; }
|
|
5140
|
+
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; }
|
|
5016
5141
|
var ExportModal = function ExportModal(_ref) {
|
|
5017
5142
|
var showExportModal = _ref.showExportModal,
|
|
5018
5143
|
setShowExportModal = _ref.setShowExportModal,
|
|
@@ -5038,13 +5163,12 @@ var ExportModal = function ExportModal(_ref) {
|
|
|
5038
5163
|
return "payout-report-".concat(uuidV4());
|
|
5039
5164
|
}, []);
|
|
5040
5165
|
var receivedCallback = function receivedCallback(data) {
|
|
5041
|
-
if (data.download_url)
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
}
|
|
5166
|
+
if (!data.download_url) return;
|
|
5167
|
+
setDownloadUrl(data.download_url);
|
|
5168
|
+
setIsGenerating(false);
|
|
5045
5169
|
};
|
|
5046
5170
|
var handleGenerateClick = function handleGenerateClick() {
|
|
5047
|
-
var payload = _objectSpread$
|
|
5171
|
+
var payload = _objectSpread$a({
|
|
5048
5172
|
kind: "payout",
|
|
5049
5173
|
token: token,
|
|
5050
5174
|
filters: filters,
|
|
@@ -5071,33 +5195,44 @@ var ExportModal = function ExportModal(_ref) {
|
|
|
5071
5195
|
var onClose = function onClose() {
|
|
5072
5196
|
return setShowExportModal(false);
|
|
5073
5197
|
};
|
|
5074
|
-
return /*#__PURE__*/
|
|
5198
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Modal__default["default"], {
|
|
5075
5199
|
onClose: onClose,
|
|
5076
|
-
isOpen: showExportModal
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5200
|
+
isOpen: showExportModal,
|
|
5201
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Header, {
|
|
5202
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5203
|
+
style: "h2",
|
|
5204
|
+
children: t("neetoPayments.export.title.payout")
|
|
5205
|
+
})
|
|
5206
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Body, {
|
|
5207
|
+
children: isFileLoading ? /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5208
|
+
style: "body2",
|
|
5209
|
+
children: t("neetoPayments.export.pleaseWait")
|
|
5210
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5211
|
+
style: "body2",
|
|
5212
|
+
children: downloadUrl ? t("neetoPayments.export.fileReady") : t("neetoPayments.export.download.payout")
|
|
5213
|
+
})
|
|
5214
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Footer, {
|
|
5215
|
+
className: "space-x-2",
|
|
5216
|
+
children: downloadUrl ? /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
5217
|
+
href: downloadUrl,
|
|
5218
|
+
icon: neetoIcons.Download,
|
|
5219
|
+
label: t("neetoPayments.common.download"),
|
|
5220
|
+
onClick: onClose
|
|
5221
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5222
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
5223
|
+
disabled: isFileLoading,
|
|
5224
|
+
label: t("neetoPayments.common.cancel"),
|
|
5225
|
+
style: "tertiary",
|
|
5226
|
+
onClick: onClose
|
|
5227
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
5228
|
+
disabled: isFileLoading,
|
|
5229
|
+
label: t("neetoPayments.common.export"),
|
|
5230
|
+
loading: isFileLoading,
|
|
5231
|
+
onClick: handleGenerateClick
|
|
5232
|
+
})]
|
|
5233
|
+
})
|
|
5234
|
+
})]
|
|
5235
|
+
});
|
|
5101
5236
|
};
|
|
5102
5237
|
|
|
5103
5238
|
var COLUMNS$3 = [{
|
|
@@ -5156,20 +5291,21 @@ var renderPayoutIdentifier$1 = ramda.curry(function (route, _ref) {
|
|
|
5156
5291
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
5157
5292
|
_ref$id = _ref.id,
|
|
5158
5293
|
id = _ref$id === void 0 ? "" : _ref$id;
|
|
5159
|
-
return /*#__PURE__*/
|
|
5160
|
-
content: identifier
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5294
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
5295
|
+
content: identifier,
|
|
5296
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
5297
|
+
label: identifier,
|
|
5298
|
+
size: "small",
|
|
5299
|
+
style: "link",
|
|
5300
|
+
to: utils$3.buildUrl(route, {
|
|
5301
|
+
id: id
|
|
5302
|
+
})
|
|
5167
5303
|
})
|
|
5168
|
-
})
|
|
5304
|
+
});
|
|
5169
5305
|
});
|
|
5170
5306
|
|
|
5171
|
-
function ownKeys$
|
|
5172
|
-
function _objectSpread$
|
|
5307
|
+
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; }
|
|
5308
|
+
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; }
|
|
5173
5309
|
var useFiltersAndPagination$1 = function useFiltersAndPagination(payoutsPageRoute) {
|
|
5174
5310
|
var history = reactRouterDom.useHistory();
|
|
5175
5311
|
var _useState = React.useState(false),
|
|
@@ -5194,7 +5330,7 @@ var useFiltersAndPagination$1 = function useFiltersAndPagination(payoutsPageRout
|
|
|
5194
5330
|
var _getQueryParams = utils$3.getQueryParams(),
|
|
5195
5331
|
_getQueryParams$searc = _getQueryParams.searchTerm,
|
|
5196
5332
|
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
5197
|
-
var searchKeywordProps = _objectSpread$
|
|
5333
|
+
var searchKeywordProps = _objectSpread$9(_objectSpread$9({}, SEARCH_PROPS), {}, {
|
|
5198
5334
|
key: "search_term",
|
|
5199
5335
|
value: searchTerm.trim()
|
|
5200
5336
|
});
|
|
@@ -5324,44 +5460,46 @@ var List$4 = function List(_ref) {
|
|
|
5324
5460
|
} : DEFAULT_SORT_PROPERTIES);
|
|
5325
5461
|
};
|
|
5326
5462
|
if (isDataLoading) {
|
|
5327
|
-
return /*#__PURE__*/
|
|
5463
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
5328
5464
|
}
|
|
5329
5465
|
if (dataSize <= 0 || !neetoCist.isPresent(payouts)) {
|
|
5330
|
-
return /*#__PURE__*/
|
|
5331
|
-
className: "flex h-full w-full items-center justify-center"
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5466
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5467
|
+
className: "flex h-full w-full items-center justify-center",
|
|
5468
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], {
|
|
5469
|
+
title: t("neetoPayments.emptyState.payouts.".concat(tab))
|
|
5470
|
+
})
|
|
5471
|
+
});
|
|
5335
5472
|
}
|
|
5336
|
-
return /*#__PURE__*/
|
|
5337
|
-
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5473
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
|
|
5474
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
5475
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
5476
|
+
fixedHeight: true,
|
|
5477
|
+
allowRowClick: false,
|
|
5478
|
+
columnData: getVisibleColumnData(columnData),
|
|
5479
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
5480
|
+
handlePageChange: handleTablePagination,
|
|
5481
|
+
loading: isDataFetching,
|
|
5482
|
+
rowData: buildRowData$1({
|
|
5483
|
+
data: payouts,
|
|
5484
|
+
pageProperties: pageProperties,
|
|
5485
|
+
tab: tab
|
|
5486
|
+
}),
|
|
5487
|
+
rowSelection: false,
|
|
5488
|
+
sortDirections: SORT_DIRECTIONS,
|
|
5489
|
+
totalCount: dataSize,
|
|
5490
|
+
paginationProps: {
|
|
5491
|
+
showSizeChanger: true,
|
|
5492
|
+
hideOnSinglePage: true,
|
|
5493
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
5494
|
+
total: dataSize
|
|
5495
|
+
},
|
|
5496
|
+
onChange: handleTableChange,
|
|
5497
|
+
onColumnHide: function onColumnHide(_ref2) {
|
|
5498
|
+
var dataIndex = _ref2.dataIndex;
|
|
5499
|
+
return hideColumn(dataIndex);
|
|
5500
|
+
}
|
|
5501
|
+
})
|
|
5502
|
+
});
|
|
5365
5503
|
};
|
|
5366
5504
|
|
|
5367
5505
|
var PayoutsDashboard = function PayoutsDashboard(_ref) {
|
|
@@ -5400,73 +5538,80 @@ var PayoutsDashboard = function PayoutsDashboard(_ref) {
|
|
|
5400
5538
|
setFilters(filters);
|
|
5401
5539
|
});
|
|
5402
5540
|
};
|
|
5403
|
-
return /*#__PURE__*/
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
}), isTabsVisible && /*#__PURE__*/React__default["default"].createElement(neetoui.Tab, null, TABS$3.map(function (item) {
|
|
5410
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tab.Item, {
|
|
5411
|
-
active: tab === item,
|
|
5412
|
-
key: item,
|
|
5413
|
-
onClick: function onClick() {
|
|
5414
|
-
return handleTabChange(item);
|
|
5415
|
-
}
|
|
5416
|
-
}, t("neetoPayments.common.".concat(item)));
|
|
5417
|
-
})), /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"], {
|
|
5418
|
-
className: "mt-4",
|
|
5419
|
-
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
5420
|
-
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5421
|
-
component: "h4"
|
|
5422
|
-
}, tab === TAB$3.all ? t("neetoPayments.countOf.payout", {
|
|
5423
|
-
count: dataSize
|
|
5424
|
-
}) : t("neetoPayments.countOf.payoutWithStatus", {
|
|
5425
|
-
count: dataSize,
|
|
5426
|
-
status: processTab(tab)
|
|
5427
|
-
})),
|
|
5428
|
-
rightActionBlock: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoFiltersFrontend.Bar, {
|
|
5429
|
-
columns: FILTER_COLUMNS,
|
|
5430
|
-
keyword: searchKeywordProps,
|
|
5431
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5432
|
-
onChange: handleFiltersChange
|
|
5433
|
-
}), isFilterButtonVisible && /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"].RightBlock, {
|
|
5434
|
-
columnsButtonProps: {
|
|
5435
|
-
columnData: columnData,
|
|
5436
|
-
fixedColumns: DASHBOARD_MANDATORY_COLUMNS,
|
|
5437
|
-
localStorageKey: STRIPE_PAYOUTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY
|
|
5438
|
-
},
|
|
5439
|
-
downloadButtonProps: {
|
|
5440
|
-
onClick: function onClick() {
|
|
5441
|
-
return setShowExportModal(true);
|
|
5442
|
-
}
|
|
5443
|
-
},
|
|
5444
|
-
filterProps: {
|
|
5445
|
-
columns: FILTER_COLUMNS,
|
|
5446
|
-
isOpen: isFilterPaneOpen,
|
|
5447
|
-
keyword: searchKeywordProps,
|
|
5448
|
-
setIsOpen: setIsFilterPaneOpen,
|
|
5449
|
-
onChange: handleFiltersChange
|
|
5541
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5542
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header__default["default"], {
|
|
5543
|
+
title: t("neetoPayments.title.payouts"),
|
|
5544
|
+
searchProps: isFilterButtonVisible && {
|
|
5545
|
+
placeholder: t("neetoPayments.common.search"),
|
|
5546
|
+
className: "w-80"
|
|
5450
5547
|
}
|
|
5451
|
-
})
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5548
|
+
}), isTabsVisible && /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"], {
|
|
5549
|
+
children: TABS$3.map(function (item) {
|
|
5550
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"].Item, {
|
|
5551
|
+
active: tab === item,
|
|
5552
|
+
onClick: function onClick() {
|
|
5553
|
+
return handleTabChange(item);
|
|
5554
|
+
},
|
|
5555
|
+
children: t("neetoPayments.common.".concat(item))
|
|
5556
|
+
}, item);
|
|
5557
|
+
})
|
|
5558
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
5559
|
+
className: "mt-4",
|
|
5560
|
+
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5561
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5562
|
+
component: "h4",
|
|
5563
|
+
children: tab === TAB$3.all ? t("neetoPayments.countOf.payout", {
|
|
5564
|
+
count: dataSize
|
|
5565
|
+
}) : t("neetoPayments.countOf.payoutWithStatus", {
|
|
5566
|
+
count: dataSize,
|
|
5567
|
+
status: processTab(tab)
|
|
5568
|
+
})
|
|
5569
|
+
}),
|
|
5570
|
+
rightActionBlock: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5571
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoFiltersFrontend.Bar, {
|
|
5572
|
+
columns: FILTER_COLUMNS,
|
|
5573
|
+
keyword: searchKeywordProps,
|
|
5574
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5575
|
+
onChange: handleFiltersChange
|
|
5576
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"].RightBlock, {
|
|
5577
|
+
columnsButtonProps: {
|
|
5578
|
+
columnData: columnData,
|
|
5579
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS,
|
|
5580
|
+
localStorageKey: STRIPE_PAYOUTS_TABLE_HIDDEN_COLUMNS_STORAGE_KEY
|
|
5581
|
+
},
|
|
5582
|
+
downloadButtonProps: {
|
|
5583
|
+
onClick: function onClick() {
|
|
5584
|
+
return setShowExportModal(true);
|
|
5585
|
+
}
|
|
5586
|
+
},
|
|
5587
|
+
filterProps: {
|
|
5588
|
+
columns: FILTER_COLUMNS,
|
|
5589
|
+
isOpen: isFilterPaneOpen,
|
|
5590
|
+
keyword: searchKeywordProps,
|
|
5591
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
5592
|
+
onChange: handleFiltersChange
|
|
5593
|
+
}
|
|
5594
|
+
})]
|
|
5595
|
+
})
|
|
5596
|
+
}), /*#__PURE__*/jsxRuntime.jsx(List$4, {
|
|
5597
|
+
columnData: columnData,
|
|
5598
|
+
filters: filters,
|
|
5599
|
+
isPlatformEnabled: isPlatformEnabled,
|
|
5600
|
+
pageProperties: pageProperties,
|
|
5601
|
+
setDataSize: setDataSize,
|
|
5602
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
5603
|
+
setPageProperties: setPageProperties,
|
|
5604
|
+
setSortProperties: setSortProperties,
|
|
5605
|
+
sortProperties: sortProperties,
|
|
5606
|
+
tab: tab
|
|
5607
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ExportModal, {
|
|
5608
|
+
filters: filters,
|
|
5609
|
+
setShowExportModal: setShowExportModal,
|
|
5610
|
+
showExportModal: showExportModal,
|
|
5611
|
+
sortProperties: sortProperties,
|
|
5612
|
+
tab: tab
|
|
5613
|
+
})]
|
|
5614
|
+
});
|
|
5470
5615
|
};
|
|
5471
5616
|
var index$3 = reactUtils.withTitle(withReactQuery(PayoutsDashboard), i18next.t("neetoPayments.title.payouts"));
|
|
5472
5617
|
|
|
@@ -5491,15 +5636,18 @@ var useFetchData = function useFetchData(_ref) {
|
|
|
5491
5636
|
var renderPayoutIdentifier = function renderPayoutIdentifier() {
|
|
5492
5637
|
var identifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
5493
5638
|
var isLive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
5494
|
-
return /*#__PURE__*/
|
|
5495
|
-
content: identifier
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5639
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
5640
|
+
content: identifier,
|
|
5641
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IdentifierButton$1, {
|
|
5642
|
+
href: buildStripePayoutLink(identifier, isLive),
|
|
5643
|
+
label: identifier
|
|
5644
|
+
})
|
|
5645
|
+
});
|
|
5500
5646
|
};
|
|
5501
5647
|
|
|
5502
5648
|
var _excluded$1 = ["isPlatformEnabled", "indexRoute"];
|
|
5649
|
+
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; }
|
|
5650
|
+
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; }
|
|
5503
5651
|
var PayoutsPage = function PayoutsPage(_ref) {
|
|
5504
5652
|
var isPlatformEnabled = _ref.isPlatformEnabled,
|
|
5505
5653
|
indexRoute = _ref.indexRoute,
|
|
@@ -5530,75 +5678,102 @@ var PayoutsPage = function PayoutsPage(_ref) {
|
|
|
5530
5678
|
}, {
|
|
5531
5679
|
text: identifier
|
|
5532
5680
|
}];
|
|
5533
|
-
if (isDataLoading) return /*#__PURE__*/
|
|
5534
|
-
return /*#__PURE__*/
|
|
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
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5681
|
+
if (isDataLoading) return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
5682
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5683
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header__default["default"], {
|
|
5684
|
+
breadcrumbs: headerBreadCrumbs,
|
|
5685
|
+
title: t("neetoPayments.payoutsPage.title")
|
|
5686
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5687
|
+
className: "w-full space-y-6 p-2",
|
|
5688
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5689
|
+
className: "w-full space-y-2",
|
|
5690
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5691
|
+
className: "flex items-center space-x-2",
|
|
5692
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5693
|
+
style: "body2",
|
|
5694
|
+
children: t("neetoPayments.payoutsPage.payoutId")
|
|
5695
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5696
|
+
className: "neeto-ui-text-black font-medium",
|
|
5697
|
+
style: "body2",
|
|
5698
|
+
children: renderPayoutIdentifier(identifier, live)
|
|
5699
|
+
})]
|
|
5700
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5701
|
+
className: "flex items-center space-x-2",
|
|
5702
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5703
|
+
style: "body2",
|
|
5704
|
+
children: t("neetoPayments.payoutsPage.status")
|
|
5705
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5706
|
+
className: "neeto-ui-text-black font-medium",
|
|
5707
|
+
style: "body2",
|
|
5708
|
+
children: renderStatus("payout", status, {})
|
|
5709
|
+
})]
|
|
5710
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5711
|
+
className: "flex items-center space-x-2",
|
|
5712
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5713
|
+
style: "body2",
|
|
5714
|
+
children: t("neetoPayments.payoutsPage.amount")
|
|
5715
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5716
|
+
className: "neeto-ui-text-black font-medium",
|
|
5717
|
+
style: "body2",
|
|
5718
|
+
children: amount
|
|
5719
|
+
})]
|
|
5720
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5721
|
+
className: "flex items-center space-x-2",
|
|
5722
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5723
|
+
style: "body2",
|
|
5724
|
+
children: t("neetoPayments.payoutsPage.arrivalDate")
|
|
5725
|
+
}), renderDate(arrivalDate)]
|
|
5726
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5727
|
+
className: "flex items-center space-x-2",
|
|
5728
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5729
|
+
style: "body2",
|
|
5730
|
+
children: t("neetoPayments.payoutsPage.createdAt")
|
|
5731
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5732
|
+
className: "neeto-ui-text-black font-medium",
|
|
5733
|
+
style: "body2",
|
|
5734
|
+
children: renderDate(createdAt)
|
|
5735
|
+
})]
|
|
5736
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5737
|
+
className: "flex items-center space-x-2",
|
|
5738
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5739
|
+
style: "body2",
|
|
5740
|
+
children: t("neetoPayments.payoutsPage.destinationId")
|
|
5741
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5742
|
+
className: "neeto-ui-text-black font-medium",
|
|
5743
|
+
style: "body2",
|
|
5744
|
+
children: destinationIdentifier
|
|
5745
|
+
})]
|
|
5746
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5747
|
+
className: "flex items-center space-x-2",
|
|
5748
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5749
|
+
style: "body2",
|
|
5750
|
+
children: t("neetoPayments.payoutsPage.automatic")
|
|
5751
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5752
|
+
className: "neeto-ui-text-black font-medium",
|
|
5753
|
+
style: "body2",
|
|
5754
|
+
children: isAutomatic ? t("neetoPayments.common.yes") : t("neetoPayments.common.no")
|
|
5755
|
+
})]
|
|
5756
|
+
}), neetoCist.isPresent(failureMessage) && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5757
|
+
className: "flex items-center space-x-2",
|
|
5758
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5759
|
+
style: "body2",
|
|
5760
|
+
children: t("neetoPayments.payoutsPage.failureMessage")
|
|
5761
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5762
|
+
className: "neeto-ui-text-black font-medium",
|
|
5763
|
+
style: "body2",
|
|
5764
|
+
children: failureMessage
|
|
5765
|
+
})]
|
|
5766
|
+
})]
|
|
5767
|
+
})
|
|
5768
|
+
}), isAutomatic && /*#__PURE__*/jsxRuntime.jsx(Dashboard$1, _objectSpread$8(_objectSpread$8(_objectSpread$8({}, isPlatformEnabled), {}, {
|
|
5769
|
+
kind: "connected"
|
|
5770
|
+
}, otherProps), {}, {
|
|
5771
|
+
headerProps: {
|
|
5772
|
+
size: "nano"
|
|
5773
|
+
},
|
|
5774
|
+
payoutId: id
|
|
5775
|
+
}))]
|
|
5776
|
+
});
|
|
5602
5777
|
};
|
|
5603
5778
|
|
|
5604
5779
|
var renderIdentifier$1 = function renderIdentifier() {
|
|
@@ -5607,24 +5782,28 @@ var renderIdentifier$1 = function renderIdentifier() {
|
|
|
5607
5782
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier;
|
|
5608
5783
|
var isTemporaryIdentifier = identifier.startsWith("temp_");
|
|
5609
5784
|
if (isTemporaryIdentifier) {
|
|
5610
|
-
return /*#__PURE__*/
|
|
5785
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], {
|
|
5611
5786
|
content: i18next.t("neetoPayments.tooltipContent.paymentIdentifierUnavailable"),
|
|
5612
|
-
position: "top"
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5787
|
+
position: "top",
|
|
5788
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5789
|
+
className: "text-center",
|
|
5790
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5791
|
+
style: "body2",
|
|
5792
|
+
children: i18next.t("neetoPayments.common.notAvailable")
|
|
5793
|
+
})
|
|
5794
|
+
})
|
|
5795
|
+
});
|
|
5618
5796
|
}
|
|
5619
|
-
return /*#__PURE__*/
|
|
5620
|
-
content: identifier
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5797
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
5798
|
+
content: identifier,
|
|
5799
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
5800
|
+
href: "https://dashboard.razorpay.com/app/payments/".concat(identifier),
|
|
5801
|
+
label: identifier,
|
|
5802
|
+
size: "small",
|
|
5803
|
+
style: "link",
|
|
5804
|
+
target: "_blank"
|
|
5805
|
+
})
|
|
5806
|
+
});
|
|
5628
5807
|
};
|
|
5629
5808
|
|
|
5630
5809
|
var COLUMNS$2 = [{
|
|
@@ -5690,8 +5869,8 @@ var buildPaymentColumns$2 = function buildPaymentColumns(_ref) {
|
|
|
5690
5869
|
}));
|
|
5691
5870
|
};
|
|
5692
5871
|
|
|
5693
|
-
function ownKeys$
|
|
5694
|
-
function _objectSpread$
|
|
5872
|
+
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; }
|
|
5873
|
+
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; }
|
|
5695
5874
|
var FilterWrapper = function FilterWrapper(_ref) {
|
|
5696
5875
|
var _ref$setShowExportMod = _ref.setShowExportModal,
|
|
5697
5876
|
setShowExportModal = _ref$setShowExportMod === void 0 ? neetoCist.noop : _ref$setShowExportMod,
|
|
@@ -5719,7 +5898,7 @@ var FilterWrapper = function FilterWrapper(_ref) {
|
|
|
5719
5898
|
var _useTranslation = reactI18next.useTranslation(),
|
|
5720
5899
|
t = _useTranslation.t;
|
|
5721
5900
|
var isTabsVisible = isFilterButtonVisible || tab !== "all";
|
|
5722
|
-
var searchKeywordProps = _objectSpread$
|
|
5901
|
+
var searchKeywordProps = _objectSpread$7(_objectSpread$7({}, searchProps), {}, {
|
|
5723
5902
|
value: searchTerm.trim(),
|
|
5724
5903
|
setValue: neetoCist.noop
|
|
5725
5904
|
});
|
|
@@ -5733,57 +5912,64 @@ var FilterWrapper = function FilterWrapper(_ref) {
|
|
|
5733
5912
|
kind: kind,
|
|
5734
5913
|
payableEntityColumns: payableEntityColumns
|
|
5735
5914
|
});
|
|
5736
|
-
return /*#__PURE__*/
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
})), isTabsVisible && /*#__PURE__*/React__default["default"].createElement(neetoui.Tab, null, tabs.map(function (item) {
|
|
5744
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tab.Item, {
|
|
5745
|
-
active: tab === item,
|
|
5746
|
-
key: item,
|
|
5747
|
-
onClick: function onClick() {
|
|
5748
|
-
return handleTabChange(item);
|
|
5749
|
-
}
|
|
5750
|
-
}, t("neetoPayments.common.".concat(item)));
|
|
5751
|
-
})), /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"], {
|
|
5752
|
-
className: "mt-4",
|
|
5753
|
-
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
5754
|
-
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5755
|
-
component: "h4"
|
|
5756
|
-
}, tab === "all" ? t("neetoPayments.countOf.".concat(kind), {
|
|
5757
|
-
count: dataSize
|
|
5758
|
-
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
5759
|
-
count: dataSize,
|
|
5760
|
-
status: tab
|
|
5761
|
-
})),
|
|
5762
|
-
rightActionBlock: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoFiltersFrontend.Bar, {
|
|
5763
|
-
columns: filterableColumns,
|
|
5764
|
-
keyword: searchKeywordProps,
|
|
5765
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5766
|
-
onChange: handleFiltersChange
|
|
5767
|
-
}), isFilterButtonVisible && /*#__PURE__*/React__default["default"].createElement(SubHeader__default["default"].RightBlock, {
|
|
5768
|
-
columnsButtonProps: {
|
|
5769
|
-
columnData: columnData,
|
|
5770
|
-
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$1,
|
|
5771
|
-
localStorageKey: "paymentDashboard_".concat(kind)
|
|
5772
|
-
},
|
|
5773
|
-
downloadButtonProps: {
|
|
5774
|
-
onClick: function onClick() {
|
|
5775
|
-
return setShowExportModal(true);
|
|
5776
|
-
}
|
|
5777
|
-
},
|
|
5778
|
-
filterProps: {
|
|
5779
|
-
columns: filterableColumns,
|
|
5780
|
-
isOpen: isFilterPaneOpen,
|
|
5781
|
-
keyword: searchKeywordProps,
|
|
5782
|
-
setIsOpen: setIsFilterPaneOpen,
|
|
5783
|
-
onChange: handleFiltersChange
|
|
5915
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5916
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header__default["default"], _objectSpread$7(_objectSpread$7({}, _objectSpread$7(_objectSpread$7({}, headerProps), {}, {
|
|
5917
|
+
title: title
|
|
5918
|
+
})), {}, {
|
|
5919
|
+
searchProps: isFilterButtonVisible && {
|
|
5920
|
+
placeholder: searchKeywordProps.placeholder,
|
|
5921
|
+
className: "w-80"
|
|
5784
5922
|
}
|
|
5785
|
-
}))
|
|
5786
|
-
|
|
5923
|
+
})), isTabsVisible && /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"], {
|
|
5924
|
+
children: tabs.map(function (item) {
|
|
5925
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tab__default["default"].Item, {
|
|
5926
|
+
active: tab === item,
|
|
5927
|
+
onClick: function onClick() {
|
|
5928
|
+
return handleTabChange(item);
|
|
5929
|
+
},
|
|
5930
|
+
children: t("neetoPayments.common.".concat(item))
|
|
5931
|
+
}, item);
|
|
5932
|
+
})
|
|
5933
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
5934
|
+
className: "mt-4",
|
|
5935
|
+
leftActionBlock: neetoCist.isPresent(dataSize) && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
5936
|
+
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5937
|
+
component: "h4",
|
|
5938
|
+
children: tab === "all" ? t("neetoPayments.countOf.".concat(kind), {
|
|
5939
|
+
count: dataSize
|
|
5940
|
+
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
5941
|
+
count: dataSize,
|
|
5942
|
+
status: tab
|
|
5943
|
+
})
|
|
5944
|
+
}),
|
|
5945
|
+
rightActionBlock: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5946
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoFiltersFrontend.Bar, {
|
|
5947
|
+
columns: filterableColumns,
|
|
5948
|
+
keyword: searchKeywordProps,
|
|
5949
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
5950
|
+
onChange: handleFiltersChange
|
|
5951
|
+
}), isFilterButtonVisible && /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"].RightBlock, {
|
|
5952
|
+
columnsButtonProps: {
|
|
5953
|
+
columnData: columnData,
|
|
5954
|
+
fixedColumns: DASHBOARD_MANDATORY_COLUMNS$1,
|
|
5955
|
+
localStorageKey: "paymentDashboard_".concat(kind)
|
|
5956
|
+
},
|
|
5957
|
+
downloadButtonProps: {
|
|
5958
|
+
onClick: function onClick() {
|
|
5959
|
+
return setShowExportModal(true);
|
|
5960
|
+
}
|
|
5961
|
+
},
|
|
5962
|
+
filterProps: {
|
|
5963
|
+
columns: filterableColumns,
|
|
5964
|
+
isOpen: isFilterPaneOpen,
|
|
5965
|
+
keyword: searchKeywordProps,
|
|
5966
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
5967
|
+
onChange: handleFiltersChange
|
|
5968
|
+
}
|
|
5969
|
+
})]
|
|
5970
|
+
})
|
|
5971
|
+
}), children]
|
|
5972
|
+
});
|
|
5787
5973
|
};
|
|
5788
5974
|
|
|
5789
5975
|
var renderIdentifier = function renderIdentifier() {
|
|
@@ -5792,24 +5978,27 @@ var renderIdentifier = function renderIdentifier() {
|
|
|
5792
5978
|
identifier = _ref$identifier === void 0 ? "" : _ref$identifier,
|
|
5793
5979
|
_ref$receiptUrl = _ref.receiptUrl,
|
|
5794
5980
|
receiptUrl = _ref$receiptUrl === void 0 ? "" : _ref$receiptUrl;
|
|
5795
|
-
return /*#__PURE__*/
|
|
5796
|
-
content: identifier
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5981
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper, {
|
|
5982
|
+
content: identifier,
|
|
5983
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
5984
|
+
href: receiptUrl,
|
|
5985
|
+
label: identifier,
|
|
5986
|
+
size: "small",
|
|
5987
|
+
style: "link",
|
|
5988
|
+
target: "_blank"
|
|
5989
|
+
})
|
|
5990
|
+
});
|
|
5804
5991
|
};
|
|
5805
5992
|
var truncatedText = function truncatedText(_ref2) {
|
|
5806
5993
|
var identifier = _ref2.identifier;
|
|
5807
|
-
return /*#__PURE__*/
|
|
5994
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], {
|
|
5808
5995
|
content: identifier,
|
|
5809
|
-
position: "top"
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5996
|
+
position: "top",
|
|
5997
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5998
|
+
className: "w-64 truncate",
|
|
5999
|
+
children: identifier
|
|
6000
|
+
})
|
|
6001
|
+
});
|
|
5813
6002
|
};
|
|
5814
6003
|
|
|
5815
6004
|
var COLUMNS$1 = [{
|
|
@@ -6127,49 +6316,51 @@ var List$3 = function List(_ref) {
|
|
|
6127
6316
|
return !hiddenColumns.includes(processDataIndex(dataIndex));
|
|
6128
6317
|
});
|
|
6129
6318
|
if (isAccountLoading || isPaymentsLoaidng) {
|
|
6130
|
-
return /*#__PURE__*/
|
|
6319
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
6131
6320
|
}
|
|
6132
6321
|
if (!(account !== null && account !== void 0 && account.isConnected) && views <= 0 || !neetoCist.isPresent(payments)) {
|
|
6133
|
-
return /*#__PURE__*/
|
|
6134
|
-
className: "flex h-full w-full items-center justify-center"
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6322
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6323
|
+
className: "flex h-full w-full items-center justify-center",
|
|
6324
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], {
|
|
6325
|
+
title: tab === TAB$2.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
6326
|
+
status: tab
|
|
6327
|
+
})
|
|
6138
6328
|
})
|
|
6139
|
-
})
|
|
6329
|
+
});
|
|
6140
6330
|
}
|
|
6141
|
-
return /*#__PURE__*/
|
|
6142
|
-
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6331
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
|
|
6332
|
+
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
6333
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
6334
|
+
fixedHeight: true,
|
|
6335
|
+
allowRowClick: false,
|
|
6336
|
+
columnData: visibleColumns,
|
|
6337
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
6338
|
+
handlePageChange: handleTablePaginaton,
|
|
6339
|
+
loading: isFetching,
|
|
6340
|
+
rowData: buildRowData$1({
|
|
6341
|
+
data: payments,
|
|
6342
|
+
pageProperties: pageProperties,
|
|
6343
|
+
tab: tab
|
|
6344
|
+
}),
|
|
6345
|
+
rowSelection: false,
|
|
6346
|
+
sortDirections: SORT_DIRECTIONS,
|
|
6347
|
+
totalCount: views,
|
|
6348
|
+
paginationProps: {
|
|
6349
|
+
showSizeChanger: true,
|
|
6350
|
+
hideOnSinglePage: true,
|
|
6351
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
6352
|
+
total: views
|
|
6353
|
+
},
|
|
6354
|
+
onChange: handleTableChange,
|
|
6355
|
+
onColumnHide: function onColumnHide(columnData) {
|
|
6356
|
+
hideColumn(processDataIndex(columnData.dataIndex));
|
|
6357
|
+
}
|
|
6358
|
+
})
|
|
6359
|
+
});
|
|
6169
6360
|
};
|
|
6170
6361
|
|
|
6171
|
-
function ownKeys$
|
|
6172
|
-
function _objectSpread$
|
|
6362
|
+
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; }
|
|
6363
|
+
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; }
|
|
6173
6364
|
var RazorpayDashboard = function RazorpayDashboard(_ref) {
|
|
6174
6365
|
var searchProps = _ref.searchProps,
|
|
6175
6366
|
_ref$headerProps = _ref.headerProps,
|
|
@@ -6200,34 +6391,36 @@ var RazorpayDashboard = function RazorpayDashboard(_ref) {
|
|
|
6200
6391
|
setSortProperties = filterPaginationState.setSortProperties,
|
|
6201
6392
|
tab = filterPaginationState.tab,
|
|
6202
6393
|
setDataSize = filterPaginationState.setDataSize;
|
|
6203
|
-
return /*#__PURE__*/
|
|
6394
|
+
return /*#__PURE__*/jsxRuntime.jsxs(FilterWrapper, _objectSpread$6(_objectSpread$6({
|
|
6204
6395
|
title: t("neetoPayments.common.razorpayPayments")
|
|
6205
|
-
}, _objectSpread$
|
|
6396
|
+
}, _objectSpread$6({
|
|
6206
6397
|
headerProps: headerProps,
|
|
6207
6398
|
kind: kind,
|
|
6208
6399
|
payableEntityColumns: payableEntityColumns,
|
|
6209
6400
|
searchProps: searchProps,
|
|
6210
6401
|
setShowExportModal: setShowExportModal
|
|
6211
|
-
}, filterPaginationState)),
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6402
|
+
}, filterPaginationState)), {}, {
|
|
6403
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(List$3, {
|
|
6404
|
+
filters: filters,
|
|
6405
|
+
holdableId: holdableId,
|
|
6406
|
+
kind: kind,
|
|
6407
|
+
pageProperties: pageProperties,
|
|
6408
|
+
payableEntityColumns: payableEntityColumns,
|
|
6409
|
+
setDataSize: setDataSize,
|
|
6410
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
6411
|
+
setPageProperties: setPageProperties,
|
|
6412
|
+
setSortProperties: setSortProperties,
|
|
6413
|
+
sortProperties: sortProperties,
|
|
6414
|
+
tab: tab
|
|
6415
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ExportModal$1, {
|
|
6416
|
+
filters: filters,
|
|
6417
|
+
holdableId: holdableId,
|
|
6418
|
+
kind: kind,
|
|
6419
|
+
setShowExportModal: setShowExportModal,
|
|
6420
|
+
showExportModal: showExportModal,
|
|
6421
|
+
sortProperties: sortProperties,
|
|
6422
|
+
tab: tab
|
|
6423
|
+
})]
|
|
6231
6424
|
}));
|
|
6232
6425
|
};
|
|
6233
6426
|
var index$2 = reactUtils.withTitle(withReactQuery(RazorpayDashboard), i18next.t("neetoPayments.common.razorpayPayments"));
|
|
@@ -6717,7 +6910,7 @@ var RazorpayPaymentButton = function RazorpayPaymentButton(_ref) {
|
|
|
6717
6910
|
};
|
|
6718
6911
|
createRazorpayOrder(payload);
|
|
6719
6912
|
};
|
|
6720
|
-
return /*#__PURE__*/
|
|
6913
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
6721
6914
|
disabled: isLoading,
|
|
6722
6915
|
label: label || t("neetoPayments.common.pay"),
|
|
6723
6916
|
loading: isLoading,
|
|
@@ -6824,13 +7017,14 @@ var SquareCard = function SquareCard(_ref) {
|
|
|
6824
7017
|
React.useEffect(function () {
|
|
6825
7018
|
card === null || card === void 0 || card.configure(options);
|
|
6826
7019
|
}, [card, options]);
|
|
6827
|
-
return /*#__PURE__*/
|
|
7020
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6828
7021
|
id: id,
|
|
6829
7022
|
className: classNames__default["default"]({
|
|
6830
7023
|
"pointer-events-none": disabled,
|
|
6831
7024
|
"text-center": !card
|
|
6832
|
-
})
|
|
6833
|
-
|
|
7025
|
+
}),
|
|
7026
|
+
children: !card && /*#__PURE__*/jsxRuntime.jsx(Spinner__default["default"], {})
|
|
7027
|
+
});
|
|
6834
7028
|
};
|
|
6835
7029
|
|
|
6836
7030
|
var TAB$1 = {
|
|
@@ -7013,46 +7207,48 @@ var List$2 = function List(_ref) {
|
|
|
7013
7207
|
} : DEFAULT_SORT_PROPERTIES$1);
|
|
7014
7208
|
};
|
|
7015
7209
|
if (isSquareAccountLoading || isDataLoading) {
|
|
7016
|
-
return /*#__PURE__*/
|
|
7210
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
7017
7211
|
}
|
|
7018
7212
|
if (!(squareAccount !== null && squareAccount !== void 0 && squareAccount.isConnected) && dataSize <= 0 || !neetoCist.isPresent(data)) {
|
|
7019
|
-
return /*#__PURE__*/
|
|
7020
|
-
className: "flex h-full w-full items-center justify-center"
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7213
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7214
|
+
className: "flex h-full w-full items-center justify-center",
|
|
7215
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], {
|
|
7216
|
+
title: tab === TAB$1.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
7217
|
+
status: tab
|
|
7218
|
+
})
|
|
7024
7219
|
})
|
|
7025
|
-
})
|
|
7220
|
+
});
|
|
7026
7221
|
}
|
|
7027
|
-
return /*#__PURE__*/
|
|
7028
|
-
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7222
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
|
|
7223
|
+
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
7224
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
7225
|
+
columnData: columnData,
|
|
7226
|
+
fixedHeight: true,
|
|
7227
|
+
allowRowClick: false,
|
|
7228
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
7229
|
+
handlePageChange: handleTablePaginaton,
|
|
7230
|
+
loading: isDataFetching,
|
|
7231
|
+
rowData: buildRowData$1({
|
|
7232
|
+
data: data,
|
|
7233
|
+
pageProperties: pageProperties,
|
|
7234
|
+
tab: tab
|
|
7235
|
+
}),
|
|
7236
|
+
rowSelection: false,
|
|
7237
|
+
sortDirections: SORT_DIRECTIONS,
|
|
7238
|
+
totalCount: dataSize,
|
|
7239
|
+
paginationProps: {
|
|
7240
|
+
showSizeChanger: true,
|
|
7241
|
+
hideOnSinglePage: true,
|
|
7242
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
7243
|
+
total: dataSize
|
|
7244
|
+
},
|
|
7245
|
+
onChange: handleTableChange
|
|
7246
|
+
})
|
|
7247
|
+
});
|
|
7052
7248
|
};
|
|
7053
7249
|
|
|
7054
|
-
function ownKeys$
|
|
7055
|
-
function _objectSpread$
|
|
7250
|
+
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; }
|
|
7251
|
+
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; }
|
|
7056
7252
|
var SquareDashboard = function SquareDashboard(_ref) {
|
|
7057
7253
|
var searchProps = _ref.searchProps,
|
|
7058
7254
|
_ref$headerProps = _ref.headerProps,
|
|
@@ -7079,24 +7275,26 @@ var SquareDashboard = function SquareDashboard(_ref) {
|
|
|
7079
7275
|
setSortProperties = filterPaginationState.setSortProperties,
|
|
7080
7276
|
tab = filterPaginationState.tab,
|
|
7081
7277
|
setDataSize = filterPaginationState.setDataSize;
|
|
7082
|
-
return /*#__PURE__*/
|
|
7278
|
+
return /*#__PURE__*/jsxRuntime.jsx(FilterWrapper, _objectSpread$5(_objectSpread$5({
|
|
7083
7279
|
title: isPaymentKind(kind) ? t("neetoPayments.title.squarePayment") : t("neetoPayments.title.squareRefund")
|
|
7084
|
-
}, _objectSpread$
|
|
7280
|
+
}, _objectSpread$5({
|
|
7085
7281
|
headerProps: headerProps,
|
|
7086
7282
|
kind: kind,
|
|
7087
7283
|
searchProps: searchProps
|
|
7088
|
-
}, filterPaginationState)),
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7284
|
+
}, filterPaginationState)), {}, {
|
|
7285
|
+
children: /*#__PURE__*/jsxRuntime.jsx(List$2, {
|
|
7286
|
+
filters: filters,
|
|
7287
|
+
holdableId: holdableId,
|
|
7288
|
+
kind: kind,
|
|
7289
|
+
pageProperties: pageProperties,
|
|
7290
|
+
payableEntityColumns: payableEntityColumns,
|
|
7291
|
+
setDataSize: setDataSize,
|
|
7292
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
7293
|
+
setPageProperties: setPageProperties,
|
|
7294
|
+
setSortProperties: setSortProperties,
|
|
7295
|
+
sortProperties: sortProperties,
|
|
7296
|
+
tab: tab
|
|
7297
|
+
})
|
|
7100
7298
|
}));
|
|
7101
7299
|
};
|
|
7102
7300
|
var index$1 = reactUtils.withTitle(withReactQuery(SquareDashboard), i18next.t("neetoPayments.common.squarePayments"));
|
|
@@ -7113,6 +7311,8 @@ var STRIPE_ALERT_PAYMENT_KIND_CONTENT = {
|
|
|
7113
7311
|
};
|
|
7114
7312
|
|
|
7115
7313
|
var _excluded = ["isOpen", "paymentKind", "onClose"];
|
|
7314
|
+
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; }
|
|
7315
|
+
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; }
|
|
7116
7316
|
var PaymentKindRestrictionAlert = function PaymentKindRestrictionAlert(_ref) {
|
|
7117
7317
|
var _ref$isOpen = _ref.isOpen,
|
|
7118
7318
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
@@ -7121,7 +7321,7 @@ var PaymentKindRestrictionAlert = function PaymentKindRestrictionAlert(_ref) {
|
|
|
7121
7321
|
_ref$onClose = _ref.onClose,
|
|
7122
7322
|
onClose = _ref$onClose === void 0 ? neetoCist.noop : _ref$onClose,
|
|
7123
7323
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
7124
|
-
return /*#__PURE__*/
|
|
7324
|
+
return /*#__PURE__*/jsxRuntime.jsx(Alert__default["default"], _objectSpread$4({
|
|
7125
7325
|
isOpen: isOpen,
|
|
7126
7326
|
onClose: onClose,
|
|
7127
7327
|
message: STRIPE_ALERT_PAYMENT_KIND_CONTENT[paymentKind].message,
|
|
@@ -7220,6 +7420,7 @@ var AccountForm = function AccountForm(_ref) {
|
|
|
7220
7420
|
returnUrl = _ref.returnUrl;
|
|
7221
7421
|
var _useTranslation = reactI18next.useTranslation(),
|
|
7222
7422
|
t = _useTranslation.t;
|
|
7423
|
+
var history = reactRouterDom.useHistory();
|
|
7223
7424
|
var _useState = React.useState(false),
|
|
7224
7425
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7225
7426
|
isPolling = _useState2[0],
|
|
@@ -7265,30 +7466,37 @@ var AccountForm = function AccountForm(_ref) {
|
|
|
7265
7466
|
createStripeAccount(payload);
|
|
7266
7467
|
};
|
|
7267
7468
|
if (isLoading) {
|
|
7268
|
-
return /*#__PURE__*/
|
|
7469
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
7269
7470
|
}
|
|
7270
|
-
return /*#__PURE__*/
|
|
7471
|
+
return /*#__PURE__*/jsxRuntime.jsx(Form__default["default"], {
|
|
7271
7472
|
formikProps: {
|
|
7272
7473
|
enableReinitialize: true,
|
|
7273
7474
|
initialValues: INITIAL_VALUES,
|
|
7274
7475
|
validationSchema: VALIDATION_SCHEMA$2,
|
|
7275
7476
|
onSubmit: handleSubmit
|
|
7276
|
-
}
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7477
|
+
},
|
|
7478
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7479
|
+
className: "space-y-3",
|
|
7480
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Select__default["default"], {
|
|
7481
|
+
required: true,
|
|
7482
|
+
helpText: t("neetoPayments.integrationModal.form.helpText"),
|
|
7483
|
+
label: t("neetoPayments.integrationModal.form.label"),
|
|
7484
|
+
name: "country",
|
|
7485
|
+
options: buildCountryOptions(countries),
|
|
7486
|
+
placeholder: t("neetoPayments.integrationModal.form.placeholder")
|
|
7487
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ActionBlock__default["default"], {
|
|
7488
|
+
cancelButtonProps: {
|
|
7489
|
+
onClick: function onClick() {
|
|
7490
|
+
return history.goBack();
|
|
7491
|
+
}
|
|
7492
|
+
},
|
|
7493
|
+
isSubmitting: isCreating || isPolling,
|
|
7494
|
+
submitButtonProps: {
|
|
7495
|
+
label: submitButtonLabel
|
|
7496
|
+
}
|
|
7497
|
+
})]
|
|
7498
|
+
})
|
|
7499
|
+
});
|
|
7292
7500
|
};
|
|
7293
7501
|
|
|
7294
7502
|
var AccountDetails = function AccountDetails(_ref) {
|
|
@@ -7299,26 +7507,35 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
7299
7507
|
stripeAccount = _useFetchConnectedStr3.account;
|
|
7300
7508
|
var _useTranslation = reactI18next.useTranslation(),
|
|
7301
7509
|
t = _useTranslation.t;
|
|
7302
|
-
return /*#__PURE__*/
|
|
7303
|
-
className: "mb-6 space-y-3"
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7510
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7511
|
+
className: "mb-6 space-y-3",
|
|
7512
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
7513
|
+
style: "h5",
|
|
7514
|
+
weight: "medium",
|
|
7515
|
+
children: t("neetoPayments.integrationModal.account.title")
|
|
7516
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7517
|
+
className: "grid grid-cols-4 gap-y-3",
|
|
7518
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
7519
|
+
className: "neeto-ui-text-gray-800",
|
|
7520
|
+
children: t("neetoPayments.common.id")
|
|
7521
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
7522
|
+
className: "neeto-ui-text-gray-800 col-span-3",
|
|
7523
|
+
children: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.identifier
|
|
7524
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
7525
|
+
className: "neeto-ui-text-gray-800",
|
|
7526
|
+
children: t("neetoPayments.common.email")
|
|
7527
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
7528
|
+
className: "neeto-ui-text-gray-800 col-span-3",
|
|
7529
|
+
children: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.email
|
|
7530
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
7531
|
+
className: "neeto-ui-text-gray-800",
|
|
7532
|
+
children: t("neetoPayments.common.country")
|
|
7533
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
7534
|
+
className: "neeto-ui-text-gray-800 col-span-3",
|
|
7535
|
+
children: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.country
|
|
7536
|
+
})]
|
|
7537
|
+
})]
|
|
7538
|
+
});
|
|
7322
7539
|
};
|
|
7323
7540
|
|
|
7324
7541
|
var AccountProcessing = function AccountProcessing(_ref) {
|
|
@@ -7383,36 +7600,39 @@ var AccountProcessing = function AccountProcessing(_ref) {
|
|
|
7383
7600
|
var handleUseAnotherStripeAccount = function handleUseAnotherStripeAccount() {
|
|
7384
7601
|
destroyStripeAccount(stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.id);
|
|
7385
7602
|
};
|
|
7386
|
-
return /*#__PURE__*/
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7603
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7604
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(AccountDetails, {}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7605
|
+
className: "flex flex-col items-start space-y-2",
|
|
7606
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
7607
|
+
disabled: isPolling,
|
|
7608
|
+
href: buildRefreshUrl(stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.id, returnUrl),
|
|
7609
|
+
label: buttonLabel(),
|
|
7610
|
+
loading: isPolling,
|
|
7611
|
+
size: "small"
|
|
7612
|
+
}), !isPolling && !isAccountProcessingFailed && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
7613
|
+
disabled: isStripeAccountDestroying || isPolling,
|
|
7614
|
+
label: t("neetoPayments.integrationModal.anotherAccount"),
|
|
7615
|
+
size: "small",
|
|
7616
|
+
style: "link",
|
|
7617
|
+
onClick: function onClick() {
|
|
7618
|
+
return setIsAlertOpen(true);
|
|
7619
|
+
}
|
|
7620
|
+
})]
|
|
7621
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Alert__default["default"], {
|
|
7622
|
+
isOpen: isAlertOpen,
|
|
7623
|
+
title: t("neetoPayments.integrationModal.alert.changeTitle"),
|
|
7624
|
+
message: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
7625
|
+
i18nKey: "neetoPayments.integrationModal.alert.changeMessage",
|
|
7626
|
+
values: {
|
|
7627
|
+
account: stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.email
|
|
7628
|
+
}
|
|
7629
|
+
}),
|
|
7630
|
+
onClose: function onClose() {
|
|
7631
|
+
return setIsAlertOpen(false);
|
|
7632
|
+
},
|
|
7633
|
+
onSubmit: handleUseAnotherStripeAccount
|
|
7634
|
+
})]
|
|
7635
|
+
});
|
|
7416
7636
|
};
|
|
7417
7637
|
|
|
7418
7638
|
var Configure = function Configure(_ref) {
|
|
@@ -7429,25 +7649,29 @@ var Configure = function Configure(_ref) {
|
|
|
7429
7649
|
window.open(onboarding === null || onboarding === void 0 ? void 0 : onboarding.url, "_self");
|
|
7430
7650
|
};
|
|
7431
7651
|
var connectDescription = neetoCist.isPresent(stripeAccount) ? t("neetoPayments.integrationModal.linkedDescription") : t("neetoPayments.integrationModal.subtitle");
|
|
7432
|
-
return /*#__PURE__*/
|
|
7433
|
-
className: "mx-auto w-full max-w-lg space-y-8"
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7652
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7653
|
+
className: "mx-auto w-full max-w-lg space-y-8",
|
|
7654
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7655
|
+
className: "space-y-2",
|
|
7656
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SvgStripe, {}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
7657
|
+
"data-cy": "configure-payment-title",
|
|
7658
|
+
style: "h2",
|
|
7659
|
+
weight: "semibold",
|
|
7660
|
+
children: t("neetoPayments.integrationModal.title")
|
|
7661
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
7662
|
+
className: "leading-snug",
|
|
7663
|
+
children: connectDescription
|
|
7664
|
+
})]
|
|
7665
|
+
}), neetoCist.isPresent(stripeAccount) ? /*#__PURE__*/jsxRuntime.jsx(AccountProcessing, {
|
|
7666
|
+
onAccountCreated: handleStripeAccountCreated,
|
|
7667
|
+
holdableId: holdableId,
|
|
7668
|
+
returnUrl: returnUrl
|
|
7669
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(AccountForm, {
|
|
7670
|
+
holdableId: holdableId,
|
|
7671
|
+
returnUrl: returnUrl,
|
|
7672
|
+
onAccountCreated: handleStripeAccountCreated
|
|
7673
|
+
})]
|
|
7674
|
+
});
|
|
7451
7675
|
};
|
|
7452
7676
|
|
|
7453
7677
|
/*! @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 */
|
|
@@ -9077,45 +9301,51 @@ var Connect = function Connect(_ref) {
|
|
|
9077
9301
|
}
|
|
9078
9302
|
window.location.href = purify.sanitize(stripeConnectUrl);
|
|
9079
9303
|
};
|
|
9080
|
-
return /*#__PURE__*/
|
|
9081
|
-
className: "mx-auto w-full max-w-lg space-y-8"
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9304
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9305
|
+
className: "mx-auto w-full max-w-lg space-y-8",
|
|
9306
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9307
|
+
className: "space-y-2",
|
|
9308
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SvgStripe, {}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
9309
|
+
"data-cy": "configure-payment-title",
|
|
9310
|
+
style: "h2",
|
|
9311
|
+
weight: "semibold",
|
|
9312
|
+
children: t("neetoPayments.integrationModal.title")
|
|
9313
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
9314
|
+
className: "leading-snug",
|
|
9315
|
+
children: t("neetoPayments.integrationModal.subtitle")
|
|
9316
|
+
})]
|
|
9317
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Radio__default["default"], {
|
|
9318
|
+
stacked: true,
|
|
9319
|
+
value: selectedOption,
|
|
9320
|
+
onChange: function onChange(event) {
|
|
9321
|
+
return setSelectedOption(event.target.value);
|
|
9322
|
+
},
|
|
9323
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Radio__default["default"].Item, {
|
|
9324
|
+
className: "neeto-ui-border-black w-96 py-2",
|
|
9325
|
+
label: t("neetoPayments.integrationModal.createAccount"),
|
|
9326
|
+
name: "accountMethod",
|
|
9327
|
+
value: INTEGRATION_METHOD.createNewAccount
|
|
9328
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Radio__default["default"].Item, {
|
|
9329
|
+
className: "neeto-ui-border-black w-96 py-2",
|
|
9330
|
+
label: t("neetoPayments.integrationModal.connectAccount"),
|
|
9331
|
+
name: "accountMethod",
|
|
9332
|
+
value: INTEGRATION_METHOD.useExistingAccount
|
|
9333
|
+
})]
|
|
9334
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
9335
|
+
label: t("neetoPayments.common.continue"),
|
|
9336
|
+
onClick: handleSubmit
|
|
9337
|
+
})]
|
|
9338
|
+
});
|
|
9110
9339
|
};
|
|
9111
9340
|
|
|
9112
9341
|
var Finish = reactUtils.withT(function (_ref) {
|
|
9113
9342
|
var t = _ref.t,
|
|
9114
9343
|
onSuccess = _ref.onSuccess;
|
|
9115
|
-
return /*#__PURE__*/
|
|
9344
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetointegrations.Finish, {
|
|
9116
9345
|
title: t("v2.payment.finishTitle"),
|
|
9117
|
-
onClick: onSuccess
|
|
9118
|
-
|
|
9346
|
+
onClick: onSuccess,
|
|
9347
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AccountDetails, {})
|
|
9348
|
+
});
|
|
9119
9349
|
});
|
|
9120
9350
|
|
|
9121
9351
|
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; }
|
|
@@ -9156,50 +9386,64 @@ var StripeConnect = function StripeConnect(_ref) {
|
|
|
9156
9386
|
isCompleted: activeTab === STEPS.demo
|
|
9157
9387
|
})];
|
|
9158
9388
|
}, [activeTab, stripeAccount]);
|
|
9159
|
-
return /*#__PURE__*/
|
|
9389
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetointegrations.Modal, {
|
|
9160
9390
|
isOpen: isOpen,
|
|
9161
9391
|
onClose: onClose,
|
|
9162
|
-
steps: steps
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9392
|
+
steps: steps,
|
|
9393
|
+
children: [activeTab === STEPS.connect && /*#__PURE__*/jsxRuntime.jsx(Connect, {
|
|
9394
|
+
holdableId: holdableId,
|
|
9395
|
+
returnUrl: returnUrl,
|
|
9396
|
+
setActiveTab: setActiveTab
|
|
9397
|
+
}), activeTab === STEPS.configure && /*#__PURE__*/jsxRuntime.jsx(Configure, {
|
|
9398
|
+
holdableId: holdableId,
|
|
9399
|
+
returnUrl: returnUrl
|
|
9400
|
+
}), activeTab === STEPS.finish && /*#__PURE__*/jsxRuntime.jsx(Finish, {
|
|
9401
|
+
onSuccess: onClose
|
|
9402
|
+
}), activeTab === STEPS.demo && /*#__PURE__*/jsxRuntime.jsx(neetointegrations.Demo, {
|
|
9403
|
+
onClose: onClose
|
|
9404
|
+
})]
|
|
9405
|
+
});
|
|
9175
9406
|
};
|
|
9176
9407
|
|
|
9177
9408
|
var VALIDATION_SCHEMA$1 = yup__namespace.object({
|
|
9178
|
-
upiId: yup__namespace.string().matches(/^[a-zA-Z0-9.-]{2,256}@[a-zA-
|
|
9409
|
+
upiId: yup__namespace.string().matches(/^[a-zA-Z0-9.-]{2,256}@[a-zA-Z][a-zA-Z]{2,64}$/, i18next.t("neetoPayments.upi.form.validation.invalidUpi")).required(i18next.t("neetoPayments.upi.form.validation.required"))
|
|
9179
9410
|
});
|
|
9180
9411
|
|
|
9181
|
-
var Add =
|
|
9182
|
-
var
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9412
|
+
var Add = function Add(_ref) {
|
|
9413
|
+
var handleCreateUpiId = _ref.handleCreateUpiId;
|
|
9414
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
9415
|
+
t = _useTranslation.t;
|
|
9416
|
+
var history = reactRouterDom.useHistory();
|
|
9417
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9418
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Form__default["default"], {
|
|
9419
|
+
formikProps: {
|
|
9420
|
+
initialValues: {
|
|
9421
|
+
upiId: ""
|
|
9422
|
+
},
|
|
9423
|
+
onSubmit: handleCreateUpiId,
|
|
9424
|
+
validationSchema: VALIDATION_SCHEMA$1
|
|
9188
9425
|
},
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9426
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9427
|
+
className: "space-y-3",
|
|
9428
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
9429
|
+
className: "w-64",
|
|
9430
|
+
label: t("neetoPayments.upi.form.enterUpi"),
|
|
9431
|
+
name: "upiId",
|
|
9432
|
+
placeholder: t("neetoPayments.upi.form.enterUpi")
|
|
9433
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ActionBlock__default["default"], {
|
|
9434
|
+
cancelButtonProps: {
|
|
9435
|
+
onClick: function onClick() {
|
|
9436
|
+
return history.goBack();
|
|
9437
|
+
}
|
|
9438
|
+
},
|
|
9439
|
+
submitButtonProps: {
|
|
9440
|
+
label: t("neetoPayments.upi.form.add")
|
|
9441
|
+
}
|
|
9442
|
+
})]
|
|
9443
|
+
})
|
|
9444
|
+
})
|
|
9445
|
+
});
|
|
9446
|
+
};
|
|
9203
9447
|
|
|
9204
9448
|
var getColumnData = function getColumnData(handleDeleteClick) {
|
|
9205
9449
|
return [{
|
|
@@ -9208,23 +9452,25 @@ var getColumnData = function getColumnData(handleDeleteClick) {
|
|
|
9208
9452
|
key: "address",
|
|
9209
9453
|
width: 272,
|
|
9210
9454
|
render: function render(_, upiId) {
|
|
9211
|
-
return /*#__PURE__*/
|
|
9212
|
-
className: "flex items-center justify-between gap-3"
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9455
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9456
|
+
className: "flex items-center justify-between gap-3",
|
|
9457
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
9458
|
+
className: "w-4/5",
|
|
9459
|
+
style: "body2",
|
|
9460
|
+
children: upiId.address
|
|
9461
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown__default["default"], {
|
|
9462
|
+
dropdownProps: {
|
|
9463
|
+
strategy: "fixed"
|
|
9464
|
+
},
|
|
9465
|
+
menuItems: [{
|
|
9466
|
+
key: "delete-meeting",
|
|
9467
|
+
label: i18next.t("neetoPayments.common.delete"),
|
|
9468
|
+
onClick: function onClick() {
|
|
9469
|
+
return handleDeleteClick(upiId);
|
|
9470
|
+
}
|
|
9471
|
+
}]
|
|
9472
|
+
})]
|
|
9473
|
+
});
|
|
9228
9474
|
}
|
|
9229
9475
|
}, {
|
|
9230
9476
|
title: i18next.t("neetoPayments.common.createdAt"),
|
|
@@ -9262,24 +9508,26 @@ var List$1 = function List(_ref) {
|
|
|
9262
9508
|
if (ramda.isEmpty(upiIds)) {
|
|
9263
9509
|
return null;
|
|
9264
9510
|
}
|
|
9265
|
-
return /*#__PURE__*/
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9511
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9512
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
9513
|
+
columnData: getColumnData(handleOpenDeleteModal),
|
|
9514
|
+
rowData: upiIds
|
|
9515
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Alert__default["default"], {
|
|
9516
|
+
isOpen: isAlertOpen,
|
|
9517
|
+
title: t("neetoPayments.upi.alert.title"),
|
|
9518
|
+
message: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
9519
|
+
components: {
|
|
9520
|
+
b: /*#__PURE__*/jsxRuntime.jsx("strong", {})
|
|
9521
|
+
},
|
|
9522
|
+
i18nKey: "neetoPayments.upi.alert.message",
|
|
9523
|
+
values: {
|
|
9524
|
+
upiId: selectedUpiId.address
|
|
9525
|
+
}
|
|
9526
|
+
}),
|
|
9527
|
+
onClose: handleAlertClose,
|
|
9528
|
+
onSubmit: handleAlertSubmit
|
|
9529
|
+
})]
|
|
9530
|
+
});
|
|
9283
9531
|
};
|
|
9284
9532
|
|
|
9285
9533
|
var UpiConnect = function UpiConnect(_ref) {
|
|
@@ -9293,20 +9541,17 @@ var UpiConnect = function UpiConnect(_ref) {
|
|
|
9293
9541
|
handleDeleteUpiId = _ref$handleDeleteUpiI === void 0 ? neetoCist.noop : _ref$handleDeleteUpiI,
|
|
9294
9542
|
_ref$handleCreateUpiI = _ref.handleCreateUpiId,
|
|
9295
9543
|
handleCreateUpiId = _ref$handleCreateUpiI === void 0 ? neetoCist.noop : _ref$handleCreateUpiI;
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
isDeleting: isDeleting,
|
|
9308
|
-
upiIds: upiIds
|
|
9309
|
-
}));
|
|
9544
|
+
if (isLoading) return /*#__PURE__*/jsxRuntime.jsx(Spinner__default["default"], {});
|
|
9545
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9546
|
+
className: "flex w-full max-w-3xl flex-col items-start space-y-6",
|
|
9547
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Add, {
|
|
9548
|
+
handleCreateUpiId: handleCreateUpiId
|
|
9549
|
+
}), /*#__PURE__*/jsxRuntime.jsx(List$1, {
|
|
9550
|
+
handleDeleteUpiId: handleDeleteUpiId,
|
|
9551
|
+
isDeleting: isDeleting,
|
|
9552
|
+
upiIds: upiIds
|
|
9553
|
+
})]
|
|
9554
|
+
});
|
|
9310
9555
|
};
|
|
9311
9556
|
|
|
9312
9557
|
var create = function create(payload) {
|
|
@@ -9352,7 +9597,7 @@ var UpiMarkAsPaidButton = function UpiMarkAsPaidButton(_ref) {
|
|
|
9352
9597
|
payableId: payableId
|
|
9353
9598
|
});
|
|
9354
9599
|
};
|
|
9355
|
-
return /*#__PURE__*/
|
|
9600
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
9356
9601
|
label: t("neetoPayments.upi.payment.buttons.markAsPaid"),
|
|
9357
9602
|
loading: isLoading,
|
|
9358
9603
|
onClick: handleClick
|
|
@@ -9363,11 +9608,15 @@ var VALIDATION_SCHEMA = yup__namespace.object({
|
|
|
9363
9608
|
transactionId: yup__namespace.string().required(i18next.t("neetoPayments.upi.payment.transaction.required")).min(6, i18next.t("neetoPayments.upi.payment.transaction.sixCharacters")).max(6, i18next.t("neetoPayments.upi.payment.transaction.sixCharacters"))
|
|
9364
9609
|
});
|
|
9365
9610
|
|
|
9611
|
+
var vpaIdToQrCodeValue = function vpaIdToQrCodeValue(vpaId) {
|
|
9612
|
+
return "upi://pay?pa=".concat(vpaId);
|
|
9613
|
+
};
|
|
9614
|
+
|
|
9366
9615
|
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; }
|
|
9367
9616
|
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; }
|
|
9368
9617
|
var UpiPayment = function UpiPayment(_ref) {
|
|
9369
|
-
var _ref$
|
|
9370
|
-
|
|
9618
|
+
var _ref$fee = _ref.fee,
|
|
9619
|
+
fee = _ref$fee === void 0 ? {} : _ref$fee,
|
|
9371
9620
|
_ref$onSubmit = _ref.onSubmit,
|
|
9372
9621
|
onSubmit = _ref$onSubmit === void 0 ? neetoCist.noop : _ref$onSubmit,
|
|
9373
9622
|
_ref$onBackClick = _ref.onBackClick,
|
|
@@ -9375,7 +9624,7 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
9375
9624
|
payableId = _ref.payableId;
|
|
9376
9625
|
var _useTranslation = reactI18next.useTranslation(),
|
|
9377
9626
|
t = _useTranslation.t;
|
|
9378
|
-
var vpaIds = ramda.pluck("address", vpas)
|
|
9627
|
+
var vpaIds = ramda.pluck("address", fee === null || fee === void 0 ? void 0 : fee.vpas);
|
|
9379
9628
|
var _useCreateUpiPayment = useCreateUpiPayment({}),
|
|
9380
9629
|
createPayment = _useCreateUpiPayment.mutate;
|
|
9381
9630
|
var handleSubmit = function handleSubmit(values) {
|
|
@@ -9385,38 +9634,56 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
9385
9634
|
createPayment(payload);
|
|
9386
9635
|
onSubmit(values);
|
|
9387
9636
|
};
|
|
9388
|
-
return /*#__PURE__*/
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9637
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9638
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Form__default["default"], {
|
|
9639
|
+
className: "space-y-4",
|
|
9640
|
+
formikProps: {
|
|
9641
|
+
onSubmit: handleSubmit,
|
|
9642
|
+
initialValues: {
|
|
9643
|
+
transactionId: ""
|
|
9644
|
+
},
|
|
9645
|
+
validationSchema: VALIDATION_SCHEMA
|
|
9394
9646
|
},
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9647
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
9648
|
+
style: "body1",
|
|
9649
|
+
children: t("neetoPayments.upi.payment.vpaText", {
|
|
9650
|
+
count: vpaIds.length
|
|
9651
|
+
})
|
|
9652
|
+
}), neetoCist.isPresent(vpaIds) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9653
|
+
className: "grid grid-cols-1 gap-8 gap-y-4 sm:grid-cols-2",
|
|
9654
|
+
children: vpaIds.map(function (vpaId) {
|
|
9655
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9656
|
+
className: "flex flex-col items-center justify-center",
|
|
9657
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(QRCodeImage__default["default"], {
|
|
9658
|
+
size: 256,
|
|
9659
|
+
style: {
|
|
9660
|
+
width: 80,
|
|
9661
|
+
height: 80
|
|
9662
|
+
},
|
|
9663
|
+
value: vpaIdToQrCodeValue(vpaId)
|
|
9664
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
9665
|
+
className: "mt-2 w-full break-words text-center",
|
|
9666
|
+
style: "body2",
|
|
9667
|
+
children: vpaId
|
|
9668
|
+
})]
|
|
9669
|
+
}, vpaId);
|
|
9670
|
+
})
|
|
9671
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
9672
|
+
required: true,
|
|
9673
|
+
label: t("neetoPayments.upi.payment.transaction.label"),
|
|
9674
|
+
name: "transactionId",
|
|
9675
|
+
placeholder: t("neetoPayments.upi.payment.transaction.placeholder")
|
|
9676
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ActionBlock__default["default"], {
|
|
9677
|
+
cancelButtonProps: {
|
|
9678
|
+
label: t("neetoPayments.upi.payment.buttons.back"),
|
|
9679
|
+
onClick: onBackClick
|
|
9680
|
+
},
|
|
9681
|
+
submitButtonProps: {
|
|
9682
|
+
label: t("neetoPayments.upi.payment.buttons.submit")
|
|
9683
|
+
}
|
|
9684
|
+
})]
|
|
9685
|
+
})
|
|
9686
|
+
});
|
|
9420
9687
|
};
|
|
9421
9688
|
|
|
9422
9689
|
var TAB = {
|
|
@@ -9585,45 +9852,47 @@ var List = function List(_ref) {
|
|
|
9585
9852
|
return !hiddenColumns.includes(processDataIndex(dataIndex));
|
|
9586
9853
|
});
|
|
9587
9854
|
if (isPaymentsLoading) {
|
|
9588
|
-
return /*#__PURE__*/
|
|
9855
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
9589
9856
|
}
|
|
9590
9857
|
if (!neetoCist.isPresent(payments)) {
|
|
9591
|
-
return /*#__PURE__*/
|
|
9592
|
-
className: "flex h-full w-full items-center justify-center"
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9858
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9859
|
+
className: "flex h-full w-full items-center justify-center",
|
|
9860
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], {
|
|
9861
|
+
title: tab === TAB.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
9862
|
+
status: tab
|
|
9863
|
+
})
|
|
9596
9864
|
})
|
|
9597
|
-
})
|
|
9865
|
+
});
|
|
9598
9866
|
}
|
|
9599
|
-
return /*#__PURE__*/
|
|
9600
|
-
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize)
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9867
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
|
|
9868
|
+
hasPagination: views > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
9869
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
|
|
9870
|
+
fixedHeight: true,
|
|
9871
|
+
allowRowClick: false,
|
|
9872
|
+
columnData: visibleColumns,
|
|
9873
|
+
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
9874
|
+
handlePageChange: handleTablePaginaton,
|
|
9875
|
+
loading: isFetching,
|
|
9876
|
+
rowData: buildRowData({
|
|
9877
|
+
data: payments,
|
|
9878
|
+
pageProperties: pageProperties,
|
|
9879
|
+
tab: tab
|
|
9880
|
+
}),
|
|
9881
|
+
rowSelection: false,
|
|
9882
|
+
sortDirections: SORT_DIRECTIONS,
|
|
9883
|
+
totalCount: views,
|
|
9884
|
+
paginationProps: {
|
|
9885
|
+
showSizeChanger: true,
|
|
9886
|
+
hideOnSinglePage: true,
|
|
9887
|
+
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
9888
|
+
total: views
|
|
9889
|
+
},
|
|
9890
|
+
onChange: handleTableChange,
|
|
9891
|
+
onColumnHide: function onColumnHide(columnData) {
|
|
9892
|
+
hideColumn(processDataIndex(columnData.dataIndex));
|
|
9893
|
+
}
|
|
9894
|
+
})
|
|
9895
|
+
});
|
|
9627
9896
|
};
|
|
9628
9897
|
|
|
9629
9898
|
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; }
|
|
@@ -9657,24 +9926,26 @@ var V2PaymentsDashboard = function V2PaymentsDashboard(_ref) {
|
|
|
9657
9926
|
// Note: For now this component would be called UPI payments
|
|
9658
9927
|
// Note: This cannot be called payments as right now this only shows upi payments.
|
|
9659
9928
|
// TODO: Once other payments are integrated change the header and subsequent usages of "upi"
|
|
9660
|
-
|
|
9929
|
+
jsxRuntime.jsx(FilterWrapper, _objectSpread(_objectSpread({
|
|
9661
9930
|
title: t("neetoPayments.common.upiPayments")
|
|
9662
9931
|
}, _objectSpread({
|
|
9663
9932
|
headerProps: headerProps,
|
|
9664
9933
|
kind: kind,
|
|
9665
9934
|
payableEntityColumns: payableEntityColumns,
|
|
9666
9935
|
searchProps: searchProps
|
|
9667
|
-
}, filterPaginationState)),
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9936
|
+
}, filterPaginationState)), {}, {
|
|
9937
|
+
children: /*#__PURE__*/jsxRuntime.jsx(List, {
|
|
9938
|
+
filters: filters,
|
|
9939
|
+
kind: kind,
|
|
9940
|
+
pageProperties: pageProperties,
|
|
9941
|
+
payableEntityColumns: payableEntityColumns,
|
|
9942
|
+
setDataSize: setDataSize,
|
|
9943
|
+
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
9944
|
+
setPageProperties: setPageProperties,
|
|
9945
|
+
setSortProperties: setSortProperties,
|
|
9946
|
+
sortProperties: sortProperties,
|
|
9947
|
+
tab: tab
|
|
9948
|
+
})
|
|
9678
9949
|
}))
|
|
9679
9950
|
);
|
|
9680
9951
|
};
|