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