@feedmepos/mf-payment 0.0.0-beta.29 → 0.0.0-beta.30
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{PayoutAccount-DGZmraWC.js → PayoutAccount-Bkncr_cB.js} +3 -3
- package/dist/{PayoutAccount-CRpuF7oc.js → PayoutAccount-D4mqNLsl.js} +5 -5
- package/dist/{PayoutAccountSetting-B0WUvW2T.js → PayoutAccountSetting-B1hM-zzy.js} +273 -199
- package/dist/{Settlement-DL852BAW.js → Settlement-DtcJVp3Z.js} +3 -3
- package/dist/{Settlement-BfzE6GRq.js → Settlement-kXEsjqGo.js} +3 -3
- package/dist/{SettlementTransactions-Bns4JiYa.js → SettlementTransactions-5JuImQzZ.js} +4 -4
- package/dist/{SettlementTransactions-B-PmdVmd.js → SettlementTransactions-csNNWUX5.js} +4 -4
- package/dist/{Terminal-BJfw9jQn.js → Terminal-DGfySdfA.js} +55 -55
- package/dist/TerminalSetting-CucVft_p.js +374 -0
- package/dist/{TerminalTransaction-F3kzj60e.js → TerminalTransaction-CwoclWJ5.js} +5 -5
- package/dist/{TerminalTransaction-DuVyCu0j.js → TerminalTransaction-DRlFVw4p.js} +5 -5
- package/dist/{Transaction-sG5VLrZG.js → Transaction-CKFRlYUk.js} +4 -4
- package/dist/{Transaction-BV3f9JLh.js → Transaction-DA6UzVnz.js} +4 -4
- package/dist/app.js +13 -13
- package/dist/{assets-Bj5ToWoP.js → assets-RXBV3tUm.js} +1 -1
- package/dist/{index-BYz1HdLk.js → index-BS_dGfh_.js} +1 -1
- package/dist/{index-dVGYvcJH.js → index-CJp88CGw.js} +1 -1
- package/dist/{index-BvPakrCi.js → index-CNmg4bnZ.js} +1 -1
- package/dist/{index-CTWoVKkI.js → index-C_44uoxW.js} +8597 -8249
- package/dist/{index-DvBq8FZH.js → index-CbUxRjwz.js} +1 -1
- package/dist/{index-BmrM-GfD.js → index-Cl2XhO9t.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-X-K_s8fy.js → index.vue_vue_type_script_setup_true_lang-GkJ2OZPm.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-BT8stlNQ.js → payout-account-C_01-U_N.js} +261 -261
- package/dist/{transaction-LP1p6TuS.js → transaction-yTOBjyUq.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +50 -0
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +24 -2
- package/dist/views/admin/terminal/cell/Actions.vue.d.ts +24 -2
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +24 -2
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +94 -0
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +24 -2
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +24 -4
- package/package.json +2 -2
- package/dist/TerminalSetting-DJ-_DZr_.js +0 -254
@@ -0,0 +1,50 @@
|
|
1
|
+
import type { FdoPaymentGateway } from '@feedmepos/payment-entity';
|
2
|
+
import type { PropType } from 'vue';
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
4
|
+
onUpdate: {
|
5
|
+
type: PropType<(g: any) => void>;
|
6
|
+
required: true;
|
7
|
+
};
|
8
|
+
onDelete: {
|
9
|
+
type: PropType<(g: FdoPaymentGateway) => void>;
|
10
|
+
required: true;
|
11
|
+
};
|
12
|
+
gateway: {
|
13
|
+
type: PropType<{
|
14
|
+
_id: string;
|
15
|
+
_rev: string;
|
16
|
+
paymentGateway: "E_GHL";
|
17
|
+
active: boolean;
|
18
|
+
config: {
|
19
|
+
merchantId: string;
|
20
|
+
terminalId: string;
|
21
|
+
privateKey: string;
|
22
|
+
};
|
23
|
+
} | undefined>;
|
24
|
+
required: true;
|
25
|
+
};
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
27
|
+
onUpdate: {
|
28
|
+
type: PropType<(g: any) => void>;
|
29
|
+
required: true;
|
30
|
+
};
|
31
|
+
onDelete: {
|
32
|
+
type: PropType<(g: FdoPaymentGateway) => void>;
|
33
|
+
required: true;
|
34
|
+
};
|
35
|
+
gateway: {
|
36
|
+
type: PropType<{
|
37
|
+
_id: string;
|
38
|
+
_rev: string;
|
39
|
+
paymentGateway: "E_GHL";
|
40
|
+
active: boolean;
|
41
|
+
config: {
|
42
|
+
merchantId: string;
|
43
|
+
terminalId: string;
|
44
|
+
privateKey: string;
|
45
|
+
};
|
46
|
+
} | undefined>;
|
47
|
+
required: true;
|
48
|
+
};
|
49
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
50
|
+
export default _default;
|
@@ -13,11 +13,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
13
13
|
uniqueId: string;
|
14
14
|
} | null | undefined;
|
15
15
|
gateway: "Fiuu";
|
16
|
+
} | {
|
17
|
+
config?: any;
|
18
|
+
gateway: "ScanPay";
|
19
|
+
})[] | null | undefined;
|
20
|
+
ecrs?: ({
|
21
|
+
config?: {
|
22
|
+
terminalId: string;
|
23
|
+
} | null | undefined;
|
24
|
+
gateway: "FeedMe";
|
16
25
|
} | {
|
17
26
|
config?: {
|
18
27
|
terminalId: string;
|
28
|
+
merchantId: string;
|
29
|
+
privateKey: string;
|
19
30
|
} | null | undefined;
|
20
|
-
gateway: "
|
31
|
+
gateway: "Ghl";
|
21
32
|
})[] | null | undefined;
|
22
33
|
status: "Active" | "Inactive";
|
23
34
|
_id: string;
|
@@ -42,11 +53,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
42
53
|
uniqueId: string;
|
43
54
|
} | null | undefined;
|
44
55
|
gateway: "Fiuu";
|
56
|
+
} | {
|
57
|
+
config?: any;
|
58
|
+
gateway: "ScanPay";
|
59
|
+
})[] | null | undefined;
|
60
|
+
ecrs?: ({
|
61
|
+
config?: {
|
62
|
+
terminalId: string;
|
63
|
+
} | null | undefined;
|
64
|
+
gateway: "FeedMe";
|
45
65
|
} | {
|
46
66
|
config?: {
|
47
67
|
terminalId: string;
|
68
|
+
merchantId: string;
|
69
|
+
privateKey: string;
|
48
70
|
} | null | undefined;
|
49
|
-
gateway: "
|
71
|
+
gateway: "Ghl";
|
50
72
|
})[] | null | undefined;
|
51
73
|
status: "Active" | "Inactive";
|
52
74
|
_id: string;
|
@@ -11,11 +11,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
uniqueId: string;
|
12
12
|
} | null | undefined;
|
13
13
|
gateway: "Fiuu";
|
14
|
+
} | {
|
15
|
+
config?: any;
|
16
|
+
gateway: "ScanPay";
|
17
|
+
})[] | null | undefined;
|
18
|
+
ecrs?: ({
|
19
|
+
config?: {
|
20
|
+
terminalId: string;
|
21
|
+
} | null | undefined;
|
22
|
+
gateway: "FeedMe";
|
14
23
|
} | {
|
15
24
|
config?: {
|
16
25
|
terminalId: string;
|
26
|
+
merchantId: string;
|
27
|
+
privateKey: string;
|
17
28
|
} | null | undefined;
|
18
|
-
gateway: "
|
29
|
+
gateway: "Ghl";
|
19
30
|
})[] | null | undefined;
|
20
31
|
status: "Active" | "Inactive";
|
21
32
|
_id: string;
|
@@ -42,11 +53,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
42
53
|
uniqueId: string;
|
43
54
|
} | null | undefined;
|
44
55
|
gateway: "Fiuu";
|
56
|
+
} | {
|
57
|
+
config?: any;
|
58
|
+
gateway: "ScanPay";
|
59
|
+
})[] | null | undefined;
|
60
|
+
ecrs?: ({
|
61
|
+
config?: {
|
62
|
+
terminalId: string;
|
63
|
+
} | null | undefined;
|
64
|
+
gateway: "FeedMe";
|
45
65
|
} | {
|
46
66
|
config?: {
|
47
67
|
terminalId: string;
|
68
|
+
merchantId: string;
|
69
|
+
privateKey: string;
|
48
70
|
} | null | undefined;
|
49
|
-
gateway: "
|
71
|
+
gateway: "Ghl";
|
50
72
|
})[] | null | undefined;
|
51
73
|
status: "Active" | "Inactive";
|
52
74
|
_id: string;
|
@@ -14,11 +14,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
14
14
|
uniqueId: string;
|
15
15
|
} | null | undefined;
|
16
16
|
gateway: "Fiuu";
|
17
|
+
} | {
|
18
|
+
config?: any;
|
19
|
+
gateway: "ScanPay";
|
20
|
+
})[] | null | undefined;
|
21
|
+
ecrs?: ({
|
22
|
+
config?: {
|
23
|
+
terminalId: string;
|
24
|
+
} | null | undefined;
|
25
|
+
gateway: "FeedMe";
|
17
26
|
} | {
|
18
27
|
config?: {
|
19
28
|
terminalId: string;
|
29
|
+
merchantId: string;
|
30
|
+
privateKey: string;
|
20
31
|
} | null | undefined;
|
21
|
-
gateway: "
|
32
|
+
gateway: "Ghl";
|
22
33
|
})[] | null | undefined;
|
23
34
|
status: "Active" | "Inactive";
|
24
35
|
_id: string;
|
@@ -48,11 +59,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
48
59
|
uniqueId: string;
|
49
60
|
} | null | undefined;
|
50
61
|
gateway: "Fiuu";
|
62
|
+
} | {
|
63
|
+
config?: any;
|
64
|
+
gateway: "ScanPay";
|
65
|
+
})[] | null | undefined;
|
66
|
+
ecrs?: ({
|
67
|
+
config?: {
|
68
|
+
terminalId: string;
|
69
|
+
} | null | undefined;
|
70
|
+
gateway: "FeedMe";
|
51
71
|
} | {
|
52
72
|
config?: {
|
53
73
|
terminalId: string;
|
74
|
+
merchantId: string;
|
75
|
+
privateKey: string;
|
54
76
|
} | null | undefined;
|
55
|
-
gateway: "
|
77
|
+
gateway: "Ghl";
|
56
78
|
})[] | null | undefined;
|
57
79
|
status: "Active" | "Inactive";
|
58
80
|
_id: string;
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import { type FdoTerminal } from '@feedmepos/payment-entity';
|
2
|
+
import { type PropType } from 'vue';
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
4
|
+
terminal: {
|
5
|
+
type: PropType<{
|
6
|
+
name?: string | null | undefined;
|
7
|
+
deviceId?: string | null | undefined;
|
8
|
+
bindCode?: string | null | undefined;
|
9
|
+
secretKey?: string | null | undefined;
|
10
|
+
token?: string | null | undefined;
|
11
|
+
gateways?: ({
|
12
|
+
config?: {
|
13
|
+
packageId: "cc.feedme.payment.rms" | "cc.feedme.payment.fiuu_my" | "cc.feedme.payment.fiuu_sg";
|
14
|
+
uniqueId: string;
|
15
|
+
} | null | undefined;
|
16
|
+
gateway: "Fiuu";
|
17
|
+
} | {
|
18
|
+
config?: any;
|
19
|
+
gateway: "ScanPay";
|
20
|
+
})[] | null | undefined;
|
21
|
+
ecrs?: ({
|
22
|
+
config?: {
|
23
|
+
terminalId: string;
|
24
|
+
} | null | undefined;
|
25
|
+
gateway: "FeedMe";
|
26
|
+
} | {
|
27
|
+
config?: {
|
28
|
+
terminalId: string;
|
29
|
+
merchantId: string;
|
30
|
+
privateKey: string;
|
31
|
+
} | null | undefined;
|
32
|
+
gateway: "Ghl";
|
33
|
+
})[] | null | undefined;
|
34
|
+
status: "Active" | "Inactive";
|
35
|
+
_id: string;
|
36
|
+
referenceId: string;
|
37
|
+
securityCode: string;
|
38
|
+
deviceType: "KIOSK" | "TERMINAL" | "POS";
|
39
|
+
createdAt: string;
|
40
|
+
updatedAt: string;
|
41
|
+
}>;
|
42
|
+
required: true;
|
43
|
+
};
|
44
|
+
onUpdate: {
|
45
|
+
type: PropType<(account: FdoTerminal) => Promise<void>>;
|
46
|
+
required: true;
|
47
|
+
};
|
48
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
49
|
+
terminal: {
|
50
|
+
type: PropType<{
|
51
|
+
name?: string | null | undefined;
|
52
|
+
deviceId?: string | null | undefined;
|
53
|
+
bindCode?: string | null | undefined;
|
54
|
+
secretKey?: string | null | undefined;
|
55
|
+
token?: string | null | undefined;
|
56
|
+
gateways?: ({
|
57
|
+
config?: {
|
58
|
+
packageId: "cc.feedme.payment.rms" | "cc.feedme.payment.fiuu_my" | "cc.feedme.payment.fiuu_sg";
|
59
|
+
uniqueId: string;
|
60
|
+
} | null | undefined;
|
61
|
+
gateway: "Fiuu";
|
62
|
+
} | {
|
63
|
+
config?: any;
|
64
|
+
gateway: "ScanPay";
|
65
|
+
})[] | null | undefined;
|
66
|
+
ecrs?: ({
|
67
|
+
config?: {
|
68
|
+
terminalId: string;
|
69
|
+
} | null | undefined;
|
70
|
+
gateway: "FeedMe";
|
71
|
+
} | {
|
72
|
+
config?: {
|
73
|
+
terminalId: string;
|
74
|
+
merchantId: string;
|
75
|
+
privateKey: string;
|
76
|
+
} | null | undefined;
|
77
|
+
gateway: "Ghl";
|
78
|
+
})[] | null | undefined;
|
79
|
+
status: "Active" | "Inactive";
|
80
|
+
_id: string;
|
81
|
+
referenceId: string;
|
82
|
+
securityCode: string;
|
83
|
+
deviceType: "KIOSK" | "TERMINAL" | "POS";
|
84
|
+
createdAt: string;
|
85
|
+
updatedAt: string;
|
86
|
+
}>;
|
87
|
+
required: true;
|
88
|
+
};
|
89
|
+
onUpdate: {
|
90
|
+
type: PropType<(account: FdoTerminal) => Promise<void>>;
|
91
|
+
required: true;
|
92
|
+
};
|
93
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
94
|
+
export default _default;
|
@@ -13,11 +13,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
13
13
|
uniqueId: string;
|
14
14
|
} | null | undefined;
|
15
15
|
gateway: "Fiuu";
|
16
|
+
} | {
|
17
|
+
config?: any;
|
18
|
+
gateway: "ScanPay";
|
19
|
+
})[] | null | undefined;
|
20
|
+
ecrs?: ({
|
21
|
+
config?: {
|
22
|
+
terminalId: string;
|
23
|
+
} | null | undefined;
|
24
|
+
gateway: "FeedMe";
|
16
25
|
} | {
|
17
26
|
config?: {
|
18
27
|
terminalId: string;
|
28
|
+
merchantId: string;
|
29
|
+
privateKey: string;
|
19
30
|
} | null | undefined;
|
20
|
-
gateway: "
|
31
|
+
gateway: "Ghl";
|
21
32
|
})[] | null | undefined;
|
22
33
|
status: "Active" | "Inactive";
|
23
34
|
_id: string;
|
@@ -43,11 +54,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
43
54
|
uniqueId: string;
|
44
55
|
} | null | undefined;
|
45
56
|
gateway: "Fiuu";
|
57
|
+
} | {
|
58
|
+
config?: any;
|
59
|
+
gateway: "ScanPay";
|
60
|
+
})[] | null | undefined;
|
61
|
+
ecrs?: ({
|
62
|
+
config?: {
|
63
|
+
terminalId: string;
|
64
|
+
} | null | undefined;
|
65
|
+
gateway: "FeedMe";
|
46
66
|
} | {
|
47
67
|
config?: {
|
48
68
|
terminalId: string;
|
69
|
+
merchantId: string;
|
70
|
+
privateKey: string;
|
49
71
|
} | null | undefined;
|
50
|
-
gateway: "
|
72
|
+
gateway: "Ghl";
|
51
73
|
})[] | null | undefined;
|
52
74
|
status: "Active" | "Inactive";
|
53
75
|
_id: string;
|
@@ -14,14 +14,24 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
14
14
|
uniqueId: string;
|
15
15
|
} | null | undefined;
|
16
16
|
gateway: "Fiuu";
|
17
|
+
} | {
|
18
|
+
config?: any;
|
19
|
+
gateway: "ScanPay";
|
20
|
+
})[] | null | undefined;
|
21
|
+
ecrs?: ({
|
22
|
+
config?: {
|
23
|
+
terminalId: string;
|
24
|
+
} | null | undefined;
|
25
|
+
gateway: "FeedMe";
|
17
26
|
} | {
|
18
27
|
config?: {
|
19
28
|
terminalId: string;
|
29
|
+
merchantId: string;
|
30
|
+
privateKey: string;
|
20
31
|
} | null | undefined;
|
21
|
-
gateway: "
|
32
|
+
gateway: "Ghl";
|
22
33
|
})[] | null | undefined;
|
23
34
|
status: "Active" | "Inactive";
|
24
|
-
/**__VLS_emit,__VLS_9,validation-success*/
|
25
35
|
_id: string;
|
26
36
|
referenceId: string;
|
27
37
|
securityCode: string;
|
@@ -49,14 +59,24 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
49
59
|
uniqueId: string;
|
50
60
|
} | null | undefined;
|
51
61
|
gateway: "Fiuu";
|
62
|
+
} | {
|
63
|
+
config?: any;
|
64
|
+
gateway: "ScanPay";
|
65
|
+
})[] | null | undefined;
|
66
|
+
ecrs?: ({
|
67
|
+
config?: {
|
68
|
+
terminalId: string;
|
69
|
+
} | null | undefined;
|
70
|
+
gateway: "FeedMe";
|
52
71
|
} | {
|
53
72
|
config?: {
|
54
73
|
terminalId: string;
|
74
|
+
merchantId: string;
|
75
|
+
privateKey: string;
|
55
76
|
} | null | undefined;
|
56
|
-
gateway: "
|
77
|
+
gateway: "Ghl";
|
57
78
|
})[] | null | undefined;
|
58
79
|
status: "Active" | "Inactive";
|
59
|
-
/**__VLS_emit,__VLS_9,validation-success*/
|
60
80
|
_id: string;
|
61
81
|
referenceId: string;
|
62
82
|
securityCode: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@feedmepos/mf-payment",
|
3
|
-
"version": "0.0.0-beta.
|
3
|
+
"version": "0.0.0-beta.30",
|
4
4
|
"type": "module",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"@casl/ability": "^3.2.0",
|
34
34
|
"@feedmepos/core": "^2.6.0",
|
35
35
|
"@feedmepos/mf-common": "^1.8.21",
|
36
|
-
"@feedmepos/payment-entity": "^0.0.5-
|
36
|
+
"@feedmepos/payment-entity": "^0.0.5-demo13",
|
37
37
|
"@feedmepos/ui-library": "^1.2.44",
|
38
38
|
"axios": "^0.27.2",
|
39
39
|
"buffer": "^6.0.3",
|
@@ -1,254 +0,0 @@
|
|
1
|
-
import { defineComponent as k, openBlock as w, createElementBlock as U, Fragment as N, createElementVNode as v, createTextVNode as V, toDisplayString as S, ref as y, onMounted as q, computed as C, resolveComponent as d, unref as I, createVNode as g, createBlock as T, withCtx as B, isRef as P, resolveDynamicComponent as E, normalizeProps as L, mergeProps as M, createCommentVNode as O } from "vue";
|
2
|
-
import { u as _ } from "./index-CTWoVKkI.js";
|
3
|
-
import { useRouter as $ } from "vue-router";
|
4
|
-
import { t as b } from "./index-DvBq8FZH.js";
|
5
|
-
import { _ as j } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
6
|
-
import { u as A } from "./index-BYz1HdLk.js";
|
7
|
-
import { useSnackbar as G } from "@feedmepos/ui-library";
|
8
|
-
import { u as R } from "./error-K1CakhA9.js";
|
9
|
-
const z = /* @__PURE__ */ k({
|
10
|
-
__name: "Information",
|
11
|
-
props: {
|
12
|
-
terminal: {
|
13
|
-
type: Object,
|
14
|
-
required: !0
|
15
|
-
}
|
16
|
-
},
|
17
|
-
setup(t) {
|
18
|
-
return (u, a) => (w(), U(N, null, [
|
19
|
-
a[0] || (a[0] = v("b", null, "Name", -1)),
|
20
|
-
V(": " + S(t.terminal.name), 1),
|
21
|
-
a[1] || (a[1] = v("br", null, null, -1)),
|
22
|
-
a[2] || (a[2] = v("b", null, "Status", -1)),
|
23
|
-
V(": " + S(t.terminal.status), 1),
|
24
|
-
a[3] || (a[3] = v("br", null, null, -1)),
|
25
|
-
a[4] || (a[4] = v("b", null, "Device ID", -1)),
|
26
|
-
V(": " + S(t.terminal.deviceId ?? "-"), 1),
|
27
|
-
a[5] || (a[5] = v("br", null, null, -1))
|
28
|
-
], 64));
|
29
|
-
}
|
30
|
-
}), Q = {
|
31
|
-
key: 0,
|
32
|
-
class: "flex items-center justify-center min-h-[80vh]"
|
33
|
-
}, H = /* @__PURE__ */ k({
|
34
|
-
__name: "TerminalGateway",
|
35
|
-
props: {
|
36
|
-
terminal: {
|
37
|
-
type: Object,
|
38
|
-
required: !0
|
39
|
-
},
|
40
|
-
onUpdate: {
|
41
|
-
type: Function,
|
42
|
-
required: !0
|
43
|
-
}
|
44
|
-
},
|
45
|
-
setup(t) {
|
46
|
-
const { isLoading: u, startAsyncCall: a } = _(), m = t, f = y(), i = y(), o = y(-1), e = y({
|
47
|
-
terminalId: ""
|
48
|
-
});
|
49
|
-
q(() => {
|
50
|
-
if (a(async () => {
|
51
|
-
f.value = await b.getTerminals(m.terminal.referenceId);
|
52
|
-
}), !m.terminal.gateways)
|
53
|
-
return;
|
54
|
-
const n = m.terminal.gateways.findIndex((c) => c && c.gateway && c.gateway === "Terminal");
|
55
|
-
if (n === -1)
|
56
|
-
return;
|
57
|
-
o.value = n;
|
58
|
-
const r = m.terminal.gateways.at(n);
|
59
|
-
r.gateway === "Terminal" && r.config && (e.value = {
|
60
|
-
terminalId: r.config.terminalId
|
61
|
-
});
|
62
|
-
});
|
63
|
-
const s = C(() => (f.value ?? []).map((n) => ({
|
64
|
-
label: n.name ?? n._id,
|
65
|
-
value: n._id
|
66
|
-
})));
|
67
|
-
return (n, r) => {
|
68
|
-
const c = d("FmCircularProgress"), l = d("FmSelect"), p = d("FmButton"), x = d("FmForm");
|
69
|
-
return I(u) ? (w(), U("div", Q, [
|
70
|
-
g(c, { size: "xxl" })
|
71
|
-
])) : (w(), T(x, {
|
72
|
-
key: 1,
|
73
|
-
ref: i.value,
|
74
|
-
class: "flex flex-col gap-16 w-[500px]",
|
75
|
-
onValidationSuccess: r[1] || (r[1] = () => {
|
76
|
-
o.value > -1 ? t.terminal.gateways[o.value] = { gateway: "Terminal", config: e.value } : (t.terminal.gateways || (t.terminal.gateways = []), t.terminal.gateways.push({ gateway: "Terminal", config: e.value })), m.onUpdate(t.terminal);
|
77
|
-
})
|
78
|
-
}, {
|
79
|
-
default: B(() => [
|
80
|
-
g(l, {
|
81
|
-
modelValue: e.value.terminalId,
|
82
|
-
"onUpdate:modelValue": r[0] || (r[0] = (F) => e.value.terminalId = F),
|
83
|
-
label: "Terminal ID",
|
84
|
-
items: s.value
|
85
|
-
}, null, 8, ["modelValue", "items"]),
|
86
|
-
g(p, {
|
87
|
-
type: "submit",
|
88
|
-
label: "Save"
|
89
|
-
})
|
90
|
-
]),
|
91
|
-
_: 1
|
92
|
-
}, 512));
|
93
|
-
};
|
94
|
-
}
|
95
|
-
}), J = /* @__PURE__ */ k({
|
96
|
-
__name: "FiuuGateway",
|
97
|
-
props: {
|
98
|
-
terminal: {
|
99
|
-
type: Object,
|
100
|
-
required: !0
|
101
|
-
},
|
102
|
-
onUpdate: {
|
103
|
-
type: Function,
|
104
|
-
required: !0
|
105
|
-
}
|
106
|
-
},
|
107
|
-
setup(t) {
|
108
|
-
const u = t, a = [
|
109
|
-
{
|
110
|
-
label: "Fiuu Malaysia",
|
111
|
-
value: "cc.feedme.payment.rms"
|
112
|
-
},
|
113
|
-
{
|
114
|
-
label: "Fiuu Malaysia V2",
|
115
|
-
value: "cc.feedme.payment.fiuu_my"
|
116
|
-
},
|
117
|
-
{
|
118
|
-
label: "Fiuu Singapore",
|
119
|
-
value: "cc.feedme.payment.fiuu_sg"
|
120
|
-
}
|
121
|
-
], m = y(), f = y(-1), i = y({
|
122
|
-
packageId: "",
|
123
|
-
uniqueId: ""
|
124
|
-
});
|
125
|
-
return q(() => {
|
126
|
-
if (!u.terminal.gateways)
|
127
|
-
return;
|
128
|
-
const o = u.terminal.gateways.findIndex((s) => s && s.gateway && s.gateway === "Fiuu");
|
129
|
-
if (o === -1)
|
130
|
-
return;
|
131
|
-
f.value = o;
|
132
|
-
const e = u.terminal.gateways.at(o);
|
133
|
-
e.gateway === "Fiuu" && e.config && (i.value = {
|
134
|
-
packageId: e.config.packageId,
|
135
|
-
uniqueId: e.config.uniqueId
|
136
|
-
});
|
137
|
-
}), (o, e) => {
|
138
|
-
const s = d("FmSelect"), n = d("FmTextField"), r = d("FmButton"), c = d("FmForm");
|
139
|
-
return w(), T(c, {
|
140
|
-
ref: m.value,
|
141
|
-
class: "flex flex-col gap-16 w-[500px]",
|
142
|
-
onValidationSuccess: e[2] || (e[2] = () => {
|
143
|
-
f.value > -1 ? t.terminal.gateways[f.value] = { gateway: "Fiuu", config: i.value } : (t.terminal.gateways || (t.terminal.gateways = []), t.terminal.gateways.push({ gateway: "Fiuu", config: i.value })), u.onUpdate(t.terminal);
|
144
|
-
})
|
145
|
-
}, {
|
146
|
-
default: B(() => [
|
147
|
-
g(s, {
|
148
|
-
modelValue: i.value.packageId,
|
149
|
-
"onUpdate:modelValue": e[0] || (e[0] = (l) => i.value.packageId = l),
|
150
|
-
label: "Package ID",
|
151
|
-
items: a
|
152
|
-
}, null, 8, ["modelValue"]),
|
153
|
-
g(n, {
|
154
|
-
modelValue: i.value.uniqueId,
|
155
|
-
"onUpdate:modelValue": e[1] || (e[1] = (l) => i.value.uniqueId = l),
|
156
|
-
label: "Unique ID"
|
157
|
-
}, null, 8, ["modelValue"]),
|
158
|
-
g(r, {
|
159
|
-
type: "submit",
|
160
|
-
label: "Save"
|
161
|
-
})
|
162
|
-
]),
|
163
|
-
_: 1
|
164
|
-
}, 512);
|
165
|
-
};
|
166
|
-
}
|
167
|
-
}), te = /* @__PURE__ */ k({
|
168
|
-
__name: "TerminalSetting",
|
169
|
-
props: {
|
170
|
-
terminalId: {
|
171
|
-
type: String,
|
172
|
-
required: !0
|
173
|
-
}
|
174
|
-
},
|
175
|
-
setup(t) {
|
176
|
-
const u = t, { tab: a } = A({
|
177
|
-
tab: "information"
|
178
|
-
}), { isLoading: m, startAsyncCall: f } = _(!0), i = $(), o = G(), e = y();
|
179
|
-
async function s(l) {
|
180
|
-
try {
|
181
|
-
await b.updateById(
|
182
|
-
u.terminalId,
|
183
|
-
{
|
184
|
-
name: l.name,
|
185
|
-
status: l.status,
|
186
|
-
gateways: l.gateways ?? []
|
187
|
-
}
|
188
|
-
), e.value = await b.readById(u.terminalId), o.open({
|
189
|
-
type: "success",
|
190
|
-
message: "Terminal updated successfully"
|
191
|
-
});
|
192
|
-
} catch (p) {
|
193
|
-
o.open({
|
194
|
-
type: "error",
|
195
|
-
title: "Error occurs when update terminal",
|
196
|
-
message: R(p)
|
197
|
-
});
|
198
|
-
}
|
199
|
-
}
|
200
|
-
const n = [
|
201
|
-
{
|
202
|
-
label: "Information",
|
203
|
-
value: "information",
|
204
|
-
icon: "overview",
|
205
|
-
render: z
|
206
|
-
},
|
207
|
-
{
|
208
|
-
label: "Fiuu",
|
209
|
-
value: "fiuu",
|
210
|
-
icon: "payment",
|
211
|
-
render: J
|
212
|
-
}
|
213
|
-
], r = C(() => {
|
214
|
-
var l;
|
215
|
-
return (l = n.find((p) => p.value === a.value)) == null ? void 0 : l.render;
|
216
|
-
});
|
217
|
-
async function c() {
|
218
|
-
f(async () => {
|
219
|
-
e.value = await b.readById(u.terminalId), e.value.deviceType !== "TERMINAL" && n.push({
|
220
|
-
label: "Terminal",
|
221
|
-
value: "terminal",
|
222
|
-
icon: "shopping_cart_checkout",
|
223
|
-
render: H
|
224
|
-
});
|
225
|
-
});
|
226
|
-
}
|
227
|
-
return q(c), (l, p) => {
|
228
|
-
var F;
|
229
|
-
const x = d("FmTabs");
|
230
|
-
return w(), T(j, {
|
231
|
-
title: `Terminal (${(F = e.value) == null ? void 0 : F._id})`,
|
232
|
-
loading: I(m),
|
233
|
-
onBack: I(i).back
|
234
|
-
}, {
|
235
|
-
default: B(() => [
|
236
|
-
g(x, {
|
237
|
-
"model-value": I(a),
|
238
|
-
"onUpdate:modelValue": p[0] || (p[0] = (D) => P(a) ? a.value = D : null),
|
239
|
-
class: "mb-6",
|
240
|
-
items: n
|
241
|
-
}, null, 8, ["model-value"]),
|
242
|
-
I(a) ? (w(), T(E(r.value), L(M({ key: 0 }, {
|
243
|
-
terminal: e.value,
|
244
|
-
onUpdate: s
|
245
|
-
})), null, 16)) : O("", !0)
|
246
|
-
]),
|
247
|
-
_: 1
|
248
|
-
}, 8, ["title", "loading", "onBack"]);
|
249
|
-
};
|
250
|
-
}
|
251
|
-
});
|
252
|
-
export {
|
253
|
-
te as default
|
254
|
-
};
|