@bigbinary/neeto-payments-frontend 1.4.12 → 1.4.13
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 +2 -1
- package/dist/index.cjs.js +39 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +39 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9272,13 +9272,50 @@ var create = function create(payload) {
|
|
|
9272
9272
|
payment: payload
|
|
9273
9273
|
});
|
|
9274
9274
|
};
|
|
9275
|
+
var update = function update(id, payload) {
|
|
9276
|
+
return axios.put("".concat(BASE_URL, "/api/v1/upi/holdable/payments/").concat(id), {
|
|
9277
|
+
payment: payload
|
|
9278
|
+
});
|
|
9279
|
+
};
|
|
9275
9280
|
var paymentsApi = {
|
|
9276
|
-
create: create
|
|
9281
|
+
create: create,
|
|
9282
|
+
update: update
|
|
9277
9283
|
};
|
|
9278
9284
|
|
|
9279
9285
|
var useCreateUpiPayment = function useCreateUpiPayment(options) {
|
|
9280
9286
|
return useMutation(paymentsApi.create, options);
|
|
9281
9287
|
};
|
|
9288
|
+
var useUpdateUpiPayment = function useUpdateUpiPayment(id) {
|
|
9289
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9290
|
+
return useMutation(function (payload) {
|
|
9291
|
+
return paymentsApi.update(id, payload);
|
|
9292
|
+
}, options);
|
|
9293
|
+
};
|
|
9294
|
+
|
|
9295
|
+
var UpiMarkAsPaidButton = function UpiMarkAsPaidButton(_ref) {
|
|
9296
|
+
var paymentId = _ref.paymentId,
|
|
9297
|
+
payableId = _ref.payableId,
|
|
9298
|
+
_ref$onSuccess = _ref.onSuccess,
|
|
9299
|
+
onSuccess = _ref$onSuccess === void 0 ? noop : _ref$onSuccess;
|
|
9300
|
+
var _useTranslation = useTranslation(),
|
|
9301
|
+
t = _useTranslation.t;
|
|
9302
|
+
var _useUpdateUpiPayment = useUpdateUpiPayment(paymentId, {
|
|
9303
|
+
onSuccess: onSuccess
|
|
9304
|
+
}),
|
|
9305
|
+
updateUpiPayment = _useUpdateUpiPayment.mutate,
|
|
9306
|
+
isLoading = _useUpdateUpiPayment.isLoading;
|
|
9307
|
+
var handleClick = function handleClick() {
|
|
9308
|
+
return updateUpiPayment({
|
|
9309
|
+
status: "successful",
|
|
9310
|
+
payableId: payableId
|
|
9311
|
+
});
|
|
9312
|
+
};
|
|
9313
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
|
9314
|
+
label: t("neetoPayments.upi.payment.buttons.markAsPaid"),
|
|
9315
|
+
loading: isLoading,
|
|
9316
|
+
onClick: handleClick
|
|
9317
|
+
});
|
|
9318
|
+
};
|
|
9282
9319
|
|
|
9283
9320
|
var VALIDATION_SCHEMA = yup.object({
|
|
9284
9321
|
transactionId: yup.string().required(t$1("neetoPayments.upi.payment.transaction.required")).min(6, t$1("neetoPayments.upi.payment.transaction.sixCharacters")).max(6, t$1("neetoPayments.upi.payment.transaction.sixCharacters"))
|
|
@@ -9533,5 +9570,5 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
|
|
|
9533
9570
|
var css = ".ant-table-cell-row-hover .identifier-copy-button{visibility:visible!important}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL19jb3B5LWJ1dHRvbi5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3JjL3N0eWxlc2hlZXRzL21haW4uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRSxrREFDRSw0QkNBSiIsInNvdXJjZXNDb250ZW50IjpbIi5hbnQtdGFibGUtY2VsbC1yb3ctaG92ZXIge1xuICAuaWRlbnRpZmllci1jb3B5LWJ1dHRvbiB7XG4gICAgdmlzaWJpbGl0eTogdmlzaWJsZSAhaW1wb3J0YW50O1xuICB9XG59XG4iLCIuYW50LXRhYmxlLWNlbGwtcm93LWhvdmVyIC5pZGVudGlmaWVyLWNvcHktYnV0dG9uIHtcbiAgdmlzaWJpbGl0eTogdmlzaWJsZSAhaW1wb3J0YW50O1xufSJdfQ== */";
|
|
9534
9571
|
n(css,{});
|
|
9535
9572
|
|
|
9536
|
-
export { index$3 as AccountsDashboard, CURRENCY_OPTIONS, Dashboard$1 as Dashboard, PaymentKindRestrictionAlert, index$2 as PayoutsDashboard, PayoutsPage, index$1 as RazorpayDashboard, RazorpayPaymentButton, SquareCard, index as SquareDashboard, StripeConnect, UpiConnect, UpiPayment, buildStripeTransactionLink, useRazorpayPayment, useSquareCard, useStripePromise };
|
|
9573
|
+
export { index$3 as AccountsDashboard, CURRENCY_OPTIONS, Dashboard$1 as Dashboard, PaymentKindRestrictionAlert, index$2 as PayoutsDashboard, PayoutsPage, index$1 as RazorpayDashboard, RazorpayPaymentButton, SquareCard, index as SquareDashboard, StripeConnect, UpiConnect, UpiMarkAsPaidButton, UpiPayment, buildStripeTransactionLink, useRazorpayPayment, useSquareCard, useStripePromise };
|
|
9537
9574
|
//# sourceMappingURL=index.js.map
|