@bigbinary/neeto-payments-frontend 3.3.32 → 3.3.34
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 +11 -2
- package/dist/AccountsDashboard.js +3 -3
- package/dist/AdminCancelRecurringPaymentButton.js +1 -1
- package/dist/CashPaymentButton.js +55 -0
- package/dist/CashPaymentButton.js.map +1 -0
- package/dist/ConfirmCashPaymentButton.js +104 -0
- package/dist/ConfirmCashPaymentButton.js.map +1 -0
- package/dist/ConfirmUpiPaymentButton.js +2 -2
- package/dist/CustomerCancelRecurringPaymentForm.js +1 -1
- package/dist/{ExportModal-DCGDM_Fa.js → ExportModal-BsFxUaYJ.js} +2 -2
- package/dist/{ExportModal-DCGDM_Fa.js.map → ExportModal-BsFxUaYJ.js.map} +1 -1
- package/dist/ManualUpiPaymentConfirmButton.js +1 -1
- package/dist/PaymentsDashboard.js +2 -2
- package/dist/PayoutsDashboard.js +4 -4
- package/dist/PayoutsPage.js +3 -3
- package/dist/RazorpayPaymentButton.js +2 -2
- package/dist/RecurringPaymentSettings.js +1 -1
- package/dist/RefundsDashboard.js +2 -2
- package/dist/SplitTransfersDashboard.js +2 -2
- package/dist/TaxesDashboard.js +1 -1
- package/dist/UpiPayment.js +2 -2
- package/dist/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/AccountsDashboard.js +3 -3
- package/dist/cjs/AdminCancelRecurringPaymentButton.js +1 -1
- package/dist/cjs/CashPaymentButton.js +57 -0
- package/dist/cjs/CashPaymentButton.js.map +1 -0
- package/dist/cjs/ConfirmCashPaymentButton.js +106 -0
- package/dist/cjs/ConfirmCashPaymentButton.js.map +1 -0
- package/dist/cjs/ConfirmUpiPaymentButton.js +2 -2
- package/dist/cjs/CustomerCancelRecurringPaymentForm.js +1 -1
- package/dist/cjs/{ExportModal-BZWbo5JF.js → ExportModal-BJ2TrvE8.js} +2 -2
- package/dist/cjs/{ExportModal-BZWbo5JF.js.map → ExportModal-BJ2TrvE8.js.map} +1 -1
- package/dist/cjs/ManualUpiPaymentConfirmButton.js +1 -1
- package/dist/cjs/PaymentsDashboard.js +2 -2
- package/dist/cjs/PayoutsDashboard.js +4 -4
- package/dist/cjs/PayoutsPage.js +3 -3
- package/dist/cjs/RazorpayPaymentButton.js +2 -2
- package/dist/cjs/RecurringPaymentSettings.js +1 -1
- package/dist/cjs/RefundsDashboard.js +2 -2
- package/dist/cjs/SplitTransfersDashboard.js +2 -2
- package/dist/cjs/TaxesDashboard.js +1 -1
- package/dist/cjs/UpiPayment.js +2 -2
- package/dist/cjs/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/{dashboard-H1ov-J3v.js → dashboard-Bjhw-y9S.js} +2 -2
- package/dist/cjs/{dashboard-H1ov-J3v.js.map → dashboard-Bjhw-y9S.js.map} +1 -1
- package/dist/cjs/getAmountInSmallestCurrencyUnit.js +1 -1
- package/dist/cjs/{index-BYewZJN8.js → index-CihS_E6s.js} +2 -2
- package/dist/cjs/{index-BYewZJN8.js.map → index-CihS_E6s.js.map} +1 -1
- package/dist/cjs/index.js +13 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{renderFunctions-CovxUt9o.js → renderFunctions-CbgNQLUZ.js} +2 -2
- package/dist/cjs/{renderFunctions-CovxUt9o.js.map → renderFunctions-CbgNQLUZ.js.map} +1 -1
- package/dist/cjs/usePaymentApi-BR4z3fpQ.js +41 -0
- package/dist/cjs/usePaymentApi-BR4z3fpQ.js.map +1 -0
- package/dist/cjs/{usePaymentApi-CcdKGxJD.js → usePaymentApi-ojnHNkQj.js} +2 -2
- package/dist/cjs/{usePaymentApi-CcdKGxJD.js.map → usePaymentApi-ojnHNkQj.js.map} +1 -1
- package/dist/cjs/{usePaymentsApi-Dz6uXFhx.js → usePaymentsApi-DY7TZaXP.js} +2 -2
- package/dist/cjs/{usePaymentsApi-Dz6uXFhx.js.map → usePaymentsApi-DY7TZaXP.js.map} +1 -1
- package/dist/cjs/{usePlatformApi-DB_N-Ua_.js → usePlatformApi-B65EA1Nh.js} +2 -2
- package/dist/cjs/{usePlatformApi-DB_N-Ua_.js.map → usePlatformApi-B65EA1Nh.js.map} +1 -1
- package/dist/cjs/useRazorpayPayment.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/{dashboard-D6ZJpJ3n.js → dashboard-C5diLksA.js} +2 -2
- package/dist/{dashboard-D6ZJpJ3n.js.map → dashboard-C5diLksA.js.map} +1 -1
- package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
- package/dist/{index-ER2sofJn.js → index-ojfe66jf.js} +2 -2
- package/dist/{index-ER2sofJn.js.map → index-ojfe66jf.js.map} +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/dist/{renderFunctions-Cmo1gJ6o.js → renderFunctions-ObVxaGJ7.js} +2 -2
- package/dist/{renderFunctions-Cmo1gJ6o.js.map → renderFunctions-ObVxaGJ7.js.map} +1 -1
- package/dist/{usePaymentApi-DBEceBVs.js → usePaymentApi-B8ZEA19B.js} +2 -2
- package/dist/{usePaymentApi-DBEceBVs.js.map → usePaymentApi-B8ZEA19B.js.map} +1 -1
- package/dist/usePaymentApi-C0JTbQH1.js +38 -0
- package/dist/usePaymentApi-C0JTbQH1.js.map +1 -0
- package/dist/{usePaymentsApi-K6rhWzss.js → usePaymentsApi-DQz8xzHV.js} +2 -2
- package/dist/{usePaymentsApi-K6rhWzss.js.map → usePaymentsApi-DQz8xzHV.js.map} +1 -1
- package/dist/{usePlatformApi-36ZLH1ga.js → usePlatformApi-CFaJ_LxH.js} +2 -2
- package/dist/{usePlatformApi-36ZLH1ga.js.map → usePlatformApi-CFaJ_LxH.js.map} +1 -1
- package/dist/useRazorpayPayment.js +2 -2
- package/package.json +5 -5
- package/types/CashPaymentButton.d.ts +17 -0
- package/types/ConfirmCashPaymentButton.d.ts +11 -0
- package/types.d.ts +1 -1
- package/types/StripeConnect.d.ts +0 -13
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"configure": "Configure",
|
|
64
64
|
"finish": "Finish",
|
|
65
65
|
"pay": "Pay",
|
|
66
|
-
"upiId": "UPI
|
|
66
|
+
"upiId": "UPI ID",
|
|
67
67
|
"upiIds": "UPI ids",
|
|
68
68
|
"delete": "Delete",
|
|
69
69
|
"transactionId": "Transaction ID",
|
|
@@ -79,7 +79,9 @@
|
|
|
79
79
|
"submit": "Submit",
|
|
80
80
|
"edit": "Edit",
|
|
81
81
|
"resume": "Resume",
|
|
82
|
-
"upi": "UPI"
|
|
82
|
+
"upi": "UPI",
|
|
83
|
+
"proceed": "Proceed",
|
|
84
|
+
"confirmPayment": "Confirm payment"
|
|
83
85
|
},
|
|
84
86
|
"alert": {
|
|
85
87
|
"stripe": {
|
|
@@ -395,6 +397,13 @@
|
|
|
395
397
|
"razorpay": {
|
|
396
398
|
"loadError": "Failed to load Razorpay!!"
|
|
397
399
|
},
|
|
400
|
+
"cash": {
|
|
401
|
+
"confirmModal": {
|
|
402
|
+
"title": "Confirm Cash payment?",
|
|
403
|
+
"notes": "Notes (optional)",
|
|
404
|
+
"notesPlaceholder": "Type notes here..."
|
|
405
|
+
}
|
|
406
|
+
},
|
|
398
407
|
"upi": {
|
|
399
408
|
"confirmModal": {
|
|
400
409
|
"title": "Confirm UPI payment?",
|
|
@@ -9,20 +9,20 @@ import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
|
|
|
9
9
|
import Tab from '@bigbinary/neetoui/Tab';
|
|
10
10
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
|
-
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-
|
|
12
|
+
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-C5diLksA.js';
|
|
13
13
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
14
14
|
import Download from '@bigbinary/neeto-icons/Download';
|
|
15
15
|
import Button from '@bigbinary/neetoui/Button';
|
|
16
16
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
17
17
|
import { e as exportChannel } from './exportChannel-CViICC6x.js';
|
|
18
|
-
import { u as uuidV4, a as buildStripeAccountLink, D as DEFAULT_SORT_PROPERTIES, B as BASE_URL, S as SORT_DIRECTIONS } from './index-
|
|
18
|
+
import { u as uuidV4, a as buildStripeAccountLink, D as DEFAULT_SORT_PROPERTIES, B as BASE_URL, S as SORT_DIRECTIONS } from './index-ojfe66jf.js';
|
|
19
19
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
20
20
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
21
21
|
import { getQueryParams, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
22
22
|
import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
23
23
|
import { pipe, split, map, join, mergeLeft, assoc } from 'ramda';
|
|
24
24
|
import { useHistory } from 'react-router-dom';
|
|
25
|
-
import { r as renderStatus, a as renderFullName, b as renderDate } from './renderFunctions-
|
|
25
|
+
import { r as renderStatus, a as renderFullName, b as renderDate } from './renderFunctions-ObVxaGJ7.js';
|
|
26
26
|
import { C as CopyButtonWrapper } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
27
27
|
import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from '@bigbinary/neeto-commons-frontend/constants';
|
|
28
28
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
7
7
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
8
|
import axios from 'axios';
|
|
9
|
-
import { B as BASE_URL } from './index-
|
|
9
|
+
import { B as BASE_URL } from './index-ojfe66jf.js';
|
|
10
10
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
11
|
import 'i18next';
|
|
12
12
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { noop } from '@bigbinary/neeto-cist';
|
|
2
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { u as useCreateCashPayment } from './usePaymentApi-C0JTbQH1.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
7
|
+
import '@tanstack/react-query';
|
|
8
|
+
import 'axios';
|
|
9
|
+
import './index-ojfe66jf.js';
|
|
10
|
+
import 'i18next';
|
|
11
|
+
import '@bigbinary/neeto-commons-frontend/constants';
|
|
12
|
+
import '@bigbinary/neeto-commons-frontend/utils';
|
|
13
|
+
import 'ramda';
|
|
14
|
+
|
|
15
|
+
var CashPaymentButton = function CashPaymentButton(_ref) {
|
|
16
|
+
var label = _ref.label,
|
|
17
|
+
payableId = _ref.payableId,
|
|
18
|
+
payableType = _ref.payableType,
|
|
19
|
+
discountCode = _ref.discountCode,
|
|
20
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
21
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
22
|
+
_ref$isLoading = _ref.isLoading,
|
|
23
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
24
|
+
_ref$onBeforePayment = _ref.onBeforePayment,
|
|
25
|
+
onBeforePayment = _ref$onBeforePayment === void 0 ? noop : _ref$onBeforePayment,
|
|
26
|
+
_ref$onFailedPayment = _ref.onFailedPayment,
|
|
27
|
+
onFailedPayment = _ref$onFailedPayment === void 0 ? noop : _ref$onFailedPayment,
|
|
28
|
+
_ref$onSuccessfulPaym = _ref.onSuccessfulPayment,
|
|
29
|
+
onSuccessfulPayment = _ref$onSuccessfulPaym === void 0 ? noop : _ref$onSuccessfulPaym;
|
|
30
|
+
var _useTranslation = useTranslation(),
|
|
31
|
+
t = _useTranslation.t;
|
|
32
|
+
var _useCreateCashPayment = useCreateCashPayment({
|
|
33
|
+
onSuccess: onSuccessfulPayment,
|
|
34
|
+
onError: onFailedPayment
|
|
35
|
+
}),
|
|
36
|
+
isPending = _useCreateCashPayment.isPending,
|
|
37
|
+
createCashPayment = _useCreateCashPayment.mutate;
|
|
38
|
+
var handleSubmit = function handleSubmit() {
|
|
39
|
+
onBeforePayment();
|
|
40
|
+
createCashPayment({
|
|
41
|
+
payableId: payableId,
|
|
42
|
+
payableType: payableType,
|
|
43
|
+
discountCode: discountCode
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/jsx(Button, {
|
|
47
|
+
disabled: isPending || isDisabled,
|
|
48
|
+
label: label || t("neetoPayments.common.proceed"),
|
|
49
|
+
loading: isPending || isLoading,
|
|
50
|
+
onClick: handleSubmit
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { CashPaymentButton as default };
|
|
55
|
+
//# sourceMappingURL=CashPaymentButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CashPaymentButton.js","sources":["../app/javascript/src/components/CashPaymentButton.jsx"],"sourcesContent":["import { noop } from \"neetocist\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateCashPayment } from \"hooks/reactQuery/cash/usePaymentApi\";\n\nconst CashPaymentButton = ({\n label,\n payableId,\n payableType,\n discountCode,\n isDisabled = false,\n isLoading = false,\n onBeforePayment = noop,\n onFailedPayment = noop,\n onSuccessfulPayment = noop,\n}) => {\n const { t } = useTranslation();\n\n const { isPending, mutate: createCashPayment } = useCreateCashPayment({\n onSuccess: onSuccessfulPayment,\n onError: onFailedPayment,\n });\n\n const handleSubmit = () => {\n onBeforePayment();\n createCashPayment({ payableId, payableType, discountCode });\n };\n\n return (\n <Button\n disabled={isPending || isDisabled}\n label={label || t(\"neetoPayments.common.proceed\")}\n loading={isPending || isLoading}\n onClick={handleSubmit}\n />\n );\n};\n\nexport default CashPaymentButton;\n"],"names":["CashPaymentButton","_ref","label","payableId","payableType","discountCode","_ref$isDisabled","isDisabled","_ref$isLoading","isLoading","_ref$onBeforePayment","onBeforePayment","noop","_ref$onFailedPayment","onFailedPayment","_ref$onSuccessfulPaym","onSuccessfulPayment","_useTranslation","useTranslation","t","_useCreateCashPayment","useCreateCashPayment","onSuccess","onError","isPending","createCashPayment","mutate","handleSubmit","_jsx","Button","disabled","loading","onClick"],"mappings":";;;;;;;;;;;;;;AAMA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAUjB;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAAC,eAAA,GAAAL,IAAA,CACZM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,cAAA,GAAAP,IAAA,CAClBQ,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,cAAA;IAAAE,oBAAA,GAAAT,IAAA,CACjBU,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAGE,KAAAA,CAAAA,GAAAA,IAAI,GAAAF,oBAAA;IAAAG,oBAAA,GAAAZ,IAAA,CACtBa,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAGD,KAAAA,CAAAA,GAAAA,IAAI,GAAAC,oBAAA;IAAAE,qBAAA,GAAAd,IAAA,CACtBe,mBAAmB;AAAnBA,IAAAA,mBAAmB,GAAAD,qBAAA,KAAGH,KAAAA,CAAAA,GAAAA,IAAI,GAAAG,qBAAA;AAE1B,EAAA,IAAAE,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;EAET,IAAAC,qBAAA,GAAiDC,oBAAoB,CAAC;AACpEC,MAAAA,SAAS,EAAEN,mBAAmB;AAC9BO,MAAAA,OAAO,EAAET;AACX,KAAC,CAAC;IAHMU,SAAS,GAAAJ,qBAAA,CAATI,SAAS;IAAUC,iBAAiB,GAAAL,qBAAA,CAAzBM,MAAM;AAKzB,EAAA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,GAAS;AACzBhB,IAAAA,eAAe,EAAE;AACjBc,IAAAA,iBAAiB,CAAC;AAAEtB,MAAAA,SAAS,EAATA,SAAS;AAAEC,MAAAA,WAAW,EAAXA,WAAW;AAAEC,MAAAA,YAAY,EAAZA;AAAa,KAAC,CAAC;GAC5D;EAED,oBACEuB,GAAA,CAACC,MAAM,EAAA;IACLC,QAAQ,EAAEN,SAAS,IAAIjB,UAAW;AAClCL,IAAAA,KAAK,EAAEA,KAAK,IAAIiB,CAAC,CAAC,8BAA8B,CAAE;IAClDY,OAAO,EAAEP,SAAS,IAAIf,SAAU;AAChCuB,IAAAA,OAAO,EAAEL;AAAa,GACvB,CAAC;AAEN;;;;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { noop } from '@bigbinary/neeto-cist';
|
|
4
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
5
|
+
import Modal from '@bigbinary/neetoui/Modal';
|
|
6
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
7
|
+
import Form from '@bigbinary/neetoui/formik/Form';
|
|
8
|
+
import Textarea from '@bigbinary/neetoui/formik/Textarea';
|
|
9
|
+
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
10
|
+
import { useTranslation } from 'react-i18next';
|
|
11
|
+
import { a as useUpdateCashPayment } from './usePaymentApi-C0JTbQH1.js';
|
|
12
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
13
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
14
|
+
import '@tanstack/react-query';
|
|
15
|
+
import 'axios';
|
|
16
|
+
import './index-ojfe66jf.js';
|
|
17
|
+
import 'i18next';
|
|
18
|
+
import '@bigbinary/neeto-commons-frontend/constants';
|
|
19
|
+
import '@bigbinary/neeto-commons-frontend/utils';
|
|
20
|
+
import 'ramda';
|
|
21
|
+
|
|
22
|
+
var ConfirmCashPaymentButton = function ConfirmCashPaymentButton(_ref) {
|
|
23
|
+
var paymentId = _ref.paymentId,
|
|
24
|
+
payableId = _ref.payableId,
|
|
25
|
+
_ref$onSuccess = _ref.onSuccess,
|
|
26
|
+
onSuccess = _ref$onSuccess === void 0 ? noop : _ref$onSuccess;
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
isModalOpen = _useState2[0],
|
|
30
|
+
setIsModalOpen = _useState2[1];
|
|
31
|
+
var _useTranslation = useTranslation(),
|
|
32
|
+
t = _useTranslation.t;
|
|
33
|
+
var _useUpdateCashPayment = useUpdateCashPayment(paymentId, {
|
|
34
|
+
onSuccess: onSuccess
|
|
35
|
+
}),
|
|
36
|
+
updateUpiPayment = _useUpdateCashPayment.mutate,
|
|
37
|
+
isPending = _useUpdateCashPayment.isPending;
|
|
38
|
+
var onClose = function onClose() {
|
|
39
|
+
return setIsModalOpen(false);
|
|
40
|
+
};
|
|
41
|
+
var handleSubmit = function handleSubmit(_ref2) {
|
|
42
|
+
var notes = _ref2.notes;
|
|
43
|
+
var payload = {
|
|
44
|
+
notes: notes,
|
|
45
|
+
payableId: payableId,
|
|
46
|
+
status: "successful"
|
|
47
|
+
};
|
|
48
|
+
updateUpiPayment(payload);
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
51
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
52
|
+
label: t("neetoPayments.common.confirmPayment"),
|
|
53
|
+
loading: isPending,
|
|
54
|
+
size: "small",
|
|
55
|
+
onClick: function onClick() {
|
|
56
|
+
return setIsModalOpen(true);
|
|
57
|
+
}
|
|
58
|
+
}), /*#__PURE__*/jsxs(Modal, {
|
|
59
|
+
onClose: onClose,
|
|
60
|
+
isOpen: isModalOpen,
|
|
61
|
+
size: "large",
|
|
62
|
+
children: [/*#__PURE__*/jsx(Modal.Header, {
|
|
63
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
64
|
+
style: "h2",
|
|
65
|
+
children: t("neetoPayments.cash.confirmModal.title")
|
|
66
|
+
})
|
|
67
|
+
}), /*#__PURE__*/jsx(Form, {
|
|
68
|
+
formikProps: {
|
|
69
|
+
initialValues: {
|
|
70
|
+
notes: ""
|
|
71
|
+
},
|
|
72
|
+
enableReinitialize: true,
|
|
73
|
+
onSubmit: handleSubmit
|
|
74
|
+
},
|
|
75
|
+
children: /*#__PURE__*/jsxs(Fragment, {
|
|
76
|
+
children: [/*#__PURE__*/jsx(Modal.Body, {
|
|
77
|
+
children: /*#__PURE__*/jsx(Textarea, {
|
|
78
|
+
"data-cy": "confirm-booking-modal-input-textfield",
|
|
79
|
+
label: t("neetoPayments.cash.confirmModal.notes"),
|
|
80
|
+
name: "notes",
|
|
81
|
+
placeholder: t("neetoPayments.cash.confirmModal.notesPlaceholder")
|
|
82
|
+
})
|
|
83
|
+
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
84
|
+
className: "space-x-2",
|
|
85
|
+
children: /*#__PURE__*/jsx(ActionBlock, {
|
|
86
|
+
isSubmitting: isPending,
|
|
87
|
+
position: "right",
|
|
88
|
+
cancelButtonProps: {
|
|
89
|
+
onClick: onClose,
|
|
90
|
+
style: "tertiary"
|
|
91
|
+
},
|
|
92
|
+
submitButtonProps: {
|
|
93
|
+
label: t("neetoPayments.common.confirm")
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
})]
|
|
97
|
+
})
|
|
98
|
+
})]
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export { ConfirmCashPaymentButton as default };
|
|
104
|
+
//# sourceMappingURL=ConfirmCashPaymentButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmCashPaymentButton.js","sources":["../app/javascript/src/components/ConfirmCashPaymentButton.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport { Button, Modal, Typography } from \"neetoui\";\nimport { Form, Textarea, ActionBlock } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useUpdateCashPayment } from \"hooks/reactQuery/cash/usePaymentApi\";\n\nconst ConfirmCashPaymentButton = ({\n paymentId,\n payableId,\n onSuccess = noop,\n}) => {\n const [isModalOpen, setIsModalOpen] = useState(false);\n\n const { t } = useTranslation();\n\n const { mutate: updateUpiPayment, isPending } = useUpdateCashPayment(\n paymentId,\n { onSuccess }\n );\n\n const onClose = () => setIsModalOpen(false);\n\n const handleSubmit = ({ notes }) => {\n const payload = { notes, payableId, status: \"successful\" };\n updateUpiPayment(payload);\n };\n\n return (\n <>\n <Button\n label={t(\"neetoPayments.common.confirmPayment\")}\n loading={isPending}\n size=\"small\"\n onClick={() => setIsModalOpen(true)}\n />\n <Modal {...{ onClose }} isOpen={isModalOpen} size=\"large\">\n <Modal.Header>\n <Typography style=\"h2\">\n {t(\"neetoPayments.cash.confirmModal.title\")}\n </Typography>\n </Modal.Header>\n <Form\n formikProps={{\n initialValues: { notes: \"\" },\n enableReinitialize: true,\n onSubmit: handleSubmit,\n }}\n >\n <>\n <Modal.Body>\n <Textarea\n data-cy=\"confirm-booking-modal-input-textfield\"\n label={t(\"neetoPayments.cash.confirmModal.notes\")}\n name=\"notes\"\n placeholder={t(\n \"neetoPayments.cash.confirmModal.notesPlaceholder\"\n )}\n />\n </Modal.Body>\n <Modal.Footer className=\"space-x-2\">\n <ActionBlock\n isSubmitting={isPending}\n position=\"right\"\n cancelButtonProps={{\n onClick: onClose,\n style: \"tertiary\",\n }}\n submitButtonProps={{\n label: t(\"neetoPayments.common.confirm\"),\n }}\n />\n </Modal.Footer>\n </>\n </Form>\n </Modal>\n </>\n );\n};\n\nexport default ConfirmCashPaymentButton;\n"],"names":["ConfirmCashPaymentButton","_ref","paymentId","payableId","_ref$onSuccess","onSuccess","noop","_useState","useState","_useState2","_slicedToArray","isModalOpen","setIsModalOpen","_useTranslation","useTranslation","t","_useUpdateCashPayment","useUpdateCashPayment","updateUpiPayment","mutate","isPending","onClose","handleSubmit","_ref2","notes","payload","status","_jsxs","_Fragment","children","_jsx","Button","label","loading","size","onClick","Modal","isOpen","Header","Typography","style","Form","formikProps","initialValues","enableReinitialize","onSubmit","Body","Textarea","name","placeholder","Footer","className","ActionBlock","isSubmitting","position","cancelButtonProps","submitButtonProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAC,IAAA,EAIxB;AAAA,EAAA,IAHJC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAAC,cAAA,GAAAH,IAAA,CACTI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAGE,KAAAA,CAAAA,GAAAA,IAAI,GAAAF,cAAA;AAEhB,EAAA,IAAAG,SAAA,GAAsCC,QAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAA9CI,IAAAA,WAAW,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,cAAc,GAAAH,UAAA,CAAA,CAAA,CAAA;AAElC,EAAA,IAAAI,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AAET,EAAA,IAAAC,qBAAA,GAAgDC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,QAAAA,WAAW,EAAE;AACXC,UAAAA,aAAa,EAAE;AAAEnB,YAAAA,KAAK,EAAE;WAAI;AAC5BoB,UAAAA,kBAAkB,EAAE,IAAI;AACxBC,UAAAA,QAAQ,EAAEvB;SACV;QAAAO,QAAA,eAEFF,IAAA,CAAAC,QAAA,EAAA;AAAAC,UAAAA,QAAA,EACEC,cAAAA,GAAA,CAACM,KAAK,CAACU,IAAI,EAAA;YAAAjB,QAAA,eACTC,GAAA,CAACiB,QAAQ,EAAA;AACP,cAAA,SAAA,EAAQ,uCAAuC;AAC/Cf,cAAAA,KAAK,EAAEjB,CAAC,CAAC,uCAAuC,CAAE;AAClDiC,cAAAA,IAAI,EAAC,OAAO;cACZC,WAAW,EAAElC,CAAC,CACZ,kDACF;aACD;AAAC,WACQ,CAAC,eACbe,GAAA,CAACM,KAAK,CAACc,MAAM,EAAA;AAACC,YAAAA,SAAS,EAAC,WAAW;YAAAtB,QAAA,eACjCC,GAAA,CAACsB,WAAW,EAAA;AACVC,cAAAA,YAAY,EAAEjC,SAAU;AACxBkC,cAAAA,QAAQ,EAAC,OAAO;AAChBC,cAAAA,iBAAiB,EAAE;AACjBpB,gBAAAA,OAAO,EAAEd,OAAO;AAChBmB,gBAAAA,KAAK,EAAE;eACP;AACFgB,cAAAA,iBAAiB,EAAE;gBACjBxB,KAAK,EAAEjB,CAAC,CAAC,8BAA8B;AACzC;aACD;AAAC,WACU,CAAC;SACf;AAAC,OACC,CAAC;AAAA,KACF,CAAC;AAAA,GACR,CAAC;AAEP;;;;"}
|
|
@@ -10,14 +10,14 @@ import Select from '@bigbinary/neetoui/formik/Select';
|
|
|
10
10
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
11
11
|
import { mergeLeft } from 'ramda';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
|
-
import { u as useUpdateUpiPayment } from './usePaymentsApi-
|
|
13
|
+
import { u as useUpdateUpiPayment } from './usePaymentsApi-DQz8xzHV.js';
|
|
14
14
|
import { t } from 'i18next';
|
|
15
15
|
import * as yup from 'yup';
|
|
16
16
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
17
17
|
import '@babel/runtime/helpers/defineProperty';
|
|
18
18
|
import '@tanstack/react-query';
|
|
19
19
|
import 'axios';
|
|
20
|
-
import './index-
|
|
20
|
+
import './index-ojfe66jf.js';
|
|
21
21
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
22
22
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
23
23
|
|
|
@@ -6,7 +6,7 @@ import Button from '@bigbinary/neetoui/formik/Button';
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
8
|
import axios from 'axios';
|
|
9
|
-
import { B as BASE_URL } from './index-
|
|
9
|
+
import { B as BASE_URL } from './index-ojfe66jf.js';
|
|
10
10
|
import { useQuery } from '@tanstack/react-query';
|
|
11
11
|
import { isNotNil } from 'ramda';
|
|
12
12
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
@@ -10,7 +10,7 @@ import { mergeLeft } from 'ramda';
|
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
11
|
import { useMutation } from '@tanstack/react-query';
|
|
12
12
|
import axios from 'axios';
|
|
13
|
-
import { B as BASE_URL, u as uuidV4 } from './index-
|
|
13
|
+
import { B as BASE_URL, u as uuidV4 } from './index-ojfe66jf.js';
|
|
14
14
|
import { e as exportChannel } from './exportChannel-CViICC6x.js';
|
|
15
15
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
16
16
|
|
|
@@ -128,4 +128,4 @@ var ExportModal = function ExportModal(_ref) {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
export { ExportModal as E };
|
|
131
|
-
//# sourceMappingURL=ExportModal-
|
|
131
|
+
//# sourceMappingURL=ExportModal-BsFxUaYJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportModal-
|
|
1
|
+
{"version":3,"file":"ExportModal-BsFxUaYJ.js","sources":["../app/javascript/src/apis/exports.js","../app/javascript/src/hooks/reactQuery/useExportsApi.js","../app/javascript/src/components/Common/ExportModal.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(\n `${BASE_URL}/api/v1/exports`,\n { export: payload },\n { showToastr: false }\n );\n\nconst exportsApi = { create };\n\nexport default exportsApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport exportsApi from \"apis/exports\";\n\nexport const useExportsData = () =>\n useMutation({ mutationFn: exportsApi.create });\n","import { useEffect, useMemo, useState } from \"react\";\n\nimport { isPresent, camelToSnakeCase } from \"neetocist\";\nimport { getQueryParams } from \"neetocommons/utils\";\nimport { Download } from \"neetoicons\";\nimport { Button, Modal, Typography } from \"neetoui\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useExportsData } from \"hooks/reactQuery/useExportsApi\";\nimport exportChannel from \"src/channels/exportChannel\";\nimport { uuidV4 } from \"utils\";\n\nconst ExportModal = ({\n filters,\n dashboardKind,\n holdableIds,\n sortProperties,\n isExportModalOpen,\n setIsExportModalOpen,\n}) => {\n const { t } = useTranslation();\n const [downloadUrl, setDownloadUrl] = useState(\"\");\n const [isGenerating, setIsGenerating] = useState(false);\n\n const { tab = \"all\" } = getQueryParams();\n\n const { mutate: exportsData } = useExportsData();\n\n const token = useMemo(\n () => `${dashboardKind}-report-${uuidV4()}`,\n [dashboardKind]\n );\n\n const receivedCallback = data => {\n if (!data.download_url) return;\n setDownloadUrl(data.download_url);\n setIsGenerating(false);\n };\n\n useEffect(() => {\n if (isExportModalOpen) {\n const channel = exportChannel(token, receivedCallback);\n setDownloadUrl(\"\");\n setIsGenerating(false);\n\n return () => {\n channel.disconnected();\n };\n }\n\n return undefined;\n }, [isExportModalOpen, token]);\n\n const onClose = () => setIsExportModalOpen(false);\n\n const handleExport = () => {\n setDownloadUrl(\"\");\n setIsGenerating(true);\n const payload = mergeLeft(sortProperties, {\n token,\n filters,\n tab,\n holdableIds,\n dashboard: camelToSnakeCase(dashboardKind),\n });\n\n exportsData(payload);\n };\n\n return (\n <Modal {...{ onClose }} isOpen={isExportModalOpen}>\n <Modal.Header>\n <Typography style=\"h2\">\n {t(`neetoPayments.export.title.${dashboardKind}`)}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n {isGenerating ? (\n <Typography style=\"body2\">\n {t(\"neetoPayments.export.pleaseWait\")}\n </Typography>\n ) : (\n <Typography style=\"body2\">\n {isPresent(downloadUrl)\n ? t(\"neetoPayments.export.fileReady\")\n : t(`neetoPayments.export.download.${dashboardKind}`)}\n </Typography>\n )}\n </Modal.Body>\n <Modal.Footer className=\"space-x-2\">\n {isPresent(downloadUrl) ? (\n <Button\n href={downloadUrl}\n icon={Download}\n label={t(\"neetoPayments.common.download\")}\n onClick={onClose}\n />\n ) : (\n <>\n <Button\n disabled={isGenerating}\n label={t(\"neetoPayments.common.cancel\")}\n style=\"tertiary\"\n onClick={onClose}\n />\n <Button\n disabled={isGenerating}\n label={t(\"neetoPayments.common.export\")}\n loading={isGenerating}\n onClick={handleExport}\n />\n </>\n )}\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default ExportModal;\n"],"names":["create","payload","axios","post","concat","BASE_URL","showToastr","exportsApi","useExportsData","useMutation","mutationFn","ExportModal","_ref","filters","dashboardKind","holdableIds","sortProperties","isExportModalOpen","setIsExportModalOpen","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","downloadUrl","setDownloadUrl","_useState3","_useState4","isGenerating","setIsGenerating","_getQueryParams","getQueryParams","_getQueryParams$tab","tab","_useExportsData","exportsData","mutate","token","useMemo","uuidV4","receivedCallback","data","download_url","useEffect","channel","exportChannel","disconnected","undefined","onClose","handleExport","mergeLeft","dashboard","camelToSnakeCase","_jsxs","Modal","isOpen","children","_jsx","Header","Typography","style","Body","isPresent","Footer","className","Button","href","icon","Download","label","onClick","_Fragment","disabled","loading"],"mappings":";;;;;;;;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CACLC,QAAQ,EACX,iBAAA,CAAA,EAAA;IAAE,QAAQJ,EAAAA;AAAQ,GAAC,EACnB;AAAEK,IAAAA,UAAU,EAAE;AAAM,GACtB,CAAC;AAAA,CAAA;AAEH,IAAMC,UAAU,GAAG;AAAEP,EAAAA,MAAM,EAANA;AAAO,CAAC;;ACPtB,IAAMQ,cAAc,GAAG,SAAjBA,cAAcA,GAAA;AAAA,EAAA,OACzBC,WAAW,CAAC;IAAEC,UAAU,EAAEH,UAAU,CAACP;AAAO,GAAC,CAAC;AAAA,CAAA;;ACQhD,IAAMW,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAOX;AAAA,EAAA,IANJC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,aAAa,GAAAF,IAAA,CAAbE,aAAa;IACbC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,iBAAiB,GAAAL,IAAA,CAAjBK,iBAAiB;IACjBC,oBAAoB,GAAAN,IAAA,CAApBM,oBAAoB;AAEpB,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AACT,EAAA,IAAAC,SAAA,GAAsCC,QAAQ,CAAC,EAAE,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAA3CI,IAAAA,WAAW,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,cAAc,GAAAH,UAAA,CAAA,CAAA,CAAA;AAClC,EAAA,IAAAI,UAAA,GAAwCL,QAAQ,CAAC,K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AA,CAAkCU,aAAa,CAAE;OAC5C;AACb,KACS,CAAC,eACb6C,GAAA,CAACH,KAAK,CAACS,MAAM,EAAA;AAACC,MAAAA,SAAS,EAAC,WAAW;MAAAR,QAAA,EAChCM,SAAS,CAACtC,WAAW,CAAC,gBACrBiC,GAAA,CAACQ,MAAM,EAAA;AACLC,QAAAA,IAAI,EAAE1C,WAAY;AAClB2C,QAAAA,IAAI,EAAEC,QAAS;AACfC,QAAAA,KAAK,EAAElD,CAAC,CAAC,+BAA+B,CAAE;AAC1CmD,QAAAA,OAAO,EAAEtB;AAAQ,OAClB,CAAC,gBAEFK,IAAA,CAAAkB,QAAA,EAAA;QAAAf,QAAA,EAAA,cACEC,GAAA,CAACQ,MAAM,EAAA;AACLO,UAAAA,QAAQ,EAAE5C,YAAa;AACvByC,UAAAA,KAAK,EAAElD,CAAC,CAAC,6BAA6B,CAAE;AACxCyC,UAAAA,KAAK,EAAC,UAAU;AAChBU,UAAAA,OAAO,EAAEtB;AAAQ,SAClB,CAAC,eACFS,GAAA,CAACQ,MAAM,EAAA;AACLO,UAAAA,QAAQ,EAAE5C,YAAa;AACvByC,UAAAA,KAAK,EAAElD,CAAC,CAAC,6BAA6B,CAAE;AACxCsD,UAAAA,OAAO,EAAE7C,YAAa;AACtB0C,UAAAA,OAAO,EAAErB;AAAa,SACvB,CAAC;OACF;AACH,KACW,CAAC;AAAA,GACV,CAAC;AAEZ;;;;"}
|
|
@@ -14,7 +14,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
14
14
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
15
15
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
16
16
|
import axios from 'axios';
|
|
17
|
-
import { B as BASE_URL } from './index-
|
|
17
|
+
import { B as BASE_URL } from './index-ojfe66jf.js';
|
|
18
18
|
import { t } from 'i18next';
|
|
19
19
|
import * as yup from 'yup';
|
|
20
20
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -8,10 +8,10 @@ import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
|
8
8
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
9
9
|
import { map, curry, concat, mergeDeepWith, mergeLeft, reject, isNil, prop, isEmpty, modify } from 'ramda';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
|
-
import { E as ExportModal } from './ExportModal-
|
|
11
|
+
import { E as ExportModal } from './ExportModal-BsFxUaYJ.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import axios from 'axios';
|
|
14
|
-
import { B as BASE_URL, P as PAYMENT_PROVIDERS, c as DEFAULT_TAG_STYLE, f as formatAmount, d as formatCurrency, e as getUniquePaymentProviders, h as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, i as DEFAULT_PAGE_VALUES, j as DASHBOARD_KIND } from './index-
|
|
14
|
+
import { B as BASE_URL, P as PAYMENT_PROVIDERS, c as DEFAULT_TAG_STYLE, f as formatAmount, d as formatCurrency, e as getUniquePaymentProviders, h as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, i as DEFAULT_PAGE_VALUES, j as DASHBOARD_KIND } from './index-ojfe66jf.js';
|
|
15
15
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
16
16
|
import { t } from 'i18next';
|
|
17
17
|
import { toLabelAndValue, isNotPresent, snakeToCamelCase, humanize, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
|
package/dist/PayoutsDashboard.js
CHANGED
|
@@ -8,13 +8,13 @@ import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
|
|
|
8
8
|
import Tab from '@bigbinary/neetoui/Tab';
|
|
9
9
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-
|
|
11
|
+
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-C5diLksA.js';
|
|
12
12
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
13
13
|
import Download from '@bigbinary/neeto-icons/Download';
|
|
14
14
|
import Button from '@bigbinary/neetoui/Button';
|
|
15
15
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
16
16
|
import { e as exportChannel } from './exportChannel-CViICC6x.js';
|
|
17
|
-
import { u as uuidV4, D as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-
|
|
17
|
+
import { u as uuidV4, D as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-ojfe66jf.js';
|
|
18
18
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
20
20
|
import { camelToSnakeCase, removeBy, snakeToCamelCase, isPresent } from '@bigbinary/neeto-cist';
|
|
@@ -22,7 +22,7 @@ import { buildUrl, getQueryParams } from '@bigbinary/neeto-commons-frontend/util
|
|
|
22
22
|
import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
23
23
|
import { curry, assoc, insert, mergeLeft } from 'ramda';
|
|
24
24
|
import { useHistory } from 'react-router-dom';
|
|
25
|
-
import { r as renderStatus, b as renderDate } from './renderFunctions-
|
|
25
|
+
import { r as renderStatus, b as renderDate } from './renderFunctions-ObVxaGJ7.js';
|
|
26
26
|
import { C as CopyButtonWrapper } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
27
27
|
import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from '@bigbinary/neeto-commons-frontend/constants';
|
|
28
28
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
@@ -30,7 +30,7 @@ import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
|
30
30
|
import Table from '@bigbinary/neetoui/Table';
|
|
31
31
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
32
32
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
33
|
-
import { u as useFetchStripePayouts, a as useFetchStripePlatformPayouts } from './usePlatformApi-
|
|
33
|
+
import { u as useFetchStripePayouts, a as useFetchStripePlatformPayouts } from './usePlatformApi-CFaJ_LxH.js';
|
|
34
34
|
import '@tanstack/react-query';
|
|
35
35
|
import '@tanstack/react-query-devtools';
|
|
36
36
|
import 'axios';
|
package/dist/PayoutsPage.js
CHANGED
|
@@ -4,11 +4,11 @@ import Spinner from '@bigbinary/neetoui/Spinner';
|
|
|
4
4
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { useParams } from 'react-router-dom/cjs/react-router-dom';
|
|
7
|
-
import { r as renderStatus, b as renderDate } from './renderFunctions-
|
|
8
|
-
import { b as useShowStripePayout, c as useShowStripePlatformPayout } from './usePlatformApi-
|
|
7
|
+
import { r as renderStatus, b as renderDate } from './renderFunctions-ObVxaGJ7.js';
|
|
8
|
+
import { b as useShowStripePayout, c as useShowStripePlatformPayout } from './usePlatformApi-CFaJ_LxH.js';
|
|
9
9
|
import Button from '@bigbinary/neetoui/Button';
|
|
10
10
|
import { C as CopyButtonWrapper } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
11
|
-
import { k as buildStripePayoutLink } from './index-
|
|
11
|
+
import { k as buildStripePayoutLink } from './index-ojfe66jf.js';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
import 'i18next';
|
|
14
14
|
import '@bigbinary/neeto-molecules/DateFormat';
|
|
@@ -4,8 +4,8 @@ import { noop, findBy, isNotPresent } from '@bigbinary/neeto-cist';
|
|
|
4
4
|
import Button from '@bigbinary/neetoui/Button';
|
|
5
5
|
import { mergeDeepLeft } from 'ramda';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { u as useCreateRazorpayPayment } from './usePaymentApi-
|
|
8
|
-
import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-
|
|
7
|
+
import { u as useCreateRazorpayPayment } from './usePaymentApi-B8ZEA19B.js';
|
|
8
|
+
import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-ojfe66jf.js';
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
import '@babel/runtime/helpers/defineProperty';
|
|
11
11
|
import '@tanstack/react-query';
|
|
@@ -14,7 +14,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
14
14
|
import { useQuery } from '@tanstack/react-query';
|
|
15
15
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
16
16
|
import axios from 'axios';
|
|
17
|
-
import { B as BASE_URL } from './index-
|
|
17
|
+
import { B as BASE_URL } from './index-ojfe66jf.js';
|
|
18
18
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
19
19
|
import { t } from 'i18next';
|
|
20
20
|
import * as yup from 'yup';
|
package/dist/RefundsDashboard.js
CHANGED
|
@@ -8,10 +8,10 @@ import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
|
8
8
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
9
9
|
import { map, curry, mergeDeepWith, concat, mergeLeft, reject, isNil, prop, isEmpty, modify } from 'ramda';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
|
-
import { E as ExportModal } from './ExportModal-
|
|
11
|
+
import { E as ExportModal } from './ExportModal-BsFxUaYJ.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import axios from 'axios';
|
|
14
|
-
import { B as BASE_URL, P as PAYMENT_PROVIDERS, c as DEFAULT_TAG_STYLE, f as formatAmount, d as formatCurrency, h as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, i as DEFAULT_PAGE_VALUES, j as DASHBOARD_KIND } from './index-
|
|
14
|
+
import { B as BASE_URL, P as PAYMENT_PROVIDERS, c as DEFAULT_TAG_STYLE, f as formatAmount, d as formatCurrency, h as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, i as DEFAULT_PAGE_VALUES, j as DASHBOARD_KIND } from './index-ojfe66jf.js';
|
|
15
15
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
16
16
|
import { t } from 'i18next';
|
|
17
17
|
import { toLabelAndValue, snakeToCamelCase, humanize, isPresent, isNotPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
|
|
@@ -8,11 +8,11 @@ import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
|
8
8
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
9
9
|
import { mergeLeft, curry, mergeDeepWith, concat, reject, isNil, map, prop, sortBy, isEmpty, modify, pluck } from 'ramda';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
|
-
import { E as ExportModal } from './ExportModal-
|
|
11
|
+
import { E as ExportModal } from './ExportModal-BsFxUaYJ.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
14
14
|
import axios from 'axios';
|
|
15
|
-
import { B as BASE_URL, l as preProcessStatus, m as getTagStyle, f as formatAmount, d as formatCurrency, n as PAYMENT_KIND, p as processDataIndex, S as SORT_DIRECTIONS, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, i as DEFAULT_PAGE_VALUES, j as DASHBOARD_KIND } from './index-
|
|
15
|
+
import { B as BASE_URL, l as preProcessStatus, m as getTagStyle, f as formatAmount, d as formatCurrency, n as PAYMENT_KIND, p as processDataIndex, S as SORT_DIRECTIONS, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, i as DEFAULT_PAGE_VALUES, j as DASHBOARD_KIND } from './index-ojfe66jf.js';
|
|
16
16
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
17
17
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
18
18
|
import Typography from '@bigbinary/neetoui/Typography';
|
package/dist/TaxesDashboard.js
CHANGED
|
@@ -15,7 +15,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
15
15
|
import { useQuery } from '@tanstack/react-query';
|
|
16
16
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
17
17
|
import axios from 'axios';
|
|
18
|
-
import { B as BASE_URL } from './index-
|
|
18
|
+
import { B as BASE_URL } from './index-ojfe66jf.js';
|
|
19
19
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
20
20
|
import Label from '@bigbinary/neetoui/Label';
|
|
21
21
|
import Typography from '@bigbinary/neetoui/Typography';
|
package/dist/UpiPayment.js
CHANGED
|
@@ -7,13 +7,13 @@ import Input from '@bigbinary/neetoui/formik/Input';
|
|
|
7
7
|
import QRCodeImage from 'qrcode.react';
|
|
8
8
|
import { pluck } from 'ramda';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
|
-
import { a as useCreateUpiPayment } from './usePaymentsApi-
|
|
10
|
+
import { a as useCreateUpiPayment } from './usePaymentsApi-DQz8xzHV.js';
|
|
11
11
|
import { t } from 'i18next';
|
|
12
12
|
import * as yup from 'yup';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
import '@tanstack/react-query';
|
|
15
15
|
import 'axios';
|
|
16
|
-
import './index-
|
|
16
|
+
import './index-ojfe66jf.js';
|
|
17
17
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
18
18
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
19
19
|
|
|
@@ -11,20 +11,20 @@ var SubHeader = require('@bigbinary/neeto-molecules/SubHeader');
|
|
|
11
11
|
var Tab = require('@bigbinary/neetoui/Tab');
|
|
12
12
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
13
13
|
var reactI18next = require('react-i18next');
|
|
14
|
-
var dashboard = require('./dashboard-
|
|
14
|
+
var dashboard = require('./dashboard-Bjhw-y9S.js');
|
|
15
15
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
16
16
|
var Download = require('@bigbinary/neeto-icons/Download');
|
|
17
17
|
var Button = require('@bigbinary/neetoui/Button');
|
|
18
18
|
var Modal = require('@bigbinary/neetoui/Modal');
|
|
19
19
|
var exportChannel = require('./exportChannel-BsZ3fusx.js');
|
|
20
|
-
var constants = require('./index-
|
|
20
|
+
var constants = require('./index-CihS_E6s.js');
|
|
21
21
|
var jsxRuntime = require('react/jsx-runtime');
|
|
22
22
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
23
23
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
24
24
|
var utils$1 = require('@bigbinary/neeto-filters-frontend/utils');
|
|
25
25
|
var ramda = require('ramda');
|
|
26
26
|
var reactRouterDom = require('react-router-dom');
|
|
27
|
-
var renderFunctions = require('./renderFunctions-
|
|
27
|
+
var renderFunctions = require('./renderFunctions-CbgNQLUZ.js');
|
|
28
28
|
var CopyButtonWrapper = require('./CopyButtonWrapper-Ds1k64E0.js');
|
|
29
29
|
var constants$1 = require('@bigbinary/neeto-commons-frontend/constants');
|
|
30
30
|
var Columns = require('@bigbinary/neeto-molecules/Columns');
|
|
@@ -8,7 +8,7 @@ var reactI18next = require('react-i18next');
|
|
|
8
8
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
9
9
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
10
10
|
var axios = require('axios');
|
|
11
|
-
var constants = require('./index-
|
|
11
|
+
var constants = require('./index-CihS_E6s.js');
|
|
12
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
13
|
require('i18next');
|
|
14
14
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
5
|
+
var reactI18next = require('react-i18next');
|
|
6
|
+
var usePaymentApi = require('./usePaymentApi-BR4z3fpQ.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
9
|
+
require('@tanstack/react-query');
|
|
10
|
+
require('axios');
|
|
11
|
+
require('./index-CihS_E6s.js');
|
|
12
|
+
require('i18next');
|
|
13
|
+
require('@bigbinary/neeto-commons-frontend/constants');
|
|
14
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
15
|
+
require('ramda');
|
|
16
|
+
|
|
17
|
+
var CashPaymentButton = function CashPaymentButton(_ref) {
|
|
18
|
+
var label = _ref.label,
|
|
19
|
+
payableId = _ref.payableId,
|
|
20
|
+
payableType = _ref.payableType,
|
|
21
|
+
discountCode = _ref.discountCode,
|
|
22
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
23
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
24
|
+
_ref$isLoading = _ref.isLoading,
|
|
25
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
26
|
+
_ref$onBeforePayment = _ref.onBeforePayment,
|
|
27
|
+
onBeforePayment = _ref$onBeforePayment === void 0 ? neetoCist.noop : _ref$onBeforePayment,
|
|
28
|
+
_ref$onFailedPayment = _ref.onFailedPayment,
|
|
29
|
+
onFailedPayment = _ref$onFailedPayment === void 0 ? neetoCist.noop : _ref$onFailedPayment,
|
|
30
|
+
_ref$onSuccessfulPaym = _ref.onSuccessfulPayment,
|
|
31
|
+
onSuccessfulPayment = _ref$onSuccessfulPaym === void 0 ? neetoCist.noop : _ref$onSuccessfulPaym;
|
|
32
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
33
|
+
t = _useTranslation.t;
|
|
34
|
+
var _useCreateCashPayment = usePaymentApi.useCreateCashPayment({
|
|
35
|
+
onSuccess: onSuccessfulPayment,
|
|
36
|
+
onError: onFailedPayment
|
|
37
|
+
}),
|
|
38
|
+
isPending = _useCreateCashPayment.isPending,
|
|
39
|
+
createCashPayment = _useCreateCashPayment.mutate;
|
|
40
|
+
var handleSubmit = function handleSubmit() {
|
|
41
|
+
onBeforePayment();
|
|
42
|
+
createCashPayment({
|
|
43
|
+
payableId: payableId,
|
|
44
|
+
payableType: payableType,
|
|
45
|
+
discountCode: discountCode
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
49
|
+
disabled: isPending || isDisabled,
|
|
50
|
+
label: label || t("neetoPayments.common.proceed"),
|
|
51
|
+
loading: isPending || isLoading,
|
|
52
|
+
onClick: handleSubmit
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
module.exports = CashPaymentButton;
|
|
57
|
+
//# sourceMappingURL=CashPaymentButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CashPaymentButton.js","sources":["../../app/javascript/src/components/CashPaymentButton.jsx"],"sourcesContent":["import { noop } from \"neetocist\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateCashPayment } from \"hooks/reactQuery/cash/usePaymentApi\";\n\nconst CashPaymentButton = ({\n label,\n payableId,\n payableType,\n discountCode,\n isDisabled = false,\n isLoading = false,\n onBeforePayment = noop,\n onFailedPayment = noop,\n onSuccessfulPayment = noop,\n}) => {\n const { t } = useTranslation();\n\n const { isPending, mutate: createCashPayment } = useCreateCashPayment({\n onSuccess: onSuccessfulPayment,\n onError: onFailedPayment,\n });\n\n const handleSubmit = () => {\n onBeforePayment();\n createCashPayment({ payableId, payableType, discountCode });\n };\n\n return (\n <Button\n disabled={isPending || isDisabled}\n label={label || t(\"neetoPayments.common.proceed\")}\n loading={isPending || isLoading}\n onClick={handleSubmit}\n />\n );\n};\n\nexport default CashPaymentButton;\n"],"names":["CashPaymentButton","_ref","label","payableId","payableType","discountCode","_ref$isDisabled","isDisabled","_ref$isLoading","isLoading","_ref$onBeforePayment","onBeforePayment","noop","_ref$onFailedPayment","onFailedPayment","_ref$onSuccessfulPaym","onSuccessfulPayment","_useTranslation","useTranslation","t","_useCreateCashPayment","useCreateCashPayment","onSuccess","onError","isPending","createCashPayment","mutate","handleSubmit","_jsx","Button","disabled","loading","onClick"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAUjB;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAAC,eAAA,GAAAL,IAAA,CACZM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAAAE,cAAA,GAAAP,IAAA,CAClBQ,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,cAAA;IAAAE,oBAAA,GAAAT,IAAA,CACjBU,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAGE,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