@feedmepos/mf-payment 1.9.3-dev → 1.9.4-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-C9cv5yKo.js → Actions.vue_vue_type_script_setup_true_lang-CkECWfJH.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-NKO6-sgg.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BO0JN_rh.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-uhnNKle-.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-Bnn4SxyN.js} +2 -2
- package/dist/{Chargeback-C5c2ggX9.js → Chargeback-b5GjZ9Mb.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DbDKfWJX.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BviLk6nC.js} +1 -1
- package/dist/ExternalTerminal-DhoNW6qp.js +525 -0
- package/dist/{OnboardForm-CVuu8ixt.js → OnboardForm-Bq181JPX.js} +6 -6
- package/dist/{OnboardForm-COJfmIJt.js → OnboardForm-CtgycClY.js} +6 -6
- package/dist/{OnboardSubmission-Tl3HQgov.js → OnboardSubmission-D-0Sas7U.js} +6 -6
- package/dist/{OnboardSubmission-CuH1DxWt.js → OnboardSubmission-DXBjG3oR.js} +3 -3
- package/dist/{PayoutAccount-CmHNLOdq.js → PayoutAccount-D5giLt_J.js} +5 -5
- package/dist/{PayoutAccount-PXQSHup9.js → PayoutAccount-Ddpq-rZp.js} +7 -7
- package/dist/{PayoutAccountSetting-cV5Ts_Qq.js → PayoutAccountSetting-5ik0IR2I.js} +6 -6
- package/dist/{Restaurant-LzRSv42P.js → Restaurant-BG-2LYcJ.js} +4 -4
- package/dist/{RestaurantSetting-CsnW19gh.js → RestaurantSetting-CtnOR7kY.js} +3 -3
- package/dist/{Settlement-BycHPszE.js → Settlement-BzoTb2ks.js} +3 -3
- package/dist/{Settlement-eq9msmbN.js → Settlement-CfU_5sp-.js} +4 -4
- package/dist/{SettlementTransactions-BiDjpqc3.js → SettlementTransactions-CmX9LDuK.js} +5 -5
- package/dist/{SettlementTransactions-Ccm_gaYg.js → SettlementTransactions-Dh-erDBh.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-DuVSuCqQ.js → Status.vue_vue_type_script_setup_true_lang-D3dpjdxR.js} +1 -1
- package/dist/{Terminal-ZRi75g3B.js → Terminal-ZLduA0bd.js} +427 -403
- package/dist/{TerminalSetting-CpIOhxYF.js → TerminalSetting-CvaUOBlA.js} +5 -5
- package/dist/{Transaction-ClDKUNW6.js → Transaction-BeNRIA2R.js} +10 -10
- package/dist/{Transaction-Dfty1Pkq.js → Transaction-Bpc_LdWE.js} +11 -11
- package/dist/{TransactionOld-CkoAQGox.js → TransactionOld-SaMACUtQ.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-BU1aDd8a.js → TransactionStatus.vue_vue_type_script_setup_true_lang-CuBa_qMU.js} +1 -1
- package/dist/{app-BO87oXyA.js → app-Cq04HfHW.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/{assets-CEy6OF2t.js → assets-Cj91tAER.js} +1 -1
- package/dist/{grafana-BL6EdH24.js → grafana-CuJUDQ26.js} +1 -1
- package/dist/{index-CAd13T_z.js → index-BQijmIi-.js} +1 -1
- package/dist/{index-CGfEnp2P.js → index-BTMbNw68.js} +1 -1
- package/dist/{index-nn5zFo8I.js → index-C3dR6tpd.js} +1 -1
- package/dist/{index-CXpoEy-p.js → index-C4EENmPN.js} +1 -1
- package/dist/{index-zzOpgyK_.js → index-Cj7KUaM0.js} +1 -1
- package/dist/{index-By1YYoRG.js → index-DVC9y-6t.js} +1 -1
- package/dist/{index-NcS-Zyhu.js → index-DmC6nw2c.js} +1 -1
- package/dist/{index--870P92-.js → index-JV44EPG0.js} +2 -2
- package/dist/{index-DEPKBu9W.js → index-lfOPW24n.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DZQR-ukK.js → index.vue_vue_type_script_setup_true_lang-Cz6llWgj.js} +1 -1
- package/dist/{onboard-submission-29LM4jfB.js → onboard-submission-ChLJrEtc.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-HS9MHh85.js → payout-account-Db0R_Isi.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/external-terminal/{ExternalTerminalDialog.vue.d.ts → ExternalTerminalSideSheet.vue.d.ts} +23 -2
- package/dist/views/admin/terminal/{TerminalDialog.vue.d.ts → TerminalSideSheet.vue.d.ts} +23 -2
- package/package.json +1 -1
- package/dist/ExternalTerminal-Cd_azqjT.js +0 -502
|
@@ -30,7 +30,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
30
30
|
updatedAt: string;
|
|
31
31
|
}>;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
modelValue: {
|
|
34
|
+
type: PropType<boolean>;
|
|
35
|
+
};
|
|
36
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
"update:modelValue": (value: boolean) => any;
|
|
38
|
+
} & {
|
|
39
|
+
submit: (payload: {
|
|
40
|
+
restaurantId?: string | null | undefined;
|
|
41
|
+
type: "BEAM" | "BRI";
|
|
42
|
+
name: string;
|
|
43
|
+
}) => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
45
|
terminal: {
|
|
35
46
|
type: PropType<{
|
|
36
47
|
deletedAt?: string | null | undefined;
|
|
@@ -61,5 +72,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
61
72
|
updatedAt: string;
|
|
62
73
|
}>;
|
|
63
74
|
};
|
|
64
|
-
|
|
75
|
+
modelValue: {
|
|
76
|
+
type: PropType<boolean>;
|
|
77
|
+
};
|
|
78
|
+
}>> & Readonly<{
|
|
79
|
+
onSubmit?: ((payload: {
|
|
80
|
+
restaurantId?: string | null | undefined;
|
|
81
|
+
type: "BEAM" | "BRI";
|
|
82
|
+
name: string;
|
|
83
|
+
}) => any) | undefined;
|
|
84
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
85
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
65
86
|
export default _default;
|
|
@@ -80,7 +80,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
80
80
|
updatedAt: string;
|
|
81
81
|
}>;
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
modelValue: {
|
|
84
|
+
type: PropType<boolean>;
|
|
85
|
+
};
|
|
86
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
87
|
+
"update:modelValue": (value: boolean) => any;
|
|
88
|
+
} & {
|
|
89
|
+
submit: (payload: {
|
|
90
|
+
name: string;
|
|
91
|
+
referenceId: string;
|
|
92
|
+
status: "Active" | "Inactive";
|
|
93
|
+
}) => any;
|
|
94
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
84
95
|
terminal: {
|
|
85
96
|
type: PropType<{
|
|
86
97
|
name?: string | null | undefined;
|
|
@@ -161,5 +172,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
161
172
|
updatedAt: string;
|
|
162
173
|
}>;
|
|
163
174
|
};
|
|
164
|
-
|
|
175
|
+
modelValue: {
|
|
176
|
+
type: PropType<boolean>;
|
|
177
|
+
};
|
|
178
|
+
}>> & Readonly<{
|
|
179
|
+
onSubmit?: ((payload: {
|
|
180
|
+
name: string;
|
|
181
|
+
referenceId: string;
|
|
182
|
+
status: "Active" | "Inactive";
|
|
183
|
+
}) => any) | undefined;
|
|
184
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
185
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
165
186
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
import { defineComponent as E, resolveComponent as c, openBlock as _, createElementBlock as S, createVNode as p, normalizeClass as j, withCtx as k, createElementVNode as b, toDisplayString as q, createBlock as w, ref as f, unref as u, createCommentVNode as M, createTextVNode as A, computed as U, resolveDynamicComponent as z, normalizeProps as O, guardReactiveProps as Y, watch as H, isRef as L, h as R } from "vue";
|
|
2
|
-
import { h as Q } from "./moment-h96o7c8I.js";
|
|
3
|
-
import { useCoreStore as W } from "@feedmepos/mf-common";
|
|
4
|
-
import { u as G } from "./index-CAd13T_z.js";
|
|
5
|
-
import { _ as J } from "./index.vue_vue_type_script_setup_true_lang-DZQR-ukK.js";
|
|
6
|
-
import { _ as X } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
7
|
-
import { useSnackbar as K, useDialogChild as N, useDialog as Z } from "@feedmepos/ui-library";
|
|
8
|
-
import { g as B, b as P, a as ee, p as te } from "./index-zzOpgyK_.js";
|
|
9
|
-
import { c as ae } from "./clipboard-4jh1WteU.js";
|
|
10
|
-
import { z as h, a as D } from "./validator-CTlVogBQ.js";
|
|
11
|
-
import { _ as ne } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-uhnNKle-.js";
|
|
12
|
-
import { u as $ } from "./error-K1CakhA9.js";
|
|
13
|
-
import { w as re } from "./Modal-DB8M9o1T.js";
|
|
14
|
-
const V = {
|
|
15
|
-
async create(r) {
|
|
16
|
-
return B(
|
|
17
|
-
await P().post("/payments/external-terminals", r)
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
async read(r) {
|
|
21
|
-
return ee(
|
|
22
|
-
await P().get("/payments/external-terminals", {
|
|
23
|
-
params: { ...r }
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
async readById(r) {
|
|
28
|
-
return B(
|
|
29
|
-
await P().get(`/payments/external-terminals/${r}`)
|
|
30
|
-
);
|
|
31
|
-
},
|
|
32
|
-
async updateById(r, a) {
|
|
33
|
-
return B(
|
|
34
|
-
await P().put(
|
|
35
|
-
`/payments/external-terminals/${r}`,
|
|
36
|
-
a
|
|
37
|
-
)
|
|
38
|
-
);
|
|
39
|
-
},
|
|
40
|
-
async pair(r, a) {
|
|
41
|
-
return B(
|
|
42
|
-
await P().post(
|
|
43
|
-
`/payments/external-terminals/${r}/pair`,
|
|
44
|
-
a
|
|
45
|
-
)
|
|
46
|
-
);
|
|
47
|
-
},
|
|
48
|
-
async delete(r) {
|
|
49
|
-
return B(
|
|
50
|
-
await P().delete(`/payments/external-terminals/${r}`)
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
}, oe = /* @__PURE__ */ E({
|
|
54
|
-
__name: "ID",
|
|
55
|
-
props: {
|
|
56
|
-
row: {},
|
|
57
|
-
data: {}
|
|
58
|
-
},
|
|
59
|
-
setup(r) {
|
|
60
|
-
const a = r, o = K();
|
|
61
|
-
function i() {
|
|
62
|
-
return a.row.original.status === "READY" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-amber-400";
|
|
63
|
-
}
|
|
64
|
-
function l() {
|
|
65
|
-
try {
|
|
66
|
-
ae(a.data), o.open({ title: "Text copied to clipboard." }, 1e3);
|
|
67
|
-
} catch {
|
|
68
|
-
o.open({ title: "Clipboard API incompatible." }, 1e3);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return (n, t) => {
|
|
72
|
-
const d = c("FmBadge");
|
|
73
|
-
return _(), S("div", {
|
|
74
|
-
onClick: t[0] || (t[0] = (y) => {
|
|
75
|
-
y.stopPropagation(), l();
|
|
76
|
-
})
|
|
77
|
-
}, [
|
|
78
|
-
p(d, {
|
|
79
|
-
inline: "",
|
|
80
|
-
class: j(i())
|
|
81
|
-
}, {
|
|
82
|
-
default: k(() => [
|
|
83
|
-
b("div", null, q(r.data), 1)
|
|
84
|
-
]),
|
|
85
|
-
_: 1
|
|
86
|
-
}, 8, ["class"])
|
|
87
|
-
]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}), le = { class: "flex items-center justify-center" }, se = {
|
|
91
|
-
key: 1,
|
|
92
|
-
class: "t-caption text-fm-color-neutral-gray-500 whitespace-nowrap"
|
|
93
|
-
}, ie = /* @__PURE__ */ E({
|
|
94
|
-
__name: "Actions",
|
|
95
|
-
props: {
|
|
96
|
-
data: {}
|
|
97
|
-
},
|
|
98
|
-
emits: ["pair", "edit", "delete"],
|
|
99
|
-
setup(r, { emit: a }) {
|
|
100
|
-
const o = a;
|
|
101
|
-
return (i, l) => {
|
|
102
|
-
const n = c("FmButton");
|
|
103
|
-
return _(), S("div", le, [
|
|
104
|
-
r.data.status === "NEW" ? (_(), w(n, {
|
|
105
|
-
key: 0,
|
|
106
|
-
variant: "tertiary",
|
|
107
|
-
label: "Pair",
|
|
108
|
-
"prepend-icon": "link",
|
|
109
|
-
onClick: l[0] || (l[0] = (t) => {
|
|
110
|
-
t.stopPropagation(), o("pair");
|
|
111
|
-
})
|
|
112
|
-
})) : (_(), S("div", se, " Ready to use ")),
|
|
113
|
-
p(n, {
|
|
114
|
-
variant: "plain",
|
|
115
|
-
"prepend-icon": "edit",
|
|
116
|
-
onClick: l[1] || (l[1] = (t) => {
|
|
117
|
-
t.stopPropagation(), o("edit");
|
|
118
|
-
})
|
|
119
|
-
}),
|
|
120
|
-
p(n, {
|
|
121
|
-
variant: "plain",
|
|
122
|
-
"prepend-icon": "delete",
|
|
123
|
-
onClick: l[2] || (l[2] = (t) => {
|
|
124
|
-
t.stopPropagation(), o("delete");
|
|
125
|
-
})
|
|
126
|
-
})
|
|
127
|
-
]);
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}), me = /* @__PURE__ */ E({
|
|
131
|
-
__name: "ExternalTerminalDialog",
|
|
132
|
-
props: {
|
|
133
|
-
terminal: {
|
|
134
|
-
type: Object
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
setup(r) {
|
|
138
|
-
var x, g, I;
|
|
139
|
-
const a = r, o = N(), i = f(), l = f((x = a.terminal) == null ? void 0 : x.name), n = f(((g = a.terminal) == null ? void 0 : g.restaurantId) ?? ""), t = f((I = a.terminal) == null ? void 0 : I.type), d = te.FdoExternalTerminalProvider.options.map((v) => ({
|
|
140
|
-
label: v,
|
|
141
|
-
value: v
|
|
142
|
-
}));
|
|
143
|
-
function y() {
|
|
144
|
-
const v = {
|
|
145
|
-
name: l.value,
|
|
146
|
-
restaurantId: n.value || null
|
|
147
|
-
};
|
|
148
|
-
o.emitData(a.terminal ? v : { ...v, type: t.value }), o.emitAction("primary");
|
|
149
|
-
}
|
|
150
|
-
return (v, e) => {
|
|
151
|
-
const s = c("FmSelect"), m = c("FmTextField"), F = c("FmButton"), T = c("FmForm");
|
|
152
|
-
return _(), w(T, {
|
|
153
|
-
ref: i.value,
|
|
154
|
-
class: "flex flex-col gap-16 mb-6",
|
|
155
|
-
onValidationSuccess: y
|
|
156
|
-
}, {
|
|
157
|
-
default: k(() => [
|
|
158
|
-
a.terminal ? M("", !0) : (_(), w(s, {
|
|
159
|
-
key: 0,
|
|
160
|
-
modelValue: t.value,
|
|
161
|
-
"onUpdate:modelValue": e[0] || (e[0] = (C) => t.value = C),
|
|
162
|
-
label: "Provider",
|
|
163
|
-
items: u(d),
|
|
164
|
-
rules: u(h)(u(D).string().min(1, "Provider is required"))
|
|
165
|
-
}, null, 8, ["modelValue", "items", "rules"])),
|
|
166
|
-
p(ne, {
|
|
167
|
-
modelValue: n.value,
|
|
168
|
-
"onUpdate:modelValue": e[1] || (e[1] = (C) => n.value = C),
|
|
169
|
-
label: "Restaurant",
|
|
170
|
-
placeholder: "Unassigned",
|
|
171
|
-
"search-placeholder": "Search restaurants"
|
|
172
|
-
}, null, 8, ["modelValue"]),
|
|
173
|
-
p(m, {
|
|
174
|
-
modelValue: l.value,
|
|
175
|
-
"onUpdate:modelValue": e[2] || (e[2] = (C) => l.value = C),
|
|
176
|
-
label: "Terminal Name",
|
|
177
|
-
rules: u(h)(u(D).string().min(1))
|
|
178
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
179
|
-
p(F, {
|
|
180
|
-
type: "submit",
|
|
181
|
-
label: a.terminal ? "Update" : "Create"
|
|
182
|
-
}, null, 8, ["label"])
|
|
183
|
-
]),
|
|
184
|
-
_: 1
|
|
185
|
-
}, 512);
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
}), ue = { class: "t-caption" }, ce = /* @__PURE__ */ E({
|
|
189
|
-
__name: "BeamTerminal",
|
|
190
|
-
props: {
|
|
191
|
-
terminal: {
|
|
192
|
-
type: Object,
|
|
193
|
-
required: !0
|
|
194
|
-
},
|
|
195
|
-
onPair: {
|
|
196
|
-
type: Function,
|
|
197
|
-
required: !0
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
setup(r) {
|
|
201
|
-
const a = r, o = f(), i = f("");
|
|
202
|
-
return (l, n) => {
|
|
203
|
-
const t = c("FmTextField"), d = c("FmButton"), y = c("FmForm");
|
|
204
|
-
return _(), w(y, {
|
|
205
|
-
ref: o.value,
|
|
206
|
-
class: "flex flex-col gap-16 mb-6",
|
|
207
|
-
onValidationSuccess: n[1] || (n[1] = () => a.onPair({ type: "BEAM", pairCode: i.value }))
|
|
208
|
-
}, {
|
|
209
|
-
default: k(() => [
|
|
210
|
-
b("div", ue, [
|
|
211
|
-
n[2] || (n[2] = A(" Enter the pairing code shown on ", -1)),
|
|
212
|
-
b("b", null, q(a.terminal.name), 1),
|
|
213
|
-
n[3] || (n[3] = A(" to register it with Bolt Connect. ", -1))
|
|
214
|
-
]),
|
|
215
|
-
p(t, {
|
|
216
|
-
modelValue: i.value,
|
|
217
|
-
"onUpdate:modelValue": n[0] || (n[0] = (x) => i.value = x),
|
|
218
|
-
label: "Pair Code",
|
|
219
|
-
"label-mark": "required",
|
|
220
|
-
rules: u(h)(u(D).string().min(1, "Pair code is required"))
|
|
221
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
222
|
-
p(d, {
|
|
223
|
-
type: "submit",
|
|
224
|
-
label: "Pair"
|
|
225
|
-
})
|
|
226
|
-
]),
|
|
227
|
-
_: 1
|
|
228
|
-
}, 512);
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
}), pe = { class: "t-caption" }, de = /* @__PURE__ */ E({
|
|
232
|
-
__name: "BRITerminal",
|
|
233
|
-
props: {
|
|
234
|
-
terminal: {
|
|
235
|
-
type: Object,
|
|
236
|
-
required: !0
|
|
237
|
-
},
|
|
238
|
-
onPair: {
|
|
239
|
-
type: Function,
|
|
240
|
-
required: !0
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
setup(r) {
|
|
244
|
-
const a = r, o = f(), i = f(""), l = f("");
|
|
245
|
-
return (n, t) => {
|
|
246
|
-
const d = c("FmTextField"), y = c("FmButton"), x = c("FmForm");
|
|
247
|
-
return _(), w(x, {
|
|
248
|
-
ref: o.value,
|
|
249
|
-
class: "flex flex-col gap-16 mb-6",
|
|
250
|
-
onValidationSuccess: t[2] || (t[2] = () => a.onPair({ type: "BRI", pairCode: i.value, edcId: l.value }))
|
|
251
|
-
}, {
|
|
252
|
-
default: k(() => [
|
|
253
|
-
b("div", pe, [
|
|
254
|
-
t[3] || (t[3] = A(" Enter the pairing code and EDC ID shown on ", -1)),
|
|
255
|
-
b("b", null, q(a.terminal.name), 1),
|
|
256
|
-
t[4] || (t[4] = A(" to register it with BRI. ", -1))
|
|
257
|
-
]),
|
|
258
|
-
p(d, {
|
|
259
|
-
modelValue: i.value,
|
|
260
|
-
"onUpdate:modelValue": t[0] || (t[0] = (g) => i.value = g),
|
|
261
|
-
label: "Pair Code",
|
|
262
|
-
"label-mark": "required",
|
|
263
|
-
rules: u(h)(u(D).string().min(1, "Pair code is required"))
|
|
264
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
265
|
-
p(d, {
|
|
266
|
-
modelValue: l.value,
|
|
267
|
-
"onUpdate:modelValue": t[1] || (t[1] = (g) => l.value = g),
|
|
268
|
-
label: "EDC ID",
|
|
269
|
-
"label-mark": "required",
|
|
270
|
-
rules: u(h)(u(D).string().min(1, "EDC ID is required"))
|
|
271
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
272
|
-
p(y, {
|
|
273
|
-
type: "submit",
|
|
274
|
-
label: "Pair"
|
|
275
|
-
})
|
|
276
|
-
]),
|
|
277
|
-
_: 1
|
|
278
|
-
}, 512);
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
}), ye = /* @__PURE__ */ E({
|
|
282
|
-
__name: "ExternalTerminalPairDialog",
|
|
283
|
-
props: {
|
|
284
|
-
terminal: {
|
|
285
|
-
type: Object,
|
|
286
|
-
required: !0
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
setup(r) {
|
|
290
|
-
const a = r, o = N(), i = {
|
|
291
|
-
BEAM: ce,
|
|
292
|
-
BRI: de
|
|
293
|
-
}, l = U(() => i[a.terminal.type]);
|
|
294
|
-
function n(t) {
|
|
295
|
-
o.emitData(t), o.emitAction("primary");
|
|
296
|
-
}
|
|
297
|
-
return (t, d) => (_(), w(z(l.value), O(Y({
|
|
298
|
-
terminal: a.terminal,
|
|
299
|
-
onPair: n
|
|
300
|
-
})), null, 16));
|
|
301
|
-
}
|
|
302
|
-
}), fe = { class: "flex justify-between mb-6 items-center" }, _e = { class: "flex space-x-4" }, xe = { class: "flex space-x-4" }, ke = /* @__PURE__ */ E({
|
|
303
|
-
__name: "ExternalTerminal",
|
|
304
|
-
setup(r) {
|
|
305
|
-
const a = f(), { searchKey: o } = G({
|
|
306
|
-
searchKey: ""
|
|
307
|
-
});
|
|
308
|
-
let i;
|
|
309
|
-
H(o, async () => {
|
|
310
|
-
i && clearTimeout(i), i = setTimeout(
|
|
311
|
-
() => {
|
|
312
|
-
var e;
|
|
313
|
-
return (e = a.value) == null ? void 0 : e.reset();
|
|
314
|
-
},
|
|
315
|
-
700
|
|
316
|
-
);
|
|
317
|
-
});
|
|
318
|
-
const l = W(), n = Z(), t = K(), d = U(() => new Map(
|
|
319
|
-
l.restaurants.value.map((e) => [e._id, e.profile.name])
|
|
320
|
-
));
|
|
321
|
-
async function y(e) {
|
|
322
|
-
n.open({
|
|
323
|
-
title: e ? "Update External Terminal" : "Create New External Terminal",
|
|
324
|
-
closeButton: !0,
|
|
325
|
-
overlay: !0,
|
|
326
|
-
contentComponent: me,
|
|
327
|
-
contentComponentProps: { terminal: e }
|
|
328
|
-
}).onPrimary(async (s) => {
|
|
329
|
-
var m;
|
|
330
|
-
n.close();
|
|
331
|
-
try {
|
|
332
|
-
await (e ? V.updateById(e._id, s) : V.create(s)), (m = a.value) == null || m.reset(), t.open({
|
|
333
|
-
type: "success",
|
|
334
|
-
message: e ? "External terminal updated successfully." : "External terminal created successfully."
|
|
335
|
-
});
|
|
336
|
-
} catch (F) {
|
|
337
|
-
t.open({
|
|
338
|
-
type: "error",
|
|
339
|
-
title: e ? "Error occurs when update external terminal" : "Error occurs when create external terminal",
|
|
340
|
-
message: $(F)
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
async function x(e) {
|
|
346
|
-
n.open({
|
|
347
|
-
title: "Pair External Terminal",
|
|
348
|
-
closeButton: !0,
|
|
349
|
-
overlay: !0,
|
|
350
|
-
contentComponent: ye,
|
|
351
|
-
contentComponentProps: { terminal: e }
|
|
352
|
-
}).onPrimary(async (s) => {
|
|
353
|
-
var m;
|
|
354
|
-
n.close();
|
|
355
|
-
try {
|
|
356
|
-
await V.pair(e._id, s), (m = a.value) == null || m.reset(), t.open({
|
|
357
|
-
type: "success",
|
|
358
|
-
message: "External terminal paired successfully."
|
|
359
|
-
});
|
|
360
|
-
} catch (F) {
|
|
361
|
-
t.open({
|
|
362
|
-
type: "error",
|
|
363
|
-
title: "Error occurs when pair external terminal",
|
|
364
|
-
message: $(F)
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
async function g(e) {
|
|
370
|
-
re(
|
|
371
|
-
n,
|
|
372
|
-
"Delete External Terminal",
|
|
373
|
-
"Are you sure to delete this external terminal? This action cannot be revert!",
|
|
374
|
-
async () => {
|
|
375
|
-
var s;
|
|
376
|
-
try {
|
|
377
|
-
await V.delete(e), (s = a.value) == null || s.reset(), t.open({
|
|
378
|
-
type: "success",
|
|
379
|
-
message: "External terminal deleted successfully."
|
|
380
|
-
});
|
|
381
|
-
} catch (m) {
|
|
382
|
-
t.open({
|
|
383
|
-
type: "error",
|
|
384
|
-
title: "Error occurs when delete external terminal",
|
|
385
|
-
message: $(m)
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
);
|
|
390
|
-
}
|
|
391
|
-
const I = function(e) {
|
|
392
|
-
return {
|
|
393
|
-
id: e._id,
|
|
394
|
-
status: e.status,
|
|
395
|
-
name: e.name,
|
|
396
|
-
type: e.type,
|
|
397
|
-
restaurant: e.restaurantId ? d.value.get(e.restaurantId) ?? e.restaurantId : "-",
|
|
398
|
-
updatedAt: Q(e.updatedAt).format("YYYY-MM-DD HH:mm:ss")
|
|
399
|
-
};
|
|
400
|
-
}, v = [
|
|
401
|
-
{
|
|
402
|
-
accessorKey: "id",
|
|
403
|
-
header: () => "Terminal ID",
|
|
404
|
-
meta: {
|
|
405
|
-
textAlign: "right"
|
|
406
|
-
},
|
|
407
|
-
cell: ({ cell: e, row: s }) => R(oe, { row: s, data: e.getValue() })
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
accessorKey: "name",
|
|
411
|
-
header: () => "Name",
|
|
412
|
-
meta: {
|
|
413
|
-
textAlign: "left"
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
accessorKey: "type",
|
|
418
|
-
header: () => "Provider",
|
|
419
|
-
meta: {
|
|
420
|
-
textAlign: "left"
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
accessorKey: "restaurant",
|
|
425
|
-
header: () => "Restaurant",
|
|
426
|
-
meta: {
|
|
427
|
-
textAlign: "left"
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
accessorKey: "status",
|
|
432
|
-
header: () => "Status",
|
|
433
|
-
meta: {
|
|
434
|
-
textAlign: "left"
|
|
435
|
-
}
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
accessorKey: "updatedAt",
|
|
439
|
-
header: () => "Last Updated",
|
|
440
|
-
meta: {
|
|
441
|
-
textAlign: "left"
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
accessorKey: "id",
|
|
446
|
-
header: () => "Actions",
|
|
447
|
-
meta: {
|
|
448
|
-
textAlign: "center"
|
|
449
|
-
},
|
|
450
|
-
cell: ({ row: e }) => {
|
|
451
|
-
var m;
|
|
452
|
-
const s = (m = a.value) == null ? void 0 : m.pageData().at(e.index);
|
|
453
|
-
return R(ie, {
|
|
454
|
-
data: s,
|
|
455
|
-
onPair: () => x(s),
|
|
456
|
-
onEdit: () => y(s),
|
|
457
|
-
onDelete: () => g(s._id)
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
];
|
|
462
|
-
return (e, s) => {
|
|
463
|
-
const m = c("FmSearch"), F = c("FmButton");
|
|
464
|
-
return _(), w(X, {
|
|
465
|
-
title: "External Terminals",
|
|
466
|
-
loading: !1
|
|
467
|
-
}, {
|
|
468
|
-
default: k(() => [
|
|
469
|
-
b("div", fe, [
|
|
470
|
-
b("div", _e, [
|
|
471
|
-
p(m, {
|
|
472
|
-
"model-value": u(o),
|
|
473
|
-
"onUpdate:modelValue": s[0] || (s[0] = (T) => L(o) ? o.value = T : null),
|
|
474
|
-
class: "mr-8",
|
|
475
|
-
label: "Search",
|
|
476
|
-
placeholder: "Search ..."
|
|
477
|
-
}, null, 8, ["model-value"])
|
|
478
|
-
]),
|
|
479
|
-
b("div", xe, [
|
|
480
|
-
p(F, {
|
|
481
|
-
label: "Create",
|
|
482
|
-
icon: "add",
|
|
483
|
-
onClick: s[1] || (s[1] = () => y())
|
|
484
|
-
})
|
|
485
|
-
])
|
|
486
|
-
]),
|
|
487
|
-
p(J, {
|
|
488
|
-
ref_key: "controller",
|
|
489
|
-
ref: a,
|
|
490
|
-
"column-defs": v,
|
|
491
|
-
"rows-defs": I,
|
|
492
|
-
paginate: (T, C) => u(V).read({ searchKey: u(o), limit: T, cursor: C })
|
|
493
|
-
}, null, 8, ["paginate"])
|
|
494
|
-
]),
|
|
495
|
-
_: 1
|
|
496
|
-
});
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
export {
|
|
501
|
-
ke as default
|
|
502
|
-
};
|