gotrip-fx-transaction-form 1.0.118 → 1.0.121

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/index.js CHANGED
@@ -3097,7 +3097,8 @@ const zD = (e) => {
3097
3097
  isLoading: !1,
3098
3098
  modal: {
3099
3099
  error: { isOpen: !1, message: "" },
3100
- success: { isOpen: !1, message: "" }
3100
+ success: { isOpen: !1, message: "" },
3101
+ confirm: { isOpen: !1, title: void 0, description: void 0, onConfirm: void 0 }
3101
3102
  },
3102
3103
  setIsLoading: (t) => e({ isLoading: t }),
3103
3104
  setModalError: ({ isOpen: t, message: r }) => e((n) => ({
@@ -3111,6 +3112,28 @@ const zD = (e) => {
3111
3112
  })),
3112
3113
  closeModalSuccess: () => e((t) => ({
3113
3114
  modal: { ...t.modal, success: { isOpen: !1, message: "" } }
3115
+ })),
3116
+ setModalConfirm: ({
3117
+ isOpen: t,
3118
+ title: r,
3119
+ description: n,
3120
+ onConfirm: a
3121
+ }) => e((i) => ({
3122
+ modal: {
3123
+ ...i.modal,
3124
+ confirm: {
3125
+ isOpen: t,
3126
+ title: r,
3127
+ description: n,
3128
+ onConfirm: a
3129
+ }
3130
+ }
3131
+ })),
3132
+ closeModalConfirm: () => e((t) => ({
3133
+ modal: {
3134
+ ...t.modal,
3135
+ confirm: { isOpen: !1, title: void 0, description: void 0, onConfirm: void 0 }
3136
+ }
3114
3137
  }))
3115
3138
  }));
3116
3139
  function _6(e) {
@@ -35109,7 +35132,8 @@ const {
35109
35132
  getTotalTransaction: `${Xe.API_URL}/dashboard-handlers/get-total-transaction`,
35110
35133
  getTransactionCountGroupByType: `${Xe.API_URL}/dashboard-handlers/get-transaction-count-by-type`,
35111
35134
  getTransactionCountByStatus: `${Xe.API_URL}/dashboard-handlers/get-transaction-count-by-status`,
35112
- getTransactionCountByDate: `${Xe.API_URL}/dashboard-handlers/get-transaction-count-by-date`
35135
+ getTransactionCountByDate: `${Xe.API_URL}/dashboard-handlers/get-transaction-count-by-date`,
35136
+ adminDashboardMetrics: `${Xe.API_URL}/dashboard-handlers/admin-dashboard-metrics`
35113
35137
  },
35114
35138
  tenantHandlers: {
35115
35139
  list: `${Xe.API_URL}/tenant-handlers/list`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.118",
3
+ "version": "1.0.121",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -0,0 +1 @@
1
+ export declare const ConfirmModal: () => import("react/jsx-runtime").JSX.Element;
@@ -116,6 +116,7 @@ export declare const ApiUrls: {
116
116
  getTransactionCountGroupByType: string;
117
117
  getTransactionCountByStatus: string;
118
118
  getTransactionCountByDate: string;
119
+ adminDashboardMetrics: string;
119
120
  };
120
121
  tenantHandlers: {
121
122
  list: string;
@@ -0,0 +1,21 @@
1
+ export type AdminOrderMetrics = {
2
+ success: number;
3
+ paid: number;
4
+ sentToBankSuccess: number;
5
+ sentToBankError: number;
6
+ };
7
+ export type AdminCurrencyMetric = {
8
+ bankCode: string;
9
+ bankName: string;
10
+ currencyCode: string;
11
+ totalAmount: number;
12
+ };
13
+ export type AdminDashboardMetrics = {
14
+ orderMetrics: AdminOrderMetrics;
15
+ currencyMetrics: AdminCurrencyMetric[];
16
+ };
17
+ export declare const useAdminDashboard: () => {
18
+ loading: boolean;
19
+ metrics: AdminDashboardMetrics | null;
20
+ fetchMetrics: (startDate: string, endDate: string) => Promise<void>;
21
+ };
@@ -0,0 +1 @@
1
+ export declare const AdminDashboard: () => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,12 @@ export type AppState = {
10
10
  isOpen: boolean;
11
11
  message: string | ReactNode;
12
12
  };
13
+ confirm: {
14
+ isOpen: boolean;
15
+ title: ReactNode | undefined;
16
+ description?: ReactNode | undefined;
17
+ onConfirm?: () => Promise<void> | void;
18
+ };
13
19
  };
14
20
  setIsLoading: (isLoading: boolean) => void;
15
21
  setModalError: (modal: {
@@ -22,5 +28,12 @@ export type AppState = {
22
28
  }) => void;
23
29
  closeModalError: () => void;
24
30
  closeModalSuccess: () => void;
31
+ setModalConfirm: (modal: {
32
+ isOpen: boolean;
33
+ title: ReactNode | undefined;
34
+ description?: ReactNode | undefined;
35
+ onConfirm?: () => Promise<void> | void;
36
+ }) => void;
37
+ closeModalConfirm: () => void;
25
38
  };
26
39
  export declare const useAppStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AppState>>;