@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,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, resolveComponent as o, openBlock as a, createBlock as s, withCtx as r, createElementVNode as d, unref as p, computed as g, createElementBlock as u, createVNode as m, Fragment as w, renderList as h } from "vue";
|
|
2
|
-
import { g as y, a as F } from "./assets-
|
|
2
|
+
import { g as y, a as F } from "./assets-DWbWwPAa.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
const k = ["src"], M = /* @__PURE__ */ i({
|
|
5
5
|
__name: "Gateway",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as T, useModel as U, ref as w, watch as j, computed as l, resolveComponent as i, openBlock as o, createBlock as c, withCtx as b, createVNode as g, createElementVNode as d, unref as _, createElementBlock as M, Fragment as Q, renderList as R, toDisplayString as I, createCommentVNode as H, withModifiers as J, mergeModels as X } from "vue";
|
|
2
|
-
import { g as Y, b as L } from "./index-
|
|
2
|
+
import { g as Y, b as L } from "./index-DaezWdx_.js";
|
|
3
3
|
import { useI18n as Z } from "@feedmepos/mf-common";
|
|
4
|
-
import { k as ee } from "./app-
|
|
5
|
-
import { u as f } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { k as ee } from "./app-T0cIjhsU.js";
|
|
5
|
+
import { u as f } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BXii3Sj9.js";
|
|
6
6
|
const k = {
|
|
7
7
|
async readBusinessesWithPagination(n) {
|
|
8
8
|
return (await L().get("/payments/businesses", {
|
|
@@ -4,9 +4,9 @@ var Se = (i) => {
|
|
|
4
4
|
var le = (i, e, t) => e.has(i) || Se("Cannot " + t);
|
|
5
5
|
var s = (i, e, t) => (le(i, e, "read from private field"), t ? t.call(i) : e.get(i)), m = (i, e, t) => e.has(i) ? Se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), d = (i, e, t, n) => (le(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), f = (i, e, t) => (le(i, e, "access private method"), t);
|
|
6
6
|
import { hasInjectionContext as Ve, inject as je, getCurrentScope as ze, computed as _, shallowReactive as Ae, reactive as Be, watch as $, onScopeDispose as Ne, shallowReadonly as We, readonly as Ke, toRefs as $e, defineComponent as Ge, useModel as He, toRef as qe, ref as Fe, resolveComponent as K, openBlock as V, createBlock as Y, withCtx as ue, createVNode as ce, createElementVNode as re, unref as he, createElementBlock as Ie, Fragment as Je, renderList as Xe, toDisplayString as _e, createCommentVNode as Ye, withModifiers as Ze, mergeModels as et } from "vue";
|
|
7
|
-
import { r as de } from "./index-
|
|
7
|
+
import { r as de } from "./index-0Es_nzAi.js";
|
|
8
8
|
import { useI18n as tt } from "@feedmepos/mf-common";
|
|
9
|
-
import { S as st, p as ke, r as S, s as pe, a as ee, n as it, e as xe, i as Ee, t as nt, b as oe, f as at, c as rt, d as Qe, g as ot, j as lt, l as ut, u as De, m as Me, k as ct } from "./app-
|
|
9
|
+
import { S as st, p as ke, r as S, s as pe, a as ee, n as it, e as xe, i as Ee, t as nt, b as oe, f as at, c as rt, d as Qe, g as ot, j as lt, l as ut, u as De, m as Me, k as ct } from "./app-T0cIjhsU.js";
|
|
10
10
|
var R, o, te, y, j, G, Q, P, se, H, q, z, A, T, J, u, Z, me, ve, be, ye, ge, Re, Ce, Ue, Le, ht = (Le = class extends st {
|
|
11
11
|
constructor(e, t) {
|
|
12
12
|
super();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as D, ref as C, resolveComponent as i, openBlock as k, createBlock as $, withCtx as v, createVNode as s, unref as b, createElementVNode as y, createElementBlock as Y, Fragment as B, renderList as K, watch as M, isRef as T, h as V } from "vue";
|
|
2
|
-
import { t as S } from "./index-
|
|
2
|
+
import { t as S } from "./index-1gifEl8O.js";
|
|
3
3
|
import { h as f } from "./moment-h96o7c8I.js";
|
|
4
|
-
import "./index-
|
|
4
|
+
import "./index-DaezWdx_.js";
|
|
5
5
|
import { d as A } from "./dinero-CIVmXLL-.js";
|
|
6
|
-
import { u as P } from "./index-
|
|
6
|
+
import { u as P } from "./index-BrvdMIgA.js";
|
|
7
7
|
import { _ as q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
8
8
|
import { _ as O } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
9
|
import { useDialogChild as U, useSnackbar as N, useDialog as x } from "@feedmepos/ui-library";
|
|
10
10
|
import { _ as E } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
|
|
11
|
-
import { _ as j } from "./index.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { _ as j } from "./index.vue_vue_type_script_setup_true_lang-BNtg9OkS.js";
|
|
12
12
|
import { _ as w } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
|
|
13
|
-
import { _ as z } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-
|
|
13
|
+
import { _ as z } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BXii3Sj9.js";
|
|
14
14
|
import { z as F, a as I, s as G } from "./validator-CTlVogBQ.js";
|
|
15
15
|
import { u as R } from "./error-K1CakhA9.js";
|
|
16
16
|
function H(a) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as bR, shallowRef as cV, ref as MZ, toRef as Wm, computed as EZ, watch as AQ, onBeforeUnmount as uh, openBlock as Ll, createElementBlock as Kl, Fragment as am, renderList as sm, renderSlot as ma, createElementVNode as KU, normalizeStyle as nm, createCommentVNode as ac, watchEffect as Vm, toValue as kR, resolveComponent as WV, createVNode as $F, unref as fV, toDisplayString as zR, createBlock as LR } from "vue";
|
|
2
|
-
import { d as IR } from "./index-
|
|
2
|
+
import { d as IR } from "./index-CcpABxWD.js";
|
|
3
3
|
import { _ as Qm } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const im = "data:image/svg+xml,%3csvg%20width='858'%20height='376'%20viewBox='0%200%20858%20376'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1132_89720)'%3e%3cpath%20d='M440%20505.86C651.525%20505.86%20823%20437.839%20823%20353.93C823%20270.021%20651.525%20202%20440%20202C228.475%20202%2057%20270.021%2057%20353.93C57%20437.839%20228.475%20505.86%20440%20505.86Z'%20fill='url(%23paint0_linear_1132_89720)'%20fill-opacity='0.5'/%3e%3cg%20clip-path='url(%23clip1_1132_89720)'%3e%3cpath%20d='M331.443%20106.351C343.852%2058.097%20379.776%2037.6206%20397.221%2030.2477C402.417%2028.0519%20407.88%2026.5702%20413.469%2025.749L424.914%2024.0709C430.503%2023.2497%20436.163%2023.1069%20441.769%2023.7138C460.588%2025.749%20500.887%2035.0321%20526.652%2077.6808C561.416%20135.2%20586.627%20250.954%20457.589%20272.322V272.376C456.91%20272.483%20456.25%20272.555%20455.589%20272.644C454.928%20272.751%20454.268%20272.858%20453.589%20272.965V272.912C323.854%20289.55%20314.695%20171.458%20331.443%20106.351Z'%20fill='%23D6D6D6'/%3e%3cpath%20d='M429.807%20275.839C396.221%20275.839%20370.046%20265.414%20351.762%20244.705C319.016%20207.644%20319.641%20146.84%20330.14%20106.03C342.406%2058.3112%20377.099%2037.2993%20396.686%2029.0337C401.899%2026.8379%20407.47%2025.2848%20413.273%2024.4457L424.718%2022.7676C430.521%2021.9107%20436.306%2021.7858%20441.912%2022.3928C463.053%2024.6778%20502.316%2034.8178%20527.795%2076.9845C549.596%20113.046%20567.701%20171.119%20547.007%20216.035C532.973%20246.508%20503.387%20265.824%20459.089%20273.429V273.465L457.786%20273.715C457.375%20273.768%20456.982%20273.822%20456.589%20273.876L454.982%20274.108C454.59%20274.179%20454.197%20274.233%20453.786%20274.304L452.447%20274.5L452.429%20274.411C444.573%20275.357%20437.02%20275.839%20429.807%20275.839ZM332.747%20106.69C322.408%20146.876%20321.712%20206.662%20353.762%20242.956C375.563%20267.645%20409.095%20277.285%20453.429%20271.591L454.75%20271.43V271.448L456.268%20271.233C456.375%20271.216%20456.5%20271.198%20456.607%20271.198L457.375%20271.037C501.477%20263.736%20530.813%20244.866%20544.597%20214.946C564.845%20170.976%20546.972%20113.921%20525.528%2078.3949C500.638%2037.1743%20462.285%2027.2842%20441.645%2025.0349C436.252%2024.4457%20430.699%2024.5707%20425.129%2025.3919L413.684%2027.07C408.113%2027.8912%20402.756%2029.3729%20397.757%2031.4795C378.598%2039.5665%20344.727%2060.0964%20332.747%20106.69Z'%20fill='%23D6D6D6'/%3e%3cpath%20d='M360.457%20129.166L360.493%20111.814C362.475%2083.3041%20397.685%2072.0216%20409.041%2068.3083C417.504%2065.5413%20428.467%2063.6489%20432.359%2063.042V63.0241C432.359%2063.0241%20432.609%2062.9884%20433.074%2062.917C433.538%2062.8456%20433.788%2062.8099%20433.788%2062.8099V62.8277C437.68%2062.31%20448.732%2060.9533%20457.642%2061.1675C469.569%2061.471%20506.547%2062.1315%20516.653%2088.874L521.67%20105.476C527.045%20124.114%20518.974%20141.324%20501.566%20143.876L390.757%20160.175C373.348%20162.728%20360.671%20148.571%20360.457%20129.166Z'%20fill='white'/%3e%3cpath%20d='M490.656%20119.473C482.675%20120.651%20473.997%20114.76%20473.158%20106.458C472.319%2098.1393%20477.622%2090.213%20486.175%2088.9633C494.156%2087.7851%20502.833%2093.6763%20503.673%20101.978C504.512%20110.297%20499.209%20118.223%20490.656%20119.473Z'%20fill='%23A7A9AC'/%3e%3cpath%20d='M488.585%20120.972C484.836%20120.972%20481.068%20119.651%20477.944%20117.223C474.426%20114.474%20472.248%20110.707%20471.837%20106.601C470.891%2097.2824%20477.105%2088.9455%20485.996%2087.6423C490.442%2086.9818%20495.156%2088.285%20498.923%2091.2306C502.441%2093.9798%20504.619%2097.7466%20505.03%20101.853C505.976%20111.171%20499.763%20119.508%20490.871%20120.812C490.103%20120.919%20489.335%20120.972%20488.585%20120.972ZM488.21%2090.1594C487.586%2090.1594%20486.978%2090.1952%20486.371%2090.2844C478.908%2091.3734%20473.694%2098.425%20474.498%20106.316C474.837%20109.69%20476.64%20112.796%20479.586%20115.099C482.729%20117.545%20486.8%20118.687%20490.478%20118.152C497.941%20117.063%20503.155%20110.011%20502.352%20102.12C502.012%2098.7463%20500.209%2095.6222%20497.263%2093.3371C494.62%2091.2841%20491.353%2090.1594%20488.21%2090.1594Z'%20fill='%23A7A9AC'/%3e%3cpath%20d='M411.309%20131.13C403.327%20132.308%20394.65%20126.417%20393.811%20118.116C392.971%20109.797%20398.274%20101.87%20406.827%20100.621C414.808%2099.4426%20423.486%20105.334%20424.325%20113.635C425.182%20121.954%20419.861%20129.88%20411.309%20131.13Z'%20fill='%23A7A9AC'/%3e%3cpath%20d='M409.238%20132.63C405.488%20132.63%20401.721%20131.309%20398.596%20128.881C395.079%20126.131%20392.9%20122.365%20392.49%20118.259C391.543%20108.94%20397.757%20100.603%20406.649%2099.2997C411.095%2098.6392%20415.808%2099.9603%20419.576%20102.888C423.093%20105.637%20425.272%20109.404%20425.682%20113.51C426.629%20122.829%20420.415%20131.166%20411.523%20132.469C410.755%20132.576%20409.988%20132.63%20409.238%20132.63ZM408.863%20101.817C408.238%20101.817%20407.631%20101.853%20407.024%20101.942C399.56%20103.031%20394.347%20110.082%20395.15%20117.973C395.489%20121.347%20397.293%20124.453%20400.239%20126.756C403.381%20129.202%20407.452%20130.345%20411.13%20129.809C418.594%20128.72%20423.807%20121.668%20423.004%20113.778C422.665%20110.404%20420.861%20107.28%20417.915%20104.995C415.291%20102.942%20412.005%20101.817%20408.863%20101.817Z'%20fill='%23A7A9AC'/%3e%3cpath%20d='M567.791%20147.286C576.968%20161.747%20586.699%20171.994%20597.698%20165.031C608.679%20158.069%20610.161%20140.699%20600.983%20126.239C591.806%20111.778%20575.468%20105.709%20564.47%20112.671C553.471%20119.633%20558.613%20132.826%20567.791%20147.286Z'%20fill='%23D6D6D6'/%3e%3cpath%20d='M317.962%20176.582C318.141%20176.546%20318.319%20176.546%20318.498%20176.51C318.569%20177.242%20318.623%20177.992%20318.712%20178.724C320.962%20200.039%20326.747%20219.07%20335.674%20234.905C334.121%20236.101%20332.193%20236.975%20329.836%20237.44C317.069%20239.921%20304.053%20228.317%20300.786%20211.518C297.518%20194.719%20305.178%20179.081%20317.962%20176.582Z'%20fill='%23D6D6D6'/%3e%3cpath%20d='M547.167%20216.088C549.917%20210.143%20552.006%20203.734%20553.506%20196.969C550.417%20185.579%20546.542%20174.671%20541.686%20165.852C539.775%20162.371%20535.883%20160.479%20531.955%20161.032L526.045%20161.871C519.849%20162.746%20516.153%20169.226%20518.546%20175.028C520.01%20178.599%20521.224%20180.241%20522.17%20183.454C523.831%20189.096%20520.081%20194.88%20514.243%20195.665L413.415%20209.179C408.059%20209.893%20403.095%20206.073%20402.559%20200.682C402.059%20195.737%20401.309%20192.88%20400.595%20188.953C399.685%20183.883%20394.917%20180.455%20389.829%20181.187L375.116%20183.276C369.902%20184.008%20366.242%20188.828%20366.974%20194.041C368.849%20207.751%20371.241%20234.101%20366.188%20256.952C366.117%20257.255%20366.099%20257.559%20366.063%20257.862C382.865%20269.93%20404.184%20276.018%20429.824%20276.018C437.002%20276.018%20444.501%20275.536%20452.339%20274.59L452.357%20274.679L453.857%20274.465C454.268%20274.411%20454.66%20274.34%20455.071%20274.268L456.678%20274.036C457.071%20273.983%20457.464%20273.929%20457.856%20273.875L459.32%20273.608V273.572C503.565%20265.913%20533.133%20246.58%20547.167%20216.088Z'%20fill='white'/%3e%3cpath%20d='M476.069%20249.668C484.727%20249.668%20491.746%20242.651%20491.746%20233.994C491.746%20225.337%20484.727%20218.32%20476.069%20218.32C467.411%20218.32%20460.393%20225.337%20460.393%20233.994C460.393%20242.651%20467.411%20249.668%20476.069%20249.668Z'%20fill='white'/%3e%3cpath%20d='M484.854%20240.617C485.032%20242.135%20485.318%20244.562%20485.55%20246.473C489.978%20243.116%20492.478%20237.511%20491.603%20231.62C490.443%20223.836%20483.765%20218.248%20476.141%20218.213C476.158%20218.552%20476.176%20218.855%20476.176%20218.909C476.212%20219.712%20476.248%20220.498%20476.266%20221.301C476.337%20223.497%20477.176%20224.657%20479.23%20225.461C479.783%20225.675%20480.337%20225.961%20480.836%20226.3C482.604%20227.496%20483.425%20229.263%20483.729%20231.298C483.997%20233.083%20484.175%20234.887%20484.39%20236.69C484.568%20238.011%20484.693%20239.314%20484.854%20240.617Z'%20fill='%23A7A9AC'/%3e%3cpath%20d='M460.499%20236.261C461.356%20242.045%20465.266%20246.615%20470.355%20248.597C470.319%20248.365%20470.302%20248.204%20470.284%20248.186C470.07%20246.812%20469.855%20245.437%20469.623%20244.063C469.016%20240.331%20468.373%20236.6%20467.802%20232.851C467.481%20230.816%20468.07%20229.031%20469.552%20227.567C470.105%20227.014%20470.694%20226.496%20471.248%20225.925C472.194%20224.961%20472.48%20223.854%20472.105%20222.497C471.623%20220.569%20471.784%20221.212%20471.623%20220.569C471.551%20220.284%20471.355%20219.569%20471.212%20218.962C464.017%20221.301%20459.356%20228.549%20460.499%20236.261Z'%20fill='%23A7A9AC'/%3e%3cpath%20d='M480.925%20235.797C480.89%20235.511%20480.818%20235.208%20480.729%20234.922C480.515%20234.19%20479.783%20233.762%20479.051%20233.94C478.336%20234.101%20477.872%20234.797%20477.979%20235.547C478.604%20239.725%20479.372%20244.919%20480.015%20249.168C480.979%20248.918%20481.907%20248.579%20482.782%20248.169C482.229%20244.473%20481.443%20239.225%20480.925%20235.797Z'%20fill='%23A7A9AC'/%3e%3cpath%20d='M472.855%20234.976C471.98%20235.261%20471.623%20235.833%20471.766%20236.779C472.266%20240.224%20473.069%20245.598%20473.641%20249.472C474.587%20249.615%20475.569%20249.686%20476.551%20249.65C476.373%20248.258%20476.087%20246.258%20475.944%20245.259C475.498%20242.152%20475.033%20239.046%20474.569%20235.958C474.444%20235.226%20473.587%20234.744%20472.855%20234.976Z'%20fill='%23A7A9AC'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_1132_89720'%20x1='440.003'%20y1='133.148'%20x2='440.003'%20y2='371.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A5A5A5'/%3e%3cstop%20offset='0.4764'%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_1132_89720'%3e%3crect%20width='858'%20height='376'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_1132_89720'%3e%3crect%20width='307'%20height='254'%20fill='white'%20transform='translate(300%2022)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
5
5
|
var Rm = Object.defineProperty, Yh = (U) => {
|
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
import { defineComponent as E, openBlock as g, createElementBlock as O, toDisplayString as Y, resolveComponent as p, createBlock as V, withCtx as D, createElementVNode as w, unref as u, computed as S, normalizeClass as Z, createVNode as d, createCommentVNode as M, ref as c, Fragment as ee, useModel as te, watch as L, resolveDynamicComponent as W, mergeModels as H, createTextVNode as N, normalizeProps as ae, guardReactiveProps as re, isRef as ne, h as q } 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-BrvdMIgA.js";
|
|
5
|
+
import { _ as ie } from "./index.vue_vue_type_script_setup_true_lang-BNtg9OkS.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 R } from "./index-CGEfX9IT.js";
|
|
9
|
+
import { c as de } from "./clipboard-4jh1WteU.js";
|
|
10
|
+
import { g as ce } from "./assets-DWbWwPAa.js";
|
|
11
|
+
import { z as T, a as C } from "./validator-CTlVogBQ.js";
|
|
12
|
+
import { _ as pe } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BXii3Sj9.js";
|
|
13
|
+
import { e as j, p as ve } from "./index-DaezWdx_.js";
|
|
14
|
+
import { u as z } from "./error-K1CakhA9.js";
|
|
15
|
+
import { w as fe } from "./Modal-DB8M9o1T.js";
|
|
16
|
+
const ye = /* @__PURE__ */ E({
|
|
17
|
+
__name: "ID",
|
|
18
|
+
props: {
|
|
19
|
+
data: {}
|
|
20
|
+
},
|
|
21
|
+
setup(i) {
|
|
22
|
+
const o = i, n = Q();
|
|
23
|
+
function t() {
|
|
24
|
+
try {
|
|
25
|
+
de(o.data), n.open({ title: "Text copied to clipboard." }, 1e3);
|
|
26
|
+
} catch {
|
|
27
|
+
n.open({ title: "Clipboard API incompatible." }, 1e3);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return (s, r) => (g(), O("div", {
|
|
31
|
+
onClick: r[0] || (r[0] = (a) => {
|
|
32
|
+
a.stopPropagation(), t();
|
|
33
|
+
})
|
|
34
|
+
}, Y(i.data), 1));
|
|
35
|
+
}
|
|
36
|
+
}), _e = ["src"], xe = /* @__PURE__ */ E({
|
|
37
|
+
__name: "Provider",
|
|
38
|
+
props: {
|
|
39
|
+
row: {},
|
|
40
|
+
data: {}
|
|
41
|
+
},
|
|
42
|
+
setup(i) {
|
|
43
|
+
return (o, n) => {
|
|
44
|
+
const t = p("FmTooltip");
|
|
45
|
+
return g(), V(t, {
|
|
46
|
+
variant: "plain",
|
|
47
|
+
placement: "top",
|
|
48
|
+
content: i.data ?? i.row.original.type,
|
|
49
|
+
"hide-arrow": !0
|
|
50
|
+
}, {
|
|
51
|
+
default: D(() => [
|
|
52
|
+
w("img", {
|
|
53
|
+
class: "rounded-md border-transparent w-[32px] h-[32px]",
|
|
54
|
+
src: u(ce)(i.data ?? i.row.original.type)
|
|
55
|
+
}, null, 8, _e)
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
}, 8, ["content"]);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}), ge = { class: "flex items-center gap-2" }, Fe = /* @__PURE__ */ E({
|
|
62
|
+
__name: "Status",
|
|
63
|
+
props: {
|
|
64
|
+
data: {}
|
|
65
|
+
},
|
|
66
|
+
setup(i) {
|
|
67
|
+
const o = i, n = S(
|
|
68
|
+
() => o.data === "READY" ? "bg-green-400" : "bg-amber-400"
|
|
69
|
+
);
|
|
70
|
+
return (t, s) => (g(), O("div", ge, [
|
|
71
|
+
w("div", {
|
|
72
|
+
class: Z(["w-[8px] h-[8px] rounded-full shrink-0", n.value])
|
|
73
|
+
}, null, 2),
|
|
74
|
+
w("div", null, Y(i.data), 1)
|
|
75
|
+
]));
|
|
76
|
+
}
|
|
77
|
+
}), be = { class: "flex items-center justify-center" }, Ve = /* @__PURE__ */ E({
|
|
78
|
+
__name: "Actions",
|
|
79
|
+
props: {
|
|
80
|
+
data: {}
|
|
81
|
+
},
|
|
82
|
+
emits: ["pair", "edit", "delete"],
|
|
83
|
+
setup(i, { emit: o }) {
|
|
84
|
+
const n = o;
|
|
85
|
+
return (t, s) => {
|
|
86
|
+
const r = p("FmButton"), a = p("FmTooltip");
|
|
87
|
+
return g(), O("div", be, [
|
|
88
|
+
i.data.status === "NEW" ? (g(), V(a, {
|
|
89
|
+
key: 0,
|
|
90
|
+
variant: "plain",
|
|
91
|
+
placement: "top",
|
|
92
|
+
content: "Pair",
|
|
93
|
+
"hide-arrow": !0
|
|
94
|
+
}, {
|
|
95
|
+
default: D(() => [
|
|
96
|
+
d(r, {
|
|
97
|
+
variant: "plain",
|
|
98
|
+
"prepend-icon": "link",
|
|
99
|
+
onClick: s[0] || (s[0] = (m) => {
|
|
100
|
+
m.stopPropagation(), n("pair");
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
})) : M("", !0),
|
|
106
|
+
d(r, {
|
|
107
|
+
variant: "plain",
|
|
108
|
+
"prepend-icon": "edit",
|
|
109
|
+
onClick: s[1] || (s[1] = (m) => {
|
|
110
|
+
m.stopPropagation(), n("edit");
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
d(r, {
|
|
114
|
+
variant: "plain",
|
|
115
|
+
"prepend-icon": "delete",
|
|
116
|
+
onClick: s[2] || (s[2] = (m) => {
|
|
117
|
+
m.stopPropagation(), n("delete");
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
]);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}), Te = /* @__PURE__ */ E({
|
|
124
|
+
__name: "BRITerminal",
|
|
125
|
+
props: {
|
|
126
|
+
initial: {
|
|
127
|
+
type: Object
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
setup(i, { expose: o }) {
|
|
131
|
+
var m, f, _, x;
|
|
132
|
+
const n = i, t = c(((m = n.initial) == null ? void 0 : m.wsUrl) ?? ""), s = c(((f = n.initial) == null ? void 0 : f.mid) ?? ""), r = c(((_ = n.initial) == null ? void 0 : _.apiKey) ?? ""), a = c(((x = n.initial) == null ? void 0 : x.privateKey) ?? "");
|
|
133
|
+
return o({
|
|
134
|
+
values: () => ({
|
|
135
|
+
wsUrl: t.value,
|
|
136
|
+
mid: s.value,
|
|
137
|
+
apiKey: r.value,
|
|
138
|
+
privateKey: a.value
|
|
139
|
+
})
|
|
140
|
+
}), (I, b) => {
|
|
141
|
+
const P = p("FmTextField"), h = p("FmTextarea");
|
|
142
|
+
return g(), O(ee, null, [
|
|
143
|
+
d(P, {
|
|
144
|
+
modelValue: t.value,
|
|
145
|
+
"onUpdate:modelValue": b[0] || (b[0] = (e) => t.value = e),
|
|
146
|
+
label: "PVS WebSocket URL",
|
|
147
|
+
placeholder: "wss://...",
|
|
148
|
+
rules: u(T)(u(C).string().min(1, "WebSocket URL is required"))
|
|
149
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
150
|
+
d(P, {
|
|
151
|
+
modelValue: s.value,
|
|
152
|
+
"onUpdate:modelValue": b[1] || (b[1] = (e) => s.value = e),
|
|
153
|
+
label: "Merchant ID (MID)",
|
|
154
|
+
rules: u(T)(u(C).string().min(1, "MID is required"))
|
|
155
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
156
|
+
d(P, {
|
|
157
|
+
modelValue: r.value,
|
|
158
|
+
"onUpdate:modelValue": b[2] || (b[2] = (e) => r.value = e),
|
|
159
|
+
label: "API Key",
|
|
160
|
+
rules: u(T)(u(C).string().min(1, "API key is required"))
|
|
161
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
162
|
+
d(h, {
|
|
163
|
+
modelValue: a.value,
|
|
164
|
+
"onUpdate:modelValue": b[3] || (b[3] = (e) => a.value = e),
|
|
165
|
+
label: "Private Key",
|
|
166
|
+
rows: 3,
|
|
167
|
+
placeholder: "PEM, or base64 of the PEM",
|
|
168
|
+
rules: u(T)(u(C).string().min(1, "Private key is required"))
|
|
169
|
+
}, null, 8, ["modelValue", "rules"])
|
|
170
|
+
], 64);
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}), Ce = /* @__PURE__ */ E({
|
|
174
|
+
__name: "ExternalTerminalSideSheet",
|
|
175
|
+
props: /* @__PURE__ */ H({
|
|
176
|
+
terminal: {
|
|
177
|
+
type: Object
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
modelValue: { type: Boolean, default: !1 },
|
|
181
|
+
modelModifiers: {}
|
|
182
|
+
}),
|
|
183
|
+
emits: /* @__PURE__ */ H(["submit"], ["update:modelValue"]),
|
|
184
|
+
setup(i, { emit: o }) {
|
|
185
|
+
const n = G(), t = i, s = o, r = te(i, "modelValue"), a = c(), m = c(), f = c(""), _ = c(""), x = c(), I = c({}), b = {
|
|
186
|
+
BEAM: [j.F_COUNTRY.enum.TH],
|
|
187
|
+
BRI: [j.F_COUNTRY.enum.ID]
|
|
188
|
+
}, P = {
|
|
189
|
+
BRI: Te
|
|
190
|
+
}, h = n.currentCountry, e = S(
|
|
191
|
+
() => ve.FdoExternalTerminalProvider.options.filter(
|
|
192
|
+
(v) => b[v].includes(h.value ?? j.F_COUNTRY.enum.MY)
|
|
193
|
+
).map((v) => ({
|
|
194
|
+
label: v,
|
|
195
|
+
value: v
|
|
196
|
+
}))
|
|
197
|
+
), l = S(() => {
|
|
198
|
+
var v;
|
|
199
|
+
return ((v = t.terminal) == null ? void 0 : v.type) ?? x.value;
|
|
200
|
+
}), y = S(
|
|
201
|
+
() => l.value ? P[l.value] : void 0
|
|
202
|
+
);
|
|
203
|
+
L(r, (v) => {
|
|
204
|
+
var F, U, A, $;
|
|
205
|
+
v && (f.value = ((F = t.terminal) == null ? void 0 : F.name) ?? "", _.value = ((U = t.terminal) == null ? void 0 : U.restaurantId) ?? "", x.value = (A = t.terminal) == null ? void 0 : A.type, I.value = { ...(($ = t.terminal) == null ? void 0 : $.providerData) ?? {} });
|
|
206
|
+
});
|
|
207
|
+
function B() {
|
|
208
|
+
s("submit", {
|
|
209
|
+
name: f.value,
|
|
210
|
+
restaurantId: _.value,
|
|
211
|
+
type: x.value,
|
|
212
|
+
providerData: m.value ? { ...I.value, ...m.value.values() } : void 0
|
|
213
|
+
}), r.value = !1;
|
|
214
|
+
}
|
|
215
|
+
return (v, F) => {
|
|
216
|
+
const U = p("FmSelect"), A = p("FmTextField"), $ = p("FmButton"), J = p("FmForm"), X = p("FmSideSheet");
|
|
217
|
+
return g(), V(X, {
|
|
218
|
+
modelValue: r.value,
|
|
219
|
+
"onUpdate:modelValue": F[3] || (F[3] = (K) => r.value = K),
|
|
220
|
+
header: t.terminal ? "Update External Terminal" : "Create New External Terminal",
|
|
221
|
+
"close-button": ""
|
|
222
|
+
}, {
|
|
223
|
+
default: D(() => [
|
|
224
|
+
d(J, {
|
|
225
|
+
ref: a.value,
|
|
226
|
+
class: "flex flex-col gap-16 px-4 py-6",
|
|
227
|
+
onValidationSuccess: B
|
|
228
|
+
}, {
|
|
229
|
+
default: D(() => {
|
|
230
|
+
var K;
|
|
231
|
+
return [
|
|
232
|
+
t.terminal ? M("", !0) : (g(), V(U, {
|
|
233
|
+
key: 0,
|
|
234
|
+
modelValue: x.value,
|
|
235
|
+
"onUpdate:modelValue": F[0] || (F[0] = (k) => x.value = k),
|
|
236
|
+
label: "Provider",
|
|
237
|
+
items: e.value,
|
|
238
|
+
rules: u(T)(u(C).string().min(1, "Provider is required"))
|
|
239
|
+
}, null, 8, ["modelValue", "items", "rules"])),
|
|
240
|
+
t.terminal ? M("", !0) : (g(), V(pe, {
|
|
241
|
+
key: 1,
|
|
242
|
+
modelValue: _.value,
|
|
243
|
+
"onUpdate:modelValue": F[1] || (F[1] = (k) => _.value = k),
|
|
244
|
+
label: "Restaurant",
|
|
245
|
+
"search-placeholder": "Search restaurants",
|
|
246
|
+
rules: u(T)(u(C).string().min(1, "Restaurant is required"))
|
|
247
|
+
}, null, 8, ["modelValue", "rules"])),
|
|
248
|
+
d(A, {
|
|
249
|
+
modelValue: f.value,
|
|
250
|
+
"onUpdate:modelValue": F[2] || (F[2] = (k) => f.value = k),
|
|
251
|
+
label: "Terminal Name",
|
|
252
|
+
rules: u(T)(u(C).string().min(1))
|
|
253
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
254
|
+
y.value ? (g(), V(W(y.value), {
|
|
255
|
+
key: `${((K = t.terminal) == null ? void 0 : K._id) ?? "new"}-${l.value}`,
|
|
256
|
+
ref_key: "configForm",
|
|
257
|
+
ref: m,
|
|
258
|
+
initial: I.value
|
|
259
|
+
}, null, 8, ["initial"])) : M("", !0),
|
|
260
|
+
d($, {
|
|
261
|
+
type: "submit",
|
|
262
|
+
label: t.terminal ? "Update" : "Create"
|
|
263
|
+
}, null, 8, ["label"])
|
|
264
|
+
];
|
|
265
|
+
}),
|
|
266
|
+
_: 1
|
|
267
|
+
}, 512)
|
|
268
|
+
]),
|
|
269
|
+
_: 1
|
|
270
|
+
}, 8, ["modelValue", "header"]);
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
}), we = { class: "t-caption" }, Ee = /* @__PURE__ */ E({
|
|
274
|
+
__name: "BeamTerminal",
|
|
275
|
+
props: {
|
|
276
|
+
terminal: {
|
|
277
|
+
type: Object,
|
|
278
|
+
required: !0
|
|
279
|
+
},
|
|
280
|
+
onPair: {
|
|
281
|
+
type: Function,
|
|
282
|
+
required: !0
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
setup(i) {
|
|
286
|
+
const o = i, n = c(), t = c("");
|
|
287
|
+
return (s, r) => {
|
|
288
|
+
const a = p("FmTextField"), m = p("FmButton"), f = p("FmForm");
|
|
289
|
+
return g(), V(f, {
|
|
290
|
+
ref: n.value,
|
|
291
|
+
class: "flex flex-col gap-16 mb-6",
|
|
292
|
+
onValidationSuccess: r[1] || (r[1] = () => o.onPair({ type: "BEAM", pairCode: t.value }))
|
|
293
|
+
}, {
|
|
294
|
+
default: D(() => [
|
|
295
|
+
w("div", we, [
|
|
296
|
+
r[2] || (r[2] = N(" Enter the pairing code shown on ", -1)),
|
|
297
|
+
w("b", null, Y(o.terminal.name), 1),
|
|
298
|
+
r[3] || (r[3] = N(" to register it with Bolt Connect. ", -1))
|
|
299
|
+
]),
|
|
300
|
+
d(a, {
|
|
301
|
+
modelValue: t.value,
|
|
302
|
+
"onUpdate:modelValue": r[0] || (r[0] = (_) => t.value = _),
|
|
303
|
+
label: "Pair Code",
|
|
304
|
+
"label-mark": "required",
|
|
305
|
+
rules: u(T)(u(C).string().min(1, "Pair code is required"))
|
|
306
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
307
|
+
d(m, {
|
|
308
|
+
type: "submit",
|
|
309
|
+
label: "Pair"
|
|
310
|
+
})
|
|
311
|
+
]),
|
|
312
|
+
_: 1
|
|
313
|
+
}, 512);
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
}), Pe = { class: "t-caption" }, Be = /* @__PURE__ */ E({
|
|
317
|
+
__name: "BRITerminal",
|
|
318
|
+
props: {
|
|
319
|
+
terminal: {
|
|
320
|
+
type: Object,
|
|
321
|
+
required: !0
|
|
322
|
+
},
|
|
323
|
+
onPair: {
|
|
324
|
+
type: Function,
|
|
325
|
+
required: !0
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
setup(i) {
|
|
329
|
+
const o = i, n = c(), t = c(""), s = c("");
|
|
330
|
+
return (r, a) => {
|
|
331
|
+
const m = p("FmTextField"), f = p("FmButton"), _ = p("FmForm");
|
|
332
|
+
return g(), V(_, {
|
|
333
|
+
ref: n.value,
|
|
334
|
+
class: "flex flex-col gap-16 mb-6",
|
|
335
|
+
onValidationSuccess: a[2] || (a[2] = () => o.onPair({ type: "BRI", pairCode: t.value, edcId: s.value }))
|
|
336
|
+
}, {
|
|
337
|
+
default: D(() => [
|
|
338
|
+
w("div", Pe, [
|
|
339
|
+
a[3] || (a[3] = N(" Enter the pairing code and EDC ID shown on ", -1)),
|
|
340
|
+
w("b", null, Y(o.terminal.name), 1),
|
|
341
|
+
a[4] || (a[4] = N(" to register it with BRI. ", -1))
|
|
342
|
+
]),
|
|
343
|
+
d(m, {
|
|
344
|
+
modelValue: t.value,
|
|
345
|
+
"onUpdate:modelValue": a[0] || (a[0] = (x) => t.value = x),
|
|
346
|
+
label: "Pair Code",
|
|
347
|
+
"label-mark": "required",
|
|
348
|
+
rules: u(T)(u(C).string().min(1, "Pair code is required"))
|
|
349
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
350
|
+
d(m, {
|
|
351
|
+
modelValue: s.value,
|
|
352
|
+
"onUpdate:modelValue": a[1] || (a[1] = (x) => s.value = x),
|
|
353
|
+
label: "EDC ID",
|
|
354
|
+
"label-mark": "required",
|
|
355
|
+
rules: u(T)(u(C).string().min(1, "EDC ID is required"))
|
|
356
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
357
|
+
d(f, {
|
|
358
|
+
type: "submit",
|
|
359
|
+
label: "Pair"
|
|
360
|
+
})
|
|
361
|
+
]),
|
|
362
|
+
_: 1
|
|
363
|
+
}, 512);
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
}), De = /* @__PURE__ */ E({
|
|
367
|
+
__name: "ExternalTerminalPairDialog",
|
|
368
|
+
props: {
|
|
369
|
+
terminal: {
|
|
370
|
+
type: Object,
|
|
371
|
+
required: !0
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
setup(i) {
|
|
375
|
+
const o = i, n = ue(), t = {
|
|
376
|
+
BEAM: Ee,
|
|
377
|
+
BRI: Be
|
|
378
|
+
}, s = S(() => t[o.terminal.type]);
|
|
379
|
+
function r(a) {
|
|
380
|
+
n.emitData(a), n.emitAction("primary");
|
|
381
|
+
}
|
|
382
|
+
return (a, m) => (g(), V(W(s.value), ae(re({
|
|
383
|
+
terminal: o.terminal,
|
|
384
|
+
onPair: r
|
|
385
|
+
})), null, 16));
|
|
386
|
+
}
|
|
387
|
+
}), Ie = { class: "flex justify-between mb-6 items-center" }, Se = { class: "flex space-x-4" }, he = { class: "flex space-x-4" }, We = /* @__PURE__ */ E({
|
|
388
|
+
__name: "ExternalTerminal",
|
|
389
|
+
setup(i) {
|
|
390
|
+
const o = c(), { searchKey: n } = oe({
|
|
391
|
+
searchKey: ""
|
|
392
|
+
});
|
|
393
|
+
let t;
|
|
394
|
+
L(n, async () => {
|
|
395
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
|
396
|
+
var e;
|
|
397
|
+
return (e = o.value) == null ? void 0 : e.reset();
|
|
398
|
+
}, 700);
|
|
399
|
+
});
|
|
400
|
+
const s = G(), r = me(), a = Q();
|
|
401
|
+
S(
|
|
402
|
+
() => new Map(s.restaurants.value.map((e) => [e._id, e.profile.name]))
|
|
403
|
+
);
|
|
404
|
+
const m = c(!1), f = c();
|
|
405
|
+
function _(e) {
|
|
406
|
+
f.value = e, m.value = !0;
|
|
407
|
+
}
|
|
408
|
+
async function x(e) {
|
|
409
|
+
var y;
|
|
410
|
+
const l = f.value;
|
|
411
|
+
try {
|
|
412
|
+
l ? await R.updateById(
|
|
413
|
+
l._id,
|
|
414
|
+
e.type === "BRI" ? {
|
|
415
|
+
type: "BRI",
|
|
416
|
+
name: e.name,
|
|
417
|
+
providerData: e.providerData
|
|
418
|
+
} : { type: "BEAM", name: e.name }
|
|
419
|
+
) : await R.create(e), (y = o.value) == null || y.reset(), a.open({
|
|
420
|
+
type: "success",
|
|
421
|
+
message: l ? "External terminal updated successfully." : "External terminal created successfully."
|
|
422
|
+
});
|
|
423
|
+
} catch (B) {
|
|
424
|
+
a.open({
|
|
425
|
+
type: "error",
|
|
426
|
+
title: l ? "Error occurs when update external terminal" : "Error occurs when create external terminal",
|
|
427
|
+
message: z(B)
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
async function I(e) {
|
|
432
|
+
r.open({
|
|
433
|
+
title: "Pair External Terminal",
|
|
434
|
+
closeButton: !0,
|
|
435
|
+
overlay: !0,
|
|
436
|
+
contentComponent: De,
|
|
437
|
+
contentComponentProps: { terminal: e }
|
|
438
|
+
}).onPrimary(async (l) => {
|
|
439
|
+
var y;
|
|
440
|
+
r.close();
|
|
441
|
+
try {
|
|
442
|
+
await R.pair(e._id, l), (y = o.value) == null || y.reset(), a.open({
|
|
443
|
+
type: "success",
|
|
444
|
+
message: "External terminal paired successfully."
|
|
445
|
+
});
|
|
446
|
+
} catch (B) {
|
|
447
|
+
a.open({
|
|
448
|
+
type: "error",
|
|
449
|
+
title: "Error occurs when pair external terminal",
|
|
450
|
+
message: z(B)
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
async function b(e) {
|
|
456
|
+
fe(
|
|
457
|
+
r,
|
|
458
|
+
"Delete External Terminal",
|
|
459
|
+
"Are you sure to delete this external terminal? This action cannot be revert!",
|
|
460
|
+
async () => {
|
|
461
|
+
var l;
|
|
462
|
+
try {
|
|
463
|
+
await R.delete(e), (l = o.value) == null || l.reset(), a.open({
|
|
464
|
+
type: "success",
|
|
465
|
+
message: "External terminal deleted successfully."
|
|
466
|
+
});
|
|
467
|
+
} catch (y) {
|
|
468
|
+
a.open({
|
|
469
|
+
type: "error",
|
|
470
|
+
title: "Error occurs when delete external terminal",
|
|
471
|
+
message: z(y)
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
const P = function(e) {
|
|
478
|
+
return {
|
|
479
|
+
id: e._id,
|
|
480
|
+
status: e.status,
|
|
481
|
+
name: e.name,
|
|
482
|
+
type: e.type,
|
|
483
|
+
restaurant: e.restaurantId,
|
|
484
|
+
updatedAt: le(e.updatedAt).format("YYYY-MM-DD HH:mm:ss")
|
|
485
|
+
};
|
|
486
|
+
}, h = [
|
|
487
|
+
{
|
|
488
|
+
accessorKey: "id",
|
|
489
|
+
header: () => "Terminal ID",
|
|
490
|
+
meta: {
|
|
491
|
+
textAlign: "right"
|
|
492
|
+
},
|
|
493
|
+
cell: ({ cell: e }) => q(ye, { data: e.getValue() })
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
accessorKey: "name",
|
|
497
|
+
header: () => "Name",
|
|
498
|
+
meta: {
|
|
499
|
+
textAlign: "left"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
accessorKey: "type",
|
|
504
|
+
header: () => "Provider",
|
|
505
|
+
meta: {
|
|
506
|
+
textAlign: "left"
|
|
507
|
+
},
|
|
508
|
+
cell: ({ cell: e, row: l }) => q(xe, { row: l, data: e.getValue() })
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
accessorKey: "restaurant",
|
|
512
|
+
header: () => "Restaurant",
|
|
513
|
+
meta: {
|
|
514
|
+
textAlign: "left"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
accessorKey: "status",
|
|
519
|
+
header: () => "Status",
|
|
520
|
+
meta: {
|
|
521
|
+
textAlign: "left"
|
|
522
|
+
},
|
|
523
|
+
cell: ({ cell: e }) => q(Fe, { data: e.getValue() })
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
accessorKey: "updatedAt",
|
|
527
|
+
header: () => "Last Updated",
|
|
528
|
+
meta: {
|
|
529
|
+
textAlign: "left"
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
accessorKey: "id",
|
|
534
|
+
header: () => "Actions",
|
|
535
|
+
meta: {
|
|
536
|
+
textAlign: "center"
|
|
537
|
+
},
|
|
538
|
+
cell: ({ row: e }) => {
|
|
539
|
+
var y;
|
|
540
|
+
const l = (y = o.value) == null ? void 0 : y.pageData().at(e.index);
|
|
541
|
+
return q(Ve, {
|
|
542
|
+
data: l,
|
|
543
|
+
onPair: () => I(l),
|
|
544
|
+
onEdit: () => _(l),
|
|
545
|
+
onDelete: () => b(l._id)
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
];
|
|
550
|
+
return (e, l) => {
|
|
551
|
+
const y = p("FmSearch"), B = p("FmButton");
|
|
552
|
+
return g(), V(se, {
|
|
553
|
+
title: "External Terminals",
|
|
554
|
+
loading: !1
|
|
555
|
+
}, {
|
|
556
|
+
default: D(() => [
|
|
557
|
+
w("div", Ie, [
|
|
558
|
+
w("div", Se, [
|
|
559
|
+
d(y, {
|
|
560
|
+
"model-value": u(n),
|
|
561
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => ne(n) ? n.value = v : null),
|
|
562
|
+
class: "mr-8",
|
|
563
|
+
label: "Search",
|
|
564
|
+
placeholder: "Search ..."
|
|
565
|
+
}, null, 8, ["model-value"])
|
|
566
|
+
]),
|
|
567
|
+
w("div", he, [
|
|
568
|
+
d(B, {
|
|
569
|
+
label: "Create",
|
|
570
|
+
icon: "add",
|
|
571
|
+
onClick: l[1] || (l[1] = () => _())
|
|
572
|
+
})
|
|
573
|
+
])
|
|
574
|
+
]),
|
|
575
|
+
d(ie, {
|
|
576
|
+
ref_key: "controller",
|
|
577
|
+
ref: o,
|
|
578
|
+
"column-defs": h,
|
|
579
|
+
"rows-defs": P,
|
|
580
|
+
paginate: (v, F) => u(R).read({ searchKey: u(n), limit: v, cursor: F })
|
|
581
|
+
}, null, 8, ["paginate"]),
|
|
582
|
+
d(Ce, {
|
|
583
|
+
modelValue: m.value,
|
|
584
|
+
"onUpdate:modelValue": l[2] || (l[2] = (v) => m.value = v),
|
|
585
|
+
terminal: f.value,
|
|
586
|
+
onSubmit: x
|
|
587
|
+
}, null, 8, ["modelValue", "terminal"])
|
|
588
|
+
]),
|
|
589
|
+
_: 1
|
|
590
|
+
});
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
export {
|
|
595
|
+
We as default
|
|
596
|
+
};
|