@djangocfg/ext-payments 1.0.8 → 1.0.10
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/dist/config.cjs +3 -1
- package/dist/config.js +3 -1
- package/dist/hooks.cjs +198 -160
- package/dist/hooks.js +48 -10
- package/dist/index.cjs +198 -160
- package/dist/index.d.cts +36 -13
- package/dist/index.d.ts +36 -13
- package/dist/index.js +48 -10
- package/package.json +7 -5
- package/src/api/generated/ext_payments/CLAUDE.md +1 -8
- package/src/api/generated/ext_payments/_utils/schemas/PaymentDetail.schema.ts +1 -1
- package/src/api/generated/ext_payments/api-instance.ts +61 -13
- package/src/api/generated/ext_payments/client.ts +23 -2
- package/src/api/generated/ext_payments/http.ts +8 -2
- package/src/api/generated/ext_payments/index.ts +3 -1
- package/src/api/index.ts +6 -1
- package/src/layouts/PaymentsLayout/PaymentsLayout.tsx +1 -1
- package/src/layouts/PaymentsLayout/components/CreatePaymentDialog.tsx +1 -1
- package/src/layouts/PaymentsLayout/components/PaymentDetailsDialog.tsx +1 -1
- package/src/layouts/PaymentsLayout/views/overview/components/BalanceCard.tsx +1 -1
- package/src/layouts/PaymentsLayout/views/overview/components/RecentPayments.tsx +1 -1
- package/src/layouts/PaymentsLayout/views/payments/components/PaymentsList.tsx +4 -3
- package/src/layouts/PaymentsLayout/views/transactions/components/TransactionsList.tsx +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5,13 +5,14 @@ var pRetry = require('p-retry');
|
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
var api = require('@djangocfg/ext-base/api');
|
|
7
7
|
var lucideReact = require('lucide-react');
|
|
8
|
-
var
|
|
8
|
+
var uiCore = require('@djangocfg/ui-core');
|
|
9
9
|
var react = require('react');
|
|
10
10
|
var useSWR = require('swr');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
var reactHookForm = require('react-hook-form');
|
|
13
13
|
var zod$1 = require('@hookform/resolvers/zod');
|
|
14
14
|
var moment = require('moment');
|
|
15
|
+
var components = require('@djangocfg/ui-nextjs/components');
|
|
15
16
|
var extBase = require('@djangocfg/ext-base');
|
|
16
17
|
|
|
17
18
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -128,7 +129,7 @@ var models_exports = {};
|
|
|
128
129
|
// src/api/generated/ext_payments/http.ts
|
|
129
130
|
var FetchAdapter = class {
|
|
130
131
|
async request(request) {
|
|
131
|
-
const { method, url, headers, body, params, formData } = request;
|
|
132
|
+
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
132
133
|
let finalUrl = url;
|
|
133
134
|
if (params) {
|
|
134
135
|
const searchParams = new URLSearchParams();
|
|
@@ -146,6 +147,9 @@ var FetchAdapter = class {
|
|
|
146
147
|
let requestBody;
|
|
147
148
|
if (formData) {
|
|
148
149
|
requestBody = formData;
|
|
150
|
+
} else if (binaryBody) {
|
|
151
|
+
finalHeaders["Content-Type"] = "application/octet-stream";
|
|
152
|
+
requestBody = binaryBody;
|
|
149
153
|
} else if (body) {
|
|
150
154
|
finalHeaders["Content-Type"] = "application/json";
|
|
151
155
|
requestBody = JSON.stringify(body);
|
|
@@ -470,11 +474,13 @@ var APIClient = class {
|
|
|
470
474
|
httpClient;
|
|
471
475
|
logger = null;
|
|
472
476
|
retryConfig = null;
|
|
477
|
+
tokenGetter = null;
|
|
473
478
|
// Sub-clients
|
|
474
479
|
ext_payments_payments;
|
|
475
480
|
constructor(baseUrl, options) {
|
|
476
481
|
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
477
482
|
this.httpClient = options?.httpClient || new FetchAdapter();
|
|
483
|
+
this.tokenGetter = options?.tokenGetter || null;
|
|
478
484
|
if (options?.loggerConfig !== void 0) {
|
|
479
485
|
this.logger = new APILogger(options.loggerConfig);
|
|
480
486
|
}
|
|
@@ -497,6 +503,19 @@ var APIClient = class {
|
|
|
497
503
|
}
|
|
498
504
|
return null;
|
|
499
505
|
}
|
|
506
|
+
/**
|
|
507
|
+
* Get the base URL for building streaming/download URLs.
|
|
508
|
+
*/
|
|
509
|
+
getBaseUrl() {
|
|
510
|
+
return this.baseUrl;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Get JWT token for URL authentication (used in streaming endpoints).
|
|
514
|
+
* Returns null if no token getter is configured or no token is available.
|
|
515
|
+
*/
|
|
516
|
+
getToken() {
|
|
517
|
+
return this.tokenGetter ? this.tokenGetter() : null;
|
|
518
|
+
}
|
|
500
519
|
/**
|
|
501
520
|
* Make HTTP request with Django CSRF and session handling.
|
|
502
521
|
* Automatically retries on network errors and 5xx server errors.
|
|
@@ -527,7 +546,7 @@ var APIClient = class {
|
|
|
527
546
|
const headers = {
|
|
528
547
|
...options?.headers || {}
|
|
529
548
|
};
|
|
530
|
-
if (!options?.formData && !headers["Content-Type"]) {
|
|
549
|
+
if (!options?.formData && !options?.binaryBody && !headers["Content-Type"]) {
|
|
531
550
|
headers["Content-Type"] = "application/json";
|
|
532
551
|
}
|
|
533
552
|
if (this.logger) {
|
|
@@ -546,7 +565,8 @@ var APIClient = class {
|
|
|
546
565
|
headers,
|
|
547
566
|
params: options?.params,
|
|
548
567
|
body: options?.body,
|
|
549
|
-
formData: options?.formData
|
|
568
|
+
formData: options?.formData,
|
|
569
|
+
binaryBody: options?.binaryBody
|
|
550
570
|
});
|
|
551
571
|
const duration = Date.now() - startTime;
|
|
552
572
|
if (response.status >= 400) {
|
|
@@ -882,7 +902,7 @@ var PaymentDetailSchema = zod.z.object({
|
|
|
882
902
|
status_display: zod.z.string(),
|
|
883
903
|
pay_address: zod.z.string().nullable(),
|
|
884
904
|
qr_code_url: zod.z.string().nullable(),
|
|
885
|
-
payment_url: zod.z.url().nullable(),
|
|
905
|
+
payment_url: zod.z.union([zod.z.url(), zod.z.literal("")]).nullable(),
|
|
886
906
|
transaction_hash: zod.z.string().nullable(),
|
|
887
907
|
explorer_link: zod.z.string().nullable(),
|
|
888
908
|
confirmations_count: zod.z.int(),
|
|
@@ -967,15 +987,28 @@ __export(fetchers_exports, {
|
|
|
967
987
|
|
|
968
988
|
// src/api/generated/ext_payments/api-instance.ts
|
|
969
989
|
var globalAPI = null;
|
|
990
|
+
var autoConfigAttempted = false;
|
|
991
|
+
function tryAutoConfigureFromEnv() {
|
|
992
|
+
if (autoConfigAttempted) return;
|
|
993
|
+
autoConfigAttempted = true;
|
|
994
|
+
if (globalAPI) return;
|
|
995
|
+
if (typeof process === "undefined" || !process.env) return;
|
|
996
|
+
const baseUrl = process.env.NEXT_PUBLIC_API_URL || process.env.VITE_API_URL || process.env.REACT_APP_API_URL || process.env.API_URL;
|
|
997
|
+
if (baseUrl) {
|
|
998
|
+
globalAPI = new API(baseUrl);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
970
1001
|
function getAPIInstance() {
|
|
1002
|
+
tryAutoConfigureFromEnv();
|
|
971
1003
|
if (!globalAPI) {
|
|
972
1004
|
throw new Error(
|
|
973
|
-
'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })'
|
|
1005
|
+
'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })\n\nOr set environment variable: NEXT_PUBLIC_API_URL, VITE_API_URL, or REACT_APP_API_URL'
|
|
974
1006
|
);
|
|
975
1007
|
}
|
|
976
1008
|
return globalAPI;
|
|
977
1009
|
}
|
|
978
1010
|
function isAPIConfigured() {
|
|
1011
|
+
tryAutoConfigureFromEnv();
|
|
979
1012
|
return globalAPI !== null;
|
|
980
1013
|
}
|
|
981
1014
|
function configureAPI(config) {
|
|
@@ -1290,7 +1323,8 @@ var API = class {
|
|
|
1290
1323
|
this._loadTokensFromStorage();
|
|
1291
1324
|
this._client = new APIClient(this.baseUrl, {
|
|
1292
1325
|
retryConfig: this.options?.retryConfig,
|
|
1293
|
-
loggerConfig: this.options?.loggerConfig
|
|
1326
|
+
loggerConfig: this.options?.loggerConfig,
|
|
1327
|
+
tokenGetter: () => this.getToken()
|
|
1294
1328
|
});
|
|
1295
1329
|
this._injectAuthHeader();
|
|
1296
1330
|
this.ext_payments_payments = this._client.ext_payments_payments;
|
|
@@ -1302,7 +1336,8 @@ var API = class {
|
|
|
1302
1336
|
_reinitClients() {
|
|
1303
1337
|
this._client = new APIClient(this.baseUrl, {
|
|
1304
1338
|
retryConfig: this.options?.retryConfig,
|
|
1305
|
-
loggerConfig: this.options?.loggerConfig
|
|
1339
|
+
loggerConfig: this.options?.loggerConfig,
|
|
1340
|
+
tokenGetter: () => this.getToken()
|
|
1306
1341
|
});
|
|
1307
1342
|
this._injectAuthHeader();
|
|
1308
1343
|
this.ext_payments_payments = this._client.ext_payments_payments;
|
|
@@ -1393,6 +1428,7 @@ var API = class {
|
|
|
1393
1428
|
return "./schema.json";
|
|
1394
1429
|
}
|
|
1395
1430
|
};
|
|
1431
|
+
api.initializeExtensionAPI(configureAPI);
|
|
1396
1432
|
var apiPayments = api.createExtensionAPI(API);
|
|
1397
1433
|
function usePaymentsBalanceRetrieve(client) {
|
|
1398
1434
|
return useSWR__default.default(
|
|
@@ -1696,21 +1732,21 @@ var CreatePaymentDialog = () => {
|
|
|
1696
1732
|
setIsSubmitting(false);
|
|
1697
1733
|
}
|
|
1698
1734
|
};
|
|
1699
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1700
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1701
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1702
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1735
|
+
return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-md", children: [
|
|
1736
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
|
|
1737
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Create Payment" }),
|
|
1738
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Create a new payment to add funds to your account." })
|
|
1703
1739
|
] }),
|
|
1704
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1740
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-4", children: [
|
|
1705
1741
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1706
|
-
|
|
1742
|
+
uiCore.FormField,
|
|
1707
1743
|
{
|
|
1708
1744
|
control: form.control,
|
|
1709
1745
|
name: "amount_usd",
|
|
1710
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1711
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1712
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1713
|
-
|
|
1746
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
|
|
1747
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Amount (USD)" }),
|
|
1748
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1749
|
+
uiCore.Input,
|
|
1714
1750
|
{
|
|
1715
1751
|
type: "number",
|
|
1716
1752
|
step: "0.01",
|
|
@@ -1720,28 +1756,28 @@ var CreatePaymentDialog = () => {
|
|
|
1720
1756
|
onChange: (e) => field.onChange(parseFloat(e.target.value) || 0)
|
|
1721
1757
|
}
|
|
1722
1758
|
) }),
|
|
1723
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1724
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1759
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormDescription, { children: "The amount you want to pay in USD." }),
|
|
1760
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
|
|
1725
1761
|
] })
|
|
1726
1762
|
}
|
|
1727
1763
|
),
|
|
1728
1764
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1729
|
-
|
|
1765
|
+
uiCore.FormField,
|
|
1730
1766
|
{
|
|
1731
1767
|
control: form.control,
|
|
1732
1768
|
name: "currency_code",
|
|
1733
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1734
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1769
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
|
|
1770
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Currency" }),
|
|
1735
1771
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1736
|
-
|
|
1772
|
+
uiCore.Select,
|
|
1737
1773
|
{
|
|
1738
1774
|
onValueChange: field.onChange,
|
|
1739
1775
|
defaultValue: field.value,
|
|
1740
1776
|
disabled: isLoadingCurrencies,
|
|
1741
1777
|
children: [
|
|
1742
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1743
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1778
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Select currency..." }) }) }),
|
|
1779
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectContent, { children: currencyOptions.map((curr) => /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: curr.code, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1780
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: curr.code, size: 16 }),
|
|
1745
1781
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: curr.code }),
|
|
1746
1782
|
curr.network && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
1747
1783
|
"(",
|
|
@@ -1752,8 +1788,8 @@ var CreatePaymentDialog = () => {
|
|
|
1752
1788
|
]
|
|
1753
1789
|
}
|
|
1754
1790
|
),
|
|
1755
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1756
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1791
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormDescription, { children: "The cryptocurrency to use for payment." }),
|
|
1792
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
|
|
1757
1793
|
] })
|
|
1758
1794
|
}
|
|
1759
1795
|
),
|
|
@@ -1761,7 +1797,7 @@ var CreatePaymentDialog = () => {
|
|
|
1761
1797
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1762
1798
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "You will send" }),
|
|
1763
1799
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1764
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1800
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: calculateCryptoAmount.currency, size: 16 }),
|
|
1765
1801
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono font-semibold", children: [
|
|
1766
1802
|
calculateCryptoAmount.amount.toFixed(8),
|
|
1767
1803
|
" ",
|
|
@@ -1791,9 +1827,9 @@ var CreatePaymentDialog = () => {
|
|
|
1791
1827
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: calculateCryptoAmount.network })
|
|
1792
1828
|
] }) })
|
|
1793
1829
|
] }),
|
|
1794
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1795
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1796
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1830
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogFooter, { children: [
|
|
1831
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "button", variant: "outline", onClick: handleClose, disabled: isSubmitting, children: "Cancel" }),
|
|
1832
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "submit", disabled: isSubmitting || currencyOptions.length === 0, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1797
1833
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
1798
1834
|
"Creating..."
|
|
1799
1835
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1874,34 +1910,34 @@ var PaymentDetailsDialog = () => {
|
|
|
1874
1910
|
};
|
|
1875
1911
|
if (!open) return null;
|
|
1876
1912
|
if (isLoading) {
|
|
1877
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1878
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1879
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1880
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1913
|
+
return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
|
|
1914
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
|
|
1915
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
|
|
1916
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Loading payment information..." })
|
|
1881
1917
|
] }),
|
|
1882
1918
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-8 w-8 animate-spin text-muted-foreground" }) })
|
|
1883
1919
|
] }) });
|
|
1884
1920
|
}
|
|
1885
1921
|
if (shouldFetch && !isLoading && (error || !payment)) {
|
|
1886
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1887
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1888
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1889
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1922
|
+
return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
|
|
1923
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
|
|
1924
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
|
|
1925
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Failed to load payment information" })
|
|
1890
1926
|
] }),
|
|
1891
1927
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
|
|
1892
1928
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-12 w-12 text-destructive" }),
|
|
1893
1929
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: error ? `Error: ${error}` : "Payment not found" }),
|
|
1894
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1930
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { onClick: () => mutate(), children: "Try Again" })
|
|
1895
1931
|
] })
|
|
1896
1932
|
] }) });
|
|
1897
1933
|
}
|
|
1898
1934
|
const statusInfo = getStatusInfo();
|
|
1899
1935
|
const StatusIcon = statusInfo.icon;
|
|
1900
1936
|
const qrCodeUrl = payment.pay_address ? `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(payment.pay_address)}` : null;
|
|
1901
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1902
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1903
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1904
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1937
|
+
return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
|
|
1938
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
|
|
1939
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
|
|
1940
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Send cryptocurrency to complete your payment" })
|
|
1905
1941
|
] }),
|
|
1906
1942
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
1907
1943
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-3 p-4 rounded-sm ${statusInfo.bg}`, children: [
|
|
@@ -1918,7 +1954,7 @@ var PaymentDetailsDialog = () => {
|
|
|
1918
1954
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 bg-muted rounded-sm", children: [
|
|
1919
1955
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Amount to send" }),
|
|
1920
1956
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1921
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1957
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: String(payment.currency_code || "BTC"), size: 20 }),
|
|
1922
1958
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono font-bold text-lg", children: [
|
|
1923
1959
|
payment.pay_amount || "0.00000000",
|
|
1924
1960
|
" ",
|
|
@@ -1948,7 +1984,7 @@ var PaymentDetailsDialog = () => {
|
|
|
1948
1984
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Payment Address" }),
|
|
1949
1985
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1950
1986
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-3 bg-muted rounded-sm font-mono text-sm break-all", children: payment.pay_address }),
|
|
1951
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1987
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CopyButton, { value: payment.pay_address, variant: "outline" })
|
|
1952
1988
|
] })
|
|
1953
1989
|
] }),
|
|
1954
1990
|
payment.transaction_hash && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
@@ -1956,7 +1992,7 @@ var PaymentDetailsDialog = () => {
|
|
|
1956
1992
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3 bg-muted rounded-sm font-mono text-sm break-all", children: payment.transaction_hash })
|
|
1957
1993
|
] }),
|
|
1958
1994
|
payment.payment_url && payment.status === "pending" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1959
|
-
|
|
1995
|
+
uiCore.Button,
|
|
1960
1996
|
{
|
|
1961
1997
|
variant: "outline",
|
|
1962
1998
|
className: "w-full",
|
|
@@ -1982,9 +2018,9 @@ var PaymentDetailsDialog = () => {
|
|
|
1982
2018
|
] })
|
|
1983
2019
|
] })
|
|
1984
2020
|
] }),
|
|
1985
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1986
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1987
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2021
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogFooter, { children: [
|
|
2022
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { variant: "outline", onClick: handleClose, children: "Close" }),
|
|
2023
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: () => mutate(), variant: "ghost", size: "sm", children: [
|
|
1988
2024
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4 mr-2" }),
|
|
1989
2025
|
"Refresh"
|
|
1990
2026
|
] })
|
|
@@ -2014,17 +2050,17 @@ var BalanceCard = () => {
|
|
|
2014
2050
|
}
|
|
2015
2051
|
};
|
|
2016
2052
|
if (isLoadingBalance) {
|
|
2017
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2018
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2053
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
|
|
2054
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
|
|
2019
2055
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2020
2056
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5" }),
|
|
2021
2057
|
"Account Balance"
|
|
2022
2058
|
] }),
|
|
2023
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2059
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-8 w-20" })
|
|
2024
2060
|
] }) }),
|
|
2025
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2026
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2027
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2061
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
|
|
2062
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-10 w-32" }),
|
|
2063
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-48" })
|
|
2028
2064
|
] })
|
|
2029
2065
|
] });
|
|
2030
2066
|
}
|
|
@@ -2034,21 +2070,21 @@ var BalanceCard = () => {
|
|
|
2034
2070
|
const totalWithdrawn = balanceData?.total_withdrawn ?? 0;
|
|
2035
2071
|
const lastTransactionAt = balanceData?.last_transaction_at;
|
|
2036
2072
|
const isEmpty = amountUsd === 0 && totalDeposited === 0;
|
|
2037
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2038
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2073
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
|
|
2074
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
|
|
2039
2075
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2040
2076
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5" }),
|
|
2041
2077
|
"Account Balance"
|
|
2042
2078
|
] }),
|
|
2043
2079
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2044
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2045
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2080
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { variant: "ghost", size: "sm", onClick: refreshBalance, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4" }) }),
|
|
2081
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
|
|
2046
2082
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
|
|
2047
2083
|
"Add Funds"
|
|
2048
2084
|
] })
|
|
2049
2085
|
] })
|
|
2050
2086
|
] }) }),
|
|
2051
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2087
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
|
|
2052
2088
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2053
2089
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl font-bold", children: formatCurrency(amountUsd) }),
|
|
2054
2090
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-1", children: [
|
|
@@ -2067,8 +2103,8 @@ var BalanceCard = () => {
|
|
|
2067
2103
|
] })
|
|
2068
2104
|
] }),
|
|
2069
2105
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2070
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2071
|
-
isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2106
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: !isEmpty ? "default" : "secondary", children: !isEmpty ? "Active" : "New Account" }),
|
|
2107
|
+
isEmpty && /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: "outline", children: "Empty Balance" })
|
|
2072
2108
|
] })
|
|
2073
2109
|
] })
|
|
2074
2110
|
] });
|
|
@@ -2111,33 +2147,33 @@ var RecentPayments = () => {
|
|
|
2111
2147
|
}
|
|
2112
2148
|
};
|
|
2113
2149
|
if (isLoadingPayments) {
|
|
2114
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2115
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2150
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
|
|
2151
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center gap-2", children: [
|
|
2116
2152
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
|
|
2117
2153
|
"Recent Payments"
|
|
2118
2154
|
] }) }),
|
|
2119
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2155
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border rounded-sm", children: [
|
|
2120
2156
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2121
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2122
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2157
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
|
|
2158
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
|
|
2123
2159
|
] }),
|
|
2124
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2160
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
|
|
2125
2161
|
] }, i)) })
|
|
2126
2162
|
] });
|
|
2127
2163
|
}
|
|
2128
2164
|
const recentPaymentsList = payments?.results?.slice(0, 5) || [];
|
|
2129
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2130
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2165
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
|
|
2166
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
|
|
2131
2167
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2132
2168
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
|
|
2133
2169
|
"Recent Payments"
|
|
2134
2170
|
] }),
|
|
2135
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2171
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "ghost", size: "sm", children: [
|
|
2136
2172
|
"View All",
|
|
2137
2173
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "h-4 w-4 ml-2" })
|
|
2138
2174
|
] })
|
|
2139
2175
|
] }) }),
|
|
2140
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2176
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { children: recentPaymentsList.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8 text-muted-foreground", children: [
|
|
2141
2177
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-12 w-12 mx-auto mb-4 opacity-50" }),
|
|
2142
2178
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No recent payments" }),
|
|
2143
2179
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-2", children: "Create your first payment to get started" })
|
|
@@ -2150,7 +2186,7 @@ var RecentPayments = () => {
|
|
|
2150
2186
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
2151
2187
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2152
2188
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatCurrency(payment.amount_usd) }),
|
|
2153
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2189
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusVariant(payment.status), className: "text-xs", children: payment.status })
|
|
2154
2190
|
] }),
|
|
2155
2191
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
2156
2192
|
getRelativeTime(payment.created_at),
|
|
@@ -2172,7 +2208,7 @@ var OverviewView = () => {
|
|
|
2172
2208
|
] }) });
|
|
2173
2209
|
};
|
|
2174
2210
|
var PaymentsList = () => {
|
|
2175
|
-
const pagination =
|
|
2211
|
+
const pagination = components.useDRFPagination(1, 20);
|
|
2176
2212
|
const {
|
|
2177
2213
|
data: payments,
|
|
2178
2214
|
error,
|
|
@@ -2243,26 +2279,26 @@ var PaymentsList = () => {
|
|
|
2243
2279
|
relativeTime: getRelativeTime(payment.created_at),
|
|
2244
2280
|
truncatedId: truncateId(payment.id)
|
|
2245
2281
|
}));
|
|
2246
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2247
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2282
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
|
|
2283
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
|
|
2248
2284
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Payment History" }),
|
|
2249
2285
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2250
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2286
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "outline", size: "sm", onClick: () => refreshPayments(), disabled: isLoadingPayments, children: [
|
|
2251
2287
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: `h-4 w-4 mr-2 ${isLoadingPayments ? "animate-spin" : ""}` }),
|
|
2252
2288
|
"Refresh"
|
|
2253
2289
|
] }),
|
|
2254
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2290
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
|
|
2255
2291
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
|
|
2256
2292
|
"New Payment"
|
|
2257
2293
|
] })
|
|
2258
2294
|
] })
|
|
2259
2295
|
] }) }),
|
|
2260
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2296
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
|
|
2261
2297
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4", children: [
|
|
2262
2298
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
2263
2299
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
2264
2300
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2265
|
-
|
|
2301
|
+
uiCore.Input,
|
|
2266
2302
|
{
|
|
2267
2303
|
placeholder: "Search by ID, status, or currency...",
|
|
2268
2304
|
value: searchTerm,
|
|
@@ -2271,63 +2307,63 @@ var PaymentsList = () => {
|
|
|
2271
2307
|
}
|
|
2272
2308
|
)
|
|
2273
2309
|
] }),
|
|
2274
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2275
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2310
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Select, { value: statusFilter, onValueChange: handleStatusFilter, children: [
|
|
2311
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectTrigger, { className: "w-full sm:w-48", children: [
|
|
2276
2312
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4 mr-2" }),
|
|
2277
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2313
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Filter by status" })
|
|
2278
2314
|
] }),
|
|
2279
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2280
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2281
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2282
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2283
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2284
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2285
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2315
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectContent, { children: [
|
|
2316
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "all", children: "All Statuses" }),
|
|
2317
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "completed", children: "Completed" }),
|
|
2318
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "pending", children: "Pending" }),
|
|
2319
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "confirming", children: "Confirming" }),
|
|
2320
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "failed", children: "Failed" }),
|
|
2321
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "expired", children: "Expired" })
|
|
2286
2322
|
] })
|
|
2287
2323
|
] })
|
|
2288
2324
|
] }),
|
|
2289
2325
|
isLoadingPayments ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
|
|
2290
2326
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2291
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2292
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2327
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
|
|
2328
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
|
|
2293
2329
|
] }),
|
|
2294
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2330
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
|
|
2295
2331
|
] }, i)) }) : filteredPayments.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-12", children: [
|
|
2296
2332
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto mb-4 bg-muted rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-8 h-8 text-muted-foreground" }) }),
|
|
2297
2333
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "No Payments Found" }),
|
|
2298
2334
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: searchTerm || statusFilter !== "all" ? "No payments match your current filters" : "You haven't made any payments yet" }),
|
|
2299
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2335
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: () => openCreatePaymentDialog(), children: [
|
|
2300
2336
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
|
|
2301
2337
|
"Create Payment"
|
|
2302
2338
|
] })
|
|
2303
2339
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2304
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2305
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2306
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2307
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2308
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2309
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2310
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2311
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2312
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2340
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Table, { children: [
|
|
2341
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
|
|
2342
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Date" }),
|
|
2343
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Amount" }),
|
|
2344
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Currency" }),
|
|
2345
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Status" }),
|
|
2346
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Provider" }),
|
|
2347
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Payment ID" }),
|
|
2348
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { className: "text-right", children: "Actions" })
|
|
2313
2349
|
] }) }),
|
|
2314
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2315
|
-
|
|
2350
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableBody, { children: filteredPayments.map((payment) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2351
|
+
uiCore.TableRow,
|
|
2316
2352
|
{
|
|
2317
2353
|
className: "cursor-pointer hover:bg-accent",
|
|
2318
2354
|
onClick: () => openPaymentDetailsDialog(String(payment.id)),
|
|
2319
2355
|
children: [
|
|
2320
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2356
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2321
2357
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: payment.formattedDate }),
|
|
2322
2358
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: payment.relativeTime })
|
|
2323
2359
|
] }) }),
|
|
2324
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2325
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2326
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2327
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2328
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2329
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2330
|
-
|
|
2360
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono font-semibold", children: formatCurrency(payment.amount_usd) }),
|
|
2361
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: "outline", children: payment.currency_code || "USD" }) }),
|
|
2362
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusVariant(payment.status), children: payment.status }) }),
|
|
2363
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-sm text-muted-foreground", children: "NowPayments" }),
|
|
2364
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono text-sm text-muted-foreground", children: payment.truncatedId }),
|
|
2365
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-right", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2366
|
+
uiCore.Button,
|
|
2331
2367
|
{
|
|
2332
2368
|
variant: "ghost",
|
|
2333
2369
|
size: "sm",
|
|
@@ -2344,7 +2380,7 @@ var PaymentsList = () => {
|
|
|
2344
2380
|
)) })
|
|
2345
2381
|
] }) }),
|
|
2346
2382
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2347
|
-
|
|
2383
|
+
components.StaticPagination,
|
|
2348
2384
|
{
|
|
2349
2385
|
data: payments,
|
|
2350
2386
|
onPageChange: pagination.setPage,
|
|
@@ -2434,37 +2470,37 @@ var TransactionsList = () => {
|
|
|
2434
2470
|
truncatedRef: truncateId(transaction.reference || transaction.payment_id)
|
|
2435
2471
|
}));
|
|
2436
2472
|
if (isLoadingTransactions) {
|
|
2437
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2438
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2473
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
|
|
2474
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center gap-2", children: [
|
|
2439
2475
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
|
|
2440
2476
|
"Transaction History"
|
|
2441
2477
|
] }) }),
|
|
2442
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2478
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
|
|
2443
2479
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2444
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2445
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2480
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
|
|
2481
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
|
|
2446
2482
|
] }),
|
|
2447
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2483
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
|
|
2448
2484
|
] }, i)) })
|
|
2449
2485
|
] });
|
|
2450
2486
|
}
|
|
2451
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2452
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2487
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
|
|
2488
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
|
|
2453
2489
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2454
2490
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
|
|
2455
2491
|
"Transaction History"
|
|
2456
2492
|
] }),
|
|
2457
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2493
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "outline", size: "sm", onClick: refreshTransactions, disabled: isLoadingTransactions, children: [
|
|
2458
2494
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: `h-4 w-4 mr-2 ${isLoadingTransactions ? "animate-spin" : ""}` }),
|
|
2459
2495
|
"Refresh"
|
|
2460
2496
|
] })
|
|
2461
2497
|
] }) }),
|
|
2462
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2498
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
|
|
2463
2499
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4", children: [
|
|
2464
2500
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
2465
2501
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
2466
2502
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2467
|
-
|
|
2503
|
+
uiCore.Input,
|
|
2468
2504
|
{
|
|
2469
2505
|
placeholder: "Search by ID, description, or type...",
|
|
2470
2506
|
value: searchTerm,
|
|
@@ -2473,15 +2509,15 @@ var TransactionsList = () => {
|
|
|
2473
2509
|
}
|
|
2474
2510
|
)
|
|
2475
2511
|
] }),
|
|
2476
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2477
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2512
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Select, { value: typeFilter, onValueChange: handleTypeFilter, children: [
|
|
2513
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectTrigger, { className: "w-full sm:w-48", children: [
|
|
2478
2514
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4 mr-2" }),
|
|
2479
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2515
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Filter by type" })
|
|
2480
2516
|
] }),
|
|
2481
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2482
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2483
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2484
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2517
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectContent, { children: [
|
|
2518
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "all", children: "All Types" }),
|
|
2519
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "deposit", children: "Deposits" }),
|
|
2520
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "withdrawal", children: "Withdrawals" })
|
|
2485
2521
|
] })
|
|
2486
2522
|
] })
|
|
2487
2523
|
] }),
|
|
@@ -2489,31 +2525,31 @@ var TransactionsList = () => {
|
|
|
2489
2525
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto mb-4 bg-muted rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "w-8 h-8 text-muted-foreground" }) }),
|
|
2490
2526
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "No Transactions Found" }),
|
|
2491
2527
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: searchTerm || typeFilter !== "all" ? "No transactions match your current filters" : "You don't have any transactions yet" })
|
|
2492
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2493
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2494
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2495
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2496
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2497
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2498
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2499
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2528
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Table, { children: [
|
|
2529
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
|
|
2530
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Date & Time" }),
|
|
2531
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Type" }),
|
|
2532
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Amount" }),
|
|
2533
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Balance After" }),
|
|
2534
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Description" }),
|
|
2535
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Reference" })
|
|
2500
2536
|
] }) }),
|
|
2501
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2537
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableBody, { children: filteredTransactions.map((transaction, index) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
|
|
2538
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2503
2539
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: transaction.formattedDate }),
|
|
2504
2540
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: transaction.relativeTime })
|
|
2505
2541
|
] }) }),
|
|
2506
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2542
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2507
2543
|
getTypeIcon(transaction.type),
|
|
2508
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2544
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getTypeVariant(transaction.type), children: transaction.type || "Unknown" })
|
|
2509
2545
|
] }) }),
|
|
2510
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2546
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono font-semibold", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: transaction.isDeposit ? "text-green-600" : "text-red-600", children: [
|
|
2511
2547
|
transaction.isDeposit ? "+" : "-",
|
|
2512
2548
|
formatCurrency(Math.abs(transaction.amount || transaction.amount_usd || 0))
|
|
2513
2549
|
] }) }),
|
|
2514
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2515
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2516
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2550
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono", children: formatCurrency(transaction.balance_after || 0) }),
|
|
2551
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-sm", children: transaction.description || transaction.note || "No description" }),
|
|
2552
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono text-sm text-muted-foreground", children: transaction.truncatedRef })
|
|
2517
2553
|
] }, transaction.id || index)) })
|
|
2518
2554
|
] }) })
|
|
2519
2555
|
] })
|
|
@@ -2528,30 +2564,30 @@ var PaymentsLayout = () => {
|
|
|
2528
2564
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Payments" }),
|
|
2529
2565
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "Manage your payments, balance, and transaction history" })
|
|
2530
2566
|
] }),
|
|
2531
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2532
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2533
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2567
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.Tabs, { defaultValue: "overview", className: "space-y-6", children: [
|
|
2568
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsList, { className: "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", children: [
|
|
2569
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "overview", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
|
|
2534
2570
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4" }),
|
|
2535
2571
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Overview" })
|
|
2536
2572
|
] }),
|
|
2537
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2573
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "payments", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
|
|
2538
2574
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: "h-4 w-4" }),
|
|
2539
2575
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Payments" })
|
|
2540
2576
|
] }),
|
|
2541
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2577
|
+
/* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "transactions", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
|
|
2542
2578
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-4 w-4" }),
|
|
2543
2579
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Transactions" })
|
|
2544
2580
|
] })
|
|
2545
2581
|
] }),
|
|
2546
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2582
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "overview", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
|
|
2547
2583
|
/* @__PURE__ */ jsxRuntime.jsx(OverviewView, {}),
|
|
2548
2584
|
/* @__PURE__ */ jsxRuntime.jsx(CreatePaymentDialog, {})
|
|
2549
2585
|
] }) }) }),
|
|
2550
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2586
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "payments", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
|
|
2551
2587
|
/* @__PURE__ */ jsxRuntime.jsx(PaymentsView, {}),
|
|
2552
2588
|
/* @__PURE__ */ jsxRuntime.jsx(CreatePaymentDialog, {})
|
|
2553
2589
|
] }) }),
|
|
2554
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2590
|
+
/* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "transactions", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TransactionsView, {}) }) })
|
|
2555
2591
|
] }),
|
|
2556
2592
|
/* @__PURE__ */ jsxRuntime.jsx(PaymentDetailsDialog, {})
|
|
2557
2593
|
] }) });
|
|
@@ -2560,7 +2596,7 @@ var PaymentsLayout = () => {
|
|
|
2560
2596
|
// package.json
|
|
2561
2597
|
var package_default = {
|
|
2562
2598
|
name: "@djangocfg/ext-payments",
|
|
2563
|
-
version: "1.0.
|
|
2599
|
+
version: "1.0.10",
|
|
2564
2600
|
description: "Payments system extension for DjangoCFG",
|
|
2565
2601
|
keywords: [
|
|
2566
2602
|
"django",
|
|
@@ -2621,6 +2657,7 @@ var package_default = {
|
|
|
2621
2657
|
peerDependencies: {
|
|
2622
2658
|
"@djangocfg/api": "workspace:*",
|
|
2623
2659
|
"@djangocfg/ext-base": "workspace:*",
|
|
2660
|
+
"@djangocfg/ui-core": "workspace:*",
|
|
2624
2661
|
"@djangocfg/ui-nextjs": "workspace:*",
|
|
2625
2662
|
consola: "^3.4.2",
|
|
2626
2663
|
"lucide-react": "^0.545.0",
|
|
@@ -2635,6 +2672,7 @@ var package_default = {
|
|
|
2635
2672
|
"@djangocfg/api": "workspace:*",
|
|
2636
2673
|
"@djangocfg/ext-base": "workspace:*",
|
|
2637
2674
|
"@djangocfg/typescript-config": "workspace:*",
|
|
2675
|
+
"@djangocfg/ui-nextjs": "workspace:*",
|
|
2638
2676
|
"@types/node": "^24.7.2",
|
|
2639
2677
|
"@types/react": "^19.0.0",
|
|
2640
2678
|
consola: "^3.4.2",
|