@feedmepos/mf-payment 1.2.5 → 1.2.7
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/{PayoutAccount-D9LY7i1J.js → PayoutAccount-90Fg0Eqb.js} +6 -6
- package/dist/{PayoutAccount-DEoI6K0j.js → PayoutAccount-DS14d5_9.js} +5 -5
- package/dist/{PayoutAccountSetting-5lrvWFIz.js → PayoutAccountSetting-PfKPX1B-.js} +3 -3
- package/dist/{Restaurant-AxoM-AsE.js → Restaurant-Dk0X2E1m.js} +4 -4
- package/dist/RestaurantSetting-S0CcLhRS.js +625 -0
- package/dist/{Settlement-DDwe_w3m.js → Settlement-DlFBQNQZ.js} +3 -3
- package/dist/{Settlement-D4CsP3fg.js → Settlement-DxI1z91R.js} +3 -3
- package/dist/{SettlementTransactions-Cmv7dqVI.js → SettlementTransactions-CRFD0bFO.js} +3 -3
- package/dist/{SettlementTransactions-Dp3nN442.js → SettlementTransactions-DgOj_D8D.js} +3 -3
- package/dist/{Terminal-B8UQH6ga.js → Terminal-Ckx8vQ_3.js} +5 -5
- package/dist/TerminalSetting-DicoKPoS.js +572 -0
- package/dist/{Transaction-BZ7H6oB_.js → Transaction-CF_sHrl6.js} +5 -5
- package/dist/{Transaction-KkfCz4Cu.js → Transaction-Da1_AnWG.js} +7 -7
- package/dist/{TransactionOld-BLpQHFH1.js → TransactionOld-6Nm8xhGh.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-C4Bb203Q.js → TransactionTable.vue_vue_type_script_setup_true_lang-CaKdn0VN.js} +3 -3
- package/dist/api/payment-gateway/index.d.ts +3 -0
- package/dist/{app-I2TNuZCs.js → app-C4_gin4V.js} +331 -331
- package/dist/app.js +1 -1
- package/dist/{assets-D5Qc4r7j.js → assets-CkJwKbJo.js} +2 -2
- package/dist/{grafana-BAbIv4CF.js → grafana-5rTce_2u.js} +1 -1
- package/dist/{index-1NP0WkxZ.js → index-B-dODLCP.js} +2 -2
- package/dist/{index-bOlAWIVP.js → index-B2K92QTs.js} +1 -1
- package/dist/{index-CnGVTtwu.js → index-CjFw5eYb.js} +1 -1
- package/dist/{index-D209n4gS.js → index-D_ZQysnD.js} +7010 -6967
- package/dist/{index-CguRXKmG.js → index-REZAHMM0.js} +1 -1
- package/dist/{index-Cc0abuxv.js → index-pQqLjJzo.js} +1 -1
- package/dist/{index-DGcRvKvr.js → index-yHpeK6eL.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-HYqCCZsZ.js → index.vue_vue_type_script_setup_true_lang-B-LNPiqR.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-DNGKjfY1.js → payout-account-DYhD0NF_.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +16 -16
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +42 -42
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +42 -42
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +42 -42
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +10 -10
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +46 -0
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +12 -10
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +8 -8
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +20 -20
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +20 -20
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +20 -20
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +20 -20
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +20 -20
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +20 -20
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +20 -20
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +32 -32
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +36 -36
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +18 -18
- package/dist/views/settlement/SettlementTable.vue.d.ts +4 -4
- package/package.json +2 -2
- package/dist/RestaurantSetting-B6LQF664.js +0 -501
- package/dist/TerminalSetting-yRok1Iuc.js +0 -572
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as y, resolveComponent as u, openBlock as h, createBlock as k, normalizeClass as N, withCtx as c, createElementVNode as P, toDisplayString as I, createVNode as i, computed as x, ref as S, watch as F, unref as r, isRef as f, h as v } from "vue";
|
2
|
-
import { u as O } from "./index-
|
3
|
-
import { _ as K } from "./index-
|
2
|
+
import { u as O } from "./index-pQqLjJzo.js";
|
3
|
+
import { _ as K } from "./index-REZAHMM0.js";
|
4
4
|
import { _ as A } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
5
|
-
import { P as V } from "./payout-account-
|
6
|
-
import { p as D } from "./index-
|
5
|
+
import { P as V } from "./payout-account-DYhD0NF_.js";
|
6
|
+
import { p as D } from "./index-B-dODLCP.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
|
-
import "./index-
|
9
|
-
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-
|
8
|
+
import "./index-D_ZQysnD.js";
|
9
|
+
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-B-LNPiqR.js";
|
10
10
|
import { useRouter as U } from "vue-router";
|
11
11
|
import { _ as $ } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
12
12
|
const G = /* @__PURE__ */ y({
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { defineComponent as P, ref as W, reactive as sA, computed as I, watch as AA, resolveComponent as V, openBlock as c, createElementBlock as x, Fragment as tA, unref as a, createVNode as m, createBlock as i, createCommentVNode as j, withCtx as q, createElementVNode as n, toDisplayString as z, normalizeClass as k, h as N, onMounted as oA } from "vue";
|
2
|
-
import { p as K } from "./index-
|
3
|
-
import { u as gA, e as lA } from "./index-
|
2
|
+
import { p as K } from "./index-B-dODLCP.js";
|
3
|
+
import { u as gA, e as lA } from "./index-D_ZQysnD.js";
|
4
4
|
import { defineStore as rA } from "pinia";
|
5
5
|
import { useI18n as R, useCoreStore as eA } from "@feedmepos/mf-common";
|
6
|
-
import { c as cA, a as _, P as J } from "./payout-account-
|
6
|
+
import { c as cA, a as _, P as J } from "./payout-account-DYhD0NF_.js";
|
7
7
|
import { useDialogChild as nA, useDialog as BA } from "@feedmepos/ui-library";
|
8
8
|
import { z as F, a as H } from "./validator-D5jtpt9A.js";
|
9
|
-
import { _ as U } from "./index-
|
9
|
+
import { _ as U } from "./index-REZAHMM0.js";
|
10
10
|
import { P as $ } from "./PDFViewer-xrBtzrlR.js";
|
11
|
-
import "./app-
|
11
|
+
import "./app-C4_gin4V.js";
|
12
12
|
import { _ as uA } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
13
13
|
function wA() {
|
14
14
|
return {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as V, resolveComponent as p, openBlock as g, createElementBlock as _, Fragment as $, createElementVNode as i, createVNode as r, withCtx as k, createTextVNode as C, toDisplayString as U, createCommentVNode as P, createBlock as x, ref as T, watch as W, computed as D, unref as c, isRef as q, h as G, onMounted as J, resolveDynamicComponent as Y, normalizeProps as L, mergeProps as H } from "vue";
|
2
|
-
import { p as N } from "./index-
|
3
|
-
import { u as j, e as R } from "./index-
|
2
|
+
import { p as N } from "./index-B-dODLCP.js";
|
3
|
+
import { u as j, e as R } from "./index-D_ZQysnD.js";
|
4
4
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
5
5
|
import { useRouter as te } from "vue-router";
|
6
|
-
import { u as K } from "./index-
|
6
|
+
import { u as K } from "./index-pQqLjJzo.js";
|
7
7
|
import { P as Q } from "./PDFViewer-xrBtzrlR.js";
|
8
8
|
import { useSnackbar as z, components as ae } from "@feedmepos/ui-library";
|
9
9
|
import { u as B } from "./error-K1CakhA9.js";
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as F, ref as y, resolveComponent as g, openBlock as x, createBlock as A, withCtx as $, createVNode as f, createElementVNode as d, normalizeStyle as T, createElementBlock as R, Fragment as z, renderList as q, computed as C, watch as I, onMounted as N, unref as h, toDisplayString as B, normalizeClass as W, isRef as E, h as P } from "vue";
|
2
|
-
import { u as O } from "./index-
|
2
|
+
import { u as O } from "./index-pQqLjJzo.js";
|
3
3
|
import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
4
4
|
import "@feedmepos/ui-library";
|
5
|
-
import { u as G } from "./index-
|
5
|
+
import { u as G } from "./index-D_ZQysnD.js";
|
6
6
|
import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
7
|
-
import { r as H } from "./index-
|
7
|
+
import { r as H } from "./index-yHpeK6eL.js";
|
8
8
|
import { useRouter as J } from "vue-router";
|
9
|
-
import { g as X } from "./grafana-
|
9
|
+
import { g as X } from "./grafana-5rTce_2u.js";
|
10
10
|
const Y = ["id"], L = /* @__PURE__ */ F({
|
11
11
|
__name: "FmTableSelection",
|
12
12
|
props: {
|
@@ -0,0 +1,625 @@
|
|
1
|
+
import { defineComponent as D, ref as x, resolveComponent as s, openBlock as F, createBlock as w, withCtx as k, createVNode as o, unref as a, createElementVNode as G, createCommentVNode as S, computed as q, onMounted as $, createElementBlock as O, Fragment as j, isRef as B, resolveDynamicComponent as K, normalizeProps as P, mergeProps as E } from "vue";
|
2
|
+
import { g as R, b as A, u as N, e as C } from "./index-D_ZQysnD.js";
|
3
|
+
import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
4
|
+
import { useRouter as H } from "vue-router";
|
5
|
+
import { u as Y } from "./index-pQqLjJzo.js";
|
6
|
+
import { z as p, a as f } from "./validator-D5jtpt9A.js";
|
7
|
+
import { useCoreStore as L } from "@feedmepos/mf-common";
|
8
|
+
import { u as Q } from "./error-K1CakhA9.js";
|
9
|
+
import { useSnackbar as Z } from "@feedmepos/ui-library";
|
10
|
+
import { r as h } from "./index-yHpeK6eL.js";
|
11
|
+
const T = {
|
12
|
+
async get(n) {
|
13
|
+
return R(
|
14
|
+
await A().get(
|
15
|
+
`restaurants/${n}/payment-gateway`
|
16
|
+
)
|
17
|
+
);
|
18
|
+
},
|
19
|
+
async upsert(n, m) {
|
20
|
+
return R(
|
21
|
+
await A().post(
|
22
|
+
`restaurants/${n}/payment-gateway`,
|
23
|
+
{ data: m }
|
24
|
+
)
|
25
|
+
);
|
26
|
+
},
|
27
|
+
async delete(n, m) {
|
28
|
+
return R(
|
29
|
+
await A().delete(
|
30
|
+
`restaurants/${n}/payment-gateway/${m}`
|
31
|
+
)
|
32
|
+
);
|
33
|
+
},
|
34
|
+
async grabSync(n) {
|
35
|
+
return R(
|
36
|
+
await A().post(
|
37
|
+
`restaurants/${n}/payment-gateway/grab/sync`
|
38
|
+
)
|
39
|
+
);
|
40
|
+
}
|
41
|
+
}, J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */ D({
|
42
|
+
__name: "FiuuGateway",
|
43
|
+
props: {
|
44
|
+
onUpdate: {
|
45
|
+
type: Function,
|
46
|
+
required: !0
|
47
|
+
},
|
48
|
+
onDelete: {
|
49
|
+
type: Function,
|
50
|
+
required: !0
|
51
|
+
},
|
52
|
+
gateway: {
|
53
|
+
type: Object,
|
54
|
+
required: !0
|
55
|
+
}
|
56
|
+
},
|
57
|
+
setup(n) {
|
58
|
+
var g, c;
|
59
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
60
|
+
merchantId: "",
|
61
|
+
uniqueId: "",
|
62
|
+
verifyKey: "",
|
63
|
+
secretKey: "",
|
64
|
+
applicationCode: "",
|
65
|
+
offlineSecret: ""
|
66
|
+
});
|
67
|
+
return (d, e) => {
|
68
|
+
const i = s("FmTextField"), V = s("FmSwitch"), y = s("FmButton"), v = s("FmForm");
|
69
|
+
return F(), w(v, {
|
70
|
+
ref: "form",
|
71
|
+
class: "flex flex-col gap-16",
|
72
|
+
onValidationSuccess: e[7] || (e[7] = () => n.onUpdate(r.value, t.value))
|
73
|
+
}, {
|
74
|
+
default: k(() => [
|
75
|
+
o(i, {
|
76
|
+
modelValue: t.value.merchantId,
|
77
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
|
78
|
+
label: "Merchant ID",
|
79
|
+
rules: a(p)(a(f).string())
|
80
|
+
}, null, 8, ["modelValue", "rules"]),
|
81
|
+
o(i, {
|
82
|
+
modelValue: t.value.uniqueId,
|
83
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.uniqueId = l),
|
84
|
+
label: "Unique ID",
|
85
|
+
rules: a(p)(a(f).string())
|
86
|
+
}, null, 8, ["modelValue", "rules"]),
|
87
|
+
o(i, {
|
88
|
+
modelValue: t.value.verifyKey,
|
89
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.verifyKey = l),
|
90
|
+
label: "Verify Key",
|
91
|
+
rules: a(p)(a(f).string())
|
92
|
+
}, null, 8, ["modelValue", "rules"]),
|
93
|
+
o(i, {
|
94
|
+
modelValue: t.value.secretKey,
|
95
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.secretKey = l),
|
96
|
+
label: "Secret Key",
|
97
|
+
rules: a(p)(a(f).string())
|
98
|
+
}, null, 8, ["modelValue", "rules"]),
|
99
|
+
o(i, {
|
100
|
+
modelValue: t.value.applicationCode,
|
101
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.applicationCode = l),
|
102
|
+
label: "Application Code ( Offline )",
|
103
|
+
rules: a(p)(a(f).string())
|
104
|
+
}, null, 8, ["modelValue", "rules"]),
|
105
|
+
o(i, {
|
106
|
+
modelValue: t.value.offlineSecret,
|
107
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.offlineSecret = l),
|
108
|
+
label: "Offline Secret ( Offline )",
|
109
|
+
rules: a(p)(a(f).string())
|
110
|
+
}, null, 8, ["modelValue", "rules"]),
|
111
|
+
o(V, {
|
112
|
+
modelValue: r.value,
|
113
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => r.value = l),
|
114
|
+
label: "Is Active"
|
115
|
+
}, null, 8, ["modelValue"]),
|
116
|
+
G("div", J, [
|
117
|
+
n.gateway ? (F(), w(y, {
|
118
|
+
key: 0,
|
119
|
+
class: "flex-1",
|
120
|
+
variant: "secondary",
|
121
|
+
label: "Delete",
|
122
|
+
onclick: () => n.onDelete(n.gateway)
|
123
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
124
|
+
o(y, {
|
125
|
+
type: "submit",
|
126
|
+
class: "flex-1",
|
127
|
+
variant: "primary",
|
128
|
+
label: "Save"
|
129
|
+
})
|
130
|
+
])
|
131
|
+
]),
|
132
|
+
_: 1
|
133
|
+
}, 512);
|
134
|
+
};
|
135
|
+
}
|
136
|
+
}), X = { class: "flex mt-6 space-x-6" }, ee = /* @__PURE__ */ D({
|
137
|
+
__name: "RevenueMonsterGateway",
|
138
|
+
props: {
|
139
|
+
onUpdate: {
|
140
|
+
type: Function,
|
141
|
+
required: !0
|
142
|
+
},
|
143
|
+
onDelete: {
|
144
|
+
type: Function,
|
145
|
+
required: !0
|
146
|
+
},
|
147
|
+
gateway: {
|
148
|
+
type: Object,
|
149
|
+
required: !0
|
150
|
+
}
|
151
|
+
},
|
152
|
+
setup(n) {
|
153
|
+
var g, c;
|
154
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
155
|
+
storeId: "",
|
156
|
+
clientId: "",
|
157
|
+
clientSecret: "",
|
158
|
+
clientPrivateKey: ""
|
159
|
+
});
|
160
|
+
return (d, e) => {
|
161
|
+
const i = s("FmTextField"), V = s("FmTextarea"), y = s("FmSwitch"), v = s("FmButton"), l = s("FmForm");
|
162
|
+
return F(), w(l, {
|
163
|
+
ref: "form",
|
164
|
+
class: "flex flex-col gap-16",
|
165
|
+
onValidationSuccess: e[5] || (e[5] = () => n.onUpdate(r.value, t.value))
|
166
|
+
}, {
|
167
|
+
default: k(() => [
|
168
|
+
o(i, {
|
169
|
+
modelValue: t.value.storeId,
|
170
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => t.value.storeId = u),
|
171
|
+
label: "Store ID",
|
172
|
+
rules: a(p)(a(f).string())
|
173
|
+
}, null, 8, ["modelValue", "rules"]),
|
174
|
+
o(i, {
|
175
|
+
modelValue: t.value.clientId,
|
176
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => t.value.clientId = u),
|
177
|
+
label: "Client ID",
|
178
|
+
rules: a(p)(a(f).string())
|
179
|
+
}, null, 8, ["modelValue", "rules"]),
|
180
|
+
o(i, {
|
181
|
+
modelValue: t.value.clientSecret,
|
182
|
+
"onUpdate:modelValue": e[2] || (e[2] = (u) => t.value.clientSecret = u),
|
183
|
+
label: "Client Secret",
|
184
|
+
rules: a(p)(a(f).string())
|
185
|
+
}, null, 8, ["modelValue", "rules"]),
|
186
|
+
o(V, {
|
187
|
+
modelValue: t.value.clientPrivateKey,
|
188
|
+
"onUpdate:modelValue": e[3] || (e[3] = (u) => t.value.clientPrivateKey = u),
|
189
|
+
label: "Client Private Key"
|
190
|
+
}, null, 8, ["modelValue"]),
|
191
|
+
o(y, {
|
192
|
+
modelValue: r.value,
|
193
|
+
"onUpdate:modelValue": e[4] || (e[4] = (u) => r.value = u),
|
194
|
+
label: "Is Active"
|
195
|
+
}, null, 8, ["modelValue"]),
|
196
|
+
G("div", X, [
|
197
|
+
n.gateway ? (F(), w(v, {
|
198
|
+
key: 0,
|
199
|
+
class: "flex-1",
|
200
|
+
variant: "secondary",
|
201
|
+
label: "Delete",
|
202
|
+
onclick: () => n.onDelete(n.gateway)
|
203
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
204
|
+
o(v, {
|
205
|
+
type: "submit",
|
206
|
+
class: "flex-1",
|
207
|
+
variant: "primary",
|
208
|
+
label: "Save"
|
209
|
+
})
|
210
|
+
])
|
211
|
+
]),
|
212
|
+
_: 1
|
213
|
+
}, 512);
|
214
|
+
};
|
215
|
+
}
|
216
|
+
}), te = { class: "flex mt-6 space-x-6" }, ae = /* @__PURE__ */ D({
|
217
|
+
__name: "GhlGateway",
|
218
|
+
props: {
|
219
|
+
onUpdate: {
|
220
|
+
type: Function,
|
221
|
+
required: !0
|
222
|
+
},
|
223
|
+
onDelete: {
|
224
|
+
type: Function,
|
225
|
+
required: !0
|
226
|
+
},
|
227
|
+
gateway: {
|
228
|
+
type: Object,
|
229
|
+
required: !0
|
230
|
+
}
|
231
|
+
},
|
232
|
+
setup(n) {
|
233
|
+
var g, c;
|
234
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
235
|
+
merchantId: "",
|
236
|
+
terminalId: "",
|
237
|
+
privateKey: ""
|
238
|
+
});
|
239
|
+
return (d, e) => {
|
240
|
+
const i = s("FmTextField"), V = s("FmTextarea"), y = s("FmSwitch"), v = s("FmButton"), l = s("FmForm");
|
241
|
+
return F(), w(l, {
|
242
|
+
ref: "form",
|
243
|
+
class: "flex flex-col gap-16",
|
244
|
+
onValidationSuccess: e[4] || (e[4] = () => n.onUpdate(r.value, t.value))
|
245
|
+
}, {
|
246
|
+
default: k(() => [
|
247
|
+
o(i, {
|
248
|
+
modelValue: t.value.merchantId,
|
249
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => t.value.merchantId = u),
|
250
|
+
label: "Merchant ID",
|
251
|
+
rules: a(p)(a(f).string())
|
252
|
+
}, null, 8, ["modelValue", "rules"]),
|
253
|
+
o(i, {
|
254
|
+
modelValue: t.value.terminalId,
|
255
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => t.value.terminalId = u),
|
256
|
+
label: "Terminal ID",
|
257
|
+
rules: a(p)(a(f).string())
|
258
|
+
}, null, 8, ["modelValue", "rules"]),
|
259
|
+
o(V, {
|
260
|
+
id: "ghl_pkey",
|
261
|
+
modelValue: t.value.privateKey,
|
262
|
+
"onUpdate:modelValue": e[2] || (e[2] = (u) => t.value.privateKey = u),
|
263
|
+
label: "Private Key",
|
264
|
+
rules: a(p)(a(f).string())
|
265
|
+
}, null, 8, ["modelValue", "rules"]),
|
266
|
+
o(y, {
|
267
|
+
modelValue: r.value,
|
268
|
+
"onUpdate:modelValue": e[3] || (e[3] = (u) => r.value = u),
|
269
|
+
label: "Is Active"
|
270
|
+
}, null, 8, ["modelValue"]),
|
271
|
+
G("div", te, [
|
272
|
+
n.gateway ? (F(), w(v, {
|
273
|
+
key: 0,
|
274
|
+
class: "flex-1",
|
275
|
+
variant: "secondary",
|
276
|
+
label: "Delete",
|
277
|
+
onclick: () => n.onDelete(n.gateway)
|
278
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
279
|
+
o(v, {
|
280
|
+
type: "submit",
|
281
|
+
class: "flex-1",
|
282
|
+
variant: "primary",
|
283
|
+
label: "Save"
|
284
|
+
})
|
285
|
+
])
|
286
|
+
]),
|
287
|
+
_: 1
|
288
|
+
}, 512);
|
289
|
+
};
|
290
|
+
}
|
291
|
+
}), le = { class: "flex mt-6 space-x-6" }, ne = /* @__PURE__ */ D({
|
292
|
+
__name: "MacauPassGateway",
|
293
|
+
props: {
|
294
|
+
onUpdate: {
|
295
|
+
type: Function,
|
296
|
+
required: !0
|
297
|
+
},
|
298
|
+
onDelete: {
|
299
|
+
type: Function,
|
300
|
+
required: !0
|
301
|
+
},
|
302
|
+
gateway: {
|
303
|
+
type: Object,
|
304
|
+
required: !0
|
305
|
+
}
|
306
|
+
},
|
307
|
+
setup(n) {
|
308
|
+
var g, c;
|
309
|
+
const m = n, r = x(((g = m.gateway) == null ? void 0 : g.active) ?? !1), t = x(((c = m.gateway) == null ? void 0 : c.config) || {
|
310
|
+
merchantId: "",
|
311
|
+
merchantName: "",
|
312
|
+
merchantCategoryCode: "",
|
313
|
+
storeID: "",
|
314
|
+
storeName: ""
|
315
|
+
});
|
316
|
+
return (d, e) => {
|
317
|
+
const i = s("FmTextField"), V = s("FmSwitch"), y = s("FmButton"), v = s("FmForm");
|
318
|
+
return F(), w(v, {
|
319
|
+
ref: "form",
|
320
|
+
class: "flex flex-col gap-16",
|
321
|
+
onValidationSuccess: e[6] || (e[6] = () => n.onUpdate(r.value, t.value))
|
322
|
+
}, {
|
323
|
+
default: k(() => [
|
324
|
+
o(i, {
|
325
|
+
modelValue: t.value.merchantId,
|
326
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
|
327
|
+
label: "Merchant ID",
|
328
|
+
rules: a(p)(a(f).string())
|
329
|
+
}, null, 8, ["modelValue", "rules"]),
|
330
|
+
o(i, {
|
331
|
+
modelValue: t.value.merchantName,
|
332
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.merchantName = l),
|
333
|
+
label: "Merchant Name",
|
334
|
+
rules: a(p)(a(f).string())
|
335
|
+
}, null, 8, ["modelValue", "rules"]),
|
336
|
+
o(i, {
|
337
|
+
modelValue: t.value.merchantCategoryCode,
|
338
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.merchantCategoryCode = l),
|
339
|
+
label: "Merchant MCC",
|
340
|
+
rules: a(p)(a(f).string())
|
341
|
+
}, null, 8, ["modelValue", "rules"]),
|
342
|
+
o(i, {
|
343
|
+
modelValue: t.value.storeID,
|
344
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.storeID = l),
|
345
|
+
label: "Store ID",
|
346
|
+
rules: a(p)(a(f).string())
|
347
|
+
}, null, 8, ["modelValue", "rules"]),
|
348
|
+
o(i, {
|
349
|
+
modelValue: t.value.storeName,
|
350
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.storeName = l),
|
351
|
+
label: "Store Name",
|
352
|
+
rules: a(p)(a(f).string())
|
353
|
+
}, null, 8, ["modelValue", "rules"]),
|
354
|
+
o(V, {
|
355
|
+
modelValue: r.value,
|
356
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => r.value = l),
|
357
|
+
label: "Is Active"
|
358
|
+
}, null, 8, ["modelValue"]),
|
359
|
+
G("div", le, [
|
360
|
+
n.gateway ? (F(), w(y, {
|
361
|
+
key: 0,
|
362
|
+
class: "flex-1",
|
363
|
+
variant: "secondary",
|
364
|
+
label: "Delete",
|
365
|
+
onclick: () => n.onDelete(n.gateway)
|
366
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
367
|
+
o(y, {
|
368
|
+
type: "submit",
|
369
|
+
class: "flex-1",
|
370
|
+
variant: "primary",
|
371
|
+
label: "Save"
|
372
|
+
})
|
373
|
+
])
|
374
|
+
]),
|
375
|
+
_: 1
|
376
|
+
}, 512);
|
377
|
+
};
|
378
|
+
}
|
379
|
+
}), oe = { class: "flex items-end" }, ue = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ D({
|
380
|
+
__name: "GrabGateway",
|
381
|
+
props: {
|
382
|
+
onUpdate: {
|
383
|
+
type: Function,
|
384
|
+
required: !0
|
385
|
+
},
|
386
|
+
onDelete: {
|
387
|
+
type: Function,
|
388
|
+
required: !0
|
389
|
+
},
|
390
|
+
gateway: {
|
391
|
+
type: Object,
|
392
|
+
required: !0
|
393
|
+
}
|
394
|
+
},
|
395
|
+
setup(n) {
|
396
|
+
var V, y;
|
397
|
+
const m = Z(), { isLoading: r, startAsyncCall: t } = N(), g = L(), c = n, d = x(((V = c.gateway) == null ? void 0 : V.active) ?? !1), e = x(((y = c.gateway) == null ? void 0 : y.config) || {
|
398
|
+
merchantId: ""
|
399
|
+
});
|
400
|
+
async function i() {
|
401
|
+
t(async () => {
|
402
|
+
var v;
|
403
|
+
try {
|
404
|
+
const { merchantID: l } = await T.grabSync(((v = g.currentRestaurant.value) == null ? void 0 : v._id) ?? "");
|
405
|
+
e.value.merchantId = l, d.value = !0, m.open({
|
406
|
+
type: "success",
|
407
|
+
title: "Grab Setting sync succesfully, you will still need to save the changes."
|
408
|
+
});
|
409
|
+
} catch (l) {
|
410
|
+
m.open({
|
411
|
+
type: "error",
|
412
|
+
title: "Error occurs when sync ordering settings",
|
413
|
+
message: Q(l)
|
414
|
+
});
|
415
|
+
}
|
416
|
+
});
|
417
|
+
}
|
418
|
+
return (v, l) => {
|
419
|
+
const u = s("FmTextField"), b = s("FmButton"), I = s("FmTooltip"), U = s("FmSwitch"), _ = s("FmForm");
|
420
|
+
return F(), w(_, {
|
421
|
+
ref: "form",
|
422
|
+
class: "flex flex-col gap-16",
|
423
|
+
onValidationSuccess: l[2] || (l[2] = () => n.onUpdate(d.value, e.value))
|
424
|
+
}, {
|
425
|
+
default: k(() => [
|
426
|
+
G("div", oe, [
|
427
|
+
o(u, {
|
428
|
+
modelValue: e.value.merchantId,
|
429
|
+
"onUpdate:modelValue": l[0] || (l[0] = (M) => e.value.merchantId = M),
|
430
|
+
label: "Merchant ID",
|
431
|
+
rules: a(p)(a(f).string())
|
432
|
+
}, null, 8, ["modelValue", "rules"]),
|
433
|
+
o(I, {
|
434
|
+
variant: "plain",
|
435
|
+
placement: "right",
|
436
|
+
content: "Sync from Ordering Settings"
|
437
|
+
}, {
|
438
|
+
default: k(() => [
|
439
|
+
o(b, {
|
440
|
+
class: "ml-2",
|
441
|
+
type: "button",
|
442
|
+
variant: "primary",
|
443
|
+
icon: "sync",
|
444
|
+
loading: a(r),
|
445
|
+
onclick: () => i()
|
446
|
+
}, null, 8, ["loading", "onclick"])
|
447
|
+
]),
|
448
|
+
_: 1
|
449
|
+
})
|
450
|
+
]),
|
451
|
+
o(U, {
|
452
|
+
modelValue: d.value,
|
453
|
+
"onUpdate:modelValue": l[1] || (l[1] = (M) => d.value = M),
|
454
|
+
label: "Is Active"
|
455
|
+
}, null, 8, ["modelValue"]),
|
456
|
+
G("div", ue, [
|
457
|
+
n.gateway ? (F(), w(b, {
|
458
|
+
key: 0,
|
459
|
+
class: "flex-1",
|
460
|
+
variant: "secondary",
|
461
|
+
label: "Delete",
|
462
|
+
onclick: () => n.onDelete(n.gateway)
|
463
|
+
}, null, 8, ["onclick"])) : S("", !0),
|
464
|
+
o(b, {
|
465
|
+
type: "submit",
|
466
|
+
class: "flex-1",
|
467
|
+
variant: "primary",
|
468
|
+
label: "Save"
|
469
|
+
})
|
470
|
+
])
|
471
|
+
]),
|
472
|
+
_: 1
|
473
|
+
}, 512);
|
474
|
+
};
|
475
|
+
}
|
476
|
+
}), se = {
|
477
|
+
key: 0,
|
478
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
479
|
+
}, ie = /* @__PURE__ */ D({
|
480
|
+
__name: "PaymentGateway",
|
481
|
+
props: {
|
482
|
+
restaurant: {
|
483
|
+
type: Object,
|
484
|
+
required: !0
|
485
|
+
}
|
486
|
+
},
|
487
|
+
setup(n) {
|
488
|
+
const m = [
|
489
|
+
{
|
490
|
+
label: "Fiuu",
|
491
|
+
value: "RAZER_MERCHANT_SERVICE",
|
492
|
+
form: W,
|
493
|
+
region: [C.F_COUNTRY.enum.MY, C.F_COUNTRY.enum.SG]
|
494
|
+
},
|
495
|
+
{
|
496
|
+
label: "Revenue Monster",
|
497
|
+
value: "REVENUE_MONSTER",
|
498
|
+
form: ee,
|
499
|
+
region: [C.F_COUNTRY.enum.MY]
|
500
|
+
},
|
501
|
+
{
|
502
|
+
label: "GHL",
|
503
|
+
value: "E_GHL",
|
504
|
+
form: ae,
|
505
|
+
region: [C.F_COUNTRY.enum.MY]
|
506
|
+
},
|
507
|
+
{
|
508
|
+
label: "Grab",
|
509
|
+
value: "GRAB",
|
510
|
+
form: re,
|
511
|
+
region: [C.F_COUNTRY.enum.MY]
|
512
|
+
},
|
513
|
+
{
|
514
|
+
label: "Macau Pass",
|
515
|
+
value: "MACAU_PASS",
|
516
|
+
form: ne,
|
517
|
+
region: [C.F_COUNTRY.enum.MO]
|
518
|
+
}
|
519
|
+
], r = n, t = L(), { isLoading: g, startAsyncCall: c } = N(), { activeGateway: d } = Y({
|
520
|
+
activeGateway: ""
|
521
|
+
}), e = x([]);
|
522
|
+
async function i(u, b) {
|
523
|
+
await c(async () => {
|
524
|
+
const I = {
|
525
|
+
_id: "",
|
526
|
+
_rev: "",
|
527
|
+
paymentGateway: d.value,
|
528
|
+
config: b,
|
529
|
+
active: u
|
530
|
+
}, U = e.value.find((_) => _.paymentGateway === d.value);
|
531
|
+
U && (I._id = U._id, I._rev = U._rev), await T.upsert(r.restaurant._id, I), e.value = await T.get(r.restaurant._id);
|
532
|
+
});
|
533
|
+
}
|
534
|
+
async function V(u) {
|
535
|
+
c(async () => {
|
536
|
+
await T.delete(r.restaurant._id, u._id), e.value = await T.get(r.restaurant._id);
|
537
|
+
});
|
538
|
+
}
|
539
|
+
const y = q(() => m.filter((u) => u.region.includes(t.currentCountry.value ?? C.F_COUNTRY.enum.MY)));
|
540
|
+
function v() {
|
541
|
+
c(async () => {
|
542
|
+
e.value = await T.get(r.restaurant._id), y.value.length > 0 && (d.value = y.value[0].value);
|
543
|
+
});
|
544
|
+
}
|
545
|
+
$(v);
|
546
|
+
const l = q(() => {
|
547
|
+
var u;
|
548
|
+
return (u = m.find((b) => b.value === d.value)) == null ? void 0 : u.form;
|
549
|
+
});
|
550
|
+
return (u, b) => {
|
551
|
+
const I = s("FmCircularProgress"), U = s("FmTabs");
|
552
|
+
return F(), O(j, null, [
|
553
|
+
a(g) ? (F(), O("div", se, [
|
554
|
+
o(I, { size: "xxl" })
|
555
|
+
])) : S("", !0),
|
556
|
+
o(U, {
|
557
|
+
class: "mb-6",
|
558
|
+
"model-value": a(d),
|
559
|
+
"onUpdate:modelValue": b[0] || (b[0] = (_) => B(d) ? d.value = _ : null),
|
560
|
+
items: y.value
|
561
|
+
}, null, 8, ["model-value", "items"]),
|
562
|
+
a(d) ? (F(), w(K(l.value), P(E({ key: 1 }, {
|
563
|
+
gateway: e.value.find((_) => _.paymentGateway === a(d)),
|
564
|
+
onDelete: V,
|
565
|
+
onUpdate: i
|
566
|
+
})), null, 16)) : S("", !0)
|
567
|
+
], 64);
|
568
|
+
};
|
569
|
+
}
|
570
|
+
}), we = /* @__PURE__ */ D({
|
571
|
+
__name: "RestaurantSetting",
|
572
|
+
props: {
|
573
|
+
restaurantId: {
|
574
|
+
type: String,
|
575
|
+
required: !0
|
576
|
+
}
|
577
|
+
},
|
578
|
+
setup(n) {
|
579
|
+
const m = n, { tab: r } = Y({
|
580
|
+
tab: "payment-gateway"
|
581
|
+
}), { isLoading: t, startAsyncCall: g } = N(!0), c = H(), d = x(), e = [
|
582
|
+
{
|
583
|
+
label: "Payment Gateway",
|
584
|
+
value: "payment-gateway",
|
585
|
+
icon: "assured_workload",
|
586
|
+
render: ie
|
587
|
+
}
|
588
|
+
];
|
589
|
+
function i() {
|
590
|
+
g(async () => {
|
591
|
+
d.value = await h.readRestaurantById(m.restaurantId);
|
592
|
+
});
|
593
|
+
}
|
594
|
+
$(i);
|
595
|
+
const V = q(() => {
|
596
|
+
var y;
|
597
|
+
return (y = e.find((v) => v.value === r.value)) == null ? void 0 : y.render;
|
598
|
+
});
|
599
|
+
return (y, v) => {
|
600
|
+
var u;
|
601
|
+
const l = s("FmTabs");
|
602
|
+
return F(), w(z, {
|
603
|
+
title: `Restaurant (${(u = d.value) == null ? void 0 : u._id})`,
|
604
|
+
loading: a(t),
|
605
|
+
onBack: a(c).back
|
606
|
+
}, {
|
607
|
+
default: k(() => [
|
608
|
+
o(l, {
|
609
|
+
"model-value": a(r),
|
610
|
+
"onUpdate:modelValue": v[0] || (v[0] = (b) => B(r) ? r.value = b : null),
|
611
|
+
class: "mb-6",
|
612
|
+
items: e
|
613
|
+
}, null, 8, ["model-value"]),
|
614
|
+
a(r) && d.value ? (F(), w(K(V.value), P(E({ key: 0 }, {
|
615
|
+
restaurant: d.value
|
616
|
+
})), null, 16)) : S("", !0)
|
617
|
+
]),
|
618
|
+
_: 1
|
619
|
+
}, 8, ["title", "loading", "onBack"]);
|
620
|
+
};
|
621
|
+
}
|
622
|
+
});
|
623
|
+
export {
|
624
|
+
we as default
|
625
|
+
};
|