@feedmepos/mf-payment 1.2.2 → 1.2.5
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-C1eI-Tha.js → PayoutAccount-D9LY7i1J.js} +6 -6
- package/dist/{PayoutAccount-QY9LkR0r.js → PayoutAccount-DEoI6K0j.js} +5 -5
- package/dist/{PayoutAccountSetting-Bt-BBfpF.js → PayoutAccountSetting-5lrvWFIz.js} +3 -3
- package/dist/{Restaurant-DMEt0GSf.js → Restaurant-AxoM-AsE.js} +4 -4
- package/dist/{RestaurantSetting-Bjgjx7_c.js → RestaurantSetting-B6LQF664.js} +171 -157
- package/dist/{Settlement-DHczxjKA.js → Settlement-D4CsP3fg.js} +3 -3
- package/dist/{Settlement-PYl2xRrw.js → Settlement-DDwe_w3m.js} +3 -3
- package/dist/{SettlementTransactions-B6eUs4ay.js → SettlementTransactions-Cmv7dqVI.js} +3 -3
- package/dist/{SettlementTransactions-Bn2-iO30.js → SettlementTransactions-Dp3nN442.js} +3 -3
- package/dist/{Terminal-q9AtQVTw.js → Terminal-B8UQH6ga.js} +5 -5
- package/dist/TerminalSetting-yRok1Iuc.js +572 -0
- package/dist/{Transaction-BSDhGkTu.js → Transaction-BZ7H6oB_.js} +5 -5
- package/dist/{Transaction-DlkiWPJt.js → Transaction-KkfCz4Cu.js} +7 -7
- package/dist/{TransactionOld-B93Kp78J.js → TransactionOld-BLpQHFH1.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-DEgiifDL.js → TransactionTable.vue_vue_type_script_setup_true_lang-C4Bb203Q.js} +3 -3
- package/dist/{app-B1yXzXMJ.js → app-I2TNuZCs.js} +397 -397
- package/dist/app.js +1 -1
- package/dist/{assets-DbCf2oTj.js → assets-D5Qc4r7j.js} +2 -2
- package/dist/{grafana-CxvNheOh.js → grafana-BAbIv4CF.js} +1 -1
- package/dist/{index-DoWYy-5F.js → index-1NP0WkxZ.js} +2 -2
- package/dist/{index-DQ6y1YEM.js → index-Cc0abuxv.js} +1 -1
- package/dist/{index-DrVrxzsm.js → index-CguRXKmG.js} +1 -1
- package/dist/{index-C9YbV874.js → index-CnGVTtwu.js} +1 -1
- package/dist/{index-BwmZGhzh.js → index-D209n4gS.js} +317 -306
- package/dist/{index-BoafQG_3.js → index-DGcRvKvr.js} +1 -1
- package/dist/{index-DJx90D2_.js → index-bOlAWIVP.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BJAdIBCX.js → index.vue_vue_type_script_setup_true_lang-HYqCCZsZ.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-Cy0D7ycP.js → payout-account-DNGKjfY1.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +18 -18
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +18 -18
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +18 -18
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +18 -18
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +10 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +8 -8
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +8 -8
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +36 -36
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +40 -40
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +20 -20
- package/dist/views/settlement/SettlementTable.vue.d.ts +8 -8
- package/package.json +2 -2
- package/dist/TerminalSetting-DKvLKsrH.js +0 -618
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +0 -92
- package/dist/views/admin/terminal/tabs/{SoftspaceGateway.vue.d.ts → SoftposGateway.vue.d.ts} +8 -8
@@ -1,35 +1,35 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { g as
|
1
|
+
import { defineComponent as C, ref as U, resolveComponent as d, openBlock as v, createBlock as F, withCtx as D, createVNode as o, unref as a, createElementVNode as k, createCommentVNode as S, onMounted as q, computed as M, createElementBlock as P, Fragment as E, resolveDynamicComponent as K, normalizeProps as O, mergeProps as $, isRef as A } from "vue";
|
2
|
+
import { g as N, b as R, e as _, u as B } from "./index-D209n4gS.js";
|
3
3
|
import { _ as Y } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
4
4
|
import { useRouter as L } from "vue-router";
|
5
|
-
import { u as j } from "./index-
|
6
|
-
import { z as
|
5
|
+
import { u as j } from "./index-Cc0abuxv.js";
|
6
|
+
import { z as i, a as m } from "./validator-D5jtpt9A.js";
|
7
7
|
import { useCoreStore as z } from "@feedmepos/mf-common";
|
8
|
-
import { r as H } from "./index-
|
8
|
+
import { r as H } from "./index-DGcRvKvr.js";
|
9
9
|
const x = {
|
10
|
-
async get(
|
11
|
-
return
|
12
|
-
await
|
13
|
-
`restaurants/${
|
10
|
+
async get(n) {
|
11
|
+
return N(
|
12
|
+
await R().get(
|
13
|
+
`restaurants/${n}/payment-gateway`
|
14
14
|
)
|
15
15
|
);
|
16
16
|
},
|
17
|
-
async upsert(
|
18
|
-
return
|
19
|
-
await
|
20
|
-
`restaurants/${
|
21
|
-
{ data:
|
17
|
+
async upsert(n, V) {
|
18
|
+
return N(
|
19
|
+
await R().post(
|
20
|
+
`restaurants/${n}/payment-gateway`,
|
21
|
+
{ data: V }
|
22
22
|
)
|
23
23
|
);
|
24
24
|
},
|
25
|
-
async delete(
|
26
|
-
return
|
27
|
-
await
|
28
|
-
`restaurants/${
|
25
|
+
async delete(n, V) {
|
26
|
+
return N(
|
27
|
+
await R().delete(
|
28
|
+
`restaurants/${n}/payment-gateway/${V}`
|
29
29
|
)
|
30
30
|
);
|
31
31
|
}
|
32
|
-
}, Q = { class: "flex mt-6 space-x-6" }, Z = /* @__PURE__ */
|
32
|
+
}, Q = { class: "flex mt-6 space-x-6" }, Z = /* @__PURE__ */ C({
|
33
33
|
__name: "FiuuGateway",
|
34
34
|
props: {
|
35
35
|
onUpdate: {
|
@@ -45,9 +45,9 @@ const x = {
|
|
45
45
|
required: !0
|
46
46
|
}
|
47
47
|
},
|
48
|
-
setup(
|
49
|
-
var
|
50
|
-
const e =
|
48
|
+
setup(n) {
|
49
|
+
var y;
|
50
|
+
const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
|
51
51
|
merchantId: "",
|
52
52
|
uniqueId: "",
|
53
53
|
verifyKey: "",
|
@@ -56,58 +56,58 @@ const x = {
|
|
56
56
|
offlineSecret: ""
|
57
57
|
});
|
58
58
|
return (w, t) => {
|
59
|
-
const
|
60
|
-
return v(),
|
59
|
+
const l = d("FmTextField"), u = d("FmButton"), f = d("FmForm");
|
60
|
+
return v(), F(f, {
|
61
61
|
ref: "form",
|
62
62
|
class: "flex flex-col gap-16",
|
63
|
-
onValidationSuccess: t[6] || (t[6] = () =>
|
63
|
+
onValidationSuccess: t[6] || (t[6] = () => n.onUpdate(e.value))
|
64
64
|
}, {
|
65
|
-
default:
|
66
|
-
|
65
|
+
default: D(() => [
|
66
|
+
o(l, {
|
67
67
|
modelValue: e.value.merchantId,
|
68
68
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.merchantId = r),
|
69
69
|
label: "Merchant ID",
|
70
|
-
rules: a(
|
70
|
+
rules: a(i)(a(m).string())
|
71
71
|
}, null, 8, ["modelValue", "rules"]),
|
72
|
-
|
72
|
+
o(l, {
|
73
73
|
modelValue: e.value.uniqueId,
|
74
74
|
"onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.uniqueId = r),
|
75
75
|
label: "Unique ID",
|
76
|
-
rules: a(
|
76
|
+
rules: a(i)(a(m).string())
|
77
77
|
}, null, 8, ["modelValue", "rules"]),
|
78
|
-
|
78
|
+
o(l, {
|
79
79
|
modelValue: e.value.verifyKey,
|
80
80
|
"onUpdate:modelValue": t[2] || (t[2] = (r) => e.value.verifyKey = r),
|
81
81
|
label: "Verify Key",
|
82
|
-
rules: a(
|
82
|
+
rules: a(i)(a(m).string())
|
83
83
|
}, null, 8, ["modelValue", "rules"]),
|
84
|
-
|
84
|
+
o(l, {
|
85
85
|
modelValue: e.value.secretKey,
|
86
86
|
"onUpdate:modelValue": t[3] || (t[3] = (r) => e.value.secretKey = r),
|
87
87
|
label: "Secret Key",
|
88
|
-
rules: a(
|
88
|
+
rules: a(i)(a(m).string())
|
89
89
|
}, null, 8, ["modelValue", "rules"]),
|
90
|
-
|
90
|
+
o(l, {
|
91
91
|
modelValue: e.value.applicationCode,
|
92
92
|
"onUpdate:modelValue": t[4] || (t[4] = (r) => e.value.applicationCode = r),
|
93
93
|
label: "Application Code ( Offline )",
|
94
|
-
rules: a(
|
94
|
+
rules: a(i)(a(m).string())
|
95
95
|
}, null, 8, ["modelValue", "rules"]),
|
96
|
-
|
96
|
+
o(l, {
|
97
97
|
modelValue: e.value.offlineSecret,
|
98
98
|
"onUpdate:modelValue": t[5] || (t[5] = (r) => e.value.offlineSecret = r),
|
99
99
|
label: "Offline Secret ( Offline )",
|
100
|
-
rules: a(
|
100
|
+
rules: a(i)(a(m).string())
|
101
101
|
}, null, 8, ["modelValue", "rules"]),
|
102
|
-
|
103
|
-
|
102
|
+
k("div", Q, [
|
103
|
+
n.gateway ? (v(), F(u, {
|
104
104
|
key: 0,
|
105
105
|
class: "flex-1",
|
106
106
|
variant: "secondary",
|
107
107
|
label: "Delete",
|
108
|
-
onclick: () =>
|
108
|
+
onclick: () => n.onDelete(n.gateway)
|
109
109
|
}, null, 8, ["onclick"])) : S("", !0),
|
110
|
-
u
|
110
|
+
o(u, {
|
111
111
|
type: "submit",
|
112
112
|
class: "flex-1",
|
113
113
|
variant: "primary",
|
@@ -119,7 +119,7 @@ const x = {
|
|
119
119
|
}, 512);
|
120
120
|
};
|
121
121
|
}
|
122
|
-
}), J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */
|
122
|
+
}), J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */ C({
|
123
123
|
__name: "RevenueMonsterGateway",
|
124
124
|
props: {
|
125
125
|
onUpdate: {
|
@@ -135,54 +135,54 @@ const x = {
|
|
135
135
|
required: !0
|
136
136
|
}
|
137
137
|
},
|
138
|
-
setup(
|
139
|
-
var
|
140
|
-
const e =
|
138
|
+
setup(n) {
|
139
|
+
var y;
|
140
|
+
const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
|
141
141
|
storeId: "",
|
142
142
|
clientId: "",
|
143
143
|
clientSecret: "",
|
144
144
|
clientPrivateKey: ""
|
145
145
|
});
|
146
146
|
return (w, t) => {
|
147
|
-
const
|
148
|
-
return v(),
|
147
|
+
const l = d("FmTextField"), u = d("FmTextarea"), f = d("FmButton"), r = d("FmForm");
|
148
|
+
return v(), F(r, {
|
149
149
|
ref: "form",
|
150
150
|
class: "flex flex-col gap-16",
|
151
|
-
onValidationSuccess: t[4] || (t[4] = () =>
|
151
|
+
onValidationSuccess: t[4] || (t[4] = () => n.onUpdate(e.value))
|
152
152
|
}, {
|
153
|
-
default:
|
154
|
-
|
153
|
+
default: D(() => [
|
154
|
+
o(l, {
|
155
155
|
modelValue: e.value.storeId,
|
156
156
|
"onUpdate:modelValue": t[0] || (t[0] = (s) => e.value.storeId = s),
|
157
157
|
label: "Store ID",
|
158
|
-
rules: a(
|
158
|
+
rules: a(i)(a(m).string())
|
159
159
|
}, null, 8, ["modelValue", "rules"]),
|
160
|
-
|
160
|
+
o(l, {
|
161
161
|
modelValue: e.value.clientId,
|
162
162
|
"onUpdate:modelValue": t[1] || (t[1] = (s) => e.value.clientId = s),
|
163
163
|
label: "Client ID",
|
164
|
-
rules: a(
|
164
|
+
rules: a(i)(a(m).string())
|
165
165
|
}, null, 8, ["modelValue", "rules"]),
|
166
|
-
|
166
|
+
o(l, {
|
167
167
|
modelValue: e.value.clientSecret,
|
168
168
|
"onUpdate:modelValue": t[2] || (t[2] = (s) => e.value.clientSecret = s),
|
169
169
|
label: "Client Secret",
|
170
|
-
rules: a(
|
170
|
+
rules: a(i)(a(m).string())
|
171
171
|
}, null, 8, ["modelValue", "rules"]),
|
172
|
-
u
|
172
|
+
o(u, {
|
173
173
|
modelValue: e.value.clientPrivateKey,
|
174
174
|
"onUpdate:modelValue": t[3] || (t[3] = (s) => e.value.clientPrivateKey = s),
|
175
175
|
label: "Client Private Key"
|
176
176
|
}, null, 8, ["modelValue"]),
|
177
|
-
|
178
|
-
|
177
|
+
k("div", J, [
|
178
|
+
n.gateway ? (v(), F(f, {
|
179
179
|
key: 0,
|
180
180
|
class: "flex-1",
|
181
181
|
variant: "secondary",
|
182
182
|
label: "Delete",
|
183
|
-
onclick: () =>
|
183
|
+
onclick: () => n.onDelete(n.gateway)
|
184
184
|
}, null, 8, ["onclick"])) : S("", !0),
|
185
|
-
|
185
|
+
o(f, {
|
186
186
|
type: "submit",
|
187
187
|
class: "flex-1",
|
188
188
|
variant: "primary",
|
@@ -194,7 +194,7 @@ const x = {
|
|
194
194
|
}, 512);
|
195
195
|
};
|
196
196
|
}
|
197
|
-
}), X = { class: "flex mt-6 space-x-6" }, h = /* @__PURE__ */
|
197
|
+
}), X = { class: "flex mt-6 space-x-6" }, h = /* @__PURE__ */ C({
|
198
198
|
__name: "GhlGateway",
|
199
199
|
props: {
|
200
200
|
onUpdate: {
|
@@ -210,49 +210,49 @@ const x = {
|
|
210
210
|
required: !0
|
211
211
|
}
|
212
212
|
},
|
213
|
-
setup(
|
214
|
-
var
|
215
|
-
const e =
|
213
|
+
setup(n) {
|
214
|
+
var y;
|
215
|
+
const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
|
216
216
|
merchantId: "",
|
217
217
|
terminalId: "",
|
218
218
|
privateKey: ""
|
219
219
|
});
|
220
220
|
return (w, t) => {
|
221
|
-
const
|
222
|
-
return v(),
|
221
|
+
const l = d("FmTextField"), u = d("FmTextarea"), f = d("FmButton"), r = d("FmForm");
|
222
|
+
return v(), F(r, {
|
223
223
|
ref: "form",
|
224
224
|
class: "flex flex-col gap-16",
|
225
|
-
onValidationSuccess: t[3] || (t[3] = () =>
|
225
|
+
onValidationSuccess: t[3] || (t[3] = () => n.onUpdate(e.value))
|
226
226
|
}, {
|
227
|
-
default:
|
228
|
-
|
227
|
+
default: D(() => [
|
228
|
+
o(l, {
|
229
229
|
modelValue: e.value.merchantId,
|
230
230
|
"onUpdate:modelValue": t[0] || (t[0] = (s) => e.value.merchantId = s),
|
231
231
|
label: "Merchant ID",
|
232
|
-
rules: a(
|
232
|
+
rules: a(i)(a(m).string())
|
233
233
|
}, null, 8, ["modelValue", "rules"]),
|
234
|
-
|
234
|
+
o(l, {
|
235
235
|
modelValue: e.value.terminalId,
|
236
236
|
"onUpdate:modelValue": t[1] || (t[1] = (s) => e.value.terminalId = s),
|
237
237
|
label: "Terminal ID",
|
238
|
-
rules: a(
|
238
|
+
rules: a(i)(a(m).string())
|
239
239
|
}, null, 8, ["modelValue", "rules"]),
|
240
|
-
u
|
240
|
+
o(u, {
|
241
241
|
id: "ghl_pkey",
|
242
242
|
modelValue: e.value.privateKey,
|
243
243
|
"onUpdate:modelValue": t[2] || (t[2] = (s) => e.value.privateKey = s),
|
244
244
|
label: "Private Key",
|
245
|
-
rules: a(
|
245
|
+
rules: a(i)(a(m).string())
|
246
246
|
}, null, 8, ["modelValue", "rules"]),
|
247
|
-
|
248
|
-
|
247
|
+
k("div", X, [
|
248
|
+
n.gateway ? (v(), F(f, {
|
249
249
|
key: 0,
|
250
250
|
class: "flex-1",
|
251
251
|
variant: "secondary",
|
252
252
|
label: "Delete",
|
253
|
-
onclick: () =>
|
253
|
+
onclick: () => n.onDelete(n.gateway)
|
254
254
|
}, null, 8, ["onclick"])) : S("", !0),
|
255
|
-
|
255
|
+
o(f, {
|
256
256
|
type: "submit",
|
257
257
|
class: "flex-1",
|
258
258
|
variant: "primary",
|
@@ -264,7 +264,7 @@ const x = {
|
|
264
264
|
}, 512);
|
265
265
|
};
|
266
266
|
}
|
267
|
-
}), ee = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */
|
267
|
+
}), ee = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ C({
|
268
268
|
__name: "MacauPassGateway",
|
269
269
|
props: {
|
270
270
|
onUpdate: {
|
@@ -280,48 +280,62 @@ const x = {
|
|
280
280
|
required: !0
|
281
281
|
}
|
282
282
|
},
|
283
|
-
setup(
|
284
|
-
var
|
285
|
-
const e =
|
283
|
+
setup(n) {
|
284
|
+
var y;
|
285
|
+
const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
|
286
286
|
merchantId: "",
|
287
287
|
merchantName: "",
|
288
|
-
merchantCategoryCode: ""
|
288
|
+
merchantCategoryCode: "",
|
289
|
+
storeID: "",
|
290
|
+
storeName: ""
|
289
291
|
});
|
290
292
|
return (w, t) => {
|
291
|
-
const
|
292
|
-
return v(),
|
293
|
+
const l = d("FmTextField"), u = d("FmButton"), f = d("FmForm");
|
294
|
+
return v(), F(f, {
|
293
295
|
ref: "form",
|
294
296
|
class: "flex flex-col gap-16",
|
295
|
-
onValidationSuccess: t[
|
297
|
+
onValidationSuccess: t[5] || (t[5] = () => n.onUpdate(e.value))
|
296
298
|
}, {
|
297
|
-
default:
|
298
|
-
|
299
|
+
default: D(() => [
|
300
|
+
o(l, {
|
299
301
|
modelValue: e.value.merchantId,
|
300
302
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.merchantId = r),
|
301
303
|
label: "Merchant ID",
|
302
|
-
rules: a(
|
304
|
+
rules: a(i)(a(m).string())
|
303
305
|
}, null, 8, ["modelValue", "rules"]),
|
304
|
-
|
306
|
+
o(l, {
|
305
307
|
modelValue: e.value.merchantName,
|
306
308
|
"onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.merchantName = r),
|
307
309
|
label: "Merchant Name",
|
308
|
-
rules: a(
|
310
|
+
rules: a(i)(a(m).string())
|
309
311
|
}, null, 8, ["modelValue", "rules"]),
|
310
|
-
|
312
|
+
o(l, {
|
311
313
|
modelValue: e.value.merchantCategoryCode,
|
312
314
|
"onUpdate:modelValue": t[2] || (t[2] = (r) => e.value.merchantCategoryCode = r),
|
313
315
|
label: "Merchant MCC",
|
314
|
-
rules: a(
|
316
|
+
rules: a(i)(a(m).string())
|
315
317
|
}, null, 8, ["modelValue", "rules"]),
|
316
|
-
|
317
|
-
|
318
|
+
o(l, {
|
319
|
+
modelValue: e.value.storeID,
|
320
|
+
"onUpdate:modelValue": t[3] || (t[3] = (r) => e.value.storeID = r),
|
321
|
+
label: "Store ID",
|
322
|
+
rules: a(i)(a(m).string())
|
323
|
+
}, null, 8, ["modelValue", "rules"]),
|
324
|
+
o(l, {
|
325
|
+
modelValue: e.value.storeName,
|
326
|
+
"onUpdate:modelValue": t[4] || (t[4] = (r) => e.value.storeName = r),
|
327
|
+
label: "Store Name",
|
328
|
+
rules: a(i)(a(m).string())
|
329
|
+
}, null, 8, ["modelValue", "rules"]),
|
330
|
+
k("div", ee, [
|
331
|
+
n.gateway ? (v(), F(u, {
|
318
332
|
key: 0,
|
319
333
|
class: "flex-1",
|
320
334
|
variant: "secondary",
|
321
335
|
label: "Delete",
|
322
|
-
onclick: () =>
|
336
|
+
onclick: () => n.onDelete(n.gateway)
|
323
337
|
}, null, 8, ["onclick"])) : S("", !0),
|
324
|
-
u
|
338
|
+
o(u, {
|
325
339
|
type: "submit",
|
326
340
|
class: "flex-1",
|
327
341
|
variant: "primary",
|
@@ -336,7 +350,7 @@ const x = {
|
|
336
350
|
}), ae = {
|
337
351
|
key: 0,
|
338
352
|
class: "flex items-center justify-center min-h-[80vh]"
|
339
|
-
}, le = /* @__PURE__ */
|
353
|
+
}, le = /* @__PURE__ */ C({
|
340
354
|
__name: "PaymentGateway",
|
341
355
|
props: {
|
342
356
|
restaurant: {
|
@@ -344,92 +358,92 @@ const x = {
|
|
344
358
|
required: !0
|
345
359
|
}
|
346
360
|
},
|
347
|
-
setup(
|
348
|
-
const
|
361
|
+
setup(n) {
|
362
|
+
const V = [
|
349
363
|
{
|
350
364
|
label: "Fiuu",
|
351
365
|
value: "RAZER_MERCHANT_SERVICE",
|
352
366
|
form: Z,
|
353
|
-
region: [
|
367
|
+
region: [_.F_COUNTRY.enum.MY, _.F_COUNTRY.enum.SG]
|
354
368
|
},
|
355
369
|
{
|
356
370
|
label: "Revenue Monster",
|
357
371
|
value: "REVENUE_MONSTER",
|
358
372
|
form: W,
|
359
|
-
region: [
|
373
|
+
region: [_.F_COUNTRY.enum.MY]
|
360
374
|
},
|
361
375
|
{
|
362
376
|
label: "GHL",
|
363
377
|
value: "E_GHL",
|
364
378
|
form: h,
|
365
|
-
region: [
|
379
|
+
region: [_.F_COUNTRY.enum.MY]
|
366
380
|
},
|
367
381
|
{
|
368
382
|
label: "Macau Pass",
|
369
383
|
value: "MACAU_PASS",
|
370
384
|
form: te,
|
371
|
-
region: [
|
385
|
+
region: [_.F_COUNTRY.enum.MO]
|
372
386
|
}
|
373
|
-
], e =
|
387
|
+
], e = n, y = z(), { isLoading: w, startAsyncCall: t } = B(), l = U(), u = U([]);
|
374
388
|
function f() {
|
375
389
|
t(async () => {
|
376
|
-
var
|
377
|
-
|
390
|
+
var p;
|
391
|
+
u.value = await x.get(e.restaurant._id), l.value = (p = u.value.find((c) => c.active)) == null ? void 0 : p.paymentGateway;
|
378
392
|
});
|
379
393
|
}
|
380
|
-
async function r(
|
394
|
+
async function r(p) {
|
381
395
|
await t(async () => {
|
382
|
-
var
|
383
|
-
const
|
396
|
+
var G;
|
397
|
+
const c = {
|
384
398
|
_id: "",
|
385
399
|
_rev: "",
|
386
|
-
paymentGateway:
|
387
|
-
config:
|
400
|
+
paymentGateway: l.value,
|
401
|
+
config: p,
|
388
402
|
active: !0
|
389
|
-
}, b =
|
390
|
-
b && (
|
391
|
-
|
392
|
-
g.paymentGateway || await x.delete(e.restaurant._id, g._id), g.active && g.paymentGateway !==
|
403
|
+
}, b = u.value.find((g) => g.paymentGateway === l.value);
|
404
|
+
b && (c._id = b._id, c._rev = b._rev), await Promise.all(
|
405
|
+
u.value.map(async (g) => {
|
406
|
+
g.paymentGateway || await x.delete(e.restaurant._id, g._id), g.active && g.paymentGateway !== c.paymentGateway && await x.upsert(e.restaurant._id, {
|
393
407
|
...g,
|
394
408
|
active: !1
|
395
409
|
});
|
396
410
|
})
|
397
|
-
), await x.upsert(e.restaurant._id,
|
411
|
+
), await x.upsert(e.restaurant._id, c), u.value = await x.get(e.restaurant._id), l.value = (G = u.value.find((g) => g.active)) == null ? void 0 : G.paymentGateway;
|
398
412
|
});
|
399
413
|
}
|
400
|
-
async function s(
|
414
|
+
async function s(p) {
|
401
415
|
t(async () => {
|
402
|
-
var
|
403
|
-
await x.delete(e.restaurant._id,
|
416
|
+
var c;
|
417
|
+
await x.delete(e.restaurant._id, p._id), u.value = await x.get(e.restaurant._id), l.value = (c = u.value.find((b) => b.active)) == null ? void 0 : c.paymentGateway;
|
404
418
|
});
|
405
419
|
}
|
406
|
-
|
407
|
-
const
|
408
|
-
var
|
409
|
-
return (
|
410
|
-
}),
|
411
|
-
return (
|
412
|
-
const b =
|
413
|
-
return v(),
|
414
|
-
a(w) ? (v(),
|
415
|
-
|
416
|
-
])) : (v(),
|
420
|
+
q(f);
|
421
|
+
const I = M(() => {
|
422
|
+
var p;
|
423
|
+
return (p = V.find((c) => c.value === l.value)) == null ? void 0 : p.form;
|
424
|
+
}), T = M(() => V.filter((p) => p.region.includes(y.currentCountry.value ?? _.F_COUNTRY.enum.MY)));
|
425
|
+
return (p, c) => {
|
426
|
+
const b = d("FmCircularProgress"), G = d("FmSelect");
|
427
|
+
return v(), P(E, null, [
|
428
|
+
a(w) ? (v(), P("div", ae, [
|
429
|
+
o(b, { size: "xxl" })
|
430
|
+
])) : (v(), F(G, {
|
417
431
|
key: 1,
|
418
|
-
modelValue:
|
419
|
-
"onUpdate:modelValue":
|
432
|
+
modelValue: l.value,
|
433
|
+
"onUpdate:modelValue": c[0] || (c[0] = (g) => l.value = g),
|
420
434
|
class: "mb-6",
|
421
435
|
label: "Payment Service Provider",
|
422
|
-
items:
|
436
|
+
items: T.value
|
423
437
|
}, null, 8, ["modelValue", "items"])),
|
424
|
-
|
425
|
-
gateway:
|
438
|
+
l.value ? (v(), F(K(I.value), O($({ key: 2 }, {
|
439
|
+
gateway: u.value.find((g) => g.paymentGateway === l.value),
|
426
440
|
onDelete: s,
|
427
441
|
onUpdate: r
|
428
442
|
})), null, 16)) : S("", !0)
|
429
443
|
], 64);
|
430
444
|
};
|
431
445
|
}
|
432
|
-
}), ce = /* @__PURE__ */
|
446
|
+
}), ce = /* @__PURE__ */ C({
|
433
447
|
__name: "RestaurantSetting",
|
434
448
|
props: {
|
435
449
|
restaurantId: {
|
@@ -437,10 +451,10 @@ const x = {
|
|
437
451
|
required: !0
|
438
452
|
}
|
439
453
|
},
|
440
|
-
setup(
|
441
|
-
const
|
454
|
+
setup(n) {
|
455
|
+
const V = n, { tab: e } = j({
|
442
456
|
tab: "payment-gateway"
|
443
|
-
}), { isLoading:
|
457
|
+
}), { isLoading: y, startAsyncCall: w } = B(!0), t = L(), l = U(), u = [
|
444
458
|
{
|
445
459
|
label: "Payment Gateway",
|
446
460
|
value: "payment-gateway",
|
@@ -450,31 +464,31 @@ const x = {
|
|
450
464
|
];
|
451
465
|
function f() {
|
452
466
|
w(async () => {
|
453
|
-
|
467
|
+
l.value = await H.readRestaurantById(V.restaurantId);
|
454
468
|
});
|
455
469
|
}
|
456
|
-
|
457
|
-
const r =
|
470
|
+
q(f);
|
471
|
+
const r = M(() => {
|
458
472
|
var s;
|
459
|
-
return (s =
|
473
|
+
return (s = u.find((I) => I.value === e.value)) == null ? void 0 : s.render;
|
460
474
|
});
|
461
|
-
return (s,
|
462
|
-
var
|
463
|
-
const
|
464
|
-
return v(),
|
465
|
-
title: `Restaurant (${(
|
466
|
-
loading: a(
|
475
|
+
return (s, I) => {
|
476
|
+
var p;
|
477
|
+
const T = d("FmTabs");
|
478
|
+
return v(), F(Y, {
|
479
|
+
title: `Restaurant (${(p = l.value) == null ? void 0 : p._id})`,
|
480
|
+
loading: a(y),
|
467
481
|
onBack: a(t).back
|
468
482
|
}, {
|
469
|
-
default:
|
470
|
-
|
483
|
+
default: D(() => [
|
484
|
+
o(T, {
|
471
485
|
"model-value": a(e),
|
472
|
-
"onUpdate:modelValue":
|
486
|
+
"onUpdate:modelValue": I[0] || (I[0] = (c) => A(e) ? e.value = c : null),
|
473
487
|
class: "mb-6",
|
474
|
-
items:
|
488
|
+
items: u
|
475
489
|
}, null, 8, ["model-value"]),
|
476
|
-
a(e) &&
|
477
|
-
restaurant:
|
490
|
+
a(e) && l.value ? (v(), F(K(r.value), O($({ key: 0 }, {
|
491
|
+
restaurant: l.value
|
478
492
|
})), null, 16)) : S("", !0)
|
479
493
|
]),
|
480
494
|
_: 1
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { defineComponent as C, ref as k, computed as R, resolveComponent as w, openBlock as V, createBlock as D, h as T, watch as P, createElementBlock as U, Fragment as q, createElementVNode as m, createVNode as u, withCtx as _, unref as t, toDisplayString as r, createTextVNode as v, onMounted as O, isRef as M, createCommentVNode as N } from "vue";
|
2
|
-
import { u as z } from "./index-
|
2
|
+
import { u as z } from "./index-D209n4gS.js";
|
3
3
|
import { h as $ } from "./moment-h96o7c8I.js";
|
4
4
|
import { useI18n as K, useCoreStore as E } from "@feedmepos/mf-common";
|
5
5
|
import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
-
import { s as A } from "./index-
|
6
|
+
import { s as A } from "./index-CnGVTtwu.js";
|
7
7
|
import { useDialog as I } from "@feedmepos/ui-library";
|
8
8
|
import { d } from "./dinero-CIVmXLL-.js";
|
9
9
|
import { _ as B } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
10
10
|
import { useRouter as L } from "vue-router";
|
11
|
-
import { u as J } from "./index-
|
11
|
+
import { u as J } from "./index-Cc0abuxv.js";
|
12
12
|
import { _ as Q } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
13
13
|
import { _ as W } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DyLnqQYe.js";
|
14
14
|
import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { defineComponent as M, ref as h, computed as T, resolveComponent as d, openBlock as F, createBlock as Y, h as E, watch as C, onMounted as L, unref as r, withCtx as g, createElementVNode as k, createVNode as i, isRef as R, createElementBlock as N, Fragment as O, renderList as P } from "vue";
|
2
|
-
import { u as A } from "./index-
|
2
|
+
import { u as A } from "./index-D209n4gS.js";
|
3
3
|
import { h as S } from "./moment-h96o7c8I.js";
|
4
|
-
import { s as _ } from "./index-
|
4
|
+
import { s as _ } from "./index-CnGVTtwu.js";
|
5
5
|
import { useSnackbar as U } from "@feedmepos/ui-library";
|
6
6
|
import { d as w } from "./dinero-CIVmXLL-.js";
|
7
7
|
import { _ as q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
8
8
|
import { useRouter as J } from "vue-router";
|
9
9
|
import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
10
|
-
import { u as z } from "./index-
|
10
|
+
import { u as z } from "./index-Cc0abuxv.js";
|
11
11
|
import { u as G } from "./error-K1CakhA9.js";
|
12
12
|
import { _ as Q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
13
13
|
import "@feedmepos/mf-common";
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as B, normalizeClass as G, withCtx as s, createElementVNode as t, toDisplayString as i, createElementBlock as L, unref as m, ref as x, onMounted as H, watch as q, createVNode as n, createTextVNode as u, h as N } from "vue";
|
2
|
-
import { e as E, u as J } from "./index-
|
2
|
+
import { e as E, u as J } from "./index-D209n4gS.js";
|
3
3
|
import { useDialog as Q, useSnackbar as W } from "@feedmepos/ui-library";
|
4
4
|
import { d as k } from "./dinero-CIVmXLL-.js";
|
5
|
-
import { g as X, a as Z, t as P, b as ee } from "./assets-
|
5
|
+
import { g as X, a as Z, t as P, b as ee } from "./assets-D5Qc4r7j.js";
|
6
6
|
import { _ as te } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
7
7
|
import { useRouter as ae } from "vue-router";
|
8
|
-
import { s as ne } from "./index-
|
8
|
+
import { s as ne } from "./index-CnGVTtwu.js";
|
9
9
|
import { u as oe } from "./error-K1CakhA9.js";
|
10
10
|
import { w as re } from "./Modal-DB8M9o1T.js";
|
11
11
|
import { h as le } from "./moment-h96o7c8I.js";
|