@bigbinary/neeto-payments-frontend 3.2.2 → 3.2.4
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 +13 -2
- package/dist/PaymentsDashboard.js +14 -2
- package/dist/PaymentsDashboard.js.map +1 -1
- package/dist/UpiPayment.js +13 -97
- package/dist/UpiPayment.js.map +1 -1
- package/dist/cjs/PaymentsDashboard.js +14 -2
- package/dist/cjs/PaymentsDashboard.js.map +1 -1
- package/dist/cjs/UpiPayment.js +14 -113
- package/dist/cjs/UpiPayment.js.map +1 -1
- package/dist/cjs/index-Cad6GOm0.js +178 -0
- package/dist/cjs/index-Cad6GOm0.js.map +1 -0
- package/dist/cjs/index.js +131 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/index-BWLyK2S8.js +154 -0
- package/dist/index-BWLyK2S8.js.map +1 -0
- package/dist/index.js +132 -15
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/dist/UpiMarkAsPaidButton.js +0 -41
- package/dist/UpiMarkAsPaidButton.js.map +0 -1
- package/dist/cjs/UpiMarkAsPaidButton.js +0 -43
- package/dist/cjs/UpiMarkAsPaidButton.js.map +0 -1
- package/dist/cjs/usePaymentsApi-CRiwy7_v.js +0 -41
- package/dist/cjs/usePaymentsApi-CRiwy7_v.js.map +0 -1
- package/dist/usePaymentsApi-1Lsm4d5C.js +0 -38
- package/dist/usePaymentsApi-1Lsm4d5C.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-payments-frontend",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "To manage payments across the neeto products.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-payments-nano",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"@bigbinary/babel-preset-neeto": "^1.0.3",
|
|
61
61
|
"@bigbinary/eslint-plugin-neeto": "1.5.6",
|
|
62
62
|
"@bigbinary/neeto-cist": "1.0.14",
|
|
63
|
-
"@bigbinary/neeto-commons-frontend": "4.13.
|
|
64
|
-
"@bigbinary/neeto-editor": "1.
|
|
63
|
+
"@bigbinary/neeto-commons-frontend": "4.13.15",
|
|
64
|
+
"@bigbinary/neeto-editor": "1.45.0",
|
|
65
65
|
"@bigbinary/neeto-filters-frontend": "4.3.13",
|
|
66
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
67
|
-
"@bigbinary/neeto-molecules": "3.15.
|
|
68
|
-
"@bigbinary/neetoui": "8.2.
|
|
66
|
+
"@bigbinary/neeto-icons": "1.20.23",
|
|
67
|
+
"@bigbinary/neeto-molecules": "3.15.9",
|
|
68
|
+
"@bigbinary/neetoui": "8.2.54",
|
|
69
69
|
"@emotion/is-prop-valid": "1.2.0",
|
|
70
70
|
"@faker-js/faker": "8.2.0",
|
|
71
71
|
"@honeybadger-io/js": "6.10.1",
|
|
@@ -170,12 +170,12 @@
|
|
|
170
170
|
"peerDependencies": {
|
|
171
171
|
"@babel/runtime": "7.26.0",
|
|
172
172
|
"@bigbinary/neeto-cist": "1.0.14",
|
|
173
|
-
"@bigbinary/neeto-commons-frontend": "4.13.
|
|
174
|
-
"@bigbinary/neeto-editor": "1.
|
|
173
|
+
"@bigbinary/neeto-commons-frontend": "4.13.15",
|
|
174
|
+
"@bigbinary/neeto-editor": "1.45.0",
|
|
175
175
|
"@bigbinary/neeto-filters-frontend": "4.3.13",
|
|
176
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
177
|
-
"@bigbinary/neeto-molecules": "3.15.
|
|
178
|
-
"@bigbinary/neetoui": "8.2.
|
|
176
|
+
"@bigbinary/neeto-icons": "1.20.23",
|
|
177
|
+
"@bigbinary/neeto-molecules": "3.15.9",
|
|
178
|
+
"@bigbinary/neetoui": "8.2.54",
|
|
179
179
|
"@honeybadger-io/js": "6.10.1",
|
|
180
180
|
"@honeybadger-io/react": "6.1.25",
|
|
181
181
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { noop } from '@bigbinary/neeto-cist';
|
|
2
|
-
import Button from '@bigbinary/neetoui/Button';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { u as useUpdateUpiPayment } from './usePaymentsApi-1Lsm4d5C.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-Cl511Juk.js';
|
|
10
|
-
import 'i18next';
|
|
11
|
-
import '@bigbinary/neeto-commons-frontend/constants';
|
|
12
|
-
import '@bigbinary/neeto-commons-frontend/utils';
|
|
13
|
-
import 'ramda';
|
|
14
|
-
|
|
15
|
-
var UpiMarkAsPaidButton = function UpiMarkAsPaidButton(_ref) {
|
|
16
|
-
var paymentId = _ref.paymentId,
|
|
17
|
-
payableId = _ref.payableId,
|
|
18
|
-
_ref$onSuccess = _ref.onSuccess,
|
|
19
|
-
onSuccess = _ref$onSuccess === void 0 ? noop : _ref$onSuccess;
|
|
20
|
-
var _useTranslation = useTranslation(),
|
|
21
|
-
t = _useTranslation.t;
|
|
22
|
-
var _useUpdateUpiPayment = useUpdateUpiPayment(paymentId, {
|
|
23
|
-
onSuccess: onSuccess
|
|
24
|
-
}),
|
|
25
|
-
updateUpiPayment = _useUpdateUpiPayment.mutate,
|
|
26
|
-
isPending = _useUpdateUpiPayment.isPending;
|
|
27
|
-
var handleClick = function handleClick() {
|
|
28
|
-
return updateUpiPayment({
|
|
29
|
-
status: "successful",
|
|
30
|
-
payableId: payableId
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
return /*#__PURE__*/jsx(Button, {
|
|
34
|
-
label: t("neetoPayments.upi.payment.buttons.markAsPaid"),
|
|
35
|
-
loading: isPending,
|
|
36
|
-
onClick: handleClick
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export { UpiMarkAsPaidButton as default };
|
|
41
|
-
//# sourceMappingURL=UpiMarkAsPaidButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UpiMarkAsPaidButton.js","sources":["../app/javascript/src/components/UpiMarkAsPaidButton.jsx"],"sourcesContent":["import { noop } from \"neetocist\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useUpdateUpiPayment } from \"hooks/reactQuery/upi/usePaymentsApi\";\n\nconst UpiMarkAsPaidButton = ({ paymentId, payableId, onSuccess = noop }) => {\n const { t } = useTranslation();\n const { mutate: updateUpiPayment, isPending } = useUpdateUpiPayment(\n paymentId,\n { onSuccess }\n );\n\n const handleClick = () =>\n updateUpiPayment({ status: \"successful\", payableId });\n\n return (\n <Button\n label={t(\"neetoPayments.upi.payment.buttons.markAsPaid\")}\n loading={isPending}\n onClick={handleClick}\n />\n );\n};\n\nexport default UpiMarkAsPaidButton;\n"],"names":["UpiMarkAsPaidButton","_ref","paymentId","payableId","_ref$onSuccess","onSuccess","noop","_useTranslation","useTranslation","t","_useUpdateUpiPayment","useUpdateUpiPayment","updateUpiPayment","mutate","isPending","handleClick","status","_jsx","Button","label","loading","onClick"],"mappings":";;;;;;;;;;;;;;AAMA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAAC,cAAA,GAAAH,IAAA,CAAEI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAGE,KAAAA,CAAAA,GAAAA,IAAI,GAAAF,cAAA;AACnE,EAAA,IAAAG,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AACT,EAAA,IAAAC,oBAAA,GAAgDC,mBAAmB,CACjET,SAAS,EACT;AAAEG,MAAAA,SAAS,EAATA;AAAU,KACd,CAAC;IAHeO,gBAAgB,GAAAF,oBAAA,CAAxBG,MAAM;IAAoBC,SAAS,GAAAJ,oBAAA,CAATI,SAAS;AAK3C,EAAA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,IAAA,OACfH,gBAAgB,CAAC;AAAEI,MAAAA,MAAM,EAAE,YAAY;AAAEb,MAAAA,SAAS,EAATA;AAAU,KAAC,CAAC;AAAA,GAAA;EAEvD,oBACEc,GAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,KAAK,EAAEV,CAAC,CAAC,8CAA8C,CAAE;AACzDW,IAAAA,OAAO,EAAEN,SAAU;AACnBO,IAAAA,OAAO,EAAEN;AAAY,GACtB,CAAC;AAEN;;;;"}
|
|
@@ -1,43 +0,0 @@
|
|
|
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 usePaymentsApi = require('./usePaymentsApi-CRiwy7_v.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-DFhiGrTx.js');
|
|
12
|
-
require('i18next');
|
|
13
|
-
require('@bigbinary/neeto-commons-frontend/constants');
|
|
14
|
-
require('@bigbinary/neeto-commons-frontend/utils');
|
|
15
|
-
require('ramda');
|
|
16
|
-
|
|
17
|
-
var UpiMarkAsPaidButton = function UpiMarkAsPaidButton(_ref) {
|
|
18
|
-
var paymentId = _ref.paymentId,
|
|
19
|
-
payableId = _ref.payableId,
|
|
20
|
-
_ref$onSuccess = _ref.onSuccess,
|
|
21
|
-
onSuccess = _ref$onSuccess === void 0 ? neetoCist.noop : _ref$onSuccess;
|
|
22
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
23
|
-
t = _useTranslation.t;
|
|
24
|
-
var _useUpdateUpiPayment = usePaymentsApi.useUpdateUpiPayment(paymentId, {
|
|
25
|
-
onSuccess: onSuccess
|
|
26
|
-
}),
|
|
27
|
-
updateUpiPayment = _useUpdateUpiPayment.mutate,
|
|
28
|
-
isPending = _useUpdateUpiPayment.isPending;
|
|
29
|
-
var handleClick = function handleClick() {
|
|
30
|
-
return updateUpiPayment({
|
|
31
|
-
status: "successful",
|
|
32
|
-
payableId: payableId
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36
|
-
label: t("neetoPayments.upi.payment.buttons.markAsPaid"),
|
|
37
|
-
loading: isPending,
|
|
38
|
-
onClick: handleClick
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
module.exports = UpiMarkAsPaidButton;
|
|
43
|
-
//# sourceMappingURL=UpiMarkAsPaidButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UpiMarkAsPaidButton.js","sources":["../../app/javascript/src/components/UpiMarkAsPaidButton.jsx"],"sourcesContent":["import { noop } from \"neetocist\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useUpdateUpiPayment } from \"hooks/reactQuery/upi/usePaymentsApi\";\n\nconst UpiMarkAsPaidButton = ({ paymentId, payableId, onSuccess = noop }) => {\n const { t } = useTranslation();\n const { mutate: updateUpiPayment, isPending } = useUpdateUpiPayment(\n paymentId,\n { onSuccess }\n );\n\n const handleClick = () =>\n updateUpiPayment({ status: \"successful\", payableId });\n\n return (\n <Button\n label={t(\"neetoPayments.upi.payment.buttons.markAsPaid\")}\n loading={isPending}\n onClick={handleClick}\n />\n );\n};\n\nexport default UpiMarkAsPaidButton;\n"],"names":["UpiMarkAsPaidButton","_ref","paymentId","payableId","_ref$onSuccess","onSuccess","noop","_useTranslation","useTranslation","t","_useUpdateUpiPayment","useUpdateUpiPayment","updateUpiPayment","mutate","isPending","handleClick","status","_jsx","Button","label","loading","onClick"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAAC,cAAA,GAAAH,IAAA,CAAEI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAGE,KAAAA,CAAAA,GAAAA,cAAI,GAAAF,cAAA;AACnE,EAAA,IAAAG,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AACT,EAAA,IAAAC,oBAAA,GAAgDC,kCAAmB,CACjET,SAAS,EACT;AAAEG,MAAAA,SAAS,EAATA;AAAU,KACd,CAAC;IAHeO,gBAAgB,GAAAF,oBAAA,CAAxBG,MAAM;IAAoBC,SAAS,GAAAJ,oBAAA,CAATI,SAAS;AAK3C,EAAA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,IAAA,OACfH,gBAAgB,CAAC;AAAEI,MAAAA,MAAM,EAAE,YAAY;AAAEb,MAAAA,SAAS,EAATA;AAAU,KAAC,CAAC;AAAA,GAAA;EAEvD,oBACEc,cAAA,CAACC,MAAM,EAAA;AACLC,IAAAA,KAAK,EAAEV,CAAC,CAAC,8CAA8C,CAAE;AACzDW,IAAAA,OAAO,EAAEN,SAAU;AACnBO,IAAAA,OAAO,EAAEN;AAAY,GACtB,CAAC;AAEN;;;;"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var reactQuery = require('@tanstack/react-query');
|
|
5
|
-
var axios = require('axios');
|
|
6
|
-
var constants = require('./index-DFhiGrTx.js');
|
|
7
|
-
|
|
8
|
-
var create = function create(payload) {
|
|
9
|
-
return axios.post("".concat(constants.BASE_URL, "/api/v1/public/upi/payments"), {
|
|
10
|
-
payment: payload
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var update = function update(id, payload) {
|
|
14
|
-
return axios.put("".concat(constants.BASE_URL, "/api/v1/upi/holdable/payments/").concat(id), {
|
|
15
|
-
payment: payload
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var paymentsApi = {
|
|
19
|
-
create: create,
|
|
20
|
-
update: update
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
-
var useCreateUpiPayment = function useCreateUpiPayment(options) {
|
|
26
|
-
return reactQuery.useMutation(_objectSpread({
|
|
27
|
-
mutationFn: paymentsApi.create
|
|
28
|
-
}, options));
|
|
29
|
-
};
|
|
30
|
-
var useUpdateUpiPayment = function useUpdateUpiPayment(id) {
|
|
31
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
32
|
-
return reactQuery.useMutation(_objectSpread({
|
|
33
|
-
mutationFn: function mutationFn(payload) {
|
|
34
|
-
return paymentsApi.update(id, payload);
|
|
35
|
-
}
|
|
36
|
-
}, options));
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.useCreateUpiPayment = useCreateUpiPayment;
|
|
40
|
-
exports.useUpdateUpiPayment = useUpdateUpiPayment;
|
|
41
|
-
//# sourceMappingURL=usePaymentsApi-CRiwy7_v.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentsApi-CRiwy7_v.js","sources":["../../app/javascript/src/apis/upi/payments.js","../../app/javascript/src/hooks/reactQuery/upi/usePaymentsApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/upi/payments`, {\n payment: payload,\n });\n\nconst update = (id, payload) =>\n axios.put(`${BASE_URL}/api/v1/upi/holdable/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { create, update };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport paymentsApi from \"apis/upi/payments\";\n\nexport const useCreateUpiPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateUpiPayment = (id, options = {}) =>\n useMutation({\n mutationFn: payload => paymentsApi.update(id, payload),\n ...options,\n });\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","id","put","paymentsApi","useCreateUpiPayment","options","useMutation","_objectSpread","mutationFn","useUpdateUpiPayment","arguments","length","undefined"],"mappings":";;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,kBAAQ,EAA+B,6BAAA,CAAA,EAAA;AACnDC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAIC,EAAE,EAAEP,OAAO,EAAA;EAAA,OACzBC,KAAK,CAACO,GAAG,CAAAL,EAAAA,CAAAA,MAAA,CAAIC,kBAAQ,EAAAD,gCAAAA,CAAAA,CAAAA,MAAA,CAAiCI,EAAE,CAAI,EAAA;AAC1DF,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMS,WAAW,GAAG;AAAEV,EAAAA,MAAM,EAANA,MAAM;AAAEO,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICVzBI,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,OAAO,EAAA;EAAA,OACxCC,sBAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACV;GAAWY,EAAAA,OAAO,CAAE,CAAC;AAAA;IAEhDI,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIR,EAAE,EAAA;AAAA,EAAA,IAAEI,OAAO,GAAAK,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OAClDJ,sBAAW,CAAAC,aAAA,CAAA;AACTC,IAAAA,UAAU,EAAE,SAAZA,UAAUA,CAAEd,OAAO,EAAA;AAAA,MAAA,OAAIS,WAAW,CAACH,MAAM,CAACC,EAAE,EAAEP,OAAO,CAAC;AAAA;GACnDW,EAAAA,OAAO,CACX,CAAC;AAAA;;;;;"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
-
import { useMutation } from '@tanstack/react-query';
|
|
3
|
-
import axios from 'axios';
|
|
4
|
-
import { B as BASE_URL } from './index-Cl511Juk.js';
|
|
5
|
-
|
|
6
|
-
var create = function create(payload) {
|
|
7
|
-
return axios.post("".concat(BASE_URL, "/api/v1/public/upi/payments"), {
|
|
8
|
-
payment: payload
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var update = function update(id, payload) {
|
|
12
|
-
return axios.put("".concat(BASE_URL, "/api/v1/upi/holdable/payments/").concat(id), {
|
|
13
|
-
payment: payload
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var paymentsApi = {
|
|
17
|
-
create: create,
|
|
18
|
-
update: update
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
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; }
|
|
22
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
-
var useCreateUpiPayment = function useCreateUpiPayment(options) {
|
|
24
|
-
return useMutation(_objectSpread({
|
|
25
|
-
mutationFn: paymentsApi.create
|
|
26
|
-
}, options));
|
|
27
|
-
};
|
|
28
|
-
var useUpdateUpiPayment = function useUpdateUpiPayment(id) {
|
|
29
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
30
|
-
return useMutation(_objectSpread({
|
|
31
|
-
mutationFn: function mutationFn(payload) {
|
|
32
|
-
return paymentsApi.update(id, payload);
|
|
33
|
-
}
|
|
34
|
-
}, options));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { useCreateUpiPayment as a, useUpdateUpiPayment as u };
|
|
38
|
-
//# sourceMappingURL=usePaymentsApi-1Lsm4d5C.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentsApi-1Lsm4d5C.js","sources":["../app/javascript/src/apis/upi/payments.js","../app/javascript/src/hooks/reactQuery/upi/usePaymentsApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/upi/payments`, {\n payment: payload,\n });\n\nconst update = (id, payload) =>\n axios.put(`${BASE_URL}/api/v1/upi/holdable/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { create, update };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport paymentsApi from \"apis/upi/payments\";\n\nexport const useCreateUpiPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateUpiPayment = (id, options = {}) =>\n useMutation({\n mutationFn: payload => paymentsApi.update(id, payload),\n ...options,\n });\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","id","put","paymentsApi","useCreateUpiPayment","options","useMutation","_objectSpread","mutationFn","useUpdateUpiPayment","arguments","length","undefined"],"mappings":";;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,QAAQ,EAA+B,6BAAA,CAAA,EAAA;AACnDC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAIC,EAAE,EAAEP,OAAO,EAAA;EAAA,OACzBC,KAAK,CAACO,GAAG,CAAAL,EAAAA,CAAAA,MAAA,CAAIC,QAAQ,EAAAD,gCAAAA,CAAAA,CAAAA,MAAA,CAAiCI,EAAE,CAAI,EAAA;AAC1DF,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMS,WAAW,GAAG;AAAEV,EAAAA,MAAM,EAANA,MAAM;AAAEO,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICVzBI,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,OAAO,EAAA;EAAA,OACxCC,WAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACV;GAAWY,EAAAA,OAAO,CAAE,CAAC;AAAA;IAEhDI,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIR,EAAE,EAAA;AAAA,EAAA,IAAEI,OAAO,GAAAK,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OAClDJ,WAAW,CAAAC,aAAA,CAAA;AACTC,IAAAA,UAAU,EAAE,SAAZA,UAAUA,CAAEd,OAAO,EAAA;AAAA,MAAA,OAAIS,WAAW,CAACH,MAAM,CAACC,EAAE,EAAEP,OAAO,CAAC;AAAA;GACnDW,EAAAA,OAAO,CACX,CAAC;AAAA;;;;"}
|