@feedmepos/mf-payment 1.9.10-dev → 1.9.12-dev
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-wNkZ5I-E.js → Actions.vue_vue_type_script_setup_true_lang-BXIJzZ8T.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-m6l_MV4M.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DU8U5VSP.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BlZJGztu.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BXii3Sj9.js} +2 -2
- package/dist/{Chargeback-DMNm9rkF.js → Chargeback-LsQWsoj8.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-mi-OPxkM.js → DocumentViewer.vue_vue_type_script_setup_true_lang-AUk1vLjZ.js} +1 -1
- package/dist/ExternalTerminal-CB5kUgbn.js +596 -0
- package/dist/{OnboardForm-fOMcKQkU.js → OnboardForm-BWXc8Z3i.js} +6 -6
- package/dist/{OnboardForm-B3RMQlZV.js → OnboardForm-DNpatfIm.js} +6 -6
- package/dist/{OnboardSubmission-d3MuZPyU.js → OnboardSubmission-CKGvRiE4.js} +6 -6
- package/dist/{OnboardSubmission-M3rngUGE.js → OnboardSubmission-Dr58aWaR.js} +3 -3
- package/dist/{PayoutAccount-7cqPcSwK.js → PayoutAccount-CrVnWoVh.js} +7 -7
- package/dist/{PayoutAccount-DBYyCWqM.js → PayoutAccount-D0evEKSw.js} +5 -5
- package/dist/{PayoutAccountSetting-Cvde_50o.js → PayoutAccountSetting-DoI6-WNe.js} +6 -6
- package/dist/{Restaurant-Bi44AThD.js → Restaurant-DmGDvYHg.js} +4 -4
- package/dist/{RestaurantSetting-Di5oEQPV.js → RestaurantSetting-C8DSkSSU.js} +3 -3
- package/dist/{Settlement-B5DCI-2S.js → Settlement-DkpS3_Ca.js} +4 -4
- package/dist/{Settlement-rt-Cv_Yc.js → Settlement-DmUxf_Fi.js} +3 -3
- package/dist/{SettlementTransactions-C_B65yII.js → SettlementTransactions-DfLWkooS.js} +5 -5
- package/dist/{SettlementTransactions-BvMthldq.js → SettlementTransactions-ns-A9lc8.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-B5qIF1i5.js → Status.vue_vue_type_script_setup_true_lang-VwA2t3-e.js} +1 -1
- package/dist/{Terminal-Co_xbSHy.js → Terminal-CI054v8n.js} +6 -6
- package/dist/{TerminalSetting-DGr3LoeX.js → TerminalSetting-hMLR2p-0.js} +6 -6
- package/dist/{Transaction-BgyPqZzQ.js → Transaction-C3Uug9ho.js} +10 -10
- package/dist/{Transaction--TYP0ZSJ.js → Transaction-CXR35ZoB.js} +11 -11
- package/dist/{TransactionOld-CkgvMRLH.js → TransactionOld-BZstdtKs.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-Bm2dyY2Q.js → TransactionStatus.vue_vue_type_script_setup_true_lang-iGLTnC8b.js} +1 -1
- package/dist/{app-iRyd8t05.js → app-T0cIjhsU.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/assets-DWbWwPAa.js +95 -0
- package/dist/{grafana-wtTZUykG.js → grafana-D8MdheCF.js} +1 -1
- package/dist/{index-Clw5A9Fw.js → index-0Es_nzAi.js} +1 -1
- package/dist/{index-D4ZSG2qL.js → index-1gifEl8O.js} +1 -1
- package/dist/{index-JlyiXFLB.js → index-33m9hXd0.js} +1 -1
- package/dist/{index-DDSA6e2r.js → index-BDa3-AVY.js} +1 -1
- package/dist/{index-BbYaySZa.js → index-BrvdMIgA.js} +1 -1
- package/dist/{index-0HkHgWak.js → index-CGEfX9IT.js} +1 -1
- package/dist/{index-CyzMDERf.js → index-CNlqiiLw.js} +2 -2
- package/dist/{index-BFEU2cYn.js → index-CcpABxWD.js} +1 -1
- package/dist/{index-Bj53nYT9.js → index-DaezWdx_.js} +1 -1
- package/dist/{index-CRb1xTrY.js → index-j2yatR42.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CHbSw-iU.js → index.vue_vue_type_script_setup_true_lang-BNtg9OkS.js} +1 -1
- package/dist/{onboard-submission-DTzkXcj3.js → onboard-submission-BdCiTx1K.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-Ck5xZVT0.js → payout-account-C5dKD-81.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/external-terminal/cell/ID.vue.d.ts +0 -2
- package/dist/views/admin/external-terminal/cell/Provider.vue.d.ts +7 -0
- package/dist/views/admin/external-terminal/cell/Status.vue.d.ts +5 -0
- package/package.json +1 -1
- package/dist/ExternalTerminal-BFQwZg-H.js +0 -563
- package/dist/assets-CUL8LM7J.js +0 -95
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { type Row } from '@feedmepos/ui-library';
|
|
2
1
|
type __VLS_Props = {
|
|
3
|
-
row: Row<any>;
|
|
4
2
|
data: unknown;
|
|
5
3
|
};
|
|
6
4
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Row } from '@feedmepos/ui-library';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
row: Row<any>;
|
|
4
|
+
data: unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: unknown;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,563 +0,0 @@
|
|
|
1
|
-
import { defineComponent as P, resolveComponent as p, openBlock as F, createElementBlock as M, createVNode as u, normalizeClass as Z, withCtx as I, createElementVNode as E, toDisplayString as j, createBlock as C, ref as d, Fragment as ee, unref as s, useModel as te, computed as R, watch as L, createCommentVNode as N, resolveDynamicComponent as W, mergeModels as z, createTextVNode as $, normalizeProps as ae, guardReactiveProps as re, isRef as ne, h as H } from "vue";
|
|
2
|
-
import { h as le } from "./moment-h96o7c8I.js";
|
|
3
|
-
import { useCoreStore as G } from "@feedmepos/mf-common";
|
|
4
|
-
import { u as oe } from "./index-BbYaySZa.js";
|
|
5
|
-
import { _ as ie } from "./index.vue_vue_type_script_setup_true_lang-CHbSw-iU.js";
|
|
6
|
-
import { _ as se } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
7
|
-
import { useSnackbar as Q, useDialogChild as ue, useDialog as me } from "@feedmepos/ui-library";
|
|
8
|
-
import { e as h } from "./index-0HkHgWak.js";
|
|
9
|
-
import { c as de } from "./clipboard-4jh1WteU.js";
|
|
10
|
-
import { z as V, a as T } from "./validator-CTlVogBQ.js";
|
|
11
|
-
import { _ as ce } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BlZJGztu.js";
|
|
12
|
-
import { e as O, p as pe } from "./index-Bj53nYT9.js";
|
|
13
|
-
import { u as Y } from "./error-K1CakhA9.js";
|
|
14
|
-
import { w as ve } from "./Modal-DB8M9o1T.js";
|
|
15
|
-
const fe = /* @__PURE__ */ P({
|
|
16
|
-
__name: "ID",
|
|
17
|
-
props: {
|
|
18
|
-
row: {},
|
|
19
|
-
data: {}
|
|
20
|
-
},
|
|
21
|
-
setup(v) {
|
|
22
|
-
const o = v, l = Q();
|
|
23
|
-
function a() {
|
|
24
|
-
return o.row.original.status === "READY" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-amber-400";
|
|
25
|
-
}
|
|
26
|
-
function i() {
|
|
27
|
-
try {
|
|
28
|
-
de(o.data), l.open({ title: "Text copied to clipboard." }, 1e3);
|
|
29
|
-
} catch {
|
|
30
|
-
l.open({ title: "Clipboard API incompatible." }, 1e3);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return (r, t) => {
|
|
34
|
-
const m = p("FmBadge");
|
|
35
|
-
return F(), M("div", {
|
|
36
|
-
onClick: t[0] || (t[0] = (c) => {
|
|
37
|
-
c.stopPropagation(), i();
|
|
38
|
-
})
|
|
39
|
-
}, [
|
|
40
|
-
u(m, {
|
|
41
|
-
inline: "",
|
|
42
|
-
class: Z(a())
|
|
43
|
-
}, {
|
|
44
|
-
default: I(() => [
|
|
45
|
-
E("div", null, j(v.data), 1)
|
|
46
|
-
]),
|
|
47
|
-
_: 1
|
|
48
|
-
}, 8, ["class"])
|
|
49
|
-
]);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}), ye = { class: "flex items-center justify-center" }, _e = {
|
|
53
|
-
key: 1,
|
|
54
|
-
class: "t-caption text-fm-color-neutral-gray-500 whitespace-nowrap"
|
|
55
|
-
}, xe = /* @__PURE__ */ P({
|
|
56
|
-
__name: "Actions",
|
|
57
|
-
props: {
|
|
58
|
-
data: {}
|
|
59
|
-
},
|
|
60
|
-
emits: ["pair", "edit", "delete"],
|
|
61
|
-
setup(v, { emit: o }) {
|
|
62
|
-
const l = o;
|
|
63
|
-
return (a, i) => {
|
|
64
|
-
const r = p("FmButton");
|
|
65
|
-
return F(), M("div", ye, [
|
|
66
|
-
v.data.status === "NEW" ? (F(), C(r, {
|
|
67
|
-
key: 0,
|
|
68
|
-
variant: "tertiary",
|
|
69
|
-
label: "Pair",
|
|
70
|
-
"prepend-icon": "link",
|
|
71
|
-
onClick: i[0] || (i[0] = (t) => {
|
|
72
|
-
t.stopPropagation(), l("pair");
|
|
73
|
-
})
|
|
74
|
-
})) : (F(), M("div", _e, " Ready to use ")),
|
|
75
|
-
u(r, {
|
|
76
|
-
variant: "plain",
|
|
77
|
-
"prepend-icon": "edit",
|
|
78
|
-
onClick: i[1] || (i[1] = (t) => {
|
|
79
|
-
t.stopPropagation(), l("edit");
|
|
80
|
-
})
|
|
81
|
-
}),
|
|
82
|
-
u(r, {
|
|
83
|
-
variant: "plain",
|
|
84
|
-
"prepend-icon": "delete",
|
|
85
|
-
onClick: i[2] || (i[2] = (t) => {
|
|
86
|
-
t.stopPropagation(), l("delete");
|
|
87
|
-
})
|
|
88
|
-
})
|
|
89
|
-
]);
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}), ge = /* @__PURE__ */ P({
|
|
93
|
-
__name: "BRITerminal",
|
|
94
|
-
props: {
|
|
95
|
-
initial: {
|
|
96
|
-
type: Object
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
setup(v, { expose: o }) {
|
|
100
|
-
var m, c, _, x;
|
|
101
|
-
const l = v, a = d(((m = l.initial) == null ? void 0 : m.wsUrl) ?? ""), i = d(((c = l.initial) == null ? void 0 : c.mid) ?? ""), r = d(((_ = l.initial) == null ? void 0 : _.apiKey) ?? ""), t = d(((x = l.initial) == null ? void 0 : x.privateKey) ?? "");
|
|
102
|
-
return o({
|
|
103
|
-
values: () => ({
|
|
104
|
-
wsUrl: a.value,
|
|
105
|
-
mid: i.value,
|
|
106
|
-
apiKey: r.value,
|
|
107
|
-
privateKey: t.value
|
|
108
|
-
})
|
|
109
|
-
}), (D, b) => {
|
|
110
|
-
const w = p("FmTextField"), S = p("FmTextarea");
|
|
111
|
-
return F(), M(ee, null, [
|
|
112
|
-
u(w, {
|
|
113
|
-
modelValue: a.value,
|
|
114
|
-
"onUpdate:modelValue": b[0] || (b[0] = (e) => a.value = e),
|
|
115
|
-
label: "PVS WebSocket URL",
|
|
116
|
-
placeholder: "wss://...",
|
|
117
|
-
rules: s(V)(s(T).string().min(1, "WebSocket URL is required"))
|
|
118
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
119
|
-
u(w, {
|
|
120
|
-
modelValue: i.value,
|
|
121
|
-
"onUpdate:modelValue": b[1] || (b[1] = (e) => i.value = e),
|
|
122
|
-
label: "Merchant ID (MID)",
|
|
123
|
-
rules: s(V)(s(T).string().min(1, "MID is required"))
|
|
124
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
125
|
-
u(w, {
|
|
126
|
-
modelValue: r.value,
|
|
127
|
-
"onUpdate:modelValue": b[2] || (b[2] = (e) => r.value = e),
|
|
128
|
-
label: "API Key",
|
|
129
|
-
rules: s(V)(s(T).string().min(1, "API key is required"))
|
|
130
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
131
|
-
u(S, {
|
|
132
|
-
modelValue: t.value,
|
|
133
|
-
"onUpdate:modelValue": b[3] || (b[3] = (e) => t.value = e),
|
|
134
|
-
label: "Private Key",
|
|
135
|
-
rows: 3,
|
|
136
|
-
placeholder: "PEM, or base64 of the PEM",
|
|
137
|
-
rules: s(V)(s(T).string().min(1, "Private key is required"))
|
|
138
|
-
}, null, 8, ["modelValue", "rules"])
|
|
139
|
-
], 64);
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
}), Fe = /* @__PURE__ */ P({
|
|
143
|
-
__name: "ExternalTerminalSideSheet",
|
|
144
|
-
props: /* @__PURE__ */ z({
|
|
145
|
-
terminal: {
|
|
146
|
-
type: Object
|
|
147
|
-
}
|
|
148
|
-
}, {
|
|
149
|
-
modelValue: { type: Boolean, default: !1 },
|
|
150
|
-
modelModifiers: {}
|
|
151
|
-
}),
|
|
152
|
-
emits: /* @__PURE__ */ z(["submit"], ["update:modelValue"]),
|
|
153
|
-
setup(v, { emit: o }) {
|
|
154
|
-
const l = G(), a = v, i = o, r = te(v, "modelValue"), t = d(), m = d(), c = d(""), _ = d(""), x = d(), D = d({}), b = {
|
|
155
|
-
BEAM: [O.F_COUNTRY.enum.TH],
|
|
156
|
-
BRI: [O.F_COUNTRY.enum.ID]
|
|
157
|
-
}, w = {
|
|
158
|
-
BRI: ge
|
|
159
|
-
}, S = l.currentCountry, e = R(
|
|
160
|
-
() => pe.FdoExternalTerminalProvider.options.filter(
|
|
161
|
-
(f) => b[f].includes(S.value ?? O.F_COUNTRY.enum.MY)
|
|
162
|
-
).map((f) => ({
|
|
163
|
-
label: f,
|
|
164
|
-
value: f
|
|
165
|
-
}))
|
|
166
|
-
), n = R(() => {
|
|
167
|
-
var f;
|
|
168
|
-
return ((f = a.terminal) == null ? void 0 : f.type) ?? x.value;
|
|
169
|
-
}), y = R(
|
|
170
|
-
() => n.value ? w[n.value] : void 0
|
|
171
|
-
);
|
|
172
|
-
L(r, (f) => {
|
|
173
|
-
var g, U, A, K;
|
|
174
|
-
f && (c.value = ((g = a.terminal) == null ? void 0 : g.name) ?? "", _.value = ((U = a.terminal) == null ? void 0 : U.restaurantId) ?? "", x.value = (A = a.terminal) == null ? void 0 : A.type, D.value = { ...((K = a.terminal) == null ? void 0 : K.providerData) ?? {} });
|
|
175
|
-
});
|
|
176
|
-
function B() {
|
|
177
|
-
i("submit", {
|
|
178
|
-
name: c.value,
|
|
179
|
-
restaurantId: _.value,
|
|
180
|
-
type: x.value,
|
|
181
|
-
providerData: m.value ? { ...D.value, ...m.value.values() } : void 0
|
|
182
|
-
}), r.value = !1;
|
|
183
|
-
}
|
|
184
|
-
return (f, g) => {
|
|
185
|
-
const U = p("FmSelect"), A = p("FmTextField"), K = p("FmButton"), J = p("FmForm"), X = p("FmSideSheet");
|
|
186
|
-
return F(), C(X, {
|
|
187
|
-
modelValue: r.value,
|
|
188
|
-
"onUpdate:modelValue": g[3] || (g[3] = (q) => r.value = q),
|
|
189
|
-
header: a.terminal ? "Update External Terminal" : "Create New External Terminal",
|
|
190
|
-
"close-button": ""
|
|
191
|
-
}, {
|
|
192
|
-
default: I(() => [
|
|
193
|
-
u(J, {
|
|
194
|
-
ref: t.value,
|
|
195
|
-
class: "flex flex-col gap-16 px-4 py-6",
|
|
196
|
-
onValidationSuccess: B
|
|
197
|
-
}, {
|
|
198
|
-
default: I(() => {
|
|
199
|
-
var q;
|
|
200
|
-
return [
|
|
201
|
-
a.terminal ? N("", !0) : (F(), C(U, {
|
|
202
|
-
key: 0,
|
|
203
|
-
modelValue: x.value,
|
|
204
|
-
"onUpdate:modelValue": g[0] || (g[0] = (k) => x.value = k),
|
|
205
|
-
label: "Provider",
|
|
206
|
-
items: e.value,
|
|
207
|
-
rules: s(V)(s(T).string().min(1, "Provider is required"))
|
|
208
|
-
}, null, 8, ["modelValue", "items", "rules"])),
|
|
209
|
-
a.terminal ? N("", !0) : (F(), C(ce, {
|
|
210
|
-
key: 1,
|
|
211
|
-
modelValue: _.value,
|
|
212
|
-
"onUpdate:modelValue": g[1] || (g[1] = (k) => _.value = k),
|
|
213
|
-
label: "Restaurant",
|
|
214
|
-
"search-placeholder": "Search restaurants",
|
|
215
|
-
rules: s(V)(s(T).string().min(1, "Restaurant is required"))
|
|
216
|
-
}, null, 8, ["modelValue", "rules"])),
|
|
217
|
-
u(A, {
|
|
218
|
-
modelValue: c.value,
|
|
219
|
-
"onUpdate:modelValue": g[2] || (g[2] = (k) => c.value = k),
|
|
220
|
-
label: "Terminal Name",
|
|
221
|
-
rules: s(V)(s(T).string().min(1))
|
|
222
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
223
|
-
y.value ? (F(), C(W(y.value), {
|
|
224
|
-
key: `${((q = a.terminal) == null ? void 0 : q._id) ?? "new"}-${n.value}`,
|
|
225
|
-
ref_key: "configForm",
|
|
226
|
-
ref: m,
|
|
227
|
-
initial: D.value
|
|
228
|
-
}, null, 8, ["initial"])) : N("", !0),
|
|
229
|
-
u(K, {
|
|
230
|
-
type: "submit",
|
|
231
|
-
label: a.terminal ? "Update" : "Create"
|
|
232
|
-
}, null, 8, ["label"])
|
|
233
|
-
];
|
|
234
|
-
}),
|
|
235
|
-
_: 1
|
|
236
|
-
}, 512)
|
|
237
|
-
]),
|
|
238
|
-
_: 1
|
|
239
|
-
}, 8, ["modelValue", "header"]);
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
}), be = { class: "t-caption" }, Ve = /* @__PURE__ */ P({
|
|
243
|
-
__name: "BeamTerminal",
|
|
244
|
-
props: {
|
|
245
|
-
terminal: {
|
|
246
|
-
type: Object,
|
|
247
|
-
required: !0
|
|
248
|
-
},
|
|
249
|
-
onPair: {
|
|
250
|
-
type: Function,
|
|
251
|
-
required: !0
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
setup(v) {
|
|
255
|
-
const o = v, l = d(), a = d("");
|
|
256
|
-
return (i, r) => {
|
|
257
|
-
const t = p("FmTextField"), m = p("FmButton"), c = p("FmForm");
|
|
258
|
-
return F(), C(c, {
|
|
259
|
-
ref: l.value,
|
|
260
|
-
class: "flex flex-col gap-16 mb-6",
|
|
261
|
-
onValidationSuccess: r[1] || (r[1] = () => o.onPair({ type: "BEAM", pairCode: a.value }))
|
|
262
|
-
}, {
|
|
263
|
-
default: I(() => [
|
|
264
|
-
E("div", be, [
|
|
265
|
-
r[2] || (r[2] = $(" Enter the pairing code shown on ", -1)),
|
|
266
|
-
E("b", null, j(o.terminal.name), 1),
|
|
267
|
-
r[3] || (r[3] = $(" to register it with Bolt Connect. ", -1))
|
|
268
|
-
]),
|
|
269
|
-
u(t, {
|
|
270
|
-
modelValue: a.value,
|
|
271
|
-
"onUpdate:modelValue": r[0] || (r[0] = (_) => a.value = _),
|
|
272
|
-
label: "Pair Code",
|
|
273
|
-
"label-mark": "required",
|
|
274
|
-
rules: s(V)(s(T).string().min(1, "Pair code is required"))
|
|
275
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
276
|
-
u(m, {
|
|
277
|
-
type: "submit",
|
|
278
|
-
label: "Pair"
|
|
279
|
-
})
|
|
280
|
-
]),
|
|
281
|
-
_: 1
|
|
282
|
-
}, 512);
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
}), Te = { class: "t-caption" }, Ce = /* @__PURE__ */ P({
|
|
286
|
-
__name: "BRITerminal",
|
|
287
|
-
props: {
|
|
288
|
-
terminal: {
|
|
289
|
-
type: Object,
|
|
290
|
-
required: !0
|
|
291
|
-
},
|
|
292
|
-
onPair: {
|
|
293
|
-
type: Function,
|
|
294
|
-
required: !0
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
setup(v) {
|
|
298
|
-
const o = v, l = d(), a = d(""), i = d("");
|
|
299
|
-
return (r, t) => {
|
|
300
|
-
const m = p("FmTextField"), c = p("FmButton"), _ = p("FmForm");
|
|
301
|
-
return F(), C(_, {
|
|
302
|
-
ref: l.value,
|
|
303
|
-
class: "flex flex-col gap-16 mb-6",
|
|
304
|
-
onValidationSuccess: t[2] || (t[2] = () => o.onPair({ type: "BRI", pairCode: a.value, edcId: i.value }))
|
|
305
|
-
}, {
|
|
306
|
-
default: I(() => [
|
|
307
|
-
E("div", Te, [
|
|
308
|
-
t[3] || (t[3] = $(" Enter the pairing code and EDC ID shown on ", -1)),
|
|
309
|
-
E("b", null, j(o.terminal.name), 1),
|
|
310
|
-
t[4] || (t[4] = $(" to register it with BRI. ", -1))
|
|
311
|
-
]),
|
|
312
|
-
u(m, {
|
|
313
|
-
modelValue: a.value,
|
|
314
|
-
"onUpdate:modelValue": t[0] || (t[0] = (x) => a.value = x),
|
|
315
|
-
label: "Pair Code",
|
|
316
|
-
"label-mark": "required",
|
|
317
|
-
rules: s(V)(s(T).string().min(1, "Pair code is required"))
|
|
318
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
319
|
-
u(m, {
|
|
320
|
-
modelValue: i.value,
|
|
321
|
-
"onUpdate:modelValue": t[1] || (t[1] = (x) => i.value = x),
|
|
322
|
-
label: "EDC ID",
|
|
323
|
-
"label-mark": "required",
|
|
324
|
-
rules: s(V)(s(T).string().min(1, "EDC ID is required"))
|
|
325
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
326
|
-
u(c, {
|
|
327
|
-
type: "submit",
|
|
328
|
-
label: "Pair"
|
|
329
|
-
})
|
|
330
|
-
]),
|
|
331
|
-
_: 1
|
|
332
|
-
}, 512);
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
}), Ee = /* @__PURE__ */ P({
|
|
336
|
-
__name: "ExternalTerminalPairDialog",
|
|
337
|
-
props: {
|
|
338
|
-
terminal: {
|
|
339
|
-
type: Object,
|
|
340
|
-
required: !0
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
setup(v) {
|
|
344
|
-
const o = v, l = ue(), a = {
|
|
345
|
-
BEAM: Ve,
|
|
346
|
-
BRI: Ce
|
|
347
|
-
}, i = R(() => a[o.terminal.type]);
|
|
348
|
-
function r(t) {
|
|
349
|
-
l.emitData(t), l.emitAction("primary");
|
|
350
|
-
}
|
|
351
|
-
return (t, m) => (F(), C(W(i.value), ae(re({
|
|
352
|
-
terminal: o.terminal,
|
|
353
|
-
onPair: r
|
|
354
|
-
})), null, 16));
|
|
355
|
-
}
|
|
356
|
-
}), Pe = { class: "flex justify-between mb-6 items-center" }, we = { class: "flex space-x-4" }, Be = { class: "flex space-x-4" }, Ye = /* @__PURE__ */ P({
|
|
357
|
-
__name: "ExternalTerminal",
|
|
358
|
-
setup(v) {
|
|
359
|
-
const o = d(), { searchKey: l } = oe({
|
|
360
|
-
searchKey: ""
|
|
361
|
-
});
|
|
362
|
-
let a;
|
|
363
|
-
L(l, async () => {
|
|
364
|
-
a && clearTimeout(a), a = setTimeout(() => {
|
|
365
|
-
var e;
|
|
366
|
-
return (e = o.value) == null ? void 0 : e.reset();
|
|
367
|
-
}, 700);
|
|
368
|
-
});
|
|
369
|
-
const i = G(), r = me(), t = Q();
|
|
370
|
-
R(
|
|
371
|
-
() => new Map(i.restaurants.value.map((e) => [e._id, e.profile.name]))
|
|
372
|
-
);
|
|
373
|
-
const m = d(!1), c = d();
|
|
374
|
-
function _(e) {
|
|
375
|
-
c.value = e, m.value = !0;
|
|
376
|
-
}
|
|
377
|
-
async function x(e) {
|
|
378
|
-
var y;
|
|
379
|
-
const n = c.value;
|
|
380
|
-
try {
|
|
381
|
-
n ? await h.updateById(
|
|
382
|
-
n._id,
|
|
383
|
-
e.type === "BRI" ? {
|
|
384
|
-
type: "BRI",
|
|
385
|
-
name: e.name,
|
|
386
|
-
providerData: e.providerData
|
|
387
|
-
} : { type: "BEAM", name: e.name }
|
|
388
|
-
) : await h.create(e), (y = o.value) == null || y.reset(), t.open({
|
|
389
|
-
type: "success",
|
|
390
|
-
message: n ? "External terminal updated successfully." : "External terminal created successfully."
|
|
391
|
-
});
|
|
392
|
-
} catch (B) {
|
|
393
|
-
t.open({
|
|
394
|
-
type: "error",
|
|
395
|
-
title: n ? "Error occurs when update external terminal" : "Error occurs when create external terminal",
|
|
396
|
-
message: Y(B)
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
async function D(e) {
|
|
401
|
-
r.open({
|
|
402
|
-
title: "Pair External Terminal",
|
|
403
|
-
closeButton: !0,
|
|
404
|
-
overlay: !0,
|
|
405
|
-
contentComponent: Ee,
|
|
406
|
-
contentComponentProps: { terminal: e }
|
|
407
|
-
}).onPrimary(async (n) => {
|
|
408
|
-
var y;
|
|
409
|
-
r.close();
|
|
410
|
-
try {
|
|
411
|
-
await h.pair(e._id, n), (y = o.value) == null || y.reset(), t.open({
|
|
412
|
-
type: "success",
|
|
413
|
-
message: "External terminal paired successfully."
|
|
414
|
-
});
|
|
415
|
-
} catch (B) {
|
|
416
|
-
t.open({
|
|
417
|
-
type: "error",
|
|
418
|
-
title: "Error occurs when pair external terminal",
|
|
419
|
-
message: Y(B)
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
async function b(e) {
|
|
425
|
-
ve(
|
|
426
|
-
r,
|
|
427
|
-
"Delete External Terminal",
|
|
428
|
-
"Are you sure to delete this external terminal? This action cannot be revert!",
|
|
429
|
-
async () => {
|
|
430
|
-
var n;
|
|
431
|
-
try {
|
|
432
|
-
await h.delete(e), (n = o.value) == null || n.reset(), t.open({
|
|
433
|
-
type: "success",
|
|
434
|
-
message: "External terminal deleted successfully."
|
|
435
|
-
});
|
|
436
|
-
} catch (y) {
|
|
437
|
-
t.open({
|
|
438
|
-
type: "error",
|
|
439
|
-
title: "Error occurs when delete external terminal",
|
|
440
|
-
message: Y(y)
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
);
|
|
445
|
-
}
|
|
446
|
-
const w = function(e) {
|
|
447
|
-
return {
|
|
448
|
-
id: e._id,
|
|
449
|
-
status: e.status,
|
|
450
|
-
name: e.name,
|
|
451
|
-
type: e.type,
|
|
452
|
-
restaurant: e.restaurantId,
|
|
453
|
-
updatedAt: le(e.updatedAt).format("YYYY-MM-DD HH:mm:ss")
|
|
454
|
-
};
|
|
455
|
-
}, S = [
|
|
456
|
-
{
|
|
457
|
-
accessorKey: "id",
|
|
458
|
-
header: () => "Terminal ID",
|
|
459
|
-
meta: {
|
|
460
|
-
textAlign: "right"
|
|
461
|
-
},
|
|
462
|
-
cell: ({ cell: e, row: n }) => H(fe, { row: n, data: e.getValue() })
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
accessorKey: "name",
|
|
466
|
-
header: () => "Name",
|
|
467
|
-
meta: {
|
|
468
|
-
textAlign: "left"
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
accessorKey: "type",
|
|
473
|
-
header: () => "Provider",
|
|
474
|
-
meta: {
|
|
475
|
-
textAlign: "left"
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
accessorKey: "restaurant",
|
|
480
|
-
header: () => "Restaurant",
|
|
481
|
-
meta: {
|
|
482
|
-
textAlign: "left"
|
|
483
|
-
}
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
accessorKey: "status",
|
|
487
|
-
header: () => "Status",
|
|
488
|
-
meta: {
|
|
489
|
-
textAlign: "left"
|
|
490
|
-
}
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
accessorKey: "updatedAt",
|
|
494
|
-
header: () => "Last Updated",
|
|
495
|
-
meta: {
|
|
496
|
-
textAlign: "left"
|
|
497
|
-
}
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
accessorKey: "id",
|
|
501
|
-
header: () => "Actions",
|
|
502
|
-
meta: {
|
|
503
|
-
textAlign: "center"
|
|
504
|
-
},
|
|
505
|
-
cell: ({ row: e }) => {
|
|
506
|
-
var y;
|
|
507
|
-
const n = (y = o.value) == null ? void 0 : y.pageData().at(e.index);
|
|
508
|
-
return H(xe, {
|
|
509
|
-
data: n,
|
|
510
|
-
onPair: () => D(n),
|
|
511
|
-
onEdit: () => _(n),
|
|
512
|
-
onDelete: () => b(n._id)
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
];
|
|
517
|
-
return (e, n) => {
|
|
518
|
-
const y = p("FmSearch"), B = p("FmButton");
|
|
519
|
-
return F(), C(se, {
|
|
520
|
-
title: "External Terminals",
|
|
521
|
-
loading: !1
|
|
522
|
-
}, {
|
|
523
|
-
default: I(() => [
|
|
524
|
-
E("div", Pe, [
|
|
525
|
-
E("div", we, [
|
|
526
|
-
u(y, {
|
|
527
|
-
"model-value": s(l),
|
|
528
|
-
"onUpdate:modelValue": n[0] || (n[0] = (f) => ne(l) ? l.value = f : null),
|
|
529
|
-
class: "mr-8",
|
|
530
|
-
label: "Search",
|
|
531
|
-
placeholder: "Search ..."
|
|
532
|
-
}, null, 8, ["model-value"])
|
|
533
|
-
]),
|
|
534
|
-
E("div", Be, [
|
|
535
|
-
u(B, {
|
|
536
|
-
label: "Create",
|
|
537
|
-
icon: "add",
|
|
538
|
-
onClick: n[1] || (n[1] = () => _())
|
|
539
|
-
})
|
|
540
|
-
])
|
|
541
|
-
]),
|
|
542
|
-
u(ie, {
|
|
543
|
-
ref_key: "controller",
|
|
544
|
-
ref: o,
|
|
545
|
-
"column-defs": S,
|
|
546
|
-
"rows-defs": w,
|
|
547
|
-
paginate: (f, g) => s(h).read({ searchKey: s(l), limit: f, cursor: g })
|
|
548
|
-
}, null, 8, ["paginate"]),
|
|
549
|
-
u(Fe, {
|
|
550
|
-
modelValue: m.value,
|
|
551
|
-
"onUpdate:modelValue": n[2] || (n[2] = (f) => m.value = f),
|
|
552
|
-
terminal: c.value,
|
|
553
|
-
onSubmit: x
|
|
554
|
-
}, null, 8, ["modelValue", "terminal"])
|
|
555
|
-
]),
|
|
556
|
-
_: 1
|
|
557
|
-
});
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
export {
|
|
562
|
-
Ye as default
|
|
563
|
-
};
|