@feedmepos/mf-payment 1.10.7-dev → 1.10.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/{Actions.vue_vue_type_script_setup_true_lang-CDTMsbYv.js → Actions.vue_vue_type_script_setup_true_lang-Cb4w7Its.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BXw-ZGes.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-B_-olj-A.js} +3 -3
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-KddyORH2.js +505 -0
- package/dist/{Chargeback-BqXwYiuk.js → Chargeback-B5MXERko.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BMBTecYJ.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DNrsl1TX.js} +1 -1
- package/dist/{ExternalTerminal-CPqZXXJN.js → ExternalTerminal-bjMJ7qr-.js} +6 -6
- package/dist/{OnboardForm-Dc99b9Y9.js → OnboardForm-BwFlXqV5.js} +6 -6
- package/dist/{OnboardForm-CzW4p_2d.js → OnboardForm-CE0weADC.js} +6 -6
- package/dist/{OnboardSubmission-DE1LorIG.js → OnboardSubmission-2s5PtLcm.js} +3 -3
- package/dist/{OnboardSubmission-CW0mAt6g.js → OnboardSubmission-C60-dPdV.js} +6 -6
- package/dist/{PayoutAccount-CcxQG44I.js → PayoutAccount-DnE00Tpx.js} +5 -5
- package/dist/{PayoutAccount-BaxlEkSz.js → PayoutAccount-PGN4vUiE.js} +7 -7
- package/dist/{PayoutAccountSetting-BjGT7oIq.js → PayoutAccountSetting-UxgmC_It.js} +6 -6
- package/dist/{Restaurant-Dubtx0qm.js → Restaurant-DWs8l6IN.js} +4 -4
- package/dist/{RestaurantSetting-CaV9iLhj.js → RestaurantSetting-CghN3Qij.js} +3 -3
- package/dist/{Settlement-Dk2vmfTC.js → Settlement-BZG0nEhU.js} +4 -4
- package/dist/{Settlement-BpI9rV6S.js → Settlement-DSAWgf1q.js} +3 -3
- package/dist/{SettlementTransactions-DUKUIBGb.js → SettlementTransactions-5l9xe_rQ.js} +5 -5
- package/dist/{SettlementTransactions-L1UnE3Dz.js → SettlementTransactions-dSH6mKX9.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-CBq4EZkF.js → Status.vue_vue_type_script_setup_true_lang-CSz0sfMv.js} +1 -1
- package/dist/{Terminal-DA4Y3glc.js → Terminal-CU70aAqI.js} +6 -6
- package/dist/TerminalSetting-Bc6HJqCW.js +4521 -0
- package/dist/{Transaction-BoYZtvk4.js → Transaction-9yHZiRAp.js} +10 -10
- package/dist/{Transaction-eJhtXrtB.js → Transaction-CHL7HVtl.js} +19 -20
- package/dist/{TransactionOld-CpcwSOPc.js → TransactionOld-Dk_5TVXm.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-uOyBTSIr.js → TransactionStatus.vue_vue_type_script_setup_true_lang-D4A7Hfk7.js} +1 -1
- package/dist/api/terminal/index.d.ts +0 -1
- package/dist/{app-D6AC4Zp8.js → app-WOQvK6eu.js} +353 -389
- package/dist/app.js +1 -1
- package/dist/assets-B_Ilda1K.js +96 -0
- package/dist/{grafana-Ci9Ouxi7.js → grafana-BqnbcwyU.js} +1 -1
- package/dist/{index-DGXTnrw9.js → index--Svzj_Uq.js} +1 -1
- package/dist/{index-BexuYVa4.js → index-BPTPINow.js} +1 -1
- package/dist/index-BR7n0dkV.js +63 -0
- package/dist/{index-DJAcIsfC.js → index-BRCt0Wjb.js} +3030 -3073
- package/dist/{index-UvQbjo9b.js → index-BSUOKl_R.js} +1 -1
- package/dist/{index-Dyq-uY9m.js → index-Cc7BGx40.js} +1 -1
- package/dist/{index-CQWvP-R5.js → index-Cwbpxr-3.js} +1 -1
- package/dist/{index-YRTDpAkL.js → index-DiYIJH8n.js} +2 -2
- package/dist/{index-C1rqQDv4.js → index-Jo4g2Fvl.js} +1 -1
- package/dist/{index-B1Q7VAq8.js → index-XucAJsGV.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C1d0q7uA.js → index.vue_vue_type_script_setup_true_lang-CQwRJloj.js} +1 -1
- package/dist/{onboard-submission-Dfp-461W.js → onboard-submission-B7IRbUGm.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-BziG4FgY.js → payout-account-v0EWhJ79.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.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/gateway/TyroGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- 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/GrabGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -6
- package/package.json +2 -2
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-DOSmgkgi.js +0 -135
- package/dist/PaymentCheckout-Dak0HEN-.js +0 -1939
- package/dist/TerminalSetting-ChWAOcmg.js +0 -2779
- package/dist/TerminalTemplate-CPL-E4c2.js +0 -322
- package/dist/TerminalTemplateSetting-BTZZ_5hn.js +0 -262
- package/dist/api/terminal-template/index.d.ts +0 -15
- package/dist/assets-he2Gzvfg.js +0 -96
- package/dist/index-BDQw2qyD.js +0 -71
- package/dist/index-rlCqwp1w.js +0 -43
- package/dist/useQuery-Bjhr1nB7.js +0 -375
- package/dist/views/admin/terminal/TerminalApplyTemplateDialog.vue.d.ts +0 -6
- package/dist/views/admin/terminal/TerminalSaveTemplateDialog.vue.d.ts +0 -2
- package/dist/views/admin/terminal-template/TerminalTemplate.vue.d.ts +0 -2
- package/dist/views/admin/terminal-template/TerminalTemplateSetting.vue.d.ts +0 -12
- package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +0 -174
- package/dist/views/admin/terminal-template/cell/Actions.vue.d.ts +0 -12
- package/dist/views/admin/terminal-template/cell/Default.vue.d.ts +0 -5
- package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +0 -104
- package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +0 -95
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, resolveComponent as d, openBlock as g, createElementBlock as U, createVNode as m, createElementVNode as x, useModel as Y, ref as p, watch as N, createBlock as F, withCtx as E, unref as r, createCommentVNode as K, mergeModels as $, isRef as j, h as I } from "vue";
|
|
2
|
-
import { h as z } from "./moment-h96o7c8I.js";
|
|
3
|
-
import { useRouter as P } from "vue-router";
|
|
4
|
-
import { u as q } from "./index-C1rqQDv4.js";
|
|
5
|
-
import { _ as H } from "./index.vue_vue_type_script_setup_true_lang-C1d0q7uA.js";
|
|
6
|
-
import { _ as O } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
7
|
-
import { useDialog as L, useSnackbar as Q } from "@feedmepos/ui-library";
|
|
8
|
-
import { t as S } from "./index-rlCqwp1w.js";
|
|
9
|
-
import { z as A, a as C } from "./validator-CTlVogBQ.js";
|
|
10
|
-
import { _ as G } from "./AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BXw-ZGes.js";
|
|
11
|
-
import { p as J } from "./index-DJAcIsfC.js";
|
|
12
|
-
import { u as M } from "./error-K1CakhA9.js";
|
|
13
|
-
import { w as W } from "./Modal-DB8M9o1T.js";
|
|
14
|
-
const X = { class: "flex items-center justify-center" }, Z = /* @__PURE__ */ D({
|
|
15
|
-
__name: "Actions",
|
|
16
|
-
props: {
|
|
17
|
-
data: {}
|
|
18
|
-
},
|
|
19
|
-
emits: ["edit", "delete"],
|
|
20
|
-
setup(b, { emit: u }) {
|
|
21
|
-
const l = u;
|
|
22
|
-
return (T, n) => {
|
|
23
|
-
const h = d("FmButton");
|
|
24
|
-
return g(), U("div", X, [
|
|
25
|
-
m(h, {
|
|
26
|
-
variant: "plain",
|
|
27
|
-
"prepend-icon": "edit",
|
|
28
|
-
onClick: n[0] || (n[0] = (s) => {
|
|
29
|
-
s.stopPropagation(), l("edit");
|
|
30
|
-
})
|
|
31
|
-
}),
|
|
32
|
-
m(h, {
|
|
33
|
-
variant: "plain",
|
|
34
|
-
"prepend-icon": "delete",
|
|
35
|
-
onClick: n[1] || (n[1] = (s) => {
|
|
36
|
-
s.stopPropagation(), l("delete");
|
|
37
|
-
})
|
|
38
|
-
})
|
|
39
|
-
]);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}), ee = {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: "flex items-center gap-2"
|
|
45
|
-
}, te = {
|
|
46
|
-
key: 1,
|
|
47
|
-
class: "text-fm-color-neutral-gray-500"
|
|
48
|
-
}, le = /* @__PURE__ */ D({
|
|
49
|
-
__name: "Default",
|
|
50
|
-
props: {
|
|
51
|
-
data: { type: Boolean }
|
|
52
|
-
},
|
|
53
|
-
setup(b) {
|
|
54
|
-
return (u, l) => b.data ? (g(), U("div", ee, [...l[0] || (l[0] = [
|
|
55
|
-
x("div", { class: "w-[8px] h-[8px] rounded-full shrink-0 bg-green-400" }, null, -1),
|
|
56
|
-
x("div", null, "Default", -1)
|
|
57
|
-
])])) : (g(), U("div", te, "—"));
|
|
58
|
-
}
|
|
59
|
-
}), ae = /* @__PURE__ */ D({
|
|
60
|
-
__name: "TerminalTemplateSideSheet",
|
|
61
|
-
props: /* @__PURE__ */ $({
|
|
62
|
-
template: {
|
|
63
|
-
type: Object
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
modelValue: { type: Boolean, default: !1 },
|
|
67
|
-
modelModifiers: {}
|
|
68
|
-
}),
|
|
69
|
-
emits: /* @__PURE__ */ $(["submit"], ["update:modelValue"]),
|
|
70
|
-
setup(b, { emit: u }) {
|
|
71
|
-
const l = b, T = u, n = Y(b, "modelValue"), h = p(), s = p(""), c = p(""), f = p(""), y = p(), V = p(!1), w = J.FdoTerminalTemplateDeviceType.options.map((_) => ({
|
|
72
|
-
label: _,
|
|
73
|
-
value: _
|
|
74
|
-
}));
|
|
75
|
-
N(n, (_) => {
|
|
76
|
-
var e, t, a, v, o;
|
|
77
|
-
_ && (s.value = ((e = l.template) == null ? void 0 : e.name) ?? "", c.value = ((t = l.template) == null ? void 0 : t.description) ?? "", f.value = ((a = l.template) == null ? void 0 : a.businessId) ?? "", y.value = (v = l.template) == null ? void 0 : v.deviceType, V.value = ((o = l.template) == null ? void 0 : o.isDefault) ?? !1);
|
|
78
|
-
});
|
|
79
|
-
function k() {
|
|
80
|
-
T("submit", {
|
|
81
|
-
name: s.value,
|
|
82
|
-
description: c.value,
|
|
83
|
-
businessId: f.value,
|
|
84
|
-
deviceType: y.value,
|
|
85
|
-
isDefault: V.value
|
|
86
|
-
}), n.value = !1;
|
|
87
|
-
}
|
|
88
|
-
return (_, e) => {
|
|
89
|
-
const t = d("FmSelect"), a = d("FmTextField"), v = d("FmSwitch"), o = d("FmButton"), B = d("FmForm"), R = d("FmSideSheet");
|
|
90
|
-
return g(), F(R, {
|
|
91
|
-
modelValue: n.value,
|
|
92
|
-
"onUpdate:modelValue": e[5] || (e[5] = (i) => n.value = i),
|
|
93
|
-
header: l.template ? "Update Setting Template" : "Create Setting Template",
|
|
94
|
-
"close-button": ""
|
|
95
|
-
}, {
|
|
96
|
-
default: E(() => [
|
|
97
|
-
m(B, {
|
|
98
|
-
ref: h.value,
|
|
99
|
-
class: "flex flex-col gap-16 px-4 py-6",
|
|
100
|
-
onValidationSuccess: k
|
|
101
|
-
}, {
|
|
102
|
-
default: E(() => [
|
|
103
|
-
l.template ? K("", !0) : (g(), F(G, {
|
|
104
|
-
key: 0,
|
|
105
|
-
modelValue: f.value,
|
|
106
|
-
"onUpdate:modelValue": e[0] || (e[0] = (i) => f.value = i),
|
|
107
|
-
label: "Business",
|
|
108
|
-
"search-placeholder": "Search businesses",
|
|
109
|
-
rules: r(A)(r(C).string().min(1, "Business is required"))
|
|
110
|
-
}, null, 8, ["modelValue", "rules"])),
|
|
111
|
-
l.template ? K("", !0) : (g(), F(t, {
|
|
112
|
-
key: 1,
|
|
113
|
-
modelValue: y.value,
|
|
114
|
-
"onUpdate:modelValue": e[1] || (e[1] = (i) => y.value = i),
|
|
115
|
-
label: "Device Type",
|
|
116
|
-
items: r(w),
|
|
117
|
-
rules: r(A)(r(C).string().min(1, "Device type is required"))
|
|
118
|
-
}, null, 8, ["modelValue", "items", "rules"])),
|
|
119
|
-
m(a, {
|
|
120
|
-
modelValue: s.value,
|
|
121
|
-
"onUpdate:modelValue": e[2] || (e[2] = (i) => s.value = i),
|
|
122
|
-
label: "Template Name",
|
|
123
|
-
rules: r(A)(r(C).string().min(1))
|
|
124
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
125
|
-
m(a, {
|
|
126
|
-
modelValue: c.value,
|
|
127
|
-
"onUpdate:modelValue": e[3] || (e[3] = (i) => c.value = i),
|
|
128
|
-
label: "Description",
|
|
129
|
-
"label-mark": "optional"
|
|
130
|
-
}, null, 8, ["modelValue"]),
|
|
131
|
-
m(v, {
|
|
132
|
-
modelValue: V.value,
|
|
133
|
-
"onUpdate:modelValue": e[4] || (e[4] = (i) => V.value = i),
|
|
134
|
-
label: "Default",
|
|
135
|
-
"label-info": "Applied automatically when a new device of this type binds for this business."
|
|
136
|
-
}, null, 8, ["modelValue"]),
|
|
137
|
-
m(o, {
|
|
138
|
-
type: "submit",
|
|
139
|
-
label: l.template ? "Update" : "Create"
|
|
140
|
-
}, null, 8, ["label"])
|
|
141
|
-
]),
|
|
142
|
-
_: 1
|
|
143
|
-
}, 512)
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
}, 8, ["modelValue", "header"]);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
}), se = { class: "flex justify-between mb-6 items-center" }, oe = { class: "flex space-x-4" }, ne = { class: "flex space-x-4" }, Te = /* @__PURE__ */ D({
|
|
150
|
-
__name: "TerminalTemplate",
|
|
151
|
-
setup(b) {
|
|
152
|
-
const u = p(), { searchKey: l } = q({
|
|
153
|
-
searchKey: ""
|
|
154
|
-
});
|
|
155
|
-
let T;
|
|
156
|
-
N(l, async () => {
|
|
157
|
-
T && clearTimeout(T), T = setTimeout(() => {
|
|
158
|
-
var e;
|
|
159
|
-
return (e = u.value) == null ? void 0 : e.reset();
|
|
160
|
-
}, 700);
|
|
161
|
-
});
|
|
162
|
-
const n = P(), h = L(), s = Q(), c = p(!1), f = p();
|
|
163
|
-
function y(e) {
|
|
164
|
-
f.value = e, c.value = !0;
|
|
165
|
-
}
|
|
166
|
-
async function V(e) {
|
|
167
|
-
var a;
|
|
168
|
-
const t = f.value;
|
|
169
|
-
try {
|
|
170
|
-
t ? await S.updateById(t._id, {
|
|
171
|
-
name: e.name,
|
|
172
|
-
description: e.description,
|
|
173
|
-
isDefault: e.isDefault
|
|
174
|
-
}) : await S.create(e), (a = u.value) == null || a.reset(), s.open({
|
|
175
|
-
type: "success",
|
|
176
|
-
message: t ? "Setting template updated successfully." : "Setting template created successfully."
|
|
177
|
-
});
|
|
178
|
-
} catch (v) {
|
|
179
|
-
s.open({
|
|
180
|
-
type: "error",
|
|
181
|
-
title: t ? "Error occurs when update setting template" : "Error occurs when create setting template",
|
|
182
|
-
message: M(v)
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
async function w(e) {
|
|
187
|
-
W(
|
|
188
|
-
h,
|
|
189
|
-
"Delete Setting Template",
|
|
190
|
-
"Are you sure to delete this setting template? Terminals already configured from it are not affected.",
|
|
191
|
-
async () => {
|
|
192
|
-
var t;
|
|
193
|
-
try {
|
|
194
|
-
await S.delete(e), (t = u.value) == null || t.reset(), s.open({
|
|
195
|
-
type: "success",
|
|
196
|
-
message: "Setting template deleted successfully."
|
|
197
|
-
});
|
|
198
|
-
} catch (a) {
|
|
199
|
-
s.open({
|
|
200
|
-
type: "error",
|
|
201
|
-
title: "Error occurs when delete setting template",
|
|
202
|
-
message: M(a)
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
const k = function(e) {
|
|
209
|
-
var t;
|
|
210
|
-
return {
|
|
211
|
-
id: e._id,
|
|
212
|
-
name: e.name,
|
|
213
|
-
business: ((t = e.business) == null ? void 0 : t.name) ?? e.businessId,
|
|
214
|
-
deviceType: e.deviceType,
|
|
215
|
-
isDefault: e.isDefault,
|
|
216
|
-
updatedAt: z(e.updatedAt).format("YYYY-MM-DD HH:mm:ss")
|
|
217
|
-
};
|
|
218
|
-
}, _ = [
|
|
219
|
-
{
|
|
220
|
-
accessorKey: "name",
|
|
221
|
-
header: () => "Name",
|
|
222
|
-
meta: {
|
|
223
|
-
textAlign: "left"
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
accessorKey: "business",
|
|
228
|
-
header: () => "Business",
|
|
229
|
-
meta: {
|
|
230
|
-
textAlign: "left"
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
accessorKey: "deviceType",
|
|
235
|
-
header: () => "Device Type",
|
|
236
|
-
meta: {
|
|
237
|
-
textAlign: "left"
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
accessorKey: "isDefault",
|
|
242
|
-
header: () => "Default",
|
|
243
|
-
meta: {
|
|
244
|
-
textAlign: "left"
|
|
245
|
-
},
|
|
246
|
-
cell: ({ cell: e }) => I(le, { data: e.getValue() })
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
accessorKey: "updatedAt",
|
|
250
|
-
header: () => "Last Updated",
|
|
251
|
-
meta: {
|
|
252
|
-
textAlign: "left"
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
accessorKey: "id",
|
|
257
|
-
header: () => "Actions",
|
|
258
|
-
meta: {
|
|
259
|
-
textAlign: "center"
|
|
260
|
-
},
|
|
261
|
-
cell: ({ row: e }) => {
|
|
262
|
-
var a;
|
|
263
|
-
const t = (a = u.value) == null ? void 0 : a.pageData().at(e.index);
|
|
264
|
-
return I(Z, {
|
|
265
|
-
data: t,
|
|
266
|
-
onEdit: () => y(t),
|
|
267
|
-
onDelete: () => w(t._id)
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
];
|
|
272
|
-
return (e, t) => {
|
|
273
|
-
const a = d("FmSearch"), v = d("FmButton");
|
|
274
|
-
return g(), F(O, {
|
|
275
|
-
title: "Templates",
|
|
276
|
-
loading: !1
|
|
277
|
-
}, {
|
|
278
|
-
default: E(() => [
|
|
279
|
-
x("div", se, [
|
|
280
|
-
x("div", oe, [
|
|
281
|
-
m(a, {
|
|
282
|
-
"model-value": r(l),
|
|
283
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => j(l) ? l.value = o : null),
|
|
284
|
-
class: "mr-8",
|
|
285
|
-
label: "Search",
|
|
286
|
-
placeholder: "Search ..."
|
|
287
|
-
}, null, 8, ["model-value"])
|
|
288
|
-
]),
|
|
289
|
-
x("div", ne, [
|
|
290
|
-
m(v, {
|
|
291
|
-
label: "Create",
|
|
292
|
-
icon: "add",
|
|
293
|
-
onClick: t[1] || (t[1] = () => y())
|
|
294
|
-
})
|
|
295
|
-
])
|
|
296
|
-
]),
|
|
297
|
-
m(H, {
|
|
298
|
-
ref_key: "controller",
|
|
299
|
-
ref: u,
|
|
300
|
-
"column-defs": _,
|
|
301
|
-
"rows-defs": k,
|
|
302
|
-
paginate: (o, B) => r(S).read({ searchKey: r(l), limit: o, cursor: B }),
|
|
303
|
-
onRowClick: t[2] || (t[2] = (o) => r(n).push({
|
|
304
|
-
name: "mf-payment-admin.terminal-template-setting",
|
|
305
|
-
params: { templateId: o._id }
|
|
306
|
-
}))
|
|
307
|
-
}, null, 8, ["paginate"]),
|
|
308
|
-
m(ae, {
|
|
309
|
-
modelValue: c.value,
|
|
310
|
-
"onUpdate:modelValue": t[3] || (t[3] = (o) => c.value = o),
|
|
311
|
-
template: f.value,
|
|
312
|
-
onSubmit: V
|
|
313
|
-
}, null, 8, ["modelValue", "template"])
|
|
314
|
-
]),
|
|
315
|
-
_: 1
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
export {
|
|
321
|
-
Te as default
|
|
322
|
-
};
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, openBlock as b, createElementBlock as F, Fragment as H, createElementVNode as l, createTextVNode as f, toDisplayString as v, computed as T, ref as L, watch as j, onMounted as $, resolveComponent as O, renderList as q, unref as y, createVNode as B, createBlock as E, withCtx as K, isRef as z, resolveDynamicComponent as Q, normalizeProps as W, mergeProps as J, createCommentVNode as X } from "vue";
|
|
2
|
-
import { useRouter as Z } from "vue-router";
|
|
3
|
-
import { t as x } from "./index-rlCqwp1w.js";
|
|
4
|
-
import { e as n, u as ee } from "./index-DJAcIsfC.js";
|
|
5
|
-
import { _ as te } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
-
import { u as ne } from "./index-C1rqQDv4.js";
|
|
7
|
-
import { useSnackbar as ae } from "@feedmepos/ui-library";
|
|
8
|
-
import { useCoreStore as le, useI18n as re } from "@feedmepos/mf-common";
|
|
9
|
-
import { u as oe } from "./error-K1CakhA9.js";
|
|
10
|
-
import { g as se } from "./assets-he2Gzvfg.js";
|
|
11
|
-
import { P as ie } from "./PaymentCheckout-Dak0HEN-.js";
|
|
12
|
-
const ue = /* @__PURE__ */ G({
|
|
13
|
-
__name: "Information",
|
|
14
|
-
props: {
|
|
15
|
-
template: {
|
|
16
|
-
type: Object,
|
|
17
|
-
required: !0
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(s) {
|
|
21
|
-
return (u, e) => {
|
|
22
|
-
var w;
|
|
23
|
-
return b(), F(H, null, [
|
|
24
|
-
e[0] || (e[0] = l("b", null, "Name", -1)),
|
|
25
|
-
f(": " + v(s.template.name), 1),
|
|
26
|
-
e[1] || (e[1] = l("br", null, null, -1)),
|
|
27
|
-
e[2] || (e[2] = l("b", null, "Description", -1)),
|
|
28
|
-
f(": " + v(s.template.description || "-"), 1),
|
|
29
|
-
e[3] || (e[3] = l("br", null, null, -1)),
|
|
30
|
-
e[4] || (e[4] = l("b", null, "Business", -1)),
|
|
31
|
-
f(": " + v(((w = s.template.business) == null ? void 0 : w.name) ?? s.template.businessId), 1),
|
|
32
|
-
e[5] || (e[5] = l("br", null, null, -1)),
|
|
33
|
-
e[6] || (e[6] = l("b", null, "Device Type", -1)),
|
|
34
|
-
f(": " + v(s.template.deviceType), 1),
|
|
35
|
-
e[7] || (e[7] = l("br", null, null, -1)),
|
|
36
|
-
e[8] || (e[8] = l("b", null, "Default", -1)),
|
|
37
|
-
f(": " + v(s.template.isDefault ? "Yes" : "No"), 1),
|
|
38
|
-
e[9] || (e[9] = l("br", null, null, -1))
|
|
39
|
-
], 64);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}), me = { class: "flex flex-col gap-16 max-w-[560px]" }, ce = { class: "flex items-center gap-12" }, de = ["src"], pe = { class: "font-medium" }, ge = { class: "mt-16" }, ye = /* @__PURE__ */ G({
|
|
43
|
-
__name: "EcrGateways",
|
|
44
|
-
props: {
|
|
45
|
-
template: {
|
|
46
|
-
type: Object,
|
|
47
|
-
required: !0
|
|
48
|
-
},
|
|
49
|
-
onUpdate: {
|
|
50
|
-
type: Function,
|
|
51
|
-
required: !0
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
setup(s) {
|
|
55
|
-
const u = s, e = [
|
|
56
|
-
{ gateway: "FeedMe", field: "ecrs", label: "FeedMe Terminal", region: [n.F_COUNTRY.enum.MY, n.F_COUNTRY.enum.SG, n.F_COUNTRY.enum.TH, n.F_COUNTRY.enum.PK, n.F_COUNTRY.enum.ID] },
|
|
57
|
-
{ gateway: "Ghl", field: "ecrs", label: "GHL Terminal", region: [n.F_COUNTRY.enum.MY] },
|
|
58
|
-
{ gateway: "Beam", field: "ecrs", label: "Beam Terminal", region: [n.F_COUNTRY.enum.TH] },
|
|
59
|
-
{ gateway: "Bri", field: "ecrs", label: "BRI Terminal", region: [n.F_COUNTRY.enum.ID] },
|
|
60
|
-
{ gateway: "Maybank", field: "ecrIntegrations", label: "ITB Maybank", region: [n.F_COUNTRY.enum.MY] },
|
|
61
|
-
{ gateway: "Maybank2", field: "ecrIntegrations", label: "PMA Maybank", region: [n.F_COUNTRY.enum.MY] },
|
|
62
|
-
{ gateway: "Maybank3", field: "ecrIntegrations", label: "Paysys Maybank", region: [n.F_COUNTRY.enum.MY] },
|
|
63
|
-
{ gateway: "Hlbb", field: "ecrIntegrations", label: "Paysys HLBB", region: [n.F_COUNTRY.enum.MY] },
|
|
64
|
-
{ gateway: "Ghl2", field: "ecrIntegrations", label: "GHL2", region: [n.F_COUNTRY.enum.MY] },
|
|
65
|
-
{ gateway: "Revenue", field: "ecrIntegrations", label: "Revenue PBB", region: [n.F_COUNTRY.enum.MY] },
|
|
66
|
-
{ gateway: "Pbb", field: "ecrIntegrations", label: "PBB", region: [n.F_COUNTRY.enum.MY] },
|
|
67
|
-
{ gateway: "Nets", field: "ecrIntegrations", label: "Nets", region: [n.F_COUNTRY.enum.SG] },
|
|
68
|
-
{ gateway: "GlobalPayments", field: "ecrIntegrations", label: "GPAP", region: [n.F_COUNTRY.enum.SG] },
|
|
69
|
-
{ gateway: "Kbank", field: "ecrIntegrations", label: "KBank", region: [n.F_COUNTRY.enum.TH] },
|
|
70
|
-
{ gateway: "Ghl3", field: "ecrIntegrations", label: "GHL", region: [n.F_COUNTRY.enum.TH] },
|
|
71
|
-
{ gateway: "Oma", field: "ecrIntegrations", label: "OMA", region: [n.F_COUNTRY.enum.PK] }
|
|
72
|
-
], w = le().currentCountry, Y = T(
|
|
73
|
-
() => e.filter(
|
|
74
|
-
(r) => r.region.includes(w.value ?? n.F_COUNTRY.enum.MY)
|
|
75
|
-
)
|
|
76
|
-
), C = (r) => u.template.settings[r] ?? [], I = T(
|
|
77
|
-
() => [...C("ecrs"), ...C("ecrIntegrations")].map((r) => r.gateway)
|
|
78
|
-
), m = L([]), t = () => m.value = [...I.value];
|
|
79
|
-
j(() => u.template, t), $(t);
|
|
80
|
-
const M = (r) => m.value.includes(r);
|
|
81
|
-
function U(r, i) {
|
|
82
|
-
m.value = i ? [...m.value, r] : m.value.filter((p) => p !== r);
|
|
83
|
-
}
|
|
84
|
-
const P = T(
|
|
85
|
-
() => [...m.value].sort().join() !== [...I.value].sort().join()
|
|
86
|
-
);
|
|
87
|
-
function N(r) {
|
|
88
|
-
return e.filter(
|
|
89
|
-
(i) => i.field === r && m.value.includes(i.gateway)
|
|
90
|
-
).map(
|
|
91
|
-
(i) => C(r).find((p) => p.gateway === i.gateway) ?? {
|
|
92
|
-
gateway: i.gateway
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
async function R() {
|
|
97
|
-
await u.onUpdate({
|
|
98
|
-
ecrs: N("ecrs"),
|
|
99
|
-
ecrIntegrations: N("ecrIntegrations")
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
return (r, i) => {
|
|
103
|
-
const p = O("FmSwitch"), o = O("FmButton");
|
|
104
|
-
return b(), F("div", me, [
|
|
105
|
-
(b(!0), F(H, null, q(Y.value, (a) => (b(), F("div", {
|
|
106
|
-
key: a.gateway,
|
|
107
|
-
class: "flex items-center justify-between border rounded-lg px-16 py-12"
|
|
108
|
-
}, [
|
|
109
|
-
l("div", ce, [
|
|
110
|
-
l("img", {
|
|
111
|
-
class: "rounded-md border-transparent w-[32px] h-[32px]",
|
|
112
|
-
src: y(se)(a.gateway.toUpperCase())
|
|
113
|
-
}, null, 8, de),
|
|
114
|
-
l("span", pe, v(a.label), 1)
|
|
115
|
-
]),
|
|
116
|
-
B(p, {
|
|
117
|
-
"model-value": M(a.gateway),
|
|
118
|
-
"onUpdate:modelValue": (c) => U(a.gateway, c)
|
|
119
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
120
|
-
]))), 128)),
|
|
121
|
-
l("div", ge, [
|
|
122
|
-
B(o, {
|
|
123
|
-
variant: "primary",
|
|
124
|
-
label: "Save",
|
|
125
|
-
icon: "save",
|
|
126
|
-
disabled: !P.value,
|
|
127
|
-
onclick: R
|
|
128
|
-
}, null, 8, ["disabled"])
|
|
129
|
-
])
|
|
130
|
-
]);
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
}), fe = { class: "mb-6 flex items-center gap-8 rounded-md bg-fm-color-neutral-gray-100 px-16 py-12" }, ve = { class: "fm-typo-en-body-md-400" }, be = {
|
|
134
|
-
key: 0,
|
|
135
|
-
class: "text-fm-color-neutral-gray-500"
|
|
136
|
-
}, Oe = /* @__PURE__ */ G({
|
|
137
|
-
__name: "TerminalTemplateSetting",
|
|
138
|
-
props: {
|
|
139
|
-
templateId: {
|
|
140
|
-
type: String,
|
|
141
|
-
required: !0
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
setup(s) {
|
|
145
|
-
const u = s, { tab: e } = ne({
|
|
146
|
-
tab: "information"
|
|
147
|
-
}), { isLoading: w, startAsyncCall: Y } = ee(!0), C = Z(), I = ae(), { t: m } = re(), t = L(), M = T(
|
|
148
|
-
() => {
|
|
149
|
-
var o, a, c, g, d, _, k;
|
|
150
|
-
return {
|
|
151
|
-
_id: u.templateId,
|
|
152
|
-
referenceId: "",
|
|
153
|
-
name: (o = t.value) == null ? void 0 : o.name,
|
|
154
|
-
status: "Active",
|
|
155
|
-
securityCode: "",
|
|
156
|
-
deviceType: (a = t.value) == null ? void 0 : a.deviceType,
|
|
157
|
-
ecrs: ((c = t.value) == null ? void 0 : c.settings.ecrs) ?? [],
|
|
158
|
-
gateways: [],
|
|
159
|
-
qrIntegrations: [],
|
|
160
|
-
ecrIntegrations: ((g = t.value) == null ? void 0 : g.settings.ecrIntegrations) ?? [],
|
|
161
|
-
paymentCheckouts: ((d = t.value) == null ? void 0 : d.settings.paymentCheckouts) ?? [],
|
|
162
|
-
createdAt: (_ = t.value) == null ? void 0 : _.createdAt,
|
|
163
|
-
updatedAt: (k = t.value) == null ? void 0 : k.updatedAt
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
async function U(o) {
|
|
168
|
-
Y(async () => {
|
|
169
|
-
try {
|
|
170
|
-
await x.updateById(u.templateId, { settings: o }), t.value = await x.readById(u.templateId), I.open({
|
|
171
|
-
type: "success",
|
|
172
|
-
message: "Setting template updated successfully"
|
|
173
|
-
});
|
|
174
|
-
} catch (a) {
|
|
175
|
-
I.open({
|
|
176
|
-
type: "error",
|
|
177
|
-
title: "Error occurs when update setting template",
|
|
178
|
-
message: oe(a)
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
async function P(o) {
|
|
184
|
-
var a;
|
|
185
|
-
await U({
|
|
186
|
-
...o,
|
|
187
|
-
paymentCheckouts: ((a = t.value) == null ? void 0 : a.settings.paymentCheckouts) ?? []
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
async function N(o, a) {
|
|
191
|
-
var c, g, d;
|
|
192
|
-
await U({
|
|
193
|
-
ecrs: ((c = t.value) == null ? void 0 : c.settings.ecrs) ?? [],
|
|
194
|
-
ecrIntegrations: ((g = t.value) == null ? void 0 : g.settings.ecrIntegrations) ?? [],
|
|
195
|
-
paymentCheckouts: a ?? ((d = t.value) == null ? void 0 : d.settings.paymentCheckouts) ?? []
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
const R = [
|
|
199
|
-
{
|
|
200
|
-
label: "Information",
|
|
201
|
-
value: "information",
|
|
202
|
-
icon: "overview",
|
|
203
|
-
render: ue
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
label: "ECR Gateway",
|
|
207
|
-
value: "ecr",
|
|
208
|
-
icon: "point_of_sale",
|
|
209
|
-
render: ye
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
label: "Payment Checkout",
|
|
213
|
-
value: "payment-checkout",
|
|
214
|
-
icon: "tune",
|
|
215
|
-
render: ie
|
|
216
|
-
}
|
|
217
|
-
], r = T(() => R.find((o) => o.value === e.value)), i = T(() => e.value === "information" ? { template: t.value } : e.value === "ecr" ? { template: t.value, onUpdate: P } : { terminal: M.value, onUpdate: N });
|
|
218
|
-
async function p() {
|
|
219
|
-
Y(async () => {
|
|
220
|
-
t.value = await x.readById(u.templateId);
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
return $(p), (o, a) => {
|
|
224
|
-
var d, _, k, S;
|
|
225
|
-
const c = O("FmIcon"), g = O("FmTabs");
|
|
226
|
-
return b(), E(te, {
|
|
227
|
-
title: ((d = t.value) == null ? void 0 : d.name) ?? "",
|
|
228
|
-
description: `${(_ = t.value) == null ? void 0 : _.deviceType} · ${((S = (k = t.value) == null ? void 0 : k.business) == null ? void 0 : S.name) ?? ""}`,
|
|
229
|
-
loading: y(w),
|
|
230
|
-
onBack: y(C).back
|
|
231
|
-
}, {
|
|
232
|
-
default: K(() => {
|
|
233
|
-
var h, A, D;
|
|
234
|
-
return [
|
|
235
|
-
l("div", fe, [
|
|
236
|
-
B(c, {
|
|
237
|
-
name: "info",
|
|
238
|
-
class: "shrink-0"
|
|
239
|
-
}),
|
|
240
|
-
l("span", ve, v(y(m)("payment.terminal_template.scope_info")), 1)
|
|
241
|
-
]),
|
|
242
|
-
B(g, {
|
|
243
|
-
"model-value": y(e),
|
|
244
|
-
"onUpdate:modelValue": a[0] || (a[0] = (V) => z(e) ? e.value = V : null),
|
|
245
|
-
class: "mb-6",
|
|
246
|
-
items: R
|
|
247
|
-
}, null, 8, ["model-value"]),
|
|
248
|
-
y(e) === "payment-checkout" && !((A = (h = t.value) == null ? void 0 : h.settings.paymentCheckouts) != null && A.length) ? (b(), F("div", be, [...a[1] || (a[1] = [
|
|
249
|
-
f(" Use ", -1),
|
|
250
|
-
l("b", null, "Save as Template", -1),
|
|
251
|
-
f(" on a POS or Kiosk to capture its checkout list. ", -1)
|
|
252
|
-
])])) : y(e) && t.value ? (b(), E(Q((D = r.value) == null ? void 0 : D.render), W(J({ key: 1 }, i.value)), null, 16)) : X("", !0)
|
|
253
|
-
];
|
|
254
|
-
}),
|
|
255
|
-
_: 1
|
|
256
|
-
}, 8, ["title", "description", "loading", "onBack"]);
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
export {
|
|
261
|
-
Oe as default
|
|
262
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type CreateTerminalTemplateDto, type FdoPortalTerminalTemplate, type FdoTerminalTemplate, type FdoTerminalTemplateDeviceType, type PaginatedResult, type UpdateTerminalTemplateDto } from "@feedmepos/payment-entity";
|
|
2
|
-
export declare const terminalTemplateApi: {
|
|
3
|
-
create(payload: CreateTerminalTemplateDto): Promise<FdoPortalTerminalTemplate>;
|
|
4
|
-
read(payload: {
|
|
5
|
-
searchKey?: string;
|
|
6
|
-
businessId?: string;
|
|
7
|
-
deviceType?: FdoTerminalTemplateDeviceType;
|
|
8
|
-
limit: number;
|
|
9
|
-
cursor: string;
|
|
10
|
-
}): Promise<PaginatedResult<FdoPortalTerminalTemplate>>;
|
|
11
|
-
readByBusiness(businessId: string, deviceType: FdoTerminalTemplateDeviceType): Promise<FdoPortalTerminalTemplate[]>;
|
|
12
|
-
readById(id: string): Promise<FdoPortalTerminalTemplate>;
|
|
13
|
-
updateById(id: string, payload: UpdateTerminalTemplateDto): Promise<FdoPortalTerminalTemplate>;
|
|
14
|
-
delete(id: string): Promise<FdoTerminalTemplate>;
|
|
15
|
-
};
|